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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 3 08:34:18 UTC 2019


 sw/source/core/inc/UndoTable.hxx |   18 ++++++------
 sw/source/core/undo/untbl.cxx    |   58 +++++++++++++++++++--------------------
 2 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 2c2edfe3fe2c1ea692a6fa9488bbdab4e56dd8b9
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jun 3 09:04:44 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jun 3 10:33:23 2019 +0200

    sw: prefix members of SwUndoInsTable
    
    Change-Id: Icc21e39eeb6d7376df0ccf2b3d06c819fc70bec4
    Reviewed-on: https://gerrit.libreoffice.org/73372
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 65a62d284682..ecfa87745ef7 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -45,15 +45,15 @@ class SwTableSortBoxes;
 
 class SwUndoInsTable : public SwUndo
 {
-    OUString sTableNm;
-    SwInsertTableOptions const aInsTableOpts;
-    std::unique_ptr<SwDDEFieldType> pDDEFieldType;
-    std::unique_ptr<std::vector<sal_uInt16>> pColWidth;
-    std::unique_ptr<SwRedlineData>  pRedlData;
-    std::unique_ptr<SwTableAutoFormat> pAutoFormat;
-    sal_uLong nSttNode;
-    sal_uInt16 nRows, nCols;
-    sal_uInt16 const nAdjust;
+    OUString m_sTableName;
+    SwInsertTableOptions const m_aInsTableOptions;
+    std::unique_ptr<SwDDEFieldType> m_pDDEFieldType;
+    std::unique_ptr<std::vector<sal_uInt16>> m_pColumnWidth;
+    std::unique_ptr<SwRedlineData>  m_pRedlineData;
+    std::unique_ptr<SwTableAutoFormat> m_pAutoFormat;
+    sal_uLong m_nStartNode;
+    sal_uInt16 m_nRows, m_nColumns;
+    sal_uInt16 const m_nAdjust;
 
 public:
     SwUndoInsTable( const SwPosition&, sal_uInt16 nCols, sal_uInt16 nRows,
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 026aa6f8dea4..4ad7ccc0cf95 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -221,39 +221,39 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt
                             const std::vector<sal_uInt16> *pColArr,
                             const OUString & rName)
     : SwUndo( SwUndoId::INSTABLE, rPos.GetDoc() ),
-    aInsTableOpts( rInsTableOpts ),
-    nSttNode( rPos.nNode.GetIndex() ), nRows( nRw ), nCols( nCl ), nAdjust( nAdj )
+    m_aInsTableOptions( rInsTableOpts ),
+    m_nStartNode( rPos.nNode.GetIndex() ), m_nRows( nRw ), m_nColumns( nCl ), m_nAdjust( nAdj )
 {
     if( pColArr )
     {
-        pColWidth.reset( new std::vector<sal_uInt16>(*pColArr) );
+        m_pColumnWidth.reset( new std::vector<sal_uInt16>(*pColArr) );
     }
     if( pTAFormat )
-        pAutoFormat.reset( new SwTableAutoFormat( *pTAFormat ) );
+        m_pAutoFormat.reset( new SwTableAutoFormat( *pTAFormat ) );
 
     // consider redline
     SwDoc& rDoc = *rPos.nNode.GetNode().GetDoc();
     if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() )
     {
-        pRedlData.reset( new SwRedlineData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
+        m_pRedlineData.reset( new SwRedlineData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) );
         SetRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() );
     }
 
-    sTableNm = rName;
+    m_sTableName = rName;
 }
 
 SwUndoInsTable::~SwUndoInsTable()
 {
-    pDDEFieldType.reset();
-    pColWidth.reset();
-    pRedlData.reset();
-    pAutoFormat.reset();
+    m_pDDEFieldType.reset();
+    m_pColumnWidth.reset();
+    m_pRedlineData.reset();
+    m_pAutoFormat.reset();
 }
 
 void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
 {
     SwDoc & rDoc = rContext.GetDoc();
-    SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode );
+    SwNodeIndex aIdx( rDoc.GetNodes(), m_nStartNode );
 
     SwTableNode* pTableNd = aIdx.GetNode().GetTableNode();
     OSL_ENSURE( pTableNd, "no TableNode" );
@@ -261,7 +261,7 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
 
     if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
         rDoc.getIDocumentRedlineAccess().DeleteRedline( *pTableNd, true, RedlineType::Any );
