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

Noel Grandin noel.grandin at collabora.co.uk
Thu Jun 22 06:44:13 UTC 2017


 sd/source/ui/app/sdxfer.cxx                    |    3 ---
 sd/source/ui/dlg/prltempl.cxx                  |   16 ++++++++--------
 sd/source/ui/dlg/tabtempl.cxx                  |   15 +++++----------
 sd/source/ui/func/fuoaprms.cxx                 |    1 -
 sd/source/ui/inc/SlideSorter.hxx               |    4 ----
 sd/source/ui/inc/ViewShellImplementation.hxx   |    1 -
 sd/source/ui/inc/prltempl.hxx                  |    8 --------
 sd/source/ui/inc/sdxfer.hxx                    |    1 -
 sd/source/ui/inc/tabtempl.hxx                  |    5 -----
 sd/source/ui/inc/unoaprms.hxx                  |    6 ------
 sd/source/ui/inc/unosrch.hxx                   |    4 +---
 sd/source/ui/slidesorter/shell/SlideSorter.cxx |    4 ----
 sd/source/ui/unoidl/unosrch.cxx                |    8 +++-----
 sd/source/ui/view/ViewShellImplementation.cxx  |    3 +--
 sd/source/ui/view/sdview2.cxx                  |    1 -
 sd/source/ui/view/viewshel.cxx                 |    2 --
 16 files changed, 18 insertions(+), 64 deletions(-)

New commits:
commit 450bf26c23bf2bb4346236778ef066c6e215eafe
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jun 21 14:21:11 2017 +0200

    loplugin:unusedfields in sd part2
    
    Change-Id: I14b34e08d7bb000bce1625bd0d16050b1269f3e8
    Reviewed-on: https://gerrit.libreoffice.org/39060
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index a1409fac1854..f2151019e8d5 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -94,7 +94,6 @@ SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView,
 ,   mbLateInit( bInitOnGetData )
 ,   mbPageTransferable( false )
 ,   mbPageTransferablePersistent( false )
-,   mbIsUnoObj( false )
 ,   maUserData()
 {
     if( mpSourceDoc )
@@ -249,8 +248,6 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
 
         if( pInfo )
             mpImageMap = new ImageMap( pInfo->GetImageMap() );
-
-        mbIsUnoObj = pObj && pObj->IsUnoObj();
     }
 }
 
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index dbd14ef2161d..e88ad3551298 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -176,15 +176,15 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
     mnTransparency = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr );
     mnFont = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
     mnEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
-    mnParagr = AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr );
+    AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr );
     mnTextAtt = AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr );
-    mnBullet = AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr );
-    mnNum = AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr );
-    mnBitmap = AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr );
-    mnOptions = AddTabPage( "RID_SVXPAGE_NUM_OPTIONS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUM_OPTIONS ), nullptr );
-    mnTab =  AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr );
-    mnAsian = AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr );
-    mnAlign = AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr );
+    AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr );
+    AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr );
+    AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr );
+    AddTabPage( "RID_SVXPAGE_NUM_OPTIONS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUM_OPTIONS ), nullptr );
+    AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr );
+    AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr );
+    AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr );
     mnBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
 
     SvtCJKOptions aCJKOptions;
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 17e962bc8b36..4c3c38bb1908 100644
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -70,14 +70,9 @@ SdTabTemplateDlg::SdTabTemplateDlg( vcl::Window* pParent,
     , m_nTransparencyId(0)
     , m_nFontId(0)
     , m_nFontEffectId(0)
-    , m_nIndentsId(0)
     , m_nTextId(0)
-    , m_nAnimationId(0)
     , m_nDimensionId(0)
     , m_nConnectorId(0)
-    , m_nAlignId(0)
-    , m_nTabId(0)
-    , m_nAsianTypoId(0)
 {
     // fill Listbox and set Select-Handler
 
@@ -87,16 +82,16 @@ SdTabTemplateDlg::SdTabTemplateDlg( vcl::Window* pParent,
     m_nTransparencyId = AddTabPage("transparency", RID_SVXPAGE_TRANSPARENCE);
     m_nFontId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
     m_nFontEffectId = AddTabPage("fonteffect", RID_SVXPAGE_CHAR_EFFECTS);
-    m_nIndentsId = AddTabPage("indents", RID_SVXPAGE_STD_PARAGRAPH);
+    AddTabPage("indents", RID_SVXPAGE_STD_PARAGRAPH);
     m_nTextId = AddTabPage("text", RID_SVXPAGE_TEXTATTR);
-    m_nAnimationId = AddTabPage("animation", RID_SVXPAGE_TEXTANIMATION);
+    AddTabPage("animation", RID_SVXPAGE_TEXTANIMATION);
     m_nDimensionId = AddTabPage("dimensioning", RID_SVXPAGE_MEASURE);
     m_nConnectorId = AddTabPage("connector", RID_SVXPAGE_CONNECTION);
-    m_nAlignId = AddTabPage("alignment", RID_SVXPAGE_ALIGN_PARAGRAPH);
-    m_nTabId = AddTabPage("tabs", RID_SVXPAGE_TABULATOR);
+    AddTabPage("alignment", RID_SVXPAGE_ALIGN_PARAGRAPH);
+    AddTabPage("tabs", RID_SVXPAGE_TABULATOR);
     SvtCJKOptions aCJKOptions;
     if( aCJKOptions.IsAsianTypographyEnabled() )
-        m_nAsianTypoId = AddTabPage("asiantypo", RID_SVXPAGE_PARA_ASIAN);
+        AddTabPage("asiantypo", RID_SVXPAGE_PARA_ASIAN);
     else
         RemoveTabPage("asiantypo");
 }
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index 7ad003aa4b68..95a94b859c6b 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -729,7 +729,6 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
                 pAction->SetSoundOn(pInfo->mbSoundOn, bSoundOn);
                 pAction->SetSound(pInfo->maSoundFile, aSound);
                 pAction->SetPlayFull(pInfo->mbPlayFull, bPlayFull);
-                pAction->SetPathObj(nullptr, pPath);
                 pAction->SetClickAction(pInfo->meClickAction, eClickAction);
                 pAction->SetBookmark(pInfo->GetBookmark(), aBookmark);
                 pAction->SetVerb(pInfo->mnVerb, (sal_uInt16)pInfo->GetBookmark().toInt32() );
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index 97b0336bd149..b4c5612dc35f 100644
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -221,10 +221,6 @@ private:
     VclPtr<ScrollBar> mpVerticalScrollBar;
     VclPtr<ScrollBarBox> mpScrollBarBox;
 
-    /** Set this flag to <TRUE/> to force a layout before the next paint.
-    */
-    bool mbLayoutPending;
-
     /** Some slide sorter wide properties that are used in different
         classes.
     */
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index 4a8ba8d9f73a..40791a49cf78 100644
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -36,7 +36,6 @@ namespace sd {
 class ViewShell::Implementation
 {
 public:
-    bool mbIsShowingUIControls;
     bool mbIsMainViewShell;
     /// Set to true when the ViewShell::Init() method has been called.
     bool mbIsInitialized;
diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx
index 03b10d25e97f..1d86ccaa00aa 100644
--- a/sd/source/ui/inc/prltempl.hxx
+++ b/sd/source/ui/inc/prltempl.hxx
@@ -52,15 +52,7 @@ private:
     sal_uInt16            mnTransparency;
     sal_uInt16            mnFont;
     sal_uInt16            mnEffects;
-    sal_uInt16            mnParagr;
     sal_uInt16            mnTextAtt;
-    sal_uInt16            mnBullet;
-    sal_uInt16            mnNum;
-    sal_uInt16            mnBitmap;
-    sal_uInt16            mnOptions;
-    sal_uInt16            mnTab;
-    sal_uInt16            mnAsian;
-    sal_uInt16            mnAlign;
     sal_uInt16            mnBackground;
 
     PresentationObjects ePO;
diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx
index a8ae438da46d..6eb32921dce3 100644
--- a/sd/source/ui/inc/sdxfer.hxx
+++ b/sd/source/ui/inc/sdxfer.hxx
@@ -135,7 +135,6 @@ private:
     bool                            mbLateInit                   : 1;
     bool                            mbPageTransferable           : 1;
     bool                            mbPageTransferablePersistent : 1;
-    bool                            mbIsUnoObj                  : 1;
     ::std::vector<std::shared_ptr<UserData> > maUserData;
 
                                     SdTransferable( const SdTransferable& ) = delete;
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index d5c2f5e824eb..f4a812baad2d 100644
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -49,14 +49,9 @@ private:
     sal_uInt16 m_nTransparencyId;
     sal_uInt16 m_nFontId;
     sal_uInt16 m_nFontEffectId;
-    sal_uInt16 m_nIndentsId;
     sal_uInt16 m_nTextId;
-    sal_uInt16 m_nAnimationId;
     sal_uInt16 m_nDimensionId;
     sal_uInt16 m_nConnectorId;
-    sal_uInt16 m_nAlignId;
-    sal_uInt16 m_nTabId;
-    sal_uInt16 m_nAsianTypoId;
 
     virtual void                PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
     virtual void                RefreshInputSet() override;
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 833ac0b1286b..87bcabfc18ea 100644
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -61,8 +61,6 @@ class SdAnimationPrmsUndoAction : public SdUndoAction
     Color           aNewDimColor;
     OUString        aOldSoundFile;
     OUString        aNewSoundFile;
-    SdrPathObj*     pOldPathObj;
-    SdrPathObj*     pNewPathObj;
     css::presentation::ClickAction     eOldClickAction;
     css::presentation::ClickAction     eNewClickAction;
     OUString        aOldBookmark;
@@ -101,8 +99,6 @@ public:
         , eNewSecondEffect(css::presentation::AnimationEffect_NONE)
         , eOldSecondSpeed(css::presentation::AnimationSpeed_SLOW)
         , eNewSecondSpeed(css::presentation::AnimationSpeed_SLOW)
-        , pOldPathObj(nullptr)
-        , pNewPathObj(nullptr)
         , eOldClickAction(css::presentation::ClickAction_NONE)
         , eNewClickAction(css::presentation::ClickAction_NONE)
         , nOldVerb(0)
@@ -131,8 +127,6 @@ public:
             { aOldSoundFile = aTheOldSound; aNewSoundFile = aTheNewSound; }
         void SetPlayFull(bool bTheOldPlayFull, bool bTheNewPlayFull)
             { bOldPlayFull = bTheOldPlayFull; bNewPlayFull = bTheNewPlayFull; }
-        void SetPathObj(SdrPathObj* pTheOldPath, SdrPathObj* pTheNewPath)
-            { pOldPathObj = pTheOldPath; pNewPathObj = pTheNewPath; }
         void SetClickAction(css::presentation::ClickAction eTheOldAction, css::presentation::ClickAction eTheNewAction)
             { eOldClickAction = eTheOldAction; eNewClickAction = eTheNewAction; }
         void SetBookmark(const OUString& aTheOldBookmark, const OUString& aTheNewBookmark)
diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx
index 750c380140a9..601a20d880dc 100644
--- a/sd/source/ui/inc/unosrch.hxx
+++ b/sd/source/ui/inc/unosrch.hxx
@@ -84,14 +84,12 @@ protected:
     bool mbCaseSensitive;
     bool mbWords;
 
-    bool mbReplace;
-
     OUString maSearchStr;
     OUString maReplaceStr;
 
 public:
     /// @throws css::uno::RuntimeException
-    SdUnoSearchReplaceDescriptor(bool bReplace);
+    SdUnoSearchReplaceDescriptor();
     virtual ~SdUnoSearchReplaceDescriptor() throw() override;
 
     bool IsCaseSensitive() const { return mbCaseSensitive; }
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 37a710a45663..b972daacfd09 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -118,7 +118,6 @@ SlideSorter::SlideSorter (
       mpHorizontalScrollBar(pHorizontalScrollBar),
       mpVerticalScrollBar(pVerticalScrollBar),
       mpScrollBarBox(pScrollBarBox),
-      mbLayoutPending(true),
       mpProperties(new controller::Properties()),
       mpTheme(new view::Theme(mpProperties))
 {
@@ -139,7 +138,6 @@ SlideSorter::SlideSorter (
       mpHorizontalScrollBar(VclPtr<ScrollBar>::Create(&rParentWindow,WinBits(WB_HSCROLL | WB_DRAG))),
       mpVerticalScrollBar(VclPtr<ScrollBar>::Create(&rParentWindow,WinBits(WB_VSCROLL | WB_DRAG))),
       mpScrollBarBox(VclPtr<ScrollBarBox>::Create(&rParentWindow)),
-      mbLayoutPending(true),
       mpProperties(new controller::Properties()),
       mpTheme(new view::Theme(mpProperties))
 {
@@ -359,8 +357,6 @@ void SlideSorter::ArrangeGUIElements (
         mpSlideSorterController->Resize (::tools::Rectangle(aOrigin, rSize));
 
         GetContentWindow()->EnablePaint (true);
-
-        mbLayoutPending = false;
     }
 }
 
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 47115b107ee8..f51b7481be6c 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -100,7 +100,7 @@ SdUnoSearchReplaceShape::~SdUnoSearchReplaceShape() throw()
 // util::XReplaceable
 uno::Reference< util::XReplaceDescriptor > SAL_CALL SdUnoSearchReplaceShape::createReplaceDescriptor()
 {
-    return new SdUnoSearchReplaceDescriptor(true);
+    return new SdUnoSearchReplaceDescriptor;
 }
 
 sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< util::XSearchDescriptor >& xDesc )
@@ -196,7 +196,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
 // XSearchable
 uno::Reference< css::util::XSearchDescriptor > SAL_CALL SdUnoSearchReplaceShape::createSearchDescriptor(  )
 {
-    return new SdUnoSearchReplaceDescriptor(false);
+    return new SdUnoSearchReplaceDescriptor;
 }
 
 uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape::findAll( const css::uno::Reference< css::util::XSearchDescriptor >& xDesc )
@@ -696,15 +696,13 @@ uno::Reference< drawing::XShape >  SdUnoSearchReplaceShape::GetShape( const uno:
 
 UNO3_GETIMPLEMENTATION_IMPL( SdUnoSearchReplaceDescriptor );
 
-SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor( bool bReplace )
+SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor()
 {
     mpPropSet.reset( new SvxItemPropertySet(ImplGetSearchPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool()) );
 
     mbBackwards = false;
     mbCaseSensitive = false;
     mbWords = false;
-
-    mbReplace = bReplace;
 }
 
 SdUnoSearchReplaceDescriptor::~SdUnoSearchReplaceDescriptor() throw()
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index d8ac5cd4401f..9f210c1ce7d2 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -62,8 +62,7 @@ using namespace ::com::sun::star::drawing::framework;
 namespace sd {
 
 ViewShell::Implementation::Implementation (ViewShell& rViewShell)
-    : mbIsShowingUIControls(false),
-      mbIsMainViewShell(false),
+    : mbIsMainViewShell(false),
       mbIsInitialized(false),
       mbArrangeActive(false),
       mpSubShellFactory(),
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 8199ba385cb9..32375a57748f 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -764,7 +764,6 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
                                 pAction->SetSoundOn(pInfo->mbSoundOn, pInfo->mbSoundOn);
                                 pAction->SetSound(pInfo->maSoundFile, pInfo->maSoundFile);
                                 pAction->SetPlayFull(pInfo->mbPlayFull, pInfo->mbPlayFull);
-                                pAction->SetPathObj(nullptr, nullptr);
                                 pAction->SetClickAction(pInfo->meClickAction, eClickAction);
                                 pAction->SetBookmark(pInfo->GetBookmark(), aBookmark);
                                 pAction->SetVerb(pInfo->mnVerb, pInfo->mnVerb);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 1939e5516059..c71d773b3b97 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1532,8 +1532,6 @@ void ViewShell::Paint (const ::tools::Rectangle&, ::sd::Window* )
 
 void ViewShell::ShowUIControls (bool bVisible)
 {
-    mpImpl->mbIsShowingUIControls = bVisible;
-
     if (mbHasRulers)
     {
         if (mpHorizontalRuler.get() != nullptr)


More information about the Libreoffice-commits mailing list