summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2020-11-13tdf#138157 turn off cursor earlierCaolán McNamara
Before the first time SetMapMode is changed, because that triggers a redraw of the cursor using the new mapmode and so it appears in the wrong place. We are going to turn off the cursor anyway, so do that earlier. Change-Id: Ib28a2af446436c6ebe450f0b5d1b3820ec7f479e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-13Fix (some of) fallouts from tools::Long change to 64 bit on _WIN64Mike Kaganski
Change-Id: I297d43c594c5d8c3378e8b7f29ad798e89e4ebaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105776 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-13Force number constants to tools::Long in assertsRegina Henschel
Change-Id: I404b0edb31fb4eb797baf814136b00fd605724eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105775 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12Revert "remove Fraction::operator tools::Long()"Noel Grandin
This reverts commit 48b667a7e7d25f835f95df89162a7849d6972531. Reason for revert: some discussion required Change-Id: Ia0990d280837fb68b7ddc9f472ec78b1467b4311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-12tdf138138 Apply shape shift also to NoRotatedAnchorRegina Henschel
The 'normal' anchor (as on screen) is connected to the snap rectangle, the NoRotatedAnchor is connected to the logic rectangle. They differ, if the shape is transformed, e.g. rotated. Error was, that values of the 'normal' anchor were applied to NoRotatedAnchor instead of calculating the shift of NoRotatedAnchor independently. The error becomes only visible on save, because there the NoRotatedAnchor is used. Effected shape types are legacy shapes, text boxes and transformable OLEs. I have not tested, whether this fix would work for LO 7.0 too. Change-Id: I8ad22ca54bdd49861a16a34736860a9871d8eba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105611 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-11-12remove Fraction::operator tools::Long()Noel
which was added in commit 331e2e5ed3bf4e0b2c1fab3b7bca836170317827 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Sep 14 08:49:52 2017 +0200 long->sal_Int32 in Fraction presumably to make the change impact less code. Instead, update the call sites to reflect the actual bitwidth of the data we will be receiving. Change-Id: If2a678b1cf534f39cb8cb249757462be53658309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11convert more long -> tools::LongNoel
found by grepping and changed by hand. Change-Id: I3c720859dba430fde3abc76c6c5cb58269efaf4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105512 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11Fix typosAndrea Gelmini
Change-Id: Ice850a7929c5b88ca0c4da52504aa959aacd1024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105548 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Bjoern Kirchhoff <Bjoern.Kirchhoff@escriba.de>
2020-11-11make tools::Long 64-bit on Windows platformNoel Grandin
This is only for the 64-bit windows platform. I don't see the point in messing with the 32-bit platforms, they are (a) become more and more rare (b) unlikely to even have enough available process memory to load extremely large calc spreadsheets The primary problem we are addressing here is bringing Windows-64bit up to same capability as Linux-64bit when it comes to handling very large spreadsheets, which is caused by things like tools::Rectangle using "long", which means that all the work done to make Libreoffice on 64-bit Linux capable of loading large spreadsheets is useless on Windows, where long is 32-bit. The operator<< for tools::Rectangle needs to be inside the tools namespace because of an interaction with the cppunit printing template stuff that I don't understand. SalPoint changed to use sal_Int32, since it needs to be the same definition as the Windows POINT structure. Change-Id: Iab6f1af88847b6c8d46995e8ceda3f82b6722ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11disable O(U)String::concat for internal codeNoel Grandin
in favour of the more widely used, and better optimised, operator+ Change-Id: I6a1b37e0f3d253af1f7a0892443f59b620efea63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11Correction to improve 'resize with cell'Regina Henschel
Error: A vertical flipped shape lost flip on loading. The error slipped in, when I have implemented the suggestions from Jan-Marek. The object is vertical flipped, to have no flip for calculating the full sized logical rectangle. Therefore the second call to method lcl_NeedsMirrorYCorrection gives wrong result 'false'. I need to remember the result of the first call. Change-Id: Ia411fe7108be9fdcbbf748ee9de9f443e55d6ed0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105570 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-11-11tdf#133630: sc: Add UItestXisco Fauli
Change-Id: I044a11bd5690b063bf3bb346bf0e324c1353d478 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105561 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-10set resize-toplevel true for GtkExpandersCaolán McNamara
because that's what we currently do in practice Change-Id: Ib1154a4a7597dbabb20b1cb7b051995a72256e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105563 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-10uitest: chartArea.py: assert changes in chartXisco Fauli
Change-Id: I8825bed89c50dcb0a9858d04a1697cb12fdd81bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105556 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-10uitest: remove useless commentsXisco Fauli
Change-Id: I9990be302a2d28e6e46f8bb33cda605ba15533f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105552 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-10new loplugin:reducevarscopeNoel Grandin
Change-Id: Iefe922c2e0d605114d54673d63eccc5e4abd545d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102143 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10sync filter's paper table with calcs and i18nutilsCaolán McNamara
older ms specs confused JIS and ISO "B" sizes and there are now documented newer sizes not in filter. some of the sizes at https://docs.microsoft.com/en-us/windows/win32/intl/paper-sizes are surely still wrong, e.g. Letter extra paper and I trust the values in calc table more. orientation of ISO B6 Envelope dimensions is still ambiguous to me, so left that alone for now Change-Id: I6b6beb2620fe79f03ad5068eab0657a0b65f1aa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105521 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-10Set correct gradient color for chart background in sidebarSzymon Kłos
Change-Id: I98dc177494fddc4a975479e99aba7b6318051b1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103618 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104202 Tested-by: Jenkins
2020-11-10Resolves tdf#137490: Rename "Header 1/2" menu items to "Heading 1/2" ...Ming Hua
in Groupedbar user interface, to be consistent with style names as well as menu items in other UI modes Change-Id: I0ac7f512af4fa7d9d771fe8dd553d42eb4cd5ea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105465 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-11-10tdf#117948 Do not treat hidden rows as zero in ODF exportRegina Henschel
The object geometry in ODF file format has values so as if no hidden columns or rows exists. But for rendering the object geometry has to treat hidden rows and columns as zero. This patch changes the object geometry temporarily to the 'no hidden columns and rows' mode for export and restores the original geometry afterwards. The patch considers hidden columns left from the shape and hidden rows above the shape. So the object is shifted. Considering hidden columns or rows in the area, which is covered by the shape, is still missing. That would possibly require scaling. Change-Id: Icdb3f08404ca4d212d25a1967bfdc0bfc7186007 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105427 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-11-10tdf#136721 XLSX: add missing A6 paper formatSzabolcs Toth
Unrecognized A6 paper format was converted to the default A4/Letter previously, see Paper Format in Format->Page... Co-authored-by: Balázs Regényi Change-Id: If2ea0c4137177aa8be66cb11d4732b14cbc14455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105392 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-07Fix typosAndrea Gelmini
Change-Id: I7ba612d8880833057269290212bcd9d864bb7395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105399 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-06make SdrObject Identifiers SdrObjKind enum membersCaolán McNamara
with unique values so that, e.g. if (pObj->GetObjIdentifier() == OBJ_LINE) is only true if pObj is a SdrPathObj and not a E3dScene Change-Id: I30c91e57eb27141390c644dec42e2a4bee96edf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105374 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06disentangle writer's SID_FM_CONTROL_IDENTIFIER handlingCaolán McNamara
a) make m_nFormSfxId simply follow the slotid, like its sibling m_nDrawSfxId b) move the previously selected form object into a variable of its own as m_eFormObjKind instead of ~abusing m_nFormSfxId to do that c) pass which form object a ConstFormControl creates as an explicit ctor arg instead of providing that information by overwriting the slotid that its ::Activate gets passed making it follow the equivalent calc pattern and separating these very different slot ids and object identifiers In testing, with the form controls toolbar, clicking on a toolbaritem toggles it on, and drawing in writer gives the expected control via ConstFormControl ctor, and clicking the same toolbaritem toggles it off hitting the expected SID_FM_LEAVE_CREATE case. Change-Id: I514f6adc38f706c82f0268abf5c5e73cef5b902c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105405 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-06tdf#137908: uitest: Add asserts to check there is at least 1 elementXisco Fauli
Change-Id: I7e259043ad493d7e9c4ca34d64a4ca1ed1cf8db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105391 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-06tdf#137614 sc: fix data circle shape size on merged cellsTibor Nagy
When we are marked invalid data using Tools->Detective-> Mark Invalid Data, only top left cell of the merged cells is circled instead of all the merged range. Note: ScDrawLayer::RecalcPos change is for resizing the circled merged cell. Co-authored-by: Regina Henschel Change-Id: Ia03c506c92ec6e1c81ef3039c20e8e7ba9e9181d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105241 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-06tdf#134161: sc_anchor: Add unittestXisco Fauli
Change-Id: Iff58a85b9080ebe9c0d088237acb3af7018d3f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105380 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-06Revert "loplugin:stringbuffer"Noel Grandin
This reverts commit f0356b6128bb4e78041d53025ad7c2e0b8e0c299. Reason for revert: There is a OUStringConcat overload for OUStringBuffer which would have kicked in here, so this is unnecessary Change-Id: I3bafb6c30bd3a2c1912daf227554889f1e09c78a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06loplugin:unusedmethodsNoel
Change-Id: Ia6c0361cd793bb62905b0690f7e2ca554019e935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-06tdf#134161: Revert "tdf#132137 Rename Default Style in Calc."Xisco Fauli
This reverts 4111ed76906bf6be05b704bf52fa91353dfef183 the document would also hang if define STR_STYLENAME_STANDARD NC_("STR_STYLENAME_STANDARD", "Default"); is replaced by define STR_STYLENAME_STANDARD NC_("STR_STYLENAME_STANDARD", "DefaultTest"); meaning somewhere in the code 'Default' is harcoded as git grep "\"Default\"" sc/source/ shows Reverting for now so we can backport it to libreoffice-7-0 while a better solution is provided for tdf#132137 Some other problems of the reverted commit are mentioned in comment 4 and comment 5 of tdf#134161 I'm adding a unittest in another commit so this one can be easily reverted in the future Change-Id: Ib7c4a99ff4957eba7ec0b644e989c7a08b46f2a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105381 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-06loplugin:stringbufferNoel
Change-Id: Id6f7268f12eb728dbb255aa19cd590b6813c4f01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05tdf#137653 tdf#137624 sc: fix autofill user list sequencesAttila Szűcs
Improve FillAuto, FillAnalyse to discover the step between values of linear sequences of user list (sort list) values in 1x1 cells, and continue it. (Sort lists are special string lists with values like day names Monday, Tuesday, ... see Tools->Options...->Calc->Sort list) Note: The unit test is not language dependent, as it clears all user lists and replace it with its own list. Also fixed this in the unit test of tdf#137625. Co-authored-by: Tibor Nagy (NISZ) Change-Id: I1c8b0df9ad29f91a6080e56e5f2ebe0029a10a08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105259 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-05StartElement->startFastElement in scNoel
Change-Id: Ic6f106fd77b200ded466d3de1cc31b83dce6ba08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05crashtesting: on import of ooo109115-1.odsCaolán McNamara
since... commit 1f0b3c7a40edfa81bbc7a58d123a6a2dfd83e4ca Date: Sat Oct 10 17:55:31 2020 +0200 Improve 'resize with cell' handling pObj is (amazingly) actually an E3dScene not a SdrPathObj. E3dScene::GetObjIdentifier is... sal_uInt16 E3dScene::GetObjIdentifier() const { return E3D_SCENE_ID; } and E3D_SCENE_ID is.. const sal_uInt16 E3D_SCENE_ID = 2; but OBJ_LINE is also 2 ! so this E3dScene is cast to a SdrPathObj which it isn't. Seems you can only rely on the ObjIdentifier when you know the SdrInventor of the object, which seems unfortunate. just use a dynamic_cast for now Change-Id: Ic3d86e59c74d4f0436e294ce10d432681f312f96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105368 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-05std::set->o3tl::sorted_set in ScDPCacheNoel
Change-Id: I8d647149545d0b5ff7bb82a8db171b9410ea79b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05tdf#137790 calc: set minimal line width: unit testSerge Krot
Change-Id: Idac7c23e55b3c4ee94790458fca5e7a7a5522098 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105301 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-11-04Unit tests for: Improve 'resize with cell' handlingRegina Henschel
These tests belong to commit 1f0b3c7a40edfa81bbc7a58d123a6a2dfd83e4ca They cover tdf#137576, tdf#137216, tdf#137044, tdf#137020, tdf#137355 and tdf#115655. I have replaced the rectangle comparison in scshapetest.cxx with the same one as used in bugfix-test.cxx Change-Id: I71b4499077e461fe826e6d8d29f801bc66da89fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105270 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-11-04Fix typosAndrea Gelmini
Change-Id: If310f08c8df54356b52bb9c0ac614c374c750814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105268 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-11-04use only NotebookbarToolBox, and not SidebarToolBox, in the notebookbarCaolán McNamara
Change-Id: I93e2acdcc176a7c179d4068597f00f8e9cd0bf7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105293 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-04loplugin:constantparamNoel
Change-Id: Ia2fea86f940d0d2d1dba5ed56660584f3d3fb028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105280 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-04uitest: reset formula syntax back to Calc A1Xisco Fauli
otherwise, it will interfere with other tests Change-Id: Ib671d0e5e0a0d47a42ed911d4f9de68b2f7fee9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105288 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-04loplugin:unusedmethodsNoel
Change-Id: I58fb6477222a26455f5db0a7d972c46f290c085c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105261 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03tdf#87474: sc: Add UItestXisco Fauli
Change-Id: I2c915372076228164e6322fad84643971ea4e105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105257 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-03Resolves: tdf#137215 restore original modality before dialog loop endsCaolán McNamara
Change-Id: I83467e28534b781c51b8d75a023e41f3c6a03903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105251 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03loplugin:unusedfieldsNoel
Change-Id: Ia8e2a7ce75bfded98e85fa583d1404710069d335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-03tdf#137617: sc: Add UItestXisco Fauli
Change-Id: I544a221e7b3c76bb046235768d3fdcb700805579 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105239 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-03duplicate redundant linesCaolán McNamara
Change-Id: I5766aee2a07879d3064387f72a87c38ce431e9be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105202 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-03tdf#137896: sc: Add UItestXisco Fauli
Change-Id: I38d2d31f28bfbabc8003a11520ad26e3df2a29a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105199 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>