Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2047

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/47/2047/1

use static/reinterpret_cast and minor rewrite

Change-Id: I9d2f21394c03e29d573dc197da90a91c96d55409
---
M sw/source/core/doc/docnum.cxx
M sw/source/core/txtnode/ndtxt.cxx
M sw/source/filter/ww8/ww8par6.cxx
3 files changed, 9 insertions(+), 10 deletions(-)



diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 25d043b..b4078c8 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1357,11 +1357,14 @@
             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 703e632..4881fb5 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 * pRet = _GetNumRule(bInParent);
-
-    return pRet;
+    return _GetNumRule(bInParent);
 }
 
 void SwTxtNode::NumRuleChgd()
@@ -4845,9 +4843,7 @@
 
 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 761a68a..c4f260e 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3827,10 +3827,10 @@
     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.

-- 
To view, visit https://gerrit.libreoffice.org/2047
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d2f21394c03e29d573dc197da90a91c96d55409
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Maxime de Roucy <mderoucy@linagora.com>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.