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

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 21 13:39:03 UTC 2017


 sw/source/ui/dbui/mmoutputtypepage.cxx               |    1 -
 sw/source/ui/dbui/mmresultdialogs.cxx                |    1 -
 sw/source/ui/envelp/label1.cxx                       |    9 +++------
 sw/source/ui/frmdlg/frmdlg.cxx                       |    9 +++------
 sw/source/ui/inc/mmresultdialogs.hxx                 |    1 -
 sw/source/uibase/dbui/dbmgr.cxx                      |    2 --
 sw/source/uibase/dbui/mmconfigitem.cxx               |    5 -----
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |    8 --------
 sw/source/uibase/docvw/AnchorOverlayObject.cxx       |    1 -
 sw/source/uibase/docvw/AnchorOverlayObject.hxx       |    3 ---
 sw/source/uibase/docvw/AnnotationWin2.cxx            |    2 --
 sw/source/uibase/inc/frmdlg.hxx                      |    3 ---
 sw/source/uibase/inc/inputwin.hxx                    |    1 -
 sw/source/uibase/inc/label.hxx                       |    3 ---
 sw/source/uibase/inc/mmconfigitem.hxx                |   10 ----------
 sw/source/uibase/ribbar/inputwin.cxx                 |    2 +-
 16 files changed, 7 insertions(+), 54 deletions(-)

New commits:
commit 48da675a67a2bfd2eadfd6d4c6dba0dee74b5326
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jun 21 11:31:56 2017 +0200

    loplugin:unusedfields in sw part2
    
    Change-Id: I7404fcac486f54fc0e310f401d8546c4aacfede2
    Reviewed-on: https://gerrit.libreoffice.org/39040
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 6b5444843967..03eaa93efb4b 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -269,7 +269,6 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
     m_pStatus = VclPtr<SvSimpleTable>::Create(*m_pContainer);
     m_pStatusHB = &(m_pStatus->GetTheHeaderBar());
 
-    m_nStatusHeight = m_pContainer->get_height_request();
     OUString sTask(SwResId(ST_TASK));
     OUString sStatus(SwResId(ST_STATUS));
 
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 186dc925e263..3a1f5b09870d 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -822,7 +822,6 @@ IMPL_LINK(SwMMResultPrintDialog, PrintHdl_Impl, Button*, pButton, void)
         if(nEnd > documentCount)
             nEnd = documentCount;
     }
-    xConfigItem->SetPrintRange((sal_uInt16)nBegin, (sal_uInt16)nEnd);
 
     OUString sPages(OUString::number(documentStartPageNumber(xConfigItem.get(), nBegin)));
     sPages += " - ";
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 31cf6911d9c8..eee6e2302ddb 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -99,16 +99,13 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
     , aTypeIds(50, 10)
     , m_pRecs(new SwLabRecs)
     , m_bLabel(bLabel)
-    , m_nFormatId(0)
     , m_nOptionsId(0)
     , m_nLabelId(0)
     , m_nCardsId(0)
-    , m_nBusinessId(0)
-    , m_nPrivateId(0)
 {
     WaitObject aWait( pParent );
 
-    m_nFormatId = AddTabPage("format", SwLabFormatPage::Create, nullptr);
+    AddTabPage("format", SwLabFormatPage::Create, nullptr);
     m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr);
     m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, nullptr);
     m_sBusinessCardDlg = GetPageText(m_nCardsId);
@@ -126,8 +123,8 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
         RemoveTabPage("labels");
         RemoveTabPage("cards");
         m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr);