-    RemoveIdxFromSection( rDoc, nSttNode );
+    RemoveIdxFromSection( rDoc, m_nStartNode );
 
     // move hard page breaks into next node
     SwContentNode* pNextNd = rDoc.GetNodes()[ pTableNd->EndOfSectionIndex()+1 ]->GetContentNode();
@@ -279,9 +279,9 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
             pNextNd->SetAttr( *pItem );
     }
 
-    sTableNm = pTableNd->GetTable().GetFrameFormat()->GetName();
+    m_sTableName = pTableNd->GetTable().GetFrameFormat()->GetName();
     if( auto pDDETable = dynamic_cast<const SwDDETable *>(&pTableNd->GetTable()) )
-        pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
+        m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
 
     rDoc.GetNodes().Delete( aIdx, pTableNd->EndOfSectionIndex() -
                                 aIdx.GetIndex() + 1 );
@@ -296,24 +296,24 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext)
 {
     SwDoc & rDoc = rContext.GetDoc();
 
-    SwPosition const aPos(SwNodeIndex(rDoc.GetNodes(), nSttNode));
-    const SwTable* pTable = rDoc.InsertTable( aInsTableOpts, aPos, nRows, nCols,
-                                            nAdjust,
-                                            pAutoFormat.get(), pColWidth.get() );
+    SwPosition const aPos(SwNodeIndex(rDoc.GetNodes(), m_nStartNode));
+    const SwTable* pTable = rDoc.InsertTable( m_aInsTableOptions, aPos, m_nRows, m_nColumns,
+                                            m_nAdjust,
+                                            m_pAutoFormat.get(), m_pColumnWidth.get() );
     rDoc.GetEditShell()->MoveTable( GotoPrevTable, fnTableStart );
-    static_cast<SwFrameFormat*>(pTable->GetFrameFormat())->SetName( sTableNm );
-    SwTableNode* pTableNode = rDoc.GetNodes()[nSttNode]->GetTableNode();
+    static_cast<SwFrameFormat*>(pTable->GetFrameFormat())->SetName( m_sTableName );
+    SwTableNode* pTableNode = rDoc.GetNodes()[m_nStartNode]->GetTableNode();
 
-    if( pDDEFieldType )
+    if( m_pDDEFieldType )
     {
         SwDDEFieldType* pNewType = static_cast<SwDDEFieldType*>(rDoc.getIDocumentFieldsAccess().InsertFieldType(
-                                                            *pDDEFieldType));
+                                                            *m_pDDEFieldType));
         std::unique_ptr<SwDDETable> pDDETable(new SwDDETable( pTableNode->GetTable(), pNewType ));
         pTableNode->SetNewTable( std::move(pDDETable) );
-        pDDEFieldType.reset();
+        m_pDDEFieldType.reset();
     }
 
-    if( (pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) ||
+    if( (m_pRedlineData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) ||
         ( !( RedlineFlags::Ignore & GetRedlineFlags() ) &&
             !rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ))
     {
@@ -322,12 +322,12 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext)
         if( pCNd )
             aPam.GetMark()->nContent.Assign( pCNd, 0 );
 
-        if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) )
+        if( m_pRedlineData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) )
         {
             RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags();
             rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern(eOld & ~RedlineFlags::Ignore);
 
-            rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *pRedlData, aPam ), true);
+            rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *m_pRedlineData, aPam ), true);
             rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
         }
         else
@@ -338,8 +338,8 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext)
 void SwUndoInsTable::RepeatImpl(::sw::RepeatContext & rContext)
 {
     rContext.GetDoc().InsertTable(
-            aInsTableOpts, *rContext.GetRepeatPaM().GetPoint(),
-            nRows, nCols, nAdjust, pAutoFormat.get(), pColWidth.get() );
+            m_aInsTableOptions, *rContext.GetRepeatPaM().GetPoint(),
+            m_nRows, m_nColumns, m_nAdjust, m_pAutoFormat.get(), m_pColumnWidth.get() );
 }
 
 SwRewriter SwUndoInsTable::GetRewriter() const
@@ -347,7 +347,7 @@ SwRewriter SwUndoInsTable::GetRewriter() const
     SwRewriter aRewriter;
 
     aRewriter.AddRule(UndoArg1, SwResId(STR_START_QUOTE));
-    aRewriter.AddRule(UndoArg2, sTableNm);
+    aRewriter.AddRule(UndoArg2, m_sTableName);
     aRewriter.AddRule(UndoArg3, SwResId(STR_END_QUOTE));
 
     return aRewriter;


More information about the Libreoffice-commits mailing list