[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Thu May 26 10:57:42 UTC 2016


 sw/source/uibase/sidebar/PageFooterPanel.cxx |   16 +++++-----------
 sw/source/uibase/sidebar/PageFooterPanel.hxx |    5 +----
 sw/source/uibase/sidebar/PageFormatPanel.cxx |   17 +++++------------
 sw/source/uibase/sidebar/PageFormatPanel.hxx |    5 +----
 sw/source/uibase/sidebar/PageHeaderPanel.cxx |   10 +++++-----
 sw/source/uibase/sidebar/PageHeaderPanel.hxx |    4 ++--
 sw/source/uibase/sidebar/PageMarginPanel.hxx |    4 ++--
 sw/source/uibase/sidebar/PageStylesPanel.cxx |   16 +++++-----------
 sw/source/uibase/sidebar/PageStylesPanel.hxx |    7 ++-----
 9 files changed, 28 insertions(+), 56 deletions(-)

New commits:
commit 77829f9221c1d9c9747304c90a0ceb8a16864a26
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 26 12:57:12 2016 +0200

    Various loplugin warnings
    
    Change-Id: I27101eb92a5ce6665c6dfaf761c06a33c7646dcb

diff --git a/sw/source/uibase/sidebar/PageFooterPanel.cxx b/sw/source/uibase/sidebar/PageFooterPanel.cxx
index b492230..e68ff88 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.cxx
@@ -42,12 +42,12 @@ VclPtr<vcl::Window> PageFooterPanel::Create(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
     SfxBindings* pBindings)
 {
-    if( pParent == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFooterPanel::Create", NULL, 0);
+    if( pParent == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFooterPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
-        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFooterPanel::Create", NULL, 0);
-    if( pBindings == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFooterPanel::Create", NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFooterPanel::Create", nullptr, 0);
+    if( pBindings == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFooterPanel::Create", nullptr, 0);
 
     return VclPtr<PageFooterPanel>::Create(pParent, rxFrame, pBindings);
 }
@@ -60,7 +60,6 @@ PageFooterPanel::PageFooterPanel(
     PanelLayout(pParent, "PageFooterPanel", "modules/swriter/ui/pagefooterpanel.ui", rxFrame),
     mpBindings( pBindings )
 {
-    Initialize();
 }
 
 PageFooterPanel::~PageFooterPanel()
@@ -73,11 +72,6 @@ void PageFooterPanel::dispose()
     PanelLayout::dispose();
 }
 
-void PageFooterPanel::Initialize()
-{
-
-}
-
 void PageFooterPanel::NotifyItemUpdate(
     const sal_uInt16 /*nSid*/,
     const SfxItemState /*eState*/,
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.hxx b/sw/source/uibase/sidebar/PageFooterPanel.hxx
index 4286cb6..83c5300 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.hxx
@@ -60,7 +60,7 @@ public:
         const sal_uInt16 nSId,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
     SfxBindings* GetBindings() const { return mpBindings; }
     PageFooterPanel(
@@ -80,9 +80,6 @@ private:
     VclPtr<MetricField> mpFooterRMargin;
     VclPtr<MetricField> mpFooterSpacing;
     VclPtr<ListBox> mpSameContentLB;
-
-    void Initialize();
-
 };
 
 } } //end of namespace sw::sidebar
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 165d5d3..25ca959 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -42,12 +42,12 @@ VclPtr<vcl::Window> PageFormatPanel::Create(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
     SfxBindings* pBindings)
 {
-    if( pParent == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFormatPanel::Create", NULL, 0);
+    if( pParent == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageFormatPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
-        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFormatPanel::Create", NULL, 0);
-    if( pBindings == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFormatPanel::Create", NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageFormatPanel::Create", nullptr, 0);
+    if( pBindings == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageFormatPanel::Create", nullptr, 0);
 
     return VclPtr<PageFormatPanel>::Create(pParent, rxFrame, pBindings);
 }
@@ -64,8 +64,6 @@ PageFormatPanel::PageFormatPanel(
     get(mpPaperWidth, "paperwidth");
     get(mpPaperHeight, "paperheight");
     get(mpPaperOrientation, "paperorientation");
-
-    Initialize();
 }
 
 PageFormatPanel::~PageFormatPanel()
@@ -83,11 +81,6 @@ void PageFormatPanel::dispose()
     PanelLayout::dispose();
 }
 
-void PageFormatPanel::Initialize()
-{
-
-}
-
 void PageFormatPanel::NotifyItemUpdate(
     const sal_uInt16 /*nSid*/,
     const SfxItemState /*eState*/,
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx b/sw/source/uibase/sidebar/PageFormatPanel.hxx
index 178f062..b8be54d 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx
@@ -60,7 +60,7 @@ public:
         const sal_uInt16 nSId,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
     SfxBindings* GetBindings() const { return mpBindings; }
 
@@ -79,9 +79,6 @@ private:
     VclPtr<MetricField> mpPaperWidth;
     VclPtr<MetricField> mpPaperHeight;
     VclPtr<ListBox> mpPaperOrientation;
-
-    void Initialize();
-
 };
 
 } } //end of namespace sw::sidebar
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.cxx b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
index 907961b..65c0766 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.cxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
@@ -43,12 +43,12 @@ VclPtr<vcl::Window> PageHeaderPanel::Create(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
     SfxBindings* pBindings)
 {
-    if( pParent == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageHeaderPanel::Create", NULL, 0);
+    if( pParent == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageHeaderPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
-        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageHeaderPanel::Create", NULL, 0);
-    if( pBindings == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageHeaderPanel::Create", NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageHeaderPanel::Create", nullptr, 0);
+    if( pBindings == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageHeaderPanel::Create", nullptr, 0);
 
     return VclPtr<PageHeaderPanel>::Create(pParent, rxFrame, pBindings);
 }
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.hxx b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
index 46222ae..ae1b525 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.hxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
@@ -60,7 +60,7 @@ public:
         const sal_uInt16 nSId,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
     SfxBindings* GetBindings() const { return mpBindings; }
     PageHeaderPanel(
@@ -68,7 +68,7 @@ public:
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
         SfxBindings* pBindings);
     virtual ~PageHeaderPanel();
-    virtual void dispose();
+    virtual void dispose() override;
 
 private:
 
diff --git a/sw/source/uibase/sidebar/PageMarginPanel.hxx b/sw/source/uibase/sidebar/PageMarginPanel.hxx
index 3ad17c4..39c7751 100644
--- a/sw/source/uibase/sidebar/PageMarginPanel.hxx
+++ b/sw/source/uibase/sidebar/PageMarginPanel.hxx
@@ -60,7 +60,7 @@ public:
         const sal_uInt16 nSID,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
     SfxBindings* GetBindings() const { return mpBindings; }
 
@@ -69,7 +69,7 @@ public:
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
         SfxBindings* pBindings);
     virtual ~PageMarginPanel();
-    virtual void dispose();
+    virtual void dispose() override;
 
 private:
 
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 0e10e917..b0af6fc 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -42,12 +42,12 @@ VclPtr<vcl::Window> PageStylesPanel::Create(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
     SfxBindings* pBindings)
 {
-    if( pParent == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageStylesPanel::Create", NULL, 0);
+    if( pParent == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no parent window given to PageStylesPanel::Create", nullptr, 0);
     if( !rxFrame.is() )
-        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageStylesPanel::Create", NULL, 0);
-    if( pBindings == NULL )
-        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageStylesPanel::Create", NULL, 0);
+        throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PageStylesPanel::Create", nullptr, 0);
+    if( pBindings == nullptr )
+        throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PageStylesPanel::Create", nullptr, 0);
 
     return VclPtr<PageStylesPanel>::Create(pParent, rxFrame, pBindings);
 }
@@ -60,7 +60,6 @@ PageStylesPanel::PageStylesPanel(
     PanelLayout(pParent, "PageStylesPanel", "modules/swriter/ui/pagestylespanel.ui", rxFrame),
     mpBindings( pBindings )
 {
-    Initialize();
 }
 
 PageStylesPanel::~PageStylesPanel()
@@ -73,11 +72,6 @@ void PageStylesPanel::dispose()
     PanelLayout::dispose();
 }
 
-void PageStylesPanel::Initialize()
-{
-
-}
-
 void PageStylesPanel::NotifyItemUpdate(
     const sal_uInt16 /*nSid*/,
     const SfxItemState /*eState*/,
diff --git a/sw/source/uibase/sidebar/PageStylesPanel.hxx b/sw/source/uibase/sidebar/PageStylesPanel.hxx
index 8216937..de3eb6d 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.hxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.hxx
@@ -60,7 +60,7 @@ public:
         const sal_uInt16 nSId,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
     SfxBindings* GetBindings() const { return mpBindings; }
     PageStylesPanel(
@@ -68,7 +68,7 @@ public:
         const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame,
         SfxBindings* pBindings);
     virtual ~PageStylesPanel();
-    virtual void dispose();
+    virtual void dispose() override;
 
 private:
 
@@ -80,9 +80,6 @@ private:
     VclPtr<MetricField> mpFooterRMargin;
     VclPtr<MetricField> mpFooterSpacing;
     VclPtr<ListBox> mpSameContentLB;
-
-    void Initialize();
-
 };
 
 } } //end of namespace sw::sidebar


More information about the Libreoffice-commits mailing list