summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)AuthorFilesLines
2021-04-15store ptr to the original entries in SfxItemPropertyMapNoel Grandin8-68/+68
instead of copying them to a new data structure that is practically identical. Helps startup time since we build a ton of these when loading documents. And use o3tl::sorted_vector as a dense map data structure to reduce allocations and improve cache friendliness, since this is a build-once thing. Change-Id: I950be03b1a21c0c81c40f2677d4215f5e8e256cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-15loplugin:stringliteralvar look for assignmentsNoel Grandin1-5/+5
to O[U]String from char array literals, we can convert the char literals to O[U]StringLiteral and avoid a runtime allocation Change-Id: I15d8dddb2cd428b90740e39f20daf98e0941aa6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14static_cast after dynamic_castNoel Grandin1-35/+22
Change-Id: I77cbf11e26c91bf634d708117eb801c8d8057050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114098 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-14avoid creating an SfxItemSet hereNoel Grandin1-16/+17
Change-Id: I9bd65c5938c5a500acc026a95de186fdae33e2fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114093 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13flatten PropertyChangeNotifierNoel Grandin1-38/+14
which removes an allocation hotspot when loading lots of shapes Change-Id: I0121f5bc86c6dfeddcad13e81203a514151d61bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-13no need to make copies of these objectsNoel Grandin3-48/+48
when querying their values. The copy triggers heap allocation, which shows up when loading lots of shapes. Change-Id: I4b70e0c64b2397a97216065bd6da61daaac7f3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12less copying in SfxItemPropertyMap::getPropertyEntriesNoel Grandin1-9/+8
we can just expose the map now, and avoid copying all the properties Change-Id: Icb22975508582268dfa96e41eb98ac01e7f51317 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113982 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12forward decl vcl::Window in uiobject.hxxCaolán McNamara3-5/+4
Change-Id: Ic4355a7cbf15e211b820e8343638100f729b4189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113969 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-12svx: prefix members of SdrObjectMiklos Vajna22-357/+357
So that nOrdNum doesn't cause -Wshadow in SwDrawVirtObj::AddToDrawingPage(). Change-Id: Ie7b1401f5c3cb07bfa653c4268dbdce7ba7abea5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113966 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-04-12update PCHsCaolán McNamara1-2/+1
Change-Id: Id3728ac0011d3deed7e56081e3a854c7fa5336f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-11ofz#30962 Timeout: skip slow path for fuzzingCaolán McNamara1-0/+4
Change-Id: I49c3b06e9b54d9d6657b64b153907f995e572a19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113951 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-10tdf#130326 related, speed up drawingNoel Grandin1-13/+17
if we create the list every time we call ViewContact::getViewIndependentPrimitive2DContainer then caching the result is rather worthless. So make the caching worthwhile, which means invalidating it when something changes. Change-Id: I081e9501255ec1c87454bfcc1e0a741109afa99f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113891 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-10tdf#130326 speed up XLSX loadNoel Grandin1-1/+1
cuts time from 35s to 25s for me. If the model is locked, we should not be broadcasting events. Change-Id: I4d8ca10c9d2a9862b30f88cc00e65aab1e2fad7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113909 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-10tdf#130326 speed up opening XLSXNoel Grandin1-6/+8
SvxShape::Notify is called a lot (26%) of CPU, so re-arrange it to do the cheapest checks first. Change-Id: I0e6c6c976ecfe7670e8d4af175606654f839aa66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-10Resolves: tdf#139075 diagonal focus rects contain focus rects of old sizeCaolán McNamara1-0/+3
since... commit 356f6c5d89dd4dd92b2351898e07f99b96cb34cc Date: Tue Jan 15 08:55:00 2013 +0000 teach FrameSelector to be resizable Change-Id: I5ac4d1d12f60086349e7dbb3b78d29977f22c226 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113894 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-09Recheck include/ with IWYUGabor Kelemen30-0/+30
See tdf#42949 for motivation Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-09remove need for an intermediate vcl::WindowCaolán McNamara1-1/+1
Change-Id: I59f24888e47ec17e46bf651d8530fc9468f16f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113795 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-08update PCHsLuboš Luňák1-1/+3
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein1-76/+80
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07avoid pointless O(N^2) dynamic_castLuboš Luňák1-42/+38
I already tried to reduce the cost of this in ef4964a4e598c3c97, but back then I missed the fact that in fact all the casts guaranteed. So partially revert the first commit and simply use static_cast. Change-Id: I4231f698119d56e9f2536f2f0c9d824442d76b09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113736 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07rtl::Static -> function local staticNoel Grandin3-18/+6
Change-Id: I2071c27bdf074403ec24e67f9278ac27f9491303 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113698 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06update pchesCaolán McNamara1-1/+2
Change-Id: I835c8fcc237ece5cf9d7a3b261645139d022e9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113652 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06forward declare vcl::window in vcl/event.hxxCaolán McNamara15-2/+16
Change-Id: Ib3fc1b72d3d45377e2d4ccd0ff3e6835d2c29930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113631 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06tdf#141268: svx_unit: Add unittestXisco Fauli2-0/+15
Change-Id: Ie2f5bff44d8a113c3605fbe4311af5cbcfe009fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113658 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-04-06tdf#141297 : remove link to the fileArnaud Versini1-0/+4
Change-Id: I5c14f46f5fbd51d95eeb58ea0a6d3aa39afef3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113597 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-03Revert "tdf#141127 Use ODF default values for draw:extrusion-skew"Regina Henschel2-18/+0
This reverts commit 2bf8c1e0e211601a70b6b28fdb92f636c7969513. Reason for revert: tdf#141268 LibreOffice uses -135deg skew angle as internal default. If a user does not touch the direction, the value is not written to file, although that would be necessary because it is not ODF default. With the patch applied the missing value will be interpreted as 45deg on opening. So the first step is, to write -135deg to file. And then after some time, when wrong files are unlikely, the patch can be applied. A suggestion for writing -135deg is from Julien Nabet in https://gerrit.libreoffice.org/c/core/+/113257. From code it looks good to me, but I have not tested it yet. I would only add some comments to explain the situation. Change-Id: I71673ad2e5376c2a78fa74900e95117b8543e268 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113538 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-04-01fontwork: add sidebar panelSzymon Kłos6-0/+214
Change-Id: I092e40c17dd814d0b18f06aea01d7afa29cbad2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110024 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112275 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01lok: remove frame action listener when disposingHenry Castro1-3/+4
In order to prevent that the frame action listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: If83574e31230d9c683adaf36af36485650fd2c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113389 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2021-04-01Introduce Fontwork contextSzymon Kłos2-9/+26
Change-Id: I61512e4da13514d3e5a199ccb46468ba199b808f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110023 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112274 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01Add missing popover for fontwork properties popup controllersSzymon Kłos1-0/+12
Change-Id: I293a88a681b55e123c45edc9c3034b73417d7af5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113418 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2021-04-01tdf#141405 fix null reference use crashJim Raykowski1-2/+2
Change-Id: I90906b7df044c1a139c6187b74d1b4b8210919c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-29tdf#60684 Add unit testAditya Pratap Singh2-0/+28
Change-Id: I9fc633a9a7c977d869297237cdd8547ca0cd9d47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113037 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-28drop operator bool and operator! from Bitmap and BitmapExNoel5-5/+5
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-27tdf#140936 statusbar selection mode control improvementsJim Raykowski2-8/+24
- shows different image for each selection mode - tooltip indicates the current selection mode and mouse click hint - replaces left-click cycle selection mode with context menu popup Change-Id: Ieb2662de99cf42d4ada4c1a590bebc8363861c7b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112367 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2021-03-26loplugin:flattenNoel3-48/+48
Change-Id: Ib7a895fba66f8dc9b6501e61631c02694053b7fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25tdf#34828 Give draw object a name when madeJim Raykowski2-8/+42
For Writer and Calc this patch sets a name to a newly created draw object. The name is constructed from the defined singular name of the object, followed by a space, followed by the first available whole number begining with 1 that will provide name uniqueness. For Draw/Impress names are not set for an object on creation. Unnamed objects have unique names given only in the Navigator tree. The unnamed object names shown in the tree are based on the order of shapes in the document. This patch does not change any name behavior for Draw/Impress. Change-Id: I91f31364c8258f7abb5810a5865fefd6b249da03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25fix crash on pressing esc in search/replace dialogCaolán McNamara1-1/+2
activate can be called during tear down as focus is transferred between widgets as they die Change-Id: Ia8d65b4d3c2e0ea4b8238e598ace0cc0d0e7d738 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-25tdf#134734 svx,sd: BackgroundFullSizeMichael Stahl4-8/+37
There is already a boolean SdPage::mbBackgroundFullSize, UNO property and ODF import/export, but curiously no trace of it ever doing anything. There is some mystery handling of SID_ATTR_PAGE_EXT2 there but in the dialog that is only handled for SVX_PAGE_MODE_CENTER from Calc for a completely different purpose. Move mbBackgroundFullSize to base class SdrPage so that ViewContactOfMasterPageDescriptor can access it to paint. There's an oddity in the handling of the property where the dialog works on the master page and not on the current slide, not sure why it was implemented this way. Change-Id: If6e1329e3f77e0a1a7226d5e51ceb221ea86c401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112783 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski18-52/+52
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24loplugin:unusedmethodsNoel2-9/+0
Change-Id: Id54e7545b3a69e03c29daf9d372bbf605312f547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113036 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2021-03-24use mutable rather than const_cast..thisNoel2-5/+5
Change-Id: I0512ac563a8065814bccbcd942a47f1c5fa11c04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein1-0/+0
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-23ofz: Integer-overflowCaolán McNamara1-2/+2
convert to double earlier Change-Id: I6d6a1bf3a09161772eb11a5ac260dc0cac2b6e0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112944 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-22tdf#141127 Use ODF default values for draw:extrusion-skewRegina Henschel2-0/+18
The default value for extrusion skew angle is 45 in ODF and -135 in binary MS Office. LO had used -135 in case the draw:extrusion-skew attribute was missing on import. This could be fixed in GetSkew() in EnhancedCustomShape3d.cxx#92. But that would break import of ppt files. So I have decided not to search, were the binary import would need to be tweaked, but I set the default values directly in file open in case the attribute is missing. Change-Id: Ieeffa64099fdbdbe0ba9d4dab7ed2f19d397a6e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112819 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-03-22cid#1473883 Dereference before null checkCaolán McNamara1-1/+1
Change-Id: I2499bb9a109d614097d42cbea973f9b5ca5b8d6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112873 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-22cid#1473956 bogus Dereference after null checkCaolán McNamara1-0/+2
Change-Id: I9138f4c6ad9d8d436ea119b3541cc2a267c727c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112867 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-22change SfxApplication::GetTopWindow to weld::WindowCaolán McNamara1-5/+2
Change-Id: I19906f2a9d820c99375e2e5677a484d4e2e25fdb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112857 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-21update pchesCaolán McNamara1-1/+3
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-20SvxShape: no need to inherit from WeakAggImplHelper1 twiceNoel Grandin1-5/+0
once here, and once in one of the superclasses Change-Id: I0396012b613f195783ef8c7eae38f29120007381 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112744 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-19cid#1474166 Deference null return valueCaolán McNamara1-16/+18
Change-Id: I725eff105f963b139ae8646cd1cb193ce737d313 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112760 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>