summaryrefslogtreecommitdiff
path: root/include/svx
AgeCommit message (Collapse)Author
2021-10-29tdf#141193 Added support for bar codes in qrcode dialog box[API Change].homeboy445
Change-Id: I6b79ece1d5419ef92b76755d3bd921a64d6e38fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113989 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-10-20svx: Don't end text edit mode for all viewsTomaž Vajngerl
This allows multiple views to not disturb each other editing inside a impress document. With the ending of text edit for all views still enabled, one view can cancel other views text editing just by moving or resizing a unrelated shape in the document. To make this possible we also need a view-local undo manager for the text edit mode, which is independent of the document undo manager. When the text edit mode ends, all the changes will be added as one change to the document undo stack. This prevents any conflicts in the undo stack that could be made when 2 views are editing the same document at the same time. This also adds the test for the new use case and changes the existing tests to reflect the change. Change-Id: I04edb4f91d7e111a490c946f7121cbca75f818d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123220 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-12loplugin:moveparam in variousNoel Grandin
Change-Id: Ifa7c8ff2b21f63d234c29c28303d0bacd376c1e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10loplugin:moveparam in svxNoel Grandin
Change-Id: I2e422235129f810feea5c17afa1332d8b7ac14ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-10loplugin:moveparam in editengNoel Grandin
Change-Id: I08aed09b0acd283d700bdf75f650e93dba7c7b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-09Typo *ropertie -> *ropertyJulien Nabet
Change-Id: Id5ae03140ac4fd67bf4940569ac5cd2f15716749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123306 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-09Rename strings and change criss-cross border iconBayram Çiçek
regarding 3a9167e1b8a236da2862f4377e2040a8c189c99c 'tdf#143919: Calc: add diagonal borders in Toolbar>Borders' - criss-cross border icon replaced with a new one - rename -> 'diagonal left' to 'diagonal down' - rename -> 'diagonal right' to 'diagonal up' - code refactoring: large if-else blocks refactored as methods and called from proper cases - clang-format - "Set" word dropped from include/svx/strings.hrc Change-Id: I1284e69b9481e1a512f7cab29913bf23b6a493c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121117 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-10-08loplugin:moveparam in svxNoel Grandin
Change-Id: I92fe2882c948e7297e5d54963647b4aa054f8f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123241 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-07svx: add "m" prefix to some member variables in SdrObjEditViewTomaž Vajngerl
Change-Id: I2877f63d97ff6d15f08bd2dbaee6128b8a689cc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123219 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-07svx: move LOKit specifics into it's own methodTomaž Vajngerl
Change-Id: I87f04d460d88c902426e881c03701b95414207d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123217 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-10-04loplugin:constmethodNoel Grandin
Change-Id: I56af10be5f1155db4c7f2190495fe036a9b4236a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-01loplugin:constmethodNoel Grandin
Change-Id: I3ed657c5c5e6840e38e3c8505505b4b372125df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122910 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30loplugin:constparams improve handling of pointer paramsNoel Grandin
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-26Typo: *Transparanc*->*Transparenc*Julien Nabet
Change-Id: Ia9325a397b89c09dac4b6c76e4a0521bbdbf5db5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122655 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-24reduce copying in drawinglayerNoel Grandin
by passing PrimitiveContainer&& around. There are lots of place where we were preparing a local variable of type PrimitiveContainer, and then copying it someplace else, then throwing it away. Change-Id: Iacfd983640c9e55da25800ccc01734dfc8b4d64a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-22xtend loplugin:stringviewparam to starts/endsWith: svxStephan Bergmann
Change-Id: I998b5e7ba3580aabfc454ce3354bffd3d0cb7d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122479 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-19no need to allocate SfxItemSet separately in SdrUndoAttrObjNoel Grandin
Change-Id: I32c9d79262c711a4f28c910e1b8f8ca9c1f011e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122305 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-17tdf#143550 - use the term "gluepoints" consistentlyrocso
Change-Id: Id10dc2ef13f54a148a800003cc4bd88ca1a0056f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122233 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-09-15loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ia7617a0fd4413cbaafaae8fbfee2b2ea819fde8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-14sw: fix undo manager de-registration from editeng on shutdownMiklos Vajna
editeng/ asserts in the ImpEditEngine dtor that the undo manager it owns is indeed an EditUndoManager, and not a subclass. This means that if a subclass is set as the undo manager of editeng, then SetUndoManager() should be called in pairs: once to set it and once to unset it. The unset should happen before destroying the EditEngine. This normally works because SwView either has an active text edit and then its dtor calls SdrEndTextEdit() or it doesn't have an active text edit. The broken case was when the text edit was already ended, but the draw view still had a text edit outliner, which has an EditEngine, which knows the sw undo manager. The product build deleted the sw undo manager when deleting the EditEngine, and then later when the SwExtTextInput dtor wanted to access the sw undo manager, it crashes due to use-after-free. Fix the problem by explicitly disposing the undo manager of the draw view in the dtor of SwView. Also fix a couple of more places where an SdrObject* is returned and we didn't check if the result is a nullptr. Caught by the loolstress tool in online.git: cp test/data/hello-world.odt /tmp/test.odt ./loolstress ws://localhost:9980 /tmp/test.odt test/traces/writer-hello-shape.txt /tmp/test.odt test/traces/writer-hello-shape.txt /tmp/test.odt test/traces/writer-hello-shape.txt /tmp/test.odt test/traces/writer-mash-text-table.txt /tmp/test.odt test/traces/writer-mash-text-table.txt Change-Id: Ib838b2adf900b4f3bec63d2d62d432327bc0c6c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122086 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-09-12Typo STATE_SUCCESSFULL->STATE_SUCCESSFULJulien Nabet
Change-Id: I9a9e826de17f5d42ece9e97171c441117181e769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121971 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-11clang:optin.performance.Padding in svx,editengNoel Grandin
Excessive padding in 'struct svx::SpellPortion' (18 padding bytes, where 2 is optimal). Excessive padding in 'class SvxNumRule' (11 padding bytes, where 3 is optimal). Excessive padding in 'struct SpellInfo' (10 padding bytes, where 2 is optimal). Excessive padding in 'struct ImpEditEngine::LineAreaInfo' (14 padding bytes, where 6 is optimal). Excessive padding in 'class ImpChainLinkProperties' (5 padding bytes, where 1 is optimal). Excessive padding in 'class TextChainFlow' (20 padding bytes, where 4 is optimal). Excessive padding in 'class SdrObjList' (13 padding bytes, where 5 is optimal). Excessive padding in 'class SdrLayer' (12 padding bytes, where 4 is optimal). Change-Id: I17b1c40bfe553c7635dc6177845dc92956cd0fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09tdf#144052 speedup inserting large chartsNoel Grandin
we don't need to immediately re-order objects when setting the Z-order, just set the dirty flag and we can calculate the proper order layout. This takes the time for the chart to appear from multiple minutes to 20sec for me. Change-Id: If80569da09469423f19f9fe82b40dfbdac14f161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121806 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-09Resolves: tdf#144376 focus into protected ScTextWnd shouldn't be possibleCaolán McNamara
the expectations are that this isn't possible and if it happens then under windows there is a QueryCharPosition which will trigger the deletion of the ScTextWnd EditView due to that expectation before it is then unconditionally dereferenced Change-Id: Ied5d8031ae7d74669a2958dbcdec87843a26d384 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121839 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-08reduce cost of creating large charts (tdf#144052)Noel Grandin
creating a temporary SfxItemSet for each geometry object adds up fast, so only create the temporary for those SdrTextObj subclasses that need it. Change-Id: I0c03a630057718f09c12a4a2d07ad23fca46fd2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-07loplugin:unusedmethodsNoel Grandin
Change-Id: I6295d6ff6fb7410852351801c324244308c5c472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02unused definesNoel Grandin
Change-Id: I494e64c69decb9fb3d5b13ffc2f18d99f6b7749f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I78339f1df1f0c55c7edaa552940b07d1ada3aeb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121386 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-25i#114206 sd: unshare shape properties for the same type before insertionMiklos Vajna
Regression from commit 9bd99c08e8662becdd5ac8b47ef6f953c14e65fc (CWS-TOOLING: integrate CWS os128, 2009-06-03), the problem was that the SvxItemPropertySet was both used to store a property map (information about UNO properties) and also as a descriptor for a not yet inserted shape. The above commit improved performance by sharing a single instance of an SvxItemPropertySet for the same shape types: this works for the property map, but doing the same for property values is problematic. In practice, this eliminates the need for a workaround in oox/, the user-visible problem was that loading a document with smartart, then loading a document with group shapes (but without smartart) and saving it would copy information from the first, closed document (!) to the second document. Just removing the oox/ workaround would make make -C oox -sr CppunitTest_oox_drawingml CPPUNIT_TEST_NAME="testGroupShapeSmartArt testTdf131082" fail, unsharing the descriptor piece makes it pass again. Change-Id: Icdff2108ad0da18ce0ade081b1938dd74bc0ae90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120996 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-08-23tdf#143919: Calc: add diagonal borders in Toolbar>BordersBayram Çiçek
In "Table toolbar > Borders" tab; - Borders UI column size increased to 5 - diagonal left border icon added to 5th place - diagonal right border icon added to 10th place - criss-cross border icon added to 15th place - added diagonal left and diagonal right borders feature - implemented removing diagonal borders when set "no border" - added criss-cross line feature - added a unit test for diagonal borders Change-Id: I2dd7ab797b1a191eb650cc6340ee57d39e45a1ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118951 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2021-08-22no need to use shared_ptr in SdrAllFillAttributesHelperNoel Grandin
these types are already COW types Change-Id: I7e4375ac50b8d887869123eeb99d3eaef0d28169 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120851 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for ViewInformation3DNoel Grandin
it is already a COW type Change-Id: Ie098bd293115650128ebb18d5c16747b519717c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120825 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-22no need to use unique_ptr for XPolygonNoel Grandin
it is already a COW type Change-Id: I94370d20fbe9d7f6b1bd57f339911a75cbef6484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120824 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20use Primitive2DDecompositionVisitor in ViewObjectContact (tdf#105575)Noel Grandin
..to avoid container construction Change-Id: Iae7a8ea8c31b6c8bcf4d161273be7b32fe41a021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20Convert AreaTransparencyGradientPopup to WeldToolbarPopupSzymon Kłos
Change-Id: I3cbb17de9953281e884f6c1b2984bc4865a56227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118471 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120700 Tested-by: Jenkins
2021-08-19use std::optional<OutlinerParaObject> in SdrUndoAttrObjNoel Grandin
it is a COW object, no need to allocate separately on heap Change-Id: Ibfecb263eedb6ef5eca8122e80a564cb1e872db1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120699 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-19Make Custom Color Picker dialog asyncSzymon Kłos
- now supports also XAsynchronousExecutableDialog - inherits from SfxDialogController to attach correct LOKNotifier Change-Id: Ic21db4057b8087d74a437b1c8ec95408ade5264d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119012 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120670 Tested-by: Jenkins
2021-08-19Drop GetSdrObjectFromXShape and use SdrObject::getSdrObjectFromXShapeMike Kaganski
Change-Id: I0d233878ee49fcdc1338ec3bd700e5482d558163 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120694 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-18UnloadObj always dereferences its SdrOle2Obj* argCaolán McNamara
Change-Id: I24f68e83c15f7fad464ad164e75e7cd49ae17b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120678 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18loplugin:constparamsNoel Grandin
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18loplugin:passstuffbyrefNoel Grandin
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-17rename SetRectsDirty->SetBoundAndSnapRectsDirtyNoel Grandin
because there are lots of things being marked dirty, and I like to be sure I know what the code is doing Change-Id: Ifd0380c5560adc4a054495551885fe33af4f3e5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120460 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16do less copying when constructing 2d sequence (tdf#105575)Noel Grandin
instead of constructing a child sequence, and appending that a parent sequence, just pass the parent sequence down the call hierarchy, so we end up doing less copying. Change-Id: If39a0779e543c6aa01f5e2e3ae63d395e0c85f7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120521 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-16pass OutlinerParaObject around by valueNoel Grandin
since it uses o3tl::cow_wrapper, so it is really just a wrapper around a pointer, no point in allocating it on the heap Remove assert in SdrText::SetOutlinerParaObject, which was bogus anyhow, because it was comparing pointers, not deep equality. And since we are now being more efficient and avoiding copying of the internal data in OutlinerParaObject, we hit this assert. Change-Id: I6dbfaab5ee2ca05b2001baf63110041e469df9c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120510 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-12s/mpEdtOutl/mpEditingOutliner/gNoel Grandin
Change-Id: I5eb188cc1808055857f95c73ab838251cd93e4b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120379 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-11svx: cleanup formatting of svdglue.hxxTomaž Vajngerl
Change-Id: I4aa4d25a5097813feeb7d6ebb654b9b0ce0c1c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120302 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-08create comphelper:OMultiTypeInterfaceContainerHelperVar2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: Ia8cdbc5ef877a7af3d9193e1bb2faf1595c15470 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-05drop unneeded forward declareCaolán McNamara
Change-Id: I858d4a43690bd37385eb6f48945c05dd9c2a6182 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120031 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05remove outdated commentsCaolán McNamara
Change-Id: I4038327d0af5ad03b72b3053e9c2b3955b5d42e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120030 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>