summaryrefslogtreecommitdiff
path: root/sw/source/uibase/sidebar
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /sw/source/uibase/sidebar
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/sidebar')
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx8
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index f24bf135c706..ecb2e61bd3f6 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -33,7 +33,7 @@ namespace sw::sidebar {
namespace {
void renderPreview(sfx2::StyleManager* pStyleManager, OutputDevice& aOutputDevice,
- OUString const & sName, sal_Int32 nHeight, tools::Rectangle const & aRect)
+ std::u16string_view sName, sal_Int32 nHeight, tools::Rectangle const & aRect)
{
SfxStyleSheetBase* pStyleSheet = pStyleManager->Search(sName, SfxStyleFamily::Para);
@@ -98,18 +98,18 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString const & aName)
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Title", nTitleHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Title", nTitleHeight, aRenderRect);
y += nTitleHeight;
}
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Heading 1", nHeadingHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Heading 1", nHeadingHeight, aRenderRect);
y += nHeadingHeight;
}
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Text Body", nTextBodyHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Text Body", nTextBodyHeight, aRenderRect);
}
return pVirtualDev->GetBitmapEx(Point(), aSize);
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index f4c4951f6546..2ba276cf212e 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -104,7 +104,7 @@ public:
maStyles.push_back(aRedefinition);
}
- StyleRedefinition* get(const OUString& aString)
+ StyleRedefinition* get(std::u16string_view aString)
{
for (StyleRedefinition & rStyle : maStyles)
{
@@ -315,7 +315,7 @@ std::vector<FontSet> initFontSets()
return aFontSets;
}
-FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets)
+FontSet getFontSet(std::u16string_view rFontVariant, std::vector<FontSet>& aFontSets)
{
for (const FontSet & rFontSet : aFontSets)
{
@@ -325,7 +325,7 @@ FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets
return aFontSets[0];
}
-void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, const OUString& sColorSetName,
+void applyTheme(SfxStyleSheetBasePool* pPool, std::u16string_view sFontSetName, std::u16string_view sColorSetName,
StyleSet& rStyleSet, svx::ColorSets& rColorSets)
{
SwDocStyleSheet* pStyle;