New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for copy/cut/paste #74
Comments
Current implementation. public clipboardCopy(sourceLeftCorner: SimpleCellAddress, width: number, height: number): CellValue[][]
public clipboardCut(sourceLeftCorner: SimpleCellAddress, width: number, height: number): CellValue[][]
public clipboardPaste(targetLeftCorner: SimpleCellAddress): CellValueChange[]
public clipboardClear(): void Copy:
to Sheet2, will result in
Cut - paste: Copy and cut returns cell values for further use in external clipboard. |
@voodoo11, you were waiting for the names for methods. This should do it: public copy(sourceLeftCorner: SimpleCellAddress, width: number, height: number): CellValue[][]
public cut(sourceLeftCorner: SimpleCellAddress, width: number, height: number): CellValue[][]
public paste(targetLeftCorner: SimpleCellAddress): CellValueChange[]
public clearClipboard(): void IMO method hyperformula/src/ClipboardOperations.ts Lines 118 to 122 in ea8bbad
|
Do we have any idea how we can fix this?
Right now we abort on every crud operation without knowing the result of such f.e: hyperformula/src/CrudOperations.ts Lines 58 to 65 in ea8bbad
Maybe we could use our changes list? hyperformula/src/HyperFormula.ts Lines 848 to 858 in ea8bbad
And compare the list against hyperformula/src/ClipboardOperations.ts Lines 37 to 45 in ea8bbad
Awesome idea 👍 |
Methods renamed #171 |
We should introduce sheet self-references.
It is not that simple, as changes list does not contain all the changes. For example if you add row (which can affect cut operation), all rows below are shifted, but this is only a structural change and nothing is added to the list. Otherwise we would have to add everything from this row to the end of the sheet. |
Ok, I get it now. Thanks for the details
I've created a feature request for self-references #179 if you could, please take a look. I'm closing this task as done. Thanks 🏆 |
Description
Support for copy/cut/paste.
WIP. We need to specify how this feature should work.
The text was updated successfully, but these errors were encountered: