diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-05-20 13:05:49 +0200 |
commit | ab465b90f6c6da5595393a0ba73f33a1e71a2b65 (patch) | |
tree | 36b77192de2799a11b4bf0b269cb3f74d0a0bb1f /sw/source/filter/basflt | |
parent | 0db96caf0fcce09b87621c11b584a6d81cc7df86 (diff) |
bin/rename-sw-abbreviations.sh
libreoffice-5-0-branch-point
renames the most annoying abbreviations in Writer (and partially
in the shared code too).
Change-Id: I9a62759138126c1537cc5c985ba05cf54d6132d9
Diffstat (limited to 'sw/source/filter/basflt')
-rw-r--r-- | sw/source/filter/basflt/fltini.cxx | 58 | ||||
-rw-r--r-- | sw/source/filter/basflt/fltshell.cxx | 116 | ||||
-rw-r--r-- | sw/source/filter/basflt/iodetect.cxx | 14 | ||||
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 104 |
4 files changed, 146 insertions, 146 deletions
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index e1da5d904eb7..0144e2c4fb3d 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -277,19 +277,19 @@ void StgReader::SetFltName( const OUString& rFltNm ) SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, bool bNDoc ) { - pNumRuleTbl = new SwNumRuleTbl(); - pNumRuleTbl->reserve(8); + pNumRuleTable = new SwNumRuleTable(); + pNumRuleTable->reserve(8); if( !bNDoc ) - pNumRuleTbl->insert( pNumRuleTbl->begin(), - rDoc.GetNumRuleTbl().begin(), rDoc.GetNumRuleTbl().end() ); + pNumRuleTable->insert( pNumRuleTable->begin(), + rDoc.GetNumRuleTable().begin(), rDoc.GetNumRuleTable().end() ); } SwRelNumRuleSpaces::~SwRelNumRuleSpaces() { - if( pNumRuleTbl ) + if( pNumRuleTable ) { - pNumRuleTbl->clear(); - delete pNumRuleTbl; + pNumRuleTable->clear(); + delete pNumRuleTable; } } @@ -298,39 +298,39 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, { const SfxPoolItem* pItem = 0; if( SfxItemState::SET != rFlySet.GetItemState( RES_FRM_SIZE, true, &pItem ) || - MINFLY > static_cast<const SwFmtFrmSize*>(pItem)->GetWidth() ) + MINFLY > static_cast<const SwFormatFrmSize*>(pItem)->GetWidth() ) { - SwFmtFrmSize aSz(static_cast<const SwFmtFrmSize&>(rFlySet.Get(RES_FRM_SIZE, true))); + SwFormatFrmSize aSz(static_cast<const SwFormatFrmSize&>(rFlySet.Get(RES_FRM_SIZE, true))); if (pItem) - aSz = static_cast<const SwFmtFrmSize&>(*pItem); + aSz = static_cast<const SwFormatFrmSize&>(*pItem); SwTwips nWidth; // determine the width; if there is a table use the width of the table; // otherwise use the width of the page - const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode(); - if( pTblNd ) - nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth(); + const SwTableNode* pTableNd = rAnchor.GetNode().FindTableNode(); + if( pTableNd ) + nWidth = pTableNd->GetTable().GetFrameFormat()->GetFrmSize().GetWidth(); else nWidth = nPageWidth; - const SwNodeIndex* pSttNd = static_cast<const SwFmtCntnt&>(rFlySet.Get( RES_CNTNT )). - GetCntntIdx(); + const SwNodeIndex* pSttNd = static_cast<const SwFormatContent&>(rFlySet.Get( RES_CNTNT )). + GetContentIdx(); if( pSttNd ) { bool bOnlyOneNode = true; sal_uLong nMinFrm = 0; sal_uLong nMaxFrm = 0; - SwTxtNode* pFirstTxtNd = 0; + SwTextNode* pFirstTextNd = 0; SwNodeIndex aIdx( *pSttNd, 1 ); SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() ); while( aIdx < aEnd ) { - SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode(); - if( pTxtNd ) + SwTextNode *pTextNd = aIdx.GetNode().GetTextNode(); + if( pTextNd ) { - if( !pFirstTxtNd ) - pFirstTxtNd = pTxtNd; - else if( pFirstTxtNd != pTxtNd ) + if( !pFirstTextNd ) + pFirstTextNd = pTextNd; + else if( pFirstTextNd != pTextNd ) { // forget it bOnlyOneNode = false; @@ -338,24 +338,24 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, } sal_uLong nAbsMinCnts; - pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, nMaxFrm, nAbsMinCnts ); + pTextNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm, nMaxFrm, nAbsMinCnts ); } ++aIdx; } if( bOnlyOneNode ) { - if( nMinFrm < MINLAY && pFirstTxtNd ) + if( nMinFrm < MINLAY && pFirstTextNd ) { // if the first node dont contained any content, then // insert one char in it calc again and delete once again - SwIndex aNdIdx( pFirstTxtNd ); - pFirstTxtNd->InsertText(OUString("MM"), aNdIdx); + SwIndex aNdIdx( pFirstTextNd ); + pFirstTextNd->InsertText(OUString("MM"), aNdIdx); sal_uLong nAbsMinCnts; - pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(), + pFirstTextNd->GetMinMaxSize( pFirstTextNd->GetIndex(), nMinFrm, nMaxFrm, nAbsMinCnts ); aNdIdx -= 2; - pFirstTxtNd->EraseText( aNdIdx, 2 ); + pFirstTextNd->EraseText( aNdIdx, 2 ); } // consider border and distance to content @@ -395,9 +395,9 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor, aSz.SetHeight( MINFLY ); rFlySet.Put( aSz ); } - else if( MINFLY > static_cast<const SwFmtFrmSize*>(pItem)->GetHeight() ) + else if( MINFLY > static_cast<const SwFormatFrmSize*>(pItem)->GetHeight() ) { - SwFmtFrmSize aSz( *static_cast<const SwFmtFrmSize*>(pItem) ); + SwFormatFrmSize aSz( *static_cast<const SwFormatFrmSize*>(pItem) ); aSz.SetHeight( MINFLY ); rFlySet.Put( aSz ); } diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 7a72d158f724..be5d9ebc5e48 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -67,9 +67,9 @@ using namespace com::sun::star; -static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext) +static SwContentNode* GetContentNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext) { - SwCntntNode * pCNd = rIdx.GetNode().GetCntntNode(); + SwContentNode * pCNd = rIdx.GetNode().GetContentNode(); if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx) : SwNodes::GoPrevious(&rIdx))) { @@ -120,28 +120,28 @@ bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, bool bCheck, // The only position of 0x0D will not be able to make region in the old logic // because it is beyond the length of para...need special consideration here. - SwCntntNode *const pCntntNode( - SwNodeIndex(rMkPos.m_nNode, +1).GetNode().GetCntntNode()); + SwContentNode *const pContentNode( + SwNodeIndex(rMkPos.m_nNode, +1).GetNode().GetContentNode()); if (rMkPos == rPtPos && - ((0 != rPtPos.m_nCntnt) || (pCntntNode && (0 != pCntntNode->Len()))) + ((0 != rPtPos.m_nContent) || (pContentNode && (0 != pContentNode->Len()))) && ( RES_TXTATR_FIELD != nWhich && RES_TXTATR_ANNOTATION != nWhich && RES_TXTATR_INPUTFIELD != nWhich ) - && !(bIsParaEnd && pCntntNode && pCntntNode->IsTxtNode() && 0 != pCntntNode->Len() )) + && !(bIsParaEnd && pContentNode && pContentNode->IsTextNode() && 0 != pContentNode->Len() )) { return false; } // The content indices always apply to the node! rRegion.GetPoint()->nNode = rMkPos.m_nNode.GetIndex() + 1; - SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, true); - rRegion.GetPoint()->nContent.Assign(pCNd, rMkPos.m_nCntnt); + SwContentNode* pCNd = GetContentNode(pDoc, rRegion.GetPoint()->nNode, true); + rRegion.GetPoint()->nContent.Assign(pCNd, rMkPos.m_nContent); rRegion.SetMark(); if (rMkPos.m_nNode != rPtPos.m_nNode) { rRegion.GetPoint()->nNode = rPtPos.m_nNode.GetIndex() + 1; - pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, false); + pCNd = GetContentNode(pDoc, rRegion.GetPoint()->nNode, false); } - rRegion.GetPoint()->nContent.Assign(pCNd, rPtPos.m_nCntnt); + rRegion.GetPoint()->nContent.Assign(pCNd, rPtPos.m_nContent); OSL_ENSURE( CheckNodesRange( rRegion.Start()->nNode, rRegion.End()->nNode, true ), "atttribute or similar crosses section-boundaries" ); @@ -186,22 +186,22 @@ void SwFltControlStack::MoveAttrs( const SwPosition& rPos ) SwFltStackEntry& rEntry = maEntries[i]; if ( (rEntry.m_aMkPos.m_nNode.GetIndex()+1 == nPosNd) && - (rEntry.m_aMkPos.m_nCntnt >= nPosCt) + (rEntry.m_aMkPos.m_nContent >= nPosCt) ) { - rEntry.m_aMkPos.m_nCntnt++; - OSL_ENSURE( rEntry.m_aMkPos.m_nCntnt - <= pDoc->GetNodes()[nPosNd]->GetCntntNode()->Len(), + rEntry.m_aMkPos.m_nContent++; + OSL_ENSURE( rEntry.m_aMkPos.m_nContent + <= pDoc->GetNodes()[nPosNd]->GetContentNode()->Len(), "Attribute ends after end of line" ); } if ( (rEntry.m_aPtPos.m_nNode.GetIndex()+1 == nPosNd) && - (rEntry.m_aPtPos.m_nCntnt >= nPosCt) + (rEntry.m_aPtPos.m_nContent >= nPosCt) ) { - rEntry.m_aPtPos.m_nCntnt++; - OSL_ENSURE( rEntry.m_aPtPos.m_nCntnt - <= pDoc->GetNodes()[nPosNd]->GetCntntNode()->Len(), + rEntry.m_aPtPos.m_nContent++; + OSL_ENSURE( rEntry.m_aPtPos.m_nContent + <= pDoc->GetNodes()[nPosNd]->GetContentNode()->Len(), "Attribute ends after end of line" ); } } @@ -394,7 +394,7 @@ SwFltStackEntry* SwFltControlStack::SetAttr(const SwPosition& rPos, if (rEntry.m_aPtPos.m_nNode.GetIndex() == aFltPos.m_nNode.GetIndex()) { if (bLastEntry && nAttrId == rEntry.pAttr->Which() && - rEntry.m_aPtPos.m_nCntnt == aFltPos.m_nCntnt) + rEntry.m_aPtPos.m_nContent == aFltPos.m_nContent) { //potential candidate for merging with an identical //property beginning at rPos @@ -420,8 +420,8 @@ static void MakePoint(const SwFltStackEntry& rEntry, SwDoc* pDoc, // attribute's format needs to be set. rRegion.DeleteMark(); rRegion.GetPoint()->nNode = rEntry.m_aMkPos.m_nNode.GetIndex() + 1; - SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, true); - rRegion.GetPoint()->nContent.Assign(pCNd, rEntry.m_aMkPos.m_nCntnt); + SwContentNode* pCNd = GetContentNode(pDoc, rRegion.GetPoint()->nNode, true); + rRegion.GetPoint()->nContent.Assign(pCNd, rEntry.m_aMkPos.m_nContent); } // MakeBookRegionOrPoint() behaves like MakeRegionOrPoint, except that @@ -456,12 +456,12 @@ static bool IterateNumrulePiece( const SwNodeIndex& rEnd, SwNodeIndex& rTmpStart, SwNodeIndex& rTmpEnd ) { while( ( rTmpStart <= rEnd ) - && !( rTmpStart.GetNode().IsTxtNode() ) ) // look for valid start + && !( rTmpStart.GetNode().IsTextNode() ) ) // look for valid start ++rTmpStart; rTmpEnd = rTmpStart; while( ( rTmpEnd <= rEnd ) - && ( rTmpEnd.GetNode().IsTxtNode() ) ) // look for valid end + 1 + && ( rTmpEnd.GetNode().IsTextNode() ) ) // look for valid end + 1 ++rTmpEnd; --rTmpEnd; // valid end @@ -500,19 +500,19 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, { case RES_FLTR_ANCHOR: { - SwFrmFmt* pFmt = static_cast<SwFltAnchor*>(rEntry.pAttr)->GetFrmFmt(); - if (pFmt != NULL) + SwFrameFormat* pFormat = static_cast<SwFltAnchor*>(rEntry.pAttr)->GetFrameFormat(); + if (pFormat != NULL) { MakePoint(rEntry, pDoc, aRegion); - SwFmtAnchor aAnchor(pFmt->GetAnchor()); + SwFormatAnchor aAnchor(pFormat->GetAnchor()); aAnchor.SetAnchor(aRegion.GetPoint()); - pFmt->SetFmtAttr(aAnchor); + pFormat->SetFormatAttr(aAnchor); // So the frames will be created when inserting into // existing doc (after setting the anchor!): if(pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() - && (FLY_AT_PARA == pFmt->GetAnchor().GetAnchorId())) + && (FLY_AT_PARA == pFormat->GetAnchor().GetAnchorId())) { - pFmt->MakeFrms(); + pFormat->MakeFrms(); } } } @@ -561,16 +561,16 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, if (IsFlagSet(BOOK_TO_VAR_REF)) { - SwFieldType* pFT = pDoc->getIDocumentFieldsAccess().GetFldType(RES_SETEXPFLD, rName, false); + SwFieldType* pFT = pDoc->getIDocumentFieldsAccess().GetFieldType(RES_SETEXPFLD, rName, false); if (!pFT) { SwSetExpFieldType aS(pDoc, rName, nsSwGetSetExpType::GSE_STRING); - pFT = pDoc->getIDocumentFieldsAccess().InsertFldType(aS); + pFT = pDoc->getIDocumentFieldsAccess().InsertFieldType(aS); } - SwSetExpField aFld(static_cast<SwSetExpFieldType*>(pFT), pB->GetValSys()); - aFld.SetSubType( nsSwExtendedSubType::SUB_INVISIBLE ); + SwSetExpField aField(static_cast<SwSetExpFieldType*>(pFT), pB->GetValSys()); + aField.SetSubType( nsSwExtendedSubType::SUB_INVISIBLE ); MakePoint(rEntry, pDoc, aRegion); - pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, SwFmtFld(aFld)); + pDoc->getIDocumentContentOperations().InsertPoolItem(aRegion, SwFormatField(aField)); MoveAttrs( *(aRegion.GetPoint()) ); } if ( ( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) && @@ -604,10 +604,10 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, // test if on this node there had been a pagebreak BEFORE the // tox attribute was put on the stack SfxItemSet aBkSet( pDoc->GetAttrPool(), RES_PAGEDESC, RES_BREAK ); - SwCntntNode* pNd = 0; + SwContentNode* pNd = 0; if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() ) { - pNd = pPoint->nNode.GetNode().GetCntntNode(); + pNd = pPoint->nNode.GetNode().GetContentNode(); if( pNd ) { const SfxItemSet* pSet = pNd->GetpSwAttrSet(); @@ -709,7 +709,7 @@ bool SwFltControlStack::CheckSdOD(sal_Int32 /*nStart*/, sal_Int32 /*nEnd*/) return false; } -SfxPoolItem* SwFltControlStack::GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos) +SfxPoolItem* SwFltControlStack::GetFormatStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos) { size_t nSize = maEntries.size(); @@ -768,11 +768,11 @@ void SwFltControlStack::Delete(const SwPaM &rPam) bool bEntryStartAfterSelStart = (rEntry.m_aMkPos.m_nNode == aStartNode && - rEntry.m_aMkPos.m_nCntnt >= nStartIdx); + rEntry.m_aMkPos.m_nContent >= nStartIdx); bool bEntryStartBeforeSelEnd = (rEntry.m_aMkPos.m_nNode == aEndNode && - rEntry.m_aMkPos.m_nCntnt <= nEndIdx); + rEntry.m_aMkPos.m_nContent <= nEndIdx); bool bEntryEndAfterSelStart = false; bool bEntryEndBeforeSelEnd = false; @@ -780,11 +780,11 @@ void SwFltControlStack::Delete(const SwPaM &rPam) { bEntryEndAfterSelStart = (rEntry.m_aPtPos.m_nNode == aStartNode && - rEntry.m_aPtPos.m_nCntnt >= nStartIdx); + rEntry.m_aPtPos.m_nContent >= nStartIdx); bEntryEndBeforeSelEnd = (rEntry.m_aPtPos.m_nNode == aEndNode && - rEntry.m_aPtPos.m_nCntnt <= nEndIdx); + rEntry.m_aPtPos.m_nContent <= nEndIdx); } bool bTotallyContained = false; @@ -803,7 +803,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam) continue; } - const sal_Int32 nCntntDiff = nEndIdx - nStartIdx; + const sal_Int32 nContentDiff = nEndIdx - nStartIdx; // to be adjusted if (bEntryStartAfterSelStart) @@ -814,7 +814,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam) rEntry.m_aMkPos.SetPos(aStartNode, nStartIdx); } else - rEntry.m_aMkPos.m_nCntnt -= nCntntDiff; + rEntry.m_aMkPos.m_nContent -= nContentDiff; } if (bEntryEndAfterSelStart) @@ -822,28 +822,28 @@ void SwFltControlStack::Delete(const SwPaM &rPam) if (bEntryEndBeforeSelEnd) rEntry.m_aPtPos.SetPos(aStartNode, nStartIdx); else - rEntry.m_aPtPos.m_nCntnt -= nCntntDiff; + rEntry.m_aPtPos.m_nContent -= nContentDiff; } - //That's what Open is, end equal to start, and nPtCntnt is invalid + //That's what Open is, end equal to start, and nPtContent is invalid if (rEntry.bOpen) rEntry.m_aPtPos = rEntry.m_aMkPos; } } // methods of SwFltAnchor follow -SwFltAnchor::SwFltAnchor(SwFrmFmt* pFmt) : - SfxPoolItem(RES_FLTR_ANCHOR), pFrmFmt(pFmt) +SwFltAnchor::SwFltAnchor(SwFrameFormat* pFormat) : + SfxPoolItem(RES_FLTR_ANCHOR), pFrameFormat(pFormat) { pClient = new SwFltAnchorClient(this); - pFrmFmt->Add(pClient); + pFrameFormat->Add(pClient); } SwFltAnchor::SwFltAnchor(const SwFltAnchor& rCpy) : - SfxPoolItem(RES_FLTR_ANCHOR), pFrmFmt(rCpy.pFrmFmt) + SfxPoolItem(RES_FLTR_ANCHOR), pFrameFormat(rCpy.pFrameFormat) { pClient = new SwFltAnchorClient(this); - pFrmFmt->Add(pClient); + pFrameFormat->Add(pClient); } SwFltAnchor::~SwFltAnchor() @@ -851,16 +851,16 @@ SwFltAnchor::~SwFltAnchor() delete pClient; } -void SwFltAnchor::SetFrmFmt(SwFrmFmt * _pFrmFmt) +void SwFltAnchor::SetFrameFormat(SwFrameFormat * _pFrameFormat) { - pFrmFmt = _pFrmFmt; + pFrameFormat = _pFrameFormat; } bool SwFltAnchor::operator==(const SfxPoolItem& rItem) const { - return pFrmFmt == static_cast<const SwFltAnchor&>(rItem).pFrmFmt; + return pFrameFormat == static_cast<const SwFltAnchor&>(rItem).pFrameFormat; } SfxPoolItem* SwFltAnchor::Clone(SfxItemPool*) const @@ -877,14 +877,14 @@ void SwFltAnchorClient::Modify(const SfxPoolItem *, const SfxPoolItem * pNew) { if (pNew->Which() == RES_FMT_CHG) { - const SwFmtChg * pFmtChg = dynamic_cast<const SwFmtChg *> (pNew); + const SwFormatChg * pFormatChg = dynamic_cast<const SwFormatChg *> (pNew); - if (pFmtChg != NULL) + if (pFormatChg != NULL) { - SwFrmFmt * pFrmFmt = dynamic_cast<SwFrmFmt *> (pFmtChg->pChangedFmt); + SwFrameFormat * pFrameFormat = dynamic_cast<SwFrameFormat *> (pFormatChg->pChangedFormat); - if (pFrmFmt != NULL) - m_pFltAnchor->SetFrmFmt(pFrmFmt); + if (pFrameFormat != NULL) + m_pFltAnchor->SetFrameFormat(pFrameFormat); } } } diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 0263e5a5cf6b..543dd4b8c592 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -60,7 +60,7 @@ const OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr ) return OUString(); } -const SfxFilter* SwIoSystem::GetFilterOfFormat(const OUString& rFmtNm, +const SfxFilter* SwIoSystem::GetFilterOfFormat(const OUString& rFormatNm, const SfxFilterContainer* pCnt) { SfxFilterContainer aCntSw( OUString(sSWRITER) ); @@ -75,7 +75,7 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const OUString& rFmtNm, const SfxFilter* pFilter = aIter.First(); while ( pFilter ) { - if( pFilter->GetUserData().equals(rFmtNm) ) + if( pFilter->GetUserData().equals(rFormatNm) ) return pFilter; pFilter = aIter.Next(); } @@ -92,10 +92,10 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s bool bRet = false; try { - SotClipboardFormatId nStgFmtId = SotStorage::GetFormatID( rStg ); + SotClipboardFormatId nStgFormatId = SotStorage::GetFormatID( rStg ); bRet = rStg->isStreamElement( OUString("content.xml") ); if ( bRet ) - bRet = ( nStgFmtId != SotClipboardFormatId::NONE && ( rFilter.GetFormat() == nStgFmtId ) ); + bRet = ( nStgFormatId != SotClipboardFormatId::NONE && ( rFilter.GetFormat() == nStgFormatId ) ); } catch (const com::sun::star::uno::Exception& ) { @@ -106,13 +106,13 @@ bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter) { - SotClipboardFormatId nStgFmtId = rStg.GetFormat(); + SotClipboardFormatId nStgFormatId = rStg.GetFormat(); /*#i8409# We cannot trust the clipboard id anymore :-(*/ if (rFilter.GetUserData() == FILTER_WW8 || rFilter.GetUserData() == sWW6) - nStgFmtId = SotClipboardFormatId::NONE; + nStgFormatId = SotClipboardFormatId::NONE; bool bRet = SVSTREAM_OK == rStg.GetError() && - ( nStgFmtId == SotClipboardFormatId::NONE || rFilter.GetFormat() == nStgFmtId ) && + ( nStgFormatId == SotClipboardFormatId::NONE || rFilter.GetFormat() == nStgFormatId ) && ( rStg.IsContained( SwIoSystem::GetSubStorageName( rFilter )) ); if( bRet ) { diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index b9348732e380..d42b0642a52c 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -137,9 +137,9 @@ sal_uLong SwReader::Read( const Reader& rOptions ) RedlineMode_t ePostReadRedlineMode( nsRedlineMode_t::REDLINE_IGNORE ); // Array of FlyFormats - SwFrmFmts aFlyFrmArr; + SwFrameFormats aFlyFrmArr; // only read templates? then ignore multi selection! - bool bFmtsOnly = po->aOpt.IsFmtsOnly(); + bool bFormatsOnly = po->aOpt.IsFormatsOnly(); while( true ) { @@ -159,15 +159,15 @@ sal_uLong SwReader::Read( const Reader& rOptions ) // store for now all Fly's if( pCrsr ) { - std::copy(pDoc->GetSpzFrmFmts()->begin(), - pDoc->GetSpzFrmFmts()->end(), std::back_inserter(aFlyFrmArr)); + std::copy(pDoc->GetSpzFrameFormats()->begin(), + pDoc->GetSpzFrameFormats()->end(), std::back_inserter(aFlyFrmArr)); } - const sal_Int32 nSttCntnt = pPam->GetPoint()->nContent.GetIndex(); + const sal_Int32 nSttContent = pPam->GetPoint()->nContent.GetIndex(); // make sure the End position is correct for all Readers - SwCntntNode* pCNd = pPam->GetCntntNode(); - sal_Int32 nEndCntnt = pCNd ? pCNd->Len() - nSttCntnt : 0; + SwContentNode* pCNd = pPam->GetContentNode(); + sal_Int32 nEndContent = pCNd ? pCNd->Len() - nSttContent : 0; SwNodeIndex aEndPos( pPam->GetPoint()->nNode, 1 ); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); @@ -182,25 +182,25 @@ sal_uLong SwReader::Read( const Reader& rOptions ) if( !IsError( nError )) // set the End position already { --aEndPos; - pCNd = aEndPos.GetNode().GetCntntNode(); + pCNd = aEndPos.GetNode().GetContentNode(); if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &aEndPos ) )) pCNd = pDoc->GetNodes().GoNext( &aEndPos ); pPam->GetPoint()->nNode = aEndPos; const sal_Int32 nLen = pCNd->Len(); - if( nLen < nEndCntnt ) - nEndCntnt = 0; + if( nLen < nEndContent ) + nEndContent = 0; else - nEndCntnt = nLen - nEndCntnt; - pPam->GetPoint()->nContent.Assign( pCNd, nEndCntnt ); + nEndContent = nLen - nEndContent; + pPam->GetPoint()->nContent.Assign( pCNd, nEndContent ); - const SwStartNode* pTblBoxStart = pCNd->FindTableBoxStartNode(); - if ( pTblBoxStart ) + const SwStartNode* pTableBoxStart = pCNd->FindTableBoxStartNode(); + if ( pTableBoxStart ) { - SwTableBox* pBox = pTblBoxStart->GetTblBox(); + SwTableBox* pBox = pTableBoxStart->GetTableBox(); if ( pBox ) { - pDoc->ChkBoxNumFmt( *pBox, true ); + pDoc->ChkBoxNumFormat( *pBox, true ); } } } @@ -210,9 +210,9 @@ sal_uLong SwReader::Read( const Reader& rOptions ) *pUndoPam->GetMark() = *pPam->GetPoint(); ++pUndoPam->GetPoint()->nNode; SwNode& rNd = pUndoPam->GetNode(); - if( rNd.IsCntntNode() ) + if( rNd.IsContentNode() ) pUndoPam->GetPoint()->nContent.Assign( - static_cast<SwCntntNode*>(&rNd), nSttCntnt ); + static_cast<SwContentNode*>(&rNd), nSttContent ); else pUndoPam->GetPoint()->nContent.Assign( 0, 0 ); @@ -220,14 +220,14 @@ sal_uLong SwReader::Read( const Reader& rOptions ) rNd.FindFooterStartNode(); // search all new Fly's, and store them as individual Undo Objects - for( SwFrmFmts::size_type n = 0; n < pDoc->GetSpzFrmFmts()->size(); ++n ) + for( SwFrameFormats::size_type n = 0; n < pDoc->GetSpzFrameFormats()->size(); ++n ) { - SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ n ]; - const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - if( !aFlyFrmArr.Contains( pFrmFmt) ) + SwFrameFormat* pFrameFormat = (*pDoc->GetSpzFrameFormats())[ n ]; + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + if( !aFlyFrmArr.Contains( pFrameFormat) ) { SwPosition const*const pFrameAnchor( - rAnchor.GetCntntAnchor()); + rAnchor.GetContentAnchor()); if ( (FLY_AT_PAGE == rAnchor.GetAnchorId()) || ( pFrameAnchor && ( ( (FLY_AT_PARA == rAnchor.GetAnchorId()) @@ -251,11 +251,11 @@ sal_uLong SwReader::Read( const Reader& rOptions ) { if( bChkHeaderFooter && (FLY_AT_PARA == rAnchor.GetAnchorId()) && - RES_DRAWFRMFMT == pFrmFmt->Which() ) + RES_DRAWFRMFMT == pFrameFormat->Which() ) { // DrawObjects are not allowed in Headers/Footers! - pFrmFmt->DelFrms(); - pDoc->DelFrmFmt( pFrmFmt ); + pFrameFormat->DelFrms(); + pDoc->DelFrameFormat( pFrameFormat ); --n; } else @@ -266,21 +266,21 @@ sal_uLong SwReader::Read( const Reader& rOptions ) // UGLY: temp. enable undo pDoc->GetIDocumentUndoRedo().DoUndo(true); pDoc->GetIDocumentUndoRedo().AppendUndo( - new SwUndoInsLayFmt( pFrmFmt,0,0 ) ); + new SwUndoInsLayFormat( pFrameFormat,0,0 ) ); pDoc->GetIDocumentUndoRedo().DoUndo(false); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE ); } - if( pFrmFmt->HasWriterListeners() ) + if( pFrameFormat->HasWriterListeners() ) { // Draw-Objects create a Frame when being inserted; thus delete them - pFrmFmt->DelFrms(); + pFrameFormat->DelFrms(); } if (FLY_AT_PAGE == rAnchor.GetAnchorId()) { - if( !rAnchor.GetCntntAnchor() ) + if( !rAnchor.GetContentAnchor() ) { - pFrmFmt->MakeFrms(); + pFrameFormat->MakeFrms(); } else if( pCrsr ) { @@ -288,7 +288,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) } } else - pFrmFmt->MakeFrms(); + pFrameFormat->MakeFrms(); } } } @@ -321,7 +321,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) break; // only read templates? then ignore multi selection! Bug 68593 - if( bFmtsOnly ) + if( bFormatsOnly ) break; /* @@ -507,7 +507,7 @@ SwDoc* Reader::GetTemplateDoc() // always FALSE pTemplate->GetIDocumentUndoRedo().DoUndo( false ); pTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode ); - pTemplate->RemoveAllFmtLanguageDependencies(); + pTemplate->RemoveAllFormatLanguageDependencies(); ReadXML->SetOrganizerMode( true ); SfxMedium aMedium( aFileName, StreamMode::NONE ); @@ -534,7 +534,7 @@ bool Reader::SetTemplate( SwDoc& rDoc ) GetTemplateDoc(); if( pTemplate ) { - rDoc.RemoveAllFmtLanguageDependencies(); + rDoc.RemoveAllFormatLanguageDependencies(); rDoc.ReplaceStyles( *pTemplate ); rDoc.getIDocumentFieldsAccess().SetFixFields(false, NULL); bRet = true; @@ -569,7 +569,7 @@ void Reader::MakeHTMLDummyTemplateDoc() pTemplate->acquire(); pTemplate->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmplBrowseMode ); pTemplate->getIDocumentDeviceAccess().getPrinter( true ); - pTemplate->RemoveAllFmtLanguageDependencies(); + pTemplate->RemoveAllFormatLanguageDependencies(); aChkDateTime = Date( 1, 1, 2300 ); // year 2300 should be sufficient aTemplateNm = "$$Dummy$$"; } @@ -616,25 +616,25 @@ void Reader::SetFltName( const OUString& ) { } -void Reader::ResetFrmFmtAttrs( SfxItemSet &rFrmSet ) +void Reader::ResetFrameFormatAttrs( SfxItemSet &rFrmSet ) { rFrmSet.Put( SvxLRSpaceItem(RES_LR_SPACE) ); rFrmSet.Put( SvxULSpaceItem(RES_UL_SPACE) ); rFrmSet.Put( SvxBoxItem(RES_BOX) ); } -void Reader::ResetFrmFmts( SwDoc& rDoc ) +void Reader::ResetFrameFormats( SwDoc& rDoc ) { sal_uInt16 const s_ids[3] = { RES_POOLFRM_FRAME, RES_POOLFRM_GRAPHIC, RES_POOLFRM_OLE }; for (size_t i = 0; i < SAL_N_ELEMENTS(s_ids); ++i) { - SwFrmFmt *const pFrmFmt = rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool( s_ids[i] ); + SwFrameFormat *const pFrameFormat = rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( s_ids[i] ); - pFrmFmt->ResetFmtAttr( RES_LR_SPACE ); - pFrmFmt->ResetFmtAttr( RES_UL_SPACE ); - pFrmFmt->ResetFmtAttr( RES_BOX ); + pFrameFormat->ResetFormatAttr( RES_LR_SPACE ); + pFrameFormat->ResetFormatAttr( RES_UL_SPACE ); + pFrameFormat->ResetFormatAttr( RES_BOX ); } } @@ -756,13 +756,13 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) // search the layout for cells SwSelBoxes aBoxes; - GetTblSel( *pShell, aBoxes ); - const SwTableNode* pTblNd = static_cast<const SwTableNode*>(aBoxes[0]->GetSttNd()->StartOfSectionNode()); + GetTableSel( *pShell, aBoxes ); + const SwTableNode* pTableNd = static_cast<const SwTableNode*>(aBoxes[0]->GetSttNd()->StartOfSectionNode()); SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 2 ); - SwCntntNode *pNd = aIdx.GetNode().GetCntntNode(); + SwContentNode *pNd = aIdx.GetNode().GetContentNode(); OSL_ENSURE( pNd, "Node not found" ); SwPosition aPos( aIdx, SwIndex( pNd ) ); - pTblNd->GetTable().MakeCopy( pDoc, aPos, aBoxes ); + pTableNd->GetTable().MakeCopy( pDoc, aPos, aBoxes ); } if( !bWriteAll && ( pShell || pOutPam )) @@ -832,17 +832,17 @@ sal_uLong SwWriter::Write( WriterRef& rxWriter, const OUString* pRealFileName ) { const SwPageDesc& rPgDsc = pOutDoc->GetPageDesc( 0 ); //const SwPageDesc& rPgDsc = *pOutDoc->GetPageDescFromPool( RES_POOLPAGE_STANDARD ); - const SwFmtFrmSize& rSz = rPgDsc.GetMaster().GetFrmSize(); + const SwFormatFrmSize& rSz = rPgDsc.GetMaster().GetFrmSize(); // Clipboard-Document is always created w/o printer; thus the // default PageDesc is always aug LONG_MAX !! Set then to DIN A4 if( LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth() ) { SwPageDesc aNew( rPgDsc ); - SwFmtFrmSize aNewSz( rSz ); + SwFormatFrmSize aNewSz( rSz ); Size a4(SvxPaperInfo::GetPaperSize( PAPER_A4 )); aNewSz.SetHeight( a4.Width() ); aNewSz.SetWidth( a4.Height() ); - aNew.GetMaster().SetFmtAttr( aNewSz ); + aNew.GetMaster().SetFormatAttr( aNewSz ); pOutDoc->ChgPageDesc( 0, aNew ); } } @@ -923,12 +923,12 @@ bool SetHTMLTemplate( SwDoc & rDoc ) SwNodes& rNds = rDoc.GetNodes(); SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 ); - SwCntntNode* pCNd = rNds.GoNext( &aIdx ); + SwContentNode* pCNd = rNds.GoNext( &aIdx ); if( pCNd ) { pCNd->SetAttr - ( SwFmtPageDesc(rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_HTML, false) ) ); - pCNd->ChgFmtColl( rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_TEXT, false )); + ( SwFormatPageDesc(rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_HTML, false) ) ); + pCNd->ChgFormatColl( rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT, false )); } return bRet; |