From 92e00493aed5a9d82d306bbd9a9e76276d1abcea Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Sat, 8 Nov 2014 20:57:45 +0100 Subject: const Change-Id: Ie2f4c5059a4160287690cf7a4e99472d9a575102 --- sw/source/core/doc/docchart.cxx | 4 ++-- sw/source/core/doc/docedt.cxx | 2 +- sw/source/core/doc/docsort.cxx | 2 +- sw/source/core/doc/textboxhelper.cxx | 2 +- sw/source/core/docnode/node.cxx | 2 +- sw/source/core/draw/dcontact.cxx | 2 +- sw/source/core/layout/frmtool.cxx | 4 ++-- sw/source/core/unocore/unochart.cxx | 2 +- sw/source/core/unocore/unostyle.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 2 +- sw/source/core/unocore/unotext.cxx | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 196fda16d6b7..1b48a928c886 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -95,7 +95,7 @@ void SwDoc::DoUpdateAllCharts() { SwTable* pTmpTbl; const SwTableNode* pTblNd; - SwFrmFmt* pFmt = rTblFmts[ n ]; + const SwFrmFmt* pFmt = rTblFmts[ n ]; if( 0 != ( pTmpTbl = SwTable::FindTable( pFmt ) ) && 0 != ( pTblNd = pTmpTbl->GetTableNode() ) && @@ -149,7 +149,7 @@ void SwDoc::SetTableName( SwFrmFmt& rTblFmt, const OUString &rNewName ) bool bNameFound = rNewName.isEmpty(); if( !bNameFound ) { - SwFrmFmt* pFmt; + const SwFrmFmt* pFmt; const SwFrmFmts& rTbl = *GetTblFrmFmts(); for( sal_uInt16 i = rTbl.size(); i; ) if( !( pFmt = rTbl[ --i ] )->IsDefault() && diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 456740a84c78..50e8e2f9f6b5 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -88,7 +88,7 @@ void _SaveFlyInRange( const SwNodeRange& rRg, _SaveFlyArr& rArr ) SwFrmFmts& rFmts = *rRg.aStart.GetNode().GetDoc()->GetSpzFrmFmts(); for( sal_uInt16 n = 0; n < rFmts.size(); ++n ) { - SwFrmFmt *const pFmt = static_cast(rFmts[n]); + SwFrmFmt *const pFmt = rFmts[n]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); if (pAPos && diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index a335a290c2d4..6475c34b7452 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -298,7 +298,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) // Set index to the Selection's start for ( sal_uInt16 n = 0; n < GetSpzFrmFmts()->size(); ++n ) { - SwFrmFmt *const pFmt = static_cast((*GetSpzFrmFmts())[n]); + const SwFrmFmt *const pFmt = (*GetSpzFrmFmts())[n]; SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index e106ddbf59ae..e48160f7363d 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -527,7 +527,7 @@ void SwTextBoxHelper::saveLinks(const SwFrmFmts& rFormats, std::mapWhich() != RES_DRAWFRMFMT) continue; if (SwFrmFmt* pTextBox = findTextBox(pFmt)) diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index ee5a6214dcc3..ee2c7be0dde0 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -515,7 +515,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay, for( n = 0; n < rFmts.size(); ++n ) { - SwFrmFmt* pFrmFmt = rFmts[ n ]; + const SwFrmFmt* pFrmFmt = rFmts[ n ]; const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); if( rCntnt.GetCntntIdx() && &rCntnt.GetCntntIdx()->GetNode() == (SwNode*)pSttNd ) diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index fc85ef5221aa..aa99a18b0242 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -636,7 +636,7 @@ void SwDrawContact::GetTextObjectsFromFmt( std::list& rTextObjects, { for( sal_Int32 n=0; n<(sal_Int32)pDoc->GetSpzFrmFmts()->size(); n++ ) { - SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n]; + const SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n]; if( pFly->IsA( TYPE(SwDrawFrmFmt) ) ) { SwDrawContact* pContact = SwIterator::FirstElement(*pFly); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index a2cda52ee635..8d92e4fa594f 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1074,7 +1074,7 @@ void AppendObjs( const SwFrmFmts *pTbl, sal_uLong nIndex, } } -static bool lcl_ObjConnected( SwFrmFmt *pFmt, const SwFrm* pSib ) +static bool lcl_ObjConnected( const SwFrmFmt *pFmt, const SwFrm* pSib ) { if ( RES_FLYFRMFMT == pFmt->Which() ) { @@ -1101,7 +1101,7 @@ static bool lcl_ObjConnected( SwFrmFmt *pFmt, const SwFrm* pSib ) OD 23.06.2003 #108784# */ -static bool lcl_InHeaderOrFooter( SwFrmFmt& _rFmt ) +static bool lcl_InHeaderOrFooter( const SwFrmFmt& _rFmt ) { bool bRetVal = false; diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 24347981b2e5..cec7d220a206 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -123,7 +123,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock ) { SwTable* pTmpTbl; const SwTableNode* pTblNd; - SwFrmFmt* pFmt = rTblFmts[ n ]; + const SwFrmFmt* pFmt = rTblFmts[ n ]; if( 0 != ( pTmpTbl = SwTable::FindTable( pFmt ) ) && 0 != ( pTblNd = pTmpTbl->GetTableNode() ) && diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 710150628680..cb9417c2575c 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -512,7 +512,7 @@ static sal_Int32 lcl_GetCountOrName(const SwDoc &rDoc, const size_t nArrLen = rDoc.GetFrmFmts()->size(); for( size_t i = 0; i < nArrLen; ++i ) { - SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ]; + const SwFrmFmt* pFmt = (*rDoc.GetFrmFmts())[ i ]; if(pFmt->IsDefault() || pFmt->IsAuto()) continue; if ( IsPoolUserFmt ( pFmt->GetPoolFmtId() ) ) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 73ac3eef3619..87f0b63ce1a6 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -3626,7 +3626,7 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException, if(pFmt) { const OUString aOldName( pFmt->GetName() ); - SwFrmFmt* pTmpFmt; + const SwFrmFmt* pTmpFmt; const SwFrmFmts* pTbl = pFmt->GetDoc()->GetTblFrmFmts(); for( size_t i = pTbl->size(); i; ) if( !( pTmpFmt = (*pTbl)[ --i ] )->IsDefault() && diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index f0c5f4447040..ae73060fd560 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1665,7 +1665,7 @@ SwXText::convertToTextFrame( std::set aAnchoredFrames; for (size_t i = 0; i < m_pImpl->m_pDoc->GetSpzFrmFmts()->size(); ++i) { - SwFrmFmt* pFrmFmt = (*m_pImpl->m_pDoc->GetSpzFrmFmts())[i]; + const SwFrmFmt* pFrmFmt = (*m_pImpl->m_pDoc->GetSpzFrmFmts())[i]; const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); if (FLY_AT_PARA == rAnchor.GetAnchorId() && aStartPam.Start()->nNode.GetIndex() <= rAnchor.GetCntntAnchor()->nNode.GetIndex() && -- cgit v1.2.3