[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Thu Aug 27 01:13:48 PDT 2015
sw/source/uibase/sidebar/ThemePanel.cxx | 38 ++++++++++++++++----------------
sw/source/uibase/sidebar/ThemePanel.hxx | 2 -
2 files changed, 19 insertions(+), 21 deletions(-)
New commits:
commit a7ef614ff261a90790041bc29e8038d1813e01e6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Aug 27 10:13:21 2015 +0200
loplugin:staticmethods
Change-Id: I262a9e75ec20fad15b550b84989fd7acc118c53a
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index 93b0f1c..838cc1b 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -393,25 +393,7 @@ void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, cons
}
}
-} // end anonymous namespace
-
-namespace sw { namespace sidebar {
-
-VclPtr<vcl::Window> ThemePanel::Create (vcl::Window* pParent,
- const css::uno::Reference<css::frame::XFrame>& rxFrame,
- SfxBindings* pBindings)
-{
- if (pParent == NULL)
- throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
- if (!rxFrame.is())
- throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
- if (pBindings == NULL)
- throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
-
- return VclPtr<ThemePanel>::Create(pParent, rxFrame, pBindings);
-}
-
-BitmapEx ThemePanel::GenerateColorPreview(const svx::ColorSet& rColorSet)
+BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet)
{
ScopedVclPtrInstance<VirtualDevice> pVirtualDev(*Application::GetDefaultDevice());
sal_Int32 nScaleFactor = pVirtualDev->GetDPIScaleFactor();
@@ -441,6 +423,24 @@ BitmapEx ThemePanel::GenerateColorPreview(const svx::ColorSet& rColorSet)
return pVirtualDev->GetBitmapEx(Point(), aSize);
}
+} // end anonymous namespace
+
+namespace sw { namespace sidebar {
+
+VclPtr<vcl::Window> ThemePanel::Create (vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings)
+{
+ if (pParent == NULL)
+ throw css::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0);
+ if (!rxFrame.is())
+ throw css::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1);
+ if (pBindings == NULL)
+ throw css::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2);
+
+ return VclPtr<ThemePanel>::Create(pParent, rxFrame, pBindings);
+}
+
ThemePanel::ThemePanel(vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
SfxBindings* pBindings)
diff --git a/sw/source/uibase/sidebar/ThemePanel.hxx b/sw/source/uibase/sidebar/ThemePanel.hxx
index a2af076..870690d 100644
--- a/sw/source/uibase/sidebar/ThemePanel.hxx
+++ b/sw/source/uibase/sidebar/ThemePanel.hxx
@@ -64,8 +64,6 @@ private:
virtual void dispose() SAL_OVERRIDE;
- BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet);
-
SfxBindings* mpBindings;
VclPtr<ListBox> mpListBoxFonts;
More information about the Libreoffice-commits
mailing list