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

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 21 12:23:14 UTC 2017


 sw/inc/view.hxx                           |    4 +--
 sw/source/ui/dbui/mmresultdialogs.cxx     |    2 -
 sw/source/ui/fmtui/tmpdlg.cxx             |   32 ++++++++----------------------
 sw/source/ui/index/cnttab.cxx             |    2 -
 sw/source/uibase/app/apphdl.cxx           |    6 ++---
 sw/source/uibase/inc/SwXFilterOptions.hxx |    1 
 sw/source/uibase/inc/navipi.hxx           |    1 
 sw/source/uibase/inc/swuicnttab.hxx       |    1 
 sw/source/uibase/inc/tmpdlg.hxx           |    8 -------
 sw/source/uibase/inc/uivwimp.hxx          |    4 ---
 sw/source/uibase/uiview/uivwimp.cxx       |    1 
 sw/source/uibase/uiview/view0.cxx         |    5 +---
 sw/source/uibase/uno/SwXFilterOptions.cxx |    5 ----
 sw/source/uibase/utlui/navipi.cxx         |    3 --
 14 files changed, 20 insertions(+), 55 deletions(-)

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

    loplugin:unusedfields in sw part1
    
    Change-Id: Iabbf7f09c0d92b488d7e03f4436f077c5e6e87aa
    Reviewed-on: https://gerrit.libreoffice.org/39039
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx
index 23136b765819..c47e078d79f7 100644
--- a/sw/inc/view.hxx
+++ b/sw/inc/view.hxx
@@ -607,9 +607,9 @@ public:
 
     // store MailMerge data while "Back to Mail Merge Wizard" FloatingWindow is active
     // or to support printing
-    void SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rConfigItem, sal_uInt16 nRestart);
+    void SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rConfigItem);
     std::shared_ptr<SwMailMergeConfigItem> GetMailMergeConfigItem() const;
-    std::shared_ptr<SwMailMergeConfigItem> EnsureMailMergeConfigItem(const SfxItemSet* pArgs = nullptr, sal_uInt16 nWizardRestartPage = 0);
+    std::shared_ptr<SwMailMergeConfigItem> EnsureMailMergeConfigItem(const SfxItemSet* pArgs = nullptr);
 
     void ExecFormatPaintbrush(SfxRequest &);
     void StateFormatPaintbrush(SfxItemSet &);
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 2004445fc7c9..2001a39ae300 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -828,7 +828,7 @@ IMPL_LINK(SwMMResultPrintDialog, PrintHdl_Impl, Button*, pButton, void)
     sPages += " - ";
     sPages += OUString::number(documentEndPageNumber(xConfigItem.get(), nEnd - 1));
 
