create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.
Switch all our internal use-sites to the new class.
Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
OleEmbeddedObject::changeState() calls TryToConvertToOOo() on non-WNT
platforms, which appears highly questionable to me, added in commit
0c3d5fb0ad35ff7fc18917fc86fa58d9312fe3ae.
What this does effectively is load the embedded object, store it as ODF,
and then load it again as ODF.
For one, it doesn't work in all cases currently. If changeState() is
not called from the UI but from some filter code, then no m_xClient may
be set on the OleEmbeddedObject, hence no m_xClient will be set on the
new m_xWrappedObject. Then loading the embedded object will raise
errors due to missing BaseURL, and storing it will fail in
SfxObjectShell::SaveTo_Impl(). (It would be possible to solve that by
copying the "DefaultParentBaseURL" handling code from
OCommonEmbeddedObject.)
The only reason why the previous code in ShapeExport::WriteOLE2Shape()
was able to export the object despite the error is that it does not call
SfxBaseModel functions but directly invokes the export filter, so the
sfx2 code does not get an opportunity to check its error status.
For another, doing this only on non-WNT platforms is also hazardous.
It's probably better to leave conversion to own formats to an explicit
UI action, as the OleEmbeddedObject::doVerb(-9) magic currently does,
where it can hopefully be assumed that the caller at least established
the client connection first.
Change-Id: Ice3d8f8ceabe81b6e9025957c3eb87de9dbfe61a
just to get their mapunit or set visual size.
Will have to try something different here apparently
This reverts commit 757f461ef12548af0be470f7c05ff67df3dc1314.
(cherry picked from commit f2b3519c6b2aceacbe2fd9d53eb52dd36a356ecc)
This may reduce some degree of dependency on boost.
Done by running a script like:
git grep -l '#include *.boost/scoped_array.hpp.' \
| xargs sed -i -e 's@#include *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
| xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'
... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.
Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'
Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
When an object is added to OLE objects cache, when cache is full,
old objects are tried to be unloaded. This triggers notifications
that cause all loaded objects to become active, and to be added to
cache (moved to front).
As the new object already was added to front of the cache, later
activity pushes it to back, until it is the last object in cache.
The cache in this process is overfilled, so each next refresh tries
to unload current last OLE object. So, in the end, this effectively
unloads all cached OLE objects.
This patch prevents this by first unloading last object, and then
adding new object to front of cache.
Also, removed needless creation of reference (makes at least 200
function calls for no reason).
Change-Id: Ia903f4df101971df1b0b0148320fc8e45ac1e79c
Reviewed-on: https://gerrit.libreoffice.org/15772
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
ie.
void f(void);
becomes
void f();
I used the following command to make the changes:
git grep -lP '\(\s*void\s*\)' -- *.cxx \
| xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'
and ran it for both .cxx and .hxx files.
Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
the motivation is SwWrtShell::CalcAndSetScale
and the assert/crash triggered by
ooo58458-1.odt ooo84729-2.odt ooo75058-1.odt ooo123605-1.odt ooo102990-1.odt
fdo57249-1.odt fdo50880-1.odt fdo70223-5.odt ooo30052-2.odt ooo119280-1.odt
ooo79009-1.odt ooo58182-2.odt ooo59992-1.odt ooo123607-1.odt ooo89304-1.odt
ooo91578-5.odt ooo89303-1.odt ooo30052-1.odt fdo65664-3.odt ooo119941-1.odt
ooo55761-1.odt fdo57249-2.odt ooo83229-3.odt ooo84729-1.odt ooo102990-2.odt
ooo37749-1.sxw ooo38798-1.sxw ooo27909-1.sxw
getMapUnit activates the object which can cause chart object to load data from
the current document and appears to attempt to stop and resume pending layout
actions which can't be done if layout is underway, hence the assert from the
inner SwLayAction::SwLayAction triggered by the runstate while an SwLayAction::SwLayAction
is already active for counting the number of pdf output pages.
getMapUnit always returns the same result regardless of anything else and the
assumption is that we don't need to be in run state to setVisualSize on it
Change-Id: Ie75b159b140de223a56324b39699d703c3b40bb9
regression from 251f1b0b38be7d1267339898e44e320f05849e22 "fdo#46808, Adapt
embed::*EmbeddedObjectCreator UNO services to new style"
Change-Id: Id8b49c04183d3bc98f22398a8e43c80909c1ea11
i.e lots now able to be detected after...
commit b44cbb26efe1d0b0950b1e1613e131b506dc3876
Author: Noel Grandin <noel@peralex.com>
Date: Tue Jan 20 12:38:10 2015 +0200
new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I605e2fa56f7186c3d3a764f3cd30f5cf7f881f9d
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae