summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2017-07-21loplugin:unusedfields in sfx2Noel Grandin
Change-Id: Id6666065bf3b27388d87aa2605229e83f1aed79a Reviewed-on: https://gerrit.libreoffice.org/40255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21de-hrc various thingsCaolán McNamara
e.g. helpid[s].hrc -> helpids.h and insert include guards where missing move "ordinary" defines into .hxx files remove .hrc entries that are used as arguments to dialog factory when a dedicated method can be added instead Change-Id: I792fb8eb0adfaa63cf354e6e57401fc943e9196e
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21loplugin:unusedfields in svxNoel Grandin
Change-Id: I7fc5bf55b01d464815771220914f21d8e85b5a36 Reviewed-on: https://gerrit.libreoffice.org/40253 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-20support for filter dialog when an image is exported from context menuMarco Cecchetti
When user save the selected image in a non-vector format the filter dialog used in Draw pops up for filter setting. Change-Id: Ic98b48a47322e807627b7a2ccd8044ec0db30efc Reviewed-on: https://gerrit.libreoffice.org/40223 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-07-20Annotate some more Timers and IdlesJan-Marek Glogowski
Change-Id: Ic8ca00db385ed59bb16744581f9d7cc0fcbb4f5b Reviewed-on: https://gerrit.libreoffice.org/40188 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-07-18loplugin:oncevarTor Lillqvist
Change-Id: I538903412a351ba901c2b2149e450ebc7e80916a
2017-07-17Fix typosAndrea Gelmini
Change-Id: I0fec2abc1bed9c0cfcd78d1b0f6daebc335831be Reviewed-on: https://gerrit.libreoffice.org/39982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-07-15Don't call ensureIsAlive after comphelper::OExternalLockGuard.Arnaud Versini
comphelper::OExternalLockGuard calls ensureIsAlive, no need to call it twice. Change-Id: I08d2b77dcb4d1e72a69c521bf969cbe1e65d5721 Reviewed-on: https://gerrit.libreoffice.org/39997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-15emfplus: make VectorFormats Emf/Wmf/Svg workArmin Le Grand
make complete turn around and internal buffering for Emf/Wmf/Svg work, including images in ODF and re-save from UI. The correct FileType has to be determined. It has shown that *.wmf exist that really contain *.emf, so this turn around will not alter the binary data, but may change the mimetype Change-Id: I4fd92629236c12114f7b7c30234a3d3a9917dfaf
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
First steps to organize an importer that can read/interpret wmf/emf/emf+ and deliver a primitive representation for the content by parsing it. Use the same mechanisms as already applied for Svg, so to reuse abilities to keep original binary data to allow save again and embedding in files and have an implemented replacement bitmap based representation. For this, unify the used helper classes to handle more than just Svg. For 1st try, add test code and static bool switches Change-Id: I6e0a82943541d811a8f8d65a84115569fcd8cee7
2017-07-14svx: make SdrGrafObj::mpReplacementGraphic swappableMichael Stahl
These GraphicObjects clog up the GraphicManager cache so it's effectively useless. Round-tripping the ML bugdoc, this doesn't provide much of a speed-up by itself, but together with the previous fix it goes from 3:00 to 1:30 (in an optimized build). Change-Id: If52e176c790b94ffef9984be53376a34345b06e3
2017-07-14use more OUString::operator== in svxNoel Grandin
Change-Id: Ice996c741e239767a7a15fe9b11147f5384150ba Reviewed-on: https://gerrit.libreoffice.org/39940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-13Reorganize Scheduler priority classesJan-Marek Glogowski
This is based on glibs classification of tasks, but while glib uses an int for more fine grained priority, we stay with our enum. 1. Timers start with DEFAULT priority, which directly corresponds with the previous HIGH priority 2. Idles start with DEFAULT_IDLE priority instead of the previous HIGH priority, so idle default becomes "really run when idle". As RESIZE and REPAINT are special, and the DEFAULTS are set, there is just one primary decision for the programmer: should my idle run before paint (AKA HIGH_IDLE)? If we really need a more fine-grained classification, we can add it later, or also switch to a real int. As a result, this drops many classifications from the code and drastically changes behaviour, AKA a mail merge from KDE is now as fast as Gtk+ again. Change-Id: I498a73fd02d5fb6f5d7e9f742f3bce972de9b1f9
2017-07-13loplugin:oncevar: empty strings: svxStephan Bergmann
Change-Id: I371e3b76cca006125629e7ceeed52873836c8ccc
2017-07-12borderline: correct problems with border displayArmin Le Grand
Borderline display with direct paint and with primitive direct paint has quite some errors in the current state. Started to unify usages, check deeper with creation/usage. borderline: deep changes to BorderLine Found basic error in determining the offset values for BorderLinePrimitive creation, these were not centered on the lines. Corrected that. This makes it possible to remove the formally used clipping which seems to have been used to correct that. Also allows to go back to a 'normal' decomposition that creates line primitives as expected. That again can then be painted quite normally. Also added view-dependent case to the decomposition to guarantee a gap of one discrete unit (pixel). Removed the direct painter, too. Checked and corrected stroking. borderline: Adapted previews to primitives Added code to use the primitive representation in all dialogs and apps using tables. The edit views use these mostly, so the preview should do that, too. Currently missing is a good visualization of diagonals, but this is also true for edit views. Checked all apps and table usages to not get worse borderline: correct line dash visualization When a dashed line is used, a factor of 10.0 was applied in the original coded, added that. Also the orientation of vertical borders was inverted since it was simpler to exchange Start/End, but this also mirrors the line dash visualisation, corrected that Change-Id: I4c1b380a76cb37389fab1259a53fb7cc9da982d1 e95e246d5563360617a2a2213e4d5ec7d0e736b9 62369b4de58fb0264aeb710ec6983ceddca5701d 77418cc6c84ebb0632f8c3448976e82ce612d6b6 b4eb28dc86ce05eb89b26517167305b994158ef8 borderline: adapt cppunittest and clang
2017-07-11tdf#109050: Moving table object with ALT+Arrow keys does not work properlyTamás Zolnai
ALT+up/down behaves differently inside a table: cursor is moved to the left/right neighbouring cell instead of up/down. However when the whole table is selected a different behavior is expected: moving the table as an object. Change-Id: I82c7a3cc7d215b21f19fbf08dcdb7318a7e75289 Reviewed-on: https://gerrit.libreoffice.org/39810 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-07-11loplugin:useuniqueptr in scaddins..svxNoel Grandin
Change-Id: I309f98f6b820103a926e9fe94d67d0aff6eb6476 Reviewed-on: https://gerrit.libreoffice.org/39754 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11simplify calls OUString::copy in foo.copy(x, foo.getLength() - x)Noel Grandin
Change-Id: I20318c77dcc3bc2a64336541ef5a3f412bfd9483 Reviewed-on: https://gerrit.libreoffice.org/39803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11use more range-for on uno::SequenceNoel Grandin
Change-Id: Ifad32425d79be5a22d33d721bdc5fb993f699759 Reviewed-on: https://gerrit.libreoffice.org/39763 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-11svx: assert on undisposed AbstractSvxHpLinkDlgMichael Stahl
3 in () at /lib64/libc.so.6 4 in VclPtr<AbstractSvxHpLinkDlg>::~VclPtr() (this=0x88d47e8, __in_chrg=<optimized out>) at include/vcl/vclptr.hxx:115 5 in SvxHlinkDlgWrapper::~SvxHlinkDlgWrapper() (this=0x88d47a0, __in_chrg=<optimized out>) at include/svx/hyperdlg.hxx:34 6 in SvxHlinkDlgWrapper::~SvxHlinkDlgWrapper() (this=0x88d47a0, __in_chrg=<optimized out>) at include/svx/hyperdlg.hxx:34 7 in SfxChildWindow::Destroy() (this=0x88d47a0) at sfx2/source/appl/childwin.cxx:182 8 in SfxWorkWindow::RemoveChildWin_Impl(SfxChildWin_Impl*) (this=0x6c83940, pCW=0x683bc20) at sfx2/source/appl/workwin.cxx:1425 9 in SfxWorkWindow::ToggleChildWindow_Impl(unsigned short, bool) (this=0x6c83940, nId=5678, bSetFocus=true) at sfx2/source/appl/workwin.cxx:1832 10 in SfxViewFrame::ToggleChildWindow(unsigned short) (this=0x6afdae0, nId=5678) at sfx2/source/view/viewfrm.cxx:2964 Change-Id: I84a1ba817dc8449dc1942b6ebd443ec955e8c622
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-09Added margin feature to the Draw's SideBarpv2k
Change-Id: I53b5430d1563fcceae29418fd5907ac42ea856e7 Reviewed-on: https://gerrit.libreoffice.org/37626 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-07-07a11y: assert on switching hatch/bitmap area radio button tab thingsCaolán McNamara
Change-Id: I2525123dfe2c2dedcbf808f5d2f8e054e4c4bdf1 Reviewed-on: https://gerrit.libreoffice.org/39690 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07C++11 remove std::binary_function bases from functorsJochen Nitschke
std::binary_function is deprecated since C++11 and removed in C++17 90% done with regexp magic. removed obsolete <functional> includes. The std::binary_function base class was used by deprecated std::bind2nd, this was solved in individual commits. The members first_argument_type and second_argument_type were used in chart2/source/controller/dialogs/DataBrowserModel.cxx: DataBrowserModel::implColumnLess and are inlined in this commit. Change-Id: I60ded60a8d4afd59e15ac15a58e18d2498c9be5a Reviewed-on: https://gerrit.libreoffice.org/39659 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-06rework as a shared_ptrCaolán McNamara
mostly to try and track down a crash on exit of sw uwriter under windows Change-Id: Id67e93863056da319dd8225038d60a7f5783b103 Reviewed-on: https://gerrit.libreoffice.org/39604 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-06use more begin()/end() for SequenceNoel Grandin
Change-Id: I399be6b6ef7a6ce01e883569a177c0969bc29c69
2017-07-06loplugin unnecessaryparan improvementsNoel Grandin
Change-Id: I73e945d6ec53537a0da45f6b6291018c7f251a7e Reviewed-on: https://gerrit.libreoffice.org/39587 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05new loplugin unnecessaryparenNoel Grandin
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec Reviewed-on: https://gerrit.libreoffice.org/39549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05loplugin:unusedfields variousNoel Grandin
Change-Id: Ia7bcf2471381aa6a2768ea795fe6572e38209100
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>