summaryrefslogtreecommitdiff
path: root/svx
AgeCommit message (Collapse)Author
2016-01-06Make E3dScene3D::GetCamera return non-referenceStephan Bergmann
I stumbled over this when Valgrind'ing CppunitTest_sd_filters_test somewhat erroneously reported Source and destination overlap in memcpy(0x2fde4af8, 0x2fde4af8, 96) for aCamera = rNewCamera; in E3dScene::SetCamera (svx/source/engine3d/scene3d.cxx), where the compiler chose to use memcpy in the implicit definition of the Viewport3D (being a base class of Camera3D) copy assignment operator, and the call pattern of Get/SetCamera in EnhancedCustomShape3d::Create3DObject (svx/source/customshapes/EnhancedCustomShape3d.cxx) causes that assignment to be a self-assignment. Upon closer inspection, some calls of GetCamera already create a copy from the returned reference, while others modified the returned reference, but then would also always call SetCamera on it. An alternative to the given change would have been to instead change SetCamera(Camera3D&) to UpdateCamera() and require all call sites of GetCamera/UpdateCamera to modify the reference returned from GetCamera, but it looks safer overall to go this way. Change-Id: I578e72db57630dca1b09124a3b11d177005b797d
2016-01-05Kill one indentation levelMaxim Monastirsky
Change-Id: Id7a7b33dbfc902fcf5130f3dc8ae23012d1f2310
2016-01-05tdf#90187 Added uno command for track changes bar.Gulsah Kose
v2: Solved dimmed button problem and changed controller class for listen trackchangesbar button. Change-Id: I5a921ad9bb6c8e53d3043e86492d0923a998f3d2 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/21064 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-01-05Make SotFactory private to sot/ and clean a bitMatúš Kukan
Change-Id: Ia683280a3e95eee995e036db6bde5d28852f92ff
2016-01-05tdf#94205: Use o3tl::make_unique insted of new+std::move.Sheikha AL-Hinai
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b Reviewed-on: https://gerrit.libreoffice.org/20984 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05tdf#96708: don't modify document while copying to clipboardMike Kaganski
I.e., don't try to create auto-layout for clipboard pages which don't contain one; don't resize objects to text. Also, don't invalidate items that are equal to defaults, because explicitly set items are not the same as absent items: pasting an object without an item makes the property to inherit new target's default, while when the item is present, the default doesn't apply. Also, don't consider selected state of the page while stringifying - this makes selected page string to differ from not-selected clipboard page. Change-Id: I172e03e1a8c428e5fcae3a116cc9ad8de79f1a87 Reviewed-on: https://gerrit.libreoffice.org/20871 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-01-04these fields can be static constantsNoel Grandin
Change-Id: Id56e219782d7f858cdeb26232c7aabd4f643c9d9 Reviewed-on: https://gerrit.libreoffice.org/21020 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-04vcl: split classes out of metric.hxxChris Sherlock
Change-Id: Id3b155abec7b7a2ff43d0a35e98709f5ee51c6b9 Reviewed-on: https://gerrit.libreoffice.org/21069 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-04Cleanup after removing vcl::FontInfo classChris Sherlock
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
2016-01-03vcl: Excise vcl::FontInfo classChris Sherlock
This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-02tdf#96365: ensure holding SolarMutex before triggering core codeBjoern Michaelsen
(likely a bad sign that this compilation unit, defines lots of UNO interfaces without ever using a SolarMutexGuard) Change-Id: I2cca810f8e4e1684c75d9185d701024f692403a4
2015-12-31findbar: This must be a copy'n'paste error.Jan Holesovsky
Change-Id: Iecff49f04e4b68f071d63217943891a31a610aeb
2015-12-30Some cosmeticsMaxim Monastirsky
Change-Id: I07e826eaa11ec9f21a9eab6f771361566e9c57e0
2015-12-30tdf#89540 Completed show draw functions button for impress and draw.Gulsah Kose
v2: failed commit. v3: Solved slot defination and dimmed button problem. v4: Tried to find slot execution method. v5: Added a control for draw toolbar name in impress and draw v6: Toolbar name control is changed for checking request only impress and draw. v7: Overrided initialize method of base class. v8: Control provided with module name. v9: Cleaned unnecessary included headers v10: Removed m_sModuleName defination and reused base class' m_sModuleName variable. Added white space before header files. Moved control into the initialize method. Control is changed as only controls impress or draw. Change-Id: I781783a72954af1f16212b981356db472ed48739 Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
2015-12-30Kill remaining plugin bitsMaxim Monastirsky
Change-Id: Icd99757b48626ef43313e8de42c4e5462f85a958 Reviewed-on: https://gerrit.libreoffice.org/21008 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2015-12-29cppcheck: noExplicitConstructorCaolán McNamara
Change-Id: Ib43e53d5b6c9c130adb765ac9b769f58060ac640
2015-12-27sal_uLong/sal_uIntPtr/sal_uInt16 to sal_uInt32Matteo Casalin
also avoid some explicit temporaries and group some checks. Change-Id: I7795b208dde53fd383b8c75f72dd9f56429aea2b
2015-12-26svx: change instances of maName to more descriptive namesChris Sherlock
maName is just not descriptive enough and hard to search the source for. Also in this patch: - tracked down what ASE, GPL and SOC stand for and added a comment - found instances of aName, local variables and changed these to aPaletteName Change-Id: I4c7eee31b604a8ef2ebef5fd1daa81e193dd7295 Reviewed-on: https://gerrit.libreoffice.org/20958 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-23loplugin:unusedfields in /includeNoel Grandin
Change-Id: Ia406e727890a365cc89831c96140cad8240f9b61
2015-12-22crashtesting: CreateShellID returns the mediums base url...Caolán McNamara
when it works the way we want it to work, so presumably we can cut out the middle man and use getDocumentBaseURL directly which does the same thing. This has the advantage of being in the IEmbeddedHelper api so assignFrom can be tweaked to pull the src and dest ids arguments to CopyAndGetEmbeddedObject from the src and dest IEmbeddedHelpers always available there. So we ensure we have some ids to present to CopyAndGetEmbeddedObject, avoiding the assert on converting documents such as ooo89433-1.ppt to pdf So the explicit args can apparently be dropped, bubbling up then means we don't need a CloneWithShellIDs (introduced with tdf#71076 and tdf#71767) as normal Clone should now do the right thing. And various other arguments in various callers of these, which are typically filled in with an unhelpful empty OUString placeholder, can go Change-Id: I9c0be0340e72f98b10ee87ada7d2a021fcc39e23
2015-12-22Rearrangement of various context menus in ImpressYousuf Philips
Change-Id: I6674254898dc6d7351ec4450e2aa5ac3f177bdbf Reviewed-on: https://gerrit.libreoffice.org/20640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com>
2015-12-21loplugin:unusedfields in store,svtools,svxNoel Grandin
Change-Id: I9577c64e33950899c2e3467c7b481504e021d470
2015-12-21coverity#735862 Unchecked dynamic_castCaolán McNamara
Change-Id: I8f518ed428c8c13dc411174f468a09565ad50f37
2015-12-21tdf#95846: fix not-relative-to-indent tab stop positionsMike Kaganski
Also minimize rounding errors in tab stop pixel positions. Change-Id: I929d8ca0cd4fc665ea66bf47a7e3b5e47dc8e7f2 Reviewed-on: https://gerrit.libreoffice.org/20762 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-12-21Use std::unique_ptr for the SdrPageProperties member of SdrPage.Kohei Yoshida
Change-Id: I37d95bd91c5bee1028eceda24e84b17162d0d2b1 Reviewed-on: https://gerrit.libreoffice.org/20844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-19loplugin:redundantcastMatúš Kukan
Change-Id: Ie80a8e8132214164a4a237b0e5ea89c1b41d8ee3
2015-12-19Use std::unique_ptr for mpViewContact member instance of SdrPage.Kohei Yoshida
And fix some const-incorrect-ness while at it. Change-Id: I0314c8e5b73f1a7edce040b2a57fbc5d1081d70c Reviewed-on: https://gerrit.libreoffice.org/20815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-18Use std::unique_ptr for SdrLayerAdmin data member.Kohei Yoshida
Change-Id: Ib49f52c94ae96b8bddec6718585d5d7d6e3d148d Reviewed-on: https://gerrit.libreoffice.org/20806 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-17these popups should start invisible and take default popup menu bitsCaolán McNamara
so they can position correctly under wayland Change-Id: Idf65c0ef27be5aa6027a516207fd34c2e03407ca
2015-12-17[API CHANGE] Remove NPAPI-related UNO APIThorsten Behrens
Follow-up to 4c18af27bf95b332ee2006cfc0bbf469fb1a84d4, related to tdf#96398, removing more client code. The following published interfaces are removed: com::sun::star::mozilla::XPluginInstance com::sun::star::mozilla::XPluginInstanceNotifySink com::sun::star::mozilla::XPluginInstancePeer com::sun::star::mozilla::XPluginInstanceSyncPeer com::sun::star::mozilla::XPluginWindowPeer com::sun::star::plugin::PluginDescription com::sun::star::plugin::PluginException com::sun::star::plugin::PluginManager com::sun::star::plugin::PluginMode com::sun::star::plugin::PluginVariable com::sun::star::plugin::XPlugin com::sun::star::plugin::XPluginContext com::sun::star::plugin::XPluginManager Change-Id: I3818a23e0f46fd01bfe9be11b57f6a551c013441 Reviewed-on: https://gerrit.libreoffice.org/20780 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-17tdf#96482 Revert "Resolves: tdf#94069 call setVisible when setDesignMode is ↵Lionel Elie Mamane
called" This reverts commit a7816853bad55ada597092c16ba9a0a761e067d0. tdf#94069 (freeze) has been corrected differently in master (5.2.alpha) anyway.
2015-12-17gtk3+wayland: start floating windows hiddenCaolán McNamara
once they are visible we can't move them under wayland, so start then hidden, move them and then show these floating windows are very delicate. Change-Id: Ia233c23f25cec453df79ef70cab6210dbdd280a0
2015-12-16tdf#96257: Silly work-around to produce same result on OpenGL and non-OpenGLTor Lillqvist
For likely separate reasons, neither the non-OpenGL nor the OpenGL code path produces what we actually want here (a line drawn in 'invert' mode if white is used, as happens on X11). In the non-OpenGL case we get a black line, in the OpenGL case a white one. So let's use grey and at least get the same effect in both cases. Change-Id: Ifb587c6b46adb05e334a18add74352663cf7db9e
2015-12-15The likely useless ImplDoTiledRendering() is used in vcl onlyTor Lillqvist
So move it to a locale include file in vcl. Now <vcl/window.hxx> does not need to include <config_features.h>. As such it is questionable whether what ImplDoTiledRendering() currently does makes any sense; de facto it now just means that we are on iOS. We have comphelper::LibreOfficeKit::isActive() which probably is what should be used to test whether tiled rendering is used. At least in the cases where LibreOfficeKit's "unstable" API is used for tasks that involve rendering of tiles. Hmm, that sounds like a circular argument. Change-Id: I52c984aec7510526c5294579966345b8340c8642
2015-12-15svx: set BaseURL from SvxOle2Shape::createObject()Michael Stahl
This is used from oox chart import code, cf. oox::drawingml::Shape::finalizeXShape(). Change-Id: I7b2097f8d5740a590a6473797ab9436453fbf580
2015-12-15fix missing BaseURL when loading embedded objectsMichael Stahl
When the object is edited in the UI, the m_xClient is set to a SfxInPlaceClient and the DocumentBaseURL is retrieved from it. But if the object is not edited, it will be loaded during export via the API and without a m_xClient; in this case the DocumentBaseURL must have been set previously to be available during import. There appears to be no way to get the URL of the document via the API while it is being imported; SfxBaseModel's m_sURL is unfortunately only initialized from SfxObjectShell::FinishedLoading(). During ODF import, the SvXMLEmbeddedObjectHelper creates the embedded object, so let's make it pass in the parent's BaseURL. The "DefaultParentBaseURL" parameter already exists but was unused previously. Change-Id: I3d1ed29b3a2c0e77ec606a1d09f7bc07e7860733
2015-12-15Bin unused fileTor Lillqvist
Probably was forgotten in 0bf12a06b6344659fe964955a022c7f367598634? Change-Id: Ib32e46fd10307cbf49a1f6278b103b7b05392247
2015-12-15use vector as container for Primitive3DReferenceNoel Grandin
rather than uno::Sequence, since we modify this container a lot and uno::Sequence is expensive to update Change-Id: Id5bc5171cbc4b90b243e6dda6d572f21b3bdf00d
2015-12-14tdf#96206: Avoid scaling objects while copying to clipboardMike Kaganski
... to prevent duplicating masters on slide copy-paste. Also fixed a 10-year copy-paste error (pRefPage wasn't replaced with pNPage). Fixed argument evaluation order issue (aStream.GetEndOfData() depends on Flush() but doesn't call it, so will return incorrect result if called before aStream.GetBuffer()). Replaced compare of hashes with results of stringify(), because it removes useless overhead (hashes are calculated from stringify() anyway, and are not cached anywhere). Removed Flush() called from SvMemoryStream::GetBuffer(), because it calls GetData(), which calls Flush() itself. Thanks to Andras Timar for unit test framework. Change-Id: Ia46d4e9a017fc628d424949a9d229045a249a4ca Reviewed-on: https://gerrit.libreoffice.org/20367 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-12-12Typo: strucure->structureJulien Nabet
Change-Id: I41e0731ddafc39ebcff1c3d8984f4f4f69d35aaf
2015-12-12No need for a separate <vcl/lstbox.h>Tor Lillqvist
Change-Id: Ib8d0e3d240e693c678d575b4791f69ca760919ec
2015-12-11No need for a separate <vcl/graph.h>Tor Lillqvist
Change-Id: I962544005b5d408f7c044a02eefe09b87d8a81fe
2015-12-11No need for a separate <vcl/combobox.h>Tor Lillqvist
Change-Id: Iebf7b44e78fc28c20bdf0cbea84dbfd730b04016
2015-12-11tdf#69977: uno::Sequence is expensiveNoel Grandin
when used as a mutable data-structure. Plain std::vector halves the time taken to display the chart dialog Create a class to represent the std::vector we are going to be passing around, and move some of the utility methods into it to make the code prettier. Also create an optimised append(&&) method for the common case of appending small temporaries. Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
2015-12-10loplugin:nullptr: More NULL -> nullptr automatic rewriteStephan Bergmann
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-09unnecessary nResId argumentCaolán McNamara
Change-Id: Id7d3df1af42cbe7b4f951c335063d26b59e7bc10
2015-12-09Use unique_ptr out-arg to in SfxBindings::QueryState to avoid mem leaksStephan Bergmann
Change-Id: I35df02de675068478a36ef05266ffc2d3054b07f Reviewed-on: https://gerrit.libreoffice.org/20477 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-12-08Related: tdf#71622 compress more gfx in odf streamsThorsten Behrens
Except for jpeg and png, most natively-stored image fileformats compress rather well with zlib. adding a number of vector and pixel formats. Change-Id: I97407a98f620520b0d11552911d2339bf004dc5b Reviewed-on: https://gerrit.libreoffice.org/20461 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-03uno:Sequence->std::vector in SmartTagMgrNoel Grandin
Change-Id: I163f7d6c0f30ac2929df1cae202e695d21bb49fc
2015-11-28Don't leave sdr::table::Cell members implicitly declaredStephan Bergmann
...otherwise, as the class is SVX_DLLPUBLIC and---for better or worse--- SVX_DLLPUBLIC is shared between Library_svxcore and Library_svxcore, all .cxx in Library_svx that happen to include cell.hxx would emit them (as well as those in Library_svxcore, of course), and the copy ctor requires the vtable, which in turn requires an adjustor thunk for Cell::getPropertyStates, which happens to not be emitted into any of the Library_svx .cxx that require it under clang-cl due to <https://llvm.org/bugs/show_bug.cgi?id=25641> "clang-cl: vtordisp thunks not emitted for functions with class template specializations in their signatures." Change-Id: Ib03b7002f9dfe3c2df742640ef7406cf24a7cecd