summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMaxime de Roucy <mderoucy@linagora.com>2013-02-08 14:54:36 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-02-11 02:46:04 +0000
commit7841fd1536e018defaf9cbeb283cb82b687f95e1 (patch)
tree3e38f706dd12557a7d5201b20e124750f9ed1d56 /sw
parentComment translation german - english (diff)
downloadcore-7841fd1536e018defaf9cbeb283cb82b687f95e1.tar.gz
core-7841fd1536e018defaf9cbeb283cb82b687f95e1.zip
use static/reinterpret_cast and minor rewrite
Change-Id: I9d2f21394c03e29d573dc197da90a91c96d55409 Reviewed-on: https://gerrit.libreoffice.org/2047 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docnum.cxx7
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 25d043bf5c73..b4078c84a489 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1357,11 +1357,14 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
pTNd->ResetAttr( RES_PARATR_LIST_ISCOUNTED );
if( RES_CONDTXTFMTCOLL == pTNd->GetFmtColl()->Which() )
+ {
pTNd->ChkCondColl();
-
+ }
else if( !pOutlNd &&
- ((SwTxtFmtColl*)pTNd->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle() )//<-end,zhaojianwei
+ static_cast<SwTxtFmtColl*>(pTNd->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle() )//<-end,zhaojianwei
+ {
pOutlNd = pTNd;
+ }
}
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 703e63294ec9..4881fb54129f 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -2348,9 +2348,7 @@ SwNumRule* SwTxtNode::_GetNumRule(sal_Bool bInParent) const
SwNumRule* SwTxtNode::GetNumRule(sal_Bool bInParent) const
{
- SwNumRule * pRet = _GetNumRule(bInParent);
-
- return pRet;
+ return _GetNumRule(bInParent);
}
void SwTxtNode::NumRuleChgd()
@@ -4845,9 +4843,7 @@ sal_uInt32 SwTxtNode::GetRsid( xub_StrLen nStt, xub_StrLen nEnd ) const
sal_uInt32 SwTxtNode::GetParRsid() const
{
- SvxRsidItem &rItem = ( SvxRsidItem& ) GetAttr( RES_PARATR_RSID );
-
- return rItem.GetValue();
+ return reinterpret_cast<const SvxRsidItem&>(GetAttr( RES_PARATR_RSID )).GetValue();
}
bool SwTxtNode::CompareParRsid( const SwTxtNode &rTxtNode ) const
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 761a68a16a6f..c4f260ee2333 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3827,10 +3827,10 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
SvxLRSpaceItem aLR( RES_LR_SPACE );
const SfxPoolItem* pLR = GetFmtAttr(RES_LR_SPACE);
if( pLR )
- aLR = *(const SvxLRSpaceItem*)pLR;
+ aLR = *static_cast<const SvxLRSpaceItem*>(pLR);
// Fix the regression issue: #i99822#: Discussion?
- // Since the list lever formatting doesn't apply into paragraph style
+ // Since the list level formatting doesn't apply into paragraph style
// for list levels of mode LABEL_ALIGNMENT.(see ww8par3.cxx
// W8ImplReader::RegisterNumFmtOnTxtNode).
// Need to apply the list format to the paragraph here.