summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)AuthorFilesLines
2022-07-25lok: don't force formulabar update on every view switchSzymon Kłos1-1/+2
This will reduce number of messages and helps to avoid selection change in other views when someone is editing a multiline cell and other user is doing something else at the same time (which triggers view switching to perform operations as different user). Change-Id: I8efc82be9793910c46bf6f33f7993e4c5734f9de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137304 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Rashesh Padia <rashesh.padia@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit a173b937aa8b8b67a423f23b05ddf02f83870034) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137414 Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
2022-07-08sc: lok: fix offset other edit viewHenry Castro1-2/+3
Multiple view case. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I8049f2f36438e77beb5fe41399007ced0d500efa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2022-07-08sc: lok: fix offset edit output areaHenry Castro1-4/+3
When focus is received, the edit view output area rectangle is calculated to draw the text, after EditGrowX and EditGrowY checks, so intercept the rectangle to not alter the text positions. Change-Id: I1439fc3d436bd5f4d03b13bd6bb56a85012a2655 Signed-off-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133214 Reviewed-by: Ashod Nakashian <ash@collabora.com>
2022-07-05lok: vcl: introduce set_cursor_data methodHenry Castro1-0/+2
The ScEditWindow requires to assign a cursor, so the child widget can send cursor invalidation to client side. Change-Id: I429d484a311f217f2419e38d50f8d9a422640221 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130446 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136832 Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-06-09lok: do not recreate lok-drawview for every tile paintDennis Francis1-7/+10
This lets the ScLOKDrawView live long enough for non-tile painting related invocation of its methods and hopefully those of its member objects. This is a blind fix for the following crash: /opt/collaboraoffice/program/../program/libsclo.so (anonymous namespace)::ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact(basegfx::B2DVector&, sdr::contact::ViewObjectContact const&) const ... /opt/collaboraoffice/program/libmergedlo.so SdrTextObj::NbcSetOutlinerParaObjectForText(std::unique_ptr<OutlinerParaObject, std::default_delete<OutlinerParaObject> >, SdrText*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/svdraw/svdotext.cxx:1379 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::TextProperties::ItemSetChanged(SfxItemSet const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:360 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::RectangleProperties::ItemSetChanged(SfxItemSet const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/rectangleproperties.cxx:54 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::DefaultProperties::SetObjectItem(SfxPoolItem const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/defaultproperties.cxx:120 /opt/collaboraoffice/program/libscfiltlo.so XclTxo::XclTxo(XclExpRoot const&, EditTextObject const&, SdrObject*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/include/svl/cenumitm.hxx:26 /opt/collaboraoffice/program/libscfiltlo.so XclObjComment::XclObjComment(XclExpObjectManager&, tools::Rectangle const&, EditTextObject const&, SdrCaptionObj*, bool, ScAddress const&, tools::Rectangle const&, tools::Rectangle const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:179 /opt/collaboraoffice/program/libscfiltlo.so XclExpNote::XclExpNote(XclExpRoot const&, ScAddress const&, ScPostIt const*, rtl::OUString const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/tuple:137 /opt/collaboraoffice/program/libscfiltlo.so ExcTable::FillAsTableXml() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/include/rtl/ref.hxx:65 /opt/collaboraoffice/program/libscfiltlo.so ExcDocument::ReadDoc() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/sc/source/filter/excel/excdoc.cxx:747 /opt/collaboraoffice/program/libscfiltlo.so XclExpXmlStream::exportDocument() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/sc/source/filter/excel/xestream.cxx:1107 /opt/collaboraoffice/program/libooxlo.so Change-Id: I248395cca1e2da37208fc449aca731175a5aa368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133914 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-05-17lok-calc: new callback for print rangesDennis Francis4-0/+61
With this callback the lok clients can read and draw the print ranges on each sheet of the Calc document. Change-Id: Ie19351d4420e0f3d4191f6a354ce99ab830aede2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134375 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com>
2022-05-16lok: respect zoom in calc tile rendering of EditViewSzymon Kłos1-4/+9
Issue was that when using 150% zoom in LOK and editing some textbox inside Calc spreadsheet - we didn't see content of it (but tiles were invalidated). In other view we have seen textbox in correct place if zoom was 100%. To fix that we need to pass zoom factor and use it. Change-Id: Ib1cf49af02d0637e09ce68c5c2c41ffb3014c701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134288 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-04-15unit test: use temp copy in testInvalidEntrySave()Dennis Francis1-4/+26
Use a temporary copy of the source file to run this test otherwise it will execute a .uno:Save on the original document in the git tree! Change-Id: I673aad64453e72a9140efcad2b0ff9c0ceabc038 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132851 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-04-15sc: convert optimal width/height and normal width/height dialog to asyncrash4193-43/+65
Signed-off-by: rash419 <rashesh.padia@collabora.com> Change-Id: I96f6d90692d7767bdc276f753897bdc392c90411 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132919 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-13lok: unit test for invalid entry saveDennis Francis2-5/+52
Unit test related to the fix lok: avoid validation-dialog yield when saving e0175ee821eaff56c4b8e0a1b7afa1cabe0ab593 The test ensures that the document is marked unmodified after save has been executed in the middle of entering partial data to a validation cell. Change-Id: Idffd6d647034e128d0d800fe8e29efc333c03db6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132653 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-04-06lok: avoid validation-dialog yield when savingDennis Francis5-7/+24
Disable error dialog box when about to save in lok mode as this ultimately invokes SvpSalInstance::DoYield() when we want to save immediately without committing any erroneous input in possibly a cell with validation rules. After save is complete the user can continue editing. Change-Id: Iffa0766ad594db75f57158986c4e1d2646f71da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132410 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-03-29lok: paste-undo: invalidate sheetgeometryDennis Francis1-0/+14
In case of copy/pasting of whole column(row) and its undo/redo may result in column(row) width(height) changes. Hence a corresponding sheet-geometry invalidation message needs to be sent to the lok client(s). Change-Id: I7aa471d9770fc21c567a3c6f5d5926df0fd5dacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132015 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-28sc: fix crash in SdrPageView::GetPageWindow()Aron Budea1-1/+3
From crashreport: SIG Fatal signal received: SIGSEGV SdrPageView::GetPageWindow(unsigned int) const svx/source/svdraw/svdpagv.cxx:84 (anonymous namespace)::ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact(basegfx::B2DVector&, sdr::contact::ViewObjectContact const&) const sc/source/ui/view/gridwin4.cxx:1397 sdr::contact::ViewObjectContact::getGridOffset() const svx/source/sdr/contact/viewobjectcontact.cxx:463 sdr::contact::ViewObjectContact::getPrimitive2DSequence(sdr::contact::DisplayInfo const&) const include/basegfx/tuple/b2dtuple.hxx:81 sdr::contact::ViewObjectContact::getObjectRange() const svx/source/sdr/contact/viewobjectcontact.cxx:198 ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact() didn't check if PageWindowCount() was non-zero. Change-Id: I4a00b5b13a277d0805af3076150a952306908e53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132091 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-03-24lok: unit-test: add comment unique id checksDennis Francis1-0/+102
Change-Id: I588484955ad3ad4c5ec3bfa9f5a844096c768ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131725 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-24lok-comments: CopyOneCellFromClip: notify lok clientsDennis Francis1-0/+9
Change-Id: I4b433c8f7123fe33f1b106cbf45216d2b0c73dba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131691 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-24lok: CopyCellNotesHandler: use the cloned objectDennis Francis1-2/+3
to get correct id for the new cell-note. Change-Id: I4df492ad91faad5797ba513f9a3aa9abd2baf88f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131690 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-24lok: ensure unique id for annotationsDennis Francis1-1/+3
Problem: When a cell containing comment is copied and pasted to another cell, the cloned comment/annotation in the target cell has the same id as the original one. The lok clients depend upon the id of each comment to identify them and update coordinates when updates are requested through .uno:ViewAnnotationsPosition. So the client does not have enough information to distinguish between comments of same id. Change-Id: Iebd7281113e0830826aff1bbdaae234bd5d5cd4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131689 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-24Use correct language for spellchecking in calcSzymon Kłos1-1/+3
Fixes the problem of not applied spellchecking language change in calc. 1. Open spreadsheet with German text but with English UI language 2. Change spellchecking language to German result: no difference expected: spellchecking should be performed and mark words correctly Visible in both LOK and desktop. Regression introduced in: commit bdd149b1ff3d43b94cadc0d43365100c287c7639 Author: Dennis Francis <dennis.francis@collabora.com> Date: Sun Oct 4 12:47:46 2020 +0530 Improve spell checking performance and impl. in several ways: Change-Id: I679b1181af118e9894a3f5240523d4945af8ccf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131965 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-03-22android: Fix tab name on CSV still becomes tempfile nameMert Tumer1-15/+15
Unfortunately, in order for isLOKMObilePhone to work we need to send deviceFormFactor on document load but at this stage the document is still not loaded and the control does not work here Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-17tdf#147761 record sort command in macrosSzymon Kłos1-0/+49
fixes regression introduced in: commit 70b81e74d2a14308e1897d840c681404225d328a author Szymon Kłos <szymon.klos@collabora.com> Tue Jul 21 11:40:22 2020 +0200 SfxRequest's Done method records the action. It has to be called. Change-Id: I32529fa11febca3d3829b4afd2cd4e6dd359bf74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131564 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-03-14svx: don't remove object right after insertionSzymon Kłos1-2/+31
This is regression from: commit 2d95b3846eac367d2baadc194ab258dc31e7bd33 Author: Tomaz Vajngerl <tomaz.vajngerl@collabora.co.uk> Date: Thu Oct 7 16:48:46 2021 +0200 svx: Don't end text edit mode for all views It was visible with "direct insertion" where user doesn't need to draw anything but textbox is inserted in the center of a screen (eg. used in LOK case) Object was inserted into a view and right after that was removed when EndTextEditCurrentView was called Change-Id: I9943d46746aabadf96d76d6e74770b56d648b79d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131263 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-03-14lok: insert textbox directly in CalcSzymon Kłos1-2/+9
Change-Id: I3ae00b255dfbaa34ab8d973356d12dfd0f71d345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131267 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-03-09lok: autofilter: use correct timerSzymon Kłos1-1/+1
copy/paste mistake introduced in: https://cgit.freedesktop.org/libreoffice/core/commit/?h=distro/collabora/co-2021&id=9419c2928a97d5c14be244dfdec51401b0487809 Change-Id: I08d5290b034d8df415c85917600a6182b3bbfc9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131179 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-03-04lok: run autofilter without timersSzymon Kłos1-2/+10
so we are sure we will get correct position Change-Id: Idd218e19b8b3f3d6da67e325472e11b5661bc3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130725 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-03-04lok: send logic autofilter positionSzymon Kłos3-5/+10
we need to show popup relative to the grid window Change-Id: Ib0cf66d2c0422b765a3b8035d5499b45e83f768d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130528 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mert Tumer <mert.tumer@collabora.com>
2022-02-24tdf#127301 XLSX import: hide hidden named range of autofilterBalazs Varga5-18/+44
Create but not insert/add hidden FILTER_CRITERIA (_xlnm._FilterDatabase) to ScRangeName, because no need for them, so avoid of creating extra named ranges by autofilter re-range (shown in Sheet -> Named Ranges and Expressions -> Manage...). See also commit 3a2263a20629b0a3e9b4935dd43dc59817d0241c "mib17: #163146# XLS import: do not skip hidden names[...]". Change-Id: Ibfd86942a99b251a59394955bc890e6dbe0390f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115189 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130414 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-02-10lokCalcRTL: global RTL: fix chart edit mode renderingcp-21.06.16-1Dennis Francis1-2/+2
If global RTL flag is set, vcl-window X offset of chart window is mirrored w.r.t parent window rectangle. This has to be undone to get the correct chart bounding box in negative X document coordinates so that the offset calculations for tile rendering remains the same for RTL documents irrespective of the system/global RTL setting. Change-Id: I3e1666681af4e7ab1257bcc88d44bbdb053a7d47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129704 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-07sc: fix rendering of conditional formatting iconTomaž Vajngerl1-11/+8
The bWorksInPixels flag isn't needed as it means some rendering information is in pixel instead of logic, but we render in logic, not in pixels as it is falsely assumed. So don't take into account the bWorksInPixels flag and just render in pixels when LOKit is active. Change-Id: Iba89a819a2cfa7a934ec69271923616dc22b33f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129544 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-02disable ScPosWnd completely in LOK modeLuboš Luňák1-4/+7
366e328dc7f36061971c549c2d33d365026b65ca already mostly disabled it, but the instance was still created, and it sets up listening that results in ScPosWnd::FillRangeNames() getting called on every SfxLokHelper::setView(), which forms the major cost of the view switching. Change-Id: Ic16da4bdfb678d53a79da57e9bbdcb7fc59c576d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126444 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2022-01-31vba: add tests for scrolling, range selecting, print areaTomaž Vajngerl1-0/+166
This adds various tests involving scrolling to a particular cell in the document, selecting whole ranges or ranges o filled cells and setting the print area. VBA functions: ActiveWindow.ScrollColumn ActiveWindow.ScrollRow Selection Selection.End(xlToRight) ActiveSheet.PageSetup.PrintArea Change-Id: Iacde9c513b41571e98234c12cc3b42a16de4b833 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129014 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 9a46a203515779ae40b7cfac36dbc22990e23290) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129020 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-31vba: add support for Application.WindowState + testTomaž Vajngerl4-0/+35
This just delegates the get/set calls to ActiveWindow.WindowState which is already supported, but calling it directly on Application is also possible. Change-Id: Ibf6f55581a5c66a47ec4dd21cc8d0fe3558330ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129013 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 93806a2831c93154981e3a6ef933270d0d5a6021) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129019 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-01-31vba: test for selcting and hiding columns from a VBA MacroTomaž Vajngerl2-0/+76
Change-Id: Ib954a98e3cf91253c416f358a114bf6b6eb549b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129012 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit cfa4867b0b66b0d4fb3aee52ca40d380e50de9ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129018 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-31tdf#118246 add support for Application.GetOpenFilename func.Tomaž Vajngerl5-1/+60
Opens the file dialog and returns the selected filename. Change-Id: I4eccd34a7fbb892c0950b2f7c34977cf2aad6f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128721 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 571438a34ad9aba0d496a89e8345851331740fbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129017 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-31sc: fix VBA Copy-Paste using same and separate documentTomaž Vajngerl7-16/+176
This fixes 2 issues with VBA copy-paste: - VBA command Range(..).Copy issue where the range wasn't selected when copying and the copied cells were from the previous selection. The Copy command now does the same selection as the Cut command. - VBA PasteSpecial issue where the wrong view was used to get the clip document. - VBA Workbooks.Add issue where the new workbook wasn't activated after it was created, which causes an issue when running tests, but not when running in LO application. The Add command does now the same as the Workbooks.Open command. All the issues are supported by new test cases. Change-Id: I36ec45c01f18f7f76e4f95a25a28402a6ee0e2e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128720 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 0c6ee963e1f089cb73e0c68a28af29d0f8d9e0df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128950 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-22sc: ubsan - initialize D&D pointers properly.Michael Meeks1-0/+7
Change-Id: I95c6a9b55ed25cc6d51f9f4544cb9fc016bbec64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128687 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2022-01-14lok: remove residue text selection when there's none in the coreMert Tumer1-0/+7
Residue selection can stay at the browser even after changing the cellcursor pos make sure to clean it up if there is no selection rectangle in reality to be synced with core. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-01-11LOK android: Fix csv sheet name becomes temp nameMert Tumer1-11/+18
Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-01-11sc: fix cond. format icon size, when we work with pixelsTomaž Vajngerl1-7/+18
This is the case when the device is bWorksInPixels is true, which is the case when running LOKit. Change-Id: If7293d95589f52d46f24bc7254f1eeb6f50729b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128199 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-01-11sc: make icon size of cond. formatting same as font sizeTomaž Vajngerl3-3/+22
This makes the behavior of the Calc te same as other spreadsheet programs, where the icon size of the conditional formatting is the same as the font size and not the actual cell height (as it is the behaviour now). Change-Id: I00c96ad83458cd31f67c0b6f566e3d01dd8cd47b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128186 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-01-11lokCalcRTL: fix chart insertion positionDennis Francis1-3/+13
Change-Id: I573cb19643d7a048f3313aba90fa9b5514c9cc74
2022-01-11lokCalcRTL: trim invalidation rect to ensure +ve XDennis Francis1-0/+9
Change-Id: Ifecb52167e3cddee036e1e1e9bd5782a1138b654
2022-01-11lok: setClientZoom: check PPTX/Y approx equality tooDennis Francis1-1/+5
This is needed because the initial PPTX/Y on document load does not match the implied PPTX/Y corresponding to the client requested zoomX/Y. For instance when document is loaded by LOK client and 100% zoom is requested, the correct PPTX/Y should be (1/15 = 0.0666667) but the initial PPTX/Y on the ScViewData is 0.0647702 Change-Id: I996e9f003abd269df0994f3d114e42f84bb2bb20
2022-01-11lokCalcRTL: fix rendering of charts in edit modeDennis Francis3-3/+21
Inform Sfx2InPlaceClient and LokChartHelper when negated X coordinates are used. Ensure that invalidation rectangles have positive coordinates in all cases. Change-Id: I8f5440718e288d8f0d379c8da5f49a29e51f6940
2022-01-11lokCalcRTL: negate mouse event X for chart and controlsDennis Francis1-4/+12
Change-Id: I389047140d1a3d2c67a861a3e20f799206d937b6
2022-01-11lokCalcRTL: fix editing of shape textDennis Francis1-1/+5
Inform editeng that negated document x coordinates are used in this case and ensure that editeng generated invalidation rectangles always have positive X coordinates. Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6
2022-01-11lokCalcRTL: shapes: do not send negative(X) invalidationsDennis Francis3-0/+10
LOK client expects tile invalidations in positive document coordinates irrespective of RTL flags. For this introduce a flag mbNegativeX in svx class SdrMarkView to indicate the case when all x coordinates are negated (this happens only for the LOK + Calc + RTL mode). Use this flag to counter negate the x coordinates before sending invalidation rectangles. Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951
2022-01-11lokCalcRTL: negate the +ve shape handle X coordinate...Dennis Francis1-1/+4
...from lok client as all shape X coordinates are negative in lok-RTL mode. Change-Id: Ic4ba064888901109c85760bb0afda609b5d5942c
2022-01-11lokCalcRTL: RTL negation for shape insertionDennis Francis1-1/+2
Change-Id: I8e3bb21fadd05a7b67acce34bfdc354fefba076b
2022-01-11lokCalcRTL: shape selection: negate mouse X...Dennis Francis1-0/+12
as in LOK RTL mode draw objects have negated document X coordinate. Change-Id: Ie4c00fc0d1aa458a0aa6dd502be227cd6f82be3e
2022-01-11lokCalcRTL: adjustments for shapes renderingDennis Francis2-13/+23
In LOK-RTL mode GetScrPos() always returns document pixel coordinates and not something mirrored w.r.t gridwindow width. * Grid offset must have the opposite sign since the SdrObjects/ranges have negative coordinates with no offset. * Drawing area rectangle and the pixel-offset for tile rendering device also needs adjustments when painting the drawing layers. Change-Id: I987a6876983aee129c06b3577918dbc62d6e7c4c