diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-07 10:47:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-07 11:00:47 +0000 |
commit | fae35e535d2757244eccf4b5f5555293a24180b3 (patch) | |
tree | 0253f7d409c4e49bcd20d6604495b45a2354d1cc /cui/source/customize/cfgutil.cxx | |
parent | 0f96b3f33f98ecd56f0fe55a65315d6762ff978a (diff) |
loplugin:oncevar in cui..connectivity
Change-Id: Ibe9d04932b0a57040db4fee11886dc1701f6ea17
Reviewed-on: https://gerrit.libreoffice.org/30653
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize/cfgutil.cxx')
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 1209658c0d60..99cc9fec65d1 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -76,9 +76,6 @@ void SfxStylesInfo_Impl::setModel(const css::uno::Reference< css::frame::XModel m_xDoc = xModel; } -static const char CMDURL_SPART [] = ".uno:StyleApply?Style:string="; -static const char CMDURL_FPART2[] = "&FamilyName:string="; - static const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?"; static const char CMDURL_SPART_ONLY [] = "Style:string="; static const char CMDURL_FPART_ONLY [] = "FamilyName:string="; @@ -87,12 +84,10 @@ static const char STYLEPROP_UINAME[] = "DisplayName"; OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle) { - OUStringBuffer sCommand(1024); - sCommand.append(CMDURL_SPART ); - sCommand.append(sStyle ); - sCommand.append(CMDURL_FPART2); - sCommand.append(sFamily ); - return sCommand.makeStringAndClear(); + return ".uno:StyleApply?Style:string=" + + sStyle + + "&FamilyName:string=" + + sFamily; } bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle) @@ -206,8 +201,6 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) ::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily) { - static const char PROP_UINAME[] = "DisplayName"; - css::uno::Sequence< OUString > lStyleNames; css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW); css::uno::Reference< css::container::XNameAccess > xFamilies = xModel->getStyleFamilies(); @@ -238,7 +231,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle) xStyleSet->getByName(aStyleInfo.sStyle) >>= xStyle; if (!xStyle.is()) continue; - xStyle->getPropertyValue(PROP_UINAME) >>= aStyleInfo.sLabel; + xStyle->getPropertyValue("DisplayName") >>= aStyleInfo.sLabel; } catch(const css::uno::RuntimeException&) { throw; } |