Commit Graph

323 Commits

Author SHA1 Message Date
b0fc09daf1 fix missing BaseURL when loading embedded objects
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-15 17:44:36 +01:00
fb8a3fac5d loplugin:nullptr: More NULL -> nullptr automatic rewrite
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
e78bb6d545 loplugin:unusedfields in include/comphelper,include/editeng
Change-Id: I619c2cf1765df97159fc52ee84e0e9e8d16a22fe
2015-11-24 14:20:25 +02:00
b8793748b0 Seems more natural to pass a homogenous list by initializer_list
...than by template parameter pack (even if that requires using ServiceDecl*, as
initializer_list cannot take reference types)

Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-20 13:39:52 +01:00
fe3fd05966 add mapKeysToSequence/mapValuesToSequence methods to comphelper
and use them

Change-Id: If4dc9df63db37185228aeaaab2979498d61304ec
Reviewed-on: https://gerrit.libreoffice.org/20055
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-20 08:14:13 +00:00
53f16c39f5 remove unused typedefs and inline use-once typedefs
and improve the script a little

Change-Id: I2792ea4dd5df3a50736fbe209225c3f16fb86b84
Reviewed-on: https://gerrit.libreoffice.org/20033
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-18 10:38:08 +00:00
fb4ce444c2 loplugin:nullptr (automatic rewrite)
Change-Id: Ibd0e6ae5e3243464b2484a009f2b4781bdaac471
2015-11-10 10:31:19 +01:00
eaf640d282 comphelper: add a generic implementation of std container operator==
... that contain std::unique_ptr.  With C++11 variadic templates this
apparently works for both std::vector and std::set; associative
containers like std::map have different iterators so need a different
implementation.

Change-Id: I6872445b007875c310d08fa7a8d7311075880b1d
Reviewed-on: https://gerrit.libreoffice.org/19818
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-11-06 12:59:55 +00:00
8c987fabab lok: Introduce LOK_CALLBACK_UNO_COMMAND_RESULT callback.
Posting of the .uno:Something commands is asynchronous.  To be able to find
out when eg. .uno:Save finished, this commit introduces a callback that fires
when that happens.

To be able to receive such a notification, the appropriate postUnoCommand()
must be called with 'true' as the parameter for bNotifyWhenFinished (defaults
to 'false').

Change-Id: I254939ebc8ea5f309ae39686dcaaeddd5148b0c9
2015-11-03 13:25:23 +01:00
c7e8f21a53 loplugin:unusedmethods
Change-Id: Id3b5cd75d4357336ed592ef11a3f34d209f8e95f
Reviewed-on: https://gerrit.libreoffice.org/19636
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 05:58:41 +00:00
644487a115 loplugin:unusedmethods
Change-Id: I161cd52606c11b6008f5d8b1d8ee391692f91861
Reviewed-on: https://gerrit.libreoffice.org/19231
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-27 08:20:43 +00:00
1579dcb11e Rename some "document name" params to "document URL"
...to match reality, cf. 7660e4dcecfb19ad8e9e21e5fe53637bd1b9dc6c
"tdf#89694 Password dialog for opening OOXML shows url-encoded path"

Change-Id: I9fdd204494374770186347e92aa0bd6e7093ffaa
2015-10-20 15:18:26 +02:00
1b62841b18 com::sun::star->css in include/comphelper
Change-Id: Ice569b724732da1fd67a18a4ccf2f92f530cd689
Reviewed-on: https://gerrit.libreoffice.org/19459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-20 07:05:25 +00:00
25405f5ef5 coverity#1327458 Uninitialized scalar field
Change-Id: Iaa51be64ad0ed96e8ce805c7cf26e8a48215b2d1
2015-10-17 14:46:25 +01:00
866909c1db Improve performance by using the ScCalcOptions for OpenCL.
Use the new configurationlistener to track the relevant setting.

