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

Jan Holesovsky kendy at collabora.com
Tue May 12 04:03:15 PDT 2015


 sw/source/core/doc/doc.cxx             |    4 ++--
 sw/source/core/docnode/nodes.cxx       |   10 +++++-----
 sw/source/core/fields/fldbas.cxx       |    6 +++---
 sw/source/core/layout/trvlfrm.cxx      |   12 ++++++------
 sw/source/core/table/swtable.cxx       |    4 ++--
 sw/source/core/undo/SwUndoPageDesc.cxx |   20 ++++++++++----------
 sw/source/core/unocore/unotbl.cxx      |    4 ++--
 7 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 54c38ff4780355720f2f6065d7bd542f288a5ec8
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Tue May 12 12:40:39 2015 +0200

    sw: Rename some variables.
    
    Change-Id: I6cf30f74b8e6f32afed83fec1325ddf4d1f00ced

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 5eba073..e90448e 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1539,8 +1539,8 @@ bool SwDoc::ConvertFieldsToText()
                     aInsertPam.SetMark();
 
                     // go to the end of the field
-                    const SwTxtFld *pTxtField = sw::DocumentFieldsManager::GetTxtFldAtPos( *aInsertPam.End() );
-                    if (pTxtField && pTxtField->Which() == RES_TXTATR_INPUTFIELD)
+                    const SwTxtFld *pFieldAtEnd = sw::DocumentFieldsManager::GetTxtFldAtPos(*aInsertPam.End());
+                    if (pFieldAtEnd && pFieldAtEnd->Which() == RES_TXTATR_INPUTFIELD)
                     {
                         SwPosition &rEndPos = *aInsertPam.GetPoint();
                         rEndPos.nContent = SwCrsrShell::EndOfInputFldAtPos( *aInsertPam.End() );
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index dd47eab..807100a 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2118,13 +2118,13 @@ SwNode* SwNodes::FindPrvNxtFrmNode( SwNodeIndex& rFrmIdx,
                     // Undo when merging a table with one before, if there is also one after it.
                     // However, if the node is in a table, it needs to be returned if the
                     // SttNode is a section or a table!
-                    SwTableNode* pTblNd;
-                    if( pSttNd->IsTableNode() &&
-                        0 != ( pTblNd = pFrmNd->FindTableNode() ) &&
+                    SwTableNode* pTableNode;
+                    if (pSttNd->IsTableNode() &&
+                        0 != (pTableNode = pFrmNd->FindTableNode()) &&
                         // TABLE IN TABLE:
-                        pTblNd != pSttNd->StartOfSectionNode()->FindTableNode() )
+                        pTableNode != pSttNd->StartOfSectionNode()->FindTableNode())
                     {
-                        pFrmNd = pTblNd;
+                        pFrmNd = pTableNode;
                         rFrmIdx = *pFrmNd;
                     }
                     else
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index f2d34ad..3024f9c 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -617,10 +617,10 @@ sal_uInt32 SwValueField::GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt
 
             OUString sFmt(pEntry->GetFormatstring());
 
-            sal_uInt32 nFormat = nFmt;
+            sal_uInt32 nTempFormat = nFmt;
             pFormatter->PutandConvertEntry(sFmt, nDummy, nType,
-                                           nFormat, pEntry->GetLanguage(), nLng);
-            nFmt = nFormat;
+                                           nTempFormat, pEntry->GetLanguage(), nLng);
+            nFmt = nTempFormat;
         }
         else
             nFmt = nNewFormat;
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 076f215..4e37665 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -231,12 +231,12 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
             }
         }
 
-        SwCntntNode* pTextNd = aTextPos.nNode.GetNode( ).GetCntntNode( );
+        SwCntntNode* pContentNode = aTextPos.nNode.GetNode().GetCntntNode();
         bool bConsiderBackground = true;
         // If the text position is a clickable field, then that should have priority.
