1643 Commits

Author SHA1 Message Date
Matúš Kukan
4db23a9d17 tdf#74608: Constructor function for OfficeInstallationDirectories singleton
Change-Id: Ia0de503c50b6b1d568df27f6a8139fdcc8d0cfbf
2015-12-27 13:55:29 +01:00
Matúš Kukan
9e3c772590 tdf#74608: Constructor function for OfficeRestartManager singleton
Change-Id: I6c1383c292418b6744dacee95d4f289a6ca1c781
2015-12-27 13:55:29 +01:00
Caolán McNamara
a4764cfa80 crashtesting: fdo73974-1.doc assert on reexport to doc
try setting DefaultParentBaseURL based on the parent BaseURL
for objects created this way

Change-Id: Idfc44d90e4f73f23976e8648c504786955b4fce6
2015-12-24 21:24:13 +00:00
Noel Grandin
3f47ffcf58 OModule::onFirstClient is unused
also move the MutexGuard in revokeClient. No need to hold it while doing
an osl_atomic_increment. Save it until we actually need to call
onLastClient.

Change-Id: Ia87f24b66b0430604a2fe717c95223ff1f5ece6d
Reviewed-on: https://gerrit.libreoffice.org/20919
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-12-24 07:27:05 +00:00
Noel Grandin
c5458af905 loplugin:unusedfields in chart2
Change-Id: I8203f84ad8b138932c990032e17ea5d2daf384bb
2015-12-23 09:38:46 +02:00
Noel Grandin
e18b08363a loplugin:unusedmethods
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-21 10:20:31 +02:00
Michael Stahl
e4a06fc983 sw: set a BaseURL when copying embedded objects
Turns out that SfxObjectShell::CreateShellID() will produce the
SfxMedium's base URL if it exists, so
EmbeddedObjectContainer::CopyAndGetEmbeddedObject() already has
parameters, sw just needs to set them.

Change-Id: I36cedfde4e7c2e25c43c66a30d8ca572f099ad69
2015-12-15 17:44:37 +01:00
Michael Stahl
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
Stephan Bergmann
c4ecd6c493 That SB variable was a temporary debugging aid
...inadvertently checked in with 7bcf64c29a0f5d3d2d60fe98afadab6e48dbe8b3 "Add
isReadOnly() support to simplified configuration access"

Change-Id: I9b8b477f682605fcdcf65f8e1255524d010495be
2015-11-26 12:39:03 +01:00
Noel Grandin
a508f639a0 mark UNO structs as SAL_WARN_UNUSED, where possible
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02:00
Noel Grandin
e78bb6d545 loplugin:unusedfields in include/comphelper,include/editeng
Change-Id: I619c2cf1765df97159fc52ee84e0e9e8d16a22fe
2015-11-24 14:20:25 +02:00
Stephan Bergmann
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
Noel Grandin
048f396084 loplugin:unusedfields in comphelper
Change-Id: I2e410c973af2eb443fee8fe787920bf6bc205d95
2015-11-20 12:43:56 +02:00
Stephan Bergmann
ab9add5c96 loplugin:sallogareas
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
2015-11-20 10:14:49 +01:00
Noel Grandin
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
Noel Grandin
2554efabb6 use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method

Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
2015-11-19 09:33:29 +02:00
Noel Grandin
25aec383f9 use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"

Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:18:55 +00:00
Noel Grandin
8e234c5b7d use initialiser syntax for Sequence<OUString>
replaced using the script:

git grep -lP 'Sequence.*OUString.*\(1\)'
  | xargs perl -0777 -pi
    -e "s/Sequence< OUString > (\w+)\(1\);
.*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g"