-    pTargetView->SetMailMergeConfigItem(xConfigItem, 0);
+    pTargetView->SetMailMergeConfigItem(xConfigItem);
     if(m_pTempPrinter)
     {
         SfxPrinter *const pDocumentPrinter = pTargetView->GetWrtShell()
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index bb5fb940360d..a8b1eab8de77 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -83,15 +83,11 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
     , bNewStyle(bNew)
     , m_nIndentsId(0)
     , m_nAlignId(0)
-    , m_nTextFlowId(0)
-    , m_nAsianTypo(0)
     , m_nFontId(0)
     , m_nFontEffectId(0)
     , m_nPositionId(0)
     , m_nAsianLayoutId(0)
-    , m_nTabId(0)
     , m_nOutlineId(0)
-    , m_nDropCapsId(0)
     , m_nBackgroundId(0)
     , m_nAreaId(0)
     , m_nTransparenceId(0)
@@ -105,12 +101,8 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
     , m_nHeaderId(0)
     , m_nFooterId(0)
     , m_nPageId(0)
-    , m_nFootNoteId(0)
-    , m_nTextGridId(0)
-    , m_nSingleId(0)
     , m_nBulletId(0)
     , m_nNumId(0)
-    , m_nBmpId(0)
     , m_nNumOptId(0)
     , m_nNumPosId(0)
 {
@@ -165,11 +157,11 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
 
             OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
             OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
-            m_nTextFlowId = AddTabPage("textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH),        pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
+            AddTabPage("textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH),        pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
 
             OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
             OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
-            m_nAsianTypo = AddTabPage("asiantypo",  pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),       pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
+            AddTabPage("asiantypo",  pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN),       pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
 
             OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
             OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
@@ -193,12 +185,10 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
 
             OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
             OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
-            m_nTabId = AddTabPage("tabs", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),        pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
+            AddTabPage("tabs", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR),        pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
 
-            m_nOutlineId = AddTabPage("outline", SwParagraphNumTabPage::Create,
-                                    SwParagraphNumTabPage::GetRanges);
-            m_nDropCapsId = AddTabPage("dropcaps", SwDropCapsPage::Create,
-                           SwDropCapsPage::GetRanges );
+            AddTabPage("outline", SwParagraphNumTabPage::Create, SwParagraphNumTabPage::GetRanges);
+            AddTabPage("dropcaps", SwDropCapsPage::Create, SwDropCapsPage::GetRanges );
 
             // add Area and Transparence TabPages
             m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
@@ -289,12 +279,8 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
                 m_nBorderId = AddTabPage("borders",
                                 pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
                 m_nColumnId = AddTabPage("columns", SwColumnPage::Create, SwColumnPage::GetRanges );
-                m_nFootNoteId = AddTabPage("footnotes",
-                                                SwFootNotePage::Create,
-                                                SwFootNotePage::GetRanges );
-                m_nTextGridId = AddTabPage("textgrid",
-                                                SwTextGridPage::Create,
-                                                SwTextGridPage::GetRanges );
+                AddTabPage("footnotes", SwFootNotePage::Create, SwFootNotePage::GetRanges );
+                AddTabPage("textgrid", SwTextGridPage::Create, SwTextGridPage::GetRanges );
                 SvtCJKOptions aCJKOptions;
                 if(!aCJKOptions.IsAsianTypographyEnabled())
                     RemoveTabPage("textgrid");
@@ -311,10 +297,10 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
         // numbering styles
         case SfxStyleFamily::Pseudo:
         {
-            m_nSingleId = AddTabPage("numbering", RID_SVXPAGE_PICK_SINGLE_NUM);
+            AddTabPage("numbering", RID_SVXPAGE_PICK_SINGLE_NUM);
             m_nBulletId = AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET);
             m_nNumId = AddTabPage("outline", RID_SVXPAGE_PICK_NUM);
-            m_nBmpId = AddTabPage("graphics", RID_SVXPAGE_PICK_BMP);
+            AddTabPage("graphics", RID_SVXPAGE_PICK_BMP);
             m_nNumOptId = AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
             m_nNumPosId = AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
         }
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 2e450096a084..e1ff6605bb51 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -298,7 +298,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(vcl::Window* pParent, const SfxItemSet&
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
     OSL_ENSURE(pFact, "Dialog creation failed!");
     m_nSelectId = AddTabPage("index", SwTOXSelectTabPage::Create, nullptr);
-    m_nStylesId = AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr);
+    AddTabPage("styles", SwTOXStylesTabPage::Create, nullptr);
     m_nColumnId = AddTabPage("columns", SwColumnPage::Create, nullptr);
     m_nBackGroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr);
     m_nEntriesId = AddTabPage("entries", SwTOXEntryTabPage::Create, nullptr);
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 4d45596c01cd..c7611e0e0f9f 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -245,7 +245,7 @@ void SwModule::StateOther(SfxItemSet &rSet)
 // start field dialog
 void NewXForms( SfxRequest& rReq ); // implementation: below
 
-std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const SfxItemSet* pArgs, sal_uInt16 nWizardRestartPage)
+std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const SfxItemSet* pArgs)
 {
     // create if it does not exist yet
     std::shared_ptr<SwMailMergeConfigItem> xMMConfig = GetMailMergeConfigItem();
@@ -302,7 +302,7 @@ std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const S
             }
         }
 
