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

Noel Grandin noel at peralex.com
Mon Jun 27 05:24:02 UTC 2016


 sw/inc/dbmgr.hxx                      |    2 --
 sw/inc/doc.hxx                        |    2 --
 sw/inc/fmtclds.hxx                    |    4 ----
 sw/inc/ndarr.hxx                      |    1 -
 sw/inc/redline.hxx                    |    3 +--
 sw/inc/tox.hxx                        |    1 -
 sw/source/core/access/accdoc.cxx      |    7 +------
 sw/source/core/doc/docnew.cxx         |    1 -
 sw/source/core/doc/docredln.cxx       |    8 ++++----
 sw/source/core/docnode/nodes.cxx      |    2 +-
 sw/source/core/layout/atrfrm.cxx      |   10 +++-------
 sw/source/core/layout/colfrm.cxx      |    4 ++--
 sw/source/core/tox/tox.cxx            |    2 --
 sw/source/uibase/dbui/dbmgr.cxx       |    4 ++--
 sw/source/uibase/uno/unomailmerge.cxx |    1 -
 15 files changed, 14 insertions(+), 38 deletions(-)

New commits:
commit 82644f5952fa8780ffd590d23b194bf1866ed099
Author: Noel Grandin <noel at peralex.com>
Date:   Sun Jun 26 15:25:14 2016 +0200

    loplugin:singlevalfields in sw(part4)
    
    Change-Id: I73d94ae89edb2e6f37cfa087a0d85b5a90df4a8a
    Reviewed-on: https://gerrit.libreoffice.org/26679
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 81f32d3..113f33d 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -193,7 +193,6 @@ struct SwMergeDescriptor
      * @defgroup print Mail merge to Printer
      * @addtogroup print
      * @{ */
-    bool                                                bPrintAsync;
     css::uno::Sequence<  css::beans::PropertyValue >    aPrintOptions;
     /** @} */
 
@@ -208,7 +207,6 @@ struct SwMergeDescriptor
         bCreateSingleFile( false ),
         bSendAsHTML( true ),
         bSendAsAttachment( false ),
-        bPrintAsync( false ),
         pMailMergeConfigItem( nullptr )
     {
         if( nType == DBMGR_MERGE_SHELL )
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 1fb0514..edf54f9 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -446,7 +446,6 @@ private:
     SwFormat *MakeTextFormatColl_(const OUString &, SwFormat *, bool, bool );
 
 private:
-    bool mbReadOnly;
     OUString msDocAccTitle;
 
     void InitTOXTypes();
@@ -589,7 +588,6 @@ public:
 
     //End of Interfaces
 
-    bool getDocReadOnly() const { return mbReadOnly; }
     void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; }
     const OUString& getDocAccTitle() const { return msDocAccTitle; }
 
diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 89327b5..9f6a289 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -34,8 +34,6 @@ class SwColumn
     sal_uInt16 m_nWish;   /**< Desired width, borders included.
                          It is inversely proportional to the ratio of
                          desired width environment / current width column. */
-    sal_uInt16 m_nUpper;  ///< Top border.
-    sal_uInt16 m_nLower;  ///< Bottom border.
     sal_uInt16 m_nLeft;   ///< Left border.
     sal_uInt16 m_nRight;  ///< Right border.
 
@@ -49,8 +47,6 @@ public:
     void SetRight( sal_uInt16  nNew ) { m_nRight = nNew; }
 
     sal_uInt16 GetWishWidth() const { return m_nWish;  }
-    sal_uInt16 GetUpper() const { return m_nUpper; }
-    sal_uInt16 GetLower() const { return m_nLower; }
     sal_uInt16 GetLeft () const { return m_nLeft; }
     sal_uInt16 GetRight() const { return m_nRight; }
 
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index abbf27e..0d766ce 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -111,7 +111,6 @@ class SW_DLLPUBLIC SwNodes
     bool m_bInNodesDel : 1;           /**< In Case of recursive calling.
                                            Do not update Num/Outline. */
     bool m_bInDelUpdOutline : 1;         ///< Flag for updating of Outline.
-    bool m_bInDelUpdNum : 1;          ///< Flag for updating of Outline.
 
     // Actions on the nodes.
     static void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd );
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 1033a56..0adc5c9 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -184,7 +184,6 @@ class SW_DLLPUBLIC SwRangeRedline : public SwPaM
     SwRedlineData* pRedlineData;
     SwNodeIndex* pContentSect;
     bool bDelLastPara : 1;