Change-Id: I23688a91562051a8eed11fc2a85599545c285c34
Reviewed-on: https://gerrit.libreoffice.org/19967
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 10:13:08 +00:00
Ashod Nakashian
d7801c3982 Namespace cleanup and disambiguation
Change-Id: Ib6d2f8b4e71436c3a7c26bdfc9847152ebaf0739
Reviewed-on: https://gerrit.libreoffice.org/19900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-11-12 10:47:26 +00:00
Stephan Bergmann
fb4ce444c2 loplugin:nullptr (automatic rewrite)
Change-Id: Ibd0e6ae5e3243464b2484a009f2b4781bdaac471
2015-11-10 10:31:19 +01:00
Noel Grandin
6c80a8fe89 new loplugin: oncevar
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
Reviewed-on: https://gerrit.libreoffice.org/19815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 08:34:40 +00:00
Mario J. Rugiero
960d03211e Cleanup two unused boost/bind includes in comphelper.
Change-Id: I8bfbbc82be3a91d7227ff76fc6eb570c1155dd4f
Reviewed-on: https://gerrit.libreoffice.org/19844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 06:00:52 +00:00
Stephan Bergmann
9acf5eab9a loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I779e46c9c0db80485d213117028896a7e5b9e943
2015-11-06 09:34:55 +01:00
Noel Grandin
59b072e22b yyyyy
Change-Id: I9a947beefd2dfe21da8239e841ea3fb416bd1548
2015-11-04 14:10:44 +02:00
Jan Holesovsky
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
Stephan Bergmann
b35e797ca0 Assume this shall be conditional on DBG_UTIL
...and not that MSVC-special _DEBUG

Change-Id: I927f1d49dcbb24fd8fb91032ded6215390c97d79
2015-11-02 23:13:49 +01:00
Noel Grandin
cb4fa1d1e2 use uno::Reference::set method instead of assignment
Change-Id: I080668f86f0ab8b3bba857ee21411f907ae285c4
2015-10-30 11:08:36 +02:00
Noel Grandin
3bc5df7f32 UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-30 08:59:59 +00:00
Noel Grandin
7cdbde4867 Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
2015-10-29 08:57:08 +02:00
Noel Grandin
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
Noel Grandin
3d784c4af6 remove extra spaces around ::
just makes it harder to grep for methods

Change-Id: I0925db2f9284972fcf7e1e3adf90cbe21f69eb15
2015-10-26 09:12:05 +02:00
Serge Krot
0b018d202d tdf#39440: fix several warnings reported by cppcheck
Change-Id: I560d28b7cc67740c6479494d0e5aa62d2ac6ffae
Reviewed-on: https://gerrit.libreoffice.org/19587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-10-25 22:31:44 +00:00
Stephan Bergmann
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
Noel Grandin
e2a7cb31ed cppcheck:noExplicitConstructor
Change-Id: I2b68ba9e8caf7971efbba094ef060e72541bdccf
Reviewed-on: https://gerrit.libreoffice.org/19426
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-18 06:12:13 +00:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Michael Meeks
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
Michael Meeks
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
Michael Meeks
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
Miklos Vajna
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
Noel Grandin
e7311cbaba loplugin:mergeclasses
Change-Id: Ia3b63df5e8752690e3350f8a13445a096a839952
2015-10-07 08:27:25 +02:00
Stephan Bergmann
9a1f09b93b clang-analyzer-deadcode.DeadStores
Change-Id: Ifd016962dda31b312070745e7646879186d074e9
2015-10-05 09:52:43 +02:00
Noel Grandin
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
Andrea Gelmini
ce343470c3 Fix typos
Change-Id: Iaff7e38dd5beac48e1643e369e4240aa736c35ea
Reviewed-on: https://gerrit.libreoffice.org/18941
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-30 06:00:18 +00:00
Stefan Heinemann
c50eb68af3 Renamed wrongly prefixed boolean variables
Fixed tdf#94269

Change-Id: I63109cc4e095bad680d7637a065080ea368860ae
Reviewed-on: https://gerrit.libreoffice.org/18851
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2015-09-29 18:33:40 +00:00
Daniel Robertson
96fa0df15b comphelper: replace for_each with range-based for
Replace complex uses of ::std::for_each with a range-based for-loop.

Change-Id: I57d3d2e830e7700b793e1836777cbe72504c6825
Reviewed-on: https://gerrit.libreoffice.org/18817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-24 16:23:34 +00:00
Miklos Vajna
1704221067 comphelper: add LibreOfficeKit::set/isViewCallback()
Change-Id: Iad0b2ee419327daf478f3ddda2378effe0184067
2015-09-21 07:30:23 +02:00
Caolán McNamara
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
Michael Stahl
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
Michael Stahl
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