-        SetMailMergeConfigItem(xMMConfig, nWizardRestartPage);
+        SetMailMergeConfigItem(xMMConfig);
     }
     return xMMConfig;
 }
@@ -448,7 +448,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
     acquire();
 
     // create if it does not exist yet
-    std::shared_ptr<SwMailMergeConfigItem> xMMConfig = m_pView->EnsureMailMergeConfigItem(pArgs, m_pWizard ? m_pWizard->GetRestartPage() : 0);
+    std::shared_ptr<SwMailMergeConfigItem> xMMConfig = m_pView->EnsureMailMergeConfigItem(pArgs);
 
     SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
     m_pWizard = pFact->CreateMailMergeWizard(*m_pView, xMMConfig);
diff --git a/sw/source/uibase/inc/SwXFilterOptions.hxx b/sw/source/uibase/inc/SwXFilterOptions.hxx
index 1674285e5364..ebf36a5aa885 100644
--- a/sw/source/uibase/inc/SwXFilterOptions.hxx
+++ b/sw/source/uibase/inc/SwXFilterOptions.hxx
@@ -41,7 +41,6 @@ class SwXFilterOptions : public ::cppu::WeakImplHelper<
 
     css::uno::Reference< css::io::XInputStream > xInputStream;
     css::uno::Reference< css::lang::XComponent > xModel;
-    bool            bExport;
 
 public:
                             SwXFilterOptions();
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx
index 1825f8eac10f..6e37fe6996bb 100644
--- a/sw/source/uibase/inc/navipi.hxx
+++ b/sw/source/uibase/inc/navipi.hxx
@@ -94,7 +94,6 @@ class SwNavigationPI : public PanelLayout,
     Size        m_aExpandedSize;
 
     bool    m_bIsZoomedIn : 1;
-    bool    m_bPageCtrlsVisible : 1;
     bool    m_bGlobalMode : 1;
 
     bool IsZoomedIn() const {return m_bIsZoomedIn;}
diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx
index cefd96af2346..632520ac0b0b 100644
--- a/sw/source/uibase/inc/swuicnttab.hxx
+++ b/sw/source/uibase/inc/swuicnttab.hxx
@@ -69,7 +69,6 @@ class SwMultiTOXTabDialog : public SfxTabDialog
     SwWrtShell&             m_rWrtShell;
 
     sal_uInt16              m_nSelectId;
-    sal_uInt16              m_nStylesId;
     sal_uInt16              m_nColumnId;
     sal_uInt16              m_nBackGroundId;
     sal_uInt16              m_nEntriesId;
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index c4a14d61ca0d..803e1820a007 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -35,15 +35,11 @@ class SwTemplateDlg: public SfxStyleDialog
 
     sal_uInt16 m_nIndentsId;
     sal_uInt16 m_nAlignId;
-    sal_uInt16 m_nTextFlowId;
-    sal_uInt16 m_nAsianTypo;
     sal_uInt16 m_nFontId;
     sal_uInt16 m_nFontEffectId;
     sal_uInt16 m_nPositionId;
     sal_uInt16 m_nAsianLayoutId;
-    sal_uInt16 m_nTabId;
     sal_uInt16 m_nOutlineId;
-    sal_uInt16 m_nDropCapsId;
     sal_uInt16 m_nBackgroundId;
     sal_uInt16 m_nAreaId;
     sal_uInt16 m_nTransparenceId;
@@ -57,12 +53,8 @@ class SwTemplateDlg: public SfxStyleDialog
     sal_uInt16 m_nHeaderId;
     sal_uInt16 m_nFooterId;
     sal_uInt16 m_nPageId;
-    sal_uInt16 m_nFootNoteId;
-    sal_uInt16 m_nTextGridId;
-    sal_uInt16 m_nSingleId;
     sal_uInt16 m_nBulletId;
     sal_uInt16 m_nNumId;