-        if (pTextNd && pTextNd->IsTxtNode())
+        if (pContentNode && pContentNode->IsTxtNode())
         {
-            SwTxtNode* pTxtNd = pTextNd->GetTxtNode();
+            SwTxtNode* pTxtNd = pContentNode->GetTxtNode();
             SwTxtAttr* pTxtAttr = pTxtNd->GetTxtAttrForCharAt(aTextPos.nContent.GetIndex(), RES_TXTATR_FIELD);
             if (pTxtAttr)
             {
@@ -270,9 +270,9 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
              */
             double nTextDistance = 0;
             bool bValidTextDistance = false;
-            if ( pTextNd )
+            if (pContentNode)
             {
-                SwCntntFrm* pTextFrm = pTextNd->getLayoutFrm( getRootFrm( ) );
+                SwCntntFrm* pTextFrm = pContentNode->getLayoutFrm( getRootFrm( ) );
 
                 // try this again but prefer the "previous" position
                 SwCrsrMoveState aMoveState;
@@ -285,7 +285,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
                 SwRect aTextRect;
                 pTextFrm->GetCharRect(aTextRect, prevTextPos);
 
-                if (prevTextPos.nContent < pTextNd->Len())
+                if (prevTextPos.nContent < pContentNode->Len())
                 {
                     // aRextRect is just a line on the left edge of the
                     // previous character; to get a better measure from
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 48de8ac..fa0ffd8 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1904,8 +1904,8 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
     {
         case RES_AUTOFMT_DOCNODE:
         {
-            const SwTableNode* pTblNode = GetTableNode();
-            if( pTblNode && &pTblNode->GetNodes() == static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes )
+            const SwTableNode* pNode = GetTableNode();
+            if (pNode && &pNode->GetNodes() == static_cast<SwAutoFmtGetDocNode&>(rInfo).pNodes)
             {
                 if (!m_TabSortContentBoxes.empty())
                 {
diff --git a/sw/source/core/undo/SwUndoPageDesc.cxx b/sw/source/core/undo/SwUndoPageDesc.cxx
index e5aec0a..b304dfc 100644
--- a/sw/source/core/undo/SwUndoPageDesc.cxx
+++ b/sw/source/core/undo/SwUndoPageDesc.cxx
@@ -146,18 +146,18 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
         {
             SwFrmFmt* pFormat = new SwFrmFmt( *rNewHead.GetHeaderFmt() );
             // The Ctor of this object will remove the duplicate!
-            SwFmtHeader aFmtHeader( pFormat );
-            if( !rNewDesc.IsHeaderShared() )
+            SwFmtHeader aFormatHeader(pFormat);
+            if (!rNewDesc.IsHeaderShared())
             {
                 pFormat = new SwFrmFmt( *rNewDesc.GetLeft().GetHeader().GetHeaderFmt() );
                 // The Ctor of this object will remove the duplicate!
-                SwFmtHeader aFormatHeader( pFormat );
+                SwFmtHeader aLeftHeader(pFormat);
             }
-            if( !rNewDesc.IsFirstShared() )
+            if (!rNewDesc.IsFirstShared())
             {
                 pFormat = new SwFrmFmt( *rNewDesc.GetFirstMaster().GetHeader().GetHeaderFmt() );
                 // The Ctor of this object will remove the duplicate!
-                SwFmtHeader aFormatHeader( pFormat );
+                SwFmtHeader aFirstHeader(pFormat);
             }
         }
         // Same procedure for footers...
@@ -165,18 +165,18 @@ SwUndoPageDesc::SwUndoPageDesc(const SwPageDesc & _aOld,
         {
             SwFrmFmt* pFormat = new SwFrmFmt( *rNewFoot.GetFooterFmt() );
             // The Ctor of this object will remove the duplicate!
-            SwFmtFooter aFmtFooter( pFormat );
-            if( !rNewDesc.IsFooterShared() )
+            SwFmtFooter aFormatFooter(pFormat);
+            if (!rNewDesc.IsFooterShared())
             {
                 pFormat = new SwFrmFmt( *rNewDesc.GetLeft().GetFooter().GetFooterFmt() );
                 // The Ctor of this object will remove the duplicate!
-                SwFmtFooter aFormatFooter( pFormat );
+                SwFmtFooter aLeftFooter(pFormat);
             }
-            if( !rNewDesc.IsFirstShared() )
+            if (!rNewDesc.IsFirstShared())
             {
                 pFormat = new SwFrmFmt( *rNewDesc.GetFirstMaster().GetFooter().GetFooterFmt() );
                 // The Ctor of this object will remove the duplicate!
-                SwFmtFooter aFormatFooter( pFormat );
+                SwFmtFooter aFirstFooter(pFormat);
             }
         }
 
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 7c80f56..23b29bb 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1440,8 +1440,8 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor*
     for(auto pBox : rBoxes)
         rTableCrsr.InsertBox(*pBox);
     pUnoCrsr->Add(&aCrsrDepend);
-    SwUnoTableCrsr& rTblCrsr = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
-    rTblCrsr.MakeBoxSels();
+    SwUnoTableCrsr& rUnoTableCursor = dynamic_cast<SwUnoTableCrsr&>(*pUnoCrsr);
+    rUnoTableCursor.MakeBoxSels();
 }
 
 SwXTextTableCursor::~SwXTextTableCursor()


More information about the Libreoffice-commits mailing list