-    bool bIsLastParaDelete : 1;
     bool bIsVisible : 1;
 
     void MoveToSection();
@@ -200,7 +199,7 @@ public:
     SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos,
                bool bDelLP) :
         SwPaM( rPos ), pRedlineData( pData ), pContentSect( nullptr ),
-        bDelLastPara( bDelLP ), bIsLastParaDelete( false ), bIsVisible( true )
+        bDelLastPara( bDelLP ), bIsVisible( true )
     {}
     SwRangeRedline( const SwRangeRedline& );
     virtual ~SwRangeRedline();
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 569cd06..91d19be 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -282,7 +282,6 @@ class SW_DLLPUBLIC SwForm
     TOXTypes    m_eType;
     sal_uInt16      m_nFormMaxLevel;
 
-    bool    m_bGenerateTabPos : 1;
     bool    m_bIsRelTabPos : 1;
     bool    m_bCommaSeparated : 1;
 
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index bed5158..f24ece4 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -220,15 +220,10 @@ OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleName()
                 sFileName = pDocSh->GetTitle( SFX_TITLE_APINAME );
             }
         }
-        OUString sReadOnly;
-        if(pDoc->getDocReadOnly())
-        {
-            sReadOnly = GetResource( STR_ACCESS_DOC_WORDPROCESSING_READONLY );
-        }
 
         if ( !sFileName.isEmpty() )
         {
-            sAccName = sFileName + sReadOnly + " - " + sAccName;
+            sAccName = sFileName + " - " + sAccName;
         }
     }
 
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 68734cf..0e34dd0 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -280,7 +280,6 @@ SwDoc::SwDoc()
 #endif
     mbContainsAtPageObjWithContentAnchor(false), //#i119292#, fdo#37024
 