-    sal_uInt16 m_nBmpId;
     sal_uInt16 m_nNumOptId;
     sal_uInt16 m_nNumPosId;
 
diff --git a/sw/source/uibase/inc/uivwimp.hxx b/sw/source/uibase/inc/uivwimp.hxx
index 80209b9e8afa..7ebb1b3428b7 100644
--- a/sw/source/uibase/inc/uivwimp.hxx
+++ b/sw/source/uibase/inc/uivwimp.hxx
@@ -103,7 +103,6 @@ class SwView_Impl
 
     std::shared_ptr<SwMailMergeConfigItem>
                                 xConfigItem;
-    sal_uInt16                  nMailMergeRestartPage;
 
     sfx2::DocumentInserter*     m_pDocInserter;
     SfxRequest*                 m_pRequest;
@@ -135,10 +134,9 @@ public:
 
     void                            AddTransferable(SwTransferable& rTransferable);
 
-    void SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rItem, sal_uInt16 nRestart)
+    void SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rItem)
     {
         xConfigItem = rItem;
-        nMailMergeRestartPage = nRestart;
     }
     std::shared_ptr<SwMailMergeConfigItem>  GetMailMergeConfigItem() {return xConfigItem;}
 
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 6569ec483a8e..2ab3dfd58c41 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -55,7 +55,6 @@ SwView_Impl::SwView_Impl(SwView* pShell)
     : mxXTextView()
     , pView(pShell)
     , eShellMode(ShellMode::Text)
-    , nMailMergeRestartPage(0)
     , m_pDocInserter(nullptr)
     , m_pRequest(nullptr)
     , m_nParam(0)
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index f6d6bdee9494..a297001ffc1a 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -131,10 +131,9 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt
 
 }
 
-void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rConfigItem,
-                                    sal_uInt16 nRestart)
+void SwView::SetMailMergeConfigItem(std::shared_ptr<SwMailMergeConfigItem>& rConfigItem)
 {
-    m_pViewImpl->SetMailMergeConfigItem(rConfigItem, nRestart);
+    m_pViewImpl->SetMailMergeConfigItem(rConfigItem);
     UIFeatureChanged();
 }
 
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index 8c79f32f0957..71f1b724a928 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -41,8 +41,7 @@ using namespace ::com::sun::star::lang;
 
 #define FILTER_OPTIONS_NAME             "FilterOptions"
 
-SwXFilterOptions::SwXFilterOptions() :
-    bExport( false )
+SwXFilterOptions::SwXFilterOptions()
 {
 }
 
@@ -116,13 +115,11 @@ sal_Int16 SwXFilterOptions::execute()
 
 void   SwXFilterOptions::setTargetDocument( const uno::Reference< XComponent >& xDoc )
 {
-    bExport = false;
     xModel = xDoc;
 }
 
 void   SwXFilterOptions::setSourceDocument( const uno::Reference<XComponent >& xDoc )
 {
-    bExport = true;
     xModel = xDoc;
 }
 
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 29fcbb1d791a..a46b76f4b374 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -598,7 +598,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
     , m_nAutoMarkIdx(1)
     , m_nRegionMode(RegionMode::NONE)
     , m_bIsZoomedIn(false)
-    , m_bPageCtrlsVisible(false)
     , m_bGlobalMode(false)
 {
     get(m_aContentToolBox, "content");
@@ -633,8 +632,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
     m_xEdit->SetUpHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
     m_xEdit->SetDownHdl(LINK(this, SwNavigationPI, PageEditModifyHdl));
 
-    m_bPageCtrlsVisible = true;
-
     // Double separators are not allowed, so you have to
     // determine the suitable size differently.
     tools::Rectangle aFirstRect = m_aContentToolBox->GetItemRect(m_aContentToolBox->GetItemId("anchor"));


More information about the Libreoffice-commits mailing list