summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2022-02-04lokCalcRTL: fix editing of shape textDennis Francis
Inform editeng that negated document x coordinates are used in this case and ensure that editeng generated invalidation rectangles always have positive X coordinates. Conflicts: sc/source/ui/view/gridwin4.cxx Change-Id: I2e450707ce02f7bcd8e4d299f857c37ebbd5e2c6 (cherry picked from commit 0fe02bb99e5dfa8379a49de75683fc350e4c4dbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129360 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-04tdf#146893 Remove extra buttons from Manage Changes sidebarrafaelhlima
After commit 2e1a38ceb6866248ec30f6fe58cd3adc1b910eec that moved the command buttons in the Manage Changes dialog to the List tab, the Manage Changes sidebar started showing the buttons twice. This patch remove the duplicated buttons from the sidebar. Change-Id: I767e88ba9ca7595913b6ddc57d152febd595f504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129103 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-02-04use some more add toId/fromIdCaolán McNamara
Change-Id: I3a21e2aa5a2c482c0bac1d4c9bf84f8b56261408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129492 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04add toId/fromId to tidy up some ugly castingCaolán McNamara
Change-Id: I70f34ac5e9b5d2f2d6c0375e823908eaa2e540b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04Resolves: tdf#146997 use sal_Int64 instead of sal_Int32 for spinbutton valuesCaolán McNamara
for these cases where draw wants to massively scale the units the underlying "metric conversion" are already using sal_Int64 anyway Change-Id: I94e120d72644319548f75b2f68cfe60d4829a2e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-04lokCalcRTL: shapes: negate mouse-event x coordinateDennis Francis
Conflicts: svx/source/svdraw/svdview.cxx Change-Id: I153334940b41859e6fd9dee64217925627f0f292 (cherry picked from commit bb37b46182bcff2f10edcc590cedbc4bb5820c4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129359 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-04svx: show width and height of SdrPages in the xml dumpMiklos Vajna
Which is useful to see, as a 2 page Draw document has 2 normal pages and a master page (3 sizes), but in practice there can be only a single size, so it's useful to see what size is coming from where when they don't match. Change-Id: I505653029ae67ea0a57c8f8bb61cf475d77aaccb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129425 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-03tdf#147119:Revert "tdf#123973 fix missing MasterPage content in export"Xisco Fauli
This reverts commit 87866def6bfe2ee91be34a5ce37b79d6da881617. This also reverts commit 98d6ed2aeb22b27fddf716a372f483b89ecea841 < tdf#123973: sd_png_export_tests: Add unittest > Change-Id: Ic3c8c70ef789b83cec0614e766a3c067cbf078fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129351 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2022-02-03tdf#125849 cannot modify the ruler unit of measure in translated UICaolán McNamara
Change-Id: Ica74dd5e55d30605ee03affa4b724ffa4ec65b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129357 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-03SID_ATTR_GRAF_TRANSPARENCE and SID_ATTR_GRAF_MODE have conflicting typesNoel Grandin
Meant to be SfxUInt16Item, until the below commit accidentally introduced SfxInt16Item usage. commit 4d814ec1518c98d2ca251a5a10287f40a427ea6e Author: Armin Le Grand <alg@apache.org> Date: Wed Apr 24 09:50:54 2013 +0000 Related: #i122111# Adapted pState usages in NotifyItemUpdate methods Change-Id: I2aff5cc1eea9257186b4da12a73f928503bc233c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129353 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-02lokCalcRTL: ensure +ve X coords in shape handles/selections msgsDennis Francis
LOK client expects all coordinates to be in +ve document coordinates, so negate the negative X coordinates of LOK RTL shapes before sending the selection/handles messages. Conflicts: svx/source/svdraw/svdmrkv.cxx Change-Id: I683581370c5b115efbe315224d6218ec2e74c7f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129190 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-02lokCalcRTL: shapes: do not send negative(X) invalidationsDennis Francis
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. Conflicts: sc/source/ui/view/drawvie3.cxx Change-Id: I35d8142718b538e55b668a8ee18f3dd1fe433951 (cherry picked from commit 5e37acbaaa0b0891829907331ecacd2d3b67526d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129195 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2022-02-02tdf#126319 Corrected bitmap creation from metafileArmin Le Grand (Allotropia)
The conversion from Metafile to Bitmap in GraphicExporter is based on metafiles which does just not deliver enough precision when getting the bounds to do the correct size calculation for the target Bitmap. So I changed that to use Primitive functionality what produces better data. That old fix/correction itself was based on hairlines only which is anyways no longer sufficient since LO uses less hairlines nowadays, what is good in general (They are a relic of non-AA times when it was not possible to paint/work with lines taller than one pixel). Thus, cases need to be solved more generic based on better data. It would also be good to change this to primitives completely, but that is too much for now. Change-Id: I71bd136b106ef8ff3ba51458c46df08269773c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129235 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-02-02convert OfaRefItem to a normal classNoel Grandin
only instantiated with one type, so just turn it into a normal class Change-Id: If3ae908f3e226ae9f4d3b81a7a7d9ba492ccda4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-01related tdf#111733 svx: SfxVoidItem != SvxKerningItemJustin Luth
When selecting text containing several different kerning values, the pItem returned is a VoidItem. This was showing up as random numbers in the TextCharacterSpacingControl spinbutton. Change-Id: I94cfc566daa42e0d8c3d403eb08af659f01e6d5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129270 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-02-01tdf#111733 TextCharacterSpacingControl::GrabFocus kerning spinbuttonJustin Luth
When the kerning menu opens, it defaulted to very tight, regardless of what the current setting was. However, the current value can easily be connected to the menu options, so lets do that. This depends on increasing the spinbutton range beyond -2.0, done via LO 7.4 commit 2334561bf15ec9b061636919efbd0e2a7b89e29b Change-Id: I0be0956bf1cc3604faecc691aeac70a5bbba807b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128909 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-01-31tdf#146860 Vertical alignment of text inside grouped shapes textbox incorrectNoel Grandin
some stupid side effect at work regression from commit c1916d3ab8f764e465f889334050ce7c863576b3 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Dec 8 12:25:58 2021 +0200 meRememberedAnimationKind is dead Change-Id: I7ba245a2096ed011f88e08f9d3a87021948e0b01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129219 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-31support for the WebP image format (tdf#114532)Luboš Luňák
This commit implements a WebP reader and writer for both lossless and lossy WebP, export dialog options for selecting lossless/lossy and quality for lossy, and various internal support for the format. Since writing WebP to e.g. ODT documents would make those images unreadable by previous versions with no WebP support, support for that is explicitly disabled in GraphicFilter, to be enabled somewhen later. Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128920 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-01-29used TypedWhichId in the constructor of various svx *Item classesNoel Grandin
to act as an extra check that we have the association of Item and TypedWhichId annotations correct. (*) requires that I add an upcasting constructor to TypedWhichId (*) Make the field dialog stuff in writer use a new item id FN_FIELD_DIALOG_DOC_PROPS instead of abusing the existing SID_DOCINFO Change-Id: Ica4aea930c80124609a063768c9af5a189df1c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-29gtk4: GtkStatusbar no longer has spacingCaolán McNamara
so move the contents into a GtkBox which does Change-Id: I1ecbe91731fbd6c967e02cfc663a3855030c6796 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129145 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-29resave with latest gladeCaolán McNamara
Change-Id: I49bd7743b9c17fcc84866eba52103fb35ba907d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129144 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-29no need to call GetWhich on these SID_ valuesNoel Grandin
none of them are remapped (via the SfxItemfo stuff in the pool) Change-Id: Iefd38f1aac55e6059e2c57d102efb508bd1572b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-29svx textcharacterspacingcontrol: allow smaller kerningJustin Luth
On of the options in the kerning list is "very tight" which sets a -3 pt kerning. However, the custom spin button only allows down to -2 pt. Certainly we need to allow the user to adjust as much as the other options allow, and it only makes sense to allow as much negative kerning as positive kerning. Additionally, this field is supposed to show the REAL current value - which it can't do if the range of values is too limited. Finally, we can't pre-focus "very tight" very easily if that spin button cannot match the "very tight" value. [Based on testing, a too-small kerning gets treated as the smallest-possible-kerning and doesn't cause real problems.] In terms of positive kerning, the real maximum pt value seems to be 1638 before the denormalized version of it hits the sal_Int16 maximum and then starts wrapping over into minimum values. Change-Id: I465fcd0bbf3ca310b203004b46632a9a1ee01a6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128984 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-28tdf#126319 Correct area(s) on selection exportArmin Le Grand (Allotropia)
For shapes like TextFrames the export of the selected object(s) to Bitmap needed to be adapted. It should not reduce to minimal geometric necessary size. While reduction seems good initially as an idea this may change aspect ratio and expected size of the result by cutting off visually empty areas, e.g. the text distance areas to the shape's logical bounds. This also needed to be adapted to multi-selections accordingly. Change-Id: I85bffe60fcfc2e8da87f69936af30f64c26deead Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129002 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-01-27related tdf#111733 TextCharacterSpacingControl sw: goto position tabJustin Luth
The kerning button on the sidebar very unhelpfully launches the character properties dialog at the last-used tab, instead of bringing the user directly to the "position" tab where the kerning (.uno:Spacing) property can be found. Notes: -sw draw text (eg. textbox) does nothing - no dialog at all -sw comments also do nothing -sc does nothing -sd does nothing Somehow the sidebar is calling SID_ATTR_CHAR_KERNING, but I can't find out where. In any case, I have to change this SID_ATTR_CHAR_KERNING into SID_CHAR_DLG_POSITION for these "do nothing" situations. That can happen in separate commits for each situation. I basically copied SID_CHAR_DLG_EFFECTS which is explicitly called in underline's "more options", so it is used a bit differently. Change-Id: I833d54da3664b9c01325130a2c36bbbe90b2b878 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129043 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2022-01-27add some more TypeWhichId annotationsNoel Grandin
and update the idl compiler to cope with namespaced class names Change-Id: I7b5242f872e358bc3c5584f543767719172aac83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-26move ToolBoxItemId into its own headerCaolán McNamara
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-26tdf#123973 fix missing MasterPage content in exportArmin Le Grand (Allotropia)
The old fix tdf#96922 is no longer needed, so I remove it now. It prevents MasterPage content to be included in export. Checked that task is fixed && old task does bnot re-appear. Change-Id: I8b6923e01f6e24f662288e24d26634c06c9527f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128940 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2022-01-26tdf#146876 PPTX: various graphical elements misplacedNoel Grandin
Revert "use cache value in ViewContact" This reverts commit 2e162bb1e8521ad8cd8148e0a18adc3eebadd710. Apparently invalidation is not reliable anywhere for ViewContact Change-Id: I1ec40f27de77859a55bf00b80d029fa7181b4492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-25lok: enable in-place editing of math equationsMike Kaganski
Change-Id: Ic4d187d1e2ee92eab74a6bb43e47bb4f3d47ebd2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128506 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-25gtk4: deprecated GtkEntry shadow_type was removedCaolán McNamara
Change-Id: I378db5406c508e3672927905735449a3a1003e3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128928 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-25tdf#146407: Hide diagonal border icons for WriterBayram Çiçek
- Writer and Calc use the same 'Borders' UI. - svx/source/tbxctrls/tbcontrl.cxx - Diagonal borders for Writer has not been implemented yet. Therefore, diagonal borders don't work when clicking on them. - It would be convenient to hide diagonal border icons until the functionality is implemented. Change-Id: I6601ef924dbfb0acd40c3144300fecf74922c49f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128487 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-01-25Related: tdf#146971 remove %PRODUCTNAME from accessible-descriptionCaolán McNamara
Change-Id: I83ff18c8b5e95fa172de950eb351cbfd855c9d5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128919 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-24tdf#146893 Rework Manage Changes dialografaelhlima
This patch reworks the "Manage Changes" dialog (In Writer, Edit > Track Changes > Manage) so that the buttons "Accept", "Accept all", "Reject", "Reject all" and "Undo" only appear in the List tab, since they're not needed in the Filter tab. A help button is also added and HID constants are defined for both tabs. Change-Id: I12da7811635dfc142d5d0a66d3275d3d170692e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128563 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-01-22Use o3tl::convert instead of OutputDevice::LogicToLogicMike Kaganski
Change-Id: Ifb7be992c6e951692a741d10ed24ec8b3836982a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128782 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-21fix opengl slide transitionNoel Grandin
regression from commit 62efb188668a3296591dcfa3658185e2f982e356 use comphelper::WeakComponentImplHelper in SlideShowVie Switch notifyEach to leave the mutex locked after being called, because that seems to compose better - because after a call it is in the same state that was when we entered the call. Change-Id: I42e80cc7be1b65ed8cab24ab7c11210e056d916d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-20WASM --enable-wasm-strip now skips lots of LO codeArmin Le Grand (Allotropia)
... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2022-01-17tdf#135843 tdf#146731 Fix the missing border handlingGülşah Köse
Reverts fa5ab8aa5d88e7128015127af75980a65f945cbb inside. And fix the missing border problem with better way. Reason of the problem is using ORIGCELL cell style for bottom and right of merged ranges is wrong. Eg: We have Row X Col 3X3 table. (0,1) and (0,2) merged. The right side of right border style should be same with (0,2). But ORIGCELL points (0,1) instead. In case we should use LASTCELL. Same reason is valid for bottom case. Change-Id: I5282083541f0bd02f3765943da4f34cabe05ef13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128493 Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Tested-by: Gülşah Köse <gulsah.kose@collabora.com>
2022-01-14make comphelper::OInterfaceContainerHelper4 more threadsafeNoel Grandin
(*) make all the methods that require an external mutex take a std::unique_lock as a parameter, so that call sites cannot forget (*) make the forEach method drop the lock when firing listener methods, to reduce the odds of deadlock Change-Id: I0a80e3b3d1c1c03b7de4a658d31fcc2847690903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-14use cache value in ViewContactNoel Grandin
Rely on the cached primitives without always rebuilding. But only enable it for calc and draw right now, by adding a flag at the SdrModel level. Change-Id: I295e5a366b1b21d0f1561e6736bac919082afb5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128380 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-13gbuild: implement static partial buildJan-Marek Glogowski
This stores all the dependencies collected from the full build, and uses that info to link static binaries in per module. Change-Id: I27bd41c217bf0d2248ee88004038dd6b813f2624 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128129 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-01-13optimise ensureGeometryNoel Grandin
for complex polygons, return early Change-Id: Id4bb2311f84508d95a71a3f4353872164baabe6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-12used cache value in ViewObjectContact::getPrimitive2DSequence (2nd attempt)Noel Grandin
Rely on the cached primitives in VOC. But only enable it for calc and draw right now, by adding a flag at the SdrModel level. This way we can leave it disabled for writer, where it definitely doesn't work. Change-Id: I11ca4836eb773c0f078cdb82056c6e0309d15a8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128319 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-01-12CppunitTest_svx_unit: simplify code (part 2)Xisco Fauli
Change-Id: Ic98a25f495630517827c1e9f9827e1c45e1401ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128304 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-11do not call broadcast SetStyleSheet from a non-broadcast oneLuboš Luňák
In the document from bsc#1183308, which contains a large number of custom shapes, I get a noticeable time spent in the callchain EnhancedCustomShapeEngine::render() -> SdrObject::NbcSetStyleSheet() -> sdr::properties::GroupProperties::SetStyleSheet() -> SdrObject::SetStyleSheet(), which means that a non-broadcast call ends up in a broadcast one, and the time is spent in SvxShape::Notify(). And it even seems that nobody actually cares about the broadcasts, possibly because the SfxStyleSheet* value is actually the same. I originally tried to make SdrObject::SetStyleSheet() return if the SfxStyleSheet* is the same, but that fails the test from 717dc8e3575a18e1e. I don't quite understand the reasoning for that, but solve it then by changing the code to call the Nbc variant if that's enough. Change-Id: I096a6799a0dc51c31ec3b0ba070c7f99ec96ac5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128048 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-11CppunitTest_svx_unit: simplify codeXisco Fauli
Just use CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE or CPPUNIT_ASSERT_EQUAL_MESSAGE Change-Id: Ibf399cc802e31c5265ba1301f38df79958bf9e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128262 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-10sd theme: fix applying new colors after theme change for group shapesMiklos Vajna
UpdateSdrObject() is called for both group and non-group shapes, so don't assume that they always have text, otherwise we would crash. Change-Id: I3672673176f0cb462a8b8d61a68466f541e9ce06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128248 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-01-09implement anyToHash() and use it for SdrCustomShapeGeometryItemLuboš Luňák
Using anyLess() still has quite some cost with bsc#1183308, this makes the cost almost unnoticeable. Since some values of Any are not handled, return empty std::optional for those cases. Change-Id: Ib45a81441e8bb456c4749f9bc53a981f09bbb1a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128109 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09make SdrCustomShapeGeometryItem sortable and fast (bsc#1183308)Luboš Luňák
The document contains a complex graphic consisting of many shapes, and SfxItemPool tries to avoid duplicates by checking for equality. And SdrCustomShapeGeometryItem contains a UNO sequence as data, and comparing those is non-trivial. Make the item sortable, which should make things faster, and use anyLess() for the ordering. Additionally first check the size of the list of property names the class keeps for an easy fast return. Change-Id: I49220e589b6510c6f1f40d584301be83367fb5a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128047 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-01-09make SdrCustomShapeGeometryItem internal data consistentLuboš Luňák
The PutValue() function didn't update the property map properly the same way the constructor and other functions do. Change-Id: I107f7095077d888cd9701d87a6e536339b0257b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128104 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>