-        m_nBusinessId = AddTabPage("business", SwBusinessDataPage::Create, nullptr );
-        m_nPrivateId = AddTabPage("private", SwPrivateDataPage::Create, nullptr);
+        AddTabPage("business", SwBusinessDataPage::Create, nullptr );
+        AddTabPage("private", SwPrivateDataPage::Create, nullptr);
         SetText(m_sBusinessCardDlg);
     }
     // Read user label from writer.cfg
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index 5294a92f3e5a..19d81ef64a44 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -64,9 +64,6 @@ SwFrameDlg::SwFrameDlg( SfxViewFrame*       pViewFrame,
     , m_nStdId(0)
     , m_nAddId(0)
     , m_nWrapId(0)
-    , m_nUrlId(0)
-    , m_nPictureId(0)
-    , m_nCropId(0)
     , m_nColumnId(0)
     //, m_nBackgroundId(0)
     , m_nAreaId(0)
@@ -87,11 +84,11 @@ SwFrameDlg::SwFrameDlg( SfxViewFrame*       pViewFrame,
     m_nStdId = AddTabPage("type",  SwFramePage::Create, nullptr);
     m_nAddId = AddTabPage("options",  SwFrameAddPage::Create, nullptr);
     m_nWrapId = AddTabPage("wrap", SwWrapTabPage::Create, nullptr);
-    m_nUrlId = AddTabPage("hyperlink",  SwFrameURLPage::Create, nullptr);
+    AddTabPage("hyperlink",  SwFrameURLPage::Create, nullptr);
     if (m_sDlgType == "PictureDialog")
     {
-        m_nPictureId = AddTabPage("picture", SwGrfExtPage::Create, nullptr);
-        m_nCropId = AddTabPage("crop", RID_SVXPAGE_GRFCROP);
+        AddTabPage("picture", SwGrfExtPage::Create, nullptr);
+        AddTabPage("crop", RID_SVXPAGE_GRFCROP);
     }
     if (m_sDlgType == "FrameDialog")
     {
diff --git a/sw/source/ui/inc/mmresultdialogs.hxx b/sw/source/ui/inc/mmresultdialogs.hxx
index e8280c103cc2..e64e03ba6178 100644
--- a/sw/source/ui/inc/mmresultdialogs.hxx
+++ b/sw/source/ui/inc/mmresultdialogs.hxx
@@ -191,7 +191,6 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog
 
     SwSendMailDialog_Impl*  m_pImpl;
     SwMailMergeConfigItem*  m_pConfigItem;
-    sal_Int32               m_nStatusHeight;
     sal_Int32               m_nSendCount;
     sal_Int32               m_nErrorCount;
 
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 393a1df9bdc5..d6671ae5d9a7 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -3163,8 +3163,6 @@ std::shared_ptr<SwMailMergeConfigItem> SwDBManager::PerformMailMerge(SwView* pVi
     aMergeDesc.bCreateSingleFile = true;
     rSh.GetDBManager()->Merge(aMergeDesc);
 
-    xConfigItem->SetMergeDone();
-
     return xConfigItem;
 }
 
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 86e9567f756e..ca0559bd0e76 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -703,11 +703,8 @@ void SwMailMergeConfigItem_Impl::SetCurrentGreeting(
 SwMailMergeConfigItem::SwMailMergeConfigItem() :
     m_pImpl(new SwMailMergeConfigItem_Impl),
     m_bAddressInserted(false),
-    m_bMergeDone(false),
     m_bGreetingInserted(false),
     m_nGreetingMoves(0),
-    m_nStartPrint(0),
-    m_nEndPrint(0),
     m_pSourceView(nullptr),
     m_pTargetView(nullptr)
 {
@@ -1534,7 +1531,6 @@ void SwMailMergeConfigItem::SetInServerPassword(const OUString& rPassword)
 
 void SwMailMergeConfigItem::DocumentReloaded()
 {
-    m_bMergeDone = false;
     m_bGreetingInserted = false;
     m_bAddressInserted = false;
     m_rAddressBlockFrame.clear();
@@ -1602,7 +1598,6 @@ void  SwMailMergeConfigItem::SetTargetView(SwView* pView)
     if(!m_pTargetView)
     {
         m_pImpl->m_aMergeInfos.clear();
-        m_bMergeDone = false;
     }
 }
 
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 52aeec2e47a3..32f651cd529a 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -60,10 +60,6 @@ using namespace ::com::sun::star::beans;
 
 SFX_IMPL_CHILDWINDOW_WITHID(SwSpellDialogChildWindow, FN_SPELL_GRAMMAR_DIALOG)
 
-#define SPELL_START_BODY        0   // body text area
-#define SPELL_START_OTHER       1   // frame, footnote, header, footer
-#define SPELL_START_DRAWTEXT    2   // started in a draw text object
-
 struct SpellState
 {
     bool                m_bInitialCall;
@@ -71,7 +67,6 @@ struct SpellState
     bool                m_bLostFocus;
 
     // restart and progress information
-    sal_uInt16              m_SpellStartPosition;
     bool                m_bBodySpelled;  // body already spelled
     bool                m_bOtherSpelled; // frames, footnotes, headers and footers spelled
     bool                m_bStartedInOther; // started the spelling inside of the _other_ area
@@ -101,7 +96,6 @@ struct SpellState
         m_bInitialCall(true),
         m_bLockFocus(false),
         m_bLostFocus(false),
-        m_SpellStartPosition(SPELL_START_BODY),
         m_bBodySpelled(false),
         m_bOtherSpelled(false),
         m_bStartedInOther(false),
@@ -226,7 +220,6 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
                 }
                 // determine if the selection is outside of the body text
                 bOtherText = !(pWrtShell->GetFrameType(nullptr,true) & FrameTypeFlags::BODY);
-                m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
                 if(bOtherText)
                 {
                     m_pSpellState->pOtherCursor.reset( new SwPaM(*pWrtShell->GetCursor()->GetPoint()) );
@@ -250,7 +243,6 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
             else
             {
                 SdrView* pSdrView = pWrtShell->GetDrawView();
-                m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT;
                 m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
                 OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
                 // start checking at the top of the drawing object
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 116cc1467d34..c7f1ee90a617 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -238,7 +238,6 @@ AnchorOverlayObject::AnchorOverlayObject( const basegfx::B2DPoint& rBasePos,
     , maTriangle()
     , maLine()
     , maLineTop()
-    , mHeight(0)
     , mAnchorState(AnchorState::All)
     , mbLineSolid(false)
 {
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.hxx b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
index cc15504ee8df..9fcac873d3d9 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.hxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
@@ -73,8 +73,6 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
         void setLineSolid( const bool bNew );
         bool getLineSolid() const { return mbLineSolid; }
 
-        void SetHeight( const unsigned long aHeight ) { mHeight = aHeight; };
-
         void SetAnchorState( const AnchorState aState );
         AnchorState GetAnchorState() const { return mAnchorState; }
 
@@ -104,7 +102,6 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
         basegfx::B2DPolygon maTriangle;
         basegfx::B2DPolygon maLine;
         basegfx::B2DPolygon maLineTop;
-        unsigned long mHeight;
         AnchorState mAnchorState;
 
         bool mbLineSolid : 1;
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index e4360ab085ea..0738fccd92d8 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -685,7 +685,6 @@ void SwAnnotationWin::SetPosAndSize()
                                       basegfx::B2DPoint( mPageBorder ,mAnchorRect.Bottom()+2*15),
                                       basegfx::B2DPoint( aLineStart.X(),aLineStart.Y()),
                                       basegfx::B2DPoint( aLineEnd.X(),aLineEnd.Y()));
-            mpAnchor->SetHeight(mAnchorRect.Height());
         }
         else
         {
@@ -697,7 +696,6 @@ void SwAnnotationWin::SetPosAndSize()
                                                                        mColorAnchor );
             if ( mpAnchor )
             {
-                mpAnchor->SetHeight(mAnchorRect.Height());
                 mpAnchor->setVisible(true);
                 mpAnchor->SetAnchorState(AnchorState::Tri);
                 if (HasChildPathFocus())
diff --git a/sw/source/uibase/inc/frmdlg.hxx b/sw/source/uibase/inc/frmdlg.hxx
index b31931dd8877..e31abe7afcf0 100644
--- a/sw/source/uibase/inc/frmdlg.hxx
+++ b/sw/source/uibase/inc/frmdlg.hxx
@@ -37,9 +37,6 @@ class SwFrameDlg : public SfxTabDialog
     sal_uInt16 m_nStdId;
     sal_uInt16 m_nAddId;
     sal_uInt16 m_nWrapId;
-    sal_uInt16 m_nUrlId;
-    sal_uInt16 m_nPictureId;
-    sal_uInt16 m_nCropId;
     sal_uInt16 m_nColumnId;
     //sal_uInt16 m_nBackgroundId;
     sal_uInt16 m_nAreaId;
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index c83301f2ba1f..047078799b0f 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -55,7 +55,6 @@ friend class InputEdit;
     OUString        aAktTableName, sOldFormula;
 
     bool            bFirst : 1;  // initialisations at first call
-    bool            bActive : 1; // for hide/show when switching documents
     bool            bIsTable : 1;
     bool            bDelSel : 1;
     bool            m_bDoesUndo : 1;
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index dc1ddbae1f83..055deac52ccf 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -42,12 +42,9 @@ class SwLabDlg : public SfxTabDialog
     OUString   aLstGroup;
     OUString   m_sBusinessCardDlg;
     bool       m_bLabel;
-    sal_uInt16 m_nFormatId;
     sal_uInt16 m_nOptionsId;
     sal_uInt16 m_nLabelId;
     sal_uInt16 m_nCardsId;
-    sal_uInt16 m_nBusinessId;
-    sal_uInt16 m_nPrivateId;
     void          ReplaceGroup_( const OUString &rMake );
 
     virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
diff --git a/sw/source/uibase/inc/mmconfigitem.hxx b/sw/source/uibase/inc/mmconfigitem.hxx
index b16f280141ef..84b78faa9323 100644
--- a/sw/source/uibase/inc/mmconfigitem.hxx
+++ b/sw/source/uibase/inc/mmconfigitem.hxx
@@ -54,16 +54,12 @@ class SW_DLLPUBLIC SwMailMergeConfigItem
     std::unique_ptr<SwMailMergeConfigItem_Impl> m_pImpl;
     //session information - not stored in configuration
     bool m_bAddressInserted;
-    bool m_bMergeDone;
     bool m_bGreetingInserted;
     sal_Int32 m_nGreetingMoves;
     OUString m_rAddressBlockFrame;
     std::set<sal_Int32> m_aExcludedRecords;
     css::uno::Reference<css::view::XSelectionChangeListener> m_xDBChangedListener;
 
-    sal_uInt16 m_nStartPrint;
-    sal_uInt16 m_nEndPrint;
-
     OUString m_sSelectedPrinter;
 
     SwView* m_pSourceView;
@@ -226,9 +222,6 @@ public:
     void MoveGreeting( sal_Int32 nMove) { m_nGreetingMoves += nMove;}
     sal_Int32 GetGreetingMoves() const { return m_nGreetingMoves;}
 
-    void SetMergeDone(  )
-        { m_bMergeDone = true; }
-
     // new source document - reset some flags
     void DocumentReloaded();
 
@@ -240,9 +233,6 @@ public:
     SwDocMergeInfo& GetDocumentMergeInfo(sal_uInt32 nDocument);
     sal_uInt32 GetMergedDocumentCount();
 
-    void SetPrintRange( sal_uInt16 nStartDocument, sal_uInt16 nEndDocument)
-        { m_nStartPrint = nStartDocument; m_nEndPrint = nEndDocument; }
-
     const OUString&  GetSelectedPrinter() const
         { return m_sSelectedPrinter; }
     void SetSelectedPrinter(const OUString& rSet)
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 6bf68a3b9605..36df87eac29d 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -72,7 +72,7 @@ SwInputWindow::SwInputWindow(vcl::Window* pParent, SfxDispatcher* pDispatcher)
     , m_bCallUndo(false)
 {
     bFirst = true;
-    bActive = bIsTable = bDelSel = false;
+    bIsTable = bDelSel = false;
 
     aEdit->SetSizePixel(aEdit->CalcMinimumSize());
     aPos->SetSizePixel(aPos->LogicToPixel(Size(45, 11), MapMode(MapUnit::MapAppFont)));


More information about the Libreoffice-commits mailing list