Change-Id: I9decea55df25f7eb34cd2fef94743d1907360d16
Reviewed-on: https://gerrit.libreoffice.org/19377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-14 19:36:56 +00:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
c0096b5b84 Hold the SolarMutex while updating properties; thanks to sberg.
Change-Id: Id9dc4c7e083da2a8d44c7295a8b605de81bca1ef
Reviewed-on: https://gerrit.libreoffice.org/19272
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-09 14:52:05 +00:00
f76b3dd039 Move SolarMutex down from tools to comphelper/ to make life easier.
Change-Id: I7dd21f30daa27e5de2848eb16aee9a610dd629d5
Reviewed-on: https://gerrit.libreoffice.org/19271
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-09 14:51:44 +00:00
83c5214889 loplugin:saloverride
Change-Id: I7b640ecf957ec2663c68a9548680a64c85470da5
2015-10-09 11:48:15 +02:00
ccf8bdcf92 Create a wrapper to make listening for configmgr changes easy.
Change-Id: Ib58d04f9e046e604b24e0e338796a7a60aa1d6fd
Reviewed-on: https://gerrit.libreoffice.org/19253
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2015-10-09 08:42:49 +00:00
fce720b3e4 comphelper: add string::join()
If there is a need for it, this could be extended later to work with uno
sequences and/or OUStrings as well.

Change-Id: Id0af8b1755c8e4b668720563d10a052337e1b2c9
2015-10-08 08:37:57 +02:00
4281599a04 loplugin:mergeclasses
Change-Id: If5da1527a048997aec1dbc07afbdddabd2c4168d
2015-10-07 08:27:25 +02:00
6ca355d281 tdf#94228 comphelper: replace BOOST_PP
Replace BOOST_PP macros in comphelper with variadic templates. The
client interface should not change. However, there are a few side
effects due to this change. The most important being 1) There is no
longer a maximum number of service declarations limmited by default
at 12 for unwrapArgs and component_getFactoryHelper. 2)
component_getFactoryHelper now terminates early as soon as pRet is not a
null pointer.

Change-Id: I016fd208d0e80f91d8669fff29d58b6189e946d3
Reviewed-on: https://gerrit.libreoffice.org/18891
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-10-06 19:29:43 +00:00
e209d115d4 remove old standalone Sun bug numbers
Sun bug numbers without any accompanying text are completely useless.

Fixed with
   git grep -lP '//\s*#\d+#\s*$'
       | xargs perl -i -ne'/\/\/\s*#\d+#\s*$/d or print'
And then hand-checking the result to restore places where it deleted code.
And then some more grepping and hand-editing to kill the others.

Change-Id: Ia96ce4466db8bb8da363ebf41f0ae7f45f28bf29
Reviewed-on: https://gerrit.libreoffice.org/19023
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-01 06:57:19 +00:00
b3ebda451f Fix typos
Change-Id: Ia8b2176a439742769e61fb6a981000f316033071
Reviewed-on: https://gerrit.libreoffice.org/18954
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
2015-09-30 12:36:37 +00:00
34180700b2 loplugin:removeunusedmethods, remove unused stuff
Change-Id: I35456b2a3ad2a84a1d045f09cdfb29e4c19b8350
2015-09-29 15:08:43 +02:00
8b00ac9b46 tdf#94228 comphelper: replace BOOST_PP
Remove makeSequence.

Change-Id: If07dc8702d811111fc634c9c7eb4c9a331517ca5
Reviewed-on: https://gerrit.libreoffice.org/18647
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-09-25 21:13:17 +00:00
1704221067 comphelper: add LibreOfficeKit::set/isViewCallback()
Change-Id: Iad0b2ee419327daf478f3ddda2378effe0184067
2015-09-21 07:30:23 +02:00
22b80ac8e2 boost->std
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 12:54:25 +00:00
4f918cd5da comphelper: give up on the XPropertySetInfos for now
PropertySetInfo_Impl in ucb/source/core/ucbstore.cxx is sheer insanity,
persisting a PropertySetInfo into the configuration => throw up
hands in despair.

Change-Id: Ic341e453571072a9ed66c6bf51e96dbe39806566
2015-09-12 00:00:40 +02:00
013f84d06f comphelper: another WeakImplHelper duplicate
Change-Id: I8b5fad24857f434cab351bbbae42c4b09bc6613a
2015-09-11 22:31:53 +02:00
03be785efe framework: yet another WeakImplHelper<XPropertySetInfo> dupcliate
There's a very similar comphelper::PropertySetInfo, unfortunately with
an additional mnMemberId on its properties, so convert a little...