-    mbReadOnly(false),
     meDocType(DOCTYPE_NATIVE)
 {
     //UUUU The DrawingLayer ItemPool which is used as 2nd pool for Writer documents' pool
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 39ecb4c..da3b773 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -848,7 +848,7 @@ SwRangeRedline::SwRangeRedline(RedlineType_t eTyp, const SwPaM& rPam )
     pRedlineData( new SwRedlineData( eTyp, GetDoc()->getIDocumentRedlineAccess().GetRedlineAuthor() ) ),
     pContentSect( nullptr )
 {
-    bDelLastPara = bIsLastParaDelete = false;
+    bDelLastPara = false;
     bIsVisible = true;
     if( !rPam.HasMark() )
         DeleteMark();
@@ -859,7 +859,7 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPaM& rPam )
     pRedlineData( new SwRedlineData( rData )),
     pContentSect( nullptr )
 {
-    bDelLastPara = bIsLastParaDelete = false;
+    bDelLastPara = false;
     bIsVisible = true;
     if( !rPam.HasMark() )
         DeleteMark();
@@ -870,7 +870,7 @@ SwRangeRedline::SwRangeRedline( const SwRedlineData& rData, const SwPosition& rP
     pRedlineData( new SwRedlineData( rData )),
     pContentSect( nullptr )
 {
-    bDelLastPara = bIsLastParaDelete = false;
+    bDelLastPara = false;
     bIsVisible = true;
 }
 
@@ -879,7 +879,7 @@ SwRangeRedline::SwRangeRedline( const SwRangeRedline& rCpy )
     pRedlineData( new SwRedlineData( *rCpy.pRedlineData )),
     pContentSect( nullptr )
 {
-    bDelLastPara = bIsLastParaDelete = false;
+    bDelLastPara = false;
     bIsVisible = true;
     if( !rCpy.HasMark() )
         DeleteMark();
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 9863205..7927af3 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -61,7 +61,7 @@ sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange );
 SwNodes::SwNodes( SwDoc* pDocument )
     : m_vIndices(nullptr), m_pMyDoc( pDocument )
 {
-    m_bInNodesDel = m_bInDelUpdOutline = m_bInDelUpdNum = false;
+    m_bInNodesDel = m_bInDelUpdOutline = false;
 
     OSL_ENSURE( m_pMyDoc, "in which Doc am I?" );
 
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 9d73d92..7f6ee37 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -781,8 +781,6 @@ void SwFormatPageDesc::dumpAsXml(xmlTextWriterPtr pWriter) const
 
 SwColumn::SwColumn() :
     m_nWish ( 0 ),
-    m_nUpper( 0 ),
-    m_nLower( 0 ),
     m_nLeft ( 0 ),
     m_nRight( 0 )
 {
@@ -792,17 +790,15 @@ bool SwColumn::operator==( const SwColumn &rCmp ) const
 {
     return  m_nWish    == rCmp.GetWishWidth() &&
             GetLeft()  == rCmp.GetLeft() &&
-            GetRight() == rCmp.GetRight() &&
-            GetUpper() == rCmp.GetUpper() &&
-            GetLower() == rCmp.GetLower();
+            GetRight() == rCmp.GetRight();
 }
 
 void SwColumn::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
     xmlTextWriterStartElement(pWriter, BAD_CAST("swColumn"));
     xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWish"), BAD_CAST(OString::number(m_nWish).getStr()));
-    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nUpper"), BAD_CAST(OString::number(m_nUpper).getStr()));
-    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLower"), BAD_CAST(OString::number(m_nLower).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nUpper"), BAD_CAST(OString::number(0).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLower"), BAD_CAST(OString::number(0).getStr()));
     xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLeft"), BAD_CAST(OString::number(m_nLeft).getStr()));
     xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nRight"), BAD_CAST(OString::number(m_nRight).getStr()));
     xmlTextWriterEndElement(pWriter);
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index bbd5366..137bce2 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -390,8 +390,8 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribu
             if ( bAdjustAttributes )
             {
                 SvxULSpaceItem aUL( pSet->GetULSpace() );
-                aUL.SetUpper( pC->GetUpper());
-                aUL.SetLower( pC->GetLower());
+                aUL.SetUpper(0);
+                aUL.SetLower(0);
 
                 static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aLR );
                 static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aUL );
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index ee0617d..1aa5501 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -218,7 +218,6 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237#
     m_bCommaSeparated(false)
 {
     //bHasFirstTabPos =
-    m_bGenerateTabPos = false;
     m_bIsRelTabPos = true;
 
     // The table of contents has a certain number of headlines + headings
@@ -330,7 +329,6 @@ SwForm& SwForm::operator=(const SwForm& rForm)
     m_nFormMaxLevel = rForm.m_nFormMaxLevel;
 //  nFirstTabPos = rForm.nFirstTabPos;
 //  bHasFirstTabPos = rForm.bHasFirstTabPos;
-    m_bGenerateTabPos = rForm.m_bGenerateTabPos;
     m_bIsRelTabPos = rForm.m_bIsRelTabPos;
     m_bCommaSeparated = rForm.m_bCommaSeparated;
     for(sal_uInt16 i=0; i < m_nFormMaxLevel; ++i)
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index ec5c0f8..9f1caba 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1438,7 +1438,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                     uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions );
                     lcl_PreparePrinterOptions( rMergeDescriptor.aPrintOptions, false, aOptions );
 
-                    pWorkView->StartPrint( aOptions, bIsMergeSilent, rMergeDescriptor.bPrintAsync );
+                    pWorkView->StartPrint( aOptions, bIsMergeSilent, false/*bPrintAsync*/ );
                     // some GetPrinter functions have a true default, so keep the false
                     SfxPrinter* pDocPrt = pWorkView->GetPrinter();
                     JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : SfxViewShell::GetJobSetup();
@@ -1577,7 +1577,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             // print the target document
             uno::Sequence< beans::PropertyValue > aOptions( rMergeDescriptor.aPrintOptions );
             lcl_PreparePrinterOptions( rMergeDescriptor.aPrintOptions, true, aOptions );
-            pTargetView->ExecPrint( aOptions, bIsMergeSilent, rMergeDescriptor.bPrintAsync );
+            pTargetView->ExecPrint( aOptions, bIsMergeSilent, false/*bPrintAsync*/ );
         }
 
         if( IsMergeOk() && bMT_SHELL )
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 3c335f6..938a907 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -694,7 +694,6 @@ uno::Any SAL_CALL SwXMailMerge::execute(
             rIDDA.setPrintData( aPrtData );
             // #i25686# printing should not be done asynchronously to prevent dangling offices
             // when mail merge is called as command line macro
-            aMergeDesc.bPrintAsync = false;
             aMergeDesc.aPrintOptions = m_aPrintSettings;
             aMergeDesc.bCreateSingleFile = false;
         }


More information about the Libreoffice-commits mailing list