@univerjssheets-uiindexclassesSheetclipboardservice

@univerjs/sheets-ui v0.5.4


Class: SheetClipboardService

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:128

Extends

Implements

Constructors

new SheetClipboardService()

new SheetClipboardService(
   _logService, 
   _univerInstanceService, 
   _selectionManagerService, 
   _clipboardInterfaceService, 
   _undoRedoService, 
   _commandService, 
   _markSelectionService, 
   _notificationService, 
   _platformService, 
   _renderManagerService, 
   _themeService, 
   _localeService, 
   _errorService, 
   _injector): SheetClipboardService

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:148

Parameters

ParameterType
_logServiceILogService
_univerInstanceServiceIUniverInstanceService
_selectionManagerServiceSheetsSelectionsService
_clipboardInterfaceServiceIClipboardInterfaceService
_undoRedoServiceIUndoRedoService
_commandServiceICommandService
_markSelectionServiceIMarkSelectionService
_notificationServiceINotificationService
_platformServiceIPlatformService
_renderManagerServiceIRenderManagerService
_themeServiceThemeService
_localeServiceLocaleService
_errorServiceErrorService
_injectorInjector

Returns

SheetClipboardService

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:96
clipboardHooks$readonlyObservable<ISheetClipboardHook[]>undefined-submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:132
pasteOptionsCache$readonlyObservable<null | IPasteOptionCache>undefined-submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:142
showMenu$readonlyObservable<boolean>undefined-submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:146

Methods

addClipboardHook()

addClipboardHook(hook): IDisposable

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:317

Parameters

ParameterType
hookISheetClipboardHook

Returns

IDisposable

Implementation of

ISheetClipboardService.addClipboardHook


copy()

copy(copyType): Promise<boolean>

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:192

Parameters

ParameterTypeDefault value
copyTypeCOPY_TYPECOPY_TYPE.COPY

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.copy


copyContentCache()

copyContentCache(): CopyContentCache

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:180

Returns

CopyContentCache

Implementation of

ISheetClipboardService.copyContentCache


cut()

cut(): Promise<boolean>

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:233

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.cut


dispose()

dispose(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

Disposable.dispose


disposePasteOptionsCache()

disposePasteOptionsCache(): void

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:1181

Returns

void

Implementation of

ISheetClipboardService.disposePasteOptionsCache


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


generateCopyContent()

generateCopyContent(
   workbookId, 
   worksheetId, 
range): Nullable<ICopyContent>

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:184

Parameters

ParameterType
workbookIdstring
worksheetIdstring
rangeIRange

Returns

Nullable<ICopyContent>

Implementation of

ISheetClipboardService.generateCopyContent


getClipboardHooks()

getClipboardHooks(): ISheetClipboardHook[]

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:342

Returns

ISheetClipboardHook[]

Implementation of

ISheetClipboardService.getClipboardHooks


legacyPaste()

legacyPaste(html?, text?): Promise<boolean>

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:272

Parameters

ParameterType
html?string
text?string

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.legacyPaste


paste()

paste(item, pasteType): Promise<boolean>

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:237

Parameters

ParameterTypeDefault value
itemClipboardItemundefined
pasteType"default-paste"PREDEFINED_HOOK_NAME.DEFAULT_PASTE

Returns

Promise<boolean>

Implementation of

ISheetClipboardService.paste


removeMarkSelection()

removeMarkSelection(): void

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:1163

Returns

void

Implementation of

ISheetClipboardService.removeMarkSelection


rePasteWithPasteType()

rePasteWithPasteType(type): boolean

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:287

Parameters

ParameterType
typeIPasteHookKeyType

Returns

boolean

Implementation of

ISheetClipboardService.rePasteWithPasteType


setShowMenu()

setShowMenu(show): void

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:176

Parameters

ParameterType
showboolean

Returns

void

Implementation of

ISheetClipboardService.setShowMenu


updatePasteOptionsCache()

updatePasteOptionsCache(cache): void

Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:313

Parameters

ParameterType
cachenull | IPasteOptionCache

Returns

void

Implementation of

ISheetClipboardService.updatePasteOptionsCache