Change-Id: I2a5fc0bb0ff6d680d546192b9d09afee6348f218
2015-09-11 22:31:53 +02:00
6fcaaca6cf comphelper: fix MSVC --enable-mergedlibs build, OFOPXMLHelper
The OFOPXMLHelper class causes duplicate definition link errors
due to its WeakImplHelper base class.

It turns out that the OFOPXMLHelper class itself is only used by other
exported functions in comphelper itself so just hide the
implementation detail.

Change-Id: I3ac8c561af703193cc2609e2c799b630a0d43127
2015-09-01 18:25:47 +02:00
a01a0785e6 comphelper: fix MSVC --enable-mergedlibs build
Try not to export the WeakImplHelper symbols as that causes duplicate
definition errors with the class OSelfTerminateFileStream that
has the same WeakImplHelper base.

Change-Id: Id41bfed24617113de48c76ab6802b21a8892e66f
2015-09-01 18:25:47 +02:00
fe6c124da7 Remove demonstrated-useless comphelper::compare
Change-Id: Ifd1b38afb963255b76f0d821eb46e4c6a972128a
2015-08-21 10:34:04 +02:00
a4de770bab comphelper: reduce copypasta with UniquePtrValueLess functor
Change-Id: Ib93b818eeebc2f370535d1b061beabf7e8c65257
2015-08-19 19:32:18 +02:00
58c3bbfd46 comphelper: remove unnecessary include <stack>
Change-Id: I39295d69dd8a48f0f40275830cb6fda4ca0b69f3
2015-08-19 19:32:18 +02:00
39ce314c12 comphelper::isA(Type... -> Type == cppu::UnoType...
Change-Id: I1bfb99b1715a907a03af5a30df6c7a41f91fd2fb
2015-08-19 14:48:27 +02:00
884e970b8c Remove unused comphelper::isAReference
Change-Id: I7033e1e60f67e93a31d19ea08513982643dd61ae
2015-08-19 14:48:27 +02:00
d0f18382c5 comphelper::isA(Any... -> Any::has
Change-Id: I4fdc77c6fde93d9d1ee814f7614a1c4c81e18247
2015-08-19 14:48:27 +02:00
d21260cdb6 Remove two silly typedefs
Change-Id: Ia7de1cebf6009e770ca1b96bab6d5e121573ccc1
2015-08-19 13:34:43 +02:00
5da0dce19c Consolidate isFileUrl checks
Change-Id: I1b74fdfaa09c4d0d6c296253958e83e78b546a9a
2015-08-19 12:24:37 +02:00
94cdcaa4d8 Add a globally usable WindowsErrorString function
Is comphelper the right place for this? Is having it as "inline" the right
way?

Change-Id: I973dbde108f89b6cab17e5d88db2390d6f18a672
2015-08-13 13:24:54 +03:00
6a7de42a76 Properly init PropertyValue.Handle in InitPropertySequence
Change-Id: If00dc9330f0fd08057ac75510e1c2f3bb1e5b17c
2015-08-11 09:47:08 +02:00
a5b842f3aa remove unused SfxFilterFlags values
from both the code and the XCU files

Change-Id: I47f1f33c3ad4a37e346e3b8020dd9d3e284ccb77
Reviewed-on: https://gerrit.libreoffice.org/17522
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 11:08:25 +00:00
819fd24487 comphelper: replace boost::function with std::function
Change-Id: I042c97d8472c3afceffba36808687f382571e6c2
2015-07-31 21:24:24 +02:00
dd4befa992 fix crash in writer, thanks to my new assert in typed_flags_set
and clean up the duplication of constants between filter/ and
comphelper/ in the process

Change-Id: I0d1525b559c63a3d39deae51accff5dcdbb0aa82
Reviewed-on: https://gerrit.libreoffice.org/17446
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-07-31 09:55:17 +00:00
18110ca3bd comphelper, desktop: fix MSVC mergedlib link failure
Duplicate symbols are easily avoided by removing duplicate code.

Change-Id: I9b598a44156d6ff71b0691e69ab8163b15e2e26f
2015-07-27 21:22:07 +02:00
efac5fa06e remove some unused defines
Change-Id: Ib2d50e8c29ccbc5ffcb52cdff4ae3eaae9a62188
Reviewed-on: https://gerrit.libreoffice.org/17332
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-27 06:12:01 +00:00