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
Parameter | Type |
---|---|
_logService | ILogService |
_univerInstanceService | IUniverInstanceService |
_selectionManagerService | SheetsSelectionsService |
_clipboardInterfaceService | IClipboardInterfaceService |
_undoRedoService | IUndoRedoService |
_commandService | ICommandService |
_markSelectionService | IMarkSelectionService |
_notificationService | INotificationService |
_platformService | IPlatformService |
_renderManagerService | IRenderManagerService |
_themeService | ThemeService |
_localeService | LocaleService |
_errorService | ErrorService |
_injector | Injector |
Returns
Overrides
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:96 |
clipboardHooks$ | readonly | Observable <ISheetClipboardHook []> | undefined | - | submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:132 |
pasteOptionsCache$ | readonly | Observable <null | IPasteOptionCache > | undefined | - | submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:142 |
showMenu$ | readonly | Observable <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
Parameter | Type |
---|---|
hook | ISheetClipboardHook |
Returns
Implementation of
ISheetClipboardService
.addClipboardHook
copy()
copy(copyType): Promise<boolean>
Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:192
Parameters
Parameter | Type | Default value |
---|---|---|
copyType | COPY_TYPE | COPY_TYPE.COPY |
Returns
Promise
<boolean
>
Implementation of
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
dispose()
dispose(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:109
Returns
void
Inherited from
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
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
generateCopyContent()
generateCopyContent(
workbookId,
worksheetId,
range): Nullable<ICopyContent>
Defined in: submodules/univer/packages/sheets-ui/src/services/clipboard/clipboard.service.ts:184
Parameters
Parameter | Type |
---|---|
workbookId | string |
worksheetId | string |
range | IRange |
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
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
Parameter | Type |
---|---|
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
Parameter | Type | Default value |
---|---|---|
item | ClipboardItem | undefined |
pasteType | "default-paste" | PREDEFINED_HOOK_NAME.DEFAULT_PASTE |
Returns
Promise
<boolean
>
Implementation of
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
Parameter | Type |
---|---|
type | IPasteHookKeyType |
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
Parameter | Type |
---|---|
show | boolean |
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
Parameter | Type |
---|---|
cache | null | IPasteOptionCache |
Returns
void