Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(formula): other formula to local (#6624)

Univer06e8cbd3f84f
diff --git a/packages/engine-formula/src/services/register-other-formula.service.ts b/packages/engine-formula/src/services/register-other-formula.service.ts
index 46c87825ec..4b0cb4e477 100644
--- a/packages/engine-formula/src/services/register-other-formula.service.ts
+++ b/packages/engine-formula/src/services/register-other-formula.service.ts
@@ -122,10 +122,11 @@ export class RegisterOtherFormulaService extends Disposable {
},
};
- this._commandService.executeCommand(SetOtherFormulaMutation.id, params).then(() => {
+ this._commandService.executeCommand(SetOtherFormulaMutation.id, params, { onlyLocal: true }).then(() => {
this._commandService.executeCommand(
OtherFormulaMarkDirty.id,
- { [unitId]: { [subUnitId]: { [formulaId]: true } } }
+ { [unitId]: { [subUnitId]: { [formulaId]: true } } },
+ { onlyLocal: true }
);
});
};
@@ -223,7 +224,7 @@ export class RegisterOtherFormulaService extends Disposable {
subUnitId,
formulaIdList,
};
- this._commandService.executeCommand(RemoveOtherFormulaMutation.id, params);
+ this._commandService.executeCommand(RemoveOtherFormulaMutation.id, params, { onlyLocal: true });
const cacheMap = this._ensureCacheMap(unitId, subUnitId);
formulaIdList.forEach((id) => cacheMap.delete(id));
}
@@ -257,7 +258,8 @@ export class RegisterOtherFormulaService extends Disposable {
cache.status = FormulaResultStatus.WAIT;
this._commandService.executeCommand(
OtherFormulaMarkDirty.id,
- { [unitId]: { [subUnitId]: { [formulaId]: true } } }
+ { [unitId]: { [subUnitId]: { [formulaId]: true } } },
+ { onlyLocal: true }
);
}
}