diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-05-23 13:32:47 +0530 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-12 22:06:20 -0400 |
commit | 44d216fc07233577a217c0b324dedbbd49299225 (patch) | |
tree | d57d399b20e6db40f83fa97743bba35798350b21 /desktop/source | |
parent | c34d5731b7282762c38c0970d75ea15980c2fb64 (diff) |
lok: Subcribe to more uno commands for state change
(cherry picked from commit 5c7ab8259c7016441df45e04fd3be242e6205c1d)
Change-Id: Id2870b176de4163fbe01e4ac380b4981d3187d90
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 95e4e705d776..2cac482c81fc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -32,8 +32,8 @@ #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> -#include <comphelper/scopeguard.hxx> #include <comphelper/propertysequence.hxx> +#include <comphelper/scopeguard.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -897,7 +897,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha if (aFilterOptions == "TakeOwnership") { bTakeOwnership = true; - aFilterOptions = ""; + aFilterOptions.clear(); } else if ((nIndex = aFilterOptions.indexOf(",TakeOwnership")) >= 0 || (nIndex = aFilterOptions.indexOf("TakeOwnership,")) >= 0) { @@ -912,7 +912,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha } MediaDescriptor aSaveMediaDescriptor; - aSaveMediaDescriptor["Overwrite"] <<= sal_True; + aSaveMediaDescriptor["Overwrite"] <<= true; aSaveMediaDescriptor["FilterName"] <<= aFilterName; aSaveMediaDescriptor[MediaDescriptor::PROP_FILTEROPTIONS()] <<= aFilterOptions; @@ -1038,11 +1038,11 @@ static void doc_iniUnoCommands () SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool(pViewFrame); uno::Reference<util::XURLTransformer> xParser(util::URLTransformer::create(xContext)); - for (sal_uInt32 nIterator = 0; nIterator < SAL_N_ELEMENTS(sUnoCommands); nIterator++) + for (const auto & sUnoCommand : sUnoCommands) { const SfxSlot* pSlot = nullptr; - aCommandURL.Complete = sUnoCommands[nIterator]; + aCommandURL.Complete = sUnoCommand; xParser->parseStrict(aCommandURL); pSlot = rSlotPool.GetUnoSlot(aCommandURL.Path); @@ -2340,7 +2340,7 @@ LibreOfficeKit *libreofficekit_hook(const char* install_path) SAL_JNI_EXPORT int lok_preinit(const char* install_path, const char* user_profile_path) { - return lo_initialize(NULL, install_path, user_profile_path); + return lo_initialize(nullptr, install_path, user_profile_path); } static void lo_destroy(LibreOfficeKit* pThis) |