diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-26 15:25:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-27 05:23:32 +0000 |
commit | 82644f5952fa8780ffd590d23b194bf1866ed099 (patch) | |
tree | d3ca730a5d7b1c92a96fb344dcb69c10f7881daa /sw | |
parent | f384ae4c81c2459f9955697ecc36412f7409b936 (diff) |
loplugin:singlevalfields in sw(part4)
Change-Id: I73d94ae89edb2e6f37cfa087a0d85b5a90df4a8a
Reviewed-on: https://gerrit.libreoffice.org/26679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/dbmgr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtclds.hxx | 4 | ||||
-rw-r--r-- | sw/inc/ndarr.hxx | 1 | ||||
-rw-r--r-- | sw/inc/redline.hxx | 3 | ||||
-rw-r--r-- | sw/inc/tox.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/access/accdoc.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/layout/colfrm.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/tox/tox.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 1 |
15 files changed, 14 insertions, 38 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 81f32d375837..113f33d45010 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 1fb05146d97a..edf54f94f003 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 89327b553d67..9f6a28903ad1 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 abbf27e53a7b..0d766ce3b175 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 1033a5668207..0adc5c9e8cb5 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 569cd0684b41..91d19beb7b58 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 bed5158177c9..f24ece41ec0b 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 68734cff5298..0e34dd0679ce 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 39ecb4cf32cc..da3b7733cbf7 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 9863205d253b..7927af3502a8 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 9d73d92c83e8..7f6ee37014fd 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 bbd5366bb607..137bce269ba5 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 ee0617d95114..1aa5501e68cf 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 ec5c0f83fd4b..9f1caba09acf 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 3c335f6ea779..938a907d6a25 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; } |