[Libreoffice-commits] core.git: 3 commits - sd/source

Noel Grandin noel at peralex.com
Thu May 5 08:53:09 UTC 2016


 sd/source/ui/sidebar/SlideBackground.cxx |   12 ++++++------
 sd/source/ui/sidebar/SlideBackground.hxx |    6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 92303ad93f89000537e7e01da4e88aa22db53711
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 5 10:52:05 2016 +0200

    loplugin:nullptr
    
    Change-Id: Iacfe15cdb3c827892ef3db049a0405337faadc0d

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index d3e6d54..24b6a62 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -303,7 +303,7 @@ void SlideBackground::NotifyItemUpdate(
             if(eState >= SfxItemState::DEFAULT)
             {
                 mpFillStyle->SelectEntryPos(1);
-                mpColorItem.reset(pState ? static_cast< XFillColorItem* >(pState->Clone()) : 0);
+                mpColorItem.reset(pState ? static_cast< XFillColorItem* >(pState->Clone()) : nullptr);
                 Update();
             }
         }
@@ -314,7 +314,7 @@ void SlideBackground::NotifyItemUpdate(
             if(eState >= SfxItemState::DEFAULT)
             {
                 mpFillStyle->SelectEntryPos(3);
-                mpHatchItem.reset(pState ? static_cast < XFillHatchItem* >(pState->Clone()) : 0);
+                mpHatchItem.reset(pState ? static_cast < XFillHatchItem* >(pState->Clone()) : nullptr);
                 Update();
             }
         }
@@ -325,7 +325,7 @@ void SlideBackground::NotifyItemUpdate(
             if(eState >= SfxItemState::DEFAULT)
             {
                 mpFillStyle->SelectEntryPos(2);
-                mpGradientItem.reset(pState ? static_cast< XFillGradientItem* >(pState->Clone()) : 0);
+                mpGradientItem.reset(pState ? static_cast< XFillGradientItem* >(pState->Clone()) : nullptr);
                 Update();
             }
         }
@@ -335,7 +335,7 @@ void SlideBackground::NotifyItemUpdate(
             if(eState >= SfxItemState::DEFAULT)
             {
                 mpFillStyle->SelectEntryPos(4);
-                mpBitmapItem.reset(pState ? static_cast< XFillBitmapItem* >(pState->Clone()) : 0);
+                mpBitmapItem.reset(pState ? static_cast< XFillBitmapItem* >(pState->Clone()) : nullptr);
                 Update();
             }
         }
commit fa2313d8cff5f4b9f42bf8f3f7a6ca1c1dda47de
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 5 10:48:35 2016 +0200

    loplugin:simplifybool
    
    Change-Id: I994ff5ad74dcc68eef31c3779b5711160cc5ac5a

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 246e9b5..d3e6d54 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -529,14 +529,14 @@ IMPL_LINK_NOARG_TYPED(SlideBackground, AssignMasterPage, ListBox&, void)
 
 IMPL_LINK_NOARG_TYPED(SlideBackground, DspBackground, Button*, void)
 {
-    bool IsChecked = (mpDspMasterBackground->IsChecked() ? true : false);
+    bool IsChecked = mpDspMasterBackground->IsChecked();
     const SfxBoolItem aBoolItem(SID_DISPLAY_MASTER_BACKGROUND, IsChecked);
     GetBindings()->GetDispatcher()->ExecuteList(SID_DISPLAY_MASTER_BACKGROUND, SfxCallMode::RECORD, { &aBoolItem });
 }
 
 IMPL_LINK_NOARG_TYPED(SlideBackground, DspObjects, Button*, void)
 {
-    bool IsChecked = (mpDspMasterObjects->IsChecked() ? true : false);
+    bool IsChecked = mpDspMasterObjects->IsChecked();
     const SfxBoolItem aBoolItem(SID_DISPLAY_MASTER_OBJECTS,IsChecked);
     GetBindings()->GetDispatcher()->ExecuteList(SID_DISPLAY_MASTER_OBJECTS, SfxCallMode::RECORD, { &aBoolItem, &aBoolItem });
 }
commit cca981b83ad80fc67a705c925db179c46814014f
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 5 10:44:53 2016 +0200

    -Werror,-Winconsistent-missing-override
    
    Change-Id: I14a8df27dc5bf8f16f5955d45f21f5f4079d79e0

diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index a40e6f4..29be461 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -55,15 +55,15 @@ public:
         const css::uno::Reference<css::frame::XFrame>& rxFrame,
         SfxBindings* pBindings );
     virtual ~SlideBackground();
-    virtual void dispose();
+    virtual void dispose() override;
     SfxBindings* GetBindings() { return mpBindings; }
     // Window
-    virtual void DataChanged (const DataChangedEvent& rEvent);
+    virtual void DataChanged (const DataChangedEvent& rEvent) override;
     virtual void NotifyItemUpdate(
         const sal_uInt16 nSID,
         const SfxItemState eState,
         const SfxPoolItem* pState,
-        const bool bIsEnabled);
+        const bool bIsEnabled) override;
 
 private:
 


More information about the Libreoffice-commits mailing list