diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-12 14:42:09 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-12 14:42:46 +0200 |
commit | 3fde334a5ddb340b5ee6510bdb56c1732f554750 (patch) | |
tree | 8699668856afbf50e4591c2f888f48b3e71d799f | |
parent | 7f1004ba170df6e7085803c63d0839f85df70349 (diff) |
sw: More variable renaming.
Change-Id: I390b5da7c4d88de3f26c774bc525db823d1d5e96
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlctxt.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfld.cxx | 47 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 30 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 64 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 24 |
7 files changed, 86 insertions, 99 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 23b29bb5dea9..522886f00e52 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2988,10 +2988,10 @@ void SwXTextTable::setName(const OUString& rName) throw( uno::RuntimeException, if(pFmt) { const OUString aOldName( pFmt->GetName() ); - const SwFrmFmts* pTbl = pFmt->GetDoc()->GetTblFrmFmts(); - for( size_t i = pTbl->size(); i; ) + const SwFrmFmts* pFrameFormats = pFmt->GetDoc()->GetTblFrmFmts(); + for (size_t i = pFrameFormats->size(); i;) { - const SwFrmFmt* pTmpFmt = (*pTbl)[ --i ] ; + const SwFrmFmt* pTmpFmt = (*pFrameFormats)[--i]; if( !pTmpFmt->IsDefault() && pTmpFmt->GetName() == rName && pFmt->GetDoc()->IsUsed( *pTmpFmt )) diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index a6e77eea17bc..07b6a8db3b79 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -142,11 +142,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) // alle noch offenen Attribute beenden und hinter der Tabelle // neu aufspannen - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; ++pTbl ) + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) { - _HTMLAttr *pAttr = *pTbl; + _HTMLAttr *pAttr = *pHTMLAttributes; while( pAttr ) { _HTMLAttr *pNext = pAttr->GetNext(); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 53a167312009..2a29c7b454bf 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -432,11 +432,10 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) } // die Attribute der Umgebung am Draw-Objekt setzen - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; ++pTbl ) + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) { - _HTMLAttr *pAttr = *pTbl; + _HTMLAttr *pAttr = *pHTMLAttributes; if( pAttr ) PutEEPoolItem( aItemSet, pAttr->GetItem() ); } diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 9554ab84ba3b..a052f71feda3 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -285,7 +285,7 @@ void SwHTMLParser::NewField() nWhich = RES_DATETIMEFLD; SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetSysFldType( nWhich ); - SwField *pFld = 0; + SwField *pNewField = 0; bool bInsOnEndTag = false; switch( (RES_FIELDS)nType ) @@ -301,8 +301,7 @@ void SwHTMLParser::NewField() bInsOnEndTag = true; } if( pSubOption->GetEnum( nSub, aHTMLExtUsrFldSubTable ) ) - pFld = new SwExtUserField( static_cast<SwExtUserFieldType*>(pType), - nSub, nFmt ); + pNewField = new SwExtUserField(static_cast<SwExtUserFieldType*>(pType), nSub, nFmt); } break; @@ -317,7 +316,7 @@ void SwHTMLParser::NewField() bInsOnEndTag = true; } - pFld = new SwAuthorField( static_cast<SwAuthorFieldType *>(pType), nFmt ); + pNewField = new SwAuthorField(static_cast<SwAuthorFieldType*>(pType), nFmt); } break; @@ -367,11 +366,10 @@ void SwHTMLParser::NewField() nNumFmt = pFormatter->GetFormatIndex( pFmtTbl[i].eFmt, LANGUAGE_SYSTEM); - pFld = new SwDateTimeField( static_cast<SwDateTimeFieldType *>(pType), - nSub, nNumFmt ); + pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFmt); if (nSub & FIXEDFLD) - static_cast<SwDateTimeField *>(pFld)->SetDateTime( DateTime(Date(nDate), tools::Time(nTime)) ); + static_cast<SwDateTimeField *>(pNewField)->SetDateTime(DateTime(Date(nDate), tools::Time(nTime))); } break; @@ -398,10 +396,9 @@ void SwHTMLParser::NewField() if( bHasNumValue ) nSub |= FIXEDFLD; - pFld = new SwDateTimeField( static_cast<SwDateTimeFieldType *>(pType), - nSub, nNumFmt ); - if( bHasNumValue ) - static_cast<SwDateTimeField *>(pFld)->SetValue( dValue ); + pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFmt); + if (bHasNumValue) + static_cast<SwDateTimeField *>(pNewField)->SetValue(dValue); } } break; @@ -429,9 +426,9 @@ void SwHTMLParser::NewField() (SwPageNumSubType)nSub==PG_RANDOM ) nFmt = SVX_NUM_PAGEDESC; - pFld = new SwPageNumberField( static_cast<SwPageNumberFieldType *>(pType), nSub, nFmt, nOff ); - if( (SvxExtNumType)nFmt==SVX_NUM_CHAR_SPECIAL ) - static_cast<SwPageNumberField *>(pFld)->SetUserString( aValue ); + pNewField = new SwPageNumberField(static_cast<SwPageNumberFieldType*>(pType), nSub, nFmt, nOff); + if ((SvxExtNumType)nFmt == SVX_NUM_CHAR_SPECIAL) + static_cast<SwPageNumberField *>(pNewField)->SetUserString(aValue); } } break; @@ -479,10 +476,9 @@ void SwHTMLParser::NewField() bInsOnEndTag = true; } - pFld = new SwDocInfoField( static_cast<SwDocInfoFieldType *>(pType), - nSub, aName, nNumFmt ); - if( bHasNumValue ) - static_cast<SwDocInfoField*>(pFld)->SetValue( dValue ); + pNewField = new SwDocInfoField(static_cast<SwDocInfoFieldType *>(pType), nSub, aName, nNumFmt); + if (bHasNumValue) + static_cast<SwDocInfoField*>(pNewField)->SetValue(dValue); } } break; @@ -496,8 +492,7 @@ void SwHTMLParser::NewField() sal_uInt16 nFmt = SVX_NUM_ARABIC; if( pFmtOption ) pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable ); - pFld = new SwDocStatField( static_cast<SwDocStatFieldType *>(pType), - nSub, nFmt ); + pNewField = new SwDocStatField(static_cast<SwDocStatFieldType*>(pType), nSub, nFmt); bUpdateDocStat |= (DS_PAGE != nFmt); } } @@ -514,23 +509,23 @@ void SwHTMLParser::NewField() bInsOnEndTag = true; } - pFld = new SwFileNameField( static_cast<SwFileNameFieldType *>(pType), nFmt ); + pNewField = new SwFileNameField(static_cast<SwFileNameFieldType*>(pType), nFmt); } break; default: ; } - if( pFld ) + if (pNewField) { - if( bInsOnEndTag ) + if (bInsOnEndTag) { - pField = pFld; + pField = pNewField; } else { - pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pFld) ); - delete pFld; + pDoc->getIDocumentContentOperations().InsertPoolItem(*pPam, SwFmtFld(*pNewField)); + delete pNewField; } bInField = true; } diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index cc1ac7fa435a..f99a616bb9fa 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2641,9 +2641,9 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, bool bIsInFlyFrame = pContext && pContext->GetFrmFmt(); if( bIsInFlyFrame && !nWidth ) { - SvxAdjust eTblAdjust = GetTableAdjust(false); - if( eTblAdjust != SVX_ADJUST_LEFT && - eTblAdjust != SVX_ADJUST_RIGHT ) + SvxAdjust eAdjust = GetTableAdjust(false); + if (eAdjust != SVX_ADJUST_LEFT && + eAdjust != SVX_ADJUST_RIGHT) { // Wenn eine Tabelle ohne Breitenangabe nicht links oder // rechts umflossen werden soll, dann stacken wir sie @@ -3401,12 +3401,10 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents( const SwNodeIndex& rSttPara = pPam->GetPoint()->nNode; sal_Int32 nSttCnt = pPam->GetPoint()->nContent.GetIndex(); - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; ++pTbl ) + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) { - - _HTMLAttr *pAttr = *pTbl; + _HTMLAttr *pAttr = *pHTMLAttributes; while( pAttr ) { OSL_ENSURE( !pAttr->GetPrev(), "Attribut hat Previous-Liste" ); @@ -4963,10 +4961,10 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable ) class _TblSaveStruct : public SwPendingStackData { public: - HTMLTable *pCurTable; + HTMLTable *m_pCurrentTable; _TblSaveStruct( HTMLTable *pCurTbl ) : - pCurTable( pCurTbl ) + m_pCurrentTable( pCurTbl ) {} virtual ~_TblSaveStruct(); @@ -4982,9 +4980,9 @@ _TblSaveStruct::~_TblSaveStruct() void _TblSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc ) { - pCurTable->MakeTable( 0, nWidth ); + m_pCurrentTable->MakeTable(0, nWidth); - _HTMLTableContext *pTCntxt = pCurTable->GetContext(); + _HTMLTableContext *pTCntxt = m_pCurrentTable->GetContext(); OSL_ENSURE( pTCntxt, "Wo ist der Tabellen-Kontext" ); SwTableNode *pTblNd = pTCntxt->GetTableNode(); @@ -5199,7 +5197,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, SaveState( 0 ); } - HTMLTable *pCurTable = pSaveStruct->pCurTable; + HTMLTable *pCurTable = pSaveStruct->m_pCurrentTable; // </TABLE> wird laut DTD benoetigt if( !nToken ) @@ -5424,12 +5422,12 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, if( pTable == pCurTable ) { - delete pSaveStruct->pCurTable; - pSaveStruct->pCurTable = 0; + delete pSaveStruct->m_pCurrentTable; + pSaveStruct->m_pCurrentTable = 0; pTable = 0; } - HTMLTable* pRetTbl = pSaveStruct->pCurTable; + HTMLTable* pRetTbl = pSaveStruct->m_pCurrentTable; delete pSaveStruct; return pRetTbl; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 0e9e6f9a2ac6..90ac4505f5c5 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2142,11 +2142,10 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) const sal_Int32 nEndCnt = aOldPos.nContent.GetIndex(); const SwPosition& rPos = *pPam->GetPoint(); - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; ++pTbl ) + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; ++pHTMLAttributes) { - _HTMLAttr *pAttr = *pTbl; + _HTMLAttr *pAttr = *pHTMLAttributes; if( pAttr && pAttr->GetItem().Which() < RES_PARATR_BEGIN ) { bool bWholePara = false; @@ -3229,22 +3228,21 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab ) if( !aParaAttrs.empty() ) aParaAttrs.clear(); - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - _HTMLAttr** pSaveTbl = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + _HTMLAttr** pSaveAttributes = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; (++pTbl, ++pSaveTbl) ) + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; (++pHTMLAttributes, ++pSaveAttributes)) { - *pSaveTbl = *pTbl; + *pSaveAttributes = *pHTMLAttributes; - _HTMLAttr *pAttr = *pSaveTbl; - while( pAttr ) + _HTMLAttr *pAttr = *pSaveAttributes; + while (pAttr) { - pAttr->SetHead( pSaveTbl ); + pAttr->SetHead(pSaveAttributes); pAttr = pAttr->GetNext(); } - *pTbl = 0; + *pHTMLAttributes = 0; } } @@ -3263,8 +3261,8 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, // alle noch offenen Attribute beenden und hinter der Tabelle // neu aufspannen - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - _HTMLAttr** pSaveTbl = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + _HTMLAttr** pSaveAttributes = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); bool bSetAttr = true; const sal_Int32 nSttCnt = pPam->GetPoint()->nContent.GetIndex(); sal_Int32 nEndCnt = nSttCnt; @@ -3286,11 +3284,10 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, nEndCnt = (bSetAttr ? pCNd->Len() : 0); } - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; (++pTbl, ++pSaveTbl) ) + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; (++pHTMLAttributes, ++pSaveAttributes)) { - _HTMLAttr *pAttr = *pTbl; - *pSaveTbl = 0; + _HTMLAttr *pAttr = *pHTMLAttributes; + *pSaveAttributes = 0; while( pAttr ) { _HTMLAttr *pNext = pAttr->GetNext(); @@ -3336,22 +3333,22 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, // den Start des Attributs neu setzen und die Verkettungen // aufbrechen - pAttr->Reset( nSttIdx, nSttCnt, pSaveTbl ); + pAttr->Reset(nSttIdx, nSttCnt, pSaveAttributes); - if( *pSaveTbl ) + if (*pSaveAttributes) { - _HTMLAttr *pSAttr = *pSaveTbl; + _HTMLAttr *pSAttr = *pSaveAttributes; while( pSAttr->GetNext() ) pSAttr = pSAttr->GetNext(); pSAttr->InsertNext( pAttr ); } else - *pSaveTbl = pAttr; + *pSaveAttributes = pAttr; pAttr = pNext; } - *pTbl = 0; + *pHTMLAttributes = 0; } } @@ -3365,26 +3362,25 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab, if( !aParaAttrs.empty() ) aParaAttrs.clear(); - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&aAttrTab); - _HTMLAttr** pSaveTbl = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); + _HTMLAttr** pHTMLAttributes = reinterpret_cast<_HTMLAttr**>(&aAttrTab); + _HTMLAttr** pSaveAttributes = reinterpret_cast<_HTMLAttr**>(&rNewAttrTab); - for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; (++pTbl, ++pSaveTbl) ) + for (sal_uInt16 nCnt = sizeof(_HTMLAttrTable) / sizeof(_HTMLAttr*); nCnt--; (++pHTMLAttributes, ++pSaveAttributes)) { - OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" ); + OSL_ENSURE(!*pHTMLAttributes, "Die Attribut-Tabelle ist nicht leer!"); const SwPosition *pPos = pPam->GetPoint(); const SwNodeIndex& rSttPara = pPos->nNode; const sal_Int32 nSttCnt = pPos->nContent.GetIndex(); - *pTbl = *pSaveTbl; + *pHTMLAttributes = *pSaveAttributes; - _HTMLAttr *pAttr = *pTbl; - while( pAttr ) + _HTMLAttr *pAttr = *pHTMLAttributes; + while (pAttr) { OSL_ENSURE( !pAttr->GetPrev() || !pAttr->GetPrev()->ppHead, "Previous-Attribut hat noch einen Header" ); - pAttr->SetHead( pTbl ); + pAttr->SetHead(pHTMLAttributes); if( bSetNewStart ) { pAttr->nSttPara = rSttPara; @@ -3395,7 +3391,7 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab, pAttr = pAttr->GetNext(); } - *pSaveTbl = 0; + *pSaveAttributes = 0; } } diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index e700b133cf88..0716e6154571 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -458,28 +458,28 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, class SwXMLTableInfo_Impl { - const SwTable *pTable; - Reference < XTextSection > xBaseSection; - bool bBaseSectionValid; + const SwTable *m_pTable; + Reference<XTextSection> m_xBaseSection; + bool m_bBaseSectionValid; sal_uInt32 m_nPrefix; public: inline SwXMLTableInfo_Impl( const SwTable *pTbl, sal_uInt16 nPrefix ); - const SwTable *GetTable() const { return pTable; } - const SwFrmFmt *GetTblFmt() const { return pTable->GetFrmFmt(); } + const SwTable *GetTable() const { return m_pTable; } + const SwFrmFmt *GetTblFmt() const { return m_pTable->GetFrmFmt(); } - bool IsBaseSectionValid() const { return bBaseSectionValid; } - const Reference < XTextSection >& GetBaseSection() const { return xBaseSection; } + bool IsBaseSectionValid() const { return m_bBaseSectionValid; } + const Reference<XTextSection>& GetBaseSection() const { return m_xBaseSection; } inline void SetBaseSection( const Reference < XTextSection >& rBase ); /// The namespace (table or loext) that should be used for the elements. sal_uInt16 GetPrefix() const { return m_nPrefix; } }; -inline SwXMLTableInfo_Impl::SwXMLTableInfo_Impl( const SwTable *pTbl, sal_uInt16 nPrefix ) : - pTable( pTbl ), - bBaseSectionValid( false ), +inline SwXMLTableInfo_Impl::SwXMLTableInfo_Impl(const SwTable *pTable, sal_uInt16 nPrefix) : + m_pTable(pTable), + m_bBaseSectionValid(false), m_nPrefix(nPrefix) { } @@ -487,8 +487,8 @@ inline SwXMLTableInfo_Impl::SwXMLTableInfo_Impl( const SwTable *pTbl, sal_uInt16 inline void SwXMLTableInfo_Impl::SetBaseSection( const Reference < XTextSection >& rBaseSection ) { - xBaseSection = rBaseSection; - bBaseSectionValid = true; + m_xBaseSection = rBaseSection; + m_bBaseSectionValid = true; } void SwXMLExport::ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol ) |