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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
chore: remove rendundant code
Wenzhao Hu9a50ec9d4af5
diff --git a/packages/sheets-formula/src/controllers/formula-editor-show.controller.ts b/packages/sheets-formula/src/controllers/formula-editor-show.controller.tsindex e343523cec..b11db534ee 100644--- a/packages/sheets-formula/src/controllers/formula-editor-show.controller.ts+++ b/packages/sheets-formula/src/controllers/formula-editor-show.controller.ts@@ -26,13 +26,11 @@ import {import {ErrorType,FormulaDataModel,- LexerTreeBuilder,SetArrayFormulaDataMutation,SetFormulaCalculationResultMutation,} from '@univerjs/engine-formula';import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';import { IRenderManagerService } from '@univerjs/engine-render';-import { SheetInterceptorService } from '@univerjs/sheets';import {IEditorBridgeService,ISelectionRenderService,@@ -48,13 +46,11 @@ export class FormulaEditorShowController extends Disposable implements IRenderMoprivate readonly _context: IRenderContext<Workbook>,@Inject(IEditorBridgeService) private _editorBridgeService: IEditorBridgeService,@Inject(FormulaDataModel) private readonly _formulaDataModel: FormulaDataModel,- @Inject(LexerTreeBuilder) private readonly _lexerTreeBuilder: LexerTreeBuilder,@Inject(ThemeService) private readonly _themeService: ThemeService,@IRenderManagerService private readonly _renderManagerService: IRenderManagerService,@ISelectionRenderService private readonly _selectionRenderService: ISelectionRenderService,@Inject(SheetSkeletonManagerService) private readonly _sheetSkeletonManagerService: SheetSkeletonManagerService,- @ICommandService private readonly _commandService: ICommandService,- @Inject(SheetInterceptorService) private _sheetInterceptorService: SheetInterceptorService+ @ICommandService private readonly _commandService: ICommandService) {super();this._initInterceptorEditorStart();diff --git a/packages/sheets-ui/src/controllers/render-controllers/editor-bridge.render-controller.ts b/packages/sheets-ui/src/controllers/render-controllers/editor-bridge.render-controller.tsindex 7d0c143860..beb770a616 100644--- a/packages/sheets-ui/src/controllers/render-controllers/editor-bridge.render-controller.ts+++ b/packages/sheets-ui/src/controllers/render-controllers/editor-bridge.render-controller.ts@@ -15,7 +15,7 @@*/import type { ICommandInfo, IExecutionOptions, ISelectionCell, Nullable, Workbook } from '@univerjs/core';-import { ICommandService, IContextService, RxDisposable } from '@univerjs/core';+import { ICommandService, RxDisposable } from '@univerjs/core';import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';import { DeviceInputEventType } from '@univerjs/engine-render';import type { ISelectionWithStyle } from '@univerjs/sheets';@@ -25,9 +25,9 @@ import {SelectionManagerService,SetWorksheetActiveOperation,} from '@univerjs/sheets';-import { Inject, Injector } from '@wendellhu/redi';+import { Inject } from '@wendellhu/redi';import { merge, takeUntil } from 'rxjs';-import { IEditorService, ILayoutService, IRangeSelectorService } from '@univerjs/ui';+import { IRangeSelectorService } from '@univerjs/ui';import { SetZoomRatioCommand } from '../../commands/commands/set-zoom-ratio.command';import { SetActivateCellEditOperation } from '../../commands/operations/activate-cell-edit.operation';import { SetCellEditVisibleOperation } from '../../commands/operations/cell-edit.operation';@@ -38,12 +38,8 @@ import { getSheetObject } from '../utils/component-tools';export class EditorBridgeRenderController extends RxDisposable implements IRenderModule {constructor(private readonly _context: IRenderContext<Workbook>,- @Inject(Injector) private readonly _injector: Injector,@ICommandService private readonly _commandService: ICommandService,@IEditorBridgeService private readonly _editorBridgeService: IEditorBridgeService,- @ILayoutService private readonly _layoutService: ILayoutService,- @IEditorService private readonly _editorService: IEditorService,- @IContextService private readonly _contextService: IContextService,@Inject(SelectionManagerService) private readonly _selectionManagerService: SelectionManagerService,@IRangeSelectorService private readonly _rangeSelectorService: IRangeSelectorService) {@@ -57,7 +53,6 @@ export class EditorBridgeRenderController extends RxDisposable implements IRendeprivate _initialize() {this._initSelectionChangeListener();this._initEventListener();- // this._initialChangeEditorListener();this._initialRangeSelector();}@@ -127,31 +122,6 @@ export class EditorBridgeRenderController extends RxDisposable implements IRendespreadsheetRowHeader.onPointerDown$.subscribeEvent(this._onCanvasPointerDown.bind(this));}- // Move to another controller- // private _initialChangeEditorListener() {- // this.disposeWithMe(- // this._univerInstanceService.getCurrentTypeOfUnit$(UniverInstanceType.UNIVER_DOC).subscribe((documentDataModel) => {- // if (documentDataModel == null) {- // return;- // }-- // const editorId = documentDataModel.getUnitId();- // if (!this._editorService.isEditor(editorId)) {- // return;- // }-- // if (this._editorService.isSheetEditor(editorId)) {- // this._contextService.setContextValue(FOCUSING_DOC, false);- // this._contextService.setContextValue(FOCUSING_SHEET, true);- // } else {- // this._contextService.setContextValue(FOCUSING_SHEET, false);- // this._contextService.setContextValue(FOCUSING_DOC, true);- // this._hideEditor();- // }- // })- // );- // }-private _onCanvasPointerDown() {// In the activated state of formula editing,// prohibit closing the editor according to the state to facilitate generating selection reference text.