summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2017-07-04support for saving a modified image instead of original versionMarco Cecchetti
Normally when you save an image through the "Save..." entry in the context menu for an image, the saved image is the original one more eventually applied filters (which are not removeable). Further applied transformations like rotations, cropping, color effects are not included in the saved image. This patch offers the user to choose if saving the original image (with filters) or the modified version through a pop-up dialog. The new feature is available in Writer, Draw and Calc. Change-Id: I4f983e3a5e8a6839fa5789a96c4d8c44477c1fd7 Reviewed-on: https://gerrit.libreoffice.org/39480 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-04loplugin:casttovoidStephan Bergmann
...cases that were initially missed due to the broken containsProcessingConditionalInclusion() Change-Id: Ib7d801ab5173ee590ef35a9e075d3ce4d4aa06da
2017-07-04loplugin:casttovoid in VCL_BUILDER_DECL_FACTORYStephan Bergmann
Change-Id: I4b0dd08963cf50daa41901975c6f92fe21db2048
2017-07-03C++11 remove std::unary_function bases from functorsJochen Nitschke
std::unary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::unary_function base class was used in 3 places: * chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole is used in a std::not1 function helper who uses the members return_type and argument_type. - replace deprecated std::not1 with a lambda * chart2/source/tools/ModifyListenerHelper.cxx: lcl_weakReferenceToSame used the argument_type member in the operator() parameter. - inline the parameter type. * xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement used result_type and argument_type in operator(). - inline the types Also fix compile error with gcc about finding std::for_each. Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f Reviewed-on: https://gerrit.libreoffice.org/39358 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03loplugin:unusedfields in svxNoel Grandin
Change-Id: I027b70ee92ab07eb68452457c3ee45de3ad22c8b Reviewed-on: https://gerrit.libreoffice.org/39412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-02loplugin:casttovoid: svxStephan Bergmann
Change-Id: I7915d8f069dc0602512d7ab1084c5d7d3b30ee90
2017-07-01tdf#107505: Impress - crash with two people co-editing one slideTamás Zolnai
In tiledrendering mode cursor inside shapes are not handled very well now. Different LO instances manipulates the same cursor instead of having one separate cursor for all instances (as in case of simple text editing in Writer). Crashes caused by that one cursor is owned (created and destroyed) by one LO instance but used by an other instance in the meantime. We can avoid this by not making this cursor available to the other instances. Cursor is hidden anyway so don't need to have it set to the corresponding Window. Change-Id: Id78f79e73eda88f3c2c6aa7f534c32f3f8aba174 Reviewed-on: https://gerrit.libreoffice.org/39432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-06-30aThemeName is unusedStephan Bergmann
...ever since fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import" Change-Id: I7412d3e72aef6835a0d18c5849d2664ba21be057
2017-06-30loplugin:unusedvariablecheckStephan Bergmann
leftover from a54ba50db2c341f0f0e47d77dbe64a6e588bc911 "tdf#108863 svx: fix use- after-free in SdrEditView::DeleteMarkedObj()" Change-Id: I6cbde8810321c476d75a036d8de42f30107adffe
2017-06-30aObjName, bObjNameDC, bObjNameSet have effectively been unusedStephan Bergmann
...ever since fd069bee7e57ad529c3c0974559fd2d84ec3151a "initial import", but got only partially cleaned up with 6561fc32afaa0ca992ae988b6d08c62e3e516d43 "loplugin:oncevar in svx" Change-Id: I0bd9b944939ab311e78e41d61b36e6e8bae5cd89
2017-06-30tdf#108863 svx: fix use-after-free in SdrEditView::DeleteMarkedObj()Michael Stahl
The sdr::ViewSelection has multiple vectors with pointers to the same SdrObjects, and those are only cleared in sdr::ViewSelection::SetEdgesOfMarkedNodesDirty(), so deleting SdrObjects that are marked must be delayed until after that is called. Change-Id: I7ab18cb2116164a71dce29bf10eca974061ab424
2017-06-28SvXMLEmbeddedObjectHelper::Create bDirect parameter is unusedStephan Bergmann
...ever since 63d13cb2ee2c4725599714f6184bcd6e77a1eab7 "#87246#: OLE object support through SAX interface" Change-Id: Ib1d63a3a6adf64e2b5d3a16df5a7c6473d46abfb Reviewed-on: https://gerrit.libreoffice.org/39364 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-28loplugin:redundantcastStephan Bergmann
Change-Id: I5187982cdc317f49139fd9392ce7ff95a5a3b483
2017-06-28-Werror=ignored-qualifiers (GCC 8)Stephan Bergmann
Change-Id: I3863df89052b46aa28f1acdefa6745e153ca8370
2017-06-27loplugin:oncevar in svxNoel Grandin
Change-Id: I22a3a13e059ac7d3479f12860564fe3eb1b55e44 Reviewed-on: https://gerrit.libreoffice.org/39282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-26tdf#39674 Translate some German variable namesJohnny_M
This translates "Neu..." to "New..." in names of some variables. No functional change is intended. Change-Id: I29859ecdd44e15820414746cd2b39f62cdfc0ae3 Reviewed-on: https://gerrit.libreoffice.org/39213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-26Fix typosAndrea Gelmini
Change-Id: I2ce725f87ee6f8ebcffbac268cc7e7f8850023e5 Reviewed-on: https://gerrit.libreoffice.org/39232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-26s/catched/caughtNoel Grandin
Change-Id: I7ea6977a9749e86f8058b78cdb91cd2c62da8264 Reviewed-on: https://gerrit.libreoffice.org/39164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-25remove unused local varsJochen Nitschke
since commit 95c348afa8f4f17c058c449ded75025175af0e4a loplugin:unusedfields in svx part2 Change-Id: I6d5f3704f4efef0a9fb69623f46a216c509c8302 Reviewed-on: https://gerrit.libreoffice.org/39229 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-25svx: pass struct by const reference ...Jochen Nitschke
and use references instead of pointers for output parameters. Change-Id: Ib91a821ff84e464639aa6f09a44ba00301f1d783 Reviewed-on: https://gerrit.libreoffice.org/39220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23simplify some string handling in tracing callsNoel Grandin
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23coverity#1412992 Unused valueCaolán McNamara
Change-Id: I37c27b69ba2be2ffcc0d961d7b4faf527a671807
2017-06-21Resolves: tdf#108610 crash on double delete of async eventCaolán McNamara
regression from... commit e4e4d5713e248f02faf7aa6199b11e152973de8e Date: Wed May 31 15:40:25 2017 +0200 clang-tidy readability-delete-null-pointer which in turn triggered some loplugin:useuniqueptr lets revert the fix of commit 93a288bd75d7caed46d6f29bf006f3d97a9602a9 Date: Mon Jun 12 21:44:57 2017 +0200 svx: fix the std::unique_ptr that deletes itself twice and make the code do exactly like it always did pre initial change Change-Id: Ia922fccdc476e40b5c672b097b04c229215ce38e Reviewed-on: https://gerrit.libreoffice.org/39052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-21loplugin:unusedfields in svx part2Noel Grandin
Change-Id: Ie9fd55b71a152f428a397d9917918f0e9de39aaf Reviewed-on: https://gerrit.libreoffice.org/39014 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21loplugin:unusedfields in svx part1Noel Grandin
Change-Id: I6621e0dda5a5dc3e68c7b1613975c075e2879912 Reviewed-on: https://gerrit.libreoffice.org/39006 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-21convert ErrCode to strong typedefNoel Grandin
would have preferred to re-use o3tl::strong_int, of which this is a modified copy, but there are lots of convenience accessors which are nice to define on the class. Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a Reviewed-on: https://gerrit.libreoffice.org/38497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20bullet char style preview is unreadable, cause uses opensymbolCaolán McNamara
Change-Id: I1bd0a0e85c9d956184680d7e15709b3a7b590c30 Reviewed-on: https://gerrit.libreoffice.org/39009 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-19Make SfxItemSet ranges correct by construction: Fix static casesStephan Bergmann
...with the aid of an extended compilerplugins/clang/store/sfxitemsetrewrite.cxx (which in turn needed a small addition to compilerplugins/clang/check.hxx). Enable svl::detail::validGap check for the static case, but keep it disabled for now for the dynamic case. Change-Id: I4846ba8e99aff94a86518e2cb5044e575093386e
2017-06-19add more debug names for scheduled eventsLászló Németh
Change-Id: Idb85ffe13fd5e23b9378c03b5f239f29f8008276 Reviewed-on: https://gerrit.libreoffice.org/38788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-18Fix typosAndrea Gelmini
Change-Id: If28e198b8e1a26660e07dce49db66a651de43d3f Reviewed-on: https://gerrit.libreoffice.org/38850 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-18tdf#107666: EDITING: No caret outside the textbox after inserting a textboxTamás Zolnai
This reverts commit 44555103217df34b218787f3dc6a2634b41fe52e. Now revert the related commit, need to revisit the original bug later. Change-Id: I08f42c4e859277ab411e4be5ad065fe3cca8bbb6 Reviewed-on: https://gerrit.libreoffice.org/38923 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-17TransferableObjectDescriptor::mnOle2Misc field is unusedNoel Grandin
which means that SfxObjectShell::GetMiscStatus becomes unused Change-Id: I5c89a2cd5c77c7f08a57fdac08237aab514fc7fa Reviewed-on: https://gerrit.libreoffice.org/38843 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-16Make SfxItemSet ranges correct by constructionStephan Bergmann
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT) that each individual range has an upper bound not smaller than its lower bound. Arguably, all SfxItemSet instances should fulfill the stronger guarantees required and checked by MergeRange. And in many cases the ranges are statically known, so that the checking can happen at compile time. Therefore, replace the two SfxItemSet ctors taking explicit ranges with two other ctors that actually do proper checking. The (templated) overload taking an svl::Items struct should be used in all cases where the range values are statically known at compile time, while the overload taking a std::initializer_list<Pair> is for the remaining cases (that can only do runtime checking via assert). Most of those latter cases are simple cases with a single range covering a single item, but a few are more complex. (At least some of the uses of the existing SfxItemSet overload taking a const sal_uInt16* pWhichPairTable can probably also be strengthened, but that is left for another day.) This commit is the first in a series of two. Apart from the manual changes to compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and svl/source/items/itemset.cxx, it only consists of automatic rewriting of the relevant SfxItemSet ctor calls (plus a few required manual fixes, see next). But it does not yet check that the individual ranges are properly sorted (see the TODO in svl::detail::validGap). That check will be enabled, and the ensuing manual fixes will be made in a follow-up commit, to reduce the likelyhood of accidents. There were three cases of necessary manual intervention: * sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in braced-init-list syntax now, so needs explicit narrowing conversion to sal_uInt16. * In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually. * In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx, sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx, sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx, some comments had to be put back (see "TODO: the replaced range can contain relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx). A few uses of the variadic form erroneously used nullptr instead of 0 for termination. But this should have been harmless even if promoted std::nullptr_t is larger than promoted sal_uInt16, assuming that the part of the nullptr value that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly, some uses made the harmless error of using 0L instead of 0. Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35 Reviewed-on: https://gerrit.libreoffice.org/38861 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-16Profiling API: add ProfileZonesLászló Németh
Change-Id: Ie5669bd75d9b4be047d98402cb69ac313ab618df Reviewed-on: https://gerrit.libreoffice.org/38787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-16only some languages put a space between number and %Caolán McNamara
Change-Id: I9dbbf403624a49513e4c596aef80754cd4e0a88d Reviewed-on: https://gerrit.libreoffice.org/38867 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-16Resolves: tdf#108419 use spinfield preferred size as transparency widget sizeCaolán McNamara
Change-Id: I7b5c8aeb087efe007c687dc1f206bcb0e8b0173e Reviewed-on: https://gerrit.libreoffice.org/38864 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-15use SetGraphic instead of temporary GraphicObjectCaolán McNamara
Change-Id: I220600e110e7bd2b602092c4a6f98521b0d8d43c
2017-06-15skip a default dtor + assign with copy ctorCaolán McNamara
Change-Id: Ibf685ff915dacedfbc9ecfa4b119115142cb68c0
2017-06-14use ERRCODE_NONE instead of 0Noel Grandin
peeling off a small chunk of my ErrCode strong_int conversion Change-Id: Idc89e8496083beed7608cba705cd981139eb7111 Reviewed-on: https://gerrit.libreoffice.org/38777 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-14use more SAL_N_ELEMENTS part 2Noel Grandin
Change-Id: If00e371c3cd3ae616309a172c875faed016e391b Reviewed-on: https://gerrit.libreoffice.org/38773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-13Let BaseProperties::CreateObjectSpecificItemSet return unique_ptrStephan Bergmann
Change-Id: Ic734fe2a425ca1c821ba91df17aecac5ef40a000
2017-06-13Use unique_ptr for EmptyProperties::mpEmptyItemSetStephan Bergmann
Change-Id: I167e6ee803ee5c81553e8a5f0d63f2a47195b46a
2017-06-13Use unique_ptr for DefaultProperties::mpItemSetStephan Bergmann
Change-Id: Ia5272aac6825a9f571ae0ed144475eb291426894
2017-06-13Use unique_ptr in ItemPoolVectorStephan Bergmann
Change-Id: I0ca2209d2fcbd7a16b67eee546b3ccc5393f2d42
2017-06-13Use unique_ptr for ImpSdrGDIMetaFileImport::mp*AttrStephan Bergmann
Change-Id: I8bfe10e46cfaacb329998b11fe507c2302fe2d44
2017-06-13Use unique_ptr for Svx3DWin::mpRemember2DAttributesStephan Bergmann
Change-Id: I55120a885d74bbd3710a4e02be939a8e4e6a9ba2
2017-06-13Let SfxSetItem ctor take SfxItemSet by unique_ptrStephan Bergmann
Change-Id: I219dd03477862169cd50eecc14822f6a023f879a
2017-06-12tdf#108480: Undo from clone formating does not remove vertical alignmentTamás Zolnai
In the related change: d36aa2ba3132ce62a370b7260ca620642cbf7dbf wrong method was used to set cell properties, which does not handle undo actions, so use the proper function. Other issue was related to undo handling of vertical text alignment in general. In some cases undo actions were lost after user clicked out of the cell. It is because vertical alignment is not affecting the outliner and so the related undo actions were just dropped in EndTextEdit() method. Change-Id: I3a6a95fac711056a658a3dee616733939cd13330 Reviewed-on: https://gerrit.libreoffice.org/38699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-06-12svx: fix the std::unique_ptr that deletes itself twiceMichael Stahl
It's good that the obviously error prone C++98 bare pointer was replaced with a modern C++11 std::unique_ptr - everyone knows that with such modern idioms memory management errors will be a thing of the past! (regression from commit e4e4d5713e248f02faf7aa6199b11e152973de8e) svxcorelo.dll!sdr::event::AsynchGraphicLoadingEvent::~AsynchGraphicLoadingEvent() Line 57 C++ svxcorelo.dll!sdr::event::AsynchGraphicLoadingEvent::`scalar deleting destructor'(unsigned int) C++ svxcorelo.dll!std::default_delete<sdr::event::AsynchGraphicLoadingEvent>::operator()(sdr::event::AsynchGraphicLoadingEvent * _Ptr) Line 1608 C++ svxcorelo.dll!std::unique_ptr<sdr::event::AsynchGraphicLoadingEvent,std::default_delete<sdr::event::AsynchGraphicLoadingEvent> >::reset(sdr::event::AsynchGraphicLoadingEvent * _Ptr) Line 1855 C++ svxcorelo.dll!std::unique_ptr<sdr::event::AsynchGraphicLoadingEvent,std::default_delete<sdr::event::AsynchGraphicLoadingEvent> >::operator=(void * __formal) Line 1728 C++ svxcorelo.dll!sdr::contact::ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent * pEvent) Line 231 C++ svxcorelo.dll!sdr::event::AsynchGraphicLoadingEvent::~AsynchGraphicLoadingEvent() Line 59 C++ svxcorelo.dll!sdr::event::AsynchGraphicLoadingEvent::`scalar deleting destructor'(unsigned int) C++ svxcorelo.dll!std::default_delete<sdr::event::AsynchGraphicLoadingEvent>::operator()(sdr::event::AsynchGraphicLoadingEvent * _Ptr) Line 1608 C++ svxcorelo.dll!std::unique_ptr<sdr::event::AsynchGraphicLoadingEvent,std::default_delete<sdr::event::AsynchGraphicLoadingEvent> >::~unique_ptr<sdr::event::AsynchGraphicLoadingEvent,std::default_delete<sdr::event::AsynchGraphicLoadingEvent> >() Line 1820 C++ svxcorelo.dll!sdr::contact::ViewObjectContactOfGraphic::~ViewObjectContactOfGraphic() Line 306 C++ svxcorelo.dll!sdr::contact::ViewObjectContactOfGraphic::`scalar deleting destructor'(unsigned int) C++ svxcorelo.dll!sdr::contact::ObjectContact::~ObjectContact() Line 62 C++ svxcorelo.dll!sdr::contact::ObjectContactOfPageView::~ObjectContactOfPageView() Line 72 C++ svxcorelo.dll!sdr::contact::ObjectContactOfPageView::`scalar deleting destructor'(unsigned int) C++ svxcorelo.dll!SdrPageWindow::ResetObjectContact() Line 482 C++ svxcorelo.dll!SdrPageWindow::~SdrPageWindow() Line 135 C++ Change-Id: I989a800581e80befff3dcc37e7b8ffd370c2d7e8