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 | |
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')
118 files changed, 7714 insertions, 7714 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 0be50d3db442..a4f32b8d2822 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -45,13 +45,13 @@ class SwASC_AttrIter { SwASCWriter& rWrt; - const SwTxtNode& rNd; + const SwTextNode& rNd; sal_Int32 nAktSwPos; sal_Int32 SearchNext( sal_Int32 nStartPos ); public: - SwASC_AttrIter( SwASCWriter& rWrt, const SwTxtNode& rNd, sal_Int32 nStt ); + SwASC_AttrIter( SwASCWriter& rWrt, const SwTextNode& rNd, sal_Int32 nStt ); void NextPos() { @@ -68,10 +68,10 @@ public: SwASC_AttrIter::SwASC_AttrIter( SwASCWriter& rWr, - const SwTxtNode& rTxtNd, + const SwTextNode& rTextNd, sal_Int32 nStt ) : rWrt( rWr ) - , rNd( rTxtNd ) + , rNd( rTextNd ) , nAktSwPos( 0 ) { nAktSwPos = SearchNext( nStt + 1 ); @@ -80,14 +80,14 @@ SwASC_AttrIter::SwASC_AttrIter( sal_Int32 SwASC_AttrIter::SearchNext( sal_Int32 nStartPos ) { sal_Int32 nMinPos = SAL_MAX_INT32; - const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); - if( pTxtAttrs ) + const SwpHints* pTextAttrs = rNd.GetpSwpHints(); + if( pTextAttrs ) { - // TODO: This can be optimized, if we make use of the fact that the TxtAttrs + // TODO: This can be optimized, if we make use of the fact that the TextAttrs // are sorted by starting position. We would need to remember two indices, however. - for ( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for ( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; if ( pHt->HasDummyChar() ) { sal_Int32 nPos = pHt->GetStart(); @@ -120,12 +120,12 @@ sal_Int32 SwASC_AttrIter::SearchNext( sal_Int32 nStartPos ) bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos ) { bool bRet = false; - const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); - if( pTxtAttrs ) + const SwpHints* pTextAttrs = rNd.GetpSwpHints(); + if( pTextAttrs ) { - for( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; if ( ( pHt->HasDummyChar() || pHt->HasContent() ) && nSwPos == pHt->GetStart() ) @@ -137,21 +137,21 @@ bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos ) case RES_TXTATR_FIELD: case RES_TXTATR_ANNOTATION: case RES_TXTATR_INPUTFIELD: - sOut = static_txtattr_cast<SwTxtFld const*>(pHt) - ->GetFmtFld().GetField()->ExpandField(true); + sOut = static_txtattr_cast<SwTextField const*>(pHt) + ->GetFormatField().GetField()->ExpandField(true); break; case RES_TXTATR_FTN: { - const SwFmtFtn& rFtn = pHt->GetFtn(); - if( !rFtn.GetNumStr().isEmpty() ) - sOut = rFtn.GetNumStr(); - else if( rFtn.IsEndNote() ) - sOut = rWrt.pDoc->GetEndNoteInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); + const SwFormatFootnote& rFootnote = pHt->GetFootnote(); + if( !rFootnote.GetNumStr().isEmpty() ) + sOut = rFootnote.GetNumStr(); + else if( rFootnote.IsEndNote() ) + sOut = rWrt.pDoc->GetEndNoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); else - sOut = rWrt.pDoc->GetFtnInfo().aFmt. - GetNumStr( rFtn.GetNumber() ); + sOut = rWrt.pDoc->GetFootnoteInfo().aFormat. + GetNumStr( rFootnote.GetNumber() ); } break; } @@ -167,9 +167,9 @@ bool SwASC_AttrIter::OutAttr( sal_Int32 nSwPos ) // Output of the node -static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) +static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) { - const SwTxtNode& rNd = static_cast<SwTxtNode&>(rNode); + const SwTextNode& rNd = static_cast<SwTextNode&>(rNode); sal_Int32 nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex(); const sal_Int32 nNodeEnd = rNd.Len(); @@ -190,7 +190,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) } } - OUString aStr( rNd.GetTxt() ); + OUString aStr( rNd.GetText() ); if( rWrt.bASCII_ParaAsBlanc ) aStr = aStr.replace(0x0A, ' '); @@ -231,7 +231,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) */ SwNodeFnTab aASCNodeFnTab = { -/* RES_TXTNODE */ OutASC_SwTxtNode, +/* RES_TXTNODE */ OutASC_SwTextNode, /* RES_GRFNODE */ 0, /* RES_OLENODE */ 0 }; diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 6bc9f674d3f5..202bad3582af 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -144,23 +144,23 @@ sal_uLong SwASCIIParser::CallParser() ::StartProgress( STR_STATSTR_W4WREAD, 0, nFileSize, pDoc->GetDocShell() ); SwPaM* pInsPam = 0; - sal_Int32 nSttCntnt = 0; + sal_Int32 nSttContent = 0; if (!bNewDoc) { const SwNodeIndex& rTmp = pPam->GetPoint()->nNode; pInsPam = new SwPaM( rTmp, rTmp, 0, -1 ); - nSttCntnt = pPam->GetPoint()->nContent.GetIndex(); + nSttContent = pPam->GetPoint()->nContent.GetIndex(); } - SwTxtFmtColl *pColl = 0; + SwTextFormatColl *pColl = 0; if (bNewDoc) { - pColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_HTML_PRE, false); + pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_HTML_PRE, false); if (!pColl) - pColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD,false); + pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD,false); if (pColl) - pDoc->SetTxtFmtColl(*pPam, pColl); + pDoc->SetTextFormatColl(*pPam, pColl); } sal_uLong nError = ReadChars(); @@ -212,7 +212,7 @@ sal_uLong SwASCIIParser::CallParser() if (SfxItemState::SET == pItemSet->GetItemState(*pWhichIds, false, &pItem)) { - pColl->SetFmtAttr( *pItem ); + pColl->SetFormatAttr( *pItem ); pItemSet->ClearItem( *pWhichIds ); } ++pWhichIds; @@ -227,7 +227,7 @@ sal_uLong SwASCIIParser::CallParser() *pInsPam->GetMark() = *pPam->GetPoint(); ++pInsPam->GetPoint()->nNode; pInsPam->GetPoint()->nContent.Assign( - pInsPam->GetCntntNode(), nSttCntnt ); + pInsPam->GetContentNode(), nSttContent ); // !!!!! OSL_ENSURE( false, "Have to change - hard attr. to para. style" ); @@ -428,7 +428,7 @@ sal_uLong SwASCIIParser::ReadChars() } pDoc->getIDocumentContentOperations().SplitNode( *pPam->GetPoint(), false ); pDoc->getIDocumentContentOperations().InsertPoolItem( - *pPam, SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); + *pPam, SvxFormatBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); pLastStt = pStt; nLineLen = 0; bIns = false; @@ -489,7 +489,7 @@ void SwASCIIParser::InsertText( const OUString& rStr ) { pDoc->getIDocumentContentOperations().InsertString( *pPam, rStr ); pDoc->UpdateRsid( *pPam, rStr.getLength() ); - pDoc->UpdateParRsid( pPam->GetPoint()->nNode.GetNode().GetTxtNode() ); + pDoc->UpdateParRsid( pPam->GetPoint()->nNode.GetNode().GetTextNode() ); if( pItemSet && g_pBreakIt && nScript != ( SvtScriptType::LATIN | SvtScriptType::ASIAN | diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 66a671622c04..907ea407ffc9 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -118,15 +118,15 @@ sal_uLong SwASCWriter::WriteStream() (pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() && pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) ) { - SwTxtNode* pNd = pCurPam->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode* pNd = pCurPam->GetPoint()->nNode.GetNode().GetTextNode(); if( pNd ) { // Should we have frames only? // That's possible, if we put a frame selection into the clipboard if( bTstFly && bWriteAll && - pNd->GetTxt().isEmpty() && + pNd->GetText().isEmpty() && // Frame exists - pDoc->GetSpzFrmFmts()->size() && + pDoc->GetSpzFrameFormats()->size() && // Only one node in the array pDoc->GetNodes().GetEndOfExtras().GetIndex() + 3 == pDoc->GetNodes().GetEndOfContent().GetIndex() && @@ -136,8 +136,8 @@ sal_uLong SwASCWriter::WriteStream() { // Print the frame's content. // It is always at position 0! - const SwFrmFmt* pFmt = (*pDoc->GetSpzFrmFmts())[ 0 ]; - const SwNodeIndex* pIdx = pFmt->GetCntnt().GetCntntIdx(); + const SwFrameFormat* pFormat = (*pDoc->GetSpzFrameFormats())[ 0 ]; + const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx(); if( pIdx ) { delete pCurPam; 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; diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index fadc0722abf0..9f7bc09825e7 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -116,18 +116,18 @@ using editeng::SvxBorderLine; extern SwAttrFnTab aCSS1AttrFnTab; -static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, +static Writer& OutCSS1_SwFormat( Writer& rWrt, const SwFormat& rFormat, IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate ); -static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rFmt, +static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rFormat, IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate, sal_uInt16 nRefPoolId, bool bExtRef, bool bPseudo=true ); -static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, +static Writer& OutCSS1_SwFootnoteInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, SwDoc *pDoc, sal_uInt16 nNotes, bool bEndNote ); -static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt, - const SwFmtDrop& rDrop, - const SfxItemSet *pCharFmtItemSet=0 ); -static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, +static void OutCSS1_SwFormatDropAttrs( SwHTMLWriter& rHWrt, + const SwFormatDrop& rDrop, + const SfxItemSet *pCharFormatItemSet=0 ); +static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt, const SvxUnderlineItem *pUItem, const SvxOverlineItem *pOItem, const SvxCrossedOutItem *pCOItem, @@ -145,12 +145,12 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt, static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ); static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt ); -static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt, +static Writer& OutCSS1_SwFormatFrmSize( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ); -static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, +static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, const SfxItemSet& rItemSet, bool bDeep ); -static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt ); +static Writer& OutCSS1_SwFormatLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt ); namespace { @@ -503,12 +503,12 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, pBlinkItem = static_cast<const SvxBlinkItem *>(pItem); if( pUnderlineItem || pOverlineItem || pCrossedOutItem || pBlinkItem ) - OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( *this, pUnderlineItem, + OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( *this, pUnderlineItem, pOverlineItem, pCrossedOutItem, pBlinkItem ); - OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, bDeep ); + OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( *this, rItemSet, bDeep ); } if( !bFirstCSS1Property ) @@ -553,9 +553,9 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) // If other templates are used, only very simple cases are exported. const SwPageDesc *pPageDesc = &rPageDesc; const SwPageDesc *pFollow = rPageDesc.GetFollow(); - if( RES_POOLPAGE_FIRST == pPageDesc->GetPoolFmtId() && + if( RES_POOLPAGE_FIRST == pPageDesc->GetPoolFormatId() && pFollow != pPageDesc && - !IsPoolUserFmt( pFollow->GetPoolFmtId() ) ) + !IsPoolUserFormat( pFollow->GetPoolFormatId() ) ) { // the document has a first page pFirstPageDesc = pPageDesc; @@ -570,12 +570,12 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) // The attribute is exported relative to the HTML page template. OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate, RES_POOLPAGE_HTML, true, false ); - nFirstRefPoolId = pFollow->GetPoolFmtId(); + nFirstRefPoolId = pFollow->GetPoolFormatId(); } - else if( (RES_POOLPAGE_LEFT == pPageDesc->GetPoolFmtId() && - RES_POOLPAGE_RIGHT == pFollow->GetPoolFmtId()) || - (RES_POOLPAGE_RIGHT == pPageDesc->GetPoolFmtId() && - RES_POOLPAGE_LEFT == pFollow->GetPoolFmtId()) ) + else if( (RES_POOLPAGE_LEFT == pPageDesc->GetPoolFormatId() && + RES_POOLPAGE_RIGHT == pFollow->GetPoolFormatId()) || + (RES_POOLPAGE_RIGHT == pPageDesc->GetPoolFormatId() && + RES_POOLPAGE_LEFT == pFollow->GetPoolFormatId()) ) { // the document is double-sided OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate, @@ -596,46 +596,46 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) // The text body style has to be exported always (if it is changed compared // to the template), because it is used as reference for any style // that maps to <P>, and that's especially the standard style - getIDocumentStylePoolAccess()->GetTxtCollFromPool( RES_POOLCOLL_TEXT, false ); + getIDocumentStylePoolAccess()->GetTextCollFromPool( RES_POOLCOLL_TEXT, false ); // the Default-TextStyle is not also exported !! // 0-Style is the Default; is never exported !! - sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->size(); + sal_uInt16 nArrLen = pDoc->GetTextFormatColls()->size(); sal_uInt16 i; for( i = 1; i < nArrLen; i++ ) { - const SwTxtFmtColl* pColl = (*pDoc->GetTxtFmtColls())[i]; - sal_uInt16 nPoolId = pColl->GetPoolFmtId(); + const SwTextFormatColl* pColl = (*pDoc->GetTextFormatColls())[i]; + sal_uInt16 nPoolId = pColl->GetPoolFormatId(); if( !bUsed || nPoolId == RES_POOLCOLL_TEXT || pDoc->IsUsed( *pColl ) ) - OutCSS1_SwFmt( *this, *pColl, &pDoc->getIDocumentStylePoolAccess(), pTemplate ); + OutCSS1_SwFormat( *this, *pColl, &pDoc->getIDocumentStylePoolAccess(), pTemplate ); } // the Default-TextStyle is not also exported !! - nArrLen = pDoc->GetCharFmts()->size(); + nArrLen = pDoc->GetCharFormats()->size(); for( i=1; i<nArrLen; i++ ) { - const SwCharFmt *pCFmt = (*pDoc->GetCharFmts())[i]; - sal_uInt16 nPoolId = pCFmt->GetPoolFmtId(); + const SwCharFormat *pCFormat = (*pDoc->GetCharFormats())[i]; + sal_uInt16 nPoolId = pCFormat->GetPoolFormatId(); if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL || nPoolId == RES_POOLCHR_INET_VISIT || - pDoc->IsUsed( *pCFmt ) ) - OutCSS1_SwFmt( *this, *pCFmt, &pDoc->getIDocumentStylePoolAccess(), pTemplate ); + pDoc->IsUsed( *pCFormat ) ) + OutCSS1_SwFormat( *this, *pCFormat, &pDoc->getIDocumentStylePoolAccess(), pTemplate ); } - const SwFtnIdxs& rIdxs = pDoc->GetFtnIdxs(); + const SwFootnoteIdxs& rIdxs = pDoc->GetFootnoteIdxs(); nArrLen = rIdxs.size(); - sal_uInt16 nEnd = 0, nFtn = 0; + sal_uInt16 nEnd = 0, nFootnote = 0; for( i=0; i < nArrLen; i++ ) { - if( rIdxs[i]->GetFtn().IsEndNote() ) + if( rIdxs[i]->GetFootnote().IsEndNote() ) nEnd++; else - nFtn++; + nFootnote++; } - OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, false ); - OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, true ); + OutCSS1_SwFootnoteInfo( *this, pDoc->GetFootnoteInfo(), pDoc, nFootnote, false ); + OutCSS1_SwFootnoteInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, true ); if( !bFirstCSS1Rule ) { @@ -655,7 +655,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) // if pPseudo is set, Styles-Sheets will be exported; // otherwise we only search for Token and Class for a Format -sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, +sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFormat *pFormat, OString& rToken, OUString& rClass, sal_uInt16& rRefPoolId, OUString *pPseudo ) { @@ -666,40 +666,40 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, if( pPseudo ) pPseudo->clear(); - bool bChrFmt = RES_CHRFMT==pFmt->Which(); + bool bChrFormat = RES_CHRFMT==pFormat->Which(); // search formats above for the nearest standard or HTML-Tag template - const SwFmt *pPFmt = pFmt; - while( pPFmt && !pPFmt->IsDefault() ) + const SwFormat *pPFormat = pFormat; + while( pPFormat && !pPFormat->IsDefault() ) { bool bStop = false; - sal_uInt16 nPoolId = pPFmt->GetPoolFmtId(); + sal_uInt16 nPoolId = pPFormat->GetPoolFormatId(); if( USER_FMT & nPoolId ) { // user templates - const OUString aNm(pPFmt->GetName()); + const OUString aNm(pPFormat->GetName()); - if (!bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_blockquote) + if (!bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_blockquote) { rRefPoolId = RES_POOLCOLL_HTML_BLOCKQUOTE; rToken = OString(OOO_STRING_SVTOOLS_HTML_blockquote); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_citiation) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_citiation) { rRefPoolId = RES_POOLCHR_HTML_CITIATION; rToken = OString(OOO_STRING_SVTOOLS_HTML_citiation); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_code) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_code) { rRefPoolId = RES_POOLCHR_HTML_CODE; rToken = OString(OOO_STRING_SVTOOLS_HTML_code); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_definstance) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_definstance) { rRefPoolId = RES_POOLCHR_HTML_DEFINSTANCE; rToken = OString(OOO_STRING_SVTOOLS_HTML_definstance); } - else if (!bChrFmt && (aNm == OOO_STRING_SVTOOLS_HTML_dd || + else if (!bChrFormat && (aNm == OOO_STRING_SVTOOLS_HTML_dd || aNm == OOO_STRING_SVTOOLS_HTML_dt)) { sal_uInt16 nDefListLvl = GetDefListLvl(aNm, nPoolId); @@ -724,54 +724,54 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, } } } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_emphasis) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_emphasis) { rRefPoolId = RES_POOLCHR_HTML_EMPHASIS; rToken = OString(OOO_STRING_SVTOOLS_HTML_emphasis); } - else if (!bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_horzrule) + else if (!bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_horzrule) { // do not export HR ! bStop = (nDeep==0); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_keyboard) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_keyboard) { rRefPoolId = RES_POOLCHR_HTML_KEYBOARD; rToken = OString(OOO_STRING_SVTOOLS_HTML_keyboard); } - else if (!bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_listing) + else if (!bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_listing) { // Export Listings as PRE or PRE-derived template rToken = OString(OOO_STRING_SVTOOLS_HTML_preformtxt); rRefPoolId = RES_POOLCOLL_HTML_PRE; nDeep = CSS1_FMT_CMPREF; } - else if (!bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_preformtxt) + else if (!bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_preformtxt) { rRefPoolId = RES_POOLCOLL_HTML_PRE; rToken = OString(OOO_STRING_SVTOOLS_HTML_preformtxt); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_sample) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_sample) { rRefPoolId = RES_POOLCHR_HTML_SAMPLE; rToken = OString(OOO_STRING_SVTOOLS_HTML_sample); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_strong) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_strong) { rRefPoolId = RES_POOLCHR_HTML_STRONG; rToken = OString(OOO_STRING_SVTOOLS_HTML_strong); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_teletype) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_teletype) { rRefPoolId = RES_POOLCHR_HTML_TELETYPE; rToken = OString(OOO_STRING_SVTOOLS_HTML_teletype); } - else if (bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_variable) + else if (bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_variable) { rRefPoolId = RES_POOLCHR_HTML_VARIABLE; rToken = OString(OOO_STRING_SVTOOLS_HTML_variable); } - else if (!bChrFmt && aNm == OOO_STRING_SVTOOLS_HTML_xmp) + else if (!bChrFormat && aNm == OOO_STRING_SVTOOLS_HTML_xmp) { // export XMP as PRE (but not the template as Style) rToken = OString(OOO_STRING_SVTOOLS_HTML_preformtxt); @@ -932,7 +932,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, { // continue otherwise nDeep++; - pPFmt = pPFmt->DerivedFrom(); + pPFormat = pPFormat->DerivedFrom(); } } @@ -953,7 +953,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, // we export it as <TOKEN>.<CLASS>, otherwise as .<CLASS>. // <CLASS> is the name of the template after removing all characters // before and including the first '.' - rClass = pFmt->GetName(); + rClass = pFormat->GetName(); sal_Int32 nPos = rClass.indexOf( '.' ); if( nPos >= 0 && rClass.getLength() > nPos+1 ) { @@ -969,14 +969,14 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, OString& rToken, return nDeep; } -static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, OUString& rSelector, +static sal_uInt16 GetCSS1Selector( const SwFormat *pFormat, OUString& rSelector, sal_uInt16& rRefPoolId ) { OString aToken; OUString aClass; OUString aPseudo; - sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass, + sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFormat, aToken, aClass, rRefPoolId, &aPseudo ); if( nDeep ) { @@ -994,41 +994,41 @@ static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, OUString& rSelector, return nDeep; } -const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId, +const SwFormat *SwHTMLWriter::GetTemplateFormat( sal_uInt16 nPoolFormatId, IDocumentStylePoolAccess* pTemplate /*SwDoc *pTemplate*/) { - const SwFmt *pRefFmt = 0; + const SwFormat *pRefFormat = 0; if( pTemplate ) { - OSL_ENSURE( !(USER_FMT & nPoolFmtId), + OSL_ENSURE( !(USER_FMT & nPoolFormatId), "No user templates found" ); - if( POOLGRP_NOCOLLID & nPoolFmtId ) - pRefFmt = pTemplate->GetCharFmtFromPool( nPoolFmtId ); + if( POOLGRP_NOCOLLID & nPoolFormatId ) + pRefFormat = pTemplate->GetCharFormatFromPool( nPoolFormatId ); else - pRefFmt = pTemplate->GetTxtCollFromPool( nPoolFmtId, false ); + pRefFormat = pTemplate->GetTextCollFromPool( nPoolFormatId, false ); } - return pRefFmt; + return pRefFormat; } -const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep ) +const SwFormat *SwHTMLWriter::GetParentFormat( const SwFormat& rFormat, sal_uInt16 nDeep ) { OSL_ENSURE( nDeep != USHRT_MAX, "Called GetParent for HTML-template!" ); - const SwFmt *pRefFmt = 0; + const SwFormat *pRefFormat = 0; if( nDeep > 0 ) { // get the pointer for the HTML-Tag template, from which the template is derived - pRefFmt = &rFmt; + pRefFormat = &rFormat; for( sal_uInt16 i=nDeep; i>0; i-- ) - pRefFmt = pRefFmt->DerivedFrom(); + pRefFormat = pRefFormat->DerivedFrom(); - if( pRefFmt && pRefFmt->IsDefault() ) - pRefFmt = 0; + if( pRefFormat && pRefFormat->IsDefault() ) + pRefFormat = 0; } - return pRefFmt; + return pRefFormat; } bool swhtml_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 ) @@ -1268,13 +1268,13 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, SfxItemState::SET == rItemSet.GetItemState( RES_PARATR_DROP, true, &pItem ) ) { - const SwFmtDrop *pDrop = static_cast<const SwFmtDrop *>(pItem); - const SwCharFmt *pDCCharFmt = pDrop->GetCharFmt(); - if( pDCCharFmt ) + const SwFormatDrop *pDrop = static_cast<const SwFormatDrop *>(pItem); + const SwCharFormat *pDCCharFormat = pDrop->GetCharFormat(); + if( pDCCharFormat ) { //sequence of (start, end) property ranges we want to //query - SfxItemSet aTstItemSet( *pDCCharFmt->GetAttrSet().GetPool(), + SfxItemSet aTstItemSet( *pDCCharFormat->GetAttrSet().GetPool(), RES_CHRATR_FONT, RES_CHRATR_FONT, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, @@ -1283,7 +1283,7 @@ bool SwHTMLWriter::HasScriptDependentItems( const SfxItemSet& rItemSet, RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_FONT, RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, 0 ); - aTstItemSet.Set( pDCCharFmt->GetAttrSet(), true ); + aTstItemSet.Set( pDCCharFormat->GetAttrSet(), true ); return HasScriptDependentItems( aTstItemSet, false ); } } @@ -1400,12 +1400,12 @@ static bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector, static void OutCSS1DropCapRule( SwHTMLWriter& rHTMLWrt, const OUString& rSelector, - const SwFmtDrop& rDrop, bool bHasClass, + const SwFormatDrop& rDrop, bool bHasClass, bool bHasScriptDependencies ) { - const SwCharFmt *pDCCharFmt = rDrop.GetCharFmt(); + const SwCharFormat *pDCCharFormat = rDrop.GetCharFormat(); if( (bHasScriptDependencies && bHasClass) || - (pDCCharFmt && SwHTMLWriter::HasScriptDependentItems( pDCCharFmt->GetAttrSet(), false ) ) ) + (pDCCharFormat && SwHTMLWriter::HasScriptDependentItems( pDCCharFormat->GetAttrSet(), false ) ) ) { OUString aSelector( rSelector ); @@ -1425,7 +1425,7 @@ static void OutCSS1DropCapRule( { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &rSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } SfxItemSet aScriptItemSet( rHTMLWrt.pDoc->GetAttrPool(), @@ -1434,29 +1434,29 @@ static void OutCSS1DropCapRule( RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT, 0 ); - if( pDCCharFmt ) - aScriptItemSet.Set( pDCCharFmt->GetAttrSet(), true ); + if( pDCCharFormat ) + aScriptItemSet.Set( pDCCharFormat->GetAttrSet(), true ); OUString aNewSelector( aSelector ); aNewSelector += ".western" + aPseudo; { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); } aNewSelector = aSelector + ".cjk" + aPseudo; { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); } aNewSelector = aSelector + ".ctl" + aPseudo; { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet ); } } else @@ -1469,21 +1469,21 @@ static void OutCSS1DropCapRule( { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } aNewSelector = aSelector + "-cjk" + aPseudo; { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } aNewSelector = aSelector + "-ctl" + aPseudo; { SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &aNewSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } } } @@ -1496,20 +1496,20 @@ static void OutCSS1DropCapRule( SwCSS1OutMode aMode( rHTMLWrt, rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP, true, &rSelector ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, rDrop ); } } -static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, +static Writer& OutCSS1_SwFormat( Writer& rWrt, const SwFormat& rFormat, IDocumentStylePoolAccess/*SwDoc*/ *pDoc, SwDoc *pTemplate ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - bool bCharFmt = false; - switch( rFmt.Which() ) + bool bCharFormat = false; + switch( rFormat.Which() ) { case RES_CHRFMT: - bCharFmt = true; + bCharFormat = true; break; case RES_TXTFMTCOLL: @@ -1525,11 +1525,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, // determine Selector and the to-be-exported Attr-Set-depth OUString aSelector; sal_uInt16 nRefPoolId = 0; - sal_uInt16 nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId ); + sal_uInt16 nDeep = GetCSS1Selector( &rFormat, aSelector, nRefPoolId ); if( !nDeep ) return rWrt; // not derived from a HTML-template - sal_uInt16 nPoolFmtId = rFmt.GetPoolFmtId(); + sal_uInt16 nPoolFormatId = rFormat.GetPoolFormatId(); // Determine the to-be-exported Attr-Set. We have to distinguish 3 cases: // - HTML-Tag templates (nDeep==USHRT_MAX): @@ -1545,58 +1545,58 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, // create Item-Set with all Attributes from the template // (all but for nDeep==1) - const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet(); - SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() ); - aItemSet.Set( rFmtItemSet, true ); // Was nDeep!=1 that is not working + const SfxItemSet& rFormatItemSet = rFormat.GetAttrSet(); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), rFormatItemSet.GetRanges() ); + aItemSet.Set( rFormatItemSet, true ); // Was nDeep!=1 that is not working // for script dependent items buts should // not make a difference for any other bool bSetDefaults = true, bClearSame = true; - const SwFmt *pRefFmt = 0; - const SwFmt *pRefFmtScript = 0; + const SwFormat *pRefFormat = 0; + const SwFormat *pRefFormatScript = 0; switch( nDeep ) { case CSS1_FMT_ISTAG: - pRefFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); + pRefFormat = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); break; case CSS1_FMT_CMPREF: - pRefFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pDoc ); - pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); + pRefFormat = SwHTMLWriter::GetTemplateFormat( nRefPoolId, pDoc ); + pRefFormatScript = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); bClearSame = false; break; default: - pRefFmt = SwHTMLWriter::GetParentFmt( rFmt, nDeep ); - pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); + pRefFormat = SwHTMLWriter::GetParentFormat( rFormat, nDeep ); + pRefFormatScript = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); bSetDefaults = false; break; } - if( pRefFmt ) + if( pRefFormat ) { // subtract Item-Set of the Reference template (incl. its Parents) - SwHTMLWriter::SubtractItemSet( aItemSet, pRefFmt->GetAttrSet(), + SwHTMLWriter::SubtractItemSet( aItemSet, pRefFormat->GetAttrSet(), bSetDefaults, bClearSame, - pRefFmtScript - ? &pRefFmtScript->GetAttrSet() + pRefFormatScript + ? &pRefFormatScript->GetAttrSet() : 0 ); - if( !bCharFmt ) + if( !bCharFormat ) { - const SvxULSpaceItem& rULItem = pRefFmt->GetULSpace(); + const SvxULSpaceItem& rULItem = pRefFormat->GetULSpace(); rHTMLWrt.nDfltTopMargin = rULItem.GetUpper(); rHTMLWrt.nDfltBottomMargin = rULItem.GetLower(); } } - else if( CSS1_FMT_ISTAG==nDeep && !bCharFmt ) + else if( CSS1_FMT_ISTAG==nDeep && !bCharFormat ) { // set Default-distance above and below (for the // case that there is no reference template) rHTMLWrt.nDfltTopMargin = 0; rHTMLWrt.nDfltBottomMargin = HTML_PARSPACE; - if( USER_FMT & nPoolFmtId ) + if( USER_FMT & nPoolFormatId ) { // user templates - const OUString aNm(rFmt.GetName()); + const OUString aNm(rFormat.GetName()); if (aNm == "DD 1" || aNm == "DT 1") rHTMLWrt.nDfltBottomMargin = 0; @@ -1610,7 +1610,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, else { // Pool templates - switch( nPoolFmtId ) + switch( nPoolFormatId ) { case RES_POOLCOLL_HEADLINE1: case RES_POOLCOLL_HEADLINE2: @@ -1636,7 +1636,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, // There is no support for script dependent hyperlinks by now. bool bCheckForPseudo = false; - if( bCharFmt && + if( bCharFormat && (RES_POOLCHR_INET_NORMAL==nRefPoolId || RES_POOLCHR_INET_VISIT==nRefPoolId) ) bCheckForPseudo = true; @@ -1646,18 +1646,18 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( OutCSS1Rule( rHTMLWrt, aSelector, aItemSet, CSS1_FMT_ISTAG != nDeep, bCheckForPseudo ) ) { - if( bCharFmt ) - rHTMLWrt.aScriptTextStyles.insert( rFmt.GetName() ); + if( bCharFormat ) + rHTMLWrt.aScriptTextStyles.insert( rFormat.GetName() ); else { - if( nPoolFmtId==RES_POOLCOLL_TEXT ) - rHTMLWrt.aScriptParaStyles.insert( pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false )->GetName() ); - rHTMLWrt.aScriptParaStyles.insert( rFmt.GetName() ); + if( nPoolFormatId==RES_POOLCOLL_TEXT ) + rHTMLWrt.aScriptParaStyles.insert( pDoc->GetTextCollFromPool( RES_POOLCOLL_STANDARD, false )->GetName() ); + rHTMLWrt.aScriptParaStyles.insert( rFormat.GetName() ); } bHasScriptDependencies = true; } - if( nPoolFmtId==RES_POOLCOLL_TEXT && !rHTMLWrt.bFirstCSS1Property ) + if( nPoolFormatId==RES_POOLCOLL_TEXT && !rHTMLWrt.bFirstCSS1Property ) rHTMLWrt.bPoolCollTextModified = true; // export Drop-Caps @@ -1666,7 +1666,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, { OUString sOut( aSelector ); sOut += ":" + OStringToOUString( sCSS1_first_letter, RTL_TEXTENCODING_ASCII_US ); - const SwFmtDrop *pDrop = static_cast<const SwFmtDrop *>(pItem); + const SwFormatDrop *pDrop = static_cast<const SwFormatDrop *>(pItem); OutCSS1DropCapRule( rHTMLWrt, sOut, *pDrop, CSS1_FMT_ISTAG != nDeep, bHasScriptDependencies ); } @@ -1691,7 +1691,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc, if( bPseudo ) { const sal_Char *pPseudo = 0; - switch( rPageDesc.GetPoolFmtId() ) + switch( rPageDesc.GetPoolFormatId() ) { case RES_POOLPAGE_FIRST: pPseudo = sCSS1_first; break; case RES_POOLPAGE_LEFT: pPseudo = sCSS1_left; break; @@ -1746,7 +1746,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc, } // Export the distance-Attributes as normally - const SwFrmFmt &rMaster = rPageDesc.GetMaster(); + const SwFrameFormat &rMaster = rPageDesc.GetMaster(); SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(), RES_LR_SPACE, RES_UL_SPACE ); aItemSet.Set( rMaster.GetAttrSet(), true ); @@ -1777,7 +1777,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc, return rWrt; } -static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, +static Writer& OutCSS1_SwFootnoteInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, SwDoc *pDoc, sal_uInt16 nNotes, bool bEndNote ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1796,12 +1796,12 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, rHTMLWrt.Strm().WriteCharPtr( sCSS1_rule_end ); } - const SwCharFmt *pSymCharFmt = rInfo.GetCharFmt( *pDoc ); - if( pSymCharFmt ) + const SwCharFormat *pSymCharFormat = rInfo.GetCharFormat( *pDoc ); + if( pSymCharFormat ) { - const SfxItemSet& rFmtItemSet = pSymCharFmt->GetAttrSet(); - SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() ); - aItemSet.Set( rFmtItemSet, true ); + const SfxItemSet& rFormatItemSet = pSymCharFormat->GetAttrSet(); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), rFormatItemSet.GetRanges() ); + aItemSet.Set( rFormatItemSet, true ); // If there are footnotes or endnotes, then all Attributes have to be // exported, so that Netscape displays the document correctly. @@ -1809,10 +1809,10 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, // footnote and endnote template. if( nNotes == 0 && rHTMLWrt.pTemplate ) { - SwFmt *pRefFmt = rHTMLWrt.pTemplate->getIDocumentStylePoolAccess().GetCharFmtFromPool( + SwFormat *pRefFormat = rHTMLWrt.pTemplate->getIDocumentStylePoolAccess().GetCharFormatFromPool( static_cast< sal_uInt16 >(bEndNote ? RES_POOLCHR_ENDNOTE : RES_POOLCHR_FOOTNOTE) ); - if( pRefFmt ) - SwHTMLWriter::SubtractItemSet( aItemSet, pRefFmt->GetAttrSet(), + if( pRefFormat ) + SwHTMLWriter::SubtractItemSet( aItemSet, pRefFormat->GetAttrSet(), true ); } if( aItemSet.Count() ) @@ -1821,7 +1821,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo, ( bEndNote ? OUString(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) : OUString(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym)); if( OutCSS1Rule( rHTMLWrt, aSelector, aItemSet, true, false )) - rHTMLWrt.aScriptTextStyles.insert( pSymCharFmt->GetName() ); + rHTMLWrt.aScriptTextStyles.insert( pSymCharFormat->GetName() ); } } @@ -1928,16 +1928,16 @@ Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule, SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_STYLE_OPT | CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_PARA ); - const SwNumFmt& rNumFmt = rNumRule.Get( nLevel ); + const SwNumFormat& rNumFormat = rNumRule.Get( nLevel ); - long nLSpace = rNumFmt.GetAbsLSpace(); - long nFirstLineOffset = rNumFmt.GetFirstLineOffset(); + long nLSpace = rNumFormat.GetAbsLSpace(); + long nFirstLineOffset = rNumFormat.GetFirstLineOffset(); long nDfltFirstLineOffset = HTML_NUMBUL_INDENT; if( nLevel > 0 ) { - const SwNumFmt& rPrevNumFmt = rNumRule.Get( nLevel-1 ); - nLSpace -= rPrevNumFmt.GetAbsLSpace(); - nDfltFirstLineOffset = rPrevNumFmt.GetFirstLineOffset(); + const SwNumFormat& rPrevNumFormat = rNumRule.Get( nLevel-1 ); + nLSpace -= rPrevNumFormat.GetAbsLSpace(); + nDfltFirstLineOffset = rPrevNumFormat.GetFirstLineOffset(); } if( rHTMLWrt.IsHTMLMode(HTMLMODE_LSPACE_IN_NUMBUL) && @@ -1954,7 +1954,7 @@ Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule, return rWrt; } -void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, +void SwHTMLWriter::OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, sal_uInt32 nFrmOpts, const SdrObject *pSdrObj, const SfxItemSet *pItemSet ) @@ -1963,12 +1963,12 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, CSS1_OUTMODE_ENCODE| CSS1_OUTMODE_FRAME ); - const SwFmtHoriOrient& rHoriOri = rFrmFmt.GetHoriOrient(); - SvxLRSpaceItem aLRItem( rFrmFmt.GetLRSpace() ); - SvxULSpaceItem aULItem( rFrmFmt.GetULSpace() ); + const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); + SvxLRSpaceItem aLRItem( rFrameFormat.GetLRSpace() ); + SvxULSpaceItem aULItem( rFrameFormat.GetULSpace() ); if( nFrmOpts & HTML_FRMOPT_S_ALIGN ) { - const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor(); + const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); switch( rAnchor.GetAnchorId() ) { case FLY_AT_PARA: @@ -2002,11 +2002,11 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, // top long nXPos=0, nYPos=0; bool bOutXPos = false, bOutYPos = false; - if( RES_DRAWFRMFMT == rFrmFmt.Which() ) + if( RES_DRAWFRMFMT == rFrameFormat.Which() ) { OSL_ENSURE( pSdrObj, "Do not pass a SdrObject. Inefficient" ); if( !pSdrObj ) - pSdrObj = rFrmFmt.FindSdrObject(); + pSdrObj = rFrameFormat.FindSdrObject(); OSL_ENSURE( pSdrObj, "Where is the SdrObject" ); if( pSdrObj ) { @@ -2022,7 +2022,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, nXPos = text::HoriOrientation::NONE == rHoriOri.GetHoriOrient() ? rHoriOri.GetPos() : 0; - const SwFmtVertOrient& rVertOri = rFrmFmt.GetVertOrient(); + const SwFormatVertOrient& rVertOri = rFrameFormat.GetVertOrient(); bOutYPos = text::RelOrientation::CHAR != rVertOri.GetRelationOrient(); nYPos = text::VertOrientation::NONE == rVertOri.GetVertOrient() ? rVertOri.GetPos() : 0; @@ -2069,11 +2069,11 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, // width/height if( nFrmOpts & HTML_FRMOPT_S_SIZE ) { - if( RES_DRAWFRMFMT == rFrmFmt.Which() ) + if( RES_DRAWFRMFMT == rFrameFormat.Which() ) { OSL_ENSURE( pSdrObj, "Do not pass a SdrObject. Inefficient" ); if( !pSdrObj ) - pSdrObj = rFrmFmt.FindSdrObject(); + pSdrObj = rFrameFormat.FindSdrObject(); OSL_ENSURE( pSdrObj, "Where is the SdrObject" ); if( pSdrObj ) { @@ -2110,11 +2110,11 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE ) nMode |= CSS1_FRMSIZE_PIXEL; - OutCSS1_SwFmtFrmSize( *this, rFrmFmt.GetFrmSize(), nMode ); + OutCSS1_SwFormatFrmSize( *this, rFrameFormat.GetFrmSize(), nMode ); } } - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); // margin-* if( (nFrmOpts & HTML_FRMOPT_S_SPACE) && IsHTMLMode( HTMLMODE_FLY_MARGINS) ) @@ -2134,14 +2134,14 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, { const SfxPoolItem* pItem; if( nFrmOpts & HTML_FRMOPT_S_NOBORDER ) - OutCSS1_SvxBox( *this, rFrmFmt.GetBox() ); + OutCSS1_SvxBox( *this, rFrameFormat.GetBox() ); else if( SfxItemState::SET==rItemSet.GetItemState( RES_BOX, true, &pItem ) ) OutCSS1_SvxBox( *this, *pItem ); } // background (if, then the color must be set also) if( nFrmOpts & HTML_FRMOPT_S_BACKGROUND ) - OutCSS1_FrmFmtBackground( rFrmFmt ); + OutCSS1_FrameFormatBackground( rFrameFormat ); if( pItemSet ) OutCSS1_SfxItemSet( *pItemSet, false ); @@ -2150,46 +2150,46 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, Strm().WriteChar( '\"' ); } -void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt ) +void SwHTMLWriter::OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameFormat ) { SwCSS1OutMode aMode( *this, CSS1_OUTMODE_STYLE_OPT_ON | CSS1_OUTMODE_ENCODE| CSS1_OUTMODE_TABLE ); const SfxPoolItem *pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE ); if( IsHTMLMode( HTMLMODE_PRINT_EXT ) ) - OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, false ); + OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( *this, rItemSet, false ); if( SfxItemState::SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, false, &pItem ) ) - OutCSS1_SwFmtLayoutSplit( *this, *pItem ); + OutCSS1_SwFormatLayoutSplit( *this, *pItem ); if( !bFirstCSS1Property ) Strm().WriteChar( '\"' ); } -void SwHTMLWriter::OutCSS1_TableCellBorderHack(SwFrmFmt const& rFrmFmt) +void SwHTMLWriter::OutCSS1_TableCellBorderHack(SwFrameFormat const& rFrameFormat) { SwCSS1OutMode const aMode( *this, CSS1_OUTMODE_STYLE_OPT_ON|CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_TABLEBOX ); - OutCSS1_SvxBox(*this, rFrmFmt.GetBox()); + OutCSS1_SvxBox(*this, rFrameFormat.GetBox()); if (!bFirstCSS1Property) { this->Strm().WriteChar( cCSS1_style_opt_end ); } } -void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt, const SwFmtCol *pCol ) +void SwHTMLWriter::OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol ) { SwCSS1OutMode aMode( *this, CSS1_OUTMODE_STYLE_OPT_ON | CSS1_OUTMODE_ENCODE| CSS1_OUTMODE_SECTION ); const SfxPoolItem *pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION ); @@ -2203,7 +2203,7 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt, const SwF Strm().WriteChar( '\"' ); } -static bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt, +static bool OutCSS1_FrameFormatBrush( SwHTMLWriter& rWrt, const SvxBrushItem& rBrushItem ) { bool bWritten = false; @@ -2219,25 +2219,25 @@ static bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt, return bWritten; } -void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) +void SwHTMLWriter::OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFormat ) { // If the frame itself has a background, then export. - if( OutCSS1_FrmFmtBrush( *this, rFrmFmt.makeBackgroundBrushItem() ) ) + if( OutCSS1_FrameFormatBrush( *this, rFrameFormat.makeBackgroundBrushItem() ) ) return; // If the frame is not linked to a page, we use the background of the anchor. - const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor(); + const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); RndStdIds eAnchorId = rAnchor.GetAnchorId(); - const SwPosition *pAnchorPos = rAnchor.GetCntntAnchor(); + const SwPosition *pAnchorPos = rAnchor.GetContentAnchor(); if (FLY_AT_PAGE != eAnchorId && pAnchorPos) { const SwNode& rNode = pAnchorPos->nNode.GetNode(); - if( rNode.IsCntntNode() ) + if( rNode.IsContentNode() ) { // If the frame is linked to a content-node, // we take the background of the content-node, if it has one. - if( OutCSS1_FrmFmtBrush( *this, - rNode.GetCntntNode()->GetSwAttrSet().GetBackground()) ) + if( OutCSS1_FrameFormatBrush( *this, + rNode.GetContentNode()->GetSwAttrSet().GetBackground()) ) return; // Otherwise we also could be in a table @@ -2246,37 +2246,37 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) { const SwStartNode *pBoxSttNd = rNode.FindTableBoxStartNode(); const SwTableBox *pBox = - pTableNd->GetTable().GetTblBox( pBoxSttNd->GetIndex() ); + pTableNd->GetTable().GetTableBox( pBoxSttNd->GetIndex() ); // If the box has a background, we take it. - if( OutCSS1_FrmFmtBrush( *this, - pBox->GetFrmFmt()->makeBackgroundBrushItem() ) ) + if( OutCSS1_FrameFormatBrush( *this, + pBox->GetFrameFormat()->makeBackgroundBrushItem() ) ) return; // Otherwise we use that of the lines const SwTableLine *pLine = pBox->GetUpper(); while( pLine ) { - if( OutCSS1_FrmFmtBrush( *this, - pLine->GetFrmFmt()->makeBackgroundBrushItem() ) ) + if( OutCSS1_FrameFormatBrush( *this, + pLine->GetFrameFormat()->makeBackgroundBrushItem() ) ) return; pBox = pLine->GetUpper(); pLine = pBox ? pBox->GetUpper() : 0; } // If there was none either, we use the background of the table. - if( OutCSS1_FrmFmtBrush( *this, - pTableNd->GetTable().GetFrmFmt()->makeBackgroundBrushItem() ) ) + if( OutCSS1_FrameFormatBrush( *this, + pTableNd->GetTable().GetFrameFormat()->makeBackgroundBrushItem() ) ) return; } } // If the anchor is again in a Fly-Frame, use the background of the Fly-Frame. - const SwFrmFmt *pFrmFmt = rNode.GetFlyFmt(); - if( pFrmFmt ) + const SwFrameFormat *pFrameFormat = rNode.GetFlyFormat(); + if( pFrameFormat ) { - OutCSS1_FrmFmtBackground( *pFrmFmt ); + OutCSS1_FrameFormatBackground( *pFrameFormat ); return; } } @@ -2284,7 +2284,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) // At last there is the background of the page, and as the final rescue // the value of the Config. OSL_ENSURE( pCurrPageDesc, "no page template found" ); - if( !OutCSS1_FrmFmtBrush( *this, + if( !OutCSS1_FrameFormatBrush( *this, pCurrPageDesc->GetMaster().makeBackgroundBrushItem() ) ) { Color aColor( COL_WHITE ); @@ -2305,7 +2305,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ) } } -static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, +static Writer& OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( Writer& rWrt, const SvxUnderlineItem *pUItem, const SvxOverlineItem *pOItem, const SvxCrossedOutItem *pCOItem, @@ -2484,10 +2484,10 @@ static Writer& OutCSS1_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxCrossedOut( Writer& rWrt, const SfxPoolItem& rHt ) { // This function only exports Hints! - // Otherwise OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() is called directly. + // Otherwise OutCSS1_SvxTextLn_SvxCrOut_SvxBlink() is called directly. if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt, 0, 0, static_cast<const SvxCrossedOutItem *>(&rHt), 0 ); return rWrt; @@ -2654,10 +2654,10 @@ static Writer& OutCSS1_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxUnderline( Writer& rWrt, const SfxPoolItem& rHt ) { // This function only exports Hints! - // Otherwise OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() is called directly. + // Otherwise OutCSS1_SvxTextLn_SvxCrOut_SvxBlink() is called directly. if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt, static_cast<const SvxUnderlineItem *>(&rHt), 0, 0, 0 ); return rWrt; @@ -2666,10 +2666,10 @@ static Writer& OutCSS1_SvxUnderline( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxOverline( Writer& rWrt, const SfxPoolItem& rHt ) { // This function only exports Hints! - // Otherwise OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() is called directly. + // Otherwise OutCSS1_SvxTextLn_SvxCrOut_SvxBlink() is called directly. if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt, 0, static_cast<const SvxOverlineItem *>(&rHt), 0, 0 ); return rWrt; @@ -2730,10 +2730,10 @@ static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutCSS1_SvxBlink( Writer& rWrt, const SfxPoolItem& rHt ) { // This function only exports Hints! - // Otherwise OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink() is called directly. + // Otherwise OutCSS1_SvxTextLn_SvxCrOut_SvxBlink() is called directly. if( static_cast<SwHTMLWriter&>(rWrt).IsCSS1Source(CSS1_OUTMODE_HINT) ) - OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( rWrt, + OutCSS1_SvxTextLn_SvxCrOut_SvxBlink( rWrt, 0, 0, 0, static_cast<const SvxBlinkItem *>(&rHt) ); return rWrt; @@ -2819,11 +2819,11 @@ static Writer& OutCSS1_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -static Writer& OutCSS1_SvxFmtSplit( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutCSS1_SvxFormatSplit( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const sal_Char *pStr = static_cast<const SvxFmtSplitItem&>(rHt).GetValue() + const sal_Char *pStr = static_cast<const SvxFormatSplitItem&>(rHt).GetValue() ? sCSS1_PV_auto : sCSS1_PV_avoid; rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_page_break_inside, pStr ); @@ -2831,11 +2831,11 @@ static Writer& OutCSS1_SvxFmtSplit( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutCSS1_SwFormatLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const sal_Char *pStr = static_cast<const SwFmtLayoutSplit&>(rHt).GetValue() + const sal_Char *pStr = static_cast<const SwFormatLayoutSplit&>(rHt).GetValue() ? sCSS1_PV_auto : sCSS1_PV_avoid; rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_page_break_inside, pStr ); @@ -2863,9 +2863,9 @@ static Writer& OutCSS1_SvxOrphans( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt, - const SwFmtDrop& rDrop, - const SfxItemSet *pCharFmtItemSet ) +static void OutCSS1_SwFormatDropAttrs( SwHTMLWriter& rHWrt, + const SwFormatDrop& rDrop, + const SfxItemSet *pCharFormatItemSet ) { // Text flows around on right side rHWrt.OutCSS1_PropertyAscii( sCSS1_P_float, sCSS1_PV_left ); @@ -2879,17 +2879,17 @@ static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt, if( nDistance > 0 ) rHWrt.OutCSS1_UnitProperty( sCSS1_P_margin_right, nDistance ); - const SwCharFmt *pDCCharFmt = rDrop.GetCharFmt(); - if( pCharFmtItemSet ) - rHWrt.OutCSS1_SfxItemSet( *pCharFmtItemSet ); - else if( pDCCharFmt ) - rHWrt.OutCSS1_SfxItemSet( pDCCharFmt->GetAttrSet() ); + const SwCharFormat *pDCCharFormat = rDrop.GetCharFormat(); + if( pCharFormatItemSet ) + rHWrt.OutCSS1_SfxItemSet( *pCharFormatItemSet ); + else if( pDCCharFormat ) + rHWrt.OutCSS1_SfxItemSet( pDCCharFormat->GetAttrSet() ); else if( (rHWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_OFF) == CSS1_OUTMODE_RULE_OFF ) rHWrt.Strm().WriteCharPtr( sCSS1_rule_end ); } -static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutCSS1_SwFormatDrop( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -2903,7 +2903,7 @@ static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt ) rHTMLWrt.nCSS1Script|CSS1_OUTMODE_SPAN_TAG1_ON|CSS1_OUTMODE_ENCODE| CSS1_OUTMODE_DROPCAP ); - OutCSS1_SwFmtDropAttrs( rHTMLWrt, static_cast<const SwFmtDrop&>(rHt) ); + OutCSS1_SwFormatDropAttrs( rHTMLWrt, static_cast<const SwFormatDrop&>(rHt) ); // A "> is already printed by the calling OutCSS1_HintAsSpanTag. } else @@ -2914,12 +2914,12 @@ static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt, +static Writer& OutCSS1_SwFormatFrmSize( Writer& rWrt, const SfxPoolItem& rHt, sal_uInt16 nMode ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFmtFrmSize& rFSItem = static_cast<const SwFmtFrmSize&>(rHt); + const SwFormatFrmSize& rFSItem = static_cast<const SwFormatFrmSize&>(rHt); if( nMode & CSS1_FRMSIZE_WIDTH ) { @@ -2995,7 +2995,7 @@ static Writer& OutCSS1_SvxLRSpace( Writer& rWrt, const SfxPoolItem& rHt ) // match that of the current template // A left margin can exist because of a list nearby - long nLeftMargin = (long)rLRItem.GetTxtLeft() - rHTMLWrt.nLeftMargin; + long nLeftMargin = (long)rLRItem.GetTextLeft() - rHTMLWrt.nLeftMargin; if( rHTMLWrt.nDfltLeftMargin != nLeftMargin ) { rHTMLWrt.OutCSS1_UnitProperty( sCSS1_P_margin_left, nLeftMargin ); @@ -3013,7 +3013,7 @@ static Writer& OutCSS1_SvxLRSpace( Writer& rWrt, const SfxPoolItem& rHt ) } // The LineIndent of the first line might contain the room for numbering - long nFirstLineIndent = (long)rLRItem.GetTxtFirstLineOfst() - + long nFirstLineIndent = (long)rLRItem.GetTextFirstLineOfst() - rHTMLWrt.nFirstLineIndent; if( rHTMLWrt.nDfltFirstLineIndent != nFirstLineIndent ) { @@ -3092,10 +3092,10 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt, return rWrt; } -static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, - const SvxFmtBreakItem *pBreakItem, - const SwFmtPageDesc *pPDescItem, - const SvxFmtKeepItem *pKeepItem ) +static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, + const SvxFormatBreakItem *pBreakItem, + const SwFormatPageDesc *pPDescItem, + const SvxFormatKeepItem *pKeepItem ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -3136,7 +3136,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, const SwPageDesc *pPDesc = pPDescItem->GetPageDesc(); if( pPDesc ) { - switch( pPDesc->GetPoolFmtId() ) + switch( pPDesc->GetPoolFormatId() ) { case RES_POOLPAGE_LEFT: pBreakBefore = sCSS1_PV_left; break; case RES_POOLPAGE_RIGHT: pBreakBefore = sCSS1_PV_right; break; @@ -3159,30 +3159,30 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, return rWrt; } -static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt, +static Writer& OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( Writer& rWrt, const SfxItemSet& rItemSet, bool bDeep ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); const SfxPoolItem *pItem; - const SvxFmtBreakItem *pBreakItem = 0; + const SvxFormatBreakItem *pBreakItem = 0; if( SfxItemState::SET==rItemSet.GetItemState( RES_BREAK, bDeep, &pItem )) - pBreakItem = static_cast<const SvxFmtBreakItem *>(pItem); + pBreakItem = static_cast<const SvxFormatBreakItem *>(pItem); - const SwFmtPageDesc *pPDescItem = 0; + const SwFormatPageDesc *pPDescItem = 0; if( ( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) || !rHTMLWrt.bCSS1IgnoreFirstPageDesc || rHTMLWrt.pStartNdIdx->GetIndex() != rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() ) && SfxItemState::SET==rItemSet.GetItemState( RES_PAGEDESC, bDeep, &pItem )) - pPDescItem = static_cast<const SwFmtPageDesc*>(pItem); + pPDescItem = static_cast<const SwFormatPageDesc*>(pItem); - const SvxFmtKeepItem *pKeepItem = 0; + const SvxFormatKeepItem *pKeepItem = 0; if( SfxItemState::SET==rItemSet.GetItemState( RES_KEEP, bDeep, &pItem )) - pKeepItem = static_cast<const SvxFmtKeepItem *>(pItem); + pKeepItem = static_cast<const SvxFormatKeepItem *>(pItem); if( pBreakItem || pPDescItem || pKeepItem ) - OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( rWrt, pBreakItem, + OutCSS1_SvxFormatBreak_SwFormatPDesc_SvxFormatKeep( rWrt, pBreakItem, pPDescItem, pKeepItem ); return rWrt; @@ -3605,12 +3605,12 @@ SwAttrFnTab aCSS1AttrFnTab = { /* RES_PARATR_LINESPACING */ OutCSS1_SvxLineSpacing, /* RES_PARATR_ADJUST */ OutCSS1_SvxAdjust, -/* RES_PARATR_SPLIT */ OutCSS1_SvxFmtSplit, +/* RES_PARATR_SPLIT */ OutCSS1_SvxFormatSplit, /* RES_PARATR_ORPHANS */ OutCSS1_SvxOrphans, /* RES_PARATR_WIDOWS */ OutCSS1_SvxWidows, /* RES_PARATR_TABSTOP */ 0, /* RES_PARATR_HYPHENZONE*/ 0, -/* RES_PARATR_DROP */ OutCSS1_SwFmtDrop, +/* RES_PARATR_DROP */ OutCSS1_SwFormatDrop, /* RES_PARATR_REGISTER */ 0, // neu: Registerhaltigkeit /* RES_PARATR_NUMRULE */ 0, /* RES_PARATR_SCRIPTSPACE */ 0, diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 5eb03147a750..879ac21a481e 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -122,7 +122,7 @@ void SwHTMLWriter::OutAndSetDefList( sal_uInt16 nNewLvl ) if( nDefListLvl < nNewLvl ) { // output </pre> for the previous(!) pararagraph, if required. - // Preferable, the <pre> is exported by OutHTML_SwFmtOff for the + // Preferable, the <pre> is exported by OutHTML_SwFormatOff for the // previous paragraph already, but that's not possible, because a very // deep look at the next paragraph (this one) is required to figure // out that a def list starts here. @@ -189,17 +189,17 @@ sal_uInt16 SwHTMLWriter::GetCSS1ScriptForScriptType( sal_uInt16 nScriptType ) * Formate wie folgt ausgeben: * - fuer Formate, fuer die es entsprechende HTML-Tags gibt wird das * Tag ausgegeben - * - fuer alle anderen wird ein Absatz-Tag <P> ausgegeben und bUserFmt + * - fuer alle anderen wird ein Absatz-Tag <P> ausgegeben und bUserFormat * gesetzt * - Wenn eine Absatz-Ausrichtung am uebergebenen Item-Set des Nodes * oder im Item-Set des Format gesetzt ist, wird ein ALIGN=xxx ausgegeben, * sofern HTML es zulaesst * - in jedem Fall wird harte Attributierung als STYLE-Option geschrieben. - * Wenn bUserFmt nicht gesetzt ist, wird nur der uebergebene Item-Set + * Wenn bUserFormat nicht gesetzt ist, wird nur der uebergebene Item-Set * betrachtet. Sonst werden auch Attribute des Formats ausgegeben. */ -struct SwHTMLTxtCollOutputInfo +struct SwHTMLTextCollOutputInfo { OString aToken; // auszugendens End-Token std::unique_ptr<SfxItemSet> pItemSet; // harte Attributierung @@ -209,29 +209,29 @@ struct SwHTMLTxtCollOutputInfo bool bOutPara; // ein </P> soll ausgegeben werden bool bOutDiv; // write a </DIV> - SwHTMLTxtCollOutputInfo() : + SwHTMLTextCollOutputInfo() : bInNumBulList( false ), bParaPossible( false ), bOutPara( false ), bOutDiv( false ) {} - ~SwHTMLTxtCollOutputInfo(); + ~SwHTMLTextCollOutputInfo(); bool HasParaToken() const { return aToken.getLength()==1 && aToken[0]=='P'; } bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); } }; -SwHTMLTxtCollOutputInfo::~SwHTMLTxtCollOutputInfo() +SwHTMLTextCollOutputInfo::~SwHTMLTextCollOutputInfo() { } -SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, +SwHTMLFormatInfo::SwHTMLFormatInfo( const SwFormat *pF, SwDoc *pDoc, SwDoc *pTemplate, bool bOutStyles, LanguageType eDfltLang, sal_uInt16 nCSS1Script, bool bHardDrop ) - : pFmt(pF) - , pRefFmt(0) + : pFormat(pF) + , pRefFormat(0) , pItemSet(0) , nLeftMargin(0) , nRightMargin(0) @@ -242,17 +242,17 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, { sal_uInt16 nRefPoolId = 0; // Den Selektor des Formats holen - sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass, + sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFormat, aToken, aClass, nRefPoolId ); OSL_ENSURE( nDeep ? !aToken.isEmpty() : aToken.isEmpty(), "Hier stimmt doch was mit dem Token nicht!" ); OSL_ENSURE( nDeep ? nRefPoolId != 0 : nRefPoolId == 0, "Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" ); - bool bTxtColl = pFmt->Which() == RES_TXTFMTCOLL || - pFmt->Which() == RES_CONDTXTFMTCOLL; + bool bTextColl = pFormat->Which() == RES_TXTFMTCOLL || + pFormat->Which() == RES_CONDTXTFMTCOLL; - const SwFmt *pReferenceFmt = 0; // Vergleichs-Format + const SwFormat *pReferenceFormat = 0; // Vergleichs-Format bool bSetDefaults = true, bClearSame = true; if( nDeep != 0 ) { @@ -268,7 +268,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, case CSS1_FMT_CMPREF: // fuer HTML-Tag-Vorlagen die Unterscheide zum Original // (sofern verfuegbar) - pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, + pReferenceFormat = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); break; @@ -276,38 +276,38 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, // sonst die zur HTML-Tag-Vorlage des Originals oder des // aktuellen Doks, wenn die nicht verfuegbar ist if( pTemplate ) - pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, + pReferenceFormat = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); else - pReferenceFmt = SwHTMLWriter::GetParentFmt( *pFmt, nDeep ); + pReferenceFormat = SwHTMLWriter::GetParentFormat( *pFormat, nDeep ); break; } } } - else if( bTxtColl ) + else if( bTextColl ) { // Nicht von einer HTML-Tag-Vorlage abgeleitete Absatz-Vorlagen // muessen als harte Attributierung relativ zur Textkoerper-Volage // exportiert werden. Fuer Nicht-Styles-Export sollte die der // HTML-Vorlage als Referenz dienen if( !bOutStyles && pTemplate ) - pReferenceFmt = pTemplate->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_TEXT, false ); + pReferenceFormat = pTemplate->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT, false ); else - pReferenceFmt = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_TEXT, false ); + pReferenceFormat = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT, false ); } - if( pReferenceFmt || nDeep==0 ) + if( pReferenceFormat || nDeep==0 ) { - pItemSet = new SfxItemSet( *pFmt->GetAttrSet().GetPool(), - pFmt->GetAttrSet().GetRanges() ); + pItemSet = new SfxItemSet( *pFormat->GetAttrSet().GetPool(), + pFormat->GetAttrSet().GetRanges() ); // wenn Unterschiede zu einer anderen Vorlage geschrieben werden // sollen ist harte Attributierung noetig. Fuer Vorlagen, die // nicht von HTML-Tag-Vorlagen abgeleitet sind, gilt das immer - pItemSet->Set( pFmt->GetAttrSet(), true ); + pItemSet->Set( pFormat->GetAttrSet(), true ); - if( pReferenceFmt ) - SwHTMLWriter::SubtractItemSet( *pItemSet, pReferenceFmt->GetAttrSet(), + if( pReferenceFormat ) + SwHTMLWriter::SubtractItemSet( *pItemSet, pReferenceFormat->GetAttrSet(), bSetDefaults, bClearSame ); // einen leeren Item-Set gleich loeschen, das spart speater @@ -319,7 +319,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, } } - if( bTxtColl ) + if( bTextColl ) { if( bOutStyles ) { @@ -357,15 +357,15 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, } for( sal_uInt16 i=0; i<4; i++ ) { - const SfxPoolItem& rRef = pFmt->GetFmtAttr( aWhichIds[nRef][i] ); + const SfxPoolItem& rRef = pFormat->GetFormatAttr( aWhichIds[nRef][i] ); for( sal_uInt16 j=0; j<2; j++ ) { - const SfxPoolItem& rSet = pFmt->GetFmtAttr( aWhichIds[aSets[j]][i] ); + const SfxPoolItem& rSet = pFormat->GetFormatAttr( aWhichIds[aSets[j]][i] ); if( rSet != rRef ) { if( !pItemSet ) - pItemSet = new SfxItemSet( *pFmt->GetAttrSet().GetPool(), - pFmt->GetAttrSet().GetRanges() ); + pItemSet = new SfxItemSet( *pFormat->GetAttrSet().GetPool(), + pFormat->GetAttrSet().GetRanges() ); pItemSet->Put( rSet ); } } @@ -376,24 +376,24 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, if( bOutStyles && bHardDrop && nDeep != 0 ) { const SfxPoolItem *pItem; - if( SfxItemState::SET==pFmt->GetAttrSet().GetItemState( + if( SfxItemState::SET==pFormat->GetAttrSet().GetItemState( RES_PARATR_DROP, true, &pItem ) ) { bool bPut = true; if( pTemplate ) { - pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); + pReferenceFormat = SwHTMLWriter::GetTemplateFormat( nRefPoolId, &pTemplate->getIDocumentStylePoolAccess() ); const SfxPoolItem *pRefItem; bool bRefItemSet = - SfxItemState::SET==pReferenceFmt->GetAttrSet().GetItemState( + SfxItemState::SET==pReferenceFormat->GetAttrSet().GetItemState( RES_PARATR_DROP, true, &pRefItem ); bPut = !bRefItemSet || *pItem!=*pRefItem; } if( bPut ) { if( !pItemSet ) - pItemSet = new SfxItemSet( *pFmt->GetAttrSet().GetPool(), - pFmt->GetAttrSet().GetRanges() ); + pItemSet = new SfxItemSet( *pFormat->GetAttrSet().GetPool(), + pFormat->GetAttrSet().GetRanges() ); pItemSet->Put( *pItem ); } } @@ -402,13 +402,13 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, // Die diversen default-Abstaende aus der Vorlage oder der // Vergleischs-Vorlage merken const SvxLRSpaceItem &rLRSpace = - (pReferenceFmt ? pReferenceFmt : pFmt)->GetLRSpace(); - nLeftMargin = rLRSpace.GetTxtLeft(); + (pReferenceFormat ? pReferenceFormat : pFormat)->GetLRSpace(); + nLeftMargin = rLRSpace.GetTextLeft(); nRightMargin = rLRSpace.GetRight(); - nFirstLineIndent = rLRSpace.GetTxtFirstLineOfst(); + nFirstLineIndent = rLRSpace.GetTextFirstLineOfst(); const SvxULSpaceItem &rULSpace = - (pReferenceFmt ? pReferenceFmt : pFmt)->GetULSpace(); + (pReferenceFormat ? pReferenceFormat : pFormat)->GetULSpace(); nTopMargin = rULSpace.GetUpper(); nBottomMargin = rULSpace.GetLower(); @@ -416,13 +416,13 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, sal_uInt16 nWhichId = SwHTMLWriter::GetLangWhichIdFromScript( nCSS1Script ); const SvxLanguageItem& rLang = - static_cast<const SvxLanguageItem&>(pFmt->GetFmtAttr( nWhichId )); + static_cast<const SvxLanguageItem&>(pFormat->GetFormatAttr( nWhichId )); LanguageType eLang = rLang.GetLanguage(); if( eLang != eDfltLang ) { if( !pItemSet ) - pItemSet = new SfxItemSet( *pFmt->GetAttrSet().GetPool(), - pFmt->GetAttrSet().GetRanges() ); + pItemSet = new SfxItemSet( *pFormat->GetAttrSet().GetPool(), + pFormat->GetAttrSet().GetRanges() ); pItemSet->Put( rLang ); } @@ -434,12 +434,12 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, if( aWhichIds[i] != nWhichId ) { const SvxLanguageItem& rTmpLang = - static_cast<const SvxLanguageItem&>(pFmt->GetFmtAttr(aWhichIds[i])); + static_cast<const SvxLanguageItem&>(pFormat->GetFormatAttr(aWhichIds[i])); if( rTmpLang.GetLanguage() != eLang ) { if( !pItemSet ) - pItemSet = new SfxItemSet( *pFmt->GetAttrSet().GetPool(), - pFmt->GetAttrSet().GetRanges() ); + pItemSet = new SfxItemSet( *pFormat->GetAttrSet().GetPool(), + pFormat->GetAttrSet().GetRanges() ); pItemSet->Put( rTmpLang ); } } @@ -447,16 +447,16 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, } } -SwHTMLFmtInfo::~SwHTMLFmtInfo() +SwHTMLFormatInfo::~SwHTMLFormatInfo() { delete pItemSet; } -void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, +void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, const SfxItemSet *pNodeItemSet, - SwHTMLTxtCollOutputInfo& rInfo ) + SwHTMLTextCollOutputInfo& rInfo ) { - OSL_ENSURE( RES_CONDTXTFMTCOLL==rFmt.Which() || RES_TXTFMTCOLL==rFmt.Which(), + OSL_ENSURE( RES_CONDTXTFMTCOLL==rFormat.Which() || RES_TXTFMTCOLL==rFormat.Which(), "keine Absatz-Vorlage" ); SwHTMLWriter & rHWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -477,7 +477,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, sal_uInt8 nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik // Sind wir in einer Aufzaehlungs- oder Numerierungliste? - const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode().GetTxtNode(); + const SwTextNode* pTextNd = rWrt.pCurPam->GetNode().GetTextNode(); SwHTMLNumRuleInfo aNumInfo; if( rHWrt.GetNextNumInfo() ) @@ -487,7 +487,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } else { - aNumInfo.Set( *pTxtNd ); + aNumInfo.Set( *pTextNd ); } if( aNumInfo.GetNumRule() ) @@ -499,9 +499,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, bNumbered = aNumInfo.IsNumbered(); sal_uInt8 nLvl = aNumInfo.GetLevel(); - OSL_ENSURE( pTxtNd->GetActualListLevel() == nLvl, + OSL_ENSURE( pTextNd->GetActualListLevel() == nLvl, "Gemerkter Num-Level ist falsch" ); - OSL_ENSURE( bNumbered == pTxtNd->IsCountedInList(), + OSL_ENSURE( bNumbered == pTextNd->IsCountedInList(), "Gemerkter Numerierungs-Zustand ist falsch" ); if( bNumbered ) @@ -512,9 +512,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // - <nNumStart> has to contain the restart value, if the // numbering is restarted at this text node. Value <USHRT_MAX> // indicates, that no additional restart value has to be written. - if ( pTxtNd->IsListRestart() ) + if ( pTextNd->IsListRestart() ) { - nNumStart = static_cast< sal_uInt16 >(pTxtNd->GetActualListStartValue()); + nNumStart = static_cast< sal_uInt16 >(pTextNd->GetActualListStartValue()); } OSL_ENSURE( rHWrt.nLastParaToken == 0, "<PRE> wurde nicht vor <LI> beendet." ); @@ -522,32 +522,32 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } // Jetzt holen wir das Token und ggf. die Klasse - SwHTMLFmtInfo aFmtInfo( &rFmt ); - SwHTMLFmtInfo *pFmtInfo; - SwHTMLFmtInfos::iterator it = rHWrt.aTxtCollInfos.find( aFmtInfo ); - if( it != rHWrt.aTxtCollInfos.end() ) + SwHTMLFormatInfo aFormatInfo( &rFormat ); + SwHTMLFormatInfo *pFormatInfo; + SwHTMLFormatInfos::iterator it = rHWrt.aTextCollInfos.find( aFormatInfo ); + if( it != rHWrt.aTextCollInfos.end() ) { - pFmtInfo = &*it; + pFormatInfo = &*it; } else { - pFmtInfo = new SwHTMLFmtInfo( &rFmt, rWrt.pDoc, rHWrt.pTemplate, + pFormatInfo = new SwHTMLFormatInfo( &rFormat, rWrt.pDoc, rHWrt.pTemplate, rHWrt.bCfgOutStyles, rHWrt.eLang, rHWrt.nCSS1Script, false ); - rHWrt.aTxtCollInfos.insert( pFmtInfo ); - if( rHWrt.aScriptParaStyles.count( rFmt.GetName() ) ) - pFmtInfo->bScriptDependent = true; + rHWrt.aTextCollInfos.insert( pFormatInfo ); + if( rHWrt.aScriptParaStyles.count( rFormat.GetName() ) ) + pFormatInfo->bScriptDependent = true; } // Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel bool bOutNewLine = false; // nur ein LF ausgeben? - if( !pFmtInfo->aToken.isEmpty() ) + if( !pFormatInfo->aToken.isEmpty() ) { // Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer // solchen abgeleitet - rInfo.aToken = pFmtInfo->aToken; + rInfo.aToken = pFormatInfo->aToken; if (rInfo.aToken == OOO_STRING_SVTOOLS_HTML_address) { @@ -594,10 +594,10 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } // Falls noetig, die harte Attributierung der Vorlage uebernehmen - if( pFmtInfo->pItemSet ) + if( pFormatInfo->pItemSet ) { OSL_ENSURE( !rInfo.pItemSet.get(), "Wo kommt der Item-Set her?" ); - rInfo.pItemSet.reset(new SfxItemSet( *pFmtInfo->pItemSet )); + rInfo.pItemSet.reset(new SfxItemSet( *pFormatInfo->pItemSet )); } // und noch die harte Attributierung des Absatzes dazunehmen @@ -612,7 +612,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // den unteren Absatz-Abstand brauchen wir noch const SvxULSpaceItem& rULSpace = pNodeItemSet ? static_cast<const SvxULSpaceItem &>(pNodeItemSet->Get(RES_UL_SPACE)) - : rFmt.GetULSpace(); + : rFormat.GetULSpace(); if( (rHWrt.bOutHeader && rWrt.pCurPam->GetPoint()->nNode.GetIndex() == @@ -629,7 +629,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if (!rInfo.pItemSet.get()) { - rInfo.pItemSet.reset(new SfxItemSet(*rFmt.GetAttrSet().GetPool(), RES_UL_SPACE, RES_UL_SPACE)); + rInfo.pItemSet.reset(new SfxItemSet(*rFormat.GetAttrSet().GetPool(), RES_UL_SPACE, RES_UL_SPACE)); } rInfo.pItemSet->Put( aULSpaceItem ); } @@ -667,15 +667,15 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // eine Definitions-Liste const SvxLRSpaceItem& rLRSpace = pNodeItemSet ? static_cast<const SvxLRSpaceItem &>(pNodeItemSet->Get(RES_LR_SPACE)) - : rFmt.GetLRSpace(); + : rFormat.GetLRSpace(); if( (!rHWrt.bCfgOutStyles || bForceDL) && !rInfo.bInNumBulList ) { sal_Int32 nLeftMargin; if( bForceDL ) - nLeftMargin = rLRSpace.GetTxtLeft(); + nLeftMargin = rLRSpace.GetTextLeft(); else - nLeftMargin = rLRSpace.GetTxtLeft() > pFmtInfo->nLeftMargin - ? rLRSpace.GetTxtLeft() - pFmtInfo->nLeftMargin + nLeftMargin = rLRSpace.GetTextLeft() > pFormatInfo->nLeftMargin + ? rLRSpace.GetTextLeft() - pFormatInfo->nLeftMargin : 0; if( nLeftMargin > 0 && rHWrt.nDefListMargin > 0 ) @@ -693,9 +693,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0; } - bool bIsNextTxtNode = + bool bIsNextTextNode = rWrt.pDoc->GetNodes()[rWrt.pCurPam->GetPoint()->nNode.GetIndex()+1] - ->IsTxtNode(); + ->IsTextNode(); if( bForceDL && bDT ) { @@ -705,7 +705,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } else if( !nNewDefListLvl && !rHWrt.bCfgOutStyles && bPara && rULSpace.GetLower()==0 && - ((bUseParSpace && bIsNextTxtNode) || rHWrt.nDefListLvl==1) && + ((bUseParSpace && bIsNextTextNode) || rHWrt.nDefListLvl==1) && (!pAdjItem || SVX_ADJUST_LEFT== static_cast<const SvxAdjustItem *>(pAdjItem)->GetAdjust()) ) { @@ -737,17 +737,17 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // Die Defaults aus der Vorlage merken, denn sie muessen nicht // exportiert werden - rHWrt.nDfltLeftMargin = pFmtInfo->nLeftMargin; - rHWrt.nDfltRightMargin = pFmtInfo->nRightMargin; - rHWrt.nDfltFirstLineIndent = pFmtInfo->nFirstLineIndent; + rHWrt.nDfltLeftMargin = pFormatInfo->nLeftMargin; + rHWrt.nDfltRightMargin = pFormatInfo->nRightMargin; + rHWrt.nDfltFirstLineIndent = pFormatInfo->nFirstLineIndent; if( rInfo.bInNumBulList ) { if( !rHWrt.IsHTMLMode( HTMLMODE_LSPACE_IN_NUMBUL ) ) - rHWrt.nDfltLeftMargin = rLRSpace.GetTxtLeft(); + rHWrt.nDfltLeftMargin = rLRSpace.GetTextLeft(); // In Numerierungs-Listen keinen Ertzeilen-Einzug ausgeben. - rHWrt.nFirstLineIndent = rLRSpace.GetTxtFirstLineOfst(); + rHWrt.nFirstLineIndent = rLRSpace.GetTextFirstLineOfst(); } if( rInfo.bInNumBulList && bNumbered && bPara && !rHWrt.bCfgOutStyles ) @@ -764,7 +764,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } else { - rHWrt.nDfltTopMargin = pFmtInfo->nTopMargin; + rHWrt.nDfltTopMargin = pFormatInfo->nTopMargin; // Wenn im letzten Absatz einer Tabelle der // untere Absatz-Abstand veraendert wird, vertut sich // Netscape total. Deshalb exportieren wir hier erstmal @@ -773,7 +773,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( rHWrt.bCfgNetscape4 && !bUseParSpace ) rHWrt.nDfltBottomMargin = rULSpace.GetLower(); else - rHWrt.nDfltBottomMargin = pFmtInfo->nBottomMargin; + rHWrt.nDfltBottomMargin = pFormatInfo->nBottomMargin; } if( rHWrt.nDefListLvl ) @@ -816,7 +816,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_division); rWrt.Strm().WriteOString( sOut ); - rHWrt.bTxtAttr = false; + rHWrt.bTextAttr = false; rHWrt.bOutOpts = true; OutHTML_SvxAdjust( rWrt, *pAdjItem ); rWrt.Strm().WriteChar( '>' ); @@ -868,7 +868,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, sal_uInt16 nDir = rHWrt.GetHTMLDirection( (pNodeItemSet ? static_cast < const SvxFrameDirectionItem& >( pNodeItemSet->Get( RES_FRAMEDIR ) ) - : rFmt.GetFrmDir() ).GetValue() ); + : rFormat.GetFrmDir() ).GetValue() ); // Ein <P> wird nur geschrieben, wenn // - wir in keiner OL/UL/DL sind, oder @@ -890,7 +890,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, rHWrt.bCfgOutStyles ) { // jetzt werden Optionen ausgegeben - rHWrt.bTxtAttr = false; + rHWrt.bTextAttr = false; rHWrt.bOutOpts = true; OString sOut = "<" + aToken; @@ -913,13 +913,13 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } if( rHWrt.bCfgOutStyles && - (!pFmtInfo->aClass.isEmpty() || pFmtInfo->bScriptDependent) ) + (!pFormatInfo->aClass.isEmpty() || pFormatInfo->bScriptDependent) ) { sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\""; rWrt.Strm().WriteOString( sOut ); sOut = ""; - OUString aClass( pFmtInfo->aClass ); - if( pFmtInfo->bScriptDependent ) + OUString aClass( pFormatInfo->aClass ); + if( pFormatInfo->bScriptDependent ) { if( !aClass.isEmpty() ) aClass += "-"; @@ -948,7 +948,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, OutHTML_SvxAdjust( rWrt, *pAdjItem ); rHWrt.bParaDotLeaders = bPara && rHWrt.bCfgPrintLayout && rHWrt.indexOfDotLeaders( - pTxtNd->GetAnyFmtColl().GetPoolFmtId(), pTxtNd->GetTxt()) > -1; + pTextNd->GetAnyFormatColl().GetPoolFormatId(), pTextNd->GetText()) > -1; // und nun ggf. noch die STYLE-Option if( rHWrt.bCfgOutStyles && rInfo.pItemSet && !bNoStyle) @@ -981,8 +981,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, { OSL_ENSURE( aNumInfo.GetNumRule(), "Wo ist die Numerierung geblieben???" ); OSL_ENSURE( nBulletGrfLvl < MAXLEVEL, "So viele Ebenen gibt's nicht" ); - const SwNumFmt& rNumFmt = aNumInfo.GetNumRule()->Get(nBulletGrfLvl); - OutHTML_BulletImage( rWrt, OOO_STRING_SVTOOLS_HTML_image, rNumFmt.GetBrush() ); + const SwNumFormat& rNumFormat = aNumInfo.GetNumRule()->Get(nBulletGrfLvl); + OutHTML_BulletImage( rWrt, OOO_STRING_SVTOOLS_HTML_image, rNumFormat.GetBrush() ); } rHWrt.GetNumInfo() = aNumInfo; @@ -997,7 +997,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, rHWrt.nFirstLineIndent = 0; } -void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo ) +void OutHTML_SwFormatOff( Writer& rWrt, const SwHTMLTextCollOutputInfo& rInfo ) { SwHTMLWriter & rHWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1116,7 +1116,7 @@ class HTMLEndPosLst SwDoc *pDoc; // das aktuelle Dokument SwDoc* pTemplate; // die HTML-Vorlage (oder 0) const Color* pDfltColor;// die Default-Vordergrund-Farbe - std::set<OUString>& rScriptTxtStyles; + std::set<OUString>& rScriptTextStyles; sal_uLong nHTMLMode; bool bOutStyles : 1; // werden Styles exportiert @@ -1155,11 +1155,11 @@ class HTMLEndPosLst // Insert without taking care of script void InsertNoScript( const SfxPoolItem& rItem, sal_Int32 nStart, - sal_Int32 nEnd, SwHTMLFmtInfos& rFmtInfos, + sal_Int32 nEnd, SwHTMLFormatInfos& rFormatInfos, bool bParaAttrs=false ); - const SwHTMLFmtInfo *GetFmtInfo( const SwFmt& rFmt, - SwHTMLFmtInfos& rFmtInfos ); + const SwHTMLFormatInfo *GetFormatInfo( const SwFormat& rFormat, + SwHTMLFormatInfos& rFormatInfos ); public: @@ -1170,12 +1170,12 @@ public: // Ein Attribut einfuegen void Insert( const SfxPoolItem& rItem, sal_Int32 nStart, sal_Int32 nEnd, - SwHTMLFmtInfos& rFmtInfos, bool bParaAttrs=false ); + SwHTMLFormatInfos& rFormatInfos, bool bParaAttrs=false ); void Insert( const SfxItemSet& rItemSet, sal_Int32 nStart, sal_Int32 nEnd, - SwHTMLFmtInfos& rFmtInfos, bool bDeep, + SwHTMLFormatInfos& rFormatInfos, bool bDeep, bool bParaAttrs=false ); - void Insert( const SwDrawFrmFmt& rFmt, sal_Int32 nPos, - SwHTMLFmtInfos& rFmtInfos ); + void Insert( const SwDrawFrameFormat& rFormat, sal_Int32 nPos, + SwHTMLFormatInfos& rFormatInfos ); sal_uInt16 GetScriptAtPos( sal_Int32 nPos, sal_uInt16 nWeak=CSS1_OUTMODE_ANY_SCRIPT ); @@ -1611,26 +1611,26 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, sal_Int32 nStart, } } -const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt, - SwHTMLFmtInfos& rFmtInfos ) +const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat, + SwHTMLFormatInfos& rFormatInfos ) { - SwHTMLFmtInfo *pFmtInfo; - const SwHTMLFmtInfo aFmtInfo( &rFmt ); - SwHTMLFmtInfos::iterator it = rFmtInfos.find( aFmtInfo ); - if( it != rFmtInfos.end() ) + SwHTMLFormatInfo *pFormatInfo; + const SwHTMLFormatInfo aFormatInfo( &rFormat ); + SwHTMLFormatInfos::iterator it = rFormatInfos.find( aFormatInfo ); + if( it != rFormatInfos.end() ) { - pFmtInfo = &*it; + pFormatInfo = &*it; } else { - pFmtInfo = new SwHTMLFmtInfo( &rFmt, pDoc, pTemplate, + pFormatInfo = new SwHTMLFormatInfo( &rFormat, pDoc, pTemplate, bOutStyles ); - rFmtInfos.insert( pFmtInfo ); - if ( rScriptTxtStyles.count( rFmt.GetName() ) ) - pFmtInfo->bScriptDependent = true; + rFormatInfos.insert( pFormatInfo ); + if ( rScriptTextStyles.count( rFormat.GetName() ) ) + pFormatInfo->bScriptDependent = true; } - return pFmtInfo; + return pFormatInfo; } HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, @@ -1640,7 +1640,7 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, pDoc( pD ), pTemplate( pTempl ), pDfltColor( pDfltCol ), - rScriptTxtStyles( rStyles ), + rScriptTextStyles( rStyles ), nHTMLMode( nMode ), bOutStyles( bStyles ) { @@ -1663,7 +1663,7 @@ HTMLEndPosLst::~HTMLEndPosLst() void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, sal_Int32 nStart, sal_Int32 nEnd, - SwHTMLFmtInfos& rFmtInfos, bool bParaAttrs ) + SwHTMLFormatInfos& rFormatInfos, bool bParaAttrs ) { // kein Bereich ?? dann nicht aufnehmen, wird nie wirksam !! if( nStart != nEnd ) @@ -1711,30 +1711,30 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, { OSL_ENSURE( RES_TXTATR_CHARFMT == rItem.Which(), "Doch keine Zeichen-Vorlage" ); - const SwFmtCharFmt& rChrFmt = static_cast<const SwFmtCharFmt&>(rItem); - const SwCharFmt* pFmt = rChrFmt.GetCharFmt(); + const SwFormatCharFormat& rChrFormat = static_cast<const SwFormatCharFormat&>(rItem); + const SwCharFormat* pFormat = rChrFormat.GetCharFormat(); - const SwHTMLFmtInfo *pFmtInfo = GetFmtInfo( *pFmt, rFmtInfos ); - if( !pFmtInfo->aToken.isEmpty() ) + const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos ); + if( !pFormatInfo->aToken.isEmpty() ) { // das Zeichenvorlagen-Tag muss vor den harten // Attributen ausgegeben werden InsertItem( rItem, nStart, nEnd ); } - if( pFmtInfo->pItemSet ) + if( pFormatInfo->pItemSet ) { - Insert( *pFmtInfo->pItemSet, nStart, nEnd, - rFmtInfos, true, bParaAttrs ); + Insert( *pFormatInfo->pItemSet, nStart, nEnd, + rFormatInfos, true, bParaAttrs ); } } break; case HTML_AUTOFMT_VALUE: { - const SwFmtAutoFmt& rAutoFmt = static_cast<const SwFmtAutoFmt&>(rItem); - const std::shared_ptr<SfxItemSet> pSet = rAutoFmt.GetStyleHandle(); + const SwFormatAutoFormat& rAutoFormat = static_cast<const SwFormatAutoFormat&>(rItem); + const std::shared_ptr<SfxItemSet> pSet = rAutoFormat.GetStyleHandle(); if( pSet.get() ) - Insert( *pSet.get(), nStart, nEnd, rFmtInfos, true, bParaAttrs ); + Insert( *pSet.get(), nStart, nEnd, rFormatInfos, true, bParaAttrs ); } break; @@ -1756,16 +1756,16 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, { OSL_ENSURE( RES_PARATR_DROP == rItem.Which(), "Doch kein Drop-Cap" ); - const SwFmtDrop& rDrop = static_cast<const SwFmtDrop&>(rItem); + const SwFormatDrop& rDrop = static_cast<const SwFormatDrop&>(rItem); nEnd = nStart + rDrop.GetChars(); if( !bOutStyles ) { // Zumindest die Attribute der Zeichenvorlage uebernehmen - const SwCharFmt *pCharFmt = rDrop.GetCharFmt(); - if( pCharFmt ) + const SwCharFormat *pCharFormat = rDrop.GetCharFormat(); + if( pCharFormat ) { - Insert( pCharFmt->GetAttrSet(), nStart, nEnd, - rFmtInfos, true, bParaAttrs ); + Insert( pCharFormat->GetAttrSet(), nStart, nEnd, + rFormatInfos, true, bParaAttrs ); } } else @@ -1787,7 +1787,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, sal_Int32 nStart, sal_Int32 nEnd, - SwHTMLFmtInfos& rFmtInfos, bool bParaAttrs ) + SwHTMLFormatInfos& rFormatInfos, bool bParaAttrs ) { bool bDependsOnScript = false, bDependsOnAnyScript = false; sal_uInt16 nScript = i18n::ScriptType::LATIN; @@ -1821,10 +1821,10 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, break; case RES_TXTATR_CHARFMT: { - const SwFmtCharFmt& rChrFmt = static_cast<const SwFmtCharFmt&>(rItem); - const SwCharFmt* pFmt = rChrFmt.GetCharFmt(); - const SwHTMLFmtInfo *pFmtInfo = GetFmtInfo( *pFmt, rFmtInfos ); - if( pFmtInfo->bScriptDependent ) + const SwFormatCharFormat& rChrFormat = static_cast<const SwFormatCharFormat&>(rItem); + const SwCharFormat* pFormat = rChrFormat.GetCharFormat(); + const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos ); + if( pFormatInfo->bScriptDependent ) { bDependsOnScript = true; bDependsOnAnyScript = true; @@ -1833,10 +1833,10 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, break; case RES_TXTATR_INETFMT: { - if( GetFmtInfo( *pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( - RES_POOLCHR_INET_NORMAL), rFmtInfos )->bScriptDependent || - GetFmtInfo( *pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( - RES_POOLCHR_INET_VISIT), rFmtInfos )->bScriptDependent ) + if( GetFormatInfo( *pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( + RES_POOLCHR_INET_NORMAL), rFormatInfos )->bScriptDependent || + GetFormatInfo( *pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( + RES_POOLCHR_INET_VISIT), rFormatInfos )->bScriptDependent ) { bDependsOnScript = true; bDependsOnAnyScript = true; @@ -1863,7 +1863,7 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, // change, so we can insert it, but only if it belongs // to the current script. if( bDependsOnAnyScript || nScript == aScriptLst[i] ) - InsertNoScript( rItem, nPos, nEnd, rFmtInfos, + InsertNoScript( rItem, nPos, nEnd, rFormatInfos, bParaAttrs ); break; } @@ -1872,19 +1872,19 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, // it, so we can insert a hint up to the next script change and // continue with the rest of the hint. if( bDependsOnAnyScript || nScript == aScriptLst[i] ) - InsertNoScript( rItem, nPos, nChgPos, rFmtInfos, bParaAttrs ); + InsertNoScript( rItem, nPos, nChgPos, rFormatInfos, bParaAttrs ); nPos = nChgPos; } } else { - InsertNoScript( rItem, nStart, nEnd, rFmtInfos, bParaAttrs ); + InsertNoScript( rItem, nStart, nEnd, rFormatInfos, bParaAttrs ); } } void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet, sal_Int32 nStart, sal_Int32 nEnd, - SwHTMLFmtInfos& rFmtInfos, + SwHTMLFormatInfos& rFormatInfos, bool bDeep, bool bParaAttrs ) { SfxWhichIter aIter( rItemSet ); @@ -1895,30 +1895,30 @@ void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet, const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState( nWhich, bDeep, &pItem ) ) { - Insert( *pItem, nStart, nEnd, rFmtInfos, bParaAttrs ); + Insert( *pItem, nStart, nEnd, rFormatInfos, bParaAttrs ); } nWhich = aIter.NextWhich(); } } -void HTMLEndPosLst::Insert( const SwDrawFrmFmt& rFmt, sal_Int32 nPos, - SwHTMLFmtInfos& rFmtInfos ) +void HTMLEndPosLst::Insert( const SwDrawFrameFormat& rFormat, sal_Int32 nPos, + SwHTMLFormatInfos& rFormatInfos ) { - const SdrObject* pTextObj = SwHTMLWriter::GetMarqueeTextObj( rFmt ); + const SdrObject* pTextObj = SwHTMLWriter::GetMarqueeTextObj( rFormat ); if( pTextObj ) { // die Edit-Engine-Attribute des Objekts als SW-Attribute holen // und als Hints einsortieren. Wegen der Menge der Hints werden // Styles hierbei nicht beruecksichtigt! - const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet(); - SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN, + const SfxItemSet& rFormatItemSet = rFormat.GetAttrSet(); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, true ); bool bOutStylesOld = bOutStyles; bOutStyles = false; - Insert( aItemSet, nPos, nPos+1, rFmtInfos, false, false ); + Insert( aItemSet, nPos, nPos+1, rFormatInfos, false, false ); bOutStyles = bOutStylesOld; } } @@ -2060,21 +2060,21 @@ void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, sal_Int32 nPos, } /* Ausgabe der Nodes */ -Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) +Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) { - const SwTxtNode * pNd = &static_cast<const SwTxtNode&>(rNode); + const SwTextNode * pNd = &static_cast<const SwTextNode&>(rNode); SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const OUString& rStr = pNd->GetTxt(); + const OUString& rStr = pNd->GetText(); sal_Int32 nEnd = rStr.getLength(); // Besonderheit: leere Node und HR-Vorlage (horizontaler Strich) // nur ein <HR> ausgeben - sal_uInt16 nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId(); + sal_uInt16 nPoolId = pNd->GetAnyFormatColl().GetPoolFormatId(); // Handle horizontal rule <hr> if (!nEnd && - (RES_POOLCOLL_HTML_HR==nPoolId || pNd->GetAnyFmtColl().GetName() == OOO_STRING_SVTOOLS_HTML_horzrule)) + (RES_POOLCOLL_HTML_HR==nPoolId || pNd->GetAnyFormatColl().GetName() == OOO_STRING_SVTOOLS_HTML_horzrule)) { // dann die absatz-gebundenen Grafiken/OLE-Objekte im Absatz // MIB 8.7.97: Ein <PRE> spannen wir um die Linie auf. Dann stimmen @@ -2106,25 +2106,25 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) sal_Int32 nRight = static_cast<const SvxLRSpaceItem*>(pItem)->GetRight(); if( nLeft || nRight ) { - const SwFrmFmt& rPgFmt = + const SwFrameFormat& rPgFormat = rHTMLWrt.pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool ( RES_POOLPAGE_HTML, false )->GetMaster(); - const SwFmtFrmSize& rSz = rPgFmt.GetFrmSize(); - const SvxLRSpaceItem& rLR = rPgFmt.GetLRSpace(); - const SwFmtCol& rCol = rPgFmt.GetCol(); + const SwFormatFrmSize& rSz = rPgFormat.GetFrmSize(); + const SvxLRSpaceItem& rLR = rPgFormat.GetLRSpace(); + const SwFormatCol& rCol = rPgFormat.GetCol(); long nPageWidth = rSz.GetWidth() - rLR.GetLeft() - rLR.GetRight(); if( 1 < rCol.GetNumCols() ) nPageWidth /= rCol.GetNumCols(); - const SwTableNode* pTblNd = pNd->FindTableNode(); - if( pTblNd ) + const SwTableNode* pTableNd = pNd->FindTableNode(); + if( pTableNd ) { - const SwTableBox* pBox = pTblNd->GetTable().GetTblBox( + const SwTableBox* pBox = pTableNd->GetTable().GetTableBox( pNd->StartOfSectionIndex() ); if( pBox ) - nPageWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth(); + nPageWidth = pBox->GetFrameFormat()->GetFrmSize().GetWidth(); } OString sWidth = OString::number(SwHTMLWriter::ToPixel(nPageWidth - nLeft - nRight, false)); @@ -2217,13 +2217,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) if( pItemSet ) { if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, true, &pItem ) && - static_cast<const SwFmtPageDesc *>(pItem)->GetPageDesc() ) + static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc() ) { bPageBreakBefore = true; } else if( SfxItemState::SET == pItemSet->GetItemState( RES_BREAK, true, &pItem ) ) { - switch( static_cast<const SvxFmtBreakItem *>(pItem)->GetBreak() ) + switch( static_cast<const SvxFormatBreakItem *>(pItem)->GetBreak() ) { case SVX_BREAK_PAGE_BEFORE: bPageBreakBefore = true; @@ -2267,10 +2267,10 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) rHTMLWrt.bTagOn = true; // jetzt das Tag des Absatzes ausgeben - const SwFmt& rFmt = pNd->GetAnyFmtColl(); - SwHTMLTxtCollOutputInfo aFmtInfo; + const SwFormat& rFormat = pNd->GetAnyFormatColl(); + SwHTMLTextCollOutputInfo aFormatInfo; bool bOldLFPossible = rHTMLWrt.bLFPossible; - OutHTML_SwFmt( rWrt, rFmt, pNd->GetpSwAttrSet(), aFmtInfo ); + OutHTML_SwFormat( rWrt, rFormat, pNd->GetpSwAttrSet(), aFormatInfo ); // Wenn vor dem Absatz-Tag keine neue Zeile aufgemacht wurde, dann // tun wir das jetzt @@ -2293,7 +2293,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) // Text, der aus einer Outline-Numerierung kommt ermitteln sal_Int32 nOffset = 0; - OUString aOutlineTxt; + OUString aOutlineText; OUString aFullText; // export numbering string as plain text only for the outline numbering, @@ -2301,14 +2301,14 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) if ( pNd->IsOutline() && pNd->GetNumRule() == pNd->GetDoc()->GetOutlineNumRule() ) { - aOutlineTxt = pNd->GetNumString(); - nOffset = nOffset + aOutlineTxt.getLength(); - aFullText = aOutlineTxt; + aOutlineText = pNd->GetNumString(); + nOffset = nOffset + aOutlineText.getLength(); + aFullText = aOutlineText; } OUString aFootEndNoteSym; - if( rHTMLWrt.pFmtFtn ) + if( rHTMLWrt.pFormatFootnote ) { - aFootEndNoteSym = rHTMLWrt.GetFootEndNoteSym( *rHTMLWrt.pFmtFtn ); + aFootEndNoteSym = rHTMLWrt.GetFootEndNoteSym( *rHTMLWrt.pFormatFootnote ); nOffset = nOffset + aFootEndNoteSym.getLength(); aFullText += aFootEndNoteSym; } @@ -2325,13 +2325,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) rHTMLWrt.pDfltColor, rHTMLWrt.bCfgOutStyles, rHTMLWrt.GetHTMLMode(), aFullText, rHTMLWrt.aScriptTextStyles ); - if( aFmtInfo.pItemSet ) + if( aFormatInfo.pItemSet ) { - aEndPosLst.Insert( *aFmtInfo.pItemSet, 0, nEnd + nOffset, - rHTMLWrt.aChrFmtInfos, false, true ); + aEndPosLst.Insert( *aFormatInfo.pItemSet, 0, nEnd + nOffset, + rHTMLWrt.aChrFormatInfos, false, true ); } - if( !aOutlineTxt.isEmpty() || rHTMLWrt.pFmtFtn ) + if( !aOutlineText.isEmpty() || rHTMLWrt.pFormatFootnote ) { // Absatz-Attribute ausgeben, damit der Text die Attribute des // Absatzes bekommt. @@ -2341,25 +2341,25 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) // beachten. Da man die ueber die UI nicht setzen kann, ignorieren // wir sie erstmal. - if( !aOutlineTxt.isEmpty() ) - HTMLOutFuncs::Out_String( rWrt.Strm(), aOutlineTxt, + if( !aOutlineText.isEmpty() ) + HTMLOutFuncs::Out_String( rWrt.Strm(), aOutlineText, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters); - if( rHTMLWrt.pFmtFtn ) + if( rHTMLWrt.pFormatFootnote ) { - rHTMLWrt.OutFootEndNoteSym( *rHTMLWrt.pFmtFtn, aFootEndNoteSym, - aEndPosLst.GetScriptAtPos( aOutlineTxt.getLength(), rHTMLWrt.nCSS1Script ) ); - rHTMLWrt.pFmtFtn = 0; + rHTMLWrt.OutFootEndNoteSym( *rHTMLWrt.pFormatFootnote, aFootEndNoteSym, + aEndPosLst.GetScriptAtPos( aOutlineText.getLength(), rHTMLWrt.nCSS1Script ) ); + rHTMLWrt.pFormatFootnote = 0; } } // erstmal den Start berichtigen. D.h. wird nur ein Teil vom Satz // ausgegeben, so muessen auch da die Attribute stimmen!! - rHTMLWrt.bTxtAttr = true; + rHTMLWrt.bTextAttr = true; size_t nAttrPos = 0; sal_Int32 nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex(); - const SwTxtAttr * pHt = 0; + const SwTextAttr * pHt = 0; const size_t nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0; if( nCntAttr && nStrPos > ( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() ) { @@ -2387,14 +2387,14 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) if( rHTMLWrt.bWriteAll ) aEndPosLst.Insert( pHt->GetAttr(), nHtStt + nOffset, nHtEnd + nOffset, - rHTMLWrt.aChrFmtInfos ); + rHTMLWrt.aChrFormatInfos ); else { sal_Int32 nTmpStt = nHtStt < nStrPos ? nStrPos : nHtStt; sal_Int32 nTmpEnd = nHtEnd < nEnd ? nHtEnd : nEnd; aEndPosLst.Insert( pHt->GetAttr(), nTmpStt + nOffset, nTmpEnd + nOffset, - rHTMLWrt.aChrFmtInfos ); + rHTMLWrt.aChrFormatInfos ); } continue; // aber nicht ausgeben, das erfolgt spaeter !! @@ -2428,7 +2428,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) } bool bOutChar = true; - const SwTxtAttr * pTxtHt = 0; + const SwTextAttr * pTextHt = 0; if( nAttrPos < nCntAttr && pHt->GetStart() == nStrPos && nStrPos != nEnd ) { @@ -2442,24 +2442,24 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) // Bereich aufspannen werden ignoriert aEndPosLst.Insert( pHt->GetAttr(), nStrPos + nOffset, *pHt->End() + nOffset, - rHTMLWrt.aChrFmtInfos ); + rHTMLWrt.aChrFormatInfos ); } } else { // Hints ohne-Ende werden als letztes ausgebeben - OSL_ENSURE( !pTxtHt, "Wieso gibt es da schon ein Attribut ohne Ende?" ); - if( rHTMLWrt.nTxtAttrsToIgnore>0 ) + OSL_ENSURE( !pTextHt, "Wieso gibt es da schon ein Attribut ohne Ende?" ); + if( rHTMLWrt.nTextAttrsToIgnore>0 ) { - rHTMLWrt.nTxtAttrsToIgnore--; + rHTMLWrt.nTextAttrsToIgnore--; } else { - pTxtHt = pHt; - sal_uInt16 nFldWhich; + pTextHt = pHt; + sal_uInt16 nFieldWhich; if( RES_TXTATR_FIELD != pHt->Which() - || ( RES_POSTITFLD != (nFldWhich = static_cast<const SwFmtFld&>(pHt->GetAttr()).GetField()->Which()) - && RES_SCRIPTFLD != nFldWhich ) ) + || ( RES_POSTITFLD != (nFieldWhich = static_cast<const SwFormatField&>(pHt->GetAttr()).GetField()->Which()) + && RES_SCRIPTFLD != nFieldWhich ) ) { bWriteBreak = false; } @@ -2471,21 +2471,21 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) } // Manche Draw-Formate koennen auch noch Attribute mitbringen - if( pTxtHt && RES_TXTATR_FLYCNT == pTxtHt->Which() ) + if( pTextHt && RES_TXTATR_FLYCNT == pTextHt->Which() ) { - const SwFrmFmt* pFrmFmt = - static_cast<const SwFmtFlyCnt &>(pTxtHt->GetAttr()).GetFrmFmt(); + const SwFrameFormat* pFrameFormat = + static_cast<const SwFormatFlyCnt &>(pTextHt->GetAttr()).GetFrameFormat(); - if( RES_DRAWFRMFMT == pFrmFmt->Which() ) - aEndPosLst.Insert( *static_cast<const SwDrawFrmFmt *>(pFrmFmt), + if( RES_DRAWFRMFMT == pFrameFormat->Which() ) + aEndPosLst.Insert( *static_cast<const SwDrawFrameFormat *>(pFrameFormat), nStrPos + nOffset, - rHTMLWrt.aChrFmtInfos ); + rHTMLWrt.aChrFormatInfos ); } aEndPosLst.OutEndAttrs( rHTMLWrt, nStrPos + nOffset, &aContext ); aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset, &aContext ); - if( pTxtHt ) + if( pTextHt ) { rHTMLWrt.bLFPossible = !rHTMLWrt.nLastParaToken && nStrPos > 0 && rStr[nStrPos-1] == ' '; @@ -2493,7 +2493,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) rHTMLWrt.nCSS1Script = aEndPosLst.GetScriptAtPos( nStrPos + nOffset, nCSS1Script ); HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext ); - Out( aHTMLAttrFnTab, pTxtHt->GetAttr(), rHTMLWrt ); + Out( aHTMLAttrFnTab, pTextHt->GetAttr(), rHTMLWrt ); rHTMLWrt.nCSS1Script = nCSS1Script; rHTMLWrt.bLFPossible = false; } @@ -2586,7 +2586,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) nEnd, HTML_POS_INSIDE ); OSL_ENSURE( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" ); - rHTMLWrt.bTxtAttr = false; + rHTMLWrt.bTextAttr = false; if( bWriteBreak ) { @@ -2656,7 +2656,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) } rHTMLWrt.bTagOn = false; - OutHTML_SwFmtOff( rWrt, aFmtInfo ); + OutHTML_SwFormatOff( rWrt, aFormatInfo ); // eventuell eine Form schliessen rHTMLWrt.OutForm( false ); @@ -2685,7 +2685,7 @@ static Writer& OutHTML_CSS1Attr( Writer& rWrt, const SfxPoolItem& rHt ) // wenn gerade Hints geschrieben werden versuchen wir den Hint als // CSS1-Attribut zu schreiben - if( static_cast<SwHTMLWriter&>(rWrt).bCfgOutStyles && static_cast<SwHTMLWriter&>(rWrt).bTxtAttr ) + if( static_cast<SwHTMLWriter&>(rWrt).bCfgOutStyles && static_cast<SwHTMLWriter&>(rWrt).bTextAttr ) OutCSS1_HintSpanTag( rWrt, rHt ); return rWrt; @@ -2699,7 +2699,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.bOutOpts ) return rWrt; - if( !rHTMLWrt.bTxtAttr && rHTMLWrt.bCfgOutStyles && rHTMLWrt.bCfgPreferStyles ) + if( !rHTMLWrt.bTextAttr && rHTMLWrt.bCfgOutStyles && rHTMLWrt.bCfgPreferStyles ) { // Font-Farbe nicht als Tag schreiben, wenn Styles normalen Tags // vorgezogen werden @@ -2734,7 +2734,7 @@ static Writer& OutHTML_SwPosture( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_italic, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2782,7 +2782,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt ) OString::number(static_cast<sal_Int32>(nSize)) + "\""; rWrt.Strm().WriteOString( sOut ); - if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // always export font size as CSS option, too OutCSS1_HintStyleOpt( rWrt, rHt ); @@ -2832,7 +2832,7 @@ static Writer& OutHTML_SwWeight( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_bold, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2853,7 +2853,7 @@ static Writer& OutHTML_SwCrossedOut( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_strike, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2883,7 +2883,7 @@ static Writer& OutHTML_SvxEscapement( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2903,7 +2903,7 @@ static Writer& OutHTML_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_underline, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2915,15 +2915,15 @@ static Writer& OutHTML_SwUnderline( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFmtFlyCnt& rFlyCnt = static_cast<const SwFmtFlyCnt&>(rHt); + const SwFormatFlyCnt& rFlyCnt = static_cast<const SwFormatFlyCnt&>(rHt); - const SwFrmFmt& rFmt = *rFlyCnt.GetFrmFmt(); + const SwFrameFormat& rFormat = *rFlyCnt.GetFrameFormat(); const SdrObject *pSdrObj = 0; SwHTMLFrmType eType = - (SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFmt, pSdrObj ); + (SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFormat, pSdrObj ); sal_uInt8 nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode]; - rHTMLWrt.OutFrmFmt( nMode, rFmt, pSdrObj ); + rHTMLWrt.OutFrameFormat( nMode, rFormat, pSdrObj ); return rWrt; } @@ -2939,7 +2939,7 @@ static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt ) { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_blink, rHTMLWrt.bTagOn ); } - else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) + else if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTextAttr ) { // vielleicht als CSS1-Attribut ? OutCSS1_HintSpanTag( rWrt, rHt ); @@ -2948,16 +2948,16 @@ static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } -Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, bool bOn ) +Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat, bool bOn ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - OUString aURL( rINetFmt.GetValue() ); - const SvxMacroTableDtor *pMacTable = rINetFmt.GetMacroTbl(); + OUString aURL( rINetFormat.GetValue() ); + const SvxMacroTableDtor *pMacTable = rINetFormat.GetMacroTable(); bool bEvents = pMacTable != 0 && !pMacTable->empty(); // Anything to output at all? - if( aURL.isEmpty() && !bEvents && rINetFmt.GetName().isEmpty() ) + if( aURL.isEmpty() && !bEvents && rINetFormat.GetName().isEmpty() ) return rWrt; // bOn controls if we are writing the opening or closing tag @@ -2971,22 +2971,22 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, bool bOn ) bool bScriptDependent = false; { - const SwCharFmt* pFmt = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( + const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ); - SwHTMLFmtInfo aFmtInfo( pFmt ); - SwHTMLFmtInfos::const_iterator it = rHTMLWrt.aChrFmtInfos.find( aFmtInfo ); - if( it != rHTMLWrt.aChrFmtInfos.end() ) + SwHTMLFormatInfo aFormatInfo( pFormat ); + SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo ); + if( it != rHTMLWrt.aChrFormatInfos.end() ) { bScriptDependent = it->bScriptDependent; } } if( !bScriptDependent ) { - const SwCharFmt* pFmt = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( + const SwCharFormat* pFormat = rWrt.pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ); - SwHTMLFmtInfo aFmtInfo( pFmt ); - SwHTMLFmtInfos::const_iterator it = rHTMLWrt.aChrFmtInfos.find( aFmtInfo ); - if( it != rHTMLWrt.aChrFmtInfos.end() ) + SwHTMLFormatInfo aFormatInfo( pFormat ); + SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo ); + if( it != rHTMLWrt.aChrFormatInfos.end() ) { bScriptDependent = it->bScriptDependent; } @@ -3033,16 +3033,16 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, bool bOn ) sOut = "\""; } - if( !rINetFmt.GetName().isEmpty() ) + if( !rINetFormat.GetName().isEmpty() ) { sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\""; rWrt.Strm().WriteOString( sOut ); - HTMLOutFuncs::Out_String( rWrt.Strm(), rINetFmt.GetName(), + HTMLOutFuncs::Out_String( rWrt.Strm(), rINetFormat.GetName(), rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut = "\""; } - const OUString& rTarget = rINetFmt.GetTargetFrame(); + const OUString& rTarget = rINetFormat.GetTargetFrame(); if( !rTarget.isEmpty() ) { sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_target) + "=\""; @@ -3066,95 +3066,95 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, bool bOn ) return rWrt; } -static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutHTML_SwFormatINetFormat( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); if( rHTMLWrt.bOutOpts ) return rWrt; - const SwFmtINetFmt& rINetFmt = static_cast<const SwFmtINetFmt&>(rHt); + const SwFormatINetFormat& rINetFormat = static_cast<const SwFormatINetFormat&>(rHt); if( rHTMLWrt.bTagOn ) { // ggf. ein noch offenes Attribut voruebergehend beenden - if( rHTMLWrt.aINetFmts.size() ) + if( rHTMLWrt.aINetFormats.size() ) { - SwFmtINetFmt *pINetFmt = - rHTMLWrt.aINetFmts.back(); - OutHTML_INetFmt( rWrt, *pINetFmt, false ); + SwFormatINetFormat *pINetFormat = + rHTMLWrt.aINetFormats.back(); + OutHTML_INetFormat( rWrt, *pINetFormat, false ); } // jetzt das neue aufmachen - OutHTML_INetFmt( rWrt, rINetFmt, true ); + OutHTML_INetFormat( rWrt, rINetFormat, true ); // und merken - SwFmtINetFmt *pINetFmt = new SwFmtINetFmt( rINetFmt ); - rHTMLWrt.aINetFmts.push_back( pINetFmt ); + SwFormatINetFormat *pINetFormat = new SwFormatINetFormat( rINetFormat ); + rHTMLWrt.aINetFormats.push_back( pINetFormat ); } else { // das - OutHTML_INetFmt( rWrt, rINetFmt, false ); + OutHTML_INetFormat( rWrt, rINetFormat, false ); - OSL_ENSURE( rHTMLWrt.aINetFmts.size(), "da fehlt doch ein URL-Attribut" ); - if( rHTMLWrt.aINetFmts.size() ) + OSL_ENSURE( rHTMLWrt.aINetFormats.size(), "da fehlt doch ein URL-Attribut" ); + if( rHTMLWrt.aINetFormats.size() ) { // das eigene Attribut vom Stack holen - SwFmtINetFmt *pINetFmt = rHTMLWrt.aINetFmts.back(); - rHTMLWrt.aINetFmts.pop_back(); - delete pINetFmt; + SwFormatINetFormat *pINetFormat = rHTMLWrt.aINetFormats.back(); + rHTMLWrt.aINetFormats.pop_back(); + delete pINetFormat; } - if( !rHTMLWrt.aINetFmts.empty() ) + if( !rHTMLWrt.aINetFormats.empty() ) { // es ist noch ein Attribut auf dem Stack, das wieder geoeffnet // werden muss - SwFmtINetFmt *pINetFmt = rHTMLWrt.aINetFmts.back(); - OutHTML_INetFmt( rWrt, *pINetFmt, true ); + SwFormatINetFormat *pINetFormat = rHTMLWrt.aINetFormats.back(); + OutHTML_INetFormat( rWrt, *pINetFormat, true ); } } return rWrt; } -static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt ) +static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); if( rHTMLWrt.bOutOpts ) return rWrt; - const SwFmtCharFmt& rChrFmt = static_cast<const SwFmtCharFmt&>(rHt); - const SwCharFmt* pFmt = rChrFmt.GetCharFmt(); + const SwFormatCharFormat& rChrFormat = static_cast<const SwFormatCharFormat&>(rHt); + const SwCharFormat* pFormat = rChrFormat.GetCharFormat(); - if( !pFmt ) + if( !pFormat ) { return rWrt; } - SwHTMLFmtInfo aFmtInfo( pFmt ); - SwHTMLFmtInfos::const_iterator it = rHTMLWrt.aChrFmtInfos.find( aFmtInfo ); - if( it == rHTMLWrt.aChrFmtInfos.end()) + SwHTMLFormatInfo aFormatInfo( pFormat ); + SwHTMLFormatInfos::const_iterator it = rHTMLWrt.aChrFormatInfos.find( aFormatInfo ); + if( it == rHTMLWrt.aChrFormatInfos.end()) return rWrt; - const SwHTMLFmtInfo *pFmtInfo = &*it; - OSL_ENSURE( pFmtInfo, "Wieso gint es keine Infos ueber die Zeichenvorlage?" ); + const SwHTMLFormatInfo *pFormatInfo = &*it; + OSL_ENSURE( pFormatInfo, "Wieso gint es keine Infos ueber die Zeichenvorlage?" ); if( rHTMLWrt.bTagOn ) { OString sOut = "<"; - if( !pFmtInfo->aToken.isEmpty() ) - sOut += pFmtInfo->aToken; + if( !pFormatInfo->aToken.isEmpty() ) + sOut += pFormatInfo->aToken; else sOut += OString(OOO_STRING_SVTOOLS_HTML_span); if( rHTMLWrt.bCfgOutStyles && - (!pFmtInfo->aClass.isEmpty() || pFmtInfo->bScriptDependent) ) + (!pFormatInfo->aClass.isEmpty() || pFormatInfo->bScriptDependent) ) { sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\""; rWrt.Strm().WriteOString( sOut ); - OUString aClass( pFmtInfo->aClass ); - if( pFmtInfo->bScriptDependent ) + OUString aClass( pFormatInfo->aClass ); + if( pFormatInfo->bScriptDependent ) { if( !aClass.isEmpty() ) aClass += "-"; @@ -3181,7 +3181,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt ) else { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), - !pFmtInfo->aToken.isEmpty() ? pFmtInfo->aToken.getStr() + !pFormatInfo->aToken.isEmpty() ? pFormatInfo->aToken.getStr() : OOO_STRING_SVTOOLS_HTML_span, false ); } @@ -3275,16 +3275,16 @@ SwAttrFnTab aHTMLAttrFnTab = { /* RES_TXTATR_META */ 0, /* RES_TXTATR_METAFIELD */ 0, /* RES_TXTATR_AUTOFMT */ 0, -/* RES_TXTATR_INETFMT */ OutHTML_SwFmtINetFmt, -/* RES_TXTATR_CHARFMT */ OutHTML_SwTxtCharFmt, +/* RES_TXTATR_INETFMT */ OutHTML_SwFormatINetFormat, +/* RES_TXTATR_CHARFMT */ OutHTML_SwTextCharFormat, /* RES_TXTATR_CJK_RUBY */ 0, /* RES_TXTATR_UNKNOWN_CONTAINER */ 0, -/* RES_TXTATR_INPUTFIELD */ OutHTML_SwFmtFld, +/* RES_TXTATR_INPUTFIELD */ OutHTML_SwFormatField, -/* RES_TXTATR_FIELD */ OutHTML_SwFmtFld, +/* RES_TXTATR_FIELD */ OutHTML_SwFormatField, /* RES_TXTATR_FLYCNT */ OutHTML_SwFlyCnt, -/* RES_TXTATR_FTN */ OutHTML_SwFmtFtn, -/* RES_TXTATR_ANNOTATION */ OutHTML_SwFmtFld, +/* RES_TXTATR_FTN */ OutHTML_SwFormatFootnote, +/* RES_TXTATR_ANNOTATION */ OutHTML_SwFormatField, /* RES_TXTATR_DUMMY3 */ 0, /* RES_TXTATR_DUMMY1 */ 0, // Dummy: /* RES_TXTATR_DUMMY2 */ 0, // Dummy: diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 51ebc2f276d7..ec4143e5d38e 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -73,7 +73,7 @@ void SwHTMLParser::NewScript() void SwHTMLParser::EndScript() { bool bInsIntoBasic = false, - bInsSrcIntoFld = false; + bInsSrcIntoField = false; switch( eScriptLang ) { @@ -81,7 +81,7 @@ void SwHTMLParser::EndScript() bInsIntoBasic = true; break; default: - bInsSrcIntoFld = true; + bInsSrcIntoField = true; break; } @@ -90,15 +90,15 @@ void SwHTMLParser::EndScript() // Ausser StarBasic und unbenutzem JavaScript jedes Script oder den // Modulnamen in einem Feld merken merken - if( bInsSrcIntoFld && !bIgnoreHTMLComments ) + if( bInsSrcIntoField && !bIgnoreHTMLComments ) { SwScriptFieldType *pType = - static_cast<SwScriptFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_SCRIPTFLD )); + static_cast<SwScriptFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD )); - SwScriptField aFld( pType, aScriptType, + SwScriptField aField( pType, aScriptType, !aScriptURL.isEmpty() ? aScriptURL : aScriptSource, !aScriptURL.isEmpty() ); - InsertAttr( SwFmtFld( aFld ) ); + InsertAttr( SwFormatField( aField ) ); } SwDocShell *pDocSh = pDoc->GetDocShell(); diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 487549411f20..a756cdcae417 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -69,19 +69,19 @@ using namespace ::com::sun::star; #define MAX_DROPCAP_LINES 9 #define MAX_DROPCAP_CHARS 9 -static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc ); +static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc ); // Implementierung des SwCSS1Parsers (eigentlich swcss1.cxx) static struct SwCSS1ItemIds { - sal_uInt16 nFmtBreak; - sal_uInt16 nFmtPageDesc; - sal_uInt16 nFmtKeep; + sal_uInt16 nFormatBreak; + sal_uInt16 nFormatPageDesc; + sal_uInt16 nFormatKeep; SwCSS1ItemIds() : - nFmtBreak( RES_BREAK ), - nFmtPageDesc( RES_PAGEDESC ), - nFmtKeep( RES_KEEP ) + nFormatBreak( RES_BREAK ), + nFormatPageDesc( RES_PAGEDESC ), + nFormatKeep( RES_KEEP ) {} } aItemIds; @@ -109,9 +109,9 @@ SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const OUString& bBodyVLinkSet( false ), bSetFirstPageDesc( false ), bSetRightPageDesc( false ), - bTableHeaderTxtCollSet( false ), - bTableTxtCollSet( false ), - bLinkCharFmtsSet( false ) + bTableHeaderTextCollSet( false ), + bTableTextCollSet( false ), + bLinkCharFormatsSet( false ) { aFontHeights[0] = aFHeights[0]; aFontHeights[1] = aFHeights[1]; @@ -127,7 +127,7 @@ SwCSS1Parser::~SwCSS1Parser() } // Feature: PrintExt -bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet, +bool SwCSS1Parser::SetFormatBreak( SfxItemSet& rItemSet, const SvxCSS1PropertyInfo& rPropInfo ) { SvxBreak eBreak = SVX_BREAK_NONE; @@ -174,17 +174,17 @@ bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet, } if( bSetBreak ) - rItemSet.Put( SvxFmtBreakItem( eBreak, RES_BREAK ) ); + rItemSet.Put( SvxFormatBreakItem( eBreak, RES_BREAK ) ); if( bSetPageDesc ) - rItemSet.Put( SwFmtPageDesc( pPageDesc ) ); + rItemSet.Put( SwFormatPageDesc( pPageDesc ) ); if( bSetKeep ) - rItemSet.Put( SvxFmtKeepItem( bKeep, RES_KEEP ) ); + rItemSet.Put( SvxFormatKeepItem( bKeep, RES_KEEP ) ); return bSetBreak; } // /Feature: PrintExt -static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) +static void SetCharFormatAttrs( SwCharFormat *pCharFormat, SfxItemSet& rItemSet ) { const SfxPoolItem *pItem; static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE, @@ -200,7 +200,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) } } - pCharFmt->SetFmtAttr( rItemSet ); + pCharFormat->SetFormatAttr( rItemSet ); if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { @@ -209,35 +209,35 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet ) SvxBrushItem aBrushItem( *static_cast<const SvxBrushItem *>(pItem) ); aBrushItem.SetWhich( RES_CHRATR_BACKGROUND ); - pCharFmt->SetFmtAttr( aBrushItem ); + pCharFormat->SetFormatAttr( aBrushItem ); } if( SfxItemState::SET == rItemSet.GetItemState( RES_BOX, false, &pItem ) ) { SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem *>(pItem) ); aBoxItem.SetWhich( RES_CHRATR_BOX ); - pCharFmt->SetFmtAttr( aBoxItem ); + pCharFormat->SetFormatAttr( aBoxItem ); } } -void SwCSS1Parser::SetLinkCharFmts() +void SwCSS1Parser::SetLinkCharFormats() { - OSL_ENSURE( !bLinkCharFmtsSet, "Aufruf von SetLinkCharFmts unnoetig" ); + OSL_ENSURE( !bLinkCharFormatsSet, "Aufruf von SetLinkCharFormats unnoetig" ); SvxCSS1MapEntry *pStyleEntry = GetTag( OUString(OOO_STRING_SVTOOLS_HTML_anchor) ); - SwCharFmt *pUnvisited = 0, *pVisited = 0; + SwCharFormat *pUnvisited = 0, *pVisited = 0; if( pStyleEntry ) { SfxItemSet& rItemSet = pStyleEntry->GetItemSet(); bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); - pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ); - SetCharFmtAttrs( pUnvisited, rItemSet ); + pUnvisited = GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ); + SetCharFormatAttrs( pUnvisited, rItemSet ); bBodyLinkSet |= bColorSet; - pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ); - SetCharFmtAttrs( pVisited, rItemSet ); + pVisited = GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ); + SetCharFormatAttrs( pVisited, rItemSet ); bBodyVLinkSet |= bColorSet; } @@ -250,8 +250,8 @@ void SwCSS1Parser::SetLinkCharFmts() bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); if( !pUnvisited ) - pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ); - SetCharFmtAttrs( pUnvisited, rItemSet ); + pUnvisited = GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ); + SetCharFormatAttrs( pUnvisited, rItemSet ); bBodyLinkSet |= bColorSet; } @@ -264,15 +264,15 @@ void SwCSS1Parser::SetLinkCharFmts() bool bColorSet = (SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR, false)); if( !pVisited ) - pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ); - SetCharFmtAttrs( pVisited, rItemSet ); + pVisited = GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ); + SetCharFormatAttrs( pVisited, rItemSet ); bBodyVLinkSet |= bColorSet; } - bLinkCharFmtsSet = true; + bLinkCharFormatsSet = true; } -static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, +static void SetTextCollAttrs( SwTextFormatColl *pColl, SfxItemSet& rItemSet, SvxCSS1PropertyInfo& rPropInfo, SwCSS1Parser *pCSS1Parser ) { @@ -291,11 +291,11 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem *>(pCollItem) ); if( rPropInfo.bLeftMargin ) - aLRItem.SetTxtLeft( pLRItem->GetTxtLeft() ); + aLRItem.SetTextLeft( pLRItem->GetTextLeft() ); if( rPropInfo.bRightMargin ) aLRItem.SetRight( pLRItem->GetRight() ); if( rPropInfo.bTextIndent ) - aLRItem.SetTxtFirstLineOfst( pLRItem->GetTxtFirstLineOfst() ); + aLRItem.SetTextFirstLineOfst( pLRItem->GetTextFirstLineOfst() ); rItemSet.Put( aLRItem ); } @@ -332,16 +332,16 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet, } // Feature: PrintExt - pCSS1Parser->SetFmtBreak( rItemSet, rPropInfo ); + pCSS1Parser->SetFormatBreak( rItemSet, rPropInfo ); // /Feature: PrintExt - pColl->SetFmtAttr( rItemSet ); + pColl->SetFormatAttr( rItemSet ); } -void SwCSS1Parser::SetTableTxtColl( bool bHeader ) +void SwCSS1Parser::SetTableTextColl( bool bHeader ) { - OSL_ENSURE( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet), - "Aufruf von SetTableTxtColl unnoetig" ); + OSL_ENSURE( !(bHeader ? bTableHeaderTextCollSet : bTableTextCollSet), + "Aufruf von SetTableTextColl unnoetig" ); sal_uInt16 nPoolId; OUString sTag; @@ -356,14 +356,14 @@ void SwCSS1Parser::SetTableTxtColl( bool bHeader ) sTag = OOO_STRING_SVTOOLS_HTML_tabledata; } - SwTxtFmtColl *pColl = 0; + SwTextFormatColl *pColl = 0; // The following entries will never be used again and may be changed. SvxCSS1MapEntry *pStyleEntry = GetTag( sTag ); if( pStyleEntry ) { - pColl = GetTxtFmtColl( nPoolId, aEmptyOUStr ); - SetTxtCollAttrs( pColl, pStyleEntry->GetItemSet(), + pColl = GetTextFormatColl( nPoolId, aEmptyOUStr ); + SetTextCollAttrs( pColl, pStyleEntry->GetItemSet(), pStyleEntry->GetPropertyInfo(), this ); } @@ -372,15 +372,15 @@ void SwCSS1Parser::SetTableTxtColl( bool bHeader ) if( pStyleEntry ) { if( !pColl ) - pColl = GetTxtFmtColl( nPoolId, aEmptyOUStr ); - SetTxtCollAttrs( pColl, pStyleEntry->GetItemSet(), + pColl = GetTextFormatColl( nPoolId, aEmptyOUStr ); + SetTextCollAttrs( pColl, pStyleEntry->GetItemSet(), pStyleEntry->GetPropertyInfo(), this ); } if( bHeader ) - bTableHeaderTxtCollSet = true; + bTableHeaderTextCollSet = true; else - bTableTxtCollSet = true; + bTableTextCollSet = true; } void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, @@ -432,13 +432,13 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush, if( pPageDesc ) { SwPageDesc aNewPageDesc( *pPageDesc ); - SwFrmFmt &rMaster = aNewPageDesc.GetMaster(); + SwFrameFormat &rMaster = aNewPageDesc.GetMaster(); if( bSetBrush ) - rMaster.SetFmtAttr( aBrushItem ); + rMaster.SetFormatAttr( aBrushItem ); if( bSetBox ) - rMaster.SetFmtAttr( aBoxItem ); + rMaster.SetFormatAttr( aBoxItem ); if( bSetFrmDir ) - rMaster.SetFmtAttr( aFrmDirItem ); + rMaster.SetFormatAttr( aFrmDirItem ); ChgPageDesc( pPageDesc, aNewPageDesc ); } @@ -455,7 +455,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, return; SwPageDesc aNewPageDesc( *pPageDesc ); - SwFrmFmt &rMaster = aNewPageDesc.GetMaster(); + SwFrameFormat &rMaster = aNewPageDesc.GetMaster(); const SfxItemSet& rPageItemSet = rMaster.GetAttrSet(); const SfxPoolItem *pPageItem, *pItem; bool bChanged = false; @@ -476,11 +476,11 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, if( rPropInfo.bRightMargin ) aLRItem.SetRight( pLRItem->GetRight() ); - rMaster.SetFmtAttr( aLRItem ); + rMaster.SetFormatAttr( aLRItem ); } else { - rMaster.SetFmtAttr( *pItem ); + rMaster.SetFormatAttr( *pItem ); } bChanged = true; } @@ -501,11 +501,11 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, if( rPropInfo.bBottomMargin ) aULItem.SetLower( pULItem->GetLower() ); - rMaster.SetFmtAttr( aULItem ); + rMaster.SetFormatAttr( aULItem ); } else { - rMaster.SetFmtAttr( *pItem ); + rMaster.SetFormatAttr( *pItem ); } bChanged = true; } @@ -515,7 +515,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, { if( rPropInfo.eSizeType == SVX_CSS1_STYPE_TWIP ) { - rMaster.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth, + rMaster.SetFormatAttr( SwFormatFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth, rPropInfo.nHeight ) ); bChanged = true; } @@ -525,7 +525,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, // Groesse der Vorlage erhalten. Bei "landscape" und "portrait" // wird das Landscape-Flag gesetzt und evtl. die Breite/Hoehe // vertauscht. - SwFmtFrmSize aFrmSz( rMaster.GetFrmSize() ); + SwFormatFrmSize aFrmSz( rMaster.GetFrmSize() ); bool bLandscape = aNewPageDesc.GetLandscape(); if( ( bLandscape && rPropInfo.eSizeType == SVX_CSS1_STYPE_PORTRAIT ) || @@ -535,7 +535,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, SwTwips nTmp = aFrmSz.GetHeight(); aFrmSz.SetHeight( aFrmSz.GetWidth() ); aFrmSz.SetWidth( nTmp ); - rMaster.SetFmtAttr( aFrmSz ); + rMaster.SetFormatAttr( aFrmSz ); aNewPageDesc.SetLandscape( !bLandscape ); bChanged = true; } @@ -546,7 +546,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc, if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) { // eine Umrandung wird gesetzt - rMaster.SetFmtAttr( *pItem ); + rMaster.SetFormatAttr( *pItem ); rItemSet.ClearItem( RES_BACKGROUND ); bChanged = true; } @@ -835,8 +835,8 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, // gesetzt werden und gelten dann automatisch als defaults if( SfxItemState::SET==rItemSet.GetItemState(RES_CHRATR_COLOR,false) ) bBodyTextSet = true; - SetTxtCollAttrs( - GetTxtCollFromPool( RES_POOLCOLL_STANDARD ), + SetTextCollAttrs( + GetTextCollFromPool( RES_POOLCOLL_STANDARD ), rItemSet, rPropInfo, this ); return false; @@ -848,22 +848,22 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, !pNext && aClass.getLength() >= 9 && ('s' == aClass[0] || 'S' == aClass[0]) ) { - sal_uInt16 nPoolFmtId = 0; + sal_uInt16 nPoolFormatId = 0; if( aClass.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) ) - nPoolFmtId = RES_POOLCHR_ENDNOTE; + nPoolFormatId = RES_POOLCHR_ENDNOTE; else if( aClass.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym) ) - nPoolFmtId = RES_POOLCHR_FOOTNOTE; - if( nPoolFmtId ) + nPoolFormatId = RES_POOLCHR_FOOTNOTE; + if( nPoolFormatId ) { if( CSS1_SCRIPT_ALL == nScript ) { - SetCharFmtAttrs( GetCharFmtFromPool(nPoolFmtId), rItemSet ); + SetCharFormatAttrs( GetCharFormatFromPool(nPoolFormatId), rItemSet ); } else { SfxItemSet aScriptItemSet( rItemSet ); RemoveScriptItems( aScriptItemSet, nScript ); - SetCharFmtAttrs( GetCharFmtFromPool(nPoolFmtId), + SetCharFormatAttrs( GetCharFormatFromPool(nPoolFormatId), aScriptItemSet); } return false; @@ -989,17 +989,17 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, // ein X:first-line { float: left; ... } // Die Vorlage Suchen bzw. Anlegen - SwTxtFmtColl *pColl = GetTxtFmtColl( nPoolCollId, aEmptyOUStr ); - SwTxtFmtColl* pParentColl = 0; + SwTextFormatColl *pColl = GetTextFormatColl( nPoolCollId, aEmptyOUStr ); + SwTextFormatColl* pParentColl = 0; if( !aClass.isEmpty() ) { OUString aName( pColl->GetName() ); AddClassName( aName, aClass ); pParentColl = pColl; - pColl = pDoc->FindTxtFmtCollByName( aName ); + pColl = pDoc->FindTextFormatCollByName( aName ); if( !pColl ) - pColl = pDoc->MakeTxtFmtColl( aName, pParentColl ); + pColl = pDoc->MakeTextFormatColl( aName, pParentColl ); } if( !pNext ) { @@ -1012,20 +1012,20 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem ); if( CSS1_SCRIPT_ALL == nScript && !pParentColl ) { - SetTxtCollAttrs( pColl, rItemSet, rPropInfo, this ); + SetTextCollAttrs( pColl, rItemSet, rPropInfo, this ); } else { SfxItemSet aScriptItemSet( rItemSet ); RemoveScriptItems( aScriptItemSet, nScript, pParentColl ? &pParentColl->GetAttrSet() : 0 ); - SetTxtCollAttrs( pColl, aScriptItemSet, rPropInfo, this ); + SetTextCollAttrs( pColl, aScriptItemSet, rPropInfo, this ); } } else { // ein Drop-Cap-Attribut basteln - SwFmtDrop aDrop( pColl->GetDrop() ); + SwFormatDrop aDrop( pColl->GetDrop() ); aDrop.GetChars() = 1; // die Attribute in das DropCap-Attribut einfuegen @@ -1070,7 +1070,7 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, (SVX_ADJUST_LEFT == rPropInfo.eFloat || CSS1_SCRIPT_ALL == nScript) ) { - pColl->SetFmtAttr( aDrop ); + pColl->SetFormatAttr( aDrop ); } } @@ -1085,34 +1085,34 @@ bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, if( pNext ) return true; - SwCharFmt *pCFmt = GetChrFmt( static_cast< sal_uInt16 >(nToken2), aEmptyOUStr ); - if( pCFmt ) + SwCharFormat *pCFormat = GetChrFormat( static_cast< sal_uInt16 >(nToken2), aEmptyOUStr ); + if( pCFormat ) { - SwCharFmt *pParentCFmt = 0; + SwCharFormat *pParentCFormat = 0; if( !aClass.isEmpty() ) { - OUString aName( pCFmt->GetName() ); + OUString aName( pCFormat->GetName() ); AddClassName( aName, aClass ); - pParentCFmt = pCFmt; + pParentCFormat = pCFormat; - pCFmt = pDoc->FindCharFmtByName( aName ); - if( !pCFmt ) + pCFormat = pDoc->FindCharFormatByName( aName ); + if( !pCFormat ) { - pCFmt = pDoc->MakeCharFmt( aName, pParentCFmt ); - pCFmt->SetAuto( false ); + pCFormat = pDoc->MakeCharFormat( aName, pParentCFormat ); + pCFormat->SetAuto( false ); } } - if( CSS1_SCRIPT_ALL == nScript && !pParentCFmt ) + if( CSS1_SCRIPT_ALL == nScript && !pParentCFormat ) { - SetCharFmtAttrs( pCFmt, rItemSet ); + SetCharFormatAttrs( pCFormat, rItemSet ); } else { SfxItemSet aScriptItemSet( rItemSet ); RemoveScriptItems( aScriptItemSet, nScript, - pParentCFmt ? &pParentCFmt->GetAttrSet() : 0 ); - SetCharFmtAttrs( pCFmt, aScriptItemSet ); + pParentCFormat ? &pParentCFormat->GetAttrSet() : 0 ); + SetCharFormatAttrs( pCFormat, aScriptItemSet ); } return false; } @@ -1140,7 +1140,7 @@ const FontList *SwCSS1Parser::GetFontList() const return pFList; } -SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const OUString& rClass ) const +SwCharFormat* SwCSS1Parser::GetChrFormat( sal_uInt16 nToken2, const OUString& rClass ) const { // die entsprechende Vorlage suchen sal_uInt16 nPoolId = 0; @@ -1172,23 +1172,23 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const OUString& rClass ) return 0; // Die Vorlage (ohne Class) suchen oder anlegen - SwCharFmt *pCFmt = 0; + SwCharFormat *pCFormat = 0; if( nPoolId ) { - pCFmt = GetCharFmtFromPool( nPoolId ); + pCFormat = GetCharFormatFromPool( nPoolId ); } else { OUString sCName( OUString::createFromAscii(sName) ); - pCFmt = pDoc->FindCharFmtByName( sCName ); - if( !pCFmt ) + pCFormat = pDoc->FindCharFormatByName( sCName ); + if( !pCFormat ) { - pCFmt = pDoc->MakeCharFmt( sCName, pDoc->GetDfltCharFmt() ); - pCFmt->SetAuto( false ); + pCFormat = pDoc->MakeCharFormat( sCName, pDoc->GetDfltCharFormat() ); + pCFormat->SetAuto( false ); } } - OSL_ENSURE( pCFmt, "Keine Zeichen-Vorlage???" ); + OSL_ENSURE( pCFormat, "Keine Zeichen-Vorlage???" ); // Wenn es eine Klasse gibt, die Klassen-Vorlage suchen aber nicht // neu anlegen. @@ -1196,94 +1196,94 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const OUString& rClass ) GetScriptFromClass( aClass, false ); if( !aClass.isEmpty() ) { - OUString aTmp( pCFmt->GetName() ); + OUString aTmp( pCFormat->GetName() ); AddClassName( aTmp, aClass ); - SwCharFmt *pClassCFmt = pDoc->FindCharFmtByName( aTmp ); - if( pClassCFmt ) + SwCharFormat *pClassCFormat = pDoc->FindCharFormatByName( aTmp ); + if( pClassCFormat ) { - pCFmt = pClassCFmt; + pCFormat = pClassCFormat; } else { const SvxCSS1MapEntry *pClass = GetClass( aClass ); if( pClass ) { - pCFmt = pDoc->MakeCharFmt( aTmp, pCFmt ); - pCFmt->SetAuto( false ); + pCFormat = pDoc->MakeCharFormat( aTmp, pCFormat ); + pCFormat->SetAuto( false ); SfxItemSet aItemSet( pClass->GetItemSet() ); - SetCharFmtAttrs( pCFmt, aItemSet ); + SetCharFormatAttrs( pCFormat, aItemSet ); } } } - return pCFmt; + return pCFormat; } -SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( sal_uInt16 nPoolId ) const +SwTextFormatColl *SwCSS1Parser::GetTextCollFromPool( sal_uInt16 nPoolId ) const { - sal_uInt16 nOldArrLen = pDoc->GetTxtFmtColls()->size(); + sal_uInt16 nOldArrLen = pDoc->GetTextFormatColls()->size(); - SwTxtFmtColl *pColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( nPoolId, false ); + SwTextFormatColl *pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( nPoolId, false ); if( bIsNewDoc ) { - sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->size(); + sal_uInt16 nArrLen = pDoc->GetTextFormatColls()->size(); for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ ) - lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i], + lcl_swcss1_setEncoding( *(*pDoc->GetTextFormatColls())[i], GetDfltEncoding() ); } return pColl; } -SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( sal_uInt16 nPoolId ) const +SwCharFormat *SwCSS1Parser::GetCharFormatFromPool( sal_uInt16 nPoolId ) const { - sal_uInt16 nOldArrLen = pDoc->GetCharFmts()->size(); + sal_uInt16 nOldArrLen = pDoc->GetCharFormats()->size(); - SwCharFmt *pCharFmt = pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( nPoolId ); + SwCharFormat *pCharFormat = pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nPoolId ); if( bIsNewDoc ) { - sal_uInt16 nArrLen = pDoc->GetCharFmts()->size(); + sal_uInt16 nArrLen = pDoc->GetCharFormats()->size(); for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ ) - lcl_swcss1_setEncoding( *(*pDoc->GetCharFmts())[i], + lcl_swcss1_setEncoding( *(*pDoc->GetCharFormats())[i], GetDfltEncoding() ); } - return pCharFmt; + return pCharFormat; } -SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl, +SwTextFormatColl *SwCSS1Parser::GetTextFormatColl( sal_uInt16 nTextColl, const OUString& rClass ) { - SwTxtFmtColl* pColl = 0; + SwTextFormatColl* pColl = 0; OUString aClass( rClass ); GetScriptFromClass( aClass, false ); - if( RES_POOLCOLL_TEXT == nTxtColl && aClass.getLength() >= 9 && + if( RES_POOLCOLL_TEXT == nTextColl && aClass.getLength() >= 9 && ('s' == aClass[0] || 'S' == aClass[0] ) ) { if( aClass.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_sdendnote) ) { - nTxtColl = RES_POOLCOLL_ENDNOTE; + nTextColl = RES_POOLCOLL_ENDNOTE; aClass = aEmptyOUStr; } else if( aClass.equalsIgnoreAsciiCase(OOO_STRING_SVTOOLS_HTML_sdfootnote) ) { - nTxtColl = RES_POOLCOLL_FOOTNOTE; + nTextColl = RES_POOLCOLL_FOOTNOTE; aClass = aEmptyOUStr; } } - if( USER_FMT & nTxtColl ) // eine vom Reader angelegte + if( USER_FMT & nTextColl ) // eine vom Reader angelegte { OSL_ENSURE( false, "Wo kommt die Benutzer-Vorlage her?" ); - pColl = GetTxtCollFromPool( RES_POOLCOLL_STANDARD ); + pColl = GetTextCollFromPool( RES_POOLCOLL_STANDARD ); } else { - pColl = GetTxtCollFromPool( nTxtColl ); + pColl = GetTextCollFromPool( nTextColl ); } OSL_ENSURE( pColl, "Keine Absatz-Vorlage???" ); @@ -1291,20 +1291,20 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl, { OUString aTmp( pColl->GetName() ); AddClassName( aTmp, aClass ); - SwTxtFmtColl* pClassColl = pDoc->FindTxtFmtCollByName( aTmp ); + SwTextFormatColl* pClassColl = pDoc->FindTextFormatCollByName( aTmp ); if( !pClassColl && - (nTxtColl==RES_POOLCOLL_TABLE || - nTxtColl==RES_POOLCOLL_TABLE_HDLN) ) + (nTextColl==RES_POOLCOLL_TABLE || + nTextColl==RES_POOLCOLL_TABLE_HDLN) ) { // Wenn dieser Fall eintritt, dann wurde ein <TD><P CLASS=foo> // gelesen, aber die TD.foo Vorlage nicht gefunden. Dann muessen // wir P.foo nehmen, wenn es sie gibt. - SwTxtFmtColl* pCollText = - GetTxtCollFromPool( RES_POOLCOLL_TEXT ); + SwTextFormatColl* pCollText = + GetTextCollFromPool( RES_POOLCOLL_TEXT ); aTmp = pCollText->GetName(); AddClassName( aTmp, aClass ); - pClassColl = pDoc->FindTxtFmtCollByName( aTmp ); + pClassColl = pDoc->FindTextFormatCollByName( aTmp ); } if( pClassColl ) @@ -1316,14 +1316,14 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl, const SvxCSS1MapEntry *pClass = GetClass( aClass ); if( pClass ) { - pColl = pDoc->MakeTxtFmtColl( aTmp, pColl ); + pColl = pDoc->MakeTextFormatColl( aTmp, pColl ); SfxItemSet aItemSet( pClass->GetItemSet() ); SvxCSS1PropertyInfo aPropInfo( pClass->GetPropertyInfo() ); aPropInfo.SetBoxItem( aItemSet, MIN_BORDER_DIST ); bool bPositioned = MayBePositioned( pClass->GetPropertyInfo() ); if( bPositioned ) aItemSet.ClearItem( RES_BACKGROUND ); - SetTxtCollAttrs( pColl, aItemSet, aPropInfo, + SetTextCollAttrs( pColl, aItemSet, aPropInfo, this ); } } @@ -1346,7 +1346,7 @@ static SwPageDesc *FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId) size_t nPageDescs = pDoc->GetPageDescCnt(); size_t nPage; for (nPage=0; nPage < nPageDescs && - pDoc->GetPageDesc(nPage).GetPoolFmtId() != nPoolId; ++nPage) + pDoc->GetPageDesc(nPage).GetPoolFormatId() != nPoolId; ++nPage) ; return nPage < nPageDescs ? &pDoc->GetPageDesc(nPage) : 0; @@ -1461,14 +1461,14 @@ bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo, SVX_CSS1_LTYPE_PERCENTAGE == rPropInfo.eWidthType ); } -void SwCSS1Parser::AddClassName( OUString& rFmtName, const OUString& rClass ) +void SwCSS1Parser::AddClassName( OUString& rFormatName, const OUString& rClass ) { OSL_ENSURE( !rClass.isEmpty(), "Style-Klasse ohne Laenge?" ); - rFmtName += "." + rClass; + rFormatName += "." + rClass; } -void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop, +void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop, SfxItemSet& rItemSet, const OUString *pName ) { @@ -1513,13 +1513,13 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop, // Fuer alle anderen Attribute eine Zeichen-Vorlage anlegen if( rItemSet.Count() ) { - SwCharFmt *pCFmt = 0; + SwCharFormat *pCFormat = 0; OUString aName; if( pName ) { aName = *pName; AddFirstLetterExt( aName ); - pCFmt = pDoc->FindCharFmtByName( aName ); + pCFormat = pDoc->FindCharFormatByName( aName ); } else { @@ -1527,20 +1527,20 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop, { aName = "first-letter " + OUString::number( (sal_Int32)(++nDropCapCnt) ); } - while( pDoc->FindCharFmtByName(aName) ); + while( pDoc->FindCharFormatByName(aName) ); } - if( !pCFmt ) + if( !pCFormat ) { - pCFmt = pDoc->MakeCharFmt( aName, pDoc->GetDfltCharFmt() ); - pCFmt->SetAuto( false ); + pCFormat = pDoc->MakeCharFormat( aName, pDoc->GetDfltCharFormat() ); + pCFormat->SetAuto( false ); } - SetCharFmtAttrs( pCFmt, rItemSet ); + SetCharFormatAttrs( pCFormat, rItemSet ); // Die Zeichenvorlage braucht nur im Attribut gesetzt werden, wenn // auch das Attribut gesetzt wird. if( nLines > 1 ) - rDrop.SetCharFmt( pCFmt ); + rDrop.SetCharFormat( pCFormat ); } } @@ -1949,7 +1949,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrmItemSet ) { - SwFmtAnchor aAnchor; + SwFormatAnchor aAnchor; sal_Int16 eHoriOri = text::HoriOrientation::NONE; sal_Int16 eVertOri = text::VertOrientation::NONE; @@ -2006,8 +2006,8 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, // der Absatz noch leer ist und sonst auto-gebunden. // Auto-gebundene Rahmen werden zunaechst an der Position davor // eingefuegt und erst spaeter verschoben. - const sal_Int32 nCntnt = pPam->GetPoint()->nContent.GetIndex(); - if( nCntnt ) + const sal_Int32 nContent = pPam->GetPoint()->nContent.GetIndex(); + if( nContent ) { aAnchor.SetType( FLY_AT_CHAR ); pPam->Move( fnMoveBackward ); @@ -2023,7 +2023,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, aAnchor.SetAnchor( pPam->GetPoint() ); - if( nCntnt ) + if( nContent ) pPam->Move( fnMoveForward ); sal_uInt16 nLeftSpace = 0, nRightSpace = 0; @@ -2046,9 +2046,9 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/, rFrmItemSet.Put( aAnchor ); // Absolut Positioniert mit Durchlauf - rFrmItemSet.Put( SwFmtHoriOrient( nHoriPos, eHoriOri, eHoriRel ) ); - rFrmItemSet.Put( SwFmtVertOrient( nVertPos, eVertOri, eVertRel ) ); - rFrmItemSet.Put( SwFmtSurround( eSurround ) ); + rFrmItemSet.Put( SwFormatHoriOrient( nHoriPos, eHoriOri, eHoriRel ) ); + rFrmItemSet.Put( SwFormatVertOrient( nVertPos, eVertOri, eVertRel ) ); + rFrmItemSet.Put( SwFormatSurround( eSurround ) ); } void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/, @@ -2086,13 +2086,13 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/, ; } - SwFmtFrmSize aFrmSize( eSize, nWidth, nHeight ); + SwFormatFrmSize aFrmSize( eSize, nWidth, nHeight ); aFrmSize.SetWidthPercent( nPrcWidth ); aFrmSize.SetHeightPercent( nPrcHeight ); rFrmItemSet.Put( aFrmSize ); } -void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet, +void SwHTMLParser::SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo & /*rPropInfo*/, sal_uInt16 nFlags, SfxItemSet &rFrmItemSet ) @@ -2208,9 +2208,9 @@ bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft, { sal_uInt8 nLevel = (sal_uInt8)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth() : MAXLEVEL) - 1 ); - const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get(nLevel); - nLeft = nLeft + rNumFmt.GetAbsLSpace(); - nIndent = rNumFmt.GetFirstLineOffset(); + const SwNumFormat& rNumFormat = rInfo.GetNumRule()->Get(nLevel); + nLeft = nLeft + rNumFormat.GetAbsLSpace(); + nIndent = rNumFormat.GetFirstLineOffset(); } return bRet; @@ -2233,7 +2233,7 @@ void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper, } else if( !nDfltColl ) { - nDfltColl = pCntxt->GetDfltTxtFmtColl(); + nDfltColl = pCntxt->GetDfltTextFormatColl(); if( nDfltColl ) aDfltClass = pCntxt->GetClass(); } @@ -2242,8 +2242,8 @@ void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper, if( !nDfltColl ) nDfltColl = RES_POOLCOLL_TEXT; - const SwTxtFmtColl *pColl = - pCSS1Parser->GetTxtFmtColl( nDfltColl, aDfltClass ); + const SwTextFormatColl *pColl = + pCSS1Parser->GetTextFormatColl( nDfltColl, aDfltClass ); const SvxULSpaceItem& rULSpace = pColl->GetULSpace(); nUpper = rULSpace.GetUpper(); nLower = rULSpace.GetLower(); @@ -2266,7 +2266,7 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, bool bRemove ) pAttr->Invalidate(); else if( nChars > MAX_DROPCAP_CHARS ) nChars = MAX_DROPCAP_CHARS; - static_cast<SwFmtDrop&>(pAttr->GetItem()).GetChars() = (sal_uInt8)nChars; + static_cast<SwFormatDrop&>(pAttr->GetItem()).GetChars() = (sal_uInt8)nChars; } EndAttr( pAttr ); @@ -2302,12 +2302,12 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet ) } } -static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc ) +static void lcl_swcss1_setEncoding( SwFormat& rFormat, rtl_TextEncoding eEnc ) { if( RTL_TEXTENCODING_DONTKNOW == eEnc ) return; - const SfxItemSet& rItemSet = rFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFormat.GetAttrSet(); static const sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT }; const SfxPoolItem *pItem; @@ -2321,7 +2321,7 @@ static void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc ) SvxFontItem aFont( rFont.GetFamily(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), eEnc, aWhichIds[i]); - rFmt.SetFmtAttr( aFont ); + rFormat.SetFormatAttr( aFont ); } } } @@ -2350,14 +2350,14 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc ) } // Change all paragraph styles that do specify a font. - sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->size(); + sal_uInt16 nArrLen = pDoc->GetTextFormatColls()->size(); for( i=1; i<nArrLen; i++ ) - lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i], eEnc ); + lcl_swcss1_setEncoding( *(*pDoc->GetTextFormatColls())[i], eEnc ); // Change all character styles that do specify a font. - nArrLen = pDoc->GetCharFmts()->size(); + nArrLen = pDoc->GetCharFormats()->size(); for( i=1; i<nArrLen; i++ ) - lcl_swcss1_setEncoding( *(*pDoc->GetCharFmts())[i], eEnc ); + lcl_swcss1_setEncoding( *(*pDoc->GetCharFormats())[i], eEnc ); } SvxCSS1Parser::SetDfltEncoding( eEnc ); diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx index 07b6a8db3b79..e3673e5c2359 100644 --- a/sw/source/filter/html/htmlctxt.cxx +++ b/sw/source/filter/html/htmlctxt.cxx @@ -210,8 +210,8 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) // den Start des Attributs neu setzen pAttr->nSttPara = rNewSttPara; pAttr->nEndPara = rNewSttPara; - pAttr->nSttCntnt = nNewSttCnt; - pAttr->nEndCntnt = nNewSttCnt; + pAttr->nSttContent = nNewSttCnt; + pAttr->nEndContent = nNewSttCnt; pAttr->pPrev = 0; pAttr = pNext; @@ -361,7 +361,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext ) // Ggf. noch einen Ansatz-Umbruch einfuegen if( AM_NONE != pContext->GetAppendMode() && pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( pContext->GetAppendMode() ); + AppendTextNode( pContext->GetAppendMode() ); // PRE-/LISTING- und XMP-Umgebungen wieder starten if( pContext->IsFinishPREListingXMP() ) @@ -426,7 +426,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrmItemSet ); // Ausrichtung setzen SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, rItemSet, rPropInfo, @@ -439,7 +439,7 @@ bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet, SetSpace( Size(0,0), rItemSet, rPropInfo, aFrmItemSet ); // Sonstige CSS1-Attribute Setzen - SetFrmFmtAttrs( rItemSet, rPropInfo, + SetFrameFormatAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_PADDING|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, aFrmItemSet ); @@ -465,7 +465,7 @@ bool SwHTMLParser::CreateContainer( const OUString& rClass, // Container-Klasse SfxItemSet *pFrmItemSet = pContext->GetFrmItemSet( pDoc ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( *pFrmItemSet ); + Reader::ResetFrameFormatAttrs( *pFrmItemSet ); SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, rItemSet, rPropInfo, *pFrmItemSet ); @@ -473,7 +473,7 @@ bool SwHTMLParser::CreateContainer( const OUString& rClass, SetFixSize( aDummy, aDummy, false, false, rItemSet, rPropInfo, *pFrmItemSet ); SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet ); - SetFrmFmtAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, + SetFrameFormatAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION, *pFrmItemSet ); bRet = true; @@ -492,7 +492,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, if( bCharLvl && !pPam->GetPoint()->nContent.GetIndex() && SVX_ADJUST_LEFT == rPropInfo.eFloat ) { - SwFmtDrop aDrop; + SwFormatDrop aDrop; aDrop.GetChars() = 1; pCSS1Parser->FillDropCap( aDrop, rItemSet ); @@ -512,7 +512,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, // Feature: PrintExt if( !bCharLvl ) - pCSS1Parser->SetFmtBreak( rItemSet, rPropInfo ); + pCSS1Parser->SetFormatBreak( rItemSet, rPropInfo ); // /Feature: PrintExt OSL_ENSURE(aContexts.size() <= nContextStAttrMin || @@ -532,7 +532,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, { // Absatz-Einzuege muessen addiert werden und werden immer // nur absatzweise gesetzt (fuer den ersten Absatz hier, - // fuer alle folgenden in SetTxtCollAttrs) + // fuer alle folgenden in SetTextCollAttrs) const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem); @@ -560,7 +560,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, if( rPropInfo.bLeftMargin ) { OSL_ENSURE( rPropInfo.nLeftMargin < 0 || - rPropInfo.nLeftMargin == pLRItem->GetTxtLeft(), + rPropInfo.nLeftMargin == pLRItem->GetTextLeft(), "linker Abstand stimmt nicht mit Item ueberein" ); if( rPropInfo.nLeftMargin < 0 && -rPropInfo.nLeftMargin > nOldLeft ) @@ -580,15 +580,15 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet, nRight = nOldRight + static_cast< sal_uInt16 >(rPropInfo.nRightMargin); } if( rPropInfo.bTextIndent ) - nIndent = pLRItem->GetTxtFirstLineOfst(); + nIndent = pLRItem->GetTextFirstLineOfst(); // und die Werte fuer nachfolgende Absaetze merken pContext->SetMargins( nLeft, nRight, nIndent ); // das Attribut noch am aktuellen Absatz setzen SvxLRSpaceItem aLRItem( *pLRItem ); - aLRItem.SetTxtFirstLineOfst( nIndent ); - aLRItem.SetTxtLeft( nLeft ); + aLRItem.SetTextFirstLineOfst( nIndent ); + aLRItem.SetTextLeft( nLeft ); aLRItem.SetRight( nRight ); NewAttr( &aAttrTab.pLRSpace, aLRItem ); EndAttr( aAttrTab.pLRSpace, 0, false ); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 2a29c7b454bf..73ca7cc619c2 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -86,7 +86,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); sal_uInt16 nLeftSpace = 0, nRightSpace = 0, nUpperSpace = 0, nLowerSpace = 0; if( (rPixSpace.Width() || rPixSpace.Height()) && Application::GetDefaultDevice() ) @@ -106,7 +106,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, // Ggf. den Erstzeilen-Einzug noch plaetten const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem); SvxLRSpaceItem aLRItem( *pLRItem ); - aLRItem.SetTxtFirstLineOfst( 0 ); + aLRItem.SetTextFirstLineOfst( 0 ); if( rCSS1PropInfo.bLeftMargin ) { nLeftSpace = static_cast< sal_uInt16 >(aLRItem.GetLeft()); @@ -153,7 +153,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, aFrmSet.Put( aULItem ); } - SwFmtAnchor aAnchor( FLY_AS_CHAR ); + SwFormatAnchor aAnchor( FLY_AS_CHAR ); if( SVX_CSS1_POS_ABSOLUTE == rCSS1PropInfo.ePosition && SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eLeftType && SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType ) @@ -174,20 +174,20 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, // #i26791# - direct positioning for <SwDoc::Insert(..)> pNewDrawObj->SetRelativePos( Point(rCSS1PropInfo.nLeft + nLeftSpace, rCSS1PropInfo.nTop + nUpperSpace) ); - aFrmSet.Put( SwFmtSurround(SURROUND_THROUGHT) ); + aFrmSet.Put( SwFormatSurround(SURROUND_THROUGHT) ); } else if( SVX_ADJUST_LEFT == rCSS1PropInfo.eFloat || text::HoriOrientation::LEFT == eHoriOri ) { aAnchor.SetType( FLY_AT_PARA ); - aFrmSet.Put( SwFmtSurround(bHidden ? SURROUND_THROUGHT + aFrmSet.Put( SwFormatSurround(bHidden ? SURROUND_THROUGHT : SURROUND_RIGHT) ); // #i26791# - direct positioning for <SwDoc::Insert(..)> pNewDrawObj->SetRelativePos( Point(nLeftSpace, nUpperSpace) ); } else if( text::VertOrientation::NONE != eVertOri ) { - aFrmSet.Put( SwFmtVertOrient( 0, eVertOri ) ); + aFrmSet.Put( SwFormatVertOrient( 0, eVertOri ) ); } if (FLY_AT_PAGE == aAnchor.GetAnchorId()) @@ -358,7 +358,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) } } - // Ein DrawTxtobj anlegen + // Ein DrawTextobj anlegen // #i52858# - method name changed SwDrawModel* pModel = pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel(); SdrPage* pPg = pModel->GetPage( 0 ); @@ -401,7 +401,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) // die Default-Farbe (aus der Standard-Vorlage) setzen, damit ueberhaupt // eine sinnvolle Farbe gesetzt ist. const Color& rDfltColor = - pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD ) ->GetColor().GetValue(); aItemSet.Put( SvxColorItem( rDfltColor, EE_CHAR_COLOR ) ); @@ -418,11 +418,11 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT, 0 }; - SwTxtNode const*const pTxtNd = - pPam->GetPoint()->nNode.GetNode().GetTxtNode(); - if( pTxtNd ) + SwTextNode const*const pTextNd = + pPam->GetPoint()->nNode.GetNode().GetTextNode(); + if( pTextNd ) { - const SfxItemSet& rItemSet = pTxtNd->GetAnyFmtColl().GetAttrSet(); + const SfxItemSet& rItemSet = pTextNd->GetAnyFormatColl().GetAttrSet(); const SfxPoolItem *pItem; for( sal_uInt16 i=0; nWhichIds[i]; i++ ) { diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx index 74dd118e6927..17638a235bb0 100644 --- a/sw/source/filter/html/htmldrawwriter.cxx +++ b/sw/source/filter/html/htmldrawwriter.cxx @@ -63,9 +63,9 @@ const sal_uInt32 HTML_FRMOPTS_MARQUEE_CSS1 = HTML_FRMOPT_S_ALIGN | HTML_FRMOPT_S_SPACE; -const SdrObject *SwHTMLWriter::GetMarqueeTextObj( const SwDrawFrmFmt& rFmt ) +const SdrObject *SwHTMLWriter::GetMarqueeTextObj( const SwDrawFrameFormat& rFormat ) { - const SdrObject* pObj = rFmt.FindSdrObject(); + const SdrObject* pObj = rFormat.FindSdrObject(); return (pObj && ::IsMarqueeTextObj( *pObj )) ? pObj : 0; } @@ -129,8 +129,8 @@ void SwHTMLWriter::GetEEAttrsFromDrwObj( SfxItemSet& rItemSet, } } -Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt, - const SwDrawFrmFmt& rFmt, +Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, + const SwDrawFrameFormat& rFormat, const SdrObject& rSdrObject ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -286,9 +286,9 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt, sal_uInt32 nFrmFlags = HTML_FRMOPTS_MARQUEE; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_DRAW ) ) nFrmFlags |= HTML_FRMOPTS_MARQUEE_CSS1; - OString aEndTags = rHTMLWrt.OutFrmFmtOptions( rFmt, aEmptyOUStr, nFrmFlags ); + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrmFlags ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_DRAW ) ) - rHTMLWrt.OutCSS1_FrmFmtOptions( rFmt, nFrmFlags, &rSdrObject ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrmFlags, &rSdrObject ); rWrt.Strm().WriteChar( '>' ); diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index a052f71feda3..6f12c4dbf327 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -37,13 +37,13 @@ using namespace nsSwDocInfoSubType; using namespace ::com::sun::star; -struct HTMLNumFmtTblEntry +struct HTMLNumFormatTableEntry { const sal_Char *pName; - NfIndexTableOffset eFmt; + NfIndexTableOffset eFormat; }; -static HTMLOptionEnum aHTMLFldTypeTable[] = +static HTMLOptionEnum aHTMLFieldTypeTable[] = { { OOO_STRING_SW_HTML_FT_author, RES_AUTHORFLD }, { OOO_STRING_SW_HTML_FT_sender, RES_EXTUSERFLD }, @@ -57,7 +57,7 @@ static HTMLOptionEnum aHTMLFldTypeTable[] = { 0, 0 } }; -static HTMLNumFmtTblEntry aHTMLDateFldFmtTable[] = +static HTMLNumFormatTableEntry aHTMLDateFieldFormatTable[] = { { "SSYS", NF_DATE_SYSTEM_SHORT }, { "LSYS", NF_DATE_SYSTEM_LONG }, @@ -79,7 +79,7 @@ static HTMLNumFmtTblEntry aHTMLDateFldFmtTable[] = { 0, NF_NUMERIC_START } }; -static HTMLNumFmtTblEntry aHTMLTimeFldFmtTable[] = +static HTMLNumFormatTableEntry aHTMLTimeFieldFormatTable[] = { { "SYS", NF_TIME_HHMMSS }, { "SSMM24", NF_TIME_HHMM }, @@ -87,7 +87,7 @@ static HTMLNumFmtTblEntry aHTMLTimeFldFmtTable[] = { 0, NF_NUMERIC_START } }; -static HTMLOptionEnum aHTMLPageNumFldFmtTable[] = +static HTMLOptionEnum aHTMLPageNumFieldFormatTable[] = { { OOO_STRING_SW_HTML_FF_uletter, SVX_NUM_CHARS_UPPER_LETTER }, { OOO_STRING_SW_HTML_FF_lletter, SVX_NUM_CHARS_LOWER_LETTER }, @@ -102,7 +102,7 @@ static HTMLOptionEnum aHTMLPageNumFldFmtTable[] = { 0, 0 } }; -static HTMLOptionEnum aHTMLExtUsrFldSubTable[] = +static HTMLOptionEnum aHTMLExtUsrFieldSubTable[] = { { OOO_STRING_SW_HTML_FS_company, EU_COMPANY }, { OOO_STRING_SW_HTML_FS_firstname, EU_FIRSTNAME }, @@ -122,14 +122,14 @@ static HTMLOptionEnum aHTMLExtUsrFldSubTable[] = { 0, 0 } }; -static HTMLOptionEnum aHTMLAuthorFldFmtTable[] = +static HTMLOptionEnum aHTMLAuthorFieldFormatTable[] = { { OOO_STRING_SW_HTML_FF_name, AF_NAME }, { OOO_STRING_SW_HTML_FF_shortcut, AF_SHORTCUT }, { 0, 0 } }; -static HTMLOptionEnum aHTMLPageNumFldSubTable[] = +static HTMLOptionEnum aHTMLPageNumFieldSubTable[] = { { OOO_STRING_SW_HTML_FS_random, PG_RANDOM }, { OOO_STRING_SW_HTML_FS_next, PG_NEXT }, @@ -145,7 +145,7 @@ static HTMLOptionEnum aHTMLPageNumFldSubTable[] = const SwDocInfoSubType DI_INFO3 = DI_SUBTYPE_END + 3; const SwDocInfoSubType DI_INFO4 = DI_SUBTYPE_END + 4; -static HTMLOptionEnum aHTMLDocInfoFldSubTable[] = +static HTMLOptionEnum aHTMLDocInfoFieldSubTable[] = { { OOO_STRING_SW_HTML_FS_title, DI_TITEL }, { OOO_STRING_SW_HTML_FS_theme, DI_THEMA }, @@ -161,7 +161,7 @@ static HTMLOptionEnum aHTMLDocInfoFldSubTable[] = { 0, 0 } }; -static HTMLOptionEnum aHTMLDocInfoFldFmtTable[] = +static HTMLOptionEnum aHTMLDocInfoFieldFormatTable[] = { { OOO_STRING_SW_HTML_FF_author, DI_SUB_AUTHOR }, { OOO_STRING_SW_HTML_FF_time, DI_SUB_TIME }, @@ -169,7 +169,7 @@ static HTMLOptionEnum aHTMLDocInfoFldFmtTable[] = { 0, 0 } }; -static HTMLOptionEnum aHTMLDocStatFldSubTable[] = +static HTMLOptionEnum aHTMLDocStatFieldSubTable[] = { { OOO_STRING_SW_HTML_FS_page, DS_PAGE }, { OOO_STRING_SW_HTML_FS_para, DS_PARA }, @@ -181,7 +181,7 @@ static HTMLOptionEnum aHTMLDocStatFldSubTable[] = { 0, 0 } }; -static HTMLOptionEnum aHTMLFileNameFldFmtTable[] = +static HTMLOptionEnum aHTMLFileNameFieldFormatTable[] = { { OOO_STRING_SW_HTML_FF_name, FF_NAME }, { OOO_STRING_SW_HTML_FF_pathname, FF_PATHNAME }, @@ -193,7 +193,7 @@ static HTMLOptionEnum aHTMLFileNameFldFmtTable[] = sal_uInt16 SwHTMLParser::GetNumType( const OUString& rStr, sal_uInt16 nDfltType ) { sal_uInt16 nType = nDfltType; - const HTMLOptionEnum *pOptEnums = aHTMLPageNumFldFmtTable; + const HTMLOptionEnum *pOptEnums = aHTMLPageNumFieldFormatTable; while( pOptEnums->pName ) if( !rStr.equalsIgnoreAsciiCaseAscii( pOptEnums->pName ) ) pOptEnums++; @@ -209,10 +209,10 @@ sal_uInt16 SwHTMLParser::GetNumType( const OUString& rStr, sal_uInt16 nDfltType void SwHTMLParser::NewField() { bool bKnownType = false, bFixed = false, - bHasNumFmt = false, bHasNumValue = false; + bHasNumFormat = false, bHasNumValue = false; sal_uInt16 nType = 0; - OUString aValue, aNumFmt, aNumValue, aName; - const HTMLOption *pSubOption=0, *pFmtOption=0; + OUString aValue, aNumFormat, aNumValue, aName; + const HTMLOption *pSubOption=0, *pFormatOption=0; const HTMLOptions& rHTMLOptions = GetOptions(); size_t i; @@ -223,13 +223,13 @@ void SwHTMLParser::NewField() switch( rOption.GetToken() ) { case HTML_O_TYPE: - bKnownType = rOption.GetEnum( nType, aHTMLFldTypeTable ); + bKnownType = rOption.GetEnum( nType, aHTMLFieldTypeTable ); break; case HTML_O_SUBTYPE: pSubOption = &rOption; break; case HTML_O_FORMAT: - pFmtOption = &rOption; + pFormatOption = &rOption; break; case HTML_O_NAME: aName = rOption.GetString(); @@ -238,8 +238,8 @@ void SwHTMLParser::NewField() aValue = rOption.GetString(); break; case HTML_O_SDNUM: - aNumFmt = rOption.GetString(); - bHasNumFmt = true; + aNumFormat = rOption.GetString(); + bHasNumFormat = true; break; case HTML_O_SDVAL: aNumValue = rOption.GetString(); @@ -284,7 +284,7 @@ void SwHTMLParser::NewField() if( RES_DATEFLD==nType || RES_TIMEFLD==nType ) nWhich = RES_DATETIMEFLD; - SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetSysFldType( nWhich ); + SwFieldType* pType = pDoc->getIDocumentFieldsAccess().GetSysFieldType( nWhich ); SwField *pNewField = 0; bool bInsOnEndTag = false; @@ -294,53 +294,53 @@ void SwHTMLParser::NewField() if( pSubOption ) { sal_uInt16 nSub; - sal_uLong nFmt = 0; + sal_uLong nFormat = 0; if( bFixed ) { - nFmt |= AF_FIXED; + nFormat |= AF_FIXED; bInsOnEndTag = true; } - if( pSubOption->GetEnum( nSub, aHTMLExtUsrFldSubTable ) ) - pNewField = new SwExtUserField(static_cast<SwExtUserFieldType*>(pType), nSub, nFmt); + if( pSubOption->GetEnum( nSub, aHTMLExtUsrFieldSubTable ) ) + pNewField = new SwExtUserField(static_cast<SwExtUserFieldType*>(pType), nSub, nFormat); } break; case RES_AUTHORFLD: { - sal_uInt16 nFmt = AF_NAME; - if( pFmtOption ) - pFmtOption->GetEnum( nFmt, aHTMLAuthorFldFmtTable ); + sal_uInt16 nFormat = AF_NAME; + if( pFormatOption ) + pFormatOption->GetEnum( nFormat, aHTMLAuthorFieldFormatTable ); if( bFixed ) { - nFmt |= AF_FIXED; + nFormat |= AF_FIXED; bInsOnEndTag = true; } - pNewField = new SwAuthorField(static_cast<SwAuthorFieldType*>(pType), nFmt); + pNewField = new SwAuthorField(static_cast<SwAuthorFieldType*>(pType), nFormat); } break; case RES_DATEFLD: case RES_TIMEFLD: { - sal_uLong nNumFmt = 0; + sal_uLong nNumFormat = 0; sal_Int64 nTime = tools::Time( tools::Time::SYSTEM ).GetTime(); sal_Int32 nDate = Date( Date::SYSTEM ).GetDate(); sal_uInt16 nSub = 0; - bool bValidFmt = false; - HTMLNumFmtTblEntry * pFmtTbl; + bool bValidFormat = false; + HTMLNumFormatTableEntry * pFormatTable; if( RES_DATEFLD==nType ) { nSub = DATEFLD; - pFmtTbl = aHTMLDateFldFmtTable; + pFormatTable = aHTMLDateFieldFormatTable; if( !aValue.isEmpty() ) nDate = aValue.toInt32(); } else { nSub = TIMEFLD; - pFmtTbl = aHTMLTimeFldFmtTable; + pFormatTable = aHTMLTimeFieldFormatTable; if( !aValue.isEmpty() ) nTime = (sal_uLong)aValue.toInt32(); } @@ -348,25 +348,25 @@ void SwHTMLParser::NewField() nSub |= FIXEDFLD; SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter(); - if( pFmtOption ) + if( pFormatOption ) { - const OUString& rFmt = pFmtOption->GetString(); - for( sal_uInt16 k = 0; pFmtTbl[k].pName; k++ ) + const OUString& rFormat = pFormatOption->GetString(); + for( sal_uInt16 k = 0; pFormatTable[k].pName; k++ ) { - if( rFmt.equalsIgnoreAsciiCaseAscii( pFmtTbl[k].pName ) ) + if( rFormat.equalsIgnoreAsciiCaseAscii( pFormatTable[k].pName ) ) { - nNumFmt = pFormatter->GetFormatIndex( - pFmtTbl[k].eFmt, LANGUAGE_SYSTEM); - bValidFmt = true; + nNumFormat = pFormatter->GetFormatIndex( + pFormatTable[k].eFormat, LANGUAGE_SYSTEM); + bValidFormat = true; break; } } } - if( !bValidFmt ) - nNumFmt = pFormatter->GetFormatIndex( pFmtTbl[i].eFmt, + if( !bValidFormat ) + nNumFormat = pFormatter->GetFormatIndex( pFormatTable[i].eFormat, LANGUAGE_SYSTEM); - pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFmt); + pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFormat); if (nSub & FIXEDFLD) static_cast<SwDateTimeField *>(pNewField)->SetDateTime(DateTime(Date(nDate), tools::Time(nTime))); @@ -374,18 +374,18 @@ void SwHTMLParser::NewField() break; case RES_DATETIMEFLD: - if( bHasNumFmt ) + if( bHasNumFormat ) { sal_uInt16 nSub = 0; SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter(); - sal_uInt32 nNumFmt; + sal_uInt32 nNumFormat; LanguageType eLang; double dValue = GetTableDataOptionsValNum( - nNumFmt, eLang, aNumValue, aNumFmt, + nNumFormat, eLang, aNumValue, aNumFormat, *pDoc->GetNumberFormatter() ); - short nFmtType = pFormatter->GetType( nNumFmt ); - switch( nFmtType ) + short nFormatType = pFormatter->GetType( nNumFormat ); + switch( nFormatType ) { case css::util::NumberFormat::DATE: nSub = DATEFLD; break; case css::util::NumberFormat::TIME: nSub = TIMEFLD; break; @@ -396,7 +396,7 @@ void SwHTMLParser::NewField() if( bHasNumValue ) nSub |= FIXEDFLD; - pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFmt); + pNewField = new SwDateTimeField(static_cast<SwDateTimeFieldType *>(pType), nSub, nNumFormat); if (bHasNumValue) static_cast<SwDateTimeField *>(pNewField)->SetValue(dValue); } @@ -407,27 +407,27 @@ void SwHTMLParser::NewField() if( pSubOption ) { sal_uInt16 nSub; - if( pSubOption->GetEnum( nSub, aHTMLPageNumFldSubTable ) ) + if( pSubOption->GetEnum( nSub, aHTMLPageNumFieldSubTable ) ) { - sal_uInt16 nFmt = SVX_NUM_PAGEDESC; - if( pFmtOption ) - pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable ); + sal_uInt16 nFormat = SVX_NUM_PAGEDESC; + if( pFormatOption ) + pFormatOption->GetEnum( nFormat, aHTMLPageNumFieldFormatTable ); short nOff = 0; - if( (SvxExtNumType)nFmt!=SVX_NUM_CHAR_SPECIAL && !aValue.isEmpty() ) + if( (SvxExtNumType)nFormat!=SVX_NUM_CHAR_SPECIAL && !aValue.isEmpty() ) nOff = (short)aValue.toInt32(); else if( (SwPageNumSubType)nSub == PG_NEXT ) nOff = 1; else if( (SwPageNumSubType)nSub == PG_PREV ) nOff = -1; - if( (SvxExtNumType)nFmt==SVX_NUM_CHAR_SPECIAL && + if( (SvxExtNumType)nFormat==SVX_NUM_CHAR_SPECIAL && (SwPageNumSubType)nSub==PG_RANDOM ) - nFmt = SVX_NUM_PAGEDESC; + nFormat = SVX_NUM_PAGEDESC; - pNewField = new SwPageNumberField(static_cast<SwPageNumberFieldType*>(pType), nSub, nFmt, nOff); - if ((SvxExtNumType)nFmt == SVX_NUM_CHAR_SPECIAL) + pNewField = new SwPageNumberField(static_cast<SwPageNumberFieldType*>(pType), nSub, nFormat, nOff); + if ((SvxExtNumType)nFormat == SVX_NUM_CHAR_SPECIAL) static_cast<SwPageNumberField *>(pNewField)->SetUserString(aValue); } } @@ -437,25 +437,25 @@ void SwHTMLParser::NewField() if( pSubOption ) { sal_uInt16 nSub; - if( pSubOption->GetEnum( nSub, aHTMLDocInfoFldSubTable ) ) + if( pSubOption->GetEnum( nSub, aHTMLDocInfoFieldSubTable ) ) { sal_uInt16 nExtSub = 0; if( DI_CREATE==(SwDocInfoSubType)nSub || DI_CHANGE==(SwDocInfoSubType)nSub ) { nExtSub = DI_SUB_AUTHOR; - if( pFmtOption ) - pFmtOption->GetEnum( nExtSub, aHTMLDocInfoFldFmtTable ); + if( pFormatOption ) + pFormatOption->GetEnum( nExtSub, aHTMLDocInfoFieldFormatTable ); nSub |= nExtSub; } - sal_uInt32 nNumFmt = 0; + sal_uInt32 nNumFormat = 0; double dValue = 0; - if( bHasNumFmt && (DI_SUB_DATE==nExtSub || DI_SUB_TIME==nExtSub) ) + if( bHasNumFormat && (DI_SUB_DATE==nExtSub || DI_SUB_TIME==nExtSub) ) { LanguageType eLang; dValue = GetTableDataOptionsValNum( - nNumFmt, eLang, aNumValue, aNumFmt, + nNumFormat, eLang, aNumValue, aNumFormat, *pDoc->GetNumberFormatter() ); bFixed &= bHasNumValue; } @@ -476,7 +476,7 @@ void SwHTMLParser::NewField() bInsOnEndTag = true; } - pNewField = new SwDocInfoField(static_cast<SwDocInfoFieldType *>(pType), nSub, aName, nNumFmt); + pNewField = new SwDocInfoField(static_cast<SwDocInfoFieldType *>(pType), nSub, aName, nNumFormat); if (bHasNumValue) static_cast<SwDocInfoField*>(pNewField)->SetValue(dValue); } @@ -487,29 +487,29 @@ void SwHTMLParser::NewField() if( pSubOption ) { sal_uInt16 nSub; - if( pSubOption->GetEnum( nSub, aHTMLDocStatFldSubTable ) ) + if( pSubOption->GetEnum( nSub, aHTMLDocStatFieldSubTable ) ) { - sal_uInt16 nFmt = SVX_NUM_ARABIC; - if( pFmtOption ) - pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable ); - pNewField = new SwDocStatField(static_cast<SwDocStatFieldType*>(pType), nSub, nFmt); - bUpdateDocStat |= (DS_PAGE != nFmt); + sal_uInt16 nFormat = SVX_NUM_ARABIC; + if( pFormatOption ) + pFormatOption->GetEnum( nFormat, aHTMLPageNumFieldFormatTable ); + pNewField = new SwDocStatField(static_cast<SwDocStatFieldType*>(pType), nSub, nFormat); + bUpdateDocStat |= (DS_PAGE != nFormat); } } break; case RES_FILENAMEFLD: { - sal_uInt16 nFmt = FF_NAME; - if( pFmtOption ) - pFmtOption->GetEnum( nFmt, aHTMLFileNameFldFmtTable ); + sal_uInt16 nFormat = FF_NAME; + if( pFormatOption ) + pFormatOption->GetEnum( nFormat, aHTMLFileNameFieldFormatTable ); if( bFixed ) { - nFmt |= FF_FIXED; + nFormat |= FF_FIXED; bInsOnEndTag = true; } - pNewField = new SwFileNameField(static_cast<SwFileNameFieldType*>(pType), nFmt); + pNewField = new SwFileNameField(static_cast<SwFileNameFieldType*>(pType), nFormat); } break; default: @@ -524,7 +524,7 @@ void SwHTMLParser::NewField() } else { - pDoc->getIDocumentContentOperations().InsertPoolItem(*pPam, SwFmtFld(*pNewField)); + pDoc->getIDocumentContentOperations().InsertPoolItem(*pPam, SwFormatField(*pNewField)); delete pNewField; } bInField = true; @@ -562,7 +562,7 @@ void SwHTMLParser::EndField() break; } - pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtFld(*pField) ); + pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFormatField(*pField) ); delete pField; pField = 0; } @@ -608,9 +608,9 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag // werden soll, fuegen wir es vor dem Space ein. Dann gibt es // weniger Probleme beim Formatieren (bug #40483#) const sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); - SwTxtNode *pTxtNd = pPam->GetNode().GetTxtNode(); + SwTextNode *pTextNd = pPam->GetNode().GetTextNode(); bool bMoveFwd = false; - if (nPos>0 && pTxtNd && (' ' == pTxtNd->GetTxt()[nPos-1])) + if (nPos>0 && pTextNd && (' ' == pTextNd->GetText()[nPos-1])) { bMoveFwd = true; @@ -624,7 +624,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag break; if( RES_TXTATR_FIELD == pAttr->pItem->Which() && - RES_SCRIPTFLD == static_cast<const SwFmtFld *>(pAttr->pItem)->GetField()->GetTyp()->Which() ) + RES_SCRIPTFLD == static_cast<const SwFormatField *>(pAttr->pItem)->GetField()->GetTyp()->Which() ) { bMoveFwd = false; break; @@ -635,10 +635,10 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag pPam->Move( fnMoveBackward ); } - SwPostItField aPostItFld( - static_cast<SwPostItFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_POSTITFLD )), + SwPostItField aPostItField( + static_cast<SwPostItFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )), aEmptyOUStr, aComment, aEmptyOUStr, aEmptyOUStr, DateTime( DateTime::SYSTEM ) ); - InsertAttr( SwFmtFld( aPostItFld ) ); + InsertAttr( SwFormatField( aPostItField ) ); if( bMoveFwd ) pPam->Move( fnMoveForward ); diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 9a2557d8c901..09501c173865 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -37,43 +37,43 @@ using namespace nsSwDocInfoSubType; -const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFmt ) +const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFormat ) { - const sal_Char *pFmtStr = 0; + const sal_Char *pFormatStr = 0; - switch( (SvxExtNumType)nFmt ) + switch( (SvxExtNumType)nFormat ) { - case SVX_NUM_CHARS_UPPER_LETTER: pFmtStr = OOO_STRING_SW_HTML_FF_uletter; break; - case SVX_NUM_CHARS_LOWER_LETTER: pFmtStr = OOO_STRING_SW_HTML_FF_lletter; break; - case SVX_NUM_ROMAN_UPPER: pFmtStr = OOO_STRING_SW_HTML_FF_uroman; break; - case SVX_NUM_ROMAN_LOWER: pFmtStr = OOO_STRING_SW_HTML_FF_lroman; break; - case SVX_NUM_ARABIC: pFmtStr = OOO_STRING_SW_HTML_FF_arabic; break; - case SVX_NUM_NUMBER_NONE: pFmtStr = OOO_STRING_SW_HTML_FF_none; break; - case SVX_NUM_CHAR_SPECIAL: pFmtStr = OOO_STRING_SW_HTML_FF_char; break; - case SVX_NUM_PAGEDESC: pFmtStr = OOO_STRING_SW_HTML_FF_page; break; - case SVX_NUM_CHARS_UPPER_LETTER_N: pFmtStr = OOO_STRING_SW_HTML_FF_ulettern; break; - case SVX_NUM_CHARS_LOWER_LETTER_N: pFmtStr = OOO_STRING_SW_HTML_FF_llettern; break; + case SVX_NUM_CHARS_UPPER_LETTER: pFormatStr = OOO_STRING_SW_HTML_FF_uletter; break; + case SVX_NUM_CHARS_LOWER_LETTER: pFormatStr = OOO_STRING_SW_HTML_FF_lletter; break; + case SVX_NUM_ROMAN_UPPER: pFormatStr = OOO_STRING_SW_HTML_FF_uroman; break; + case SVX_NUM_ROMAN_LOWER: pFormatStr = OOO_STRING_SW_HTML_FF_lroman; break; + case SVX_NUM_ARABIC: pFormatStr = OOO_STRING_SW_HTML_FF_arabic; break; + case SVX_NUM_NUMBER_NONE: pFormatStr = OOO_STRING_SW_HTML_FF_none; break; + case SVX_NUM_CHAR_SPECIAL: pFormatStr = OOO_STRING_SW_HTML_FF_char; break; + case SVX_NUM_PAGEDESC: pFormatStr = OOO_STRING_SW_HTML_FF_page; break; + case SVX_NUM_CHARS_UPPER_LETTER_N: pFormatStr = OOO_STRING_SW_HTML_FF_ulettern; break; + case SVX_NUM_CHARS_LOWER_LETTER_N: pFormatStr = OOO_STRING_SW_HTML_FF_llettern; break; default: ; } - return pFmtStr; + return pFormatStr; } -static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, - const SwTxtNode& rTxtNd, sal_Int32 nFldPos ) +static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pField, + const SwTextNode& rTextNd, sal_Int32 nFieldPos ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFieldType* pFldTyp = pFld->GetTyp(); - sal_uInt16 nField = pFldTyp->Which(); - sal_uLong nFmt = pFld->GetFormat(); + const SwFieldType* pFieldTyp = pField->GetTyp(); + sal_uInt16 nField = pFieldTyp->Which(); + sal_uLong nFormat = pField->GetFormat(); const sal_Char *pTypeStr=0, // TYPE *pSubStr=0, // SUBTYPE - *pFmtStr=0; // FORMAT (SW) + *pFormatStr=0; // FORMAT (SW) OUString aValue; // VALUE (SW) - bool bNumFmt=false; // SDNUM (Number-Formatter-Format) + bool bNumFormat=false; // SDNUM (Number-Formatter-Format) bool bNumValue=false; // SDVAL (Number-Formatter-Value) double dNumValue = 0.0; // SDVAL (Number-Formatter-Value) bool bFixed=false; // SDFIXED @@ -83,7 +83,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, { case RES_EXTUSERFLD: pTypeStr = OOO_STRING_SW_HTML_FT_sender; - switch( (SwExtUserSubType)pFld->GetSubType() ) + switch( (SwExtUserSubType)pField->GetSubType() ) { case EU_COMPANY: pSubStr = OOO_STRING_SW_HTML_FS_company; break; case EU_FIRSTNAME: pSubStr = OOO_STRING_SW_HTML_FS_firstname; break; @@ -104,34 +104,34 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, ; } OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwExtUserField" ); - bFixed = static_cast<const SwExtUserField*>(pFld)->IsFixed(); + bFixed = static_cast<const SwExtUserField*>(pField)->IsFixed(); break; case RES_AUTHORFLD: pTypeStr = OOO_STRING_SW_HTML_FT_author; - switch( (SwAuthorFormat)nFmt & 0xff) + switch( (SwAuthorFormat)nFormat & 0xff) { - case AF_NAME: pFmtStr = OOO_STRING_SW_HTML_FF_name; break; - case AF_SHORTCUT: pFmtStr = OOO_STRING_SW_HTML_FF_shortcut; break; + case AF_NAME: pFormatStr = OOO_STRING_SW_HTML_FF_name; break; + case AF_SHORTCUT: pFormatStr = OOO_STRING_SW_HTML_FF_shortcut; break; } - OSL_ENSURE( pFmtStr, "ubekanntes Format fuer SwAuthorField" ); - bFixed = static_cast<const SwAuthorField*>(pFld)->IsFixed(); + OSL_ENSURE( pFormatStr, "ubekanntes Format fuer SwAuthorField" ); + bFixed = static_cast<const SwAuthorField*>(pField)->IsFixed(); break; case RES_DATETIMEFLD: pTypeStr = OOO_STRING_SW_HTML_FT_datetime; - bNumFmt = true; - if( static_cast<const SwDateTimeField*>(pFld)->IsFixed() ) + bNumFormat = true; + if( static_cast<const SwDateTimeField*>(pField)->IsFixed() ) { bNumValue = true; - dNumValue = static_cast<const SwDateTimeField*>(pFld)->GetValue(); + dNumValue = static_cast<const SwDateTimeField*>(pField)->GetValue(); } break; case RES_PAGENUMBERFLD: { pTypeStr = OOO_STRING_SW_HTML_FT_page; - SwPageNumSubType eSubType = (SwPageNumSubType)pFld->GetSubType(); + SwPageNumSubType eSubType = (SwPageNumSubType)pField->GetSubType(); switch( eSubType ) { case PG_RANDOM: pSubStr = OOO_STRING_SW_HTML_FS_random; break; @@ -139,15 +139,15 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, case PG_PREV: pSubStr = OOO_STRING_SW_HTML_FS_prev; break; } OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwPageNumberField" ); - pFmtStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFmt) ); + pFormatStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFormat) ); - if( (SvxExtNumType)nFmt==SVX_NUM_CHAR_SPECIAL ) + if( (SvxExtNumType)nFormat==SVX_NUM_CHAR_SPECIAL ) { - aValue = static_cast<const SwPageNumberField *>(pFld)->GetUserString(); + aValue = static_cast<const SwPageNumberField *>(pField)->GetUserString(); } else { - const OUString& rValue = pFld->GetPar2(); + const OUString& rValue = pField->GetPar2(); short nValue = (short)rValue.toInt32(); if( (eSubType == PG_NEXT && nValue!=1) || (eSubType == PG_PREV && nValue!=-1) || @@ -160,7 +160,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, break; case RES_DOCINFOFLD: { - sal_uInt16 nSubType = pFld->GetSubType(); + sal_uInt16 nSubType = pField->GetSubType(); pTypeStr = OOO_STRING_SW_HTML_FT_docinfo; sal_uInt16 nExtSubType = nSubType & 0x0f00; nSubType &= 0x00ff; @@ -178,7 +178,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } if( DI_CUSTOM == nSubType ) { - aName = static_cast<const SwDocInfoField*>(pFld)->GetName(); + aName = static_cast<const SwDocInfoField*>(pField)->GetName(); } if( DI_CREATE == nSubType || DI_CHANGE == nSubType ) @@ -186,34 +186,34 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, switch( nExtSubType ) { case DI_SUB_AUTHOR: - pFmtStr = OOO_STRING_SW_HTML_FF_author; + pFormatStr = OOO_STRING_SW_HTML_FF_author; break; case DI_SUB_TIME: - pFmtStr = OOO_STRING_SW_HTML_FF_time; - bNumFmt = true; + pFormatStr = OOO_STRING_SW_HTML_FF_time; + bNumFormat = true; break; case DI_SUB_DATE: - pFmtStr = OOO_STRING_SW_HTML_FF_date; - bNumFmt = true; + pFormatStr = OOO_STRING_SW_HTML_FF_date; + bNumFormat = true; break; } } - bFixed = static_cast<const SwDocInfoField*>(pFld)->IsFixed(); - if( bNumFmt ) + bFixed = static_cast<const SwDocInfoField*>(pField)->IsFixed(); + if( bNumFormat ) { if( bFixed ) { // Fuer ein fixes Feld och den Num-Value ausgeben. // Fixe Felder ohne Zahlenformate sollte es // eigentlich nicht geben. OSL_ENSURE(ist unten. - dNumValue = static_cast<const SwDocInfoField*>(pFld)->GetValue(); + dNumValue = static_cast<const SwDocInfoField*>(pField)->GetValue(); bNumValue = true; } - else if( !nFmt ) + else if( !nFormat ) { // Nicht fixe Felder muessen kein Zahlenformat haben, // wenn sie aus 4.0-Dokumenten stammen. - bNumFmt = false; + bNumFormat = false; } } } @@ -222,7 +222,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, case RES_DOCSTATFLD: { pTypeStr = OOO_STRING_SW_HTML_FT_docstat; - sal_uInt16 nSubType = pFld->GetSubType(); + sal_uInt16 nSubType = pField->GetSubType(); switch( nSubType ) { case DS_PAGE: pSubStr = OOO_STRING_SW_HTML_FS_page; break; @@ -234,23 +234,23 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, case DS_OLE: pSubStr = OOO_STRING_SW_HTML_FS_ole; break; default: pTypeStr = 0; break; } - pFmtStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFmt) ); + pFormatStr = SwHTMLWriter::GetNumFormat( static_cast< sal_uInt16 >(nFormat) ); } break; case RES_FILENAMEFLD: pTypeStr = OOO_STRING_SW_HTML_FT_filename; - switch( (SwFileNameFormat)(nFmt & ~FF_FIXED) ) + switch( (SwFileNameFormat)(nFormat & ~FF_FIXED) ) { - case FF_NAME: pFmtStr = OOO_STRING_SW_HTML_FF_name; break; - case FF_PATHNAME: pFmtStr = OOO_STRING_SW_HTML_FF_pathname; break; - case FF_PATH: pFmtStr = OOO_STRING_SW_HTML_FF_path; break; - case FF_NAME_NOEXT: pFmtStr = OOO_STRING_SW_HTML_FF_name_noext; break; + case FF_NAME: pFormatStr = OOO_STRING_SW_HTML_FF_name; break; + case FF_PATHNAME: pFormatStr = OOO_STRING_SW_HTML_FF_pathname; break; + case FF_PATH: pFormatStr = OOO_STRING_SW_HTML_FF_path; break; + case FF_NAME_NOEXT: pFormatStr = OOO_STRING_SW_HTML_FF_name_noext; break; default: ; } - bFixed = static_cast<const SwFileNameField*>(pFld)->IsFixed(); - OSL_ENSURE( pFmtStr, "unbekanntes Format fuer SwFileNameField" ); + bFixed = static_cast<const SwFileNameField*>(pField)->IsFixed(); + OSL_ENSURE( pFormatStr, "unbekanntes Format fuer SwFileNameField" ); break; } @@ -267,10 +267,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_subtype). append('=').append(pSubStr); } - if( pFmtStr ) + if( pFormatStr ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_format). - append('=').append(pFmtStr); + append('=').append(pFormatStr); } if( !aName.isEmpty() ) { @@ -288,11 +288,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, HTMLOutFuncs::Out_String( rWrt.Strm(), aValue, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut.append('\"'); } - if( bNumFmt ) + if( bNumFormat ) { - OSL_ENSURE( nFmt, "Zahlenformat ist 0" ); + OSL_ENSURE( nFormat, "Zahlenformat ist 0" ); sOut.append(HTMLOutFuncs::CreateTableDataOptionsValNum( - bNumValue, dNumValue, nFmt, + bNumValue, dNumValue, nFormat, *rHTMLWrt.pDoc->GetNumberFormatter(), rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters)); } @@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - OUString const sExpand( pFld->ExpandField(true) ); + OUString const sExpand( pField->ExpandField(true) ); bool bNeedsCJKProcessing = false; if( !sExpand.isEmpty() ) { @@ -331,7 +331,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_WEIGHT, 0 ); - rTxtNd.GetAttr( aScriptItemSet, nFldPos, nFldPos+1 ); + rTextNd.GetAttr( aScriptItemSet, nFieldPos, nFieldPos+1 ); sal_uInt16 aWesternWhichIds[4] = { RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, @@ -431,34 +431,34 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, return rWrt; } -Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ) +Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) { - const SwFmtFld & rFld = static_cast<const SwFmtFld&>(rHt); - const SwField* pFld = rFld.GetField(); - const SwFieldType* pFldTyp = pFld->GetTyp(); + const SwFormatField & rField = static_cast<const SwFormatField&>(rHt); + const SwField* pField = rField.GetField(); + const SwFieldType* pFieldTyp = pField->GetTyp(); - if( RES_SETEXPFLD == pFldTyp->Which() && - (nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) ) + if( RES_SETEXPFLD == pFieldTyp->Which() && + (nsSwGetSetExpType::GSE_STRING & pField->GetSubType()) ) { - const bool bOn = pFldTyp->GetName() == "HTML_ON"; - if (!bOn && pFldTyp->GetName() != "HTML_OFF") + const bool bOn = pFieldTyp->GetName() == "HTML_ON"; + if (!bOn && pFieldTyp->GetName() != "HTML_OFF") return rWrt; - OUString rTxt(comphelper::string::strip(pFld->GetPar2(), ' ')); + OUString rText(comphelper::string::strip(pField->GetPar2(), ' ')); rWrt.Strm().WriteChar( '<' ); if( !bOn ) rWrt.Strm().WriteChar( '/' ); // TODO: HTML-Tags are written without entitities, that for, characters // not contained in the destination encoding are lost! - OString sTmp(OUStringToOString(rTxt, + OString sTmp(OUStringToOString(rText, static_cast<SwHTMLWriter&>(rWrt).eDestEnc)); rWrt.Strm().WriteCharPtr( sTmp.getStr() ).WriteChar( '>' ); } - else if( RES_POSTITFLD == pFldTyp->Which() ) + else if( RES_POSTITFLD == pFieldTyp->Which() ) { // Kommentare werden im ANSI-Zeichensetz, aber mit System-Zeilen- // Umbruechen gesschrieben. - const OUString& rComment = pFld->GetPar2(); + const OUString& rComment = pField->GetPar2(); bool bWritten = false; if( (rComment.getLength() >= 6 && rComment.startsWith("<") && rComment.endsWith(">") && @@ -506,19 +506,19 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ) rWrt.Strm().WriteCharPtr( sOut.getStr() ); } } - else if( RES_SCRIPTFLD == pFldTyp->Which() ) + else if( RES_SCRIPTFLD == pFieldTyp->Which() ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); if( rHTMLWrt.bLFPossible ) rHTMLWrt.OutNewLine( true ); - bool bURL = static_cast<const SwScriptField *>(pFld)->IsCodeURL(); - const OUString& rType = pFld->GetPar1(); + bool bURL = static_cast<const SwScriptField *>(pField)->IsCodeURL(); + const OUString& rType = pField->GetPar1(); OUString aContents, aURL; if(bURL) - aURL = pFld->GetPar2(); + aURL = pField->GetPar2(); else - aContents = pFld->GetPar2(); + aContents = pField->GetPar2(); // sonst ist es der Script-Inhalt selbst. Da nur noh JavaScript // in Feldern landet, muss es sich um JavaSrript handeln ...:) @@ -530,11 +530,11 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ) } else { - const SwTxtFld *pTxtFld = rFld.GetTxtFld(); - OSL_ENSURE( pTxtFld, "Where is the txt fld?" ); - if( pTxtFld ) - OutHTML_SwField( rWrt, pFld, pTxtFld->GetTxtNode(), - pTxtFld->GetStart() ); + const SwTextField *pTextField = rField.GetTextField(); + OSL_ENSURE( pTextField, "Where is the txt fld?" ); + if( pTextField ) + OutHTML_SwField( rWrt, pField, pTextField->GetTextNode(), + pTextField->GetStart() ); } return rWrt; } diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 15fcdb99b92c..d7320398f63d 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -38,32 +38,32 @@ using namespace css; SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly, const SdrObject *pSdrObj, sal_uInt8 nOutMode ) : - pFrmFmt( &rPosFly.GetFmt() ), + pFrameFormat( &rPosFly.GetFormat() ), pSdrObject( pSdrObj ), pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ), nOrdNum( rPosFly.GetOrdNum() ), - nCntntIdx( 0 ), + nContentIdx( 0 ), nOutputMode( nOutMode ) { - const SwFmtAnchor& rAnchor = rPosFly.GetFmt().GetAnchor(); + const SwFormatAnchor& rAnchor = rPosFly.GetFormat().GetAnchor(); if ((FLY_AT_CHAR == rAnchor.GetAnchorId()) && HTML_POS_INSIDE == GetOutPos() ) { // Auto-gebundene Rahmen werden ein Zeichen weiter hinten // ausgegeben, weil dann die Positionierung mit Netscape // uebereinstimmt. - OSL_ENSURE( rAnchor.GetCntntAnchor(), "Keine Anker-Position?" ); - if( rAnchor.GetCntntAnchor() ) + OSL_ENSURE( rAnchor.GetContentAnchor(), "Keine Anker-Position?" ); + if( rAnchor.GetContentAnchor() ) { - nCntntIdx = rAnchor.GetCntntAnchor()->nContent.GetIndex(); - sal_Int16 eHoriRel = rPosFly.GetFmt().GetHoriOrient(). + nContentIdx = rAnchor.GetContentAnchor()->nContent.GetIndex(); + sal_Int16 eHoriRel = rPosFly.GetFormat().GetHoriOrient(). GetRelationOrient(); if( text::RelOrientation::FRAME == eHoriRel || text::RelOrientation::PRINT_AREA == eHoriRel ) { - const SwCntntNode *pCNd = pNdIdx->GetNode().GetCntntNode(); + const SwContentNode *pCNd = pNdIdx->GetNode().GetContentNode(); OSL_ENSURE( pCNd, "Kein Content-Node an PaM-Position" ); - if( pCNd && nCntntIdx < pCNd->Len() ) - nCntntIdx++; + if( pCNd && nContentIdx < pCNd->Len() ) + nContentIdx++; } } } @@ -73,7 +73,7 @@ bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const { if( pNdIdx->GetIndex() == rFrm.pNdIdx->GetIndex() ) { - if( nCntntIdx == rFrm.nCntntIdx ) + if( nContentIdx == rFrm.nContentIdx ) { if( GetOutPos() == rFrm.GetOutPos() ) return nOrdNum < rFrm.nOrdNum; @@ -81,7 +81,7 @@ bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const return GetOutPos() < rFrm.GetOutPos(); } else - return nCntntIdx < rFrm.nCntntIdx; + return nContentIdx < rFrm.nContentIdx; } else return pNdIdx->GetIndex() < rFrm.pNdIdx->GetIndex(); diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx index 3cdee81cd1ca..d3bce6bbaa46 100644 --- a/sw/source/filter/html/htmlfly.hxx +++ b/sw/source/filter/html/htmlfly.hxx @@ -24,7 +24,7 @@ #include <o3tl/sorted_vector.hxx> class SdrObject; -class SwFrmFmt; +class SwFrameFormat; class SwNodeIndex; class SwPosFlyFrm; @@ -84,11 +84,11 @@ extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS]; class SwHTMLPosFlyFrm { - const SwFrmFmt *pFrmFmt; // der Rahmen + const SwFrameFormat *pFrameFormat; // der Rahmen const SdrObject *pSdrObject; // ggf. Sdr-Objekt SwNodeIndex *pNdIdx; // Node-Index sal_uInt32 nOrdNum; // Aus SwPosFlyFrm - sal_Int32 nCntntIdx; // seine Position im Content + sal_Int32 nContentIdx; // seine Position im Content sal_uInt8 nOutputMode; // Ausgabe-Infos public: @@ -99,12 +99,12 @@ public: bool operator==( const SwHTMLPosFlyFrm& ) const { return false; } bool operator<( const SwHTMLPosFlyFrm& ) const; - const SwFrmFmt& GetFmt() const { return *pFrmFmt; } + const SwFrameFormat& GetFormat() const { return *pFrameFormat; } const SdrObject *GetSdrObject() const { return pSdrObject; } const SwNodeIndex& GetNdIndex() const { return *pNdIdx; } - sal_Int32 GetCntntIndex() const { return nCntntIdx; } + sal_Int32 GetContentIndex() const { return nContentIdx; } sal_uInt8 GetOutMode() const { return nOutputMode; } diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index ff4104f4c253..fe05420c5b31 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -126,19 +126,19 @@ const sal_uLong HTML_FRMOPTS_CNTNR = HTML_FRMOPT_ABSSIZE | HTML_FRMOPT_S_PIXSIZE; -static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt ); -static Writer& OutHTML_FrmFmtAsMulticol( Writer& rWrt, const SwFrmFmt& rFmt, +static Writer& OutHTML_FrameFormatTableNode( Writer& rWrt, const SwFrameFormat& rFrameFormat ); +static Writer& OutHTML_FrameFormatAsMulticol( Writer& rWrt, const SwFrameFormat& rFormat, bool bInCntnr ); -static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFmt ); -static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt, - const SwFrmFmt& rFrmFmt, bool bSpan ); -static Writer& OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFmt, +static Writer& OutHTML_FrameFormatAsSpacer( Writer& rWrt, const SwFrameFormat& rFormat ); +static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, + const SwFrameFormat& rFrameFormat, bool bSpan ); +static Writer& OutHTML_FrameFormatAsImage( Writer& rWrt, const SwFrameFormat& rFormat, bool bInCntnr ); -static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFmt, +static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rFormat, bool bInCntnr ); -static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt, +static Writer& OutHTML_FrameFormatAsMarquee( Writer& rWrt, const SwFrameFormat& rFrameFormat, const SdrObject& rSdrObj ); extern HTMLOutEvent aAnchorEventTable[]; @@ -158,18 +158,18 @@ static HTMLOutEvent aIMapEventTable[] = { 0, 0, 0 } }; -sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, +sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpSdrObj ) { SwHTMLFrmType eType; - if( RES_DRAWFRMFMT == rFrmFmt.Which() ) + if( RES_DRAWFRMFMT == rFrameFormat.Which() ) { // Als Default irgendein Zeichen-Objekt eType = HTML_FRMTYPE_DRAW; const SdrObject *pObj = - SwHTMLWriter::GetMarqueeTextObj( static_cast<const SwDrawFrmFmt &>(rFrmFmt) ); + SwHTMLWriter::GetMarqueeTextObj( static_cast<const SwDrawFrameFormat &>(rFrameFormat) ); if( pObj ) { // Laufschrift @@ -178,7 +178,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, } else { - pObj = GetHTMLControl( static_cast<const SwDrawFrmFmt &>(rFrmFmt) ); + pObj = GetHTMLControl( static_cast<const SwDrawFrameFormat &>(rFrameFormat) ); if( pObj ) { @@ -193,8 +193,8 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, // Als Default ein Textrahmen eType = HTML_FRMTYPE_TEXT; - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; const SwNode* pNd = pDoc->GetNodes()[ nStt ]; if( pNd->IsGrfNode() ) @@ -212,36 +212,36 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, sal_uLong nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); if( SfxItemState::SET == rItemSet.GetItemState( RES_COL, true, &pItem ) && - static_cast<const SwFmtCol *>(pItem)->GetNumCols() > 1 ) + static_cast<const SwFormatCol *>(pItem)->GetNumCols() > 1 ) { // spaltiger Rahmen eType = HTML_FRMTYPE_MULTICOL; } else if( pNd->IsTableNode() ) { - const SwTableNode *pTblNd = pNd->GetTableNode(); - sal_uLong nTblEnd = pTblNd->EndOfSectionIndex(); + const SwTableNode *pTableNd = pNd->GetTableNode(); + sal_uLong nTableEnd = pTableNd->EndOfSectionIndex(); - if( nTblEnd+1 == nEnd ) + if( nTableEnd+1 == nEnd ) { // Tabelle eType = HTML_FRMTYPE_TABLE; } - else if( nTblEnd+2 == nEnd ) + else if( nTableEnd+2 == nEnd ) { // Tabelle mit Unterschrft eType = HTML_FRMTYPE_TABLE_CAP; } } - else if( pNd->IsTxtNode() ) + else if( pNd->IsTextNode() ) { - const SwTxtNode *pTxtNd = pNd->GetTxtNode(); + const SwTextNode *pTextNd = pNd->GetTextNode(); bool bEmpty = false; - if( nStt==nEnd-1 && !pTxtNd->Len() ) + if( nStt==nEnd-1 && !pTextNd->Len() ) { // leerer Rahmen? Nur wenn kein Rahmen am // Text- oder Start-Node verankert ist. @@ -260,7 +260,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, } if( bEmpty ) { - SvxBrushItem aBrush = rFrmFmt.makeBackgroundBrushItem(); + SvxBrushItem aBrush = rFrameFormat.makeBackgroundBrushItem(); /// background is not empty, if it has a background graphic /// or its background color is not "no fill"/"auto fill". if( GPOS_NONE != aBrush.GetGraphicPos() || @@ -274,9 +274,9 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt, } else if( pDoc->GetNodes()[nStt+1]->IsTableNode() ) { - const SwTableNode *pTblNd = + const SwTableNode *pTableNd = pDoc->GetNodes()[nStt+1]->GetTableNode(); - if( pTblNd->EndOfSectionIndex()+1 == nEnd ) + if( pTableNd->EndOfSectionIndex()+1 == nEnd ) { // Tabelle mit Ueberschrift eType = HTML_FRMTYPE_TABLE_CAP; @@ -294,19 +294,19 @@ void SwHTMLWriter::CollectFlyFrms() OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS, "number of browser configurations has changed" ); - SwPosFlyFrms aFlyPos(pDoc->GetAllFlyFmts(bWriteAll ? 0 : pCurPam, true)); + SwPosFlyFrms aFlyPos(pDoc->GetAllFlyFormats(bWriteAll ? 0 : pCurPam, true)); for(SwPosFlyFrms::const_iterator aIter(aFlyPos.begin()); aIter != aFlyPos.end(); ++aIter) { - const SwFrmFmt& rFrmFmt = (*aIter)->GetFmt(); + const SwFrameFormat& rFrameFormat = (*aIter)->GetFormat(); const SdrObject *pSdrObj = 0; const SwPosition *pAPos; - const SwCntntNode *pACNd; - SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrmFmt, pSdrObj ); + const SwContentNode *pACNd; + SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrameFormat, pSdrObj ); sal_uInt8 nMode; - const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor(); - sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient(); + const SwFormatAnchor& rAnchor = rFrameFormat.GetAnchor(); + sal_Int16 eHoriRel = rFrameFormat.GetHoriOrient().GetRelationOrient(); switch( rAnchor.GetAnchorId() ) { case FLY_AT_PAGE: @@ -319,12 +319,12 @@ void SwHTMLWriter::CollectFlyFrms() // Absatz geschrieben, wenn der Absatz einen Abstand // hat. if( text::RelOrientation::FRAME == eHoriRel && - (pAPos = rAnchor.GetCntntAnchor()) != 0 && - (pACNd = pAPos->nNode.GetNode().GetCntntNode()) != 0 ) + (pAPos = rAnchor.GetContentAnchor()) != 0 && + (pACNd = pAPos->nNode.GetNode().GetContentNode()) != 0 ) { const SvxLRSpaceItem& rLRItem = static_cast<const SvxLRSpaceItem&>(pACNd->GetAttr(RES_LR_SPACE)); - if( rLRItem.GetTxtLeft() || rLRItem.GetRight() ) + if( rLRItem.GetTextLeft() || rLRItem.GetRight() ) { nMode = aHTMLOutFrmParaFrameTable[eType][nExportMode]; break; @@ -353,7 +353,7 @@ void SwHTMLWriter::CollectFlyFrms() } } -bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nCntntIdx, sal_uInt8 nPos, +bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 nPos, HTMLOutContext *pContext ) { bool bFlysLeft = false; // Noch Flys an aktueller Node-Position da? @@ -378,7 +378,7 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nCntntIdx, sal_uInt8 n SwHTMLPosFlyFrm *pPosFly = (*pHTMLPosFlyFrms)[i]; if( ( HTML_POS_ANY == nPos || pPosFly->GetOutPos() == nPos ) && - pPosFly->GetCntntIndex() == nCntntIdx ) + pPosFly->GetContentIndex() == nContentIdx ) { // Erst entfernen ist wichtig, weil in tieferen // Rekursionen evtl. weitere Eintraege oder das @@ -399,7 +399,7 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nCntntIdx, sal_uInt8 n pContext = 0; // one time only } - OutFrmFmt( pPosFly->GetOutMode(), pPosFly->GetFmt(), + OutFrameFormat( pPosFly->GetOutMode(), pPosFly->GetFormat(), pPosFly->GetSdrObject() ); switch( pPosFly->GetOutFn() ) { @@ -422,7 +422,7 @@ bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nCntntIdx, sal_uInt8 n return bFlysLeft; } -void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt, +void SwHTMLWriter::OutFrameFormat( sal_uInt8 nMode, const SwFrameFormat& rFrameFormat, const SdrObject *pSdrObject ) { sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode ); @@ -452,7 +452,7 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt, if( IsHTMLMode( HTMLMODE_BORDER_NONE ) ) nFrmFlags |= HTML_FRMOPT_S_NOBORDER; - OutCSS1_FrmFmtOptions( rFrmFmt, nFrmFlags, pSdrObject ); + OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags, pSdrObject ); Strm().WriteChar( '>' ); if( HTML_CNTNR_DIV == nCntnrMode ) @@ -466,44 +466,44 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt, { case HTML_OUT_TBLNODE: // OK OSL_ENSURE( !pCntnrStr, "Table: Container ist hier nicht vorgesehen" ); - OutHTML_FrmFmtTableNode( *this, rFrmFmt ); + OutHTML_FrameFormatTableNode( *this, rFrameFormat ); break; case HTML_OUT_GRFNODE: // OK - OutHTML_FrmFmtGrfNode( *this, rFrmFmt, pCntnrStr != 0 ); + OutHTML_FrameFormatGrfNode( *this, rFrameFormat, pCntnrStr != 0 ); break; case HTML_OUT_OLENODE: // OK - OutHTML_FrmFmtOLENode( *this, rFrmFmt, pCntnrStr != 0 ); + OutHTML_FrameFormatOLENode( *this, rFrameFormat, pCntnrStr != 0 ); break; case HTML_OUT_OLEGRF: // OK - OutHTML_FrmFmtOLENodeGrf( *this, rFrmFmt, pCntnrStr != 0 ); + OutHTML_FrameFormatOLENodeGrf( *this, rFrameFormat, pCntnrStr != 0 ); break; case HTML_OUT_DIV: case HTML_OUT_SPAN: OSL_ENSURE( !pCntnrStr, "Div: Container ist hier nicht vorgesehen" ); - OutHTML_FrmFmtAsDivOrSpan( *this, rFrmFmt, HTML_OUT_SPAN==nOutMode ); + OutHTML_FrameFormatAsDivOrSpan( *this, rFrameFormat, HTML_OUT_SPAN==nOutMode ); break; case HTML_OUT_MULTICOL: // OK - OutHTML_FrmFmtAsMulticol( *this, rFrmFmt, pCntnrStr != 0 ); + OutHTML_FrameFormatAsMulticol( *this, rFrameFormat, pCntnrStr != 0 ); break; case HTML_OUT_SPACER: // OK OSL_ENSURE( !pCntnrStr, "Spacer: Container ist hier nicht vorgesehen" ); - OutHTML_FrmFmtAsSpacer( *this, rFrmFmt ); + OutHTML_FrameFormatAsSpacer( *this, rFrameFormat ); break; case HTML_OUT_CONTROL: // OK - OutHTML_DrawFrmFmtAsControl( *this, - static_cast<const SwDrawFrmFmt &>(rFrmFmt), dynamic_cast<const SdrUnoObj&>(*pSdrObject), + OutHTML_DrawFrameFormatAsControl( *this, + static_cast<const SwDrawFrameFormat &>(rFrameFormat), dynamic_cast<const SdrUnoObj&>(*pSdrObject), pCntnrStr != 0 ); break; case HTML_OUT_AMARQUEE: - OutHTML_FrmFmtAsMarquee( *this, rFrmFmt, *pSdrObject ); + OutHTML_FrameFormatAsMarquee( *this, rFrameFormat, *pSdrObject ); break; case HTML_OUT_MARQUEE: OSL_ENSURE( !pCntnrStr, "Marquee: Container ist hier nicht vorgesehen" ); - OutHTML_DrawFrmFmtAsMarquee( *this, - static_cast<const SwDrawFrmFmt &>(rFrmFmt), *pSdrObject ); + OutHTML_DrawFrameFormatAsMarquee( *this, + static_cast<const SwDrawFrameFormat &>(rFrameFormat), *pSdrObject ); break; case HTML_OUT_GRFFRM: - OutHTML_FrmFmtAsImage( *this, rFrmFmt, pCntnrStr != 0 ); + OutHTML_FrameFormatAsImage( *this, rFrameFormat, pCntnrStr != 0 ); break; } @@ -519,26 +519,26 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt, HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, false ); } -OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, - const OUString& rAlternateTxt, +OString SwHTMLWriter::OutFrameFormatOptions( const SwFrameFormat &rFrameFormat, + const OUString& rAlternateText, sal_uInt32 nFrmOpts, const OString &rEndTags ) { OString sRetEndTags(rEndTags); OStringBuffer sOut; const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); // Name if( (nFrmOpts & (HTML_FRMOPT_ID|HTML_FRMOPT_NAME)) && - !rFrmFmt.GetName().isEmpty() ) + !rFrameFormat.GetName().isEmpty() ) { const sal_Char *pStr = (nFrmOpts & HTML_FRMOPT_ID) ? OOO_STRING_SVTOOLS_HTML_O_id : OOO_STRING_SVTOOLS_HTML_O_name; sOut.append(' ').append(pStr). append("=\""); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( Strm(), rFrmFmt.GetName(), eDestEnc, &aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( Strm(), rFrameFormat.GetName(), eDestEnc, &aNonConvertableCharacters ); sOut.append('\"'); } @@ -551,25 +551,25 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, } // ALT - if( (nFrmOpts & HTML_FRMOPT_ALT) && !rAlternateTxt.isEmpty() ) + if( (nFrmOpts & HTML_FRMOPT_ALT) && !rAlternateText.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_alt). append("=\""); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( Strm(), rAlternateTxt, eDestEnc, &aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( Strm(), rAlternateText, eDestEnc, &aNonConvertableCharacters ); sOut.append('\"'); } // ALIGN const sal_Char *pStr = 0; - RndStdIds eAnchorId = rFrmFmt.GetAnchor().GetAnchorId(); + RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId(); if( (nFrmOpts & HTML_FRMOPT_ALIGN) && ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) ) { // MIB 12.3.98: Ist es nicht schlauer, absatzgebundene // Rahmen notfalls links auszurichten als sie // zeichengebunden einzufuegen??? - const SwFmtHoriOrient& rHoriOri = rFrmFmt.GetHoriOrient(); + const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); if( !(nFrmOpts & HTML_FRMOPT_S_ALIGN) || text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() || text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) @@ -584,7 +584,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, (FLY_AS_CHAR == eAnchorId) ) && SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem )) { - switch( static_cast<const SwFmtVertOrient*>(pItem)->GetVertOrient() ) + switch( static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient() ) { case text::VertOrientation::LINE_TOP: pStr = OOO_STRING_SVTOOLS_HTML_VA_top; break; case text::VertOrientation::CHAR_TOP: @@ -677,9 +677,9 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, if( (nFrmOpts & HTML_FRMOPT_SIZE) && SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && ( (nFrmOpts & HTML_FRMOPT_ANYSIZE) || - ATT_FIX_SIZE == static_cast<const SwFmtFrmSize *>(pItem)->GetHeightSizeType()) ) + ATT_FIX_SIZE == static_cast<const SwFormatFrmSize *>(pItem)->GetHeightSizeType()) ) { - const SwFmtFrmSize *pFSItem = static_cast<const SwFmtFrmSize *>(pItem); + const SwFormatFrmSize *pFSItem = static_cast<const SwFormatFrmSize *>(pItem); sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); @@ -740,12 +740,12 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, // Umlauf fuer absatzgeb. Grafiken als <BR CLEAR=...> in den String // schreiben if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) && - ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) || - (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) && + ((FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) || + (FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId())) && SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem )) { - const SwFmtSurround* pSurround = static_cast<const SwFmtSurround*>(pItem); - sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient(); + const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem); + sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient(); pStr = 0; SwSurround eSurround = pSurround->GetSurround(); bool bAnchorOnly = pSurround->IsAnchorOnly(); @@ -805,17 +805,17 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, return sRetEndTags; } -void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rFrmFmt, const OUString& rAlternateText, sal_uInt32 nFrameOptions) +void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAlternateText, sal_uInt32 nFrameOptions) { const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); // Name if( (nFrameOptions & (HTML_FRMOPT_ID|HTML_FRMOPT_NAME)) && - !rFrmFmt.GetName().isEmpty() ) + !rFrameFormat.GetName().isEmpty() ) { const sal_Char* pAttributeName = (nFrameOptions & HTML_FRMOPT_ID) ? OOO_STRING_SVTOOLS_HTML_O_id : OOO_STRING_SVTOOLS_HTML_O_name; - aHtml.attribute(pAttributeName, rFrmFmt.GetName()); + aHtml.attribute(pAttributeName, rFrameFormat.GetName()); } // Name @@ -834,11 +834,11 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF // align const sal_Char* pAlignString = 0; - RndStdIds eAnchorId = rFrmFmt.GetAnchor().GetAnchorId(); + RndStdIds eAnchorId = rFrameFormat.GetAnchor().GetAnchorId(); if( (nFrameOptions & HTML_FRMOPT_ALIGN) && ((FLY_AT_PARA == eAnchorId) || (FLY_AT_CHAR == eAnchorId)) ) { - const SwFmtHoriOrient& rHoriOri = rFrmFmt.GetHoriOrient(); + const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); if( !(nFrameOptions & HTML_FRMOPT_S_ALIGN) || text::RelOrientation::FRAME == rHoriOri.GetRelationOrient() || text::RelOrientation::PRINT_AREA == rHoriOri.GetRelationOrient() ) @@ -853,7 +853,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF (FLY_AS_CHAR == eAnchorId) ) && SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, true, &pItem )) { - switch( static_cast<const SwFmtVertOrient*>(pItem)->GetVertOrient() ) + switch( static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient() ) { case text::VertOrientation::LINE_TOP: pAlignString = OOO_STRING_SVTOOLS_HTML_VA_top; break; case text::VertOrientation::CHAR_TOP: @@ -943,9 +943,9 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF if( (nFrameOptions & HTML_FRMOPT_SIZE) && SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) && ( (nFrameOptions & HTML_FRMOPT_ANYSIZE) || - ATT_FIX_SIZE == static_cast<const SwFmtFrmSize *>(pItem)->GetHeightSizeType()) ) + ATT_FIX_SIZE == static_cast<const SwFormatFrmSize *>(pItem)->GetHeightSizeType()) ) { - const SwFmtFrmSize *pFSItem = static_cast<const SwFmtFrmSize *>(pItem); + const SwFormatFrmSize *pFSItem = static_cast<const SwFormatFrmSize *>(pItem); sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent(); sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent(); @@ -1002,14 +1002,14 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF // schreiben if( (nFrameOptions & HTML_FRMOPT_BRCLEAR) && - ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) || - (FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) && + ((FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) || + (FLY_AT_CHAR == rFrameFormat.GetAnchor().GetAnchorId())) && SfxItemState::SET == rItemSet.GetItemState( RES_SURROUND, true, &pItem )) { const sal_Char* pSurroundString = 0; - const SwFmtSurround* pSurround = static_cast<const SwFmtSurround*>(pItem); - sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient(); + const SwFormatSurround* pSurround = static_cast<const SwFormatSurround*>(pItem); + sal_Int16 eHoriOri = rFrameFormat.GetHoriOrient().GetHoriOrient(); SwSurround eSurround = pSurround->GetSurround(); bool bAnchorOnly = pSurround->IsAnchorOnly(); switch( eHoriOri ) @@ -1067,8 +1067,8 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF namespace { -OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, const SwFrmFmt& rFrmFmt, - const Size& rRealSize, const ImageMap* pAltImgMap, const SwFmtURL*& pURLItem) +OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, const SwFrameFormat& rFrameFormat, + const Size& rRealSize, const ImageMap* pAltImgMap, const SwFormatURL*& pURLItem) { OUString aIMapName; @@ -1078,7 +1078,7 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con // uebergeben wurde if (!pAltImgMap && SfxItemState::SET == rItemSet.GetItemState( RES_URL, true, &pItem)) { - pURLItem = static_cast<const SwFmtURL*>( pItem); + pURLItem = static_cast<const SwFormatURL*>( pItem); } // Image-Map rausschreiben @@ -1126,8 +1126,8 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con Fraction aScaleX(1, 1); Fraction aScaleY(1, 1); - const SwFmtFrmSize& rFrmSize = rFrmFmt.GetFrmSize(); - const SvxBoxItem& rBox = rFrmFmt.GetBox(); + const SwFormatFrmSize& rFrmSize = rFrameFormat.GetFrmSize(); + const SvxBoxItem& rBox = rFrameFormat.GetBox(); if (!rFrmSize.GetWidthPercent() && rRealSize.Width()) { @@ -1202,8 +1202,8 @@ OUString lclWriteOutImap(SwHTMLWriter& rHTMLWrt, const SfxItemSet& rItemSet, con } -Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, - Graphic& rGraphic, const OUString& rAlternateTxt, +Writer& OutHTML_Image( Writer& rWrt, const SwFrameFormat &rFrameFormat, + Graphic& rGraphic, const OUString& rAlternateText, const Size &rRealSize, sal_uInt32 nFrmOpts, const sal_Char *pMarkType, const ImageMap *pAltImgMap ) @@ -1214,17 +1214,17 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, return rHTMLWrt; // ggf. ein noch offenes Attribut voruebergehend beenden - if( !rHTMLWrt.aINetFmts.empty() ) + if( !rHTMLWrt.aINetFormats.empty() ) { - SwFmtINetFmt* pINetFmt = rHTMLWrt.aINetFmts.back(); - OutHTML_INetFmt( rWrt, *pINetFmt, false ); + SwFormatINetFormat* pINetFormat = rHTMLWrt.aINetFormats.back(); + OutHTML_INetFormat( rWrt, *pINetFormat, false ); } const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); - const SwFmtURL* pURLItem = 0; - OUString aIMapName = lclWriteOutImap(rHTMLWrt, rItemSet, rFrmFmt, rRealSize, pAltImgMap, pURLItem); + const SwFormatURL* pURLItem = 0; + OUString aIMapName = lclWriteOutImap(rHTMLWrt, rItemSet, rFrameFormat, rRealSize, pAltImgMap, pURLItem); // put img into new line if( rHTMLWrt.bLFPossible ) @@ -1233,9 +1233,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, HtmlWriter aHtml(rWrt.Strm()); // <a name=...></a>...<img ...> - if( pMarkType && !rFrmFmt.GetName().isEmpty() ) + if( pMarkType && !rFrameFormat.GetName().isEmpty() ) { - rHTMLWrt.OutImplicitMark( rFrmFmt.GetName(), pMarkType ); + rHTMLWrt.OutImplicitMark( rFrameFormat.GetName(), pMarkType ); } // URL -> <a>...<img ... >...</a> @@ -1382,9 +1382,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, } // alt, align, width, height, hspace, vspace - rHTMLWrt.writeFrameFormatOptions(aHtml, rFrmFmt, rAlternateTxt, nFrmOpts); + rHTMLWrt.writeFrameFormatOptions(aHtml, rFrameFormat, rAlternateText, nFrmOpts); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) ) - rHTMLWrt.OutCSS1_FrmFmtOptions( rFrmFmt, nFrmOpts ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmOpts ); if( nFrmOpts & HTML_FRMOPT_BORDER ) { @@ -1403,12 +1403,12 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, aHtml.flushStack(); - if( !rHTMLWrt.aINetFmts.empty() ) + if( !rHTMLWrt.aINetFormats.empty() ) { // es ist noch ein Attribut auf dem Stack, das wieder geoeffnet // werden muss - SwFmtINetFmt *pINetFmt = rHTMLWrt.aINetFmts.back(); - OutHTML_INetFmt( rWrt, *pINetFmt, true ); + SwFormatINetFormat *pINetFormat = rHTMLWrt.aINetFormats.back(); + OutHTML_INetFormat( rWrt, *pINetFormat, true ); } return rHTMLWrt; @@ -1453,12 +1453,12 @@ Writer& OutHTML_BulletImage( Writer& rWrt, return rWrt; } -static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt ) +static Writer& OutHTML_FrameFormatTableNode( Writer& rWrt, const SwFrameFormat& rFrameFormat ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; sal_uLong nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex(); OUString aCaption; @@ -1466,43 +1466,43 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt ) // Nicht const, weil GetTable spater mal nicht const ist SwNode *pNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]; - SwTableNode *pTblNd = pNd->GetTableNode(); - const SwTxtNode *pTxtNd = pNd->GetTxtNode(); - if( !pTblNd && pTxtNd ) + SwTableNode *pTableNd = pNd->GetTableNode(); + const SwTextNode *pTextNd = pNd->GetTextNode(); + if( !pTableNd && pTextNd ) { // Tabelle mit Ueberschrift bTopCaption = true; - pTblNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode(); + pTableNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode(); } - OSL_ENSURE( pTblNd, "Rahmen enthaelt keine Tabelle" ); - if( pTblNd ) + OSL_ENSURE( pTableNd, "Rahmen enthaelt keine Tabelle" ); + if( pTableNd ) { - sal_uLong nTblEnd = pTblNd->EndOfSectionIndex(); - OSL_ENSURE( nTblEnd == nEnd - 1 || - (nTblEnd == nEnd - 2 && !bTopCaption), + sal_uLong nTableEnd = pTableNd->EndOfSectionIndex(); + OSL_ENSURE( nTableEnd == nEnd - 1 || + (nTableEnd == nEnd - 2 && !bTopCaption), "Ungeuelter Rahmen-Inhalt fuer Tabelle" ); - if( nTblEnd == nEnd - 2 ) - pTxtNd = rHTMLWrt.pDoc->GetNodes()[nTblEnd+1]->GetTxtNode(); + if( nTableEnd == nEnd - 2 ) + pTextNd = rHTMLWrt.pDoc->GetNodes()[nTableEnd+1]->GetTextNode(); } - if( pTxtNd ) - aCaption = pTxtNd->GetTxt(); + if( pTextNd ) + aCaption = pTextNd->GetText(); - if( pTblNd ) + if( pTableNd ) { - HTMLSaveData aSaveData( rHTMLWrt, pTblNd->GetIndex()+1, - pTblNd->EndOfSectionIndex(), - true, &rFrmFmt ); + HTMLSaveData aSaveData( rHTMLWrt, pTableNd->GetIndex()+1, + pTableNd->EndOfSectionIndex(), + true, &rFrameFormat ); rHTMLWrt.bOutFlyFrame = true; - OutHTML_SwTblNode( rHTMLWrt, *pTblNd, &rFrmFmt, &aCaption, + OutHTML_SwTableNode( rHTMLWrt, *pTableNd, &rFrameFormat, &aCaption, bTopCaption ); } return rWrt; } -static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, - const SwFrmFmt& rFrmFmt, +static Writer & OutHTML_FrameFormatAsMulticol( Writer& rWrt, + const SwFrameFormat& rFrameFormat, bool bInCntnr ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1519,10 +1519,10 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, OStringBuffer sOut; sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_multicol); - const SwFmtCol& rFmtCol = rFrmFmt.GetCol(); + const SwFormatCol& rFormatCol = rFrameFormat.GetCol(); // die Anzahl der Spalten als COLS ausgeben - sal_uInt16 nCols = rFmtCol.GetNumCols(); + sal_uInt16 nCols = rFormatCol.GetNumCols(); if( nCols ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols). @@ -1530,7 +1530,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, } // die Gutter-Breite (Minimalwert) als GUTTER - sal_uInt16 nGutter = rFmtCol.GetGutterWidth( true ); + sal_uInt16 nGutter = rFormatCol.GetGutterWidth( true ); if( nGutter!=USHRT_MAX ) { if( nGutter && Application::GetDefaultDevice() ) @@ -1550,17 +1550,17 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, : HTML_FRMOPTS_MULTICOL; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) nFrmFlags |= HTML_FRMOPTS_MULTICOL_CSS1; - rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyOUStr, nFrmFlags ); + rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrmFlags ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) - rHTMLWrt.OutCSS1_FrmFmtOptions( rFrmFmt, nFrmFlags ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags ); rWrt.Strm().WriteChar( '>' ); rHTMLWrt.bLFPossible = true; rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken; - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex(); + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Wo ist der Start-Node" ); @@ -1569,7 +1569,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, // wieder hergestellt wird. HTMLSaveData aSaveData( rHTMLWrt, nStt+1, pSttNd->EndOfSectionIndex(), - true, &rFrmFmt ); + true, &rFrameFormat ); rHTMLWrt.bOutFlyFrame = true; rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); } @@ -1583,7 +1583,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, return rWrt; } -static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt ) +static Writer& OutHTML_FrameFormatAsSpacer( Writer& rWrt, const SwFrameFormat& rFrameFormat ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1598,7 +1598,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt ) rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); // ALIGN, WIDTH, HEIGHT - OString aEndTags = rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyOUStr, HTML_FRMOPTS_SPACER ); + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, HTML_FRMOPTS_SPACER ); rWrt.Strm().WriteChar( '>' ); if( !aEndTags.isEmpty() ) @@ -1607,8 +1607,8 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt ) return rWrt; } -static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt, - const SwFrmFmt& rFrmFmt, bool bSpan) +static Writer& OutHTML_FrameFormatAsDivOrSpan( Writer& rWrt, + const SwFrameFormat& rFrameFormat, bool bSpan) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1635,15 +1635,15 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt, sal_uLong nFrmFlags = HTML_FRMOPTS_DIV; if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) ) nFrmFlags |= HTML_FRMOPT_S_NOBORDER; - OString aEndTags = rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyOUStr, nFrmFlags ); - rHTMLWrt.OutCSS1_FrmFmtOptions( rFrmFmt, nFrmFlags ); + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, aEmptyOUStr, nFrmFlags ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmFlags ); rWrt.Strm().WriteChar( '>' ); rHTMLWrt.IncIndentLevel(); // den Inhalt einruecken rHTMLWrt.bLFPossible = true; - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex(); + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); // Am Start-Node verankerte Rahmen-gebundene Rahmen ausgeben rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY ); @@ -1656,7 +1656,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt, // wieder hergestellt wird. HTMLSaveData aSaveData( rHTMLWrt, nStt+1, pSttNd->EndOfSectionIndex(), - true, &rFrmFmt ); + true, &rFrameFormat ); rHTMLWrt.bOutFlyFrame = true; rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); } @@ -1672,7 +1672,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt, return rWrt; } -static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt, +static Writer & OutHTML_FrameFormatAsImage( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool /*bInCntnr*/ ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1681,16 +1681,16 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt, return rWrt; ImageMap aIMap; - Graphic aGraphic( ((SwFrmFmt &)rFrmFmt).MakeGraphic( &aIMap ) ); + Graphic aGraphic( ((SwFrameFormat &)rFrameFormat).MakeGraphic( &aIMap ) ); Size aSz( 0, 0 ); - OutHTML_Image( rWrt, rFrmFmt, aGraphic, rFrmFmt.GetName(), aSz, + OutHTML_Image( rWrt, rFrameFormat, aGraphic, rFrameFormat.GetName(), aSz, HTML_FRMOPTS_GENIMG, "frame", aIMap.GetIMapObjectCount() ? &aIMap : 0 ); return rWrt; } -static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, +static Writer& OutHTML_FrameFormatGrfNode( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool bInCntnr ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1698,8 +1698,8 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, if (rHTMLWrt.mbSkipImages) return rWrt; - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode(); OSL_ENSURE( pGrfNd, "Grf-Node erwartet" ); if( !pGrfNd ) @@ -1710,43 +1710,43 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, nFrmFlags |= HTML_FRMOPTS_IMG_CSS1; Graphic aGraphic = pGrfNd->GetGraphic(); - OutHTML_Image( rWrt, rFrmFmt, aGraphic, pGrfNd->GetTitle(), + OutHTML_Image( rWrt, rFrameFormat, aGraphic, pGrfNd->GetTitle(), pGrfNd->GetTwipSize(), nFrmFlags, "graphic" ); return rWrt; } -static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt, +static Writer& OutHTML_FrameFormatAsMarquee( Writer& rWrt, const SwFrameFormat& rFrameFormat, const SdrObject& rSdrObj ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); // die Edit-Engine-Attribute des Objekts als SW-Attribute holen // und als Hints einsortieren - const SfxItemSet& rFmtItemSet = rFrmFmt.GetAttrSet(); - SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN, + const SfxItemSet& rFormatItemSet = rFrameFormat.GetAttrSet(); + SfxItemSet aItemSet( *rFormatItemSet.GetPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, true ); bool bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles; rHTMLWrt.bCfgOutStyles = false; - rHTMLWrt.bTxtAttr = true; + rHTMLWrt.bTextAttr = true; rHTMLWrt.bTagOn = true; Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, false ); - rHTMLWrt.bTxtAttr = false; + rHTMLWrt.bTextAttr = false; - OutHTML_DrawFrmFmtAsMarquee( rHTMLWrt, - static_cast<const SwDrawFrmFmt &>(rFrmFmt), + OutHTML_DrawFrameFormatAsMarquee( rHTMLWrt, + static_cast<const SwDrawFrameFormat &>(rFrameFormat), rSdrObj ); - rHTMLWrt.bTxtAttr = true; + rHTMLWrt.bTextAttr = true; rHTMLWrt.bTagOn = false; Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, false ); - rHTMLWrt.bTxtAttr = false; + rHTMLWrt.bTextAttr = false; rHTMLWrt.bCfgOutStyles = bCfgOutStylesOld; return rWrt; } -Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, +Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool bHeader ) { SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); @@ -1764,7 +1764,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, // Einen Spacer fuer den Absatnd zusammenbasteln. Da durch das // <DL> bzw. </DL> immer einer Absatz-Abstand entsteht, wird der // ggf. abgezogen. - const SvxULSpaceItem& rULSpace = rFrmFmt.GetULSpace(); + const SvxULSpaceItem& rULSpace = rFrameFormat.GetULSpace(); sal_uInt16 nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper(); rHTMLWrt.nHeaderFooterSpace = nSize; @@ -1784,8 +1784,8 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, makeStringAndClear(); } - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex(); + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex(); const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode(); OSL_ENSURE( pSttNd, "Wo ist der Start-Node" ); @@ -1797,7 +1797,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, { // in einem Block damit rechtzeitig vor dem Ende der alte Zustand - // wieder hergestellt wird. pFlyFmt braucht hier nicht gestzt zu + // wieder hergestellt wird. pFlyFormat braucht hier nicht gestzt zu // werden, denn PageDesc-Attribute koennen hier nicht vorkommen HTMLSaveData aSaveData( rHTMLWrt, nStt+1, pSttNd->EndOfSectionIndex() ); @@ -1911,29 +1911,29 @@ void SwHTMLWriter::AddLinkTarget( const OUString& rURL ) void SwHTMLWriter::CollectLinkTargets() { - const SwFmtINetFmt* pINetFmt; - const SwTxtINetFmt* pTxtAttr; + const SwFormatINetFormat* pINetFormat; + const SwTextINetFormat* pTextAttr; sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT ); for( n = 0; n < nMaxItems; ++n ) { - const SwTxtNode* pTxtNd; + const SwTextNode* pTextNd; - if( 0 != (pINetFmt = static_cast<const SwFmtINetFmt*>(pDoc->GetAttrPool().GetItem2( + if( 0 != (pINetFormat = static_cast<const SwFormatINetFormat*>(pDoc->GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) ) && - 0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) && - 0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) && - pTxtNd->GetNodes().IsDocNodes() ) + 0 != ( pTextAttr = pINetFormat->GetTextINetFormat()) && + 0 != ( pTextNd = pTextAttr->GetpTextNode() ) && + pTextNd->GetNodes().IsDocNodes() ) { - AddLinkTarget( pINetFmt->GetValue() ); + AddLinkTarget( pINetFormat->GetValue() ); } } - const SwFmtURL *pURL; + const SwFormatURL *pURL; nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL ); for( n = 0; n < nMaxItems; ++n ) { - if( 0 != (pURL = static_cast<const SwFmtURL*>(pDoc->GetAttrPool().GetItem2( + if( 0 != (pURL = static_cast<const SwFormatURL*>(pDoc->GetAttrPool().GetItem2( RES_URL, n ) ) ) ) { AddLinkTarget( pURL->GetURL() ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 13469b1569f1..1f5dd09da113 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -280,11 +280,11 @@ const uno::Reference< drawing::XDrawPage >& SwHTMLForm_Impl::GetDrawPage() { if( !xDrawPage.is() && pDocSh ) { - uno::Reference< drawing::XDrawPageSupplier > xTxtDoc( pDocSh->GetBaseModel(), + uno::Reference< drawing::XDrawPageSupplier > xTextDoc( pDocSh->GetBaseModel(), UNO_QUERY ); - OSL_ENSURE( xTxtDoc.is(), + OSL_ENSURE( xTextDoc.is(), "drawing::XDrawPageSupplier nicht vom XModel erhalten" ); - xDrawPage = xTxtDoc->getDrawPage(); + xDrawPage = xTextDoc->getDrawPage(); OSL_ENSURE( xDrawPage.is(), "drawing::XDrawPage nicht erhalten" ); } return xDrawPage; @@ -517,19 +517,19 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" ); if( pSwShape ) { - SwFrmFmt *pFrmFmt = pSwShape->GetFrmFmt(); + SwFrameFormat *pFrameFormat = pSwShape->GetFrameFormat(); - const SwDoc *pDoc = pFrmFmt->GetDoc(); - const SwPosition* pAPos = pFrmFmt->GetAnchor().GetCntntAnchor(); + const SwDoc *pDoc = pFrameFormat->GetDoc(); + const SwPosition* pAPos = pFrameFormat->GetAnchor().GetContentAnchor(); SwNode *pANd; - SwTableNode *pTblNd; + SwTableNode *pTableNd; if( pAPos && 0 != (pANd = & pAPos->nNode.GetNode()) && - 0 != (pTblNd = pANd->FindTableNode()) ) + 0 != (pTableNd = pANd->FindTableNode()) ) { - const bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize(); + const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = - pTblNd->GetTable().GetHTMLTableLayout(); + pTableNd->GetTable().GetHTMLTableLayout(); if( pLayout ) { const sal_uInt16 nBrowseWidth = @@ -678,11 +678,11 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha OSL_ENSURE( pSwShape, "Wo ist das SW-Shape?" ); // es muss ein Draw-Format sein - SwFrmFmt *pFrmFmt = pSwShape ? pSwShape->GetFrmFmt() : NULL ; - OSL_ENSURE( pFrmFmt && RES_DRAWFRMFMT == pFrmFmt->Which(), "Kein DrawFrmFmt" ); + SwFrameFormat *pFrameFormat = pSwShape ? pSwShape->GetFrameFormat() : NULL ; + OSL_ENSURE( pFrameFormat && RES_DRAWFRMFMT == pFrameFormat->Which(), "Kein DrawFrameFormat" ); // Schauen, ob es ein SdrObject dafuer gibt - const SdrObject *pObj = pFrmFmt ? pFrmFmt->FindSdrObject() : NULL; + const SdrObject *pObj = pFrameFormat ? pFrameFormat->FindSdrObject() : NULL; OSL_ENSURE( pObj, "SdrObject nicht gefunden" ); OSL_ENSURE( pObj && FmFormInventor == pObj->GetObjInventor(), "falscher Inventor" ); @@ -755,9 +755,9 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha static void lcl_html_setEvents( const uno::Reference< script::XEventAttacherManager > & rEvtMn, - sal_uInt32 nPos, const SvxMacroTableDtor& rMacroTbl, - const std::vector<OUString>& rUnoMacroTbl, - const std::vector<OUString>& rUnoMacroParamTbl, + sal_uInt32 nPos, const SvxMacroTableDtor& rMacroTable, + const std::vector<OUString>& rUnoMacroTable, + const std::vector<OUString>& rUnoMacroParamTable, const OUString& rType ) { // Erstmal muss die Anzahl der Events ermittelt werden ... @@ -766,15 +766,15 @@ static void lcl_html_setEvents( for( i = 0; HTML_ET_END != aEventTypeTable[i]; i++ ) { - const SvxMacro *pMacro = rMacroTbl.Get( aEventTypeTable[i] ); + const SvxMacro *pMacro = rMacroTable.Get( aEventTypeTable[i] ); // Solange nicht alle Events implementiert sind, enthaelt die // Tabelle auch Leerstrings! if( pMacro && aEventListenerTable[i] ) nEvents++; } - for( i=0; i< rUnoMacroTbl.size(); i++ ) + for( i=0; i< rUnoMacroTable.size(); i++ ) { - const OUString& rStr(rUnoMacroTbl[i]); + const OUString& rStr(rUnoMacroTable[i]); sal_Int32 nIndex = 0; if( rStr.getToken( 0, '-', nIndex ).isEmpty() || -1 == nIndex ) continue; @@ -793,7 +793,7 @@ static void lcl_html_setEvents( for( i=0; HTML_ET_END != aEventTypeTable[i]; i++ ) { - const SvxMacro *pMacro = rMacroTbl.Get( aEventTypeTable[i] ); + const SvxMacro *pMacro = rMacroTable.Get( aEventTypeTable[i] ); if( pMacro && aEventListenerTable[i] ) { script::ScriptEventDescriptor& rDesc = pDescs[nEvent++]; @@ -805,9 +805,9 @@ static void lcl_html_setEvents( } } - for( i=0; i< rUnoMacroTbl.size(); ++i ) + for( i=0; i< rUnoMacroTable.size(); ++i ) { - const OUString& rStr = rUnoMacroTbl[i]; + const OUString& rStr = rUnoMacroTable[i]; sal_Int32 nIndex = 0; OUString sListener( rStr.getToken( 0, '-', nIndex ) ); if( sListener.isEmpty() || -1 == nIndex ) @@ -828,14 +828,14 @@ static void lcl_html_setEvents( rDesc.ScriptCode = sCode; rDesc.AddListenerParam.clear(); - if(!rUnoMacroParamTbl.empty()) + if(!rUnoMacroParamTable.empty()) { OUString sSearch( sListener ); sSearch += "-" +sMethod + "-"; sal_Int32 nLen = sSearch.getLength(); - for(size_t j = 0; j < rUnoMacroParamTbl.size(); ++j) + for(size_t j = 0; j < rUnoMacroParamTable.size(); ++j) { - const OUString& rParam = rUnoMacroParamTbl[j]; + const OUString& rParam = rUnoMacroParamTable[j]; if( rParam.startsWith( sSearch ) && rParam.getLength() > nLen ) { rDesc.AddListenerParam = rParam.copy(nLen); @@ -848,20 +848,20 @@ static void lcl_html_setEvents( } static void lcl_html_getEvents( const OUString& rOption, const OUString& rValue, - std::vector<OUString>& rUnoMacroTbl, - std::vector<OUString>& rUnoMacroParamTbl ) + std::vector<OUString>& rUnoMacroTable, + std::vector<OUString>& rUnoMacroParamTable ) { if( rOption.startsWithIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_sdevent ) ) { OUString aEvent( rOption.copy( strlen( OOO_STRING_SVTOOLS_HTML_O_sdevent ) ) ); aEvent += "-" + rValue; - rUnoMacroTbl.push_back(aEvent); + rUnoMacroTable.push_back(aEvent); } else if( rOption.startsWithIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_O_sdaddparam ) ) { OUString aParam( rOption.copy( strlen( OOO_STRING_SVTOOLS_HTML_O_sdaddparam ) ) ); aParam += "-" + rValue; - rUnoMacroParamTbl.push_back(aParam); + rUnoMacroParamTable.push_back(aParam); } } @@ -870,8 +870,8 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( const uno::Reference< beans::XPropertySet > & rFCompPropSet, const Size& rSize, sal_Int16 eVertOri, sal_Int16 eHoriOri, SfxItemSet& rCSS1ItemSet, SvxCSS1PropertyInfo& rCSS1PropInfo, - const SvxMacroTableDtor& rMacroTbl, const std::vector<OUString>& rUnoMacroTbl, - const std::vector<OUString>& rUnoMacroParamTbl, bool bSetFCompPropSet, + const SvxMacroTableDtor& rMacroTable, const std::vector<OUString>& rUnoMacroTable, + const std::vector<OUString>& rUnoMacroParamTable, bool bSetFCompPropSet, bool bHidden ) { uno::Reference< drawing::XShape > xShape; @@ -916,7 +916,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( // Ggf. den Erstzeilen-Einzug noch plaetten const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem); SvxLRSpaceItem aLRItem( *pLRItem ); - aLRItem.SetTxtFirstLineOfst( 0 ); + aLRItem.SetTextFirstLineOfst( 0 ); if( rCSS1PropInfo.bLeftMargin ) { nLeftSpace = static_cast< sal_uInt16 >(convertTwipToMm100( aLRItem.GetLeft() )); @@ -1081,7 +1081,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( rFCompPropSet->setPropertyValue( sPropName, aTmp ); } - uno::Reference< text::XTextRange > xTxtRg; + uno::Reference< text::XTextRange > xTextRg; sal_Int16 nAnchorType = text::TextContentAnchorType_AS_CHARACTER; bool bSetPos = false, bSetSurround = false; sal_Int32 nXPos = 0, nYPos = 0; @@ -1098,8 +1098,8 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( nAnchorType = text::TextContentAnchorType_AT_FRAME; SwPaM aPaM( *pFlySttNd ); - uno::Reference< text::XText > xDummyTxtRef; // unsauber, aber laut OS geht das ... - xTxtRg = new SwXTextRange( aPaM, xDummyTxtRef ); + uno::Reference< text::XText > xDummyTextRef; // unsauber, aber laut OS geht das ... + xTextRg = new SwXTextRange( aPaM, xDummyTextRef ); } else { @@ -1173,13 +1173,13 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( } else { - if( !xTxtRg.is() ) + if( !xTextRg.is() ) { - uno::Reference< text::XText > xDummyTxtRef; // unsauber, aber laut OS geht das ... - xTxtRg = new SwXTextRange( *pPam, xDummyTxtRef ); + uno::Reference< text::XText > xDummyTextRef; // unsauber, aber laut OS geht das ... + xTextRg = new SwXTextRange( *pPam, xDummyTextRef ); } - aTmp.setValue( &xTxtRg, + aTmp.setValue( &xTextRg, cppu::UnoType<text::XTextRange>::get()); xShapePropSet->setPropertyValue("TextRange", aTmp ); } @@ -1214,11 +1214,11 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( // auch schon Fokus-Events verschickt. Damit die nicht evtl. schon // vorhendene JavaSCript-Eents rufen, werden die Events nachtraeglich // gesetzt. - if( !rMacroTbl.empty() || !rUnoMacroTbl.empty() ) + if( !rMacroTable.empty() || !rUnoMacroTable.empty() ) { lcl_html_setEvents( pFormImpl->GetControlEventManager(), rFormComps->getCount() - 1, - rMacroTbl, rUnoMacroTbl, rUnoMacroParamTbl, + rMacroTable, rUnoMacroTable, rUnoMacroParamTable, GetScriptTypeString(pFormImpl->GetHeaderAttrs()) ); } @@ -1239,7 +1239,7 @@ void SwHTMLParser::NewForm( bool bAppend ) if( bAppend ) { if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); } @@ -1251,9 +1251,9 @@ void SwHTMLParser::NewForm( bool bAppend ) OUString sName, sTarget; sal_uInt16 nEncType = FormSubmitEncoding_URL; sal_uInt16 nMethod = FormSubmitMethod_GET; - SvxMacroTableDtor aMacroTbl; - std::vector<OUString> aUnoMacroTbl; - std::vector<OUString> aUnoMacroParamTbl; + SvxMacroTableDtor aMacroTable; + std::vector<OUString> aUnoMacroTable; + std::vector<OUString> aUnoMacroParamTable; SvKeyValueIterator *pHeaderAttrs = pFormImpl->GetHeaderAttrs(); ScriptType eDfltScriptType = GetScriptType( pHeaderAttrs ); const OUString& rDfltScriptType = GetScriptTypeString( pHeaderAttrs ); @@ -1303,7 +1303,7 @@ void SwHTMLParser::NewForm( bool bAppend ) default: lcl_html_getEvents( rOption.GetTokenString(), rOption.GetString(), - aUnoMacroTbl, aUnoMacroParamTbl ); + aUnoMacroTable, aUnoMacroParamTable ); break; } @@ -1316,7 +1316,7 @@ void SwHTMLParser::NewForm( bool bAppend ) OUString aScriptType2; if( EXTENDED_STYPE==eScriptType2 ) aScriptType2 = rDfltScriptType; - aMacroTbl.Insert( nEvent, SvxMacro( sEvent, aScriptType2, eScriptType2 ) ); + aMacroTable.Insert( nEvent, SvxMacro( sEvent, aScriptType2, eScriptType2 ) ); } } } @@ -1376,10 +1376,10 @@ void SwHTMLParser::NewForm( bool bAppend ) pFormImpl->GetForms(); Any aAny( &xForm, cppu::UnoType<XForm>::get()); rForms->insertByIndex( rForms->getCount(), aAny ); - if( !aMacroTbl.empty() ) + if( !aMacroTable.empty() ) lcl_html_setEvents( pFormImpl->GetFormEventManager(), rForms->getCount() - 1, - aMacroTbl, aUnoMacroTbl, aUnoMacroParamTbl, + aMacroTable, aUnoMacroTable, aUnoMacroParamTable, rDfltScriptType ); } @@ -1390,7 +1390,7 @@ void SwHTMLParser::EndForm( bool bAppend ) if( bAppend ) { if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); } @@ -1408,9 +1408,9 @@ void SwHTMLParser::InsertInput() OUString sImgSrc, aId, aClass, aStyle, sName; OUString sText; - SvxMacroTableDtor aMacroTbl; - std::vector<OUString> aUnoMacroTbl; - std::vector<OUString> aUnoMacroParamTbl; + SvxMacroTableDtor aMacroTable; + std::vector<OUString> aUnoMacroTable; + std::vector<OUString> aUnoMacroParamTable; sal_uInt16 nSize = 0; sal_Int16 nMaxLen = 0; sal_Int16 nChecked = TRISTATE_FALSE; @@ -1533,7 +1533,7 @@ void SwHTMLParser::InsertInput() default: lcl_html_getEvents( rOption.GetTokenString(), rOption.GetString(), - aUnoMacroTbl, aUnoMacroParamTbl ); + aUnoMacroTable, aUnoMacroParamTable ); break; } @@ -1546,7 +1546,7 @@ void SwHTMLParser::InsertInput() OUString aScriptType2; if( EXTENDED_STYPE==eScriptType2 ) aScriptType2 = rDfltScriptType; - aMacroTbl.Insert( nEvent, SvxMacro( sEvent, aScriptType2, eScriptType2 ) ); + aMacroTable.Insert( nEvent, SvxMacro( sEvent, aScriptType2, eScriptType2 ) ); } } } @@ -1680,11 +1680,11 @@ void SwHTMLParser::InsertInput() xPropSet->setPropertyValue("DefaultState", aTmp ); } - const SvxMacro* pMacro = aMacroTbl.Get( HTML_ET_ONCLICK ); + const SvxMacro* pMacro = aMacroTable.Get( HTML_ET_ONCLICK ); if( pMacro ) { - aMacroTbl.Insert( HTML_ET_ONCLICK_ITEM, *pMacro ); - aMacroTbl.Erase( HTML_ET_ONCLICK ); + aMacroTable.Insert( HTML_ET_ONCLICK_ITEM, *pMacro ); + aMacroTable.Erase( HTML_ET_ONCLICK ); } // SIZE auszuwerten duerfte hier keinen Sinn machen??? bMinWidth = bMinHeight = true; @@ -1846,8 +1846,8 @@ void SwHTMLParser::InsertInput() xFComp, xPropSet, aSz, eVertOri, eHoriOri, aCSS1ItemSet, aCSS1PropInfo, - aMacroTbl, aUnoMacroTbl, - aUnoMacroParamTbl, false, + aMacroTable, aUnoMacroTable, + aUnoMacroParamTable, false, bHidden ); if( aTextSz.Width() || aTextSz.Height() || bMinWidth || bMinHeight ) { @@ -1898,9 +1898,9 @@ void SwHTMLParser::NewTextArea() OUString aId, aClass, aStyle; OUString sName; sal_Int32 nTabIndex = TABINDEX_MAX + 1; - SvxMacroTableDtor aMacroTbl; - std::vector<OUString> aUnoMacroTbl; - std::vector<OUString> aUnoMacroParamTbl; + SvxMacroTableDtor aMacroTable; + std::vector<OUString> aUnoMacroTable; + std::vector<OUString> aUnoMacroParamTable; sal_uInt16 nRows = 0, nCols = 0; sal_uInt16 nWrap = HTML_WM_OFF; bool bDisabled = false; @@ -1990,7 +1990,7 @@ void SwHTMLParser::NewTextArea() default: lcl_html_getEvents( rOption.GetTokenString(), rOption.GetString(), - aUnoMacroTbl, aUnoMacroParamTbl ); + aUnoMacroTable, aUnoMacroParamTable ); break; } @@ -2002,7 +2002,7 @@ void SwHTMLParser::NewTextArea() sEvent = convertLineEnd(sEvent, GetSystemLineEnd()); if( EXTENDED_STYPE==eScriptType2 ) aScriptType = rDfltScriptType; - aMacroTbl.Insert( nEvent, SvxMacro( sEvent, aScriptType, eScriptType2 ) ); + aMacroTable.Insert( nEvent, SvxMacro( sEvent, aScriptType, eScriptType2 ) ); } } } @@ -2089,8 +2089,8 @@ void SwHTMLParser::NewTextArea() uno::Reference< drawing::XShape > xShape = InsertControl( xFComp, xPropSet, aSz, text::VertOrientation::TOP, text::HoriOrientation::NONE, aCSS1ItemSet, aCSS1PropInfo, - aMacroTbl, aUnoMacroTbl, - aUnoMacroParamTbl ); + aMacroTable, aUnoMacroTable, + aUnoMacroParamTable ); if( aTextSz.Width() || aTextSz.Height() ) SetControlSize( xShape, aTextSz, false, false ); @@ -2177,9 +2177,9 @@ void SwHTMLParser::NewSelect() OUString aId, aClass, aStyle; OUString sName; sal_Int32 nTabIndex = TABINDEX_MAX + 1; - SvxMacroTableDtor aMacroTbl; - std::vector<OUString> aUnoMacroTbl; - std::vector<OUString> aUnoMacroParamTbl; + SvxMacroTableDtor aMacroTable; + std::vector<OUString> aUnoMacroTable; + std::vector<OUString> aUnoMacroParamTable; bool bMultiple = false; bool bDisabled = false; nSelectEntryCnt = 1; @@ -2258,7 +2258,7 @@ void SwHTMLParser::NewSelect() default: lcl_html_getEvents( rOption.GetTokenString(), rOption.GetString(), - aUnoMacroTbl, aUnoMacroParamTbl ); + aUnoMacroTable, aUnoMacroParamTable ); break; } @@ -2270,7 +2270,7 @@ void SwHTMLParser::NewSelect() sEvent = convertLineEnd(sEvent, GetSystemLineEnd()); if( EXTENDED_STYPE==eScriptType2 ) aScriptType = rDfltScriptType; - aMacroTbl.Insert( nEvent, SvxMacro( sEvent, aScriptType, eScriptType2 ) ); + aMacroTable.Insert( nEvent, SvxMacro( sEvent, aScriptType, eScriptType2 ) ); } } } @@ -2360,8 +2360,8 @@ void SwHTMLParser::NewSelect() uno::Reference< drawing::XShape > xShape = InsertControl( xFComp, xPropSet, aSz, text::VertOrientation::TOP, text::HoriOrientation::NONE, aCSS1ItemSet, aCSS1PropInfo, - aMacroTbl, aUnoMacroTbl, - aUnoMacroParamTbl ); + aMacroTable, aUnoMacroTable, + aUnoMacroParamTable ); if( bFixSelectWidth ) pFormImpl->SetShape( xShape ); if( aTextSz.Height() || bMinWidth || bMinHeight ) diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 6ae81f73e066..7d5a9aa667b0 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -630,14 +630,14 @@ void SwHTMLWriter::OutHiddenControls( // hier folgen die Ausgabe-Routinen, dadurch sind die form::Forms gebuendelt: -const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrmFmt& rFmt ) +const SdrObject *SwHTMLWriter::GetHTMLControl( const SwDrawFrameFormat& rFormat ) { // es muss ein Draw-Format sein - OSL_ENSURE( RES_DRAWFRMFMT == rFmt.Which(), + OSL_ENSURE( RES_DRAWFRMFMT == rFormat.Which(), "GetHTMLControl nuer fuer Draw-Formate erlaubt" ); // Schauen, ob es ein SdrObject dafuer gibt - const SdrObject *pObj = rFmt.FindSdrObject(); + const SdrObject *pObj = rFormat.FindSdrObject(); if( !pObj || FmFormInventor != pObj->GetObjInventor() ) return 0; @@ -687,8 +687,8 @@ static void GetControlSize(const SdrUnoObj& rFormObj, Size& rSz, SwDoc *pDoc) rSz.Height() = nLines; } -Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, - const SwDrawFrmFmt& rFmt, +Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, + const SwDrawFrameFormat& rFormat, const SdrUnoObj& rFormObj, bool bInCntnr ) { @@ -1031,7 +1031,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } OString aEndTags; if( nFrmOpts != 0 ) - aEndTags = rHTMLWrt.OutFrmFmtOptions( rFmt, aEmptyOUStr, nFrmOpts ); + aEndTags = rHTMLWrt.OutFrameFormatOptions( rFormat, aEmptyOUStr, nFrmOpts ); if( rHTMLWrt.bCfgOutStyles ) { @@ -1139,7 +1139,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, } } - rHTMLWrt.OutCSS1_FrmFmtOptions( rFmt, nFrmOpts, &rFormObj, + rHTMLWrt.OutCSS1_FrameFormatOptions( rFormat, nFrmOpts, &rFormObj, &aItemSet ); } @@ -1335,20 +1335,20 @@ void SwHTMLWriter::GetControls() } // und jetzt die in einem zeichengebundenen Rahmen - const SwFrmFmts* pSpzFrmFmts = pDoc->GetSpzFrmFmts(); - for( size_t i=0; i<pSpzFrmFmts->size(); i++ ) + const SwFrameFormats* pSpzFrameFormats = pDoc->GetSpzFrameFormats(); + for( size_t i=0; i<pSpzFrameFormats->size(); i++ ) { - const SwFrmFmt *pFrmFmt = (*pSpzFrmFmts)[i]; - if( RES_DRAWFRMFMT != pFrmFmt->Which() ) + const SwFrameFormat *pFrameFormat = (*pSpzFrameFormats)[i]; + if( RES_DRAWFRMFMT != pFrameFormat->Which() ) continue; - const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - const SwPosition *pPos = rAnchor.GetCntntAnchor(); + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + const SwPosition *pPos = rAnchor.GetContentAnchor(); if ((FLY_AS_CHAR != rAnchor.GetAnchorId()) || !pPos) continue; const SdrObject *pSdrObj = - SwHTMLWriter::GetHTMLControl( *static_cast<const SwDrawFrmFmt*>(pFrmFmt) ); + SwHTMLWriter::GetHTMLControl( *static_cast<const SwDrawFrameFormat*>(pFrameFormat) ); if( !pSdrObj ) continue; diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index 975cb4216da1..e71d5372ab51 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -33,7 +33,7 @@ struct SwHTMLFootEndNote_Impl { - SwHTMLTxtFtns aTxtFtns; + SwHTMLTextFootnotes aTextFootnotes; std::vector<OUString> aNames; OUString sName; @@ -98,14 +98,14 @@ sal_Int32 lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo, switch( nPart ) { case 0: - rInfo.aFmt.SetNumberingType( static_cast< sal_Int16 >(bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC)); + rInfo.aFormat.SetNumberingType( static_cast< sal_Int16 >(bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC)); if( !aPart.isEmpty() ) - rInfo.aFmt.SetNumberingType(SwHTMLParser::GetNumType( aPart, - rInfo.aFmt.GetNumberingType() )); + rInfo.aFormat.SetNumberingType(SwHTMLParser::GetNumType( aPart, + rInfo.aFormat.GetNumberingType() )); break; case 1: - rInfo.nFtnOffset = aPart.isEmpty() ? 0 : (sal_uInt16)aPart.toInt32(); + rInfo.nFootnoteOffset = aPart.isEmpty() ? 0 : (sal_uInt16)aPart.toInt32(); break; case 2: @@ -130,7 +130,7 @@ void SwHTMLParser::FillEndNoteInfo( const OUString& rContent ) void SwHTMLParser::FillFootNoteInfo( const OUString& rContent ) { - SwFtnInfo aInfo( pDoc->GetFtnInfo() ); + SwFootnoteInfo aInfo( pDoc->GetFootnoteInfo() ); sal_Int32 nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, false ); @@ -177,7 +177,7 @@ void SwHTMLParser::FillFootNoteInfo( const OUString& rContent ) } } - pDoc->SetFtnInfo( aInfo ); + pDoc->SetFootnoteInfo( aInfo ); } void SwHTMLParser::InsertFootEndNote( const OUString& rName, bool bEndNote, @@ -200,18 +200,18 @@ void SwHTMLParser::FinishFootEndNote() if( !pFootEndNoteImpl ) return; - SwFmtFtn aFtn( pFootEndNoteImpl->bEndNote ); + SwFormatFootnote aFootnote( pFootEndNoteImpl->bEndNote ); if( pFootEndNoteImpl->bFixed ) - aFtn.SetNumStr( pFootEndNoteImpl->sContent ); + aFootnote.SetNumStr( pFootEndNoteImpl->sContent ); - pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, aFtn ); - SwTxtFtn * const pTxtFtn = static_cast<SwTxtFtn *>( - pPam->GetNode().GetTxtNode()->GetTxtAttrForCharAt( + pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, aFootnote ); + SwTextFootnote * const pTextFootnote = static_cast<SwTextFootnote *>( + pPam->GetNode().GetTextNode()->GetTextAttrForCharAt( pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) ); // In Kopf- und Fusszeilen duerfen keine Fussnoten eingefuegt werden. - if( pTxtFtn ) + if( pTextFootnote ) { - pFootEndNoteImpl->aTxtFtns.push_back( pTxtFtn ); + pFootEndNoteImpl->aTextFootnotes.push_back( pTextFootnote ); pFootEndNoteImpl->aNames.push_back(pFootEndNoteImpl->sName); } pFootEndNoteImpl->sName = aEmptyOUStr; @@ -244,9 +244,9 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName ) { if(pFootEndNoteImpl->aNames[i] == aName) { - pStartNodeIdx = pFootEndNoteImpl->aTxtFtns[i]->GetStartNode(); + pStartNodeIdx = pFootEndNoteImpl->aTextFootnotes[i]->GetStartNode(); pFootEndNoteImpl->aNames.erase(pFootEndNoteImpl->aNames.begin() + i); - pFootEndNoteImpl->aTxtFtns.erase( pFootEndNoteImpl->aTxtFtns.begin() + i ); + pFootEndNoteImpl->aTextFootnotes.erase( pFootEndNoteImpl->aTextFootnotes.begin() + i ); if(pFootEndNoteImpl->aNames.empty()) { delete pFootEndNoteImpl; @@ -261,35 +261,35 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName ) return pStartNodeIdx; } -Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt ) +Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - SwFmtFtn& rFmtFtn = const_cast<SwFmtFtn&>(static_cast<const SwFmtFtn&>(rHt)); - SwTxtFtn *pTxtFtn = rFmtFtn.GetTxtFtn(); - if( !pTxtFtn ) + SwFormatFootnote& rFormatFootnote = const_cast<SwFormatFootnote&>(static_cast<const SwFormatFootnote&>(rHt)); + SwTextFootnote *pTextFootnote = rFormatFootnote.GetTextFootnote(); + if( !pTextFootnote ) return rWrt; - OUString sFtnName, sClass; + OUString sFootnoteName, sClass; sal_uInt16 nPos; - if( rFmtFtn.IsEndNote() ) + if( rFormatFootnote.IsEndNote() ) { nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->size() : 0; OSL_ENSURE( nPos == rHTMLWrt.nFootNote + rHTMLWrt.nEndNote, - "OutHTML_SwFmtFtn: Position falsch" ); + "OutHTML_SwFormatFootnote: Position falsch" ); sClass = OOO_STRING_SVTOOLS_HTML_sdendnote_anc; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number( (sal_Int32)(++rHTMLWrt.nEndNote) ); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote + OUString::number( (sal_Int32)(++rHTMLWrt.nEndNote) ); } else { nPos = rHTMLWrt.nFootNote; sClass = OOO_STRING_SVTOOLS_HTML_sdfootnote_anc; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number( (sal_Int32)(++rHTMLWrt.nFootNote)); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote + OUString::number( (sal_Int32)(++rHTMLWrt.nFootNote)); } if( !rHTMLWrt.pFootEndNotes ) - rHTMLWrt.pFootEndNotes = new SwHTMLTxtFtns; - rHTMLWrt.pFootEndNotes->insert( rHTMLWrt.pFootEndNotes->begin() + nPos, pTxtFtn ); + rHTMLWrt.pFootEndNotes = new SwHTMLTextFootnotes; + rHTMLWrt.pFootEndNotes->insert( rHTMLWrt.pFootEndNotes->begin() + nPos, pTextFootnote ); OStringBuffer sOut; sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor).append(' ') @@ -298,19 +298,19 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt ) HTMLOutFuncs::Out_String( rWrt.Strm(), sClass, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\""); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( rWrt.Strm(), sFtnName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor).append("\" ") .append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"#"); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( rWrt.Strm(), sFtnName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol).append('\"'); - if( !rFmtFtn.GetNumStr().isEmpty() ) + if( !rFormatFootnote.GetNumStr().isEmpty() ) sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_sdfixed); sOut.append('>'); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, true ); - HTMLOutFuncs::Out_String( rWrt.Strm(), rFmtFtn.GetViewNumStr(*rWrt.pDoc), + HTMLOutFuncs::Out_String( rWrt.Strm(), rFormatFootnote.GetViewNumStr(*rWrt.pDoc), rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, false ); HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, false ); @@ -326,27 +326,27 @@ void SwHTMLWriter::OutFootEndNotes() return; #if OSL_DEBUG_LEVEL > 0 - sal_uInt16 nFtn = nFootNote, nEn = nEndNote; + sal_uInt16 nFootnote = nFootNote, nEn = nEndNote; #endif nFootNote = 0, nEndNote = 0; for( sal_uInt16 i=0; i<pFootEndNotes->size(); i++ ) { - SwTxtFtn *pTxtFtn = (*pFootEndNotes)[i]; - pFmtFtn = &pTxtFtn->GetFtn(); + SwTextFootnote *pTextFootnote = (*pFootEndNotes)[i]; + pFormatFootnote = &pTextFootnote->GetFootnote(); - OUString sFtnName, sClass; - if( pFmtFtn->IsEndNote() ) + OUString sFootnoteName, sClass; + if( pFormatFootnote->IsEndNote() ) { sClass = OOO_STRING_SVTOOLS_HTML_sdendnote; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdendnote; - sFtnName += OUString::number((sal_Int32)(++nEndNote)); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote; + sFootnoteName += OUString::number((sal_Int32)(++nEndNote)); } else { sClass = OOO_STRING_SVTOOLS_HTML_sdfootnote; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdfootnote; - sFtnName += OUString::number((sal_Int32)(++nFootNote)); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote; + sFootnoteName += OUString::number((sal_Int32)(++nFootNote)); } if( bLFPossible ) @@ -355,14 +355,14 @@ void SwHTMLWriter::OutFootEndNotes() sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_division) .append(' ').append(OOO_STRING_SVTOOLS_HTML_O_id).append("=\""); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( Strm(), sFootnoteName, eDestEnc, &aNonConvertableCharacters ); Strm().WriteCharPtr( "\">" ); bLFPossible = true; IncIndentLevel(); // Inhalt von <DIV> einruecken - OSL_ENSURE( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" ); - SwNodeIndex *pSttNdIdx = pTxtFtn->GetStartNode(); + OSL_ENSURE( pTextFootnote, "SwHTMLWriter::OutFootEndNotes: SwTextFootnote fehlt" ); + SwNodeIndex *pSttNdIdx = pTextFootnote->GetStartNode(); OSL_ENSURE( pSttNdIdx, "SwHTMLWriter::OutFootEndNotes: StartNode-Index fehlt" ); if( pSttNdIdx ) @@ -378,21 +378,21 @@ void SwHTMLWriter::OutFootEndNotes() HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, false ); bLFPossible = true; - OSL_ENSURE( !pFmtFtn, - "SwHTMLWriter::OutFootEndNotes: Ftn wurde nicht ausgegeben" ); - if( pFmtFtn ) + OSL_ENSURE( !pFormatFootnote, + "SwHTMLWriter::OutFootEndNotes: Footnote wurde nicht ausgegeben" ); + if( pFormatFootnote ) { - if( pFmtFtn->IsEndNote() ) + if( pFormatFootnote->IsEndNote() ) nEndNote++; else nFootNote++; - pFmtFtn = 0; + pFormatFootnote = 0; } } #if OSL_DEBUG_LEVEL > 0 - OSL_ENSURE( nFtn == nFootNote, + OSL_ENSURE( nFootnote == nFootNote, "SwHTMLWriter::OutFootEndNotes: Anzahl Fussnoten stimmt nicht" ); OSL_ENSURE( nEn == nEndNote, "SwHTMLWriter::OutFootEndNotes: Anzahl Endnoten stimmt nicht" ); @@ -403,47 +403,47 @@ void SwHTMLWriter::OutFootEndNotes() nFootNote = nEndNote = 0; } -OUString SwHTMLWriter::GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ) +OUString SwHTMLWriter::GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnote ) { const SwEndNoteInfo * pInfo = 0; - if( rFmtFtn.GetNumStr().isEmpty() ) - pInfo = rFmtFtn.IsEndNote() ? &pDoc->GetEndNoteInfo() - : &pDoc->GetFtnInfo(); + if( rFormatFootnote.GetNumStr().isEmpty() ) + pInfo = rFormatFootnote.IsEndNote() ? &pDoc->GetEndNoteInfo() + : &pDoc->GetFootnoteInfo(); OUString sRet; if( pInfo ) sRet = pInfo->GetPrefix(); - sRet += rFmtFtn.GetViewNumStr( *pDoc ); + sRet += rFormatFootnote.GetViewNumStr( *pDoc ); if( pInfo ) sRet += pInfo->GetSuffix(); return sRet; } -void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, +void SwHTMLWriter::OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote, const OUString& rNum, sal_uInt16 nScript ) { const SwEndNoteInfo *pInfo; - OUString sFtnName, sClass; - if( rFmtFtn.IsEndNote() ) + OUString sFootnoteName, sClass; + if( rFormatFootnote.IsEndNote() ) { sClass = OOO_STRING_SVTOOLS_HTML_sdendnote_sym; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdendnote; - sFtnName += OUString::number((sal_Int32)nEndNote); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdendnote; + sFootnoteName += OUString::number((sal_Int32)nEndNote); pInfo = &pDoc->GetEndNoteInfo(); } else { sClass = OOO_STRING_SVTOOLS_HTML_sdfootnote_sym; - sFtnName = OOO_STRING_SVTOOLS_HTML_sdfootnote; - sFtnName += OUString::number((sal_Int32)nFootNote); - pInfo = &pDoc->GetFtnInfo(); + sFootnoteName = OOO_STRING_SVTOOLS_HTML_sdfootnote; + sFootnoteName += OUString::number((sal_Int32)nFootNote); + pInfo = &pDoc->GetFootnoteInfo(); } - const SwCharFmt *pSymCharFmt = pInfo->GetCharFmt( *pDoc ); - if( pSymCharFmt && 0 != aScriptTextStyles.count( pSymCharFmt->GetName() ) ) + const SwCharFormat *pSymCharFormat = pInfo->GetCharFormat( *pDoc ); + if( pSymCharFormat && 0 != aScriptTextStyles.count( pSymCharFormat->GetName() ) ) { switch( nScript ) { @@ -466,11 +466,11 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, HTMLOutFuncs::Out_String( Strm(), sClass, eDestEnc, &aNonConvertableCharacters ); sOut.append("\" ").append(OOO_STRING_SVTOOLS_HTML_O_name).append("=\""); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( Strm(), sFootnoteName, eDestEnc, &aNonConvertableCharacters ); sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol).append("\" ") .append(OOO_STRING_SVTOOLS_HTML_O_href).append("=\"#"); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters ); + HTMLOutFuncs::Out_String( Strm(), sFootnoteName, eDestEnc, &aNonConvertableCharacters ); sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor).append("\">"); Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); @@ -483,19 +483,19 @@ static sal_uInt16 lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo, bool bEndNote ) { sal_uInt16 nParts = 0; - sal_Int16 eFmt = rInfo.aFmt.GetNumberingType(); - if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFmt ) + sal_Int16 eFormat = rInfo.aFormat.GetNumberingType(); + if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFormat ) { - const sal_Char *pStr = SwHTMLWriter::GetNumFormat( eFmt ); + const sal_Char *pStr = SwHTMLWriter::GetNumFormat( eFormat ); if( pStr ) { pParts[0] = OUString::createFromAscii( pStr ); nParts = 1; } } - if( rInfo.nFtnOffset > 0 ) + if( rInfo.nFootnoteOffset > 0 ) { - pParts[1] = OUString::number(rInfo.nFtnOffset); + pParts[1] = OUString::number(rInfo.nFootnoteOffset); nParts = 2; } if( !rInfo.GetPrefix().isEmpty() ) @@ -550,7 +550,7 @@ void SwHTMLWriter::OutFootEndNoteInfo() // Beginn { - const SwFtnInfo& rInfo = pDoc->GetFtnInfo(); + const SwFootnoteInfo& rInfo = pDoc->GetFootnoteInfo(); OUString aParts[8]; sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, false ); if( rInfo.eNum != FTNNUM_DOC ) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 28117fdd5e33..ab51592c16d7 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -126,8 +126,8 @@ void SwHTMLParser::ConnectImageMaps() SwNode *pNd = rNds[nIdx + 1]; if( 0 != (pGrfNd = pNd->GetGrfNode()) ) { - SwFrmFmt *pFmt = pGrfNd->GetFlyFmt(); - SwFmtURL aURL( pFmt->GetURL() ); + SwFrameFormat *pFormat = pGrfNd->GetFlyFormat(); + SwFormatURL aURL( pFormat->GetURL() ); const ImageMap *pIMap = aURL.GetMap(); if( pIMap && pIMap->GetIMapObjectCount()==0 ) { @@ -137,7 +137,7 @@ void SwHTMLParser::ConnectImageMaps() ImageMap *pNewIMap = FindImageMap( pIMap->GetName() ); aURL.SetMap( pNewIMap ); - pFmt->SetFmtAttr( aURL ); + pFormat->SetFormatAttr( aURL ); if( !pGrfNd->IsScaleImageMap() ) { // die Grafikgroesse ist mitlerweile da oder dir @@ -190,7 +190,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, bool bDontAppend ) { bool bMoveBackward = false; - SwFmtAnchor aAnchor( FLY_AS_CHAR ); + SwFormatAnchor aAnchor( FLY_AS_CHAR ); sal_Int16 eVertRel = text::RelOrientation::FRAME; if( text::HoriOrientation::NONE != eHoriOri ) @@ -235,7 +235,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, GetULSpaceFromContext( nUpper, nLower ); InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), false, true ); - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); if( nUpper ) { @@ -246,8 +246,8 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, } // Vertikale Ausrichtung und Verankerung bestimmen. - const sal_Int32 nCntnt = pPam->GetPoint()->nContent.GetIndex(); - if( nCntnt ) + const sal_Int32 nContent = pPam->GetPoint()->nContent.GetIndex(); + if( nContent ) { aAnchor.SetType( FLY_AT_CHAR ); bMoveBackward = true; @@ -261,11 +261,11 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, eVertRel = text::RelOrientation::PRINT_AREA; } - rFrmSet.Put( SwFmtHoriOrient( 0, eHoriOri, eHoriRel) ); + rFrmSet.Put( SwFormatHoriOrient( 0, eHoriOri, eHoriRel) ); - rFrmSet.Put( SwFmtSurround( eSurround ) ); + rFrmSet.Put( SwFormatSurround( eSurround ) ); } - rFrmSet.Put( SwFmtVertOrient( 0, eVertOri, eVertRel) ); + rFrmSet.Put( SwFormatVertOrient( 0, eVertOri, eVertRel) ); if( bMoveBackward ) pPam->Move( fnMoveBackward ); @@ -278,15 +278,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, rFrmSet.Put( aAnchor ); } -void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt ) +void SwHTMLParser::RegisterFlyFrm( SwFrameFormat *pFlyFormat ) { // automatisch verankerte Rahmen muessen noch um eine Position // nach vorne verschoben werden. - if( RES_DRAWFRMFMT != pFlyFmt->Which() && - (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId()) && - SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() ) + if( RES_DRAWFRMFMT != pFlyFormat->Which() && + (FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()) && + SURROUND_THROUGHT == pFlyFormat->GetSurround().GetSurround() ) { - aMoveFlyFrms.push_back( pFlyFmt ); + aMoveFlyFrms.push_back( pFlyFormat ); aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() ); } } @@ -316,7 +316,7 @@ void SwHTMLParser::InsertImage() long nWidth=0, nHeight=0; long nVSpace=0, nHSpace=0; - sal_uInt16 nBorder = (aAttrTab.pINetFmt ? 1 : 0); + sal_uInt16 nBorder = (aAttrTab.pINetFormat ? 1 : 0); bool bIsMap = false; bool bPrcWidth = false; bool bPrcHeight = false; @@ -442,14 +442,14 @@ IMAGE_SETEVENT: !aBulletGrfs[GetNumInfo().GetDepth()-1].isEmpty() && aBulletGrfs[GetNumInfo().GetDepth()-1]==sGrfNm ) { - SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pPam->GetNode().GetTextNode(); - if( pTxtNode && ! pTxtNode->IsCountedInList()) + if( pTextNode && ! pTextNode->IsCountedInList()) { - OSL_ENSURE( pTxtNode->GetActualListLevel() == GetNumInfo().GetLevel(), + OSL_ENSURE( pTextNode->GetActualListLevel() == GetNumInfo().GetLevel(), "Numerierungs-Ebene stimmt nicht" ); - pTxtNode->SetCountedInList( true ); + pTextNode->SetCountedInList( true ); // Rule invalisieren ist noetig, weil zwischem dem einlesen // des LI und der Grafik ein EndAction gerufen worden sein kann. @@ -458,7 +458,7 @@ IMAGE_SETEVENT: // Die Vorlage novh mal setzen. Ist noetig, damit der // Erstzeilen-Einzug stimmt. - SetTxtCollAttrs(); + SetTextCollAttrs(); return; } @@ -503,7 +503,7 @@ IMAGE_SETEVENT: SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); // Umrandung setzen long nHBorderWidth = 0, nVBorderWidth = 0; @@ -516,17 +516,17 @@ IMAGE_SETEVENT: ::editeng::SvxBorderLine aHBorderLine( NULL, nHBorderWidth ); ::editeng::SvxBorderLine aVBorderLine( NULL, nVBorderWidth ); - if( aAttrTab.pINetFmt ) + if( aAttrTab.pINetFormat ) { const OUString& rURL = - static_cast<const SwFmtINetFmt&>(aAttrTab.pINetFmt->GetItem()).GetValue(); + static_cast<const SwFormatINetFormat&>(aAttrTab.pINetFormat->GetItem()).GetValue(); pCSS1Parser->SetATagStyles(); sal_uInt16 nPoolId = static_cast< sal_uInt16 >(pDoc->IsVisitedURL( rURL ) ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL); - const SwCharFmt *pCharFmt = pCSS1Parser->GetCharFmtFromPool( nPoolId ); - aHBorderLine.SetColor( pCharFmt->GetColor().GetValue() ); + const SwCharFormat *pCharFormat = pCSS1Parser->GetCharFormatFromPool( nPoolId ); + aHBorderLine.SetColor( pCharFormat->GetColor().GetValue() ); aVBorderLine.SetColor( aHBorderLine.GetColor() ); } else @@ -553,7 +553,7 @@ IMAGE_SETEVENT: SetSpace( Size( nHSpace, nVSpace), aItemSet, aPropInfo, aFrmSet ); // Sonstige CSS1-Attribute Setzen - SetFrmFmtAttrs( aItemSet, aPropInfo, HTML_FF_BOX, aFrmSet ); + SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX, aFrmSet ); Size aTwipSz( bPrcWidth ? 0 : nWidth, bPrcHeight ? 0 : nHeight ); if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() ) @@ -676,7 +676,7 @@ IMAGE_SETEVENT: ImageMap *pImgMap = FindImageMap( aName ); if( pImgMap ) { - SwFmtURL aURL; aURL.SetMap( pImgMap );//wird kopieiert + SwFormatURL aURL; aURL.SetMap( pImgMap );//wird kopieiert bSetScaleImageMap = !nPrcWidth || !nPrcHeight; aFrmSet.Put( aURL ); @@ -684,7 +684,7 @@ IMAGE_SETEVENT: else { ImageMap aEmptyImgMap( aName ); - SwFmtURL aURL; aURL.SetMap( &aEmptyImgMap );//wird kopieiert + SwFormatURL aURL; aURL.SetMap( &aEmptyImgMap );//wird kopieiert aFrmSet.Put( aURL ); nMissingImgMaps++; // es fehlen noch Image-Maps @@ -723,20 +723,20 @@ IMAGE_SETEVENT: aTwipSz.Height() = MINFLY; } - SwFmtFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); + SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); aFrmSize.SetWidthPercent( nPrcWidth ); aFrmSize.SetHeightPercent( nPrcHeight ); aFrmSet.Put( aFrmSize ); // passing empty sGrfNm here, means we don't want the graphic to be linked - SwFrmFmt *pFlyFmt = pDoc->getIDocumentContentOperations().Insert( *pPam, sGrfNm, aEmptyOUStr, &aGraphic, + SwFrameFormat *pFlyFormat = pDoc->getIDocumentContentOperations().Insert( *pPam, sGrfNm, aEmptyOUStr, &aGraphic, &aFrmSet, NULL, NULL ); - SwGrfNode *pGrfNd = pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() + SwGrfNode *pGrfNd = pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() ->GetIndex()+1 ]->GetGrfNode(); if( !sHTMLGrfName.isEmpty() ) { - pFlyFmt->SetName( sHTMLGrfName ); + pFlyFormat->SetName( sHTMLGrfName ); // ggfs. eine Grafik anspringen if( JUMPTO_GRAPHIC == eJumpTo && sHTMLGrfName == sJmpMark ) @@ -760,17 +760,17 @@ IMAGE_SETEVENT: pGrfNd->SetScaleImageMap( true ); } - if( aAttrTab.pINetFmt ) + if( aAttrTab.pINetFormat ) { - const SwFmtINetFmt &rINetFmt = - static_cast<const SwFmtINetFmt&>(aAttrTab.pINetFmt->GetItem()); + const SwFormatINetFormat &rINetFormat = + static_cast<const SwFormatINetFormat&>(aAttrTab.pINetFormat->GetItem()); - SwFmtURL aURL( pFlyFmt->GetURL() ); + SwFormatURL aURL( pFlyFormat->GetURL() ); - aURL.SetURL( rINetFmt.GetValue(), bIsMap ); - aURL.SetTargetFrameName( rINetFmt.GetTargetFrame() ); - aURL.SetName( rINetFmt.GetName() ); - pFlyFmt->SetFmtAttr( aURL ); + aURL.SetURL( rINetFormat.GetValue(), bIsMap ); + aURL.SetTargetFrameName( rINetFormat.GetTargetFrame() ); + aURL.SetName( rINetFormat.GetName() ); + pFlyFormat->SetFormatAttr( aURL ); { static const sal_uInt16 aEvents[] = { @@ -781,29 +781,29 @@ IMAGE_SETEVENT: for( sal_uInt16 n = 0; aEvents[ n ]; ++n ) { - const SvxMacro *pMacro = rINetFmt.GetMacro( aEvents[ n ] ); + const SvxMacro *pMacro = rINetFormat.GetMacro( aEvents[ n ] ); if( 0 != pMacro ) aMacroItem.SetMacro( aEvents[ n ], *pMacro ); } } - if ((FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId()) && - aAttrTab.pINetFmt->GetSttPara() == + if ((FLY_AS_CHAR == pFlyFormat->GetAnchor().GetAnchorId()) && + aAttrTab.pINetFormat->GetSttPara() == pPam->GetPoint()->nNode && - aAttrTab.pINetFmt->GetSttCnt() == + aAttrTab.pINetFormat->GetSttCnt() == pPam->GetPoint()->nContent.GetIndex() - 1 ) { // das Attribut wurde unmitellbar vor einer zeichengeb. // Grafik eingefuegt, also verschieben wir es - aAttrTab.pINetFmt->SetStart( *pPam->GetPoint() ); + aAttrTab.pINetFormat->SetStart( *pPam->GetPoint() ); // Wenn das Attribut auch ein Sprungziel ist, fuegen // wir noch eine Bookmark vor der Grafik ein, weil das - // SwFmtURL kein Sprungziel ist. - if( !rINetFmt.GetName().isEmpty() ) + // SwFormatURL kein Sprungziel ist. + if( !rINetFormat.GetName().isEmpty() ) { pPam->Move( fnMoveBackward ); - InsertBookmark( rINetFmt.GetName() ); + InsertBookmark( rINetFormat.GetName() ); pPam->Move( fnMoveForward ); } } @@ -811,7 +811,7 @@ IMAGE_SETEVENT: } if( !aMacroItem.GetMacroTable().empty() ) - pFlyFmt->SetFmtAttr( aMacroItem ); + pFlyFormat->SetFormatAttr( aMacroItem ); // tdf#87083 If the graphic has not been loaded yet, then load it now. // Otherwise it may be loaded during the first paint of the object and it @@ -823,7 +823,7 @@ IMAGE_SETEVENT: } // Ggf. Frames anlegen und Auto-gebundenen Rahmen registrieren - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); if( !aId.isEmpty() ) InsertBookmark( aId ); @@ -833,8 +833,8 @@ IMAGE_SETEVENT: void SwHTMLParser::InsertBodyOptions() { - pDoc->SetTxtFmtColl( *pPam, - pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TEXT ) ); + pDoc->SetTextFormatColl( *pPam, + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TEXT ) ); OUString aBackGround, aId, aStyle, aLang, aDir; Color aBGColor, aTextColor, aLinkColor, aVLinkColor; @@ -937,8 +937,8 @@ void SwHTMLParser::InsertBodyOptions() if( bTextColor && !pCSS1Parser->IsBodyTextSet() ) { // Die Textfarbe wird an der Standard-Vorlage gesetzt - pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) - ->SetFmtAttr( SvxColorItem(aTextColor, RES_CHRATR_COLOR) ); + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD ) + ->SetFormatAttr( SvxColorItem(aTextColor, RES_CHRATR_COLOR) ); pCSS1Parser->SetBodyTextSet(); } @@ -1007,8 +1007,8 @@ void SwHTMLParser::InsertBodyOptions() // alle noch uebrigen Optionen koennen an der Standard-Vorlage // gesetzt werden und gelten dann automatisch als defaults - pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) - ->SetFmtAttr( aItemSet ); + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD ) + ->SetFormatAttr( aItemSet ); } else if( bSetBrush ) { @@ -1017,16 +1017,16 @@ void SwHTMLParser::InsertBodyOptions() if( bLinkColor && !pCSS1Parser->IsBodyLinkSet() ) { - SwCharFmt *pCharFmt = - pCSS1Parser->GetCharFmtFromPool(RES_POOLCHR_INET_NORMAL); - pCharFmt->SetFmtAttr( SvxColorItem(aLinkColor, RES_CHRATR_COLOR) ); + SwCharFormat *pCharFormat = + pCSS1Parser->GetCharFormatFromPool(RES_POOLCHR_INET_NORMAL); + pCharFormat->SetFormatAttr( SvxColorItem(aLinkColor, RES_CHRATR_COLOR) ); pCSS1Parser->SetBodyLinkSet(); } if( bVLinkColor && !pCSS1Parser->IsBodyVLinkSet() ) { - SwCharFmt *pCharFmt = - pCSS1Parser->GetCharFmtFromPool(RES_POOLCHR_INET_VISIT); - pCharFmt->SetFmtAttr( SvxColorItem(aVLinkColor, RES_CHRATR_COLOR) ); + SwCharFormat *pCharFormat = + pCSS1Parser->GetCharFormatFromPool(RES_POOLCHR_INET_VISIT); + pCharFormat->SetFormatAttr( SvxColorItem(aVLinkColor, RES_CHRATR_COLOR) ); pCSS1Parser->SetBodyVLinkSet(); } if( !aLang.isEmpty() ) @@ -1074,7 +1074,7 @@ void SwHTMLParser::NewAnchor() delete pOldCntxt; } - SvxMacroTableDtor aMacroTbl; + SvxMacroTableDtor aMacroTable; OUString sHRef, aName, sTarget; OUString aId, aStyle, aClass, aLang, aDir; bool bHasHRef = false, bFixed = false; @@ -1151,7 +1151,7 @@ ANCHOR_SETEVENT: OUString sScriptType; if( EXTENDED_STYPE == eScriptType2 ) sScriptType = sDfltScriptType; - aMacroTbl.Insert( nEvent, SvxMacro( sTmp, sScriptType, eScriptType2 )); + aMacroTable.Insert( nEvent, SvxMacro( sTmp, sScriptType, eScriptType2 )); } } break; @@ -1190,8 +1190,8 @@ ANCHOR_SETEVENT: // einen neuen Kontext anlegen _HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_ANCHOR_ON ); - bool bEnAnchor = false, bFtnAnchor = false, bFtnEnSymbol = false; - OUString aFtnName; + bool bEnAnchor = false, bFootnoteAnchor = false, bFootnoteEnSymbol = false; + OUString aFootnoteName; OUString aStrippedClass( aClass ); SwCSS1Parser::GetScriptFromClass( aStrippedClass, false ); if( aStrippedClass.getLength() >=9 && bHasHRef && sHRef.getLength() > 1 && @@ -1201,13 +1201,13 @@ ANCHOR_SETEVENT: if( aStrippedClass.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_sdendnote_anc ) ) bEnAnchor = true; else if( aStrippedClass.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_sdfootnote_anc ) ) - bFtnAnchor = true; + bFootnoteAnchor = true; else if( aStrippedClass.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_sdendnote_sym ) || aStrippedClass.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_sdfootnote_sym ) ) - bFtnEnSymbol = true; - if( bEnAnchor || bFtnAnchor || bFtnEnSymbol ) + bFootnoteEnSymbol = true; + if( bEnAnchor || bFootnoteAnchor || bFootnoteEnSymbol ) { - aFtnName = sHRef.copy( 1 ); + aFootnoteName = sHRef.copy( 1 ); aClass = aStrippedClass = aName = aEmptyOUStr; bHasHRef = false; } @@ -1240,26 +1240,26 @@ ANCHOR_SETEVENT: } pCSS1Parser->SetATagStyles(); - SwFmtINetFmt aINetFmt( sHRef, sTarget ); - aINetFmt.SetName( aName ); + SwFormatINetFormat aINetFormat( sHRef, sTarget ); + aINetFormat.SetName( aName ); - if( !aMacroTbl.empty() ) - aINetFmt.SetMacroTbl( &aMacroTbl ); + if( !aMacroTable.empty() ) + aINetFormat.SetMacroTable( &aMacroTable ); // das Default-Attribut setzen - InsertAttr( &aAttrTab.pINetFmt, aINetFmt, pCntxt ); + InsertAttr( &aAttrTab.pINetFormat, aINetFormat, pCntxt ); } else if( !aName.isEmpty() ) { InsertBookmark( aName ); } - if( bEnAnchor || bFtnAnchor ) + if( bEnAnchor || bFootnoteAnchor ) { - InsertFootEndNote( aFtnName, bEnAnchor, bFixed ); + InsertFootEndNote( aFootnoteName, bEnAnchor, bFixed ); bInFootEndNoteAnchor = bCallNextToken = true; } - else if( bFtnEnSymbol ) + else if( bFootnoteEnSymbol ) { bInFootEndNoteSymbol = bCallNextToken = true; } @@ -1344,7 +1344,7 @@ void SwHTMLParser::StripTrailingPara() { bool bSetSmallFont = false; - SwCntntNode* pCNd = pPam->GetCntntNode(); + SwContentNode* pCNd = pPam->GetContentNode(); if( !pPam->GetPoint()->nContent.GetIndex() ) { if( pCNd && pCNd->StartOfSectionIndex()+2 < @@ -1352,13 +1352,13 @@ void SwHTMLParser::StripTrailingPara() { sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex(); - const SwFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); + const SwFrameFormats& rFrameFormatTable = *pDoc->GetSpzFrameFormats(); - for( sal_uInt16 i=0; i<rFrmFmtTbl.size(); i++ ) + for( sal_uInt16 i=0; i<rFrameFormatTable.size(); i++ ) { - SwFrmFmt const*const pFmt = rFrmFmtTbl[i]; - SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); - SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + SwFrameFormat const*const pFormat = rFrameFormatTable[i]; + SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetContentAnchor(); if (pAPos && ((FLY_AT_PARA == pAnchor->GetAnchorId()) || (FLY_AT_CHAR == pAnchor->GetAnchorId())) && @@ -1372,15 +1372,15 @@ void SwHTMLParser::StripTrailingPara() // geloescht wird, weil sonst der // End-Index in die Botanik zeigt - if( pCNd->Len() && pCNd->IsTxtNode() ) + if( pCNd->Len() && pCNd->IsTextNode() ) { // es wurden Felder in den Node eingefuegt, die muessen // wir jetzt verschieben - SwTxtNode *pPrvNd = pDoc->GetNodes()[nNodeIdx-1]->GetTxtNode(); + SwTextNode *pPrvNd = pDoc->GetNodes()[nNodeIdx-1]->GetTextNode(); if( pPrvNd ) { SwIndex aSrc( pCNd, 0 ); - pCNd->GetTxtNode()->CutText( pPrvNd, aSrc, pCNd->Len() ); + pCNd->GetTextNode()->CutText( pPrvNd, aSrc, pCNd->Len() ); } } @@ -1396,7 +1396,7 @@ void SwHTMLParser::StripTrailingPara() if(nBookNdIdx==nNodeIdx) { SwNodeIndex nNewNdIdx(pPam->GetPoint()->nNode); - SwCntntNode* pNd = SwNodes::GoPrevious(&nNewNdIdx); + SwContentNode* pNd = SwNodes::GoPrevious(&nNewNdIdx); if(!pNd) { OSL_ENSURE(false, "Hoppla, wo ist mein Vorgaenger-Node"); @@ -1421,7 +1421,7 @@ void SwHTMLParser::StripTrailingPara() pDoc->GetNodes().Delete( pPam->GetPoint()->nNode ); pPam->Move( fnMoveBackward, fnGoNode ); } - else if( pCNd && pCNd->IsTxtNode() && pTable ) + else if( pCNd && pCNd->IsTextNode() && pTable ) { // In leeren Zellen stellen wir einen kleinen Font ein, damit die // Zelle nicht hoeher wird als die Grafik bzw. so niedrig wie @@ -1429,22 +1429,22 @@ void SwHTMLParser::StripTrailingPara() bSetSmallFont = true; } } - else if( pCNd && pCNd->IsTxtNode() && pTable && + else if( pCNd && pCNd->IsTextNode() && pTable && pCNd->StartOfSectionIndex()+2 == pCNd->EndOfSectionIndex() ) { // Wenn die Zelle nur zeichengebundene Grafiken/Rahmen enthaelt // stellen wir ebenfalls einen kleinen Font ein. bSetSmallFont = true; - SwTxtNode* pTxtNd = pCNd->GetTxtNode(); + SwTextNode* pTextNd = pCNd->GetTextNode(); sal_Int32 nPos = pPam->GetPoint()->nContent.GetIndex(); while( bSetSmallFont && nPos>0 ) { --nPos; bSetSmallFont = - (CH_TXTATR_BREAKWORD == pTxtNd->GetTxt()[nPos]) && - (0 != pTxtNd->GetTxtAttrForCharAt( nPos, RES_TXTATR_FLYCNT )); + (CH_TXTATR_BREAKWORD == pTextNd->GetText()[nPos]) && + (0 != pTextNd->GetTextAttrForCharAt( nPos, RES_TXTATR_FLYCNT )); } } diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 7580afb0b9cb..d4b566a73412 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -21,21 +21,21 @@ #include <ndtxt.hxx> #include <doc.hxx> -void SwHTMLNumRuleInfo::Set( const SwTxtNode& rTxtNd ) +void SwHTMLNumRuleInfo::Set( const SwTextNode& rTextNd ) { - const SwNumRule* pTxtNdNumRule( rTxtNd.GetNumRule() ); - if ( pTxtNdNumRule && - pTxtNdNumRule != rTxtNd.GetDoc()->GetOutlineNumRule() ) + const SwNumRule* pTextNdNumRule( rTextNd.GetNumRule() ); + if ( pTextNdNumRule && + pTextNdNumRule != rTextNd.GetDoc()->GetOutlineNumRule() ) { - pNumRule = const_cast<SwNumRule*>(pTxtNdNumRule); - nDeep = static_cast< sal_uInt16 >(pNumRule ? rTxtNd.GetActualListLevel() + 1 : 0); - bNumbered = rTxtNd.IsCountedInList(); + pNumRule = const_cast<SwNumRule*>(pTextNdNumRule); + nDeep = static_cast< sal_uInt16 >(pNumRule ? rTextNd.GetActualListLevel() + 1 : 0); + bNumbered = rTextNd.IsCountedInList(); // #i57919# - correction of refactoring done by cws swnumtree: // <bRestart> has to be set to <true>, if numbering is restarted at this // text node and the start value equals <USHRT_MAX>. // Start value <USHRT_MAX> indicates, that at this text node the numbering // is restarted with the value given at the corresponding level. - bRestart = rTxtNd.IsListRestart() && !rTxtNd.HasAttrListRestartValue(); + bRestart = rTextNd.IsListRestart() && !rTextNd.HasAttrListRestartValue(); } else { diff --git a/sw/source/filter/html/htmlnum.hxx b/sw/source/filter/html/htmlnum.hxx index f67190f4aaf5..5b7d861a8c19 100644 --- a/sw/source/filter/html/htmlnum.hxx +++ b/sw/source/filter/html/htmlnum.hxx @@ -25,7 +25,7 @@ #define HTML_NUMBUL_MARGINLEFT (MM50*2 + MM50/2) #define HTML_NUMBUL_INDENT (-MM50) -class SwTxtNode; +class SwTextNode; class SwNumRule; // TODO: Unicode: Are these characters the correct ones? @@ -44,7 +44,7 @@ class SwHTMLNumRuleInfo public: inline void Set( const SwHTMLNumRuleInfo& rInf ); - void Set( const SwTxtNode& rTxtNd ); + void Set( const SwTextNode& rTextNd ); SwHTMLNumRuleInfo() : pNumRule( 0 ), nDeep( 0 ), @@ -60,7 +60,7 @@ public: memcpy( &aNumStarts, &rInf.aNumStarts, sizeof( aNumStarts ) ); } - SwHTMLNumRuleInfo( const SwTxtNode& rTxtNd ) { Set( rTxtNd ); } + SwHTMLNumRuleInfo( const SwTextNode& rTextNd ) { Set( rTextNd ); } inline SwHTMLNumRuleInfo& operator=( const SwHTMLNumRuleInfo& rInf ); inline void Clear(); diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx index 69a2c28868ce..dc1d49b846f1 100644 --- a/sw/source/filter/html/htmlnumreader.cxx +++ b/sw/source/filter/html/htmlnumreader.cxx @@ -59,7 +59,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) // Erstmal einen neuen Absatz aufmachen bool bSpace = (rInfo.GetDepth() + nDefListDeep) == 0; if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( bSpace ? AM_SPACE : AM_NOSPACE, false ); + AppendTextNode( bSpace ? AM_SPACE : AM_NOSPACE, false ); else if( bSpace ) AddParSpace(); @@ -72,24 +72,24 @@ void SwHTMLParser::NewNumBulList( int nToken ) if( !rInfo.GetNumRule() ) { sal_uInt16 nPos = pDoc->MakeNumRule( pDoc->GetUniqueNumRuleName() ); - rInfo.SetNumRule( pDoc->GetNumRuleTbl()[nPos] ); + rInfo.SetNumRule( pDoc->GetNumRuleTable()[nPos] ); } // das Format anpassen, falls es fuer den Level noch nicht // geschehen ist! - bool bNewNumFmt = rInfo.GetNumRule()->GetNumFmt( nLevel ) == 0; - bool bChangeNumFmt = false; + bool bNewNumFormat = rInfo.GetNumRule()->GetNumFormat( nLevel ) == 0; + bool bChangeNumFormat = false; // das default Numerierungsformat erstellen - SwNumFmt aNumFmt( rInfo.GetNumRule()->Get(nLevel) ); + SwNumFormat aNumFormat( rInfo.GetNumRule()->Get(nLevel) ); rInfo.SetNodeStartValue( nLevel ); - if( bNewNumFmt ) + if( bNewNumFormat ) { - sal_uInt16 nChrFmtPoolId = 0; + sal_uInt16 nChrFormatPoolId = 0; if( HTML_ORDERLIST_ON == nToken ) { - aNumFmt.SetNumberingType(SVX_NUM_ARABIC); - nChrFmtPoolId = RES_POOLCHR_NUM_LEVEL; + aNumFormat.SetNumberingType(SVX_NUM_ARABIC); + nChrFormatPoolId = RES_POOLCHR_NUM_LEVEL; } else { @@ -100,11 +100,11 @@ void SwHTMLParser::NewNumBulList( int nToken ) // #i63395# - Only apply user defined default bullet font if ( numfunc::IsDefBulletFontUserDefined() ) { - aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() ); + aNumFormat.SetBulletFont( &numfunc::GetDefBulletFont() ); } - aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); - aNumFmt.SetBulletChar( cBulletChar ); // das Bulletzeichen !! - nChrFmtPoolId = RES_POOLCHR_BUL_LEVEL; + aNumFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aNumFormat.SetBulletChar( cBulletChar ); // das Bulletzeichen !! + nChrFormatPoolId = RES_POOLCHR_BUL_LEVEL; } sal_uInt16 nAbsLSpace = HTML_NUMBUL_MARGINLEFT; @@ -112,17 +112,17 @@ void SwHTMLParser::NewNumBulList( int nToken ) short nFirstLineIndent = HTML_NUMBUL_INDENT; if( nLevel > 0 ) { - const SwNumFmt& rPrevNumFmt = rInfo.GetNumRule()->Get( nLevel-1 ); - nAbsLSpace = nAbsLSpace + rPrevNumFmt.GetAbsLSpace(); - nFirstLineIndent = rPrevNumFmt.GetFirstLineOffset(); + const SwNumFormat& rPrevNumFormat = rInfo.GetNumRule()->Get( nLevel-1 ); + nAbsLSpace = nAbsLSpace + rPrevNumFormat.GetAbsLSpace(); + nFirstLineIndent = rPrevNumFormat.GetFirstLineOffset(); } - aNumFmt.SetAbsLSpace( nAbsLSpace ); - aNumFmt.SetFirstLineOffset( nFirstLineIndent ); - aNumFmt.SetCharFmt( pCSS1Parser->GetCharFmtFromPool(nChrFmtPoolId) ); + aNumFormat.SetAbsLSpace( nAbsLSpace ); + aNumFormat.SetFirstLineOffset( nFirstLineIndent ); + aNumFormat.SetCharFormat( pCSS1Parser->GetCharFormatFromPool(nChrFormatPoolId) ); - bChangeNumFmt = true; + bChangeNumFormat = true; } - else if( 1 != aNumFmt.GetStart() ) + else if( 1 != aNumFormat.GetStart() ) { // Wenn die Ebene schon mal benutzt wurde, muss der Start-Wert // ggf. hart am Absatz gesetzt werden. @@ -144,26 +144,26 @@ void SwHTMLParser::NewNumBulList( int nToken ) aId = rOption.GetString(); break; case HTML_O_TYPE: - if( bNewNumFmt && !rOption.GetString().isEmpty() ) + if( bNewNumFormat && !rOption.GetString().isEmpty() ) { switch( nToken ) { case HTML_ORDERLIST_ON: - bChangeNumFmt = true; + bChangeNumFormat = true; switch( rOption.GetString()[0] ) { - case 'A': aNumFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER); break; - case 'a': aNumFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER); break; - case 'I': aNumFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); break; - case 'i': aNumFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); break; - default: bChangeNumFmt = false; + case 'A': aNumFormat.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER); break; + case 'a': aNumFormat.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER); break; + case 'I': aNumFormat.SetNumberingType(SVX_NUM_ROMAN_UPPER); break; + case 'i': aNumFormat.SetNumberingType(SVX_NUM_ROMAN_LOWER); break; + default: bChangeNumFormat = false; } break; case HTML_UNORDERLIST_ON: - aNumFmt.SetBulletChar( (sal_Unicode)rOption.GetEnum( - aHTMLULTypeTable,aNumFmt.GetBulletChar() ) ); - bChangeNumFmt = true; + aNumFormat.SetBulletChar( (sal_Unicode)rOption.GetEnum( + aHTMLULTypeTable,aNumFormat.GetBulletChar() ) ); + bChangeNumFormat = true; break; } } @@ -171,10 +171,10 @@ void SwHTMLParser::NewNumBulList( int nToken ) case HTML_O_START: { sal_uInt16 nStart = (sal_uInt16)rOption.GetNumber(); - if( bNewNumFmt ) + if( bNewNumFormat ) { - aNumFmt.SetStart( nStart ); - bChangeNumFmt = true; + aNumFormat.SetStart( nStart ); + bChangeNumFormat = true; } else { @@ -195,7 +195,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) aDir = rOption.GetString(); break; case HTML_O_SRC: - if( bNewNumFmt ) + if( bNewNumFormat ) { aBulletSrc = rOption.GetString(); if( !InternalImgToPrivateURL(aBulletSrc) ) @@ -219,7 +219,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) if( !aBulletSrc.isEmpty() ) { // Eine Bullet-Liste mit Grafiken - aNumFmt.SetNumberingType(SVX_NUM_BITMAP); + aNumFormat.SetNumberingType(SVX_NUM_BITMAP); // Die Grafik als Brush anlegen SvxBrushItem aBrushItem( RES_BACKGROUND ); @@ -238,13 +238,13 @@ void SwHTMLParser::NewNumBulList( int nToken ) // Die Ausrichtung auch nur beachten, wenn eine Ausrichtung // angegeben wurde - aNumFmt.SetGraphicBrush( &aBrushItem, pTwipSz, + aNumFormat.SetGraphicBrush( &aBrushItem, pTwipSz, text::VertOrientation::NONE!=eVertOri ? &eVertOri : 0); // Und noch die Grafik merken, um sie in den Absaetzen nicht // einzufuegen aBulletGrfs[nLevel] = aBulletSrc; - bChangeNumFmt = true; + bChangeNumFormat = true; } else aBulletGrfs[nLevel].clear(); @@ -266,13 +266,13 @@ void SwHTMLParser::NewNumBulList( int nToken ) if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) ) { - if( bNewNumFmt ) + if( bNewNumFormat ) { if( aPropInfo.bLeftMargin ) { // Der Der Default-Einzug wurde schon eingefuegt. sal_uInt16 nAbsLSpace = - aNumFmt.GetAbsLSpace() - HTML_NUMBUL_MARGINLEFT; + aNumFormat.GetAbsLSpace() - HTML_NUMBUL_MARGINLEFT; if( aPropInfo.nLeftMargin < 0 && nAbsLSpace < -aPropInfo.nLeftMargin ) nAbsLSpace = 0U; @@ -283,16 +283,16 @@ void SwHTMLParser::NewNumBulList( int nToken ) else nAbsLSpace = nAbsLSpace + (sal_uInt16)aPropInfo.nLeftMargin; - aNumFmt.SetAbsLSpace( nAbsLSpace ); - bChangeNumFmt = true; + aNumFormat.SetAbsLSpace( nAbsLSpace ); + bChangeNumFormat = true; } if( aPropInfo.bTextIndent ) { short nTextIndent = static_cast<const SvxLRSpaceItem &>(aItemSet.Get( RES_LR_SPACE )) - .GetTxtFirstLineOfst(); - aNumFmt.SetFirstLineOffset( nTextIndent ); - bChangeNumFmt = true; + .GetTextFirstLineOfst(); + aNumFormat.SetFirstLineOffset( nTextIndent ); + bChangeNumFormat = true; } } aPropInfo.bLeftMargin = aPropInfo.bTextIndent = false; @@ -302,11 +302,11 @@ void SwHTMLParser::NewNumBulList( int nToken ) // #i89812# - Perform change to list style before calling <DoPositioning(..)>, // because <DoPositioning(..)> may open a new context and thus may // clear the <SwHTMLNumRuleInfo> instance hold by local variable <rInfo>. - if( bChangeNumFmt ) + if( bChangeNumFormat ) { - rInfo.GetNumRule()->Set( nLevel, aNumFmt ); - pDoc->ChgNumRuleFmts( *rInfo.GetNumRule() ); - bChangeNumFmt = false; + rInfo.GetNumRule()->Set( nLevel, aNumFormat ); + pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() ); + bChangeNumFormat = false; } DoPositioning( aItemSet, aPropInfo, pCntxt ); @@ -315,16 +315,16 @@ void SwHTMLParser::NewNumBulList( int nToken ) } } - if( bChangeNumFmt ) + if( bChangeNumFormat ) { - rInfo.GetNumRule()->Set( nLevel, aNumFmt ); - pDoc->ChgNumRuleFmts( *rInfo.GetNumRule() ); + rInfo.GetNumRule()->Set( nLevel, aNumFormat ); + pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() ); } PushContext( pCntxt ); // die Attribute der neuen Vorlage setzen - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); } void SwHTMLParser::EndNumBulList( int nToken ) @@ -338,16 +338,16 @@ void SwHTMLParser::EndNumBulList( int nToken ) bool bAppend = pPam->GetPoint()->nContent.GetIndex() > 0; if( !bAppend ) { - SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pPam->GetNode().GetTextNode(); - bAppend = (pTxtNode && ! pTxtNode->IsOutline() && pTxtNode->IsCountedInList()) || + bAppend = (pTextNode && ! pTextNode->IsOutline() && pTextNode->IsCountedInList()) || HasCurrentParaFlys(); } bool bSpace = (rInfo.GetDepth() + nDefListDeep) == 1; if( bAppend ) - AppendTxtNode( bSpace ? AM_SPACE : AM_NOSPACE, false ); + AppendTextNode( bSpace ? AM_SPACE : AM_NOSPACE, false ); else if( bSpace ) AddParSpace(); @@ -363,43 +363,43 @@ void SwHTMLParser::EndNumBulList( int nToken ) { // Die noch nicht angepassten Formate werden jetzt noch // angepasst, damit es sich besser Editieren laesst. - const SwNumFmt *pRefNumFmt = 0; + const SwNumFormat *pRefNumFormat = 0; bool bChanged = false; for( sal_uInt16 i=0; i<MAXLEVEL; i++ ) { - const SwNumFmt *pNumFmt = rInfo.GetNumRule()->GetNumFmt(i); - if( pNumFmt ) + const SwNumFormat *pNumFormat = rInfo.GetNumRule()->GetNumFormat(i); + if( pNumFormat ) { - pRefNumFmt = pNumFmt; + pRefNumFormat = pNumFormat; } - else if( pRefNumFmt ) + else if( pRefNumFormat ) { - SwNumFmt aNumFmt( rInfo.GetNumRule()->Get(i) ); - aNumFmt.SetNumberingType(pRefNumFmt->GetNumberingType() != SVX_NUM_BITMAP - ? pRefNumFmt->GetNumberingType() : style::NumberingType::CHAR_SPECIAL); - if( SVX_NUM_CHAR_SPECIAL == aNumFmt.GetNumberingType() ) + SwNumFormat aNumFormat( rInfo.GetNumRule()->Get(i) ); + aNumFormat.SetNumberingType(pRefNumFormat->GetNumberingType() != SVX_NUM_BITMAP + ? pRefNumFormat->GetNumberingType() : style::NumberingType::CHAR_SPECIAL); + if( SVX_NUM_CHAR_SPECIAL == aNumFormat.GetNumberingType() ) { // #i63395# - Only apply user defined default bullet font if ( numfunc::IsDefBulletFontUserDefined() ) { - aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() ); + aNumFormat.SetBulletFont( &numfunc::GetDefBulletFont() ); } - aNumFmt.SetBulletChar( cBulletChar ); + aNumFormat.SetBulletChar( cBulletChar ); } - aNumFmt.SetAbsLSpace( (i+1) * HTML_NUMBUL_MARGINLEFT ); - aNumFmt.SetFirstLineOffset( HTML_NUMBUL_INDENT ); - aNumFmt.SetCharFmt( pRefNumFmt->GetCharFmt() ); - rInfo.GetNumRule()->Set( i, aNumFmt ); + aNumFormat.SetAbsLSpace( (i+1) * HTML_NUMBUL_MARGINLEFT ); + aNumFormat.SetFirstLineOffset( HTML_NUMBUL_INDENT ); + aNumFormat.SetCharFormat( pRefNumFormat->GetCharFormat() ); + rInfo.GetNumRule()->Set( i, aNumFormat ); bChanged = true; } } if( bChanged ) - pDoc->ChgNumRuleFmts( *rInfo.GetNumRule() ); + pDoc->ChgNumRuleFormats( *rInfo.GetNumRule() ); // Beim letzen Append wurde das NumRule-Item und das // NodeNum-Objekt mit kopiert. Beides muessen wir noch // loeschen. Das ResetAttr loescht das NodeNum-Objekt mit! - pPam->GetNode().GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE ); + pPam->GetNode().GetTextNode()->ResetAttr( RES_PARATR_NUMRULE ); rInfo.Clear(); } @@ -420,7 +420,7 @@ void SwHTMLParser::EndNumBulList( int nToken ) } if( nToken ) - SetTxtCollAttrs(); + SetTextCollAttrs(); if( bSetAttrs ) SetAttr(); // Absatz-Atts wegen JavaScript moeglichst schnell setzen @@ -466,7 +466,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) // einen neuen Absatz aufmachen if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_NOSPACE, false ); + AppendTextNode( AM_NOSPACE, false ); bNoParSpace = false; // In <LI> wird kein Abstand eingefuegt! const bool bCountedInList = nToken != HTML_LISTHEADER_ON; @@ -483,17 +483,17 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) aNumRuleName = pDoc->GetUniqueNumRuleName(); SwNumRule aNumRule( aNumRuleName, SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); - SwNumFmt aNumFmt( aNumRule.Get( 0 ) ); + SwNumFormat aNumFormat( aNumRule.Get( 0 ) ); // #i63395# - Only apply user defined default bullet font if ( numfunc::IsDefBulletFontUserDefined() ) { - aNumFmt.SetBulletFont( &numfunc::GetDefBulletFont() ); + aNumFormat.SetBulletFont( &numfunc::GetDefBulletFont() ); } - aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); - aNumFmt.SetBulletChar( cBulletChar ); // das Bulletzeichen !! - aNumFmt.SetCharFmt( pCSS1Parser->GetCharFmtFromPool(RES_POOLCHR_BUL_LEVEL) ); - aNumFmt.SetFirstLineOffset( HTML_NUMBUL_INDENT ); - aNumRule.Set( 0, aNumFmt ); + aNumFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aNumFormat.SetBulletChar( cBulletChar ); // das Bulletzeichen !! + aNumFormat.SetCharFormat( pCSS1Parser->GetCharFormatFromPool(RES_POOLCHR_BUL_LEVEL) ); + aNumFormat.SetFirstLineOffset( HTML_NUMBUL_INDENT ); + aNumRule.Set( 0, aNumFormat ); pDoc->MakeNumRule( aNumRuleName, &aNumRule ); @@ -501,18 +501,18 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) "Jetzt geht ein offenes Absatz-Element verloren" ); // Wir tun so, als ob wir in einem Absatz sind. Dann wird // beim naechsten Absatz wenigstens die Numerierung - // weggeschmissen, die nach dem naechsten AppendTxtNode uebernommen + // weggeschmissen, die nach dem naechsten AppendTextNode uebernommen // wird. nOpenParaToken = static_cast< sal_uInt16 >(nToken); } - SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode(); - ((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(aNumRuleName) ); - pTxtNode->SetAttrListLevel(nLevel); + SwTextNode* pTextNode = pPam->GetNode().GetTextNode(); + ((SwContentNode *)pTextNode)->SetAttr( SwNumRuleItem(aNumRuleName) ); + pTextNode->SetAttrListLevel(nLevel); // #i57656# - <IsCounted()> state of text node has to be adjusted accordingly. if ( nLevel < MAXLEVEL ) { - pTxtNode->SetCountedInList( bCountedInList ); + pTextNode->SetCountedInList( bCountedInList ); } // #i57919# // correction of refactoring done by cws swnumtree @@ -521,8 +521,8 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) // restarted at this text node if ( nStart != USHRT_MAX ) { - pTxtNode->SetListRestart( true ); - pTxtNode->SetAttrListRestartValue( nStart ); + pTextNode->SetListRestart( true ); + pTextNode->SetAttrListRestartValue( nStart ); } if( GetNumInfo().GetNumRule() ) @@ -544,7 +544,7 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) PushContext( pCntxt ); // die neue Vorlage setzen - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); // Laufbalkenanzeige aktualisieren ShowStatline(); @@ -555,7 +555,7 @@ void SwHTMLParser::EndNumBulListItem( int nToken, bool bSetColl, { // einen neuen Absatz aufmachen if( !nToken && pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); // Kontext zu dem Token suchen und vom Stack holen _HTMLAttrContext *pCntxt = 0; @@ -594,20 +594,20 @@ void SwHTMLParser::EndNumBulListItem( int nToken, bool bSetColl, // und die bisherige Vorlage setzen if( bSetColl ) - SetTxtCollAttrs(); + SetTextCollAttrs(); } void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel, bool bCountedInList ) { - SwTxtNode* pTxtNode = pPam->GetNode().GetTxtNode(); - OSL_ENSURE( pTxtNode, "Kein Text-Node an PaM-Position" ); + SwTextNode* pTextNode = pPam->GetNode().GetTextNode(); + OSL_ENSURE( pTextNode, "Kein Text-Node an PaM-Position" ); OSL_ENSURE( GetNumInfo().GetNumRule(), "Kein Numerierungs-Regel" ); const OUString& rName = GetNumInfo().GetNumRule()->GetName(); - ((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(rName) ); + ((SwContentNode *)pTextNode)->SetAttr( SwNumRuleItem(rName) ); - pTxtNode->SetAttrListLevel( nLevel ); - pTxtNode->SetCountedInList( bCountedInList ); + pTextNode->SetAttrListLevel( nLevel ); + pTextNode->SetCountedInList( bCountedInList ); // NumRule invalidieren, weil sie durch ein EndAction bereits // auf valid geschaltet worden sein kann. diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx index 94c57e303e4f..127d08c22fc2 100644 --- a/sw/source/filter/html/htmlnumwriter.cxx +++ b/sw/source/filter/html/htmlnumwriter.cxx @@ -53,10 +53,10 @@ void SwHTMLWriter::FillNextNumInfo() do { const SwNode* pNd = pDoc->GetNodes()[nPos]; - if( pNd->IsTxtNode() ) + if( pNd->IsTextNode() ) { // Der naechste wird als naechstes ausgegeben. - pNextNumRuleInfo = new SwHTMLNumRuleInfo( *pNd->GetTxtNode() ); + pNextNumRuleInfo = new SwHTMLNumRuleInfo( *pNd->GetTextNode() ); // Vor einer Tabelle behalten wir erst einmal die alte Ebene bei, // wenn die gleiche Numerierung hinter der Tabelle @@ -126,19 +126,19 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, do { const SwNode* pNd = rWrt.pDoc->GetNodes()[nPos]; - if( pNd->IsTxtNode() ) + if( pNd->IsTextNode() ) { - const SwTxtNode *pTxtNd = pNd->GetTxtNode(); - if( !pTxtNd->GetNumRule() ) + const SwTextNode *pTextNd = pNd->GetTextNode(); + if( !pTextNd->GetNumRule() ) { // node isn't numbered => check completed break; } - OSL_ENSURE(! pTxtNd->IsOutline(), + OSL_ENSURE(! pTextNd->IsOutline(), "outline not expected"); - if( pTxtNd->GetActualListLevel() + 1 < + if( pTextNd->GetActualListLevel() + 1 < rInfo.GetDepth() ) { // node is numbered, but level is lower @@ -182,8 +182,8 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, rWrt.aBulletGrfs[i].clear(); OStringBuffer sOut; sOut.append('<'); - const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get( i ); - sal_Int16 eType = rNumFmt.GetNumberingType(); + const SwNumFormat& rNumFormat = rInfo.GetNumRule()->Get( i ); + sal_Int16 eType = rNumFormat.GetNumberingType(); if( SVX_NUM_CHAR_SPECIAL == eType ) { // Aufzaehlungs-Liste: <OL> @@ -191,7 +191,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, // den Typ ueber das Bullet-Zeichen bestimmen const sal_Char *pStr = 0; - switch( rNumFmt.GetBulletChar() ) + switch( rNumFormat.GetBulletChar() ) { case HTML_BULLETCHAR_DISC: pStr = OOO_STRING_SVTOOLS_HTML_ULTYPE_disc; @@ -217,7 +217,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); OutHTML_BulletImage( rWrt, 0, - rNumFmt.GetBrush() ); + rNumFormat.GetBrush() ); } else { @@ -249,14 +249,14 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, append("=\"").append(cType).append("\""); } - sal_uInt16 nStartVal = rNumFmt.GetStart(); + sal_uInt16 nStartVal = rNumFormat.GetStart(); if( bStartValue && 1 == nStartVal && i == rInfo.GetDepth()-1 ) { // #i51089 - TUNING# - if ( rWrt.pCurPam->GetNode().GetTxtNode()->GetNum() ) + if ( rWrt.pCurPam->GetNode().GetTextNode()->GetNum() ) { nStartVal = static_cast< sal_uInt16 >( rWrt.pCurPam->GetNode() - .GetTxtNode()->GetNumberVector()[i] ); + .GetTextNode()->GetNumberVector()[i] ); } else { diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 213b6b08a445..b9e14257454a 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -196,7 +196,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize, } // Size setzen - SwFmtFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); + SwFormatFrmSize aFrmSize( ATT_FIX_SIZE, aTwipSz.Width(), aTwipSz.Height() ); aFrmSize.SetWidthPercent( nPrcWidth ); aFrmSize.SetHeightPercent( nPrcHeight ); rFlyItemSet.Put( aFrmSize ); @@ -226,7 +226,7 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace, // Ggf. den Erstzeilen-Einzug noch plaetten const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem); SvxLRSpaceItem aLRItem( *pLRItem ); - aLRItem.SetTxtFirstLineOfst( 0 ); + aLRItem.SetTextFirstLineOfst( 0 ); if( rCSS1PropInfo.bLeftMargin ) { nLeftSpace = aLRItem.GetLeft(); @@ -247,11 +247,11 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace, rFlyItemSet.Put( aLRItem ); if( nLeftSpace ) { - const SwFmtHoriOrient& rHoriOri = - static_cast<const SwFmtHoriOrient&>(rFlyItemSet.Get( RES_HORI_ORIENT )); + const SwFormatHoriOrient& rHoriOri = + static_cast<const SwFormatHoriOrient&>(rFlyItemSet.Get( RES_HORI_ORIENT )); if( text::HoriOrientation::NONE == rHoriOri.GetHoriOrient() ) { - SwFmtHoriOrient aHoriOri( rHoriOri ); + SwFormatHoriOrient aHoriOri( rHoriOri ); aHoriOri.SetPos( aHoriOri.GetPos() + nLeftSpace ); rFlyItemSet.Put( aHoriOri ); } @@ -283,11 +283,11 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace, rFlyItemSet.Put( aULItem ); if( nUpperSpace ) { - const SwFmtVertOrient& rVertOri = - static_cast<const SwFmtVertOrient&>(rFlyItemSet.Get( RES_VERT_ORIENT )); + const SwFormatVertOrient& rVertOri = + static_cast<const SwFormatVertOrient&>(rFlyItemSet.Get( RES_VERT_ORIENT )); if( text::VertOrientation::NONE == rVertOri.GetVertOrient() ) { - SwFmtVertOrient aVertOri( rVertOri ); + SwFormatVertOrient aVertOri( rVertOri ); aVertOri.SetPos( aVertOri.GetPos() + nUpperSpace ); rFlyItemSet.Put( aVertOri ); } @@ -440,7 +440,7 @@ void SwHTMLParser::InsertEmbed() SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); // den Anker setzen if( !bHidden ) @@ -449,12 +449,12 @@ void SwHTMLParser::InsertEmbed() } else { - SwFmtAnchor aAnchor( FLY_AT_PARA ); + SwFormatAnchor aAnchor( FLY_AT_PARA ); aAnchor.SetAnchor( pPam->GetPoint() ); aFrmSet.Put( aAnchor ); - aFrmSet.Put( SwFmtHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) ); - aFrmSet.Put( SwFmtSurround( SURROUND_THROUGHT ) ); - aFrmSet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) ); + aFrmSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, text::RelOrientation::FRAME) ); + aFrmSet.Put( SwFormatSurround( SURROUND_THROUGHT ) ); + aFrmSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) ); } // und noch die Groesse des Rahmens @@ -464,18 +464,18 @@ void SwHTMLParser::InsertEmbed() SetSpace( aSpace, aItemSet, aPropInfo, aFrmSet ); // und in das Dok einfuegen - SwFrmFmt* pFlyFmt = + SwFrameFormat* pFlyFormat = pDoc->getIDocumentContentOperations().Insert( *pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, NULL, NULL ); - // Namen am FrmFmt setzen + // Namen am FrameFormat setzen if( !aName.isEmpty() ) - pFlyFmt->SetName( aName ); + pFlyFormat->SetName( aName ); // den alternativen Text setzen - SwNoTxtNode *pNoTxtNd = - pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() - ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetTitle( aAlt ); + SwNoTextNode *pNoTextNd = + pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() + ->GetIndex()+1 ]->GetNoTextNode(); + pNoTextNd->SetTitle( aAlt ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren if( !bHidden ) @@ -483,7 +483,7 @@ void SwHTMLParser::InsertEmbed() // HIDDEN-Plugins sollen absatzgebunden bleiben. Da RegisterFlyFrm // absatzgebundene Rahmen mit DUrchlauf in am Zeichen gebundene // Rahmen umwandelt, muessen die Frames hier von Hand angelegt werden. - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); } } @@ -613,7 +613,7 @@ void SwHTMLParser::NewObject() SfxItemSet& rFrmSet = pAppletImpl->GetItemSet(); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( rFrmSet ); + Reader::ResetFrameFormatAttrs( rFrmSet ); // den Anker und die Ausrichtung setzen SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrmSet ); @@ -636,7 +636,7 @@ void SwHTMLParser::EndObject() pAppletImpl->FinishApplet(); // und in das Dok einfuegen - SwFrmFmt* pFlyFmt = + SwFrameFormat* pFlyFormat = pDoc->getIDocumentContentOperations().Insert( *pPam, ::svt::EmbeddedObjectRef( pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ), &pAppletImpl->GetItemSet(), @@ -644,13 +644,13 @@ void SwHTMLParser::EndObject() NULL ); // den alternativen Namen setzen - SwNoTxtNode *pNoTxtNd = - pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() - ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetTitle( pAppletImpl->GetAltText() ); + SwNoTextNode *pNoTextNd = + pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() + ->GetIndex()+1 ]->GetNoTextNode(); + pNoTextNd->SetTitle( pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); delete pAppletImpl; pAppletImpl = 0; @@ -746,7 +746,7 @@ void SwHTMLParser::InsertApplet() SfxItemSet& rFrmSet = pAppletImpl->GetItemSet(); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( rFrmSet ); + Reader::ResetFrameFormatAttrs( rFrmSet ); // den Anker und die Ausrichtung setzen SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, rFrmSet ); @@ -768,7 +768,7 @@ void SwHTMLParser::EndApplet() pAppletImpl->FinishApplet(); // und in das Dok einfuegen - SwFrmFmt* pFlyFmt = + SwFrameFormat* pFlyFormat = pDoc->getIDocumentContentOperations().Insert( *pPam, ::svt::EmbeddedObjectRef( pAppletImpl->GetApplet(), embed::Aspects::MSOLE_CONTENT ), &pAppletImpl->GetItemSet(), @@ -776,13 +776,13 @@ void SwHTMLParser::EndApplet() NULL ); // den alternativen Namen setzen - SwNoTxtNode *pNoTxtNd = - pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() - ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetTitle( pAppletImpl->GetAltText() ); + SwNoTextNode *pNoTextNd = + pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() + ->GetIndex()+1 ]->GetNoTextNode(); + pNoTextNd->SetTitle( pAppletImpl->GetAltText() ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); delete pAppletImpl; pAppletImpl = 0; @@ -926,7 +926,7 @@ void SwHTMLParser::InsertFloatingFrame() SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); // den Anker und die Ausrichtung setzen SetAnchorAndAdjustment( eVertOri, eHoriOri, aItemSet, aPropInfo, aFrmSet ); @@ -938,17 +938,17 @@ void SwHTMLParser::InsertFloatingFrame() SetSpace( aSpace, aItemSet, aPropInfo, aFrmSet ); // und in das Dok einfuegen - SwFrmFmt* pFlyFmt = + SwFrameFormat* pFlyFormat = pDoc->getIDocumentContentOperations().Insert( *pPam, ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aFrmSet, NULL, NULL ); // den alternativen Namen setzen - SwNoTxtNode *pNoTxtNd = - pDoc->GetNodes()[ pFlyFmt->GetCntnt().GetCntntIdx() - ->GetIndex()+1 ]->GetNoTxtNode(); - pNoTxtNd->SetTitle( aAlt ); + SwNoTextNode *pNoTextNd = + pDoc->GetNodes()[ pFlyFormat->GetContent().GetContentIdx() + ->GetIndex()+1 ]->GetNoTextNode(); + pNoTextNd->SetTitle( aAlt ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); bInFloatingFrame = true; } @@ -979,13 +979,13 @@ sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode ) return static_cast< sal_uInt16 >(eType); } -Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, +Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool bInCntnr ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode(); OSL_ENSURE( pOLENd, "OLE-Node erwartet" ); @@ -1013,8 +1013,8 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, if( rHTMLWrt.bLFPossible ) rHTMLWrt.OutNewLine( true ); - if( !rFrmFmt.GetName().isEmpty() ) - rHTMLWrt.OutImplicitMark( rFrmFmt.GetName(), + if( !rFrameFormat.GetName().isEmpty() ) + rHTMLWrt.OutImplicitMark( rFrameFormat.GetName(), "ole" ); uno::Any aAny; SvGlobalName aGlobName( xObj->getClassID() ); @@ -1054,8 +1054,8 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, sOut.append('\"'); } - if ((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) && - SURROUND_THROUGHT == rFrmFmt.GetSurround().GetSurround() ) + if ((FLY_AT_PARA == rFrameFormat.GetAnchor().GetAnchorId()) && + SURROUND_THROUGHT == rFrameFormat.GetSurround().GetSurround() ) { // Das Plugin ist HIDDEN sOut.append(' ').append(OOO_STRING_SW_HTML_O_Hidden); @@ -1143,9 +1143,9 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, // ALT, WIDTH, HEIGHT, HSPACE, VSPACE, ALIGN if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) nFrmOpts |= HTML_FRMOPTS_OLE_CSS1; - OString aEndTags = rHTMLWrt.OutFrmFmtOptions( rFrmFmt, pOLENd->GetTitle(), nFrmOpts ); + OString aEndTags = rHTMLWrt.OutFrameFormatOptions( rFrameFormat, pOLENd->GetTitle(), nFrmOpts ); if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bHiddenEmbed ) - rHTMLWrt.OutCSS1_FrmFmtOptions( rFrmFmt, nFrmOpts ); + rHTMLWrt.OutCSS1_FrameFormatOptions( rFrameFormat, nFrmOpts ); if( aGlobName == SvGlobalName( SO3_APPLET_CLASSID ) ) { @@ -1248,13 +1248,13 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt, return rWrt; } -Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, +Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool bInCntnr ) { SwHTMLWriter& rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); - const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt(); - sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1; + const SwFormatContent& rFlyContent = rFrameFormat.GetContent(); + sal_uLong nStt = rFlyContent.GetContentIdx()->GetIndex()+1; SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode(); OSL_ENSURE( pOLENd, "OLE-Node erwartet" ); @@ -1265,10 +1265,10 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, { // If we skip images, embedded objects would be completely lost. // Instead, try to use the HTML export of the embedded object. - uno::Reference<text::XTextContent> xTextContent = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rHTMLWrt.pDoc, const_cast<SwFrmFmt*>(&rFrmFmt)); + uno::Reference<text::XTextContent> xTextContent = SwXTextEmbeddedObject::CreateXTextEmbeddedObject(*rHTMLWrt.pDoc, const_cast<SwFrameFormat*>(&rFrameFormat)); uno::Reference<document::XEmbeddedObjectSupplier2> xEmbeddedObjectSupplier(xTextContent, uno::UNO_QUERY); uno::Reference<frame::XStorable> xStorable(xEmbeddedObjectSupplier->getEmbeddedObject(), uno::UNO_QUERY); - SAL_WARN_IF(!xStorable.is(), "sw.html", "OutHTML_FrmFmtOLENodeGrf: no embedded object"); + SAL_WARN_IF(!xStorable.is(), "sw.html", "OutHTML_FrameFormatOLENodeGrf: no embedded object"); // Figure out what is the filter name of the embedded object. uno::Reference<lang::XServiceInfo> xServiceInfo(xStorable, uno::UNO_QUERY); @@ -1310,7 +1310,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, Graphic aGraphic( *pOLENd->GetGraphic() ); sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR : HTML_FRMOPTS_GENIMG; - OutHTML_Image( rWrt, rFrmFmt, aGraphic, + OutHTML_Image( rWrt, rFrameFormat, aGraphic, pOLENd->GetTitle(), pOLENd->GetTwipSize(), nFlags, "ole" ); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 3c495d0f4c73..9b5325d8af4e 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -112,7 +112,7 @@ void SwHTMLParser::NewDivision( int nToken ) bool bAppended = false; if( pPam->GetPoint()->nContent.GetIndex() ) { - AppendTxtNode( bHeader||bFooter||!aId.isEmpty()|| !aHRef.isEmpty() ? AM_NORMAL + AppendTextNode( bHeader||bFooter||!aId.isEmpty()|| !aHRef.isEmpty() ? AM_NORMAL : AM_NOSPACE ); bAppended = true; } @@ -145,58 +145,58 @@ void SwHTMLParser::NewDivision( int nToken ) if( !bPositioned && (bHeader || bFooter) && IsNewDoc() ) { SwPageDesc *pPageDesc = pCSS1Parser->GetMasterPageDesc(); - SwFrmFmt& rPageFmt = pPageDesc->GetMaster(); + SwFrameFormat& rPageFormat = pPageDesc->GetMaster(); - SwFrmFmt *pHdFtFmt; + SwFrameFormat *pHdFtFormat; bool bNew = false; sal_uInt16 nFlags = CONTEXT_FLAGS_HDRFTR; if( bHeader ) { - pHdFtFmt = const_cast<SwFrmFmt*>(rPageFmt.GetHeader().GetHeaderFmt()); - if( !pHdFtFmt ) + pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetHeader().GetHeaderFormat()); + if( !pHdFtFormat ) { // noch keine Header, dann erzeuge einen. - rPageFmt.SetFmtAttr( SwFmtHeader( true )); - pHdFtFmt = const_cast<SwFrmFmt*>(rPageFmt.GetHeader().GetHeaderFmt()); + rPageFormat.SetFormatAttr( SwFormatHeader( true )); + pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetHeader().GetHeaderFormat()); bNew = true; } nFlags |= HTML_CNTXT_HEADER_DIST; } else { - pHdFtFmt = const_cast<SwFrmFmt*>(rPageFmt.GetFooter().GetFooterFmt()); - if( !pHdFtFmt ) + pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetFooter().GetFooterFormat()); + if( !pHdFtFormat ) { // noch keine Footer, dann erzeuge einen. - rPageFmt.SetFmtAttr( SwFmtFooter( true )); - pHdFtFmt = const_cast<SwFrmFmt*>(rPageFmt.GetFooter().GetFooterFmt()); + rPageFormat.SetFormatAttr( SwFormatFooter( true )); + pHdFtFormat = const_cast<SwFrameFormat*>(rPageFormat.GetFooter().GetFooterFormat()); bNew = true; } nFlags |= HTML_CNTXT_FOOTER_DIST; } - const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt(); - const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx(); - SwCntntNode *pCNd; + const SwFormatContent& rFlyContent = pHdFtFormat->GetContent(); + const SwNodeIndex& rContentStIdx = *rFlyContent.GetContentIdx(); + SwContentNode *pCNd; if( bNew ) { - pCNd = pDoc->GetNodes()[rCntntStIdx.GetIndex()+1] - ->GetCntntNode(); + pCNd = pDoc->GetNodes()[rContentStIdx.GetIndex()+1] + ->GetContentNode(); } else { // Einen neuen Node zu Beginn der Section anlegen - SwNodeIndex aSttIdx( rCntntStIdx, 1 ); - pCNd = pDoc->GetNodes().MakeTxtNode( aSttIdx, - pCSS1Parser->GetTxtCollFromPool(RES_POOLCOLL_TEXT)); + SwNodeIndex aSttIdx( rContentStIdx, 1 ); + pCNd = pDoc->GetNodes().MakeTextNode( aSttIdx, + pCSS1Parser->GetTextCollFromPool(RES_POOLCOLL_TEXT)); // Den bisherigen Inhalt der Section loeschen SwPaM aDelPam( aSttIdx ); aDelPam.SetMark(); const SwStartNode *pStNd = - static_cast<const SwStartNode *>( &rCntntStIdx.GetNode() ); + static_cast<const SwStartNode *>( &rContentStIdx.GetNode() ); aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1; pDoc->getIDocumentContentOperations().DelFullPara( aDelPam ); @@ -204,7 +204,7 @@ void SwHTMLParser::NewDivision( int nToken ) // Die Seitenvorlage aktualisieren for( size_t i=0; i < pDoc->GetPageDescCnt(); i++ ) { - if( RES_POOLPAGE_HTML == pDoc->GetPageDesc(i).GetPoolFmtId() ) + if( RES_POOLPAGE_HTML == pDoc->GetPageDesc(i).GetPoolFormatId() ) { pDoc->ChgPageDesc( i, *pPageDesc ); break; @@ -212,7 +212,7 @@ void SwHTMLParser::NewDivision( int nToken ) } } - SwPosition aNewPos( SwNodeIndex( rCntntStIdx, 1 ), SwIndex( pCNd, 0 ) ); + SwPosition aNewPos( SwNodeIndex( rContentStIdx, 1 ), SwIndex( pCNd, 0 ) ); SaveDocContext( pCntxt, nFlags, &aNewPos ); } else if( !bPositioned && aId.getLength() > 9 && @@ -229,8 +229,8 @@ void SwHTMLParser::NewDivision( int nToken ) SwNodeIndex *pStartNdIdx = GetFootEndNoteSection( aId ); if( pStartNdIdx ) { - SwCntntNode *pCNd = - pDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetCntntNode(); + SwContentNode *pCNd = + pDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetContentNode(); SwNodeIndex aTmpSwNodeIndex = SwNodeIndex(*pCNd); SwPosition aNewPos( aTmpSwNodeIndex, SwIndex( pCNd, 0 ) ); SaveDocContext( pCntxt, CONTEXT_FLAGS_FTN, &aNewPos ); @@ -255,7 +255,7 @@ void SwHTMLParser::NewDivision( int nToken ) SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 ); if (aPrvNdIdx.GetNode().IsSectionNode()) { - AppendTxtNode(); + AppendTextNode(); bAppended = true; } } @@ -316,7 +316,7 @@ void SwHTMLParser::NewDivision( int nToken ) SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrmItemSet ); const SfxPoolItem *pItem; if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, @@ -341,15 +341,15 @@ void SwHTMLParser::NewDivision( int nToken ) eJumpTo = JUMPTO_NONE; } - SwTxtNode* pOldTxtNd = - (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode* pOldTextNd = + (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTextNode(); pPam->Move( fnMoveBackward ); - // PageDesc- und SwFmtBreak Attribute vom aktuellen Node in den + // PageDesc- und SwFormatBreak Attribute vom aktuellen Node in den // (ersten) Node des Bereich verschieben. - if( pOldTxtNd ) - MovePageDescAttrs( pOldTxtNd, pPam->GetPoint()->nNode.GetIndex(), + if( pOldTextNd ) + MovePageDescAttrs( pOldTextNd, pPam->GetPoint()->nNode.GetIndex(), true ); if( pPostIts ) @@ -416,20 +416,20 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, const SwPosition *pOldPos ) { SwPageDesc *pPageDesc = pCSS1Parser->GetMasterPageDesc(); - SwFrmFmt& rPageFmt = pPageDesc->GetMaster(); + SwFrameFormat& rPageFormat = pPageDesc->GetMaster(); - SwFrmFmt *pHdFtFmt = - bHeader ? const_cast<SwFrmFmt*>(rPageFmt.GetHeader().GetHeaderFmt()) - : const_cast<SwFrmFmt*>(rPageFmt.GetFooter().GetFooterFmt()); - OSL_ENSURE( pHdFtFmt, "Doch keine Kopf- oder Fusszeile" ); + SwFrameFormat *pHdFtFormat = + bHeader ? const_cast<SwFrameFormat*>(rPageFormat.GetHeader().GetHeaderFormat()) + : const_cast<SwFrameFormat*>(rPageFormat.GetFooter().GetFooterFormat()); + OSL_ENSURE( pHdFtFormat, "Doch keine Kopf- oder Fusszeile" ); - const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt(); - const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx(); + const SwFormatContent& rFlyContent = pHdFtFormat->GetContent(); + const SwNodeIndex& rContentStIdx = *rFlyContent.GetContentIdx(); sal_uLong nPrvNxtIdx; if( bHeader ) { - nPrvNxtIdx = rCntntStIdx.GetNode().EndOfSectionIndex()-1; + nPrvNxtIdx = rContentStIdx.GetNode().EndOfSectionIndex()-1; } else { @@ -437,12 +437,12 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, } sal_uInt16 nSpace = 0; - SwTxtNode *pTxtNode = pDoc->GetNodes()[nPrvNxtIdx]->GetTxtNode(); - if( pTxtNode ) + SwTextNode *pTextNode = pDoc->GetNodes()[nPrvNxtIdx]->GetTextNode(); + if( pTextNode ) { const SvxULSpaceItem& rULSpace = - static_cast<const SvxULSpaceItem&>(pTxtNode - ->SwCntntNode::GetAttr( RES_UL_SPACE )); + static_cast<const SvxULSpaceItem&>(pTextNode + ->SwContentNode::GetAttr( RES_UL_SPACE )); // Der untere Absatz-Abstand wird zum Abstand zur // Kopf- oder Fusszeile @@ -451,11 +451,11 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, // und anschliessend auf einen vernuenftigen Wert // gesetzt const SvxULSpaceItem& rCollULSpace = - pTxtNode->GetAnyFmtColl().GetULSpace(); + pTextNode->GetAnyFormatColl().GetULSpace(); if( rCollULSpace.GetUpper() == rULSpace.GetUpper() ) - pTxtNode->ResetAttr( RES_UL_SPACE ); + pTextNode->ResetAttr( RES_UL_SPACE ); else - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rULSpace.GetUpper(), rCollULSpace.GetLower(), RES_UL_SPACE ) ); } @@ -466,16 +466,16 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, } else { - nPrvNxtIdx = rCntntStIdx.GetIndex() + 1; + nPrvNxtIdx = rContentStIdx.GetIndex() + 1; } - pTxtNode = pDoc->GetNodes()[nPrvNxtIdx] - ->GetTxtNode(); - if( pTxtNode ) + pTextNode = pDoc->GetNodes()[nPrvNxtIdx] + ->GetTextNode(); + if( pTextNode ) { const SvxULSpaceItem& rULSpace = - static_cast<const SvxULSpaceItem&>(pTxtNode - ->SwCntntNode::GetAttr( RES_UL_SPACE )); + static_cast<const SvxULSpaceItem&>(pTextNode + ->SwContentNode::GetAttr( RES_UL_SPACE )); // Der obere Absatz-Abstand wird zum Abstand zur // Kopf- oder Fusszeile, wenn er groesser ist als @@ -485,11 +485,11 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, // und anschliessend auf einen vernuenftigen Wert gesetzt const SvxULSpaceItem& rCollULSpace = - pTxtNode->GetAnyFmtColl().GetULSpace(); + pTextNode->GetAnyFormatColl().GetULSpace(); if( rCollULSpace.GetLower() == rULSpace.GetLower() ) - pTxtNode->ResetAttr( RES_UL_SPACE ); + pTextNode->ResetAttr( RES_UL_SPACE ); else - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rCollULSpace.GetUpper(), rULSpace.GetLower(), RES_UL_SPACE ) ); } @@ -500,7 +500,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader, else aULSpace.SetUpper( nSpace ); - pHdFtFmt->SetFmtAttr( aULSpace ); + pHdFtFormat->SetFormatAttr( aULSpace ); } bool SwHTMLParser::EndSection( bool bLFStripped ) @@ -621,7 +621,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrmItemSet ); SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE, aItemSet, aPropInfo, aFrmItemSet ); @@ -635,7 +635,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) // Set some other frame attributes. If the background is set, its // it will be cleared here. That for, it won't be set at the section, // too. - SetFrmFmtAttrs( aItemSet, aPropInfo, + SetFrameFormatAttrs( aItemSet, aPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_PADDING|HTML_FF_DIRECTION, aFrmItemSet ); @@ -659,7 +659,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) { if( pPam->GetPoint()->nContent.GetIndex() ) { - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); bAppended = true; } else @@ -679,7 +679,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 ); if (aPrvNdIdx.GetNode().IsSectionNode()) { - AppendTxtNode(); + AppendTextNode(); bAppended = true; } } @@ -693,7 +693,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) SfxItemSet aFrmItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs(aFrmItemSet ); + Reader::ResetFrameFormatAttrs(aFrmItemSet ); if( nGutter && Application::GetDefaultDevice() ) { @@ -702,11 +702,11 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) MapMode(MAP_TWIP) ).Width(); } - SwFmtCol aFmtCol; + SwFormatCol aFormatCol; nPrcWidth = 100; - aFmtCol.Init( nCols, nGutter, USHRT_MAX ); - aFrmItemSet.Put( aFmtCol ); + aFormatCol.Init( nCols, nGutter, USHRT_MAX ); + aFrmItemSet.Put( aFormatCol ); const SfxPoolItem *pItem; if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false, @@ -730,15 +730,15 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) eJumpTo = JUMPTO_NONE; } - SwTxtNode* pOldTxtNd = - (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode* pOldTextNd = + (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTextNode(); pPam->Move( fnMoveBackward ); - // Move PageDesc and SwFmtBreak attributes of the current node + // Move PageDesc and SwFormatBreak attributes of the current node // to the section's first node. - if( pOldTxtNd ) - MovePageDescAttrs( pOldTxtNd, pPam->GetPoint()->nNode.GetIndex(), + if( pOldTextNd ) + MovePageDescAttrs( pOldTextNd, pPam->GetPoint()->nNode.GetIndex(), true ); if( pPostIts ) @@ -769,21 +769,21 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet, sal_uInt16 nFlags ) { RndStdIds eAnchorId = - static_cast<const SwFmtAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId(); + static_cast<const SwFormatAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId(); // Den Rahmen anlegen - SwFlyFrmFmt* pFlyFmt = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(), + SwFlyFrameFormat* pFlyFormat = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(), &rItemSet ); // Ggf. den Namen setzen if( !rName.isEmpty() ) - pFlyFmt->SetName( rName ); + pFlyFormat->SetName( rName ); - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); - const SwFmtCntnt& rFlyCntnt = pFlyFmt->GetCntnt(); - const SwNodeIndex& rFlyCntIdx = *rFlyCntnt.GetCntntIdx(); - SwCntntNode *pCNd = pDoc->GetNodes()[rFlyCntIdx.GetIndex()+1] - ->GetCntntNode(); + const SwFormatContent& rFlyContent = pFlyFormat->GetContent(); + const SwNodeIndex& rFlyCntIdx = *rFlyContent.GetContentIdx(); + SwContentNode *pCNd = pDoc->GetNodes()[rFlyCntIdx.GetIndex()+1] + ->GetContentNode(); SwPosition aNewPos( SwNodeIndex( rFlyCntIdx, 1 ), SwIndex( pCNd, 0 ) ); SaveDocContext( pCntxt, nFlags, &aNewPos ); @@ -791,36 +791,36 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet, void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, - bool bFmtBreak ) + bool bFormatBreak ) { - SwCntntNode* pDestCntntNd = - pDoc->GetNodes()[nDestIdx]->GetCntntNode(); + SwContentNode* pDestContentNd = + pDoc->GetNodes()[nDestIdx]->GetContentNode(); - OSL_ENSURE( pDestCntntNd, "Wieso ist das Ziel kein Content-Node?" ); + OSL_ENSURE( pDestContentNd, "Wieso ist das Ziel kein Content-Node?" ); - if( pSrcNd->IsCntntNode() ) + if( pSrcNd->IsContentNode() ) { - SwCntntNode* pSrcCntntNd = pSrcNd->GetCntntNode(); + SwContentNode* pSrcContentNd = pSrcNd->GetContentNode(); const SfxPoolItem* pItem; - if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet() + if( SfxItemState::SET == pSrcContentNd->GetSwAttrSet() .GetItemState( RES_PAGEDESC, false, &pItem ) && - static_cast<const SwFmtPageDesc *>(pItem)->GetPageDesc() ) + static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc() ) { - pDestCntntNd->SetAttr( *pItem ); - pSrcCntntNd->ResetAttr( RES_PAGEDESC ); + pDestContentNd->SetAttr( *pItem ); + pSrcContentNd->ResetAttr( RES_PAGEDESC ); } - if( SfxItemState::SET == pSrcCntntNd->GetSwAttrSet() + if( SfxItemState::SET == pSrcContentNd->GetSwAttrSet() .GetItemState( RES_BREAK, false, &pItem ) ) { - switch( static_cast<const SvxFmtBreakItem *>(pItem)->GetBreak() ) + switch( static_cast<const SvxFormatBreakItem *>(pItem)->GetBreak() ) { case SVX_BREAK_PAGE_BEFORE: case SVX_BREAK_PAGE_AFTER: case SVX_BREAK_PAGE_BOTH: - if( bFmtBreak ) - pDestCntntNd->SetAttr( *pItem ); - pSrcCntntNd->ResetAttr( RES_BREAK ); + if( bFormatBreak ) + pDestContentNd->SetAttr( *pItem ); + pSrcContentNd->ResetAttr( RES_BREAK ); default: ; } @@ -828,14 +828,14 @@ void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd, } else if( pSrcNd->IsTableNode() ) { - SwFrmFmt *pFrmFmt = pSrcNd->GetTableNode()->GetTable().GetFrmFmt(); + SwFrameFormat *pFrameFormat = pSrcNd->GetTableNode()->GetTable().GetFrameFormat(); const SfxPoolItem* pItem; - if( SfxItemState::SET == pFrmFmt->GetAttrSet(). + if( SfxItemState::SET == pFrameFormat->GetAttrSet(). GetItemState( RES_PAGEDESC, false, &pItem ) ) { - pDestCntntNd->SetAttr( *pItem ); - pFrmFmt->ResetFmtAttr( RES_PAGEDESC ); + pDestContentNd->SetAttr( *pItem ); + pFrameFormat->ResetFormatAttr( RES_PAGEDESC ); } } } diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index f99a616bb9fa..0b9e7e1aaef3 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -62,7 +62,7 @@ using ::editeng::SvxBorderLine; using namespace ::com::sun::star; -static HTMLOptionEnum aHTMLTblVAlignTable[] = +static HTMLOptionEnum aHTMLTableVAlignTable[] = { { OOO_STRING_SVTOOLS_HTML_VA_top, text::VertOrientation::NONE }, { OOO_STRING_SVTOOLS_HTML_VA_middle, text::VertOrientation::CENTER }, @@ -104,8 +104,8 @@ class _HTMLTableContext { SwHTMLNumRuleInfo aNumRuleInfo; // Numbering valid before the table - SwTableNode *pTblNd; // table node - SwFrmFmt *pFrmFmt; // der Fly frame::Frame, containing the table + SwTableNode *pTableNd; // table node + SwFrameFormat *pFrameFormat; // der Fly frame::Frame, containing the table SwPosition *pPos; // position behind the table sal_uInt16 nContextStAttrMin; @@ -121,8 +121,8 @@ public: _HTMLTableContext( SwPosition *pPs, sal_uInt16 nCntxtStMin, sal_uInt16 nCntxtStAttrMin ) : - pTblNd( 0 ), - pFrmFmt( 0 ), + pTableNd( 0 ), + pFrameFormat( 0 ), pPos( pPs ), nContextStAttrMin( nCntxtStAttrMin ), nContextStMin( nCntxtStMin ), @@ -143,11 +143,11 @@ public: SwPosition *GetPos() const { return pPos; } - void SetTableNode( SwTableNode *pNd ) { pTblNd = pNd; } - SwTableNode *GetTableNode() const { return pTblNd; } + void SetTableNode( SwTableNode *pNd ) { pTableNd = pNd; } + SwTableNode *GetTableNode() const { return pTableNd; } - void SetFrmFmt( SwFrmFmt *pFmt ) { pFrmFmt = pFmt; } - SwFrmFmt *GetFrmFmt() const { return pFrmFmt; } + void SetFrameFormat( SwFrameFormat *pFormat ) { pFrameFormat = pFormat; } + SwFrameFormat *GetFrameFormat() const { return pFrameFormat; } sal_uInt16 GetContextStMin() const { return nContextStMin; } sal_uInt16 GetContextStAttrMin() const { return nContextStAttrMin; } @@ -206,7 +206,7 @@ class HTMLTableCell // !!!ATTENTION!!!!! ::boost::shared_ptr<SvxBoxItem> m_pBoxItem; - sal_uInt32 nNumFmt; + sal_uInt32 nNumFormat; sal_uInt16 nRowSpan; // cell ROWSPAN sal_uInt16 nColSpan; // cell COLSPAN sal_uInt16 nWidth; // cell WIDTH @@ -214,7 +214,7 @@ class HTMLTableCell sal_Int16 eVertOri; // vertical alignment of the cell bool bProtected : 1; // cell must not filled bool bRelWidth : 1; // nWidth is given in % - bool bHasNumFmt : 1; + bool bHasNumFormat : 1; bool bHasValue : 1; bool bNoWrap : 1; bool mbCovered : 1; @@ -229,7 +229,7 @@ public: void Set( HTMLTableCnts *pCnts, sal_uInt16 nRSpan, sal_uInt16 nCSpan, sal_Int16 eVertOri, SvxBrushItem *pBGBrush, ::boost::shared_ptr<SvxBoxItem> const& rBoxItem, - bool bHasNumFmt, sal_uInt32 nNumFmt, + bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap, bool bCovered ); // Protect an empty 1x1 cell @@ -251,7 +251,7 @@ public: const SvxBrushItem *GetBGBrush() const { return pBGBrush; } ::boost::shared_ptr<SvxBoxItem> GetBoxItem() const { return m_pBoxItem; } - inline bool GetNumFmt( sal_uInt32& rNumFmt ) const; + inline bool GetNumFormat( sal_uInt32& rNumFormat ) const; inline bool GetValue( double& rValue ) const; sal_Int16 GetVertOri() const { return eVertOri; } @@ -326,9 +326,9 @@ class HTMLTableColumn SvxAdjust eAdjust; sal_Int16 eVertOri; - SwFrmFmt *aFrmFmts[6]; + SwFrameFormat *aFrameFormats[6]; - static inline sal_uInt16 GetFrmFmtIdx( bool bBorderLine, + static inline sal_uInt16 GetFrameFormatIdx( bool bBorderLine, sal_Int16 eVertOri ); public: @@ -348,9 +348,9 @@ public: inline void SetEndOfGroup() { bIsEndOfGroup = true; } inline bool IsEndOfGroup() const { return bIsEndOfGroup; } - inline void SetFrmFmt( SwFrmFmt *pFmt, bool bBorderLine, + inline void SetFrameFormat( SwFrameFormat *pFormat, bool bBorderLine, sal_Int16 eVertOri ); - inline SwFrmFmt *GetFrmFmt( bool bBorderLine, + inline SwFrameFormat *GetFrameFormat( bool bBorderLine, sal_Int16 eVertOri ) const; SwHTMLTableLayoutColumn *CreateLayoutInfo(); @@ -396,9 +396,9 @@ class HTMLTable const SwStartNode *pPrevStNd; // the Table-Node or the Start-Node of the section before const SwTable *pSwTable; // SW-Table (only on Top-Level) SwTableBox *pBox1; // TableBox, generated when the Top-Level-Table was build - SwTableBoxFmt *pBoxFmt; // frame::Frame-Format from SwTableBox - SwTableLineFmt *pLineFmt; // frame::Frame-Format from SwTableLine - SwTableLineFmt *pLineFrmFmtNoHeight; + SwTableBoxFormat *pBoxFormat; // frame::Frame-Format from SwTableBox + SwTableLineFormat *pLineFormat; // frame::Frame-Format from SwTableLine + SwTableLineFormat *pLineFrameFormatNoHeight; SvxBrushItem *pBGBrush; // background of the table SvxBrushItem *pInhBGBrush; // "inherited" background of the table const SwStartNode *pCaptionStartNode; // Start-Node of the table-caption @@ -465,10 +465,10 @@ class HTMLTable bool bSwBorders=true ) const; // Conforming of the frame::Frame-Format of the box - void FixFrameFmt( SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, + void FixFrameFormat( SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, bool bFirstPara=true, bool bLastPara=true ) const; - void FixFillerFrameFmt( SwTableBox *pBox, bool bRight ) const; + void FixFillerFrameFormat( SwTableBox *pBox, bool bRight ) const; // Create a table with the content (lines/boxes) void _MakeTable( SwTableBox *pUpper=0 ); @@ -549,7 +549,7 @@ public: sal_uInt16 nWidth, bool bRelWidth, sal_uInt16 nHeight, sal_Int16 eVertOri, SvxBrushItem *pBGBrush, boost::shared_ptr<SvxBoxItem> const& rBoxItem, - bool bHasNumFmt, sal_uInt32 nNumFmt, + bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap ); // announce the start/end of a new row @@ -677,7 +677,7 @@ SwHTMLTableLayoutCnts *HTMLTableCnts::CreateLayoutInfo() HTMLTableCell::HTMLTableCell(): pContents(0), pBGBrush(0), - nNumFmt(0), + nNumFormat(0), nRowSpan(1), nColSpan(1), nWidth( 0 ), @@ -685,7 +685,7 @@ HTMLTableCell::HTMLTableCell(): eVertOri( text::VertOrientation::NONE ), bProtected(false), bRelWidth( false ), - bHasNumFmt(false), + bHasNumFormat(false), bHasValue(false), bNoWrap(false), mbCovered(false) @@ -716,9 +716,9 @@ void HTMLTableCell::Set( HTMLTableCnts *pCnts, sal_uInt16 nRSpan, sal_uInt16 nCS pBGBrush = pBrush; m_pBoxItem = rBoxItem; - bHasNumFmt = bHasNF; + bHasNumFormat = bHasNF; bHasValue = bHasV; - nNumFmt = nNF; + nNumFormat = nNF; nValue = nVal; bNoWrap = bNWrap; @@ -748,10 +748,10 @@ void HTMLTableCell::SetProtected() bProtected = true; } -inline bool HTMLTableCell::GetNumFmt( sal_uInt32& rNumFmt ) const +inline bool HTMLTableCell::GetNumFormat( sal_uInt32& rNumFormat ) const { - rNumFmt = nNumFmt; - return bHasNumFmt; + rNumFormat = nNumFormat; + return bHasNumFormat; } inline bool HTMLTableCell::GetValue( double& rValue ) const @@ -873,7 +873,7 @@ HTMLTableColumn::HTMLTableColumn(): bLeftBorder(false) { for( sal_uInt16 i=0; i<6; i++ ) - aFrmFmts[i] = 0; + aFrameFormats[i] = 0; } inline void HTMLTableColumn::SetWidth( sal_uInt16 nWdth, bool bRelWdth ) @@ -893,7 +893,7 @@ inline SwHTMLTableLayoutColumn *HTMLTableColumn::CreateLayoutInfo() return new SwHTMLTableLayoutColumn( nWidth, bRelWidth, bLeftBorder ); } -inline sal_uInt16 HTMLTableColumn::GetFrmFmtIdx( bool bBorderLine, +inline sal_uInt16 HTMLTableColumn::GetFrameFormatIdx( bool bBorderLine, sal_Int16 eVertOrient ) { OSL_ENSURE( text::VertOrientation::TOP != eVertOrient, "Top ist nicht erlaubt" ); @@ -908,16 +908,16 @@ inline sal_uInt16 HTMLTableColumn::GetFrmFmtIdx( bool bBorderLine, return n; } -inline void HTMLTableColumn::SetFrmFmt( SwFrmFmt *pFmt, bool bBorderLine, +inline void HTMLTableColumn::SetFrameFormat( SwFrameFormat *pFormat, bool bBorderLine, sal_Int16 eVertOrient ) { - aFrmFmts[GetFrmFmtIdx(bBorderLine,eVertOrient)] = pFmt; + aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)] = pFormat; } -inline SwFrmFmt *HTMLTableColumn::GetFrmFmt( bool bBorderLine, +inline SwFrameFormat *HTMLTableColumn::GetFrameFormat( bool bBorderLine, sal_Int16 eVertOrient ) const { - return aFrmFmts[GetFrmFmtIdx(bBorderLine,eVertOrient)]; + return aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)]; } void HTMLTable::InitCtor( const HTMLTableOptions *pOptions ) @@ -931,8 +931,8 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions ) nCurRow = 0; nCurCol = 0; pBox1 = 0; - pBoxFmt = 0; pLineFmt = 0; - pLineFrmFmtNoHeight = 0; + pBoxFormat = 0; pLineFormat = 0; + pLineFrameFormatNoHeight = 0; pInhBGBrush = 0; pPrevStNd = 0; @@ -1245,8 +1245,8 @@ static bool IsBoxEmpty( const SwTableBox *pBox ) if( pSttNd && pSttNd->GetIndex() + 2 == pSttNd->EndOfSectionIndex() ) { - const SwCntntNode *pCNd = - pSttNd->GetNodes()[pSttNd->GetIndex()+1]->GetCntntNode(); + const SwContentNode *pCNd = + pSttNd->GetNodes()[pSttNd->GetIndex()+1]->GetContentNode(); if( pCNd && !pCNd->Len() ) return true; } @@ -1325,21 +1325,21 @@ sal_uInt16 HTMLTable::GetBottomCellSpace( sal_uInt16 nRow, sal_uInt16 nRowSpan, return nSpace; } -void HTMLTable::FixFrameFmt( SwTableBox *pBox, +void HTMLTable::FixFrameFormat( SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol, sal_uInt16 nRowSpan, sal_uInt16 nColSpan, bool bFirstPara, bool bLastPara ) const { - SwFrmFmt *pFrmFmt = 0; // frame::Frame-Format + SwFrameFormat *pFrameFormat = 0; // frame::Frame-Format sal_Int16 eVOri = text::VertOrientation::NONE; const SvxBrushItem *pBGBrushItem = 0; // Hintergrund boost::shared_ptr<SvxBoxItem> pBoxItem; bool bTopLine = false, bBottomLine = false, bLastBottomLine = false; bool bReUsable = false; // Format nochmals verwendbar? sal_uInt16 nEmptyRows = 0; - bool bHasNumFmt = false; + bool bHasNumFormat = false; bool bHasValue = false; - sal_uInt32 nNumFmt = 0; + sal_uInt32 nNumFormat = 0; double nValue = 0.0; HTMLTableColumn *pColumn = &(*pColumns)[nCol]; @@ -1382,21 +1382,21 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, } eVOri = pCell->GetVertOri(); - bHasNumFmt = pCell->GetNumFmt( nNumFmt ); - if( bHasNumFmt ) + bHasNumFormat = pCell->GetNumFormat( nNumFormat ); + if( bHasNumFormat ) bHasValue = pCell->GetValue( nValue ); if( nColSpan==1 && !bTopLine && !bLastBottomLine && !nEmptyRows && - !pBGBrushItem && !bHasNumFmt && !pBoxItem) + !pBGBrushItem && !bHasNumFormat && !pBoxItem) { - pFrmFmt = pColumn->GetFrmFmt( bBottomLine, eVOri ); - bReUsable = !pFrmFmt; + pFrameFormat = pColumn->GetFrameFormat( bBottomLine, eVOri ); + bReUsable = !pFrameFormat; } } - if( !pFrmFmt ) + if( !pFrameFormat ) { - pFrmFmt = pBox->ClaimFrmFmt(); + pFrameFormat = pBox->ClaimFrameFormat(); // die Breite der Box berechnen SwTwips nFrmWidth = (SwTwips)pLayoutInfo->GetColumn(nCol) @@ -1464,7 +1464,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, if (pBoxItem) { - pFrmFmt->SetFmtAttr( *pBoxItem ); + pFrameFormat->SetFormatAttr( *pBoxItem ); } else if (bSet) { @@ -1477,32 +1477,32 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, // dann gibt es eine Umrandung, und wir muessen die Distanz // setzen aBoxItem.SetDistance( nBDist ? nBDist : MIN_BORDER_DIST ); - pFrmFmt->SetFmtAttr( aBoxItem ); + pFrameFormat->SetFormatAttr( aBoxItem ); } else - pFrmFmt->ResetFmtAttr( RES_BOX ); + pFrameFormat->ResetFormatAttr( RES_BOX ); if( pBGBrushItem ) { - pFrmFmt->SetFmtAttr( *pBGBrushItem ); + pFrameFormat->SetFormatAttr( *pBGBrushItem ); } else - pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); + pFrameFormat->ResetFormatAttr( RES_BACKGROUND ); // Format nur setzten, wenn es auch einen Value gibt oder die Box leer ist. - if( bHasNumFmt && (bHasValue || IsBoxEmpty(pBox)) ) + if( bHasNumFormat && (bHasValue || IsBoxEmpty(pBox)) ) { - bool bLock = pFrmFmt->GetDoc()->GetNumberFormatter() - ->IsTextFormat( nNumFmt ); - SfxItemSet aItemSet( *pFrmFmt->GetAttrSet().GetPool(), + bool bLock = pFrameFormat->GetDoc()->GetNumberFormatter() + ->IsTextFormat( nNumFormat ); + SfxItemSet aItemSet( *pFrameFormat->GetAttrSet().GetPool(), RES_BOXATR_FORMAT, RES_BOXATR_VALUE ); SvxAdjust eAdjust = SVX_ADJUST_END; - SwCntntNode *pCNd = 0; + SwContentNode *pCNd = 0; if( !bLock ) { const SwStartNode *pSttNd = pBox->GetSttNd(); pCNd = pSttNd->GetNodes()[pSttNd->GetIndex()+1] - ->GetCntntNode(); + ->GetContentNode(); const SfxPoolItem *pItem; if( pCNd && pCNd->HasSwAttrSet() && SfxItemState::SET==pCNd->GetpSwAttrSet()->GetItemState( @@ -1512,15 +1512,15 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, ->GetAdjust(); } } - aItemSet.Put( SwTblBoxNumFormat(nNumFmt) ); + aItemSet.Put( SwTableBoxNumFormat(nNumFormat) ); if( bHasValue ) - aItemSet.Put( SwTblBoxValue(nValue) ); + aItemSet.Put( SwTableBoxValue(nValue) ); if( bLock ) - pFrmFmt->LockModify(); - pFrmFmt->SetFmtAttr( aItemSet ); + pFrameFormat->LockModify(); + pFrameFormat->SetFormatAttr( aItemSet ); if( bLock ) - pFrmFmt->UnlockModify(); + pFrameFormat->UnlockModify(); else if( pCNd && SVX_ADJUST_END != eAdjust ) { SvxAdjustItem aAdjItem( eAdjust, RES_PARATR_ADJUST ); @@ -1528,41 +1528,41 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, } } else - pFrmFmt->ResetFmtAttr( RES_BOXATR_FORMAT ); + pFrameFormat->ResetFormatAttr( RES_BOXATR_FORMAT ); OSL_ENSURE( eVOri != text::VertOrientation::TOP, "text::VertOrientation::TOP ist nicht erlaubt!" ); if( text::VertOrientation::NONE != eVOri ) { - pFrmFmt->SetFmtAttr( SwFmtVertOrient( 0, eVOri ) ); + pFrameFormat->SetFormatAttr( SwFormatVertOrient( 0, eVOri ) ); } else - pFrmFmt->ResetFmtAttr( RES_VERT_ORIENT ); + pFrameFormat->ResetFormatAttr( RES_VERT_ORIENT ); if( bReUsable ) - pColumn->SetFrmFmt( pFrmFmt, bBottomLine, eVOri ); + pColumn->SetFrameFormat( pFrameFormat, bBottomLine, eVOri ); } else { - pFrmFmt->ResetFmtAttr( RES_BOX ); - pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); - pFrmFmt->ResetFmtAttr( RES_VERT_ORIENT ); - pFrmFmt->ResetFmtAttr( RES_BOXATR_FORMAT ); + pFrameFormat->ResetFormatAttr( RES_BOX ); + pFrameFormat->ResetFormatAttr( RES_BACKGROUND ); + pFrameFormat->ResetFormatAttr( RES_VERT_ORIENT ); + pFrameFormat->ResetFormatAttr( RES_BOXATR_FORMAT ); } } else { OSL_ENSURE( pBox->GetSttNd() || - SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState( + SfxItemState::SET!=pFrameFormat->GetAttrSet().GetItemState( RES_VERT_ORIENT, false ), "Box ohne Inhalt hat vertikale Ausrichtung" ); - pBox->ChgFrmFmt( static_cast<SwTableBoxFmt*>(pFrmFmt) ); + pBox->ChgFrameFormat( static_cast<SwTableBoxFormat*>(pFrameFormat) ); } } -void HTMLTable::FixFillerFrameFmt( SwTableBox *pBox, bool bRight ) const +void HTMLTable::FixFillerFrameFormat( SwTableBox *pBox, bool bRight ) const { - SwFrmFmt *pFrmFmt = pBox->ClaimFrmFmt(); + SwFrameFormat *pFrameFormat = pBox->ClaimFrameFormat(); if( bFillerTopBorder || bFillerBottomBorder || (!bRight && bInhLeftBorder) || (bRight && bInhRightBorder) ) @@ -1577,20 +1577,20 @@ void HTMLTable::FixFillerFrameFmt( SwTableBox *pBox, bool bRight ) const if( bRight && bInhRightBorder ) aBoxItem.SetLine( &aInhRightBorderLine, SvxBoxItemLine::RIGHT ); aBoxItem.SetDistance( MIN_BORDER_DIST ); - pFrmFmt->SetFmtAttr( aBoxItem ); + pFrameFormat->SetFormatAttr( aBoxItem ); } else { - pFrmFmt->ResetFmtAttr( RES_BOX ); + pFrameFormat->ResetFormatAttr( RES_BOX ); } if( GetInhBGBrush() ) - pFrmFmt->SetFmtAttr( *GetInhBGBrush() ); + pFrameFormat->SetFormatAttr( *GetInhBGBrush() ); else - pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); + pFrameFormat->ResetFormatAttr( RES_BACKGROUND ); - pFrmFmt->ResetFmtAttr( RES_VERT_ORIENT ); - pFrmFmt->ResetFmtAttr( RES_BOXATR_FORMAT ); + pFrameFormat->ResetFormatAttr( RES_VERT_ORIENT ); + pFrameFormat->ResetFormatAttr( RES_BOXATR_FORMAT ); } SwTableBox *HTMLTable::NewTableBox( const SwStartNode *pStNd, @@ -1608,16 +1608,16 @@ SwTableBox *HTMLTable::NewTableBox( const SwStartNode *pStNd, pTopTable->pBox1 = 0; } else - pBox = new SwTableBox( pBoxFmt, *pStNd, pUpper ); + pBox = new SwTableBox( pBoxFormat, *pStNd, pUpper ); return pBox; } -static void ResetLineFrmFmtAttrs( SwFrmFmt *pFrmFmt ) +static void ResetLineFrameFormatAttrs( SwFrameFormat *pFrameFormat ) { - pFrmFmt->ResetFmtAttr( RES_FRM_SIZE ); - pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); - OSL_ENSURE( SfxItemState::SET!=pFrmFmt->GetAttrSet().GetItemState( + pFrameFormat->ResetFormatAttr( RES_FRM_SIZE ); + pFrameFormat->ResetFormatAttr( RES_BACKGROUND ); + OSL_ENSURE( SfxItemState::SET!=pFrameFormat->GetAttrSet().GetItemState( RES_VERT_ORIENT, false ), "Zeile hat vertikale Ausrichtung" ); } @@ -1631,8 +1631,8 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, if( this==pTopTable && !pUpper && 0==nTopRow ) pLine = (pSwTable->GetTabLines())[0]; else - pLine = new SwTableLine( pLineFrmFmtNoHeight ? pLineFrmFmtNoHeight - : pLineFmt, + pLine = new SwTableLine( pLineFrameFormatNoHeight ? pLineFrameFormatNoHeight + : pLineFormat, 0, pUpper ); HTMLTableRow *pTopRow = &(*pRows)[nTopRow]; @@ -1657,8 +1657,8 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, } if( nTopRow==nBottomRow-1 && (nRowHeight || pBGBrushItem) ) { - SwTableLineFmt *pFrmFmt = static_cast<SwTableLineFmt*>(pLine->ClaimFrmFmt()); - ResetLineFrmFmtAttrs( pFrmFmt ); + SwTableLineFormat *pFrameFormat = static_cast<SwTableLineFormat*>(pLine->ClaimFrameFormat()); + ResetLineFrameFormatAttrs( pFrameFormat ); if( nRowHeight ) { @@ -1669,22 +1669,22 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, nRowHeight += GetTopCellSpace( nTopRow, 1, false ) + GetBottomCellSpace( nTopRow, 1, false ); - pFrmFmt->SetFmtAttr( SwFmtFrmSize( ATT_MIN_SIZE, 0, nRowHeight ) ); + pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nRowHeight ) ); } if( pBGBrushItem ) { - pFrmFmt->SetFmtAttr( *pBGBrushItem ); + pFrameFormat->SetFormatAttr( *pBGBrushItem ); } } - else if( !pLineFrmFmtNoHeight ) + else if( !pLineFrameFormatNoHeight ) { // sonst muessen wir die Hoehe aus dem Attribut entfernen // und koennen uns das Format merken - pLineFrmFmtNoHeight = static_cast<SwTableLineFmt*>(pLine->ClaimFrmFmt()); + pLineFrameFormatNoHeight = static_cast<SwTableLineFormat*>(pLine->ClaimFrameFormat()); - ResetLineFrmFmtAttrs( pLineFrmFmtNoHeight ); + ResetLineFrameFormatAttrs( pLineFrameFormatNoHeight ); } SwTableBoxes& rBoxes = pLine->GetTabBoxes(); @@ -1789,7 +1789,7 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper, // und die ist eine Tabelle: dann bauen wir eine neue // Box und fuegen die Zeilen der Tabelle in die Zeilen // der Box ein - pBox = new SwTableBox( pBoxFmt, 0, pUpper ); + pBox = new SwTableBox( pBoxFormat, 0, pUpper ); sal_uInt16 nAbs, nRel; pLayoutInfo->GetAvail( nLeftCol, nColSpan, nAbs, nRel ); sal_uInt16 nLSpace = pLayoutInfo->GetLeftCellSpace( nLeftCol, nColSpan ); @@ -1802,7 +1802,7 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper, else { // mehrere Inhalts Sections: dann brauchen wir eine Box mit Zeilen - pBox = new SwTableBox( pBoxFmt, 0, pUpper ); + pBox = new SwTableBox( pBoxFormat, 0, pUpper ); SwTableLines& rLines = pBox->GetTabLines(); bool bFirstPara = true; @@ -1812,21 +1812,21 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper, { // normale Absaetze werden zu einer Box in einer Zeile SwTableLine *pLine = - new SwTableLine( pLineFrmFmtNoHeight ? pLineFrmFmtNoHeight - : pLineFmt, 0, pBox ); - if( !pLineFrmFmtNoHeight ) + new SwTableLine( pLineFrameFormatNoHeight ? pLineFrameFormatNoHeight + : pLineFormat, 0, pBox ); + if( !pLineFrameFormatNoHeight ) { // Wenn es noch kein Line-Format ohne Hoehe gibt, koennen // wir uns dieses her als soleches merken - pLineFrmFmtNoHeight = static_cast<SwTableLineFmt*>(pLine->ClaimFrmFmt()); + pLineFrameFormatNoHeight = static_cast<SwTableLineFormat*>(pLine->ClaimFrameFormat()); - ResetLineFrmFmtAttrs( pLineFrmFmtNoHeight ); + ResetLineFrameFormatAttrs( pLineFrameFormatNoHeight ); } SwTableBox* pCntBox = NewTableBox( pCnts->GetStartNode(), pLine ); pCnts->SetTableBox( pCntBox ); - FixFrameFmt( pCntBox, nTopRow, nLeftCol, nRowSpan, nColSpan, + FixFrameFormat( pCntBox, nTopRow, nLeftCol, nRowSpan, nColSpan, bFirstPara, 0==pCnts->Next() ); pLine->GetTabBoxes().push_back( pCntBox ); @@ -1853,7 +1853,7 @@ SwTableBox *HTMLTable::MakeTableBox( SwTableLine *pUpper, } } - FixFrameFmt( pBox, nTopRow, nLeftCol, nRowSpan, nColSpan ); + FixFrameFormat( pBox, nTopRow, nLeftCol, nRowSpan, nColSpan ); return pBox; } @@ -2061,7 +2061,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, sal_uInt16 nCellWidth, bool bRelWidth, sal_uInt16 nCellHeight, sal_Int16 eVertOrient, SvxBrushItem *pBGBrushItem, boost::shared_ptr<SvxBoxItem> const& rBoxItem, - bool bHasNumFmt, sal_uInt32 nNumFmt, + bool bHasNumFormat, sal_uInt32 nNumFormat, bool bHasValue, double nValue, bool bNoWrap ) { if( !nRowSpan || (sal_uInt32)nCurRow + nRowSpan > USHRT_MAX ) @@ -2140,7 +2140,7 @@ void HTMLTable::InsertCell( HTMLTableCnts *pCnts, const bool bCovered = i != nColSpan || j != nRowSpan; GetCell( nRowsReq-j, nColsReq-i ) ->Set( pCnts, j, i, eVertOrient, pBGBrushItem, rBoxItem, - bHasNumFmt, nNumFmt, bHasValue, nValue, bNoWrap, bCovered ); + bHasNumFormat, nNumFormat, bHasValue, nValue, bNoWrap, bCovered ); } } @@ -2499,27 +2499,27 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, } // das Tabellenform holen und anpassen - SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt(); - pFrmFmt->SetFmtAttr( SwFmtHoriOrient(0,eHoriOri) ); + SwFrameFormat *pFrameFormat = pSwTable->GetFrameFormat(); + pFrameFormat->SetFormatAttr( SwFormatHoriOrient(0,eHoriOri) ); if( text::HoriOrientation::LEFT_AND_WIDTH==eHoriOri ) { OSL_ENSURE( nLeftMargin || nRightMargin, "Da gibt's wohl noch Reste von relativen Breiten" ); // The right margin will be ignored anyway. - SvxLRSpaceItem aLRItem( pSwTable->GetFrmFmt()->GetLRSpace() ); + SvxLRSpaceItem aLRItem( pSwTable->GetFrameFormat()->GetLRSpace() ); aLRItem.SetLeft( nLeftMargin ); aLRItem.SetRight( nRightMargin ); - pFrmFmt->SetFmtAttr( aLRItem ); + pFrameFormat->SetFormatAttr( aLRItem ); } if( bPrcWidth && text::HoriOrientation::FULL!=eHoriOri ) { - pFrmFmt->LockModify(); - SwFmtFrmSize aFrmSize( pFrmFmt->GetFrmSize() ); + pFrameFormat->LockModify(); + SwFormatFrmSize aFrmSize( pFrameFormat->GetFrmSize() ); aFrmSize.SetWidthPercent( (sal_uInt8)nWidth ); - pFrmFmt->SetFmtAttr( aFrmSize ); - pFrmFmt->UnlockModify(); + pFrameFormat->SetFormatAttr( aFrmSize ); + pFrameFormat->UnlockModify(); } } @@ -2531,13 +2531,13 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, pBox1 = (pLine1->GetTabBoxes())[0]; pLine1->GetTabBoxes().erase(pLine1->GetTabBoxes().begin()); - pLineFmt = static_cast<SwTableLineFmt*>(pLine1->GetFrmFmt()); - pBoxFmt = static_cast<SwTableBoxFmt*>(pBox1->GetFrmFmt()); + pLineFormat = static_cast<SwTableLineFormat*>(pLine1->GetFrameFormat()); + pBoxFormat = static_cast<SwTableBoxFormat*>(pBox1->GetFrameFormat()); } else { - pLineFmt = pTopTable->pLineFmt; - pBoxFmt = pTopTable->pBoxFmt; + pLineFormat = pTopTable->pLineFormat; + pBoxFormat = pTopTable->pBoxFormat; } // ggf. muessen fuer Tabellen in Tabellen "Filler"-Zellen eingefuegt @@ -2552,18 +2552,18 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, // dazu brauchen wir erstmal ein eine neue Table-Line in der Box SwTableLine *pLine = - new SwTableLine( pLineFrmFmtNoHeight ? pLineFrmFmtNoHeight - : pLineFmt, 0, pBox ); + new SwTableLine( pLineFrameFormatNoHeight ? pLineFrameFormatNoHeight + : pLineFormat, 0, pBox ); rLines.push_back( pLine ); // Sicherstellen, dass wie ein Format ohne Hoehe erwischt haben - if( !pLineFrmFmtNoHeight ) + if( !pLineFrameFormatNoHeight ) { // sonst muessen wir die Hoehe aus dem Attribut entfernen // und koennen uns das Format merken - pLineFrmFmtNoHeight = static_cast<SwTableLineFmt*>(pLine->ClaimFrmFmt()); + pLineFrameFormatNoHeight = static_cast<SwTableLineFormat*>(pLine->ClaimFrameFormat()); - ResetLineFrmFmtAttrs( pLineFrmFmtNoHeight ); + ResetLineFrameFormatAttrs( pLineFrameFormatNoHeight ); } SwTableBoxes& rBoxes = pLine->GetTabBoxes(); @@ -2578,19 +2578,19 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, pNewBox = NewTableBox( pPrevStNd, pLine ); rBoxes.push_back( pNewBox ); - FixFillerFrameFmt( pNewBox, false ); + FixFillerFrameFormat( pNewBox, false ); pLayoutInfo->SetLeftFillerBox( pNewBox ); } // jetzt die Tabelle bearbeiten - pNewBox = new SwTableBox( pBoxFmt, 0, pLine ); + pNewBox = new SwTableBox( pBoxFormat, 0, pLine ); rBoxes.push_back( pNewBox ); - SwFrmFmt *pFrmFmt = pNewBox->ClaimFrmFmt(); - pFrmFmt->ResetFmtAttr( RES_BOX ); - pFrmFmt->ResetFmtAttr( RES_BACKGROUND ); - pFrmFmt->ResetFmtAttr( RES_VERT_ORIENT ); - pFrmFmt->ResetFmtAttr( RES_BOXATR_FORMAT ); + SwFrameFormat *pFrameFormat = pNewBox->ClaimFrameFormat(); + pFrameFormat->ResetFormatAttr( RES_BOX ); + pFrameFormat->ResetFormatAttr( RES_BACKGROUND ); + pFrameFormat->ResetFormatAttr( RES_VERT_ORIENT ); + pFrameFormat->ResetFormatAttr( RES_BOXATR_FORMAT ); _MakeTable( pNewBox ); @@ -2604,7 +2604,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, pNewBox = NewTableBox( pStNd, pLine ); rBoxes.push_back( pNewBox ); - FixFillerFrameFmt( pNewBox, true ); + FixFillerFrameFormat( pNewBox, true ); pLayoutInfo->SetRightFillerBox( pNewBox ); } } @@ -2627,18 +2627,18 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, if( nHeight < MINLAY ) nHeight = MINLAY; - (pSwTable->GetTabLines())[0]->ClaimFrmFmt(); - (pSwTable->GetTabLines())[0]->GetFrmFmt() - ->SetFmtAttr( SwFmtFrmSize( ATT_MIN_SIZE, 0, nHeight ) ); + (pSwTable->GetTabLines())[0]->ClaimFrameFormat(); + (pSwTable->GetTabLines())[0]->GetFrameFormat() + ->SetFormatAttr( SwFormatFrmSize( ATT_MIN_SIZE, 0, nHeight ) ); } if( GetBGBrush() ) - pSwTable->GetFrmFmt()->SetFmtAttr( *GetBGBrush() ); + pSwTable->GetFrameFormat()->SetFormatAttr( *GetBGBrush() ); const_cast<SwTable *>(pSwTable)->SetRowsToRepeat( static_cast< sal_uInt16 >(nHeadlineRepeat) ); const_cast<SwTable *>(pSwTable)->GCLines(); - bool bIsInFlyFrame = pContext && pContext->GetFrmFmt(); + bool bIsInFlyFrame = pContext && pContext->GetFrameFormat(); if( bIsInFlyFrame && !nWidth ) { SvxAdjust eAdjust = GetTableAdjust(false); @@ -2653,9 +2653,9 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, sal_uInt32 nMin = pLayoutInfo->GetMin(); if( nMin > USHRT_MAX ) nMin = USHRT_MAX; - SwFmtFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMin, MINLAY ); + SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMin, MINLAY ); aFlyFrmSize.SetWidthPercent( 100 ); - pContext->GetFrmFmt()->SetFmtAttr( aFlyFrmSize ); + pContext->GetFrameFormat()->SetFormatAttr( aFlyFrmSize ); bIsInFlyFrame = false; } else @@ -2664,14 +2664,14 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, // duerfen leider nicht in der Breite angepasst werden, denn // sie wuerden nur schrumpfen aber nie wachsen. pLayoutInfo->SetMustNotRecalc( true ); - if( pContext->GetFrmFmt()->GetAnchor().GetCntntAnchor() + if( pContext->GetFrameFormat()->GetAnchor().GetContentAnchor() ->nNode.GetNode().FindTableNode() ) { sal_uInt32 nMax = pLayoutInfo->GetMax(); if( nMax > USHRT_MAX ) nMax = USHRT_MAX; - SwFmtFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMax, MINLAY ); - pContext->GetFrmFmt()->SetFmtAttr( aFlyFrmSize ); + SwFormatFrmSize aFlyFrmSize( ATT_VAR_SIZE, (SwTwips)nMax, MINLAY ); + pContext->GetFrameFormat()->SetFormatAttr( aFlyFrmSize ); bIsInFlyFrame = false; } else @@ -2787,13 +2787,13 @@ const SwStartNode *SwHTMLParser::InsertTableSection OSL_ENSURE( pPrevStNd, "Start-Node ist NULL" ); pCSS1Parser->SetTDTagStyles(); - SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TABLE ); + SwTextFormatColl *pColl = pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TABLE ); const SwStartNode *pStNd; if (pTable->bFirstCell ) { SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode(); - pNd->GetTxtNode()->ChgFmtColl( pColl ); + pNd->GetTextNode()->ChgFormatColl( pColl ); pStNd = pNd->FindTableBoxStartNode(); pTable->bFirstCell = false; } @@ -2811,7 +2811,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection } //Added defaults to CJK and CTL - SwCntntNode *pCNd = pDoc->GetNodes()[pStNd->GetIndex()+1] ->GetCntntNode(); + SwContentNode *pCNd = pDoc->GetNodes()[pStNd->GetIndex()+1] ->GetContentNode(); SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE ); pCNd->SetAttr( aFontHeight ); SvxFontHeightItem aFontHeightCJK( 40, 100, RES_CHRATR_CJK_FONTSIZE ); @@ -2834,35 +2834,35 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) break; } - SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( nPoolId ); + SwTextFormatColl *pColl = pCSS1Parser->GetTextCollFromPool( nPoolId ); SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode(); const SwStartNode *pStNd; if (pTable->bFirstCell) { - pNd->GetTxtNode()->ChgFmtColl( pColl ); + pNd->GetTextNode()->ChgFormatColl( pColl ); pTable->bFirstCell = false; pStNd = pNd->FindTableBoxStartNode(); } else { - SwTableNode *pTblNd = pNd->FindTableNode(); - if( pTblNd->GetTable().GetHTMLTableLayout() ) + SwTableNode *pTableNd = pNd->FindTableNode(); + if( pTableNd->GetTable().GetHTMLTableLayout() ) { // if there is already a HTMTableLayout, this table is already finished // and we have to look for the right table in the environment - SwTableNode *pOutTbl = pTblNd; + SwTableNode *pOutTable = pTableNd; do { - pTblNd = pOutTbl; - pOutTbl = pOutTbl->StartOfSectionNode()->FindTableNode(); - } while( pOutTbl && pTblNd->GetTable().GetHTMLTableLayout() ); + pTableNd = pOutTable; + pOutTable = pOutTable->StartOfSectionNode()->FindTableNode(); + } while( pOutTable && pTableNd->GetTable().GetHTMLTableLayout() ); } - SwNodeIndex aIdx( *pTblNd->EndOfSectionNode() ); + SwNodeIndex aIdx( *pTableNd->EndOfSectionNode() ); pStNd = pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode, pColl ); pPam->GetPoint()->nNode = pStNd->GetIndex() + 1; - SwTxtNode *pTxtNd = pPam->GetPoint()->nNode.GetNode().GetTxtNode(); - pPam->GetPoint()->nContent.Assign( pTxtNd, 0 ); + SwTextNode *pTextNd = pPam->GetPoint()->nNode.GetNode().GetTextNode(); + pPam->GetPoint()->nContent.Assign( pTextNd, 0 ); pTable->IncBoxCount(); } @@ -2871,14 +2871,14 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) SwStartNode *SwHTMLParser::InsertTempTableCaptionSection() { - SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TEXT ); + SwTextFormatColl *pColl = pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_TEXT ); SwNodeIndex& rIdx = pPam->GetPoint()->nNode; rIdx = pDoc->GetNodes().GetEndOfExtras(); SwStartNode *pStNd = pDoc->GetNodes().MakeTextSection( rIdx, SwNormalStartNode, pColl ); rIdx = pStNd->GetIndex() + 1; - pPam->GetPoint()->nContent.Assign( rIdx.GetNode().GetTxtNode(), 0 ); + pPam->GetPoint()->nContent.Assign( rIdx.GetNode().GetTextNode(), 0 ); return pStNd; } @@ -2890,13 +2890,13 @@ sal_Int32 SwHTMLParser::StripTrailingLF() const sal_Int32 nLen = pPam->GetPoint()->nContent.GetIndex(); if( nLen ) { - SwTxtNode* pTxtNd = pPam->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode* pTextNd = pPam->GetPoint()->nNode.GetNode().GetTextNode(); // vorsicht, wenn Kommentare nicht uebrlesen werden!!! - if( pTxtNd ) + if( pTextNd ) { sal_Int32 nPos = nLen; sal_Int32 nLFCount = 0; - while (nPos && ('\x0a' == pTxtNd->GetTxt()[--nPos])) + while (nPos && ('\x0a' == pTextNd->GetText()[--nPos])) nLFCount++; if( nLFCount ) @@ -2916,8 +2916,8 @@ sal_Int32 SwHTMLParser::StripTrailingLF() } nPos = nLen - nLFCount; - SwIndex nIdx( pTxtNd, nPos ); - pTxtNd->EraseText( nIdx, nLFCount ); + SwIndex nIdx( pTextNd, nPos ); + pTextNd->EraseText( nIdx, nLFCount ); nStripped = nLFCount; } } @@ -3073,17 +3073,17 @@ class _CellSaveStruct : public _SectionSaveStruct double nValue; - sal_uInt32 nNumFmt; + sal_uInt32 nNumFormat; sal_uInt16 nRowSpan, nColSpan, nWidth, nHeight; - sal_Int32 nNoBreakEndCntntPos; // Zeichen-Index eines </NOBR> + sal_Int32 nNoBreakEndContentPos; // Zeichen-Index eines </NOBR> SvxAdjust eAdjust; sal_Int16 eVertOri; bool bHead : 1; bool bPrcWidth : 1; - bool bHasNumFmt : 1; + bool bHasNumFormat : 1; bool bHasValue : 1; bool bBGColor : 1; bool bNoWrap : 1; // NOWRAP-Option @@ -3118,23 +3118,23 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, pCurrCnts( 0 ), pNoBreakEndParaIdx( 0 ), nValue( 0.0 ), - nNumFmt( 0 ), + nNumFormat( 0 ), nRowSpan( 1 ), nColSpan( 1 ), nWidth( 0 ), nHeight( 0 ), - nNoBreakEndCntntPos( 0 ), + nNoBreakEndContentPos( 0 ), eAdjust( pCurTable->GetInheritedAdjust() ), eVertOri( pCurTable->GetInheritedVertOri() ), bHead( bHd ), bPrcWidth( false ), - bHasNumFmt( false ), + bHasNumFormat( false ), bHasValue( false ), bBGColor( false ), bNoWrap( false ), bNoBreak( false ) { - OUString aNumFmt, aValue; + OUString aNumFormat, aValue; if( bReadOpt ) { @@ -3159,7 +3159,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, break; case HTML_O_VALIGN: eVertOri = rOption.GetEnum( - aHTMLTblVAlignTable, eVertOri ); + aHTMLTableVAlignTable, eVertOri ); break; case HTML_O_WIDTH: nWidth = (sal_uInt16)rOption.GetNumber(); // nur fuer Netscape @@ -3197,8 +3197,8 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, aDir = rOption.GetString(); break; case HTML_O_SDNUM: - aNumFmt = rOption.GetString(); - bHasNumFmt = true; + aNumFormat = rOption.GetString(); + bHasNumFormat = true; break; case HTML_O_SDVAL: bHasValue = true; @@ -3214,11 +3214,11 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, rParser.InsertBookmark( aId ); } - if( bHasNumFmt ) + if( bHasNumFormat ) { LanguageType eLang; nValue = SfxHTMLParser::GetTableDataOptionsValNum( - nNumFmt, eLang, aValue, aNumFmt, + nNumFormat, eLang, aValue, aNumFormat, *rParser.pDoc->GetNumberFormatter() ); } @@ -3252,7 +3252,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, { SfxPoolItem const* pItem; if (SfxItemState::SET == aItemSet.GetItemState(RES_BOX, false, &pItem)) - { // fdo#41796: steal box item to set it in FixFrameFmt later! + { // fdo#41796: steal box item to set it in FixFrameFormat later! m_pBoxItem.reset(dynamic_cast<SvxBoxItem *>(pItem->Clone())); aItemSet.ClearItem(RES_BOX); } @@ -3301,12 +3301,12 @@ void _CellSaveStruct::InsertCell( SwHTMLParser& rParser, if( rParser.nContextStAttrMin == GetContextStAttrMin() ) { - _HTMLAttr** pTbl = reinterpret_cast<_HTMLAttr**>(&rParser.aAttrTab); + _HTMLAttr** pTable = reinterpret_cast<_HTMLAttr**>(&rParser.aAttrTab); for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* ); - nCnt--; ++pTbl ) + nCnt--; ++pTable ) { - OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer" ); + OSL_ENSURE( !*pTable, "Die Attribut-Tabelle ist nicht leer" ); } } #endif @@ -3317,7 +3317,7 @@ void _CellSaveStruct::InsertCell( SwHTMLParser& rParser, aStyle, aId, aClass ); pCurTable->InsertCell( pCnts, nRowSpan, nColSpan, nWidth, bPrcWidth, nHeight, eVertOri, pBrushItem, m_pBoxItem, - bHasNumFmt, nNumFmt, bHasValue, nValue, + bHasNumFormat, nNumFormat, bHasValue, nValue, bNoWrap ); Restore( rParser ); } @@ -3340,7 +3340,7 @@ void _CellSaveStruct::EndNoBreak( const SwPosition& rPos ) { delete pNoBreakEndParaIdx; pNoBreakEndParaIdx = new SwNodeIndex( rPos.nNode ); - nNoBreakEndCntntPos = rPos.nContent.GetIndex(); + nNoBreakEndContentPos = rPos.nContent.GetIndex(); bNoBreak = false; } } @@ -3357,18 +3357,18 @@ void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc * /*pDoc*/ ) else if( pNoBreakEndParaIdx && pNoBreakEndParaIdx->GetIndex() == rPos.nNode.GetIndex() ) { - if( nNoBreakEndCntntPos == rPos.nContent.GetIndex() ) + if( nNoBreakEndContentPos == rPos.nContent.GetIndex() ) { // <NOBR> wurde unmittelbar vor dem Zellen-Ende beendet pCnts->SetNoBreak(); } - else if( nNoBreakEndCntntPos + 1 == rPos.nContent.GetIndex() ) + else if( nNoBreakEndContentPos + 1 == rPos.nContent.GetIndex() ) { - SwTxtNode const*const pTxtNd(rPos.nNode.GetNode().GetTxtNode()); - if( pTxtNd ) + SwTextNode const*const pTextNd(rPos.nNode.GetNode().GetTextNode()); + if( pTextNd ) { sal_Unicode const cLast = - pTxtNd->GetTxt()[nNoBreakEndCntntPos]; + pTextNd->GetText()[nNoBreakEndContentPos]; if( ' '==cLast || '\x0a'==cLast ) { // Zwischem dem </NOBR> und dem Zellen-Ende gibt es nur @@ -3410,8 +3410,8 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents( OSL_ENSURE( !pAttr->GetPrev(), "Attribut hat Previous-Liste" ); pAttr->nSttPara = rSttPara; pAttr->nEndPara = rSttPara; - pAttr->nSttCntnt = nSttCnt; - pAttr->nEndCntnt = nSttCnt; + pAttr->nSttContent = nSttCnt; + pAttr->nEndContent = nSttCnt; pAttr = pAttr->GetNext(); } @@ -3502,7 +3502,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, RES_PARATR_SPLIT, false, &pItem ) ) { aItemSet.Put( - SwFmtLayoutSplit( static_cast<const SvxFmtSplitItem *>(pItem) + SwFormatLayoutSplit( static_cast<const SvxFormatSplitItem *>(pItem) ->GetValue() ) ); aItemSet.ClearItem( RES_PARATR_SPLIT ); } @@ -3521,13 +3521,13 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, bool bParentLFStripped = false; if( bTopTable ) { - SvxAdjust eTblAdjust = pTable->GetTableAdjust(false); + SvxAdjust eTableAdjust = pTable->GetTableAdjust(false); // Wenn die Tabelle links oder rechts ausgerivchtet ist, // oder in einen Rahmen soll, dann kommt sie auch in einen // solchen. - bForceFrame = eTblAdjust == SVX_ADJUST_LEFT || - eTblAdjust == SVX_ADJUST_RIGHT || + bForceFrame = eTableAdjust == SVX_ADJUST_LEFT || + eTableAdjust == SVX_ADJUST_RIGHT || pCurTable->HasToFly(); // Entweder kommt die Tabelle in keinen Rahmen und befindet @@ -3559,8 +3559,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, if( !pPam->GetPoint()->nContent.GetIndex() ) { //Set default to CJK and CTL - pDoc->SetTxtFmtColl( *pPam, - pCSS1Parser->GetTxtCollFromPool(RES_POOLCOLL_STANDARD) ); + pDoc->SetTextFormatColl( *pPam, + pCSS1Parser->GetTextCollFromPool(RES_POOLCOLL_STANDARD) ); SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE ); _HTMLAttr* pTmp = @@ -3583,7 +3583,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, // vom Tabellenende vorher // was gesetzt sein kann. } - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); bAppended = true; } else if( !aParaAttrs.empty() ) @@ -3665,7 +3665,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !pCurTable->IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); SwSurround eSurround = SURROUND_NONE; sal_Int16 eHori; @@ -3688,9 +3688,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, } SetAnchorAndAdjustment( text::VertOrientation::NONE, eHori, aFrmSet, true ); - aFrmSet.Put( SwFmtSurround(eSurround) ); + aFrmSet.Put( SwFormatSurround(eSurround) ); - SwFmtFrmSize aFrmSize( ATT_VAR_SIZE, 20*MM50, MINLAY ); + SwFormatFrmSize aFrmSize( ATT_VAR_SIZE, 20*MM50, MINLAY ); aFrmSize.SetWidthPercent( 100 ); aFrmSet.Put( aFrmSize ); @@ -3701,16 +3701,16 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, if( nSpace ) aFrmSet.Put( SvxULSpaceItem(nSpace,nSpace, RES_UL_SPACE) ); - RndStdIds eAnchorId = static_cast<const SwFmtAnchor&>(aFrmSet. + RndStdIds eAnchorId = static_cast<const SwFormatAnchor&>(aFrmSet. Get( RES_ANCHOR )). GetAnchorId(); - SwFrmFmt *pFrmFmt = pDoc->MakeFlySection( + SwFrameFormat *pFrameFormat = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(), &aFrmSet ); - pTCntxt->SetFrmFmt( pFrmFmt ); - const SwFmtCntnt& rFlyCntnt = pFrmFmt->GetCntnt(); - pPam->GetPoint()->nNode = *rFlyCntnt.GetCntntIdx(); - SwCntntNode *pCNd = + pTCntxt->SetFrameFormat( pFrameFormat ); + const SwFormatContent& rFlyContent = pFrameFormat->GetContent(); + pPam->GetPoint()->nNode = *rFlyContent.GetContentIdx(); + SwContentNode *pCNd = pDoc->GetNodes().GoNext( &(pPam->GetPoint()->nNode) ); pPam->GetPoint()->nContent.Assign( pCNd, 0 ); @@ -3736,8 +3736,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, { if( bStyleParsed ) { - pCSS1Parser->SetFmtBreak( aItemSet, aPropInfo ); - pSwTable->GetFrmFmt()->SetFmtAttr( aItemSet ); + pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo ); + pSwTable->GetFrameFormat()->SetFormatAttr( aItemSet ); } pPam->Move( fnMoveBackward ); } @@ -3745,29 +3745,29 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, SwNode const*const pNd = & pPam->GetPoint()->nNode.GetNode(); if( !bAppended && !bForceFrame ) { - SwTxtNode *const pOldTxtNd = - pSavePos->nNode.GetNode().GetTxtNode(); - OSL_ENSURE( pOldTxtNd, "Wieso stehen wir in keinem Txt-Node?" ); - SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt(); + SwTextNode *const pOldTextNd = + pSavePos->nNode.GetNode().GetTextNode(); + OSL_ENSURE( pOldTextNd, "Wieso stehen wir in keinem Text-Node?" ); + SwFrameFormat *pFrameFormat = pSwTable->GetFrameFormat(); const SfxPoolItem* pItem2; - if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet() + if( SfxItemState::SET == pOldTextNd->GetSwAttrSet() .GetItemState( RES_PAGEDESC, false, &pItem2 ) && - static_cast<const SwFmtPageDesc *>(pItem2)->GetPageDesc() ) + static_cast<const SwFormatPageDesc *>(pItem2)->GetPageDesc() ) { - pFrmFmt->SetFmtAttr( *pItem2 ); - pOldTxtNd->ResetAttr( RES_PAGEDESC ); + pFrameFormat->SetFormatAttr( *pItem2 ); + pOldTextNd->ResetAttr( RES_PAGEDESC ); } - if( SfxItemState::SET == pOldTxtNd->GetSwAttrSet() + if( SfxItemState::SET == pOldTextNd->GetSwAttrSet() .GetItemState( RES_BREAK, true, &pItem2 ) ) { - switch( static_cast<const SvxFmtBreakItem *>(pItem2)->GetBreak() ) + switch( static_cast<const SvxFormatBreakItem *>(pItem2)->GetBreak() ) { case SVX_BREAK_PAGE_BEFORE: case SVX_BREAK_PAGE_AFTER: case SVX_BREAK_PAGE_BOTH: - pFrmFmt->SetFmtAttr( *pItem2 ); - pOldTxtNd->ResetAttr( RES_BREAK ); + pFrameFormat->SetFormatAttr( *pItem2 ); + pOldTextNd->ResetAttr( RES_BREAK ); default: ; } @@ -3957,7 +3957,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, if( pSubTable->GetContext() ) { - OSL_ENSURE( !pSubTable->GetContext()->GetFrmFmt(), + OSL_ENSURE( !pSubTable->GetContext()->GetFrameFormat(), "Tabelle steht im Rahmen" ); if( pCapStNd && pSubTable->IsTopCaption() ) @@ -4076,7 +4076,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, ? RES_POOLCOLL_TABLE_HDLN : RES_POOLCOLL_TABLE )); const SwEndNode *pEndNd = pStNd->EndOfSectionNode(); - SwCntntNode *pCNd = pDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetCntntNode(); + SwContentNode *pCNd = pDoc->GetNodes()[pEndNd->GetIndex()-1] ->GetContentNode(); //Added defaults to CJK and CTL SvxFontHeightItem aFontHeight( 40, 100, RES_CHRATR_FONTSIZE ); pCNd->SetAttr( aFontHeight ); @@ -4198,7 +4198,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, bool bReadOptions, break; case HTML_O_VALIGN: eVertOri = rOption.GetEnum( - aHTMLTblVAlignTable, eVertOri ); + aHTMLTableVAlignTable, eVertOri ); break; case HTML_O_BGCOLOR: // Leere BGCOLOR bei <TABLE>, <TR> und <TD>/<TH> wie Netsc. @@ -4399,7 +4399,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable, break; case HTML_O_VALIGN: pSaveStruct->eVertOri = - rOption.GetEnum( aHTMLTblVAlignTable, + rOption.GetEnum( aHTMLTableVAlignTable, pSaveStruct->eVertOri ); break; } @@ -4515,7 +4515,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable, // now we stand (perhaps) in front of <TBODY>,... or </TABLE> } -struct _TblColGrpSaveStruct : public SwPendingStackData +struct _TableColGrpSaveStruct : public SwPendingStackData { sal_uInt16 nColGrpSpan; sal_uInt16 nColGrpWidth; @@ -4523,18 +4523,18 @@ struct _TblColGrpSaveStruct : public SwPendingStackData SvxAdjust eColGrpAdjust; sal_Int16 eColGrpVertOri; - inline _TblColGrpSaveStruct(); + inline _TableColGrpSaveStruct(); inline void CloseColGroup( HTMLTable *pTable ); }; -inline _TblColGrpSaveStruct::_TblColGrpSaveStruct() : +inline _TableColGrpSaveStruct::_TableColGrpSaveStruct() : nColGrpSpan( 1 ), nColGrpWidth( 0 ), bRelColGrpWidth( false ), eColGrpAdjust( SVX_ADJUST_END ), eColGrpVertOri( text::VertOrientation::TOP ) {} -inline void _TblColGrpSaveStruct::CloseColGroup( HTMLTable *pTable ) +inline void _TableColGrpSaveStruct::CloseColGroup( HTMLTable *pTable ) { pTable->CloseColGroup( nColGrpSpan, nColGrpWidth, bRelColGrpWidth, eColGrpAdjust, eColGrpVertOri ); @@ -4550,11 +4550,11 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, int nToken = 0; bool bPending = false; - _TblColGrpSaveStruct* pSaveStruct; + _TableColGrpSaveStruct* pSaveStruct; if( pPendStack ) { - pSaveStruct = static_cast<_TblColGrpSaveStruct*>(pPendStack->pData); + pSaveStruct = static_cast<_TableColGrpSaveStruct*>(pPendStack->pData); SwPendingStack* pTmp = pPendStack->pNext; delete pPendStack; @@ -4567,7 +4567,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, else { - pSaveStruct = new _TblColGrpSaveStruct; + pSaveStruct = new _TableColGrpSaveStruct; if( bReadOptions ) { const HTMLOptions& rColGrpOptions = GetOptions(); @@ -4594,7 +4594,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, break; case HTML_O_VALIGN: pSaveStruct->eColGrpVertOri = - rOption.GetEnum( aHTMLTblVAlignTable, + rOption.GetEnum( aHTMLTableVAlignTable, pSaveStruct->eColGrpVertOri ); break; } @@ -4678,7 +4678,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, break; case HTML_O_VALIGN: eColVertOri = - rOption.GetEnum( aHTMLTblVAlignTable, + rOption.GetEnum( aHTMLTableVAlignTable, eColVertOri ); break; } @@ -4932,7 +4932,7 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable ) // Deshalb muss sich am Ende der Section immer ein leerer // Absatz befinden. if( pPam->GetPoint()->nContent.GetIndex() || bLFStripped ) - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); } else { @@ -4958,16 +4958,16 @@ void SwHTMLParser::BuildTableCaption( HTMLTable *pCurTable ) delete pSaveStruct; } -class _TblSaveStruct : public SwPendingStackData +class _TableSaveStruct : public SwPendingStackData { public: HTMLTable *m_pCurrentTable; - _TblSaveStruct( HTMLTable *pCurTbl ) : - m_pCurrentTable( pCurTbl ) + _TableSaveStruct( HTMLTable *pCurTable ) : + m_pCurrentTable( pCurTable ) {} - virtual ~_TblSaveStruct(); + virtual ~_TableSaveStruct(); // Aufbau der Tabelle anstossen und die Tabelle ggf. in einen // Rahmen packen. Wenn true zurueckgegeben wird muss noch ein @@ -4975,37 +4975,37 @@ public: void MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc ); }; -_TblSaveStruct::~_TblSaveStruct() +_TableSaveStruct::~_TableSaveStruct() {} -void _TblSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc ) +void _TableSaveStruct::MakeTable( sal_uInt16 nWidth, SwPosition& rPos, SwDoc *pDoc ) { m_pCurrentTable->MakeTable(0, nWidth); _HTMLTableContext *pTCntxt = m_pCurrentTable->GetContext(); OSL_ENSURE( pTCntxt, "Wo ist der Tabellen-Kontext" ); - SwTableNode *pTblNd = pTCntxt->GetTableNode(); - OSL_ENSURE( pTblNd, "Wo ist der Tabellen-Node" ); + SwTableNode *pTableNd = pTCntxt->GetTableNode(); + OSL_ENSURE( pTableNd, "Wo ist der Tabellen-Node" ); - if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && pTblNd ) + if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() && pTableNd ) { // Existiert schon ein Layout, dann muss an dieser Tabelle die // BoxFrames neu erzeugt werden. - if( pTCntxt->GetFrmFmt() ) + if( pTCntxt->GetFrameFormat() ) { - pTCntxt->GetFrmFmt()->DelFrms(); - pTblNd->DelFrms(); - pTCntxt->GetFrmFmt()->MakeFrms(); + pTCntxt->GetFrameFormat()->DelFrms(); + pTableNd->DelFrms(); + pTCntxt->GetFrameFormat()->MakeFrms(); } else { - pTblNd->DelFrms(); - SwNodeIndex aIdx( *pTblNd->EndOfSectionNode(), 1 ); + pTableNd->DelFrms(); + SwNodeIndex aIdx( *pTableNd->EndOfSectionNode(), 1 ); OSL_ENSURE( aIdx.GetIndex() <= pTCntxt->GetPos()->nNode.GetIndex(), "unerwarteter Node fuer das Tabellen-Layout" ); - pTblNd->MakeFrms( &aIdx ); + pTableNd->MakeFrms( &aIdx ); } } @@ -5068,7 +5068,7 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions, } break; case HTML_O_VALIGN: - eVertOri = rOption.GetEnum( aHTMLTblVAlignTable, eVertOri ); + eVertOri = rOption.GetEnum( aHTMLTableVAlignTable, eVertOri ); break; case HTML_O_BORDER: // BORDER und BORDER=BORDER wie BORDER=1 behandeln @@ -5157,11 +5157,11 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, int nToken = 0; bool bPending = false; - _TblSaveStruct* pSaveStruct; + _TableSaveStruct* pSaveStruct; if( pPendStack ) { - pSaveStruct = static_cast<_TblSaveStruct*>(pPendStack->pData); + pSaveStruct = static_cast<_TableSaveStruct*>(pPendStack->pData); SwPendingStack* pTmp = pPendStack->pNext; delete pPendStack; @@ -5174,23 +5174,23 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, else { pTable = 0; - HTMLTableOptions *pTblOptions = + HTMLTableOptions *pTableOptions = new HTMLTableOptions( GetOptions(), eParentAdjust ); - if( !pTblOptions->aId.isEmpty() ) - InsertBookmark( pTblOptions->aId ); + if( !pTableOptions->aId.isEmpty() ) + InsertBookmark( pTableOptions->aId ); HTMLTable *pCurTable = new HTMLTable( this, pTable, bIsParentHead, bHasParentSection, bHasToFly, - pTblOptions ); + pTableOptions ); if( !pTable ) pTable = pCurTable; - pSaveStruct = new _TblSaveStruct( pCurTable ); + pSaveStruct = new _TableSaveStruct( pCurTable ); - delete pTblOptions; + delete pTableOptions; // ist beim ersten GetNextToken schon pending, muss bei // wiederaufsetzen auf jedenfall neu gelesen werden! @@ -5334,17 +5334,17 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, *pCapStNd->EndOfSectionNode(), -1 ); bool bTop = pTable->IsTopCaption(); - SwStartNode *pTblStNd = pTCntxt->GetTableNode(); + SwStartNode *pTableStNd = pTCntxt->GetTableNode(); - OSL_ENSURE( pTblStNd, "Wo ist der Tabellen-Node" ); - OSL_ENSURE( pTblStNd==pPam->GetNode().FindTableNode(), + OSL_ENSURE( pTableStNd, "Wo ist der Tabellen-Node" ); + OSL_ENSURE( pTableStNd==pPam->GetNode().FindTableNode(), "Stehen wir in der falschen Tabelle?" ); SwNode* pNd; if( bTop ) - pNd = pTblStNd; + pNd = pTableStNd; else - pNd = pTblStNd->EndOfSectionNode(); + pNd = pTableStNd->EndOfSectionNode(); SwNodeIndex aDstIdx( *pNd, bTop ? 0 : 1 ); pDoc->getIDocumentContentOperations().MoveNodeRange( aSrcRg, aDstIdx, @@ -5357,7 +5357,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, // Tabellen-Node zeigen noch verschoben werden. if( bTop ) { - MovePageDescAttrs( pTblStNd, aSrcRg.aStart.GetIndex(), + MovePageDescAttrs( pTableStNd, aSrcRg.aStart.GetIndex(), false ); } } @@ -5382,14 +5382,14 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, { // oberen Absatz-Abstand einstellen bUpperSpace = true; - SetTxtCollAttrs(); + SetTextCollAttrs(); nParaCnt = nParaCnt - std::min(nParaCnt, pTCntxt->GetTableNode()->GetTable().GetTabSortBoxes().size()); // ggfs. eine Tabelle anspringen if( JUMPTO_TABLE == eJumpTo && pTable->GetSwTable() && - pTable->GetSwTable()->GetFrmFmt()->GetName() == sJmpMark ) + pTable->GetSwTable()->GetFrameFormat()->GetName() == sJmpMark ) { bChkJumpMark = true; eJumpTo = JUMPTO_NONE; @@ -5427,10 +5427,10 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, pTable = 0; } - HTMLTable* pRetTbl = pSaveStruct->m_pCurrentTable; + HTMLTable* pRetTable = pSaveStruct->m_pCurrentTable; delete pSaveStruct; - return pRetTbl; + return pRetTable; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 8e5bda56276c..9b1158257ffe 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -89,7 +89,7 @@ public: SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo ); void Write( SwHTMLWriter& rWrt, sal_Int16 eAlign=text::HoriOrientation::NONE, - bool bTHead=false, const SwFrmFmt *pFrmFmt=0, + bool bTHead=false, const SwFrameFormat *pFrameFormat=0, const OUString *pCaption=0, bool bTopCaption=false, sal_uInt16 nHSpace=0, sal_uInt16 nVSpace=0 ) const; }; @@ -141,7 +141,7 @@ bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox, if( rBox.GetSttNd() ) { SvxBrushItem aBrushItem = - rBox.GetFrmFmt()->makeBackgroundBrushItem(); + rBox.GetFrameFormat()->makeBackgroundBrushItem(); /// The table box has a background, if its background color is not "no fill"/ /// "auto fill" or it has a background graphic. @@ -171,7 +171,7 @@ bool SwHTMLWrtTable::HasTabBackground( const SwTableLine& rLine, OSL_ENSURE( bTop || bBottom || bLeft || bRight, "HasTabBackground: darf nicht aufgerufen werden" ); - SvxBrushItem aBrushItem = rLine.GetFrmFmt()->makeBackgroundBrushItem(); + SvxBrushItem aBrushItem = rLine.GetFrameFormat()->makeBackgroundBrushItem(); /// The table line has a background, if its background color is not "no fill"/ /// "auto fill" or it has a background graphic. bool bRet = aBrushItem.GetColor() != COL_TRANSPARENT || @@ -213,7 +213,7 @@ static bool lcl_TableBox_HasTabBorders( const SwTableBox* pBox, bool *pBorders ) else { const SvxBoxItem& rBoxItem = - static_cast<const SvxBoxItem&>(pBox->GetFrmFmt()->GetFmtAttr( RES_BOX )); + static_cast<const SvxBoxItem&>(pBox->GetFrameFormat()->GetFormatAttr( RES_BOX )); *pBorders = rBoxItem.GetTop() || rBoxItem.GetBottom() || rBoxItem.GetLeft() || rBoxItem.GetRight(); @@ -282,22 +282,22 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, SwNode* pNd; while( !( pNd = rWrt.pDoc->GetNodes()[nNdPos])->IsEndNode() ) { - if( pNd->IsTxtNode() ) + if( pNd->IsTextNode() ) { // nur Absaetzte betrachten, an denen man was erkennt // Das ist der Fall, wenn die Vorlage eine der Tabellen-Vorlagen // ist oder von einer der beiden abgelitten ist. - const SwFmt *pFmt = &static_cast<SwTxtNode*>(pNd)->GetAnyFmtColl(); - sal_uInt16 nPoolId = pFmt->GetPoolFmtId(); - while( !pFmt->IsDefault() && + const SwFormat *pFormat = &static_cast<SwTextNode*>(pNd)->GetAnyFormatColl(); + sal_uInt16 nPoolId = pFormat->GetPoolFormatId(); + while( !pFormat->IsDefault() && RES_POOLCOLL_TABLE_HDLN!=nPoolId && RES_POOLCOLL_TABLE!=nPoolId ) { - pFmt = pFmt->DerivedFrom(); - nPoolId = pFmt->GetPoolFmtId(); + pFormat = pFormat->DerivedFrom(); + nPoolId = pFormat->GetPoolFormatId(); } - if( !pFmt->IsDefault() ) + if( !pFormat->IsDefault() ) { bHead = (RES_POOLCOLL_TABLE_HDLN==nPoolId); break; @@ -391,7 +391,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, .append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\""); } - const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet(); + const SfxItemSet& rItemSet = pBox->GetFrameFormat()->GetAttrSet(); const SfxPoolItem *pItem; // ALIGN wird jetzt nur noch an den Absaetzen ausgegeben @@ -412,7 +412,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); - rWrt.bTxtAttr = false; + rWrt.bTextAttr = false; rWrt.bOutOpts = true; const SvxBrushItem *pBrushItem = 0; if( SfxItemState::SET==rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) @@ -431,28 +431,28 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem ); } - rWrt.OutCSS1_TableCellBorderHack(*pBox->GetFrmFmt()); + rWrt.OutCSS1_TableCellBorderHack(*pBox->GetFrameFormat()); - sal_uInt32 nNumFmt = 0; + sal_uInt32 nNumFormat = 0; double nValue = 0.0; - bool bNumFmt = false, bValue = false; + bool bNumFormat = false, bValue = false; if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { - nNumFmt = static_cast<const SwTblBoxNumFormat *>(pItem)->GetValue(); - bNumFmt = true; + nNumFormat = static_cast<const SwTableBoxNumFormat *>(pItem)->GetValue(); + bNumFormat = true; } if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) ) { - nValue = static_cast<const SwTblBoxValue *>(pItem)->GetValue(); + nValue = static_cast<const SwTableBoxValue *>(pItem)->GetValue(); bValue = true; - if( !bNumFmt ) - nNumFmt = pBox->GetFrmFmt()->GetTblBoxNumFmt().GetValue(); + if( !bNumFormat ) + nNumFormat = pBox->GetFrameFormat()->GetTableBoxNumFormat().GetValue(); } - if( bNumFmt || bValue ) + if( bNumFormat || bValue ) { sOut.append(HTMLOutFuncs::CreateTableDataOptionsValNum(bValue, nValue, - nNumFmt, *rWrt.pDoc->GetNumberFormatter(), rWrt.eDestEnc, + nNumFormat, *rWrt.pDoc->GetNumberFormatter(), rWrt.eDestEnc, &rWrt.aNonConvertableCharacters)); } sOut.append('>'); @@ -534,7 +534,7 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt, { rWrt.OutBackground( pBrushItem, false ); - rWrt.bTxtAttr = false; + rWrt.bTextAttr = false; rWrt.bOutOpts = true; if( rWrt.bCfgOutStyles ) OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem ); @@ -563,7 +563,7 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt, } void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, - bool bTHead, const SwFrmFmt *pFrmFmt, + bool bTHead, const SwFrameFormat *pFrameFormat, const OUString *pCaption, bool bTopCaption, sal_uInt16 nHSpace, sal_uInt16 nVSpace ) const { @@ -628,8 +628,8 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_table); sal_uInt16 nOldDirection = rWrt.nDirection; - if( pFrmFmt ) - rWrt.nDirection = rWrt.GetHTMLDirection( pFrmFmt->GetAttrSet() ); + if( pFrameFormat ) + rWrt.nDirection = rWrt.GetHTMLDirection( pFrameFormat->GetAttrSet() ); if( rWrt.bOutFlyFrame || nOldDirection != rWrt.nDirection ) { rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); @@ -711,12 +711,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); // Hintergrund ausgeben - if( pFrmFmt ) + if( pFrameFormat ) { - rWrt.OutBackground( pFrmFmt->GetAttrSet(), false ); + rWrt.OutBackground( pFrameFormat->GetAttrSet(), false ); - if( rWrt.bCfgOutStyles && pFrmFmt ) - rWrt.OutCSS1_TableFrmFmtOptions( *pFrmFmt ); + if( rWrt.bCfgOutStyles && pFrameFormat ) + rWrt.OutCSS1_TableFrameFormatOptions( *pFrameFormat ); } sOut.append('>'); @@ -884,12 +884,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, rWrt.nDirection = nOldDirection; } -Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, - const SwFrmFmt *pFlyFrmFmt, +Writer& OutHTML_SwTableNode( Writer& rWrt, SwTableNode & rNode, + const SwFrameFormat *pFlyFrameFormat, const OUString *pCaption, bool bTopCaption ) { - SwTable& rTbl = rNode.GetTable(); + SwTable& rTable = rNode.GetTable(); SwHTMLWriter & rHTMLWrt = static_cast<SwHTMLWriter&>(rWrt); rHTMLWrt.bOutTable = true; @@ -903,21 +903,21 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, long nFlyWidth = 0; sal_uInt16 nFlyHSpace = 0; sal_uInt16 nFlyVSpace = 0; - if( pFlyFrmFmt ) + if( pFlyFrameFormat ) { - eSurround = pFlyFrmFmt->GetSurround().GetSurround(); - const SwFmtFrmSize& rFrmSize = pFlyFrmFmt->GetFrmSize(); + eSurround = pFlyFrameFormat->GetSurround().GetSurround(); + const SwFormatFrmSize& rFrmSize = pFlyFrameFormat->GetFrmSize(); nFlyPrcWidth = rFrmSize.GetWidthPercent(); nFlyWidth = rFrmSize.GetSize().Width(); - eFlyHoriOri = pFlyFrmFmt->GetHoriOrient().GetHoriOrient(); + eFlyHoriOri = pFlyFrameFormat->GetHoriOrient().GetHoriOrient(); if( text::HoriOrientation::NONE == eFlyHoriOri ) eFlyHoriOri = text::HoriOrientation::LEFT; - const SvxLRSpaceItem& rLRSpace = pFlyFrmFmt->GetLRSpace(); + const SvxLRSpaceItem& rLRSpace = pFlyFrameFormat->GetLRSpace(); nFlyHSpace = static_cast< sal_uInt16 >((rLRSpace.GetLeft() + rLRSpace.GetRight()) / 2); - const SvxULSpaceItem& rULSpace = pFlyFrmFmt->GetULSpace(); + const SvxULSpaceItem& rULSpace = pFlyFrameFormat->GetULSpace(); nFlyVSpace = (rULSpace.GetUpper() + rULSpace.GetLower()) / 2; } @@ -930,14 +930,14 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, rHTMLWrt.bPreserveForm = bPreserveForm; } - SwFrmFmt *pFmt = rTbl.GetFrmFmt(); + SwFrameFormat *pFormat = rTable.GetFrameFormat(); - const SwFmtFrmSize& rFrmSize = pFmt->GetFrmSize(); + const SwFormatFrmSize& rFrmSize = pFormat->GetFrmSize(); long nWidth = rFrmSize.GetSize().Width(); sal_uInt8 nPrcWidth = rFrmSize.GetWidthPercent(); sal_uInt16 nBaseWidth = (sal_uInt16)nWidth; - sal_Int16 eTabHoriOri = pFmt->GetHoriOrient().GetHoriOrient(); + sal_Int16 eTabHoriOri = pFormat->GetHoriOrient().GetHoriOrient(); // text::HoriOrientation::NONE und text::HoriOrientation::FULL Tabellen benoetigen relative Breiten sal_uInt16 nNewDefListLvl = 0; @@ -954,7 +954,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, break; case text::HoriOrientation::NONE: { - const SvxLRSpaceItem& aLRItem = pFmt->GetLRSpace(); + const SvxLRSpaceItem& aLRItem = pFormat->GetLRSpace(); if( aLRItem.GetRight() ) { // Die Tabellenbreite wird anhand des linken und rechten @@ -962,7 +962,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, // tatsaechliche Breite der Tabelle zu bestimmen. Wenn // das nicht geht, machen wir eine 100% breite Tabelle // draus. - nWidth = pFmt->FindLayoutRect(true).Width(); + nWidth = pFormat->FindLayoutRect(true).Width(); if( !nWidth ) { bRelWidths = true; @@ -981,7 +981,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, // Ohne rechten Rand bleibt auch eine absolute Breite erhalten // Wir versuchen aber trotzdem ueber das Layout die // tatsachliche Breite zu ermitteln. - long nRealWidth = pFmt->FindLayoutRect(true).Width(); + long nRealWidth = pFormat->FindLayoutRect(true).Width(); if( nRealWidth ) nWidth = nRealWidth; } @@ -1008,7 +1008,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, OSL_ENSURE( !rHTMLWrt.GetNumInfo().GetNumRule() || rHTMLWrt.GetNextNumInfo(), "NumInfo fuer naechsten Absatz fehlt!" ); - const SvxLRSpaceItem& aLRItem = pFmt->GetLRSpace(); + const SvxLRSpaceItem& aLRItem = pFormat->GetLRSpace(); if( aLRItem.GetLeft() > 0 && rHTMLWrt.nDefListMargin > 0 && ( !rHTMLWrt.GetNumInfo().GetNumRule() || ( rHTMLWrt.GetNextNumInfo() && @@ -1027,7 +1027,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, } } - if( !pFlyFrmFmt && nNewDefListLvl != rHTMLWrt.nDefListLvl ) + if( !pFlyFrameFormat && nNewDefListLvl != rHTMLWrt.nDefListLvl ) rHTMLWrt.OutAndSetDefList( nNewDefListLvl ); if( nNewDefListLvl ) @@ -1084,8 +1084,8 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, if( text::HoriOrientation::NONE==eTabHoriOri ) nFlyHSpace = nFlyVSpace = 0; - if( !pFmt->GetName().isEmpty() ) - rHTMLWrt.OutImplicitMark( pFmt->GetName(), "table" ); + if( !pFormat->GetName().isEmpty() ) + rHTMLWrt.OutImplicitMark( pFormat->GetName(), "table" ); if( text::HoriOrientation::NONE!=eDivHoriOri ) { @@ -1108,7 +1108,7 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, if( text::HoriOrientation::NONE==eTabHoriOri ) rHTMLWrt.bLFPossible = true; - const SwHTMLTableLayout *pLayout = rTbl.GetHTMLTableLayout(); + const SwHTMLTableLayout *pLayout = rTable.GetHTMLTableLayout(); #ifdef DBG_UTIL { @@ -1121,16 +1121,16 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode, if( pLayout && pLayout->IsExportable() ) { SwHTMLWrtTable aTableWrt( pLayout ); - aTableWrt.Write( rHTMLWrt, eTabHoriOri, rTbl.GetRowsToRepeat() > 0, - pFmt, pCaption, bTopCaption, + aTableWrt.Write( rHTMLWrt, eTabHoriOri, rTable.GetRowsToRepeat() > 0, + pFormat, pCaption, bTopCaption, nFlyHSpace, nFlyVSpace ); } else { - SwHTMLWrtTable aTableWrt( rTbl.GetTabLines(), nWidth, - nBaseWidth, bRelWidths, 0, 0, rTbl.GetRowsToRepeat() ); - aTableWrt.Write( rHTMLWrt, eTabHoriOri, rTbl.GetRowsToRepeat() > 0, - pFmt, pCaption, bTopCaption, + SwHTMLWrtTable aTableWrt( rTable.GetTabLines(), nWidth, + nBaseWidth, bRelWidths, 0, 0, rTable.GetRowsToRepeat() ); + aTableWrt.Write( rHTMLWrt, eTabHoriOri, rTable.GetRowsToRepeat() > 0, + pFormat, pCaption, bTopCaption, nFlyHSpace, nFlyVSpace ); } diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index 084289c1bbe9..3f5ec0c27726 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -253,7 +253,7 @@ struct SvxCSS1ItemIds sal_uInt16 nAdjust; sal_uInt16 nWidows; sal_uInt16 nOrphans; - sal_uInt16 nFmtSplit; + sal_uInt16 nFormatSplit; sal_uInt16 nLRSpace; sal_uInt16 nULSpace; @@ -739,7 +739,7 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL, sal_ aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, false ); aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, false ); aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, false ); - aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, false ); + aItemIds.nFormatSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, false ); aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, false ); aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, false ); @@ -752,10 +752,10 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const OUString& rBaseURL, sal_ aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, false ); aWhichMap.insert( aWhichMap.begin(), 0 ); - SvParser::BuildWhichTbl( aWhichMap, reinterpret_cast<sal_uInt16 *>(&aItemIds), + SvParser::BuildWhichTable( aWhichMap, reinterpret_cast<sal_uInt16 *>(&aItemIds), sizeof(aItemIds) / sizeof(sal_uInt16) ); if( pWhichIds && nWhichIds ) - SvParser::BuildWhichTbl( aWhichMap, pWhichIds, nWhichIds ); + SvParser::BuildWhichTable( aWhichMap, pWhichIds, nWhichIds ); pSheetItemSet = new SfxItemSet( rPool, &aWhichMap[0] ); pSheetPropInfo = new SvxCSS1PropertyInfo; @@ -970,7 +970,7 @@ void SvxCSS1Parser::MergeStyles( const SfxItemSet& rSrcSet, if( rSrcInfo.bRightMargin ) aLRSpace.SetRight( rNewLRSpace.GetRight() ); if( rSrcInfo.bTextIndent ) - aLRSpace.SetTxtFirstLineOfst( rNewLRSpace.GetTxtFirstLineOfst() ); + aLRSpace.SetTextFirstLineOfst( rNewLRSpace.GetTextFirstLineOfst() ); rTargetSet.Put( aLRSpace ); } @@ -2005,13 +2005,13 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr, &pItem ) ) { SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) ); - aLRItem.SetTxtFirstLineOfst( nIndent ); + aLRItem.SetTextFirstLineOfst( nIndent ); rItemSet.Put( aLRItem ); } else { SvxLRSpaceItem aLRItem( aItemIds.nLRSpace ); - aLRItem.SetTxtFirstLineOfst( nIndent ); + aLRItem.SetTextFirstLineOfst( nIndent ); rItemSet.Put( aLRItem ); } rPropInfo.bTextIndent = true; @@ -2060,13 +2060,13 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr, &pItem ) ) { SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) ); - aLRItem.SetTxtLeft( (sal_uInt16)nLeft ); + aLRItem.SetTextLeft( (sal_uInt16)nLeft ); rItemSet.Put( aLRItem ); } else { SvxLRSpaceItem aLRItem( aItemIds.nLRSpace ); - aLRItem.SetTxtLeft( (sal_uInt16)nLeft ); + aLRItem.SetTextLeft( (sal_uInt16)nLeft ); rItemSet.Put( aLRItem ); } rPropInfo.bLeftMargin = true; @@ -2998,7 +2998,7 @@ static void ParseCSS1_page_break_inside( const CSS1Expression *pExpr, } if( bSetSplit ) - rItemSet.Put( SvxFmtSplitItem( bSplit, aItemIds.nFmtSplit ) ); + rItemSet.Put( SvxFormatSplitItem( bSplit, aItemIds.nFormatSplit ) ); } static void ParseCSS1_widows( const CSS1Expression *pExpr, diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx index 5789844db5ce..9beac833570d 100644 --- a/sw/source/filter/html/swcss1.hxx +++ b/sw/source/filter/html/swcss1.hxx @@ -25,10 +25,10 @@ #include "svxcss1.hxx" class SwDoc; -class SwCharFmt; -class SwTxtFmtColl; +class SwCharFormat; +class SwTextFormatColl; class SvxBrushItem; -class SwFmtDrop; +class SwFormatDrop; class SwPageDesc; // Dieser Header seiht zwar harmlos aus, included aber eben doch @@ -54,18 +54,18 @@ class SwCSS1Parser : public SvxCSS1Parser bool bSetFirstPageDesc : 1; bool bSetRightPageDesc : 1; - bool bTableHeaderTxtCollSet : 1; - bool bTableTxtCollSet : 1; + bool bTableHeaderTextCollSet : 1; + bool bTableTextCollSet : 1; - bool bLinkCharFmtsSet : 1; + bool bLinkCharFormatsSet : 1; // die Vorlagen fuer DL anlegen - SwTxtFmtColl* GetDefListTxtFmtColl( sal_uInt16 nCollId, sal_uInt16 nDeep ); + SwTextFormatColl* GetDefListTextFormatColl( sal_uInt16 nCollId, sal_uInt16 nDeep ); const SwPageDesc* GetPageDesc( sal_uInt16 nPoolId, bool bCreate ); - void SetTableTxtColl( bool bHeader ); - void SetLinkCharFmts(); + void SetTableTextColl( bool bHeader ); + void SetLinkCharFormats(); protected: virtual bool StyleParsed( const CSS1Selector *pSelector, @@ -88,15 +88,15 @@ public: // das Zeichen-Format zu einem Token und einer ggf leeren Klasse // ermitteln - SwCharFmt* GetChrFmt( sal_uInt16 nToken, const OUString& rClass ) const; + SwCharFormat* GetChrFormat( sal_uInt16 nToken, const OUString& rClass ) const; - // eine TextFmtColl zu einer Pool-Id ermitteln - SwTxtFmtColl *GetTxtFmtColl( sal_uInt16 nTxtColl, const OUString& rClass ); + // eine TextFormatColl zu einer Pool-Id ermitteln + SwTextFormatColl *GetTextFormatColl( sal_uInt16 nTextColl, const OUString& rClass ); // This methods do the same as the one of SwDoc, but change the // encoding if required. - SwTxtFmtColl *GetTxtCollFromPool( sal_uInt16 nPoolId ) const; - SwCharFmt *GetCharFmtFromPool( sal_uInt16 nPoolId ) const; + SwTextFormatColl *GetTextCollFromPool( sal_uInt16 nPoolId ) const; + SwCharFormat *GetCharFormatFromPool( sal_uInt16 nPoolId ) const; // Die linke oder rechte Seiten-Vorlage holen. In Dokumenten mit nur // einer Vorlage gibt es nur eine rechtee Seite. @@ -122,15 +122,15 @@ public: const SvxCSS1PropertyInfo& rPropInfo ); // Fuellen eines DropCap-Attributs - void FillDropCap( SwFmtDrop& rDrop, SfxItemSet& rItemSet, + void FillDropCap( SwFormatDrop& rDrop, SfxItemSet& rItemSet, const OUString *pName=0 ); - bool SetFmtBreak( SfxItemSet& rItemSet, + bool SetFormatBreak( SfxItemSet& rItemSet, const SvxCSS1PropertyInfo& rPropInfo ); - static void AddClassName( OUString& rFmtName, const OUString& rClass ); + static void AddClassName( OUString& rFormatName, const OUString& rClass ); - static inline void AddFirstLetterExt( OUString& rFmtName ); + static inline void AddFirstLetterExt( OUString& rFormatName ); static bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo, bool bAutoWidth=false ); @@ -163,9 +163,9 @@ public: virtual void SetDfltEncoding( rtl_TextEncoding eEnc ) SAL_OVERRIDE; }; -inline void SwCSS1Parser::AddFirstLetterExt( OUString& rFmtName ) +inline void SwCSS1Parser::AddFirstLetterExt( OUString& rFormatName ) { - rFmtName += ".FL"; // first letter + rFormatName += ".FL"; // first letter } inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( bool bCreate ) @@ -185,20 +185,20 @@ inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( bool bCreate ) inline void SwCSS1Parser::SetTHTagStyles() { - if( !bTableHeaderTxtCollSet ) - SetTableTxtColl( true ); + if( !bTableHeaderTextCollSet ) + SetTableTextColl( true ); } inline void SwCSS1Parser::SetTDTagStyles() { - if( !bTableTxtCollSet ) - SetTableTxtColl( false ); + if( !bTableTextCollSet ) + SetTableTextColl( false ); } inline void SwCSS1Parser::SetATagStyles() { - if( !bLinkCharFmtsSet ) - SetLinkCharFmts(); + if( !bLinkCharFormatsSet ) + SetLinkCharFormats(); } inline void SwCSS1Parser::SetDelayedStyles() diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 90ac4505f5c5..4ab6dee8fda1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -197,13 +197,13 @@ sal_uLong HTMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, if( !bInsertMode ) { - Reader::ResetFrmFmts( rDoc ); + Reader::ResetFrameFormats( rDoc ); // Die HTML-Seitenvorlage setzen, wenn des kein HTML-Dokument ist, // sonst ist sie schon gesetzt. if( !rDoc.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) ) { - rDoc.getIDocumentContentOperations().InsertPoolItem( rPam, SwFmtPageDesc( + rDoc.getIDocumentContentOperations().InsertPoolItem( rPam, SwFormatPageDesc( rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( RES_POOLPAGE_HTML, false )) ); } } @@ -335,7 +335,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, SwPaM& rCrsr, SvStream& rIn, // #i18732# - adjust default of option 'FollowTextFlow' // TODO: not sure what the appropriate default for HTML should be? - pDoc->SetDefault( SwFmtFollowTextFlow(true) ); + pDoc->SetDefault( SwFormatFollowTextFlow(true) ); } // Waehrend des Imports in den HTML-Modus schalten, damit die @@ -529,8 +529,8 @@ SvParserState SwHTMLParser::CallParser() aInsertionRangePam.Move( fnMoveBackward ); pDoc->getIDocumentRedlineAccess().SplitRedline( aInsertionRangePam ); - pDoc->SetTxtFmtColl( *pPam, - pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); + pDoc->SetTextFormatColl( *pPam, + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_STANDARD )); } if( GetMedium() ) @@ -642,11 +642,11 @@ void SwHTMLParser::Continue( int nToken ) if( !aScriptSource.isEmpty() ) { SwScriptFieldType *pType = - static_cast<SwScriptFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_SCRIPTFLD )); + static_cast<SwScriptFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_SCRIPTFLD )); - SwScriptField aFld( pType, aScriptType, aScriptSource, + SwScriptField aField( pType, aScriptType, aScriptSource, false ); - InsertAttr( SwFmtFld( aFld ) ); + InsertAttr( SwFormatField( aField ) ); } if( pAppletImpl ) @@ -689,16 +689,16 @@ void SwHTMLParser::Continue( int nToken ) // den Start wieder korrigieren if( !IsNewDoc() && pSttNdIdx->GetIndex() ) { - SwTxtNode* pTxtNode = pSttNdIdx->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pSttNdIdx->GetNode().GetTextNode(); SwNodeIndex aNxtIdx( *pSttNdIdx ); - if( pTxtNode && pTxtNode->CanJoinNext( &aNxtIdx )) + if( pTextNode && pTextNode->CanJoinNext( &aNxtIdx )) { - const sal_Int32 nStt = pTxtNode->GetTxt().getLength(); + const sal_Int32 nStt = pTextNode->GetText().getLength(); // wenn der Cursor noch in dem Node steht, dann setze in an das Ende if( pPam->GetPoint()->nNode == aNxtIdx ) { pPam->GetPoint()->nNode = *pSttNdIdx; - pPam->GetPoint()->nContent.Assign( pTxtNode, nStt ); + pPam->GetPoint()->nContent.Assign( pTextNode, nStt ); } #if OSL_DEBUG_LEVEL > 0 @@ -711,23 +711,23 @@ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( false ).nNode.GetIndex(), if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( true ).nNode.GetIndex() ) { const sal_Int32 nCntPos = pPam->GetBound( true ).nContent.GetIndex(); - pPam->GetBound( true ).nContent.Assign( pTxtNode, - pTxtNode->GetTxt().getLength() + nCntPos ); + pPam->GetBound( true ).nContent.Assign( pTextNode, + pTextNode->GetText().getLength() + nCntPos ); } if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) { const sal_Int32 nCntPos = pPam->GetBound( false ).nContent.GetIndex(); - pPam->GetBound( false ).nContent.Assign( pTxtNode, - pTxtNode->GetTxt().getLength() + nCntPos ); + pPam->GetBound( false ).nContent.Assign( pTextNode, + pTextNode->GetText().getLength() + nCntPos ); } #endif // Zeichen Attribute beibehalten! - SwTxtNode* pDelNd = aNxtIdx.GetNode().GetTxtNode(); - if (pTxtNode->GetTxt().getLength()) - pDelNd->FmtToTxtAttr( pTxtNode ); + SwTextNode* pDelNd = aNxtIdx.GetNode().GetTextNode(); + if (pTextNode->GetText().getLength()) + pDelNd->FormatToTextAttr( pTextNode ); else - pTxtNode->ChgFmtColl( pDelNd->GetTxtColl() ); - pTxtNode->JoinNext(); + pTextNode->ChgFormatColl( pDelNd->GetTextColl() ); + pTextNode->JoinNext(); } } } @@ -745,7 +745,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) SwPosition* pPos = pPam->GetPoint(); if( !pPos->nContent.GetIndex() && !bLFStripped ) { - SwTxtNode* pAktNd; + SwTextNode* pAktNd; sal_uLong nNodeIdx = pPos->nNode.GetIndex(); bool bHasFlysOrMarks = @@ -755,11 +755,11 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) { const SwNode *pPrev = pDoc->GetNodes()[nNodeIdx -1]; if( !pPam->GetPoint()->nContent.GetIndex() && - ( pPrev->IsCntntNode() || + ( pPrev->IsContentNode() || (pPrev->IsEndNode() && pPrev->StartOfSectionNode()->IsSectionNode()) ) ) { - SwCntntNode* pCNd = pPam->GetCntntNode(); + SwContentNode* pCNd = pPam->GetContentNode(); if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() && !bHasFlysOrMarks ) { @@ -781,16 +781,16 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) } } } - else if( 0 != ( pAktNd = pDoc->GetNodes()[ nNodeIdx ]->GetTxtNode()) && !bHasFlysOrMarks ) + else if( 0 != ( pAktNd = pDoc->GetNodes()[ nNodeIdx ]->GetTextNode()) && !bHasFlysOrMarks ) { if( pAktNd->CanJoinNext( &pPos->nNode )) { - SwTxtNode* pNextNd = pPos->nNode.GetNode().GetTxtNode(); + SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); pPos->nContent.Assign( pNextNd, 0 ); pPam->SetMark(); pPam->DeleteMark(); pNextNd->JoinPrev(); } - else if (pAktNd->GetTxt().isEmpty()) + else if (pAktNd->GetText().isEmpty()) { pPos->nContent.Assign( 0, 0 ); pPam->SetMark(); pPam->DeleteMark(); @@ -805,31 +805,31 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( false ).nNode.GetIndex() ) { if( pPos->nContent.GetIndex() ) // dann gabs am Ende kein <P>, pPam->Move( fnMoveForward, fnGoNode ); // als zum naechsten Node - SwTxtNode* pTxtNode = pPos->nNode.GetNode().GetTxtNode(); + SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode(); SwNodeIndex aPrvIdx( pPos->nNode ); - if( pTxtNode && pTxtNode->CanJoinPrev( &aPrvIdx ) && + if( pTextNode && pTextNode->CanJoinPrev( &aPrvIdx ) && *pSttNdIdx <= aPrvIdx ) { // eigentlich muss hier ein JoinNext erfolgen, aber alle Cursor - // usw. sind im pTxtNode angemeldet, so dass der bestehen + // usw. sind im pTextNode angemeldet, so dass der bestehen // bleiben MUSS. // Absatz in Zeichen-Attribute umwandeln, aus dem Prev die // Absatzattribute und die Vorlage uebernehmen! - SwTxtNode* pPrev = aPrvIdx.GetNode().GetTxtNode(); - pTxtNode->ChgFmtColl( pPrev->GetTxtColl() ); - pTxtNode->FmtToTxtAttr( pPrev ); - pTxtNode->ResetAllAttr(); + SwTextNode* pPrev = aPrvIdx.GetNode().GetTextNode(); + pTextNode->ChgFormatColl( pPrev->GetTextColl() ); + pTextNode->FormatToTextAttr( pPrev ); + pTextNode->ResetAllAttr(); if( pPrev->HasSwAttrSet() ) - pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() ); + pTextNode->SetAttr( *pPrev->GetpSwAttrSet() ); if( &pPam->GetBound(true).nNode.GetNode() == pPrev ) - pPam->GetBound(true).nContent.Assign( pTxtNode, 0 ); + pPam->GetBound(true).nContent.Assign( pTextNode, 0 ); if( &pPam->GetBound(false).nNode.GetNode() == pPrev ) - pPam->GetBound(false).nContent.Assign( pTxtNode, 0 ); + pPam->GetBound(false).nContent.Assign( pTextNode, 0 ); - pTxtNode->JoinPrev(); + pTextNode->JoinPrev(); } } @@ -1274,7 +1274,7 @@ void SwHTMLParser::NextToken( int nToken ) if( pPageDesc ) { - pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFmtPageDesc( pPageDesc ) ); + pDoc->getIDocumentContentOperations().InsertPoolItem( *pPam, SwFormatPageDesc( pPageDesc ) ); } } break; @@ -1419,9 +1419,9 @@ void SwHTMLParser::NextToken( int nToken ) if( HTML_NEWPARA==nToken || pPam->GetPoint()->nContent.GetIndex() ) { - AppendTxtNode(); // there is no LF at this place + AppendTextNode(); // there is no LF at this place // therefore it will cause no problems - SetTxtCollAttrs(); + SetTextCollAttrs(); } // progress bar if( !GetMedium() || !GetMedium()->IsRemote() ) @@ -1439,10 +1439,10 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_LINEFEEDCHAR: if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode(); + AppendTextNode(); if( !pTable && !pDoc->IsInHeaderFooter( pPam->GetPoint()->nNode ) ) { - NewAttr( &aAttrTab.pBreak, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); + NewAttr( &aAttrTab.pBreak, SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) ); EndAttr( aAttrTab.pBreak, 0, false ); } break; @@ -1455,7 +1455,7 @@ void SwHTMLParser::NextToken( int nToken ) if( nPos ) { const OUString& rText = - pPam->GetPoint()->nNode.GetNode().GetTxtNode()->GetTxt(); + pPam->GetPoint()->nNode.GetNode().GetTextNode()->GetText(); sal_Unicode cLast = rText[--nPos]; if( ' ' == cLast || '\x0a' == cLast) aToken = aToken.copy(1); @@ -1605,27 +1605,27 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_ADDRESS_ON: if( nOpenParaToken ) EndPara(); - NewTxtFmtColl( HTML_ADDRESS_ON, RES_POOLCOLL_SENDADRESS ); + NewTextFormatColl( HTML_ADDRESS_ON, RES_POOLCOLL_SENDADRESS ); break; case HTML_ADDRESS_OFF: if( nOpenParaToken ) EndPara(); - EndTxtFmtColl( HTML_ADDRESS_OFF ); + EndTextFormatColl( HTML_ADDRESS_OFF ); break; case HTML_BLOCKQUOTE_ON: case HTML_BLOCKQUOTE30_ON: if( nOpenParaToken ) EndPara(); - NewTxtFmtColl( HTML_BLOCKQUOTE_ON, RES_POOLCOLL_HTML_BLOCKQUOTE ); + NewTextFormatColl( HTML_BLOCKQUOTE_ON, RES_POOLCOLL_HTML_BLOCKQUOTE ); break; case HTML_BLOCKQUOTE_OFF: case HTML_BLOCKQUOTE30_OFF: if( nOpenParaToken ) EndPara(); - EndTxtFmtColl( HTML_BLOCKQUOTE_ON ); + EndTextFormatColl( HTML_BLOCKQUOTE_ON ); break; case HTML_PREFORMTXT_ON: @@ -1633,17 +1633,17 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_XMP_ON: if( nOpenParaToken ) EndPara(); - NewTxtFmtColl( nToken, RES_POOLCOLL_HTML_PRE ); + NewTextFormatColl( nToken, RES_POOLCOLL_HTML_PRE ); break; case HTML_PREFORMTXT_OFF: bNoParSpace = true; // the last PRE-paragraph gets a spacing - EndTxtFmtColl( HTML_PREFORMTXT_OFF ); + EndTextFormatColl( HTML_PREFORMTXT_OFF ); break; case HTML_LISTING_OFF: case HTML_XMP_OFF: - EndTxtFmtColl( nToken ); + EndTextFormatColl( nToken ); break; case HTML_HEAD1_ON: @@ -1852,7 +1852,7 @@ void SwHTMLParser::NextToken( int nToken ) case HTML_DELETEDTEXT_ON: case HTML_TELETYPE_ON: - NewCharFmt( nToken ); + NewCharFormat( nToken ); break; case HTML_SDFIELD_ON: @@ -2086,7 +2086,7 @@ static void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr, } } -bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) +bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum ) { // Ein harter Zeilen-Umbruch am Ende muss immer entfernt werden. // Einen zweiten ersetzen wir durch einen Absatz-Abstand. @@ -2100,11 +2100,11 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) if( AM_SPACE==eMode || AM_NOSPACE==eMode ) { - SwTxtNode *pTxtNode = - pPam->GetPoint()->nNode.GetNode().GetTxtNode(); + SwTextNode *pTextNode = + pPam->GetPoint()->nNode.GetNode().GetTextNode(); const SvxULSpaceItem& rULSpace = - static_cast<const SvxULSpaceItem&>(pTxtNode->SwCntntNode::GetAttr( RES_UL_SPACE )); + static_cast<const SvxULSpaceItem&>(pTextNode->SwContentNode::GetAttr( RES_UL_SPACE )); bool bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0 : rULSpace.GetLower() == 0; @@ -2112,7 +2112,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) if( bChange ) { const SvxULSpaceItem& rCollULSpace = - pTxtNode->GetAnyFmtColl().GetULSpace(); + pTextNode->GetAnyFormatColl().GetULSpace(); bool bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0 : rCollULSpace.GetLower() > 0; @@ -2120,11 +2120,11 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) if( bMayReset && rCollULSpace.GetUpper() == rULSpace.GetUpper() ) { - pTxtNode->ResetAttr( RES_UL_SPACE ); + pTextNode->ResetAttr( RES_UL_SPACE ); } else { - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rULSpace.GetUpper(), AM_NOSPACE==eMode ? 0 : HTML_PARSPACE, RES_UL_SPACE ) ); } @@ -2134,7 +2134,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) SwPosition aOldPos( *pPam->GetPoint() ); - bool bRet = pDoc->getIDocumentContentOperations().AppendTxtNode( *pPam->GetPoint() ); + bool bRet = pDoc->getIDocumentContentOperations().AppendTextNode( *pPam->GetPoint() ); // Zeichen-Attribute aufspalten und ggf keine setzen, die ueber den // ganzen Absatz gesetzt sind @@ -2162,7 +2162,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) pAttr->GetSttPara() == rEndIdx && pAttr->GetSttCnt() == 0; - sal_Int32 nStt = pAttr->nSttCntnt; + sal_Int32 nStt = pAttr->nSttContent; bool bScript = false, bFont = false; sal_uInt16 nScriptItem; bool bInsert = true; @@ -2171,24 +2171,24 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) // den besehrigen Teil setzen if( bInsert && bScript ) { - const SwTxtNode *pTxtNd = - pAttr->GetSttPara().GetNode().GetTxtNode(); - OSL_ENSURE( pTxtNd, "No text node" ); - if( pTxtNd ) + const SwTextNode *pTextNd = + pAttr->GetSttPara().GetNode().GetTextNode(); + OSL_ENSURE( pTextNd, "No text node" ); + if( pTextNd ) { - const OUString& rText = pTxtNd->GetTxt(); - sal_uInt16 nScriptTxt = + const OUString& rText = pTextNd->GetText(); + sal_uInt16 nScriptText = g_pBreakIt->GetBreakIter()->getScriptType( rText, pAttr->GetSttCnt() ); sal_Int32 nScriptEnd = g_pBreakIt->GetBreakIter() - ->endOfScript( rText, nStt, nScriptTxt ); + ->endOfScript( rText, nStt, nScriptText ); while( nScriptEnd < nEndCnt ) { - if( nScriptItem == nScriptTxt ) + if( nScriptItem == nScriptText ) { _HTMLAttr *pSetAttr = pAttr->Clone( rEndIdx, nScriptEnd ); - pSetAttr->nSttCntnt = nStt; + pSetAttr->nSttContent = nStt; pSetAttr->ClearPrev(); if( !pNext || bWholePara ) { @@ -2201,19 +2201,19 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) pNext->InsertPrev( pSetAttr ); } nStt = nScriptEnd; - nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType( + nScriptText = g_pBreakIt->GetBreakIter()->getScriptType( rText, nStt ); nScriptEnd = g_pBreakIt->GetBreakIter() - ->endOfScript( rText, nStt, nScriptTxt ); + ->endOfScript( rText, nStt, nScriptText ); } - bInsert = nScriptItem == nScriptTxt; + bInsert = nScriptItem == nScriptText; } } if( bInsert ) { _HTMLAttr *pSetAttr = pAttr->Clone( rEndIdx, nEndCnt ); - pSetAttr->nSttCntnt = nStt; + pSetAttr->nSttContent = nStt; // Wenn das Attribut den gesamten Absatz umspannt, werden // alle auesseren Attribute nicht mehr beachtet. Deshalb @@ -2265,7 +2265,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) SetNodeNum( nLvl, false ); } else - pPam->GetNode().GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE ); + pPam->GetNode().GetTextNode()->ResetAttr( RES_PARATR_NUMRULE ); } // Attrubute im Absatz davor sollte man jetzt setzen (wegen JavaScript) @@ -2273,10 +2273,10 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) // Now it is time to get rid of all script dependent hints that are // equal to the settings in the style - SwTxtNode *pTxtNd = rEndIdx.GetNode().GetTxtNode(); - OSL_ENSURE( pTxtNd, "There is the txt node" ); - size_t nCntAttr = (pTxtNd && pTxtNd->GetpSwpHints()) - ? pTxtNd->GetSwpHints().Count() : 0; + SwTextNode *pTextNd = rEndIdx.GetNode().GetTextNode(); + OSL_ENSURE( pTextNd, "There is the txt node" ); + size_t nCntAttr = (pTextNd && pTextNd->GetpSwpHints()) + ? pTextNd->GetSwpHints().Count() : 0; if( nCntAttr ) { // These are the end position of all script depenent hints. @@ -2288,10 +2288,10 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) // is remembered. sal_Int32 aEndPos[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - SwpHints& rHints = pTxtNd->GetSwpHints(); + SwpHints& rHints = pTextNd->GetSwpHints(); for( size_t i=0; i < nCntAttr; i++ ) { - SwTxtAttr *pHt = rHints.GetTextHint( i ); + SwTextAttr *pHt = rHints.GetTextHint( i ); sal_uInt16 nWhich = pHt->Which(); sal_Int16 nIdx = -1; //In 'hintids.hxx', the following five attributes don't follow @@ -2347,7 +2347,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) { bool bFont = (nIdx % 5) == 0; const SfxPoolItem& rItem = - static_cast<const SwCntntNode *>(pTxtNd)->GetAttr( nWhich ); + static_cast<const SwContentNode *>(pTextNd)->GetAttr( nWhich ); if( bFont ? swhtml_css1atr_equalFontItems(rItem,pHt->GetAttr()) : rItem == pHt->GetAttr() ) { @@ -2357,7 +2357,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum ) // also delete the SwpHints!!! To avoid any trouble // we leave the loop immediately if this is the last // hint. - pTxtNd->DeleteAttribute( pHt ); + pTextNd->DeleteAttribute( pHt ); if( 1 == nCntAttr ) break; i--; @@ -2397,20 +2397,20 @@ void SwHTMLParser::AddParSpace() sal_uLong nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1; - SwTxtNode *pTxtNode = pDoc->GetNodes()[nNdIdx]->GetTxtNode(); - if( !pTxtNode ) + SwTextNode *pTextNode = pDoc->GetNodes()[nNdIdx]->GetTextNode(); + if( !pTextNode ) return; SvxULSpaceItem rULSpace = - static_cast<const SvxULSpaceItem&>(pTxtNode->SwCntntNode::GetAttr( RES_UL_SPACE )); + static_cast<const SvxULSpaceItem&>(pTextNode->SwContentNode::GetAttr( RES_UL_SPACE )); if( !rULSpace.GetLower() ) { const SvxULSpaceItem& rCollULSpace = - pTxtNode->GetAnyFmtColl().GetULSpace(); + pTextNode->GetAnyFormatColl().GetULSpace(); if( rCollULSpace.GetLower() && rCollULSpace.GetUpper() == rULSpace.GetUpper() ) { - pTxtNode->ResetAttr( RES_UL_SPACE ); + pTextNode->ResetAttr( RES_UL_SPACE ); } else { @@ -2421,12 +2421,12 @@ void SwHTMLParser::AddParSpace() bool bIsCJK = false; bool bIsCTL = false; - const size_t nCntAttr = (pTxtNode && pTxtNode->GetpSwpHints()) - ? pTxtNode->GetSwpHints().Count() : 0; + const size_t nCntAttr = (pTextNode && pTextNode->GetpSwpHints()) + ? pTextNode->GetSwpHints().Count() : 0; for(size_t i = 0; i < nCntAttr; ++i) { - SwTxtAttr *const pHt = pTxtNode->GetSwpHints().GetTextHint(i); + SwTextAttr *const pHt = pTextNode->GetSwpHints().GetTextHint(i); sal_uInt16 const nWhich = pHt->Which(); if (RES_CHRATR_CJK_FONT == nWhich || RES_CHRATR_CJK_FONTSIZE == nWhich || @@ -2450,15 +2450,15 @@ void SwHTMLParser::AddParSpace() if( bIsCTL ) { - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rULSpace.GetUpper(), HTML_CTL_PARSPACE, RES_UL_SPACE ) ); } else if( bIsCJK ) { - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rULSpace.GetUpper(), HTML_CJK_PARSPACE, RES_UL_SPACE ) ); } else { - pTxtNode->SetAttr( + pTextNode->SetAttr( SvxULSpaceItem( rULSpace.GetUpper(), HTML_PARSPACE, RES_UL_SPACE ) ); } } @@ -2648,7 +2648,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, const SwNodeIndex& rEndIdx = pPam->GetPoint()->nNode; const sal_Int32 nEndCnt = pPam->GetPoint()->nContent.GetIndex(); _HTMLAttr* pAttr; - SwCntntNode* pCNd; + SwContentNode* pCNd; sal_uInt16 n; _HTMLAttrs aFields; @@ -2716,7 +2716,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, continue; } - pCNd = pAttr->nSttPara.GetNode().GetCntntNode(); + pCNd = pAttr->nSttPara.GetNode().GetContentNode(); if( !pCNd ) { // durch die elende Loescherei von Nodes kann auch mal @@ -2733,7 +2733,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, } pCNd = pDoc->GetNodes().GoNext( &(pAttr->nSttPara) ); if( pCNd ) - pAttr->nSttCntnt = 0; + pAttr->nSttContent = 0; else { OSL_ENSURE( false, "SetAttr: GoNext() failed!" ); @@ -2746,20 +2746,20 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, // durch das Loeschen von BRs kann der Start-Index // auch mal hinter das Ende des Textes zeigen - if( pAttr->nSttCntnt > pCNd->Len() ) - pAttr->nSttCntnt = pCNd->Len(); - pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttCntnt ); + if( pAttr->nSttContent > pCNd->Len() ) + pAttr->nSttContent = pCNd->Len(); + pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttContent ); pAttrPam->SetMark(); if ( (pAttr->GetSttPara() != pAttr->GetEndPara()) && !isTXTATR_NOEND(nWhich) ) { - pCNd = pAttr->nEndPara.GetNode().GetCntntNode(); + pCNd = pAttr->nEndPara.GetNode().GetContentNode(); if( !pCNd ) { pCNd = SwNodes::GoPrevious( &(pAttr->nEndPara) ); if( pCNd ) - pAttr->nEndCntnt = pCNd->Len(); + pAttr->nEndContent = pCNd->Len(); else { OSL_ENSURE( false, "SetAttr: GoPrevious() failed!" ); @@ -2774,15 +2774,15 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, } else if( pAttr->IsLikePara() ) { - pAttr->nEndCntnt = pCNd->Len(); + pAttr->nEndContent = pCNd->Len(); } // durch das Loeschen von BRs kann der End-Index // auch mal hinter das Ende des Textes zeigen - if( pAttr->nEndCntnt > pCNd->Len() ) - pAttr->nEndCntnt = pCNd->Len(); + if( pAttr->nEndContent > pCNd->Len() ) + pAttr->nEndContent = pCNd->Len(); - pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nEndCntnt ); + pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nEndContent ); if( bBeforeTable && pAttrPam->GetPoint()->nNode.GetIndex() == rEndIdx.GetIndex() ) @@ -2839,12 +2839,12 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, case RES_TXTATR_ANNOTATION: case RES_TXTATR_INPUTFIELD: { - sal_uInt16 nFldWhich = + sal_uInt16 nFieldWhich = pPostIts - ? static_cast<const SwFmtFld *>(pAttr->pItem)->GetField()->GetTyp()->Which() + ? static_cast<const SwFormatField *>(pAttr->pItem)->GetField()->GetTyp()->Which() : 0; - if( pPostIts && (RES_POSTITFLD == nFldWhich || - RES_SCRIPTFLD == nFldWhich) ) + if( pPostIts && (RES_POSTITFLD == nFieldWhich || + RES_SCRIPTFLD == nFieldWhich) ) { pPostIts->push_front( pAttr ); } @@ -2875,7 +2875,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, // ggfs. ein Bookmark anspringen if( RES_TXTATR_INETFMT == nWhich && JUMPTO_MARK == eJumpTo && - sJmpMark == static_cast<SwFmtINetFmt*>(pAttr->pItem)->GetName() ) + sJmpMark == static_cast<SwFormatINetFormat*>(pAttr->pItem)->GetName() ) { bChkJumpMark = true; eJumpTo = JUMPTO_NONE; @@ -2893,12 +2893,12 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, for( n = aMoveFlyFrms.size(); n; ) { - SwFrmFmt *pFrmFmt = aMoveFlyFrms[ --n ]; + SwFrameFormat *pFrameFormat = aMoveFlyFrms[ --n ]; - const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); OSL_ENSURE( FLY_AT_PARA == rAnchor.GetAnchorId(), "Nur Auto-Rahmen brauchen eine Spezialbehandlung" ); - const SwPosition *pFlyPos = rAnchor.GetCntntAnchor(); + const SwPosition *pFlyPos = rAnchor.GetContentAnchor(); sal_uLong nFlyParaIdx = pFlyPos->nNode.GetIndex(); bool bMoveFly; if( bChkEnd ) @@ -2916,31 +2916,31 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, } if( bMoveFly ) { - pFrmFmt->DelFrms(); + pFrameFormat->DelFrms(); *pAttrPam->GetPoint() = *pFlyPos; - pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetCntntNode(), + pAttrPam->GetPoint()->nContent.Assign( pAttrPam->GetContentNode(), aMoveFlyCnts[n] ); - SwFmtAnchor aAnchor( rAnchor ); + SwFormatAnchor aAnchor( rAnchor ); aAnchor.SetType( FLY_AT_CHAR ); aAnchor.SetAnchor( pAttrPam->GetPoint() ); - pFrmFmt->SetFmtAttr( aAnchor ); + pFrameFormat->SetFormatAttr( aAnchor ); - const SwFmtHoriOrient& rHoriOri = pFrmFmt->GetHoriOrient(); + const SwFormatHoriOrient& rHoriOri = pFrameFormat->GetHoriOrient(); if( text::HoriOrientation::LEFT == rHoriOri.GetHoriOrient() ) { - SwFmtHoriOrient aHoriOri( rHoriOri ); + SwFormatHoriOrient aHoriOri( rHoriOri ); aHoriOri.SetRelationOrient( text::RelOrientation::CHAR ); - pFrmFmt->SetFmtAttr( aHoriOri ); + pFrameFormat->SetFormatAttr( aHoriOri ); } - const SwFmtVertOrient& rVertOri = pFrmFmt->GetVertOrient(); + const SwFormatVertOrient& rVertOri = pFrameFormat->GetVertOrient(); if( text::VertOrientation::TOP == rVertOri.GetVertOrient() ) { - SwFmtVertOrient aVertOri( rVertOri ); + SwFormatVertOrient aVertOri( rVertOri ); aVertOri.SetRelationOrient( text::RelOrientation::CHAR ); - pFrmFmt->SetFmtAttr( aVertOri ); + pFrameFormat->SetFormatAttr( aVertOri ); } - pFrmFmt->MakeFrms(); + pFrameFormat->MakeFrms(); aMoveFlyFrms.erase( aMoveFlyFrms.begin() + n ); aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n ); } @@ -2949,9 +2949,9 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, { pAttr = aFields[0]; - pCNd = pAttr->nSttPara.GetNode().GetCntntNode(); + pCNd = pAttr->nSttPara.GetNode().GetContentNode(); pAttrPam->GetPoint()->nNode = pAttr->nSttPara; - pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttCntnt ); + pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttContent ); if( bBeforeTable && pAttrPam->GetPoint()->nNode.GetIndex() == rEndIdx.GetIndex() ) @@ -3027,7 +3027,7 @@ bool SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, if( !nEndCnt && RES_PARATR_BEGIN <= nWhich && *pEndIdx != pAttr->GetSttPara() ) { - // dann eine Cntntnt Position zurueck! + // dann eine Contentnt Position zurueck! bMoveBack = pPam->Move( fnMoveBackward ); nEndCnt = pPam->GetPoint()->nContent.GetIndex(); } @@ -3058,17 +3058,17 @@ bool SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, if( bInsert && bScript ) { - const SwTxtNode *pTxtNd = pAttr->GetSttPara().GetNode() - .GetTxtNode(); - OSL_ENSURE( pTxtNd, "No text node" ); - const OUString& rText = pTxtNd->GetTxt(); - sal_uInt16 nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType( + const SwTextNode *pTextNd = pAttr->GetSttPara().GetNode() + .GetTextNode(); + OSL_ENSURE( pTextNd, "No text node" ); + const OUString& rText = pTextNd->GetText(); + sal_uInt16 nScriptText = g_pBreakIt->GetBreakIter()->getScriptType( rText, pAttr->GetSttCnt() ); sal_Int32 nScriptEnd = g_pBreakIt->GetBreakIter() - ->endOfScript( rText, pAttr->GetSttCnt(), nScriptTxt ); + ->endOfScript( rText, pAttr->GetSttCnt(), nScriptText ); while (nScriptEnd < nEndCnt && nScriptEnd != -1) { - if( nScriptItem == nScriptTxt ) + if( nScriptItem == nScriptText ) { _HTMLAttr *pSetAttr = pAttr->Clone( *pEndIdx, nScriptEnd ); pSetAttr->ClearPrev(); @@ -3082,18 +3082,18 @@ bool SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, aSetAttrTab.push_back( pSetAttr ); } } - pAttr->nSttCntnt = nScriptEnd; - nScriptTxt = g_pBreakIt->GetBreakIter()->getScriptType( + pAttr->nSttContent = nScriptEnd; + nScriptText = g_pBreakIt->GetBreakIter()->getScriptType( rText, nScriptEnd ); nScriptEnd = g_pBreakIt->GetBreakIter() - ->endOfScript( rText, nScriptEnd, nScriptTxt ); + ->endOfScript( rText, nScriptEnd, nScriptText ); } - bInsert = nScriptItem == nScriptTxt; + bInsert = nScriptItem == nScriptText; } if( bInsert ) { pAttr->nEndPara = *pEndIdx; - pAttr->nEndCntnt = nEndCnt; + pAttr->nEndContent = nEndCnt; pAttr->bInsAtStart = RES_TXTATR_INETFMT != nWhich && RES_TXTATR_CHARFMT != nWhich; @@ -3276,7 +3276,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, { nTmpIdx = pDoc->GetNodes().GetEndOfInserts().GetIndex(); } - SwCntntNode* pCNd = SwNodes::GoPrevious(&nEndIdx); + SwContentNode* pCNd = SwNodes::GoPrevious(&nEndIdx); // keine Attribute setzen, wenn der PaM aus dem Content-Bereich // herausgeschoben wurde. @@ -3385,8 +3385,8 @@ void SwHTMLParser::RestoreAttrTab( _HTMLAttrTable& rNewAttrTab, { pAttr->nSttPara = rSttPara; pAttr->nEndPara = rSttPara; - pAttr->nSttCntnt = nSttCnt; - pAttr->nEndCntnt = nSttCnt; + pAttr->nSttContent = nSttCnt; + pAttr->nEndContent = nSttCnt; } pAttr = pAttr->GetNext(); } @@ -3718,7 +3718,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) // in Ueberschriften bestimmt die aktuelle Ueberschrift // die Font-Hoehe und nicht BASEFONT - sal_uInt16 nPoolId = GetCurrFmtColl()->GetPoolFmtId(); + sal_uInt16 nPoolId = GetCurrFormatColl()->GetPoolFormatId(); if( (nPoolId>=RES_POOLCOLL_HEADLINE1 && nPoolId<=RES_POOLCOLL_HEADLINE6) ) { @@ -3739,7 +3739,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) // den Vorlagen geholt. if( nPoolId && nSize>=1 && nSize <=6 ) nFontHeight = - pCSS1Parser->GetTxtCollFromPool( + pCSS1Parser->GetTextCollFromPool( RES_POOLCOLL_HEADLINE1+6-nSize )->GetSize().GetHeight(); else nFontHeight = aFontHeights[nSize-1]; @@ -3870,7 +3870,7 @@ void SwHTMLParser::EndFontAttr( int nToken ) void SwHTMLParser::NewPara() { if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); @@ -3933,7 +3933,7 @@ void SwHTMLParser::NewPara() PushContext( pCntxt ); // die aktuelle Vorlage oder deren Attribute setzen - SetTxtCollAttrs( !aClass.isEmpty() ? pCntxt : 0 ); + SetTextCollAttrs( !aClass.isEmpty() ? pCntxt : 0 ); // Laufbalkenanzeige ShowStatline(); @@ -3947,7 +3947,7 @@ void SwHTMLParser::EndPara( bool bReal ) if( HTML_LI_ON==nOpenParaToken && pTable ) { #if OSL_DEBUG_LEVEL > 0 - const SwNumRule *pNumRule = pPam->GetNode().GetTxtNode()->GetNumRule(); + const SwNumRule *pNumRule = pPam->GetNode().GetTextNode()->GetNumRule(); OSL_ENSURE( pNumRule, "Wo ist die Numrule geblieben" ); #endif } @@ -3956,7 +3956,7 @@ void SwHTMLParser::EndPara( bool bReal ) if( bReal ) { if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); } @@ -3985,7 +3985,7 @@ void SwHTMLParser::EndPara( bool bReal ) // und die bisherige Vorlage neu setzen if( bReal ) - SetTxtCollAttrs(); + SetTextCollAttrs(); nOpenParaToken = 0; } @@ -4025,25 +4025,25 @@ void SwHTMLParser::NewHeading( int nToken ) // einen neuen Absatz aufmachen if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); // die passende Vorlage suchen - sal_uInt16 nTxtColl; + sal_uInt16 nTextColl; switch( nToken ) { - case HTML_HEAD1_ON: nTxtColl = RES_POOLCOLL_HEADLINE1; break; - case HTML_HEAD2_ON: nTxtColl = RES_POOLCOLL_HEADLINE2; break; - case HTML_HEAD3_ON: nTxtColl = RES_POOLCOLL_HEADLINE3; break; - case HTML_HEAD4_ON: nTxtColl = RES_POOLCOLL_HEADLINE4; break; - case HTML_HEAD5_ON: nTxtColl = RES_POOLCOLL_HEADLINE5; break; - case HTML_HEAD6_ON: nTxtColl = RES_POOLCOLL_HEADLINE6; break; - default: nTxtColl = RES_POOLCOLL_STANDARD; break; + case HTML_HEAD1_ON: nTextColl = RES_POOLCOLL_HEADLINE1; break; + case HTML_HEAD2_ON: nTextColl = RES_POOLCOLL_HEADLINE2; break; + case HTML_HEAD3_ON: nTextColl = RES_POOLCOLL_HEADLINE3; break; + case HTML_HEAD4_ON: nTextColl = RES_POOLCOLL_HEADLINE4; break; + case HTML_HEAD5_ON: nTextColl = RES_POOLCOLL_HEADLINE5; break; + case HTML_HEAD6_ON: nTextColl = RES_POOLCOLL_HEADLINE6; break; + default: nTextColl = RES_POOLCOLL_STANDARD; break; } // den Kontext anlegen - _HTMLAttrContext *pCntxt = new _HTMLAttrContext( static_cast< sal_uInt16 >(nToken), nTxtColl, aClass ); + _HTMLAttrContext *pCntxt = new _HTMLAttrContext( static_cast< sal_uInt16 >(nToken), nTextColl, aClass ); // Styles parsen (zu Class siehe auch NewPara) if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) ) @@ -4067,7 +4067,7 @@ void SwHTMLParser::NewHeading( int nToken ) PushContext( pCntxt ); // und die Vorlage oder deren Attribute setzen - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); nFontStHeadStart = aFontStack.size(); @@ -4079,7 +4079,7 @@ void SwHTMLParser::EndHeading() { // einen neuen Absatz aufmachen if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SPACE ); + AppendTextNode( AM_SPACE ); else AddParSpace(); @@ -4111,12 +4111,12 @@ void SwHTMLParser::EndHeading() } // die bisherige Vorlage neu setzen - SetTxtCollAttrs(); + SetTextCollAttrs(); nFontStHeadStart = nFontStMin; } -void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) +void SwHTMLParser::NewTextFormatColl( int nToken, sal_uInt16 nColl ) { OUString aId, aStyle, aClass, aLang, aDir; @@ -4172,7 +4172,7 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) break; } if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( eMode ); + AppendTextNode( eMode ); else if( AM_SPACE==eMode ) AddParSpace(); @@ -4197,13 +4197,13 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) PushContext( pCntxt ); // die neue Vorlage setzen - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); // Laufbalkenanzeige aktualisieren ShowStatline(); } -void SwHTMLParser::EndTxtFmtColl( int nToken ) +void SwHTMLParser::EndTextFormatColl( int nToken ) { SwHTMLAppendMode eMode = AM_NORMAL; switch( nToken & ~1 ) @@ -4225,7 +4225,7 @@ void SwHTMLParser::EndTxtFmtColl( int nToken ) break; } if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( eMode ); + AppendTextNode( eMode ); else if( AM_SPACE==eMode ) AddParSpace(); @@ -4241,7 +4241,7 @@ void SwHTMLParser::EndTxtFmtColl( int nToken ) } // und die bisherige Vorlage setzen - SetTxtCollAttrs(); + SetTextCollAttrs(); } void SwHTMLParser::NewDefList() @@ -4275,7 +4275,7 @@ void SwHTMLParser::NewDefList() // einen neuen Absatz aufmachen bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0; if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE ); + AppendTextNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE ); else if( bSpace ) AddParSpace(); @@ -4319,9 +4319,9 @@ void SwHTMLParser::NewDefList() // und den der DT-Vorlage des aktuellen Levels SvxLRSpaceItem rLRSpace = - pCSS1Parser->GetTxtFmtColl( RES_POOLCOLL_HTML_DD, aEmptyOUStr ) + pCSS1Parser->GetTextFormatColl( RES_POOLCOLL_HTML_DD, aEmptyOUStr ) ->GetLRSpace(); - nLeft = nLeft + static_cast< sal_uInt16 >(rLRSpace.GetTxtLeft()); + nLeft = nLeft + static_cast< sal_uInt16 >(rLRSpace.GetTextLeft()); } pCntxt->SetMargins( nLeft, nRight, nIndent ); @@ -4343,14 +4343,14 @@ void SwHTMLParser::NewDefList() // die Attribute der neuen Vorlage setzen if( nDefListDeep > 1 ) - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); } void SwHTMLParser::EndDefList() { bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1; if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE ); + AppendTextNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE ); else if( bSpace ) AddParSpace(); @@ -4370,7 +4370,7 @@ void SwHTMLParser::EndDefList() } // und Vorlage setzen - SetTxtCollAttrs(); + SetTextCollAttrs(); } void SwHTMLParser::NewDefListItem( int nToken ) @@ -4404,7 +4404,7 @@ void SwHTMLParser::NewDefListItem( int nToken ) nOpenParaToken = static_cast< sal_uInt16 >(nToken); } - NewTxtFmtColl( nToken, static_cast< sal_uInt16 >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD + NewTextFormatColl( nToken, static_cast< sal_uInt16 >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD : RES_POOLCOLL_HTML_DT) ); } @@ -4413,7 +4413,7 @@ void SwHTMLParser::EndDefListItem( int nToken, bool bSetColl, { // einen neuen Absatz aufmachen if( !nToken && pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_SOFTNOSPACE ); + AppendTextNode( AM_SOFTNOSPACE ); // Kontext zu dem Token suchen und vom Stack holen nToken &= ~1; @@ -4454,7 +4454,7 @@ void SwHTMLParser::EndDefListItem( int nToken, bool bSetColl, // und die bisherige Vorlage setzen if( bSetColl ) - SetTxtCollAttrs(); + SetTextCollAttrs(); } bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, @@ -4467,20 +4467,20 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, // sonst: Der Absatz enthaelt irgendeinen Rahmen SwNodeIndex& rNodeIdx = pPam->GetPoint()->nNode; - const SwFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); + const SwFrameFormats& rFrameFormatTable = *pDoc->GetSpzFrameFormats(); bool bFound = false; - for ( sal_uInt16 i=0; i<rFrmFmtTbl.size(); i++ ) + for ( sal_uInt16 i=0; i<rFrameFormatTable.size(); i++ ) { - const SwFrmFmt *const pFmt = rFrmFmtTbl[i]; - SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); + const SwFrameFormat *const pFormat = rFrameFormatTable[i]; + SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor(); // Ein Rahmen wurde gefunden, wenn // - er absatzgebunden ist, und // - im aktuellen Absatz verankert ist, und // - jeder absatzgebunene Rahmen zaehlt, oder // - (nur Rahmen oder umlauf zaehlen und ) der Rahmen keinen // Umlauf besitzt - SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + SwPosition const*const pAPos = pAnchor->GetContentAnchor(); if (pAPos && ((FLY_AT_PARA == pAnchor->GetAnchorId()) || (FLY_AT_CHAR == pAnchor->GetAnchorId())) && @@ -4497,7 +4497,7 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, // auch keine mit Durchlauf beachten. Dabei handelt es // sich (noch) um HIDDEN-Controls, und denen weicht man // besser auch nicht aus. - SwSurround eSurround = pFmt->GetSurround().GetSurround(); + SwSurround eSurround = pFormat->GetSurround().GetSurround(); if( bNoSurroundOnly ) { if( SURROUND_NONE==eSurround ) @@ -4529,17 +4529,17 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, // die speziellen Methoden zum Einfuegen von Objecten -const SwFmtColl *SwHTMLParser::GetCurrFmtColl() const +const SwFormatColl *SwHTMLParser::GetCurrFormatColl() const { - const SwCntntNode* pCNd = pPam->GetCntntNode(); - return &pCNd->GetAnyFmtColl(); + const SwContentNode* pCNd = pPam->GetContentNode(); + return &pCNd->GetAnyFormatColl(); } -void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) +void SwHTMLParser::SetTextCollAttrs( _HTMLAttrContext *pContext ) { - SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage + SwTextFormatColl *pCollToSet = 0; // die zu setzende Vorlage SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs - sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0; + sal_uInt16 nTopColl = pContext ? pContext->GetTextFormatColl() : 0; const OUString& rTopClass = pContext ? pContext->GetClass() : aEmptyOUStr; sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT; @@ -4553,7 +4553,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) { const _HTMLAttrContext *pCntxt = aContexts[i]; - sal_uInt16 nColl = pCntxt->GetTxtFmtColl(); + sal_uInt16 nColl = pCntxt->GetTextFormatColl(); if( nColl ) { // Es gibt eine Vorlage, die zu setzen ist. Dann @@ -4581,8 +4581,8 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) break; } - SwTxtFmtColl *pNewColl = - pCSS1Parser->GetTxtFmtColl( nColl, pCntxt->GetClass() ); + SwTextFormatColl *pNewColl = + pCSS1Parser->GetTextFormatColl( nColl, pCntxt->GetClass() ); if( bSetThis ) { @@ -4630,7 +4630,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) else { // vielliecht gibt es ja eine Default-Vorlage? - nColl = pCntxt->GetDfltTxtFmtColl(); + nColl = pCntxt->GetDfltTextFormatColl(); if( nColl ) nDfltColl = nColl; } @@ -4656,8 +4656,8 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) nDfltColl==RES_POOLCOLL_TABLE_HDLN) ) nTopColl = nDfltColl; - const SwTxtFmtColl *pTopColl = - pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass ); + const SwTextFormatColl *pTopColl = + pCSS1Parser->GetTextFormatColl( nTopColl, rTopClass ); const SfxItemSet& rItemSet = pTopColl->GetAttrSet(); const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState(RES_LR_SPACE,true, &pItem) ) @@ -4665,18 +4665,18 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) const SvxLRSpaceItem *pLRItem = static_cast<const SvxLRSpaceItem *>(pItem); - sal_Int32 nLeft = pLRItem->GetTxtLeft(); + sal_Int32 nLeft = pLRItem->GetTextLeft(); sal_Int32 nRight = pLRItem->GetRight(); - nFirstLineIndent = pLRItem->GetTxtFirstLineOfst(); + nFirstLineIndent = pLRItem->GetTextFirstLineOfst(); // In Definitions-Listen enthalten die Abstaende auch die der // vorhergehenden Level if( RES_POOLCOLL_HTML_DD == nTopColl ) { const SvxLRSpaceItem& rDTLRSpace = pCSS1Parser - ->GetTxtFmtColl( RES_POOLCOLL_HTML_DT, aEmptyOUStr ) + ->GetTextFormatColl( RES_POOLCOLL_HTML_DT, aEmptyOUStr ) ->GetLRSpace(); - nLeft -= rDTLRSpace.GetTxtLeft(); + nLeft -= rDTLRSpace.GetTextLeft(); nRight -= rDTLRSpace.GetRight(); } else if( RES_POOLCOLL_HTML_DT == nTopColl ) @@ -4703,14 +4703,14 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) // wenn gar keine Vorlage im Kontext gesetzt ist, Textkoerper nehmen if( !pCollToSet ) { - pCollToSet = pCSS1Parser->GetTxtCollFromPool( nDfltColl ); + pCollToSet = pCSS1Parser->GetTextCollFromPool( nDfltColl ); const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace(); if( !nLeftMargin ) - nLeftMargin = static_cast< sal_uInt16 >(rLRItem.GetTxtLeft()); + nLeftMargin = static_cast< sal_uInt16 >(rLRItem.GetTextLeft()); if( !nRightMargin ) nRightMargin = static_cast< sal_uInt16 >(rLRItem.GetRight()); if( !nFirstLineIndent ) - nFirstLineIndent = rLRItem.GetTxtFirstLineOfst(); + nFirstLineIndent = rLRItem.GetTextFirstLineOfst(); } // bisherige harte Attributierung des Absatzes entfernen @@ -4723,22 +4723,22 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) } // Die Vorlage setzen - pDoc->SetTxtFmtColl( *pPam, pCollToSet ); + pDoc->SetTextFormatColl( *pPam, pCollToSet ); // ggf. noch den Absatz-Einzug korrigieren const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace(); bool bSetLRSpace; - bSetLRSpace = nLeftMargin != rLRItem.GetTxtLeft() || - nFirstLineIndent != rLRItem.GetTxtFirstLineOfst() || + bSetLRSpace = nLeftMargin != rLRItem.GetTextLeft() || + nFirstLineIndent != rLRItem.GetTextFirstLineOfst() || nRightMargin != rLRItem.GetRight(); if( bSetLRSpace ) { SvxLRSpaceItem aLRItem( rLRItem ); - aLRItem.SetTxtLeft( nLeftMargin ); + aLRItem.SetTextLeft( nLeftMargin ); aLRItem.SetRight( nRightMargin ); - aLRItem.SetTxtFirstLineOfst( nFirstLineIndent ); + aLRItem.SetTextFirstLineOfst( nFirstLineIndent ); if( pItemSet ) pItemSet->Put( aLRItem ); else @@ -4758,7 +4758,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) } } -void SwHTMLParser::NewCharFmt( int nToken ) +void SwHTMLParser::NewCharFormat( int nToken ) { OUString aId, aStyle, aLang, aDir; OUString aClass; @@ -4791,8 +4791,8 @@ void SwHTMLParser::NewCharFmt( int nToken ) _HTMLAttrContext *pCntxt = new _HTMLAttrContext( static_cast< sal_uInt16 >(nToken) ); // die Vorlage setzen und im Kontext merken - SwCharFmt* pCFmt = pCSS1Parser->GetChrFmt( static_cast< sal_uInt16 >(nToken), aClass ); - OSL_ENSURE( pCFmt, "keine Zeichenvorlage zu Token gefunden" ); + SwCharFormat* pCFormat = pCSS1Parser->GetChrFormat( static_cast< sal_uInt16 >(nToken), aClass ); + OSL_ENSURE( pCFormat, "keine Zeichenvorlage zu Token gefunden" ); // Styles parsen (zu Class siehe auch NewPara) if( HasStyleOptions( aStyle, aId, aEmptyOUStr, &aLang, &aDir ) ) @@ -4812,8 +4812,8 @@ void SwHTMLParser::NewCharFmt( int nToken ) // Zeichen-Vorlagen werden in einem eigenen Stack gehalten und // koennen nie durch Styles eingefuegt werden. Das Attribut ist deshalb // auch gar nicht im CSS1-Which-Range enthalten - if( pCFmt ) - InsertAttr( &aAttrTab.pCharFmts, SwFmtCharFmt( pCFmt ), pCntxt ); + if( pCFormat ) + InsertAttr( &aAttrTab.pCharFormats, SwFormatCharFormat( pCFormat ), pCntxt ); // den Kontext merken PushContext( pCntxt ); @@ -4878,7 +4878,7 @@ void SwHTMLParser::InsertSpacer() SfxItemSet aFrmSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); if( !IsNewDoc() ) - Reader::ResetFrmFmtAttrs( aFrmSet ); + Reader::ResetFrameFormatAttrs( aFrmSet ); // den Anker und die Ausrichtung setzen SetAnchorAndAdjustment( eVertOri, eHoriOri, aFrmSet ); @@ -4896,16 +4896,16 @@ void SwHTMLParser::InsertSpacer() // den Inhalt schuetzen SvxProtectItem aProtectItem( RES_PROTECT) ; - aProtectItem.SetCntntProtect( true ); + aProtectItem.SetContentProtect( true ); aFrmSet.Put( aProtectItem ); // der Rahmen anlegen RndStdIds eAnchorId = - static_cast<const SwFmtAnchor &>(aFrmSet.Get(RES_ANCHOR)).GetAnchorId(); - SwFrmFmt *pFlyFmt = pDoc->MakeFlySection( eAnchorId, + static_cast<const SwFormatAnchor &>(aFrmSet.Get(RES_ANCHOR)).GetAnchorId(); + SwFrameFormat *pFlyFormat = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(), &aFrmSet ); // Ggf Frames anlegen und auto-geb. Rahmen registrieren - RegisterFlyFrm( pFlyFmt ); + RegisterFlyFrm( pFlyFormat ); } break; case HTML_SPTYPE_VERT: @@ -4919,7 +4919,7 @@ void SwHTMLParser::InsertSpacer() } // einen Absatz-Abstand setzen - SwTxtNode *pTxtNode = 0; + SwTextNode *pTextNode = 0; if( !pPam->GetPoint()->nContent.GetIndex() ) { // den unteren Absatz-Abstand des vorherigen Nodes aendern, @@ -4927,29 +4927,29 @@ void SwHTMLParser::InsertSpacer() SetAttr(); // noch offene Absatz-Attribute setzen - pTxtNode = pDoc->GetNodes()[pPam->GetPoint()->nNode.GetIndex()-1] - ->GetTxtNode(); + pTextNode = pDoc->GetNodes()[pPam->GetPoint()->nNode.GetIndex()-1] + ->GetTextNode(); - // Wenn der Abstz davor kein Txtenode ist, dann wird jetzt + // Wenn der Abstz davor kein Textenode ist, dann wird jetzt // ein leere Absatz angelegt, der eh schon eine Zeilenhoehe // Abstand erzeugt. - if( !pTxtNode ) + if( !pTextNode ) nSize = nSize>HTML_PARSPACE ? nSize-HTML_PARSPACE : 0; } - if( pTxtNode ) + if( pTextNode ) { - SvxULSpaceItem aULSpace( static_cast<const SvxULSpaceItem&>(pTxtNode - ->SwCntntNode::GetAttr( RES_UL_SPACE )) ); + SvxULSpaceItem aULSpace( static_cast<const SvxULSpaceItem&>(pTextNode + ->SwContentNode::GetAttr( RES_UL_SPACE )) ); aULSpace.SetLower( aULSpace.GetLower() + (sal_uInt16)nSize ); - pTxtNode->SetAttr( aULSpace ); + pTextNode->SetAttr( aULSpace ); } else { NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (sal_uInt16)nSize, RES_UL_SPACE ) ); EndAttr( aAttrTab.pULSpace, 0, false ); - AppendTxtNode(); // nicht am Abstand drehen! + AppendTextNode(); // nicht am Abstand drehen! } } break; @@ -4975,9 +4975,9 @@ void SwHTMLParser::InsertSpacer() nIndent = nIndent + (short)nSize; SvxLRSpaceItem aLRItem( RES_LR_SPACE ); - aLRItem.SetTxtLeft( nLeft ); + aLRItem.SetTextLeft( nLeft ); aLRItem.SetRight( nRight ); - aLRItem.SetTxtFirstLineOfst( nIndent ); + aLRItem.SetTextFirstLineOfst( nIndent ); NewAttr( &aAttrTab.pLRSpace, aLRItem ); EndAttr( aAttrTab.pLRSpace, 0, false ); @@ -5013,12 +5013,12 @@ SwTwips SwHTMLParser::GetCurrentBrowseWidth() if( !aHTMLPageSize.Width() ) { - const SwFrmFmt& rPgFmt = pCSS1Parser->GetMasterPageDesc()->GetMaster(); + const SwFrameFormat& rPgFormat = pCSS1Parser->GetMasterPageDesc()->GetMaster(); - const SwFmtFrmSize& rSz = rPgFmt.GetFrmSize(); - const SvxLRSpaceItem& rLR = rPgFmt.GetLRSpace(); - const SvxULSpaceItem& rUL = rPgFmt.GetULSpace(); - const SwFmtCol& rCol = rPgFmt.GetCol(); + const SwFormatFrmSize& rSz = rPgFormat.GetFrmSize(); + const SvxLRSpaceItem& rLR = rPgFormat.GetLRSpace(); + const SvxULSpaceItem& rUL = rPgFormat.GetULSpace(); + const SwFormatCol& rCol = rPgFormat.GetCol(); aHTMLPageSize.Width() = rSz.GetWidth() - rLR.GetLeft() - rLR.GetRight(); aHTMLPageSize.Height() = rSz.GetHeight() - rUL.GetUpper() - rUL.GetLower(); @@ -5107,25 +5107,25 @@ void SwHTMLParser::InsertLineBreak() if( bClearLeft || bClearRight ) { SwNodeIndex& rNodeIdx = pPam->GetPoint()->nNode; - SwTxtNode* pTxtNd = rNodeIdx.GetNode().GetTxtNode(); - if( pTxtNd ) + SwTextNode* pTextNd = rNodeIdx.GetNode().GetTextNode(); + if( pTextNd ) { - const SwFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts(); + const SwFrameFormats& rFrameFormatTable = *pDoc->GetSpzFrameFormats(); - for( sal_uInt16 i=0; i<rFrmFmtTbl.size(); i++ ) + for( sal_uInt16 i=0; i<rFrameFormatTable.size(); i++ ) { - SwFrmFmt *const pFmt = rFrmFmtTbl[i]; - SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor(); - SwPosition const*const pAPos = pAnchor->GetCntntAnchor(); + SwFrameFormat *const pFormat = rFrameFormatTable[i]; + SwFormatAnchor const*const pAnchor = &pFormat->GetAnchor(); + SwPosition const*const pAPos = pAnchor->GetContentAnchor(); if (pAPos && ((FLY_AT_PARA == pAnchor->GetAnchorId()) || (FLY_AT_CHAR == pAnchor->GetAnchorId())) && pAPos->nNode == rNodeIdx && - pFmt->GetSurround().GetSurround() != SURROUND_NONE ) + pFormat->GetSurround().GetSurround() != SURROUND_NONE ) { - sal_Int16 eHori = RES_DRAWFRMFMT == pFmt->Which() + sal_Int16 eHori = RES_DRAWFRMFMT == pFormat->Which() ? text::HoriOrientation::LEFT - : pFmt->GetHoriOrient().GetHoriOrient(); + : pFormat->GetHoriOrient().GetHoriOrient(); SwSurround eSurround = SURROUND_PARALLEL; if( pPam->GetPoint()->nContent.GetIndex() ) @@ -5143,10 +5143,10 @@ void SwHTMLParser::InsertLineBreak() if( SURROUND_PARALLEL != eSurround ) { - SwFmtSurround aSurround( eSurround ); + SwFormatSurround aSurround( eSurround ); if( SURROUND_NONE != eSurround ) aSurround.SetAnchorOnly( true ); - pFmt->SetFmtAttr( aSurround ); + pFormat->SetFormatAttr( aSurround ); bCleared = true; } } // Anker ist nicht im Node @@ -5155,7 +5155,7 @@ void SwHTMLParser::InsertLineBreak() } // kein CLEAR // Styles parsen - SvxFmtBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK ); + SvxFormatBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK ); bool bBreakItem = false; if( HasStyleOptions( aStyle, aId, aClass ) ) { @@ -5164,9 +5164,9 @@ void SwHTMLParser::InsertLineBreak() if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo ) ) { - if( pCSS1Parser->SetFmtBreak( aItemSet, aPropInfo ) ) + if( pCSS1Parser->SetFormatBreak( aItemSet, aPropInfo ) ) { - aBreakItem = static_cast<const SvxFmtBreakItem &>(aItemSet.Get( RES_BREAK )); + aBreakItem = static_cast<const SvxFormatBreakItem &>(aItemSet.Get( RES_BREAK )); bBreakItem = true; } if( !aPropInfo.aId.isEmpty() ) @@ -5194,7 +5194,7 @@ void SwHTMLParser::InsertLineBreak() // MIB 21.02.97: Eigentlich muesste man hier den unteren Absatz- // Absatnd auf 0 drehen. Das geht aber bei sowas wie <BR ..><P> // schief (>Netacpe). Deshalb lassen wir das erstmal. - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); } if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() ) { @@ -5255,10 +5255,10 @@ void SwHTMLParser::InsertHorzRule() } if( pPam->GetPoint()->nContent.GetIndex() ) - AppendTxtNode( AM_NOSPACE ); + AppendTextNode( AM_NOSPACE ); if( nOpenParaToken ) EndPara(); - AppendTxtNode(); + AppendTextNode(); pPam->Move( fnMoveBackward ); // ... und in einem Kontext merken @@ -5268,7 +5268,7 @@ void SwHTMLParser::InsertHorzRule() PushContext( pCntxt ); // die neue Vorlage setzen - SetTxtCollAttrs( pCntxt ); + SetTextCollAttrs( pCntxt ); // die harten Attribute an diesem Absatz werden nie mehr ungueltig if( !aParaAttrs.empty() ) @@ -5325,14 +5325,14 @@ void SwHTMLParser::InsertHorzRule() if( (long)nWidth < nBrowseWidth ) { - const SwFmtColl *pColl = GetCurrFmtColl(); + const SwFormatColl *pColl = GetCurrFormatColl(); SvxLRSpaceItem aLRItem( pColl->GetLRSpace() ); long nDist = nBrowseWidth - nWidth; switch( eAdjust ) { case SVX_ADJUST_RIGHT: - aLRItem.SetTxtLeft( (sal_uInt16)nDist ); + aLRItem.SetTextLeft( (sal_uInt16)nDist ); break; case SVX_ADJUST_LEFT: aLRItem.SetRight( (sal_uInt16)nDist ); @@ -5340,7 +5340,7 @@ void SwHTMLParser::InsertHorzRule() case SVX_ADJUST_CENTER: default: nDist /= 2; - aLRItem.SetTxtLeft( (sal_uInt16)nDist ); + aLRItem.SetTextLeft( (sal_uInt16)nDist ); aLRItem.SetRight( (sal_uInt16)nDist ); break; } @@ -5363,7 +5363,7 @@ void SwHTMLParser::InsertHorzRule() pPam->Move( fnMoveForward ); // und im Absatz danach die dort aktuelle Vorlage setzen - SetTxtCollAttrs(); + SetTextCollAttrs(); } void SwHTMLParser::ParseMoreMetaOptions() @@ -5432,19 +5432,19 @@ void SwHTMLParser::ParseMoreMetaOptions() sText.append(aContent); sText.append("\">"); - SwPostItField aPostItFld( - static_cast<SwPostItFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_POSTITFLD )), + SwPostItField aPostItField( + static_cast<SwPostItFieldType*>(pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_POSTITFLD )), aEmptyOUStr, sText.makeStringAndClear(), aEmptyOUStr, aEmptyOUStr, DateTime( DateTime::SYSTEM ) ); - SwFmtFld aFmtFld( aPostItFld ); - InsertAttr( aFmtFld ); + SwFormatField aFormatField( aPostItField ); + InsertAttr( aFormatField ); } _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, _HTMLAttr **ppHd ) : nSttPara( rPos.nNode ), nEndPara( rPos.nNode ), - nSttCntnt( rPos.nContent.GetIndex() ), - nEndCntnt(rPos.nContent.GetIndex() ), + nSttContent( rPos.nContent.GetIndex() ), + nEndContent(rPos.nContent.GetIndex() ), bInsAtStart( true ), bLikePara( false ), bValid( true ), @@ -5460,8 +5460,8 @@ _HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara, sal_Int32 nEndCnt, _HTMLAttr **ppHd ) : nSttPara( rAttr.nSttPara ), nEndPara( rEndPara ), - nSttCntnt( rAttr.nSttCntnt ), - nEndCntnt( nEndCnt ), + nSttContent( rAttr.nSttContent ), + nEndContent( nEndCnt ), bInsAtStart( rAttr.bInsAtStart ), bLikePara( rAttr.bLikePara ), bValid( rAttr.bValid ), @@ -5494,9 +5494,9 @@ void _HTMLAttr::Reset(const SwNodeIndex& rSttPara, sal_Int32 nSttCnt, { // den Anfang (und das Ende) neu setzen nSttPara = rSttPara; - nSttCntnt = nSttCnt; + nSttContent = nSttCnt; nEndPara = rSttPara; - nEndCntnt = nSttCnt; + nEndContent = nSttCnt; // den Head korrigieren und die Verkettungen aufheben pNext = 0; diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index 7ac4f65700fd..cc7efaedb844 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -41,7 +41,7 @@ class SwDoc; class SwPaM; class SwViewShell; class SwStartNode; -class SwFmtColl; +class SwFormatColl; class SwField; class SwHTMLForm_Impl; class SwApplet_Impl; @@ -74,7 +74,7 @@ class _HTMLAttr friend class _CellSaveStruct; SwNodeIndex nSttPara, nEndPara; - sal_Int32 nSttCntnt, nEndCntnt; + sal_Int32 nSttContent, nEndContent; bool bInsAtStart : 1; bool bLikePara : 1; // Attribut ueber dem gesamten Absatz setzen bool bValid : 1; // ist das Attribut gueltig? @@ -106,8 +106,8 @@ public: const SwNodeIndex& GetSttPara() const { return nSttPara; } const SwNodeIndex& GetEndPara() const { return nEndPara; } - sal_Int32 GetSttCnt() const { return nSttCntnt; } - sal_Int32 GetEndCnt() const { return nEndCntnt; } + sal_Int32 GetSttCnt() const { return nSttContent; } + sal_Int32 GetEndCnt() const { return nEndContent; } bool IsLikePara() const { return bLikePara; } void SetLikePara( bool bPara=true ) { bLikePara = bPara; } @@ -154,8 +154,8 @@ struct _HTMLAttrTable *pOrphans, *pDirection, - *pCharFmts, // Text-Attribute - *pINetFmt, + *pCharFormats, // Text-Attribute + *pINetFormat, *pBold, // Zeichen-Attribute *pBoldCJK, @@ -205,7 +205,7 @@ class _HTMLAttrContext sal_uInt16 nToken; // das Token, zu dem der Kontext gehoehrt - sal_uInt16 nTxtFmtColl; // eine in dem Kontext begonnene Vorlage oder 0 + sal_uInt16 nTextFormatColl; // eine in dem Kontext begonnene Vorlage oder 0 sal_uInt16 nLeftMargin; // ein veraenderter linker Rand sal_uInt16 nRightMargin; // ein veraenderter rechter Rand @@ -218,7 +218,7 @@ class _HTMLAttrContext bool bLRSpaceChanged : 1;// linker/rechtr Rand, Einzug veraendert? bool bULSpaceChanged : 1;// oberer/unterer Rand veraendert? - bool bDfltTxtFmtColl : 1;// nTxtFmtColl ist nur ein default + bool bDfltTextFormatColl : 1;// nTextFormatColl ist nur ein default bool bSpansSection : 1; // Der Kontext spannt eine SwSection auf bool bPopStack : 1; // Oberhalb liegende Stack-Elemente entf. bool bFinishPREListingXMP : 1; @@ -235,7 +235,7 @@ public: pSaveDocContext( 0 ), pFrmItemSet( 0 ), nToken( nTokn ), - nTxtFmtColl( nPoolId ), + nTextFormatColl( nPoolId ), nLeftMargin( 0 ), nRightMargin( 0 ), nFirstLineIndent( 0 ), @@ -244,7 +244,7 @@ public: eAppend( AM_NONE ), bLRSpaceChanged( false ), bULSpaceChanged( false ), - bDfltTxtFmtColl( bDfltColl ), + bDfltTextFormatColl( bDfltColl ), bSpansSection( false ), bPopStack( false ), bFinishPREListingXMP( false ), @@ -257,7 +257,7 @@ public: pSaveDocContext( 0 ), pFrmItemSet( 0 ), nToken( nTokn ), - nTxtFmtColl( 0 ), + nTextFormatColl( 0 ), nLeftMargin( 0 ), nRightMargin( 0 ), nFirstLineIndent( 0 ), @@ -266,7 +266,7 @@ public: eAppend( AM_NONE ), bLRSpaceChanged( false ), bULSpaceChanged( false ), - bDfltTxtFmtColl( false ), + bDfltTextFormatColl( false ), bSpansSection( false ), bPopStack( false ), bFinishPREListingXMP( false ), @@ -279,8 +279,8 @@ public: sal_uInt16 GetToken() const { return nToken; } - sal_uInt16 GetTxtFmtColl() const { return bDfltTxtFmtColl ? 0 : nTxtFmtColl; } - sal_uInt16 GetDfltTxtFmtColl() const { return bDfltTxtFmtColl ? nTxtFmtColl : 0; } + sal_uInt16 GetTextFormatColl() const { return bDfltTextFormatColl ? 0 : nTextFormatColl; } + sal_uInt16 GetDfltTextFormatColl() const { return bDfltTextFormatColl ? nTextFormatColl : 0; } const OUString& GetClass() const { return aClass; } @@ -333,7 +333,7 @@ class SwCSS1Parser; class SwHTMLNumRuleInfo; typedef boost::ptr_vector<ImageMap> ImageMaps; -typedef std::vector<SwFrmFmt *> SwHTMLFrmFmts; +typedef std::vector<SwFrameFormat *> SwHTMLFrameFormats; #define HTML_CNTXT_PROTECT_STACK 0x0001 #define HTML_CNTXT_STRIP_PARA 0x0002 @@ -382,7 +382,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient _HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute _HTMLAttrTable aAttrTab; // "offene" Attribute _HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext - SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved + SwHTMLFrameFormats aMoveFlyFrms;// Fly-Frames, the anchor is moved std::deque<sal_Int32> aMoveFlyCnts;// and the Content-Positions SwApplet_Impl *pAppletImpl; // das aktuelle Applet @@ -502,7 +502,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient _HTMLAttr **GetAttrTabEntry( sal_uInt16 nWhich ); // Einen neuen Textknoten an PaM-Position anlegen - bool AppendTxtNode( SwHTMLAppendMode eMode=AM_NORMAL, bool bUpdateNum=true ); + bool AppendTextNode( SwHTMLAppendMode eMode=AM_NORMAL, bool bUpdateNum=true ); void AddParSpace(); // Ein Attribut beginnen/beenden @@ -541,7 +541,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient void EndContext( _HTMLAttrContext *pContext ); void ClearContext( _HTMLAttrContext *pContext ); - const SwFmtColl *GetCurrFmtColl() const; + const SwFormatColl *GetCurrFormatColl() const; SwTwips GetCurrentBrowseWidth(); @@ -552,7 +552,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient // Verwalten von Absatz-Vorlagen // die Vorlagen auf dem Stack bzw. deren Attribute setzen - void SetTxtCollAttrs( _HTMLAttrContext *pContext = 0 ); + void SetTextCollAttrs( _HTMLAttrContext *pContext = 0 ); void InsertParaAttrs( const SfxItemSet& rItemSet ); @@ -574,7 +574,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient short& nIndent ) const; void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const; - void MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, bool bFmtBreak ); + void MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, bool bFormatBreak ); // Behandlung von Tags auf Absatz-Ebene @@ -585,8 +585,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient void EndHeading(); // <ADDRESS>, <BLOCKQUOTE> und <PRE> - void NewTxtFmtColl( int nToken, sal_uInt16 nPoolId ); - void EndTxtFmtColl( int nToken ); + void NewTextFormatColl( int nToken, sal_uInt16 nPoolId ); + void EndTextFormatColl( int nToken ); // <DIV> und <CENTER> void NewDivision( int nToken ); @@ -646,7 +646,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient void EndFontAttr( int nToken ); // Tags, die durch Zeichenvorlagen realisiert werden - void NewCharFmt( int nToken ); + void NewCharFormat( int nToken ); // <SDFIELD> public: @@ -680,11 +680,11 @@ private: const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrmItemSet ); - static void SetFrmFmtAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, + static void SetFrameFormatAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, sal_uInt16 nFlags, SfxItemSet &rFrmItemSet ); // Frames anlegen und Auto-gebundene Rahmen registrieren - void RegisterFlyFrm( SwFrmFmt *pFlyFrm ); + void RegisterFlyFrm( SwFrameFormat *pFlyFrm ); // Die Groesse des Fly-Frames an die Vorgaben und Gegebenheiten anpassen // (nicht fuer Grafiken, deshalb htmlplug.cxx) @@ -784,9 +784,9 @@ private: sal_Int16 eHoriOri, SfxItemSet& rCSS1ItemSet, SvxCSS1PropertyInfo& rCSS1PropInfo, - const SvxMacroTableDtor& rMacroTbl, - const std::vector<OUString>& rUnoMacroTbl, - const std::vector<OUString>& rUnoMacroParamTbl, + const SvxMacroTableDtor& rMacroTable, + const std::vector<OUString>& rUnoMacroTable, + const std::vector<OUString>& rUnoMacroParamTable, bool bSetPropSet = true, bool bHidden = false ); void SetControlSize( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rShape, const Size& rTextSz, @@ -928,9 +928,9 @@ struct SwPendingStack inline void _HTMLAttr::SetStart( const SwPosition& rPos ) { nSttPara = rPos.nNode; - nSttCntnt = rPos.nContent.GetIndex(); + nSttContent = rPos.nContent.GetIndex(); nEndPara = nSttPara; - nEndCntnt = nSttCntnt; + nEndContent = nSttContent; } inline void _HTMLAttrContext::SetMargins( sal_uInt16 nLeft, sal_uInt16 nRight, diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 6cc813d68b5a..ad50a1440578 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -102,7 +102,7 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) , pDfltColor(NULL) , pStartNdIdx(NULL) , pCurrPageDesc(NULL) - , pFmtFtn(NULL) + , pFormatFootnote(NULL) , nWarn(0) , nLastLFPos(0) , nLastParaToken(0) @@ -123,7 +123,7 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) , nDefListLvl(0) , nDefListMargin(0) , nHeaderFooterSpace(0) - , nTxtAttrsToIgnore(0) + , nTextAttrsToIgnore(0) , nExportMode(0) , nCSS1OutMode(0) , nCSS1Script(CSS1_OUTMODE_WESTERN) @@ -137,7 +137,7 @@ SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) , bCfgCpyLinkedGrfs( false ) , bFirstLine(true) , bTagOn( false ) - , bTxtAttr( false ) + , bTextAttr( false ) , bOutOpts( false ) , bOutTable( false ) , bOutHeader( false ) @@ -262,7 +262,7 @@ sal_uLong SwHTMLWriter::WriteStream() // die HTML-Vorlage holen bool bOldHTMLMode = false; - sal_uInt16 nOldTxtFmtCollCnt = 0, nOldCharFmtCnt = 0; + sal_uInt16 nOldTextFormatCollCnt = 0, nOldCharFormatCnt = 0; OSL_ENSURE( !pTemplate, "Wo kommt denn die HTML-Vorlage hier her?" ); pTemplate = static_cast<HTMLReader*>(ReadHTML)->GetTemplateDoc(); @@ -272,8 +272,8 @@ sal_uLong SwHTMLWriter::WriteStream() bOldHTMLMode = pTemplate->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE); pTemplate->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, true); - nOldTxtFmtCollCnt = pTemplate->GetTxtFmtColls()->size(); - nOldCharFmtCnt = pTemplate->GetCharFmts()->size(); + nOldTextFormatCollCnt = pTemplate->GetTextFormatColls()->size(); + nOldCharFormatCnt = pTemplate->GetCharFormats()->size(); } if( bShowProgress ) @@ -282,7 +282,7 @@ sal_uLong SwHTMLWriter::WriteStream() pDfltColor = 0; pFootEndNotes = 0; - pFmtFtn = 0; + pFormatFootnote = 0; bOutTable = bOutHeader = bOutFooter = bOutFlyFrame = false; pxFormComps = 0; nFormCntrlCnt = 0; @@ -301,10 +301,10 @@ sal_uLong SwHTMLWriter::WriteStream() nLastLFPos = 0; nDefListLvl = 0; nDefListMargin = ((pTemplate && !bCfgOutStyles) ? pTemplate : pDoc) - ->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_HTML_DD, false ) - ->GetLRSpace().GetTxtLeft(); + ->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_HTML_DD, false ) + ->GetLRSpace().GetTextLeft(); nHeaderFooterSpace = 0; - nTxtAttrsToIgnore = 0; + nTextAttrsToIgnore = 0; nCSS1OutMode = 0; SvtScriptType nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( GetAppLanguage() ); switch( nScript ) @@ -401,15 +401,15 @@ sal_uLong SwHTMLWriter::WriteStream() !pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && SfxItemState::SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) ) { - const SwFrmFmt *pHeaderFmt = - static_cast<const SwFmtHeader *>(pItem)->GetHeaderFmt(); - if( pHeaderFmt ) - OutHTML_HeaderFooter( *this, *pHeaderFmt, true ); + const SwFrameFormat *pHeaderFormat = + static_cast<const SwFormatHeader *>(pItem)->GetHeaderFormat(); + if( pHeaderFormat ) + OutHTML_HeaderFooter( *this, *pHeaderFormat, true ); } - nTxtAttrsToIgnore = nHeaderAttrs; + nTextAttrsToIgnore = nHeaderAttrs; Out_SwDoc( pOrigPam ); - nTxtAttrsToIgnore = 0; + nTextAttrsToIgnore = 0; if( pxFormComps && pxFormComps->is() ) OutForm( false, *pxFormComps ); @@ -421,10 +421,10 @@ sal_uLong SwHTMLWriter::WriteStream() (!pDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && !pDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)) && SfxItemState::SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) ) { - const SwFrmFmt *pFooterFmt = - static_cast<const SwFmtFooter *>(pItem)->GetFooterFmt(); - if( pFooterFmt ) - OutHTML_HeaderFooter( *this, *pFooterFmt, false ); + const SwFrameFormat *pFooterFormat = + static_cast<const SwFormatFooter *>(pItem)->GetFooterFormat(); + if( pFooterFormat ) + OutHTML_HeaderFooter( *this, *pFooterFormat, false ); } if( bLFPossible ) @@ -448,11 +448,11 @@ sal_uLong SwHTMLWriter::WriteStream() aHTMLControls.DeleteAndDestroyAll(); - if( !aChrFmtInfos.empty() ) - aChrFmtInfos.clear(); + if( !aChrFormatInfos.empty() ) + aChrFormatInfos.clear(); - if( !aTxtCollInfos.empty() ) - aTxtCollInfos.clear(); + if( !aTextCollInfos.empty() ) + aTextCollInfos.clear(); if(!aImgMapNames.empty()) aImgMapNames.clear(); @@ -478,7 +478,7 @@ sal_uLong SwHTMLWriter::WriteStream() pxFormComps = 0; OSL_ENSURE( !pFootEndNotes, - "SwHTMLWriter::Write: Ftns nicht durch OutFootEndNotes geloescht" ); + "SwHTMLWriter::Write: Footnotes nicht durch OutFootEndNotes geloescht" ); pCurrPageDesc = 0; @@ -496,17 +496,17 @@ sal_uLong SwHTMLWriter::WriteStream() { // Waehrend des Exports angelegte Zeichen- und Abastzvorlagen // loeschen - sal_uInt16 nTxtFmtCollCnt = pTemplate->GetTxtFmtColls()->size(); - while( nTxtFmtCollCnt > nOldTxtFmtCollCnt ) - pTemplate->DelTxtFmtColl( --nTxtFmtCollCnt ); - OSL_ENSURE( pTemplate->GetTxtFmtColls()->size() == nOldTxtFmtCollCnt, - "falsche Anzahl TxtFmtColls geloescht" ); - - sal_uInt16 nCharFmtCnt = pTemplate->GetCharFmts()->size(); - while( nCharFmtCnt > nOldCharFmtCnt ) - pTemplate->DelCharFmt( --nCharFmtCnt ); - OSL_ENSURE( pTemplate->GetCharFmts()->size() == nOldCharFmtCnt, - "falsche Anzahl CharFmts geloescht" ); + sal_uInt16 nTextFormatCollCnt = pTemplate->GetTextFormatColls()->size(); + while( nTextFormatCollCnt > nOldTextFormatCollCnt ) + pTemplate->DelTextFormatColl( --nTextFormatCollCnt ); + OSL_ENSURE( pTemplate->GetTextFormatColls()->size() == nOldTextFormatCollCnt, + "falsche Anzahl TextFormatColls geloescht" ); + + sal_uInt16 nCharFormatCnt = pTemplate->GetCharFormats()->size(); + while( nCharFormatCnt > nOldCharFormatCnt ) + pTemplate->DelCharFormat( --nCharFormatCnt ); + OSL_ENSURE( pTemplate->GetCharFormats()->size() == nOldCharFormatCnt, + "falsche Anzahl CharFormats geloescht" ); // HTML-Modus wieder restaurieren pTemplate->getIDocumentSettingAccess().set(DocumentSettingId::HTML_MODE, bOldHTMLMode); @@ -520,17 +520,17 @@ sal_uLong SwHTMLWriter::WriteStream() return nWarn; } -static const SwFmtCol *lcl_html_GetFmtCol( const SwSection& rSection, - const SwSectionFmt& rFmt ) +static const SwFormatCol *lcl_html_GetFormatCol( const SwSection& rSection, + const SwSectionFormat& rFormat ) { - const SwFmtCol *pCol = 0; + const SwFormatCol *pCol = 0; const SfxPoolItem* pItem; if( FILE_LINK_SECTION != rSection.GetType() && - SfxItemState::SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) && - static_cast<const SwFmtCol *>(pItem)->GetNumCols() > 1 ) + SfxItemState::SET == rFormat.GetAttrSet().GetItemState(RES_COL,false,&pItem) && + static_cast<const SwFormatCol *>(pItem)->GetNumCols() > 1 ) { - pCol = static_cast<const SwFmtCol *>(pItem); + pCol = static_cast<const SwFormatCol *>(pItem); } return pCol; @@ -544,8 +544,8 @@ static bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nI if( pSectNd ) { const SwSection& rSection = pSectNd->GetSection(); - const SwSectionFmt *pFmt = rSection.GetFmt(); - if( pFmt && lcl_html_GetFmtCol( rSection, *pFmt ) ) + const SwSectionFormat *pFormat = rSection.GetFormat(); + if( pFormat && lcl_html_GetFormatCol( rSection, *pFormat ) ) bRet = true; } @@ -565,8 +565,8 @@ static bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nInd static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, const SwSection& rSection, - const SwSectionFmt& rFmt, - const SwFmtCol *pCol, + const SwSectionFormat& rFormat, + const SwFormatCol *pCol, bool bContinued=false ) { OSL_ENSURE( pCol || !bContinued, "Continuation of DIV" ); @@ -586,7 +586,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, sOut.append('\"'); } - sal_uInt16 nDir = rHTMLWrt.GetHTMLDirection( rFmt.GetAttrSet() ); + sal_uInt16 nDir = rHTMLWrt.GetHTMLDirection( rFormat.GetAttrSet() ); rHTMLWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); rHTMLWrt.OutDirection( nDir ); @@ -650,7 +650,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, rHTMLWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); if( rHTMLWrt.IsHTMLMode( rHTMLWrt.bCfgOutStyles ? HTMLMODE_ON : 0 ) ) - rHTMLWrt.OutCSS1_SectionFmtOptions( rFmt, pCol ); + rHTMLWrt.OutCSS1_SectionFormatOptions( rFormat, pCol ); rHTMLWrt.Strm().WriteChar( '>' ); @@ -680,19 +680,19 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) rHTMLWrt.OutAndSetDefList( 0 ); const SwSection& rSection = rSectNd.GetSection(); - const SwSectionFmt *pFmt = rSection.GetFmt(); - OSL_ENSURE( pFmt, "Section without a format?" ); + const SwSectionFormat *pFormat = rSection.GetFormat(); + OSL_ENSURE( pFormat, "Section without a format?" ); bool bStartTag = true; bool bEndTag = true; - const SwSectionFmt *pSurrFmt = 0; + const SwSectionFormat *pSurrFormat = 0; const SwSectionNode *pSurrSectNd = 0; const SwSection *pSurrSection = 0; - const SwFmtCol *pSurrCol = 0; + const SwFormatCol *pSurrCol = 0; sal_uInt32 nSectSttIdx = rSectNd.GetIndex(); sal_uInt32 nSectEndIdx = rSectNd.EndOfSectionIndex(); - const SwFmtCol *pCol = lcl_html_GetFmtCol( rSection, *pFmt ); + const SwFormatCol *pCol = lcl_html_GetFormatCol( rSection, *pFormat ); if( pCol ) { // If the next node is a columned section node, too, don't export @@ -716,10 +716,10 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) pBoxSttNd->GetIndex() < pSurrSectNd->GetIndex() ) { pSurrSection = &pSurrSectNd->GetSection(); - pSurrFmt = pSurrSection->GetFmt(); - if( pSurrFmt ) - pSurrCol = lcl_html_GetFmtCol( *pSurrSection, - *pSurrFmt ); + pSurrFormat = pSurrSection->GetFormat(); + if( pSurrFormat ) + pSurrCol = lcl_html_GetFormatCol( *pSurrSection, + *pSurrFormat ); } } } @@ -733,13 +733,13 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) lcl_html_OutSectionEndTag( rHTMLWrt ); if( bStartTag ) - lcl_html_OutSectionStartTag( rHTMLWrt, rSection, *pFmt, pCol ); + lcl_html_OutSectionStartTag( rHTMLWrt, rSection, *pFormat, pCol ); { HTMLSaveData aSaveData( rHTMLWrt, rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex()+1, rSectNd.EndOfSectionIndex(), - false, pFmt ); + false, pFormat ); rHTMLWrt.Out_SwDoc( rHTMLWrt.pCurPam ); } @@ -753,7 +753,7 @@ static Writer& OutHTML_Section( Writer& rWrt, const SwSectionNode& rSectNd ) if( pSurrCol && pSurrSectNd->EndOfSectionIndex() - nSectEndIdx > 1 && !lcl_html_IsMultiColStart( rHTMLWrt, nSectEndIdx+1 ) ) - lcl_html_OutSectionStartTag( rHTMLWrt, *pSurrSection, *pSurrFmt, + lcl_html_OutSectionStartTag( rHTMLWrt, *pSurrSection, *pSurrFormat, pSurrCol, true ); return rWrt; @@ -782,18 +782,18 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) OSL_ENSURE( !(rNd.IsGrfNode() || rNd.IsOLENode()), "Grf- oder OLE-Node hier unerwartet" ); - if( rNd.IsTxtNode() ) + if( rNd.IsTextNode() ) { - SwTxtNode* pTxtNd = rNd.GetTxtNode(); + SwTextNode* pTextNd = rNd.GetTextNode(); if( !bFirstLine ) - pCurPam->GetPoint()->nContent.Assign( pTxtNd, 0 ); + pCurPam->GetPoint()->nContent.Assign( pTextNd, 0 ); - OutHTML_SwTxtNode( *this, *pTxtNd ); + OutHTML_SwTextNode( *this, *pTextNd ); } else if( rNd.IsTableNode() ) { - OutHTML_SwTblNode( *this, *rNd.GetTableNode(), 0 ); + OutHTML_SwTableNode( *this, *rNd.GetTableNode(), 0 ); nBkmkTabPos = bWriteAll ? FindPos_Bkmk( *pCurPam->GetPoint() ) : -1; } else if( rNd.IsSectionNode() ) @@ -831,23 +831,23 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) } // schreibe die StyleTabelle, algemeine Angaben,Header/Footer/Footnotes -static void OutBodyColor( const sal_Char* pTag, const SwFmt *pFmt, +static void OutBodyColor( const sal_Char* pTag, const SwFormat *pFormat, SwHTMLWriter& rHWrt ) { - const SwFmt *pRefFmt = 0; + const SwFormat *pRefFormat = 0; if( rHWrt.pTemplate ) - pRefFmt = SwHTMLWriter::GetTemplateFmt( pFmt->GetPoolFmtId(), + pRefFormat = SwHTMLWriter::GetTemplateFormat( pFormat->GetPoolFormatId(), &rHWrt.pTemplate->getIDocumentStylePoolAccess() ); const SvxColorItem *pColorItem = 0; - const SfxItemSet& rItemSet = pFmt->GetAttrSet(); + const SfxItemSet& rItemSet = pFormat->GetAttrSet(); const SfxPoolItem *pRefItem = 0, *pItem = 0; bool bItemSet = SfxItemState::SET == rItemSet.GetItemState( RES_CHRATR_COLOR, true, &pItem); - bool bRefItemSet = pRefFmt && - SfxItemState::SET == pRefFmt->GetAttrSet().GetItemState( RES_CHRATR_COLOR, + bool bRefItemSet = pRefFormat && + SfxItemState::SET == pRefFormat->GetAttrSet().GetItemState( RES_CHRATR_COLOR, true, &pRefItem); if( bItemSet ) { @@ -891,7 +891,7 @@ static void OutBodyColor( const sal_Char* pTag, const SwFmt *pFmt, if( COL_AUTO == aColor.GetColor() ) aColor.SetColor( COL_BLACK ); HTMLOutFuncs::Out_Color( rHWrt.Strm(), aColor, rHWrt.eDestEnc ); - if( RES_POOLCOLL_STANDARD==pFmt->GetPoolFmtId() ) + if( RES_POOLCOLL_STANDARD==pFormat->GetPoolFormatId() ) rHWrt.pDfltColor = new Color( aColor ); } } @@ -901,21 +901,21 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs() sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex(); sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex(); - SwTxtNode *pTxtNd = 0; + SwTextNode *pTextNd = 0; while( nIdx<=nEndIdx && - 0==(pTxtNd=pDoc->GetNodes()[nIdx]->GetTxtNode()) ) + 0==(pTextNd=pDoc->GetNodes()[nIdx]->GetTextNode()) ) nIdx++; - OSL_ENSURE( pTxtNd, "Kein Text-Node gefunden" ); - if( !pTxtNd || !pTxtNd->HasHints() ) + OSL_ENSURE( pTextNd, "Kein Text-Node gefunden" ); + if( !pTextNd || !pTextNd->HasHints() ) return 0; sal_uInt16 nAttrs = 0; - const size_t nCntAttr = pTxtNd->GetSwpHints().Count(); + const size_t nCntAttr = pTextNd->GetSwpHints().Count(); sal_Int32 nOldPos = 0; for( size_t i=0; i<nCntAttr; ++i ) { - const SwTxtAttr *pHt = pTxtNd->GetSwpHints()[i]; + const SwTextAttr *pHt = pTextNd->GetSwpHints()[i]; if( !pHt->End() ) { sal_Int32 nPos = pHt->GetStart(); @@ -924,14 +924,14 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs() && pHt->Which() != RES_TXTATR_ANNOTATION ) ) break; - const sal_uInt16 nFldWhich = - static_cast<const SwFmtFld&>(pHt->GetAttr()).GetField()->GetTyp()->Which(); - if( RES_POSTITFLD!=nFldWhich && - RES_SCRIPTFLD!=nFldWhich ) + const sal_uInt16 nFieldWhich = + static_cast<const SwFormatField&>(pHt->GetAttr()).GetField()->GetTyp()->Which(); + if( RES_POSTITFLD!=nFieldWhich && + RES_SCRIPTFLD!=nFieldWhich ) break; OutNewLine(); - OutHTML_SwFmtFld( *this, pHt->GetAttr() ); + OutHTML_SwFormatField( *this, pHt->GetAttr() ); nOldPos = nPos; OSL_ENSURE( nAttrs<SAL_MAX_UINT16, "Too many attributes" ); nAttrs++; @@ -990,15 +990,15 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) while( nNodeIdx < pDoc->GetNodes().Count() ) { SwNode *pNd = pDoc->GetNodes()[ nNodeIdx ]; - if( pNd->IsCntntNode() ) + if( pNd->IsContentNode() ) { - pPageDesc = static_cast<const SwFmtPageDesc &>(pNd->GetCntntNode() + pPageDesc = static_cast<const SwFormatPageDesc &>(pNd->GetContentNode() ->GetAttr(RES_PAGEDESC)).GetPageDesc(); break; } else if( pNd->IsTableNode() ) { - pPageDesc = pNd->GetTableNode()->GetTable().GetFrmFmt() + pPageDesc = pNd->GetTableNode()->GetTable().GetFrameFormat() ->GetPageDesc().GetPageDesc(); break; } @@ -1036,15 +1036,15 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // Textfarbe ausgeben, wenn sie an der Standard-Vorlage gesetzt ist // und sich geaendert hat. OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_text, - pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false ), + pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD, false ), *this ); // Farben fuer (un)besuchte Links OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_link, - pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL ), + pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_NORMAL ), *this ); OutBodyColor( OOO_STRING_SVTOOLS_HTML_O_vlink, - pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( RES_POOLCHR_INET_VISIT ), + pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( RES_POOLCHR_INET_VISIT ), *this ); const SfxItemSet& rItemSet = pPageDesc->GetMaster().GetAttrSet(); @@ -1407,7 +1407,7 @@ sal_Int32 SwHTMLWriter::indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& r // einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, sal_uLong nEnd, bool bSaveNum, - const SwFrmFmt *pFrmFmt) + const SwFrameFormat *pFrameFormat) : rWrt(rWriter) , pOldPam(rWrt.pCurPam) , pOldEnd(rWrt.GetEndPaM()) @@ -1418,7 +1418,7 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, , bOldOutHeader(rWrt.bOutHeader) , bOldOutFooter(rWrt.bOutFooter) , bOldOutFlyFrame(rWrt.bOutFlyFrame) - , pOldFlyFmt(NULL) + , pOldFlyFormat(NULL) { bOldWriteAll = rWrt.bWriteAll; @@ -1455,8 +1455,8 @@ HTMLSaveData::HTMLSaveData(SwHTMLWriter& rWriter, sal_uLong nStt, // Die Numerierung wird in jedem Fall unterbrochen. rWrt.GetNumInfo().Clear(); - if( pFrmFmt ) - rWrt.nDirection = rWrt.GetHTMLDirection( pFrmFmt->GetAttrSet() ); + if( pFrameFormat ) + rWrt.nDirection = rWrt.GetHTMLDirection( pFrameFormat->GetAttrSet() ); } HTMLSaveData::~HTMLSaveData() diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index b60d32e28c74..3cc109c49e4e 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -35,12 +35,12 @@ // einige Forward Deklarationen class Color; -class SwFrmFmt; -class SwFlyFrmFmt; -class SwDrawFrmFmt; -class SwFmtINetFmt; -class SwFmtVertOrient; -class SwFmtFtn; +class SwFrameFormat; +class SwFlyFrameFormat; +class SwDrawFrameFormat; +class SwFormatINetFormat; +class SwFormatVertOrient; +class SwFormatFootnote; class SwStartNode; class SwTableNode; class SwPageDesc; @@ -53,9 +53,9 @@ class SvxBrushItem; class SvxFontItem; class SwHTMLNumRuleInfo; class SwHTMLPosFlyFrms; -class SwTxtFtn; +class SwTextFootnote; -typedef std::vector<SwTxtFtn*> SwHTMLTxtFtns; +typedef std::vector<SwTextFootnote*> SwHTMLTextFootnotes; extern SwAttrFnTab aHTMLAttrFnTab; @@ -208,12 +208,12 @@ public: ~HTMLControls() { DeleteAndDestroyAll(); } }; -typedef std::vector<SwFmtINetFmt*> INetFmts; +typedef std::vector<SwFormatINetFormat*> INetFormats; -struct SwHTMLFmtInfo +struct SwHTMLFormatInfo { - const SwFmt *pFmt; // das Format selbst - const SwFmt *pRefFmt; // das Vergleichs-Format + const SwFormat *pFormat; // das Format selbst + const SwFormat *pRefFormat; // das Vergleichs-Format OString aToken; // das auszugebende Token OUString aClass; // die auszugebende Klasse @@ -230,9 +230,9 @@ struct SwHTMLFmtInfo bool bScriptDependent; // Konstruktor fuer einen Dummy zum Suchen - SwHTMLFmtInfo( const SwFmt *pF ) : - pFmt( pF ), - pRefFmt(0), + SwHTMLFormatInfo( const SwFormat *pF ) : + pFormat( pF ), + pRefFormat(0), pItemSet( 0 ), nLeftMargin( 0 ), nRightMargin( 0 ), @@ -243,27 +243,27 @@ struct SwHTMLFmtInfo {} // Konstruktor zum Erstellen der Format-Info - SwHTMLFmtInfo( const SwFmt *pFmt, SwDoc *pDoc, SwDoc *pTemlate, + SwHTMLFormatInfo( const SwFormat *pFormat, SwDoc *pDoc, SwDoc *pTemlate, bool bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW, sal_uInt16 nScript=CSS1_OUTMODE_ANY_SCRIPT, bool bHardDrop=false ); - ~SwHTMLFmtInfo(); + ~SwHTMLFormatInfo(); - friend bool operator==( const SwHTMLFmtInfo& rInfo1, - const SwHTMLFmtInfo& rInfo2 ) + friend bool operator==( const SwHTMLFormatInfo& rInfo1, + const SwHTMLFormatInfo& rInfo2 ) { - return reinterpret_cast<sal_IntPtr>(rInfo1.pFmt) == reinterpret_cast<sal_IntPtr>(rInfo2.pFmt); + return reinterpret_cast<sal_IntPtr>(rInfo1.pFormat) == reinterpret_cast<sal_IntPtr>(rInfo2.pFormat); } - friend bool operator<( const SwHTMLFmtInfo& rInfo1, - const SwHTMLFmtInfo& rInfo2 ) + friend bool operator<( const SwHTMLFormatInfo& rInfo1, + const SwHTMLFormatInfo& rInfo2 ) { - return reinterpret_cast<sal_IntPtr>(rInfo1.pFmt) < reinterpret_cast<sal_IntPtr>(rInfo2.pFmt); + return reinterpret_cast<sal_IntPtr>(rInfo1.pFormat) < reinterpret_cast<sal_IntPtr>(rInfo2.pFormat); } }; -typedef boost::ptr_set<SwHTMLFmtInfo> SwHTMLFmtInfos; +typedef boost::ptr_set<SwHTMLFormatInfo> SwHTMLFormatInfos; class IDocumentStylePoolAccess; @@ -296,10 +296,10 @@ public: std::vector<OUString> aOutlineMarks; std::vector<sal_uInt32> aOutlineMarkPoss; HTMLControls aHTMLControls; // die zu schreibenden Forms - SwHTMLFmtInfos aChrFmtInfos; - SwHTMLFmtInfos aTxtCollInfos; - INetFmts aINetFmts; // die "offenen" INet-Attribute - SwHTMLTxtFtns *pFootEndNotes; + SwHTMLFormatInfos aChrFormatInfos; + SwHTMLFormatInfos aTextCollInfos; + INetFormats aINetFormats; // die "offenen" INet-Attribute + SwHTMLTextFootnotes *pFootEndNotes; OUString aCSS1Selector; // der Selektor eines Styles OUString aNonConvertableCharacters; @@ -311,7 +311,7 @@ public: Color *pDfltColor; // default Farbe SwNodeIndex *pStartNdIdx; // Index des ersten Absatz const SwPageDesc *pCurrPageDesc;// Die aktuelle Seiten-Vorlage - const SwFmtFtn *pFmtFtn; + const SwFormatFootnote *pFormatFootnote; sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7 @@ -336,7 +336,7 @@ public: sal_uInt16 nDefListLvl; // welcher DL-Level existiert gerade sal_Int32 nDefListMargin; // Wie weit wird in DL eingerueckt sal_uInt16 nHeaderFooterSpace; - sal_uInt16 nTxtAttrsToIgnore; + sal_uInt16 nTextAttrsToIgnore; sal_uInt16 nExportMode; sal_uInt16 nCSS1OutMode; sal_uInt16 nCSS1Script; // contains default script (that's the one @@ -360,14 +360,14 @@ public: bool bTagOn : 1; // Tag an oder aus/Attr-Start oder -Ende // Die folgenden beiden Flags geben an, wir Attribute exportiert werden: - // bTxtAttr bOutOpts + // bTextAttr bOutOpts // 0 0 Style-Sheets // 1 0 Hints: Jedes Attribut wird als eignes Tag // geschrieben und es gibt ein End-Tag // 0 1 (Absatz-)Attribute: Das Attribut wird als Option // eines bereits geschrieben Tags exportiert. Es // gibt kein End-Tag. - bool bTxtAttr : 1; + bool bTextAttr : 1; // 8 bool bOutOpts : 1; @@ -423,9 +423,9 @@ public: void OutHyperlinkHRefValue( const OUString& rURL ); // gebe die evt. an der akt. Position stehenden FlyFrame aus. - bool OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nCntntIdx, + bool OutFlyFrm( sal_uLong nNdIdx, sal_Int32 nContentIdx, sal_uInt8 nPos, HTMLOutContext *pContext = 0 ); - void OutFrmFmt( sal_uInt8 nType, const SwFrmFmt& rFmt, + void OutFrameFormat( sal_uInt8 nType, const SwFrameFormat& rFormat, const SdrObject *pSdrObj ); void OutForm( bool bTagOn=true, const SwStartNode *pStNd=0 ); @@ -439,8 +439,8 @@ public: void OutFootEndNoteInfo(); void OutFootEndNotes(); - OUString GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ); - void OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, const OUString& rNum, + OUString GetFootEndNoteSym( const SwFormatFootnote& rFormatFootnote ); + void OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote, const OUString& rNum, sal_uInt16 nScript ); void OutBasic(); @@ -476,18 +476,18 @@ public: // ALT/ALIGN/WIDTH/HEIGHT/HSPACE/VSPACE-Optionen des aktuellen // Frame-Formats ausgeben und ggf. ein <BR CLEAR=...> vorne an // rEndTags anhaengen - OString OutFrmFmtOptions( const SwFrmFmt& rFrmFmt, const OUString& rAltTxt, + OString OutFrameFormatOptions( const SwFrameFormat& rFrameFormat, const OUString& rAltText, sal_uInt32 nFrmOpts, const OString& rEndTags = OString() ); - void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rFrmFmt, const OUString& rAltTxt, sal_uInt32 nFrmOpts); + void writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrameFormat& rFrameFormat, const OUString& rAltText, sal_uInt32 nFrmOpts); - void OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt ); - void OutCSS1_TableCellBorderHack(const SwFrmFmt& rFrmFmt); - void OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt, const SwFmtCol *pCol ); - void OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt, sal_uInt32 nFrmOpts, + void OutCSS1_TableFrameFormatOptions( const SwFrameFormat& rFrameFormat ); + void OutCSS1_TableCellBorderHack(const SwFrameFormat& rFrameFormat); + void OutCSS1_SectionFormatOptions( const SwFrameFormat& rFrameFormat, const SwFormatCol *pCol ); + void OutCSS1_FrameFormatOptions( const SwFrameFormat& rFrameFormat, sal_uInt32 nFrmOpts, const SdrObject *pSdrObj=0, const SfxItemSet *pItemSet=0 ); - void OutCSS1_FrmFmtBackground( const SwFrmFmt& rFrmFmt ); + void OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFormat ); void ChangeParaToken( sal_uInt16 nNew ); @@ -513,7 +513,7 @@ public: static sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ); - sal_uInt16 GuessFrmType( const SwFrmFmt& rFrmFmt, + sal_uInt16 GuessFrmType( const SwFrameFormat& rFrameFormat, const SdrObject*& rpStrObj ); static sal_uInt16 GuessOLENodeFrmType( const SwNode& rNd ); @@ -537,14 +537,14 @@ public: // Die Numerierungs-Information des naeschten Absatz loeschen. void ClearNextNumInfo(); - static const SdrObject* GetHTMLControl( const SwDrawFrmFmt& rFmt ); - static const SdrObject* GetMarqueeTextObj( const SwDrawFrmFmt& rFmt ); - static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, OString& rToken, + static const SdrObject* GetHTMLControl( const SwDrawFrameFormat& rFormat ); + static const SdrObject* GetMarqueeTextObj( const SwDrawFrameFormat& rFormat ); + static sal_uInt16 GetCSS1Selector( const SwFormat *pFormat, OString& rToken, OUString& rClass, sal_uInt16& rRefPoolId, OUString *pPseudo=0 ); - static const SwFmt *GetTemplateFmt( sal_uInt16 nPoolId, IDocumentStylePoolAccess* /*SwDoc*/ pTemplate ); - static const SwFmt *GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep ); + static const SwFormat *GetTemplateFormat( sal_uInt16 nPoolId, IDocumentStylePoolAccess* /*SwDoc*/ pTemplate ); + static const SwFormat *GetParentFormat( const SwFormat& rFormat, sal_uInt16 nDeep ); static void SubtractItemSet( SfxItemSet& rItemSet, const SfxItemSet& rRefItemSet, @@ -572,7 +572,7 @@ public: inline bool IsCSS1Source( sal_uInt16 n ) const; inline bool IsCSS1Script( sal_uInt16 n ) const; - static const sal_Char *GetNumFormat( sal_uInt16 nFmt ); + static const sal_Char *GetNumFormat( sal_uInt16 nFormat ); static void PrepareFontList( const SvxFontItem& rFontItem, OUString& rNames, sal_Unicode cQuote, bool bGeneric ); static sal_uInt16 GetCSS1ScriptForScriptType( sal_uInt16 nScriptType ); @@ -580,7 +580,7 @@ public: FieldUnit GetCSS1Unit() const { return eCSS1Unit; } - sal_Int32 indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& rTxt ); + sal_Int32 indexOfDotLeaders( sal_uInt16 nPoolId, const OUString& rText ); }; inline bool SwHTMLWriter::IsCSS1Source( sal_uInt16 n ) const @@ -631,34 +631,34 @@ struct HTMLSaveData bool bOldOutHeader : 1; bool bOldOutFooter : 1; bool bOldOutFlyFrame : 1; - const SwFlyFrmFmt* pOldFlyFmt; + const SwFlyFrameFormat* pOldFlyFormat; HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd, bool bSaveNum=true, - const SwFrmFmt *pFrmFmt=0 ); + const SwFrameFormat *pFrameFormat=0 ); ~HTMLSaveData(); }; // einige Funktions-Deklarationen -Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFmt, +Writer& OutHTML_FrameFormatOLENode( Writer& rWrt, const SwFrameFormat& rFormat, bool bInCntnr ); -Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFmt, +Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, const SwFrameFormat& rFormat, bool bInCntnr ); -Writer& OutHTML_SwTxtNode( Writer&, const SwCntntNode& ); -Writer& OutHTML_SwTblNode( Writer& , SwTableNode &, const SwFrmFmt *, +Writer& OutHTML_SwTextNode( Writer&, const SwContentNode& ); +Writer& OutHTML_SwTableNode( Writer& , SwTableNode &, const SwFrameFormat *, const OUString* pCaption=0, bool bTopCaption=false ); -Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, const SwDrawFrmFmt& rFmt, +Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt, const SwDrawFrameFormat& rFormat, const SdrUnoObj& rSdrObj, bool bInCntnr ); -Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt, const SwDrawFrmFmt& rFmt, +Writer& OutHTML_DrawFrameFormatAsMarquee( Writer& rWrt, const SwDrawFrameFormat& rFormat, const SdrObject& rSdrObj ); -Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, +Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrameFormat& rFrameFormat, bool bHeader ); -Writer& OutHTML_Image( Writer&, const SwFrmFmt& rFmt, - Graphic& rGraphic, const OUString& rAlternateTxt, +Writer& OutHTML_Image( Writer&, const SwFrameFormat& rFormat, + Graphic& rGraphic, const OUString& rAlternateText, const Size& rRealSize, sal_uInt32 nFrmOpts, const sal_Char *pMarkType = 0, const ImageMap *pGenImgMap = 0 ); @@ -666,9 +666,9 @@ Writer& OutHTML_Image( Writer&, const SwFrmFmt& rFmt, Writer& OutHTML_BulletImage( Writer& rWrt, const sal_Char *pTag, const SvxBrushItem* pBrush ); -Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt ); -Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt ); -Writer& OutHTML_INetFmt( Writer&, const SwFmtINetFmt& rINetFmt, bool bOn ); +Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ); +Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt ); +Writer& OutHTML_INetFormat( Writer&, const SwFormatINetFormat& rINetFormat, bool bOn ); Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet ); Writer& OutCSS1_ParaTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet ); diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx index f89c4f96aa12..26a63f81bfef 100644 --- a/sw/source/filter/inc/fltini.hxx +++ b/sw/source/filter/inc/fltini.hxx @@ -21,9 +21,9 @@ #include <shellio.hxx> -class SwNumRuleTbl; +class SwNumRuleTable; class SwDoc; -class SwTxtNode; +class SwTextNode; class SwNumRule; class SwNodeIndex; @@ -64,7 +64,7 @@ void GetWW8Writer( const OUString&, const OUString&, WriterRef& ); // Absatz-Einzug abgezogen werden muss. class SW_DLLPUBLIC SwRelNumRuleSpaces { - SwNumRuleTbl* pNumRuleTbl; // Liste aller benannten NumRules + SwNumRuleTable* pNumRuleTable; // Liste aller benannten NumRules public: SwRelNumRuleSpaces( SwDoc& rDoc, bool bNewDoc ); diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx index 94301c82bd8c..57fd9f5df436 100644 --- a/sw/source/filter/inc/fltshell.hxx +++ b/sw/source/filter/inc/fltshell.hxx @@ -58,40 +58,40 @@ struct SW_DLLPUBLIC SwFltPosition { public: SwNodeIndex m_nNode; - sal_Int32 m_nCntnt; + sal_Int32 m_nContent; public: SwFltPosition(const SwFltPosition &rOther) : m_nNode(rOther.m_nNode) - , m_nCntnt(rOther.m_nCntnt) + , m_nContent(rOther.m_nContent) { } SwFltPosition &operator=(const SwFltPosition &rOther) { m_nNode = rOther.m_nNode; - m_nCntnt = rOther.m_nCntnt; + m_nContent = rOther.m_nContent; return *this; } bool operator==(const SwFltPosition &rOther) const { - return (m_nCntnt == rOther.m_nCntnt && + return (m_nContent == rOther.m_nContent && m_nNode == rOther.m_nNode); } void SetPos(SwNodeIndex &rNode, sal_uInt16 nIdx) { m_nNode = rNode; - m_nCntnt = nIdx; + m_nContent = nIdx; } //operators with SwPosition, where the node is hacked to the previous one, //and the offset to content is de-dynamic-ified SwFltPosition(const SwPosition &rPos) : m_nNode(rPos.nNode, -1) - , m_nCntnt(rPos.nContent.GetIndex()) + , m_nContent(rPos.nContent.GetIndex()) { } void SetPos(const SwPosition &rPos) { m_nNode = rPos.nNode.GetIndex()-1; - m_nCntnt = rPos.nContent.GetIndex(); + m_nContent = rPos.nContent.GetIndex(); } }; @@ -184,7 +184,7 @@ public: void StealAttr(const SwNodeIndex& rNode, sal_uInt16 nAttrId = 0); void MarkAllAttrsOld(); void KillUnlockedAttrs(const SwPosition& pPos); - SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0); + SfxPoolItem* GetFormatStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0); const SfxPoolItem* GetOpenStackAttr(const SwPosition& rPos, sal_uInt16 nWhich); void Delete(const SwPaM &rPam); @@ -199,20 +199,20 @@ class SwFltAnchorClient; class SW_DLLPUBLIC SwFltAnchor : public SfxPoolItem { - SwFrmFmt* pFrmFmt; + SwFrameFormat* pFrameFormat; SwFltAnchorClient * pClient; public: - SwFltAnchor(SwFrmFmt* pFlyFmt); + SwFltAnchor(SwFrameFormat* pFlyFormat); SwFltAnchor(const SwFltAnchor&); virtual ~SwFltAnchor(); // "pure virtual Methoden" vom SfxPoolItem virtual bool operator==(const SfxPoolItem&) const SAL_OVERRIDE; virtual SfxPoolItem* Clone(SfxItemPool* = 0) const SAL_OVERRIDE; - void SetFrmFmt(SwFrmFmt * _pFrmFmt); - const SwFrmFmt* GetFrmFmt() const { return pFrmFmt;} - SwFrmFmt* GetFrmFmt() { return pFrmFmt;} + void SetFrameFormat(SwFrameFormat * _pFrameFormat); + const SwFrameFormat* GetFrameFormat() const { return pFrameFormat;} + SwFrameFormat* GetFrameFormat() { return pFrameFormat;} }; class SwFltAnchorClient : public SwClient diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index dec1cc891b10..069e6b6ec1d6 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -39,8 +39,8 @@ class SwDoc; class SwPaM; class SwTableNode; class SwNodeIndex; -class SwNoTxtNode; -class SwTxtNode; +class SwNoTextNode; +class SwTextNode; class WW8TabDesc; namespace myImplHelpers @@ -48,10 +48,10 @@ namespace myImplHelpers template<class C> class StyleMapperImpl; } -class SwTxtFmtColl; -class SwCharFmt; -typedef myImplHelpers::StyleMapperImpl<SwTxtFmtColl> ParaMapper; -typedef myImplHelpers::StyleMapperImpl<SwCharFmt> CharMapper; +class SwTextFormatColl; +class SwCharFormat; +typedef myImplHelpers::StyleMapperImpl<SwTextFormatColl> ParaMapper; +typedef myImplHelpers::StyleMapperImpl<SwCharFormat> CharMapper; namespace sw { @@ -129,7 +129,7 @@ namespace sw @author <a href="mailto:mmaher@openoffice.org">Martin Maher</a */ - void SwapQuotesInField(OUString &rFmt); + void SwapQuotesInField(OUString &rFormat); } @@ -191,7 +191,7 @@ namespace sw StyleResult is a std::pair of a pointer to a style and a flag which is true if the style existed previously in the document. */ - typedef std::pair<SwTxtFmtColl*, bool> StyleResult; + typedef std::pair<SwTextFormatColl*, bool> StyleResult; /** Get the writer style which the word style should map to @@ -251,7 +251,7 @@ namespace sw StyleResult is a std::pair of a pointer to a style and a flag which is true if the style existed previously in the document. */ - typedef std::pair<SwCharFmt*, bool> StyleResult; + typedef std::pair<SwCharFormat*, bool> StyleResult; /** Get the writer style which the word style should map to @@ -311,7 +311,7 @@ namespace sw their layout frms deleted and recalculated. This TableManager detects the necessity to do this, and all tables inserted into a document should be registered with this manager with - InsertTable, and before finialization DelAndMakeTblFrms should + InsertTable, and before finialization DelAndMakeTableFrms should be called. @author @@ -322,14 +322,14 @@ namespace sw class InsertedTablesManager { public: - typedef std::map<InsertedTableClient *, SwNodeIndex *> TblMap; - typedef TblMap::iterator TblMapIter; - void DelAndMakeTblFrms(); + typedef std::map<InsertedTableClient *, SwNodeIndex *> TableMap; + typedef TableMap::iterator TableMapIter; + void DelAndMakeTableFrms(); void InsertTable(SwTableNode &rTableNode, SwPaM &rPaM); InsertedTablesManager(const SwDoc &rDoc); private: bool mbHasRoot; - TblMap maTables; + TableMap maTables; }; /** @@ -439,11 +439,11 @@ namespace sw So this function finds these ranges and returns a STL container of CharRuns - @param rTxtNd + @param rTextNd The TextNode we want to ranges from @param nStart - The position in the TxtNode to start processing from + The position in the TextNode to start processing from @param bSplitOnCharSet Set to true is we want to split on ranges of characters that @@ -459,7 +459,7 @@ namespace sw @see #i22537# for example */ - CharRuns GetPseudoCharRuns(const SwTxtNode& rTxtNd, + CharRuns GetPseudoCharRuns(const SwTextNode& rTextNd, sal_Int32 nStart = 0, bool bSplitOnCharSet = false); } } diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx index 4a3ccf22fb31..828c4f99d965 100644 --- a/sw/source/filter/inc/wrt_fn.hxx +++ b/sw/source/filter/inc/wrt_fn.hxx @@ -22,7 +22,7 @@ // einige Forward-Deklarationen class SwNode; -class SwCntntNode; +class SwContentNode; class Writer; class SfxPoolItem; class SfxItemSet; @@ -46,7 +46,7 @@ RES_NODE_BEGIN = 0, RES_NODE_END }; -typedef Writer& (*FnNodeOut)( Writer&, SwCntntNode& ); +typedef Writer& (*FnNodeOut)( Writer&, SwContentNode& ); typedef FnNodeOut SwNodeFnTab[ RES_NODE_END - RES_NODE_BEGIN ]; SW_DLLPUBLIC Writer& Out( const SwNodeFnTab, SwNode&, Writer & rWrt ); diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index fa50d3c03eb5..6af8e2edf6ed 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -235,7 +235,7 @@ protected: sal_uInt16 nBorder; // Dicke der ausseren Umrandung sal_uInt16 nInnerBorder; // Dicke der inneren Umrandung - sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize + sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFormatFrmSize sal_uInt16 nHeadEndRow; // letzte Zeile des Tabellen-Kopfes diff --git a/sw/source/filter/inc/wwstyles.hxx b/sw/source/filter/inc/wwstyles.hxx index 01e9c1039674..efb11063fc02 100644 --- a/sw/source/filter/inc/wwstyles.hxx +++ b/sw/source/filter/inc/wwstyles.hxx @@ -61,7 +61,7 @@ namespace ww stiTocFirst = stiToc1, stiTocLast = stiToc9, stiNormIndent = 28, // 0x001C - stiFtnText = 29, // 0x001D + stiFootnoteText = 29, // 0x001D stiAtnText = 30, // 0x001E stiHeader = 31, // 0x001F stiFooter = 32, // 0x0020 @@ -70,7 +70,7 @@ namespace ww stiToCaption = 35, // 0x0023 stiEnvAddr = 36, // 0x0024 stiEnvRet = 37, // 0x0025 - stiFtnRef = 38, // 0x0026 char style + stiFootnoteRef = 38, // 0x0026 char style stiAtnRef = 39, // 0x0027 char style stiLnn = 40, // 0x0028 char style stiPgn = 41, // 0x0029 char style diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 987fba83fefb..021cff725530 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -64,7 +64,7 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP // Step 4: Insert all content into the new node rPam.Move(fnMoveBackward); - rDoc.SetTxtFmtColl(rPam, rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false)); + rDoc.SetTextFormatColl(rPam, rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, false)); SwDocShell* pDocShell(rDoc.GetDocShell()); uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(comphelper::getProcessServiceFactory()); @@ -105,26 +105,26 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP // If we are in insert mode, join the split node that is in front // of the new content with the first new node. Or in other words: // Revert the first split node. - SwTxtNode* pTxtNode = pSttNdIdx->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pSttNdIdx->GetNode().GetTextNode(); SwNodeIndex aNxtIdx(*pSttNdIdx); - if (pTxtNode && pTxtNode->CanJoinNext(&aNxtIdx) && pSttNdIdx->GetIndex() + 1 == aNxtIdx.GetIndex()) + if (pTextNode && pTextNode->CanJoinNext(&aNxtIdx) && pSttNdIdx->GetIndex() + 1 == aNxtIdx.GetIndex()) { // If the PaM points to the first new node, move the PaM to the // end of the previous node. if (aPam.GetPoint()->nNode == aNxtIdx) { aPam.GetPoint()->nNode = *pSttNdIdx; - aPam.GetPoint()->nContent.Assign(pTxtNode, pTxtNode->GetTxt().getLength()); + aPam.GetPoint()->nContent.Assign(pTextNode, pTextNode->GetText().getLength()); } // If the first new node isn't empty, convert the node's text // attributes into hints. Otherwise, set the new node's // paragraph style at the previous (empty) node. - SwTxtNode* pDelNd = aNxtIdx.GetNode().GetTxtNode(); - if (pTxtNode->GetTxt().getLength()) - pDelNd->FmtToTxtAttr(pTxtNode); + SwTextNode* pDelNd = aNxtIdx.GetNode().GetTextNode(); + if (pTextNode->GetText().getLength()) + pDelNd->FormatToTextAttr(pTextNode); else - pTxtNode->ChgFmtColl(pDelNd->GetTxtColl()); - pTxtNode->JoinNext(); + pTextNode->ChgFormatColl(pDelNd->GetTextColl()); + pTextNode->JoinNext(); } } @@ -133,19 +133,19 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP // If we are in insert mode, join the split node that is after // the new content with the last new node. Or in other words: // Revert the second split node. - SwTxtNode* pTxtNode = pSttNdIdx2->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pSttNdIdx2->GetNode().GetTextNode(); SwNodeIndex aPrevIdx(*pSttNdIdx2); - if (pTxtNode && pTxtNode->CanJoinPrev(&aPrevIdx) && pSttNdIdx2->GetIndex() - 1 == aPrevIdx.GetIndex()) + if (pTextNode && pTextNode->CanJoinPrev(&aPrevIdx) && pSttNdIdx2->GetIndex() - 1 == aPrevIdx.GetIndex()) { // If the last new node isn't empty, convert the node's text // attributes into hints. Otherwise, set the new node's // paragraph style at the next (empty) node. - SwTxtNode* pDelNd = aPrevIdx.GetNode().GetTxtNode(); - if (pTxtNode->GetTxt().getLength()) - pDelNd->FmtToTxtAttr(pTxtNode); + SwTextNode* pDelNd = aPrevIdx.GetNode().GetTextNode(); + if (pTextNode->GetText().getLength()) + pDelNd->FormatToTextAttr(pTextNode); else - pTxtNode->ChgFmtColl(pDelNd->GetTxtColl()); - pTxtNode->JoinPrev(); + pTextNode->ChgFormatColl(pDelNd->GetTextColl()); + pTextNode->JoinPrev(); } } diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index a6ebb7b2fa13..be8088afaea8 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -198,7 +198,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId SwNodes *const pNds = &rDoc.GetNodes(); SwNodeIndex aStt( *pNds, nStartIdx ); - SwCntntNode* pCNode = aStt.GetNode().GetCntntNode(); + SwContentNode* pCNode = aStt.GetNode().GetContentNode(); if( !pCNode && 0 == pNds->GoNext( &aStt ) ) { OSL_FAIL( "No more ContentNode at StartPos" ); @@ -207,7 +207,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId SwPaM* pNew = new SwPaM( aStt ); pNew->SetMark(); aStt = nEndIdx; - pCNode = aStt.GetNode().GetCntntNode(); + pCNode = aStt.GetNode().GetContentNode(); if (!pCNode) pCNode = SwNodes::GoPrevious(&aStt); assert(pCNode && "No more ContentNode at StartPos"); @@ -300,26 +300,26 @@ sal_uLong Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, cons return ERR_SWG_WRITE_ERROR; } -void Writer::PutNumFmtFontsInAttrPool() +void Writer::PutNumFormatFontsInAttrPool() { // then there are a few fonts in the NumRules // These put into the Pool. After this does they have a RefCount > 1 // it can be removed - it is already in the Pool SfxItemPool& rPool = pDoc->GetAttrPool(); - const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl(); + const SwNumRuleTable& rListTable = pDoc->GetNumRuleTable(); const SwNumRule* pRule; - const SwNumFmt* pFmt; + const SwNumFormat* pFormat; const vcl::Font* pFont; const vcl::Font* pDefFont = &numfunc::GetDefBulletFont(); bool bCheck = false; - for( size_t nGet = rListTbl.size(); nGet; ) - if( SwDoc::IsUsed( *(pRule = rListTbl[ --nGet ] ))) + for( size_t nGet = rListTable.size(); nGet; ) + if( SwDoc::IsUsed( *(pRule = rListTable[ --nGet ] ))) for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) - if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() || - SVX_NUM_BITMAP == pFmt->GetNumberingType() ) + if( SVX_NUM_CHAR_SPECIAL == (pFormat = &pRule->Get( nLvl ))->GetNumberingType() || + SVX_NUM_BITMAP == pFormat->GetNumberingType() ) { - if( 0 == ( pFont = pFmt->GetBulletFont() ) ) + if( 0 == ( pFont = pFormat->GetBulletFont() ) ) pFont = pDefFont; if( bCheck ) @@ -386,7 +386,7 @@ void Writer::_AddFontItem( SfxItemPool& rPool, const SvxFontItem& rFont ) // build a bookmark table, which is sort by the node position. The // OtherPos of the bookmarks also inserted. -void Writer::CreateBookmarkTbl() +void Writer::CreateBookmarkTable() { const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); for(IDocumentMarkAccess::const_iterator_t ppBkmk = pMarkAccess->getBookmarksBegin(); @@ -398,7 +398,7 @@ void Writer::CreateBookmarkTbl() } // search alle Bookmarks in the range and return it in the Array -bool Writer::GetBookmarks(const SwCntntNode& rNd, sal_Int32 nStt, +bool Writer::GetBookmarks(const SwContentNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, std::vector< const ::sw::mark::IMark* >& rArr) { OSL_ENSURE( rArr.empty(), "there are still entries available" ); @@ -418,17 +418,17 @@ bool Writer::GetBookmarks(const SwCntntNode& rNd, sal_Int32 nStt, for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it ) { const ::sw::mark::IMark& rBkmk = *(it->second); - sal_Int32 nCntnt; + sal_Int32 nContent; if( rBkmk.GetMarkPos().nNode == nNd && - (nCntnt = rBkmk.GetMarkPos().nContent.GetIndex() ) >= nStt && - nCntnt < nEnd ) + (nContent = rBkmk.GetMarkPos().nContent.GetIndex() ) >= nStt && + nContent < nEnd ) { rArr.push_back( &rBkmk ); } else if( rBkmk.IsExpanded() && nNd == - rBkmk.GetOtherMarkPos().nNode.GetIndex() && (nCntnt = + rBkmk.GetOtherMarkPos().nNode.GetIndex() && (nContent = rBkmk.GetOtherMarkPos().nContent.GetIndex() ) >= nStt && - nCntnt < nEnd ) + nContent < nEnd ) { rArr.push_back( &rBkmk ); } diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx index 979a3cc1bfb9..de5a7c17e1bc 100644 --- a/sw/source/filter/writer/wrt_fn.cxx +++ b/sw/source/filter/writer/wrt_fn.cxx @@ -86,8 +86,8 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt, Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt ) { - // It must be a CntntNode! - SwCntntNode * pCNd = rNode.GetCntntNode(); + // It must be a ContentNode! + SwContentNode * pCNd = rNode.GetContentNode(); if( !pCNd ) return rWrt; diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index ec8b945888f7..44595b7a9215 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -37,12 +37,12 @@ sal_Int16 SwWriteTableCell::GetVertOri() const sal_Int16 eCellVertOri = text::VertOrientation::TOP; if( pBox->GetSttNd() ) { - const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet(); + const SfxItemSet& rItemSet = pBox->GetFrameFormat()->GetAttrSet(); const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) { sal_Int16 eBoxVertOri = - static_cast<const SwFmtVertOrient *>(pItem)->GetVertOrient(); + static_cast<const SwFormatVertOrient *>(pItem)->GetVertOrient(); if( text::VertOrientation::CENTER==eBoxVertOri || text::VertOrientation::BOTTOM==eBoxVertOri) eCellVertOri = eBoxVertOri; } @@ -80,9 +80,9 @@ SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition) sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox ) { - const SwFrmFmt *pFmt = pBox->GetFrmFmt(); - const SwFmtFrmSize& aFrmSize= - static_cast<const SwFmtFrmSize&>(pFmt->GetFmtAttr( RES_FRM_SIZE )); + const SwFrameFormat *pFormat = pBox->GetFrameFormat(); + const SwFormatFrmSize& aFrmSize= + static_cast<const SwFormatFrmSize&>(pFormat->GetFormatAttr( RES_FRM_SIZE )); return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width()); } @@ -148,13 +148,13 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) if( !pLine ) return 0; - const SwFrmFmt *pLineFrmFmt = pLine->GetFrmFmt(); + const SwFrameFormat *pLineFrameFormat = pLine->GetFrameFormat(); const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); + const SfxItemSet& rItemSet = pLineFrameFormat->GetAttrSet(); long nHeight = 0; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) - nHeight = static_cast<const SwFmtFrmSize*>(pItem)->GetHeight(); + nHeight = static_cast<const SwFormatFrmSize*>(pItem)->GetHeight(); return nHeight; } @@ -166,9 +166,9 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox, while( pLine ) { - const SwFrmFmt *pLineFrmFmt = pLine->GetFrmFmt(); + const SwFrameFormat *pLineFrameFormat = pLine->GetFrameFormat(); const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); + const SfxItemSet& rItemSet = pLineFrameFormat->GetAttrSet(); if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) @@ -229,8 +229,8 @@ sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox, { sal_uInt16 nBorderMask = 0; - const SwFrmFmt *pFrmFmt = pBox->GetFrmFmt(); - const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(pFrmFmt->GetFmtAttr( RES_BOX )); + const SwFrameFormat *pFrameFormat = pBox->GetFrameFormat(); + const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(pFrameFormat->GetFormatAttr( RES_BOX )); if( rBoxItem.GetTop() ) { @@ -584,13 +584,13 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow, const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); - const SwFrmFmt *pLineFrmFmt = pLine->GetFrmFmt(); + const SwFrameFormat *pLineFrameFormat = pLine->GetFrameFormat(); const SfxPoolItem* pItem; - const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet(); + const SfxItemSet& rItemSet = pLineFrameFormat->GetAttrSet(); long nHeight = 0; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem )) - nHeight = static_cast<const SwFmtFrmSize*>(pItem)->GetHeight(); + nHeight = static_cast<const SwFormatFrmSize*>(pItem)->GetHeight(); const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush; if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index c38d5161178a..1ff3298ee7fc 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -141,14 +141,14 @@ TableBoxVectorPtr WW8TableNodeInfoInner::getTableBoxesOfRow() if (pCellGrid.get() == NULL) { const SwTableLine * pTabLine = getTableBox()->GetUpper(); - const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes(); + const SwTableBoxes & rTableBoxes = pTabLine->GetTabBoxes(); - sal_uInt8 nBoxes = rTblBoxes.size(); + sal_uInt8 nBoxes = rTableBoxes.size(); if (nBoxes > MAXTABLECELLS) nBoxes = MAXTABLECELLS; for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { - pResult->push_back(rTblBoxes[n]); + pResult->push_back(rTableBoxes[n]); } } else @@ -195,13 +195,13 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase, pWidths = getWidthsOfRow(); } - const SwFrmFmt *pFmt = getTable()->GetFrmFmt(); - OSL_ENSURE(pFmt,"Impossible"); - if (!pFmt) + const SwFrameFormat *pFormat = getTable()->GetFrameFormat(); + OSL_ENSURE(pFormat,"Impossible"); + if (!pFormat) return pResult; - const SwFmtFrmSize &rSize = pFmt->GetFrmSize(); - unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth()); + const SwFormatFrmSize &rSize = pFormat->GetFrmSize(); + unsigned long nTableSz = static_cast<unsigned long>(rSize.GetWidth()); long nPageSize = 0; bool bRelBoxSize = false; @@ -217,7 +217,7 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase, nSz += *aIt; SwTwips nCalc = nSz; if ( bRelBoxSize ) - nCalc = ( nCalc * nPageSize ) / nTblSz; + nCalc = ( nCalc * nPageSize ) / nTableSz; pResult->push_back( nCalc ); } @@ -252,8 +252,8 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows() sal_uInt32 nSeparatorPosition = 0; for (size_t nBoxIndex = 0; nBoxIndex < nBoxes; ++nBoxIndex) { - const SwFrmFmt* pBoxFmt = rTabBoxes[ nBoxIndex ]->GetFrmFmt(); - const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize(); + const SwFrameFormat* pBoxFormat = rTabBoxes[ nBoxIndex ]->GetFrameFormat(); + const SwFormatFrmSize& rLSz = pBoxFormat->GetFrmSize(); nSeparatorPosition += rLSz.GetWidth(); pSeparators->push_back(nSeparatorPosition); } @@ -305,8 +305,8 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow() for (sal_uInt32 n = 0; n < nBoxes; n++) { - const SwFrmFmt* pBoxFmt = rTabBoxes[ n ]->GetFrmFmt(); - const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize(); + const SwFrameFormat* pBoxFormat = rTabBoxes[ n ]->GetFrameFormat(); + const SwFormatFrmSize& rLSz = pBoxFormat->GetFrmSize(); pWidths->push_back(rLSz.GetWidth()); } @@ -630,7 +630,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable) WW8TableNodeInfo * pPrev = NULL; - if (pTable->IsTblComplex() && pTable->HasLayout()) + if (pTable->IsTableComplex() && pTable->HasLayout()) { pPrev = processSwTableByLayout(pTable); @@ -793,7 +793,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable, pPrev = pNodeInfo.get(); - if (nDepthInsideCell == 1 && rNode.IsTxtNode()) + if (nDepthInsideCell == 1 && rNode.IsTextNode()) pEndOfCellInfo = pNodeInfo; if (rNode.IsEndNode()) @@ -853,7 +853,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo pNodeInfo->setCell(nCell); pNodeInfo->setRow(nRow); - if (pNode->IsTxtNode()) + if (pNode->IsTextNode()) { FirstInTableMap_t::const_iterator aIt = mFirstInTableMap.find(pTable); if (aIt == mFirstInTableMap.end()) @@ -1077,12 +1077,12 @@ CellInfoMultiSet::const_iterator WW8TableCellGrid::getCellsEnd(long nTop) void WW8TableCellGrid::insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, - unsigned long * pFmtFrmWidth) + unsigned long * pFormatFrmWidth) { CellInfo aCellInfo(rRect, pNodeInfo); - if (pFmtFrmWidth != NULL) - aCellInfo.setFmtFrmWidth(*pFmtFrmWidth); + if (pFormatFrmWidth != NULL) + aCellInfo.setFormatFrmWidth(*pFormatFrmWidth); WW8TableCellGridRow::Pointer_t pRow = getRow(rRect.Top()); pRow->insert(aCellInfo); @@ -1122,8 +1122,8 @@ void WW8TableCellGrid::addShadowCells() *aRowSpanIt < aCellIt->bottom()) { aRect.Top(*aRowSpanIt); - unsigned long nFmtFrmWidth = aCellIt->getFmtFrmWidth(); - insert(aRect, NULL, &nFmtFrmWidth); + unsigned long nFormatFrmWidth = aCellIt->getFormatFrmWidth(); + insert(aRect, NULL, &nFormatFrmWidth); bVertMerge = true; } @@ -1198,7 +1198,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() pEndOfCellInfo = NULL; } - if (nDepthInCell == 1 && pNode->IsTxtNode()) + if (nDepthInCell == 1 && pNode->IsTextNode()) pEndOfCellInfo = pNodeInfo; pNodeInfo->setShadowsBefore(nShadows); @@ -1227,7 +1227,7 @@ WW8TableNodeInfo * WW8TableCellGrid::connectCells() if (bBeginningOfCell) { - pWidths->push_back(aCellIt->getFmtFrmWidth()); + pWidths->push_back(aCellIt->getFormatFrmWidth()); if (pNodeInfo != NULL) pTableBoxes->push_back(pNodeInfo->getTableBox()); @@ -1453,15 +1453,15 @@ void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans) CellInfo::CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo) -: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFmtFrmWidth(0) +: m_aRect(aRect), m_pNodeInfo(pNodeInfo), m_nFormatFrmWidth(0) { if (pNodeInfo != NULL) { const SwTableBox * pBox = pNodeInfo->getTableBox(); - const SwFrmFmt * pFrmFmt = pBox->GetFrmFmt(); - const SwFmtFrmSize & rSize = pFrmFmt->GetFrmSize(); + const SwFrameFormat * pFrameFormat = pBox->GetFrameFormat(); + const SwFormatFrmSize & rSize = pFrameFormat->GetFrmSize(); - m_nFmtFrmWidth = rSize.GetWidth(); + m_nFormatFrmWidth = rSize.GetWidth(); } } diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index ab5ff6c55132..8a3013a3738d 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -114,7 +114,7 @@ class CellInfo { SwRect m_aRect; WW8TableNodeInfo * m_pNodeInfo; - unsigned long m_nFmtFrmWidth; + unsigned long m_nFormatFrmWidth; public: CellInfo(const SwRect & aRect, WW8TableNodeInfo * pNodeInfo); @@ -122,7 +122,7 @@ public: CellInfo(const CellInfo & aRectAndTableInfo) : m_aRect(aRectAndTableInfo.m_aRect), m_pNodeInfo(aRectAndTableInfo.m_pNodeInfo), - m_nFmtFrmWidth(aRectAndTableInfo.m_nFmtFrmWidth) + m_nFormatFrmWidth(aRectAndTableInfo.m_nFormatFrmWidth) { } @@ -139,14 +139,14 @@ public: SwRect getRect() const { return m_aRect; } WW8TableNodeInfo * getTableNodeInfo() const { return m_pNodeInfo; } - unsigned long getFmtFrmWidth() const + unsigned long getFormatFrmWidth() const { - return m_nFmtFrmWidth; + return m_nFormatFrmWidth; } - void setFmtFrmWidth(unsigned long nFmtFrmWidth) + void setFormatFrmWidth(unsigned long nFormatFrmWidth) { - m_nFmtFrmWidth = nFmtFrmWidth; + m_nFormatFrmWidth = nFormatFrmWidth; } #ifdef DBG_UTIL @@ -175,7 +175,7 @@ private: public: typedef boost::shared_ptr<WW8TableNodeInfo> Pointer_t; - WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pTxtNode); + WW8TableNodeInfo(WW8TableInfo * pParent, const SwNode * pTextNode); virtual ~WW8TableNodeInfo(); void setDepth(sal_uInt32 nDepth); @@ -276,7 +276,7 @@ public: ~WW8TableCellGrid(); void insert(const SwRect & rRect, WW8TableNodeInfo * pNodeInfo, - unsigned long * pFmtFrmWidth = NULL); + unsigned long * pFormatFrmWidth = NULL); void addShadowCells(); WW8TableNodeInfo * connectCells(); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index a4aabc6a9af1..6d16f55623c0 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -72,14 +72,14 @@ class SvxCharScaleWidthItem; class SvxCharReliefItem; class SvxCharHiddenItem; class SvxBoxItem; -class SwFmtINetFmt; -class SwFmtCharFmt; -class SwFmtFld; -class SwFmtFlyCnt; -class SwFmtFtn; +class SwFormatINetFormat; +class SwFormatCharFormat; +class SwFormatField; +class SwFormatFlyCnt; +class SwFormatFootnote; class SvxLineSpacingItem; class SvxAdjustItem; -class SvxFmtSplitItem; +class SvxFormatSplitItem; class SvxWidowsItem; class SvxTabStopItem; class SvxHyphenZoneItem; @@ -89,34 +89,34 @@ class SfxPoolItem; class SfxItemSet; class SvxParaVertAlignItem; class SvxParaGridItem; -class SwFmtFrmSize; +class SwFormatFrmSize; class SvxPaperBinItem; class SvxLRSpaceItem; class SvxULSpaceItem; -class SwFmtPageDesc; -class SvxFmtBreakItem; -class SwFmtSurround; -class SwFmtVertOrient; -class SwFmtHoriOrient; -class SwFmtAnchor; +class SwFormatPageDesc; +class SvxFormatBreakItem; +class SwFormatSurround; +class SwFormatVertOrient; +class SwFormatHoriOrient; +class SwFormatAnchor; class SvxBrushItem; class SvxBoxItem; -class SwFmtCol; -class SvxFmtKeepItem; +class SwFormatCol; +class SvxFormatKeepItem; class SwTextGridItem; -class SwFmtLineNumber; +class SwFormatLineNumber; class SvxFrameDirectionItem; class SfxGrabBagItem; class SfxUInt16Item; -class SwFmtRuby; -class SwTxtNode; +class SwFormatRuby; +class SwTextNode; class SwTOXMark; class SwRedlineData; class SwSection; -class SwFmtDrop; -class SwFrmFmt; -class SwNumFmt; -class SwFmt; +class SwFormatDrop; +class SwFrameFormat; +class SwNumFormat; +class SwFormat; struct WW8_SepInfo; class SwLineNumberInfo; class SwNumRule; @@ -156,7 +156,7 @@ public: virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0; /// Called in order to output section breaks. - virtual void SectionBreaks(const SwTxtNode& rNode) = 0; + virtual void SectionBreaks(const SwTextNode& rNode) = 0; /// Called before we start outputting the attributes. virtual void StartParagraphProperties() = 0; @@ -195,7 +195,7 @@ public: virtual void RawText( const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) = 0; /// Output ruby start. - virtual void StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) = 0; + virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) = 0; /// Output ruby end. virtual void EndRuby() = 0; @@ -206,7 +206,7 @@ public: /// Output URL end. virtual bool EndURL(bool isAtEndOfParagraph) = 0; - virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) = 0; + virtual void FieldVanish( const OUString& rText, ww::eField eType ) = 0; void StartTOX( const SwSection& rSect ); @@ -214,12 +214,12 @@ public: virtual void OnTOXEnding() {} - void TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAttr ); + void TOXMark( const SwTextNode& rNode, const SwTOXMark& rAttr ); /// Output redlining. virtual void Redline( const SwRedlineData* pRedline ) = 0; - virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0; + virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0; /// Output FKP (Formatted disK Page) - necessary for binary formats only. /// FIXME having it in AttributeOutputBase is probably a hack, it @@ -285,7 +285,7 @@ public: virtual void EndStyleProperties( bool bParProp ) = 0; /// Numbering rule and Id. - virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0; + virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFormat& rNFormat, const SwFormat& rFormat ) = 0; /// Page break /// As a paragraph property - the paragraph should be on the next page. @@ -322,7 +322,7 @@ public: virtual void ResetFlyProcessingFlag(){}; /// Description of the page borders. - virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) = 0; + virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) = 0; /// Columns populated from right/numbers on the right side? virtual void SectionBiDi( bool bBiDi ) = 0; @@ -363,10 +363,10 @@ public: protected: - static void GetNumberPara( OUString& rStr, const SwField& rFld ); + static void GetNumberPara( OUString& rStr, const SwField& rField ); /// Output frames - the implementation. - virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) = 0; + virtual void OutputFlyFrame_Impl( const sw::Frame& rFormat, const Point& rNdTopLeft ) = 0; /// Sfx item Sfx item RES_CHRATR_CASEMAP virtual void CharCaseMap( const SvxCaseMapItem& ) = 0; @@ -479,25 +479,25 @@ protected: virtual void CharHighlight( const SvxBrushItem& ) = 0; /// Sfx item RES_TXTATR_INETFMT - virtual void TextINetFormat( const SwFmtINetFmt& ) = 0; + virtual void TextINetFormat( const SwFormatINetFormat& ) = 0; /// Sfx item RES_TXTATR_CHARFMT - virtual void TextCharFormat( const SwFmtCharFmt& ) = 0; + virtual void TextCharFormat( const SwFormatCharFormat& ) = 0; /// Sfx item RES_TXTATR_FIELD, RES_TXTATR_ANNOTATION and RES_TXTATR_INPUTFIELD - void TextField( const SwFmtFld& ); + void TextField( const SwFormatField& ); /// Sfx item RES_TXTATR_FLYCNT - void TextFlyContent( const SwFmtFlyCnt& ); + void TextFlyContent( const SwFormatFlyCnt& ); /// Sfx item RES_TXTATR_FTN /// /// This one is common for both WW8AttributeOutput as well as /// DocxAttributeOutput. - void TextFootnote( const SwFmtFtn& ); + void TextFootnote( const SwFormatFootnote& ); /// Sfx item RES_TXTATR_FTN - virtual void TextFootnote_Impl( const SwFmtFtn& ) = 0; + virtual void TextFootnote_Impl( const SwFormatFootnote& ) = 0; /// Sfx item RES_PARATR_LINESPACING void ParaLineSpacing( const SvxLineSpacingItem& ); @@ -509,7 +509,7 @@ protected: virtual void ParaAdjust( const SvxAdjustItem& ) = 0; /// Sfx item RES_PARATR_SPLIT - virtual void ParaSplit( const SvxFmtSplitItem& ) = 0; + virtual void ParaSplit( const SvxFormatSplitItem& ) = 0; /// Sfx item RES_PARATR_WIDOWS virtual void ParaWidows( const SvxWidowsItem& ) = 0; @@ -524,7 +524,7 @@ protected: void ParaNumRule( const SwNumRuleItem& ); /// Numbering - the implementation. - virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) = 0; + virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) = 0; /// Sfx item RES_PARATR_SCRIPTSPACE virtual void ParaScriptSpace( const SfxBoolItem& ) = 0; @@ -542,7 +542,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) = 0; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFmtFrmSize& ) = 0; + virtual void FormatFrameSize( const SwFormatFrmSize& ) = 0; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) = 0; @@ -554,22 +554,22 @@ protected: virtual void FormatULSpace( const SvxULSpaceItem& ) = 0; /// Sfx item RES_PAGEDESC - void FormatPageDescription( const SwFmtPageDesc& ); + void FormatPageDescription( const SwFormatPageDesc& ); /// Sfx item RES_BREAK - void FormatBreak( const SvxFmtBreakItem& ); + void FormatBreak( const SvxFormatBreakItem& ); /// Sfx item RES_SURROUND - virtual void FormatSurround( const SwFmtSurround& ) = 0; + virtual void FormatSurround( const SwFormatSurround& ) = 0; /// Sfx item RES_VERT_ORIENT - virtual void FormatVertOrientation( const SwFmtVertOrient& ) = 0; + virtual void FormatVertOrientation( const SwFormatVertOrient& ) = 0; /// Sfx item RES_HORI_ORIENT - virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) = 0; + virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) = 0; /// Sfx item RES_ANCHOR - virtual void FormatAnchor( const SwFmtAnchor& ) = 0; + virtual void FormatAnchor( const SwFormatAnchor& ) = 0; /// Sfx item RES_BACKGROUND virtual void FormatBackground( const SvxBrushItem& ) = 0; @@ -584,12 +584,12 @@ protected: virtual void FormatBox( const SvxBoxItem& ) = 0; /// Sfx item RES_COL - void FormatColumns( const SwFmtCol& ); + void FormatColumns( const SwFormatCol& ); - virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0; + virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) = 0; /// Sfx item RES_KEEP - virtual void FormatKeep( const SvxFmtKeepItem& ) = 0; + virtual void FormatKeep( const SvxFormatKeepItem& ) = 0; /// Compute the grid character pitch sal_uInt32 GridCharacterPitch( const SwTextGridItem& rGrid ) const; @@ -598,7 +598,7 @@ protected: virtual void FormatTextGrid( const SwTextGridItem& ) = 0; /// Sfx item RES_LINENUMBER - virtual void FormatLineNumbering( const SwFmtLineNumber& ) = 0; + virtual void FormatLineNumbering( const SwFormatLineNumber& ) = 0; /// Sfx item RES_FRAMEDIR virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) = 0; @@ -613,14 +613,14 @@ protected: virtual void ParaOutlineLevel( const SfxUInt16Item& ) = 0; /// Write the expanded field - virtual void WriteExpand( const SwField* pFld ) = 0; + virtual void WriteExpand( const SwField* pField ) = 0; - virtual void RefField( const SwField& rFld, const OUString& rRef ) = 0; - virtual void HiddenField( const SwField& rFld ) = 0; - virtual void SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) = 0; - virtual void PostitField( const SwField* pFld ) = 0; - virtual bool DropdownField( const SwField* pFld ) = 0; - virtual bool PlaceholderField( const SwField* pFld ) = 0; + virtual void RefField( const SwField& rField, const OUString& rRef ) = 0; + virtual void HiddenField( const SwField& rField ) = 0; + virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) = 0; + virtual void PostitField( const SwField* pField ) = 0; + virtual bool DropdownField( const SwField* pField ) = 0; + virtual bool PlaceholderField( const SwField* pField ) = 0; virtual bool AnalyzeURL( const OUString& rUrl, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ); @@ -644,7 +644,7 @@ public: void OutputStyleItemSet( const SfxItemSet& rSet, bool bDeep, bool bTestForDefault ); /// Output frames. - void OutputFlyFrame( const sw::Frame& rFmt ); + void OutputFlyFrame( const sw::Frame& rFormat ); void GetTablePageSize ( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, @@ -653,8 +653,8 @@ public: /// Exports the definition (image, size) of a single numbering picture bullet. virtual void BulletDefinition(int /*nId*/, const Graphic& /*rGraphic*/, Size /*aSize*/) {} - // Returns whether or not the 'SwTxtNode' has a paragraph marker inserted \ deleted (using 'track changes') - const SwRedlineData* GetParagraphMarkerRedline( const SwTxtNode& rNode, RedlineType_t aRedlineType ); + // Returns whether or not the 'SwTextNode' has a paragraph marker inserted \ deleted (using 'track changes') + const SwRedlineData* GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType_t aRedlineType ); }; #endif // INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 59027ee1c173..7ee225c852e6 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -278,10 +278,10 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText // would normally arrive, it would be too late (would be after the // paragraph start has been written). bool bEndParaSdt = false; - SwTxtNode* pTxtNode = m_rExport.m_pCurPam->GetNode().GetTxtNode(); - if (pTxtNode && pTxtNode->GetpSwAttrSet()) + SwTextNode* pTextNode = m_rExport.m_pCurPam->GetNode().GetTextNode(); + if (pTextNode && pTextNode->GetpSwAttrSet()) { - const SfxItemSet* pSet = pTxtNode->GetpSwAttrSet(); + const SfxItemSet* pSet = pTextNode->GetpSwAttrSet(); if (const SfxPoolItem* pItem = pSet->GetItem(RES_PARATR_GRABBAG)) { const SfxGrabBagItem& rParaGrabBag = static_cast<const SfxGrabBagItem&>(*pItem); @@ -327,12 +327,12 @@ static void lcl_deleteAndResetTheLists( std::unique_ptr<sax_fastparser::FastAttr rSdtPrAlias.clear(); } -void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const Size& rSize) +void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize) { sax_fastparser::FastAttributeList* attrList = FastSerializerHelper::createAttrList(); - awt::Point aPos(pFrmFmt->GetHoriOrient().GetPos(), pFrmFmt->GetVertOrient().GetPos()); + awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(), pFrameFormat->GetVertOrient().GetPos()); attrList->add( FSNS( XML_w, XML_w), OString::number(rSize.Width())); attrList->add( FSNS( XML_w, XML_h), OString::number(rSize.Height())); @@ -342,7 +342,7 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const const char* relativeFromH; const char* relativeFromV; - switch (pFrmFmt->GetVertOrient().GetRelationOrient()) + switch (pFrameFormat->GetVertOrient().GetRelationOrient()) { case text::RelOrientation::PAGE_PRINT_AREA: relativeFromV = "margin"; @@ -357,7 +357,7 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const break; } - switch (pFrmFmt->GetHoriOrient().GetRelationOrient()) + switch (pFrameFormat->GetHoriOrient().GetRelationOrient()) { case text::RelOrientation::PAGE_PRINT_AREA: relativeFromH = "margin"; @@ -373,7 +373,7 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const break; } - switch (pFrmFmt->GetSurround().GetValue()) + switch (pFrameFormat->GetSurround().GetValue()) { case SURROUND_NONE: attrList->add( FSNS( XML_w, XML_wrap), "none"); @@ -397,10 +397,10 @@ void DocxAttributeOutput::PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const m_pSerializer->singleElementNS( XML_w, XML_framePr, xAttrList ); } -bool DocxAttributeOutput::TextBoxIsFramePr(const SwFrmFmt& rFrmFmt) +bool DocxAttributeOutput::TextBoxIsFramePr(const SwFrameFormat& rFrameFormat) { uno::Reference< drawing::XShape > xShape; - const SdrObject* pSdrObj = rFrmFmt.FindRealSdrObject(); + const SdrObject* pSdrObj = rFrameFormat.FindRealSdrObject(); if (pSdrObj) xShape = uno::Reference< drawing::XShape >(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xPropertySet(xShape, uno::UNO_QUERY); @@ -445,9 +445,9 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT { m_bParagraphFrameOpen = true; sw::Frame aFrame = m_aFramesOfParagraph[nIndex]; - const SwFrmFmt& rFrmFmt = aFrame.GetFrmFmt(); + const SwFrameFormat& rFrameFormat = aFrame.GetFrameFormat(); - if (!TextBoxIsFramePr(rFrmFmt) || m_bWritingHeaderFooter) + if (!TextBoxIsFramePr(rFrameFormat) || m_bWritingHeaderFooter) { if (m_bStartedCharSdt) { @@ -773,7 +773,7 @@ void DocxAttributeOutput::EmptyParagraph() m_pSerializer->singleElementNS( XML_w, XML_p, FSEND ); } -void DocxAttributeOutput::SectionBreaks(const SwTxtNode& rNode) +void DocxAttributeOutput::SectionBreaks(const SwTextNode& rNode) { // output page/section breaks // Writer can have them at the beginning of a paragraph, or at the end, but @@ -781,16 +781,16 @@ void DocxAttributeOutput::SectionBreaks(const SwTxtNode& rNode) // paragraph in a section. To get it right, we have to switch to the next // paragraph, and detect the section breaks there. SwNodeIndex aNextIndex( rNode, 1 ); - if ( aNextIndex.GetNode().IsTxtNode() ) + if ( aNextIndex.GetNode().IsTextNode() ) { - const SwTxtNode* pTxtNode = static_cast< SwTxtNode* >( &aNextIndex.GetNode() ); - m_rExport.OutputSectionBreaks( pTxtNode->GetpSwAttrSet(), *pTxtNode, m_tableReference->m_bTableCellOpen, pTxtNode->GetTxt().isEmpty() ); + const SwTextNode* pTextNode = static_cast< SwTextNode* >( &aNextIndex.GetNode() ); + m_rExport.OutputSectionBreaks( pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen, pTextNode->GetText().isEmpty() ); } else if ( aNextIndex.GetNode().IsTableNode() ) { const SwTableNode* pTableNode = static_cast< SwTableNode* >( &aNextIndex.GetNode() ); - const SwFrmFmt *pFmt = pTableNode->GetTable().GetFrmFmt(); - m_rExport.OutputSectionBreaks( &(pFmt->GetAttrSet()), *pTableNode ); + const SwFrameFormat *pFormat = pTableNode->GetTable().GetFrameFormat(); + m_rExport.OutputSectionBreaks( &(pFormat->GetAttrSet()), *pTableNode ); } } @@ -912,8 +912,8 @@ void lcl_writeParagraphMarkerProperties(DocxAttributeOutput& rAttributeOutput, c } else if (nWhichId == RES_TXTATR_AUTOFMT) { - const SwFmtAutoFmt* pAutoFmt = static_cast<const SwFmtAutoFmt*>(pItem); - lcl_writeParagraphMarkerProperties(rAttributeOutput, *pAutoFmt->GetStyleHandle()); + const SwFormatAutoFormat* pAutoFormat = static_cast<const SwFormatAutoFormat*>(pItem); + lcl_writeParagraphMarkerProperties(rAttributeOutput, *pAutoFormat->GetStyleHandle()); } } nWhichId = aIter.NextWhich(); @@ -977,11 +977,11 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar if (!m_bWritingHeaderFooter && m_pCurrentFrame) { - const SwFrmFmt& rFrmFmt = m_pCurrentFrame->GetFrmFmt(); - if (TextBoxIsFramePr(rFrmFmt)) + const SwFrameFormat& rFrameFormat = m_pCurrentFrame->GetFrameFormat(); + if (TextBoxIsFramePr(rFrameFormat)) { const Size aSize = m_pCurrentFrame->GetSize(); - PopulateFrameProperties(&rFrmFmt, aSize); + PopulateFrameProperties(&rFrameFormat, aSize); } } @@ -1433,13 +1433,13 @@ void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, bool bWriteRun ) WriteFFData( rInfos ); if ( rInfos.pField ) { - const SwDropDownField& rFld2 = *static_cast<const SwDropDownField*>(rInfos.pField.get()); + const SwDropDownField& rField2 = *static_cast<const SwDropDownField*>(rInfos.pField.get()); uno::Sequence<OUString> aItems = - rFld2.GetItemSequence(); - GetExport().DoComboBox(rFld2.GetName(), - rFld2.GetHelp(), - rFld2.GetToolTip(), - rFld2.GetSelectedItem(), aItems); + rField2.GetItemSequence(); + GetExport().DoComboBox(rField2.GetName(), + rField2.GetHelp(), + rField2.GetToolTip(), + rField2.GetSelectedItem(), aItems); } m_pSerializer->endElementNS( XML_w, XML_fldChar ); @@ -2003,7 +2003,7 @@ void DocxAttributeOutput::WritePostponedGraphic() for( std::list< PostponedGraphic >::const_iterator it = m_pPostponedGraphic->begin(); it != m_pPostponedGraphic->end(); ++it ) - FlyFrameGraphic( it->grfNode, it->size, it->mOLEFrmFmt, it->mOLENode, it->pSdrObj ); + FlyFrameGraphic( it->grfNode, it->size, it->mOLEFrameFormat, it->mOLENode, it->pSdrObj ); m_pPostponedGraphic.reset(0); } @@ -2122,9 +2122,9 @@ void DocxAttributeOutput::RawText( const OUString& /*rText*/, bool /*bForceUnico OSL_TRACE("TODO DocxAttributeOutput::RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet )" ); } -void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) +void DocxAttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) { - OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby )" ); + OSL_TRACE("TODO DocxAttributeOutput::StartRuby( const SwTextNode& rNode, const SwFormatRuby& rRuby )" ); m_pSerializer->startElementNS( XML_w, XML_ruby, FSEND ); m_pSerializer->startElementNS( XML_w, XML_rubyPr, FSEND ); // hps @@ -2169,7 +2169,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, con SwWW8AttrIter aAttrIt( m_rExport, rNode ); aAttrIt.OutAttr( nPos, true ); - sal_uInt16 nStyle = m_rExport.GetId( rRuby.GetTxtRuby()->GetCharFmt() ); + sal_uInt16 nStyle = m_rExport.GetId( rRuby.GetTextRuby()->GetCharFormat() ); OString aStyleId(m_rExport.m_pStyles->GetStyleId(nStyle)); m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND ); @@ -2290,9 +2290,9 @@ bool DocxAttributeOutput::EndURL(bool const) return true; } -void DocxAttributeOutput::FieldVanish( const OUString& rTxt, ww::eField eType ) +void DocxAttributeOutput::FieldVanish( const OUString& rText, ww::eField eType ) { - WriteField_Impl( NULL, eType, rTxt, WRITEFIELD_ALL ); + WriteField_Impl( NULL, eType, rText, WRITEFIELD_ALL ); } // The difference between 'Redline' and 'StartRedline'+'EndRedline' is that: @@ -2491,9 +2491,9 @@ void DocxAttributeOutput::EndRedline( const SwRedlineData * pRedlineData ) } } -void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t ) +void DocxAttributeOutput::FormatDrop( const SwTextNode& /*rNode*/, const SwFormatDrop& /*rSwFormatDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t ) { - OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle )" ); + OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle )" ); } void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle ) @@ -2854,7 +2854,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point { m_pSerializer->startElementNS( XML_w, XML_tcPr, FSEND ); - const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( ); + const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox( ); bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT; @@ -2900,7 +2900,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point FSEND ); } - if (const SfxGrabBagItem* pItem = sw::util::HasItem<SfxGrabBagItem>(pTblBox->GetFrmFmt()->GetAttrSet(), RES_FRMATR_GRABBAG)) + if (const SfxGrabBagItem* pItem = sw::util::HasItem<SfxGrabBagItem>(pTableBox->GetFrameFormat()->GetAttrSet(), RES_FRMATR_GRABBAG)) { const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag(); std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find("CellCnfStyle"); @@ -2912,8 +2912,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point } - const SvxBoxItem& rBox = pTblBox->GetFrmFmt( )->GetBox( ); - const SvxBoxItem& rDefaultBox = (*tableFirstCells.rbegin())->getTableBox( )->GetFrmFmt( )->GetBox( ); + const SvxBoxItem& rBox = pTableBox->GetFrameFormat( )->GetBox( ); + const SvxBoxItem& rDefaultBox = (*tableFirstCells.rbegin())->getTableBox( )->GetFrameFormat( )->GetBox( ); { // The cell borders impl_borders( m_pSerializer, rBox, lcl_getTableCellBorderOptions(bEcma), NULL, m_aTableStyleConf ); @@ -2943,14 +2943,14 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t // Create the SwWriteTable instance to use col spans (and maybe other infos) GetTablePageSize( pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize ); - const SwFrmFmt *pFmt = pTable->GetFrmFmt( ); - const sal_uInt32 nTblSz = static_cast<sal_uInt32>(pFmt->GetFrmSize( ).GetWidth( )); + const SwFrameFormat *pFormat = pTable->GetFrameFormat( ); + const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrmSize( ).GetWidth( )); const SwHTMLTableLayout *pLayout = pTable->GetHTMLTableLayout(); if( pLayout && pLayout->IsExportable() ) m_xTableWrt.reset(new SwWriteTable(pTable, pLayout)); else - m_xTableWrt.reset(new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTblSz, false)); + m_xTableWrt.reset(new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTableSz, false)); } void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) @@ -3011,7 +3011,7 @@ void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t p const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine* pTableLine = pTableBox->GetUpper(); - if (const SfxGrabBagItem* pItem = sw::util::HasItem<SfxGrabBagItem>(pTableLine->GetFrmFmt()->GetAttrSet(), RES_FRMATR_GRABBAG)) + if (const SfxGrabBagItem* pItem = sw::util::HasItem<SfxGrabBagItem>(pTableLine->GetFrameFormat()->GetAttrSet(), RES_FRMATR_GRABBAG)) { const std::map<OUString, uno::Any>& rGrabBag = pItem->GetGrabBag(); std::map<OUString, uno::Any>::const_iterator it = rGrabBag.find("RowCnfStyle"); @@ -3127,17 +3127,17 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // If actual width of table is relative it should export is as "pct".` const SwTable *pTable = pTableTextNodeInfoInner->getTable(); - SwFrmFmt *pTblFmt = pTable->GetFrmFmt( ); - const SwFmtFrmSize &rSize = pTblFmt->GetFrmSize(); + SwFrameFormat *pTableFormat = pTable->GetFrameFormat( ); + const SwFormatFrmSize &rSize = pTableFormat->GetFrmSize(); int nWidthPercent = rSize.GetWidthPercent(); - uno::Reference<beans::XPropertySet> xPropertySet(SwXTextTables::GetObject(const_cast<SwTableFmt&>(*pTable->GetFrmFmt( ))),uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(SwXTextTables::GetObject(const_cast<SwTableFormat&>(*pTable->GetFrameFormat( ))),uno::UNO_QUERY); bool isWidthRelative = false; xPropertySet->getPropertyValue("IsWidthRelative") >>= isWidthRelative; if(isWidthRelative) { /** - * As per ECMA Specification : ECMA-376, Second Edition, Part 1 - Fundamentals And Markup Language Reference [ 17.18.90 ST_TblWidth (Table Width Units)] + * As per ECMA Specification : ECMA-376, Second Edition, Part 1 - Fundamentals And Markup Language Reference [ 17.18.90 ST_TableWidth (Table Width Units)] * http://www.schemacentral.com/sc/ooxml/a-w_type-7.html * * Fiftieths of a Percent : @@ -3166,7 +3166,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // Look for the table style property in the table grab bag std::map<OUString, com::sun::star::uno::Any> aGrabBag = - sw::util::HasItem<SfxGrabBagItem>( pTblFmt->GetAttrSet(), RES_FRMATR_GRABBAG )->GetGrabBag(); + sw::util::HasItem<SfxGrabBagItem>( pTableFormat->GetAttrSet(), RES_FRMATR_GRABBAG )->GetGrabBag(); // We should clear the TableStyle map. In case of Table inside multiple tables it contains the // table border style of the previous table. @@ -3286,7 +3286,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // Output the table alignement const char* pJcVal; sal_Int32 nIndent = 0; - switch ( pTblFmt->GetHoriOrient( ).GetHoriOrient( ) ) + switch ( pTableFormat->GetHoriOrient( ).GetHoriOrient( ) ) { case text::HoriOrientation::CENTER: pJcVal = "center"; @@ -3305,7 +3305,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pJcVal = "left"; else pJcVal = "start"; - nIndent = sal_Int32( pTblFmt->GetLRSpace( ).GetLeft( ) ); + nIndent = sal_Int32( pTableFormat->GetLRSpace( ).GetLeft( ) ); // Table indentation has different meaning in Word, depending if the table is nested or not. // If nested, tblInd is added to parent table's left spacing and defines left edge position // If not nested, text position of left-most cell must be at absolute X = tblInd @@ -3313,8 +3313,8 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t if (m_tableReference->m_nTableDepth == 0) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt(); - nIndent += sal_Int32( pFrmFmt->GetBox( ).GetDistance( SvxBoxItemLine::LEFT ) ); + const SwFrameFormat * pFrameFormat = pTabBox->GetFrameFormat(); + nIndent += sal_Int32( pFrameFormat->GetBox( ).GetDistance( SvxBoxItemLine::LEFT ) ); } break; } @@ -3361,7 +3361,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pTabBox->GetFrameFormat(); bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT; @@ -3369,15 +3369,15 @@ void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Point if (m_aTableStyleConf.empty()) { // the defaults of the table are taken from the top-left cell - impl_borders(m_pSerializer, pFrmFmt->GetBox(), lcl_getTableDefaultBorderOptions(bEcma), NULL, m_aTableStyleConf); + impl_borders(m_pSerializer, pFrameFormat->GetBox(), lcl_getTableDefaultBorderOptions(bEcma), NULL, m_aTableStyleConf); } } void DocxAttributeOutput::TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt(); - const SvxBoxItem& rBox = pFrmFmt->GetBox( ); + const SwFrameFormat * pFrameFormat = pTabBox->GetFrameFormat(); + const SvxBoxItem& rBox = pFrameFormat->GetBox( ); const bool bEcma = GetExport().GetFilter().getVersion( ) == oox::core::ECMA_DIALECT; impl_cellMargins(m_pSerializer, rBox, XML_tblCellMar, !bEcma); @@ -3385,15 +3385,15 @@ void DocxAttributeOutput::TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::P void DocxAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { - const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( ); - const SwFrmFmt *pFmt = pTblBox->GetFrmFmt( ); + const SwTableBox *pTableBox = pTableTextNodeInfoInner->getTableBox( ); + const SwFrameFormat *pFormat = pTableBox->GetFrameFormat( ); - const SvxBrushItem *aColorProp = sw::util::HasItem<SvxBrushItem>( pFmt->GetAttrSet(), RES_BACKGROUND ); + const SvxBrushItem *aColorProp = sw::util::HasItem<SvxBrushItem>( pFormat->GetAttrSet(), RES_BACKGROUND ); Color aColor = aColorProp ? aColorProp->GetColor() : COL_AUTO; OString sColor = msfilter::util::ConvertColor( aColor ); std::map<OUString, com::sun::star::uno::Any> aGrabBag = - sw::util::HasItem<SfxGrabBagItem>( pFmt->GetAttrSet(), RES_FRMATR_GRABBAG )->GetGrabBag(); + sw::util::HasItem<SfxGrabBagItem>( pFormat->GetAttrSet(), RES_FRMATR_GRABBAG )->GetGrabBag(); OString sOriginalColor; std::map<OUString, com::sun::star::uno::Any>::iterator aGrabBagElement = aGrabBag.find("originalColor"); @@ -3447,10 +3447,10 @@ void DocxAttributeOutput::TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t const SwTableLine * pTabLine = pTabBox->GetUpper(); // search next Redline - const SwExtraRedlineTbl& aExtraRedlineTbl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetExtraRedlineTbl(); - for(sal_uInt16 nCurRedlinePos = 0; nCurRedlinePos < aExtraRedlineTbl.GetSize(); ++nCurRedlinePos ) + const SwExtraRedlineTable& aExtraRedlineTable = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable(); + for(sal_uInt16 nCurRedlinePos = 0; nCurRedlinePos < aExtraRedlineTable.GetSize(); ++nCurRedlinePos ) { - SwExtraRedline* pExtraRedline = aExtraRedlineTbl.GetRedline(nCurRedlinePos); + SwExtraRedline* pExtraRedline = aExtraRedlineTable.GetRedline(nCurRedlinePos); const SwTableRowRedline* pTableRowRedline = dynamic_cast<const SwTableRowRedline*>(pExtraRedline); const SwTableLine *pRedTabLine = pTableRowRedline ? &pTableRowRedline->GetTableLine() : NULL; if (pRedTabLine == pTabLine) @@ -3493,10 +3493,10 @@ void DocxAttributeOutput::TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_ const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); // search next Redline - const SwExtraRedlineTbl& aExtraRedlineTbl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetExtraRedlineTbl(); - for(sal_uInt16 nCurRedlinePos = 0; nCurRedlinePos < aExtraRedlineTbl.GetSize(); ++nCurRedlinePos ) + const SwExtraRedlineTable& aExtraRedlineTable = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetExtraRedlineTable(); + for(sal_uInt16 nCurRedlinePos = 0; nCurRedlinePos < aExtraRedlineTable.GetSize(); ++nCurRedlinePos ) { - SwExtraRedline* pExtraRedline = aExtraRedlineTbl.GetRedline(nCurRedlinePos); + SwExtraRedline* pExtraRedline = aExtraRedlineTable.GetRedline(nCurRedlinePos); const SwTableCellRedline* pTableCellRedline = dynamic_cast<const SwTableCellRedline*>(pExtraRedline); const SwTableBox *pRedTabBox = pTableCellRedline ? &pTableCellRedline->GetTableBox() : NULL; if (pRedTabBox == pTabBox) @@ -3538,9 +3538,9 @@ void DocxAttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTa { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); - const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize(); + const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) { sal_Int32 nHeight = rLSz.GetHeight(); @@ -3565,9 +3565,9 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); - const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( ); + const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit( ); // if rSplittable is true then no need to write <w:cantSplit w:val="false"/> // as default row prop is allow row to break across page. if( !rSplittable.GetValue( ) ) @@ -3579,9 +3579,9 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - const SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat(); - if ( m_rExport.TrueFrameDirection( *pFrmFmt ) == FRMDIR_HORI_RIGHT_TOP ) + if ( m_rExport.TrueFrameDirection( *pFrameFormat ) == FRMDIR_HORI_RIGHT_TOP ) { m_pSerializer->singleElementNS( XML_w, XML_bidiVisual, FSNS( XML_w, XML_val ), "true", @@ -3592,13 +3592,13 @@ void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTabl void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwFrmFmt *pFrmFmt = pTabBox->GetFrmFmt( ); + const SwFrameFormat *pFrameFormat = pTabBox->GetFrameFormat( ); - if ( FRMDIR_VERT_TOP_RIGHT == m_rExport.TrueFrameDirection( *pFrmFmt ) ) + if ( FRMDIR_VERT_TOP_RIGHT == m_rExport.TrueFrameDirection( *pFrameFormat ) ) m_pSerializer->singleElementNS( XML_w, XML_textDirection, FSNS( XML_w, XML_val ), "tbRl", FSEND ); - else if ( FRMDIR_HORI_LEFT_TOP == m_rExport.TrueFrameDirection( *pFrmFmt ) ) + else if ( FRMDIR_HORI_LEFT_TOP == m_rExport.TrueFrameDirection( *pFrameFormat ) ) { // Undo the text direction mangling done by the btLr handler in writerfilter::dmapper::DomainMapperTableManager::sprm() const SwStartNode* pSttNd = pTabBox->GetSttNd(); @@ -3606,10 +3606,10 @@ void DocxAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer { SwPaM aPam(*pSttNd, 0); ++aPam.GetPoint()->nNode; - if (aPam.GetPoint()->nNode.GetNode().IsTxtNode()) + if (aPam.GetPoint()->nNode.GetNode().IsTextNode()) { - const SwTxtNode& rTxtNode = static_cast<const SwTxtNode&>(aPam.GetPoint()->nNode.GetNode()); - if( const SwAttrSet* pAttrSet = rTxtNode.GetpSwAttrSet()) + const SwTextNode& rTextNode = static_cast<const SwTextNode&>(aPam.GetPoint()->nNode.GetNode()); + if( const SwAttrSet* pAttrSet = rTextNode.GetpSwAttrSet()) { const SvxCharRotateItem& rCharRotate = pAttrSet->GetCharRotate(); if (rCharRotate.GetValue() == 900) @@ -3776,7 +3776,7 @@ bool lcl_isDefaultFontSize(const SvxFontHeightItem& rFontHeight, SwDoc* pDoc) { bool bRet = rFontHeight.GetHeight() != 200; // see StyleSheetTable_Impl::StyleSheetTable_Impl() where we set this default // Additionally, if the default para style has the same font size, then don't write it here. - SwTxtFmtColl* pDefaultStyle = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD); + SwTextFormatColl* pDefaultStyle = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD); if (pDefaultStyle) { const SfxPoolItem* pItem = 0; @@ -3921,7 +3921,7 @@ void DocxAttributeOutput::OutputDefaultItem(const SfxPoolItem& rHt) bMustWrite = static_cast< const SvxAdjustItem& >(rHt).GetAdjust() != SVX_ADJUST_LEFT; break; case RES_PARATR_SPLIT: - bMustWrite = !static_cast< const SvxFmtSplitItem& >(rHt).GetValue(); + bMustWrite = !static_cast< const SvxFormatSplitItem& >(rHt).GetValue(); break; case RES_PARATR_WIDOWS: bMustWrite = static_cast< const SvxWidowsItem& >(rHt).GetValue(); @@ -4062,15 +4062,15 @@ void DocxAttributeOutput::ClearRelIdCache() m_aRelIdCache.clear(); } -void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode, const SdrObject* pSdrObj ) +void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj ) { - OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode, const SdrObject* pSdrObj ) - some stuff still missing" ); + OSL_TRACE( "TODO DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj ) - some stuff still missing" ); GetSdtEndBefore(pSdrObj); // detect mis-use of the API - assert(pGrfNode || (pOLEFrmFmt && pOLENode)); - const SwFrmFmt* pFrmFmt = pGrfNode ? pGrfNode->GetFlyFmt() : pOLEFrmFmt; + assert(pGrfNode || (pOLEFrameFormat && pOLENode)); + const SwFrameFormat* pFrameFormat = pGrfNode ? pGrfNode->GetFlyFormat() : pOLEFrameFormat; // create the relation ID OString aRelId; sal_Int32 nImageType; @@ -4117,21 +4117,21 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size // In case there are any grab-bag items on the graphic frame, emit them now. // These are always character grab-bags, as graphics are at-char or as-char in Word. const SfxPoolItem* pItem = 0; - if (pFrmFmt->GetAttrSet().HasItem(RES_FRMATR_GRABBAG, &pItem)) + if (pFrameFormat->GetAttrSet().HasItem(RES_FRMATR_GRABBAG, &pItem)) { const SfxGrabBagItem* pGrabBag = static_cast<const SfxGrabBagItem*>(pItem); CharGrabBag(*pGrabBag); } - m_rExport.SdrExporter().startDMLAnchorInline(pFrmFmt, rSize); + m_rExport.SdrExporter().startDMLAnchorInline(pFrameFormat, rSize); // picture description (used for pic:cNvPr later too) ::sax_fastparser::FastAttributeList* docPrattrList = FastSerializerHelper::createAttrList(); docPrattrList->add( XML_id, OString::number( m_anchorId++).getStr()); - docPrattrList->add( XML_name, OUStringToOString( pFrmFmt->GetName(), RTL_TEXTENCODING_UTF8 ) ); - docPrattrList->add( XML_descr, OUStringToOString( pGrfNode ? pGrfNode->GetDescription() : pOLEFrmFmt->GetObjDescription(), RTL_TEXTENCODING_UTF8 ).getStr()); + docPrattrList->add( XML_name, OUStringToOString( pFrameFormat->GetName(), RTL_TEXTENCODING_UTF8 ) ); + docPrattrList->add( XML_descr, OUStringToOString( pGrfNode ? pGrfNode->GetDescription() : pOLEFrameFormat->GetObjDescription(), RTL_TEXTENCODING_UTF8 ).getStr()); if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT ) - docPrattrList->add( XML_title, OUStringToOString( pGrfNode ? pGrfNode->GetTitle() : pOLEFrmFmt->GetObjTitle(), RTL_TEXTENCODING_UTF8 ).getStr()); + docPrattrList->add( XML_title, OUStringToOString( pGrfNode ? pGrfNode->GetTitle() : pOLEFrameFormat->GetObjTitle(), RTL_TEXTENCODING_UTF8 ).getStr()); XFastAttributeListRef docPrAttrListRef( docPrattrList ); m_pSerializer->startElementNS( XML_wp, XML_docPr, docPrAttrListRef ); // TODO hyperlink @@ -4248,7 +4248,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size FSEND ); m_pSerializer->endElementNS( XML_a, XML_prstGeom ); - const SvxBoxItem& rBoxItem = pFrmFmt->GetBox(); + const SvxBoxItem& rBoxItem = pFrameFormat->GetBox(); const SvxBorderLine* pLeft = rBoxItem.GetLine(SvxBoxItemLine::LEFT); const SvxBorderLine* pRight = rBoxItem.GetLine(SvxBoxItemLine::RIGHT); const SvxBorderLine* pTop = rBoxItem.GetLine(SvxBoxItemLine::TOP); @@ -4256,7 +4256,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size if (pLeft || pRight || pTop || pBottom) m_rExport.SdrExporter().writeBoxItemLine(rBoxItem); - m_rExport.SdrExporter().writeDMLEffectLst(*pFrmFmt); + m_rExport.SdrExporter().writeDMLEffectLst(*pFrameFormat); m_pSerializer->endElementNS( XML_pic, XML_spPr ); @@ -4264,23 +4264,23 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size m_pSerializer->endElementNS( XML_a, XML_graphicData ); m_pSerializer->endElementNS( XML_a, XML_graphic ); - m_rExport.SdrExporter().endDMLAnchorInline(pFrmFmt); + m_rExport.SdrExporter().endDMLAnchorInline(pFrameFormat); } -void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOLENode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt ) +void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rOLENode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat ) { if( WriteOLEChart( pSdrObj, rSize )) return; if( WriteOLEMath( pSdrObj, rOLENode, rSize )) return; - if( PostponeOLE( pSdrObj, rOLENode, rSize, pFlyFrmFmt )) + if( PostponeOLE( pSdrObj, rOLENode, rSize, pFlyFrameFormat )) return; // Then we fall back to just export the object as a graphic. if( !m_pPostponedGraphic ) - FlyFrameGraphic( 0, rSize, pFlyFrmFmt, &rOLENode ); + FlyFrameGraphic( 0, rSize, pFlyFrameFormat, &rOLENode ); else // w:drawing should not be inside w:rPr, so write it out later - m_pPostponedGraphic->push_back(PostponedGraphic(0, rSize, pFlyFrmFmt, &rOLENode, 0)); + m_pPostponedGraphic->push_back(PostponedGraphic(0, rSize, pFlyFrameFormat, &rOLENode, 0)); } bool DocxAttributeOutput::WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize ) @@ -4577,13 +4577,13 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject) } } -bool DocxAttributeOutput::PostponeOLE( const SdrObject*, SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt ) +bool DocxAttributeOutput::PostponeOLE( const SdrObject*, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat ) { if( !m_pPostponedOLEs ) //cannot be postponed, try to write now - WriteOLE( rNode, rSize, pFlyFrmFmt ); + WriteOLE( rNode, rSize, pFlyFrameFormat ); else - m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, pFlyFrmFmt ) ); + m_pPostponedOLEs->push_back( PostponedOLE( &rNode, rSize, pFlyFrameFormat ) ); return true; } @@ -4606,7 +4606,7 @@ void DocxAttributeOutput::WritePostponedOLE() m_pPostponedOLEs.reset(0); } -void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* rFlyFrmFmt ) +void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat ) { // get interoperability information about embedded objects uno::Reference< beans::XPropertySet > xPropSet( m_rExport.m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); @@ -4732,7 +4732,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S { // the embedded file could not be saved // fallback: save as an image - FlyFrameGraphic( 0, rSize, rFlyFrmFmt, &rNode ); + FlyFrameGraphic( 0, rSize, rFlyFrameFormat, &rNode ); return; } @@ -4846,7 +4846,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po { case sw::Frame::eGraphic: { - const SdrObject* pSdrObj = rFrame.GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject(); const SwNode *pNode = rFrame.GetContent(); const SwGrfNode *pGrfNode = pNode ? pNode->GetGrfNode() : 0; if ( pGrfNode ) @@ -4866,7 +4866,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po break; case sw::Frame::eDrawing: { - const SdrObject* pSdrObj = rFrame.GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject(); if ( pSdrObj ) { if ( IsDiagram( pSdrObj ) ) @@ -4874,12 +4874,12 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po if ( !m_pPostponedDiagrams ) { m_bPostponedProcessingFly = false ; - m_rExport.SdrExporter().writeDiagram( pSdrObj, rFrame.GetFrmFmt(), m_anchorId++); + m_rExport.SdrExporter().writeDiagram( pSdrObj, rFrame.GetFrameFormat(), m_anchorId++); } else // we are writing out attributes, but w:drawing should not be inside w:rPr, { // so write it out later m_bPostponedProcessingFly = true ; - m_pPostponedDiagrams->push_back( PostponedDiagram( pSdrObj, &(rFrame.GetFrmFmt()) )); + m_pPostponedDiagrams->push_back( PostponedDiagram( pSdrObj, &(rFrame.GetFrameFormat()) )); } } else @@ -4891,12 +4891,12 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po { // Do not write w:drawing inside w:drawing. Instead Postpone the Inner Drawing. if( m_rExport.SdrExporter().IsDrawingOpen() ) - m_pPostponedCustomShape->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrmFmt()), &rNdTopLeft)); + m_pPostponedCustomShape->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrameFormat()), &rNdTopLeft)); else - m_rExport.SdrExporter().writeDMLDrawing( pSdrObj, &rFrame.GetFrmFmt(), m_anchorId++); + m_rExport.SdrExporter().writeDMLDrawing( pSdrObj, &rFrame.GetFrameFormat(), m_anchorId++); } else - m_rExport.SdrExporter().writeDMLAndVMLDrawing( pSdrObj, rFrame.GetFrmFmt(), rNdTopLeft, m_anchorId++); + m_rExport.SdrExporter().writeDMLAndVMLDrawing( pSdrObj, rFrame.GetFrameFormat(), rNdTopLeft, m_anchorId++); m_bStartedParaSdt = bStartedParaSdt; m_bPostponedProcessingFly = false ; @@ -4904,30 +4904,30 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po // IsAlternateContentChoiceOpen() : check is to ensure that only one object is getting added. Without this check, plus one obejct gets added // m_bParagraphFrameOpen : Check if the frame is open. else if (IsAlternateContentChoiceOpen() && m_bParagraphFrameOpen) - m_pPostponedCustomShape->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrmFmt()), &rNdTopLeft)); + m_pPostponedCustomShape->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrameFormat()), &rNdTopLeft)); else { // we are writing out attributes, but w:drawing should not be inside w:rPr, so write it out later m_bPostponedProcessingFly = true ; - m_pPostponedDMLDrawings->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrmFmt()), &rNdTopLeft)); + m_pPostponedDMLDrawings->push_back(PostponedDrawing(pSdrObj, &(rFrame.GetFrameFormat()), &rNdTopLeft)); } } } } break; - case sw::Frame::eTxtBox: + case sw::Frame::eTextBox: { // If this is a TextBox of a shape, then ignore: it's handled in WriteTextBox(). - if (m_rExport.SdrExporter().isTextBox(rFrame.GetFrmFmt())) + if (m_rExport.SdrExporter().isTextBox(rFrame.GetFrameFormat())) break; // The frame output is postponed to the end of the anchor paragraph bool bDuplicate = false; - const OUString& rName = rFrame.GetFrmFmt().GetName(); + const OUString& rName = rFrame.GetFrameFormat().GetName(); unsigned nSize = m_aFramesOfParagraph.size(); for( unsigned nIndex = 0; nIndex < nSize; ++nIndex ) { - const OUString& rNameExisting = m_aFramesOfParagraph[nIndex].GetFrmFmt().GetName(); + const OUString& rNameExisting = m_aFramesOfParagraph[nIndex].GetFrameFormat().GetName(); if (!rName.isEmpty() && !rNameExisting.isEmpty()) { @@ -4945,27 +4945,27 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po break; case sw::Frame::eOle: { - const SwFrmFmt &rFrmFmt = rFrame.GetFrmFmt(); - const SdrObject *pSdrObj = rFrmFmt.FindRealSdrObject(); + const SwFrameFormat &rFrameFormat = rFrame.GetFrameFormat(); + const SdrObject *pSdrObj = rFrameFormat.FindRealSdrObject(); if ( pSdrObj ) { - SwNodeIndex aIdx(*rFrmFmt.GetCntnt().GetCntntIdx(), 1); + SwNodeIndex aIdx(*rFrameFormat.GetContent().GetContentIdx(), 1); SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); - WriteOLE2Obj( pSdrObj, rOLENd, rFrame.GetLayoutSize(), dynamic_cast<const SwFlyFrmFmt*>( &rFrmFmt )); + WriteOLE2Obj( pSdrObj, rOLENd, rFrame.GetLayoutSize(), dynamic_cast<const SwFlyFrameFormat*>( &rFrameFormat )); m_bPostponedProcessingFly = false ; } } break; case sw::Frame::eFormControl: { - const SdrObject* pObject = rFrame.GetFrmFmt().FindRealSdrObject(); + const SdrObject* pObject = rFrame.GetFrameFormat().FindRealSdrObject(); m_aPostponedFormControls.push_back(pObject); m_bPostponedProcessingFly = true ; } break; default: OSL_TRACE( "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n", - rFrame.GetWriterType() == sw::Frame::eTxtBox? "eTxtBox": + rFrame.GetWriterType() == sw::Frame::eTextBox? "eTextBox": ( rFrame.GetWriterType() == sw::Frame::eOle? "eOle": "???" ) ); break; } @@ -5038,8 +5038,8 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj) WriteCollectedRunProperties(); m_pSerializer->endElementNS(XML_w, XML_rPr); - bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); - if( !bTxtAtr ) + bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); + if( !bTextAtr ) { OUString aOut( aStr.copy( nAktPos, nNextAttr - nAktPos ) ); RunText(aOut); @@ -5083,8 +5083,8 @@ void DocxAttributeOutput::WriteTextBox(uno::Reference<drawing::XShape> xShape) DocxTableExportContext aTableExportContext; pushToTableExportContext(aTableExportContext); - SwFrmFmt* pTextBox = SwTextBoxHelper::findTextBox(xShape); - const SwPosition* pAnchor = pTextBox->GetAnchor().GetCntntAnchor(); + SwFrameFormat* pTextBox = SwTextBoxHelper::findTextBox(xShape); + const SwPosition* pAnchor = pTextBox->GetAnchor().GetContentAnchor(); sw::Frame aFrame(*pTextBox, *pAnchor); m_rExport.SdrExporter().writeDMLTextFrame(&aFrame, m_anchorId++, /*bTextBoxOnly=*/true); @@ -5096,8 +5096,8 @@ void DocxAttributeOutput::WriteVMLTextBox(uno::Reference<drawing::XShape> xShape DocxTableExportContext aTableExportContext; pushToTableExportContext(aTableExportContext); - SwFrmFmt* pTextBox = SwTextBoxHelper::findTextBox(xShape); - const SwPosition* pAnchor = pTextBox->GetAnchor().GetCntntAnchor(); + SwFrameFormat* pTextBox = SwTextBoxHelper::findTextBox(xShape); + const SwPosition* pAnchor = pTextBox->GetAnchor().GetContentAnchor(); sw::Frame aFrame(*pTextBox, *pAnchor); m_rExport.SdrExporter().writeVMLTextFrame(&aFrame, /*bTextBoxOnly=*/true); @@ -5167,8 +5167,8 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType, uno::Any aAny; if (eType == STYLE_TYPE_PARA || eType == STYLE_TYPE_CHAR) { - const SwFmt* pFmt = m_rExport.m_pStyles->GetSwFmt(nId); - pFmt->GetGrabBagItem(aAny); + const SwFormat* pFormat = m_rExport.m_pStyles->GetSwFormat(nId); + pFormat->GetGrabBagItem(aAny); } else { @@ -5313,7 +5313,7 @@ void lcl_OutlineLevel(sax_fastparser::FSHelperPtr pSerializer, sal_uInt16 nLevel FSEND); } -void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ ) +void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFormat& /*rNFormat*/, const SwFormat& /*rFormat*/ ) { lcl_OutlineLevel(m_pSerializer, nLvl); } @@ -5477,11 +5477,11 @@ void DocxAttributeOutput::SectionTitlePage() m_pSerializer->singleElementNS( XML_w, XML_titlePg, FSEND ); } -void DocxAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* /*pFirstPageFmt*/ ) +void DocxAttributeOutput::SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* /*pFirstPageFormat*/ ) { // Output the margins - const SvxBoxItem& rBox = pFmt->GetBox( ); + const SvxBoxItem& rBox = pFormat->GetBox( ); const SvxBorderLine* pLeft = rBox.GetLeft( ); const SvxBorderLine* pTop = rBox.GetTop( ); @@ -5521,7 +5521,7 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmF // By top margin, impl_borders() means the distance between the top of the page and the header frame. PageMargins aMargins = m_pageMargins; - HdFtDistanceGlue aGlue(pFmt->GetAttrSet()); + HdFtDistanceGlue aGlue(pFormat->GetAttrSet()); if (aGlue.HasHeader()) aMargins.nPageMarginTop = aGlue.dyaHdrTop; // Ditto for bottom margin. @@ -5628,9 +5628,9 @@ void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, const ::boo pAttr->add( FSNS( XML_w, XML_start ), OString::number( oPageRestartNumber.get() ) ); // nNumType corresponds to w:fmt. See WW8Export::GetNumId() for more precisions - OString aFmt( impl_NumberingType( nNumType ) ); - if ( !aFmt.isEmpty() ) - pAttr->add( FSNS( XML_w, XML_fmt ), aFmt.getStr() ); + OString aFormat( impl_NumberingType( nNumType ) ); + if ( !aFormat.isEmpty() ) + pAttr->add( FSNS( XML_w, XML_fmt ), aFormat.getStr() ); XFastAttributeListRef xAttrs( pAttr ); m_pSerializer->singleElementNS( XML_w, XML_pgNumType, xAttrs ); @@ -5918,11 +5918,11 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, } // format - OString aFmt( impl_LevelNFC( nNumberingType ,pOutSet) ); + OString aFormat( impl_LevelNFC( nNumberingType ,pOutSet) ); - if ( !aFmt.isEmpty() ) + if ( !aFormat.isEmpty() ) m_pSerializer->singleElementNS( XML_w, XML_numFmt, - FSNS( XML_w, XML_val ), aFmt.getStr(), + FSNS( XML_w, XML_val ), aFormat.getStr(), FSEND ); // suffix @@ -6470,47 +6470,47 @@ void DocxAttributeOutput::CharHighlight( const SvxBrushItem& rHighlight ) } } -void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink ) +void DocxAttributeOutput::TextINetFormat( const SwFormatINetFormat& rLink ) { - const SwTxtINetFmt* pINetFmt = rLink.GetTxtINetFmt(); - const SwCharFmt* pCharFmt = pINetFmt->GetCharFmt(); + const SwTextINetFormat* pINetFormat = rLink.GetTextINetFormat(); + const SwCharFormat* pCharFormat = pINetFormat->GetCharFormat(); - OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFmt))); + OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFormat))); m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND ); } -void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) +void DocxAttributeOutput::TextCharFormat( const SwFormatCharFormat& rCharFormat ) { - OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(rCharFmt.GetCharFmt()))); + OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(rCharFormat.GetCharFormat()))); m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND ); } -void DocxAttributeOutput::RefField( const SwField& rFld, const OUString& rRef ) +void DocxAttributeOutput::RefField( const SwField& rField, const OUString& rRef ) { - sal_uInt16 nType = rFld.GetTyp( )->Which( ); + sal_uInt16 nType = rField.GetTyp( )->Which( ); if ( nType == RES_GETEXPFLD ) { OUString sCmd = FieldString( ww::eREF ); sCmd += "\"" + rRef + "\" "; - m_rExport.OutputField( &rFld, ww::eREF, sCmd ); + m_rExport.OutputField( &rField, ww::eREF, sCmd ); } // There is nothing to do here for the set fields } -void DocxAttributeOutput::HiddenField( const SwField& /*rFld*/ ) +void DocxAttributeOutput::HiddenField( const SwField& /*rField*/ ) { OSL_TRACE( "TODO DocxAttributeOutput::HiddenField()" ); } -void DocxAttributeOutput::PostitField( const SwField* pFld ) +void DocxAttributeOutput::PostitField( const SwField* pField ) { - assert( dynamic_cast< const SwPostItField* >( pFld )); - const SwPostItField* pPostItFld = static_cast<const SwPostItField*>(pFld); - OString aName = OUStringToOString(pPostItFld->GetName(), RTL_TEXTENCODING_UTF8); + assert( dynamic_cast< const SwPostItField* >( pField )); + const SwPostItField* pPostItField = static_cast<const SwPostItField*>(pField); + OString aName = OUStringToOString(pPostItField->GetName(), RTL_TEXTENCODING_UTF8); sal_Int32 nId = 0; std::map< OString, sal_uInt16 >::iterator it = m_rOpenedAnnotationMarksIds.find(aName); if (it != m_rOpenedAnnotationMarksIds.end()) @@ -6519,7 +6519,7 @@ void DocxAttributeOutput::PostitField( const SwField* pFld ) else // Otherwise get a new one. nId = m_nNextAnnotationMarkId++; - m_postitFields.push_back(std::make_pair(pPostItFld, nId)); + m_postitFields.push_back(std::make_pair(pPostItField, nId)); } void DocxAttributeOutput::WritePostitFieldReference() @@ -6551,7 +6551,7 @@ void DocxAttributeOutput::WritePostitFields() FSNS( XML_w, XML_date ), DateTimeToOString(f->GetDateTime()).getStr(), FSNS( XML_w, XML_initials ), OUStringToOString( f->GetInitials(), RTL_TEXTENCODING_UTF8 ).getStr(), FSEND ); // Check for the text object existing, it seems that it can be NULL when saving a newly created - // comment without giving focus back to the main document. As GetTxt() is empty in that case as well, + // comment without giving focus back to the main document. As GetText() is empty in that case as well, // that is probably a bug in the Writer core. if( f->GetTextObject() != NULL ) GetExport().WriteOutliner( *f->GetTextObject(), TXT_ATN ); @@ -6559,21 +6559,21 @@ void DocxAttributeOutput::WritePostitFields() } } -bool DocxAttributeOutput::DropdownField( const SwField* pFld ) +bool DocxAttributeOutput::DropdownField( const SwField* pField ) { bool bExpand = false; ww::eField eType = ww::eFORMDROPDOWN; OUString sCmd = FieldString( eType ); - GetExport( ).OutputField( pFld, eType, sCmd ); + GetExport( ).OutputField( pField, eType, sCmd ); return bExpand; } -bool DocxAttributeOutput::PlaceholderField( const SwField* pFld ) +bool DocxAttributeOutput::PlaceholderField( const SwField* pField ) { assert( pendingPlaceholder == NULL ); - pendingPlaceholder = pFld; + pendingPlaceholder = pField; return false; // do not expand } @@ -6581,63 +6581,63 @@ void DocxAttributeOutput::WritePendingPlaceholder() { if( pendingPlaceholder == NULL ) return; - const SwField* pFld = pendingPlaceholder; + const SwField* pField = pendingPlaceholder; pendingPlaceholder = NULL; m_pSerializer->startElementNS( XML_w, XML_sdt, FSEND ); m_pSerializer->startElementNS( XML_w, XML_sdtPr, FSEND ); - if( !pFld->GetPar2().isEmpty()) + if( !pField->GetPar2().isEmpty()) m_pSerializer->singleElementNS( XML_w, XML_alias, - FSNS( XML_w, XML_val ), OUStringToOString( pFld->GetPar2(), RTL_TEXTENCODING_UTF8 ), FSEND ); + FSNS( XML_w, XML_val ), OUStringToOString( pField->GetPar2(), RTL_TEXTENCODING_UTF8 ), FSEND ); m_pSerializer->singleElementNS( XML_w, XML_temporary, FSEND ); m_pSerializer->singleElementNS( XML_w, XML_showingPlcHdr, FSEND ); m_pSerializer->singleElementNS( XML_w, XML_text, FSEND ); m_pSerializer->endElementNS( XML_w, XML_sdtPr ); m_pSerializer->startElementNS( XML_w, XML_sdtContent, FSEND ); m_pSerializer->startElementNS( XML_w, XML_r, FSEND ); - RunText( pFld->GetPar1()); + RunText( pField->GetPar1()); m_pSerializer->endElementNS( XML_w, XML_r ); m_pSerializer->endElementNS( XML_w, XML_sdtContent ); m_pSerializer->endElementNS( XML_w, XML_sdt ); } -void DocxAttributeOutput::SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) +void DocxAttributeOutput::SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) { // field bookmarks are handled in the EndRun method - GetExport().OutputField(&rFld, eType, rCmd ); + GetExport().OutputField(&rField, eType, rCmd ); } -void DocxAttributeOutput::WriteExpand( const SwField* pFld ) +void DocxAttributeOutput::WriteExpand( const SwField* pField ) { // Will be written in the next End Run OUString sCmd; - m_rExport.OutputField( pFld, ww::eUNKNOWN, sCmd ); + m_rExport.OutputField( pField, ww::eUNKNOWN, sCmd ); } -void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const OUString& rFldCmd, sal_uInt8 nMode ) +void DocxAttributeOutput::WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, sal_uInt8 nMode ) { struct FieldInfos infos; - if (pFld) - infos.pField.reset(pFld->CopyField()); - infos.sCmd = rFldCmd; + if (pField) + infos.pField.reset(pField->CopyField()); + infos.sCmd = rFieldCmd; infos.eType = eType; infos.bClose = WRITEFIELD_CLOSE & nMode; infos.bOpen = WRITEFIELD_START & nMode; m_Fields.push_back( infos ); - if ( pFld ) + if ( pField ) { - sal_uInt16 nType = pFld->GetTyp( )->Which( ); - sal_uInt16 nSubType = pFld->GetSubType(); + sal_uInt16 nType = pField->GetTyp( )->Which( ); + sal_uInt16 nSubType = pField->GetSubType(); // TODO Any other field types here ? if ( ( nType == RES_SETEXPFLD ) && ( nSubType & nsSwGetSetExpType::GSE_STRING ) ) { - const SwSetExpField *pSet = static_cast<const SwSetExpField*>( pFld ); + const SwSetExpField *pSet = static_cast<const SwSetExpField*>( pField ); m_sFieldBkm = pSet->GetPar1( ); } else if ( nType == RES_DROPDOWN ) { - const SwDropDownField* pDropDown = static_cast<const SwDropDownField*>( pFld ); + const SwDropDownField* pDropDown = static_cast<const SwDropDownField*>( pField ); m_sFieldBkm = pDropDown->GetName( ); } } @@ -6685,15 +6685,15 @@ void DocxAttributeOutput::WriteAnnotationMarks_Impl( std::vector< OUString >& rS rEnds.clear(); } -void DocxAttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFootnote ) +void DocxAttributeOutput::TextFootnote_Impl( const SwFormatFootnote& rFootnote ) { const SwEndNoteInfo& rInfo = rFootnote.IsEndNote()? - m_rExport.m_pDoc->GetEndNoteInfo(): m_rExport.m_pDoc->GetFtnInfo(); + m_rExport.m_pDoc->GetEndNoteInfo(): m_rExport.m_pDoc->GetFootnoteInfo(); // footnote/endnote run properties - const SwCharFmt* pCharFmt = rInfo.GetAnchorCharFmt( *m_rExport.m_pDoc ); + const SwCharFormat* pCharFormat = rInfo.GetAnchorCharFormat( *m_rExport.m_pDoc ); - OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFmt))); + OString aStyleId(m_rExport.m_pStyles->GetStyleId(m_rExport.GetId(pCharFormat))); m_pSerializer->singleElementNS( XML_w, XML_rStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND ); @@ -6709,7 +6709,7 @@ void DocxAttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFootnote ) void DocxAttributeOutput::FootnoteEndnoteReference() { sal_Int32 nId; - const SwFmtFtn *pFootnote = m_pFootnotesList->getCurrent( nId ); + const SwFormatFootnote *pFootnote = m_pFootnotesList->getCurrent( nId ); // both cannot be set at the same time - if they are, it's a bug if ( !pFootnote ) @@ -6763,9 +6763,9 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) bool bSeparator = true; if (bFootnotes) { - const SwPageFtnInfo& rFtnInfo = m_rExport.m_pDoc->GetPageDesc(0).GetFtnInfo(); + const SwPageFootnoteInfo& rFootnoteInfo = m_rExport.m_pDoc->GetPageDesc(0).GetFootnoteInfo(); // Request a separator only in case the width is larger than zero. - bSeparator = double(rFtnInfo.GetWidth()) > 0; + bSeparator = double(rFootnoteInfo.GetWidth()) > 0; } if (bSeparator) @@ -6795,7 +6795,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) FSNS( XML_w, XML_id ), OString::number( nIndex ).getStr(), FSEND ); - const SwNodeIndex* pIndex = (*i)->GetTxtFtn()->GetStartNode(); + const SwNodeIndex* pIndex = (*i)->GetTextFootnote()->GetStartNode(); // tag required at the start of each footnote/endnote m_footnoteEndnoteRefTag = bFootnotes ? XML_footnoteRef : XML_endnoteRef; @@ -6815,7 +6815,7 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr { fs->startElementNS( XML_w, tag, FSEND ); const char* fmt = NULL; - switch( info.aFmt.GetNumberingType()) + switch( info.aFormat.GetNumberingType()) { case SVX_NUM_CHARS_UPPER_LETTER_N: // fall through, map to upper letters case SVX_NUM_CHARS_UPPER_LETTER: @@ -6847,9 +6847,9 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr } if( fmt != NULL ) fs->singleElementNS( XML_w, XML_numFmt, FSNS( XML_w, XML_val ), fmt, FSEND ); - if( info.nFtnOffset != 0 ) + if( info.nFootnoteOffset != 0 ) fs->singleElementNS( XML_w, XML_numStart, FSNS( XML_w, XML_val ), - OString::number( info.nFtnOffset + 1).getStr(), FSEND ); + OString::number( info.nFootnoteOffset + 1).getStr(), FSEND ); if( listtag != 0 ) // we are writing to settings.xml, write also special footnote/endnote list { // there are currently only two hardcoded ones ( see FootnotesEndnotes()) fs->singleElementNS( XML_w, listtag, FSNS( XML_w, XML_id ), "0", FSEND ); @@ -6861,7 +6861,7 @@ void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr void DocxAttributeOutput::SectFootnoteEndnotePr() { if( HasFootnotes()) - WriteFootnoteEndnotePr( m_pSerializer, XML_footnotePr, m_rExport.m_pDoc->GetFtnInfo(), 0 ); + WriteFootnoteEndnotePr( m_pSerializer, XML_footnotePr, m_rExport.m_pDoc->GetFootnoteInfo(), 0 ); if( HasEndnotes()) WriteFootnoteEndnotePr( m_pSerializer, XML_endnotePr, m_rExport.m_pDoc->GetEndNoteInfo(), 0 ); } @@ -6948,7 +6948,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust ) m_pSerializer->singleElementNS( XML_w, XML_jc, FSNS( XML_w, XML_val ), pAdjustString, FSEND ); } -void DocxAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit ) +void DocxAttributeOutput::ParaSplit( const SvxFormatSplitItem& rSplit ) { if (rSplit.GetValue()) m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "false", FSEND ); @@ -7010,7 +7010,7 @@ static void impl_WriteTabElement( FSHelperPtr pSerializer, void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop ) { const SfxPoolItem* pLR = m_rExport.HasItem( RES_LR_SPACE ); - long nCurrentLeft = pLR ? static_cast<const SvxLRSpaceItem*>(pLR)->GetTxtLeft() : 0; + long nCurrentLeft = pLR ? static_cast<const SvxLRSpaceItem*>(pLR)->GetTextLeft() : 0; sal_uInt16 nCount = rTabStop.Count(); @@ -7043,7 +7043,7 @@ void DocxAttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone ) FSEND ); } -void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int32 nLvl, sal_Int32 nNumId ) +void DocxAttributeOutput::ParaNumRule_Impl( const SwTextNode* /*pTextNd*/, sal_Int32 nLvl, sal_Int32 nNumId ) { if ( USHRT_MAX != nNumId ) { @@ -7109,7 +7109,7 @@ void DocxAttributeOutput::ParaSnapToGrid( const SvxParaGridItem& rGrid ) FSEND ); } -void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) +void DocxAttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize ) { if (m_rExport.SdrExporter().getTextFrameSyntax() && m_rExport.SdrExporter().getFlyFrameSize()) { @@ -7199,15 +7199,15 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) else { FastAttributeList *pLRSpaceAttrList = FastSerializerHelper::createAttrList(); - if((0 != rLRSpace.GetTxtLeft()) || ((0 == rLRSpace.GetTxtLeft()) && rLRSpace.IsExplicitZeroMarginValLeft())) + if((0 != rLRSpace.GetTextLeft()) || ((0 == rLRSpace.GetTextLeft()) && rLRSpace.IsExplicitZeroMarginValLeft())) { - pLRSpaceAttrList->add( FSNS( XML_w, ( bEcma ? XML_left : XML_start ) ), OString::number( rLRSpace.GetTxtLeft() ) ); + pLRSpaceAttrList->add( FSNS( XML_w, ( bEcma ? XML_left : XML_start ) ), OString::number( rLRSpace.GetTextLeft() ) ); } if((0 != rLRSpace.GetRight()) || ((0 == rLRSpace.GetRight()) && rLRSpace.IsExplicitZeroMarginValRight())) { pLRSpaceAttrList->add( FSNS( XML_w, ( bEcma ? XML_right : XML_end ) ), OString::number( rLRSpace.GetRight() ) ); } - sal_Int32 nFirstLineAdjustment = rLRSpace.GetTxtFirstLineOfst(); + sal_Int32 nFirstLineAdjustment = rLRSpace.GetTextFirstLineOfst(); if (nFirstLineAdjustment > 0) pLRSpaceAttrList->add( FSNS( XML_w, XML_firstLine ), OString::number( nFirstLineAdjustment ) ); else @@ -7312,7 +7312,7 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) } } -void DocxAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) +void DocxAttributeOutput::FormatSurround( const SwFormatSurround& rSurround ) { if (m_rExport.SdrExporter().getTextFrameSyntax()) { @@ -7377,7 +7377,7 @@ void DocxAttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) } } -void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert ) +void DocxAttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyVert ) { OString sAlign; switch( rFlyVert.GetVertOrient() ) @@ -7444,7 +7444,7 @@ void DocxAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert } } -void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori ) +void DocxAttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyHori ) { OString sAlign; switch( rFlyHori.GetHoriOrient() ) @@ -7504,7 +7504,7 @@ void DocxAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHor } } -void DocxAttributeOutput::FormatAnchor( const SwFmtAnchor& ) +void DocxAttributeOutput::FormatAnchor( const SwFormatAnchor& ) { // Fly frames: anchors here aren't matching the anchors in docx } @@ -7653,8 +7653,8 @@ void DocxAttributeOutput::FormatFillGradient( const XFillGradientItem& rFillGrad } else if (m_oFillStyle && *m_oFillStyle == drawing::FillStyle_GRADIENT && m_rExport.SdrExporter().getDMLTextFrameSyntax()) { - SwFrmFmt & rFormat( - const_cast<SwFrmFmt&>(m_rExport.m_pParentFrame->GetFrmFmt())); + SwFrameFormat & rFormat( + const_cast<SwFrameFormat&>(m_rExport.m_pParentFrame->GetFrameFormat())); uno::Reference<beans::XPropertySet> const xPropertySet( SwXTextFrame::CreateXTextFrame(*rFormat.GetDoc(), &rFormat), uno::UNO_QUERY); @@ -7676,7 +7676,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) FormatFillStyle(*pFillStyle); if (m_oFillStyle && *m_oFillStyle == drawing::FillStyle_BITMAP) { - const SdrObject* pSdrObj = m_rExport.m_pParentFrame->GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = m_rExport.m_pParentFrame->GetFrameFormat().FindRealSdrObject(); if (pSdrObj) { uno::Reference< drawing::XShape > xShape( const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY ); @@ -7806,7 +7806,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) } } -void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize ) +void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven, SwTwips nPageSize ) { // Get the columns attributes FastAttributeList *pColsAttrList = FastSerializerHelper::createAttrList(); @@ -7858,7 +7858,7 @@ void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& m_pSerializer->endElementNS( XML_w, XML_cols ); } -void DocxAttributeOutput::FormatKeep( const SvxFmtKeepItem& ) +void DocxAttributeOutput::FormatKeep( const SvxFormatKeepItem& ) { m_pSerializer->singleElementNS( XML_w, XML_keepNext, FSEND ); } @@ -7896,7 +7896,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid ) m_pSerializer->singleElementNS( XML_w, XML_docGrid, pGridAttrList ); } -void DocxAttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) +void DocxAttributeOutput::FormatLineNumbering( const SwFormatLineNumber& rNumbering ) { if ( !rNumbering.IsCount( ) ) m_pSerializer->singleElementNS( XML_w, XML_suppressLineNumbers, FSEND ); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 8763530a6aff..b7ce59d29db5 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -155,7 +155,7 @@ public: virtual void EmptyParagraph() SAL_OVERRIDE; /// Called in order to output section breaks. - virtual void SectionBreaks(const SwTxtNode& rNode) SAL_OVERRIDE; + virtual void SectionBreaks(const SwTextNode& rNode) SAL_OVERRIDE; /// Called before we start outputting the attributes. virtual void StartParagraphProperties() SAL_OVERRIDE; @@ -188,7 +188,7 @@ public: virtual void RawText( const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) SAL_OVERRIDE; /// Output ruby start. - virtual void StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) SAL_OVERRIDE; + virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) SAL_OVERRIDE; /// Output ruby end. virtual void EndRuby() SAL_OVERRIDE; @@ -199,7 +199,7 @@ public: /// Output URL end. virtual bool EndURL(bool) SAL_OVERRIDE; - virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) SAL_OVERRIDE; + virtual void FieldVanish( const OUString& rText, ww::eField eType ) SAL_OVERRIDE; /// Output redlining. /// @@ -222,7 +222,7 @@ public: virtual bool IsFlyProcessingPostponed() SAL_OVERRIDE; virtual void ResetFlyProcessingFlag() SAL_OVERRIDE; - virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE; + virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE; /// Output style. virtual void ParagraphStyle( sal_uInt16 nStyle ) SAL_OVERRIDE; @@ -282,7 +282,7 @@ public: virtual void EndStyleProperties( bool bParProp ) SAL_OVERRIDE; /// Numbering rule and Id. - virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ) SAL_OVERRIDE; + virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFormat &rNFormat, const SwFormat &rFormat ) SAL_OVERRIDE; /// Page break /// As a paragraph property - the paragraph should be on the next page. @@ -308,7 +308,7 @@ public: virtual void SectionTitlePage() SAL_OVERRIDE; /// Description of the page borders. - virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) SAL_OVERRIDE; + virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) SAL_OVERRIDE; /// Columns populated from right/numbers on the right side? virtual void SectionBiDi( bool bBiDi ) SAL_OVERRIDE; @@ -365,7 +365,7 @@ public: const OUString &rNumberingString, const SvxBrushItem* pBrush = 0 ) SAL_OVERRIDE; - void WriteField_Impl( const SwField* pFld, ww::eField eType, const OUString& rFldCmd, sal_uInt8 nMode ); + void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, sal_uInt8 nMode ); void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark ); void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds ); @@ -407,13 +407,13 @@ private: /// replacement graphics, set the first as 0, and pass the remaining three. /// /// @see WriteOLE2Obj() - void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrmFmt* pOLEFrmFmt = 0, SwOLENode* pOLENode = 0, const SdrObject* pSdrObj = 0); + void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat = 0, SwOLENode* pOLENode = 0, const SdrObject* pSdrObj = 0); void WriteSrcRect( const SdrObject* pSdrObj ); - void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt); + void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat); bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize ); bool WriteOLEMath( const SdrObject* pSdrObj, const SwOLENode& rNode, const Size& rSize ); - bool PostponeOLE( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt ); - void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* rFlyFrmFmt ); + bool PostponeOLE( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat ); + void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat ); /// checks whether the current component is a diagram static bool IsDiagram (const SdrObject* sdrObject); @@ -427,8 +427,8 @@ private: void EndTableRow( ); void EndTable(); void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t pInner, sal_Int32 nCell, sal_uInt32 nRow); - void PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const Size& rSize); - static bool TextBoxIsFramePr(const SwFrmFmt& rFrmFmt); + void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize); + static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat); /// End cell, row, and even the entire table if necessary. void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false ); @@ -449,7 +449,7 @@ private: protected: /// Output frames - the implementation. - virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) SAL_OVERRIDE; + virtual void OutputFlyFrame_Impl( const sw::Frame& rFormat, const Point& rNdTopLeft ) SAL_OVERRIDE; /// Sfx item Sfx item RES_CHRATR_CASEMAP virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) SAL_OVERRIDE; @@ -560,13 +560,13 @@ protected: virtual void CharHighlight( const SvxBrushItem& rHighlight ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_INETFMT - virtual void TextINetFormat( const SwFmtINetFmt& ) SAL_OVERRIDE; + virtual void TextINetFormat( const SwFormatINetFormat& ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_CHARFMT - virtual void TextCharFormat( const SwFmtCharFmt& ) SAL_OVERRIDE; + virtual void TextCharFormat( const SwFormatCharFormat& ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_FTN - virtual void TextFootnote_Impl( const SwFmtFtn& ) SAL_OVERRIDE; + virtual void TextFootnote_Impl( const SwFormatFootnote& ) SAL_OVERRIDE; /// Output the footnote/endnote reference (if there's one to output). void FootnoteEndnoteReference(); @@ -578,7 +578,7 @@ protected: virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) SAL_OVERRIDE; /// Sfx item RES_PARATR_SPLIT - virtual void ParaSplit( const SvxFmtSplitItem& rSplit ) SAL_OVERRIDE; + virtual void ParaSplit( const SvxFormatSplitItem& rSplit ) SAL_OVERRIDE; /// Sfx item RES_PARATR_WIDOWS virtual void ParaWidows( const SvxWidowsItem& rWidows ) SAL_OVERRIDE; @@ -590,7 +590,7 @@ protected: virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) SAL_OVERRIDE; /// Sfx item RES_PARATR_NUMRULE - virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE; + virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE; /// Sfx item RES_PARATR_SCRIPTSPACE virtual void ParaScriptSpace( const SfxBoolItem& ) SAL_OVERRIDE; @@ -608,7 +608,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) SAL_OVERRIDE; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFmtFrmSize& ) SAL_OVERRIDE; + virtual void FormatFrameSize( const SwFormatFrmSize& ) SAL_OVERRIDE; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) SAL_OVERRIDE; @@ -620,16 +620,16 @@ protected: virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) SAL_OVERRIDE; /// Sfx item RES_SURROUND - virtual void FormatSurround( const SwFmtSurround& ) SAL_OVERRIDE; + virtual void FormatSurround( const SwFormatSurround& ) SAL_OVERRIDE; /// Sfx item RES_VERT_ORIENT - virtual void FormatVertOrientation( const SwFmtVertOrient& ) SAL_OVERRIDE; + virtual void FormatVertOrientation( const SwFormatVertOrient& ) SAL_OVERRIDE; /// Sfx item RES_HORI_ORIENT - virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) SAL_OVERRIDE; + virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) SAL_OVERRIDE; /// Sfx item RES_ANCHOR - virtual void FormatAnchor( const SwFmtAnchor& ) SAL_OVERRIDE; + virtual void FormatAnchor( const SwFormatAnchor& ) SAL_OVERRIDE; /// Sfx item RES_BACKGROUND virtual void FormatBackground( const SvxBrushItem& ) SAL_OVERRIDE; @@ -644,16 +644,16 @@ protected: virtual void FormatBox( const SvxBoxItem& ) SAL_OVERRIDE; /// Sfx item RES_COL - virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE; + virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE; /// Sfx item RES_KEEP - virtual void FormatKeep( const SvxFmtKeepItem& ) SAL_OVERRIDE; + virtual void FormatKeep( const SvxFormatKeepItem& ) SAL_OVERRIDE; /// Sfx item RES_TEXTGRID virtual void FormatTextGrid( const SwTextGridItem& ) SAL_OVERRIDE; /// Sfx item RES_LINENUMBER - virtual void FormatLineNumbering( const SwFmtLineNumber& ) SAL_OVERRIDE; + virtual void FormatLineNumbering( const SwFormatLineNumber& ) SAL_OVERRIDE; /// Sfx item RES_FRAMEDIR virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) SAL_OVERRIDE; @@ -668,14 +668,14 @@ protected: virtual void ParaOutlineLevel( const SfxUInt16Item& ) SAL_OVERRIDE; /// Write the expanded field - virtual void WriteExpand( const SwField* pFld ) SAL_OVERRIDE; + virtual void WriteExpand( const SwField* pField ) SAL_OVERRIDE; - virtual void RefField( const SwField& rFld, const OUString& rRef ) SAL_OVERRIDE; - virtual void HiddenField( const SwField& rFld ) SAL_OVERRIDE; - virtual void SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE; - virtual void PostitField( const SwField* pFld ) SAL_OVERRIDE; - virtual bool DropdownField( const SwField* pFld ) SAL_OVERRIDE; - virtual bool PlaceholderField( const SwField* pFld ) SAL_OVERRIDE; + virtual void RefField( const SwField& rField, const OUString& rRef ) SAL_OVERRIDE; + virtual void HiddenField( const SwField& rField ) SAL_OVERRIDE; + virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE; + virtual void PostitField( const SwField* pField ) SAL_OVERRIDE; + virtual bool DropdownField( const SwField* pField ) SAL_OVERRIDE; + virtual bool PlaceholderField( const SwField* pField ) SAL_OVERRIDE; virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) SAL_OVERRIDE; @@ -822,29 +822,29 @@ private: struct PostponedGraphic { - PostponedGraphic( const SwGrfNode* n, Size s, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode, const SdrObject* sObj ) - : grfNode( n ), size( s ), mOLEFrmFmt( pOLEFrmFmt ), mOLENode( pOLENode ), pSdrObj(sObj) {}; + PostponedGraphic( const SwGrfNode* n, Size s, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* sObj ) + : grfNode( n ), size( s ), mOLEFrameFormat( pOLEFrameFormat ), mOLENode( pOLENode ), pSdrObj(sObj) {}; const SwGrfNode* grfNode; Size size; - const SwFlyFrmFmt* mOLEFrmFmt; + const SwFlyFrameFormat* mOLEFrameFormat; SwOLENode* mOLENode; const SdrObject* pSdrObj; }; std::unique_ptr< std::list<PostponedGraphic> > m_pPostponedGraphic; struct PostponedDiagram { - PostponedDiagram( const SdrObject* o, const SwFrmFmt* frm ) : object( o ), frame( frm ) {}; + PostponedDiagram( const SdrObject* o, const SwFrameFormat* frm ) : object( o ), frame( frm ) {}; const SdrObject* object; - const SwFrmFmt* frame; + const SwFrameFormat* frame; }; std::unique_ptr< std::list<PostponedDiagram> > m_pPostponedDiagrams; struct PostponedDrawing { - PostponedDrawing( const SdrObject* sdrObj, const SwFrmFmt* frm, const Point* pt ) : object( sdrObj ), frame( frm ), point( pt ) {}; + PostponedDrawing( const SdrObject* sdrObj, const SwFrameFormat* frm, const Point* pt ) : object( sdrObj ), frame( frm ), point( pt ) {}; const SdrObject* object; - const SwFrmFmt* frame; + const SwFrameFormat* frame; const Point* point; }; std::unique_ptr< std::list<PostponedDrawing> > m_pPostponedVMLDrawings; @@ -853,10 +853,10 @@ private: struct PostponedOLE { - PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrmFmt* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {}; + PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {}; SwOLENode* object; const Size size; - const SwFlyFrmFmt* frame; + const SwFlyFrameFormat* frame; }; std::unique_ptr< std::list<PostponedOLE> > m_pPostponedOLEs; diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 320eddd68214..855be5730b10 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -133,7 +133,7 @@ bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich return true; } -void DocxExport::AppendBookmarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void DocxExport::AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; @@ -171,7 +171,7 @@ void DocxExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ ) m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds ); } -void DocxExport::AppendAnnotationMarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void DocxExport::AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; @@ -198,7 +198,7 @@ void DocxExport::AppendAnnotationMarks( const SwTxtNode& rNode, sal_Int32 nAktPo m_pAttrOutput->WriteAnnotationMarks_Impl( aStarts, aEnds ); } -void DocxExport::ExportGrfBullet(const SwTxtNode&) +void DocxExport::ExportGrfBullet(const SwTextNode&) { // Just collect the bullets for now, numbering.xml is not yet started. CollectGrfsOfBullets(); @@ -212,15 +212,15 @@ OString DocxExport::AddRelation( const OUString& rType, const OUString& rTarget return sId.toUtf8(); } -bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) +bool DocxExport::DisallowInheritingOutlineNumbering( const SwFormat& rFormat ) { bool bRet( false ); - if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFormat.GetItemState(RES_PARATR_NUMRULE, false)) { - if (const SwFmt *pParent = rFmt.DerivedFrom()) + if (const SwFormat *pParent = rFormat.DerivedFrom()) { - if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) + if (static_cast<const SwTextFormatColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) { ::sax_fastparser::FSHelperPtr pSerializer = m_pAttrOutput->GetSerializer( ); // Level 9 disables the outline @@ -237,7 +237,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt ) } void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ ) + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 /*nBreakCode*/ ) { m_nHeadersFootersInSection = 1; // Turn ON flag for 'Writing Headers \ Footers' @@ -245,23 +245,23 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, // headers if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN ) - WriteHeaderFooter( rLeftFmt, true, "even" ); + WriteHeaderFooter( rLeftFormat, true, "even" ); if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_ODD ) - WriteHeaderFooter( rFmt, true, "default" ); + WriteHeaderFooter( rFormat, true, "default" ); if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_FIRST ) - WriteHeaderFooter( rFirstPageFmt, true, "first" ); + WriteHeaderFooter( rFirstPageFormat, true, "first" ); // footers if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_EVEN ) - WriteHeaderFooter( rLeftFmt, false, "even" ); + WriteHeaderFooter( rLeftFormat, false, "even" ); if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_ODD ) - WriteHeaderFooter( rFmt, false, "default" ); + WriteHeaderFooter( rFormat, false, "default" ); if ( nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST ) - WriteHeaderFooter( rFirstPageFmt, false, "first" ); + WriteHeaderFooter( rFirstPageFormat, false, "first" ); if ( nHeadFootFlags & ( nsHdFtFlags::WW8_FOOTER_EVEN | nsHdFtFlags::WW8_HEADER_EVEN )) m_aSettings.evenAndOddHeaders = true; @@ -273,9 +273,9 @@ void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, #endif } -void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const OUString& rFldCmd, sal_uInt8 nMode ) +void DocxExport::OutputField( const SwField* pField, ww::eField eFieldType, const OUString& rFieldCmd, sal_uInt8 nMode ) { - m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode ); + m_pAttrOutput->WriteField_Impl( pField, eFieldType, rFieldCmd, nMode ); } void DocxExport::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) @@ -345,7 +345,7 @@ void DocxExport::DoComboBox(const OUString& rName, m_pDocumentFS->endElementNS( XML_w, XML_ffData ); } -void DocxExport::DoFormText(const SwInputField* /*pFld*/) +void DocxExport::DoFormText(const SwInputField* /*pField*/) { OSL_TRACE( "TODO DocxExport::ForFormText()" ); } @@ -457,17 +457,17 @@ void DocxExport::ExportDocument_Impl() delete m_pSections, m_pSections = NULL; } -void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) +void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) { AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); - m_pSections->AppendSection( pPageDesc, pFmt, nLnNum, m_pAttrOutput->IsFirstParagraph() ); + m_pSections->AppendSection( pPageDesc, pFormat, nLnNum, m_pAttrOutput->IsFirstParagraph() ); } void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) { MSWordExportBase::OutputEndNode( rEndNode ); - if ( TXT_MAINTEXT == m_nTxtTyp && rEndNode.StartOfSectionNode()->IsSectionNode() ) + if ( TXT_MAINTEXT == m_nTextTyp && rEndNode.StartOfSectionNode()->IsSectionNode() ) { // this originally comes from WW8Export::WriteText(), and looks like it // could have some code common with SectionNode()... @@ -484,18 +484,18 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode ) bool isInTable = IsInTable(); if ( !rNd.IsSectionNode() && isInTable ) // No sections in table { - const SwSectionFmt* pParentFmt = rSect.GetFmt()->GetParent(); - if( !pParentFmt ) - pParentFmt = reinterpret_cast<SwSectionFmt*>(sal_IntPtr(-1)); + const SwSectionFormat* pParentFormat = rSect.GetFormat()->GetParent(); + if( !pParentFormat ) + pParentFormat = reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)); sal_uLong nRstLnNum; - if( rNd.IsCntntNode() ) - nRstLnNum = rNd.GetCntntNode()->GetSwAttrSet().GetLineNumber().GetStartValue(); + if( rNd.IsContentNode() ) + nRstLnNum = rNd.GetContentNode()->GetSwAttrSet().GetLineNumber().GetStartValue(); else nRstLnNum = 0; AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo( ) ); - m_pSections->AppendSection( m_pAktPageDesc, pParentFmt, nRstLnNum ); + m_pSections->AppendSection( m_pAktPageDesc, pParentFormat, nRstLnNum ); } } } @@ -523,25 +523,25 @@ sal_uLong DocxExport::ReplaceCr( sal_uInt8 ) } void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet, - const SwNode& rNd, const SwFmtPageDesc* pNewPgDescFmt, + const SwNode& rNd, const SwFormatPageDesc* pNewPgDescFormat, const SwPageDesc* pNewPgDesc ) { // tell the attribute output that we are ready to write the section // break [has to be output inside paragraph properties] AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() ); - const SwSectionFmt* pFmt = GetSectionFormat( rNd ); + const SwSectionFormat* pFormat = GetSectionFormat( rNd ); const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd ); - OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." ); + OSL_ENSURE( pNewPgDescFormat || pNewPgDesc, "Neither page desc format nor page desc provided." ); - if ( pNewPgDescFmt ) + if ( pNewPgDescFormat ) { - m_pSections->AppendSection( *pNewPgDescFmt, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( *pNewPgDescFormat, rNd, pFormat, nLnNm ); } else if ( pNewPgDesc ) { - m_pSections->AppendSection( pNewPgDesc, rNd, pFmt, nLnNm ); + m_pSections->AppendSection( pNewPgDesc, rNd, pFormat, nLnNm ); } } @@ -636,7 +636,7 @@ void DocxExport::WritePostitFields() void DocxExport::WriteNumbering() { - if ( !m_pUsedNumTbl ) + if ( !m_pUsedNumTable ) return; // no numbering is used m_pFilter->addRelation( m_pDocumentFS->getOutputStream(), @@ -668,7 +668,7 @@ void DocxExport::WriteNumbering() m_pAttrOutput->SetSerializer( m_pDocumentFS ); } -void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* pType ) +void DocxExport::WriteHeaderFooter( const SwFormat& rFormat, bool bHeader, const char* pType ) { // setup the xml stream OUString aRelId; @@ -711,7 +711,7 @@ void DocxExport::WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* DocxTableExportContext aTableExportContext; m_pAttrOutput->pushToTableExportContext(aTableExportContext); // do the work - WriteHeaderFooterText( rFmt, bHeader ); + WriteHeaderFooterText( rFormat, bHeader ); m_pAttrOutput->popFromTableExportContext(aTableExportContext); m_pAttrOutput->EndParaSdtBlock(); @@ -843,7 +843,7 @@ void DocxExport::WriteSettings() // Automatic hyphenation: it's a global setting in Word, it's a paragraph setting in Writer. // Use the setting from the default style. - SwTxtFmtColl* pColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, /*bRegardLanguage=*/false); + SwTextFormatColl* pColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, /*bRegardLanguage=*/false); const SfxPoolItem* pItem; if (pColl && SfxItemState::SET == pColl->GetItemState(RES_PARATR_HYPHENZONE, false, &pItem)) { @@ -858,7 +858,7 @@ void DocxExport::WriteSettings() // Has Footnotes if( m_pAttrOutput->HasFootnotes()) - DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFtnInfo(), XML_footnote ); + DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFootnoteInfo(), XML_footnote ); // Has Endnotes if( m_pAttrOutput->HasEndnotes()) @@ -1296,9 +1296,9 @@ bool DocxExport::isMirroredMargin() boost::optional<SvxBrushItem> DocxExport::getBackground() { boost::optional<SvxBrushItem> oRet; - const SwFrmFmt &rFmt = m_pDoc->GetPageDesc(0).GetMaster(); + const SwFrameFormat &rFormat = m_pDoc->GetPageDesc(0).GetMaster(); SvxBrushItem aBrush(RES_BACKGROUND); - SfxItemState eState = rFmt.GetBackgroundState(aBrush); + SfxItemState eState = rFormat.GetBackgroundState(aBrush); if (SfxItemState::SET == eState) { @@ -1390,8 +1390,8 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd); rtl_TextEncoding eNextChrSet = aAttrIter.GetNextCharSet(); - bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); - if( !bTxtAtr ) + bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); + if( !bTextAtr ) { if( nAktPos == 0 && nNextAttr - nAktPos == aStr.getLength()) AttrOutput().RunText( aStr, eChrSet ); diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index f3fe41399841..ef8ba4c5d153 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -36,7 +36,7 @@ class DocxExportFilter; class SwNode; class SwEndNode; class SwTableNode; -class SwTxtNode; +class SwTextNode; class SwGrfNode; class SwOLENode; class DocxSdrExport; @@ -132,13 +132,13 @@ public: /// Guess the script (asian/western). virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) SAL_OVERRIDE; - virtual void AppendBookmarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; + virtual void AppendBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; virtual void AppendBookmark( const OUString& rName, bool bSkip = false ) SAL_OVERRIDE; - virtual void AppendAnnotationMarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; + virtual void AppendAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; - virtual void ExportGrfBullet(const SwTxtNode&) SAL_OVERRIDE; + virtual void ExportGrfBullet(const SwTextNode&) SAL_OVERRIDE; /// Returns the relationd id OString AddRelation( const OUString& rType, const OUString& rTarget ); @@ -147,15 +147,15 @@ public: virtual void WriteChar( sal_Unicode ) SAL_OVERRIDE { /* FIXME */ fprintf( stderr, "HACK! WriteChar() has nothing to do for docx.\n" ); } /// Return value indicates if an inherited outline numbering is suppressed. - virtual bool DisallowInheritingOutlineNumbering( const SwFmt &rFmt ) SAL_OVERRIDE; + virtual bool DisallowInheritingOutlineNumbering( const SwFormat &rFormat ) SAL_OVERRIDE; /// Output the actual headers and footers. virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode ) SAL_OVERRIDE; + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode ) SAL_OVERRIDE; /// Write the field - virtual void OutputField( const SwField* pFld, ww::eField eFldType, - const OUString& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) SAL_OVERRIDE; + virtual void OutputField( const SwField* pField, ww::eField eFieldType, + const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) SAL_OVERRIDE; /// Write the data of the form field virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) SAL_OVERRIDE; @@ -167,7 +167,7 @@ public: const OUString &rSelected, com::sun::star::uno::Sequence<OUString> &rListItems) SAL_OVERRIDE; - virtual void DoFormText(const SwInputField * pFld) SAL_OVERRIDE; + virtual void DoFormText(const SwInputField * pField) SAL_OVERRIDE; virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) SAL_OVERRIDE; @@ -196,14 +196,14 @@ protected: virtual void OutputLinkedOLE( const OUString& ) SAL_OVERRIDE; - virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) SAL_OVERRIDE; + virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) SAL_OVERRIDE; - virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) SAL_OVERRIDE {} + virtual void SectionBreaksAndFrames( const SwTextNode& /*rNode*/ ) SAL_OVERRIDE {} /// Get ready for a new section. virtual void PrepareNewPageDesc( const SfxItemSet* pSet, const SwNode& rNd, - const SwFmtPageDesc* pNewPgDescFmt = 0, + const SwFormatPageDesc* pNewPgDescFormat = 0, const SwPageDesc* pNewPgDesc = 0 ) SAL_OVERRIDE; private: @@ -220,7 +220,7 @@ private: virtual void WriteNumbering() SAL_OVERRIDE; /// Write reference to a header/foorter + the actual xml containing the text. - void WriteHeaderFooter( const SwFmt& rFmt, bool bHeader, const char* pType ); + void WriteHeaderFooter( const SwFormat& rFormat, bool bHeader, const char* pType ); /// Write word/fontTable.xml. void WriteFonts(); diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index ae28005df6b2..6f46915793a6 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -43,11 +43,11 @@ bool DocxExportFilter::exportDocument() // get SwDoc* uno::Reference< uno::XInterface > xIfc( getModel(), uno::UNO_QUERY ); - SwXTextDocument *pTxtDoc = dynamic_cast< SwXTextDocument * >( xIfc.get() ); - if ( !pTxtDoc ) + SwXTextDocument *pTextDoc = dynamic_cast< SwXTextDocument * >( xIfc.get() ); + if ( !pTextDoc ) return false; - SwDoc *pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwDoc *pDoc = pTextDoc->GetDocShell()->GetDoc(); if ( !pDoc ) return false; diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx index 157f95a38d2a..79697383c0d4 100644 --- a/sw/source/filter/ww8/docxfootnotes.hxx +++ b/sw/source/filter/ww8/docxfootnotes.hxx @@ -22,11 +22,11 @@ #include <vector> -class SwFmtFtn; +class SwFormatFootnote; namespace docx { -typedef ::std::vector< const SwFmtFtn* > FootnotesVector; +typedef ::std::vector< const SwFormatFootnote* > FootnotesVector; /** Remember footnotes/endnotes so that we can dump them in one go. @@ -43,14 +43,14 @@ class FootnotesList { public: FootnotesList() : m_nCurrent( -1 ) {} - void add( const SwFmtFtn& rFootnote ) + void add( const SwFormatFootnote& rFootnote ) { m_aFootnotes.push_back( &rFootnote ); m_nCurrent = m_aFootnotes.size() - 1; } /// Return the current footnote/endnote and clear the 'current' state. - const SwFmtFtn* getCurrent( sal_Int32& rId ) + const SwFormatFootnote* getCurrent( sal_Int32& rId ) { // anything to write at all? if ( m_nCurrent < 0 ) @@ -63,7 +63,7 @@ public: // continuationSeparator rId = m_nCurrent + 2; - const SwFmtFtn *pFootnote = m_aFootnotes[m_nCurrent]; + const SwFormatFootnote *pFootnote = m_aFootnotes[m_nCurrent]; m_nCurrent = -1; return pFootnote; diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index f7f88831fa66..13c7bd0ab1e4 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -148,7 +148,7 @@ struct DocxSdrExport::Impl sal_Int32 m_nSeq ; bool m_bDMLAndVMLDrawingOpen; /// List of TextBoxes in this document: they are exported as part of their shape, never alone. - std::set<const SwFrmFmt*> m_aTextBoxes; + std::set<const SwFrameFormat*> m_aTextBoxes; /// Preserved rotation for TextFrames. sal_Int32 m_nDMLandVMLTextFrameRotation; @@ -181,7 +181,7 @@ struct DocxSdrExport::Impl /// Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax. - void textFrameShadow(const SwFrmFmt& rFrmFmt); + void textFrameShadow(const SwFrameFormat& rFrameFormat); static bool isSupportedDMLShape(uno::Reference<drawing::XShape> xShape); /// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup() bool checkFrameBtlr(SwNode* pStartNode, bool bDML); @@ -286,14 +286,14 @@ void DocxSdrExport::setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrL m_pImpl->m_pFlyWrapAttrList = pAttrList; } -void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize) +void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize) { m_pImpl->m_bDrawingOpen = true; m_pImpl->m_bParagraphHasDrawing = true; m_pImpl->m_pSerializer->startElementNS(XML_w, XML_drawing, FSEND); - const SvxLRSpaceItem pLRSpaceItem = pFrmFmt->GetLRSpace(false); - const SvxULSpaceItem pULSpaceItem = pFrmFmt->GetULSpace(false); + const SvxLRSpaceItem pLRSpaceItem = pFrameFormat->GetLRSpace(false); + const SvxULSpaceItem pULSpaceItem = pFrameFormat->GetULSpace(false); bool isAnchor; @@ -303,11 +303,11 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS } else { - isAnchor = pFrmFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR; + isAnchor = pFrameFormat->GetAnchor().GetAnchorId() != FLY_AS_CHAR; } // Count effectExtent values, their value is needed before dist{T,B,L,R} is written. - SvxShadowItem aShadowItem = pFrmFmt->GetShadow(); + SvxShadowItem aShadowItem = pFrameFormat->GetShadow(); sal_Int32 nLeftExt = 0, nRightExt = 0, nTopExt = 0, nBottomExt = 0; if (aShadowItem.GetLocation() != SVX_SHADOW_NONE) { @@ -331,7 +331,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS break; } } - else if (const SdrObject* pObject = pFrmFmt->FindRealSdrObject()) + else if (const SdrObject* pObject = pFrameFormat->FindRealSdrObject()) { // No shadow, but we have an idea what was the original effectExtent. uno::Any aAny; @@ -358,13 +358,13 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS if (isAnchor) { sax_fastparser::FastAttributeList* attrList = sax_fastparser::FastSerializerHelper::createAttrList(); - bool bOpaque = pFrmFmt->GetOpaque().GetValue(); - awt::Point aPos(pFrmFmt->GetHoriOrient().GetPos(), pFrmFmt->GetVertOrient().GetPos()); - const SdrObject* pObj = pFrmFmt->FindRealSdrObject(); + bool bOpaque = pFrameFormat->GetOpaque().GetValue(); + awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(), pFrameFormat->GetVertOrient().GetPos()); + const SdrObject* pObj = pFrameFormat->FindRealSdrObject(); if (pObj != NULL) { // SdrObjects know their layer, consider that instead of the frame format. - bOpaque = pObj->GetLayer() != pFrmFmt->GetDoc()->getIDocumentDrawModelAccess().GetHellId() && pObj->GetLayer() != pFrmFmt->GetDoc()->getIDocumentDrawModelAccess().GetInvisibleHellId(); + bOpaque = pObj->GetLayer() != pFrameFormat->GetDoc()->getIDocumentDrawModelAccess().GetHellId() && pObj->GetLayer() != pFrameFormat->GetDoc()->getIDocumentDrawModelAccess().GetInvisibleHellId(); lclMovePositionWithRotation(aPos, rSize, pObj->GetRotateAngle()); } @@ -396,7 +396,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS const char* relativeFromV; const char* alignH = NULL; const char* alignV = NULL; - switch (pFrmFmt->GetVertOrient().GetRelationOrient()) + switch (pFrameFormat->GetVertOrient().GetRelationOrient()) { case text::RelOrientation::PAGE_PRINT_AREA: relativeFromV = "margin"; @@ -412,12 +412,12 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS relativeFromV = "line"; break; } - switch (pFrmFmt->GetVertOrient().GetVertOrient()) + switch (pFrameFormat->GetVertOrient().GetVertOrient()) { case text::VertOrientation::TOP: case text::VertOrientation::CHAR_TOP: case text::VertOrientation::LINE_TOP: - if (pFrmFmt->GetVertOrient().GetRelationOrient() == text::RelOrientation::TEXT_LINE) + if (pFrameFormat->GetVertOrient().GetRelationOrient() == text::RelOrientation::TEXT_LINE) alignV = "bottom"; else alignV = "top"; @@ -425,7 +425,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS case text::VertOrientation::BOTTOM: case text::VertOrientation::CHAR_BOTTOM: case text::VertOrientation::LINE_BOTTOM: - if (pFrmFmt->GetVertOrient().GetRelationOrient() == text::RelOrientation::TEXT_LINE) + if (pFrameFormat->GetVertOrient().GetRelationOrient() == text::RelOrientation::TEXT_LINE) alignV = "top"; else alignV = "bottom"; @@ -438,7 +438,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS default: break; } - switch (pFrmFmt->GetHoriOrient().GetRelationOrient()) + switch (pFrameFormat->GetHoriOrient().GetRelationOrient()) { case text::RelOrientation::PAGE_PRINT_AREA: relativeFromH = "margin"; @@ -458,7 +458,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS relativeFromH = "column"; break; } - switch (pFrmFmt->GetHoriOrient().GetHoriOrient()) + switch (pFrameFormat->GetHoriOrient().GetHoriOrient()) { case text::HoriOrientation::LEFT: alignH = "left"; @@ -551,7 +551,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS aAttrList->add(XML_distB, OString::number(TwipsToEMU(pULSpaceItem.GetLower())).getStr()); aAttrList->add(XML_distL, OString::number(TwipsToEMU(pLRSpaceItem.GetLeft())).getStr()); aAttrList->add(XML_distR, OString::number(TwipsToEMU(pLRSpaceItem.GetRight())).getStr()); - const SdrObject* pObj = pFrmFmt->FindRealSdrObject(); + const SdrObject* pObj = pFrameFormat->FindRealSdrObject(); if (pObj != NULL) { OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObj); @@ -632,7 +632,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS // See if we know the exact wrap type from grab-bag. sal_Int32 nWrapToken = 0; - if (const SdrObject* pObject = pFrmFmt->FindRealSdrObject()) + if (const SdrObject* pObject = pFrameFormat->FindRealSdrObject()) { uno::Any aAny; pObject->GetGrabBagItem(aAny); @@ -675,9 +675,9 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS } // Or if we have a contour. - if (!nWrapToken && pFrmFmt->GetSurround().IsContour()) + if (!nWrapToken && pFrameFormat->GetSurround().IsContour()) { - if (const SwNoTxtNode* pNd = sw::util::GetNoTxtNodeFromSwFrmFmt(*pFrmFmt)) + if (const SwNoTextNode* pNd = sw::util::GetNoTextNodeFromSwFrameFormat(*pFrameFormat)) { const tools::PolyPolygon* pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) @@ -705,7 +705,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS // No? Then just approximate based on what we have. if (isAnchor && !nWrapToken) { - switch (pFrmFmt->GetSurround().GetValue()) + switch (pFrameFormat->GetSurround().GetValue()) { case SURROUND_NONE: m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_wrapTopAndBottom, FSEND); @@ -726,7 +726,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS } } -void DocxSdrExport::endDMLAnchorInline(const SwFrmFmt* pFrmFmt) +void DocxSdrExport::endDMLAnchorInline(const SwFrameFormat* pFrameFormat) { bool isAnchor; if (m_pImpl->m_bFlyFrameGraphic) @@ -735,7 +735,7 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrmFmt* pFrmFmt) } else { - isAnchor = pFrmFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR; + isAnchor = pFrameFormat->GetAnchor().GetAnchorId() != FLY_AS_CHAR; } m_pImpl->m_pSerializer->endElementNS(XML_wp, isAnchor ? XML_anchor : XML_inline); @@ -743,7 +743,7 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrmFmt* pFrmFmt) m_pImpl->m_bDrawingOpen = false; } -void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft) +void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft) { bool bSwapInPage = false; if (!(sdrObj)->GetPage()) @@ -762,8 +762,8 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFr m_pImpl->m_pDrawingML->SetFS(m_pImpl->m_pSerializer); // See WinwordAnchoring::SetAnchoring(), these are not part of the SdrObject, have to be passed around manually. - SwFmtHoriOrient rHoriOri = (rFrmFmt).GetHoriOrient(); - SwFmtVertOrient rVertOri = (rFrmFmt).GetVertOrient(); + SwFormatHoriOrient rHoriOri = (rFrameFormat).GetHoriOrient(); + SwFormatVertOrient rVertOri = (rFrameFormat).GetVertOrient(); m_pImpl->m_rExport.VMLExporter().AddSdrObject(*(sdrObj), rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(), rHoriOri.GetRelationOrient(), @@ -795,7 +795,7 @@ bool lcl_isLockedCanvas(uno::Reference<drawing::XShape> xShape) return bRet; } -void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt* pFrmFmt, int nAnchorId) +void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFormat* pFrameFormat, int nAnchorId) { uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY_THROW); if (!Impl::isSupportedDMLShape(xShape)) @@ -805,7 +805,7 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt* sax_fastparser::FSHelperPtr pFS = m_pImpl->m_pSerializer; Size aSize(pSdrObject->GetLogicRect().GetWidth(), pSdrObject->GetLogicRect().GetHeight()); - startDMLAnchorInline(pFrmFmt, aSize); + startDMLAnchorInline(pFrameFormat, aSize); sax_fastparser::FastAttributeList* pDocPrAttrList = sax_fastparser::FastSerializerHelper::createAttrList(); pDocPrAttrList->add(XML_id, OString::number(nAnchorId).getStr()); @@ -866,12 +866,12 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt* pFS->endElementNS(XML_wp14, XML_sizeRelV); } - endDMLAnchorInline(pFrmFmt); + endDMLAnchorInline(pFrameFormat); } -void DocxSdrExport::Impl::textFrameShadow(const SwFrmFmt& rFrmFmt) +void DocxSdrExport::Impl::textFrameShadow(const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrmFmt.GetShadow(); + SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) return; @@ -917,7 +917,7 @@ bool DocxSdrExport::Impl::isSupportedDMLShape(uno::Reference<drawing::XShape> xS return supported; } -void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft, int nAnchorId) +void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft, int nAnchorId) { bool bDMLAndVMLDrawingOpen = m_pImpl->m_bDMLAndVMLDrawingOpen; m_pImpl->m_bDMLAndVMLDrawingOpen = true; @@ -943,17 +943,17 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFm m_pImpl->m_pSerializer->startElementNS(XML_mc, XML_Choice, XML_Requires, (pObjGroup ? "wpg" : "wps"), FSEND); - writeDMLDrawing(sdrObj, &rFrmFmt, nAnchorId); + writeDMLDrawing(sdrObj, &rFrameFormat, nAnchorId); m_pImpl->m_pSerializer->endElementNS(XML_mc, XML_Choice); m_pImpl->m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND); - writeVMLDrawing(sdrObj, rFrmFmt, rNdTopLeft); + writeVMLDrawing(sdrObj, rFrameFormat, rNdTopLeft); m_pImpl->m_pSerializer->endElementNS(XML_mc, XML_Fallback); m_pImpl->m_pSerializer->endElementNS(XML_mc, XML_AlternateContent); } else - writeVMLDrawing(sdrObj, rFrmFmt, rNdTopLeft); + writeVMLDrawing(sdrObj, rFrameFormat, rNdTopLeft); m_pImpl->m_bDMLAndVMLDrawingOpen = false; } @@ -970,9 +970,9 @@ OString lcl_ConvertTransparency(const Color& rColor) return OString(""); } -void DocxSdrExport::writeDMLEffectLst(const SwFrmFmt& rFrmFmt) +void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrmFmt.GetShadow(); + SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); // Output effects if (aShadowItem.GetLocation() != SVX_SHADOW_NONE) @@ -1096,7 +1096,7 @@ void DocxSdrExport::writeDiagramRels(uno::Reference<xml::dom::XDocument> xDom, } } -void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFrmFmt, int nAnchorId) +void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nAnchorId) { sax_fastparser::FSHelperPtr pFS = m_pImpl->m_pSerializer; uno::Reference< drawing::XShape > xShape(const_cast<SdrObject*>(sdrObject)->getUnoShape(), uno::UNO_QUERY); @@ -1141,7 +1141,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFr // write necessary tags to document.xml Size aSize(sdrObject->GetSnapRect().GetWidth(), sdrObject->GetSnapRect().GetHeight()); - startDMLAnchorInline(&rFrmFmt, aSize); + startDMLAnchorInline(&rFrameFormat, aSize); // generate an unique id sax_fastparser::FastAttributeList* pDocPrAttrList = sax_fastparser::FastSerializerHelper::createAttrList(); @@ -1228,7 +1228,7 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFr pFS->endElementNS(XML_a, XML_graphicData); pFS->endElementNS(XML_a, XML_graphic); - endDMLAnchorInline(&rFrmFmt); + endDMLAnchorInline(&rFrameFormat); uno::Reference< xml::sax::XSAXSerializable > serializer; uno::Reference< xml::sax::XWriter > writer = xml::sax::Writer::create(comphelper::getProcessComponentContext()); @@ -1285,8 +1285,8 @@ void DocxSdrExport::writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFr void DocxSdrExport::writeOnlyTextOfFrame(sw::Frame* pParentFrame) { - const SwFrmFmt& rFrmFmt = pParentFrame->GetFrmFmt(); - const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + const SwFrameFormat& rFrameFormat = pParentFrame->GetFrameFormat(); + const SwNodeIndex* pNodeIndex = rFrameFormat.GetContent().GetContentIdx(); sax_fastparser::FSHelperPtr pFS = m_pImpl->m_pSerializer; sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; @@ -1355,8 +1355,8 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo m_pImpl->m_bDMLAndVMLDrawingOpen = true; sax_fastparser::FSHelperPtr pFS = m_pImpl->m_pSerializer; - const SwFrmFmt& rFrmFmt = pParentFrame->GetFrmFmt(); - const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + const SwFrameFormat& rFrameFormat = pParentFrame->GetFrameFormat(); + const SwNodeIndex* pNodeIndex = rFrameFormat.GetContent().GetContentIdx(); sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; @@ -1369,7 +1369,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo const Size aSize = pParentFrame->GetSize(); uno::Reference< drawing::XShape > xShape; - const SdrObject* pSdrObj = rFrmFmt.FindRealSdrObject(); + const SdrObject* pSdrObj = rFrameFormat.FindRealSdrObject(); if (pSdrObj) xShape = uno::Reference< drawing::XShape >(const_cast<SdrObject*>(pSdrObj)->getUnoShape(), uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xPropertySet(xShape, uno::UNO_QUERY); @@ -1387,11 +1387,11 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo if (!bTextBoxOnly) { - startDMLAnchorInline(&rFrmFmt, aSize); + startDMLAnchorInline(&rFrameFormat, aSize); sax_fastparser::FastAttributeList* pDocPrAttrList = sax_fastparser::FastSerializerHelper::createAttrList(); pDocPrAttrList->add(XML_id, OString::number(nAnchorId).getStr()); - pDocPrAttrList->add(XML_name, OUStringToOString(rFrmFmt.GetName(), RTL_TEXTENCODING_UTF8).getStr()); + pDocPrAttrList->add(XML_name, OUStringToOString(rFrameFormat.GetName(), RTL_TEXTENCODING_UTF8).getStr()); sax_fastparser::XFastAttributeListRef xDocPrAttrListRef(pDocPrAttrList); pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef); @@ -1470,9 +1470,9 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo XML_prst, OUStringToOString(shapeType, RTL_TEXTENCODING_UTF8).getStr(), FSEND); m_pImpl->m_bDMLTextFrameSyntax = true; - m_pImpl->m_rExport.OutputFormat(pParentFrame->GetFrmFmt(), false, false, true); + m_pImpl->m_rExport.OutputFormat(pParentFrame->GetFrameFormat(), false, false, true); m_pImpl->m_bDMLTextFrameSyntax = false; - writeDMLEffectLst(rFrmFmt); + writeDMLEffectLst(rFrameFormat); pFS->endElementNS(XML_wps, XML_spPr); } @@ -1550,7 +1550,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo { pFS->startElementNS(XML_wps, XML_bodyPr, xBodyPrAttrList); // AutoSize of the Text Frame. - const SwFmtFrmSize& rSize = rFrmFmt.GetFrmSize(); + const SwFormatFrmSize& rSize = rFrameFormat.GetFrmSize(); pFS->singleElementNS(XML_a, (rSize.GetHeightSizeType() == ATT_VAR_SIZE ? XML_spAutoFit : XML_noAutofit), FSEND); pFS->endElementNS(XML_wps, XML_bodyPr); @@ -1580,7 +1580,7 @@ void DocxSdrExport::writeDMLTextFrame(sw::Frame* pParentFrame, int nAnchorId, bo pFS->endElementNS(XML_wp14, XML_sizeRelV); } - endDMLAnchorInline(&rFrmFmt); + endDMLAnchorInline(&rFrameFormat); } m_pImpl->m_bDMLAndVMLDrawingOpen = bDMLAndVMLDrawingOpen; } @@ -1591,8 +1591,8 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly m_pImpl->m_bDMLAndVMLDrawingOpen = true; sax_fastparser::FSHelperPtr pFS = m_pImpl->m_pSerializer; - const SwFrmFmt& rFrmFmt = pParentFrame->GetFrmFmt(); - const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + const SwFrameFormat& rFrameFormat = pParentFrame->GetFrameFormat(); + const SwNodeIndex* pNodeIndex = rFrameFormat.GetContent().GetContentIdx(); sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; @@ -1614,10 +1614,10 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly OString sRotation(OString::number(m_pImpl->m_nDMLandVMLTextFrameRotation / -100)); m_pImpl->m_rExport.SdrExporter().getTextFrameStyle().append(";rotation:").append(sRotation); } - m_pImpl->m_rExport.OutputFormat(pParentFrame->GetFrmFmt(), false, false, true); + m_pImpl->m_rExport.OutputFormat(pParentFrame->GetFrameFormat(), false, false, true); m_pImpl->m_pFlyAttrList->add(XML_style, m_pImpl->m_aTextFrameStyle.makeStringAndClear()); - const SdrObject* pObject = pParentFrame->GetFrmFmt().FindRealSdrObject(); + const SdrObject* pObject = pParentFrame->GetFrameFormat().FindRealSdrObject(); if (pObject != NULL) { OUString sAnchorId = lclGetAnchorIdFromGrabBag(pObject); @@ -1635,7 +1635,7 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly { pFS->startElementNS(XML_w, XML_pict, FSEND); pFS->startElementNS(XML_v, XML_rect, xFlyAttrList); - m_pImpl->textFrameShadow(rFrmFmt); + m_pImpl->textFrameShadow(rFrameFormat); if (m_pImpl->m_pFlyFillAttrList) { sax_fastparser::XFastAttributeListRef xFlyFillAttrList(m_pImpl->m_pFlyFillAttrList.release()); @@ -1685,30 +1685,30 @@ bool DocxSdrExport::Impl::checkFrameBtlr(SwNode* pStartNode, bool bDML) else assert(m_pTextboxAttrList); - if (!pStartNode->IsTxtNode()) + if (!pStartNode->IsTextNode()) return false; - SwTxtNode* pTxtNode = pStartNode->GetTxtNode(); + SwTextNode* pTextNode = pStartNode->GetTextNode(); const SfxPoolItem* pItem = 0; // explicitly init to avoid warnings bool bItemSet = false; - if (pTxtNode->HasSwAttrSet()) + if (pTextNode->HasSwAttrSet()) { - const SwAttrSet& rAttrSet = pTxtNode->GetSwAttrSet(); + const SwAttrSet& rAttrSet = pTextNode->GetSwAttrSet(); bItemSet = rAttrSet.GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET; } if (!bItemSet) { - if (!pTxtNode->HasHints()) + if (!pTextNode->HasHints()) return false; - SwTxtAttr* pTxtAttr = pTxtNode->GetTxtAttrAt(0, RES_TXTATR_AUTOFMT); + SwTextAttr* pTextAttr = pTextNode->GetTextAttrAt(0, RES_TXTATR_AUTOFMT); - if (!pTxtAttr || pTxtAttr->Which() != RES_TXTATR_AUTOFMT) + if (!pTextAttr || pTextAttr->Which() != RES_TXTATR_AUTOFMT) return false; - std::shared_ptr<SfxItemSet> pItemSet = pTxtAttr->GetAutoFmt().GetStyleHandle(); + std::shared_ptr<SfxItemSet> pItemSet = pTextAttr->GetAutoFormat().GetStyleHandle(); bItemSet = pItemSet->GetItemState(RES_CHRATR_ROTATE, true, &pItem) == SfxItemState::SET; } @@ -1727,9 +1727,9 @@ bool DocxSdrExport::Impl::checkFrameBtlr(SwNode* pStartNode, bool bDML) return false; } -bool DocxSdrExport::isTextBox(const SwFrmFmt& rFrmFmt) +bool DocxSdrExport::isTextBox(const SwFrameFormat& rFrameFormat) { - return m_pImpl->m_aTextBoxes.find(&rFrmFmt) != m_pImpl->m_aTextBoxes.end(); + return m_pImpl->m_aTextBoxes.find(&rFrameFormat) != m_pImpl->m_aTextBoxes.end(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx index b99b235b3890..dd98d716afb1 100644 --- a/sw/source/filter/ww8/docxsdrexport.hxx +++ b/sw/source/filter/ww8/docxsdrexport.hxx @@ -33,7 +33,7 @@ namespace sw { class Frame; } -class SwFrmFmt; +class SwFrameFormat; class SwNode; class DocxExport; @@ -83,18 +83,18 @@ public: sax_fastparser::FastAttributeList* getBodyPrAttrList(); std::unique_ptr<sax_fastparser::FastAttributeList>& getDashLineStyle(); - void startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize); - void endDMLAnchorInline(const SwFrmFmt* pFrmFmt); + void startDMLAnchorInline(const SwFrameFormat* pFrameFormat, const Size& rSize); + void endDMLAnchorInline(const SwFrameFormat* pFrameFormat); /// Writes a drawing as VML data. - void writeVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft); + void writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft); /// Writes a drawing as DML. - void writeDMLDrawing(const SdrObject* pSdrObj, const SwFrmFmt* pFrmFmt, int nAnchorId); + void writeDMLDrawing(const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat, int nAnchorId); /// Writes shape in both DML and VML format. - void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFmt& rFrmFmt,const Point& rNdTopLeft, int nAnchorId); + void writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat,const Point& rNdTopLeft, int nAnchorId); /// Write <a:effectLst>, the effect list. - void writeDMLEffectLst(const SwFrmFmt& rFrmFmt); + void writeDMLEffectLst(const SwFrameFormat& rFrameFormat); /// Writes a diagram (smartart). - void writeDiagram(const SdrObject* sdrObject, const SwFrmFmt& rFrmFmt, int nAnchorId); + void writeDiagram(const SdrObject* sdrObject, const SwFrameFormat& rFrameFormat, int nAnchorId); void writeDiagramRels(css::uno::Reference<css::xml::dom::XDocument> xDom, const css::uno::Sequence< css::uno::Sequence<css::uno::Any> >& xRelSeq, css::uno::Reference<css::io::XOutputStream> xOutStream, const OUString& sGrabBagProperyName, @@ -104,7 +104,7 @@ public: /// Writes text frame in VML format. void writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly = false); /// Is this a standalone TextFrame, or used as a TextBox of a shape? - bool isTextBox(const SwFrmFmt& rFrmFmt); + bool isTextBox(const SwFrameFormat& rFrameFormat); /// Writes text from Textbox for <w:framePr> void writeOnlyTextOfFrame(sw::Frame* pParentFrame); /// Writes the drawingML <a:ln> markup of a box item. diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx index 985d3c223bce..6a1a947fb292 100644 --- a/sw/source/filter/ww8/docxtablestyleexport.cxx +++ b/sw/source/filter/ww8/docxtablestyleexport.cxx @@ -31,7 +31,7 @@ struct DocxTableStyleExport::Impl /// Export of w:pPr. void tableStylePPr(uno::Sequence<beans::PropertyValue>& rPPr); /// Export of w:tblStylePr. - void tableStyleTblStylePr(uno::Sequence<beans::PropertyValue>& rTblStylePr); + void tableStyleTableStylePr(uno::Sequence<beans::PropertyValue>& rTableStylePr); /// Export of w:rPr. void tableStyleRPr(uno::Sequence<beans::PropertyValue>& rRPr); /// Export of w:rFonts. @@ -43,15 +43,15 @@ struct DocxTableStyleExport::Impl /// Export of w:spacing. void tableStylePSpacing(uno::Sequence<beans::PropertyValue>& rSpacing); /// Export of w:tblPr. - void tableStyleTblPr(uno::Sequence<beans::PropertyValue>& rTblPr); + void tableStyleTablePr(uno::Sequence<beans::PropertyValue>& rTablePr); /// Export of w:tcPr. void tableStyleTcPr(uno::Sequence<beans::PropertyValue>& rTcPr); /// Export of w:tcBorders (and w:tblBorders). void tableStyleTcBorders(uno::Sequence<beans::PropertyValue>& rTcBorders, sal_Int32 nToken = XML_tcBorders); /// Export of w:tblInd. - void tableStyleTblInd(uno::Sequence<beans::PropertyValue>& rTblInd); + void tableStyleTableInd(uno::Sequence<beans::PropertyValue>& rTableInd); /// Export of w:tblCellMar (and w:tcMar). - void tableStyleTblCellMar(uno::Sequence<beans::PropertyValue>& rTblCellMar, sal_Int32 nType = XML_tblCellMar); + void tableStyleTableCellMar(uno::Sequence<beans::PropertyValue>& rTableCellMar, sal_Int32 nType = XML_tblCellMar); /// Export of a given table cell border type. void tableStyleTcBorder(sal_Int32 nToken, const uno::Sequence<beans::PropertyValue>& rTcBorder); /// Export of w:shd. @@ -130,9 +130,9 @@ void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite) } } -void DocxTableStyleExport::Impl::tableStyleTblCellMar(uno::Sequence<beans::PropertyValue>& rTblCellMar, sal_Int32 nType) +void DocxTableStyleExport::Impl::tableStyleTableCellMar(uno::Sequence<beans::PropertyValue>& rTableCellMar, sal_Int32 nType) { - static DocxStringTokenMap const aTblCellMarTokens[] = + static DocxStringTokenMap const aTableCellMarTokens[] = { {"left", XML_left}, {"right", XML_right}, @@ -143,15 +143,15 @@ void DocxTableStyleExport::Impl::tableStyleTblCellMar(uno::Sequence<beans::Prope {0, 0} }; - if (!rTblCellMar.hasElements()) + if (!rTableCellMar.hasElements()) return; m_pSerializer->startElementNS(XML_w, nType, FSEND); - for (sal_Int32 i = 0; i < rTblCellMar.getLength(); ++i) + for (sal_Int32 i = 0; i < rTableCellMar.getLength(); ++i) { - if (sal_Int32 nToken = DocxStringGetToken(aTblCellMarTokens, rTblCellMar[i].Name)) + if (sal_Int32 nToken = DocxStringGetToken(aTableCellMarTokens, rTableCellMar[i].Name)) { - comphelper::SequenceAsHashMap aMap(rTblCellMar[i].Value.get< uno::Sequence<beans::PropertyValue> >()); + comphelper::SequenceAsHashMap aMap(rTableCellMar[i].Value.get< uno::Sequence<beans::PropertyValue> >()); m_pSerializer->singleElementNS(XML_w, nToken, FSNS(XML_w, XML_w), OString::number(aMap["w"].get<sal_Int32>()), FSNS(XML_w, XML_type), aMap["type"].get<OUString>().toUtf8(), @@ -347,18 +347,18 @@ void DocxTableStyleExport::Impl::tableStylePInd(uno::Sequence<beans::PropertyVal m_pSerializer->singleElementNS(XML_w, XML_ind, xAttributeList); } -void DocxTableStyleExport::Impl::tableStyleTblInd(uno::Sequence<beans::PropertyValue>& rTblInd) +void DocxTableStyleExport::Impl::tableStyleTableInd(uno::Sequence<beans::PropertyValue>& rTableInd) { - if (!rTblInd.hasElements()) + if (!rTableInd.hasElements()) return; sax_fastparser::FastAttributeList* pAttributeList = sax_fastparser::FastSerializerHelper::createAttrList(); - for (sal_Int32 i = 0; i < rTblInd.getLength(); ++i) + for (sal_Int32 i = 0; i < rTableInd.getLength(); ++i) { - if (rTblInd[i].Name == "w") - pAttributeList->add(FSNS(XML_w, XML_w), OString::number(rTblInd[i].Value.get<sal_Int32>())); - else if (rTblInd[i].Name == "type") - pAttributeList->add(FSNS(XML_w, XML_type), rTblInd[i].Value.get<OUString>().toUtf8()); + if (rTableInd[i].Name == "w") + pAttributeList->add(FSNS(XML_w, XML_w), OString::number(rTableInd[i].Value.get<sal_Int32>())); + else if (rTableInd[i].Name == "type") + pAttributeList->add(FSNS(XML_w, XML_type), rTableInd[i].Value.get<OUString>().toUtf8()); } sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList); m_pSerializer->singleElementNS(XML_w, XML_tblInd, xAttributeList); @@ -486,39 +486,39 @@ void DocxTableStyleExport::Impl::tableStylePPr(uno::Sequence<beans::PropertyValu m_pSerializer->endElementNS(XML_w, XML_pPr); } -void DocxTableStyleExport::Impl::tableStyleTblPr(uno::Sequence<beans::PropertyValue>& rTblPr) +void DocxTableStyleExport::Impl::tableStyleTablePr(uno::Sequence<beans::PropertyValue>& rTablePr) { - if (!rTblPr.hasElements()) + if (!rTablePr.hasElements()) return; m_pSerializer->startElementNS(XML_w, XML_tblPr, FSEND); - uno::Sequence<beans::PropertyValue> aTblInd, aTblBorders, aTblCellMar; - boost::optional<sal_Int32> oTblStyleRowBandSize, oTblStyleColBandSize; - for (sal_Int32 i = 0; i < rTblPr.getLength(); ++i) + uno::Sequence<beans::PropertyValue> aTableInd, aTableBorders, aTableCellMar; + boost::optional<sal_Int32> oTableStyleRowBandSize, oTableStyleColBandSize; + for (sal_Int32 i = 0; i < rTablePr.getLength(); ++i) { - if (rTblPr[i].Name == "tblStyleRowBandSize") - oTblStyleRowBandSize = rTblPr[i].Value.get<sal_Int32>(); - else if (rTblPr[i].Name == "tblStyleColBandSize") - oTblStyleColBandSize = rTblPr[i].Value.get<sal_Int32>(); - else if (rTblPr[i].Name == "tblInd") - aTblInd = rTblPr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); - else if (rTblPr[i].Name == "tblBorders") - aTblBorders = rTblPr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); - else if (rTblPr[i].Name == "tblCellMar") - aTblCellMar = rTblPr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + if (rTablePr[i].Name == "tblStyleRowBandSize") + oTableStyleRowBandSize = rTablePr[i].Value.get<sal_Int32>(); + else if (rTablePr[i].Name == "tblStyleColBandSize") + oTableStyleColBandSize = rTablePr[i].Value.get<sal_Int32>(); + else if (rTablePr[i].Name == "tblInd") + aTableInd = rTablePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + else if (rTablePr[i].Name == "tblBorders") + aTableBorders = rTablePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + else if (rTablePr[i].Name == "tblCellMar") + aTableCellMar = rTablePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); } - if (oTblStyleRowBandSize) + if (oTableStyleRowBandSize) m_pSerializer->singleElementNS(XML_w, XML_tblStyleRowBandSize, - FSNS(XML_w, XML_val), OString::number(oTblStyleRowBandSize.get()), + FSNS(XML_w, XML_val), OString::number(oTableStyleRowBandSize.get()), FSEND); - if (oTblStyleColBandSize) + if (oTableStyleColBandSize) m_pSerializer->singleElementNS(XML_w, XML_tblStyleColBandSize, - FSNS(XML_w, XML_val), OString::number(oTblStyleColBandSize.get()), + FSNS(XML_w, XML_val), OString::number(oTableStyleColBandSize.get()), FSEND); - tableStyleTblInd(aTblInd); - tableStyleTcBorders(aTblBorders, XML_tblBorders); - tableStyleTblCellMar(aTblCellMar); + tableStyleTableInd(aTableInd); + tableStyleTcBorders(aTableBorders, XML_tblBorders); + tableStyleTableCellMar(aTableCellMar); m_pSerializer->endElementNS(XML_w, XML_tblPr); } @@ -544,7 +544,7 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyVal aVAlign = rTcPr[i].Value.get<OUString>(); } tableStyleTcBorders(aTcBorders); - tableStyleTblCellMar(aTcMar, XML_tcMar); + tableStyleTableCellMar(aTcMar, XML_tcMar); tableStyleShd(aShd); if (!aVAlign.isEmpty()) m_pSerializer->singleElementNS(XML_w, XML_vAlign, @@ -554,25 +554,25 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyVal m_pSerializer->endElementNS(XML_w, XML_tcPr); } -void DocxTableStyleExport::Impl::tableStyleTblStylePr(uno::Sequence<beans::PropertyValue>& rTblStylePr) +void DocxTableStyleExport::Impl::tableStyleTableStylePr(uno::Sequence<beans::PropertyValue>& rTableStylePr) { - if (!rTblStylePr.hasElements()) + if (!rTableStylePr.hasElements()) return; OUString aType; - uno::Sequence<beans::PropertyValue> aPPr, aRPr, aTblPr, aTcPr; - for (sal_Int32 i = 0; i < rTblStylePr.getLength(); ++i) + uno::Sequence<beans::PropertyValue> aPPr, aRPr, aTablePr, aTcPr; + for (sal_Int32 i = 0; i < rTableStylePr.getLength(); ++i) { - if (rTblStylePr[i].Name == "type") - aType = rTblStylePr[i].Value.get<OUString>(); - else if (rTblStylePr[i].Name == "pPr") - aPPr = rTblStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); - else if (rTblStylePr[i].Name == "rPr") - aRPr = rTblStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); - else if (rTblStylePr[i].Name == "tblPr") - aTblPr = rTblStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); - else if (rTblStylePr[i].Name == "tcPr") - aTcPr = rTblStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + if (rTableStylePr[i].Name == "type") + aType = rTableStylePr[i].Value.get<OUString>(); + else if (rTableStylePr[i].Name == "pPr") + aPPr = rTableStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + else if (rTableStylePr[i].Name == "rPr") + aRPr = rTableStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + else if (rTableStylePr[i].Name == "tblPr") + aTablePr = rTableStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + else if (rTableStylePr[i].Name == "tcPr") + aTcPr = rTableStylePr[i].Value.get< uno::Sequence<beans::PropertyValue> >(); } m_pSerializer->startElementNS(XML_w, XML_tblStylePr, @@ -581,8 +581,8 @@ void DocxTableStyleExport::Impl::tableStyleTblStylePr(uno::Sequence<beans::Prope tableStylePPr(aPPr); tableStyleRPr(aRPr); - if (aTblPr.hasElements()) - tableStyleTblPr(aTblPr); + if (aTablePr.hasElements()) + tableStyleTablePr(aTablePr); else { // Even if we have an empty container, write it out, as Word does. @@ -597,8 +597,8 @@ void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>& { bool bDefault = false, bCustomStyle = false, bQFormat = false, bSemiHidden = false, bUnhideWhenUsed = false; OUString aStyleId, aName, aBasedOn, aRsid, aUiPriority; - uno::Sequence<beans::PropertyValue> aPPr, aRPr, aTblPr, aTcPr; - std::vector< uno::Sequence<beans::PropertyValue> > aTblStylePrs; + uno::Sequence<beans::PropertyValue> aPPr, aRPr, aTablePr, aTcPr; + std::vector< uno::Sequence<beans::PropertyValue> > aTableStylePrs; for (sal_Int32 i = 0; i < rStyle.getLength(); ++i) { if (rStyle[i].Name == "default") @@ -626,11 +626,11 @@ void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>& else if (rStyle[i].Name == "rPr") aRPr = rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >(); else if (rStyle[i].Name == "tblPr") - aTblPr = rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >(); + aTablePr = rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >(); else if (rStyle[i].Name == "tcPr") aTcPr = rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >(); else if (rStyle[i].Name == "tblStylePr") - aTblStylePrs.push_back(rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >()); + aTableStylePrs.push_back(rStyle[i].Value.get< uno::Sequence<beans::PropertyValue> >()); } sax_fastparser::FastAttributeList* pAttributeList = sax_fastparser::FastSerializerHelper::createAttrList(); @@ -668,10 +668,10 @@ void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>& tableStylePPr(aPPr); tableStyleRPr(aRPr); - tableStyleTblPr(aTblPr); + tableStyleTablePr(aTablePr); tableStyleTcPr(aTcPr); - for (size_t i = 0; i < aTblStylePrs.size(); ++i) - tableStyleTblStylePr(aTblStylePrs[i]); + for (size_t i = 0; i < aTableStylePrs.size(); ++i) + tableStyleTableStylePr(aTableStylePrs[i]); m_pSerializer->endElementNS(XML_w, XML_style); } diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index e2899709dbdb..c1e4427dda47 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -23,16 +23,16 @@ #include <filter/msfilter/escherex.hxx> const sal_uInt32 nInlineHack = 0x00010001; -class SwFrmFmt; +class SwFrameFormat; // #i30669# -class SwFmtHoriOrient; -class SwFmtVertOrient; +class SwFormatHoriOrient; +class SwFormatVertOrient; class WinwordAnchoring : public EscherExClientRecord_Base { public: void WriteData(EscherEx& rEx) const SAL_OVERRIDE; - void SetAnchoring(const SwFrmFmt& rFmt); + void SetAnchoring(const SwFrameFormat& rFormat); /** method to perform conversion of positioning attributes with the help of corresponding layout information @@ -55,14 +55,14 @@ public: input/output parameter - containing the current vertical position attributes, which are converted by this method. - @param _rFrmFmt + @param _rFrameFormat input parameter - frame format of the anchored object @return boolean, indicating, if a conversion has been performed. */ - static bool ConvertPosition( SwFmtHoriOrient& _iorHoriOri, - SwFmtVertOrient& _iorVertOri, - const SwFrmFmt& _rFrmFmt ); + static bool ConvertPosition( SwFormatHoriOrient& _iorHoriOri, + SwFormatVertOrient& _iorVertOri, + const SwFrameFormat& _rFrameFormat ); private: bool mbInline; @@ -96,14 +96,14 @@ protected: SvStream* pEscherStrm; long mnEmuMul, mnEmuDiv; - virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType, + virtual sal_Int32 WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt); void WriteBrushAttr(const SvxBrushItem &rBrush, EscherPropertyContainer& rPropOpt); void WriteOLEPicture(EscherPropertyContainer &rPropOpt, sal_uInt32 nShapeFlags, const Graphic &rGraphic, const SdrObject &rObj, sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea ); - static void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt); + static void WriteGrfAttr(const SwNoTextNode& rNd,EscherPropertyContainer& rPropOpt); sal_Int32 DrawModelToEmu(sal_Int32 nVal) const { return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); } @@ -115,20 +115,20 @@ protected: public: SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt); - sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); + sal_Int32 WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); //For i120928,to export graphic of bullet sal_Int32 WriteGrfBullet(const Graphic&); - sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); - void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); - virtual void WriteFrmExtraData(const SwFrmFmt&); + sal_Int32 WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); + void WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId); + virtual void WriteFrmExtraData(const SwFrameFormat&); virtual void WritePictures(); virtual ~SwBasicEscherEx(); //i120927,this function is added to export hyperlink info,such as graphic/frame/OLE bool IsRelUrl(); OUString GetBasePath(); OUString BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const OUString& rUrl); - void WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFmtURL* pINetFmtArg); - void PreWriteHyperlinkWithinFly(const SwFrmFmt& rFmt,EscherPropertyContainer& rPropOpt); + void WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFormatURL* pINetFormatArg); + void PreWriteHyperlinkWithinFly(const SwFrameFormat& rFormat,EscherPropertyContainer& rPropOpt); private: SwBasicEscherEx(const SwBasicEscherEx&) SAL_DELETED_FUNCTION; @@ -141,19 +141,19 @@ private: std::vector<sal_uLong> aFollowShpIds; EscherExHostAppData aHostData; WinwordAnchoring aWinwordAnchoring; - WW8_WrPlcTxtBoxes *pTxtBxs; + WW8_WrPlcTextBoxes *pTextBxs; - sal_uInt32 GetFlyShapeId(const SwFrmFmt& rFmt, + sal_uInt32 GetFlyShapeId(const SwFrameFormat& rFormat, unsigned int nHdFtIndex, DrawObjPointerVector &rPVec); void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr, DrawObjPointerVector& rDstArr); sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId, DrawObjPointerVector &rPVec); - sal_Int32 WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, - sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec); - void WriteOCXControl(const SwFrmFmt& rFmt,sal_uInt32 nShapeId); - virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType, + sal_Int32 WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, + sal_uInt32 nTextBox, DrawObjPointerVector &rPVec); + void WriteOCXControl(const SwFrameFormat& rFormat,sal_uInt32 nShapeId); + virtual sal_Int32 WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt) SAL_OVERRIDE; virtual sal_uInt32 QueryTextID( @@ -167,7 +167,7 @@ public: void FinishEscher(); virtual void WritePictures() SAL_OVERRIDE; - virtual void WriteFrmExtraData(const SwFrmFmt& rFmt) SAL_OVERRIDE; + virtual void WriteFrmExtraData(const SwFrameFormat& rFormat) SAL_OVERRIDE; EscherExHostAppData* StartShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape > &, const Rectangle*) SAL_OVERRIDE {return &aHostData;} diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index a3bbd2448d26..a3dab5c94875 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -269,7 +269,7 @@ void RtfAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNo void RtfAttributeOutput::EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) { bool bLastPara = false; - if (m_rExport.m_nTxtTyp == TXT_FTN || m_rExport.m_nTxtTyp == TXT_EDN) + if (m_rExport.m_nTextTyp == TXT_FTN || m_rExport.m_nTextTyp == TXT_EDN) { // We're ending a paragraph that is the last paragraph of a footnote or endnote. bLastPara = m_rExport.m_nCurrentNodeIndex && m_rExport.m_nCurrentNodeIndex == m_rExport.m_pCurPam->End()->nNode.GetIndex(); @@ -281,8 +281,8 @@ void RtfAttributeOutput::EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTex aParagraph.appendAndClear(m_aRun); aParagraph->append(m_aAfterRuns.makeStringAndClear()); - if (m_bTblAfterCell) - m_bTblAfterCell = false; + if (m_bTableAfterCell) + m_bTableAfterCell = false; else { aParagraph->append(SAL_NEWLINE_STRING); @@ -310,7 +310,7 @@ void RtfAttributeOutput::EmptyParagraph() m_rExport.Strm().WriteCharPtr(SAL_NEWLINE_STRING).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_PAR).WriteChar(' '); } -void RtfAttributeOutput::SectionBreaks(const SwTxtNode& rNode) +void RtfAttributeOutput::SectionBreaks(const SwTextNode& rNode) { OSL_ENSURE(m_aStyles.getLength() == 0, "m_aStyles is not empty"); @@ -323,18 +323,18 @@ void RtfAttributeOutput::SectionBreaks(const SwTxtNode& rNode) if (!m_bBufferSectionHeaders) m_rExport.Strm().WriteCharPtr(m_aSectionHeaders.makeStringAndClear().getStr()); - if (aNextIndex.GetNode().IsTxtNode()) + if (aNextIndex.GetNode().IsTextNode()) { - const SwTxtNode* pTxtNode = static_cast< SwTxtNode* >(&aNextIndex.GetNode()); - m_rExport.OutputSectionBreaks(pTxtNode->GetpSwAttrSet(), *pTxtNode); + const SwTextNode* pTextNode = static_cast< SwTextNode* >(&aNextIndex.GetNode()); + m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode); // Save the current page description for now, so later we will be able to access the previous one. - m_pPrevPageDesc = pTxtNode->FindPageDesc(false); + m_pPrevPageDesc = pTextNode->FindPageDesc(false); } else if (aNextIndex.GetNode().IsTableNode()) { const SwTableNode* pTableNode = static_cast< SwTableNode* >(&aNextIndex.GetNode()); - const SwFrmFmt* pFmt = pTableNode->GetTable().GetFrmFmt(); - m_rExport.OutputSectionBreaks(&(pFmt->GetAttrSet()), *pTableNode); + const SwFrameFormat* pFormat = pTableNode->GetTable().GetFrameFormat(); + m_rExport.OutputSectionBreaks(&(pFormat->GetAttrSet()), *pTableNode); } m_bBufferSectionBreaks = false; } @@ -411,7 +411,7 @@ void RtfAttributeOutput::RawText(const OUString& rText, bool /*bForceUnicode*/, m_aRunText->append(msfilter::rtfutil::OutString(rText, eCharSet)); } -void RtfAttributeOutput::StartRuby(const SwTxtNode& /*rNode*/, sal_Int32 /*nPos*/, const SwFmtRuby& /*rRuby*/) +void RtfAttributeOutput::StartRuby(const SwTextNode& /*rNode*/, sal_Int32 /*nPos*/, const SwFormatRuby& /*rRuby*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } @@ -479,7 +479,7 @@ bool RtfAttributeOutput::EndURL(bool const isAtEndOfParagraph) return true; } -void RtfAttributeOutput::FieldVanish(const OUString& /*rTxt*/, ww::eField /*eType*/) +void RtfAttributeOutput::FieldVanish(const OUString& /*rText*/, ww::eField /*eType*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } @@ -507,7 +507,7 @@ void RtfAttributeOutput::Redline(const SwRedlineData* pRedline) m_aRun->append(' '); } -void RtfAttributeOutput::FormatDrop(const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/) +void RtfAttributeOutput::FormatDrop(const SwTextNode& /*rNode*/, const SwFormatDrop& /*rSwFormatDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } @@ -546,8 +546,8 @@ void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t p { InitTableHelper(pTableTextNodeInfoInner); - const SwTable* pTbl = pTableTextNodeInfoInner->getTable(); - SwFrmFmt* pFmt = pTbl->GetFrmFmt(); + const SwTable* pTable = pTableTextNodeInfoInner->getTable(); + SwFrameFormat* pFormat = pTable->GetFrameFormat(); m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_TROWD); TableOrientation(pTableTextNodeInfoInner); @@ -556,7 +556,7 @@ void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t p TableCanSplit(pTableTextNodeInfoInner); // Cell margins - const SvxBoxItem& rBox = pFmt->GetBox(); + const SvxBoxItem& rBox = pFormat->GetBox(); static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT, SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT @@ -585,40 +585,40 @@ void RtfAttributeOutput::TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t p SwWriteTableRow* pRow = aRows[ pTableTextNodeInfoInner->getRow() ]; SwTwips nSz = 0; Point aPt; - SwRect aRect(pFmt->FindLayoutRect(false, &aPt)); + SwRect aRect(pFormat->FindLayoutRect(false, &aPt)); SwTwips nPageSize = aRect.Width(); // Handle the page size when not rendered if (0 == nPageSize) { const SwNode* pNode = pTableTextNodeInfoInner->getNode(); - const SwFrmFmt* pFrmFmt = GetExport().m_pParentFrame ? &GetExport().m_pParentFrame->GetFrmFmt() : - GetExport().m_pDoc->GetPageDesc(0).GetPageFmtOfNode(*pNode, false); + const SwFrameFormat* pFrameFormat = GetExport().m_pParentFrame ? &GetExport().m_pParentFrame->GetFrameFormat() : + GetExport().m_pDoc->GetPageDesc(0).GetPageFormatOfNode(*pNode, false); - const SvxLRSpaceItem& rLR = pFrmFmt->GetLRSpace(); - nPageSize = pFrmFmt->GetFrmSize().GetWidth() - + const SvxLRSpaceItem& rLR = pFrameFormat->GetLRSpace(); + nPageSize = pFrameFormat->GetFrmSize().GetWidth() - rLR.GetLeft() - rLR.GetRight(); } - SwTwips nTblSz = pFmt->GetFrmSize().GetWidth(); + SwTwips nTableSz = pFormat->GetFrmSize().GetWidth(); // Not using m_nTableDepth, which is not yet incremented here. sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth(); m_aCells[nCurrentDepth] = pRow->GetCells().size(); for (sal_uInt16 i = 0; i < m_aCells[nCurrentDepth]; i++) { const SwWriteTableCell* pCell = &pRow->GetCells()[ i ]; - const SwFrmFmt* pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SwFrameFormat* pCellFormat = pCell->GetBox()->GetFrameFormat(); pTableTextNodeInfoInner->setCell(i); TableCellProperties(pTableTextNodeInfoInner); // Right boundary: this can't be in TableCellProperties as the old // value of nSz is needed. - nSz += pCellFmt->GetFrmSize().GetWidth(); + nSz += pCellFormat->GetFrmSize().GetWidth(); m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CELLX); SwTwips nCalc = nSz; nCalc *= nPageSize; - nCalc /= nTblSz; - m_aRowDefs.append((sal_Int32)(pFmt->GetLRSpace().GetLeft() + nCalc)); + nCalc /= nTableSz; + m_aRowDefs.append((sal_Int32)(pFormat->GetLRSpace().GetLeft() + nCalc)); } } @@ -631,15 +631,15 @@ void RtfAttributeOutput::TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer * called for each cell. */ - const SwTableBox* pTblBox = pTableTextNodeInfoInner->getTableBox(); - SwFrmFmt* pFmt = pTblBox->GetFrmFmt(); - const SvxBoxItem& rDefault = pFmt->GetBox(); + const SwTableBox* pTableBox = pTableTextNodeInfoInner->getTableBox(); + SwFrameFormat* pFormat = pTableBox->GetFrameFormat(); + const SvxBoxItem& rDefault = pFormat->GetBox(); const SwWriteTableRows& aRows = m_pTableWrt->GetRows(); SwWriteTableRow* pRow = aRows[ pTableTextNodeInfoInner->getRow() ]; const SwWriteTableCell* pCell = &pRow->GetCells()[ pTableTextNodeInfoInner->getCell() ]; - const SwFrmFmt* pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SwFrameFormat* pCellFormat = pCell->GetBox()->GetFrameFormat(); const SfxPoolItem* pItem; - if (pCellFmt->GetAttrSet().HasItem(RES_BOX, &pItem)) + if (pCellFormat->GetAttrSet().HasItem(RES_BOX, &pItem)) { const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(*pItem); static const SvxBoxItemLine aBorders[] = @@ -681,9 +681,9 @@ void RtfAttributeOutput::TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t const SwWriteTableRows& aRows = m_pTableWrt->GetRows(); SwWriteTableRow* pRow = aRows[ pTableTextNodeInfoInner->getRow() ]; const SwWriteTableCell* pCell = &pRow->GetCells()[ pTableTextNodeInfoInner->getCell() ]; - const SwFrmFmt* pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SwFrameFormat* pCellFormat = pCell->GetBox()->GetFrameFormat(); const SfxPoolItem* pItem; - if (pCellFmt->GetAttrSet().HasItem(RES_BACKGROUND, &pItem)) + if (pCellFormat->GetAttrSet().HasItem(RES_BACKGROUND, &pItem)) { const SvxBrushItem& rBack = static_cast<const SvxBrushItem&>(*pItem); if (!rBack.GetColor().GetTransparency()) @@ -706,8 +706,8 @@ void RtfAttributeOutput::TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTabl { const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine* pTabLine = pTabBox->GetUpper(); - const SwFrmFmt* pLineFmt = pTabLine->GetFrmFmt(); - const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize(); + const SwFrameFormat* pLineFormat = pTabLine->GetFrameFormat(); + const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); if (ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight()) { @@ -737,8 +737,8 @@ void RtfAttributeOutput::TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTa { const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine* pTabLine = pTabBox->GetUpper(); - const SwFrmFmt* pLineFmt = pTabLine->GetFrmFmt(); - const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit(); + const SwFrameFormat* pLineFormat = pTabLine->GetFrameFormat(); + const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit(); // The rtf default is to allow a row to break if (!rSplittable.GetValue()) @@ -748,9 +748,9 @@ void RtfAttributeOutput::TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTa void RtfAttributeOutput::TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) { const SwTable* pTable = pTableTextNodeInfoInner->getTable(); - const SwFrmFmt* pFrmFmt = pTable->GetFrmFmt(); + const SwFrameFormat* pFrameFormat = pTable->GetFrameFormat(); - if (m_rExport.TrueFrameDirection(*pFrmFmt) != FRMDIR_HORI_RIGHT_TOP) + if (m_rExport.TrueFrameDirection(*pFrameFormat) != FRMDIR_HORI_RIGHT_TOP) m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_LTRROW); else m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_RTLROW); @@ -761,7 +761,7 @@ void RtfAttributeOutput::TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t const SwWriteTableRows& aRows = m_pTableWrt->GetRows(); SwWriteTableRow* pRow = aRows[ pTableTextNodeInfoInner->getRow() ]; const SwWriteTableCell* pCell = &pRow->GetCells()[ pTableTextNodeInfoInner->getCell() ]; - const SwFrmFmt* pCellFmt = pCell->GetBox()->GetFrmFmt(); + const SwFrameFormat* pCellFormat = pCell->GetBox()->GetFrameFormat(); const SfxPoolItem* pItem; // vertical merges @@ -771,8 +771,8 @@ void RtfAttributeOutput::TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVMRG); // vertical alignment - if (pCellFmt->GetAttrSet().HasItem(RES_VERT_ORIENT, &pItem)) - switch (static_cast<const SwFmtVertOrient*>(pItem)->GetVertOrient()) + if (pCellFormat->GetAttrSet().HasItem(RES_VERT_ORIENT, &pItem)) + switch (static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient()) { case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); @@ -803,29 +803,29 @@ void RtfAttributeOutput::TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_ void RtfAttributeOutput::TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) { const SwTable* pTable = pTableTextNodeInfoInner->getTable(); - SwFrmFmt* pFmt = pTable->GetFrmFmt(); + SwFrameFormat* pFormat = pTable->GetFrameFormat(); - OStringBuffer aTblAdjust(OOO_STRING_SVTOOLS_RTF_TRQL); - switch (pFmt->GetHoriOrient().GetHoriOrient()) + OStringBuffer aTableAdjust(OOO_STRING_SVTOOLS_RTF_TRQL); + switch (pFormat->GetHoriOrient().GetHoriOrient()) { case text::HoriOrientation::CENTER: - aTblAdjust.setLength(0); - aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQC); + aTableAdjust.setLength(0); + aTableAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQC); break; case text::HoriOrientation::RIGHT: - aTblAdjust.setLength(0); - aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQR); + aTableAdjust.setLength(0); + aTableAdjust.append(OOO_STRING_SVTOOLS_RTF_TRQR); break; case text::HoriOrientation::NONE: case text::HoriOrientation::LEFT_AND_WIDTH: - aTblAdjust.append(OOO_STRING_SVTOOLS_RTF_TRLEFT); - aTblAdjust.append((sal_Int32)pFmt->GetLRSpace().GetLeft()); + aTableAdjust.append(OOO_STRING_SVTOOLS_RTF_TRLEFT); + aTableAdjust.append((sal_Int32)pFormat->GetLRSpace().GetLeft()); break; default: break; } - m_aRowDefs.append(aTblAdjust.makeStringAndClear()); + m_aRowDefs.append(aTableAdjust.makeStringAndClear()); } void RtfAttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/) @@ -854,14 +854,14 @@ void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t p // Create the SwWriteTable instance to use col spans GetTablePageSize(pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize); - const SwFrmFmt* pFmt = pTable->GetFrmFmt(); - const sal_uInt32 nTblSz = static_cast<sal_uInt32>(pFmt->GetFrmSize().GetWidth()); + const SwFrameFormat* pFormat = pTable->GetFrameFormat(); + const sal_uInt32 nTableSz = static_cast<sal_uInt32>(pFormat->GetFrmSize().GetWidth()); const SwHTMLTableLayout* pLayout = pTable->GetHTMLTableLayout(); if (pLayout && pLayout->IsExportable()) m_pTableWrt.reset(new SwWriteTable(pTable, pLayout)); else - m_pTableWrt.reset(new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTblSz, false)); + m_pTableWrt.reset(new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTableSz, false)); } void RtfAttributeOutput::StartTable(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/) @@ -918,7 +918,7 @@ void RtfAttributeOutput::EndTableCell() m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_CELL); m_bTableCellOpen = false; - m_bTblAfterCell = true; + m_bTableAfterCell = true; m_bWroteCellInfo = false; if (m_aCells[m_nTableDepth] > 0) m_aCells[m_nTableDepth]--; @@ -1069,7 +1069,7 @@ void RtfAttributeOutput::EndStyleProperties(bool /*bParProp*/) /* noop */ } -void RtfAttributeOutput::OutlineNumbering(sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/) +void RtfAttributeOutput::OutlineNumbering(sal_uInt8 nLvl, const SwNumFormat& /*rNFormat*/, const SwFormat& /*rFormat*/) { if (nLvl >= WW8ListManager::nMaxLevel) nLvl = WW8ListManager::nMaxLevel - 1; @@ -1140,9 +1140,9 @@ void RtfAttributeOutput::SectionTitlePage() */ } -void RtfAttributeOutput::SectionPageBorders(const SwFrmFmt* pFmt, const SwFrmFmt* /*pFirstPageFmt*/) +void RtfAttributeOutput::SectionPageBorders(const SwFrameFormat* pFormat, const SwFrameFormat* /*pFirstPageFormat*/) { - const SvxBoxItem& rBox = pFmt->GetBox(); + const SvxBoxItem& rBox = pFormat->GetBox(); const editeng::SvxBorderLine* pLine = rBox.GetTop(); if (pLine) m_aSectionBreaks.append(OutBorderLine(m_rExport, pLine, @@ -1451,19 +1451,19 @@ void RtfAttributeOutput::NumberingLevel(sal_uInt8 nLevel, m_rExport.Strm().WriteChar('}'); } -void RtfAttributeOutput::WriteField_Impl(const SwField* pFld, ww::eField /*eType*/, const OUString& rFldCmd, sal_uInt8 /*nMode*/) +void RtfAttributeOutput::WriteField_Impl(const SwField* pField, ww::eField /*eType*/, const OUString& rFieldCmd, sal_uInt8 /*nMode*/) { // If there are no field instructions, don't export it as a field. - bool bHasInstructions = !rFldCmd.isEmpty(); + bool bHasInstructions = !rFieldCmd.isEmpty(); if (bHasInstructions) { m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_FIELD); m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST " "); - m_aRunText->append(msfilter::rtfutil::OutString(rFldCmd, m_rExport.eCurrentEncoding)); + m_aRunText->append(msfilter::rtfutil::OutString(rFieldCmd, m_rExport.eCurrentEncoding)); m_aRunText->append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " "); } - if (pFld) - m_aRunText->append(msfilter::rtfutil::OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding)); + if (pField) + m_aRunText->append(msfilter::rtfutil::OutString(pField->ExpandField(true), m_rExport.eDefaultEncoding)); if (bHasInstructions) m_aRunText->append("}}"); } @@ -1529,7 +1529,7 @@ void RtfAttributeOutput::WriteAnnotationMarks_Impl(std::vector< OUString >& rSta rEnds.clear(); } -void RtfAttributeOutput::WriteHeaderFooter_Impl(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr, bool bTitlepg) +void RtfAttributeOutput::WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const sal_Char* pStr, bool bTitlepg) { OStringBuffer aSectionBreaks = m_aSectionBreaks; m_aSectionBreaks.setLength(0); @@ -1543,7 +1543,7 @@ void RtfAttributeOutput::WriteHeaderFooter_Impl(const SwFrmFmt& rFmt, bool bHead m_aSectionHeaders.append('{'); m_aSectionHeaders.append(pStr); m_bBufferSectionHeaders = true; - m_rExport.WriteHeaderFooterText(rFmt, bHeader); + m_rExport.WriteHeaderFooterText(rFormat, bHeader); m_bBufferSectionHeaders = false; m_aSectionHeaders.append('}'); @@ -1551,9 +1551,9 @@ void RtfAttributeOutput::WriteHeaderFooter_Impl(const SwFrmFmt& rFmt, bool bHead m_aRun = aRun; } -void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrmFmt& rFrmFmt) +void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrmFmt.GetShadow(); + SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) return; @@ -1595,9 +1595,9 @@ void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyPropert rFlyProperties.push_back(std::make_pair<OString, OString>("shadowOffsetY", OString(aOffsetY))); } -void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrmFmt& rFrmFmt) +void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat) { - const SwFmtFrmSize& rSize = rFrmFmt.GetFrmSize(); + const SwFormatFrmSize& rSize = rFrameFormat.GetFrmSize(); // Relative size of the Text Frame. if (rSize.GetWidthPercent()) @@ -1667,8 +1667,8 @@ void RtfAttributeOutput::writeTextFrame(const sw::Frame& rFrame, bool bTextBox) m_bSingleEmptyRun = false; m_rExport.bRTFFlySyntax = true; - const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt(); - const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat(); + const SwNodeIndex* pNodeIndex = rFrameFormat.GetContent().GetContentIdx(); sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; m_rExport.SaveData(nStt, nEnd); @@ -1708,10 +1708,10 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin switch (rFrame.GetWriterType()) { - case sw::Frame::eTxtBox: + case sw::Frame::eTextBox: { // If this is a TextBox of a shape, then ignore: it's handled in RtfSdrExport::StartShape(). - if (m_rExport.SdrExporter().isTextBox(rFrame.GetFrmFmt())) + if (m_rExport.SdrExporter().isTextBox(rFrame.GetFrameFormat())) break; OSL_ENSURE(m_aRunText.getLength() == 0, "m_aRunText is not empty"); @@ -1729,15 +1729,15 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin m_pFlyFrameSize = &aSize; m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true; - m_rExport.OutputFormat(rFrame.GetFrmFmt(), false, false, true); + m_rExport.OutputFormat(rFrame.GetFrameFormat(), false, false, true); m_rExport.Strm().WriteCharPtr(m_aRunText.makeStringAndClear().getStr()); m_rExport.Strm().WriteCharPtr(m_aStyles.makeStringAndClear().getStr()); m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false; m_pFlyFrameSize = 0; - const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt(); - lcl_TextFrameShadow(m_aFlyProperties, rFrmFmt); - lcl_TextFrameRelativeSize(m_aFlyProperties, rFrmFmt); + const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat(); + lcl_TextFrameShadow(m_aFlyProperties, rFrameFormat); + lcl_TextFrameRelativeSize(m_aFlyProperties, rFrameFormat); for (size_t i = 0; i < m_aFlyProperties.size(); ++i) { @@ -1763,20 +1763,20 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin { m_rExport.m_pParentFrame = &rFrame; m_rExport.bRTFFlySyntax = true; - m_rExport.OutputFormat(rFrame.GetFrmFmt(), false, false, true); + m_rExport.OutputFormat(rFrame.GetFrameFormat(), false, false, true); m_rExport.bRTFFlySyntax = false; m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE); - m_rExport.OutputFormat(rFrame.GetFrmFmt(), false, false, true); + m_rExport.OutputFormat(rFrame.GetFrameFormat(), false, false, true); m_aRunText->append('}'); m_rExport.m_pParentFrame = NULL; } if (pGrfNode) - m_aRunText.append(dynamic_cast<const SwFlyFrmFmt*>(&rFrame.GetFrmFmt()), pGrfNode); + m_aRunText.append(dynamic_cast<const SwFlyFrameFormat*>(&rFrame.GetFrameFormat()), pGrfNode); break; case sw::Frame::eDrawing: { - const SdrObject* pSdrObj = rFrame.GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject(); if (pSdrObj) { bool bSwapInPage = false; @@ -1810,8 +1810,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin break; case sw::Frame::eFormControl: { - const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt(); - const SdrObject* pObject = rFrmFmt.FindRealSdrObject(); + const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat(); + const SdrObject* pObject = rFrameFormat.FindRealSdrObject(); m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_FIELD); m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST); @@ -2010,13 +2010,13 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const sw::Frame& rFrame, const Poin break; case sw::Frame::eOle: { - const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt(); - const SdrObject* pSdrObj = rFrmFmt.FindRealSdrObject(); + const SwFrameFormat& rFrameFormat = rFrame.GetFrameFormat(); + const SdrObject* pSdrObj = rFrameFormat.FindRealSdrObject(); if (pSdrObj) { - SwNodeIndex aIdx(*rFrmFmt.GetCntnt().GetCntntIdx(), 1); + SwNodeIndex aIdx(*rFrameFormat.GetContent().GetContentIdx(), 1); SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); - FlyFrameOLE(dynamic_cast<const SwFlyFrmFmt*>(&rFrmFmt), rOLENd, rFrame.GetLayoutSize()); + FlyFrameOLE(dynamic_cast<const SwFlyFrameFormat*>(&rFrameFormat), rOLENd, rFrame.GetLayoutSize()); } } break; @@ -2484,16 +2484,16 @@ void RtfAttributeOutput::CharHighlight(const SvxBrushItem& rBrush) } } -void RtfAttributeOutput::TextINetFormat(const SwFmtINetFmt& rURL) +void RtfAttributeOutput::TextINetFormat(const SwFormatINetFormat& rURL) { if (!rURL.GetValue().isEmpty()) { - const SwCharFmt* pFmt; - const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt(); + const SwCharFormat* pFormat; + const SwTextINetFormat* pTextAtr = rURL.GetTextINetFormat(); - if (pTxtAtr && 0 != (pFmt = pTxtAtr->GetCharFmt())) + if (pTextAtr && 0 != (pFormat = pTextAtr->GetCharFormat())) { - sal_uInt16 nStyle = m_rExport.GetId(pFmt); + sal_uInt16 nStyle = m_rExport.GetId(pFormat); OString* pString = m_rExport.GetStyle(nStyle); if (pString) m_aStyles.append(*pString); @@ -2501,9 +2501,9 @@ void RtfAttributeOutput::TextINetFormat(const SwFmtINetFmt& rURL) } } -void RtfAttributeOutput::TextCharFormat(const SwFmtCharFmt& rCharFmt) +void RtfAttributeOutput::TextCharFormat(const SwFormatCharFormat& rCharFormat) { - sal_uInt16 nStyle = m_rExport.GetId(rCharFmt.GetCharFmt()); + sal_uInt16 nStyle = m_rExport.GetId(rCharFormat.GetCharFormat()); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_CS); m_aStyles.append((sal_Int32)nStyle); OString* pString = m_rExport.GetStyle(nStyle); @@ -2511,7 +2511,7 @@ void RtfAttributeOutput::TextCharFormat(const SwFmtCharFmt& rCharFmt) m_aStyles.append(*pString); } -void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote) +void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote) { if (rFootnote.GetNumStr().isEmpty()) m_aRun->append(OOO_STRING_SVTOOLS_RTF_CHFTN); @@ -2519,7 +2519,7 @@ void RtfAttributeOutput::WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote) m_aRun->append(msfilter::rtfutil::OutString(rFootnote.GetNumStr(), m_rExport.eCurrentEncoding)); } -void RtfAttributeOutput::TextFootnote_Impl(const SwFmtFtn& rFootnote) +void RtfAttributeOutput::TextFootnote_Impl(const SwFormatFootnote& rFootnote) { SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start"); @@ -2536,7 +2536,7 @@ void RtfAttributeOutput::TextFootnote_Impl(const SwFmtFtn& rFootnote) * 1) Reset, then later restore the contents of our run buffer and run state. * 2) Buffer the output of the whole paragraph, as we do so for section headers already. */ - const SwNodeIndex* pIndex = rFootnote.GetTxtFtn()->GetStartNode(); + const SwNodeIndex* pIndex = rFootnote.GetTextFootnote()->GetStartNode(); RtfStringBuffer aRun = m_aRun; m_aRun.clear(); bool bInRunOrig = m_bInRun; @@ -2590,7 +2590,7 @@ void RtfAttributeOutput::ParaAdjust(const SvxAdjustItem& rAdjust) } } -void RtfAttributeOutput::ParaSplit(const SvxFmtSplitItem& rSplit) +void RtfAttributeOutput::ParaSplit(const SvxFormatSplitItem& rSplit) { if (!rSplit.GetValue()) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEP); @@ -2606,7 +2606,7 @@ void RtfAttributeOutput::ParaWidows(const SvxWidowsItem& rWidows) void RtfAttributeOutput::ParaTabStop(const SvxTabStopItem& rTabStop) { - long nOffset = static_cast<const SvxLRSpaceItem&>(m_rExport.GetItem(RES_LR_SPACE)).GetTxtLeft(); + long nOffset = static_cast<const SvxLRSpaceItem&>(m_rExport.GetItem(RES_LR_SPACE)).GetTextLeft(); for (sal_uInt16 n = 0; n < rTabStop.Count(); n++) { const SvxTabStop& rTS = rTabStop[ n ]; @@ -2670,22 +2670,22 @@ void RtfAttributeOutput::ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone) m_aStyles.append(sal_Int32(rHyphenZone.IsHyphen())); } -void RtfAttributeOutput::ParaNumRule_Impl(const SwTxtNode* pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId) +void RtfAttributeOutput::ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) { - if (USHRT_MAX == nNumId || 0 == nNumId || 0 == pTxtNd) + if (USHRT_MAX == nNumId || 0 == nNumId || 0 == pTextNd) return; - const SwNumRule* pRule = pTxtNd->GetNumRule(); + const SwNumRule* pRule = pTextNd->GetNumRule(); - if (pRule && pTxtNd->IsInList()) + if (pRule && pTextNd->IsInList()) { - SAL_WARN_IF(pTxtNd->GetActualListLevel() < 0 || pTxtNd->GetActualListLevel() >= MAXLEVEL, "sw.rtf", "text node does not have valid list level"); + SAL_WARN_IF(pTextNd->GetActualListLevel() < 0 || pTextNd->GetActualListLevel() >= MAXLEVEL, "sw.rtf", "text node does not have valid list level"); - const SwNumFmt* pFmt = pRule->GetNumFmt(nLvl); - if (!pFmt) - pFmt = &pRule->Get(nLvl); + const SwNumFormat* pFormat = pRule->GetNumFormat(nLvl); + if (!pFormat) + pFormat = &pRule->Get(nLvl); - const SfxItemSet& rNdSet = pTxtNd->GetSwAttrSet(); + const SfxItemSet& rNdSet = pTextNd->GetSwAttrSet(); m_aStyles.append('{'); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LISTTEXT); @@ -2694,30 +2694,30 @@ void RtfAttributeOutput::ParaNumRule_Impl(const SwTxtNode* pTxtNd, sal_Int32 nLv m_aStyles.append(' '); SvxLRSpaceItem aLR(static_cast<const SvxLRSpaceItem&>(rNdSet.Get(RES_LR_SPACE))); - aLR.SetTxtLeft(aLR.GetTxtLeft() + pFmt->GetIndentAt()); - aLR.SetTxtFirstLineOfst(pFmt->GetFirstLineOffset()); + aLR.SetTextLeft(aLR.GetTextLeft() + pFormat->GetIndentAt()); + aLR.SetTextFirstLineOfst(pFormat->GetFirstLineOffset()); - sal_uInt16 nStyle = m_rExport.GetId(pFmt->GetCharFmt()); + sal_uInt16 nStyle = m_rExport.GetId(pFormat->GetCharFormat()); OString* pString = m_rExport.GetStyle(nStyle); if (pString) m_aStyles.append(*pString); { - OUString sTxt; - if (SVX_NUM_CHAR_SPECIAL == pFmt->GetNumberingType() || SVX_NUM_BITMAP == pFmt->GetNumberingType()) - sTxt = OUString(pFmt->GetBulletChar()); + OUString sText; + if (SVX_NUM_CHAR_SPECIAL == pFormat->GetNumberingType() || SVX_NUM_BITMAP == pFormat->GetNumberingType()) + sText = OUString(pFormat->GetBulletChar()); else - sTxt = pTxtNd->GetNumString(); + sText = pTextNd->GetNumString(); - if (!sTxt.isEmpty()) + if (!sText.isEmpty()) { m_aStyles.append(' '); - m_aStyles.append(msfilter::rtfutil::OutString(sTxt, m_rExport.eDefaultEncoding)); + m_aStyles.append(msfilter::rtfutil::OutString(sText, m_rExport.eDefaultEncoding)); } if (OUTLINE_RULE != pRule->GetRuleType()) { - if (!sTxt.isEmpty()) + if (!sText.isEmpty()) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB); m_aStyles.append('}'); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL); @@ -2789,7 +2789,7 @@ void RtfAttributeOutput::ParaSnapToGrid(const SvxParaGridItem& /*rGrid*/) SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::FormatFrameSize(const SwFmtFrmSize& rSize) +void RtfAttributeOutput::FormatFrameSize(const SwFormatFrmSize& rSize) { if (m_rExport.m_bOutPageDescs) { @@ -2829,15 +2829,15 @@ void RtfAttributeOutput::FormatLRSpace(const SvxLRSpaceItem& rLRSpace) else { m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LI); - m_aStyles.append((sal_Int32) rLRSpace.GetTxtLeft()); + m_aStyles.append((sal_Int32) rLRSpace.GetTextLeft()); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RI); m_aStyles.append((sal_Int32) rLRSpace.GetRight()); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_LIN); - m_aStyles.append((sal_Int32) rLRSpace.GetTxtLeft()); + m_aStyles.append((sal_Int32) rLRSpace.GetTextLeft()); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_RIN); m_aStyles.append((sal_Int32) rLRSpace.GetRight()); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FI); - m_aStyles.append((sal_Int32) rLRSpace.GetTxtFirstLineOfst()); + m_aStyles.append((sal_Int32) rLRSpace.GetTextFirstLineOfst()); } } else if (m_rExport.bRTFFlySyntax) @@ -2902,7 +2902,7 @@ void RtfAttributeOutput::FormatULSpace(const SvxULSpaceItem& rULSpace) } } -void RtfAttributeOutput::FormatSurround(const SwFmtSurround& rSurround) +void RtfAttributeOutput::FormatSurround(const SwFormatSurround& rSurround) { if (m_rExport.m_bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax) { @@ -2916,7 +2916,7 @@ void RtfAttributeOutput::FormatSurround(const SwFmtSurround& rSurround) } else if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) { - // See DocxSdrExport::startDMLAnchorInline() for SwFmtSurround -> WR / WRK mappings. + // See DocxSdrExport::startDMLAnchorInline() for SwFormatSurround -> WR / WRK mappings. sal_Int32 nWr = -1; boost::optional<sal_Int32> oWrk; switch (rSurround.GetValue()) @@ -2951,7 +2951,7 @@ void RtfAttributeOutput::FormatSurround(const SwFmtSurround& rSurround) } } -void RtfAttributeOutput::FormatVertOrientation(const SwFmtVertOrient& rFlyVert) +void RtfAttributeOutput::FormatVertOrientation(const SwFormatVertOrient& rFlyVert) { if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) { @@ -2994,7 +2994,7 @@ void RtfAttributeOutput::FormatVertOrientation(const SwFmtVertOrient& rFlyVert) } } -void RtfAttributeOutput::FormatHorizOrientation(const SwFmtHoriOrient& rFlyHori) +void RtfAttributeOutput::FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) { if (m_rExport.m_bOutFlyFrmAttrs && m_rExport.bRTFFlySyntax) { @@ -3034,7 +3034,7 @@ void RtfAttributeOutput::FormatHorizOrientation(const SwFmtHoriOrient& rFlyHori) } } -void RtfAttributeOutput::FormatAnchor(const SwFmtAnchor& rAnchor) +void RtfAttributeOutput::FormatAnchor(const SwFormatAnchor& rAnchor) { if (!m_rExport.bRTFFlySyntax) { @@ -3186,7 +3186,7 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox) m_aStyles.append(m_aSectionBreaks.makeStringAndClear()); } -void RtfAttributeOutput::FormatColumns_Impl(sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize) +void RtfAttributeOutput::FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven, SwTwips nPageSize) { m_rExport.Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_COLS); m_rExport.OutLong(nCols); @@ -3217,7 +3217,7 @@ void RtfAttributeOutput::FormatColumns_Impl(sal_uInt16 nCols, const SwFmtCol& rC } } -void RtfAttributeOutput::FormatKeep(const SvxFmtKeepItem& rItem) +void RtfAttributeOutput::FormatKeep(const SvxFormatKeepItem& rItem) { if (rItem.GetValue()) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_KEEPN); @@ -3228,7 +3228,7 @@ void RtfAttributeOutput::FormatTextGrid(const SwTextGridItem& /*rGrid*/) SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::FormatLineNumbering(const SwFmtLineNumber& rNumbering) +void RtfAttributeOutput::FormatLineNumbering(const SwFormatLineNumber& rNumbering) { if (!rNumbering.IsCount()) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_NOLINE); @@ -3257,59 +3257,59 @@ void RtfAttributeOutput::ParaOutlineLevel(const SfxUInt16Item& /*rItem*/) { } -void RtfAttributeOutput::WriteExpand(const SwField* pFld) +void RtfAttributeOutput::WriteExpand(const SwField* pField) { OUString sCmd; // for optional Parameters - switch (pFld->GetTyp()->Which()) + switch (pField->GetTyp()->Which()) { //#i119803# Export user field and DB field for RTF filter case RES_DBFLD: sCmd = FieldString(ww::eMERGEFIELD); // no break !! case RES_USERFLD: - sCmd += pFld->GetTyp()->GetName(); - m_rExport.OutputField(pFld, ww::eNONE, sCmd); + sCmd += pField->GetTyp()->GetName(); + m_rExport.OutputField(pField, ww::eNONE, sCmd); break; default: - m_rExport.OutputField(pFld, ww::eUNKNOWN, sCmd); + m_rExport.OutputField(pField, ww::eUNKNOWN, sCmd); break; } } -void RtfAttributeOutput::RefField(const SwField& /*rFld*/, const OUString& /*rRef*/) +void RtfAttributeOutput::RefField(const SwField& /*rField*/, const OUString& /*rRef*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::HiddenField(const SwField& /*rFld*/) +void RtfAttributeOutput::HiddenField(const SwField& /*rField*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::SetField(const SwField& /*rFld*/, ww::eField /*eType*/, const OUString& /*rCmd*/) +void RtfAttributeOutput::SetField(const SwField& /*rField*/, ww::eField /*eType*/, const OUString& /*rCmd*/) { SAL_INFO("sw.rtf", "TODO: " << OSL_THIS_FUNC); } -void RtfAttributeOutput::PostitField(const SwField* pFld) +void RtfAttributeOutput::PostitField(const SwField* pField) { - const SwPostItField& rPFld = *static_cast<const SwPostItField*>(pFld); + const SwPostItField& rPField = *static_cast<const SwPostItField*>(pField); - OString aName = OUStringToOString(rPFld.GetName(), RTL_TEXTENCODING_UTF8); + OString aName = OUStringToOString(rPField.GetName(), RTL_TEXTENCODING_UTF8); std::map<OString, sal_uInt16>::iterator it = m_rOpenedAnnotationMarksIds.find(aName); if (it != m_rOpenedAnnotationMarksIds.end()) { // In case this field is inside annotation marks, we want to write the // annotation itself after the annotation mark is closed, not here. - m_aPostitFields[it->second] = &rPFld; + m_aPostitFields[it->second] = &rPField; return; } m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNID " "); - m_aRunText->append(OUStringToOString(OUString(rPFld.GetInitials()), m_rExport.eCurrentEncoding)); + m_aRunText->append(OUStringToOString(OUString(rPField.GetInitials()), m_rExport.eCurrentEncoding)); m_aRunText->append("}"); m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNAUTHOR " "); - m_aRunText->append(OUStringToOString(OUString(rPFld.GetPar1()), m_rExport.eCurrentEncoding)); + m_aRunText->append(OUStringToOString(OUString(rPField.GetPar1()), m_rExport.eCurrentEncoding)); m_aRunText->append("}"); m_aRunText->append(OOO_STRING_SVTOOLS_RTF_CHATN); @@ -3322,13 +3322,13 @@ void RtfAttributeOutput::PostitField(const SwField* pFld) m_aRunText->append('}'); } m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATNDATE " "); - m_aRunText->append((sal_Int32)sw::ms::DateTime2DTTM(rPFld.GetDateTime())); + m_aRunText->append((sal_Int32)sw::ms::DateTime2DTTM(rPField.GetDateTime())); m_aRunText->append('}'); - m_aRunText->append(OUStringToOString(OUString(rPFld.GetTxt()), m_rExport.eCurrentEncoding)); + m_aRunText->append(OUStringToOString(OUString(rPField.GetText()), m_rExport.eCurrentEncoding)); m_aRunText->append('}'); } -bool RtfAttributeOutput::DropdownField(const SwField* /*pFld*/) +bool RtfAttributeOutput::DropdownField(const SwField* /*pField*/) { // this is handled in OutputFlyFrame_Impl() return true; @@ -3351,7 +3351,7 @@ RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport) m_nCurrentAnnotationMarkId(-1), m_bTableCellOpen(false), m_nTableDepth(0), - m_bTblAfterCell(false), + m_bTableAfterCell(false), m_nColBreakNeeded(false), m_bBufferSectionBreaks(false), m_bBufferSectionHeaders(false), @@ -3536,7 +3536,7 @@ static void lcl_AppendSP(OStringBuffer& rBuffer, rBuffer.append("}}"); } -static OString ExportPICT(const SwFlyFrmFmt* pFlyFrmFmt, const Size& rOrig, const Size& rRendered, const Size& rMapped, +static OString ExportPICT(const SwFlyFrameFormat* pFlyFrameFormat, const Size& rOrig, const Size& rRendered, const Size& rMapped, const SwCropGrf& rCr, const char* pBLIPType, const sal_uInt8* pGraphicAry, unsigned long nSize, const RtfExport& rExport, SvStream* pStream = 0, bool bWritePicProp = true) { @@ -3547,14 +3547,14 @@ static OString ExportPICT(const SwFlyFrmFmt* pFlyFrmFmt, const Size& rOrig, cons aRet.append("{" OOO_STRING_SVTOOLS_RTF_PICT); - if (pFlyFrmFmt && bWritePicProp) + if (pFlyFrameFormat && bWritePicProp) { - OUString sDescription = pFlyFrmFmt->GetObjDescription(); + OUString sDescription = pFlyFrameFormat->GetObjDescription(); //write picture properties - wzDescription at first //looks like: "{\*\picprop{\sp{\sn PropertyName}{\sv PropertyValue}}}" aRet.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_PICPROP); //"{\*\picprop lcl_AppendSP(aRet, "wzDescription", sDescription, rExport); - OUString sName = pFlyFrmFmt->GetObjTitle(); + OUString sName = pFlyFrameFormat->GetObjTitle(); lcl_AppendSP(aRet, "wzName", sName, rExport); aRet.append("}"); //"}" } @@ -3614,7 +3614,7 @@ static OString ExportPICT(const SwFlyFrmFmt* pFlyFrmFmt, const Size& rOrig, cons return aRet.makeStringAndClear(); } -void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize) +void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize) { m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT); Size aSize(rOLENode.GetTwipSize()); @@ -3632,7 +3632,7 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, S aStream.Seek(STREAM_SEEK_TO_END); sal_uInt32 nSize = aStream.Tell(); pGraphicAry = static_cast<sal_uInt8 const*>(aStream.GetData()); - m_aRunText->append(ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport)); + m_aRunText->append(ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport)); m_aRunText->append("}"); // shppict m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_NONSHPPICT); pBLIPType = OOO_STRING_SVTOOLS_RTF_WMETAFILE; @@ -3642,11 +3642,11 @@ void RtfAttributeOutput::FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, S aWmfStream.Seek(STREAM_SEEK_TO_END); nSize = aWmfStream.Tell(); pGraphicAry = static_cast<sal_uInt8 const*>(aWmfStream.GetData()); - m_aRunText->append(ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport)); + m_aRunText->append(ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport)); m_aRunText->append("}"); // nonshppict } -bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize) +bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize) { uno::Reference <embed::XEmbeddedObject> xObj(const_cast<SwOLENode&>(rOLENode).GetOLEObj().GetOleRef()); sal_Int64 nAspect = rOLENode.GetAspect(); @@ -3671,22 +3671,22 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENod m_aRunText->append(aBuf.makeStringAndClear()); // Replacement graphic. m_aRunText->append("{" LO_STRING_SVTOOLS_RTF_MMATHPICT " "); - FlyFrameOLEReplacement(pFlyFrmFmt, rOLENode, rSize); + FlyFrameOLEReplacement(pFlyFrameFormat, rOLENode, rSize); m_aRunText->append("}"); // mmathPict m_aRunText->append("}"); // mmath return true; } -void RtfAttributeOutput::FlyFrameOLE(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize) +void RtfAttributeOutput::FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize) { - if (FlyFrameOLEMath(pFlyFrmFmt, rOLENode, rSize)) + if (FlyFrameOLEMath(pFlyFrameFormat, rOLENode, rSize)) return; - FlyFrameOLEReplacement(pFlyFrmFmt, rOLENode, rSize); + FlyFrameOLEReplacement(pFlyFrameFormat, rOLENode, rSize); } -void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode) +void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode) { SvMemoryStream aStream; const sal_uInt8* pGraphicAry = 0; @@ -3757,14 +3757,14 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw Size aSize(pGrfNode->GetTwipSize()); Size aRendered(aSize); - const SwFmtFrmSize& rS = pFlyFrmFmt->GetFrmSize(); + const SwFormatFrmSize& rS = pFlyFrameFormat->GetFrmSize(); aRendered.Width() = rS.GetWidth(); aRendered.Height() = rS.GetHeight(); sw::Frame* pFrame = 0; for (sw::FrameIter it = m_rExport.m_aFrames.begin(); it != m_rExport.m_aFrames.end(); ++it) { - if (pFlyFrmFmt == &it->GetFrmFmt()) + if (pFlyFrameFormat == &it->GetFrameFormat()) { pFrame = &(*it); break; @@ -3789,20 +3789,20 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw m_pFlyFrameSize = &aRendered; m_rExport.m_pParentFrame = pFrame; m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true; - m_rExport.OutputFormat(pFrame->GetFrmFmt(), false, false, true); + m_rExport.OutputFormat(pFrame->GetFrameFormat(), false, false, true); m_rExport.m_bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false; m_rExport.m_pParentFrame = NULL; m_pFlyFrameSize = 0; std::vector< std::pair<OString, OString> > aFlyProperties; aFlyProperties.push_back(std::make_pair<OString, OString>("shapeType", OString::number(ESCHER_ShpInst_PictureFrame))); - aFlyProperties.push_back(std::make_pair<OString, OString>("wzDescription", msfilter::rtfutil::OutString(pFlyFrmFmt->GetObjDescription(), m_rExport.eCurrentEncoding))); - aFlyProperties.push_back(std::make_pair<OString, OString>("wzName", msfilter::rtfutil::OutString(pFlyFrmFmt->GetObjTitle(), m_rExport.eCurrentEncoding))); + aFlyProperties.push_back(std::make_pair<OString, OString>("wzDescription", msfilter::rtfutil::OutString(pFlyFrameFormat->GetObjDescription(), m_rExport.eCurrentEncoding))); + aFlyProperties.push_back(std::make_pair<OString, OString>("wzName", msfilter::rtfutil::OutString(pFlyFrameFormat->GetObjTitle(), m_rExport.eCurrentEncoding))); // If we have a wrap polygon, then handle that here. - if (pFlyFrmFmt->GetSurround().IsContour()) + if (pFlyFrameFormat->GetSurround().IsContour()) { - if (const SwNoTxtNode* pNd = sw::util::GetNoTxtNodeFromSwFrmFmt(*pFlyFrmFmt)) + if (const SwNoTextNode* pNd = sw::util::GetNoTextNodeFromSwFrameFormat(*pFlyFrameFormat)) { const tools::PolyPolygon* pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) @@ -3817,7 +3817,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw } // Below text, behind document, opaque: they all refer to the same thing. - if (!pFlyFrmFmt->GetOpaque().GetValue()) + if (!pFlyFrameFormat->GetOpaque().GetValue()) aFlyProperties.push_back(std::make_pair<OString, OString>("fBehindDocument", "1")); for (size_t i = 0; i < aFlyProperties.size(); ++i) @@ -3834,7 +3834,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw bool bWritePicProp = !pFrame || pFrame->IsInline(); if (pBLIPType) - ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); + ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); else { aStream.Seek(0); @@ -3845,7 +3845,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw nSize = aStream.Tell(); pGraphicAry = static_cast<sal_uInt8 const*>(aStream.GetData()); - ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); + ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm(), bWritePicProp); } if (!pFrame || pFrame->IsInline()) @@ -3862,7 +3862,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const Sw nSize = aStream.Tell(); pGraphicAry = static_cast<sal_uInt8 const*>(aStream.GetData()); - ExportPICT(pFlyFrmFmt, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm()); + ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize, m_rExport, &m_rExport.Strm()); m_rExport.Strm().WriteChar('}'); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index df92c2248009..d58b2caeb70a 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -33,7 +33,7 @@ class SwGrfNode; class SwOLENode; -class SwFlyFrmFmt; +class SwFlyFrameFormat; /// The class that has handlers for various resource types when exporting as RTF class RtfAttributeOutput : public AttributeOutputBase @@ -53,7 +53,7 @@ public: virtual void EmptyParagraph() SAL_OVERRIDE; /// Called in order to output section breaks. - virtual void SectionBreaks(const SwTxtNode& rNode) SAL_OVERRIDE; + virtual void SectionBreaks(const SwTextNode& rNode) SAL_OVERRIDE; /// Called before we start outputting the attributes. virtual void StartParagraphProperties() SAL_OVERRIDE; @@ -87,7 +87,7 @@ public: virtual void RawText(const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet) SAL_OVERRIDE; /// Output ruby start. - virtual void StartRuby(const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby) SAL_OVERRIDE; + virtual void StartRuby(const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby) SAL_OVERRIDE; /// Output ruby end. virtual void EndRuby() SAL_OVERRIDE; @@ -98,14 +98,14 @@ public: /// Output URL end. virtual bool EndURL(bool isAtEndOfParagraph) SAL_OVERRIDE; - virtual void FieldVanish(const OUString& rTxt, ww::eField eType) SAL_OVERRIDE; + virtual void FieldVanish(const OUString& rText, ww::eField eType) SAL_OVERRIDE; /// Output redlining. /// /// The common attribute that can be among the run properties. virtual void Redline(const SwRedlineData* pRedline) SAL_OVERRIDE; - virtual void FormatDrop(const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) SAL_OVERRIDE; + virtual void FormatDrop(const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) SAL_OVERRIDE; /// Output style. virtual void ParagraphStyle(sal_uInt16 nStyle) SAL_OVERRIDE; @@ -151,7 +151,7 @@ public: virtual void EndStyleProperties(bool bParProp) SAL_OVERRIDE; /// Numbering rule and Id. - virtual void OutlineNumbering(sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt) SAL_OVERRIDE; + virtual void OutlineNumbering(sal_uInt8 nLvl, const SwNumFormat& rNFormat, const SwFormat& rFormat) SAL_OVERRIDE; /// Page break /// As a paragraph property - the paragraph should be on the next page. @@ -177,7 +177,7 @@ public: virtual void SectionTitlePage() SAL_OVERRIDE; /// Description of the page borders. - virtual void SectionPageBorders(const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt) SAL_OVERRIDE; + virtual void SectionPageBorders(const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat) SAL_OVERRIDE; /// Columns populated from right/numbers on the right side? virtual void SectionBiDi(bool bBiDi) SAL_OVERRIDE; @@ -213,14 +213,14 @@ public: const OUString& rNumberingString, const SvxBrushItem* pBrush = 0) SAL_OVERRIDE;//For i120928,to export graphic of bullet - void WriteField_Impl(const SwField* pFld, ww::eField eType, const OUString& rFldCmd, sal_uInt8 nMode); + void WriteField_Impl(const SwField* pField, ww::eField eType, const OUString& rFieldCmd, sal_uInt8 nMode); void WriteBookmarks_Impl(std::vector< OUString >& rStarts, std::vector< OUString >& rEnds); void WriteAnnotationMarks_Impl(std::vector< OUString >& rStarts, std::vector< OUString >& rEnds); - void WriteHeaderFooter_Impl(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr, bool bTitlepg); + void WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const sal_Char* pStr, bool bTitlepg); protected: /// Output frames - the implementation. - virtual void OutputFlyFrame_Impl(const sw::Frame& rFmt, const Point& rNdTopLeft) SAL_OVERRIDE; + virtual void OutputFlyFrame_Impl(const sw::Frame& rFormat, const Point& rNdTopLeft) SAL_OVERRIDE; /// Sfx item Sfx item RES_CHRATR_CASEMAP virtual void CharCaseMap(const SvxCaseMapItem& rCaseMap) SAL_OVERRIDE; @@ -331,13 +331,13 @@ protected: virtual void CharHighlight(const SvxBrushItem&) SAL_OVERRIDE; /// Sfx item RES_TXTATR_INETFMT - virtual void TextINetFormat(const SwFmtINetFmt&) SAL_OVERRIDE; + virtual void TextINetFormat(const SwFormatINetFormat&) SAL_OVERRIDE; /// Sfx item RES_TXTATR_CHARFMT - virtual void TextCharFormat(const SwFmtCharFmt&) SAL_OVERRIDE; + virtual void TextCharFormat(const SwFormatCharFormat&) SAL_OVERRIDE; /// Sfx item RES_TXTATR_FTN - virtual void TextFootnote_Impl(const SwFmtFtn&) SAL_OVERRIDE; + virtual void TextFootnote_Impl(const SwFormatFootnote&) SAL_OVERRIDE; /// Sfx item RES_PARATR_LINESPACING virtual void ParaLineSpacing_Impl(short nSpace, short nMulti) SAL_OVERRIDE; @@ -346,7 +346,7 @@ protected: virtual void ParaAdjust(const SvxAdjustItem& rAdjust) SAL_OVERRIDE; /// Sfx item RES_PARATR_SPLIT - virtual void ParaSplit(const SvxFmtSplitItem& rSplit) SAL_OVERRIDE; + virtual void ParaSplit(const SvxFormatSplitItem& rSplit) SAL_OVERRIDE; /// Sfx item RES_PARATR_WIDOWS virtual void ParaWidows(const SvxWidowsItem& rWidows) SAL_OVERRIDE; @@ -358,7 +358,7 @@ protected: virtual void ParaHyphenZone(const SvxHyphenZoneItem&) SAL_OVERRIDE; /// Sfx item RES_PARATR_NUMRULE - virtual void ParaNumRule_Impl(const SwTxtNode* pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId) SAL_OVERRIDE; + virtual void ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) SAL_OVERRIDE; /// Sfx item RES_PARATR_SCRIPTSPACE virtual void ParaScriptSpace(const SfxBoolItem&) SAL_OVERRIDE; @@ -376,7 +376,7 @@ protected: virtual void ParaSnapToGrid(const SvxParaGridItem&) SAL_OVERRIDE; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize(const SwFmtFrmSize&) SAL_OVERRIDE; + virtual void FormatFrameSize(const SwFormatFrmSize&) SAL_OVERRIDE; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin(const SvxPaperBinItem&) SAL_OVERRIDE; @@ -388,16 +388,16 @@ protected: virtual void FormatULSpace(const SvxULSpaceItem& rULSpace) SAL_OVERRIDE; /// Sfx item RES_SURROUND - virtual void FormatSurround(const SwFmtSurround&) SAL_OVERRIDE; + virtual void FormatSurround(const SwFormatSurround&) SAL_OVERRIDE; /// Sfx item RES_VERT_ORIENT - virtual void FormatVertOrientation(const SwFmtVertOrient&) SAL_OVERRIDE; + virtual void FormatVertOrientation(const SwFormatVertOrient&) SAL_OVERRIDE; /// Sfx item RES_HORI_ORIENT - virtual void FormatHorizOrientation(const SwFmtHoriOrient&) SAL_OVERRIDE; + virtual void FormatHorizOrientation(const SwFormatHoriOrient&) SAL_OVERRIDE; /// Sfx item RES_ANCHOR - virtual void FormatAnchor(const SwFmtAnchor&) SAL_OVERRIDE; + virtual void FormatAnchor(const SwFormatAnchor&) SAL_OVERRIDE; /// Sfx item RES_BACKGROUND virtual void FormatBackground(const SvxBrushItem&) SAL_OVERRIDE; @@ -412,16 +412,16 @@ protected: virtual void FormatBox(const SvxBoxItem&) SAL_OVERRIDE; /// Sfx item RES_COL - virtual void FormatColumns_Impl(sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize) SAL_OVERRIDE; + virtual void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven, SwTwips nPageSize) SAL_OVERRIDE; /// Sfx item RES_KEEP - virtual void FormatKeep(const SvxFmtKeepItem&) SAL_OVERRIDE; + virtual void FormatKeep(const SvxFormatKeepItem&) SAL_OVERRIDE; /// Sfx item RES_TEXTGRID virtual void FormatTextGrid(const SwTextGridItem&) SAL_OVERRIDE; /// Sfx item RES_LINENUMBER - virtual void FormatLineNumbering(const SwFmtLineNumber&) SAL_OVERRIDE; + virtual void FormatLineNumbering(const SwFormatLineNumber&) SAL_OVERRIDE; /// Sfx item RES_FRAMEDIR virtual void FormatFrameDirection(const SvxFrameDirectionItem&) SAL_OVERRIDE; @@ -436,14 +436,14 @@ protected: virtual void ParaOutlineLevel(const SfxUInt16Item&) SAL_OVERRIDE; /// Write the expanded field - virtual void WriteExpand(const SwField* pFld) SAL_OVERRIDE; + virtual void WriteExpand(const SwField* pField) SAL_OVERRIDE; - virtual void RefField(const SwField& rFld, const OUString& rRef) SAL_OVERRIDE; - virtual void HiddenField(const SwField& rFld) SAL_OVERRIDE; - virtual void SetField(const SwField& rFld, ww::eField eType, const OUString& rCmd) SAL_OVERRIDE; - virtual void PostitField(const SwField* pFld) SAL_OVERRIDE; - virtual bool DropdownField(const SwField* pFld) SAL_OVERRIDE; - virtual bool PlaceholderField(const SwField* pFld) SAL_OVERRIDE; + virtual void RefField(const SwField& rField, const OUString& rRef) SAL_OVERRIDE; + virtual void HiddenField(const SwField& rField) SAL_OVERRIDE; + virtual void SetField(const SwField& rField, ww::eField eType, const OUString& rCmd) SAL_OVERRIDE; + virtual void PostitField(const SwField* pField) SAL_OVERRIDE; + virtual bool DropdownField(const SwField* pField) SAL_OVERRIDE; + virtual bool PlaceholderField(const SwField* pField) SAL_OVERRIDE; /// Reference to the export, where to get the data from RtfExport& m_rExport; @@ -451,11 +451,11 @@ protected: private: /// Output graphic fly frames. - void FlyFrameGraphic(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode); - void FlyFrameOLE(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize); - void FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize); + void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode); + void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize); + void FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize); /// Math export. - bool FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize); + bool FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode, const Size& rSize); /* * Table methods. @@ -472,7 +472,7 @@ private: /// End cell, row, and even the entire table if necessary. void FinishTableRowCell(ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false); - void WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote); + void WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote); /* * Current style name and its ID. @@ -535,7 +535,7 @@ private: /* * Remember if we wrote a \cell or not. */ - bool m_bTblAfterCell; + bool m_bTableAfterCell; /* * For late output of row definitions. diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 30f28648dafe..6c7da6aac393 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -103,7 +103,7 @@ bool RtfExport::CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) return true; } -void RtfExport::AppendBookmarks(const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void RtfExport::AppendBookmarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; @@ -140,7 +140,7 @@ void RtfExport::AppendBookmark(const OUString& rName, bool /*bSkip*/) m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds); } -void RtfExport::AppendAnnotationMarks(const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void RtfExport::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) { std::vector< OUString > aStarts; std::vector< OUString > aEnds; @@ -167,7 +167,7 @@ void RtfExport::AppendAnnotationMarks(const SwTxtNode& rNode, sal_Int32 nAktPos, } //For i120928,to export graphic of bullet for RTF filter -void RtfExport::ExportGrfBullet(const SwTxtNode&) +void RtfExport::ExportGrfBullet(const SwTextNode&) { // Noop, would be too late, see WriteNumbering() instead. } @@ -180,7 +180,7 @@ void RtfExport::WriteChar(sal_Unicode) static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = 0) { sal_uInt8 nEnd = MAXLEVEL; - while (nEnd-- && !rRule.GetNumFmt(nEnd)) + while (nEnd-- && !rRule.GetNumFormat(nEnd)) ; ++nEnd; @@ -188,10 +188,10 @@ static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = 0) for (nLvl = 0; nLvl < nEnd; ++nLvl) { - const SwNumFmt* pNFmt = &rRule.Get(nLvl); - if (SVX_NUM_NUMBER_NONE != pNFmt->GetNumberingType() || - !pNFmt->GetPrefix().isEmpty() || - (!pNFmt->GetSuffix().isEmpty() && pNFmt->GetSuffix() != ".")) + const SwNumFormat* pNFormat = &rRule.Get(nLvl); + if (SVX_NUM_NUMBER_NONE != pNFormat->GetNumberingType() || + !pNFormat->GetPrefix().isEmpty() || + (!pNFormat->GetSuffix().isEmpty() && pNFormat->GetSuffix() != ".")) break; } @@ -202,17 +202,17 @@ static bool IsExportNumRule(const SwNumRule& rRule, sal_uInt8* pEnd = 0) void RtfExport::BuildNumbering() { - const SwNumRuleTbl& rListTbl = m_pDoc->GetNumRuleTbl(); + const SwNumRuleTable& rListTable = m_pDoc->GetNumRuleTable(); - for (sal_uInt16 n = rListTbl.size()+1; n;) + for (sal_uInt16 n = rListTable.size()+1; n;) { SwNumRule* pRule; --n; - if (n == rListTbl.size()) + if (n == rListTable.size()) pRule = m_pDoc->GetOutlineNumRule(); else { - pRule = rListTbl[ n ]; + pRule = rListTable[ n ]; if (!SwDoc::IsUsed(*pRule)) continue; } @@ -226,7 +226,7 @@ void RtfExport::WriteNumbering() { SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start"); - if (!m_pUsedNumTbl) + if (!m_pUsedNumTable) return; // no numbering is used Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_IGNORE).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LISTTABLE); @@ -250,7 +250,7 @@ void RtfExport::WriteNumbering() void RtfExport::WriteRevTab() { - int nRevAuthors = m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); + int nRevAuthors = m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); if (nRevAuthors < 1) return; @@ -258,16 +258,16 @@ void RtfExport::WriteRevTab() // RTF always seems to use Unknown as the default first entry GetRedline(OUString("Unknown")); - for (sal_uInt16 i = 0; i < m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++i) + for (sal_uInt16 i = 0; i < m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++i) { - const SwRangeRedline* pRedl = m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ i ]; + const SwRangeRedline* pRedl = m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ i ]; GetRedline(SW_MOD()->GetRedlineAuthor(pRedl->GetAuthor())); } // Now write the table Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_IGNORE).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_REVTBL).WriteChar(' '); - for (sal_uInt16 i = 0; i < m_aRedlineTbl.size(); ++i) + for (sal_uInt16 i = 0; i < m_aRedlineTable.size(); ++i) { const OUString* pAuthor = GetRedline(i); Strm().WriteChar('{'); @@ -279,32 +279,32 @@ void RtfExport::WriteRevTab() } void RtfExport::WriteHeadersFooters(sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/) + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 /*nBreakCode*/) { // headers if (nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN) - WriteHeaderFooter(rLeftFmt, true, OOO_STRING_SVTOOLS_RTF_HEADERL); + WriteHeaderFooter(rLeftFormat, true, OOO_STRING_SVTOOLS_RTF_HEADERL); if (nHeadFootFlags & nsHdFtFlags::WW8_HEADER_ODD) - WriteHeaderFooter(rFmt, true, OOO_STRING_SVTOOLS_RTF_HEADER); + WriteHeaderFooter(rFormat, true, OOO_STRING_SVTOOLS_RTF_HEADER); if (nHeadFootFlags & nsHdFtFlags::WW8_HEADER_FIRST) - WriteHeaderFooter(rFirstPageFmt, true, OOO_STRING_SVTOOLS_RTF_HEADERF, true); + WriteHeaderFooter(rFirstPageFormat, true, OOO_STRING_SVTOOLS_RTF_HEADERF, true); // footers if (nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_EVEN) - WriteHeaderFooter(rLeftFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERL); + WriteHeaderFooter(rLeftFormat, false, OOO_STRING_SVTOOLS_RTF_FOOTERL); if (nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_ODD) - WriteHeaderFooter(rFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTER); + WriteHeaderFooter(rFormat, false, OOO_STRING_SVTOOLS_RTF_FOOTER); if (nHeadFootFlags & nsHdFtFlags::WW8_FOOTER_FIRST) - WriteHeaderFooter(rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF, true); + WriteHeaderFooter(rFirstPageFormat, false, OOO_STRING_SVTOOLS_RTF_FOOTERF, true); } -void RtfExport::OutputField(const SwField* pFld, ww::eField eFldType, const OUString& rFldCmd, sal_uInt8 nMode) +void RtfExport::OutputField(const SwField* pField, ww::eField eFieldType, const OUString& rFieldCmd, sal_uInt8 nMode) { - m_pAttrOutput->WriteField_Impl(pFld, eFldType, rFldCmd, nMode); + m_pAttrOutput->WriteField_Impl(pField, eFieldType, rFieldCmd, nMode); } void RtfExport::WriteFormData(const ::sw::mark::IFieldmark& /*rFieldmark*/) @@ -326,12 +326,12 @@ void RtfExport::DoComboBox(const OUString& /*rName*/, // this is handled in RtfAttributeOutput::OutputFlyFrame_Impl } -void RtfExport::DoFormText(const SwInputField* pFld) +void RtfExport::DoFormText(const SwInputField* pField) { - OUString sResult = pFld->ExpandField(true); - OUString sHelp(pFld->GetHelp()); - OUString sName = pFld->GetPar2(); - OUString sStatus = pFld->GetToolTip(); + OUString sResult = pField->ExpandField(true); + OUString sHelp(pField->GetHelp()); + OUString sName = pField->GetPar2(); + OUString sStatus = pField->GetToolTip(); m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FLDINST "{ FORMTEXT }"); m_pAttrOutput->RunText().append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FORMFIELD " {" OOO_STRING_SVTOOLS_RTF_FFTYPE "0"); if (!sHelp.isEmpty()) @@ -375,9 +375,9 @@ void RtfExport::WriteStyles() void RtfExport::WriteFootnoteSettings() { - const SwPageFtnInfo& rFtnInfo = m_pDoc->GetPageDesc(0).GetFtnInfo(); + const SwPageFootnoteInfo& rFootnoteInfo = m_pDoc->GetPageDesc(0).GetFootnoteInfo(); // Request a separator only in case the width is larger than zero. - bool bSeparator = double(rFtnInfo.GetWidth()) > 0; + bool bSeparator = double(rFootnoteInfo.GetWidth()) > 0; Strm().WriteChar('{').WriteCharPtr(OOO_STRING_SVTOOLS_RTF_IGNORE).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_FTNSEP); if (bSeparator) @@ -507,9 +507,9 @@ void RtfExport::ExportDocument_Impl() // Automatic hyphenation: it's a global setting in Word, it's a paragraph setting in Writer. // Use the setting from the default style. - SwTxtFmtColl* pTxtFmtColl = m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, /*bRegardLanguage=*/false); + SwTextFormatColl* pTextFormatColl = m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, /*bRegardLanguage=*/false); const SfxPoolItem* pItem; - if (pTxtFmtColl && pTxtFmtColl->GetItemState(RES_PARATR_HYPHENZONE, false, &pItem) == SfxItemState::SET) + if (pTextFormatColl && pTextFormatColl->GetItemState(RES_PARATR_HYPHENZONE, false, &pItem) == SfxItemState::SET) { Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_HYPHAUTO); OutULong(int(static_cast<const SvxHyphenZoneItem*>(pItem)->IsHyphen())); @@ -544,7 +544,7 @@ void RtfExport::ExportDocument_Impl() for (sal_uInt32 n = 0; n < nMaxItem; ++n) { const SvxProtectItem* pProtect = static_cast<const SvxProtectItem*>(rPool.GetItem2(RES_PROTECT, n)); - if (pProtect && pProtect->IsCntntProtected()) + if (pProtect && pProtect->IsContentProtected()) { Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_FORMPROT); break; @@ -558,27 +558,27 @@ void RtfExport::ExportDocument_Impl() // size and empty margins of the page if (m_pDoc->GetPageDescCnt()) { - // Seeking the first SwFmtPageDesc. If no set, the default is valid - const SwFmtPageDesc* pSttPgDsc = 0; + // Seeking the first SwFormatPageDesc. If no set, the default is valid + const SwFormatPageDesc* pSttPgDsc = 0; { const SwNode& rSttNd = *m_pDoc->GetNodes()[ m_pDoc->GetNodes().GetEndOfExtras().GetIndex() + 2 ]; const SfxItemSet* pSet = 0; - if (rSttNd.IsCntntNode()) - pSet = &rSttNd.GetCntntNode()->GetSwAttrSet(); + if (rSttNd.IsContentNode()) + pSet = &rSttNd.GetContentNode()->GetSwAttrSet(); else if (rSttNd.IsTableNode()) pSet = &rSttNd.GetTableNode()->GetTable(). - GetFrmFmt()->GetAttrSet(); + GetFrameFormat()->GetAttrSet(); else if (rSttNd.IsSectionNode()) pSet = &rSttNd.GetSectionNode()->GetSection(). - GetFmt()->GetAttrSet(); + GetFormat()->GetAttrSet(); if (pSet) { size_t nPosInDoc; - pSttPgDsc = static_cast<const SwFmtPageDesc*>(&pSet->Get(RES_PAGEDESC)); + pSttPgDsc = static_cast<const SwFormatPageDesc*>(&pSet->Get(RES_PAGEDESC)); if (!pSttPgDsc->GetPageDesc()) pSttPgDsc = 0; else if (m_pDoc->FindPageDesc(pSttPgDsc->GetPageDesc()->GetName(), &nPosInDoc)) @@ -590,13 +590,13 @@ void RtfExport::ExportDocument_Impl() } const SwPageDesc& rPageDesc = pSttPgDsc ? *pSttPgDsc->GetPageDesc() : m_pDoc->GetPageDesc(0); - const SwFrmFmt& rFmtPage = rPageDesc.GetMaster(); + const SwFrameFormat& rFormatPage = rPageDesc.GetMaster(); { if (rPageDesc.GetLandscape()) Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LANDSCAPE); - const SwFmtFrmSize& rSz = rFmtPage.GetFrmSize(); + const SwFormatFrmSize& rSz = rFormatPage.GetFrmSize(); // Clipboard document is always created without a printer, then // the size will be always LONG_MAX! Solution then is to use A4 if (LONG_MAX == rSz.GetHeight() || LONG_MAX == rSz.GetWidth()) @@ -615,14 +615,14 @@ void RtfExport::ExportDocument_Impl() } { - const SvxLRSpaceItem& rLR = rFmtPage.GetLRSpace(); + const SvxLRSpaceItem& rLR = rFormatPage.GetLRSpace(); Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_MARGL); OutLong(rLR.GetLeft()).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_MARGR); OutLong(rLR.GetRight()); } { - const SvxULSpaceItem& rUL = rFmtPage.GetULSpace(); + const SvxULSpaceItem& rUL = rFormatPage.GetULSpace(); Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_MARGT); OutLong(rUL.GetUpper()).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_MARGB); OutLong(rUL.GetLower()); @@ -647,15 +647,15 @@ void RtfExport::ExportDocument_Impl() { // write the footnotes and endnotes-out Info - const SwFtnInfo& rFtnInfo = m_pDoc->GetFtnInfo(); + const SwFootnoteInfo& rFootnoteInfo = m_pDoc->GetFootnoteInfo(); - const char* pOut = FTNPOS_CHAPTER == rFtnInfo.ePos + const char* pOut = FTNPOS_CHAPTER == rFootnoteInfo.ePos ? OOO_STRING_SVTOOLS_RTF_ENDDOC : OOO_STRING_SVTOOLS_RTF_FTNBJ; Strm().WriteCharPtr(pOut).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_FTNSTART); - OutLong(rFtnInfo.nFtnOffset + 1); + OutLong(rFootnoteInfo.nFootnoteOffset + 1); - switch (rFtnInfo.eNum) + switch (rFootnoteInfo.eNum) { case FTNNUM_PAGE: pOut = OOO_STRING_SVTOOLS_RTF_FTNRSTPG; @@ -669,7 +669,7 @@ void RtfExport::ExportDocument_Impl() } Strm().WriteCharPtr(pOut); - switch (rFtnInfo.aFmt.GetNumberingType()) + switch (rFootnoteInfo.aFormat.GetNumberingType()) { case SVX_NUM_CHARS_LOWER_LETTER: case SVX_NUM_CHARS_LOWER_LETTER_N: @@ -698,9 +698,9 @@ void RtfExport::ExportDocument_Impl() Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_AENDDOC).WriteCharPtr(OOO_STRING_SVTOOLS_RTF_AFTNRSTCONT) .WriteCharPtr(OOO_STRING_SVTOOLS_RTF_AFTNSTART); - OutLong(rEndNoteInfo.nFtnOffset + 1); + OutLong(rEndNoteInfo.nFootnoteOffset + 1); - switch (rEndNoteInfo.aFmt.GetNumberingType()) + switch (rEndNoteInfo.aFormat.GetNumberingType()) { case SVX_NUM_CHARS_LOWER_LETTER: case SVX_NUM_CHARS_LOWER_LETTER_N: @@ -736,33 +736,33 @@ void RtfExport::ExportDocument_Impl() } void RtfExport::PrepareNewPageDesc(const SfxItemSet* pSet, - const SwNode& rNd, const SwFmtPageDesc* pNewPgDescFmt, + const SwNode& rNd, const SwFormatPageDesc* pNewPgDescFormat, const SwPageDesc* pNewPgDesc) { - const SwSectionFmt* pFmt = GetSectionFormat(rNd); + const SwSectionFormat* pFormat = GetSectionFormat(rNd); const sal_uLong nLnNm = GetSectionLineNo(pSet, rNd); - OSL_ENSURE(pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided."); + OSL_ENSURE(pNewPgDescFormat || pNewPgDesc, "Neither page desc format nor page desc provided."); - if (pNewPgDescFmt) - m_pSections->AppendSection(*pNewPgDescFmt, rNd, pFmt, nLnNm); + if (pNewPgDescFormat) + m_pSections->AppendSection(*pNewPgDescFormat, rNd, pFormat, nLnNm); else if (pNewPgDesc) - m_pSections->AppendSection(pNewPgDesc, rNd, pFmt, nLnNm); + m_pSections->AppendSection(pNewPgDesc, rNd, pFormat, nLnNm); // Don't insert a page break, when we're changing page style just because the next page has to be a different one. if (!m_pAttrOutput->m_pPrevPageDesc || m_pAttrOutput->m_pPrevPageDesc->GetFollow() != pNewPgDesc) AttrOutput().SectionBreak(msword::PageBreak, m_pSections->CurrentSectionInfo()); } -bool RtfExport::DisallowInheritingOutlineNumbering(const SwFmt& rFmt) +bool RtfExport::DisallowInheritingOutlineNumbering(const SwFormat& rFormat) { bool bRet(false); - if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFormat.GetItemState(RES_PARATR_NUMRULE, false)) { - if (const SwFmt* pParent = rFmt.DerivedFrom()) + if (const SwFormat* pParent = rFormat.DerivedFrom()) { - if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) + if (static_cast<const SwTextFormatColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) { // Level 9 disables the outline Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LEVEL).WriteInt32(9); @@ -789,7 +789,7 @@ void RtfExport::OutputLinkedOLE(const OUString&) { } -void RtfExport::OutputTextNode(const SwTxtNode& rNode) +void RtfExport::OutputTextNode(const SwTextNode& rNode) { m_nCurrentNodeIndex = rNode.GetIndex(); if (!m_bOutOutlineOnly || rNode.IsOutline()) @@ -797,9 +797,9 @@ void RtfExport::OutputTextNode(const SwTxtNode& rNode) m_nCurrentNodeIndex = 0; } -void RtfExport::AppendSection(const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum) +void RtfExport::AppendSection(const SwPageDesc* pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum) { - m_pSections->AppendSection(pPageDesc, pFmt, nLnNum); + m_pSections->AppendSection(pPageDesc, pFormat, nLnNum); AttrOutput().SectionBreak(msword::PageBreak, m_pSections->CurrentSectionInfo()); } @@ -899,13 +899,13 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT) sal_uInt16 RtfExport::GetColor(const Color& rColor) const { - for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it) + for (RtfColorTable::const_iterator it=m_aColTable.begin() ; it != m_aColTable.end(); ++it) if ((*it).second == rColor) { SAL_INFO("sw.rtf", OSL_THIS_FUNC << " returning " << (*it).first << " (" << rColor.GetRed() << "," << rColor.GetGreen() << "," << rColor.GetBlue() << ")"); return (*it).first; } - OSL_FAIL("No such Color in m_aColTbl!"); + OSL_FAIL("No such Color in m_aColTable!"); return 0; } @@ -913,7 +913,7 @@ void RtfExport::InsColor(const Color& rCol) { sal_uInt16 n; bool bAutoColorInTable = false; - for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it) + for (RtfColorTable::iterator it=m_aColTable.begin() ; it != m_aColTable.end(); ++it) if ((*it).second == rCol) return; // Already in the table else if ((*it).second == COL_AUTO) @@ -924,12 +924,12 @@ void RtfExport::InsColor(const Color& rCol) else { // other colors get values >0 - n = m_aColTbl.size(); + n = m_aColTable.size(); if (!bAutoColorInTable) // reserve value "0" for COL_AUTO (if COL_AUTO wasn't inserted until now) n++; } - m_aColTbl.insert(std::pair<sal_uInt16,Color>(n, rCol)); + m_aColTable.insert(std::pair<sal_uInt16,Color>(n, rCol)); } void RtfExport::InsColorLine(const SvxBoxItem& rBox) @@ -1081,9 +1081,9 @@ void RtfExport::OutColorTable() InsColor(pItem->GetColorValue()); } - for (size_t n = 0; n < m_aColTbl.size(); ++n) + for (size_t n = 0; n < m_aColTable.size(); ++n) { - const Color& rCol = m_aColTbl[ n ]; + const Color& rCol = m_aColTable[ n ]; if (n || COL_AUTO != rCol.GetColor()) { Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_RED); @@ -1097,33 +1097,33 @@ void RtfExport::OutColorTable() void RtfExport::InsStyle(sal_uInt16 nId, const OString& rStyle) { - m_aStyTbl.insert(std::pair<sal_uInt16,OString>(nId, rStyle)); + m_aStyTable.insert(std::pair<sal_uInt16,OString>(nId, rStyle)); } OString* RtfExport::GetStyle(sal_uInt16 nId) { - std::map<sal_uInt16,OString>::iterator i = m_aStyTbl.find(nId); - if (i != m_aStyTbl.end()) + std::map<sal_uInt16,OString>::iterator i = m_aStyTable.find(nId); + if (i != m_aStyTable.end()) return &i->second; return NULL; } sal_uInt16 RtfExport::GetRedline(const OUString& rAuthor) { - std::map<OUString,sal_uInt16>::iterator i = m_aRedlineTbl.find(rAuthor); - if (i != m_aRedlineTbl.end()) + std::map<OUString,sal_uInt16>::iterator i = m_aRedlineTable.find(rAuthor); + if (i != m_aRedlineTable.end()) return i->second; else { - int nId = m_aRedlineTbl.size(); - m_aRedlineTbl.insert(std::pair<OUString,sal_uInt16>(rAuthor,nId)); + int nId = m_aRedlineTable.size(); + m_aRedlineTable.insert(std::pair<OUString,sal_uInt16>(rAuthor,nId)); return nId; } } const OUString* RtfExport::GetRedline(sal_uInt16 nId) { - for (std::map<OUString,sal_uInt16>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) + for (std::map<OUString,sal_uInt16>::iterator aIter = m_aRedlineTable.begin(); aIter != m_aRedlineTable.end(); ++aIter) if ((*aIter).second == nId) return &(*aIter).first; return NULL; @@ -1150,9 +1150,9 @@ void RtfExport::OutPageDescription(const SwPageDesc& rPgDsc, bool bWriteReset, b if (m_pAktPageDesc->GetLandscape()) Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LNDSCPSXN); - const SwFmt* pFmt = &m_pAktPageDesc->GetMaster(); //GetLeft(); + const SwFormat* pFormat = &m_pAktPageDesc->GetMaster(); //GetLeft(); m_bOutPageDescs = true; - OutputFormat(*pFmt, true, false); + OutputFormat(*pFormat, true, false); m_bOutPageDescs = false; // normal header / footer (without a style) @@ -1188,13 +1188,13 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) { if (bHeader) { - const SwFmtHeader& rHeader = static_cast<const SwFmtHeader&>(rItem); + const SwFormatHeader& rHeader = static_cast<const SwFormatHeader&>(rItem); if (!rHeader.IsActive()) return; } else { - const SwFmtFooter& rFooter = static_cast<const SwFmtFooter&>(rItem); + const SwFormatFooter& rFooter = static_cast<const SwFormatFooter&>(rItem); if (!rFooter.IsActive()) return; } @@ -1215,11 +1215,11 @@ void RtfExport::WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader) SAL_INFO("sw.rtf", OSL_THIS_FUNC << " end"); } -void RtfExport::WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr, bool bTitlepg) +void RtfExport::WriteHeaderFooter(const SwFrameFormat& rFormat, bool bHeader, const sal_Char* pStr, bool bTitlepg) { SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start"); - m_pAttrOutput->WriteHeaderFooter_Impl(rFmt, bHeader, pStr, bTitlepg); + m_pAttrOutput->WriteHeaderFooter_Impl(rFormat, bHeader, pStr, bTitlepg); SAL_INFO("sw.rtf", OSL_THIS_FUNC << " end"); } diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 7d2f065be266..866d0e155bee 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -26,11 +26,11 @@ class RtfAttributeOutput; class RtfExportFilter; class RtfSdrExport; -typedef std::map<sal_uInt16,Color> RtfColorTbl; -typedef std::map<sal_uInt16,OString> RtfStyleTbl; -typedef std::map<OUString,sal_uInt16> RtfRedlineTbl; +typedef std::map<sal_uInt16,Color> RtfColorTable; +typedef std::map<sal_uInt16,OString> RtfStyleTable; +typedef std::map<OUString,sal_uInt16> RtfRedlineTable; class SwNode; -class SwTxtNode; +class SwTextNode; class SwGrfNode; class SwOLENode; @@ -89,14 +89,14 @@ public: /// Guess the script (asian/western). virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) SAL_OVERRIDE; - virtual void AppendBookmarks(const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) SAL_OVERRIDE; + virtual void AppendBookmarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) SAL_OVERRIDE; virtual void AppendBookmark(const OUString& rName, bool bSkip = false) SAL_OVERRIDE; - virtual void AppendAnnotationMarks(const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) SAL_OVERRIDE; + virtual void AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) SAL_OVERRIDE; //For i120928,add an interface to export graphic of bullet - virtual void ExportGrfBullet(const SwTxtNode& rNd) SAL_OVERRIDE; + virtual void ExportGrfBullet(const SwTextNode& rNd) SAL_OVERRIDE; virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/) SAL_OVERRIDE { /* no-op for rtf, most probably should not even be in MSWordExportBase */ } virtual void WriteChar(sal_Unicode) SAL_OVERRIDE; @@ -109,11 +109,11 @@ public: /// Output the actual headers and footers. virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode) SAL_OVERRIDE; + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode) SAL_OVERRIDE; /// Write the field - virtual void OutputField(const SwField* pFld, ww::eField eFldType, - const OUString& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL) SAL_OVERRIDE; + virtual void OutputField(const SwField* pField, ww::eField eFieldType, + const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL) SAL_OVERRIDE; /// Write the data of the form field virtual void WriteFormData(const ::sw::mark::IFieldmark& rFieldmark) SAL_OVERRIDE; @@ -125,7 +125,7 @@ public: const OUString& rSelected, css::uno::Sequence<OUString>& rListItems) SAL_OVERRIDE; - virtual void DoFormText(const SwInputField* pFld) SAL_OVERRIDE; + virtual void DoFormText(const SwInputField* pField) SAL_OVERRIDE; virtual sal_uLong ReplaceCr(sal_uInt8 nChar) SAL_OVERRIDE; @@ -133,19 +133,19 @@ protected: /// Format-dependent part of the actual export. virtual void ExportDocument_Impl() SAL_OVERRIDE; - virtual void SectionBreaksAndFrames(const SwTxtNode& /*rNode*/) SAL_OVERRIDE {} + virtual void SectionBreaksAndFrames(const SwTextNode& /*rNode*/) SAL_OVERRIDE {} /// Get ready for a new section. virtual void PrepareNewPageDesc(const SfxItemSet* pSet, const SwNode& rNd, - const SwFmtPageDesc* pNewPgDescFmt = 0, + const SwFormatPageDesc* pNewPgDescFormat = 0, const SwPageDesc* pNewPgDesc = 0) SAL_OVERRIDE; /// Return value indicates if an inherited outline numbering is suppressed. - virtual bool DisallowInheritingOutlineNumbering(const SwFmt& rFmt) SAL_OVERRIDE; + virtual bool DisallowInheritingOutlineNumbering(const SwFormat& rFormat) SAL_OVERRIDE; - /// Output SwTxtNode is depending on outline export mode - virtual void OutputTextNode(const SwTxtNode&) SAL_OVERRIDE; + /// Output SwTextNode is depending on outline export mode + virtual void OutputTextNode(const SwTextNode&) SAL_OVERRIDE; /// Output SwGrfNode virtual void OutputGrfNode(const SwGrfNode&) SAL_OVERRIDE; @@ -155,7 +155,7 @@ protected: virtual void OutputLinkedOLE(const OUString&) SAL_OVERRIDE; - virtual void AppendSection(const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum) SAL_OVERRIDE; + virtual void AppendSection(const SwPageDesc* pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum) SAL_OVERRIDE; public: /// Pass the pDocument, pCurrentPam and pOriginalPam to the base class. @@ -170,7 +170,7 @@ public: rtl_TextEncoding eCurrentEncoding; /// This is used by OutputFlyFrame_Impl() to control the written syntax bool bRTFFlySyntax; - /// Index of the current SwTxtNode, if any. + /// Index of the current SwTextNode, if any. sal_uLong m_nCurrentNodeIndex; SvStream& Strm(); @@ -211,11 +211,11 @@ private: /// This is necessary to have the numbering table ready before the main text is being processed. void BuildNumbering(); void WriteHeaderFooter(const SfxPoolItem& rItem, bool bHeader); - void WriteHeaderFooter(const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr, bool bTitlepg = false); + void WriteHeaderFooter(const SwFrameFormat& rFormat, bool bHeader, const sal_Char* pStr, bool bTitlepg = false); - RtfColorTbl m_aColTbl; - RtfStyleTbl m_aStyTbl; - RtfRedlineTbl m_aRedlineTbl; + RtfColorTable m_aColTable; + RtfStyleTable m_aStyTable; + RtfRedlineTable m_aRedlineTable; /// If set, then Strm() returns this tream, instead of m_pWriter's stream. std::unique_ptr<SvMemoryStream> m_pStream; }; diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 91923e3a3202..43f61ddef9ea 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -48,13 +48,13 @@ sal_Bool RtfExportFilter::filter(const uno::Sequence< beans::PropertyValue >& aD // get SwDoc* uno::Reference< uno::XInterface > xIfc(m_xSrcDoc, uno::UNO_QUERY); - SwXTextDocument* pTxtDoc = dynamic_cast< SwXTextDocument* >(xIfc.get()); - if (!pTxtDoc) + SwXTextDocument* pTextDoc = dynamic_cast< SwXTextDocument* >(xIfc.get()); + if (!pTextDoc) { return sal_False; } - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); if (!pDoc) { return sal_False; diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index eeee50a409df..da441f5d5e8c 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -496,15 +496,15 @@ sal_Int32 RtfSdrExport::StartShape() lcl_AppendSP(m_rAttrOutput.RunText(), "wzName", msfilter::rtfutil::OutString(m_pSdrObject->GetTitle(), m_rExport.eCurrentEncoding)); // now check if we have some text - const SwFrmFmt* pShape = FindFrmFmt(m_pSdrObject); + const SwFrameFormat* pShape = FindFrameFormat(m_pSdrObject); if (pShape) { - if (SwFrmFmt* pTextBox = SwTextBoxHelper::findTextBox(pShape)) + if (SwFrameFormat* pTextBox = SwTextBoxHelper::findTextBox(pShape)) { sw::Frame* pFrame = 0; for (sw::FrameIter it = m_rExport.m_aFrames.begin(); it != m_rExport.m_aFrames.end(); ++it) { - if (pTextBox == &it->GetFrmFmt()) + if (pTextBox == &it->GetFrameFormat()) { pFrame = &(*it); break; @@ -517,8 +517,8 @@ sal_Int32 RtfSdrExport::StartShape() } } - const SdrTextObj* pTxtObj = dynamic_cast<const SdrTextObj*>(m_pSdrObject); - if (pTxtObj) + const SdrTextObj* pTextObj = dynamic_cast<const SdrTextObj*>(m_pSdrObject); + if (pTextObj) { const OutlinerParaObject* pParaObj = 0; std::unique_ptr<const OutlinerParaObject> pOwnedParaObj; @@ -528,14 +528,14 @@ sal_Int32 RtfSdrExport::StartShape() When the object is actively being edited, that text is not set into the objects normal text object, but lives in a separate object. */ - if (pTxtObj->IsTextEditActive()) + if (pTextObj->IsTextEditActive()) { - pOwnedParaObj.reset(pTxtObj->GetEditOutlinerParaObject()); + pOwnedParaObj.reset(pTextObj->GetEditOutlinerParaObject()); pParaObj = pOwnedParaObj.get(); } else { - pParaObj = pTxtObj->GetOutlinerParaObject(); + pParaObj = pTextObj->GetOutlinerParaObject(); } if (pParaObj) @@ -579,8 +579,8 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj) aAttrIter.OutAttr(nAktPos); m_rAttrOutput.RunText().append('{').append(m_rAttrOutput.Styles().makeStringAndClear()).append(SAL_NEWLINE_STRING); - bool bTxtAtr = aAttrIter.IsTxtAttr(nAktPos); - if (!bTxtAtr) + bool bTextAtr = aAttrIter.IsTextAttr(nAktPos); + if (!bTextAtr) { OUString aOut(aStr.copy(nAktPos, nNextAttr - nAktPos)); m_rAttrOutput.RunText().append(msfilter::rtfutil::OutString(aOut, eChrSet)); @@ -614,9 +614,9 @@ sal_uInt32 RtfSdrExport::AddSdrObject(const SdrObject& rObj) return EscherEx::AddSdrObject(rObj); } -bool RtfSdrExport::isTextBox(const SwFrmFmt& rFrmFmt) +bool RtfSdrExport::isTextBox(const SwFrameFormat& rFrameFormat) { - return m_aTextBoxes.find(&rFrmFmt) != m_aTextBoxes.end(); + return m_aTextBoxes.find(&rFrameFormat) != m_aTextBoxes.end(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx index 59395647b9b7..0f12cb0c9259 100644 --- a/sw/source/filter/ww8/rtfsdrexport.hxx +++ b/sw/source/filter/ww8/rtfsdrexport.hxx @@ -29,7 +29,7 @@ class RtfExport; class RtfAttributeOutput; -class SwFrmFmt; +class SwFrameFormat; /// Handles export of drawings using RTF markup class RtfSdrExport : public EscherEx @@ -55,7 +55,7 @@ class RtfSdrExport : public EscherEx bool* m_pShapeTypeWritten; /// List of TextBoxes in this document: they are exported as part of their shape, never alone. - std::set<const SwFrmFmt*> m_aTextBoxes; + std::set<const SwFrameFormat*> m_aTextBoxes; public: RtfSdrExport(RtfExport& rExport); @@ -67,7 +67,7 @@ public: sal_uInt32 AddSdrObject(const SdrObject& rObj); /// Is this a standalone TextFrame, or used as a TextBox of a shape? - bool isTextBox(const SwFrmFmt& rFrmFmt); + bool isTextBox(const SwFrameFormat& rFrameFormat); protected: /// Start the shape for which we just collected the information. diff --git a/sw/source/filter/ww8/rtfstringbuffer.cxx b/sw/source/filter/ww8/rtfstringbuffer.cxx index aa7db28a1e08..44f0340b38c4 100644 --- a/sw/source/filter/ww8/rtfstringbuffer.cxx +++ b/sw/source/filter/ww8/rtfstringbuffer.cxx @@ -11,14 +11,14 @@ RtfStringBufferValue::RtfStringBufferValue() : m_aBuffer(), - m_pFlyFrmFmt(0), + m_pFlyFrameFormat(0), m_pGrfNode(0) { } -RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode) +RtfStringBufferValue::RtfStringBufferValue(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode) : m_aBuffer(), - m_pFlyFrmFmt(pFlyFrmFmt), + m_pFlyFrameFormat(pFlyFrameFormat), m_pGrfNode(pGrfNode) { } @@ -28,7 +28,7 @@ void RtfStringBufferValue::makeStringAndClear(RtfAttributeOutput* pAttributeOutp if (!isGraphic()) pAttributeOutput->m_rExport.Strm().WriteCharPtr(m_aBuffer.makeStringAndClear().getStr()); else - pAttributeOutput->FlyFrameGraphic(m_pFlyFrmFmt, m_pGrfNode); + pAttributeOutput->FlyFrameGraphic(m_pFlyFrameFormat, m_pGrfNode); } OString RtfStringBufferValue::makeStringAndClear() @@ -38,7 +38,7 @@ OString RtfStringBufferValue::makeStringAndClear() bool RtfStringBufferValue::isGraphic() const { - return m_pFlyFrmFmt != 0 && m_pGrfNode != 0; + return m_pFlyFrameFormat != 0 && m_pGrfNode != 0; } RtfStringBuffer::RtfStringBuffer() @@ -87,9 +87,9 @@ void RtfStringBuffer::clear() m_aValues.clear(); } -void RtfStringBuffer::append(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode) +void RtfStringBuffer::append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode) { - m_aValues.push_back(RtfStringBufferValue(pFlyFrmFmt, pGrfNode)); + m_aValues.push_back(RtfStringBufferValue(pFlyFrameFormat, pGrfNode)); } void RtfStringBuffer::appendAndClear(RtfStringBuffer& rBuf) diff --git a/sw/source/filter/ww8/rtfstringbuffer.hxx b/sw/source/filter/ww8/rtfstringbuffer.hxx index fbf4423fb11d..f917347d8872 100644 --- a/sw/source/filter/ww8/rtfstringbuffer.hxx +++ b/sw/source/filter/ww8/rtfstringbuffer.hxx @@ -13,7 +13,7 @@ #include <vector> class SwGrfNode; -class SwFlyFrmFmt; +class SwFlyFrameFormat; class RtfAttributeOutput; /// Contains a buffered string or graphic during RTF export. @@ -23,7 +23,7 @@ public: /// Constructor for a string buffering. RtfStringBufferValue(); /// Constructor for graphic buffering. - RtfStringBufferValue(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode); + RtfStringBufferValue(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode); /// This version handles graphics. void makeStringAndClear(RtfAttributeOutput* pAttributeOutput); /// This one doesn't. @@ -31,7 +31,7 @@ public: bool isGraphic() const; OStringBuffer m_aBuffer; - const SwFlyFrmFmt* m_pFlyFrmFmt; + const SwFlyFrameFormat* m_pFlyFrameFormat; const SwGrfNode* m_pGrfNode; }; @@ -52,7 +52,7 @@ public: /// Similar to ->setLength(0), but for all buffers. void clear(); /// Same as ->append(), but for graphics and without expanding contents to save memory. - void append(const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode); + void append(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode); /// Append all contained buffers and clear the argument. void appendAndClear(RtfStringBuffer& rBuf); private: diff --git a/sw/source/filter/ww8/sprmids.hxx b/sw/source/filter/ww8/sprmids.hxx index 3e1d3a231295..dcc55e642deb 100644 --- a/sw/source/filter/ww8/sprmids.hxx +++ b/sw/source/filter/ww8/sprmids.hxx @@ -97,7 +97,7 @@ const sal_uInt16 LN_PFUsePgsuSettings = 0x2447; const sal_uInt16 LN_PFAdjustRight = 0x2448; const sal_uInt16 LN_CFRMarkDel = 0x0800; const sal_uInt16 LN_CFRMark = 0x0801; -const sal_uInt16 LN_CFFldVanish = 0x0802; +const sal_uInt16 LN_CFFieldVanish = 0x0802; const sal_uInt16 LN_CPicLocation = 0x6a03; const sal_uInt16 LN_CIbstRMark = 0x4804; const sal_uInt16 LN_CDttmRMark = 0x6805; @@ -165,7 +165,7 @@ const sal_uInt16 LN_CFtcBi = 0x4a5e; const sal_uInt16 LN_CLidBi = 0x485f; const sal_uInt16 LN_CIcoBi = 0x4a60; const sal_uInt16 LN_CHpsBi = 0x4a61; -const sal_uInt16 LN_CDispFldRMark = 0xca62; +const sal_uInt16 LN_CDispFieldRMark = 0xca62; const sal_uInt16 LN_CIbstRMarkDel = 0x4863; const sal_uInt16 LN_CDttmRMarkDel = 0x6864; const sal_uInt16 LN_CBrc80 = 0x6865; diff --git a/sw/source/filter/ww8/styles.cxx b/sw/source/filter/ww8/styles.cxx index a837f0350cfd..2297c1bd490f 100644 --- a/sw/source/filter/ww8/styles.cxx +++ b/sw/source/filter/ww8/styles.cxx @@ -144,7 +144,7 @@ namespace ww { switch (eSti) { - case stiFtnRef: + case stiFootnoteRef: case stiAtnRef: case stiLnn: case stiPgn: @@ -170,7 +170,7 @@ namespace ww stiToc5, stiToc4, stiToc3, stiToc2, stiToc1, stiIndex7, stiIndex6, stiIndex5, stiIndex4, stiIndex3, stiIndex2, stiIndex1, stiLnn, stiIndexHeading, stiFooter, stiHeader, - stiFtnRef, stiFtnText, stiLev9, stiLev8, stiLev7, stiLev6, + stiFootnoteRef, stiFootnoteText, stiLev9, stiLev8, stiLev7, stiLev6, stiLev5, stiLev4, stiLev3, stiLev2, stiLev1, stiNormIndent }; return aMapping[stc-222]; diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index c2ff78d49758..9a0846612ba0 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -74,12 +74,12 @@ namespace } // #i98791# - adjust sorting - // Utility to sort SwTxtFmtColl's by their assigned outline style list level + // Utility to sort SwTextFormatColl's by their assigned outline style list level class outlinecmp : public - std::binary_function<const SwTxtFmtColl*, const SwTxtFmtColl*, bool> + std::binary_function<const SwTextFormatColl*, const SwTextFormatColl*, bool> { public: - bool operator()(const SwTxtFmtColl *pA, const SwTxtFmtColl *pB) const + bool operator()(const SwTextFormatColl *pA, const SwTextFormatColl *pB) const { // #i98791# bool bResult( false ); @@ -122,9 +122,9 @@ namespace for(SwPosFlyFrms::const_iterator aIter(rFlys.begin()); aIter != rFlys.end(); ++aIter) { - const SwFrmFmt &rEntry = (*aIter)->GetFmt(); + const SwFrameFormat &rEntry = (*aIter)->GetFormat(); - if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor()) + if (const SwPosition* pAnchor = rEntry.GetAnchor().GetContentAnchor()) { aRet.push_back(sw::Frame(rEntry, *pAnchor)); } @@ -132,9 +132,9 @@ namespace { SwPosition aPos((*aIter)->GetNdIndex()); - if (SwTxtNode* pTxtNd = aPos.nNode.GetNode().GetTxtNode()) + if (SwTextNode* pTextNd = aPos.nNode.GetNode().GetTextNode()) { - aPos.nContent.Assign(pTxtNd, 0); + aPos.nContent.Assign(pTextNd, 0); } aRet.push_back(sw::Frame(rEntry, aPos)); @@ -185,35 +185,35 @@ namespace sw maLayoutSize = maSize; } - Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos) - : mpFlyFrm(&rFmt) + Frame::Frame(const SwFrameFormat &rFormat, const SwPosition &rPos) + : mpFlyFrm(&rFormat) , maPos(rPos) , maSize() , maLayoutSize() // #i43447# - , meWriterType(eTxtBox) + , meWriterType(eTextBox) , mpStartFrameContent(0) // #i43447# - move to initialization list - , mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) + , mbIsInline( (rFormat.GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) // #i120928# - handle graphic of bullet within existing implementation , mbForBullet(false) , maGrf() { - switch (rFmt.Which()) + switch (rFormat.Which()) { case RES_FLYFRMFMT: - if (const SwNodeIndex* pIdx = rFmt.GetCntnt().GetCntntIdx()) + if (const SwNodeIndex* pIdx = rFormat.GetContent().GetContentIdx()) { SwNodeIndex aIdx(*pIdx, 1); const SwNode &rNd = aIdx.GetNode(); // #i43447# - determine layout size { - SwRect aLayRect( rFmt.FindLayoutRect() ); + SwRect aLayRect( rFormat.FindLayoutRect() ); Rectangle aRect( aLayRect.SVRect() ); // The Object is not rendered (e.g. something in unused // header/footer) - thus, get the values from the format. if ( aLayRect.IsEmpty() ) { - aRect.SetSize( rFmt.GetFrmSize().GetSize() ); + aRect.SetSize( rFormat.GetFrmSize().GetSize() ); } maLayoutSize = aRect.GetSize(); } @@ -221,14 +221,14 @@ namespace sw { case ND_GRFNODE: meWriterType = eGraphic; - maSize = rNd.GetNoTxtNode()->GetTwipSize(); + maSize = rNd.GetNoTextNode()->GetTwipSize(); break; case ND_OLENODE: meWriterType = eOle; - maSize = rNd.GetNoTxtNode()->GetTwipSize(); + maSize = rNd.GetNoTextNode()->GetTwipSize(); break; default: - meWriterType = eTxtBox; + meWriterType = eTextBox; // #i43447# - Size equals layout size for text boxes maSize = maLayoutSize; break; @@ -238,11 +238,11 @@ namespace sw else { OSL_ENSURE(false, "Impossible"); - meWriterType = eTxtBox; + meWriterType = eTextBox; } break; default: - if (const SdrObject* pObj = rFmt.FindRealSdrObject()) + if (const SdrObject* pObj = rFormat.FindRealSdrObject()) { if (pObj->GetObjInventor() == FmFormInventor) meWriterType = eFormControl; @@ -448,13 +448,13 @@ namespace sw return 0; } - void ClearOverridesFromSet(const SwFmtCharFmt &rFmt, SfxItemSet &rSet) + void ClearOverridesFromSet(const SwFormatCharFormat &rFormat, SfxItemSet &rSet) { - if (const SwCharFmt* pCharFmt = rFmt.GetCharFmt()) + if (const SwCharFormat* pCharFormat = rFormat.GetCharFormat()) { - if (pCharFmt->GetAttrSet().Count()) + if (pCharFormat->GetAttrSet().Count()) { - SfxItemIter aIter(pCharFmt->GetAttrSet()); + SfxItemIter aIter(pCharFormat->GetAttrSet()); const SfxPoolItem *pItem = aIter.GetCurItem(); do rSet.ClearItem(pItem->Which()); @@ -468,7 +468,7 @@ namespace sw ParaStyles aStyles; typedef ParaStyles::size_type mysizet; - const SwTxtFmtColls *pColls = rDoc.GetTxtFmtColls(); + const SwTextFormatColls *pColls = rDoc.GetTextFormatColls(); mysizet nCount = pColls ? pColls->size() : 0; aStyles.reserve(nCount); for (mysizet nI = 0; nI < nCount; ++nI) @@ -476,33 +476,33 @@ namespace sw return aStyles; } - SwTxtFmtColl* GetParaStyle(SwDoc &rDoc, const OUString& rName) + SwTextFormatColl* GetParaStyle(SwDoc &rDoc, const OUString& rName) { // Search first in the Doc-Styles - SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName(rName); + SwTextFormatColl* pColl = rDoc.FindTextFormatCollByName(rName); if (!pColl) { // Collection not found, try in Pool ? sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL); if (n != SAL_MAX_UINT16) // found or standard - pColl = rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool(n, false); + pColl = rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(n, false); } return pColl; } - SwCharFmt* GetCharStyle(SwDoc &rDoc, const OUString& rName) + SwCharFormat* GetCharStyle(SwDoc &rDoc, const OUString& rName) { - SwCharFmt *pFmt = rDoc.FindCharFmtByName(rName); - if (!pFmt) + SwCharFormat *pFormat = rDoc.FindCharFormatByName(rName); + if (!pFormat) { // Collection not found, try in Pool ? sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(rName, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT); if (n != SAL_MAX_UINT16) // found or standard - pFmt = rDoc.getIDocumentStylePoolAccess().GetCharFmtFromPool(n); + pFormat = rDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool(n); } - return pFmt; + return pFormat; } // #i98791# - adjust sorting algorithm @@ -517,7 +517,7 @@ namespace sw */ Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM /*, bool bAll*/) { - SwPosFlyFrms aFlys(rDoc.GetAllFlyFmts(pPaM, true)); + SwPosFlyFrms aFlys(rDoc.GetAllFlyFormats(pPaM, true)); sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys)); return aRet; } @@ -530,7 +530,7 @@ namespace sw return aRet; } - const SwNumFmt* GetNumFmtFromSwNumRuleLevel(const SwNumRule &rRule, + const SwNumFormat* GetNumFormatFromSwNumRuleLevel(const SwNumRule &rRule, int nLevel) { if (nLevel < 0 || nLevel >= MAXLEVEL) @@ -541,46 +541,46 @@ namespace sw return &(rRule.Get( static_cast< sal_uInt16 >(nLevel) )); } - const SwNumFmt* GetNumFmtFromTxtNode(const SwTxtNode &rTxtNode) + const SwNumFormat* GetNumFormatFromTextNode(const SwTextNode &rTextNode) { const SwNumRule *pRule = 0; if ( - rTxtNode.IsNumbered() && rTxtNode.IsCountedInList() && - 0 != (pRule = rTxtNode.GetNumRule()) + rTextNode.IsNumbered() && rTextNode.IsCountedInList() && + 0 != (pRule = rTextNode.GetNumRule()) ) { - return GetNumFmtFromSwNumRuleLevel(*pRule, - rTxtNode.GetActualListLevel()); + return GetNumFormatFromSwNumRuleLevel(*pRule, + rTextNode.GetActualListLevel()); } - OSL_ENSURE(rTxtNode.GetDoc(), "No document for node?, suspicious"); - if (!rTxtNode.GetDoc()) + OSL_ENSURE(rTextNode.GetDoc(), "No document for node?, suspicious"); + if (!rTextNode.GetDoc()) return 0; if ( - rTxtNode.IsNumbered() && rTxtNode.IsCountedInList() && - 0 != (pRule = rTxtNode.GetDoc()->GetOutlineNumRule()) + rTextNode.IsNumbered() && rTextNode.IsCountedInList() && + 0 != (pRule = rTextNode.GetDoc()->GetOutlineNumRule()) ) { - return GetNumFmtFromSwNumRuleLevel(*pRule, - rTxtNode.GetActualListLevel()); + return GetNumFormatFromSwNumRuleLevel(*pRule, + rTextNode.GetActualListLevel()); } return 0; } - const SwNumRule* GetNumRuleFromTxtNode(const SwTxtNode &rTxtNode) + const SwNumRule* GetNumRuleFromTextNode(const SwTextNode &rTextNode) { - return GetNormalNumRuleFromTxtNode(rTxtNode); + return GetNormalNumRuleFromTextNode(rTextNode); } - const SwNumRule* GetNormalNumRuleFromTxtNode(const SwTxtNode &rTxtNode) + const SwNumRule* GetNormalNumRuleFromTextNode(const SwTextNode &rTextNode) { const SwNumRule *pRule = 0; if ( - rTxtNode.IsNumbered() && rTxtNode.IsCountedInList() && - 0 != (pRule = rTxtNode.GetNumRule()) + rTextNode.IsNumbered() && rTextNode.IsCountedInList() && + 0 != (pRule = rTextNode.GetNumRule()) ) { return pRule; @@ -588,29 +588,29 @@ namespace sw return 0; } - SwNoTxtNode *GetNoTxtNodeFromSwFrmFmt(const SwFrmFmt &rFmt) + SwNoTextNode *GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat) { - const SwNodeIndex *pIndex = rFmt.GetCntnt().GetCntntIdx(); - OSL_ENSURE(pIndex, "No NodeIndex in SwFrmFmt ?, suspicious"); + const SwNodeIndex *pIndex = rFormat.GetContent().GetContentIdx(); + OSL_ENSURE(pIndex, "No NodeIndex in SwFrameFormat ?, suspicious"); if (!pIndex) return 0; SwNodeIndex aIdx(*pIndex, 1); - return aIdx.GetNode().GetNoTxtNode(); + return aIdx.GetNode().GetNoTextNode(); } bool HasPageBreak(const SwNode &rNd) { - const SvxFmtBreakItem *pBreak = 0; + const SvxFormatBreakItem *pBreak = 0; if (rNd.IsTableNode() && rNd.GetTableNode()) { const SwTable& rTable = rNd.GetTableNode()->GetTable(); - const SwFrmFmt* pApply = rTable.GetFrmFmt(); + const SwFrameFormat* pApply = rTable.GetFrameFormat(); OSL_ENSURE(pApply, "impossible"); if (pApply) - pBreak = &(ItemGet<SvxFmtBreakItem>(*pApply, RES_BREAK)); + pBreak = &(ItemGet<SvxFormatBreakItem>(*pApply, RES_BREAK)); } - else if (const SwCntntNode *pNd = rNd.GetCntntNode()) - pBreak = &(ItemGet<SvxFmtBreakItem>(*pNd, RES_BREAK)); + else if (const SwContentNode *pNd = rNd.GetContentNode()) + pBreak = &(ItemGet<SvxFormatBreakItem>(*pNd, RES_BREAK)); if (pBreak && pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE) return true; @@ -660,7 +660,7 @@ namespace sw } } - Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd) + Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd) { Polygon aPoly(PolygonFromPolyPolygon(rPolyPoly)); const Size &rOrigSize = pNd->GetGraphic().GetPrefSize(); @@ -821,12 +821,12 @@ namespace sw { } - void InsertedTablesManager::DelAndMakeTblFrms() + void InsertedTablesManager::DelAndMakeTableFrms() { if (!mbHasRoot) return; - TblMapIter aEnd = maTables.end(); - for (TblMapIter aIter = maTables.begin(); aIter != aEnd; ++aIter) + TableMapIter aEnd = maTables.end(); + for (TableMapIter aIter = maTables.begin(); aIter != aEnd; ++aIter) { // exitiert schon ein Layout, dann muss an dieser Tabelle die BoxFrames // neu erzeugt @@ -834,9 +834,9 @@ namespace sw OSL_ENSURE(pTable, "Why no expected table"); if (pTable) { - SwFrmFmt * pFrmFmt = pTable->GetTable().GetFrmFmt(); + SwFrameFormat * pFrameFormat = pTable->GetTable().GetFrameFormat(); - if (pFrmFmt != NULL) + if (pFrameFormat != NULL) { SwNodeIndex *pIndex = aIter->second; pTable->DelFrms(); @@ -855,7 +855,7 @@ namespace sw InsertedTableClient * pClient = new InsertedTableClient(rTableNode); - maTables.insert(TblMap::value_type(pClient, &(rPaM.GetPoint()->nNode))); + maTables.insert(TableMap::value_type(pClient, &(rPaM.GetPoint()->nNode))); } } diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index f3865a484b03..dbd033e42ab5 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -35,15 +35,15 @@ #include <tools/poly.hxx> #include <doc.hxx> -class SwTxtFmtColl; -class SwCharFmt; +class SwTextFormatColl; +class SwCharFormat; class SdrObject; class SdrOle2Obj; class OutlinerParaObject; -class SwNumFmt; -class SwTxtNode; -class SwNoTxtNode; -class SwFmtCharFmt; +class SwNumFormat; +class SwTextNode; +class SwNoTextNode; +class SwFormatCharFormat; class Graphic; class SwDoc; class SwNumRule; @@ -63,8 +63,8 @@ namespace sw namespace sw { - /// STL container of Paragraph Styles (SwTxtFmtColl) - typedef std::vector<SwTxtFmtColl *> ParaStyles; + /// STL container of Paragraph Styles (SwTextFormatColl) + typedef std::vector<SwTextFormatColl *> ParaStyles; /// STL iterator for ParaStyles typedef ParaStyles::iterator ParaStyleIter; /// STL container of SfxPoolItems (Attributes) @@ -94,9 +94,9 @@ namespace sw class Frame { public: - enum WriterSource {eTxtBox, eGraphic, eOle, eDrawing, eFormControl,eBulletGrf}; + enum WriterSource {eTextBox, eGraphic, eOle, eDrawing, eFormControl,eBulletGrf}; private: - const SwFrmFmt* mpFlyFrm; + const SwFrameFormat* mpFlyFrm; SwPosition maPos; Size maSize; // #i43447# - Size of the frame in the layout. @@ -110,15 +110,15 @@ namespace sw bool mbForBullet:1; Graphic maGrf; public: - Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos); + Frame(const SwFrameFormat &rFlyFrm, const SwPosition &rPos); Frame(const Graphic&, const SwPosition &); - /** Get the writer SwFrmFmt that this object describes + /** Get the writer SwFrameFormat that this object describes @return - The wrapped SwFrmFmt + The wrapped SwFrameFormat */ - const SwFrmFmt &GetFrmFmt() const { return *mpFlyFrm; } + const SwFrameFormat &GetFrameFormat() const { return *mpFlyFrm; } /** Get the position this frame is anchored at @@ -130,10 +130,10 @@ namespace sw /** Get the node this frame is anchored into @return - The SwTxtNode this frame is anchored inside + The SwTextNode this frame is anchored inside */ - const SwCntntNode *GetCntntNode() const - { return maPos.nNode.GetNode().GetCntntNode(); } + const SwContentNode *GetContentNode() const + { return maPos.nNode.GetNode().GetContentNode(); } /** Get the type of frame that this wraps @@ -265,7 +265,7 @@ namespace sw return static_cast<const T *>(pItem); } - /** Extract a SfxPoolItem derived property from a SwCntntNode + /** Extract a SfxPoolItem derived property from a SwContentNode Writer's attributes are retrieved by passing a numeric identifier and receiving a SfxPoolItem reference which must then typically be @@ -275,7 +275,7 @@ namespace sw retrieved property is of the type that the developer thinks it is. @param rNode - The SwCntntNode to retrieve the property from + The SwContentNode to retrieve the property from @param eType The numeric identifier of the property to be retrieved @@ -290,13 +290,13 @@ namespace sw @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - template<class T> const T & ItemGet(const SwCntntNode &rNode, + template<class T> const T & ItemGet(const SwContentNode &rNode, sal_uInt16 eType) throw(std::bad_cast) { return item_cast<T>(rNode.GetAttr(eType)); } - /** Extract a SfxPoolItem derived property from a SwFmt + /** Extract a SfxPoolItem derived property from a SwFormat Writer's attributes are retrieved by passing a numeric identifier and receiving a SfxPoolItem reference which must then typically be @@ -305,8 +305,8 @@ namespace sw ItemGet uses item_cast () on the retrieved reference to test that the retrieved property is of the type that the developer thinks it is. - @param rFmt - The SwFmt to retrieve the property from + @param rFormat + The SwFormat to retrieve the property from @param eType The numeric identifier of the property to be retrieved @@ -319,10 +319,10 @@ namespace sw @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - template<class T> const T & ItemGet(const SwFmt &rFmt, + template<class T> const T & ItemGet(const SwFormat &rFormat, sal_uInt16 eType) throw(std::bad_cast, css::uno::RuntimeException) { - return item_cast<T>(rFmt.GetFmtAttr(eType)); + return item_cast<T>(rFormat.GetFormatAttr(eType)); } /** Extract a SfxPoolItem derived property from a SfxItemSet @@ -462,20 +462,20 @@ namespace sw } /** Return a pointer to a SfxPoolItem derived class if it exists in an - SwFmt + SwFormat Writer's attributes are retrieved by passing a numeric identifier and receiving a SfxPoolItem reference which must then typically be cast back to its original type which is both tedious and verbose. HasItem returns a pointer to the requested SfxPoolItem for a given - property id if it exists in the SwFmt e.g. fontsize + property id if it exists in the SwFormat e.g. fontsize HasItem uses item_cast () on the retrieved pointer to test that the retrieved property is of the type that the developer thinks it is. @param rSet - The SwFmt whose property we want + The SwFormat whose property we want @param eType The numeric identifier of the default property to be retrieved @@ -488,10 +488,10 @@ namespace sw @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - template<class T> const T* HasItem(const SwFmt &rFmt, + template<class T> const T* HasItem(const SwFormat &rFormat, sal_uInt16 eType) { - return HasItem<T>(rFmt.GetAttrSet(), eType); + return HasItem<T>(rFormat.GetAttrSet(), eType); } /** Get the Paragraph Styles of a SwDoc @@ -526,7 +526,7 @@ namespace sw @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - SwTxtFmtColl* GetParaStyle(SwDoc &rDoc, const OUString& rName); + SwTextFormatColl* GetParaStyle(SwDoc &rDoc, const OUString& rName); /** Get a Character Style which fits a given name @@ -544,7 +544,7 @@ namespace sw @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - SwCharFmt* GetCharStyle(SwDoc &rDoc, const OUString& rName); + SwCharFormat* GetCharStyle(SwDoc &rDoc, const OUString& rName); /** Sort sequence of Paragraph Styles by assigned outline style list level @@ -589,31 +589,31 @@ namespace sw return item_cast<T>(SearchPoolItems(rItems, eType)); } - /** Remove properties from an SfxItemSet which a SwFmtCharFmt overrides + /** Remove properties from an SfxItemSet which a SwFormatCharFormat overrides - Given an SfxItemSet and a SwFmtCharFmt remove from the rSet all the - properties which the SwFmtCharFmt would override. An SfxItemSet - contains attributes, and a SwFmtCharFmt is a "Character Style", + Given an SfxItemSet and a SwFormatCharFormat remove from the rSet all the + properties which the SwFormatCharFormat would override. An SfxItemSet + contains attributes, and a SwFormatCharFormat is a "Character Style", so if the SfxItemSet contains bold and so does the character style then delete bold from the SfxItemSet @param - rFmt the SwFmtCharFmt which describes the Character Style + rFormat the SwFormatCharFormat which describes the Character Style @param rSet the SfxItemSet from which we want to remove any properties - which the rFmt would override + which the rFormat would override @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> @see #i24291# for examples */ - void ClearOverridesFromSet(const SwFmtCharFmt &rFmt, SfxItemSet &rSet); + void ClearOverridesFromSet(const SwFormatCharFormat &rFormat, SfxItemSet &rSet); /** Get the Floating elements in a SwDoc - Writer's FrmFmts may or may not be anchored to some text content, + Writer's FrameFormats may or may not be anchored to some text content, e.g. Page Anchored elements will not be. For the winword export we need them to have something to be anchored to. So this method returns all the floating elements in a document as a STL container @@ -655,20 +655,20 @@ namespace sw There are two differing types of numbering formats that may be on a paragraph, normal and outline. The outline is that numbering you see in tools->outline numbering. Theres no difference in the - numbering itself, just how you get it from the SwTxtNode. Needless + numbering itself, just how you get it from the SwTextNode. Needless to say the filter generally couldn't care less what type of numbering is in use. - @param rTxtNode - The SwTxtNode that is the paragraph + @param rTextNode + The SwTextNode that is the paragraph - @return A SwNumFmt pointer that describes the numbering level + @return A SwNumFormat pointer that describes the numbering level on this paragraph, or 0 if there is none. @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - const SwNumFmt* GetNumFmtFromTxtNode(const SwTxtNode &rTxtNode); + const SwNumFormat* GetNumFormatFromTextNode(const SwTextNode &rTextNode); /** Get the Numbering Format for a given level from a numbering rule @@ -678,37 +678,37 @@ namespace sw @param nLevel The numbering level - @return A SwNumFmt pointer that describes the numbering level + @return A SwNumFormat pointer that describes the numbering level or 0 if the nLevel is out of range @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - const SwNumFmt* GetNumFmtFromSwNumRuleLevel(const SwNumRule &rRule, + const SwNumFormat* GetNumFormatFromSwNumRuleLevel(const SwNumRule &rRule, int nLevel); - const SwNumRule* GetNumRuleFromTxtNode(const SwTxtNode &rTxtNd); - const SwNumRule* GetNormalNumRuleFromTxtNode(const SwTxtNode &rTxtNd); + const SwNumRule* GetNumRuleFromTextNode(const SwTextNode &rTextNd); + const SwNumRule* GetNormalNumRuleFromTextNode(const SwTextNode &rTextNd); - /** Get the SwNoTxtNode associated with a SwFrmFmt if here is one + /** Get the SwNoTextNode associated with a SwFrameFormat if here is one There are two differing types of numbering formats that may be on a paragraph, normal and outline. The outline is that numbering you see in tools->outline numbering. Theres no difference in the - numbering itself, just how you get it from the SwTxtNode. Needless + numbering itself, just how you get it from the SwTextNode. Needless to say the filter generally couldn't care less what type of numbering is in use. - @param rFmt - The SwFrmFmt that may describe a graphic + @param rFormat + The SwFrameFormat that may describe a graphic - @return A SwNoTxtNode pointer that describes the graphic of this + @return A SwNoTextNode pointer that describes the graphic of this frame if there is one, or 0 if there is none. @author <a href="mailto:cmc@openoffice.org">Caolán McNamara</a> */ - SwNoTxtNode *GetNoTxtNodeFromSwFrmFmt(const SwFrmFmt &rFmt); + SwNoTextNode *GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat); /** Does a node have a "page break before" applied @@ -742,7 +742,7 @@ namespace sw Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly); /// Undo all scaling / move tricks of the wrap polygon done during import. - Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTxtNode* pNd); + Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd); /** Make setting a drawing object's layer in a Writer document easy diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 876e2d90ddfb..0fa3905c3174 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -53,7 +53,7 @@ using namespace css; namespace myImplHelpers { - SwTwips CalcHdFtDist(const SwFrmFmt& rFmt, sal_uInt16 nSpacing) + SwTwips CalcHdFtDist(const SwFrameFormat& rFormat, sal_uInt16 nSpacing) { /* The normal case for reexporting word docs is to have dynamic spacing, @@ -66,21 +66,21 @@ namespace myImplHelpers height, which is totally nonoptimum, but the best we can do. */ long nDist=0; - const SwFmtFrmSize& rSz = rFmt.GetFrmSize(); + const SwFormatFrmSize& rSz = rFormat.GetFrmSize(); const SwHeaderAndFooterEatSpacingItem &rSpacingCtrl = sw::util::ItemGet<SwHeaderAndFooterEatSpacingItem> - (rFmt, RES_HEADER_FOOTER_EAT_SPACING); + (rFormat, RES_HEADER_FOOTER_EAT_SPACING); if (rSpacingCtrl.GetValue()) nDist += rSz.GetHeight(); else { - SwRect aRect(rFmt.FindLayoutRect(false)); + SwRect aRect(rFormat.FindLayoutRect(false)); if (aRect.Height()) nDist += aRect.Height(); else { - const SwFmtFrmSize& rSize = rFmt.GetFrmSize(); + const SwFormatFrmSize& rSize = rFormat.GetFrmSize(); if (ATT_VAR_SIZE != rSize.GetHeightSizeType()) nDist += rSize.GetHeight(); else @@ -93,18 +93,18 @@ namespace myImplHelpers return nDist; } - SwTwips CalcHdDist(const SwFrmFmt& rFmt) + SwTwips CalcHdDist(const SwFrameFormat& rFormat) { - return CalcHdFtDist(rFmt, rFmt.GetULSpace().GetUpper()); + return CalcHdFtDist(rFormat, rFormat.GetULSpace().GetUpper()); } - SwTwips CalcFtDist(const SwFrmFmt& rFmt) + SwTwips CalcFtDist(const SwFrameFormat& rFormat) { - return CalcHdFtDist(rFmt, rFmt.GetULSpace().GetLower()); + return CalcHdFtDist(rFormat, rFormat.GetULSpace().GetLower()); } /* - SwTxtFmtColl and SwCharFmt are quite distinct types and how they are + SwTextFormatColl and SwCharFormat are quite distinct types and how they are gotten is also distinct, but the algorithm to match word's eqivalents into them is the same, so we put the different stuff into two separate helper implementations and a core template that uses the helpers that uses the @@ -113,18 +113,18 @@ namespace myImplHelpers to use from a simple argument to the algorithm class */ template <class C> class MapperImpl; - template<> class MapperImpl<SwTxtFmtColl> + template<> class MapperImpl<SwTextFormatColl> { private: SwDoc &mrDoc; public: MapperImpl(SwDoc &rDoc) : mrDoc(rDoc) {} - SwTxtFmtColl* GetBuiltInStyle(ww::sti eSti); - SwTxtFmtColl* GetStyle(const OUString &rName); - SwTxtFmtColl* MakeStyle(const OUString &rName); + SwTextFormatColl* GetBuiltInStyle(ww::sti eSti); + SwTextFormatColl* GetStyle(const OUString &rName); + SwTextFormatColl* MakeStyle(const OUString &rName); }; - SwTxtFmtColl* MapperImpl<SwTxtFmtColl>::GetBuiltInStyle(ww::sti eSti) + SwTextFormatColl* MapperImpl<SwTextFormatColl>::GetBuiltInStyle(ww::sti eSti) { const RES_POOL_COLLFMT_TYPE RES_NONE = RES_POOLCOLL_DOC_END; static const RES_POOL_COLLFMT_TYPE aArr[]= @@ -156,43 +156,43 @@ namespace myImplHelpers OSL_ENSURE(SAL_N_ELEMENTS(aArr) == 75, "Style Array has false size"); - SwTxtFmtColl* pRet = 0; + SwTextFormatColl* pRet = 0; //If this is a built-in word style that has a built-in writer //equivalent, then map it to one of our built in styles regardless //of its name if (sal::static_int_cast< size_t >(eSti) < SAL_N_ELEMENTS(aArr) && aArr[eSti] != RES_NONE) - pRet = mrDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool( static_cast< sal_uInt16 >(aArr[eSti]), false); + pRet = mrDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( static_cast< sal_uInt16 >(aArr[eSti]), false); return pRet; } - SwTxtFmtColl* MapperImpl<SwTxtFmtColl>::GetStyle(const OUString &rName) + SwTextFormatColl* MapperImpl<SwTextFormatColl>::GetStyle(const OUString &rName) { return sw::util::GetParaStyle(mrDoc, rName); } - SwTxtFmtColl* MapperImpl<SwTxtFmtColl>::MakeStyle(const OUString &rName) + SwTextFormatColl* MapperImpl<SwTextFormatColl>::MakeStyle(const OUString &rName) { - return mrDoc.MakeTxtFmtColl(rName, - const_cast<SwTxtFmtColl *>(mrDoc.GetDfltTxtFmtColl())); + return mrDoc.MakeTextFormatColl(rName, + const_cast<SwTextFormatColl *>(mrDoc.GetDfltTextFormatColl())); } - template<> class MapperImpl<SwCharFmt> + template<> class MapperImpl<SwCharFormat> { private: SwDoc &mrDoc; public: MapperImpl(SwDoc &rDoc) : mrDoc(rDoc) {} - SwCharFmt* GetBuiltInStyle(ww::sti eSti); - SwCharFmt* GetStyle(const OUString &rName); - SwCharFmt* MakeStyle(const OUString &rName); + SwCharFormat* GetBuiltInStyle(ww::sti eSti); + SwCharFormat* GetStyle(const OUString &rName); + SwCharFormat* MakeStyle(const OUString &rName); }; - SwCharFmt* MapperImpl<SwCharFmt>::GetBuiltInStyle(ww::sti eSti) + SwCharFormat* MapperImpl<SwCharFormat>::GetBuiltInStyle(ww::sti eSti) { RES_POOL_CHRFMT_TYPE eLookup = RES_POOLCHR_NORMAL_END; switch (eSti) { - case ww::stiFtnRef: + case ww::stiFootnoteRef: eLookup = RES_POOLCHR_FOOTNOTE; break; case ww::stiLnn: @@ -220,20 +220,20 @@ namespace myImplHelpers eLookup = RES_POOLCHR_NORMAL_END; break; } - SwCharFmt *pRet = 0; + SwCharFormat *pRet = 0; if (eLookup != RES_POOLCHR_NORMAL_END) - pRet = mrDoc.getIDocumentStylePoolAccess().GetCharFmtFromPool( static_cast< sal_uInt16 >(eLookup) ); + pRet = mrDoc.getIDocumentStylePoolAccess().GetCharFormatFromPool( static_cast< sal_uInt16 >(eLookup) ); return pRet; } - SwCharFmt* MapperImpl<SwCharFmt>::GetStyle(const OUString &rName) + SwCharFormat* MapperImpl<SwCharFormat>::GetStyle(const OUString &rName) { return sw::util::GetCharStyle(mrDoc, rName); } - SwCharFmt* MapperImpl<SwCharFmt>::MakeStyle(const OUString &rName) + SwCharFormat* MapperImpl<SwCharFormat>::MakeStyle(const OUString &rName) { - return mrDoc.MakeCharFmt(rName, mrDoc.GetDfltCharFmt()); + return mrDoc.MakeCharFormat(rName, mrDoc.GetDfltCharFormat()); } template<class C> class StyleMapperImpl @@ -336,10 +336,10 @@ namespace myImplHelpers } /// Count what Word calls left/right margin from a format's LRSpace + Box. -static SvxLRSpaceItem lcl_getWordLRSpace(const SwFrmFmt& rFmt) +static SvxLRSpaceItem lcl_getWordLRSpace(const SwFrameFormat& rFormat) { - SvxLRSpaceItem aLR(rFmt.GetLRSpace()); - const SvxBoxItem& rBox = rFmt.GetBox(); + SvxLRSpaceItem aLR(rFormat.GetLRSpace()); + const SvxBoxItem& rBox = rFormat.GetBox(); aLR.SetLeft(aLR.GetLeft() + rBox.GetDistance(SvxBoxItemLine::LEFT)); if (const editeng::SvxBorderLine* pLeft = rBox.GetLeft()) @@ -357,18 +357,18 @@ namespace sw namespace util { - bool IsPlausableSingleWordSection(const SwFrmFmt &rTitleFmt, const SwFrmFmt &rFollowFmt) + bool IsPlausableSingleWordSection(const SwFrameFormat &rTitleFormat, const SwFrameFormat &rFollowFormat) { bool bPlausableSingleWordSection = true; - const SwFmtCol& rFirstCols = rTitleFmt.GetCol(); - const SwFmtCol& rFollowCols = rFollowFmt.GetCol(); + const SwFormatCol& rFirstCols = rTitleFormat.GetCol(); + const SwFormatCol& rFollowCols = rFollowFormat.GetCol(); const SwColumns& rFirstColumns = rFirstCols.GetColumns(); const SwColumns& rFollowColumns = rFollowCols.GetColumns(); - SvxLRSpaceItem aOneLR = lcl_getWordLRSpace(rTitleFmt); - SvxLRSpaceItem aTwoLR = lcl_getWordLRSpace(rFollowFmt); - const SwFmtFrmSize& rFirstFrmSize = rTitleFmt.GetFrmSize(); - const SwFmtFrmSize& rFollowFrmSize = rFollowFmt.GetFrmSize(); + SvxLRSpaceItem aOneLR = lcl_getWordLRSpace(rTitleFormat); + SvxLRSpaceItem aTwoLR = lcl_getWordLRSpace(rFollowFormat); + const SwFormatFrmSize& rFirstFrmSize = rTitleFormat.GetFrmSize(); + const SwFormatFrmSize& rFollowFrmSize = rFollowFormat.GetFrmSize(); if (rFirstColumns.size() != rFollowColumns.size()) { @@ -381,8 +381,8 @@ namespace sw bPlausableSingleWordSection = false; else { - HdFtDistanceGlue aOne(rTitleFmt.GetAttrSet()); - HdFtDistanceGlue aTwo(rFollowFmt.GetAttrSet()); + HdFtDistanceGlue aOne(rTitleFormat.GetAttrSet()); + HdFtDistanceGlue aTwo(rFollowFormat.GetAttrSet()); //e.g. #i14509# if (!aOne.StrictEqualTopBottom(aTwo)) bPlausableSingleWordSection = false; @@ -410,20 +410,20 @@ namespace sw dyaTop = dyaHdrTop; dyaBottom = dyaHdrBottom; - const SwFmtHeader *pHd = HasItem<SwFmtHeader>(rPage, RES_HEADER); - if (pHd && pHd->IsActive() && pHd->GetHeaderFmt()) + const SwFormatHeader *pHd = HasItem<SwFormatHeader>(rPage, RES_HEADER); + if (pHd && pHd->IsActive() && pHd->GetHeaderFormat()) { mbHasHeader = true; - dyaTop = dyaTop + static_cast< sal_uInt16 >( (myImplHelpers::CalcHdDist(*(pHd->GetHeaderFmt()))) ); + dyaTop = dyaTop + static_cast< sal_uInt16 >( (myImplHelpers::CalcHdDist(*(pHd->GetHeaderFormat()))) ); } else mbHasHeader = false; - const SwFmtFooter *pFt = HasItem<SwFmtFooter>(rPage, RES_FOOTER); - if (pFt && pFt->IsActive() && pFt->GetFooterFmt()) + const SwFormatFooter *pFt = HasItem<SwFormatFooter>(rPage, RES_FOOTER); + if (pFt && pFt->IsActive() && pFt->GetFooterFormat()) { mbHasFooter = true; - dyaBottom = dyaBottom + static_cast< sal_uInt16 >( (myImplHelpers::CalcFtDist(*(pFt->GetFooterFmt()))) ); + dyaBottom = dyaBottom + static_cast< sal_uInt16 >( (myImplHelpers::CalcFtDist(*(pFt->GetFooterFormat()))) ); } else mbHasFooter = false; @@ -454,7 +454,7 @@ namespace sw } ParaStyleMapper::ParaStyleMapper(SwDoc &rDoc) - : mpImpl(new myImplHelpers::StyleMapperImpl<SwTxtFmtColl>(rDoc)) + : mpImpl(new myImplHelpers::StyleMapperImpl<SwTextFormatColl>(rDoc)) { } @@ -470,7 +470,7 @@ namespace sw } CharStyleMapper::CharStyleMapper(SwDoc &rDoc) - : mpImpl(new myImplHelpers::StyleMapperImpl<SwCharFmt>(rDoc)) + : mpImpl(new myImplHelpers::StyleMapperImpl<SwCharFormat>(rDoc)) { } @@ -517,17 +517,17 @@ namespace sw return nA < nB; } - CharRuns GetPseudoCharRuns(const SwTxtNode& rTxtNd, - sal_Int32 nTxtStart, bool bSplitOnCharSet) + CharRuns GetPseudoCharRuns(const SwTextNode& rTextNd, + sal_Int32 nTextStart, bool bSplitOnCharSet) { - const OUString &rTxt = rTxtNd.GetTxt(); + const OUString &rText = rTextNd.GetText(); bool bParaIsRTL = false; - OSL_ENSURE(rTxtNd.GetDoc(), "No document for node?, suspicious"); - if (rTxtNd.GetDoc()) + OSL_ENSURE(rTextNd.GetDoc(), "No document for node?, suspicious"); + if (rTextNd.GetDoc()) { if (FRMDIR_HORI_RIGHT_TOP == - rTxtNd.GetDoc()->GetTextDirection(SwPosition(rTxtNd))) + rTextNd.GetDoc()->GetTextDirection(SwPosition(rTextNd))) { bParaIsRTL = true; } @@ -536,16 +536,16 @@ namespace sw using namespace ::com::sun::star::i18n; sal_uInt16 nScript = i18n::ScriptType::LATIN; - if (!rTxt.isEmpty() && g_pBreakIt && g_pBreakIt->GetBreakIter().is()) - nScript = g_pBreakIt->GetBreakIter()->getScriptType(rTxt, 0); + if (!rText.isEmpty() && g_pBreakIt && g_pBreakIt->GetBreakIter().is()) + nScript = g_pBreakIt->GetBreakIter()->getScriptType(rText, 0); - rtl_TextEncoding eChrSet = ItemGet<SvxFontItem>(rTxtNd, + rtl_TextEncoding eChrSet = ItemGet<SvxFontItem>(rTextNd, GetWhichOfScript(RES_CHRATR_FONT, nScript)).GetCharSet(); eChrSet = GetExtendedTextEncoding(eChrSet); CharRuns aRunChanges; - if (rTxt.isEmpty()) + if (rText.isEmpty()) { aRunChanges.push_back(CharRunEntry(0, nScript, eChrSet, bParaIsRTL)); @@ -570,8 +570,8 @@ namespace sw UBiDiDirection eDefaultDir = bParaIsRTL ? UBIDI_RTL : UBIDI_LTR; UErrorCode nError = U_ZERO_ERROR; - UBiDi* pBidi = ubidi_openSized(rTxt.getLength(), 0, &nError); - ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(rTxt.getStr()), rTxt.getLength(), + UBiDi* pBidi = ubidi_openSized(rText.getLength(), 0, &nError); + ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(), static_cast< UBiDiLevel >(eDefaultDir), 0, &nError); sal_Int32 nCount = ubidi_countRuns(pBidi, &nError); @@ -603,15 +603,15 @@ namespace sw { //Split unicode text into plausible 8bit ranges for export to //older non unicode aware format - sal_Int32 nLen = rTxt.getLength(); + sal_Int32 nLen = rText.getLength(); sal_Int32 nPos = 0; while (nPos != nLen) { rtl_TextEncoding ScriptType = - getBestMSEncodingByChar(rTxt[nPos++]); + getBestMSEncodingByChar(rText[nPos++]); while ( (nPos != nLen) && - (ScriptType == getBestMSEncodingByChar(rTxt[nPos])) + (ScriptType == getBestMSEncodingByChar(rText[nPos])) ) { ++nPos; @@ -625,17 +625,17 @@ namespace sw if (g_pBreakIt && g_pBreakIt->GetBreakIter().is()) { - sal_Int32 nLen = rTxt.getLength(); + sal_Int32 nLen = rText.getLength(); sal_Int32 nPos = 0; while (nPos < nLen) { - sal_Int32 nEnd2 = g_pBreakIt->GetBreakIter()->endOfScript(rTxt, nPos, + sal_Int32 nEnd2 = g_pBreakIt->GetBreakIter()->endOfScript(rText, nPos, nScript); if (nEnd2 < 0) break; nPos = nEnd2; aScripts.push_back(ScriptEntry(nPos, nScript)); - nScript = g_pBreakIt->GetBreakIter()->getScriptType(rTxt, nPos); + nScript = g_pBreakIt->GetBreakIter()->getScriptType(rText, nPos); } } @@ -655,7 +655,7 @@ namespace sw aScriptIter != aScriptEnd ) { - sal_Int32 nMinPos = rTxt.getLength(); + sal_Int32 nMinPos = rText.getLength(); if (aBiDiIter != aBiDiEnd) { @@ -701,7 +701,7 @@ namespace sw } aRunChanges.erase(std::remove_if(aRunChanges.begin(), - aRunChanges.end(), myImplHelpers::IfBeforeStart(nTxtStart)), aRunChanges.end()); + aRunChanges.end(), myImplHelpers::IfBeforeStart(nTextStart)), aRunChanges.end()); return aRunChanges; } @@ -1123,18 +1123,18 @@ namespace sw return nPos>=rParams.getLength() || (rParams[nPos]!='M' && rParams[nPos]!='m'); } - void SwapQuotesInField(OUString &rFmt) + void SwapQuotesInField(OUString &rFormat) { //Swap unescaped " and ' with ' and " - const sal_Int32 nLen = rFmt.getLength(); + const sal_Int32 nLen = rFormat.getLength(); for (sal_Int32 nI = 0; nI < nLen; ++nI) { - if (!nI || rFmt[nI-1]!='\\') + if (!nI || rFormat[nI-1]!='\\') { - if (rFmt[nI]=='\"') - rFmt = rFmt.replaceAt(nI, 1, "\'"); - else if (rFmt[nI]=='\'') - rFmt = rFmt.replaceAt(nI, 1, "\""); + if (rFormat[nI]=='\"') + rFormat = rFormat.replaceAt(nI, 1, "\'"); + else if (rFormat[nI]=='\'') + rFormat = rFormat.replaceAt(nI, 1, "\""); } } } diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx index 27e71e6dfd5b..8d4debcb1727 100644 --- a/sw/source/filter/ww8/writerwordglue.hxx +++ b/sw/source/filter/ww8/writerwordglue.hxx @@ -23,7 +23,7 @@ #include "needed_cast.hxx" #include "types.hxx" -class SwFrmFmt; +class SwFrameFormat; class SfxItemSet; namespace sw @@ -97,7 +97,7 @@ namespace sw follow frame and the title frame are the same from word persecptive except for the content of their headers. - @return true if the rTitleFmt followed by rFollowFmt could be + @return true if the rTitleFormat followed by rFollowFormat could be expressed in word as a single word Section with different title page enabled. @@ -106,8 +106,8 @@ namespace sw @see #i4320#/#i14509#/#i11717# for examples */ - bool IsPlausableSingleWordSection(const SwFrmFmt &rTitleFmt, - const SwFrmFmt &rFollowFmt); + bool IsPlausableSingleWordSection(const SwFrameFormat &rTitleFormat, + const SwFrameFormat &rFollowFormat); /** Make export a word section top/bottom values easy diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 10f2559bc410..b2b601d7e733 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -174,9 +174,9 @@ OUString SwBasicEscherEx::BuildFileName(sal_uInt16& rnLevel, bool& rbRel, const return aDosName; } -void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFmtURL* pINetFmtArg) +void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFormatURL* pINetFormatArg) { - if ( !pINetFmtArg ) return; + if ( !pINetFormatArg ) return; sal_uInt8 maGuidStdLink[ 16 ] ={ 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE, 0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9, 0x0B }; @@ -200,8 +200,8 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm SvMemoryStream tmpStrm; OUString tmpTextMark; - OUString rUrl = pINetFmtArg->GetURL(); - OUString rTarFrm = pINetFmtArg->GetTargetFrameName(); + OUString rUrl = pINetFormatArg->GetURL(); + OUString rTarFrm = pINetFormatArg->GetTargetFrameName(); sal_uInt32 mnFlags = 0; INetURLObject aUrlObj( rUrl ); @@ -283,22 +283,22 @@ void SwBasicEscherEx::WriteHyperlinkWithinFly( SvMemoryStream& rStrm, const SwFm delete[] pBuffer; } } -void SwBasicEscherEx::PreWriteHyperlinkWithinFly(const SwFrmFmt& rFmt,EscherPropertyContainer& rPropOpt) +void SwBasicEscherEx::PreWriteHyperlinkWithinFly(const SwFrameFormat& rFormat,EscherPropertyContainer& rPropOpt) { const SfxPoolItem* pItem; - const SwAttrSet& rAttrSet = rFmt.GetAttrSet(); + const SwAttrSet& rAttrSet = rFormat.GetAttrSet(); if (SfxItemState::SET == rAttrSet.GetItemState(RES_URL, true, &pItem)) { - const SwFmtURL *pINetFmt = dynamic_cast<const SwFmtURL*>(pItem); - if (pINetFmt && !pINetFmt->GetURL().isEmpty()) + const SwFormatURL *pINetFormat = dynamic_cast<const SwFormatURL*>(pItem); + if (pINetFormat && !pINetFormat->GetURL().isEmpty()) { SvMemoryStream *rStrm = new SvMemoryStream ; - WriteHyperlinkWithinFly( *rStrm, pINetFmt ); + WriteHyperlinkWithinFly( *rStrm, pINetFormat ); sal_uInt8 const * pBuf = static_cast<sal_uInt8 const *>(rStrm->GetData()); sal_uInt32 nSize = rStrm->Seek( STREAM_SEEK_TO_END ); rPropOpt.AddOpt( ESCHER_Prop_pihlShape, true, nSize, const_cast<sal_uInt8 *>(pBuf), nSize ); sal_uInt32 nValue; - OUString aNamestr = pINetFmt->GetName(); + OUString aNamestr = pINetFormat->GetName(); if (!aNamestr.isEmpty()) { rPropOpt.AddOpt(ESCHER_Prop_wzName, aNamestr ); @@ -322,7 +322,7 @@ namespace /// @returns The ordering number. static sal_uLong lcl_getSdrOrderNumber(const WW8Export& rWrt, DrawObj *pObj) { - return rWrt.GetSdrOrdNum(pObj->maCntnt.GetFrmFmt()); + return rWrt.GetSdrOrdNum(pObj->maContent.GetFrameFormat()); }; /// A function object to act as a predicate comparing the ordering numbers @@ -362,12 +362,12 @@ namespace } // get a part fix for this type of element -bool WW8Export::MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt) +bool WW8Export::MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat) { OSL_ENSURE(bWrtWW8, "Not allowed"); if (!bWrtWW8) return false; - const SdrObject *pObject = rFrmFmt.FindRealSdrObject(); + const SdrObject *pObject = rFrameFormat.FindRealSdrObject(); if (!pObject || pObject->GetObjInventor() != FmFormInventor) return false; @@ -467,7 +467,7 @@ void WW8Export::DoComboBox(const OUString &rName, 0x03, 0x6a, 0,0,0,0, // sprmCPicLocation 0x06, 0x08, 0x01, // sprmCFData 0x55, 0x08, 0x01, // sprmCFSpec - 0x02, 0x08, 0x01 // sprmCFFldVanish + 0x02, 0x08, 0x01 // sprmCFFieldVanish }; sal_uInt8* pDataAdr = aArr1 + 2; Set_UInt32( pDataAdr, nDataStt ); @@ -513,7 +513,7 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet) 0x06, 0x08, 0x01, // sprmCFData 0x55, 0x08, 0x01, // sprmCFSpec - 0x02, 0x08, 0x01 // sprmCFFldVanish + 0x02, 0x08, 0x01 // sprmCFFieldVanish }; sal_uInt8* pDataAdr = aArr1 + 2; Set_UInt32( pDataAdr, nDataStt ); @@ -559,7 +559,7 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet) OutputField(0, ww::eFORMCHECKBOX, OUString(), WRITEFIELD_CLOSE); } -void WW8Export::DoFormText(const SwInputField * pFld) +void WW8Export::DoFormText(const SwInputField * pField) { OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT), WRITEFIELD_START | WRITEFIELD_CMD_START); @@ -569,7 +569,7 @@ void WW8Export::DoFormText(const SwInputField * pFld) WriteChar( 0x01 ); static sal_uInt8 aArr1[] = { - 0x02, 0x08, 0x81, // sprmCFFldVanish + 0x02, 0x08, 0x81, // sprmCFFieldVanish 0x03, 0x6a, 0,0,0,0, // sprmCPicLocation 0x06, 0x08, 0x01, // sprmCFData @@ -584,14 +584,14 @@ void WW8Export::DoFormText(const SwInputField * pFld) ::sw::WW8FFData aFFData; aFFData.setType(0); - aFFData.setName(pFld->GetPar2()); - aFFData.setHelp(pFld->GetHelp()); - aFFData.setStatus(pFld->GetToolTip()); + aFFData.setName(pField->GetPar2()); + aFFData.setHelp(pField->GetHelp()); + aFFData.setStatus(pField->GetToolTip()); aFFData.Write(pDataStrm); OutputField(0, ww::eFORMTEXT, OUString(), WRITEFIELD_CMD_END); - const OUString fieldStr( pFld->ExpandField(true) ); + const OUString fieldStr( pField->ExpandField(true) ); SwWW8Writer::WriteString16(Strm(), fieldStr, false); static sal_uInt8 aArr2[] = { @@ -667,21 +667,21 @@ bool RTLDrawingsHack(long &rLeft, long /*nWidth*/, return bRet; } -bool WW8Export::MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight, - const sw::Frame &rFrmFmt) +bool WW8Export::MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, + const sw::Frame &rFrameFormat) { //Require nasty bidi swap - if (FRMDIR_HORI_RIGHT_TOP != m_pDoc->GetTextDirection(rFrmFmt.GetPosition())) + if (FRMDIR_HORI_RIGHT_TOP != m_pDoc->GetTextDirection(rFrameFormat.GetPosition())) return false; SwTwips nWidth = rRight - rLeft; SwTwips nPageLeft, nPageRight; SwTwips nPageSize = CurrentPageWidth(nPageLeft, nPageRight); - const SwFmtHoriOrient& rHOr = rFrmFmt.GetFrmFmt().GetHoriOrient(); + const SwFormatHoriOrient& rHOr = rFrameFormat.GetFrameFormat().GetHoriOrient(); bool bRet = false; - sw::Frame::WriterSource eSource = rFrmFmt.GetWriterType(); + sw::Frame::WriterSource eSource = rFrameFormat.GetWriterType(); if (eSource == sw::Frame::eDrawing || eSource == sw::Frame::eFormControl) { if (RTLDrawingsHack(rLeft, nWidth, rHOr.GetHoriOrient(), @@ -722,38 +722,38 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const for (aIter = maDrawObjs.begin(); aIter < aEnd; ++aIter) SwWW8Writer::WriteLong(*rWrt.pTableStrm, aIter->mnCp - nCpOffs); - SwWW8Writer::WriteLong(*rWrt.pTableStrm, rFib.ccpText + rFib.ccpFtn + + SwWW8Writer::WriteLong(*rWrt.pTableStrm, rFib.ccpText + rFib.ccpFootnote + rFib.ccpHdr + rFib.ccpEdn + rFib.ccpTxbx + rFib.ccpHdrTxbx + 1); for (aIter = maDrawObjs.begin(); aIter < aEnd; ++aIter) { // write the fspa-struct - const sw::Frame &rFrmFmt = aIter->maCntnt; - const SwFrmFmt &rFmt = rFrmFmt.GetFrmFmt(); - const SdrObject* pObj = rFmt.FindRealSdrObject(); + const sw::Frame &rFrameFormat = aIter->maContent; + const SwFrameFormat &rFormat = rFrameFormat.GetFrameFormat(); + const SdrObject* pObj = rFormat.FindRealSdrObject(); Rectangle aRect; - SwFmtVertOrient rVOr = rFmt.GetVertOrient(); - SwFmtHoriOrient rHOr = rFmt.GetHoriOrient(); + SwFormatVertOrient rVOr = rFormat.GetVertOrient(); + SwFormatHoriOrient rHOr = rFormat.GetHoriOrient(); // #i30669# - convert the positioning attributes. // Most positions are converted, if layout information exists. const bool bPosConverted = - WinwordAnchoring::ConvertPosition( rHOr, rVOr, rFmt ); + WinwordAnchoring::ConvertPosition( rHOr, rVOr, rFormat ); Point aObjPos; - if (RES_FLYFRMFMT == rFmt.Which()) + if (RES_FLYFRMFMT == rFormat.Which()) { - SwRect aLayRect(rFmt.FindLayoutRect(false, &aObjPos)); + SwRect aLayRect(rFormat.FindLayoutRect(false, &aObjPos)); // the Object is not visible - so get the values from // the format. The Position may not be correct. if( aLayRect.IsEmpty() ) - aRect.SetSize( rFmt.GetFrmSize().GetSize() ); + aRect.SetSize( rFormat.GetFrmSize().GetSize() ); else { // #i56090# Do not only consider the first client // Note that we actually would have to find the maximum size of the // frame format clients. However, this already should work in most cases. - const SwRect aSizeRect(rFmt.FindLayoutRect()); + const SwRect aSizeRect(rFormat.FindLayoutRect()); if ( aSizeRect.Width() > aLayRect.Width() ) aLayRect.Width( aSizeRect.Width() ); @@ -798,7 +798,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const //If we are being exported as an inline hack, set //corner to 0 and forget about border thickness for positioning - if (rFrmFmt.IsInline()) + if (rFrameFormat.IsInline()) { aRect.SetPos(Point(0,0)); nThick = 0; @@ -811,7 +811,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const SwTwips nRight = aRect.Right() - nThick; //Nasty swap for bidi if necessary - rWrt.MiserableRTLFrmFmtHack(nLeft, nRight, rFrmFmt); + rWrt.MiserableRTLFrameFormatHack(nLeft, nRight, rFrameFormat); //xaLeft/yaTop/xaRight/yaBottom - rel. to anchor //(most of) the border is outside the graphic is word, so @@ -824,12 +824,12 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const //fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock sal_uInt16 nFlags=0; //If nFlags isn't 0x14 its overridden by the escher properties - if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId()) + if (FLY_AT_PAGE == rFormat.GetAnchor().GetAnchorId()) nFlags = 0x0000; else nFlags = 0x0014; // x-rel to text, y-rel to text - const SwFmtSurround& rSurr = rFmt.GetSurround(); + const SwFormatSurround& rSurr = rFormat.GetSurround(); sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040; SwSurround eSurround = rSurr.GetSurround(); @@ -839,7 +839,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const the shape field hack are required to be wrap through so as to flow over the following dummy 0x01 graphic */ - if (rFrmFmt.IsInline()) + if (rFrameFormat.IsInline()) eSurround = SURROUND_THROUGHT; switch (eSurround) @@ -876,7 +876,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const #i3958# Required to make this inline stuff work in WordXP, not needed for 2003 interestingly */ - if (rFrmFmt.IsInline()) + if (rFrameFormat.IsInline()) nFlags |= 0x8000; SwWW8Writer::WriteShort(*rWrt.pTableStrm, nFlags); @@ -889,14 +889,14 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const } } -void MainTxtPlcDrawObj::RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, +void MainTextPlcDrawObj::RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const { rFib.fcPlcfspaMom = nStart; rFib.lcbPlcfspaMom = nLen; } -WW8_CP MainTxtPlcDrawObj::GetCpOffset(const WW8Fib &) const +WW8_CP MainTextPlcDrawObj::GetCpOffset(const WW8Fib &) const { return 0; } @@ -910,14 +910,14 @@ void HdFtPlcDrawObj::RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, WW8_CP HdFtPlcDrawObj::GetCpOffset(const WW8Fib &rFib) const { - return rFib.ccpText + rFib.ccpFtn; + return rFib.ccpText + rFib.ccpFootnote; } DrawObj& DrawObj::operator=(const DrawObj& rOther) { mnCp = rOther.mnCp; mnShapeId = rOther.mnShapeId; - maCntnt = rOther.maCntnt; + maContent = rOther.maContent; maParentPos = rOther.maParentPos; mnThick = rOther.mnThick; mnDirection = rOther.mnDirection; @@ -925,17 +925,17 @@ DrawObj& DrawObj::operator=(const DrawObj& rOther) return *this; } -bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt, +bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFormat, const Point& rNdTopLeft ) { bool bRet = false; - const SwFrmFmt &rFrameFormat = rFmt.GetFrmFmt(); - if (TXT_HDFT == rWrt.m_nTxtTyp || TXT_MAINTEXT == rWrt.m_nTxtTyp) + const SwFrameFormat &rFrameFormat = rFormat.GetFrameFormat(); + if (TXT_HDFT == rWrt.m_nTextTyp || TXT_MAINTEXT == rWrt.m_nTextTyp) { if (RES_FLYFRMFMT == rFrameFormat.Which()) { // check for textflyframe and if it is the first in a Chain - if (rFrameFormat.GetCntnt().GetCntntIdx()) + if (rFrameFormat.GetContent().GetContentIdx()) bRet = true; } else @@ -944,7 +944,7 @@ bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt, if (bRet) { - DrawObj aObj(rFmt, nCp, rNdTopLeft, rWrt.TrueFrameDirection(rFrameFormat), + DrawObj aObj(rFormat, nCp, rNdTopLeft, rWrt.TrueFrameDirection(rFrameFormat), rWrt.GetHdFtIndex()); maDrawObjs.push_back(aObj); } @@ -957,57 +957,57 @@ void DrawObj::SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick) mnThick = nThick; } -bool WW8_WrPlcTxtBoxes::WriteTxt( WW8Export& rWrt ) +bool WW8_WrPlcTextBoxes::WriteText( WW8Export& rWrt ) { rWrt.m_bInWriteEscher = true; WW8_CP& rccp=TXT_TXTBOX == nTyp ? rWrt.pFib->ccpTxbx : rWrt.pFib->ccpHdrTxbx; - bool bRet = WriteGenericTxt( rWrt, nTyp, rccp ); + bool bRet = WriteGenericText( rWrt, nTyp, rccp ); WW8_CP nCP = rWrt.Fc2Cp( rWrt.Strm().Tell() ); WW8Fib& rFib = *rWrt.pFib; - WW8_CP nMyOffset = rFib.ccpText + rFib.ccpFtn + rFib.ccpHdr + rFib.ccpAtn + WW8_CP nMyOffset = rFib.ccpText + rFib.ccpFootnote + rFib.ccpHdr + rFib.ccpAtn + rFib.ccpEdn; if( TXT_TXTBOX == nTyp ) - rWrt.m_pFldTxtBxs->Finish( nCP, nMyOffset ); + rWrt.m_pFieldTextBxs->Finish( nCP, nMyOffset ); else - rWrt.m_pFldHFTxtBxs->Finish( nCP, nMyOffset + rFib.ccpTxbx ); + rWrt.m_pFieldHFTextBxs->Finish( nCP, nMyOffset + rFib.ccpTxbx ); rWrt.m_bInWriteEscher = false; return bRet; } -void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId ) +void WW8_WrPlcTextBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId ) { - aCntnt.push_back( &rObj ); + aContent.push_back( &rObj ); aShapeIds.push_back( nShapeId ); //save NULL, if we have an actual SdrObject - aSpareFmts.push_back(NULL); + aSpareFormats.push_back(NULL); } -void WW8_WrPlcTxtBoxes::Append( const SwFrmFmt* pFmt, sal_uInt32 nShapeId ) +void WW8_WrPlcTextBoxes::Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId ) { - //no sdr object, we insert a NULL in the aCntnt and save the real fmt in aSpareFmts. - aCntnt.push_back( NULL ); + //no sdr object, we insert a NULL in the aContent and save the real fmt in aSpareFormats. + aContent.push_back( NULL ); aShapeIds.push_back( nShapeId ); - aSpareFmts.push_back(pFmt); + aSpareFormats.push_back(pFormat); } -const std::vector<sal_uInt32>* WW8_WrPlcTxtBoxes::GetShapeIdArr() const +const std::vector<sal_uInt32>* WW8_WrPlcTextBoxes::GetShapeIdArr() const { return &aShapeIds; } -sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const +sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrameFormat& rFormat ) const { sal_uInt32 nOrdNum; - const SdrObject* pObj = rFmt.FindRealSdrObject(); + const SdrObject* pObj = rFormat.FindRealSdrObject(); if( pObj ) nOrdNum = pObj->GetOrdNum(); else { // no Layout for this format, then recalc the ordnum - SwFrmFmt* pFmt = const_cast<SwFrmFmt*>(&rFmt); - nOrdNum = static_cast<sal_uInt32>(m_pDoc->GetSpzFrmFmts()->GetPos( pFmt )); + SwFrameFormat* pFormat = const_cast<SwFrameFormat*>(&rFormat); + nOrdNum = static_cast<sal_uInt32>(m_pDoc->GetSpzFrameFormats()->GetPos( pFormat )); const SwDrawModel* pModel = m_pDoc->getIDocumentDrawModelAccess().GetDrawModel(); if( pModel ) @@ -1016,7 +1016,7 @@ sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const return nOrdNum; } -void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt, +void WW8Export::AppendFlyInFlys(const sw::Frame& rFrameFormat, const Point& rNdTopLeft) { OSL_ENSURE(bWrtWW8, "this has gone horribly wrong"); @@ -1024,19 +1024,19 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt, if (m_pEscher) return ; PlcDrawObj *pDrwO; - if (TXT_HDFT == m_nTxtTyp) + if (TXT_HDFT == m_nTextTyp) pDrwO = m_pHFSdrObjs; else pDrwO = m_pSdrObjs; - if (rFrmFmt.IsInline()) + if (rFrameFormat.IsInline()) { OutputField(0, ww::eSHAPE, FieldString(ww::eSHAPE), WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END); } WW8_CP nCP = Fc2Cp(Strm().Tell()); - bool bSuccess = pDrwO->Append(*this, nCP, rFrmFmt, rNdTopLeft); + bool bSuccess = pDrwO->Append(*this, nCP, rFrameFormat, rNdTopLeft); OSL_ENSURE(bSuccess, "Couldn't export a graphical element!"); if (bSuccess) @@ -1054,11 +1054,11 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt, m_pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aSpec8 ), aSpec8 ); //Need dummy picture frame - if (rFrmFmt.IsInline()) - OutGrf(rFrmFmt); + if (rFrameFormat.IsInline()) + OutGrf(rFrameFormat); } - if (rFrmFmt.IsInline()) + if (rFrameFormat.IsInline()) OutputField(0, ww::eSHAPE, OUString(), WRITEFIELD_CLOSE); } @@ -1075,7 +1075,7 @@ void MSWord_SdrAttrIter::NextPara( sal_Int32 nPar ) // Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen // wird, dass am Absatzanfang sowieso die Attribute neu ausgegeben // werden. - aChrTxtAtrArr.clear(); + aChrTextAtrArr.clear(); aChrSetArr.clear(); nAktSwPos = nTmpSwPos = 0; @@ -1088,7 +1088,7 @@ void MSWord_SdrAttrIter::NextPara( sal_Int32 nPar ) else nScript = i18n::ScriptType::LATIN; - pEditObj->GetCharAttribs( nPara, aTxtAtrArr ); + pEditObj->GetCharAttribs( nPara, aTextAtrArr ); nAktSwPos = SearchNext( 1 ); } @@ -1099,11 +1099,11 @@ rtl_TextEncoding MSWord_SdrAttrIter::GetNextCharSet() const return eNdChrSet; } -// der erste Parameter in SearchNext() liefert zurueck, ob es ein TxtAtr ist. +// der erste Parameter in SearchNext() liefert zurueck, ob es ein TextAtr ist. sal_Int32 MSWord_SdrAttrIter::SearchNext( sal_Int32 nStartPos ) { sal_Int32 nMinPos = SAL_MAX_INT32; - for(std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i) + for(std::vector<EECharAttrib>::const_iterator i = aTextAtrArr.begin(); i < aTextAtrArr.end(); ++i) { sal_Int32 nPos = i->nStart; // gibt erstes Attr-Zeichen if( nPos >= nStartPos && nPos <= nMinPos ) @@ -1134,16 +1134,16 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart) { rtl_TextEncoding eChrSet = static_cast<const SvxFontItem&>(rItem).GetCharSet(); aChrSetArr.push_back( eChrSet ); - aChrTxtAtrArr.push_back( &rAttr ); + aChrTextAtrArr.push_back( &rAttr ); } else { std::vector<const EECharAttrib*>::iterator it = - std::find( aChrTxtAtrArr.begin(), aChrTxtAtrArr.end(), &rAttr ); - if ( it != aChrTxtAtrArr.end() ) + std::find( aChrTextAtrArr.begin(), aChrTextAtrArr.end(), &rAttr ); + if ( it != aChrTextAtrArr.end() ) { - aChrSetArr.erase( aChrSetArr.begin() + (it - aChrTxtAtrArr.begin()) ); - aChrTxtAtrArr.erase( it ); + aChrSetArr.erase( aChrSetArr.begin() + (it - aChrTextAtrArr.begin()) ); + aChrTextAtrArr.erase( it ); } } } @@ -1151,19 +1151,19 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart) void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt) { const SvxFieldItem &rField = static_cast<const SvxFieldItem &>(rHt); - const SvxFieldData *pFld = rField.GetField(); - if (pFld && pFld->ISA(SvxURLField)) + const SvxFieldData *pField = rField.GetField(); + if (pField && pField->ISA(SvxURLField)) { - sal_uInt8 nOldTxtTyp = m_rExport.m_nTxtTyp; - m_rExport.m_nTxtTyp = mnTyp; - const SvxURLField *pURL = static_cast<const SvxURLField *>(pFld); + sal_uInt8 nOldTextTyp = m_rExport.m_nTextTyp; + m_rExport.m_nTextTyp = mnTyp; + const SvxURLField *pURL = static_cast<const SvxURLField *>(pField); m_rExport.AttrOutput().StartURL( pURL->GetURL(), pURL->GetTargetFrame() ); const OUString &rStr = pURL->GetRepresentation(); m_rExport.AttrOutput().RawText( rStr, true, GetNodeCharSet() ); // FIXME kendy: is the 'true' actually correct here? It was here before, but... ;-) m_rExport.AttrOutput().EndURL(false); - m_rExport.m_nTxtTyp = nOldTxtTyp; + m_rExport.m_nTextTyp = nOldTextTyp; } } @@ -1175,9 +1175,9 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos ) //duplicate attributes in docx export. Doesn't matter in doc //export as later props just override earlier ones. std::set<sal_uInt16> aUsedRunWhichs; - if (!aTxtAtrArr.empty()) + if (!aTextAtrArr.empty()) { - for(std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i) + for(std::vector<EECharAttrib>::const_iterator i = aTextAtrArr.begin(); i < aTextAtrArr.end(); ++i) { if (nSwPos >= i->nStart && nSwPos < i->nEnd) { @@ -1192,10 +1192,10 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos ) OutParaAttr(true, &aUsedRunWhichs); - if (!aTxtAtrArr.empty()) + if (!aTextAtrArr.empty()) { - const SwModify* pOldMod = m_rExport.m_pOutFmtNode; - m_rExport.m_pOutFmtNode = 0; + const SwModify* pOldMod = m_rExport.m_pOutFormatNode; + m_rExport.m_pOutFormatNode = 0; const SfxItemPool* pSrcPool = pEditPool; const SfxItemPool& rDstPool = m_rExport.m_pDoc->GetAttrPool(); @@ -1203,7 +1203,7 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos ) nTmpSwPos = nSwPos; // Did we already produce a <w:sz> element? m_rExport.m_bFontSizeWritten = false; - for(std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i) + for(std::vector<EECharAttrib>::const_iterator i = aTextAtrArr.begin(); i < aTextAtrArr.end(); ++i) { if (nSwPos >= i->nStart && nSwPos < i->nEnd) { @@ -1247,13 +1247,13 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos ) m_rExport.m_bFontSizeWritten = false; nTmpSwPos = 0; // HasTextItem nur in dem obigen Bereich erlaubt - m_rExport.m_pOutFmtNode = pOldMod; + m_rExport.m_pOutFormatNode = pOldMod; } } -bool MSWord_SdrAttrIter::IsTxtAttr(sal_Int32 nSwPos) +bool MSWord_SdrAttrIter::IsTextAttr(sal_Int32 nSwPos) { - for (std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i) + for (std::vector<EECharAttrib>::const_iterator i = aTextAtrArr.begin(); i < aTextAtrArr.end(); ++i) { if (nSwPos >= i->nStart && nSwPos < i->nEnd) { @@ -1277,7 +1277,7 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const m_rExport.m_pDoc->GetAttrPool(), nWhich); if (nWhich) { - for (std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i) + for (std::vector<EECharAttrib>::const_iterator i = aTextAtrArr.begin(); i < aTextAtrArr.end(); ++i) { if (nWhich == i->pAttr->Which() && nTmpSwPos >= i->nStart && nTmpSwPos < i->nEnd) return i->pAttr; // Found @@ -1343,7 +1343,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* } } -void WW8Export::WriteSdrTextObj(const SdrTextObj& rTxtObj, sal_uInt8 nTyp) +void WW8Export::WriteSdrTextObj(const SdrTextObj& rTextObj, sal_uInt8 nTyp) { const OutlinerParaObject* pParaObj = 0; bool bOwnParaObj = false; @@ -1353,14 +1353,14 @@ void WW8Export::WriteSdrTextObj(const SdrTextObj& rTxtObj, sal_uInt8 nTyp) When the object is actively being edited, that text is not set into the objects normal text object, but lives in a separate object. */ - if (rTxtObj.IsTextEditActive()) + if (rTextObj.IsTextEditActive()) { - pParaObj = rTxtObj.GetEditOutlinerParaObject(); + pParaObj = rTextObj.GetEditOutlinerParaObject(); bOwnParaObj = true; } else { - pParaObj = rTxtObj.GetOutlinerParaObject(); + pParaObj = rTextObj.GetOutlinerParaObject(); } if( pParaObj ) @@ -1395,14 +1395,14 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp const sal_Int32 nNextAttr = std::min(aAttrIter.WhereNext(), nEnd); rtl_TextEncoding eNextChrSet = aAttrIter.GetNextCharSet(); - bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); - if( !bTxtAtr ) + bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); + if( !bTextAtr ) OutSwString( aStr, nAktPos, nNextAttr - nAktPos, true, eChrSet ); // Am Zeilenende werden die Attribute bis ueber das CR // aufgezogen. Ausnahme: Fussnoten am Zeilenende - if( nNextAttr == nEnd && !bTxtAtr ) + if( nNextAttr == nEnd && !bTextAtr ) WriteCR(); // CR danach // Ausgabe der Zeichenattribute @@ -1412,7 +1412,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp pO->clear(); // Ausnahme: Fussnoten am Zeilenende - if( nNextAttr == nEnd && bTxtAtr ) + if( nNextAttr == nEnd && bTextAtr ) WriteCR(); // CR danach nAktPos = nNextAttr; eChrSet = eNextChrSet; @@ -1537,18 +1537,18 @@ SwBasicEscherEx::~SwBasicEscherEx() { } -void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&) +void SwBasicEscherEx::WriteFrmExtraData(const SwFrameFormat&) { AddAtom(4, ESCHER_ClientAnchor); GetStream().WriteUInt32( 0x80000000 ); } -void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId) +void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId) { OpenContainer(ESCHER_SpContainer); AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId); // store anchor attribute - WriteFrmExtraData(rFmt); + WriteFrmExtraData(rFormat); AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122 GetStream().WriteUInt16( 0x053F ).WriteUInt32( nInlineHack ); @@ -1629,10 +1629,10 @@ sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) return 0; } -sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId) +sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId) { sal_Int32 nBorderThick=0; - SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt); + SwNoTextNode *pNd = GetNoTextNodeFromSwFrameFormat(rFormat); SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0; OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious"); if (!pGrfNd) @@ -1698,19 +1698,19 @@ sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh } aPropOpt.AddOpt( ESCHER_Prop_pibFlags, nFlags ); - nBorderThick = WriteFlyFrameAttr(rFmt,mso_sptPictureFrame,aPropOpt); + nBorderThick = WriteFlyFrameAttr(rFormat,mso_sptPictureFrame,aPropOpt); WriteGrfAttr(*pGrfNd, aPropOpt); aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFmt ); + WriteFrmExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer return nBorderThick; } -void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd, +void SwBasicEscherEx::WriteGrfAttr(const SwNoTextNode& rNd, EscherPropertyContainer& rPropOpt) { const SfxPoolItem* pItem; @@ -1805,18 +1805,18 @@ void SwBasicEscherEx::SetPicId(const SdrObject &, sal_uInt32, void SwEscherEx::SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId, EscherPropertyContainer &rPropOpt) { - pTxtBxs->Append(rSdrObj, nShapeId); - sal_uInt32 nPicId = pTxtBxs->Count(); + pTextBxs->Append(rSdrObj, nShapeId); + sal_uInt32 nPicId = pTextBxs->Count(); nPicId *= 0x10000; rPropOpt.AddOpt( ESCHER_Prop_pictureId, nPicId ); } -sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId) +sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrameFormat& rFormat, sal_uInt32 nShapeId) { sal_Int32 nBorderThick = 0; - if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject()) + if (const SdrObject* pSdrObj = rFormat.FindRealSdrObject()) { - SwNodeIndex aIdx(*rFmt.GetCntnt().GetCntntIdx(), 1); + SwNodeIndex aIdx(*rFormat.GetContent().GetContentIdx(), 1); SwOLENode& rOLENd = *aIdx.GetNode().GetOLENode(); sal_Int64 nAspect = rOLENd.GetAspect(); @@ -1857,12 +1857,12 @@ sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nSh WriteOLEPicture(aPropOpt, AddMirrorFlags(0xa00 | SHAPEFLAG_OLESHAPE, rMirror), pGraphic ? *pGraphic : Graphic(), *pSdrObj, nShapeId, bRectIsSet ? &aRect : NULL ); - nBorderThick = WriteFlyFrameAttr(rFmt, mso_sptPictureFrame, aPropOpt); + nBorderThick = WriteFlyFrameAttr(rFormat, mso_sptPictureFrame, aPropOpt); WriteGrfAttr(rOLENd, aPropOpt); aPropOpt.Commit(GetStream()); // store anchor attribute - WriteFrmExtraData( rFmt ); + WriteFrmExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer } @@ -1928,13 +1928,13 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush, } } -sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, +sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt) { sal_Int32 nLineWidth=0; const SfxPoolItem* pItem; bool bFirstLine = true; - if (SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem)) + if (SfxItemState::SET == rFormat.GetItemState(RES_BOX, true, &pItem)) { static const o3tl::enumarray<SvxBoxItemLine, sal_uInt16> aExhperProp = { @@ -2013,7 +2013,7 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, rPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 ); rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 ); } - const SwAttrSet& rAttrSet = rFmt.GetAttrSet(); + const SwAttrSet& rAttrSet = rFormat.GetAttrSet(); if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) { const SvxBoxItem* pBox = static_cast<const SvxBoxItem*>(pItem); @@ -2071,21 +2071,21 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, // SwWW8ImplReader::Read_GrafLayer() imports these as opaque // unconditionally, so if both are true, don't export the property. - bool bIsInHeader = IsFlyFrmFmtInHeader(rFmt); - bool bIsThrought = rFmt.GetSurround().GetValue() == SURROUND_THROUGHT; + bool bIsInHeader = IsFlyFrameFormatInHeader(rFormat); + bool bIsThrought = rFormat.GetSurround().GetValue() == SURROUND_THROUGHT; if (bIsInHeader) { - SvxBrushItem aBrush(rFmt.makeBackgroundBrushItem()); + SvxBrushItem aBrush(rFormat.makeBackgroundBrushItem()); WriteBrushAttr(aBrush, rPropOpt); } else { - SvxBrushItem aBrush(rWrt.TrueFrameBgBrush(rFmt)); + SvxBrushItem aBrush(rWrt.TrueFrameBgBrush(rFormat)); WriteBrushAttr(aBrush, rPropOpt); } - const SdrObject* pObj = rFmt.FindRealSdrObject(); + const SdrObject* pObj = rFormat.FindRealSdrObject(); if( pObj && (pObj->GetLayer() == GetHellLayerId() || pObj->GetLayer() == GetInvisibleHellId() ) && !(bIsInHeader && bIsThrought)) @@ -2093,15 +2093,15 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, rPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x200020 ); } - PreWriteHyperlinkWithinFly(rFmt,rPropOpt); + PreWriteHyperlinkWithinFly(rFormat,rPropOpt); return nLineWidth; } -sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType, +sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt) { - sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType, + sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFormat, eShapeType, rPropOpt); /* @@ -2111,7 +2111,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType are exporting! */ const SfxPoolItem* pItem; - if (SfxItemState::SET == rFmt.GetItemState(RES_LR_SPACE, true, &pItem)) + if (SfxItemState::SET == rFormat.GetItemState(RES_LR_SPACE, true, &pItem)) { rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistLeft, DrawModelToEmu( static_cast<const SvxLRSpaceItem*>(pItem)->GetLeft() ) ); @@ -2124,7 +2124,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType rPropOpt.AddOpt( ESCHER_Prop_dxWrapDistRight, 0 ); } - if (SfxItemState::SET == rFmt.GetItemState(RES_UL_SPACE, true, &pItem)) + if (SfxItemState::SET == rFormat.GetItemState(RES_UL_SPACE, true, &pItem)) { rPropOpt.AddOpt( ESCHER_Prop_dyWrapDistTop, DrawModelToEmu( static_cast<const SvxULSpaceItem*>(pItem)->GetUpper() ) ); @@ -2132,9 +2132,9 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType DrawModelToEmu( static_cast<const SvxULSpaceItem*>(pItem)->GetLower() ) ); } - if (rFmt.GetSurround().IsContour()) + if (rFormat.GetSurround().IsContour()) { - if (const SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt)) + if (const SwNoTextNode *pNd = GetNoTextNodeFromSwFrameFormat(rFormat)) { const tools::PolyPolygon *pPolyPoly = pNd->HasContour(); if (pPolyPoly && pPolyPoly->Count()) @@ -2163,7 +2163,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType } } - PreWriteHyperlinkWithinFly(rFmt,rPropOpt); + PreWriteHyperlinkWithinFly(rFormat,rPropOpt); return nLineWidth; } @@ -2231,7 +2231,7 @@ void SwBasicEscherEx::WritePictures() SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) : SwBasicEscherEx(pStrm, rWW8Wrt), - pTxtBxs(0) + pTextBxs(0) { aHostData.SetClientData(&aWinwordAnchoring); OpenContainer( ESCHER_DggContainer ); @@ -2249,17 +2249,17 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) sal_uInt8 i = 2; // for header/footer and the other PlcDrawObj *pSdrObjs = rWrt.m_pHFSdrObjs; - pTxtBxs = rWrt.m_pHFTxtBxs; + pTextBxs = rWrt.m_pHFTextBxs; // if no header/footer -> skip over if (!pSdrObjs->size()) { --i; pSdrObjs = rWrt.m_pSdrObjs; - pTxtBxs = rWrt.m_pTxtBxs; + pTextBxs = rWrt.m_pTextBxs; } - for( ; i--; pSdrObjs = rWrt.m_pSdrObjs, pTxtBxs = rWrt.m_pTxtBxs ) + for( ; i--; pSdrObjs = rWrt.m_pSdrObjs, pTextBxs = rWrt.m_pTextBxs ) { // "dummy char" (or any Count ?) - why? Only Microsoft knows it. GetStream().WriteChar( i ); @@ -2283,23 +2283,23 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) OSL_ENSURE(pObj, "impossible"); if (!pObj) continue; - const sw::Frame &rFrame = pObj->maCntnt; - const SwFrmFmt& rFmt = rFrame.GetFrmFmt(); + const sw::Frame &rFrame = pObj->maContent; + const SwFrameFormat& rFormat = rFrame.GetFrameFormat(); switch (rFrame.GetWriterType()) { - case sw::Frame::eTxtBox: + case sw::Frame::eTextBox: case sw::Frame::eOle: case sw::Frame::eGraphic: nBorderThick = WriteFlyFrm(*pObj, nShapeId, aSorted); break; case sw::Frame::eFormControl: - WriteOCXControl(rFmt, nShapeId = GenerateShapeId()); + WriteOCXControl(rFormat, nShapeId = GenerateShapeId()); break; case sw::Frame::eDrawing: { - aWinwordAnchoring.SetAnchoring(rFmt); - const SdrObject* pSdrObj = rFmt.FindRealSdrObject(); + aWinwordAnchoring.SetAnchoring(rFormat); + const SdrObject* pSdrObj = rFormat.FindRealSdrObject(); if (pSdrObj) { bool bSwapInPage = false; @@ -2347,9 +2347,9 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt) AddShape( ESCHER_ShpInst_Rectangle, 0xe00, nSecondShapeId ); EscherPropertyContainer aPropOpt; - const SwFrmFmt &rFmt = rWrt.m_pDoc->GetPageDesc(0).GetMaster(); + const SwFrameFormat &rFormat = rWrt.m_pDoc->GetPageDesc(0).GetMaster(); const SfxPoolItem* pItem = 0; - SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, + SfxItemState eState = rFormat.GetItemState(RES_BACKGROUND, true, &pItem); if (SfxItemState::SET == eState && pItem) { @@ -2412,16 +2412,16 @@ void SwEscherEx::FinishEscher() input/output parameter - containing the current vertical position attributes, which are converted by this method. - @param _rFrmFmt + @param _rFrameFormat input parameter - frame format of the anchored object @return boolean, indicating, if a conversion has been performed. */ -bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, - SwFmtVertOrient& _iorVertOri, - const SwFrmFmt& _rFrmFmt ) +bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, + SwFormatVertOrient& _iorVertOri, + const SwFrameFormat& _rFrameFormat ) { - const RndStdIds eAnchor = _rFrmFmt.GetAnchor().GetAnchorId(); + const RndStdIds eAnchor = _rFrameFormat.GetAnchor().GetAnchorId(); if ( (FLY_AS_CHAR == eAnchor) || (FLY_AT_FLY == eAnchor) ) { @@ -2432,7 +2432,7 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, // determine anchored object SwAnchoredObject* pAnchoredObj( 0L ); { - const SwContact* pContact = _rFrmFmt.FindContactObj(); + const SwContact* pContact = _rFrameFormat.FindContactObj(); if ( pContact ) { std::list<SwAnchoredObject*> aAnchoredObjs; @@ -2463,19 +2463,19 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, // determine value of attribute 'Follow text flow', because positions aligned // at page areas have to be converted, if it's set. - const bool bFollowTextFlow = _rFrmFmt.GetFollowTextFlow().GetValue(); + const bool bFollowTextFlow = _rFrameFormat.GetFollowTextFlow().GetValue(); // check, if horizontal and vertical position have to be converted due to // the fact, that the object is anchored at a paragraph, which has a "column // break before" attribute bool bConvDueToAnchoredAtColBreakPara( false ); if ( ( (eAnchor == FLY_AT_PARA) || (eAnchor == FLY_AT_CHAR) ) && - _rFrmFmt.GetAnchor().GetCntntAnchor() && - _rFrmFmt.GetAnchor().GetCntntAnchor()->nNode.GetNode().IsTxtNode() ) + _rFrameFormat.GetAnchor().GetContentAnchor() && + _rFrameFormat.GetAnchor().GetContentAnchor()->nNode.GetNode().IsTextNode() ) { - SwTxtNode& rAnchorTxtNode = - dynamic_cast<SwTxtNode&>(_rFrmFmt.GetAnchor().GetCntntAnchor()->nNode.GetNode()); - const SvxFmtBreakItem* pBreak = &(ItemGet<SvxFmtBreakItem>(rAnchorTxtNode, RES_BREAK)); + SwTextNode& rAnchorTextNode = + dynamic_cast<SwTextNode&>(_rFrameFormat.GetAnchor().GetContentAnchor()->nNode.GetNode()); + const SvxFormatBreakItem* pBreak = &(ItemGet<SvxFormatBreakItem>(rAnchorTextNode, RES_BREAK)); if ( pBreak && pBreak->GetBreak() == SVX_BREAK_COLUMN_BEFORE ) { @@ -2701,17 +2701,17 @@ bool WinwordAnchoring::ConvertPosition( SwFmtHoriOrient& _iorHoriOri, return bConverted; } -void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt) +void WinwordAnchoring::SetAnchoring(const SwFrameFormat& rFormat) { - const RndStdIds eAnchor = rFmt.GetAnchor().GetAnchorId(); + const RndStdIds eAnchor = rFormat.GetAnchor().GetAnchorId(); mbInline = (eAnchor == FLY_AS_CHAR); - SwFmtHoriOrient rHoriOri = rFmt.GetHoriOrient(); - SwFmtVertOrient rVertOri = rFmt.GetVertOrient(); + SwFormatHoriOrient rHoriOri = rFormat.GetHoriOrient(); + SwFormatVertOrient rVertOri = rFormat.GetVertOrient(); // #i30669# - convert the positioning attributes. // Most positions are converted, if layout information exists. - const bool bPosConverted = ConvertPosition( rHoriOri, rVertOri, rFmt ); + const bool bPosConverted = ConvertPosition( rHoriOri, rVertOri, rFormat ); const sal_Int16 eHOri = rHoriOri.GetHoriOrient(); const sal_Int16 eVOri = rVertOri.GetVertOrient(); // #i22673# @@ -2836,9 +2836,9 @@ void WinwordAnchoring::SetAnchoring(const SwFrmFmt& rFmt) } } -void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt ) +void SwEscherEx::WriteFrmExtraData( const SwFrameFormat& rFormat ) { - aWinwordAnchoring.SetAnchoring(rFmt); + aWinwordAnchoring.SetAnchoring(rFormat); aWinwordAnchoring.WriteData(*this); AddAtom(4, ESCHER_ClientAnchor); @@ -2851,81 +2851,81 @@ void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt ) sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId, DrawObjPointerVector &rPVec) { - const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt(); + const SwFrameFormat &rFormat = rObj.maContent.GetFrameFormat(); // check for textflyframe and if it is the first in a Chain sal_Int32 nBorderThick = 0; - const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx(); + const SwNodeIndex* pNdIdx = rFormat.GetContent().GetContentIdx(); if( pNdIdx ) { SwNodeIndex aIdx( *pNdIdx, 1 ); switch( aIdx.GetNode().GetNodeType() ) { case ND_GRFNODE: - nBorderThick = WriteGrfFlyFrame( rFmt, rShapeId = GenerateShapeId() ); + nBorderThick = WriteGrfFlyFrame( rFormat, rShapeId = GenerateShapeId() ); break; case ND_OLENODE: - nBorderThick = WriteOLEFlyFrame( rFmt, rShapeId = GenerateShapeId() ); + nBorderThick = WriteOLEFlyFrame( rFormat, rShapeId = GenerateShapeId() ); break; default: - if (const SdrObject* pObj = rFmt.FindRealSdrObject()) + if (const SdrObject* pObj = rFormat.FindRealSdrObject()) { // check for the first in a Chain - sal_uInt32 nTxtId; + sal_uInt32 nTextId; sal_uInt16 nOff = 0; - const SwFrmFmt* pFmt = &rFmt, *pPrev; - while( 0 != ( pPrev = pFmt->GetChain().GetPrev() )) + const SwFrameFormat* pFormat = &rFormat, *pPrev; + while( 0 != ( pPrev = pFormat->GetChain().GetPrev() )) { ++nOff; - pFmt = pPrev; + pFormat = pPrev; } - rShapeId = GetFlyShapeId(rFmt, rObj.mnHdFtIndex, rPVec); + rShapeId = GetFlyShapeId(rFormat, rObj.mnHdFtIndex, rPVec); if( !nOff ) { - nTxtId = pTxtBxs->GetPos( pObj ); - if( USHRT_MAX == nTxtId ) + nTextId = pTextBxs->GetPos( pObj ); + if( USHRT_MAX == nTextId ) { - pTxtBxs->Append( *pObj, rShapeId ); - nTxtId = pTxtBxs->Count(); + pTextBxs->Append( *pObj, rShapeId ); + nTextId = pTextBxs->Count(); } else - ++nTxtId; + ++nTextId; } else { - const SdrObject* pPrevObj = pFmt->FindRealSdrObject(); - nTxtId = pTxtBxs->GetPos( pPrevObj ); - if( USHRT_MAX == nTxtId ) + const SdrObject* pPrevObj = pFormat->FindRealSdrObject(); + nTextId = pTextBxs->GetPos( pPrevObj ); + if( USHRT_MAX == nTextId ) { sal_uInt32 nPrevShapeId = - GetFlyShapeId(*pFmt, rObj.mnHdFtIndex, rPVec); - pTxtBxs->Append( *pPrevObj, nPrevShapeId ); - nTxtId = pTxtBxs->Count(); + GetFlyShapeId(*pFormat, rObj.mnHdFtIndex, rPVec); + pTextBxs->Append( *pPrevObj, nPrevShapeId ); + nTextId = pTextBxs->Count(); } else - ++nTxtId; + ++nTextId; } - nTxtId *= 0x10000; - nTxtId += nOff; + nTextId *= 0x10000; + nTextId += nOff; - nBorderThick = WriteTxtFlyFrame(rObj, rShapeId, nTxtId, rPVec); + nBorderThick = WriteTextFlyFrame(rObj, rShapeId, nTextId, rPVec); } //In browse mode the sdr object doesn't always exist. For example, the //object is in the hidden header/footer. We save the fmt directly //in such cases; we copy most of the logic from the block above - const bool bBrowseMode = (rFmt.getIDocumentSettingAccess())->get(DocumentSettingId::BROWSE_MODE); - if( bBrowseMode && rFmt.GetDoc()) + const bool bBrowseMode = (rFormat.getIDocumentSettingAccess())->get(DocumentSettingId::BROWSE_MODE); + if( bBrowseMode && rFormat.GetDoc()) { - if( !rFmt.GetChain().GetPrev() )//obj in header/footer? + if( !rFormat.GetChain().GetPrev() )//obj in header/footer? { - rShapeId = GetFlyShapeId(rFmt, rObj.mnHdFtIndex, rPVec); - pTxtBxs->Append( &rFmt, rShapeId ); - sal_uInt32 nTxtId = pTxtBxs->Count(); + rShapeId = GetFlyShapeId(rFormat, rObj.mnHdFtIndex, rPVec); + pTextBxs->Append( &rFormat, rShapeId ); + sal_uInt32 nTextId = pTextBxs->Count(); - nTxtId *= 0x10000; - nBorderThick = WriteTxtFlyFrame(rObj, rShapeId, nTxtId, rPVec); + nTextId *= 0x10000; + nBorderThick = WriteTextFlyFrame(rObj, rShapeId, nTextId, rPVec); } } @@ -2934,7 +2934,7 @@ sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId, return nBorderThick; } -sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex, +sal_uInt16 FindPos(const SwFrameFormat &rFormat, unsigned int nHdFtIndex, DrawObjPointerVector &rPVec) { DrawObjPointerIter aEnd = rPVec.end(); @@ -2946,7 +2946,7 @@ sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex, continue; if ( nHdFtIndex == pObj->mnHdFtIndex && - &rFmt == (&pObj->maCntnt.GetFrmFmt()) + &rFormat == (&pObj->maContent.GetFrameFormat()) ) { return static_cast< sal_uInt16 >(aIter - rPVec.begin()); @@ -2955,10 +2955,10 @@ sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex, return USHRT_MAX; } -sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, - sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec) +sal_Int32 SwEscherEx::WriteTextFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, + sal_uInt32 nTextBox, DrawObjPointerVector &rPVec) { - const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt(); + const SwFrameFormat &rFormat = rObj.maContent.GetFrameFormat(); short nDirection = rObj.mnDirection; sal_Int32 nBorderThick=0; @@ -2966,14 +2966,14 @@ sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, AddShape( ESCHER_ShpInst_TextBox, 0xa00, nShapeId ); EscherPropertyContainer aPropOpt; - aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTxtBox); - if (const SwFrmFmt *pNext = rFmt.GetChain().GetNext()) + aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTextBox); + if (const SwFrameFormat *pNext = rFormat.GetChain().GetNext()) { sal_uInt16 nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec); if (USHRT_MAX != nPos && aFollowShpIds[nPos]) aPropOpt.AddOpt(ESCHER_Prop_hspNext, aFollowShpIds[nPos]); } - nBorderThick = WriteFlyFrameAttr( rFmt, mso_sptTextBox, aPropOpt ); + nBorderThick = WriteFlyFrameAttr( rFormat, mso_sptTextBox, aPropOpt ); MSO_TextFlow nFlow; @@ -2998,9 +2998,9 @@ sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId, aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFmt ); + WriteFrmExtraData( rFormat ); - AddAtom( 4, ESCHER_ClientTextbox ); GetStream().WriteUInt32( nTxtBox ); + AddAtom( 4, ESCHER_ClientTextbox ); GetStream().WriteUInt32( nTextBox ); CloseContainer(); // ESCHER_SpContainer return nBorderThick; @@ -3031,9 +3031,9 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt, rPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 ); } -void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId ) +void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShapeId ) { - if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject()) + if (const SdrObject* pSdrObj = rFormat.FindRealSdrObject()) { OpenContainer( ESCHER_SpContainer ); @@ -3051,11 +3051,11 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId ) WriteOLEPicture(aPropOpt, 0xa00 | SHAPEFLAG_OLESHAPE, aGraphic, *pSdrObj, nShapeId, NULL ); - WriteFlyFrameAttr( rFmt, mso_sptPictureFrame , aPropOpt ); + WriteFlyFrameAttr( rFormat, mso_sptPictureFrame , aPropOpt ); aPropOpt.Commit( GetStream() ); // store anchor attribute - WriteFrmExtraData( rFmt ); + WriteFrmExtraData( rFormat ); CloseContainer(); // ESCHER_SpContainer } @@ -3071,12 +3071,12 @@ void SwEscherEx::MakeZOrderArrAndFollowIds( for (size_t n = 0; n < rDstArr.size(); ++n) { - const SwFrmFmt &rFmt = rDstArr[n]->maCntnt.GetFrmFmt(); + const SwFrameFormat &rFormat = rDstArr[n]->maContent.GetFrameFormat(); bool bNeedsShapeId = false; - if (RES_FLYFRMFMT == rFmt.Which()) + if (RES_FLYFRMFMT == rFormat.Which()) { - const SwFmtChain &rChain = rFmt.GetChain(); + const SwFormatChain &rChain = rFormat.GetChain(); if (rChain.GetPrev() || rChain.GetNext()) bNeedsShapeId = true; } @@ -3087,10 +3087,10 @@ void SwEscherEx::MakeZOrderArrAndFollowIds( } } -sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt, +sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrameFormat& rFormat, unsigned int nHdFtIndex, DrawObjPointerVector &rpVec) { - sal_uInt16 nPos = FindPos(rFmt, nHdFtIndex, rpVec); + sal_uInt16 nPos = FindPos(rFormat, nHdFtIndex, rpVec); sal_uInt32 nShapeId; if (USHRT_MAX != nPos) { @@ -3111,8 +3111,8 @@ sal_uInt32 SwEscherEx::QueryTextID( sal_uInt32 nId = 0; if (SdrObject* pObj = GetSdrObjectFromXShape(xXShapeRef)) { - pTxtBxs->Append( *pObj, nShapeId ); - nId = pTxtBxs->Count(); + pTextBxs->Append( *pObj, nShapeId ); + nId = pTextBxs->Count(); nId *= 0x10000; } return nId; @@ -3188,9 +3188,9 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFo sal_uInt8 *pData = aSpecOLE+2; Set_UInt32(pData,nObjId ); - OUString sFld = FieldString(ww::eCONTROL) + "Forms." + sUName + ".1 \\s "; + OUString sField = FieldString(ww::eCONTROL) + "Forms." + sUName + ".1 \\s "; - rWW8Wrt.OutputField(0, ww::eCONTROL, sFld, + rWW8Wrt.OutputField(0, ww::eCONTROL, sField, WRITEFIELD_START|WRITEFIELD_CMD_START|WRITEFIELD_CMD_END); rWW8Wrt.m_pChpPlc->AppendFkpEntry(rWW8Wrt.Strm().Tell(),sizeof(aSpecOLE), diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 2cc8ea741b6b..64919a112ab9 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -176,17 +176,17 @@ void SwWW8AttrIter::IterToCurrent() mbCharIsRTL = maCharRunIter->mbRTL; } -SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) : +SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTextNode& rTextNd) : MSWordAttrIter(rWr), - rNd(rTxtNd), - maCharRuns(GetPseudoCharRuns(rTxtNd, 0, !rWr.SupportsUnicode())), + rNd(rTextNd), + maCharRuns(GetPseudoCharRuns(rTextNd, 0, !rWr.SupportsUnicode())), pCurRedline(0), nAktSwPos(0), nCurRedlinePos(USHRT_MAX), - mrSwFmtDrop(rTxtNd.GetSwAttrSet().GetDrop()) + mrSwFormatDrop(rTextNd.GetSwAttrSet().GetDrop()) { - SwPosition aPos(rTxtNd); + SwPosition aPos(rTextNd); if (FRMDIR_HORI_RIGHT_TOP == rWr.m_pDoc->GetTextDirection(aPos)) mbParaIsRTL = true; else @@ -216,9 +216,9 @@ SwWW8AttrIter::SwWW8AttrIter(MSWordExportBase& rWr, const SwTxtNode& rTxtNd) : maFlyIter = maFlyFrms.begin(); - if ( !m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().empty() ) + if ( !m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) { - SwPosition aPosition( rNd, SwIndex( const_cast<SwTxtNode*>(&rNd) ) ); + SwPosition aPosition( rNd, SwIndex( const_cast<SwTextNode*>(&rNd) ) ); pCurRedline = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedline( aPosition, &nCurRedlinePos ); } @@ -239,10 +239,10 @@ sal_Int32 lcl_getMinPos( sal_Int32 pos1, sal_Int32 pos2 ) sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) { - const OUString aTxt = rNd.GetTxt(); - sal_Int32 fieldEndPos = aTxt.indexOf(CH_TXT_ATR_FIELDEND, nStartPos); - sal_Int32 fieldStartPos = aTxt.indexOf(CH_TXT_ATR_FIELDSTART, nStartPos); - sal_Int32 formElementPos = aTxt.indexOf(CH_TXT_ATR_FORMELEMENT, nStartPos); + const OUString aText = rNd.GetText(); + sal_Int32 fieldEndPos = aText.indexOf(CH_TXT_ATR_FIELDEND, nStartPos); + sal_Int32 fieldStartPos = aText.indexOf(CH_TXT_ATR_FIELDSTART, nStartPos); + sal_Int32 formElementPos = aText.indexOf(CH_TXT_ATR_FORMELEMENT, nStartPos); const sal_Int32 pos = lcl_getMinPos( lcl_getMinPos( fieldEndPos, fieldStartPos ), @@ -264,16 +264,16 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) } } - if ( nCurRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size() ) + if ( nCurRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size() ) { // nCurRedlinePos point to the next redline sal_uInt16 nRedLinePos = nCurRedlinePos; if( pCurRedline ) ++nRedLinePos; - for ( ; nRedLinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nRedLinePos ) + for ( ; nRedLinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedLinePos ) { - const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nRedLinePos ]; + const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedLinePos ]; const SwPosition* pStt = pRedl->Start(); const SwPosition* pEnd = pStt == pRedl->GetPoint() @@ -300,19 +300,19 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) } } - if (mrSwFmtDrop.GetWholeWord() && nStartPos <= rNd.GetDropLen(0)) + if (mrSwFormatDrop.GetWholeWord() && nStartPos <= rNd.GetDropLen(0)) nMinPos = rNd.GetDropLen(0); - else if(nStartPos <= mrSwFmtDrop.GetChars()) - nMinPos = mrSwFmtDrop.GetChars(); + else if(nStartPos <= mrSwFormatDrop.GetChars()) + nMinPos = mrSwFormatDrop.GetChars(); - if(const SwpHints* pTxtAttrs = rNd.GetpSwpHints()) + if(const SwpHints* pTextAttrs = rNd.GetpSwpHints()) { -// can be optimized if we consider that the TxtAttrs are sorted by start position. +// can be optimized if we consider that the TextAttrs are sorted by start position. // but then we'd have to save 2 indices - for( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; sal_Int32 nPos = pHt->GetStart(); // first Attr characters if( nPos >= nStartPos && nPos <= nMinPos ) nMinPos = nPos; @@ -355,7 +355,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) if (nPos >= nStartPos && nPos <= nMinPos) nMinPos = nPos; - if (maFlyIter->GetFrmFmt().GetAnchor().GetAnchorId() == FLY_AT_CHAR) + if (maFlyIter->GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR) { ++nPos; if (nPos >= nStartPos && nPos <= nMinPos) @@ -393,7 +393,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) sal_uInt16 nFontId = GetWhichOfScript( RES_CHRATR_FONT, GetScript() ); const SvxFontItem &rParentFont = ItemGet<SvxFontItem>( - static_cast<const SwTxtFmtColl&>(rNd.GetAnyFmtColl()), nFontId); + static_cast<const SwTextFormatColl&>(rNd.GetAnyFormatColl()), nFontId); const SvxFontItem *pFont = &rParentFont; const SfxPoolItem *pGrabBag = 0; @@ -415,11 +415,11 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) //The additional hard formatting properties that affect this range in the //paragraph sw::PoolItems aRangeItems; - if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints()) + if (const SwpHints* pTextAttrs = rNd.GetpSwpHints()) { - for( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; const sal_Int32* pEnd = pHt->End(); if (pEnd ? ( nSwPos >= pHt->GetStart() && nSwPos < *pEnd) @@ -428,8 +428,8 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) sal_uInt16 nWhich = pHt->GetAttr().Which(); if (nWhich == RES_TXTATR_AUTOFMT) { - const SwFmtAutoFmt& rAutoFmt = static_cast<const SwFmtAutoFmt&>(pHt->GetAttr()); - const std::shared_ptr<SfxItemSet> pSet = rAutoFmt.GetStyleHandle(); + const SwFormatAutoFormat& rAutoFormat = static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()); + const std::shared_ptr<SfxItemSet> pSet = rAutoFormat.GetStyleHandle(); SfxWhichIter aIter( *pSet ); const SfxPoolItem* pItem; sal_uInt16 nWhichId = aIter.FirstWhich(); @@ -457,13 +457,13 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) /* For #i24291# we need to explicitly remove any properties from the - aExportSet which a SwCharFmt would override, we can't rely on word doing + aExportSet which a SwCharFormat would override, we can't rely on word doing this for us like writer does */ - const SwFmtCharFmt *pCharFmtItem = - HasItem< SwFmtCharFmt >( aRangeItems, RES_TXTATR_CHARFMT ); - if ( pCharFmtItem ) - ClearOverridesFromSet( *pCharFmtItem, aExportSet ); + const SwFormatCharFormat *pCharFormatItem = + HasItem< SwFormatCharFormat >( aRangeItems, RES_TXTATR_CHARFMT ); + if ( pCharFormatItem ) + ClearOverridesFromSet( *pCharFormatItem, aExportSet ); sw::PoolItems aExportItems; GetPoolItems( aExportSet, aExportItems, false ); @@ -480,15 +480,15 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) if ( !aExportItems.empty() ) { - const SwModify* pOldMod = m_rExport.m_pOutFmtNode; - m_rExport.m_pOutFmtNode = &rNd; + const SwModify* pOldMod = m_rExport.m_pOutFormatNode; + m_rExport.m_pOutFormatNode = &rNd; m_rExport.m_aCurrentCharPropStarts.push( nSwPos ); m_rExport.ExportPoolItemsToCHP( aExportItems, GetScript() ); // HasTextItem only allowed in the above range m_rExport.m_aCurrentCharPropStarts.pop(); - m_rExport.m_pOutFmtNode = pOldMod; + m_rExport.m_pOutFormatNode = pOldMod; } if( rNd.GetpSwpHints() == 0 ) @@ -528,7 +528,7 @@ bool SwWW8AttrIter::IsWatermarkFrame() while ( maFlyIter != maFlyFrms.end() ) { - const SdrObject* pSdrObj = maFlyIter->GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = maFlyIter->GetFrameFormat().FindRealSdrObject(); if (pSdrObj) { @@ -575,14 +575,14 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) if ( nPos != nSwPos ) return FLY_NOT_PROCESSED ; //We havent processed the fly - const SdrObject* pSdrObj = maFlyIter->GetFrmFmt().FindRealSdrObject(); + const SdrObject* pSdrObj = maFlyIter->GetFrameFormat().FindRealSdrObject(); if (pSdrObj) { if (VMLExport::IsWaterMarkShape(pSdrObj->GetName())) { // This is a watermark object. Should be written ONLY in the header - if(m_rExport.m_nTxtTyp == TXT_HDFT) + if(m_rExport.m_nTextTyp == TXT_HDFT) { // Should write a watermark in the header m_rExport.AttrOutput().OutputFlyFrame( *maFlyIter ); @@ -608,14 +608,14 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) return ( m_rExport.AttrOutput().IsFlyProcessingPostponed() ? FLY_POSTPONED : FLY_PROCESSED ) ; } -bool SwWW8AttrIter::IsTxtAttr( sal_Int32 nSwPos ) +bool SwWW8AttrIter::IsTextAttr( sal_Int32 nSwPos ) { // search for attrs with dummy character or content - if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints()) + if (const SwpHints* pTextAttrs = rNd.GetpSwpHints()) { - for (size_t i = 0; i < pTxtAttrs->Count(); ++i) + for (size_t i = 0; i < pTextAttrs->Count(); ++i) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; if ( ( pHt->HasDummyChar() || pHt->HasContent() ) && (pHt->GetStart() == nSwPos) ) { @@ -630,8 +630,8 @@ bool SwWW8AttrIter::IsTxtAttr( sal_Int32 nSwPos ) bool SwWW8AttrIter::IsDropCap( int nSwPos ) { // see if the current position falls on a DropCap - int nDropChars = mrSwFmtDrop.GetChars(); - bool bWholeWord = mrSwFmtDrop.GetWholeWord(); + int nDropChars = mrSwFormatDrop.GetChars(); + bool bWholeWord = mrSwFormatDrop.GetWholeWord(); if (bWholeWord) { const sal_Int32 nWordLen = rNd.GetDropLen(0); @@ -666,13 +666,13 @@ bool SwWW8AttrIter::RequiresImplicitBookmark() const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const { const SfxPoolItem* pRet = 0; - const SwpHints* pTxtAttrs = rNd.GetpSwpHints(); - if (pTxtAttrs && !m_rExport.m_aCurrentCharPropStarts.empty()) + const SwpHints* pTextAttrs = rNd.GetpSwpHints(); + if (pTextAttrs && !m_rExport.m_aCurrentCharPropStarts.empty()) { const sal_Int32 nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top(); - for (size_t i = 0; i < pTxtAttrs->Count(); ++i) + for (size_t i = 0; i < pTextAttrs->Count(); ++i) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; const SfxPoolItem* pItem = &pHt->GetAttr(); const sal_Int32 * pAtrEnd = 0; if( 0 != ( pAtrEnd = pHt->End() ) && // only Attr with an end @@ -687,7 +687,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const RES_TXTATR_CHARFMT == pHt->Which() || RES_TXTATR_AUTOFMT == pHt->Which() ) { - const SfxItemSet* pSet = CharFmt::GetItemSet( pHt->GetAttr() ); + const SfxItemSet* pSet = CharFormat::GetItemSet( pHt->GetAttr() ); const SfxPoolItem* pCharItem; if ( pSet && SfxItemState::SET == pSet->GetItemState( nWhich, pHt->Which() != RES_TXTATR_AUTOFMT, &pCharItem ) ) @@ -712,10 +712,10 @@ void WW8Export::GetCurrentItems(ww::bytes &rItems) const const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const { const SfxPoolItem* pRet = HasTextItem(nWhich); - return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich); + return pRet ? *pRet : rNd.SwContentNode::GetAttr(nWhich); } -void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 /*nPos*/, const SwFmtRuby& rRuby ) +void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/, const SwFormatRuby& rRuby ) { OUString aStr( FieldString( ww::eEQ ) ); aStr += "\\* jc"; @@ -761,17 +761,17 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 /*nPos*/, else nRubyScript = i18n::ScriptType::ASIAN; - const SwTxtRuby* pRubyTxt = rRuby.GetTxtRuby(); - const SwCharFmt* pFmt = pRubyTxt ? pRubyTxt->GetCharFmt() : 0; + const SwTextRuby* pRubyText = rRuby.GetTextRuby(); + const SwCharFormat* pFormat = pRubyText ? pRubyText->GetCharFormat() : 0; OUString sFamilyName; long nHeight; - if ( pFmt ) + if ( pFormat ) { - const SvxFontItem &rFont = ItemGet< SvxFontItem >( *pFmt, + const SvxFontItem &rFont = ItemGet< SvxFontItem >( *pFormat, GetWhichOfScript(RES_CHRATR_FONT,nRubyScript) ); sFamilyName = rFont.GetFamilyName(); - const SvxFontHeightItem &rHeight = ItemGet< SvxFontHeightItem >( *pFmt, + const SvxFontHeightItem &rHeight = ItemGet< SvxFontHeightItem >( *pFormat, GetWhichOfScript( RES_CHRATR_FONTSIZE, nRubyScript ) ); nHeight = rHeight.GetHeight(); } @@ -804,8 +804,8 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, sal_Int32 /*nPos*/, aStr += "(\\s\\up "; if ( g_pBreakIt->GetBreakIter().is() ) - nRubyScript = g_pBreakIt->GetBreakIter()->getScriptType( rNode.GetTxt(), - pRubyTxt->GetStart() ); + nRubyScript = g_pBreakIt->GetBreakIter()->getScriptType( rNode.GetText(), + pRubyText->GetStart() ); else nRubyScript = i18n::ScriptType::ASIAN; @@ -941,7 +941,7 @@ bool WW8AttributeOutput::StartURL( const OUString &rUrl, const OUString &rTarget 0x06, 0x08, 0x01, // sprmCFData 0x55, 0x08, 0x01, // sprmCFSpec - 0x02, 0x08, 0x01 // sprmCFFldVanish + 0x02, 0x08, 0x01 // sprmCFFieldVanish }; sal_uInt8* pDataAdr = aArr1 + 2; Set_UInt32( pDataAdr, nDataStt ); @@ -1096,21 +1096,21 @@ OUString BookmarkToWriter(const OUString &rBookmark) INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_ASCII_US); } -void SwWW8AttrIter::OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool) +void SwWW8AttrIter::OutSwFormatRefMark(const SwFormatRefMark& rAttr, bool) { if ( m_rExport.HasRefToObject( REF_SETREFATTR, &rAttr.GetRefName(), 0 ) ) m_rExport.AppendBookmark( MSWordExportBase::GetBookmarkName( REF_SETREFATTR, &rAttr.GetRefName(), 0 )); } -void WW8AttributeOutput::FieldVanish( const OUString& rTxt, ww::eField /*eType*/ ) +void WW8AttributeOutput::FieldVanish( const OUString& rText, ww::eField /*eType*/ ) { ww::bytes aItems; m_rWW8Export.GetCurrentItems( aItems ); - // sprmCFFldVanish + // sprmCFFieldVanish if ( m_rWW8Export.bWrtWW8 ) - SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish ); + SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFieldVanish ); else aItems.push_back( 67 ); aItems.push_back( 1 ); @@ -1127,7 +1127,7 @@ void WW8AttributeOutput::FieldVanish( const OUString& rTxt, ww::eField /*eType*/ m_rWW8Export.WriteChar( '\x13' ); m_rWW8Export.m_pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), aItems.size(), aItems.data() ); - m_rWW8Export.OutSwString( rTxt, 0, rTxt.getLength(), m_rWW8Export.IsUnicode(), + m_rWW8Export.OutSwString( rText, 0, rText.getLength(), m_rWW8Export.IsUnicode(), RTL_TEXTENCODING_MS_1252 ); m_rWW8Export.m_pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), nStt_sprmCFSpec, aItems.data() ); @@ -1136,21 +1136,21 @@ void WW8AttributeOutput::FieldVanish( const OUString& rTxt, ww::eField /*eType*/ aItems.data() ); } -void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAttr ) +void AttributeOutputBase::TOXMark( const SwTextNode& rNode, const SwTOXMark& rAttr ) { // it's a field; so get the Text form the Node and build the field - OUString sTxt; + OUString sText; ww::eField eType = ww::eNONE; - const SwTxtTOXMark& rTxtTOXMark = *rAttr.GetTxtTOXMark(); - const sal_Int32* pTxtEnd = rTxtTOXMark.End(); - if ( pTxtEnd ) // has range? + const SwTextTOXMark& rTextTOXMark = *rAttr.GetTextTOXMark(); + const sal_Int32* pTextEnd = rTextTOXMark.End(); + if ( pTextEnd ) // has range? { - sTxt = rNode.GetExpandTxt( rTxtTOXMark.GetStart(), - *pTxtEnd - rTxtTOXMark.GetStart() ); + sText = rNode.GetExpandText( rTextTOXMark.GetStart(), + *pTextEnd - rTextTOXMark.GetStart() ); } else - sTxt = rAttr.GetAlternativeText(); + sText = rAttr.GetAlternativeText(); switch ( rAttr.GetTOXType()->GetType() ) { @@ -1160,26 +1160,26 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt { if ( !rAttr.GetSecondaryKey().isEmpty() ) { - sTxt = rAttr.GetSecondaryKey() + ":" + sTxt; + sText = rAttr.GetSecondaryKey() + ":" + sText; } - sTxt = rAttr.GetPrimaryKey() + ":" + sTxt; + sText = rAttr.GetPrimaryKey() + ":" + sText; } - sTxt = " XE \"" + sTxt + "\" "; + sText = " XE \"" + sText + "\" "; break; case TOX_USER: - sTxt += "\" \\f \"" + OUString((sal_Char)( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) )); + sText += "\" \\f \"" + OUString((sal_Char)( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) )); // fall through - no break; case TOX_CONTENT: { eType = ww::eTC; - sTxt = " TC \"" + sTxt; + sText = " TC \"" + sText; sal_uInt16 nLvl = rAttr.GetLevel(); if (nLvl > WW8ListManager::nMaxLevel) nLvl = WW8ListManager::nMaxLevel; - sTxt += "\" \\l " + OUString::number(nLvl) + " "; + sText += "\" \\l " + OUString::number(nLvl) + " "; } break; default: @@ -1187,27 +1187,27 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt break; } - if (!sTxt.isEmpty()) - FieldVanish( sTxt, eType ); + if (!sText.isEmpty()) + FieldVanish( sText, eType ); } int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos) { int nRet = 0; - if ( const SwpHints* pTxtAttrs = rNd.GetpSwpHints() ) + if ( const SwpHints* pTextAttrs = rNd.GetpSwpHints() ) { m_rExport.m_aCurrentCharPropStarts.push( nPos ); const sal_Int32* pEnd; - for ( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for ( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; const SfxPoolItem* pItem = &pHt->GetAttr(); switch ( pItem->Which() ) { case RES_TXTATR_INETFMT: if ( nPos == pHt->GetStart() ) { - const SwFmtINetFmt *rINet = static_cast< const SwFmtINetFmt* >( pItem ); + const SwFormatINetFormat *rINet = static_cast< const SwFormatINetFormat* >( pItem ); if ( m_rExport.AttrOutput().StartURL( rINet->GetValue(), rINet->GetTargetFrame() ) ) ++nRet; } @@ -1220,12 +1220,12 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos) case RES_TXTATR_REFMARK: if ( nPos == pHt->GetStart() ) { - OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), true ); + OutSwFormatRefMark( *static_cast< const SwFormatRefMark* >( pItem ), true ); ++nRet; } if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd ) { - OutSwFmtRefMark( *static_cast< const SwFmtRefMark* >( pItem ), false ); + OutSwFormatRefMark( *static_cast< const SwFormatRefMark* >( pItem ), false ); --nRet; } break; @@ -1236,7 +1236,7 @@ int SwWW8AttrIter::OutAttrWithRange(sal_Int32 nPos) case RES_TXTATR_CJK_RUBY: if ( nPos == pHt->GetStart() ) { - m_rExport.AttrOutput().StartRuby( rNd, nPos, *static_cast< const SwFmtRuby* >( pItem ) ); + m_rExport.AttrOutput().StartRuby( rNd, nPos, *static_cast< const SwFormatRuby* >( pItem ) ); ++nRet; } if ( 0 != ( pEnd = pHt->End() ) && nPos == *pEnd ) @@ -1256,9 +1256,9 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons { // search next Redline for( sal_uInt16 nPos = nCurRedlinePos; - nPos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nPos ) + nPos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nPos ) { - const SwRangeRedline *pRange = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[nPos]; + const SwRangeRedline *pRange = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[nPos]; const SwPosition* pEnd = pRange->End(); const SwPosition* pStart = pRange->Start(); bool bBreak = true; @@ -1313,9 +1313,9 @@ const SwRedlineData* SwWW8AttrIter::GetParagraphLevelRedline( ) pCurRedline = NULL; // ToDo : this is not the most ideal ... should start maybe from 'nCurRedlinePos' - for( sal_uInt16 nRedlinePos = 0; nRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nRedlinePos ) + for( sal_uInt16 nRedlinePos = 0; nRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedlinePos ) { - const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nRedlinePos ]; + const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedlinePos ]; const SwPosition* pCheckedStt = pRedl->Start(); @@ -1367,10 +1367,10 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos ) if( !pCurRedline ) { // search next Redline - for( ; nCurRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); + for( ; nCurRedlinePos < m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nCurRedlinePos ) { - const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nCurRedlinePos ]; + const SwRangeRedline* pRedl = m_rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nCurRedlinePos ]; const SwPosition* pStt = pRedl->Start(); const SwPosition* pEnd = pStt == pRedl->GetPoint() @@ -1417,10 +1417,10 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos ) short MSWordExportBase::GetCurrentPageDirection() const { - const SwFrmFmt &rFmt = m_pAktPageDesc + const SwFrameFormat &rFormat = m_pAktPageDesc ? m_pAktPageDesc->GetMaster() : m_pDoc->GetPageDesc( 0 ).GetMaster(); - return rFmt.GetFrmDir().GetValue(); + return rFormat.GetFrmDir().GetValue(); } short MSWordExportBase::GetDefaultFrameDirection( ) const @@ -1429,19 +1429,19 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const if ( m_bOutPageDescs ) nDir = GetCurrentPageDirection( ); - else if ( m_pOutFmtNode ) + else if ( m_pOutFormatNode ) { if ( m_bOutFlyFrmAttrs ) //frame { - nDir = TrueFrameDirection( *static_cast< const SwFrmFmt * >(m_pOutFmtNode) ); + nDir = TrueFrameDirection( *static_cast< const SwFrameFormat * >(m_pOutFormatNode) ); } - else if ( m_pOutFmtNode->ISA( SwCntntNode ) ) //pagagraph + else if ( m_pOutFormatNode->ISA( SwContentNode ) ) //pagagraph { - const SwCntntNode *pNd = static_cast<const SwCntntNode *>(m_pOutFmtNode); + const SwContentNode *pNd = static_cast<const SwContentNode *>(m_pOutFormatNode); SwPosition aPos( *pNd ); nDir = m_pDoc->GetTextDirection( aPos ); } - else if ( m_pOutFmtNode->ISA( SwTxtFmtColl ) ) + else if ( m_pOutFormatNode->ISA( SwTextFormatColl ) ) { if ( MsLangId::isRightToLeft( static_cast<LanguageType>(GetAppLanguage())) ) nDir = FRMDIR_HORI_RIGHT_TOP; @@ -1462,27 +1462,27 @@ short MSWordExportBase::GetDefaultFrameDirection( ) const return nDir; } -short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const +short MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFlyFormat ) const { - const SwFrmFmt *pFlyFmt = &rFlyFmt; + const SwFrameFormat *pFlyFormat = &rFlyFormat; const SvxFrameDirectionItem* pItem = 0; - while ( pFlyFmt ) + while ( pFlyFormat ) { - pItem = &pFlyFmt->GetFrmDir(); + pItem = &pFlyFormat->GetFrmDir(); if ( FRMDIR_ENVIRONMENT == pItem->GetValue() ) { pItem = 0; - const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor(); + const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor(); if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && - pAnchor->GetCntntAnchor() ) + pAnchor->GetContentAnchor() ) { - pFlyFmt = pAnchor->GetCntntAnchor()->nNode.GetNode().GetFlyFmt(); + pFlyFormat = pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat(); } else - pFlyFmt = 0; + pFlyFormat = 0; } else - pFlyFmt = 0; + pFlyFormat = 0; } short nRet; @@ -1497,13 +1497,13 @@ short MSWordExportBase::TrueFrameDirection( const SwFrmFmt &rFlyFmt ) const const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const { - const SwFrmFmt &rFmt = m_pAktPageDesc + const SwFrameFormat &rFormat = m_pAktPageDesc ? m_pAktPageDesc->GetMaster() : m_pDoc->GetPageDesc(0).GetMaster(); const SfxPoolItem* pItem = 0; //If not set, or "no fill", get real bg - SfxItemState eState = rFmt.GetItemState(RES_BACKGROUND, true, &pItem); + SfxItemState eState = rFormat.GetItemState(RES_BACKGROUND, true, &pItem); const SvxBrushItem* pRet = static_cast<const SvxBrushItem*>(pItem); if (SfxItemState::SET != eState || !pRet || (!pRet->GetGraphic() && @@ -1514,34 +1514,34 @@ const SvxBrushItem* WW8Export::GetCurrentPageBgBrush() const return pRet; } -SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const +SvxBrushItem WW8Export::TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const { - const SwFrmFmt *pFlyFmt = &rFlyFmt; + const SwFrameFormat *pFlyFormat = &rFlyFormat; const SvxBrushItem* pRet = 0; - while (pFlyFmt) + while (pFlyFormat) { //If not set, or "no fill", get real bg const SfxPoolItem* pItem = 0; SfxItemState eState = - pFlyFmt->GetItemState(RES_BACKGROUND, true, &pItem); + pFlyFormat->GetItemState(RES_BACKGROUND, true, &pItem); pRet = static_cast<const SvxBrushItem*>(pItem); if (SfxItemState::SET != eState || !pRet || (!pRet->GetGraphic() && pRet->GetColor() == COL_TRANSPARENT)) { pRet = 0; - const SwFmtAnchor* pAnchor = &pFlyFmt->GetAnchor(); + const SwFormatAnchor* pAnchor = &pFlyFormat->GetAnchor(); if ((FLY_AT_PAGE != pAnchor->GetAnchorId()) && - pAnchor->GetCntntAnchor()) + pAnchor->GetContentAnchor()) { - pFlyFmt = - pAnchor->GetCntntAnchor()->nNode.GetNode().GetFlyFmt(); + pFlyFormat = + pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat(); } else - pFlyFmt = 0; + pFlyFormat = 0; } else - pFlyFmt = 0; + pFlyFormat = 0; } if (!pRet) @@ -1624,35 +1624,35 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos, the track changes have to be analysed. A deletion, starting in paragraph A with style A, ending in paragraph B with style B, needs a hack. */ -static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTxtNode* pTxtNode ) +static SwTextFormatColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTextNode* pTextNode ) { sal_uInt16 nPos = 0; - sal_uInt16 nMax = rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); + sal_uInt16 nMax = rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); while( nPos < nMax ) { - const SwRangeRedline* pRedl = rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nPos++ ]; + const SwRangeRedline* pRedl = rExport.m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nPos++ ]; const SwPosition* pStt = pRedl->Start(); const SwPosition* pEnd = pStt == pRedl->GetPoint() ? pRedl->GetMark() : pRedl->GetPoint(); - // Looking for deletions, which ends in current pTxtNode + // Looking for deletions, which ends in current pTextNode if( nsRedlineType_t::REDLINE_DELETE == pRedl->GetRedlineData().GetType() && - pEnd->nNode == *pTxtNode && pStt->nNode != *pTxtNode && - pStt->nNode.GetNode().IsTxtNode() ) + pEnd->nNode == *pTextNode && pStt->nNode != *pTextNode && + pStt->nNode.GetNode().IsTextNode() ) { - pTxtNode = pStt->nNode.GetNode().GetTxtNode(); + pTextNode = pStt->nNode.GetNode().GetTextNode(); nMax = nPos; nPos = 0; } } - return static_cast<SwTxtFmtColl&>( pTxtNode->GetAnyFmtColl() ); + return static_cast<SwTextFormatColl&>( pTextNode->GetAnyFormatColl() ); } -void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle, +void WW8AttributeOutput::FormatDrop( const SwTextNode& rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) { - short nDropLines = rSwFmtDrop.GetLines(); - short nDistance = rSwFmtDrop.GetDistance(); + short nDropLines = rSwFormatDrop.GetLines(); + short nDistance = rSwFormatDrop.GetDistance(); int rFontHeight, rDropHeight, rDropDescent; SVBT16 nSty; @@ -1721,11 +1721,11 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS { if ( m_rWW8Export.bWrtWW8 ) { - const SwCharFmt *pSwCharFmt = rSwFmtDrop.GetCharFmt(); - if ( pSwCharFmt ) + const SwCharFormat *pSwCharFormat = rSwFormatDrop.GetCharFormat(); + if ( pSwCharFormat ) { m_rWW8Export.InsUInt16( NS_sprm::LN_CIstd ); - m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pSwCharFmt ) ); + m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pSwCharFormat ) ); } m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos ); // Lower the chars @@ -1736,11 +1736,11 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS } else { - const SwCharFmt *pSwCharFmt = rSwFmtDrop.GetCharFmt(); - if ( pSwCharFmt ) + const SwCharFormat *pSwCharFormat = rSwFormatDrop.GetCharFormat(); + if ( pSwCharFormat ) { m_rWW8Export.InsUInt16( 80 ); - m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pSwCharFmt ) ); + m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pSwCharFormat ) ); } m_rWW8Export.pO->push_back( 101 ); // Lower the chars @@ -1755,7 +1755,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS m_rWW8Export.pO->clear(); } -sal_Int32 MSWordExportBase::GetNextPos( SwWW8AttrIter* aAttrIter, const SwTxtNode& rNode, sal_Int32 nAktPos ) +sal_Int32 MSWordExportBase::GetNextPos( SwWW8AttrIter* aAttrIter, const SwTextNode& rNode, sal_Int32 nAktPos ) { // Get the bookmarks for the normal run const sal_Int32 nNextPos = aAttrIter->WhereNext(); @@ -1784,7 +1784,7 @@ void MSWordExportBase::UpdatePosition( SwWW8AttrIter* aAttrIter, sal_Int32 nAktP aAttrIter->NextPos(); } -bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, sal_Int32 nStt, +bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ) { IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); @@ -1820,7 +1820,7 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, sal_Int32 nStt, return ( rArr.size() > 0 ); } -bool MSWordExportBase::GetAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nStt, +bool MSWordExportBase::GetAnnotationMarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ) { IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); @@ -1932,7 +1932,7 @@ bool MSWordExportBase::NearestAnnotationMark( sal_Int32& rNearest, const sal_Int return bHasAnnotationMark; } -void MSWordExportBase::GetSortedAnnotationMarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void MSWordExportBase::GetSortedAnnotationMarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) { IMarkVector aMarksStart; if ( GetAnnotationMarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) @@ -1968,7 +1968,7 @@ void MSWordExportBase::GetSortedAnnotationMarks( const SwTxtNode& rNode, sal_Int } } -void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) +void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen ) { IMarkVector aMarksStart; if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarksStart ) ) @@ -2004,9 +2004,9 @@ void MSWordExportBase::GetSortedBookmarks( const SwTxtNode& rNode, sal_Int32 nAk } } -void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) +void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) { - SAL_INFO( "sw.ww8", "<OutWW8_SwTxtNode>" ); + SAL_INFO( "sw.ww8", "<OutWW8_SwTextNode>" ); ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo( m_pTableInfo->getTableNodeInfo( &rNode ) ); @@ -2020,10 +2020,10 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) bLastCR = true; } - // In order to make sure watermark is stored in 'header.xml', check nTxtTyp. + // In order to make sure watermark is stored in 'header.xml', check nTextTyp. // if it is document.xml, don't write the tags (watermark should be only in the 'header') SwWW8AttrIter aWatermarkAttrIter( *this, rNode ); - if (( TXT_HDFT != m_nTxtTyp) && aWatermarkAttrIter.IsWatermarkFrame()) + if (( TXT_HDFT != m_nTextTyp) && aWatermarkAttrIter.IsWatermarkFrame()) { return; } @@ -2058,7 +2058,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) { // check for end of TOX SwNodeIndex aIdx( rNode, 1 ); - if( !aIdx.GetNode().IsTxtNode() ) + if( !aIdx.GetNode().IsTextNode() ) { const SwSectionNode* pTOXSectNd = rNode.FindSectionNode(); if ( pTOXSectNd ) @@ -2078,7 +2078,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) AppendWordBookmark( sBkmkName ); } - OUString aStr( rNode.GetTxt() ); + OUString aStr( rNode.GetText() ); sal_Int32 nAktPos = 0; sal_Int32 const nEnd = aStr.getLength(); @@ -2101,7 +2101,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) bool bSingleEmptyRun = nAktPos == 0 && nNextAttr == 0; AttrOutput().StartRun( pRedlineData, bSingleEmptyRun ); - if( m_nTxtTyp == TXT_FTN || m_nTxtTyp == TXT_EDN ) + if( m_nTextTyp == TXT_FTN || m_nTextTyp == TXT_EDN ) AttrOutput().FootnoteEndnoteRefTag(); if( nNextAttr > nEnd ) @@ -2113,8 +2113,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) 2) Ensure that it is a text node and not in a fly. 3) If the anchor is associated with a text node with empty text then we ignore. */ - if ( rNode.IsTxtNode() && aStr != aStringForImage && !aStr.isEmpty() && - !rNode.GetFlyFmt() && aAttrIter.IsAnchorLinkedToThisNode(rNode.GetIndex())) + if ( rNode.IsTextNode() && aStr != aStringForImage && !aStr.isEmpty() && + !rNode.GetFlyFormat() && aAttrIter.IsAnchorLinkedToThisNode(rNode.GetIndex())) bPostponeWritingText = true ; nStateOfFlyFrame = aAttrIter.OutFlys( nAktPos ); @@ -2124,11 +2124,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) // position of this range AppendBookmarks( rNode, nAktPos, nNextAttr - nAktPos ); AppendAnnotationMarks( rNode, nAktPos, nNextAttr - nAktPos ); - bool bTxtAtr = aAttrIter.IsTxtAttr( nAktPos ); + bool bTextAtr = aAttrIter.IsTextAttr( nAktPos ); nOpenAttrWithRange += aAttrIter.OutAttrWithRange(nAktPos); sal_Int32 nLen = nNextAttr - nAktPos; - if ( !bTxtAtr && nLen ) + if ( !bTextAtr && nLen ) { sal_Unicode ch = aStr[nAktPos]; const sal_Int32 ofs = ( ch == CH_TXT_ATR_FIELDSTART || ch == CH_TXT_ATR_FIELDEND || ch == CH_TXT_ATR_FORMELEMENT? 1 : 0 ); @@ -2136,7 +2136,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) IDocumentMarkAccess* const pMarkAccess = m_pDoc->getIDocumentMarkAccess(); if ( ch == CH_TXT_ATR_FIELDSTART ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTextNode* >( &rNode ), nAktPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); @@ -2185,7 +2185,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } else if ( ch == CH_TXT_ATR_FIELDEND ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTextNode* >( &rNode ), nAktPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); @@ -2209,7 +2209,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } else if ( ch == CH_TXT_ATR_FORMELEMENT ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTextNode* >( &rNode ), nAktPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); @@ -2230,7 +2230,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) nLen -= ofs; OUString aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + ofs, nLen ) ); - if ( ( m_nTxtTyp == TXT_EDN || m_nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 ) + if ( ( m_nTextTyp == TXT_EDN || m_nTextTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 ) { // Insert tab for aesthetic purposes #i24762# if ( aSnippet[0] != 0x09 ) @@ -2250,7 +2250,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } if ( aAttrIter.IsDropCap( nNextAttr ) ) - AttrOutput().FormatDrop( rNode, aAttrIter.GetSwFmtDrop(), nStyle, pTextNodeInfo, pTextNodeInfoInner ); + AttrOutput().FormatDrop( rNode, aAttrIter.GetSwFormatDrop(), nStyle, pTextNodeInfo, pTextNodeInfoInner ); // Only output character attributes if this is not a postponed text run. if (0 != nEnd && !(bPostponeWritingText && FLY_PROCESSED == nStateOfFlyFrame)) @@ -2267,7 +2267,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if ( nNextAttr == nEnd ) { OSL_ENSURE( nOpenAttrWithRange >= 0, "odd to see this happening, expected >= 0" ); - if ( !bTxtAtr && nOpenAttrWithRange <= 0 ) + if ( !bTextAtr && nOpenAttrWithRange <= 0 ) { if ( aAttrIter.IncludeEndOfParaCRInRedlineProperties( nEnd ) ) bIncludeEndOfParaCRInRedlineProperties = true; @@ -2320,7 +2320,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) AttrOutput().OutputFKP(); - if (bTxtAtr || bAttrWithRange || bIncludeEndOfParaCRInRedlineProperties) + if (bTextAtr || bAttrWithRange || bIncludeEndOfParaCRInRedlineProperties) { // insert final graphic anchors if any before CR nStateOfFlyFrame = aAttrIter.OutFlys( nEnd ); @@ -2393,7 +2393,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) AttrOutput().ParagraphStyle( nStyle ); if ( m_pParentFrame && IsInTable() ) // Fly-Attrs - OutputFormat( m_pParentFrame->GetFrmFmt(), false, false, true ); + OutputFormat( m_pParentFrame->GetFrameFormat(), false, false, true ); if ( pTextNodeInfo.get() != NULL ) { @@ -2406,10 +2406,10 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) { const SwTable * pTable = pTextNodeInfoInner->getTable(); - const SwTableFmt* pTabFmt = pTable->GetFrmFmt(); - if (pTabFmt != NULL) + const SwTableFormat* pTabFormat = pTable->GetFrameFormat(); + if (pTabFormat != NULL) { - if (pTabFmt->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE) + if (pTabFormat->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE) AttrOutput().PageBreakBefore(true); } } @@ -2457,31 +2457,31 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) { const SwNumRule* pRule = rNode.GetNumRule(); sal_uInt8 nLvl = static_cast< sal_uInt8 >(nNumberLevel); - const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl ); - if( !pFmt ) - pFmt = &pRule->Get( nLvl ); + const SwNumFormat* pFormat = pRule->GetNumFormat( nLvl ); + if( !pFormat ) + pFormat = &pRule->Get( nLvl ); if( !pTmpSet ) pTmpSet = new SfxItemSet( rNode.GetSwAttrSet() ); SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*pTmpSet, RES_LR_SPACE)); // #i86652# - if ( pFmt->GetPositionAndSpaceMode() == + if ( pFormat->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetAbsLSpace() ); + aLR.SetTextLeft( aLR.GetTextLeft() + pFormat->GetAbsLSpace() ); } if( rNode.IsNumbered() && rNode.IsCountedInList() ) { // #i86652# - if ( pFmt->GetPositionAndSpaceMode() == + if ( pFormat->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { if (bParaRTL) - aLR.SetTxtFirstLineOfstValue(pFmt->GetAbsLSpace() - pFmt->GetFirstLineOffset()); + aLR.SetTextFirstLineOfstValue(pFormat->GetAbsLSpace() - pFormat->GetFirstLineOffset()); else - aLR.SetTxtFirstLineOfst(GetWordFirstLineOffset(*pFmt)); + aLR.SetTextFirstLineOfst(GetWordFirstLineOffset(*pFormat)); } // correct fix for issue i94187 @@ -2496,7 +2496,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) // Put indent values into the itemset in case that the list // style is applied via paragraph style and the list level // indent values are not applicable. - if ( pFmt->GetPositionAndSpaceMode() == + if ( pFormat->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && !rNode.AreListLevelIndentsApplicable() ) { @@ -2508,7 +2508,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) pTmpSet->ClearItem(RES_PARATR_NUMRULE); // #i86652# - if ( pFmt->GetPositionAndSpaceMode() == + if ( pFormat->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { pTmpSet->Put(aLR); @@ -2516,11 +2516,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) //#i21847# SvxTabStopItem aItem( ItemGet<SvxTabStopItem>(*pTmpSet, RES_PARATR_TABSTOP)); - SvxTabStop aTabStop(pFmt->GetAbsLSpace()); + SvxTabStop aTabStop(pFormat->GetAbsLSpace()); aItem.Insert(aTabStop); pTmpSet->Put(aItem); - MSWordExportBase::CorrectTabStopInSet(*pTmpSet, pFmt->GetAbsLSpace()); + MSWordExportBase::CorrectTabStopInSet(*pTmpSet, pFormat->GetAbsLSpace()); } } @@ -2577,18 +2577,18 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if (nLevel >= MAXLEVEL) nLevel = MAXLEVEL - 1; - const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(nLevel) ); + const SwNumFormat& rNumFormat = pRule->Get( static_cast< sal_uInt16 >(nLevel) ); // #i86652# - if ( rNumFmt.GetPositionAndSpaceMode() == + if ( rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - aLRSpace.SetTxtLeft( aLRSpace.GetLeft() + rNumFmt.GetAbsLSpace() ); + aLRSpace.SetTextLeft( aLRSpace.GetLeft() + rNumFormat.GetAbsLSpace() ); // new first line indent = 0 // (first line indent is ignored for NO_NUMLEVEL) if (!bParaRTL) - aLRSpace.SetTxtFirstLineOfst( 0 ); + aLRSpace.SetTextFirstLineOfst( 0 ); // put back the new item pTmpSet->Put( aLRSpace ); @@ -2608,8 +2608,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if ( !rNode.GetpSwAttrSet() || SfxItemState::SET != rNode.GetpSwAttrSet()->GetItemState(RES_BREAK, false) ) { - const SvxFmtBreakItem* pBreakAtParaStyle = - &(ItemGet<SvxFmtBreakItem>(rNode.GetSwAttrSet(), RES_BREAK)); + const SvxFormatBreakItem* pBreakAtParaStyle = + &(ItemGet<SvxFormatBreakItem>(rNode.GetSwAttrSet(), RES_BREAK)); if ( pBreakAtParaStyle && pBreakAtParaStyle->GetBreak() == SVX_BREAK_PAGE_AFTER ) { @@ -2622,8 +2622,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) else if( pTmpSet ) { // Even a pagedesc item is set, the break item can be set 'NONE', // this has to be overruled. - const SwFmtPageDesc& rPageDescAtParaStyle = - ItemGet<SwFmtPageDesc>( rNode, RES_PAGEDESC ); + const SwFormatPageDesc& rPageDescAtParaStyle = + ItemGet<SwFormatPageDesc>( rNode, RES_PAGEDESC ); if( rPageDescAtParaStyle.KnowsPageDesc() ) pTmpSet->ClearItem( RES_BREAK ); } @@ -2637,17 +2637,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if ( pTableNode ) { const SwTable& rTable = pTableNode->GetTable(); - const SvxFmtKeepItem& rKeep = rTable.GetFrmFmt()->GetKeep(); + const SvxFormatKeepItem& rKeep = rTable.GetFrameFormat()->GetKeep(); const bool bKeep = rKeep.GetValue(); const bool bDontSplit = !(bKeep || - rTable.GetFrmFmt()->GetLayoutSplit().GetValue()); + rTable.GetFrameFormat()->GetLayoutSplit().GetValue()); if ( bKeep || bDontSplit ) { // bKeep: set keep at first paragraphs in all lines // bDontSplit : set keep at first paragraphs in all lines except from last line // but only for non-complex tables - const SwTableBox* pBox = rNode.GetTblBox(); + const SwTableBox* pBox = rNode.GetTableBox(); const SwTableLine* pLine = pBox ? pBox->GetUpper() : 0; if ( pLine && !pLine->GetUpper() ) @@ -2673,7 +2673,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) if ( !pTmpSet ) pTmpSet = new SfxItemSet(rNode.GetSwAttrSet()); - const SvxFmtKeepItem aKeepItem( true, RES_KEEP ); + const SvxFormatKeepItem aKeepItem( true, RES_KEEP ); pTmpSet->Put( aKeepItem ); } } @@ -2686,16 +2686,16 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) const SfxItemSet* pNewSet = pTmpSet ? pTmpSet : rNode.GetpSwAttrSet(); if( pNewSet ) { // Para-Attrs - m_pStyAttr = &rNode.GetAnyFmtColl().GetAttrSet(); + m_pStyAttr = &rNode.GetAnyFormatColl().GetAttrSet(); - const SwModify* pOldMod = m_pOutFmtNode; - m_pOutFmtNode = &rNode; + const SwModify* pOldMod = m_pOutFormatNode; + m_pOutFormatNode = &rNode; // Pap-Attrs, so script is not necessary OutputItemSet( *pNewSet, true, false, i18n::ScriptType::LATIN, false); m_pStyAttr = 0; - m_pOutFmtNode = pOldMod; + m_pOutFormatNode = pOldMod; if( pNewSet != rNode.GetpSwAttrSet() ) delete pNewSet; @@ -2712,17 +2712,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) // set as a hint. SfxItemSet aParagraphMarkerProperties(m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_TXTATR_END); bool bCharFormatOnly = true; - if(const SwpHints* pTxtAttrs = rNode.GetpSwpHints()) + if(const SwpHints* pTextAttrs = rNode.GetpSwpHints()) { - for( size_t i = 0; i < pTxtAttrs->Count(); ++i ) + for( size_t i = 0; i < pTextAttrs->Count(); ++i ) { - const SwTxtAttr* pHt = (*pTxtAttrs)[i]; + const SwTextAttr* pHt = (*pTextAttrs)[i]; const sal_Int32 startPos = pHt->GetStart(); // first Attr characters const sal_Int32* endPos = pHt->End(); // end Attr characters // Check if these attributes are for the last character in the paragraph // - which means the paragraph marker. If a paragraph has 7 characters, // then properties on character 8 are for the paragraph marker - if( (endPos) && (startPos == *endPos ) && (*endPos == rNode.GetTxt().getLength()) ) + if( (endPos) && (startPos == *endPos ) && (*endPos == rNode.GetText().getLength()) ) { SAL_INFO( "sw.ww8", startPos << "startPos == endPos" << *endPos); sal_uInt16 nWhich = pHt->GetAttr().Which(); @@ -2745,7 +2745,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) AttrOutput().EndParagraph( pTextNodeInfoInner ); - SAL_INFO( "sw.ww8", "</OutWW8_SwTxtNode>" ); + SAL_INFO( "sw.ww8", "</OutWW8_SwTextNode>" ); } void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo ) @@ -2792,7 +2792,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet ) { bool bNoPageBreak = false; if ( SfxItemState::SET != pSet->GetItemState(RES_PAGEDESC, true, &pI) - || 0 == static_cast<const SwFmtPageDesc*>(pI)->GetPageDesc() ) + || 0 == static_cast<const SwFormatPageDesc*>(pI)->GetPageDesc() ) { bNoPageBreak = true; } @@ -2803,7 +2803,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet ) bNoPageBreak = true; else { - SvxBreak eBreak = static_cast<const SvxFmtBreakItem*>(pI)->GetBreak(); + SvxBreak eBreak = static_cast<const SvxFormatBreakItem*>(pI)->GetBreak(); switch (eBreak) { case SVX_BREAK_PAGE_BEFORE: @@ -2835,11 +2835,11 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode ) sal_uLong nRstLnNum = 0; const SfxItemSet* pSet; if ( rNd.IsTableNode() ) - pSet = &rNd.GetTableNode()->GetTable().GetFrmFmt()->GetAttrSet(); - else if ( rNd.IsCntntNode() ) + pSet = &rNd.GetTableNode()->GetTable().GetFrameFormat()->GetAttrSet(); + else if ( rNd.IsContentNode() ) { - pSet = &rNd.GetCntntNode()->GetSwAttrSet(); - nRstLnNum = static_cast<const SwFmtLineNumber&>(pSet->Get( + pSet = &rNd.GetContentNode()->GetSwAttrSet(); + nRstLnNum = static_cast<const SwFormatLineNumber&>(pSet->Get( RES_LINENUMBER )).GetStartValue(); } else @@ -2852,7 +2852,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode ) { // new Section with no own PageDesc/-Break // -> write follow section break; - const SwSectionFmt& rFmt = *rSection.GetFmt(); + const SwSectionFormat& rFormat = *rSection.GetFormat(); ReplaceCr( msword::PageBreak ); // Indikator fuer Page/Section-Break // Get the page in use at the top of this section @@ -2862,49 +2862,49 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode ) if (!pCurrent) pCurrent = m_pAktPageDesc; - AppendSection( pCurrent, &rFmt, nRstLnNum ); + AppendSection( pCurrent, &rFormat, nRstLnNum ); } } if ( TOX_CONTENT_SECTION == rSection.GetType() ) m_bStartTOX = true; } -void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) +void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) { - pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum); + pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFormat, nLnNum); } // Flys -void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd ) +void WW8Export::OutWW6FlyFrmsInContent( const SwTextNode& rNd ) { OSL_ENSURE(!bWrtWW8, "I shouldn't be needed for Word >=8"); if ( bWrtWW8 ) return; - if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints()) + if (const SwpHints* pTextAttrs = rNd.GetpSwpHints()) { - for( size_t n=0; n < pTxtAttrs->Count(); ++n ) + for( size_t n=0; n < pTextAttrs->Count(); ++n ) { - const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ]; + const SwTextAttr* pAttr = (*pTextAttrs)[ n ]; if( RES_TXTATR_FLYCNT == pAttr->Which() ) { // attribute bound to a character - const SwFmtFlyCnt& rFlyCntnt = pAttr->GetFlyCnt(); - const SwFlyFrmFmt& rFlyFrmFmt = *static_cast<SwFlyFrmFmt*>(rFlyCntnt.GetFrmFmt()); - const SwNodeIndex* pNodeIndex = rFlyFrmFmt.GetCntnt().GetCntntIdx(); + const SwFormatFlyCnt& rFlyContent = pAttr->GetFlyCnt(); + const SwFlyFrameFormat& rFlyFrameFormat = *static_cast<SwFlyFrameFormat*>(rFlyContent.GetFrameFormat()); + const SwNodeIndex* pNodeIndex = rFlyFrameFormat.GetContent().GetContentIdx(); if( pNodeIndex ) { sal_uLong nStt = pNodeIndex->GetIndex()+1, nEnd = pNodeIndex->GetNode().EndOfSectionIndex(); - if( (nStt < nEnd) && !m_pDoc->GetNodes()[ nStt ]->IsNoTxtNode() ) + if( (nStt < nEnd) && !m_pDoc->GetNodes()[ nStt ]->IsNoTextNode() ) { Point aOffset; // get rectangle (bounding box?) of Fly and paragraph SwRect aParentRect(rNd.FindLayoutRect(false, &aOffset)), - aFlyRect(rFlyFrmFmt.FindLayoutRect(false, &aOffset ) ); + aFlyRect(rFlyFrameFormat.FindLayoutRect(false, &aOffset ) ); aOffset = aFlyRect.Pos() - aParentRect.Pos(); @@ -2913,8 +2913,8 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd ) // is analysed in OutputFormat() m_pFlyOffset = &aOffset; - m_eNewAnchorType = rFlyFrmFmt.GetAnchor().GetAnchorId(); - sw::Frame aFrm(rFlyFrmFmt, SwPosition(rNd)); + m_eNewAnchorType = rFlyFrameFormat.GetAnchor().GetAnchorId(); + sw::Frame aFrm(rFlyFrameFormat, SwPosition(rNd)); m_pParentFrame = &aFrm; // Ok, write it out: WriteText(); @@ -2927,16 +2927,16 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd ) } } -void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) +void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFormat, const Point& rNdTopLeft ) { - const SwFrmFmt &rFrmFmt = rFmt.GetFrmFmt(); - const SwFmtAnchor& rAnch = rFrmFmt.GetAnchor(); + const SwFrameFormat &rFrameFormat = rFormat.GetFrameFormat(); + const SwFormatAnchor& rAnch = rFrameFormat.GetAnchor(); bool bUseEscher = m_rWW8Export.bWrtWW8; - if ( m_rWW8Export.bWrtWW8 && rFmt.IsInline() ) + if ( m_rWW8Export.bWrtWW8 && rFormat.IsInline() ) { - sw::Frame::WriterSource eType = rFmt.GetWriterType(); + sw::Frame::WriterSource eType = rFormat.GetWriterType(); if ((eType == sw::Frame::eGraphic) || (eType == sw::Frame::eOle)) bUseEscher = false; else @@ -2948,7 +2948,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point */ if (bUseEscher && (eType == sw::Frame::eFormControl)) { - if ( m_rWW8Export.MiserableFormFieldExportHack( rFrmFmt ) ) + if ( m_rWW8Export.MiserableFormFieldExportHack( rFrameFormat ) ) return ; } } @@ -2957,14 +2957,14 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point { OSL_ENSURE( m_rWW8Export.bWrtWW8, "this has gone horribly wrong" ); // write as escher - m_rWW8Export.AppendFlyInFlys(rFmt, rNdTopLeft); + m_rWW8Export.AppendFlyInFlys(rFormat, rNdTopLeft); } else { bool bDone = false; // Hole vom Node und vom letzten Node die Position in der Section - const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx(); + const SwNodeIndex* pNodeIndex = rFrameFormat.GetContent().GetContentIdx(); sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0; sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0; @@ -2972,11 +2972,11 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point if( nStt >= nEnd ) // no range, hence no valid node return; - if ( !m_rWW8Export.IsInTable() && rFmt.IsInline() ) + if ( !m_rWW8Export.IsInTable() && rFormat.IsInline() ) { //Test to see if this textbox contains only a single graphic/ole - SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode(); - if ( pParTxtNode && !m_rWW8Export.m_pDoc->GetNodes()[ nStt ]->IsNoTxtNode() ) + SwTextNode* pParTextNode = rAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); + if ( pParTextNode && !m_rWW8Export.m_pDoc->GetNodes()[ nStt ]->IsNoTextNode() ) bDone = true; } if( !bDone ) @@ -2988,28 +2988,28 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point if ( m_rWW8Export.m_pParentFrame ) { /* Munge flys in fly into absolutely positioned elements for word 6 */ - const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode(); - const SwRect aPageRect = pParTxtNode->FindPageFrmRect( false, 0, false ); + const SwTextNode* pParTextNode = rAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); + const SwRect aPageRect = pParTextNode->FindPageFrmRect( false, 0, false ); - aOffset = rFrmFmt.FindLayoutRect().Pos(); + aOffset = rFrameFormat.FindLayoutRect().Pos(); aOffset -= aPageRect.Pos(); m_rWW8Export.m_pFlyOffset = &aOffset; m_rWW8Export.m_eNewAnchorType = FLY_AT_PAGE; } - m_rWW8Export.m_pParentFrame = &rFmt; + m_rWW8Export.m_pParentFrame = &rFormat; if ( m_rWW8Export.IsInTable() && (FLY_AT_PAGE != rAnch.GetAnchorId()) && - !m_rWW8Export.m_pDoc->GetNodes()[ nStt ]->IsNoTxtNode() + !m_rWW8Export.m_pDoc->GetNodes()[ nStt ]->IsNoTextNode() ) { // note: set Flag bOutTable again, // because we deliver the normal content of the table cell, and no border // ( Flag was deleted above in aSaveData() ) m_rWW8Export.m_bOutTable = true; - const OUString aName = rFrmFmt.GetName(); + const OUString aName = rFrameFormat.GetName(); m_rWW8Export.StartCommentOutput(aName); m_rWW8Export.WriteText(); m_rWW8Export.EndCommentOutput(aName); @@ -3022,21 +3022,21 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point } } -void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFmt ) +void AttributeOutputBase::OutputFlyFrame( const sw::Frame& rFormat ) { - if ( !rFmt.GetCntntNode() ) + if ( !rFormat.GetContentNode() ) return; - const SwCntntNode &rNode = *rFmt.GetCntntNode(); + const SwContentNode &rNode = *rFormat.GetContentNode(); Point aLayPos; // get the Layout Node-Position - if (FLY_AT_PAGE == rFmt.GetFrmFmt().GetAnchor().GetAnchorId()) + if (FLY_AT_PAGE == rFormat.GetFrameFormat().GetAnchor().GetAnchorId()) aLayPos = rNode.FindPageFrmRect().Pos(); else aLayPos = rNode.FindLayoutRect().Pos(); - OutputFlyFrame_Impl( rFmt, aLayPos ); + OutputFlyFrame_Impl( rFormat, aLayPos ); } // write data of any redline @@ -3109,13 +3109,13 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline ) } } -void MSWordExportBase::OutputContentNode( const SwCntntNode& rNode ) +void MSWordExportBase::OutputContentNode( const SwContentNode& rNode ) { switch ( rNode.GetNodeType() ) { case ND_TEXTNODE: { - const SwTxtNode& rTextNode = *rNode.GetTxtNode(); + const SwTextNode& rTextNode = *rNode.GetTextNode(); if( !m_bOutOutlineOnly || rTextNode.IsOutline() ) OutputTextNode( rTextNode ); } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index b1b9c36e16ef..6ffaf31f9b9a 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -50,17 +50,17 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 SwNumRule* pMyNumRule = new SwNumRule( m_pDoc->GetUniqueNumRuleName( &sPrefix ), SvxNumberFormat::LABEL_WIDTH_AND_POSITION ); - m_pUsedNumTbl->push_back( pMyNumRule ); + m_pUsedNumTable->push_back( pMyNumRule ); for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) { - const SwNumFmt& rSubRule = pRule->Get(i); + const SwNumFormat& rSubRule = pRule->Get(i); pMyNumRule->Set( i, rSubRule ); } - SwNumFmt aNumFmt( pMyNumRule->Get( nLevel ) ); - aNumFmt.SetStart( nVal ); - pMyNumRule->Set( nLevel, aNumFmt ); + SwNumFormat aNumFormat( pMyNumRule->Get( nLevel ) ); + aNumFormat.SetStart( nVal ); + pMyNumRule->Set( nLevel, aNumFormat ); nNumId = GetId( *pMyNumRule ); @@ -72,19 +72,19 @@ sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) { - if ( !m_pUsedNumTbl ) + if ( !m_pUsedNumTable ) { - m_pUsedNumTbl = new SwNumRuleTbl; - m_pUsedNumTbl->insert( m_pUsedNumTbl->begin(), m_pDoc->GetNumRuleTbl().begin(), m_pDoc->GetNumRuleTbl().end() ); - // Check, if the outline rule is already inserted into <pUsedNumTbl>. + m_pUsedNumTable = new SwNumRuleTable; + m_pUsedNumTable->insert( m_pUsedNumTable->begin(), m_pDoc->GetNumRuleTable().begin(), m_pDoc->GetNumRuleTable().end() ); + // Check, if the outline rule is already inserted into <pUsedNumTable>. // If yes, do not insert it again. bool bOutlineRuleAdded( false ); - for ( sal_uInt16 n = m_pUsedNumTbl->size(); n; ) + for ( sal_uInt16 n = m_pUsedNumTable->size(); n; ) { - const SwNumRule& rRule = *(*m_pUsedNumTbl)[ --n ]; + const SwNumRule& rRule = *(*m_pUsedNumTable)[ --n ]; if ( !SwDoc::IsUsed( rRule ) ) { - m_pUsedNumTbl->erase( m_pUsedNumTbl->begin() + n ); + m_pUsedNumTable->erase( m_pUsedNumTable->begin() + n ); } else if ( &rRule == m_pDoc->GetOutlineNumRule() ) { @@ -96,11 +96,11 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) { // still need to paste the OutlineRule SwNumRule* pR = m_pDoc->GetOutlineNumRule(); - m_pUsedNumTbl->push_back( pR ); + m_pUsedNumTable->push_back( pR ); } } SwNumRule* p = const_cast<SwNumRule*>(&rNumRule); - sal_uInt16 nRet = static_cast<sal_uInt16>(m_pUsedNumTbl->GetPos(p)); + sal_uInt16 nRet = static_cast<sal_uInt16>(m_pUsedNumTable->GetPos(p)); // Is this list now duplicated into a new list which we should use // #i77812# - perform 'deep' search in duplication map @@ -118,27 +118,27 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) // GetFirstLineOffset should problem never appear unadorned apart from // here in the ww export filter -sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt) +sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat) { - OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, + OSL_ENSURE( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, "<GetWordFirstLineOffset> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" ); short nFirstLineOffset; - if (rFmt.GetNumAdjust() == SVX_ADJUST_RIGHT) - nFirstLineOffset = -rFmt.GetCharTextDistance(); + if (rFormat.GetNumAdjust() == SVX_ADJUST_RIGHT) + nFirstLineOffset = -rFormat.GetCharTextDistance(); else - nFirstLineOffset = rFmt.GetFirstLineOffset(); + nFirstLineOffset = rFormat.GetFirstLineOffset(); return nFirstLineOffset; } void WW8Export::WriteNumbering() { - if ( !m_pUsedNumTbl ) + if ( !m_pUsedNumTable ) return; // no numbering is used // list formats - LSTF pFib->fcPlcfLst = pTableStrm->Tell(); - SwWW8Writer::WriteShort( *pTableStrm, m_pUsedNumTbl->size() ); + SwWW8Writer::WriteShort( *pTableStrm, m_pUsedNumTable->size() ); NumberingDefinitions(); // set len to FIB pFib->lcbPlcfLst = pTableStrm->Tell() - pFib->fcPlcfLst; @@ -171,15 +171,15 @@ void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &r void MSWordExportBase::NumberingDefinitions() { - if ( !m_pUsedNumTbl ) + if ( !m_pUsedNumTable ) return; // no numbering is used - sal_uInt16 nCount = m_pUsedNumTbl->size(); + sal_uInt16 nCount = m_pUsedNumTable->size(); // Write static data of SwNumRule - LSTF for ( sal_uInt16 n = 0; n < nCount; ++n ) { - const SwNumRule& rRule = *(*m_pUsedNumTbl)[ n ]; + const SwNumRule& rRule = *(*m_pUsedNumTable)[ n ]; AttrOutput().NumberingDefinition( n + 1, rRule ); } @@ -351,7 +351,7 @@ void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/, void MSWordExportBase::AbstractNumberingDefinitions() { - sal_uInt16 nCount = m_pUsedNumTbl->size(); + sal_uInt16 nCount = m_pUsedNumTable->size(); sal_uInt16 n; // prepare the NodeNum to generate the NumString @@ -363,37 +363,37 @@ void MSWordExportBase::AbstractNumberingDefinitions() { AttrOutput().StartAbstractNumbering( n + 1 ); - const SwNumRule& rRule = *(*m_pUsedNumTbl)[ n ]; + const SwNumRule& rRule = *(*m_pUsedNumTable)[ n ]; sal_uInt8 nLvl; sal_uInt8 nLevels = static_cast< sal_uInt8 >(rRule.IsContinusNum() ? WW8ListManager::nMinLevel : WW8ListManager::nMaxLevel); for( nLvl = 0; nLvl < nLevels; ++nLvl ) { - // write the static data of the SwNumFmt of this level + // write the static data of the SwNumFormat of this level sal_uInt8 aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 }; - const SwNumFmt& rFmt = rRule.Get( nLvl ); + const SwNumFormat& rFormat = rRule.Get( nLvl ); sal_uInt8 nFollow = 0; // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { nFollow = 2; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - switch ( rFmt.GetLabelFollowedBy() ) + switch ( rFormat.GetLabelFollowedBy() ) { case SvxNumberFormat::LISTTAB: { // 0 (tab) unless there would be no content before the tab, in which case 2 (nothing) - nFollow = (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType()) ? 0 : 2; + nFollow = (SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType()) ? 0 : 2; } break; case SvxNumberFormat::SPACE: { // 1 (space) unless there would be no content before the space in which case 2 (nothing) - nFollow = (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType()) ? 1 : 2; + nFollow = (SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType()) ? 1 : 2; } break; case SvxNumberFormat::NOTHING: @@ -416,13 +416,13 @@ void MSWordExportBase::AbstractNumberingDefinitions() const vcl::Font* pBulletFont=0; rtl_TextEncoding eChrSet=0; FontFamily eFamily=FAMILY_DECORATIVE; - if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType() || - SVX_NUM_BITMAP == rFmt.GetNumberingType() ) + if( SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType() || + SVX_NUM_BITMAP == rFormat.GetNumberingType() ) { - sNumStr = OUString(rFmt.GetBulletChar()); + sNumStr = OUString(rFormat.GetBulletChar()); bWriteBullet = true; - pBulletFont = rFmt.GetBulletFont(); + pBulletFont = rFormat.GetBulletFont(); if (!pBulletFont) { pBulletFont = &numfunc::GetDefBulletFont(); @@ -436,19 +436,19 @@ void MSWordExportBase::AbstractNumberingDefinitions() SubstituteBullet( sNumStr, eChrSet, sFontName ); // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { // <nFollow = 2>, if minimum label width equals 0 and // minimum distance between label and text equals 0 - nFollow = ( rFmt.GetFirstLineOffset() == 0 && - rFmt.GetCharTextDistance() == 0 ) + nFollow = ( rFormat.GetFirstLineOffset() == 0 && + rFormat.GetCharTextDistance() == 0 ) ? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing } } else { - if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType()) + if (SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType()) { sal_uInt8* pLvlPos = aNumLvlPos; // the numbering string has to be restrict @@ -462,26 +462,26 @@ void MSWordExportBase::AbstractNumberingDefinitions() sal_Int32 nFnd = sNumStr.indexOf( sSrch ); if( -1 != nFnd ) { - *pLvlPos = (sal_uInt8)(nFnd + rFmt.GetPrefix().getLength() + 1 ); + *pLvlPos = (sal_uInt8)(nFnd + rFormat.GetPrefix().getLength() + 1 ); ++pLvlPos; sNumStr = sNumStr.replaceAt( nFnd, 1, OUString((char)i) ); } } // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { // <nFollow = 2>, if minimum label width equals 0 and // minimum distance between label and text equals 0 - nFollow = ( rFmt.GetFirstLineOffset() == 0 && - rFmt.GetCharTextDistance() == 0 ) + nFollow = ( rFormat.GetFirstLineOffset() == 0 && + rFormat.GetCharTextDistance() == 0 ) ? 2 : 0; // ixchFollow: 0 - tab, 1 - blank, 2 - nothing } } - if( !rFmt.GetPrefix().isEmpty() ) - sNumStr = rFmt.GetPrefix() + sNumStr; - sNumStr += rFmt.GetSuffix(); + if( !rFormat.GetPrefix().isEmpty() ) + sNumStr = rFormat.GetPrefix() + sNumStr; + sNumStr += rFormat.GetSuffix(); } // Attributes of the numbering @@ -491,14 +491,14 @@ void MSWordExportBase::AbstractNumberingDefinitions() // cbGrpprlChpx SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END ); - if ( rFmt.GetCharFmt() || bWriteBullet ) + if ( rFormat.GetCharFormat() || bWriteBullet ) { if ( bWriteBullet ) { pOutSet = &aSet; - if ( rFmt.GetCharFmt() ) - aSet.Put( rFmt.GetCharFmt()->GetAttrSet() ); + if ( rFormat.GetCharFormat() ) + aSet.Put( rFormat.GetCharFormat()->GetAttrSet() ); aSet.ClearItem( RES_CHRATR_CJK_FONT ); aSet.ClearItem( RES_CHRATR_FONT ); @@ -509,7 +509,7 @@ void MSWordExportBase::AbstractNumberingDefinitions() eFamily, eChrSet, SupportsUnicode() ); } else - pOutSet = &rFmt.GetCharFmt()->GetAttrSet(); + pOutSet = &rFormat.GetCharFormat()->GetAttrSet(); } sal_Int16 nIndentAt = 0; @@ -517,29 +517,29 @@ void MSWordExportBase::AbstractNumberingDefinitions() sal_Int16 nListTabPos = 0; // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - nIndentAt = nListTabPos = rFmt.GetAbsLSpace(); - nFirstLineIndex = GetWordFirstLineOffset(rFmt); + nIndentAt = nListTabPos = rFormat.GetAbsLSpace(); + nFirstLineIndex = GetWordFirstLineOffset(rFormat); } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - nIndentAt = static_cast<sal_Int16>(rFmt.GetIndentAt()); - nFirstLineIndex = static_cast<sal_Int16>(rFmt.GetFirstLineIndent()); - nListTabPos = rFmt.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB? - static_cast<sal_Int16>( rFmt.GetListtabPos() ) : 0; + nIndentAt = static_cast<sal_Int16>(rFormat.GetIndentAt()); + nFirstLineIndex = static_cast<sal_Int16>(rFormat.GetFirstLineIndent()); + nListTabPos = rFormat.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB? + static_cast<sal_Int16>( rFormat.GetListtabPos() ) : 0; } AttrOutput().NumberingLevel( nLvl, - rFmt.GetStart(), - rFmt.GetNumberingType(), - rFmt.GetNumAdjust(), + rFormat.GetStart(), + rFormat.GetNumberingType(), + rFormat.GetNumAdjust(), aNumLvlPos, nFollow, pPseudoFont, pOutSet, nIndentAt, nFirstLineIndex, nListTabPos, sNumStr, - rFmt.GetNumberingType()==SVX_NUM_BITMAP ? rFmt.GetBrush():0); + rFormat.GetNumberingType()==SVX_NUM_BITMAP ? rFormat.GetBrush():0); delete pPseudoFont; } @@ -549,11 +549,11 @@ void MSWordExportBase::AbstractNumberingDefinitions() void WW8Export::OutOverrideListTab() { - if( !m_pUsedNumTbl ) + if( !m_pUsedNumTable ) return ; // no numbering is used // write the "list format override" - LFO - sal_uInt16 nCount = m_pUsedNumTbl->size(); + sal_uInt16 nCount = m_pUsedNumTable->size(); sal_uInt16 n; pFib->fcPlfLfo = pTableStrm->Tell(); @@ -573,11 +573,11 @@ void WW8Export::OutOverrideListTab() void WW8Export::OutListNamesTab() { - if( !m_pUsedNumTbl ) + if( !m_pUsedNumTable ) return ; // no numbering is used // write the "list format override" - LFO - sal_uInt16 nNms = 0, nCount = m_pUsedNumTbl->size(); + sal_uInt16 nNms = 0, nCount = m_pUsedNumTable->size(); pFib->fcSttbListNames = pTableStrm->Tell(); SwWW8Writer::WriteShort( *pTableStrm, -1 ); @@ -585,7 +585,7 @@ void WW8Export::OutListNamesTab() for( ; nNms < nCount; ++nNms ) { - const SwNumRule& rRule = *(*m_pUsedNumTbl)[ nNms ]; + const SwNumRule& rRule = *(*m_pUsedNumTable)[ nNms ]; OUString sNm; if( !rRule.IsAutoRule() ) sNm = rRule.GetName(); @@ -625,10 +625,10 @@ void WW8Export::OutputOlst( const SwNumRule& rRule ) { memcpy( &aOlst.rganlv[j], aAnlvBase, sizeof( WW8_ANLV ) ); // Defaults - const SwNumFmt* pFmt = rRule.GetNumFmt( j ); - if( pFmt ) + const SwNumFormat* pFormat = rRule.GetNumFormat( j ); + if( pFormat ) BuildAnlvBase( aOlst.rganlv[j], pChars, nCharLen, rRule, - *pFmt, (sal_uInt8)j ); + *pFormat, (sal_uInt8)j ); } pO->insert( pO->end(), reinterpret_cast<sal_uInt8*>(&aOlst), reinterpret_cast<sal_uInt8*>(&aOlst)+sizeof( aOlst ) ); @@ -647,12 +647,12 @@ void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel ) } void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, - sal_uInt16& rCharLen, const SwNumFmt& rFmt) + sal_uInt16& rCharLen, const SwNumFormat& rFormat) { rAnlv.nfc = 11; sal_uInt8 nb = 0; // type of number - switch (rFmt.GetNumAdjust()) + switch (rFormat.GetNumAdjust()) { case SVX_ADJUST_RIGHT: nb = 2; @@ -670,19 +670,19 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, } // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - if (GetWordFirstLineOffset(rFmt) < 0) + if (GetWordFirstLineOffset(rFormat) < 0) nb |= 0x8; // number will be displayed using a hanging indent } rAnlv.aBits1 = nb; if (1 < rCharLen) { - const vcl::Font& rFont = rFmt.GetBulletFont() - ? *rFmt.GetBulletFont() + const vcl::Font& rFont = rFormat.GetBulletFont() + ? *rFormat.GetBulletFont() : numfunc::GetDefBulletFont(); - OUString sNumStr = OUString(rFmt.GetBulletChar()); + OUString sNumStr = OUString(rFormat.GetBulletChar()); rtl_TextEncoding eChrSet = rFont.GetCharSet(); OUString sFontName = rFont.GetName(); @@ -726,10 +726,10 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, rAnlv.cbTextBefore = 1; } // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - ShortToSVBT16( -GetWordFirstLineOffset(rFmt), rAnlv.dxaIndent ); - ShortToSVBT16( rFmt.GetCharTextDistance(), rAnlv.dxaSpace ); + ShortToSVBT16( -GetWordFirstLineOffset(rFormat), rAnlv.dxaIndent ); + ShortToSVBT16( rFormat.GetCharTextDistance(), rAnlv.dxaSpace ); } else { @@ -773,16 +773,16 @@ static void SwWw8_InsertAnlText( const OUString& rStr, sal_uInt8*& rpCh, } void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, - sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt, + sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFormat& rFormat, sal_uInt8 nSwLevel) { const SfxItemSet *pOutSet = NULL; - if (rFmt.GetCharFmt()) - pOutSet = &rFmt.GetCharFmt()->GetAttrSet(); - rAnlv.nfc = GetLevelNFC(rFmt.GetNumberingType(),pOutSet ); + if (rFormat.GetCharFormat()) + pOutSet = &rFormat.GetCharFormat()->GetAttrSet(); + rAnlv.nfc = GetLevelNFC(rFormat.GetNumberingType(),pOutSet ); sal_uInt8 nb = 0; - switch (rFmt.GetNumAdjust()) + switch (rFormat.GetNumAdjust()) { case SVX_ADJUST_RIGHT: nb = 2; @@ -799,11 +799,11 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, break; } - bool bInclUpper = rFmt.GetIncludeUpperLevels() > 0; + bool bInclUpper = rFormat.GetIncludeUpperLevels() > 0; if( bInclUpper ) nb |= 0x4; // include previous levels - if (GetWordFirstLineOffset(rFmt) < 0) + if (GetWordFirstLineOffset(rFormat) < 0) nb |= 0x8; // number will be displayed using a hanging indent rAnlv.aBits1 = nb; @@ -811,9 +811,9 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, { if( (nSwLevel >= WW8ListManager::nMinLevel ) && (nSwLevel<= WW8ListManager::nMaxLevel ) - && (rFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ? + && (rFormat.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ? { // -> suche, ob noch Zahlen davor - sal_uInt8 nUpper = rFmt.GetIncludeUpperLevels(); + sal_uInt8 nUpper = rFormat.GetIncludeUpperLevels(); if( (nUpper <= WW8ListManager::nMaxLevel) && (rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ? { @@ -826,18 +826,18 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, } else { - SwWw8_InsertAnlText( rFmt.GetPrefix(), rpCh, rCharLen, + SwWw8_InsertAnlText( rFormat.GetPrefix(), rpCh, rCharLen, rAnlv.cbTextBefore ); - SwWw8_InsertAnlText( rFmt.GetSuffix(), rpCh, rCharLen, + SwWw8_InsertAnlText( rFormat.GetSuffix(), rpCh, rCharLen, rAnlv.cbTextAfter ); } - ShortToSVBT16( rFmt.GetStart(), rAnlv.iStartAt ); + ShortToSVBT16( rFormat.GetStart(), rAnlv.iStartAt ); // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - ShortToSVBT16( -GetWordFirstLineOffset(rFmt), rAnlv.dxaIndent ); - ShortToSVBT16( rFmt.GetCharTextDistance(), rAnlv.dxaSpace ); + ShortToSVBT16( -GetWordFirstLineOffset(rFormat), rAnlv.dxaIndent ); + ShortToSVBT16( rFormat.GetCharTextDistance(), rAnlv.dxaSpace ); } else { @@ -846,7 +846,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh, } } -void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt, +void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFormat& rFormat, sal_uInt8 nSwLevel ) { static const sal_uInt8 aSprmAnldDefault[54] = { @@ -864,16 +864,16 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt16 nCharLen = 31; if( nSwLevel == 11 ) - BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFmt ); + BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFormat ); else - BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel ); + BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFormat, nSwLevel ); // ... spit it out OutSprmBytes( reinterpret_cast<sal_uInt8*>(&aSprmAnld), sizeof( aSprmAnld ) ); } // Return: is it an outline? -bool WW8Export::Out_SwNum(const SwTxtNode* pNd) +bool WW8Export::Out_SwNum(const SwTextNode* pNd) { int nLevel = pNd->GetActualListLevel(); @@ -892,22 +892,22 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd) bool bRet = true; - SwNumFmt aFmt(pRul->Get(nSwLevel)); + SwNumFormat aFormat(pRul->Get(nSwLevel)); // #i86652# - if ( aFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( aFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { const SvxLRSpaceItem& rLR = ItemGet<SvxLRSpaceItem>(*pNd, RES_LR_SPACE); - aFmt.SetAbsLSpace(writer_cast<short>(aFmt.GetAbsLSpace() + rLR.GetLeft())); + aFormat.SetAbsLSpace(writer_cast<short>(aFormat.GetAbsLSpace() + rLR.GetLeft())); } if ( - aFmt.GetNumberingType() == SVX_NUM_NUMBER_NONE || - aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL || - aFmt.GetNumberingType() == SVX_NUM_BITMAP + aFormat.GetNumberingType() == SVX_NUM_NUMBER_NONE || + aFormat.GetNumberingType() == SVX_NUM_CHAR_SPECIAL || + aFormat.GetNumberingType() == SVX_NUM_BITMAP ) { Out_WwNumLvl(11); - Out_NumRuleAnld(*pRul, aFmt, 11); + Out_NumRuleAnld(*pRul, aFormat, 11); bRet = false; } else if ( @@ -916,13 +916,13 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd) ) { Out_WwNumLvl(10); - Out_NumRuleAnld(*pRul, aFmt, 10); + Out_NumRuleAnld(*pRul, aFormat, 10); bRet = false; } else { Out_SwNumLvl(nSwLevel); - Out_NumRuleAnld(*pRul, aFmt, nSwLevel); + Out_NumRuleAnld(*pRul, aFormat, nSwLevel); } return bRet; } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 32d781e8ac0f..cee294a2b4dd 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -117,43 +117,43 @@ public: #define WW8_RESERVED_SLOTS 15 -// GetId( SwCharFmt ) for use in text -> zero is not allowed, +// GetId( SwCharFormat ) for use in text -> zero is not allowed, // use "Default Char Style" instead -sal_uInt16 MSWordExportBase::GetId( const SwCharFmt* pFmt ) const +sal_uInt16 MSWordExportBase::GetId( const SwCharFormat* pFormat ) const { - sal_uInt16 nRet = m_pStyles->GetSlot( pFmt ); + sal_uInt16 nRet = m_pStyles->GetSlot( pFormat ); return ( nRet != 0x0fff ) ? nRet : 10; // Default Char Style } -// GetId( SwTxtFmtColl ) for use in TextNodes -> zero is not allowed, +// GetId( SwTextFormatColl ) for use in TextNodes -> zero is not allowed, // "Standard" instead -sal_uInt16 MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const +sal_uInt16 MSWordExportBase::GetId( const SwTextFormatColl& rColl ) const { sal_uInt16 nRet = m_pStyles->GetSlot( &rColl ); - return ( nRet != 0xfff ) ? nRet : 0; // Default TxtFmtColl + return ( nRet != 0xfff ) ? nRet : 0; // Default TextFormatColl } -//typedef pFmtT +//typedef pFormatT MSWordStyles::MSWordStyles( MSWordExportBase& rExport, bool bListStyles ) : m_rExport( rExport ), m_bListStyles(bListStyles) { // if exist any Foot-/End-Notes then get from the EndNoteInfo struct // the CharFormats. They will create it! - if ( !m_rExport.m_pDoc->GetFtnIdxs().empty() ) + if ( !m_rExport.m_pDoc->GetFootnoteIdxs().empty() ) { - m_rExport.m_pDoc->GetEndNoteInfo().GetAnchorCharFmt( *m_rExport.m_pDoc ); - m_rExport.m_pDoc->GetEndNoteInfo().GetCharFmt( *m_rExport.m_pDoc ); - m_rExport.m_pDoc->GetFtnInfo().GetAnchorCharFmt( *m_rExport.m_pDoc ); - m_rExport.m_pDoc->GetFtnInfo().GetCharFmt( *m_rExport.m_pDoc ); + m_rExport.m_pDoc->GetEndNoteInfo().GetAnchorCharFormat( *m_rExport.m_pDoc ); + m_rExport.m_pDoc->GetEndNoteInfo().GetCharFormat( *m_rExport.m_pDoc ); + m_rExport.m_pDoc->GetFootnoteInfo().GetAnchorCharFormat( *m_rExport.m_pDoc ); + m_rExport.m_pDoc->GetFootnoteInfo().GetCharFormat( *m_rExport.m_pDoc ); } - sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.m_pDoc->GetCharFmts()->size() - 1 + - m_rExport.m_pDoc->GetTxtFmtColls()->size() - 1 + - (bListStyles ? m_rExport.m_pDoc->GetNumRuleTbl().size() - 1 : 0); + sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.m_pDoc->GetCharFormats()->size() - 1 + + m_rExport.m_pDoc->GetTextFormatColls()->size() - 1 + + (bListStyles ? m_rExport.m_pDoc->GetNumRuleTable().size() - 1 : 0); // somewhat generous ( free for up to 15 ) - m_pFmtA = new SwFmt*[ nAlloc ]; - memset( m_pFmtA, 0, nAlloc * sizeof( SwFmt* ) ); + m_pFormatA = new SwFormat*[ nAlloc ]; + memset( m_pFormatA, 0, nAlloc * sizeof( SwFormat* ) ); BuildStylesTable(); BuildStyleIds(); @@ -161,23 +161,23 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport, bool bListStyles ) MSWordStyles::~MSWordStyles() { - delete[] m_pFmtA; + delete[] m_pFormatA; } // Sty_SetWWSlot() dependencies for the styles -> zero is allowed -sal_uInt16 MSWordStyles::GetSlot( const SwFmt* pFmt ) const +sal_uInt16 MSWordStyles::GetSlot( const SwFormat* pFormat ) const { sal_uInt16 n; for ( n = 0; n < m_nUsedSlots; n++ ) - if ( m_pFmtA[n] == pFmt ) + if ( m_pFormatA[n] == pFormat ) return n; return 0xfff; // 0xfff: WW: zero } -sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt ) +sal_uInt16 MSWordStyles::BuildGetSlot( const SwFormat& rFormat ) { sal_uInt16 nRet; - switch ( nRet = rFmt.GetPoolFmtId() ) + switch ( nRet = rFormat.GetPoolFormatId() ) { case RES_POOLCOLL_STANDARD: nRet = 0; @@ -203,10 +203,10 @@ sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt ) } -sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) +sal_uInt16 MSWordStyles::GetWWId( const SwFormat& rFormat ) { sal_uInt16 nRet = ww::stiUser; // User-Style als default - sal_uInt16 nPoolId = rFmt.GetPoolFmtId(); + sal_uInt16 nPoolId = rFormat.GetPoolFormatId(); if( nPoolId == RES_POOLCOLL_STANDARD ) nRet = 0; else if( nPoolId >= RES_POOLCOLL_HEADLINE1 && @@ -276,29 +276,29 @@ void MSWordStyles::BuildStylesTable() { m_nUsedSlots = WW8_RESERVED_SLOTS; // soviele sind reserviert fuer // Standard und HeadingX u.a. - const SwCharFmts& rArr = *m_rExport.m_pDoc->GetCharFmts(); // first CharFmt + const SwCharFormats& rArr = *m_rExport.m_pDoc->GetCharFormats(); // first CharFormat // das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben ! for( sal_uInt16 n = 1; n < rArr.size(); n++ ) { - SwCharFmt* pFmt = rArr[n]; - m_pFmtA[ BuildGetSlot( *pFmt ) ] = pFmt; + SwCharFormat* pFormat = rArr[n]; + m_pFormatA[ BuildGetSlot( *pFormat ) ] = pFormat; } - const SwTxtFmtColls& rArr2 = *m_rExport.m_pDoc->GetTxtFmtColls(); // then TxtFmtColls + const SwTextFormatColls& rArr2 = *m_rExport.m_pDoc->GetTextFormatColls(); // then TextFormatColls // das Default-TextStyle ( 0 ) wird nicht mit ausgegeben ! for( sal_uInt16 n = 1; n < rArr2.size(); n++ ) { - SwTxtFmtColl* pFmt = rArr2[n]; - m_pFmtA[ BuildGetSlot( *pFmt ) ] = pFmt; + SwTextFormatColl* pFormat = rArr2[n]; + m_pFormatA[ BuildGetSlot( *pFormat ) ] = pFormat; } if (!m_bListStyles) return; - const SwNumRuleTbl& rNumRuleTbl = m_rExport.m_pDoc->GetNumRuleTbl(); - for (size_t i = 0; i < rNumRuleTbl.size(); ++i) + const SwNumRuleTable& rNumRuleTable = m_rExport.m_pDoc->GetNumRuleTable(); + for (size_t i = 0; i < rNumRuleTable.size(); ++i) { - const SwNumRule* pNumRule = rNumRuleTbl[i]; + const SwNumRule* pNumRule = rNumRuleTable[i]; if (pNumRule->IsAutoRule() || pNumRule->GetName().startsWith("WWNum")) continue; sal_uInt16 nSlot = BuildGetSlot(*pNumRule); @@ -316,8 +316,8 @@ void MSWordStyles::BuildStyleIds() for (sal_uInt16 n = 1; n < m_nUsedSlots; ++n) { OUString aName; - if(m_pFmtA[n]) - aName = m_pFmtA[n]->GetName(); + if(m_pFormatA[n]) + aName = m_pFormatA[n]->GetName(); else if (m_aNumRules.find(n) != m_aNumRules.end()) aName = m_aNumRules[n]->GetName(); OStringBuffer aStyleIdBuf(aName.getLength()); @@ -441,10 +441,10 @@ void WW8AttributeOutput::StartStyle( const OUString& rName, StyleType eType, sal m_rWW8Export.pO->push_back( (sal_uInt8)0 ); // Trotz P-String 0 am Ende! } -void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap ) +void MSWordStyles::SetStyleDefaults( const SwFormat& rFormat, bool bPap ) { - const SwModify* pOldMod = m_rExport.m_pOutFmtNode; - m_rExport.m_pOutFmtNode = &rFmt; + const SwModify* pOldMod = m_rExport.m_pOutFormatNode; + m_rExport.m_pOutFormatNode = &rFormat; bool aFlags[ static_cast< sal_uInt16 >(RES_FRMATR_END) - RES_CHRATR_BEGIN ]; sal_uInt16 nStt, nEnd, n; if( bPap ) @@ -453,7 +453,7 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap ) nStt = RES_CHRATR_BEGIN, nEnd = RES_TXTATR_END; // dynamic defaults - const SfxItemPool& rPool = *rFmt.GetAttrSet().GetPool(); + const SfxItemPool& rPool = *rFormat.GetAttrSet().GetPool(); for( n = nStt; n < nEnd; ++n ) aFlags[ n - RES_CHRATR_BEGIN ] = 0 != rPool.GetPoolDefaultItem( n ); @@ -470,13 +470,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap ) } const SfxItemSet* pOldI = m_rExport.GetCurItemSet(); - m_rExport.SetCurItemSet( &rFmt.GetAttrSet() ); + m_rExport.SetCurItemSet( &rFormat.GetAttrSet() ); const bool* pFlags = aFlags + ( nStt - RES_CHRATR_BEGIN ); for ( n = nStt; n < nEnd; ++n, ++pFlags ) { if ( *pFlags && !m_rExport.ignoreAttributeForStyleDefaults( n ) - && SfxItemState::SET != rFmt.GetItemState(n, false)) + && SfxItemState::SET != rFormat.GetItemState(n, false)) { //If we are a character property then see if it is one of the //western/asian ones that must be collapsed together for export to @@ -484,13 +484,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap ) if ( bPap || m_rExport.CollapseScriptsforWordOk( i18n::ScriptType::LATIN, n) ) { - m_rExport.AttrOutput().OutputItem( rFmt.GetFmtAttr( n, true ) ); + m_rExport.AttrOutput().OutputItem( rFormat.GetFormatAttr( n, true ) ); } } } m_rExport.SetCurItemSet( pOldI ); - m_rExport.m_pOutFmtNode = pOldMod; + m_rExport.m_pOutFormatNode = pOldMod; } void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) @@ -510,22 +510,22 @@ void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle SwWW8Writer::InsUInt16( *m_rWW8Export.pO, nStyle ); // Style-Nummer } -void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos, +void MSWordStyles::WriteProperties( const SwFormat* pFormat, bool bParProp, sal_uInt16 nPos, bool bInsDefCharSiz ) { m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos ); OSL_ENSURE( m_rExport.m_pCurrentStyle == NULL, "Current style not NULL" ); // set current style before calling out - m_rExport.m_pCurrentStyle = pFmt; + m_rExport.m_pCurrentStyle = pFormat; - m_rExport.OutputFormat( *pFmt, bParProp, !bParProp ); + m_rExport.OutputFormat( *pFormat, bParProp, !bParProp ); - OSL_ENSURE( m_rExport.m_pCurrentStyle == pFmt, "current style was changed" ); + OSL_ENSURE( m_rExport.m_pCurrentStyle == pFormat, "current style was changed" ); // reset current style... m_rExport.m_pCurrentStyle = NULL; if ( bInsDefCharSiz ) // not derived from other Style - SetStyleDefaults( *pFmt, bParProp ); + SetStyleDefaults( *pFormat, bParProp ); m_rExport.AttrOutput().EndStyleProperties( bParProp ); } @@ -537,22 +537,22 @@ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ ) ShortToSVBT16( nLen, pUpxLen ); // add default length } -void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext ) +void MSWordStyles::GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext ) { - bFmtColl = pFmt->Which() == RES_TXTFMTCOLL || pFmt->Which() == RES_CONDTXTFMTCOLL; + bFormatColl = pFormat->Which() == RES_TXTFMTCOLL || pFormat->Which() == RES_CONDTXTFMTCOLL; // Default: none nBase = 0xfff; // Derived from? - if ( !pFmt->IsDefault() ) - nBase = GetSlot( pFmt->DerivedFrom() ); + if ( !pFormat->IsDefault() ) + nBase = GetSlot( pFormat->DerivedFrom() ); - SwFmt* pNext; - if ( bFmtColl ) - pNext = &static_cast<SwTxtFmtColl*>(pFmt)->GetNextTxtFmtColl(); + SwFormat* pNext; + if ( bFormatColl ) + pNext = &static_cast<SwTextFormatColl*>(pFormat)->GetNextTextFormatColl(); else - pNext = pFmt; // CharFmt: next CharFmt == self + pNext = pFormat; // CharFormat: next CharFormat == self nNext = GetSlot( pNext ); } @@ -589,30 +589,30 @@ void MSWordStyles::OutputStyle(const SwNumRule* pNumRule, sal_uInt16 nPos) { m_rExport.AttrOutput().StartStyle( pNumRule->GetName(), STYLE_TYPE_LIST, /*nBase =*/ 0, /*nWwNext =*/ 0, /*nWWId =*/ 0, nPos, - /*bAutoUpdateFmt =*/ false ); + /*bAutoUpdateFormat =*/ false ); m_rExport.AttrOutput().EndStyle(); } -// OutputStyle applies for TxtFmtColls and CharFmts -void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos ) +// OutputStyle applies for TextFormatColls and CharFormats +void MSWordStyles::OutputStyle( SwFormat* pFormat, sal_uInt16 nPos ) { - if ( !pFmt ) + if ( !pFormat ) m_rExport.AttrOutput().DefaultStyle( nPos ); else { - bool bFmtColl; + bool bFormatColl; sal_uInt16 nBase, nWwNext; - GetStyleData( pFmt, bFmtColl, nBase, nWwNext ); + GetStyleData( pFormat, bFormatColl, nBase, nWwNext ); - OUString aName = pFmt->GetName(); + OUString aName = pFormat->GetName(); // We want to map LO's default style to Word's "Normal" style. // Word looks for this specific style name when reading docx files. // (It must be the English word regardless of language settings) if ( nPos == 0 ) { - assert( pFmt->GetPoolFmtId() == RES_POOLCOLL_STANDARD ); + assert( pFormat->GetPoolFormatId() == RES_POOLCOLL_STANDARD ); aName = "Normal"; } else if (aName.equalsIgnoreAsciiCase("Normal")) @@ -624,8 +624,8 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos ) for ( int nSuffix = 0; ; ++nSuffix ) { bool clash=false; for ( sal_uInt16 n = 1; n < m_nUsedSlots; ++n ) - if ( m_pFmtA[n] && - m_pFmtA[n]->GetName().equalsIgnoreAsciiCase(aName) ) + if ( m_pFormatA[n] && + m_pFormatA[n]->GetName().equalsIgnoreAsciiCase(aName) ) { clash = true; break; @@ -637,14 +637,14 @@ void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos ) } } - m_rExport.AttrOutput().StartStyle( aName, (bFmtColl ? STYLE_TYPE_PARA : STYLE_TYPE_CHAR), - nBase, nWwNext, GetWWId( *pFmt ), nPos, - pFmt->IsAutoUpdateFmt() ); + m_rExport.AttrOutput().StartStyle( aName, (bFormatColl ? STYLE_TYPE_PARA : STYLE_TYPE_CHAR), + nBase, nWwNext, GetWWId( *pFormat ), nPos, + pFormat->IsAutoUpdateFormat() ); - if ( bFmtColl ) - WriteProperties( pFmt, true, nPos, nBase==0xfff ); // UPX.papx + if ( bFormatColl ) + WriteProperties( pFormat, true, nPos, nBase==0xfff ); // UPX.papx - WriteProperties( pFmt, false, nPos, bFmtColl && nBase==0xfff ); // UPX.chpx + WriteProperties( pFormat, false, nPos, bFormatColl && nBase==0xfff ); // UPX.chpx m_rExport.AttrOutput().EndStyle(); } @@ -711,7 +711,7 @@ void MSWordStyles::OutputStylesTable() if (m_aNumRules.find(n) != m_aNumRules.end()) OutputStyle(m_aNumRules[n], n); else - OutputStyle( m_pFmtA[n], n ); + OutputStyle( m_pFormatA[n], n ); } m_rExport.AttrOutput().EndStyles( m_nUsedSlots ); @@ -1040,21 +1040,21 @@ void WW8_WrPlc0::Write( SvStream& rStrm ) MSWordSections::MSWordSections( MSWordExportBase& rExport ) : mbDocumentIsProtected( false ) { - const SwSectionFmt *pFmt = 0; + const SwSectionFormat *pFormat = 0; rExport.m_pAktPageDesc = &rExport.m_pDoc->GetPageDesc( 0 ); const SfxPoolItem* pI; - const SwNode* pNd = rExport.m_pCurPam->GetCntntNode(); - const SfxItemSet* pSet = pNd ? &static_cast<const SwCntntNode*>(pNd)->GetSwAttrSet() : 0; + const SwNode* pNd = rExport.m_pCurPam->GetContentNode(); + const SfxItemSet* pSet = pNd ? &static_cast<const SwContentNode*>(pNd)->GetSwAttrSet() : 0; - sal_uLong nRstLnNum = pSet ? static_cast<const SwFmtLineNumber&>(pSet->Get( RES_LINENUMBER )).GetStartValue() : 0; + sal_uLong nRstLnNum = pSet ? static_cast<const SwFormatLineNumber&>(pSet->Get( RES_LINENUMBER )).GetStartValue() : 0; - const SwTableNode* pTblNd = rExport.m_pCurPam->GetNode().FindTableNode(); + const SwTableNode* pTableNd = rExport.m_pCurPam->GetNode().FindTableNode(); const SwSectionNode* pSectNd; - if ( pTblNd ) + if ( pTableNd ) { - pSet = &pTblNd->GetTable().GetFrmFmt()->GetAttrSet(); - pNd = pTblNd; + pSet = &pTableNd->GetTable().GetFrameFormat()->GetAttrSet(); + pNd = pTableNd; } else if (pNd && 0 != ( pSectNd = pNd->FindSectionNode() )) { @@ -1071,24 +1071,24 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) } if ( CONTENT_SECTION == pSectNd->GetSection().GetType() ) - pFmt = pSectNd->GetSection().GetFmt(); + pFormat = pSectNd->GetSection().GetFormat(); } // Hole evtl. Pagedesc des 1. Nodes if ( pSet && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) && - static_cast<const SwFmtPageDesc*>(pI)->GetPageDesc() ) + static_cast<const SwFormatPageDesc*>(pI)->GetPageDesc() ) { - AppendSection( *static_cast<const SwFmtPageDesc*>(pI), *pNd, pFmt, nRstLnNum ); + AppendSection( *static_cast<const SwFormatPageDesc*>(pI), *pNd, pFormat, nRstLnNum ); } else - AppendSection( rExport.m_pAktPageDesc, pFmt, nRstLnNum ); + AppendSection( rExport.m_pAktPageDesc, pFormat, nRstLnNum ); } WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport ) : MSWordSections( rExport ) , m_bHeaderFooterWritten( false ) - , pTxtPos( 0 ) + , pTextPos( 0 ) { // to be in sync with the AppendSection() call in the MSWordSections // constructor @@ -1101,7 +1101,7 @@ MSWordSections::~MSWordSections() WW8_WrPlcSepx::~WW8_WrPlcSepx() { - delete pTxtPos; + delete pTextPos; } bool MSWordSections::HeaderFooterWritten() @@ -1140,10 +1140,10 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo aSet.SetParent( &rSet ); //0xffffffff, what the hell is going on with that!, fixme most terribly - if ( rInfo.pSectionFmt && reinterpret_cast<SwSectionFmt*>(sal_IntPtr(-1)) != rInfo.pSectionFmt ) - aSet.Put( rInfo.pSectionFmt->GetFmtAttr( RES_COL ) ); + if ( rInfo.pSectionFormat && reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) != rInfo.pSectionFormat ) + aSet.Put( rInfo.pSectionFormat->GetFormatAttr( RES_COL ) ); - const SwFmtCol& rCol = static_cast<const SwFmtCol&>(aSet.Get( RES_COL )); + const SwFormatCol& rCol = static_cast<const SwFormatCol&>(aSet.Get( RES_COL )); const SwColumns& rColumns = rCol.GetColumns(); return rColumns.size(); } @@ -1157,63 +1157,63 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo() } void MSWordSections::AppendSection( const SwPageDesc* pPd, - const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo, bool bIsFirstParagraph ) + const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo, bool bIsFirstParagraph ) { if (HeaderFooterWritten()) { return; // #i117955# prevent new sections in endnotes } - aSects.push_back( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo, boost::none, NULL, bIsFirstParagraph ) ); + aSects.push_back( WW8_SepInfo( pPd, pSectionFormat, nLnNumRestartNo, boost::none, NULL, bIsFirstParagraph ) ); NeedsDocumentProtected( aSects.back() ); } void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd, - const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo ) + const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo ) { if (HeaderFooterWritten()) { return; // #i117955# prevent new sections in endnotes } aCps.push_back( nStartCp ); - AppendSection( pPd, pSectionFmt, nLnNumRestartNo ); + AppendSection( pPd, pSectionFormat, nLnNumRestartNo ); } -void MSWordSections::AppendSection( const SwFmtPageDesc& rPD, - const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo ) +void MSWordSections::AppendSection( const SwFormatPageDesc& rPD, + const SwNode& rNd, const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo ) { if (HeaderFooterWritten()) { return; // #i117955# prevent new sections in endnotes } - WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo, rPD.GetNumOffset(), &rNd ); + WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFormat, nLnNumRestartNo, rPD.GetNumOffset(), &rNd ); aSects.push_back( aI ); NeedsDocumentProtected( aI ); } -void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD, - const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo ) +void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPD, + const SwNode& rNd, const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo ) { if (HeaderFooterWritten()) { return; // #i117955# prevent new sections in endnotes } aCps.push_back( nStartCp ); - AppendSection( rPD, rNd, pSectionFmt, nLnNumRestartNo ); + AppendSection( rPD, rNd, pSectionFormat, nLnNumRestartNo ); } // MSWordSections::SetNum() sets in each section the Num-pointers for the first call. // All subsequent calls will be ignored. // Thus, the first list of the section will be adopted. -void MSWordSections::SetNum( const SwTxtNode* pNumNd ) +void MSWordSections::SetNum( const SwTextNode* pNumNd ) { WW8_SepInfo& rInfo = aSects.back(); if ( !rInfo.pNumNd ) // not yet assigned rInfo.pNumNd = pNumNd; } -void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt ) +void WW8_WrPlcSepx::WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt ) { sal_uInt8 nInfoFlags = 0; - const SwFtnInfo& rInfo = rWrt.m_pDoc->GetFtnInfo(); + const SwFootnoteInfo& rInfo = rWrt.m_pDoc->GetFootnoteInfo(); if( !rInfo.aErgoSum.isEmpty() ) nInfoFlags |= 0x02; if( !rInfo.aQuoVadis.isEmpty() ) nInfoFlags |= 0x04; @@ -1221,27 +1221,27 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt ) if( nInfoFlags ) { if( rWrt.bWrtWW8 ) - pTxtPos->Append( nCpStt ); // empty footnote separator + pTextPos->Append( nCpStt ); // empty footnote separator if( 0x02 & nInfoFlags ) // Footnote continuation separator { - pTxtPos->Append( nCpStt ); + pTextPos->Append( nCpStt ); rWrt.WriteStringAsPara( rInfo.aErgoSum ); rWrt.WriteStringAsPara( OUString() ); nCpStt = rWrt.Fc2Cp( rWrt.Strm().Tell() ); } else if( rWrt.bWrtWW8 ) - pTxtPos->Append( nCpStt ); + pTextPos->Append( nCpStt ); if( 0x04 & nInfoFlags ) // Footnote continuation notice { - pTxtPos->Append( nCpStt ); + pTextPos->Append( nCpStt ); rWrt.WriteStringAsPara( rInfo.aQuoVadis ); rWrt.WriteStringAsPara( OUString() ); nCpStt = rWrt.Fc2Cp( rWrt.Strm().Tell() ); } else if( rWrt.bWrtWW8 ) - pTxtPos->Append( nCpStt ); + pTextPos->Append( nCpStt ); if( rWrt.bWrtWW8 ) nEmptyStt = 3; @@ -1250,63 +1250,63 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt ) } while( 6 > nEmptyStt++ ) - pTxtPos->Append( nCpStt ); + pTextPos->Append( nCpStt ); // gleich die Flags am Dop setzen WW8Dop& rDop = *rWrt.pDop; // Footnote Info switch( rInfo.eNum ) { - case FTNNUM_PAGE: rDop.rncFtn = 2; break; - case FTNNUM_CHAPTER: rDop.rncFtn = 1; break; - default: rDop.rncFtn = 0; break; - } // rncFtn - rDop.nfcFtnRef = WW8Export::GetNumId( rInfo.aFmt.GetNumberingType() ); - rDop.nFtn = rInfo.nFtnOffset + 1; - rDop.fpc = rWrt.m_bFtnAtTxtEnd ? 2 : 1; + case FTNNUM_PAGE: rDop.rncFootnote = 2; break; + case FTNNUM_CHAPTER: rDop.rncFootnote = 1; break; + default: rDop.rncFootnote = 0; break; + } // rncFootnote + rDop.nfcFootnoteRef = WW8Export::GetNumId( rInfo.aFormat.GetNumberingType() ); + rDop.nFootnote = rInfo.nFootnoteOffset + 1; + rDop.fpc = rWrt.m_bFootnoteAtTextEnd ? 2 : 1; // Endnote Info rDop.rncEdn = 0; // rncEdn: Don't Restart const SwEndNoteInfo& rEndInfo = rWrt.m_pDoc->GetEndNoteInfo(); - rDop.nfcEdnRef = WW8Export::GetNumId( rEndInfo.aFmt.GetNumberingType() ); - rDop.nEdn = rEndInfo.nFtnOffset + 1; - rDop.epc = rWrt.m_bEndAtTxtEnd ? 3 : 0; + rDop.nfcEdnRef = WW8Export::GetNumId( rEndInfo.aFormat.GetNumberingType() ); + rDop.nEdn = rEndInfo.nFootnoteOffset + 1; + rDop.epc = rWrt.m_bEndAtTextEnd ? 3 : 0; } -void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt, +void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat, sal_uInt8 nFlag ) { const SfxPoolItem* pItem; - if( SfxItemState::SET == rFmt.GetItemState(RES_HEADER, true, &pItem) - && static_cast<const SwFmtHeader*>(pItem)->IsActive() && - static_cast<const SwFmtHeader*>(pItem)->GetHeaderFmt() ) + if( SfxItemState::SET == rFormat.GetItemState(RES_HEADER, true, &pItem) + && static_cast<const SwFormatHeader*>(pItem)->IsActive() && + static_cast<const SwFormatHeader*>(pItem)->GetHeaderFormat() ) rHeadFootFlags |= nFlag; } -void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt, +void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat, sal_uInt8 nFlag ) { const SfxPoolItem* pItem; - if( SfxItemState::SET == rFmt.GetItemState(RES_FOOTER, true, &pItem) - && static_cast<const SwFmtFooter*>(pItem)->IsActive() && - static_cast<const SwFmtFooter*>(pItem)->GetFooterFmt() ) + if( SfxItemState::SET == rFormat.GetItemState(RES_FOOTER, true, &pItem) + && static_cast<const SwFormatFooter*>(pItem)->IsActive() && + static_cast<const SwFormatFooter*>(pItem)->GetFooterFormat() ) rHeadFootFlags |= nFlag; } void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader, - const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, + const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode) { if ( nFlag & nHFFlags ) { - pTxtPos->Append( rCpPos ); - rWrt.WriteHeaderFooterText( rFmt, bHeader); + pTextPos->Append( rCpPos ); + rWrt.WriteHeaderFooterText( rFormat, bHeader); rWrt.WriteStringAsPara( OUString() ); // CR ans Ende ( sonst mault WW ) rCpPos = rWrt.Fc2Cp( rWrt.Strm().Tell() ); } else if ( rWrt.bWrtWW8 ) { - pTxtPos->Append( rCpPos ); + pTextPos->Append( rCpPos ); if ((bHeader? rWrt.m_bHasHdr : rWrt.m_bHasFtr) && nBreakCode!=0) { rWrt.WriteStringAsPara( OUString() ); // Empty paragraph for empty header/footer @@ -1326,11 +1326,11 @@ bool WW8_SepInfo::IsProtected() const { bool bRet = false; if ( - pSectionFmt && - (reinterpret_cast<SwSectionFmt*>(sal_IntPtr(-1)) != pSectionFmt) + pSectionFormat && + (reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) != pSectionFormat) ) { - const SwSection *pSection = pSectionFmt->GetSection(); + const SwSection *pSection = pSectionFormat->GetSection(); if (pSection && pSection->IsProtect()) { bRet = true; @@ -1348,7 +1348,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const for( sal_uInt16 nEnde = 0; iter != aSects.end(); ++iter ) { const WW8_SepInfo& rSepInfo = *iter; - if( !rSepInfo.pSectionFmt ) + if( !rSepInfo.pSectionFormat ) { const SwPageDesc* pPd = rSepInfo.pPageDesc; if( pPd->GetFollow() && pPd != pPd->GetFollow() && @@ -1392,10 +1392,10 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const } } -bool MSWordSections::HasBorderItem( const SwFmt& rFmt ) +bool MSWordSections::HasBorderItem( const SwFormat& rFormat ) { const SfxPoolItem* pItem; - return SfxItemState::SET == rFmt.GetItemState(RES_BOX, true, &pItem) && + return SfxItemState::SET == rFormat.GetItemState(RES_BOX, true, &pItem) && ( static_cast<const SvxBoxItem*>(pItem)->GetTop() || static_cast<const SvxBoxItem*>(pItem)->GetBottom() || static_cast<const SvxBoxItem*>(pItem)->GetLeft() || @@ -1468,21 +1468,21 @@ void WW8AttributeOutput::SectionTitlePage() m_rWW8Export.pO->push_back( 1 ); } -void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrmFmt* pPdFirstPgFmt ) +void WW8AttributeOutput::SectionPageBorders( const SwFrameFormat* pPdFormat, const SwFrameFormat* pPdFirstPgFormat ) { if ( m_rWW8Export.bWrtWW8 ) // write border of page { - sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX; - if ( pPdFmt != pPdFirstPgFmt ) + sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFormat ) ? 0 : USHRT_MAX; + if ( pPdFormat != pPdFirstPgFormat ) { - if ( MSWordSections::HasBorderItem( *pPdFirstPgFmt ) ) + if ( MSWordSections::HasBorderItem( *pPdFirstPgFormat ) ) { if ( USHRT_MAX == nPgBorder ) { nPgBorder = 1; // only the first page outlined -> Get the BoxItem from the correct format - m_rWW8Export.m_pISet = &pPdFirstPgFmt->GetAttrSet(); - OutputItem( pPdFirstPgFmt->GetFmtAttr( RES_BOX ) ); + m_rWW8Export.m_pISet = &pPdFirstPgFormat->GetAttrSet(); + OutputItem( pPdFirstPgFormat->GetFormatAttr( RES_BOX ) ); } } else if ( !nPgBorder ) @@ -1588,38 +1588,38 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA ) } void WW8Export::WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode ) + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode ) { sal_uLong nCpPos = Fc2Cp( Strm().Tell() ); IncrementHdFtIndex(); if ( !(nHeadFootFlags & WW8_HEADER_EVEN) && pDop->fFacingPages ) - pSepx->OutHeaderFooter( *this, true, rFmt, nCpPos, nHeadFootFlags, WW8_HEADER_ODD, nBreakCode ); + pSepx->OutHeaderFooter( *this, true, rFormat, nCpPos, nHeadFootFlags, WW8_HEADER_ODD, nBreakCode ); else - pSepx->OutHeaderFooter( *this, true, rLeftFmt, nCpPos, nHeadFootFlags, WW8_HEADER_EVEN, nBreakCode ); + pSepx->OutHeaderFooter( *this, true, rLeftFormat, nCpPos, nHeadFootFlags, WW8_HEADER_EVEN, nBreakCode ); IncrementHdFtIndex(); - pSepx->OutHeaderFooter( *this, true, rFmt, nCpPos, nHeadFootFlags, WW8_HEADER_ODD, nBreakCode ); + pSepx->OutHeaderFooter( *this, true, rFormat, nCpPos, nHeadFootFlags, WW8_HEADER_ODD, nBreakCode ); IncrementHdFtIndex(); if ( !(nHeadFootFlags & WW8_FOOTER_EVEN) && pDop->fFacingPages ) - pSepx->OutHeaderFooter( *this, false, rFmt, nCpPos, nHeadFootFlags, WW8_FOOTER_ODD, nBreakCode ); + pSepx->OutHeaderFooter( *this, false, rFormat, nCpPos, nHeadFootFlags, WW8_FOOTER_ODD, nBreakCode ); else - pSepx->OutHeaderFooter( *this, false, rLeftFmt, nCpPos, nHeadFootFlags, WW8_FOOTER_EVEN, nBreakCode ); + pSepx->OutHeaderFooter( *this, false, rLeftFormat, nCpPos, nHeadFootFlags, WW8_FOOTER_EVEN, nBreakCode ); IncrementHdFtIndex(); - pSepx->OutHeaderFooter( *this, false, rFmt, nCpPos, nHeadFootFlags, WW8_FOOTER_ODD, nBreakCode ); + pSepx->OutHeaderFooter( *this, false, rFormat, nCpPos, nHeadFootFlags, WW8_FOOTER_ODD, nBreakCode ); //#i24344# Drawing objects cannot be directly shared between main hd/ft //and title hd/ft so we need to differenciate them IncrementHdFtIndex(); - pSepx->OutHeaderFooter( *this, true, rFirstPageFmt, nCpPos, nHeadFootFlags, WW8_HEADER_FIRST, nBreakCode ); - pSepx->OutHeaderFooter( *this, false, rFirstPageFmt, nCpPos, nHeadFootFlags, WW8_FOOTER_FIRST, nBreakCode ); + pSepx->OutHeaderFooter( *this, true, rFirstPageFormat, nCpPos, nHeadFootFlags, WW8_HEADER_FIRST, nBreakCode ); + pSepx->OutHeaderFooter( *this, false, rFirstPageFormat, nCpPos, nHeadFootFlags, WW8_FOOTER_FIRST, nBreakCode ); } void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAttrDesc* pA ) { const SwPageDesc* pPd = rSepInfo.pPageDesc; - if ( rSepInfo.pSectionFmt && !pPd ) + if ( rSepInfo.pSectionFormat && !pPd ) pPd = &m_pDoc->GetPageDesc( 0 ); m_pAktPageDesc = pPd; @@ -1647,23 +1647,23 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt */ sal_uInt8 nBreakCode = 2; // default neue Seite beginnen bool bOutPgDscSet = true, bLeftRightPgChain = false, bOutputStyleItemSet = false; - const SwFrmFmt* pPdFmt = &pPd->GetMaster(); - if ( rSepInfo.pSectionFmt ) + const SwFrameFormat* pPdFormat = &pPd->GetMaster(); + if ( rSepInfo.pSectionFormat ) { - // if pSectionFmt is set, then there is a SectionNode + // if pSectionFormat is set, then there is a SectionNode // valid pointer -> start Section , // 0xfff -> Section terminated nBreakCode = 0; // fortlaufender Abschnitt - if ( rSepInfo.pPDNd && rSepInfo.pPDNd->IsCntntNode() ) + if ( rSepInfo.pPDNd && rSepInfo.pPDNd->IsContentNode() ) { - if ( !NoPageBreakSection( &rSepInfo.pPDNd->GetCntntNode()->GetSwAttrSet() ) ) + if ( !NoPageBreakSection( &rSepInfo.pPDNd->GetContentNode()->GetSwAttrSet() ) ) { nBreakCode = 2; } } - if ( reinterpret_cast<SwSectionFmt*>(sal_IntPtr(-1)) != rSepInfo.pSectionFmt ) + if ( reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)) != rSepInfo.pSectionFormat ) { if ( nBreakCode == 0 ) bOutPgDscSet = false; @@ -1671,7 +1671,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // produce Itemset, which inherits PgDesk-Attr-Set: // als Nachkomme wird bei 'deep'-OutputItemSet // auch der Vorfahr abgeklappert - const SfxItemSet* pPdSet = &pPdFmt->GetAttrSet(); + const SfxItemSet* pPdSet = &pPdFormat->GetAttrSet(); SfxItemSet aSet( *pPdSet->GetPool(), pPdSet->GetRanges() ); aSet.SetParent( pPdSet ); @@ -1679,9 +1679,9 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // umsetzen const SvxLRSpaceItem &rSectionLR = - ItemGet<SvxLRSpaceItem>( *(rSepInfo.pSectionFmt), RES_LR_SPACE ); + ItemGet<SvxLRSpaceItem>( *(rSepInfo.pSectionFormat), RES_LR_SPACE ); const SvxLRSpaceItem &rPageLR = - ItemGet<SvxLRSpaceItem>( *pPdFmt, RES_LR_SPACE ); + ItemGet<SvxLRSpaceItem>( *pPdFormat, RES_LR_SPACE ); SvxLRSpaceItem aResultLR( rPageLR.GetLeft() + rSectionLR.GetLeft(), rPageLR.GetRight() + @@ -1689,13 +1689,13 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt //i120133: The Section width should consider section indent value. if (rSectionLR.GetLeft()+rSectionLR.GetRight()!=0) { - const SwFmtCol& rCol = dynamic_cast<const SwFmtCol&>(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL)); - SwFmtCol aCol(rCol); + const SwFormatCol& rCol = dynamic_cast<const SwFormatCol&>(rSepInfo.pSectionFormat->GetFormatAttr(RES_COL)); + SwFormatCol aCol(rCol); aCol.SetAdjustValue(rSectionLR.GetLeft()+rSectionLR.GetRight()); aSet.Put(aCol); } else - aSet.Put(rSepInfo.pSectionFmt->GetFmtAttr(RES_COL)); + aSet.Put(rSepInfo.pSectionFormat->GetFormatAttr(RES_COL)); aSet.Put( aResultLR ); @@ -1710,7 +1710,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt //Cannot export as normal page framedir, as continuous sections //cannot contain any grid settings like proper sections - AttrOutput().SectionBiDi( FRMDIR_HORI_RIGHT_TOP == TrueFrameDirection( *rSepInfo.pSectionFmt ) ); + AttrOutput().SectionBiDi( FRMDIR_HORI_RIGHT_TOP == TrueFrameDirection( *rSepInfo.pSectionFormat ) ); m_pISet = pOldI; } @@ -1723,7 +1723,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // The latter method was previously used by the doc/docx import filter. // In both of these cases, we emit a single Word section with different // first page header/footer. - const SwFrmFmt* pPdFirstPgFmt = &pPd->GetFirstMaster(); + const SwFrameFormat* pPdFirstPgFormat = &pPd->GetFirstMaster(); bool titlePage = !pPd->IsFirstShared(); if ( bOutPgDscSet ) { @@ -1739,16 +1739,16 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt ( !rSepInfo.pPDNd || pPd->IsFollowNextPageOfNode( *rSepInfo.pPDNd ) ) ) { const SwPageDesc *pFollow = pPd->GetFollow(); - const SwFrmFmt& rFollowFmt = pFollow->GetMaster(); - if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFmt, rFollowFmt ) || titlePage ) + const SwFrameFormat& rFollowFormat = pFollow->GetMaster(); + if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFormat, rFollowFormat ) || titlePage ) { if (rSepInfo.pPDNd) - pPdFirstPgFmt = pPd->GetPageFmtOfNode( *rSepInfo.pPDNd ); + pPdFirstPgFormat = pPd->GetPageFormatOfNode( *rSepInfo.pPDNd ); else - pPdFirstPgFmt = &pPd->GetMaster(); + pPdFirstPgFormat = &pPd->GetMaster(); m_pAktPageDesc = pPd = pFollow; - pPdFmt = &rFollowFmt; + pPdFormat = &rFollowFormat; // has different headers/footers for the title page titlePage = true; @@ -1762,9 +1762,9 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt const SfxPoolItem* pItem; if ( titlePage && SfxItemState::SET == - pPdFirstPgFmt->GetItemState( RES_PAPER_BIN, true, &pItem ) ) + pPdFirstPgFormat->GetItemState( RES_PAPER_BIN, true, &pItem ) ) { - m_pISet = &pPdFirstPgFmt->GetAttrSet(); + m_pISet = &pPdFirstPgFormat->GetAttrSet(); m_bOutFirstPage = true; AttrOutput().OutputItem( *pItem ); m_bOutFirstPage = false; @@ -1786,16 +1786,16 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt { nBreakCode = 3; pPd = pPd->GetFollow(); - pPdFmt = &pPd->GetMaster(); + pPdFormat = &pPd->GetMaster(); } else nBreakCode = 4; } - m_pISet = &pPdFmt->GetAttrSet(); + m_pISet = &pPdFormat->GetAttrSet(); if (!bOutputStyleItemSet) - AttrOutput().OutputStyleItemSet( pPdFmt->GetAttrSet(), true, false ); - AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt ); + AttrOutput().OutputStyleItemSet( pPdFormat->GetAttrSet(), true, false ); + AttrOutput().SectionPageBorders( pPdFormat, pPdFirstPgFormat ); m_pISet = pOldI; // then the rest of the settings from PageDesc @@ -1813,7 +1813,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt AttrOutput().SectionType( nBreakCode ); - const SwTxtNode* pNd = rSepInfo.pNumNd; + const SwTextNode* pNd = rSepInfo.pNumNd; if ( pNd ) { const SwNumRule* pRule = pNd->GetNumRule(); @@ -1824,27 +1824,27 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // Header or Footer sal_uInt8 nHeadFootFlags = 0; - const SwFrmFmt* pPdLeftFmt = bLeftRightPgChain + const SwFrameFormat* pPdLeftFormat = bLeftRightPgChain ? &pPd->GetFollow()->GetMaster() : &pPd->GetLeft(); // Ensure that headers are written if section is first paragraph - if ( nBreakCode != 0 || ( rSepInfo.pSectionFmt && rSepInfo.bIsFirstParagraph )) + if ( nBreakCode != 0 || ( rSepInfo.pSectionFormat && rSepInfo.bIsFirstParagraph )) { if ( titlePage ) { // there is a First Page: - MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_HEADER_FIRST ); - MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFirstPgFmt, WW8_FOOTER_FIRST ); + MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFirstPgFormat, WW8_HEADER_FIRST ); + MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFirstPgFormat, WW8_FOOTER_FIRST ); } - MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFmt, WW8_HEADER_ODD ); - MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFmt, WW8_FOOTER_ODD ); + MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdFormat, WW8_HEADER_ODD ); + MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdFormat, WW8_FOOTER_ODD ); if ( !pPd->IsHeaderShared() || bLeftRightPgChain ) - MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdLeftFmt, WW8_HEADER_EVEN ); + MSWordSections::SetHeaderFlag( nHeadFootFlags, *pPdLeftFormat, WW8_HEADER_EVEN ); if ( !pPd->IsFooterShared() || bLeftRightPgChain ) - MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFmt, WW8_FOOTER_EVEN ); + MSWordSections::SetFooterFlag( nHeadFootFlags, *pPdLeftFormat, WW8_FOOTER_EVEN ); AttrOutput().SectionWW6HeaderFooterFlags( nHeadFootFlags ); } @@ -1856,19 +1856,19 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt // Umrandungen an Kopf- und Fusstexten muessten etwa so gehen: // Dabei muss etwas wie pOut eingebaut werden, // das bei jeder Spezialtext-Zeile wiederholt wird. - const SwFrmFmt* pFFmt = rFt.GetFooterFmt(); - const SvxBoxItem& rBox = pFFmt->GetBox(false); - OutWW8_SwFmtBox1( m_rWW8Export.pOut, rBox, false); + const SwFrameFormat* pFFormat = rFt.GetFooterFormat(); + const SvxBoxItem& rBox = pFFormat->GetBox(false); + OutWW8_SwFormatBox1( m_rWW8Export.pOut, rBox, false); !!!!!!!!!!! You can turn this into paragraph attributes, which are then observed in each paragraph. Applies to background / border. !!!!!!!!!!! */ - const SwTxtNode *pOldPageRoot = GetHdFtPageRoot(); - SetHdFtPageRoot( rSepInfo.pPDNd ? rSepInfo.pPDNd->GetTxtNode() : 0 ); + const SwTextNode *pOldPageRoot = GetHdFtPageRoot(); + SetHdFtPageRoot( rSepInfo.pPDNd ? rSepInfo.pPDNd->GetTextNode() : 0 ); - WriteHeadersFooters( nHeadFootFlags, *pPdFmt, *pPdLeftFmt, *pPdFirstPgFmt, nBreakCode ); + WriteHeadersFooters( nHeadFootFlags, *pPdFormat, *pPdLeftFormat, *pPdFirstPgFormat, nBreakCode ); SetHdFtPageRoot( pOldPageRoot ); @@ -1878,14 +1878,14 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt m_bOutPageDescs = bOldPg; } -bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt ) +bool WW8_WrPlcSepx::WriteKFText( WW8Export& rWrt ) { sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() ); - OSL_ENSURE( !pTxtPos, "who set the pointer?" ); - pTxtPos = new WW8_WrPlc0( nCpStart ); + OSL_ENSURE( !pTextPos, "who set the pointer?" ); + pTextPos = new WW8_WrPlc0( nCpStart ); - WriteFtnEndTxt( rWrt, nCpStart ); + WriteFootnoteEndText( rWrt, nCpStart ); CheckForFacinPg( rWrt ); unsigned int nOldIndex = rWrt.GetHdFtIndex(); @@ -1906,24 +1906,24 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt ) } rWrt.SetHdFtIndex( nOldIndex ); //0 - if ( pTxtPos->Count() ) + if ( pTextPos->Count() ) { // HdFt available? sal_uLong nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() ); - pTxtPos->Append( nCpEnd ); // End of last Header/Footer for PlcfHdd + pTextPos->Append( nCpEnd ); // End of last Header/Footer for PlcfHdd if ( nCpEnd > nCpStart ) { ++nCpEnd; - pTxtPos->Append( nCpEnd + 1 ); // End of last Header/Footer for PlcfHdd + pTextPos->Append( nCpEnd + 1 ); // End of last Header/Footer for PlcfHdd rWrt.WriteStringAsPara( OUString() ); // CR ans Ende ( sonst mault WW ) } - rWrt.m_pFldHdFt->Finish( nCpEnd, rWrt.pFib->ccpText + rWrt.pFib->ccpFtn ); + rWrt.m_pFieldHdFt->Finish( nCpEnd, rWrt.pFib->ccpText + rWrt.pFib->ccpFootnote ); rWrt.pFib->ccpHdr = nCpEnd - nCpStart; } else - delete pTxtPos, pTxtPos = 0; + delete pTextPos, pTextPos = 0; return rWrt.pFib->ccpHdr != 0; } @@ -1977,34 +1977,34 @@ void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const void WW8_WrPlcSepx::WritePlcHdd( WW8Export& rWrt ) const { // Don't write out the PlcfHdd if ccpHdd is 0: it's a validation failure case. - if( rWrt.pFib->ccpHdr != 0 && pTxtPos && pTxtPos->Count() ) + if( rWrt.pFib->ccpHdr != 0 && pTextPos && pTextPos->Count() ) { rWrt.pFib->fcPlcfhdd = rWrt.pTableStrm->Tell(); - pTxtPos->Write( *rWrt.pTableStrm ); // Plc0 + pTextPos->Write( *rWrt.pTableStrm ); // Plc0 rWrt.pFib->lcbPlcfhdd = rWrt.pTableStrm->Tell() - rWrt.pFib->fcPlcfhdd; } } -void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader ) +void MSWordExportBase::WriteHeaderFooterText( const SwFormat& rFormat, bool bHeader ) { - const SwFmtCntnt *pCntnt; + const SwFormatContent *pContent; if ( bHeader ) { m_bHasHdr = true; - const SwFmtHeader& rHd = rFmt.GetHeader(); - OSL_ENSURE( rHd.GetHeaderFmt(), "Header text is not here" ); - pCntnt = &rHd.GetHeaderFmt()->GetCntnt(); + const SwFormatHeader& rHd = rFormat.GetHeader(); + OSL_ENSURE( rHd.GetHeaderFormat(), "Header text is not here" ); + pContent = &rHd.GetHeaderFormat()->GetContent(); } else { m_bHasFtr = true; - const SwFmtFooter& rFt = rFmt.GetFooter(); - OSL_ENSURE( rFt.GetFooterFmt(), "Footer text is not here" ); - pCntnt = &rFt.GetFooterFmt()->GetCntnt(); + const SwFormatFooter& rFt = rFormat.GetFooter(); + OSL_ENSURE( rFt.GetFooterFormat(), "Footer text is not here" ); + pContent = &rFt.GetFooterFormat()->GetContent(); } - const SwNodeIndex* pSttIdx = pCntnt->GetCntntIdx(); + const SwNodeIndex* pSttIdx = pContent->GetContentIdx(); if ( pSttIdx ) { @@ -2033,24 +2033,24 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader ) } } -// class WW8_WrPlcFtnEdn : Collect the Footnotes and Endnotes and output their text +// class WW8_WrPlcFootnoteEdn : Collect the Footnotes and Endnotes and output their text // and Plcs at the end of the document. -// WW8_WrPlcFtnEdn is the class for Footnotes and Endnotes +// WW8_WrPlcFootnoteEdn is the class for Footnotes and Endnotes WW8_WrPlcSubDoc::WW8_WrPlcSubDoc() - : pTxtPos( 0 ) + : pTextPos( 0 ) { } WW8_WrPlcSubDoc::~WW8_WrPlcSubDoc() { - delete pTxtPos; + delete pTextPos; } -void WW8_WrPlcFtnEdn::Append( WW8_CP nCp, const SwFmtFtn& rFtn ) +void WW8_WrPlcFootnoteEdn::Append( WW8_CP nCp, const SwFormatFootnote& rFootnote ) { aCps.push_back( nCp ); - aCntnt.push_back( &rFtn ); + aContent.push_back( &rFootnote ); } WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd) @@ -2061,7 +2061,7 @@ WW8_Annotation::WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, { mpRichText = pPostIt->GetTextObject(); if (!mpRichText) - msSimpleText = pPostIt->GetTxt(); + msSimpleText = pPostIt->GetText(); msOwner = pPostIt->GetPar1(); m_sInitials = pPostIt->GetInitials(); maDateTime = DateTime(pPostIt->GetDate(), pPostIt->GetTime()); @@ -2097,7 +2097,7 @@ void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwPostItField *pPostIt ) { p = new WW8_Annotation(pPostIt, nCp, nCp); } - aCntnt.push_back( p ); + aContent.push_back( p ); } void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwRedlineData *pRedline ) @@ -2105,7 +2105,7 @@ void WW8_WrPlcAnnotations::Append( WW8_CP nCp, const SwRedlineData *pRedline ) maProcessedRedlines.insert(pRedline); aCps.push_back( nCp ); WW8_Annotation* p = new WW8_Annotation(pRedline); - aCntnt.push_back( p ); + aContent.push_back( p ); } bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline ) @@ -2115,19 +2115,19 @@ bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline ) WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations() { - for( sal_uInt16 n=0; n < aCntnt.size(); n++ ) - delete static_cast<WW8_Annotation const *>(aCntnt[n]); + for( sal_uInt16 n=0; n < aContent.size(); n++ ) + delete static_cast<WW8_Annotation const *>(aContent[n]); } -bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, +bool WW8_WrPlcSubDoc::WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount ) { - sal_uInt16 nLen = aCntnt.size(); + sal_uInt16 nLen = aContent.size(); if ( !nLen ) return false; sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() ); - pTxtPos = new WW8_WrPlc0( nCpStart ); + pTextPos = new WW8_WrPlc0( nCpStart ); sal_uInt16 i; switch ( nTTyp ) @@ -2135,17 +2135,17 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, case TXT_ATN: for ( i = 0; i < nLen; i++ ) { - // beginning for PlcfAtnTxt - pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); + // beginning for PlcfAtnText + pTextPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); rWrt.WritePostItBegin(); - const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aCntnt[i]); + const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aContent[i]); if (rAtn.mpRichText) rWrt.WriteOutliner(*rAtn.mpRichText, nTTyp); else { - OUString sTxt(rAtn.msSimpleText); - rWrt.WriteStringAsPara(sTxt.replace(0x0A, 0x0B)); + OUString sText(rAtn.msSimpleText); + rWrt.WriteStringAsPara(sText.replace(0x0A, 0x0B)); } } break; @@ -2157,27 +2157,27 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, // textbox content WW8_CP nCP = rWrt.Fc2Cp( rWrt.Strm().Tell() ); aCps.insert( aCps.begin()+i, nCP ); - pTxtPos->Append( nCP ); + pTextPos->Append( nCP ); - if( aCntnt[ i ] != NULL ) + if( aContent[ i ] != NULL ) { // is it an writer or sdr - textbox? - const SdrObject& rObj = *static_cast<SdrObject const *>(aCntnt[ i ]); + const SdrObject& rObj = *static_cast<SdrObject const *>(aContent[ i ]); if (rObj.GetObjInventor() == FmFormInventor) { - sal_uInt8 nOldTyp = rWrt.m_nTxtTyp; - rWrt.m_nTxtTyp = nTTyp; + sal_uInt8 nOldTyp = rWrt.m_nTextTyp; + rWrt.m_nTextTyp = nTTyp; rWrt.GetOCXExp().ExportControl(rWrt, dynamic_cast<const SdrUnoObj&>(rObj)); - rWrt.m_nTxtTyp = nOldTyp; + rWrt.m_nTextTyp = nOldTyp; } else if( rObj.ISA( SdrTextObj ) ) rWrt.WriteSdrTextObj(dynamic_cast<const SdrTextObj&>(rObj), nTTyp); else { - const SwFrmFmt* pFmt = ::FindFrmFmt( &rObj ); - OSL_ENSURE( pFmt, "where is the format?" ); + const SwFrameFormat* pFormat = ::FindFrameFormat( &rObj ); + OSL_ENSURE( pFormat, "where is the format?" ); - const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx(); + const SwNodeIndex* pNdIdx = pFormat->GetContent().GetContentIdx(); OSL_ENSURE( pNdIdx, "where is the StartNode of the Textbox?" ); rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1, pNdIdx->GetNode().EndOfSectionIndex(), @@ -2208,10 +2208,10 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, } } } - else if (i < aSpareFmts.size() && aSpareFmts[i]) + else if (i < aSpareFormats.size() && aSpareFormats[i]) { - const SwFrmFmt& rFmt = *aSpareFmts[i]; - const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx(); + const SwFrameFormat& rFormat = *aSpareFormats[i]; + const SwNodeIndex* pNdIdx = rFormat.GetContent().GetContentIdx(); rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1, pNdIdx->GetNode().EndOfSectionIndex(), nTTyp ); } @@ -2225,13 +2225,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, case TXT_FTN: for ( i = 0; i < nLen; i++ ) { - // beginning for PlcfFtnTxt/PlcfEdnTxt - pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); + // beginning for PlcfFootnoteText/PlcfEdnText + pTextPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); // Note content - const SwFmtFtn* pFtn = static_cast<SwFmtFtn const *>(aCntnt[ i ]); - rWrt.WriteFtnBegin( *pFtn ); - const SwNodeIndex* pIdx = pFtn->GetTxtFtn()->GetStartNode(); + const SwFormatFootnote* pFootnote = static_cast<SwFormatFootnote const *>(aContent[ i ]); + rWrt.WriteFootnoteBegin( *pFootnote ); + const SwNodeIndex* pIdx = pFootnote->GetTextFootnote()->GetStartNode(); OSL_ENSURE( pIdx, "wo ist der StartNode der Fuss-/EndNote?" ); rWrt.WriteSpecialText( pIdx->GetIndex() + 1, pIdx->GetNode().EndOfSectionIndex(), @@ -2243,12 +2243,12 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, OSL_ENSURE( false, "was ist das fuer ein SubDocType?" ); } - pTxtPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); + pTextPos->Append( rWrt.Fc2Cp( rWrt.Strm().Tell() )); // CR ans Ende ( sonst mault WW ) rWrt.WriteStringAsPara( OUString() ); WW8_CP nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() ); - pTxtPos->Append( nCpEnd ); + pTextPos->Append( nCpEnd ); rCount = nCpEnd - nCpStart; return ( rCount != 0 ); @@ -2265,7 +2265,7 @@ static bool lcl_PosComp( const std::pair<WW8_CP, int>& aFirst, const std::pair<W } void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, - WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const + WW8_FC& rTextStart, sal_Int32& rTextCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const { sal_uLong nFcStart = rWrt.pTableStrm->Tell(); @@ -2273,7 +2273,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, if ( !nLen ) return; - OSL_ENSURE( aCps.size() + 2 == pTxtPos->Count(), "WritePlc: DeSync" ); + OSL_ENSURE( aCps.size() + 2 == pTextPos->Count(), "WritePlc: DeSync" ); ::std::vector<std::pair<OUString,OUString> > aStrArr; typedef ::std::vector<std::pair<OUString,OUString> >::iterator myiter; @@ -2294,7 +2294,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, int nIdx = 0; for ( i = 0; i < nLen; ++i ) { - const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aCntnt[i]); + const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aContent[i]); aStrArr.push_back(std::pair<OUString,OUString>(rAtn.msOwner,rAtn.m_sInitials)); // record start and end positions for ranges if( rAtn.m_nRangeStart != rAtn.m_nRangeEnd ) @@ -2408,7 +2408,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, { for( i = 0; i < nLen; ++i ) { - const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aCntnt[i]); + const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aContent[i]); sal_uInt32 nDTTM = sw::ms::DateTime2DTTM(rAtn.maDateTime); @@ -2430,7 +2430,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, case TXT_TXTBOX: case TXT_HFTXTBOX: { - pTxtPos->Write( *rWrt.pTableStrm ); + pTextPos->Write( *rWrt.pTableStrm ); const std::vector<sal_uInt32>* pShapeIds = GetShapeIdArr(); OSL_ENSURE( pShapeIds, "Where are the ShapeIds?" ); @@ -2438,14 +2438,14 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, { // write textbox story - FTXBXS // is it an writer or sdr - textbox? - const SdrObject* pObj = static_cast<SdrObject const *>(aCntnt[ i ]); + const SdrObject* pObj = static_cast<SdrObject const *>(aContent[ i ]); sal_Int32 nCnt = 1; if (pObj && !pObj->ISA( SdrTextObj ) ) { // find the "highest" SdrObject of this - const SwFrmFmt& rFmt = *::FindFrmFmt( pObj ); + const SwFrameFormat& rFormat = *::FindFrameFormat( pObj ); - const SwFmtChain* pChn = &rFmt.GetChain(); + const SwFormatChain* pChn = &rFormat.GetChain(); while ( pChn->GetNext() ) { // has a chain? @@ -2456,11 +2456,11 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, } if( NULL == pObj ) { - if (i < aSpareFmts.size() && aSpareFmts[i]) + if (i < aSpareFormats.size() && aSpareFormats[i]) { - const SwFrmFmt& rFmt = *aSpareFmts[i]; + const SwFrameFormat& rFormat = *aSpareFormats[i]; - const SwFmtChain* pChn = &rFmt.GetChain(); + const SwFormatChain* pChn = &rFormat.GetChain(); while( pChn->GetNext() ) { // has a chain? @@ -2498,7 +2498,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, // n+1-th CP-Pos according to the manual SwWW8Writer::WriteLong( *rWrt.pTableStrm, - rFib.ccpText + rFib.ccpFtn + rFib.ccpHdr + rFib.ccpEdn + + rFib.ccpText + rFib.ccpFootnote + rFib.ccpHdr + rFib.ccpEdn + rFib.ccpTxbx + rFib.ccpHdrTxbx + 1 ); if ( TXT_ATN == nTTyp ) @@ -2506,7 +2506,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, sal_uInt16 nlTag = 0; for ( i = 0; i < nLen; ++i ) { - const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aCntnt[i]); + const WW8_Annotation& rAtn = *static_cast<const WW8_Annotation*>(aContent[i]); //aStrArr is sorted myiter aIter = ::std::lower_bound(aStrArr.begin(), @@ -2566,9 +2566,9 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, sal_uInt16 nNo = 0; for ( i = 0; i < nLen; ++i ) // write Flags { - const SwFmtFtn* pFtn = static_cast<SwFmtFtn const *>(aCntnt[ i ]); + const SwFormatFootnote* pFootnote = static_cast<SwFormatFootnote const *>(aContent[ i ]); SwWW8Writer::WriteShort( *rWrt.pTableStrm, - !pFtn->GetNumStr().isEmpty() ? 0 : ++nNo ); + !pFootnote->GetNumStr().isEmpty() ? 0 : ++nNo ); } } } @@ -2576,7 +2576,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, nFcStart = rWrt.pTableStrm->Tell(); rRefCount = nFcStart - rRefStart; - pTxtPos->Write( *rWrt.pTableStrm ); + pTextPos->Write( *rWrt.pTableStrm ); switch ( nTTyp ) { @@ -2597,8 +2597,8 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, break; } - rTxtStart = nFcStart; - rTxtCount = rWrt.pTableStrm->Tell() - nFcStart; + rTextStart = nFcStart; + rTextCount = rWrt.pTableStrm->Tell() - nFcStart; } const std::vector<sal_uInt32>* WW8_WrPlcSubDoc::GetShapeIdArr() const diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 09184f03cd10..c7883a6f6fa0 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -351,7 +351,7 @@ static void WriteDop( WW8Export& rWrt ) // Werte aus der DocStatistik (werden aufjedenfall fuer die // DocStat-Felder benoetigt!) - rDop.fWCFtnEdn = true; // because they are included in StarWriter + rDop.fWCFootnoteEdn = true; // because they are included in StarWriter const SwDocStat& rDStat = rWrt.m_pDoc->getIDocumentStatistics().GetDocStat(); rDop.cWords = rDStat.nWord; @@ -405,11 +405,11 @@ static void WriteDop( WW8Export& rWrt ) // ( we do not have this fields! ) // and also for the Headers and Footers - rDop.cWordsFtnEnd = rDStat.nWord; - rDop.cChFtnEdn = rDStat.nChar; - rDop.cPgFtnEdn = (sal_Int16)rDStat.nPage; - rDop.cParasFtnEdn = rDStat.nPara; - rDop.cLinesFtnEdn = rDStat.nPara; + rDop.cWordsFootnoteEnd = rDStat.nWord; + rDop.cChFootnoteEdn = rDStat.nChar; + rDop.cPgFootnoteEdn = (sal_Int16)rDStat.nPage; + rDop.cParasFootnoteEdn = rDStat.nPara; + rDop.cLinesFootnoteEdn = rDStat.nPara; rDop.fDontUseHTMLAutoSpacing = rWrt.m_pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PARA_SPACE_MAX); @@ -739,16 +739,16 @@ void WW8_WrPlc1::Write( SvStream& rStrm ) rStrm.Write( pData, (i-1) * nStructSiz ); } -// Class WW8_WrPlcFld for fields +// Class WW8_WrPlcField for fields -bool WW8_WrPlcFld::Write( WW8Export& rWrt ) +bool WW8_WrPlcField::Write( WW8Export& rWrt ) { if( WW8_WrPlc1::Count() <= 1 ) return false; WW8_FC *pfc; sal_Int32 *plc; - switch (nTxtTyp) + switch (nTextTyp) { case TXT_MAINTEXT: pfc = &rWrt.pFib->fcPlcffldMom; @@ -760,8 +760,8 @@ bool WW8_WrPlcFld::Write( WW8Export& rWrt ) break; case TXT_FTN: - pfc = &rWrt.pFib->fcPlcffldFtn; - plc = &rWrt.pFib->lcbPlcffldFtn; + pfc = &rWrt.pFib->fcPlcffldFootnote; + plc = &rWrt.pFib->lcbPlcffldFootnote; break; case TXT_EDN: @@ -1325,10 +1325,10 @@ WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const return nFc + aPcts.back().GetStartCp(); } -void WW8Export::AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) +void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) { std::vector< const ::sw::mark::IMark* > aArr; - sal_uInt16 nCntnt; + sal_uInt16 nContent; const sal_Int32 nAktEnd = nAktPos + nLen; if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr )) { @@ -1351,15 +1351,15 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_In } if( !pOPos || ( nNd == pPos->nNode.GetIndex() && - ( nCntnt = pPos->nContent.GetIndex() ) >= nAktPos && - nCntnt < nAktEnd ) ) + ( nContent = pPos->nContent.GetIndex() ) >= nAktPos && + nContent < nAktEnd ) ) { sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos; m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk); } if( pOPos && nNd == pOPos->nNode.GetIndex() && - ( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos && - nCntnt < nAktEnd ) + ( nContent = pOPos->nContent.GetIndex() ) >= nAktPos && + nContent < nAktEnd ) { sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos; m_pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk); @@ -1368,7 +1368,7 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_In } } -void WW8Export::AppendAnnotationMarks(const SwTxtNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) +void WW8Export::AppendAnnotationMarks(const SwTextNode& rNode, sal_Int32 nAktPos, sal_Int32 nLen) { IMarkVector aMarks; if (GetAnnotationMarks(rNode, nAktPos, nAktPos + nLen, aMarks)) @@ -1403,19 +1403,19 @@ int MSWordExportBase::CollectGrfsOfBullets() if ( m_pDoc ) { - size_t nCountRule = m_pDoc->GetNumRuleTbl().size(); + size_t nCountRule = m_pDoc->GetNumRuleTable().size(); for (size_t n = 0; n < nCountRule; ++n) { - const SwNumRule &rRule = *( m_pDoc->GetNumRuleTbl().at(n) ); + const SwNumRule &rRule = *( m_pDoc->GetNumRuleTable().at(n) ); sal_uInt16 nLevels = rRule.IsContinusNum() ? 1 : 9; for (sal_uInt16 nLvl = 0; nLvl < nLevels; ++nLvl) { - const SwNumFmt &rFmt = rRule.Get(nLvl); - if (SVX_NUM_BITMAP != rFmt.GetNumberingType()) + const SwNumFormat &rFormat = rRule.Get(nLvl); + if (SVX_NUM_BITMAP != rFormat.GetNumberingType()) { continue; } - const Graphic *pGraf = rFmt.GetBrush()? rFmt.GetBrush()->GetGraphic():0; + const Graphic *pGraf = rFormat.GetBrush()? rFormat.GetBrush()->GetGraphic():0; if ( pGraf ) { bool bHas = false; @@ -1459,7 +1459,7 @@ void MSWordExportBase::BulletDefinitions() } //Export Graphic of Bullets -void WW8Export::ExportGrfBullet(const SwTxtNode& rNd) +void WW8Export::ExportGrfBullet(const SwTextNode& rNd) { int nCount = CollectGrfsOfBullets(); if (nCount > 0) @@ -1692,10 +1692,10 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const OUString& rStr, rStrm.Write(&aBytes[0], aBytes.size()); } -void WW8Export::WriteStringAsPara( const OUString& rTxt, sal_uInt16 nStyleId ) +void WW8Export::WriteStringAsPara( const OUString& rText, sal_uInt16 nStyleId ) { - if( !rTxt.isEmpty() ) - OutSwString( rTxt, 0, rTxt.getLength(), IsUnicode(), RTL_TEXTENCODING_MS_1252 ); + if( !rText.isEmpty() ) + OutSwString( rText, 0, rText.getLength(), IsUnicode(), RTL_TEXTENCODING_MS_1252 ); WriteCR(); // CR thereafter ww::bytes aArr; @@ -1717,8 +1717,8 @@ void WW8Export::WriteStringAsPara( const OUString& rTxt, sal_uInt16 nStyleId ) void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp ) { - sal_uInt8 nOldTyp = m_nTxtTyp; - m_nTxtTyp = nTTyp; + sal_uInt8 nOldTyp = m_nTextTyp; + m_nTextTyp = nTTyp; SwPaM* pOldPam = m_pCurPam; //!! Simply shifting the PaM without restoring should do the job too SwPaM* pOldEnd = m_pOrigPam; bool bOldPageDescs = m_bOutPageDescs; @@ -1742,7 +1742,7 @@ void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_u delete m_pCurPam; // delete Pam m_pCurPam = pOldPam; m_pOrigPam = pOldEnd; - m_nTxtTyp = nOldTyp; + m_nTextTyp = nOldTyp; } void WW8Export::OutSwString(const OUString& rStr, sal_Int32 nStt, @@ -1809,7 +1809,7 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd ) // Common stuff aData.pOldPam = m_pCurPam; aData.pOldEnd = m_pOrigPam; - aData.pOldFlyFmt = m_pParentFrame; + aData.pOldFlyFormat = m_pParentFrame; aData.pOldPageDesc = m_pAktPageDesc; aData.pOldFlyOffset = m_pFlyOffset; @@ -1854,7 +1854,7 @@ void MSWordExportBase::RestoreData() m_bStartTOX = rData.bOldStartTOX; m_bInWriteTOX = rData.bOldInWriteTOX; - m_pParentFrame = rData.pOldFlyFmt; + m_pParentFrame = rData.pOldFlyFormat; m_pAktPageDesc = rData.pOldPageDesc; m_eNewAnchorType = rData.eOldAnchorType; @@ -1971,8 +1971,8 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR if (pBox != NULL) { - const SwFrmFmt * pFmt = pBox->GetFrmFmt(); - switch (pFmt->GetVertOrient().GetVertOrient()) + const SwFrameFormat * pFormat = pBox->GetFrameFormat(); + switch (pFormat->GetVertOrient().GetVertOrient()) { case text::VertOrientation::CENTER: nFlags |= (1 << 7); @@ -1987,11 +1987,11 @@ static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, sal_Int32 nR if(pSttNd) { SwNodeIndex aIdx( *pSttNd ); - const SwCntntNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx ); - if( pCNd && pCNd->IsTxtNode()) + const SwContentNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx ); + if( pCNd && pCNd->IsTextNode()) { SfxItemSet aCoreSet(rDoc.GetAttrPool(), RES_CHRATR_ROTATE, RES_CHRATR_ROTATE); - static_cast<const SwTxtNode*>(pCNd)->GetAttr( aCoreSet, 0, static_cast<const SwTxtNode*>(pCNd)->GetTxt().getLength()); + static_cast<const SwTextNode*>(pCNd)->GetAttr( aCoreSet, 0, static_cast<const SwTextNode*>(pCNd)->GetText().getLength()); const SfxPoolItem * pRotItem; if ( SfxItemState::SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, true, &pRotItem)) { @@ -2016,15 +2016,15 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_ { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwTableBoxes & rTblBoxes = pTabLine->GetTabBoxes(); + const SwTableBoxes & rTableBoxes = pTabLine->GetTabBoxes(); - sal_uInt8 nBoxes = rTblBoxes.size(); + sal_uInt8 nBoxes = rTableBoxes.size(); for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { - const SwTableBox * pTabBox1 = rTblBoxes[n]; - const SwFrmFmt * pFrmFmt = pTabBox1->GetFrmFmt(); + const SwTableBox * pTabBox1 = rTableBoxes[n]; + const SwFrameFormat * pFrameFormat = pTabBox1->GetFrameFormat(); - if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) ) + if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrameFormat ) ) { m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow ); m_rWW8Export.pO->push_back( sal_uInt8(n) ); //start range @@ -2038,7 +2038,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); /* By default the row can be split in word, and now in writer we have a @@ -2046,7 +2046,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT cannot be split, we set true if we can split it. An example is #i4569# */ - const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit(); + const SwFormatRowSplit& rSplittable = pLineFormat->GetRowSplit(); sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0; if ( m_rWW8Export.bWrtWW8 ) { @@ -2064,11 +2064,11 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT void WW8AttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - const SwFrmFmt * pFrmFmt = pTable->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pTable->GetFrameFormat(); if ( m_rWW8Export.bWrtWW8 ) { - if ( m_rWW8Export.TrueFrameDirection(*pFrmFmt) == FRMDIR_HORI_RIGHT_TOP ) + if ( m_rWW8Export.TrueFrameDirection(*pFrameFormat) == FRMDIR_HORI_RIGHT_TOP ) { m_rWW8Export.InsUInt16( NS_sprm::LN_TFBiDi ); m_rWW8Export.InsUInt16( 1 ); @@ -2088,11 +2088,11 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); - const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt(); + const SwFrameFormat * pLineFormat = pTabLine->GetFrameFormat(); // Zeilenhoehe ausgeben sprmTDyaRowHeight long nHeight = 0; - const SwFmtFrmSize& rLSz = pLineFmt->GetFrmSize(); + const SwFormatFrmSize& rLSz = pLineFormat->GetFrmSize(); if ( ATT_VAR_SIZE != rLSz.GetHeightSizeType() && rLSz.GetHeight() ) { if ( ATT_MIN_SIZE == rLSz.GetHeightSizeType() ) @@ -2116,13 +2116,13 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - const SwFrmFmt *pFmt = pTable->GetFrmFmt(); - OSL_ENSURE(pFmt,"Impossible"); - if (!pFmt) + const SwFrameFormat *pFormat = pTable->GetFrameFormat(); + OSL_ENSURE(pFormat,"Impossible"); + if (!pFormat) return; - const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient(); - const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); + const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); + const SwFormatVertOrient &rVert = pFormat->GetVertOrient(); if ( (text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() || @@ -2152,14 +2152,14 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) { const SwTable * pTable = pTableTextNodeInfoInner->getTable(); - const SwTableFmt* pTableFmt = pTable->GetFrmFmt(); + const SwTableFormat* pTableFormat = pTable->GetFrameFormat(); // Writing these SPRM's will make the table a floating one, so only write // them in case the table is already inside a frame. - if (pTableFmt != NULL && pTable->GetTableNode()->GetFlyFmt()) + if (pTableFormat != NULL && pTable->GetTableNode()->GetFlyFormat()) { - const SvxULSpaceItem & rUL = pTableFmt->GetULSpace(); + const SvxULSpaceItem & rUL = pTableFormat->GetULSpace(); if (rUL.GetUpper() > 0) { @@ -2216,21 +2216,21 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t /* cellxs */ /* - ALWAYS relative when text::HoriOrientation::NONE (nPageSize + ( nPageSize / 10 )) < nTblSz, + ALWAYS relative when text::HoriOrientation::NONE (nPageSize + ( nPageSize / 10 )) < nTableSz, in that case the cell width's and table width's are not real. The table width is maxed and cells relative, so we need the frame (generally page) width that the table is in to work out the true widths. */ - //const bool bNewTableModel = pTbl->IsNewModel(); - const SwFrmFmt *pFmt = pTable->GetFrmFmt(); - OSL_ENSURE(pFmt,"Impossible"); - if (!pFmt) + //const bool bNewTableModel = pTable->IsNewModel(); + const SwFrameFormat *pFormat = pTable->GetFrameFormat(); + OSL_ENSURE(pFormat,"Impossible"); + if (!pFormat) return; - const SwFmtHoriOrient &rHori = pFmt->GetHoriOrient(); - const SwFmtVertOrient &rVert = pFmt->GetVertOrient(); + const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); + const SwFormatVertOrient &rVert = pFormat->GetVertOrient(); - sal_uInt16 nTblOffset = 0; + sal_uInt16 nTableOffset = 0; if ( (text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() || @@ -2248,20 +2248,20 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t break; default: - nTblOffset = rHori.GetPos(); - const SvxLRSpaceItem& rLRSp = pFmt->GetLRSpace(); - nTblOffset += rLRSp.GetLeft(); + nTableOffset = rHori.GetPos(); + const SvxLRSpaceItem& rLRSp = pFormat->GetLRSpace(); + nTableOffset += rLRSp.GetLeft(); break; } } - m_rWW8Export.InsUInt16( nTblOffset ); + m_rWW8Export.InsUInt16( nTableOffset ); ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner ); for ( ww8::GridCols::const_iterator it = pGridCols->begin(), end = pGridCols->end(); it != end; ++it ) { - m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTblOffset ); + m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTableOffset ); } /* TCs */ @@ -2275,9 +2275,9 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t sal_uInt16 npOCount = m_rWW8Export.pO->size(); const SwTableBox * pTabBox1 = *aIt; - const SwFrmFmt * pBoxFmt = NULL; + const SwFrameFormat * pBoxFormat = NULL; if (pTabBox1 != NULL) - pBoxFmt = pTabBox1->GetFrmFmt(); + pBoxFormat = pTabBox1->GetFrameFormat(); if ( m_rWW8Export.bWrtWW8 ) { @@ -2289,14 +2289,14 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t static sal_uInt8 aNullBytes[] = { 0x0, 0x0 }; m_rWW8Export.pO->insert( m_rWW8Export.pO->end(), aNullBytes, aNullBytes+2 ); // dummy - if (pBoxFmt != NULL) + if (pBoxFormat != NULL) { - const SvxBoxItem & rBoxItem = pBoxFmt->GetBox(); + const SvxBoxItem & rBoxItem = pBoxFormat->GetBox(); - m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, &rBoxItem ); // 8/16 Byte + m_rWW8Export.Out_SwFormatTableBox( *m_rWW8Export.pO, &rBoxItem ); // 8/16 Byte } else - m_rWW8Export.Out_SwFmtTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte + m_rWW8Export.Out_SwFormatTableBox( *m_rWW8Export.pO, NULL); // 8/16 Byte SAL_INFO( "sw.ww8.level2", "<tclength>" << ( m_rWW8Export.pO->size() - npOCount ) << "</tclength>" ); } @@ -2317,22 +2317,22 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT { long nPageSize = 0; - const SwNode *pTxtNd = pTableTextNodeInfoInner->getNode( ); + const SwNode *pTextNd = pTableTextNodeInfoInner->getNode( ); const SwTable *pTable = pTableTextNodeInfoInner->getTable( ); - const SwFrmFmt *pFmt = pTable->GetFrmFmt(); - OSL_ENSURE(pFmt,"Impossible"); - if (!pFmt) + const SwFrameFormat *pFormat = pTable->GetFrameFormat(); + OSL_ENSURE(pFormat,"Impossible"); + if (!pFormat) return; - const SwFmtFrmSize &rSize = pFmt->GetFrmSize(); + const SwFormatFrmSize &rSize = pFormat->GetFrmSize(); int nWidthPercent = rSize.GetWidthPercent(); - bool bManualAligned = pFmt->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::NONE; - if ( (pFmt->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::FULL) || bManualAligned ) + bool bManualAligned = pFormat->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::NONE; + if ( (pFormat->GetHoriOrient().GetHoriOrient() == text::HoriOrientation::FULL) || bManualAligned ) nWidthPercent = 100; bool bRelBoxSize = nWidthPercent != 0; - unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth()); - if (nTblSz > USHRT_MAX/2 && !bRelBoxSize) + unsigned long nTableSz = static_cast<unsigned long>(rSize.GetWidth()); + if (nTableSz > USHRT_MAX/2 && !bRelBoxSize) { OSL_ENSURE(bRelBoxSize, "huge table width but not relative, suspicious"); bRelBoxSize = true; @@ -2341,19 +2341,19 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT if ( bRelBoxSize ) { Point aPt; - SwRect aRect( pFmt->FindLayoutRect( false, &aPt ) ); + SwRect aRect( pFormat->FindLayoutRect( false, &aPt ) ); if ( aRect.IsEmpty() ) { // dann besorge mal die Seitenbreite ohne Raender !! - const SwFrmFmt* pParentFmt = + const SwFrameFormat* pParentFormat = GetExport().m_pParentFrame ? - &(GetExport().m_pParentFrame->GetFrmFmt()) : - GetExport().m_pDoc->GetPageDesc(0).GetPageFmtOfNode(*pTxtNd, false); - aRect = pParentFmt->FindLayoutRect(true); + &(GetExport().m_pParentFrame->GetFrameFormat()) : + GetExport().m_pDoc->GetPageDesc(0).GetPageFormatOfNode(*pTextNd, false); + aRect = pParentFormat->FindLayoutRect(true); if ( 0 == ( nPageSize = aRect.Width() ) ) { - const SvxLRSpaceItem& rLR = pParentFmt->GetLRSpace(); - nPageSize = pParentFmt->GetFrmSize().GetWidth() - rLR.GetLeft() + const SvxLRSpaceItem& rLR = pParentFormat->GetLRSpace(); + nPageSize = pParentFormat->GetFrmSize().GetWidth() - rLR.GetLeft() - rLR.GetRight(); } } @@ -2363,7 +2363,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT if ( bManualAligned ) { // #i37571# For manually aligned tables - const SvxLRSpaceItem &rLR = pFmt->GetLRSpace(); + const SvxLRSpaceItem &rLR = pFormat->GetLRSpace(); nPageSize -= (rLR.GetLeft() + rLR.GetRight()); } @@ -2379,7 +2379,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT else { // As the table width is not relative, the TablePageSize equals its width - nPageSize = nTblSz; + nPageSize = nTableSz; } rPageSize = nPageSize; @@ -2389,7 +2389,7 @@ void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableT void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); - const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pTabBox->GetFrameFormat(); //Set Default, just taken from the first cell of the first //row @@ -2409,7 +2409,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe m_rWW8Export.pO->push_back( sal_uInt8(3) ); SwWW8Writer::InsUInt16( *m_rWW8Export.pO, - pFrmFmt->GetBox().GetDistance( aBorders[i] ) ); + pFrameFormat->GetBox().GetDistance( aBorders[i] ) ); } } @@ -2431,7 +2431,7 @@ void WW8AttributeOutput::TableCellBorders( for ( unsigned n = 0; n <= nBoxes; ++n ) { const SvxBoxItem * pBox = (n == nBoxes) ? 0 : - &rTabBoxes[n]->GetFrmFmt()->GetBox(); + &rTabBoxes[n]->GetFrameFormat()->GetBox(); if( !pLastBox ) pLastBox = pBox; else if( !pBox || *pLastBox != *pBox ) @@ -2461,11 +2461,11 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t for ( sal_uInt8 n = 0; n < nBoxes; n++ ) { const SwTableBox * pBox1 = rTabBoxes[n]; - const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pBox1->GetFrameFormat(); const SfxPoolItem * pI = NULL; Color aColor; - if ( SfxItemState::SET == pFrmFmt->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) + if ( SfxItemState::SET == pFrameFormat->GetAttrSet().GetItemState( RES_BACKGROUND, false, &pI ) ) { aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); } @@ -2493,12 +2493,12 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t for ( sal_uInt8 n = 0; n < nBoxes0; n++ ) { const SwTableBox * pBox1 = rTabBoxes[n]; - const SwFrmFmt * pFrmFmt = pBox1->GetFrmFmt(); + const SwFrameFormat * pFrameFormat = pBox1->GetFrameFormat(); const SfxPoolItem * pI = NULL; Color aColor; if ( SfxItemState::SET == - pFrmFmt->GetAttrSet(). + pFrameFormat->GetAttrSet(). GetItemState( RES_BACKGROUND, false, &pI ) ) { aColor = dynamic_cast<const SvxBrushItem *>(pI)->GetColor(); @@ -2521,14 +2521,14 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t } } -void WW8Export::SectionBreaksAndFrames( const SwTxtNode& rNode ) +void WW8Export::SectionBreaksAndFrames( const SwTextNode& rNode ) { // output page/section breaks OutputSectionBreaks( rNode.GetpSwAttrSet(), rNode ); // all textframes anchored as character for the winword 7- format if ( !bWrtWW8 && !IsInTable() ) - OutWW6FlyFrmsInCntnt( rNode ); + OutWW6FlyFrmsInContent( rNode ); } void MSWordExportBase::WriteText() @@ -2539,13 +2539,13 @@ void MSWordExportBase::WriteText() { SwNode& rNd = m_pCurPam->GetNode(); - if ( rNd.IsTxtNode() ) - SectionBreaksAndFrames( *rNd.GetTxtNode() ); + if ( rNd.IsTextNode() ) + SectionBreaksAndFrames( *rNd.GetTextNode() ); // output the various types of nodes - if ( rNd.IsCntntNode() ) + if ( rNd.IsContentNode() ) { - SwCntntNode* pCNd = static_cast<SwCntntNode*>(&rNd); + SwContentNode* pCNd = static_cast<SwContentNode*>(&rNd); const SwPageDesc* pTemp = rNd.FindPageDesc(false); if ( pTemp ) @@ -2558,9 +2558,9 @@ void MSWordExportBase::WriteText() { m_pTableInfo->processSwTable( &rNd.GetTableNode()->GetTable() ); } - else if ( rNd.IsSectionNode() && TXT_MAINTEXT == m_nTxtTyp ) + else if ( rNd.IsSectionNode() && TXT_MAINTEXT == m_nTextTyp ) OutputSectionNode( *rNd.GetSectionNode() ); - else if ( TXT_MAINTEXT == m_nTxtTyp && rNd.IsEndNode() && + else if ( TXT_MAINTEXT == m_nTextTyp && rNd.IsEndNode() && rNd.StartOfSectionNode()->IsSectionNode() ) { const SwSection& rSect = rNd.StartOfSectionNode()->GetSectionNode() @@ -2578,14 +2578,14 @@ void MSWordExportBase::WriteText() { //#120140# Do not need to insert a page/section break after a section end. Check this case first bool bNeedExportBreakHere = true; - if ( aIdx.GetNode().IsTxtNode() ) + if ( aIdx.GetNode().IsTextNode() ) { - SwTxtNode *pTempNext = aIdx.GetNode().GetTxtNode(); + SwTextNode *pTempNext = aIdx.GetNode().GetTextNode(); if ( pTempNext ) { const SfxPoolItem * pTempItem = NULL; if (pTempNext->GetpSwAttrSet() && SfxItemState::SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem) - && pTempItem && static_cast<const SwFmtPageDesc*>(pTempItem)->GetRegisteredIn()) + && pTempItem && static_cast<const SwFormatPageDesc*>(pTempItem)->GetRegisteredIn()) { //Next node has a new page style which means this node is a section end. Do not insert another page/section break here bNeedExportBreakHere = false; @@ -2595,10 +2595,10 @@ void MSWordExportBase::WriteText() else { /* Do not export Section Break in case DOCX containing MultiColumn and - * aIdx.GetNode().IsTxtNode() is False i.e. Text node is NULL. + * aIdx.GetNode().IsTextNode() is False i.e. Text node is NULL. */ - const SwFrmFmt* pPgFmt = rSect.GetFmt(); - const SwFmtCol& rCol = pPgFmt->GetCol(); + const SwFrameFormat* pPgFormat = rSect.GetFormat(); + const SwFormatCol& rCol = pPgFormat->GetCol(); sal_uInt16 nColumnCount = rCol.GetNumCols(); if(nColumnCount > 1) { @@ -2610,18 +2610,18 @@ void MSWordExportBase::WriteText() { ReplaceCr( (char)0xc ); // indicator for Page/Section-Break - const SwSectionFmt* pParentFmt = rSect.GetFmt()->GetParent(); - if ( !pParentFmt ) - pParentFmt = reinterpret_cast<SwSectionFmt*>(sal_IntPtr(-1)); + const SwSectionFormat* pParentFormat = rSect.GetFormat()->GetParent(); + if ( !pParentFormat ) + pParentFormat = reinterpret_cast<SwSectionFormat*>(sal_IntPtr(-1)); sal_uLong nRstLnNum; - if ( aIdx.GetNode().IsCntntNode() ) - nRstLnNum = static_cast<SwCntntNode&>(aIdx.GetNode()).GetSwAttrSet(). + if ( aIdx.GetNode().IsContentNode() ) + nRstLnNum = static_cast<SwContentNode&>(aIdx.GetNode()).GetSwAttrSet(). GetLineNumber().GetStartValue(); else nRstLnNum = 0; - AppendSection( m_pAktPageDesc, pParentFmt, nRstLnNum ); + AppendSection( m_pAktPageDesc, pParentFormat, nRstLnNum ); } } } @@ -2672,16 +2672,16 @@ void WW8Export::WriteMainText() WriteCR(); // then CR at the end ( otherwise WW will complain ) pFib->ccpText = Fc2Cp( Strm().Tell() ); - m_pFldMain->Finish( pFib->ccpText, 0 ); + m_pFieldMain->Finish( pFib->ccpText, 0 ); // ccpText includes Footnote and KF-text // therefore pFib->ccpText may get updated as well // save the StyleId of the last paragraph. Because WW97 take the style // from the last CR, that will be written after footer/Header/footnotes/ // annotation usw. - const SwTxtNode* pLastNd = m_pCurPam->GetMark()->nNode.GetNode().GetTxtNode(); + const SwTextNode* pLastNd = m_pCurPam->GetMark()->nNode.GetNode().GetTextNode(); if( pLastNd ) - m_nLastFmtId = GetId( static_cast<SwTxtFmtColl&>(pLastNd->GetAnyFmtColl()) ); + m_nLastFormatId = GetId( static_cast<SwTextFormatColl&>(pLastNd->GetAnyFormatColl()) ); SAL_INFO( "sw.ww8.level2", "</WriteMainText>" ); } @@ -2727,7 +2727,7 @@ void WW8Export::WriteFkpPlcUsw() m_pChpPlc->WriteFkps(); // Fkp.Chpx m_pPapPlc->WriteFkps(); // Fkp.Papx m_pStyles->OutputStylesTable(); // Styles - pFtn->WritePlc( *this ); // Footnote-Ref & Text Plc + pFootnote->WritePlc( *this ); // Footnote-Ref & Text Plc pEdn->WritePlc( *this ); // Endnote-Ref & Text Plc m_pAtn->WritePlc( *this ); // Annotation-Ref & Text Plc pSepx->WritePlcSed( *this ); // Slcx.PlcSed @@ -2737,11 +2737,11 @@ void WW8Export::WriteFkpPlcUsw() m_aFontHelper.WriteFontTable(pTableStrm, *pFib); // FFNs if( m_pRedlAuthors ) m_pRedlAuthors->Write( GetWriter() ); // sttbfRMark (RedlineAuthors) - m_pFldMain->Write( *this ); // Fields ( Main Text ) - m_pFldHdFt->Write( *this ); // Fields ( Header/Footer ) - m_pFldFtn->Write( *this ); // Fields ( FootNotes ) - m_pFldEdn->Write( *this ); // Fields ( EndNotes ) - m_pFldAtn->Write( *this ); // Fields ( Annotations ) + m_pFieldMain->Write( *this ); // Fields ( Main Text ) + m_pFieldHdFt->Write( *this ); // Fields ( Header/Footer ) + m_pFieldFootnote->Write( *this ); // Fields ( FootNotes ) + m_pFieldEdn->Write( *this ); // Fields ( EndNotes ) + m_pFieldAtn->Write( *this ); // Fields ( Annotations ) m_pBkmks->Write( *this ); // Bookmarks - sttbfBkmk/ // plcfBkmkf/plcfBkmkl WriteDop( *this ); // Document-Properties @@ -2759,10 +2759,10 @@ void WW8Export::WriteFkpPlcUsw() // Ausagbe in Table-Stream m_pStyles->OutputStylesTable(); // for WW8 StyleTab - pFtn->WritePlc( *this ); // Footnote-Ref & Text Plc + pFootnote->WritePlc( *this ); // Footnote-Ref & Text Plc pEdn->WritePlc( *this ); // Endnote-Ref & Text Plc - m_pTxtBxs->WritePlc( *this ); // Textbox Text Plc - m_pHFTxtBxs->WritePlc( *this ); // Head/Foot-Textbox Text Plc + m_pTextBxs->WritePlc( *this ); // Textbox Text Plc + m_pHFTextBxs->WritePlc( *this ); // Head/Foot-Textbox Text Plc m_pAtn->WritePlc( *this ); // Annotation-Ref & Text Plc pSepx->WritePlcSed( *this ); // Slcx.PlcSed @@ -2773,13 +2773,13 @@ void WW8Export::WriteFkpPlcUsw() if( m_pRedlAuthors ) m_pRedlAuthors->Write( GetWriter() ); // sttbfRMark (RedlineAuthors) - m_pFldMain->Write( *this ); // Fields ( Main Text ) - m_pFldHdFt->Write( *this ); // Fields ( Header/Footer ) - m_pFldFtn->Write( *this ); // Fields ( FootNotes ) - m_pFldEdn->Write( *this ); // Fields ( EndNotes ) - m_pFldAtn->Write( *this ); // Fields ( Annotations ) - m_pFldTxtBxs->Write( *this ); // Fields ( Textboxes ) - m_pFldHFTxtBxs->Write( *this ); // Fields ( Head/Foot-Textboxes ) + m_pFieldMain->Write( *this ); // Fields ( Main Text ) + m_pFieldHdFt->Write( *this ); // Fields ( Header/Footer ) + m_pFieldFootnote->Write( *this ); // Fields ( FootNotes ) + m_pFieldEdn->Write( *this ); // Fields ( EndNotes ) + m_pFieldAtn->Write( *this ); // Fields ( Annotations ) + m_pFieldTextBxs->Write( *this ); // Fields ( Textboxes ) + m_pFieldHFTextBxs->Write( *this ); // Fields ( Head/Foot-Textboxes ) if (m_pEscher || m_pDoc->ContainsMSVBasic()) { @@ -2876,17 +2876,17 @@ void WW8Export::StoreDoc1() sal_uInt8 nSprmsLen; sal_uInt8 *pLastSprms = m_pPapPlc->CopyLastSprms(nSprmsLen); - bNeedsFinalPara |= pFtn->WriteTxt( *this ); // Footnote-Text - bNeedsFinalPara |= pSepx->WriteKFTxt( *this ); // K/F-Text - bNeedsFinalPara |= m_pAtn->WriteTxt( *this ); // Annotation-Text - bNeedsFinalPara |= pEdn->WriteTxt( *this ); // EndNote-Text + bNeedsFinalPara |= pFootnote->WriteText( *this ); // Footnote-Text + bNeedsFinalPara |= pSepx->WriteKFText( *this ); // K/F-Text + bNeedsFinalPara |= m_pAtn->WriteText( *this ); // Annotation-Text + bNeedsFinalPara |= pEdn->WriteText( *this ); // EndNote-Text // create the escher streams if( bWrtWW8 ) CreateEscher(); - bNeedsFinalPara |= m_pTxtBxs->WriteTxt( *this ); //Textbox Text Plc - bNeedsFinalPara |= m_pHFTxtBxs->WriteTxt( *this );//Head/Foot-Textbox Text Plc + bNeedsFinalPara |= m_pTextBxs->WriteText( *this ); //Textbox Text Plc + bNeedsFinalPara |= m_pHFTextBxs->WriteText( *this );//Head/Foot-Textbox Text Plc if (bNeedsFinalPara) { @@ -2895,7 +2895,7 @@ void WW8Export::StoreDoc1() } delete[] pLastSprms; - pSepx->Finish( Fc2Cp( Strm().Tell() ));// Text + Ftn + HdFt als Section-Ende + pSepx->Finish( Fc2Cp( Strm().Tell() ));// Text + Footnote + HdFt als Section-Ende m_pMagicTable->Finish( Fc2Cp( Strm().Tell() ),0); pFib->fcMac = Strm().Tell(); // End of all texts @@ -2943,28 +2943,28 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc) sal_uInt32 nMaxItems = rDoc.GetAttrPool().GetItemCount2(RES_TXTATR_INETFMT); for (sal_uInt32 n = 0; n < nMaxItems; ++n) { - const SwFmtINetFmt* pINetFmt = static_cast<const SwFmtINetFmt*>(rDoc.GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n)); - if (!pINetFmt) + const SwFormatINetFormat* pINetFormat = static_cast<const SwFormatINetFormat*>(rDoc.GetAttrPool().GetItem2(RES_TXTATR_INETFMT, n)); + if (!pINetFormat) continue; - const SwTxtINetFmt* pTxtAttr = pINetFmt->GetTxtINetFmt(); - if (!pTxtAttr) + const SwTextINetFormat* pTextAttr = pINetFormat->GetTextINetFormat(); + if (!pTextAttr) continue; - const SwTxtNode* pTxtNd = pTxtAttr->GetpTxtNode(); - if (!pTxtNd) + const SwTextNode* pTextNd = pTextAttr->GetpTextNode(); + if (!pTextNd) continue; - if (!pTxtNd->GetNodes().IsDocNodes()) + if (!pTextNd->GetNodes().IsDocNodes()) continue; - AddLinkTarget( pINetFmt->GetValue() ); + AddLinkTarget( pINetFormat->GetValue() ); } nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL ); for (sal_uInt32 n = 0; n < nMaxItems; ++n) { - const SwFmtURL *pURL = static_cast<const SwFmtURL*>(rDoc.GetAttrPool().GetItem2(RES_URL, n)); + const SwFormatURL *pURL = static_cast<const SwFormatURL*>(rDoc.GetAttrPool().GetItem2(RES_URL, n)); if (!pURL) continue; @@ -3007,24 +3007,24 @@ namespace void MSWordExportBase::ExportDocument( bool bWriteAll ) { - m_nCharFmtStart = ANZ_DEFAULT_STYLES; - m_nFmtCollStart = m_nCharFmtStart + m_pDoc->GetCharFmts()->size() - 1; + m_nCharFormatStart = ANZ_DEFAULT_STYLES; + m_nFormatCollStart = m_nCharFormatStart + m_pDoc->GetCharFormats()->size() - 1; m_bStyDef = m_bBreakBefore = m_bOutKF = m_bOutFlyFrmAttrs = m_bOutPageDescs = m_bOutTable = m_bOutFirstPage = m_bOutGrf = m_bInWriteEscher = m_bStartTOX = m_bInWriteTOX = false; - m_bFtnAtTxtEnd = m_bEndAtTxtEnd = true; + m_bFootnoteAtTextEnd = m_bEndAtTextEnd = true; m_pParentFrame = 0; m_pFlyOffset = 0; m_eNewAnchorType = FLY_AT_PAGE; - m_nTxtTyp = TXT_MAINTEXT; - m_nStyleBeforeFly = m_nLastFmtId = 0; + m_nTextTyp = TXT_MAINTEXT; + m_nStyleBeforeFly = m_nLastFormatId = 0; m_pStyAttr = 0; m_pCurrentStyle = NULL; - m_pOutFmtNode = 0; + m_pOutFormatNode = 0; m_pEscher = 0; m_pRedlAuthors = 0; m_aTOXArr.clear(); @@ -3052,7 +3052,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) m_aFrames = GetFrames( *m_pDoc, bWriteAll? NULL : m_pOrigPam ); m_nOrigRedlineMode = m_pDoc->getIDocumentRedlineAccess().GetRedlineMode(); - if ( !m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().empty() ) + if ( !m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty() ) { //restored to original state by SwWriter::Write m_pDoc->getIDocumentRedlineAccess().SetRedlineMode(m_nOrigRedlineMode | @@ -3136,7 +3136,7 @@ void WW8Export::ExportDocument_Impl() if( bWrtWW8 ) { - pFib->fWhichTblStm = true; + pFib->fWhichTableStm = true; xTableStrm = GetWriter().GetStorage().OpenSotStream(OUString(SL::a1Table), STREAM_STD_WRITE ); xDataStrm = GetWriter().GetStorage().OpenSotStream(OUString(SL::aData), @@ -3180,29 +3180,29 @@ void WW8Export::ExportDocument_Impl() // Default: "Standard" pSepx = new WW8_WrPlcSepx( *this ); // Sections/headers/footers - pFtn = new WW8_WrPlcFtnEdn( TXT_FTN ); // Footnotes - pEdn = new WW8_WrPlcFtnEdn( TXT_EDN ); // Endnotes + pFootnote = new WW8_WrPlcFootnoteEdn( TXT_FTN ); // Footnotes + pEdn = new WW8_WrPlcFootnoteEdn( TXT_EDN ); // Endnotes m_pAtn = new WW8_WrPlcAnnotations; // PostIts - m_pTxtBxs = new WW8_WrPlcTxtBoxes( TXT_TXTBOX ); - m_pHFTxtBxs = new WW8_WrPlcTxtBoxes( TXT_HFTXTBOX ); + m_pTextBxs = new WW8_WrPlcTextBoxes( TXT_TXTBOX ); + m_pHFTextBxs = new WW8_WrPlcTextBoxes( TXT_HFTXTBOX ); - m_pSdrObjs = new MainTxtPlcDrawObj; // Draw-/Fly-Objects for main text + m_pSdrObjs = new MainTextPlcDrawObj; // Draw-/Fly-Objects for main text m_pHFSdrObjs = new HdFtPlcDrawObj; // Draw-/Fly-Objects for header/footer m_pBkmks = new WW8_WrtBookmarks; // Bookmarks - GetWriter().CreateBookmarkTbl(); + GetWriter().CreateBookmarkTable(); m_pPapPlc = new WW8_WrPlcPn( *this, PAP, pFib->fcMin ); m_pChpPlc = new WW8_WrPlcPn( *this, CHP, pFib->fcMin ); pO = new ww::bytes(); m_pStyles = new MSWordStyles( *this ); - m_pFldMain = new WW8_WrPlcFld( 2, TXT_MAINTEXT ); - m_pFldHdFt = new WW8_WrPlcFld( 2, TXT_HDFT ); - m_pFldFtn = new WW8_WrPlcFld( 2, TXT_FTN ); - m_pFldEdn = new WW8_WrPlcFld( 2, TXT_EDN ); - m_pFldAtn = new WW8_WrPlcFld( 2, TXT_ATN ); - m_pFldTxtBxs = new WW8_WrPlcFld( 2, TXT_TXTBOX ); - m_pFldHFTxtBxs = new WW8_WrPlcFld( 2, TXT_HFTXTBOX ); + m_pFieldMain = new WW8_WrPlcField( 2, TXT_MAINTEXT ); + m_pFieldHdFt = new WW8_WrPlcField( 2, TXT_HDFT ); + m_pFieldFootnote = new WW8_WrPlcField( 2, TXT_FTN ); + m_pFieldEdn = new WW8_WrPlcField( 2, TXT_EDN ); + m_pFieldAtn = new WW8_WrPlcField( 2, TXT_ATN ); + m_pFieldTextBxs = new WW8_WrPlcField( 2, TXT_TXTBOX ); + m_pFieldHFTextBxs = new WW8_WrPlcField( 2, TXT_HFTXTBOX ); m_pMagicTable = new WW8_WrMagicTable; @@ -3216,9 +3216,9 @@ void WW8Export::ExportDocument_Impl() // set AutoHyphenation flag if found in default para style const SfxPoolItem* pItem; - SwTxtFmtColl* pStdTxtFmtColl = - m_pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false); - if (pStdTxtFmtColl && SfxItemState::SET == pStdTxtFmtColl->GetItemState( + SwTextFormatColl* pStdTextFormatColl = + m_pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, false); + if (pStdTextFormatColl && SfxItemState::SET == pStdTextFormatColl->GetItemState( RES_PARATR_HYPHENZONE, false, &pItem)) { pDop->fAutoHyphen = static_cast<const SvxHyphenZoneItem*>(pItem)->IsHyphen(); @@ -3267,24 +3267,24 @@ void WW8Export::ExportDocument_Impl() pFib->WriteHeader( *pStrmTemp ); } - if (m_pUsedNumTbl) // all used NumRules + if (m_pUsedNumTable) // all used NumRules { // clear the part of the list array that was copied from the document // - it's an auto delete array, so the rest of the array which are // duplicated lists that were added during the export will be deleted. - m_pUsedNumTbl->erase(m_pUsedNumTbl->begin(), m_pUsedNumTbl->begin() + m_pUsedNumTbl->size() - m_nUniqueList); - delete m_pUsedNumTbl; + m_pUsedNumTable->erase(m_pUsedNumTable->begin(), m_pUsedNumTable->begin() + m_pUsedNumTable->size() - m_nUniqueList); + delete m_pUsedNumTable; } DELETEZ( m_pGrf ); DELETEZ( m_pMagicTable ); - DELETEZ( m_pFldFtn ); - DELETEZ( m_pFldTxtBxs ); - DELETEZ( m_pFldHFTxtBxs ); - DELETEZ( m_pFldAtn ); - DELETEZ( m_pFldEdn ); - DELETEZ( m_pFldHdFt ); - DELETEZ( m_pFldMain ); + DELETEZ( m_pFieldFootnote ); + DELETEZ( m_pFieldTextBxs ); + DELETEZ( m_pFieldHFTextBxs ); + DELETEZ( m_pFieldAtn ); + DELETEZ( m_pFieldEdn ); + DELETEZ( m_pFieldHdFt ); + DELETEZ( m_pFieldMain ); DELETEZ( m_pStyles ); DELETEZ( pO ); DELETEZ( m_pChpPlc ); @@ -3294,11 +3294,11 @@ void WW8Export::ExportDocument_Impl() delete m_pRedlAuthors; delete m_pSdrObjs; delete m_pHFSdrObjs; - delete m_pTxtBxs; - delete m_pHFTxtBxs; + delete m_pTextBxs; + delete m_pHFTextBxs; delete m_pAtn; delete pEdn; - delete pFtn; + delete pFootnote; delete m_pBkmks; delete m_pPiece; delete pDop; @@ -3459,17 +3459,17 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM : m_aMainStg(sMainStream) , m_pISet(0) , m_pPiece(NULL) - , m_pUsedNumTbl(0) + , m_pUsedNumTable(0) , m_pTopNodeOfHdFtPage(0) , m_pBkmks(0) , m_pRedlAuthors(0) , m_pOLEExp(0) , m_pOCXExp(0) , m_pTableInfo(new ww8::WW8TableInfo()) - , m_nCharFmtStart(0) - , m_nFmtCollStart(0) + , m_nCharFormatStart(0) + , m_nFormatCollStart(0) , m_nStyleBeforeFly(0) - , m_nLastFmtId(0) + , m_nLastFormatId(0) , m_nUniqueList(0) , m_nHdFtIndex(0) , m_nOrigRedlineMode(0) @@ -3480,27 +3480,27 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM , m_pChpIter(0) , m_pStyles(NULL) , m_pAtn(0) - , m_pTxtBxs(0) - , m_pHFTxtBxs(0) + , m_pTextBxs(0) + , m_pHFTextBxs(0) , m_pParentFrame(0) , m_pFlyOffset(0) , m_eNewAnchorType(FLY_AS_CHAR) - , m_pFldMain(0) - , m_pFldHdFt(0) - , m_pFldFtn(0) - , m_pFldEdn(0) - , m_pFldAtn(0) - , m_pFldTxtBxs(0) - , m_pFldHFTxtBxs(0) + , m_pFieldMain(0) + , m_pFieldHdFt(0) + , m_pFieldFootnote(0) + , m_pFieldEdn(0) + , m_pFieldAtn(0) + , m_pFieldTextBxs(0) + , m_pFieldHFTextBxs(0) , m_pMagicTable(0) , m_pGrf(0) , m_pStyAttr(0) - , m_pOutFmtNode(0) + , m_pOutFormatNode(0) , m_pCurrentStyle(0) , m_pSdrObjs(0) , m_pHFSdrObjs(0) , m_pEscher(0) - , m_nTxtTyp(0) + , m_nTextTyp(0) , m_bStyDef(false) , m_bBreakBefore(false) , m_bOutKF(false) @@ -3512,8 +3512,8 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, SwPaM *pCurrentPam, SwPaM , m_bInWriteEscher(false) , m_bStartTOX(false) , m_bInWriteTOX(false) - , m_bFtnAtTxtEnd(false) - , m_bEndAtTxtEnd(false) + , m_bFootnoteAtTextEnd(false) + , m_bEndAtTextEnd(false) , m_bHasHdr(false) , m_bHasFtr(false) , m_bSubstituteBullets(true) @@ -3543,7 +3543,7 @@ WW8Export::WW8Export( SwWW8Writer *pWriter, , pDataStrm(NULL) , pFib(NULL) , pDop(NULL) - , pFtn(NULL) + , pFootnote(NULL) , pEdn(NULL) , pSepx(NULL) , bWrtWW8(bIsWW8) @@ -3597,70 +3597,70 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS ); } -bool WW8_WrPlcFtnEdn::WriteTxt( WW8Export& rWrt ) +bool WW8_WrPlcFootnoteEdn::WriteText( WW8Export& rWrt ) { bool bRet = false; if (TXT_FTN == nTyp) { - bRet = WriteGenericTxt( rWrt, TXT_FTN, rWrt.pFib->ccpFtn ); - rWrt.m_pFldFtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), + bRet = WriteGenericText( rWrt, TXT_FTN, rWrt.pFib->ccpFootnote ); + rWrt.m_pFieldFootnote->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), rWrt.pFib->ccpText ); } else { - bRet = WriteGenericTxt( rWrt, TXT_EDN, rWrt.pFib->ccpEdn ); - rWrt.m_pFldEdn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), - rWrt.pFib->ccpText + rWrt.pFib->ccpFtn + bRet = WriteGenericText( rWrt, TXT_EDN, rWrt.pFib->ccpEdn ); + rWrt.m_pFieldEdn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), + rWrt.pFib->ccpText + rWrt.pFib->ccpFootnote + rWrt.pFib->ccpHdr + rWrt.pFib->ccpAtn ); } return bRet; } -void WW8_WrPlcFtnEdn::WritePlc( WW8Export& rWrt ) const +void WW8_WrPlcFootnoteEdn::WritePlc( WW8Export& rWrt ) const { if( TXT_FTN == nTyp ) { - WriteGenericPlc( rWrt, TXT_FTN, rWrt.pFib->fcPlcffndTxt, - rWrt.pFib->lcbPlcffndTxt, rWrt.pFib->fcPlcffndRef, + WriteGenericPlc( rWrt, TXT_FTN, rWrt.pFib->fcPlcffndText, + rWrt.pFib->lcbPlcffndText, rWrt.pFib->fcPlcffndRef, rWrt.pFib->lcbPlcffndRef ); } else { - WriteGenericPlc( rWrt, TXT_EDN, rWrt.pFib->fcPlcfendTxt, - rWrt.pFib->lcbPlcfendTxt, rWrt.pFib->fcPlcfendRef, + WriteGenericPlc( rWrt, TXT_EDN, rWrt.pFib->fcPlcfendText, + rWrt.pFib->lcbPlcfendText, rWrt.pFib->fcPlcfendRef, rWrt.pFib->lcbPlcfendRef ); } } -bool WW8_WrPlcAnnotations::WriteTxt( WW8Export& rWrt ) +bool WW8_WrPlcAnnotations::WriteText( WW8Export& rWrt ) { - bool bRet = WriteGenericTxt( rWrt, TXT_ATN, rWrt.pFib->ccpAtn ); - rWrt.m_pFldAtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), - rWrt.pFib->ccpText + rWrt.pFib->ccpFtn + bool bRet = WriteGenericText( rWrt, TXT_ATN, rWrt.pFib->ccpAtn ); + rWrt.m_pFieldAtn->Finish( rWrt.Fc2Cp( rWrt.Strm().Tell() ), + rWrt.pFib->ccpText + rWrt.pFib->ccpFootnote + rWrt.pFib->ccpHdr ); return bRet; } void WW8_WrPlcAnnotations::WritePlc( WW8Export& rWrt ) const { - WriteGenericPlc( rWrt, TXT_ATN, rWrt.pFib->fcPlcfandTxt, - rWrt.pFib->lcbPlcfandTxt, rWrt.pFib->fcPlcfandRef, + WriteGenericPlc( rWrt, TXT_ATN, rWrt.pFib->fcPlcfandText, + rWrt.pFib->lcbPlcfandText, rWrt.pFib->fcPlcfandRef, rWrt.pFib->lcbPlcfandRef ); } -void WW8_WrPlcTxtBoxes::WritePlc( WW8Export& rWrt ) const +void WW8_WrPlcTextBoxes::WritePlc( WW8Export& rWrt ) const { if( TXT_TXTBOX == nTyp ) { WriteGenericPlc( rWrt, nTyp, rWrt.pFib->fcPlcftxbxBkd, - rWrt.pFib->lcbPlcftxbxBkd, rWrt.pFib->fcPlcftxbxTxt, - rWrt.pFib->lcbPlcftxbxTxt ); + rWrt.pFib->lcbPlcftxbxBkd, rWrt.pFib->fcPlcftxbxText, + rWrt.pFib->lcbPlcftxbxText ); } else { WriteGenericPlc( rWrt, nTyp, rWrt.pFib->fcPlcfHdrtxbxBkd, - rWrt.pFib->lcbPlcfHdrtxbxBkd, rWrt.pFib->fcPlcfHdrtxbxTxt, - rWrt.pFib->lcbPlcfHdrtxbxTxt ); + rWrt.pFib->lcbPlcfHdrtxbxBkd, rWrt.pFib->fcPlcfHdrtxbxText, + rWrt.pFib->lcbPlcfHdrtxbxText ); } } @@ -3744,7 +3744,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) 0x06, 0x08, 0x01, // sprmCFData 0x55, 0x08, 0x01, // sprmCFSpec - 0x02, 0x08, 0x01 // sprmCFFldVanish + 0x02, 0x08, 0x01 // sprmCFFieldVanish }; sal_uInt8* pDataAdr = aArr1 + 2; Set_UInt32(pDataAdr, nDataStt); @@ -3760,8 +3760,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) FFDataHeader() : version( 0xFFFFFFFF ), bits(0), cch(0), hps(0) {} }; - FFDataHeader aFldHeader; - aFldHeader.bits |= (type & 0x03); + FFDataHeader aFieldHeader; + aFieldHeader.bits |= (type & 0x03); sal_Int32 ffres = 0; // rFieldmark.GetFFRes(); if ( pAsCheckbox && pAsCheckbox->IsChecked() ) @@ -3774,7 +3774,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) else ffres = 0; } - aFldHeader.bits |= ( (ffres<<2) & 0x7C ); + aFieldHeader.bits |= ( (ffres<<2) & 0x7C ); if (type == 0) // iTypeText { sw::mark::IFieldmark::parameter_map_t::const_iterator pParameter = rFieldmark.GetParameters()->find("MaxLength"); @@ -3782,14 +3782,14 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) { OUString aLength; pParameter->second >>= aLength; - aFldHeader.cch = aLength.toUInt32(); + aFieldHeader.cch = aLength.toUInt32(); } } std::vector< OUString > aListItems; if (type==2) { - aFldHeader.bits |= 0x8000; // ffhaslistbox + aFieldHeader.bits |= 0x8000; // ffhaslistbox const ::sw::mark::IFieldmark::parameter_map_t* const pParameters = rFieldmark.GetParameters(); ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(ODF_FORMDROPDOWN_LISTENTRY); if(pListEntries != pParameters->end()) @@ -3807,7 +3807,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) const OUString ffentrymcr; const OUString ffexitmcr; - const sal_uInt8 aFldData[] = + const sal_uInt8 aFieldData[] = { 0x44,0, // the start of "next" data 0,0,0,0,0,0,0,0,0,0, // PIC-Structure! /10 @@ -3817,8 +3817,8 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) 0,0,0,0, // / /4 }; sal_uInt32 slen = sizeof(sal_uInt32) - + sizeof(aFldData) - + sizeof( aFldHeader.version ) + sizeof( aFldHeader.bits ) + sizeof( aFldHeader.cch ) + sizeof( aFldHeader.hps ) + + sizeof(aFieldData) + + sizeof( aFieldHeader.version ) + sizeof( aFieldHeader.bits ) + sizeof( aFieldHeader.cch ) + sizeof( aFieldHeader.hps ) + 2*ffname.getLength() + 4 + 2*ffformat.getLength() + 4 + 2*ffhelptext.getLength() + 4 @@ -3841,11 +3841,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) pDataStrm->WriteUInt32( slen ); - int len = sizeof( aFldData ); - OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFldData length" ); - pDataStrm->Write( aFldData, len ); + int len = sizeof( aFieldData ); + OSL_ENSURE( len == 0x44-sizeof(sal_uInt32), "SwWW8Writer::WriteFormData(..) - wrong aFieldData length" ); + pDataStrm->Write( aFieldData, len ); - pDataStrm->WriteUInt32( aFldHeader.version ).WriteUInt16( aFldHeader.bits ).WriteUInt16( aFldHeader.cch ).WriteUInt16( aFldHeader.hps ); + pDataStrm->WriteUInt32( aFieldHeader.version ).WriteUInt16( aFieldHeader.bits ).WriteUInt16( aFieldHeader.cch ).WriteUInt16( aFieldHeader.hps ); SwWW8Writer::WriteString_xstz( *pDataStrm, ffname, true ); // Form field name diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index b5ac30d395b4..2b7cdff248a6 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -67,29 +67,29 @@ class SvStream; class SvxFontItem; class SvxBoxItem; class SwAttrSet; -class SwCharFmt; -class SwCntntNode; +class SwCharFormat; +class SwContentNode; class SwField; -class SwFmt; -class SwFmtCntnt; -class SwFmtFtn; -class SwFrmFmt; +class SwFormat; +class SwFormatContent; +class SwFormatFootnote; +class SwFrameFormat; class SwGrfNode; class SwModify; -class SwNumFmt; +class SwNumFormat; class SwNumRule; -class SwNumRuleTbl; +class SwNumRuleTable; class SwPageDesc; -class SwFmtPageDesc; +class SwFormatPageDesc; class SwOLENode; class SwPostItField; class SwRedlineData; -class SwSectionFmt; +class SwSectionFormat; class SwSectionNode; class SwTableNode; class SwTOXType; -class SwTxtFmtColl; -class SwTxtNode; +class SwTextFormatColl; +class SwTextNode; class SwWW8WrGrf; class SwWW8Writer; class MSWordStyles; @@ -99,13 +99,13 @@ class MSWordAttrIter; class WW8_WrFkp; class WW8_WrPlc0; class WW8_WrPlc1; -class WW8_WrPlcFld; +class WW8_WrPlcField; class WW8_WrMagicTable; -class WW8_WrPlcFtnEdn; +class WW8_WrPlcFootnoteEdn; class WW8_WrPlcPn; class WW8_WrPlcAnnotations; class MSWordSections; -class WW8_WrPlcTxtBoxes; +class WW8_WrPlcTextBoxes; class WW8_WrPct; // Verwaltung class WW8_WrtBookmarks; class WW8_WrtRedlineAuthor; @@ -140,7 +140,7 @@ namespace nsFieldFlags // for InsertField- Method const FieldFlags WRITEFIELD_ALL = 0xFF; } -enum TxtTypes //enums for TextTypes +enum TextTypes //enums for TextTypes { TXT_MAINTEXT = 0, /*TXT_FTNEDN = 1,*/ TXT_HDFT = 2, TXT_FTN = 3, TXT_EDN = 4, TXT_ATN = 5, TXT_TXTBOX = 6, TXT_HFTXTBOX= 7 @@ -159,22 +159,22 @@ enum FlyProcessingState struct WW8_SepInfo { const SwPageDesc* pPageDesc; - const SwSectionFmt* pSectionFmt; + const SwSectionFormat* pSectionFormat; const SwNode* pPDNd; - const SwTxtNode* pNumNd; + const SwTextNode* pNumNd; sal_uLong nLnNumRestartNo; ::boost::optional<sal_uInt16> oPgRestartNo; bool bIsFirstParagraph; WW8_SepInfo() - : pPageDesc(0), pSectionFmt(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), bIsFirstParagraph(false) + : pPageDesc(0), pSectionFormat(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), bIsFirstParagraph(false) {} - WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFmt* pFmt, + WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat, sal_uLong nLnRestart, ::boost::optional<sal_uInt16> oPgRestart = boost::none, const SwNode* pNd = NULL, bool bIsFirstPara = false ) - : pPageDesc( pPD ), pSectionFmt( pFmt ), pPDNd( pNd ), pNumNd( 0 ), + : pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ), pNumNd( 0 ), nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ), bIsFirstParagraph( bIsFirstPara ) {} @@ -204,14 +204,14 @@ public: virtual bool HeaderFooterWritten(); void AppendSection( const SwPageDesc* pPd, - const SwSectionFmt* pSectionFmt = 0, + const SwSectionFormat* pSectionFormat = 0, sal_uLong nLnNumRestartNo = 0, bool bIsFirstParagraph = false ); - void AppendSection( const SwFmtPageDesc& rPd, + void AppendSection( const SwFormatPageDesc& rPd, const SwNode& rNd, - const SwSectionFmt* pSectionFmt, + const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo ); - void SetNum( const SwTxtNode* pNumNd ); + void SetNum( const SwTextNode* pNumNd ); /// Number of columns based on the most recent WW8_SepInfo. sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const; @@ -224,13 +224,13 @@ public: /// The most recent WW8_SepInfo. const WW8_SepInfo* CurrentSectionInfo(); - static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt, + static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat, sal_uInt8 nFlag ); - static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt, + static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat, sal_uInt8 nFlag ); /// Should we output borders? - static bool HasBorderItem( const SwFmt& rFmt ); + static bool HasBorderItem( const SwFormat& rFormat ); }; class WW8_WrPlcSepx : public MSWordSections @@ -239,7 +239,7 @@ class WW8_WrPlcSepx : public MSWordSections ::std::vector< ::boost::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes; // hack to prevent adding sections in endnotes bool m_bHeaderFooterWritten; - WW8_WrPlc0* pTxtPos; // Pos der einzelnen Header / Footer + WW8_WrPlc0* pTextPos; // Pos der einzelnen Header / Footer WW8_WrPlcSepx( const WW8_WrPlcSepx& ) SAL_DELETED_FUNCTION; WW8_WrPlcSepx& operator=( const WW8_WrPlcSepx& ) SAL_DELETED_FUNCTION; @@ -252,24 +252,24 @@ public: void AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd, - const SwSectionFmt* pSectionFmt = 0, + const SwSectionFormat* pSectionFormat = 0, sal_uLong nLnNumRestartNo = 0 ); - void AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPd, + void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd, const SwNode& rNd, - const SwSectionFmt* pSectionFmt, + const SwSectionFormat* pSectionFormat, sal_uLong nLnNumRestartNo ); void Finish( WW8_CP nEndCp ) { aCps.push_back( nEndCp ); } - bool WriteKFTxt( WW8Export& rWrt ); + bool WriteKFText( WW8Export& rWrt ); void WriteSepx( SvStream& rStrm ) const; void WritePlcSed( WW8Export& rWrt ) const; void WritePlcHdd( WW8Export& rWrt ) const; private: - void WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt ); + void WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt ); public: void OutHeaderFooter(WW8Export& rWrt, bool bHeader, - const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode); + const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode); }; // class WW8_WrPct to construct the piece table @@ -341,17 +341,17 @@ class DrawObj { public: WW8_CP mnCp; // CP-Pos of references - sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts - sw::Frame maCntnt; // the frame itself + sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats + sw::Frame maContent; // the frame itself Point maParentPos; // Points sal_Int32 mnThick; // Border Thicknesses short mnDirection; // If BiDi or not unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent // msword hd/ft - DrawObj(const sw::Frame &rCntnt, WW8_CP nCp, Point aParentPos, short nDir, + DrawObj(const sw::Frame &rContent, WW8_CP nCp, Point aParentPos, short nDir, unsigned int nHdFtIndex) - : mnCp(nCp), mnShapeId(0), maCntnt(rCntnt), maParentPos(aParentPos), + : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos), mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {} void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick); DrawObj& operator=(const DrawObj &rOther); @@ -374,7 +374,7 @@ protected: public: PlcDrawObj() {} void WritePlc( WW8Export& rWrt ) const; - bool Append( WW8Export&, WW8_CP nCp, const sw::Frame& rFmt, + bool Append( WW8Export&, WW8_CP nCp, const sw::Frame& rFormat, const Point& rNdTopLeft ); int size() { return maDrawObjs.size(); }; DrawObjVector &GetObjArr() { return maDrawObjs; } @@ -384,17 +384,17 @@ private: PlcDrawObj& operator=(const PlcDrawObj&) SAL_DELETED_FUNCTION; }; -class MainTxtPlcDrawObj : public PlcDrawObj +class MainTextPlcDrawObj : public PlcDrawObj { public: - MainTxtPlcDrawObj() {} + MainTextPlcDrawObj() {} private: virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const SAL_OVERRIDE; virtual WW8_CP GetCpOffset(const WW8Fib &) const SAL_OVERRIDE; private: - MainTxtPlcDrawObj(const MainTxtPlcDrawObj&) SAL_DELETED_FUNCTION; - MainTxtPlcDrawObj& operator=(const MainTxtPlcDrawObj&) SAL_DELETED_FUNCTION; + MainTextPlcDrawObj(const MainTextPlcDrawObj&) SAL_DELETED_FUNCTION; + MainTextPlcDrawObj& operator=(const MainTextPlcDrawObj&) SAL_DELETED_FUNCTION; }; class HdFtPlcDrawObj : public PlcDrawObj @@ -437,7 +437,7 @@ struct MSWordSaveData RndStdIds eOldAnchorType; ww::bytes* pOOld; ///< WW8Export only SwPaM* pOldPam, *pOldEnd; - const sw::Frame* pOldFlyFmt; + const sw::Frame* pOldFlyFormat; const SwPageDesc* pOldPageDesc; bool bOldWriteAll : 1; ///< WW8Export only @@ -461,8 +461,8 @@ public: std::vector<const SwTOXType*> m_aTOXArr; const SfxItemSet* m_pISet; // fuer Doppel-Attribute WW8_WrPct* m_pPiece; // Pointer auf Piece-Table - SwNumRuleTbl* m_pUsedNumTbl; // alle used NumRules - const SwTxtNode *m_pTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft + SwNumRuleTable* m_pUsedNumTable; // alle used NumRules + const SwTextNode *m_pTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft std::map< sal_uInt16, sal_uInt16 > m_aRuleDuplicates; //map to Duplicated numrules std::stack< sal_Int32 > m_aCurrentCharPropStarts; ///< To remember the position in a run. WW8_WrtBookmarks* m_pBkmks; @@ -473,11 +473,11 @@ public: WW8OleMap m_aOleMap; // To remember all already exported ole objects ww8::WW8TableInfo::Pointer_t m_pTableInfo; - sal_uInt16 m_nCharFmtStart; - sal_uInt16 m_nFmtCollStart; + sal_uInt16 m_nCharFormatStart; + sal_uInt16 m_nFormatCollStart; sal_uInt16 m_nStyleBeforeFly; ///< Style-Nummer des Nodes, ///< in/an dem ein Fly verankert ist - sal_uInt16 m_nLastFmtId; ///< Style of last TxtNode in normal range + sal_uInt16 m_nLastFormatId; ///< Style of last TextNode in normal range sal_uInt16 m_nUniqueList; ///< current number for creating unique list names unsigned int m_nHdFtIndex; @@ -494,7 +494,7 @@ public: MSWordAttrIter* m_pChpIter; MSWordStyles* m_pStyles; WW8_WrPlcAnnotations* m_pAtn; - WW8_WrPlcTxtBoxes *m_pTxtBxs, *m_pHFTxtBxs; + WW8_WrPlcTextBoxes *m_pTextBxs, *m_pHFTextBxs; const sw::Frame *m_pParentFrame; // If set we are exporting content inside // a frame, e.g. a graphic node @@ -503,30 +503,30 @@ public: RndStdIds m_eNewAnchorType; // Zeichen gebundenen Flys, der im WW // Absatzgebunden wird. - WW8_WrPlcFld* m_pFldMain; // fields in MainText - WW8_WrPlcFld* m_pFldHdFt; // fields in Header/Footer - WW8_WrPlcFld* m_pFldFtn; // fields in FootNotes - WW8_WrPlcFld* m_pFldEdn; // fields in EndNotes - WW8_WrPlcFld* m_pFldAtn; // fields in Annotations - WW8_WrPlcFld* m_pFldTxtBxs; // fields in textboxes - WW8_WrPlcFld* m_pFldHFTxtBxs; // fields in header/footer textboxes + WW8_WrPlcField* m_pFieldMain; // fields in MainText + WW8_WrPlcField* m_pFieldHdFt; // fields in Header/Footer + WW8_WrPlcField* m_pFieldFootnote; // fields in FootNotes + WW8_WrPlcField* m_pFieldEdn; // fields in EndNotes + WW8_WrPlcField* m_pFieldAtn; // fields in Annotations + WW8_WrPlcField* m_pFieldTextBxs; // fields in textboxes + WW8_WrPlcField* m_pFieldHFTextBxs; // fields in header/footer textboxes WW8_WrMagicTable *m_pMagicTable; // keeps track of table cell positions, and // marks those that contain graphics, // which is required to make word display // graphics inside tables SwWW8WrGrf* m_pGrf; const SwAttrSet* m_pStyAttr; // StyleAttr for Tabs - const SwModify* m_pOutFmtNode; // write Format or Node - const SwFmt *m_pCurrentStyle; // iff bStyDef=true, then this store the current style + const SwModify* m_pOutFormatNode; // write Format or Node + const SwFormat *m_pCurrentStyle; // iff bStyDef=true, then this store the current style - MainTxtPlcDrawObj *m_pSdrObjs; // Draw-/Fly-Objects + MainTextPlcDrawObj *m_pSdrObjs; // Draw-/Fly-Objects HdFtPlcDrawObj *m_pHFSdrObjs; // Draw-/Fly-Objects in header or footer SwEscherEx* m_pEscher; // escher export class // #i43447# - removed // SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic - sal_uInt8 m_nTxtTyp; + sal_uInt8 m_nTextTyp; bool m_bStyDef : 1; // should Style be written? bool m_bBreakBefore : 1; // Breaks are being written 2 times @@ -540,8 +540,8 @@ public: bool m_bInWriteEscher : 1; // in write textboxes bool m_bStartTOX : 1; // true: a TOX is startet bool m_bInWriteTOX : 1; // true: all content are in a TOX - bool m_bFtnAtTxtEnd : 1; // true: all FTN at Textend - bool m_bEndAtTxtEnd : 1; // true: all END at Textend + bool m_bFootnoteAtTextEnd : 1; // true: all FTN at Textend + bool m_bEndAtTextEnd : 1; // true: all END at Textend bool m_bHasHdr : 1; bool m_bHasFtr : 1; bool m_bSubstituteBullets : 1; // true: SubstituteBullet() gets called @@ -588,10 +588,10 @@ public: sal_uInt16 GetId( const SwNumRule& rNumRule ); /// Return the numeric id of the style. - sal_uInt16 GetId( const SwTxtFmtColl& rColl ) const; + sal_uInt16 GetId( const SwTextFormatColl& rColl ) const; /// Return the numeric id of the style. - sal_uInt16 GetId( const SwCharFmt* pFmt ) const; + sal_uInt16 GetId( const SwCharFormat* pFormat ) const; sal_uInt16 GetId( const SwTOXType& rTOXType ); @@ -618,12 +618,12 @@ public: void AppendWordBookmark( const OUString& rName ); /// Use OutputItem() on an item set according to the parameters. - void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, bool bExportParentItemSet ); + void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet ); short GetDefaultFrameDirection( ) const; /// Right to left? - short TrueFrameDirection( const SwFrmFmt& rFlyFmt ) const; + short TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const; /// Right to left? short GetCurrentPageDirection() const; @@ -671,14 +671,14 @@ public: /// has two virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0; - virtual void AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; + virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; virtual void AppendBookmark( const OUString& rName, bool bSkip = false ) = 0; - virtual void AppendAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; + virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) = 0; //For i120928,add this interface to export graphic of bullet - virtual void ExportGrfBullet(const SwTxtNode& rNd) = 0; + virtual void ExportGrfBullet(const SwTextNode& rNd) = 0; // FIXME probably a hack... virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0; @@ -688,7 +688,7 @@ public: virtual void WriteChar( sal_Unicode c ) = 0; /// Output attributes. - void OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpFmt, bool bFlyFmt = false ); + void OutputFormat( const SwFormat& rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat = false ); /// Getter for pISet. const SfxItemSet* GetCurItemSet() const { return m_pISet; } @@ -704,13 +704,13 @@ public: /// The return value indicates, if a follow page desc is written. bool OutputFollowPageDesc( const SfxItemSet* pSet, - const SwTxtNode* pNd ); + const SwTextNode* pNd ); /// Write header/footer text. - void WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader); + void WriteHeaderFooterText( const SwFormat& rFormat, bool bHeader); /// Format of the section. - static const SwSectionFmt* GetSectionFormat( const SwNode& rNd ); + static const SwSectionFormat* GetSectionFormat( const SwNode& rNd ); /// Line number of the section start. static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ); @@ -743,19 +743,19 @@ public: virtual void SetupSectionPositions( WW8_PdAttrDesc* /*pA*/ ) {} /// Top node of host page when in header/footer. - void SetHdFtPageRoot( const SwTxtNode *pNd ) { m_pTopNodeOfHdFtPage = pNd; } + void SetHdFtPageRoot( const SwTextNode *pNd ) { m_pTopNodeOfHdFtPage = pNd; } /// Top node of host page when in header/footer. - const SwTxtNode *GetHdFtPageRoot() const { return m_pTopNodeOfHdFtPage; } + const SwTextNode *GetHdFtPageRoot() const { return m_pTopNodeOfHdFtPage; } /// Output the actual headers and footers. virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode) = 0; /// Write the field - virtual void OutputField( const SwField* pFld, ww::eField eFldType, - const OUString& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0; + virtual void OutputField( const SwField* pField, ww::eField eFieldType, + const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0; /// Write the data of the form field virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0; @@ -767,12 +767,12 @@ public: const OUString &rSelected, com::sun::star::uno::Sequence<OUString> &rListItems) = 0; - virtual void DoFormText(const SwInputField * pFld) = 0; + virtual void DoFormText(const SwInputField * pField) = 0; static bool NoPageBreakSection( const SfxItemSet *pSet ); // Compute the number format for WW dates - bool GetNumberFmt(const SwField& rFld, OUString& rStr); + bool GetNumberFormat(const SwField& rField, OUString& rStr); virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0; @@ -786,13 +786,13 @@ protected: virtual void ExportDocument_Impl() = 0; /// Get the next position in the text node to output - sal_Int32 GetNextPos( SwWW8AttrIter* pAttrIter, const SwTxtNode& rNode, sal_Int32 nAktPos ); + sal_Int32 GetNextPos( SwWW8AttrIter* pAttrIter, const SwTextNode& rNode, sal_Int32 nAktPos ); /// Update the information for GetNextPos(). void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nAktPos, sal_Int32 nEnd ); - /// Output SwTxtNode - virtual void OutputTextNode( const SwTxtNode& ); + /// Output SwTextNode + virtual void OutputTextNode( const SwTextNode& ); /// Setup the chapter fields (maChapterFieldLocs). void GatherChapterFields(); @@ -801,18 +801,18 @@ protected: void CollectOutlineBookmarks( const SwDoc &rDoc ); bool SetAktPageDescFromNode(const SwNode &rNd); - bool CntntContainsChapterField(const SwFmtCntnt &rCntnt) const; - bool FmtHdFtContainsChapterField(const SwFrmFmt &rFmt) const; + bool ContentContainsChapterField(const SwFormatContent &rContent) const; + bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const; - virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) = 0; + virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) = 0; virtual void PrepareNewPageDesc( const SfxItemSet* pSet, const SwNode& rNd, - const SwFmtPageDesc* pNewPgDescFmt = 0, + const SwFormatPageDesc* pNewPgDescFormat = 0, const SwPageDesc* pNewPgDesc = 0 ) = 0; /// Return value indicates if an inherited outline numbering is suppressed. - virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt) = 0; + virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0; /// Output SwStartNode void OutputStartNode( const SwStartNode& ); @@ -831,21 +831,21 @@ protected: /// Output SwSectionNode void OutputSectionNode( const SwSectionNode& ); - virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) = 0; + virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) = 0; /// Call the right (virtual) function according to the type of the item. /// /// One of OutputTextNode(), OutputGrfNode(), or OutputOLENode() - void OutputContentNode( const SwCntntNode& ); + void OutputContentNode( const SwContentNode& ); /// Find the nearest bookmark from the current position. /// /// Returns false when there is no bookmark. bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); - void GetSortedBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); + void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); - bool GetBookmarks( const SwTxtNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, + bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ); /// Find the nearest annotation mark from the current position. @@ -853,9 +853,9 @@ protected: /// Returns false when there is no annotation mark. bool NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nAktPos, bool bNextPositionOnly ); - void GetSortedAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); + void GetSortedAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ); - bool GetAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, + bool GetAnnotationMarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ); const NfKeywordTable & GetNfKeywordTable(); @@ -947,8 +947,8 @@ public: WW8Fib* pFib; ///< File Information Block WW8Dop* pDop; ///< DOcument Properties - WW8_WrPlcFtnEdn *pFtn; ///< Footnotes - structure to remember them, and output - WW8_WrPlcFtnEdn *pEdn; ///< Endnotes - structure to remember them, and output + WW8_WrPlcFootnoteEdn *pFootnote; ///< Footnotes - structure to remember them, and output + WW8_WrPlcFootnoteEdn *pEdn; ///< Endnotes - structure to remember them, and output WW8_WrPlcSepx* pSepx; ///< Sections/headers/footers bool bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format @@ -988,9 +988,9 @@ private: void StoreDoc1(); void Out_WwNumLvl( sal_uInt8 nWwLevel ); void BuildAnlvBulletBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen, - const SwNumFmt& rFmt ); + const SwNumFormat& rFormat ); static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen, - const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel ); + const SwNumRule& rRul, const SwNumFormat& rFormat, sal_uInt8 nSwLevel ); /// Output the numbering table. virtual void WriteNumbering() SAL_OVERRIDE; @@ -1012,10 +1012,10 @@ public: virtual void SetupSectionPositions( WW8_PdAttrDesc* pA ) SAL_OVERRIDE; void Out_SwNumLvl( sal_uInt8 nSwLevel ); - void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt, + void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFormat& rFormat, sal_uInt8 nSwLevel ); - bool MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt); + bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat); SvxMSExportOLEObjects& GetOLEExp() { return *m_pOLEExp; } SwMSConvertControls& GetOCXExp() { return *m_pOCXExp; } @@ -1024,27 +1024,27 @@ public: sal_uInt16 AddRedlineAuthor( sal_uInt16 nId ); - void WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pO = 0 ); + void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = 0 ); void WritePostItBegin( ww::bytes* pO = 0 ); const SvxBrushItem* GetCurrentPageBgBrush() const; - SvxBrushItem TrueFrameBgBrush(const SwFrmFmt &rFlyFmt) const; + SvxBrushItem TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const; /// Output all textframes anchored as character for the winword 7- format. - void OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd ); + void OutWW6FlyFrmsInContent( const SwTextNode& rNd ); - void AppendFlyInFlys(const sw::Frame& rFrmFmt, const Point& rNdTopLeft); + void AppendFlyInFlys(const sw::Frame& rFrameFormat, const Point& rNdTopLeft); void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp); void WriteSdrTextObj(const SdrTextObj& rObj, sal_uInt8 nTyp); - sal_uInt32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const; + sal_uInt32 GetSdrOrdNum( const SwFrameFormat& rFormat ) const; void CreateEscher(); void WriteEscher(); - bool Out_SwNum(const SwTxtNode* pNd); + bool Out_SwNum(const SwTextNode* pNd); /// Write the field - virtual void OutputField( const SwField* pFld, ww::eField eFldType, - const OUString& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) SAL_OVERRIDE; + virtual void OutputField( const SwField* pField, ww::eField eFieldType, + const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) SAL_OVERRIDE; void StartCommentOutput( const OUString& rName ); void EndCommentOutput( const OUString& rName ); @@ -1052,12 +1052,12 @@ public: bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> xOleStg, tools::SvRef<SotStorage> xObjStg, OUString &rStorageName, SwOLENode *pOLENd); - virtual void AppendBookmarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; + virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; virtual void AppendBookmark( const OUString& rName, bool bSkip = false ) SAL_OVERRIDE; - virtual void AppendAnnotationMarks( const SwTxtNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; + virtual void AppendAnnotationMarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) SAL_OVERRIDE; - virtual void ExportGrfBullet(const SwTxtNode& rNd) SAL_OVERRIDE; + virtual void ExportGrfBullet(const SwTextNode& rNd) SAL_OVERRIDE; void OutGrfBullets(const sw::Frame &rFrame); void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo); @@ -1082,21 +1082,21 @@ public: inline bool IsUnicode() const { return m_pPiece->IsUnicode(); } - virtual void SectionBreaksAndFrames( const SwTxtNode& rNode ) SAL_OVERRIDE; + virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) SAL_OVERRIDE; /// Helper method for OutputSectionBreaks() and OutputFollowPageDesc(). // #i76300# virtual void PrepareNewPageDesc( const SfxItemSet* pSet, const SwNode& rNd, - const SwFmtPageDesc* pNewPgDescFmt = 0, + const SwFormatPageDesc* pNewPgDescFormat = 0, const SwPageDesc* pNewPgDesc = 0 ) SAL_OVERRIDE; void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine, sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9, bool bShadow); - void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow); - void Out_SwFmtTableBox( ww::bytes& rO, const SvxBoxItem * rBox ); + void Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow); + void Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * rBox ); void Out_CellRangeBorders(const SvxBoxItem * pBox, sal_uInt8 nStart, sal_uInt8 nLimit); bool TransBrush(const Color& rCol, WW8_SHD& rShd); @@ -1104,7 +1104,7 @@ public: sal_uInt16 nDist, bool bShadow); // #i77805# - new return value indicates, if an inherited outline numbering is suppressed - virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt) SAL_OVERRIDE; + virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) SAL_OVERRIDE; unsigned int GetHdFtIndex() const { return m_nHdFtIndex; } void SetHdFtIndex(unsigned int nHdFtIndex) { m_nHdFtIndex = nHdFtIndex; } @@ -1123,8 +1123,8 @@ public: SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const; /// Nasty swap for bidi if necessary - bool MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight, - const sw::Frame &rFrmFmt); + bool MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, + const sw::Frame &rFrameFormat); void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); } void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); } @@ -1132,7 +1132,7 @@ public: { SwWW8Writer::InsAsString16( *pO, rStr ); } void InsAsString8( const OUString& rStr, rtl_TextEncoding eCodeSet ) { SwWW8Writer::InsAsString8( *pO, rStr, eCodeSet ); } - void WriteStringAsPara( const OUString& rTxt, sal_uInt16 nStyleId = 0 ); + void WriteStringAsPara( const OUString& rText, sal_uInt16 nStyleId = 0 ); /// Setup the exporter. WW8Export( SwWW8Writer *pWriter, @@ -1146,7 +1146,7 @@ public: const OUString &rSelected, com::sun::star::uno::Sequence<OUString> &rListItems) SAL_OVERRIDE; - virtual void DoFormText(const SwInputField * pFld) SAL_OVERRIDE; + virtual void DoFormText(const SwInputField * pField) SAL_OVERRIDE; void GetCurrentItems(ww::bytes &rItems) const; @@ -1155,7 +1155,7 @@ public: virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) SAL_OVERRIDE; /// Fields. - WW8_WrPlcFld* CurrentFieldPlc() const; + WW8_WrPlcField* CurrentFieldPlc() const; SwWW8Writer& GetWriter() const { return *m_pWriter; } SvStream& Strm() const { return m_pWriter->Strm(); } @@ -1168,7 +1168,7 @@ public: /// Output the actual headers and footers. virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags, - const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, + const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat, sal_uInt8 nBreakCode) SAL_OVERRIDE; protected: @@ -1180,7 +1180,7 @@ protected: virtual void OutputLinkedOLE( const OUString& ) SAL_OVERRIDE; - virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) SAL_OVERRIDE; + virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) SAL_OVERRIDE; private: WW8Export(const WW8Export&) SAL_DELETED_FUNCTION; @@ -1194,35 +1194,35 @@ private: WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&) SAL_DELETED_FUNCTION; protected: std::vector<WW8_CP> aCps; - std::vector<const void*> aCntnt; // PTRARR of SwFmtFtn/PostIts/.. - std::vector<const SwFrmFmt*> aSpareFmts; //a backup for aCntnt: if there's no SdrObject, stores the fmt directly here - WW8_WrPlc0* pTxtPos; // positions of the individual texts + std::vector<const void*> aContent; // PTRARR of SwFormatFootnote/PostIts/.. + std::vector<const SwFrameFormat*> aSpareFormats; //a backup for aContent: if there's no SdrObject, stores the fmt directly here + WW8_WrPlc0* pTextPos; // positions of the individual texts WW8_WrPlcSubDoc(); virtual ~WW8_WrPlcSubDoc(); - bool WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount ); - void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTxtStt, - sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const; + bool WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount ); + void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStt, + sal_Int32& rTextCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const; virtual const std::vector<sal_uInt32>* GetShapeIdArr() const; }; // double Plc for Footnotes/Endnotes -class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc +class WW8_WrPlcFootnoteEdn : public WW8_WrPlcSubDoc { private: sal_uInt8 nTyp; - WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&) SAL_DELETED_FUNCTION; - WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &) SAL_DELETED_FUNCTION; + WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn&) SAL_DELETED_FUNCTION; + WW8_WrPlcFootnoteEdn& operator=(WW8_WrPlcFootnoteEdn &) SAL_DELETED_FUNCTION; public: - WW8_WrPlcFtnEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {} + WW8_WrPlcFootnoteEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {} - bool WriteTxt( WW8Export& rWrt ); + bool WriteText( WW8Export& rWrt ); void WritePlc( WW8Export& rWrt ) const; - void Append( WW8_CP nCp, const SwFmtFtn& rFtn ); + void Append( WW8_CP nCp, const SwFormatFootnote& rFootnote ); }; struct WW8_Annotation @@ -1253,32 +1253,32 @@ public: void Append( WW8_CP nCp, const SwPostItField* pPostIt ); void Append( WW8_CP nCp, const SwRedlineData* pRedLine ); bool IsNewRedlineComment( const SwRedlineData* pRedLine ); - bool WriteTxt( WW8Export& rWrt ); + bool WriteText( WW8Export& rWrt ); void WritePlc( WW8Export& rWrt ) const; }; -class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes +class WW8_WrPlcTextBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes { // Frame/DrawTextboxes! private: sal_uInt8 nTyp; - std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrmFmts + std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrameFormats virtual const std::vector<sal_uInt32>* GetShapeIdArr() const SAL_OVERRIDE; - WW8_WrPlcTxtBoxes(const WW8_WrPlcTxtBoxes&) SAL_DELETED_FUNCTION; - WW8_WrPlcTxtBoxes& operator=(WW8_WrPlcTxtBoxes&) SAL_DELETED_FUNCTION; + WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes&) SAL_DELETED_FUNCTION; + WW8_WrPlcTextBoxes& operator=(WW8_WrPlcTextBoxes&) SAL_DELETED_FUNCTION; public: - WW8_WrPlcTxtBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {} + WW8_WrPlcTextBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {} - bool WriteTxt( WW8Export& rWrt ); + bool WriteText( WW8Export& rWrt ); void WritePlc( WW8Export& rWrt ) const; void Append( const SdrObject& rObj, sal_uInt32 nShapeId ); - void Append( const SwFrmFmt* pFmt, sal_uInt32 nShapeId ); - sal_uInt16 Count() const { return aCntnt.size(); } + void Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId ); + sal_uInt16 Count() const { return aContent.size(); } sal_uInt16 GetPos( const void* p ) const { std::vector<const void*>::const_iterator it - = std::find( aCntnt.begin(), aCntnt.end(), p ); - return it == aCntnt.end() ? USHRT_MAX : it - aCntnt.begin(); + = std::find( aContent.begin(), aContent.end(), p ); + return it == aContent.end() ? USHRT_MAX : it - aContent.begin(); } }; @@ -1326,18 +1326,18 @@ public: void Finish( sal_uLong nLastCp, sal_uLong nStartCp ); }; -// class WW8_WrPlcFld is for fields -class WW8_WrPlcFld : public WW8_WrPlc1 +// class WW8_WrPlcField is for fields +class WW8_WrPlcField : public WW8_WrPlc1 { private: - sal_uInt8 nTxtTyp; + sal_uInt8 nTextTyp; sal_uInt16 nResults; - WW8_WrPlcFld(const WW8_WrPlcFld&) SAL_DELETED_FUNCTION; - WW8_WrPlcFld& operator=(const WW8_WrPlcFld&) SAL_DELETED_FUNCTION; + WW8_WrPlcField(const WW8_WrPlcField&) SAL_DELETED_FUNCTION; + WW8_WrPlcField& operator=(const WW8_WrPlcField&) SAL_DELETED_FUNCTION; public: - WW8_WrPlcFld( sal_uInt16 nStructSz, sal_uInt8 nTTyp ) - : WW8_WrPlc1( nStructSz ), nTxtTyp( nTTyp ), nResults(0) + WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp ) + : WW8_WrPlc1( nStructSz ), nTextTyp( nTTyp ), nResults(0) {} bool Write( WW8Export& rWrt ); void ResultAdded() { ++nResults; } @@ -1409,7 +1409,7 @@ public: }; /** The class MSWordAttrIter is a helper class to build the Fkp.chpx. - This is a base class to output the SwTxtAttrs and the EditEngineTxtAttrs. + This is a base class to output the SwTextAttrs and the EditEngineTextAttrs. */ class MSWordAttrIter { @@ -1433,8 +1433,8 @@ class MSWord_SdrAttrIter : public MSWordAttrIter private: const EditTextObject* pEditObj; const SfxItemPool* pEditPool; - std::vector<EECharAttrib> aTxtAtrArr; - std::vector<const EECharAttrib*> aChrTxtAtrArr; + std::vector<EECharAttrib> aTextAtrArr; + std::vector<const EECharAttrib*> aChrTextAtrArr; std::vector<rtl_TextEncoding> aChrSetArr; sal_Int32 nPara; sal_Int32 nAktSwPos; @@ -1444,7 +1444,7 @@ private: sal_uInt8 mnTyp; sal_Int32 SearchNext( sal_Int32 nStartPos ); - void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart); + void SetCharSet(const EECharAttrib& rTextAttr, bool bStart); MSWord_SdrAttrIter(const MSWord_SdrAttrIter&) SAL_DELETED_FUNCTION; MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&) SAL_DELETED_FUNCTION; @@ -1455,7 +1455,7 @@ public: void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = NULL); void OutEEField(const SfxPoolItem& rHt); - bool IsTxtAttr(sal_Int32 nSwPos); + bool IsTextAttr(sal_Int32 nSwPos); void NextPos() { if ( nAktSwPos < SAL_MAX_INT32 ) nAktSwPos = SearchNext( nAktSwPos + 1 ); } @@ -1472,14 +1472,14 @@ public: // Only character attributes are considered; paragraph attributes do not need this treatment. // Die Absatz- und Textattribute des Writers kommen rein, und es wird // mit Where() die naechste Position geliefert, an der sich die Attribute -// aendern. IsTxtAtr() sagt, ob sich an der mit Where() gelieferten Position +// aendern. IsTextAtr() sagt, ob sich an der mit Where() gelieferten Position // ein Attribut ohne Ende und mit \xff im Text befindet. // Mit OutAttr() werden die Attribute an der angegebenen SwPos // ausgegeben. class SwWW8AttrIter : public MSWordAttrIter { private: - const SwTxtNode& rNd; + const SwTextNode& rNd; sw::util::CharRuns maCharRuns; sw::util::cCharRunIter maCharRunIter; @@ -1494,24 +1494,24 @@ private: bool mbParaIsRTL; - const SwFmtDrop &mrSwFmtDrop; + const SwFormatDrop &mrSwFormatDrop; sw::Frames maFlyFrms; // #i2916# sw::FrameIter maFlyIter; sal_Int32 SearchNext( sal_Int32 nStartPos ); - void FieldVanish( const OUString& rTxt ); + void FieldVanish( const OUString& rText ); - void OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool bStart); + void OutSwFormatRefMark(const SwFormatRefMark& rAttr, bool bStart); void IterToCurrent(); SwWW8AttrIter(const SwWW8AttrIter&) SAL_DELETED_FUNCTION; SwWW8AttrIter& operator=(const SwWW8AttrIter&) SAL_DELETED_FUNCTION; public: - SwWW8AttrIter( MSWordExportBase& rWr, const SwTxtNode& rNd ); + SwWW8AttrIter( MSWordExportBase& rWr, const SwTextNode& rNd ); - bool IsTxtAttr( sal_Int32 nSwPos ); + bool IsTextAttr( sal_Int32 nSwPos ); bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const; bool IsDropCap( int nSwPos ); bool RequiresImplicitBookmark(); @@ -1533,7 +1533,7 @@ public: rtl_TextEncoding GetCharSet() const { return meChrSet; } OUString GetSnippet(const OUString &rStr, sal_Int32 nAktPos, sal_Int32 nLen) const; - const SwFmtDrop& GetSwFmtDrop() const { return mrSwFmtDrop; } + const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; } bool IsWatermarkFrame(); bool IsAnchorLinkedToThisNode( sal_uLong nNodePos ); @@ -1543,7 +1543,7 @@ public: class MSWordStyles { MSWordExportBase& m_rExport; - SwFmt** m_pFmtA; ///< Slot <-> Character and paragraph style array (0 for list styles). + SwFormat** m_pFormatA; ///< Slot <-> Character and paragraph style array (0 for list styles). sal_uInt16 m_nUsedSlots; bool m_bListStyles; ///< If list styles are requested to be exported as well. std::map<sal_uInt16, const SwNumRule*> m_aNumRules; ///< Slot <-> List style map. @@ -1554,25 +1554,25 @@ class MSWordStyles /// Create the style table, called from the constructor. void BuildStylesTable(); - /// Based on pFmtA, fill in m_aStyleIds with unique, MS-like names. + /// Based on pFormatA, fill in m_aStyleIds with unique, MS-like names. void BuildStyleIds(); /// Get slot number during building the style table. - sal_uInt16 BuildGetSlot( const SwFmt& rFmt ); + sal_uInt16 BuildGetSlot( const SwFormat& rFormat ); sal_uInt16 BuildGetSlot( const SwNumRule& /*rNumRule*/ ) { return m_nUsedSlots++;} /// Return information about one style. - void GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext ); + void GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext ); /// Outputs attributes of one style. - void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz ); + void WriteProperties( const SwFormat* pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz ); - static sal_uInt16 GetWWId( const SwFmt& rFmt ); + static sal_uInt16 GetWWId( const SwFormat& rFormat ); - void SetStyleDefaults( const SwFmt& rFmt, bool bPap ); + void SetStyleDefaults( const SwFormat& rFormat, bool bPap ); /// Outputs one style - called (in a loop) from OutputStylesTable(). - void OutputStyle( SwFmt* pFmt, sal_uInt16 nPos ); + void OutputStyle( SwFormat* pFormat, sal_uInt16 nPos ); void OutputStyle( const SwNumRule* pNumRule, sal_uInt16 nPos ); MSWordStyles( const MSWordStyles& ) SAL_DELETED_FUNCTION; @@ -1585,20 +1585,20 @@ public: /// Output the styles table. void OutputStylesTable(); - /// Get id of the style (rFmt). - sal_uInt16 GetSlot( const SwFmt* pFmt ) const; + /// Get id of the style (rFormat). + sal_uInt16 GetSlot( const SwFormat* pFormat ) const; - /// Get styleId of the nId-th style (nId is its position in pFmtA). + /// Get styleId of the nId-th style (nId is its position in pFormatA). OString GetStyleId(sal_uInt16 nId) const; - const SwFmt* GetSwFmt(sal_uInt16 nId) const { return m_pFmtA[nId]; } + const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; } /// Get numbering rule of the nId-th style const SwNumRule* GetSwNumRule(sal_uInt16 nId) const; }; #define MSWORD_MAX_STYLES_LIMIT 4091 -sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt); +sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat); // A bit of a bag on the side for now OUString FieldString(ww::eField eIndex); OUString BookmarkToWord(const OUString &rBookmark); diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index cf14ca976f3b..dcd32771a12b 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -303,7 +303,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode ) if (m_pParentFrame->IsInline()) { const SwAttrSet& rSet = - m_pParentFrame->GetFrmFmt().GetAttrSet(); + m_pParentFrame->GetFrameFormat().GetAttrSet(); bEndCR = false; bGraphicNeeded = TestOleNeedsGraphic(rSet, xOleStg, xObjStg, sStorageName, const_cast<SwOLENode*>(&rOLENode)); @@ -379,7 +379,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) { //Added for i120568,the hyperlink info within a graphic whose anchor type is "As character" //will be exported to ensure the fidelity - const SwFmtURL& rURL = rFrame.GetFrmFmt().GetAttrSet().GetURL(); + const SwFormatURL& rURL = rFrame.GetFrameFormat().GetAttrSet().GetURL(); bool bURLStarted = false; if( !rURL.GetURL().isEmpty() && rFrame.GetWriterType() == sw::Frame::eGraphic) { @@ -420,25 +420,25 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) sal_uInt8 aArr[ 18 ]; sal_uInt8* pArr = aArr; - const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt(); - const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId(); + const SwFrameFormat &rFlyFormat = rFrame.GetFrameFormat(); + const RndStdIds eAn = rFlyFormat.GetAttrSet().GetAnchor(false).GetAnchorId(); if (eAn == FLY_AS_CHAR) { - sal_Int16 eVert = rFlyFmt.GetVertOrient().GetVertOrient(); + sal_Int16 eVert = rFlyFormat.GetVertOrient().GetVertOrient(); if ((eVert == text::VertOrientation::CHAR_CENTER) || (eVert == text::VertOrientation::LINE_CENTER)) { bool bVert = false; //The default for word in vertical text mode is to center, //otherwise a sub/super script hack is employed - if (m_pOutFmtNode && m_pOutFmtNode->ISA(SwCntntNode) ) + if (m_pOutFormatNode && m_pOutFormatNode->ISA(SwContentNode) ) { - const SwTxtNode* pTxtNd = static_cast<const SwTxtNode*>(m_pOutFmtNode); - SwPosition aPos(*pTxtNd); + const SwTextNode* pTextNd = static_cast<const SwTextNode*>(m_pOutFormatNode); + SwPosition aPos(*pTextNd); bVert = m_pDoc->IsInVerticalText(aPos); } if (!bVert) { - SwTwips nHeight = rFlyFmt.GetFrmSize().GetHeight(); + SwTwips nHeight = rFlyFormat.GetFrmSize().GetHeight(); nHeight/=20; //nHeight was in twips, want it in half points, but //then half of total height. long nFontHeight = static_cast<const SvxFontHeightItem&>( @@ -492,7 +492,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame) bool bOldGrf = m_bOutGrf; m_bOutGrf = true; - OutputFormat( rFrame.GetFrmFmt(), false, false, true ); // Fly-Attrs + OutputFormat( rFrame.GetFrameFormat(), false, false, true ); // Fly-Attrs m_bOutGrf = bOldGrf; m_pPapPlc->AppendFkpEntry( Strm().Tell(), pO->size(), pO->data() ); @@ -555,7 +555,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly, sal_uInt8* pArr = aArr + 0x2E; // Do borders first - const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet(); + const SwAttrSet& rAttrSet = rFly.GetFrameFormat().GetAttrSet(); if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem)) { const SvxBoxItem* pBox = static_cast<const SvxBoxItem*>(pItem); @@ -709,7 +709,7 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd, WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight, rGrfNd.GetpSwAttrSet()); SwBasicEscherEx aInlineEscher(&rStrm, rWrt); - aInlineEscher.WriteGrfFlyFrame(rFly.GetFrmFmt(), 0x401); + aInlineEscher.WriteGrfFlyFrame(rFly.GetFrameFormat(), 0x401); aInlineEscher.WritePictures(); } else @@ -945,7 +945,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight, pNd->GetpSwAttrSet()); SwBasicEscherEx aInlineEscher(&rStrm, rWrt); - aInlineEscher.WriteOLEFlyFrame(rFly.GetFrmFmt(), 0x401); + aInlineEscher.WriteOLEFlyFrame(rFly.GetFrameFormat(), 0x401); aInlineEscher.WritePictures(); } #else @@ -975,7 +975,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) } break; case sw::Frame::eDrawing: - case sw::Frame::eTxtBox: + case sw::Frame::eTextBox: case sw::Frame::eFormControl: OSL_ENSURE(rWrt.bWrtWW8, "You can't try and export these in WW8 format, a filter bug"); @@ -990,7 +990,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) { WritePICFHeader(rStrm, rFly, 0x64, nWidth, nHeight); SwBasicEscherEx aInlineEscher(&rStrm, rWrt); - aInlineEscher.WriteEmptyFlyFrame(rFly.GetFrmFmt(), 0x401); + aInlineEscher.WriteEmptyFlyFrame(rFly.GetFrameFormat(), 0x401); } break; default: diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index a5f249e65da3..42e0a42e90ea 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -254,7 +254,7 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 n * - gebe die Attribute aus; ohne Parents! */ -void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, +void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet ) { if( bExportParentItemSet || rSet.Count() ) @@ -263,7 +263,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool m_pISet = &rSet; // fuer Doppel-Attribute // If frame dir is set, but not adjust, then force adjust as well - if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) ) + if ( bPapFormat && SfxItemState::SET == rSet.GetItemState( RES_FRAMEDIR, bExportParentItemSet ) ) { // No explicit adjust set ? if ( SfxItemState::SET != rSet.GetItemState( RES_PARATR_ADJUST, bExportParentItemSet ) ) @@ -276,7 +276,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool } } - if ( bPapFmt && SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) ) + if ( bPapFormat && SfxItemState::SET == rSet.GetItemState( RES_PARATR_NUMRULE, bExportParentItemSet, &pItem ) ) { AttrOutput().OutputItem( *pItem ); @@ -292,9 +292,9 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool sw::PoolItems aItems; GetPoolItems( rSet, aItems, bExportParentItemSet ); - if ( bChpFmt ) + if ( bChpFormat ) ExportPoolItemsToCHP(aItems, nScript); - if ( bPapFmt ) + if ( bPapFormat ) { sw::cPoolItemIter aEnd = aItems.end(); for ( sw::cPoolItemIter aI = aItems.begin(); aI != aEnd; ++aI ) @@ -324,22 +324,22 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool void MSWordExportBase::GatherChapterFields() { //If the header/footer contains a chapter field - SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_CHAPTERFLD ); - SwIterator<SwFmtFld,SwFieldType> aFmtFlds( *pType ); - for ( SwFmtFld* pFld = aFmtFlds.First(); pFld; pFld = aFmtFlds.Next() ) + SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_CHAPTERFLD ); + SwIterator<SwFormatField,SwFieldType> aFormatFields( *pType ); + for ( SwFormatField* pField = aFormatFields.First(); pField; pField = aFormatFields.Next() ) { - if (const SwTxtFld *pTxtFld = pFld->GetTxtFld()) + if (const SwTextField *pTextField = pField->GetTextField()) { - const SwTxtNode &rTxtNode = pTxtFld->GetTxtNode(); - m_aChapterFieldLocs.push_back(rTxtNode.GetIndex()); + const SwTextNode &rTextNode = pTextField->GetTextNode(); + m_aChapterFieldLocs.push_back(rTextNode.GetIndex()); } } } -bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const +bool MSWordExportBase::ContentContainsChapterField(const SwFormatContent &rContent) const { bool bRet = false; - if ( const SwNodeIndex* pSttIdx = rCntnt.GetCntntIdx() ) + if ( const SwNodeIndex* pSttIdx = rContent.GetContentIdx() ) { SwNodeIndex aIdx( *pSttIdx, 1 ); SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() ); @@ -359,19 +359,19 @@ bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const return bRet; } -bool MSWordExportBase::FmtHdFtContainsChapterField(const SwFrmFmt &rFmt) const +bool MSWordExportBase::FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const { if ( m_aChapterFieldLocs.empty() ) return false; - const SwFrmFmt *pFmt = 0; + const SwFrameFormat *pFormat = 0; - pFmt = rFmt.GetHeader().GetHeaderFmt(); - if ( pFmt && CntntContainsChapterField( pFmt->GetCntnt() ) ) + pFormat = rFormat.GetHeader().GetHeaderFormat(); + if ( pFormat && ContentContainsChapterField( pFormat->GetContent() ) ) return true; - pFmt = rFmt.GetFooter().GetFooterFmt(); - if ( pFmt && CntntContainsChapterField( pFmt->GetCntnt() ) ) + pFormat = rFormat.GetFooter().GetFooterFormat(); + if ( pFormat && ContentContainsChapterField( pFormat->GetContent() ) ) return true; return false; @@ -390,18 +390,18 @@ bool MSWordExportBase::SetAktPageDescFromNode(const SwNode &rNd) bNewPageDesc = true; else { - const SwFrmFmt& rTitleFmt = m_pAktPageDesc->GetFirstMaster(); - const SwFrmFmt& rFollowFmt = pCurrent->GetMaster(); + const SwFrameFormat& rTitleFormat = m_pAktPageDesc->GetFirstMaster(); + const SwFrameFormat& rFollowFormat = pCurrent->GetMaster(); - bNewPageDesc = !IsPlausableSingleWordSection(rTitleFmt, - rFollowFmt); + bNewPageDesc = !IsPlausableSingleWordSection(rTitleFormat, + rFollowFormat); } m_pAktPageDesc = pCurrent; } else { - const SwFrmFmt &rFmt = pCurrent->GetMaster(); - bNewPageDesc = FmtHdFtContainsChapterField(rFmt); + const SwFrameFormat &rFormat = pCurrent->GetMaster(); + bNewPageDesc = FormatHdFtContainsChapterField(rFormat); } } return bNewPageDesc; @@ -422,7 +422,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode m_bBreakBefore = true; bool bNewPageDesc = false; const SfxPoolItem* pItem=0; - const SwFmtPageDesc *pPgDesc=0; + const SwFormatPageDesc *pPgDesc=0; //Output a sectionbreak if theres a new pagedesciptor. otherwise output a //pagebreak if there is a pagebreak here, unless the new page (follow @@ -466,11 +466,11 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode if ( pSet && pSet->Count() ) { if ( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pItem ) && - static_cast<const SwFmtPageDesc*>(pItem)->GetRegisteredIn() != NULL) + static_cast<const SwFormatPageDesc*>(pItem)->GetRegisteredIn() != NULL) { bBreakSet = true; bNewPageDesc = true; - pPgDesc = static_cast<const SwFmtPageDesc*>(pItem); + pPgDesc = static_cast<const SwFormatPageDesc*>(pItem); m_pAktPageDesc = pPgDesc->GetPageDesc(); } else if ( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pItem ) ) @@ -482,7 +482,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode const SwTableNode* pTableNode = rNd.FindTableNode(); if ( pTableNode ) { - const SwTableBox* pBox = rNd.GetTblBox(); + const SwTableBox* pBox = rNd.GetTableBox(); const SwTableLine* pLine = pBox ? pBox->GetUpper() : 0; // but only for non-complex tables if ( pLine && !pLine->GetUpper() ) @@ -512,7 +512,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode if ( m_pAktPageDesc ) { // #i76301# - assure that there is a page break before set at the node. - const SvxFmtBreakItem* pBreak = dynamic_cast<const SvxFmtBreakItem*>(pItem); + const SvxFormatBreakItem* pBreak = dynamic_cast<const SvxFormatBreakItem*>(pItem); if ( pBreak && pBreak->GetBreak() == SVX_BREAK_PAGE_BEFORE ) { @@ -537,17 +537,17 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode bool bHackInBreak = false; if ( !bBreakSet ) { - if ( const SwCntntNode *pNd = rNd.GetCntntNode() ) + if ( const SwContentNode *pNd = rNd.GetContentNode() ) { - const SvxFmtBreakItem &rBreak = - ItemGet<SvxFmtBreakItem>( *pNd, RES_BREAK ); + const SvxFormatBreakItem &rBreak = + ItemGet<SvxFormatBreakItem>( *pNd, RES_BREAK ); if ( rBreak.GetBreak() == SVX_BREAK_PAGE_BEFORE ) bHackInBreak = true; else { // Even a pagedesc item is set, the break item can be set 'NONE', // but a pagedesc item is an implicit page break before... - const SwFmtPageDesc &rPageDesc = - ItemGet<SwFmtPageDesc>( *pNd, RES_PAGEDESC ); + const SwFormatPageDesc &rPageDesc = + ItemGet<SwFormatPageDesc>( *pNd, RES_PAGEDESC ); if ( rPageDesc.KnowsPageDesc() ) bHackInBreak = true; } @@ -570,7 +570,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode } // #i76300# -bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTxtNode* pNd ) +bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTextNode* pNd ) { bool bRet = false; @@ -585,29 +585,29 @@ bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTxt return bRet; } -const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) +const SwSectionFormat* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) { - const SwSectionFmt* pFmt = NULL; + const SwSectionFormat* pFormat = NULL; const SwSectionNode* pSect = rNd.FindSectionNode(); if ( pSect && CONTENT_SECTION == pSect->GetSection().GetType() ) { - pFmt = pSect->GetSection().GetFmt(); + pFormat = pSect->GetSection().GetFormat(); } - return pFmt; + return pFormat; } sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) { - const SwFmtLineNumber* pNItem = 0; + const SwFormatLineNumber* pNItem = 0; if ( pSet ) { - pNItem = &( ItemGet<SwFmtLineNumber>( *pSet, RES_LINENUMBER ) ); + pNItem = &( ItemGet<SwFormatLineNumber>( *pSet, RES_LINENUMBER ) ); } - else if ( const SwCntntNode *pNd = rNd.GetCntntNode() ) + else if ( const SwContentNode *pNd = rNd.GetContentNode() ) { - pNItem = &( ItemGet<SwFmtLineNumber>( *pNd, RES_LINENUMBER ) ); + pNItem = &( ItemGet<SwFormatLineNumber>( *pNd, RES_LINENUMBER ) ); } return pNItem? pNItem->GetStartValue() : 0; @@ -615,7 +615,7 @@ sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNo void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet, const SwNode& rNd, - const SwFmtPageDesc* pNewPgDescFmt, + const SwFormatPageDesc* pNewPgDescFormat, const SwPageDesc* pNewPgDesc ) { // Die PageDescs werden beim Auftreten von PageDesc-Attributen nur in @@ -630,18 +630,18 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet, if ( !nFcPos ) return; - const SwSectionFmt* pFmt = GetSectionFormat( rNd ); + const SwSectionFormat* pFormat = GetSectionFormat( rNd ); const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd ); - OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." ); + OSL_ENSURE( pNewPgDescFormat || pNewPgDesc, "Neither page desc format nor page desc provided." ); - if ( pNewPgDescFmt ) + if ( pNewPgDescFormat ) { - pSepx->AppendSep( Fc2Cp( nFcPos ), *pNewPgDescFmt, rNd, pFmt, nLnNm ); + pSepx->AppendSep( Fc2Cp( nFcPos ), *pNewPgDescFormat, rNd, pFormat, nLnNm ); } else if ( pNewPgDesc ) { - pSepx->AppendSep( Fc2Cp( nFcPos ), pNewPgDesc, rNd, pFmt, nLnNm ); + pSepx->AppendSep( Fc2Cp( nFcPos ), pNewPgDesc, rNd, pFormat, nLnNm ); } } @@ -693,7 +693,7 @@ sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType ) return nRet; } -void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ) +void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFormat &rNFormat, const SwFormat &rFormat ) { if ( nLvl >= WW8ListManager::nMaxLevel ) nLvl = WW8ListManager::nMaxLevel-1; @@ -712,29 +712,29 @@ void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt else { m_rWW8Export.Out_SwNumLvl( nLvl ); - if ( rNFmt.GetPositionAndSpaceMode() == + if ( rNFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION && - rNFmt.GetAbsLSpace() ) + rNFormat.GetAbsLSpace() ) { - SwNumFmt aNumFmt( rNFmt ); + SwNumFormat aNumFormat( rNFormat ); const SvxLRSpaceItem& rLR = - ItemGet<SvxLRSpaceItem>( rFmt, RES_LR_SPACE ); + ItemGet<SvxLRSpaceItem>( rFormat, RES_LR_SPACE ); - aNumFmt.SetAbsLSpace( writer_cast<short>( - aNumFmt.GetAbsLSpace() + rLR.GetLeft() ) ); + aNumFormat.SetAbsLSpace( writer_cast<short>( + aNumFormat.GetAbsLSpace() + rLR.GetLeft() ) ); m_rWW8Export.Out_NumRuleAnld( *m_rWW8Export.m_pDoc->GetOutlineNumRule(), - aNumFmt, nLvl ); + aNumFormat, nLvl ); } else m_rWW8Export.Out_NumRuleAnld( *m_rWW8Export.m_pDoc->GetOutlineNumRule(), - rNFmt, nLvl ); + rNFormat, nLvl ); } } // #i77805# -bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt) +bool WW8Export::DisallowInheritingOutlineNumbering(const SwFormat &rFormat) { bool bRet( false ); @@ -742,11 +742,11 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt) //numbered, then in writer this is no inheritied, but in word it would //be, so we must export "no numbering" and "body level" to make word //behave like writer (see #i25755) - if (SfxItemState::SET != rFmt.GetItemState(RES_PARATR_NUMRULE, false)) + if (SfxItemState::SET != rFormat.GetItemState(RES_PARATR_NUMRULE, false)) { - if (const SwFmt *pParent = rFmt.DerivedFrom()) + if (const SwFormat *pParent = rFormat.DerivedFrom()) { - if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) + if (static_cast<const SwTextFormatColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle()) { if (bWrtWW8) { @@ -765,45 +765,45 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt) return bRet; } -void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpFmt, bool bFlyFmt ) +void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat ) { bool bCallOutSet = true; - const SwModify* pOldMod = m_pOutFmtNode; - m_pOutFmtNode = &rFmt; + const SwModify* pOldMod = m_pOutFormatNode; + m_pOutFormatNode = &rFormat; - switch( rFmt.Which() ) + switch( rFormat.Which() ) { case RES_CONDTXTFMTCOLL: case RES_TXTFMTCOLL: - if( bPapFmt ) + if( bPapFormat ) { int nLvl = MAXLEVEL; - if (static_cast<const SwTxtFmtColl&>(rFmt).IsAssignedToListLevelOfOutlineStyle()) - nLvl = static_cast<const SwTxtFmtColl&>(rFmt).GetAssignedOutlineStyleLevel(); + if (static_cast<const SwTextFormatColl&>(rFormat).IsAssignedToListLevelOfOutlineStyle()) + nLvl = static_cast<const SwTextFormatColl&>(rFormat).GetAssignedOutlineStyleLevel(); if (nLvl >= 0 && nLvl < MAXLEVEL) { //if outline numbered // if Write StyleDefinition then write the OutlineRule - const SwNumFmt& rNFmt = m_pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) ); + const SwNumFormat& rNFormat = m_pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) ); if ( m_bStyDef ) - AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt ); + AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFormat, rFormat ); - if ( rNFmt.GetPositionAndSpaceMode() == + if ( rNFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION && - rNFmt.GetAbsLSpace() ) + rNFormat.GetAbsLSpace() ) { - SfxItemSet aSet( rFmt.GetAttrSet() ); + SfxItemSet aSet( rFormat.GetAttrSet() ); SvxLRSpaceItem aLR( ItemGet<SvxLRSpaceItem>(aSet, RES_LR_SPACE)); - aLR.SetTxtLeft( aLR.GetTxtLeft() + rNFmt.GetAbsLSpace() ); - aLR.SetTxtFirstLineOfst( GetWordFirstLineOffset(rNFmt)); + aLR.SetTextLeft( aLR.GetTextLeft() + rNFormat.GetAbsLSpace() ); + aLR.SetTextFirstLineOfst( GetWordFirstLineOffset(rNFormat)); aSet.Put( aLR ); - CorrectTabStopInSet( aSet, rNFmt.GetAbsLSpace() ); - OutputItemSet( aSet, bPapFmt, bChpFmt, + CorrectTabStopInSet( aSet, rNFormat.GetAbsLSpace() ); + OutputItemSet( aSet, bPapFormat, bChpFormat, i18n::ScriptType::LATIN, m_bExportModeRTF); bCallOutSet = false; } @@ -815,13 +815,13 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF // #i77805# // If inherited outline numbering is suppress, the left/right // margins has to be exported explicitly. - if ( m_bStyDef && DisallowInheritingOutlineNumbering(rFmt) ) + if ( m_bStyDef && DisallowInheritingOutlineNumbering(rFormat) ) { - SfxItemSet aSet( rFmt.GetAttrSet() ); + SfxItemSet aSet( rFormat.GetAttrSet() ); SvxLRSpaceItem aLR( ItemGet<SvxLRSpaceItem>(aSet, RES_LR_SPACE)); aSet.Put( aLR ); - OutputItemSet( aSet, bPapFmt, bChpFmt, + OutputItemSet( aSet, bPapFormat, bChpFormat, com::sun::star::i18n::ScriptType::LATIN, m_bExportModeRTF); bCallOutSet = false; } @@ -832,35 +832,35 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF case RES_CHRFMT: break; case RES_FLYFRMFMT: - if (bFlyFmt) + if (bFlyFormat) { OSL_ENSURE(m_pParentFrame, "No parent frame, all broken"); if (m_pParentFrame) { - const SwFrmFmt &rFrmFmt = m_pParentFrame->GetFrmFmt(); + const SwFrameFormat &rFrameFormat = m_pParentFrame->GetFrameFormat(); SfxItemSet aSet(m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST, 0); - aSet.Set(rFrmFmt.GetAttrSet()); + aSet.Set(rFrameFormat.GetAttrSet()); // Fly als Zeichen werden bei uns zu Absatz-gebundenen // jetzt den Abstand vom Absatz-Rand setzen if (m_pFlyOffset) { - aSet.Put(SwFmtHoriOrient(m_pFlyOffset->X())); - aSet.Put(SwFmtVertOrient(m_pFlyOffset->Y())); - SwFmtAnchor aAnchor(rFrmFmt.GetAnchor()); + aSet.Put(SwFormatHoriOrient(m_pFlyOffset->X())); + aSet.Put(SwFormatVertOrient(m_pFlyOffset->Y())); + SwFormatAnchor aAnchor(rFrameFormat.GetAnchor()); aAnchor.SetType(m_eNewAnchorType); aSet.Put(aAnchor); } if (SfxItemState::SET != aSet.GetItemState(RES_SURROUND)) - aSet.Put(SwFmtSurround(SURROUND_NONE)); + aSet.Put(SwFormatSurround(SURROUND_NONE)); - const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrmFmt.GetAttrSet().GetItem(XATTR_FILLSTYLE))); + const XFillStyleItem* pXFillStyleItem(static_cast< const XFillStyleItem* >(rFrameFormat.GetAttrSet().GetItem(XATTR_FILLSTYLE))); if (pXFillStyleItem) { switch (pXFillStyleItem->GetValue()) @@ -870,7 +870,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF case drawing::FillStyle_SOLID: { // Construct an SvxBrushItem, as expected by the exporters. - aSet.Put(getSvxBrushItemFromSourceSet(rFrmFmt.GetAttrSet(), RES_BACKGROUND)); + aSet.Put(getSvxBrushItemFromSourceSet(rFrameFormat.GetAttrSet(), RES_BACKGROUND)); break; } default: @@ -896,33 +896,33 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF } if( bCallOutSet ) - OutputItemSet( rFmt.GetAttrSet(), bPapFmt, bChpFmt, + OutputItemSet( rFormat.GetAttrSet(), bPapFormat, bChpFormat, i18n::ScriptType::LATIN, m_bExportModeRTF); - m_pOutFmtNode = pOldMod; + m_pOutFormatNode = pOldMod; } bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ) { - SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD ); - SwIterator<SwFmtFld, SwFieldType> aFmtFlds( *pType ); - for ( SwFmtFld* pFmtFld = aFmtFlds.First(); pFmtFld; pFmtFld = aFmtFlds.Next() ) + SwFieldType* pType = m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( RES_GETREFFLD ); + SwIterator<SwFormatField, SwFieldType> aFormatFields( *pType ); + for ( SwFormatField* pFormatField = aFormatFields.First(); pFormatField; pFormatField = aFormatFields.Next() ) { - const SwTxtNode* pNd = pFmtFld->GetTxtFld()->GetpTxtNode(); - if ( pFmtFld->GetTxtFld() && nTyp == pFmtFld->GetField()->GetSubType() && + const SwTextNode* pNd = pFormatField->GetTextField()->GetpTextNode(); + if ( pFormatField->GetTextField() && nTyp == pFormatField->GetField()->GetSubType() && 0 != pNd && pNd->GetNodes().IsDocNodes() ) { - const SwGetRefField& rRFld = *static_cast< SwGetRefField* >( pFmtFld->GetField() ); + const SwGetRefField& rRField = *static_cast< SwGetRefField* >( pFormatField->GetField() ); switch ( nTyp ) { case REF_BOOKMARK: case REF_SETREFATTR: - if ( pName && *pName == rRFld.GetSetRefName() ) + if ( pName && *pName == rRField.GetSetRefName() ) return true; break; case REF_FOOTNOTE: case REF_ENDNOTE: - if ( nSeqNo == rRFld.GetSeqNo() ) + if ( nSeqNo == rRField.GetSeqNo() ) return true; break; case REF_SEQUENCEFLD: @@ -1015,7 +1015,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe void WW8AttributeOutput::StartRunProperties() { - WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc(); + WW8_WrPlcField* pCurrentFields = m_rWW8Export.CurrentFieldPlc(); m_nFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0; } @@ -1025,7 +1025,7 @@ void WW8AttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool /*bSi { const OUString &rComment = pRedlineData->GetComment(); //Only possible to export to main text - if (!rComment.isEmpty() && (m_rWW8Export.m_nTxtTyp == TXT_MAINTEXT)) + if (!rComment.isEmpty() && (m_rWW8Export.m_nTextTyp == TXT_MAINTEXT)) { if (m_rWW8Export.m_pAtn->IsNewRedlineComment(pRedlineData)) { @@ -1045,7 +1045,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData ) { Redline( pRedlineData ); - WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc(); + WW8_WrPlcField* pCurrentFields = m_rWW8Export.CurrentFieldPlc(); sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0; bool bExportedFieldResult = ( m_nFieldResults != nNewFieldResults ); @@ -1670,27 +1670,27 @@ void WW8AttributeOutput::CharBackground( const SvxBrushItem& rBrush ) } } -void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet ) +void WW8AttributeOutput::TextINetFormat( const SwFormatINetFormat& rINet ) { if ( !rINet.GetValue().isEmpty() ) { - const sal_uInt16 nId = rINet.GetINetFmtId(); - const OUString& rStr = rINet.GetINetFmt(); + const sal_uInt16 nId = rINet.GetINetFormatId(); + const OUString& rStr = rINet.GetINetFormat(); if (rStr.isEmpty()) { OSL_ENSURE( false, "WW8AttributeOutput::TextINetFormat(..) - missing unvisited character format at hyperlink attribute" ); } - const SwCharFmt* pFmt = IsPoolUserFmt( nId ) - ? m_rWW8Export.m_pDoc->FindCharFmtByName( rStr ) - : m_rWW8Export.m_pDoc->getIDocumentStylePoolAccess().GetCharFmtFromPool( nId ); + const SwCharFormat* pFormat = IsPoolUserFormat( nId ) + ? m_rWW8Export.m_pDoc->FindCharFormatByName( rStr ) + : m_rWW8Export.m_pDoc->getIDocumentStylePoolAccess().GetCharFormatFromPool( nId ); if ( m_rWW8Export.bWrtWW8 ) m_rWW8Export.InsUInt16( NS_sprm::LN_CIstd ); else m_rWW8Export.pO->push_back( 80 ); - m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pFmt ) ); + m_rWW8Export.InsUInt16( m_rWW8Export.GetId( pFormat ) ); } } @@ -1758,7 +1758,7 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c, rStrm.Seek( nCurrPos ); // write attributes of hyperlink character 0x01 - SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish ); + SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFieldVanish ); aItems.push_back( (sal_uInt8)0x81 ); SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation ); SwWW8Writer::InsUInt32( aItems, nLinkPosInDataStrm ); @@ -1785,81 +1785,81 @@ static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c, rWrt.m_pChpPlc->AppendFkpEntry(rWrt.Strm().Tell(), aItems.size(), aItems.data()); } -static OUString lcl_GetExpandedField(const SwField &rFld) +static OUString lcl_GetExpandedField(const SwField &rField) { - OUString sRet(rFld.ExpandField(true)); + OUString sRet(rField.ExpandField(true)); //replace LF 0x0A with VT 0x0B return sRet.replace(0x0A, 0x0B); } -WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const +WW8_WrPlcField* WW8Export::CurrentFieldPlc() const { - WW8_WrPlcFld* pFldP = NULL; - switch (m_nTxtTyp) + WW8_WrPlcField* pFieldP = NULL; + switch (m_nTextTyp) { case TXT_MAINTEXT: - pFldP = m_pFldMain; + pFieldP = m_pFieldMain; break; case TXT_HDFT: - pFldP = m_pFldHdFt; + pFieldP = m_pFieldHdFt; break; case TXT_FTN: - pFldP = m_pFldFtn; + pFieldP = m_pFieldFootnote; break; case TXT_EDN: - pFldP = m_pFldEdn; + pFieldP = m_pFieldEdn; break; case TXT_ATN: - pFldP = m_pFldAtn; + pFieldP = m_pFieldAtn; break; case TXT_TXTBOX: - pFldP = m_pFldTxtBxs; + pFieldP = m_pFieldTextBxs; break; case TXT_HFTXTBOX: - pFldP = m_pFldHFTxtBxs; + pFieldP = m_pFieldHFTextBxs; break; default: OSL_ENSURE( false, "was ist das fuer ein SubDoc-Type?" ); } - return pFldP; + return pFieldP; } -void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, - const OUString& rFldCmd, sal_uInt8 nMode ) +void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType, + const OUString& rFieldCmd, sal_uInt8 nMode ) { bool bUnicode = IsUnicode(); - WW8_WrPlcFld* pFldP = CurrentFieldPlc(); + WW8_WrPlcField* pFieldP = CurrentFieldPlc(); - const bool bIncludeEmptyPicLocation = ( eFldType == ww::ePAGE ); + const bool bIncludeEmptyPicLocation = ( eFieldType == ww::ePAGE ); if (WRITEFIELD_START & nMode) { - sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change + sal_uInt8 aField13[2] = { 0x13, 0x00 }; // will change //#i3958#, Needed to make this field work correctly in Word 2000 - if (eFldType == ww::eSHAPE) - aFld13[0] |= 0x80; - aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen - pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 ); + if (eFieldType == ww::eSHAPE) + aField13[0] |= 0x80; + aField13[1] = static_cast< sal_uInt8 >(eFieldType); // Typ nachtragen + pFieldP->Append( Fc2Cp( Strm().Tell() ), aField13 ); InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation ); } if (WRITEFIELD_CMD_START & nMode) { if (bUnicode) - SwWW8Writer::WriteString16(Strm(), rFldCmd, false); + SwWW8Writer::WriteString16(Strm(), rFieldCmd, false); else { - SwWW8Writer::WriteString8(Strm(), rFldCmd, false, + SwWW8Writer::WriteString8(Strm(), rFieldCmd, false, RTL_TEXTENCODING_MS_1252); } // #i43956# - write hyperlink character including // attributes and corresponding binary data for certain reference fields. bool bHandleBookmark = false; - if (pFld) + if (pField) { - if (pFld->GetTyp()->Which() == RES_GETREFFLD && - ( eFldType == ww::ePAGEREF || eFldType == ww::eREF || - eFldType == ww::eNOTEREF || eFldType == ww::eFOOTREF )) + if (pField->GetTyp()->Which() == RES_GETREFFLD && + ( eFieldType == ww::ePAGEREF || eFieldType == ww::eREF || + eFieldType == ww::eNOTEREF || eFieldType == ww::eFOOTREF )) bHandleBookmark = true; } @@ -1867,22 +1867,22 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, { // retrieve reference destination - the name of the bookmark OUString aLinkStr; - const sal_uInt16 nSubType = pFld->GetSubType(); - const SwGetRefField& rRFld = *(static_cast<const SwGetRefField*>(pFld)); + const sal_uInt16 nSubType = pField->GetSubType(); + const SwGetRefField& rRField = *(static_cast<const SwGetRefField*>(pField)); if ( nSubType == REF_SETREFATTR || nSubType == REF_BOOKMARK ) { - const OUString aRefName(rRFld.GetSetRefName()); + const OUString aRefName(rRField.GetSetRefName()); aLinkStr = GetBookmarkName( nSubType, &aRefName, 0 ); } else if ( nSubType == REF_FOOTNOTE || nSubType == REF_ENDNOTE ) { - aLinkStr = GetBookmarkName( nSubType, 0, rRFld.GetSeqNo() ); + aLinkStr = GetBookmarkName( nSubType, 0, rRField.GetSeqNo() ); } else if ( nSubType == REF_SEQUENCEFLD ) { - aLinkStr = pFld->GetPar2(); + aLinkStr = pField->GetPar2(); } // insert hyperlink character including attributes and data. InsertSpecialChar( *this, 0x01, &aLinkStr ); @@ -1890,18 +1890,18 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, } if (WRITEFIELD_CMD_END & nMode) { - static const sal_uInt8 aFld14[2] = { 0x14, 0xff }; - pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 ); - pFldP->ResultAdded(); + static const sal_uInt8 aField14[2] = { 0x14, 0xff }; + pFieldP->Append( Fc2Cp( Strm().Tell() ), aField14 ); + pFieldP->ResultAdded(); InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation ); } if (WRITEFIELD_END & nMode) { OUString sOut; - if( pFld ) - sOut = lcl_GetExpandedField(*pFld); + if( pField ) + sOut = lcl_GetExpandedField(*pField); else - sOut = rFldCmd; + sOut = rFieldCmd; if( !sOut.isEmpty() ) { if( bUnicode ) @@ -1912,10 +1912,10 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, RTL_TEXTENCODING_MS_1252); } - if (pFld) + if (pField) { - if (pFld->GetTyp()->Which() == RES_INPUTFLD && - eFldType == ww::eFORMTEXT) + if (pField->GetTyp()->Which() == RES_INPUTFLD && + eFieldType == ww::eFORMTEXT) { sal_uInt8 aArr[12]; sal_uInt8 *pArr = aArr; @@ -1946,21 +1946,21 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, } if (WRITEFIELD_CLOSE & nMode) { - sal_uInt8 aFld15[2] = { 0x15, 0x80 }; + sal_uInt8 aField15[2] = { 0x15, 0x80 }; - if (pFld) + if (pField) { - if (pFld->GetTyp()->Which() == RES_INPUTFLD && - eFldType == ww::eFORMTEXT) + if (pField->GetTyp()->Which() == RES_INPUTFLD && + eFieldType == ww::eFORMTEXT) { - sal_uInt16 nSubType = pFld->GetSubType(); + sal_uInt16 nSubType = pField->GetSubType(); if (nSubType == REF_SEQUENCEFLD) - aFld15[0] |= (0x4 << 5); + aField15[0] |= (0x4 << 5); } } - pFldP->Append( Fc2Cp( Strm().Tell() ), aFld15 ); + pFieldP->Append( Fc2Cp( Strm().Tell() ), aField15 ); InsertSpecialChar( *this, 0x15, 0, bIncludeEmptyPicLocation ); } } @@ -1994,7 +1994,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType ) // return values: 1 - no PageNum, // 2 - TabStop before PageNum, -// 3 - Text before PageNum - rTxt hold the text +// 3 - Text before PageNum - rText hold the text // 4 - no Text and no TabStop before PageNum static int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, OUString& rText ) { @@ -2099,7 +2099,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) sStr = FieldString(eCode); { - const SwFmtCol& rCol = static_cast<const SwFmtCol&>( rSect.GetFmt()->GetFmtAttr( RES_COL ) ); + const SwFormatCol& rCol = static_cast<const SwFormatCol&>( rSect.GetFormat()->GetFormatAttr( RES_COL ) ); const SwColumns& rColumns = rCol.GetColumns(); sal_Int32 nCol = rColumns.size(); @@ -2111,7 +2111,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) sal_uLong nRstLnNum = 0; SwSection *pParent = rSect.GetParent(); WW8_SepInfo rInfo(&GetExport( ).m_pDoc->GetPageDesc(0), - pParent ? pParent->GetFmt() : NULL, nRstLnNum); + pParent ? pParent->GetFormat() : NULL, nRstLnNum); GetExport( ).AttrOutput().SectionBreak( msword::PageBreak, &rInfo ); } @@ -2139,21 +2139,21 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if (!pTOX->GetTOXForm().IsCommaSeparated()) { // In case of Run-in style no separators are added. - OUString aFillTxt; + OUString aFillText; for (sal_uInt8 n = 1; n <= 3; ++n) { - OUString aTxt; - int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aTxt); + OUString aText; + int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aText); if( 3 == nRet ) - aFillTxt = aTxt; + aFillText = aText; else if ((4 == nRet) || (2 == nRet)) //#109414# - aFillTxt = "\t"; + aFillText = "\t"; else - aFillTxt.clear(); + aFillText.clear(); } sStr += "\\e \""; - sStr += aFillTxt; + sStr += aFillText; sStr += sEntryEnd; } break; @@ -2173,14 +2173,14 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) sStr += seqName; sStr += sEntryEnd; } - OUString aTxt; - int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(), 1, aTxt ); + OUString aText; + int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(), 1, aText ); if (1 == nRet) sStr += "\\n "; else if( 3 == nRet || 4 == nRet ) { sStr += "\\p \""; - sStr += aTxt; + sStr += aText; sStr += sEntryEnd; } } @@ -2257,11 +2257,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) // non-standard style for that level, i.e. ignore headline // styles 1-9 and find the lowest valid outline level sal_uInt8 nPosOfLowestNonStandardLvl = MAXLEVEL; - const SwTxtFmtColls& rColls = *GetExport().m_pDoc->GetTxtFmtColls(); + const SwTextFormatColls& rColls = *GetExport().m_pDoc->GetTextFormatColls(); for( n = rColls.size(); n; ) { - const SwTxtFmtColl* pColl = rColls[ --n ]; - sal_uInt16 nPoolId = pColl->GetPoolFmtId(); + const SwTextFormatColl* pColl = rColls[ --n ]; + sal_uInt16 nPoolId = pColl->GetPoolFormatId(); if ( //Is a Non-Standard Outline Style (RES_POOLCOLL_HEADLINE1 > nPoolId || RES_POOLCOLL_HEADLINE9 < nPoolId) && @@ -2296,7 +2296,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) // collect this templates into the \t otion for( n = rColls.size(); n;) { - const SwTxtFmtColl* pColl = rColls[ --n ]; + const SwTextFormatColl* pColl = rColls[ --n ]; if (!pColl->IsAssignedToListLevelOfOutlineStyle()) continue; sal_uInt8 nTestLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel()); @@ -2330,7 +2330,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) OUString sStyle( rStyles.getToken( 0, TOX_STYLE_DELIMITER, nPos )); if( !sStyle.isEmpty() ) { - SwTxtFmtColl* pColl = GetExport().m_pDoc->FindTxtFmtCollByName(sStyle); + SwTextFormatColl* pColl = GetExport().m_pDoc->FindTextFormatCollByName(sStyle); if (pColl) { if (!pColl->IsAssignedToListLevelOfOutlineStyle() || pColl->GetAssignedOutlineStyleLevel() < nTOXLvl) @@ -2348,14 +2348,14 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) // No 'else' branch; why the below snippet is a block I have no idea. { - OUString aFillTxt; + OUString aFillText; sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL; - bool bFirstFillTxt = true, bOnlyText = true; + bool bFirstFillText = true, bOnlyText = true; for( n = 0; n < nTOXLvl; ++n ) { - OUString aTxt; + OUString aText; int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(), - static_cast< sal_uInt8 >(n+1), aTxt ); + static_cast< sal_uInt8 >(n+1), aText ); if( 1 == nRet ) { bOnlyText = false; @@ -2371,11 +2371,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) bOnlyText = bOnlyText && 3 == nRet; if( 3 == nRet || 4 == nRet ) { - if( bFirstFillTxt ) - aFillTxt = aTxt; - else if( aFillTxt != aTxt ) - aFillTxt.clear(); - bFirstFillTxt = false; + if( bFirstFillText ) + aFillText = aText; + else if( aFillText != aText ) + aFillText.clear(); + bFirstFillText = false; } } } @@ -2392,7 +2392,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if( bOnlyText ) { sStr += "\\p \""; - sStr += aFillTxt; + sStr += aFillText; sStr += sEntryEnd; } } @@ -2432,14 +2432,14 @@ void AttributeOutputBase::EndTOX( const SwSection& rSect,bool bCareEnd ) if ( pTOX->GetType() == TOX_INDEX && GetExport().AddSectionBreaksForTOX() ) { - const SwFmtCol& rCol = static_cast<const SwFmtCol&>( rSect.GetFmt()->GetFmtAttr( RES_COL ) ); + const SwFormatCol& rCol = static_cast<const SwFormatCol&>( rSect.GetFormat()->GetFormatAttr( RES_COL ) ); const SwColumns& rColumns = rCol.GetColumns(); sal_Int32 nCol = rColumns.size(); if ( 0 < nCol ) { sal_uLong nRstLnNum = 0; - WW8_SepInfo rInfo( &GetExport( ).m_pDoc->GetPageDesc( 0 ), rSect.GetFmt() , nRstLnNum ); + WW8_SepInfo rInfo( &GetExport( ).m_pDoc->GetPageDesc( 0 ), rSect.GetFormat() , nRstLnNum ); GetExport( ).AttrOutput().SectionBreak( msword::PageBreak, &rInfo ); } } @@ -2449,36 +2449,36 @@ void AttributeOutputBase::EndTOX( const SwSection& rSect,bool bCareEnd ) OnTOXEnding(); } -bool MSWordExportBase::GetNumberFmt(const SwField& rFld, OUString& rStr) +bool MSWordExportBase::GetNumberFormat(const SwField& rField, OUString& rStr) { // Returns a date or time format string by using the US NfKeywordTable - bool bHasFmt = false; - SvNumberFormatter* pNFmtr = m_pDoc->GetNumberFormatter(); - sal_uInt32 nFmtIdx = rFld.GetFormat(); - const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx ); - if( pNumFmt ) - { - sal_uInt16 nLng = rFld.GetLanguage(); - LocaleDataWrapper aLocDat(pNFmtr->GetComponentContext(), + bool bHasFormat = false; + SvNumberFormatter* pNFormatr = m_pDoc->GetNumberFormatter(); + sal_uInt32 nFormatIdx = rField.GetFormat(); + const SvNumberformat* pNumFormat = pNFormatr->GetEntry( nFormatIdx ); + if( pNumFormat ) + { + sal_uInt16 nLng = rField.GetLanguage(); + LocaleDataWrapper aLocDat(pNFormatr->GetComponentContext(), LanguageTag(nLng)); - OUString sFmt(pNumFmt->GetMappedFormatstring(GetNfKeywordTable(), + OUString sFormat(pNumFormat->GetMappedFormatstring(GetNfKeywordTable(), aLocDat)); - if (!sFmt.isEmpty()) + if (!sFormat.isEmpty()) { - sw::ms::SwapQuotesInField(sFmt); + sw::ms::SwapQuotesInField(sFormat); - rStr = "\\@\"" + sFmt + "\" " ; - bHasFmt = true; + rStr = "\\@\"" + sFormat + "\" " ; + bHasFormat = true; } } - return bHasFmt; + return bHasFormat; } -void AttributeOutputBase::GetNumberPara( OUString& rStr, const SwField& rFld ) +void AttributeOutputBase::GetNumberPara( OUString& rStr, const SwField& rField ) { - switch(rFld.GetFormat()) + switch(rField.GetFormat()) { case SVX_NUM_CHARS_UPPER_LETTER: case SVX_NUM_CHARS_UPPER_LETTER_N: @@ -2495,7 +2495,7 @@ void AttributeOutputBase::GetNumberPara( OUString& rStr, const SwField& rFld ) rStr += "\\* roman "; break; default: - OSL_ENSURE(rFld.GetFormat() == SVX_NUM_ARABIC, + OSL_ENSURE(rField.GetFormat() == SVX_NUM_ARABIC, "Unknown numbering type exported as default of Arabic\n"); //fallthrough case SVX_NUM_ARABIC: @@ -2535,9 +2535,9 @@ OUString FieldString(ww::eField eIndex) return OUString(" "); } -void WW8AttributeOutput::HiddenField( const SwField& rFld ) +void WW8AttributeOutput::HiddenField( const SwField& rField ) { - OUString sExpand(rFld.GetPar2()); + OUString sExpand(rField.GetPar2()); //replace LF 0x0A with VT 0x0B sExpand = sExpand.replace(0x0A, 0x0B); @@ -2563,14 +2563,14 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld ) } } -void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) +void WW8AttributeOutput::SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) { - const SwSetExpField* pSet = static_cast<const SwSetExpField*>(&rFld); + const SwSetExpField* pSet = static_cast<const SwSetExpField*>(&rField); const OUString &rVar = pSet->GetPar2(); sal_uLong nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell()); - GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_START | + GetExport().OutputField(&rField, eType, rCmd, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END); /* @@ -2593,28 +2593,28 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const RTL_TEXTENCODING_MS_1252); } } - GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_CLOSE); + GetExport().OutputField(&rField, eType, rCmd, WRITEFIELD_CLOSE); } -void WW8AttributeOutput::PostitField( const SwField* pFld ) +void WW8AttributeOutput::PostitField( const SwField* pField ) { - const SwPostItField *pPFld = static_cast<const SwPostItField*>(pFld); - m_rWW8Export.m_pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pPFld ); + const SwPostItField *pPField = static_cast<const SwPostItField*>(pField); + m_rWW8Export.m_pAtn->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), pPField ); m_rWW8Export.WritePostItBegin( m_rWW8Export.pO ); } -bool WW8AttributeOutput::DropdownField( const SwField* pFld ) +bool WW8AttributeOutput::DropdownField( const SwField* pField ) { bool bExpand = true; if ( m_rWW8Export.bWrtWW8 ) { - const SwDropDownField& rFld2 = *static_cast<const SwDropDownField*>(pFld); + const SwDropDownField& rField2 = *static_cast<const SwDropDownField*>(pField); uno::Sequence<OUString> aItems = - rFld2.GetItemSequence(); - GetExport().DoComboBox(rFld2.GetName(), - rFld2.GetHelp(), - rFld2.GetToolTip(), - rFld2.GetSelectedItem(), aItems); + rField2.GetItemSequence(); + GetExport().DoComboBox(rField2.GetName(), + rField2.GetHelp(), + rField2.GetToolTip(), + rField2.GetSelectedItem(), aItems); bExpand = false; } return bExpand; @@ -2625,13 +2625,13 @@ bool WW8AttributeOutput::PlaceholderField( const SwField* ) return true; // expand to text? } -void WW8AttributeOutput::RefField( const SwField &rFld, const OUString &rRef) +void WW8AttributeOutput::RefField( const SwField &rField, const OUString &rRef) { OUString sStr( FieldString( ww::eREF ) ); sStr += "\"" + rRef + "\" "; - m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START | + m_rWW8Export.OutputField( &rField, ww::eREF, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); - OUString sVar = lcl_GetExpandedField( rFld ); + OUString sVar = lcl_GetExpandedField( rField ); if ( !sVar.isEmpty() ) { if ( m_rWW8Export.IsUnicode() ) @@ -2642,12 +2642,12 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const OUString &rRef) RTL_TEXTENCODING_MS_1252 ); } } - m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_CLOSE ); + m_rWW8Export.OutputField( &rField, ww::eREF, sStr, WRITEFIELD_CLOSE ); } -void WW8AttributeOutput::WriteExpand( const SwField* pFld ) +void WW8AttributeOutput::WriteExpand( const SwField* pField ) { - OUString sExpand( lcl_GetExpandedField( *pFld ) ); + OUString sExpand( lcl_GetExpandedField( *pField ) ); if ( m_rWW8Export.IsUnicode() ) SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false ); else @@ -2657,18 +2657,18 @@ void WW8AttributeOutput::WriteExpand( const SwField* pFld ) } } -void AttributeOutputBase::TextField( const SwFmtFld& rField ) +void AttributeOutputBase::TextField( const SwFormatField& rField ) { - const SwField* pFld = rField.GetField(); + const SwField* pField = rField.GetField(); bool bWriteExpand = false; - const sal_uInt16 nSubType = pFld->GetSubType(); + const sal_uInt16 nSubType = pField->GetSubType(); - switch (pFld->GetTyp()->Which()) + switch (pField->GetTyp()->Which()) { case RES_GETEXPFLD: if (nSubType == nsSwGetSetExpType::GSE_STRING) { - const SwGetExpField *pGet = static_cast<const SwGetExpField*>(pFld); + const SwGetExpField *pGet = static_cast<const SwGetExpField*>(pField); RefField( *pGet, pGet->GetFormula() ); } else @@ -2679,17 +2679,17 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) { OUString sStr; if (GetExport().FieldsQuoted()) - sStr = FieldString(ww::eSEQ) + pFld->GetTyp()->GetName() + " "; + sStr = FieldString(ww::eSEQ) + pField->GetTyp()->GetName() + " "; else - sStr = FieldString(ww::eSEQ) + "\"" + pFld->GetTyp()->GetName() +"\" "; - GetNumberPara( sStr, *pFld ); - GetExport().OutputField(pFld, ww::eSEQ, sStr); + sStr = FieldString(ww::eSEQ) + "\"" + pField->GetTyp()->GetName() +"\" "; + GetNumberPara( sStr, *pField ); + GetExport().OutputField(pField, ww::eSEQ, sStr); } else if (nSubType & nsSwGetSetExpType::GSE_STRING) { bool bShowAsWell = false; ww::eField eFieldNo; - const SwSetExpField *pSet = static_cast<const SwSetExpField*>(pFld); + const SwSetExpField *pSet = static_cast<const SwSetExpField*>(pField); const OUString sVar = pSet->GetPar2(); OUString sStr; if (pSet->GetInputFlag()) @@ -2709,7 +2709,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) bShowAsWell = (nSubType & nsSwExtendedSubType::SUB_INVISIBLE) == 0; } - SetField( *pFld, eFieldNo, sStr ); + SetField( *pField, eFieldNo, sStr ); if (bShowAsWell) RefField( *pSet, pSet->GetPar1() ); @@ -2720,16 +2720,16 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) case RES_PAGENUMBERFLD: { OUString sStr = FieldString(ww::ePAGE); - GetNumberPara(sStr, *pFld); - GetExport().OutputField(pFld, ww::ePAGE, sStr); + GetNumberPara(sStr, *pField); + GetExport().OutputField(pField, ww::ePAGE, sStr); } break; case RES_FILENAMEFLD: { OUString sStr = FieldString(ww::eFILENAME); - if (pFld->GetFormat() == FF_PATHNAME) + if (pField->GetFormat() == FF_PATHNAME) sStr += "\\p "; - GetExport().OutputField(pFld, ww::eFILENAME, sStr); + GetExport().OutputField(pField, ww::eFILENAME, sStr); } break; case RES_DBNAMEFLD: @@ -2739,18 +2739,18 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) + aData.sDataSource + OUString(DB_DELIM) + aData.sCommand; - GetExport().OutputField(pFld, ww::eDATABASE, sStr); + GetExport().OutputField(pField, ww::eDATABASE, sStr); } break; case RES_AUTHORFLD: { - ww::eField eFld = - (AF_SHORTCUT & pFld->GetFormat() ? ww::eUSERINITIALS : ww::eUSERNAME); - GetExport().OutputField(pFld, eFld, FieldString(eFld)); + ww::eField eField = + (AF_SHORTCUT & pField->GetFormat() ? ww::eUSERINITIALS : ww::eUSERNAME); + GetExport().OutputField(pField, eField, FieldString(eField)); } break; case RES_TEMPLNAMEFLD: - GetExport().OutputField(pFld, ww::eTEMPLATE, FieldString(ww::eTEMPLATE)); + GetExport().OutputField(pField, ww::eTEMPLATE, FieldString(ww::eTEMPLATE)); break; case RES_DOCINFOFLD: // Last printed, last edited,... if( DI_SUB_FIXED & nSubType ) @@ -2758,56 +2758,56 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) else { OUString sStr; - ww::eField eFld(ww::eNONE); + ww::eField eField(ww::eNONE); switch (0xff & nSubType) { case DI_TITEL: - eFld = ww::eTITLE; + eField = ww::eTITLE; break; case DI_THEMA: - eFld = ww::eSUBJECT; + eField = ww::eSUBJECT; break; case DI_KEYS: - eFld = ww::eKEYWORDS; + eField = ww::eKEYWORDS; break; case DI_COMMENT: - eFld = ww::eCOMMENTS; + eField = ww::eCOMMENTS; break; case DI_DOCNO: - eFld = ww::eREVNUM; + eField = ww::eREVNUM; break; case DI_CREATE: if (DI_SUB_AUTHOR == (nSubType & DI_SUB_MASK)) - eFld = ww::eAUTHOR; - else if (GetExport().GetNumberFmt(*pFld, sStr)) - eFld = ww::eCREATEDATE; + eField = ww::eAUTHOR; + else if (GetExport().GetNumberFormat(*pField, sStr)) + eField = ww::eCREATEDATE; break; case DI_CHANGE: if (DI_SUB_AUTHOR == (nSubType & DI_SUB_MASK)) - eFld = ww::eLASTSAVEDBY; - else if (GetExport().GetNumberFmt(*pFld, sStr)) - eFld = ww::eSAVEDATE; + eField = ww::eLASTSAVEDBY; + else if (GetExport().GetNumberFormat(*pField, sStr)) + eField = ww::eSAVEDATE; break; case DI_PRINT: if (DI_SUB_AUTHOR != (nSubType & DI_SUB_MASK) && - GetExport().GetNumberFmt(*pFld, sStr)) - eFld = ww::ePRINTDATE; + GetExport().GetNumberFormat(*pField, sStr)) + eField = ww::ePRINTDATE; break; case DI_EDIT: if( DI_SUB_AUTHOR != (nSubType & DI_SUB_MASK ) && - GetExport().GetNumberFmt( *pFld, sStr )) - eFld = ww::eSAVEDATE; + GetExport().GetNumberFormat( *pField, sStr )) + eField = ww::eSAVEDATE; else - eFld = ww::eEDITTIME; + eField = ww::eEDITTIME; break; case DI_CUSTOM: - eFld = ww::eDOCPROPERTY; + eField = ww::eDOCPROPERTY; { OUString sQuotes('\"'); const SwDocInfoField * pDocInfoField = - dynamic_cast<const SwDocInfoField *> (pFld); + dynamic_cast<const SwDocInfoField *> (pField); if (pDocInfoField != NULL) { @@ -2825,9 +2825,9 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; } - if (eFld != ww::eNONE) + if (eField != ww::eNONE) { - GetExport().OutputField(pFld, eFld, FieldString(eFld) + sStr); + GetExport().OutputField(pField, eField, FieldString(eField) + sStr); } else bWriteExpand = true; @@ -2836,37 +2836,37 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) case RES_DATETIMEFLD: { OUString sStr; - if (!GetExport().GetNumberFmt(*pFld, sStr)) + if (!GetExport().GetNumberFormat(*pField, sStr)) bWriteExpand = true; else { - ww::eField eFld = (DATEFLD & nSubType) ? ww::eDATE : ww::eTIME; - GetExport().OutputField(pFld, eFld, FieldString(eFld) + sStr); + ww::eField eField = (DATEFLD & nSubType) ? ww::eDATE : ww::eTIME; + GetExport().OutputField(pField, eField, FieldString(eField) + sStr); } } break; case RES_DOCSTATFLD: { - ww::eField eFld = ww::eNONE; + ww::eField eField = ww::eNONE; switch (nSubType) { case DS_PAGE: - eFld = ww::eNUMPAGE; + eField = ww::eNUMPAGE; break; case DS_WORD: - eFld = ww::eNUMWORDS; + eField = ww::eNUMWORDS; break; case DS_CHAR: - eFld = ww::eNUMCHARS; + eField = ww::eNUMCHARS; break; } - if (eFld != ww::eNONE) + if (eField != ww::eNONE) { - OUString sStr = FieldString(eFld); - GetNumberPara(sStr, *pFld); - GetExport().OutputField(pFld, eFld, sStr); + OUString sStr = FieldString(eField); + GetNumberPara(sStr, *pField); + GetExport().OutputField(pField, eField, sStr); } else bWriteExpand = true; @@ -2874,27 +2874,27 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; case RES_EXTUSERFLD: { - ww::eField eFld = ww::eNONE; + ww::eField eField = ww::eNONE; switch (0xFF & nSubType) { case EU_FIRSTNAME: case EU_NAME: - eFld = ww::eUSERNAME; + eField = ww::eUSERNAME; break; case EU_SHORTCUT: - eFld = ww::eUSERINITIALS; + eField = ww::eUSERINITIALS; break; case EU_STREET: case EU_COUNTRY: case EU_ZIP: case EU_CITY: - eFld = ww::eUSERADDRESS; + eField = ww::eUSERADDRESS; break; } - if (eFld != ww::eNONE) + if (eField != ww::eNONE) { - GetExport().OutputField(pFld, eFld, FieldString(eFld)); + GetExport().OutputField(pField, eField, FieldString(eField)); } else bWriteExpand = true; @@ -2902,57 +2902,57 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; case RES_AUTHORITY: { - OUString sRet(pFld->ExpandCitation(AUTH_FIELD_IDENTIFIER)); - GetExport().OutputField( pFld, ww::eCITATION, sRet ); + OUString sRet(pField->ExpandCitation(AUTH_FIELD_IDENTIFIER)); + GetExport().OutputField( pField, ww::eCITATION, sRet ); } break; case RES_POSTITFLD: //Sadly only possible for word in main document text - if (GetExport().m_nTxtTyp == TXT_MAINTEXT) + if (GetExport().m_nTextTyp == TXT_MAINTEXT) { - PostitField( pFld ); + PostitField( pField ); } break; case RES_INPUTFLD: { - const SwInputField * pInputField = dynamic_cast<const SwInputField *>(pFld); + const SwInputField * pInputField = dynamic_cast<const SwInputField *>(pField); if (pInputField && pInputField->isFormField()) GetExport().DoFormText(pInputField); else { const OUString sStr = FieldString(ww::eFILLIN) + "\"" - + pFld->GetPar2() + "\""; + + pField->GetPar2() + "\""; - GetExport().OutputField(pFld, ww::eFILLIN, sStr); + GetExport().OutputField(pField, ww::eFILLIN, sStr); } } break; case RES_GETREFFLD: { - ww::eField eFld = ww::eNONE; + ww::eField eField = ww::eNONE; OUString sStr; - const SwGetRefField& rRFld = *static_cast<const SwGetRefField*>(pFld); + const SwGetRefField& rRField = *static_cast<const SwGetRefField*>(pField); switch (nSubType) { case REF_SETREFATTR: case REF_BOOKMARK: - switch (pFld->GetFormat()) + switch (pField->GetFormat()) { case REF_PAGE_PGDESC: case REF_PAGE: - eFld = ww::ePAGEREF; + eField = ww::ePAGEREF; break; default: - eFld = ww::eREF; + eField = ww::eREF; break; } { - const OUString aRefName(rRFld.GetSetRefName()); - sStr = FieldString(eFld) + const OUString aRefName(rRField.GetSetRefName()); + sStr = FieldString(eField) + MSWordExportBase::GetBookmarkName(nSubType, &aRefName, 0); } - switch (pFld->GetFormat()) + switch (pField->GetFormat()) { case REF_NUMBER: sStr += " \\r"; @@ -2967,28 +2967,28 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; case REF_FOOTNOTE: case REF_ENDNOTE: - switch (pFld->GetFormat()) + switch (pField->GetFormat()) { case REF_PAGE_PGDESC: case REF_PAGE: - eFld = ww::ePAGEREF; + eField = ww::ePAGEREF; break; case REF_UPDOWN: - eFld = ww::eREF; + eField = ww::eREF; break; default: - eFld = + eField = REF_ENDNOTE == nSubType ? ww::eNOTEREF : ww::eFOOTREF; break; } - sStr = FieldString(eFld) - + MSWordExportBase::GetBookmarkName(nSubType, 0, rRFld.GetSeqNo()); + sStr = FieldString(eField) + + MSWordExportBase::GetBookmarkName(nSubType, 0, rRField.GetSeqNo()); break; } - if (eFld != ww::eNONE) + if (eField != ww::eNONE) { - switch (pFld->GetFormat()) + switch (pField->GetFormat()) { case REF_UPDOWN: sStr += " \\p \\h "; // with hyperlink @@ -3000,7 +3000,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) sStr += " \\h "; // insert hyperlink break; } - GetExport().OutputField(pFld, eFld, sStr); + GetExport().OutputField(pField, eField, sStr); } else bWriteExpand = true; @@ -3023,7 +3023,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) */ sal_uInt16 nScript; if( g_pBreakIt->GetBreakIter().is() ) - nScript = g_pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0); + nScript = g_pBreakIt->GetBreakIter()->getScriptType( pField->GetPar1(), 0); else nScript = i18n::ScriptType::ASIAN; @@ -3037,37 +3037,37 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) font size and fill in the defaults as up == half the font size and down == a fifth the font size */ - const sal_Int32 nAbove = (pFld->GetPar1().getLength()+1)/2; + const sal_Int32 nAbove = (pField->GetPar1().getLength()+1)/2; const OUString sStr = FieldString(ww::eEQ) + "\\o (\\s\\up " + OUString::number(nHeight/2) + "(" - + pFld->GetPar1().copy(0, nAbove) + + pField->GetPar1().copy(0, nAbove) + "), \\s\\do " + OUString::number(nHeight/5) + "(" - + pFld->GetPar1().copy(nAbove) + + pField->GetPar1().copy(nAbove) + "))"; - GetExport().OutputField(pFld, ww::eEQ, sStr); + GetExport().OutputField(pField, ww::eEQ, sStr); } break; case RES_DROPDOWN: - bWriteExpand = DropdownField( pFld ); + bWriteExpand = DropdownField( pField ); break; case RES_CHAPTERFLD: bWriteExpand = true; - if (GetExport().m_bOutKF && rField.GetTxtFld()) + if (GetExport().m_bOutKF && rField.GetTextField()) { - const SwTxtNode *pTxtNd = GetExport().GetHdFtPageRoot(); - if (!pTxtNd) + const SwTextNode *pTextNd = GetExport().GetHdFtPageRoot(); + if (!pTextNd) { - pTxtNd = GetExport().m_pCurPam->GetNode().GetTxtNode(); + pTextNd = GetExport().m_pCurPam->GetNode().GetTextNode(); } - if (pTxtNd) + if (pTextNd) { - SwChapterField aCopy(*static_cast<const SwChapterField*>(pFld)); - aCopy.ChangeExpansion(*pTxtNd, false); + SwChapterField aCopy(*static_cast<const SwChapterField*>(pField)); + aCopy.ChangeExpansion(*pTextNd, false); WriteExpand( &aCopy ); bWriteExpand = false; } @@ -3075,23 +3075,23 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; case RES_HIDDENTXTFLD: { - OUString sExpand(pFld->GetPar2()); + OUString sExpand(pField->GetPar2()); if (!sExpand.isEmpty()) { - HiddenField( *pFld ); + HiddenField( *pField ); } } break; case RES_JUMPEDITFLD: - bWriteExpand = PlaceholderField( pFld ); + bWriteExpand = PlaceholderField( pField ); break; case RES_MACROFLD: { const OUString sStr = " MACROBUTTON" - + pFld->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", " ") + + pField->GetPar1().replaceFirst("StarOffice.Standard.Modul1.", " ") + " " - + lcl_GetExpandedField(*pFld); - GetExport().OutputField( pFld, ww::eMACROBUTTON, sStr ); + + lcl_GetExpandedField(*pField); + GetExport().OutputField( pField, ww::eMACROBUTTON, sStr ); } break; default: @@ -3100,20 +3100,20 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) } if (bWriteExpand) - WriteExpand( pFld ); + WriteExpand( pField ); } -void AttributeOutputBase::TextFlyContent( const SwFmtFlyCnt& rFlyContent ) +void AttributeOutputBase::TextFlyContent( const SwFormatFlyCnt& rFlyContent ) { - if ( GetExport().m_pOutFmtNode && GetExport().m_pOutFmtNode->ISA( SwCntntNode ) ) + if ( GetExport().m_pOutFormatNode && GetExport().m_pOutFormatNode->ISA( SwContentNode ) ) { - const SwTxtNode* pTxtNd = static_cast<const SwTxtNode*>(GetExport().m_pOutFmtNode); + const SwTextNode* pTextNd = static_cast<const SwTextNode*>(GetExport().m_pOutFormatNode); Point aLayPos; - aLayPos = pTxtNd->FindLayoutRect( false, &aLayPos ).Pos(); + aLayPos = pTextNd->FindLayoutRect( false, &aLayPos ).Pos(); - SwPosition aPos( *pTxtNd ); - sw::Frame aFrm( *rFlyContent.GetFrmFmt(), aPos ); + SwPosition aPos( *pTextNd ); + sw::Frame aFrm( *rFlyContent.GetFrameFormat(), aPos ); OutputFlyFrame_Impl( aFrm, aLayPos ); } @@ -3215,10 +3215,10 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) // RefMark, NoLineBreakHere fehlen noch -void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) +void WW8Export::WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pOutArr ) { ww::bytes aAttrArr; - const bool bAutoNum = rFtn.GetNumStr().isEmpty(); // Auto-Nummer + const bool bAutoNum = rFootnote.GetNumStr().isEmpty(); // Auto-Nummer if( bAutoNum ) { if( bWrtWW8 ) @@ -3245,18 +3245,18 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) // sprmCIstd const SwEndNoteInfo* pInfo; - if( rFtn.IsEndNote() ) + if( rFootnote.IsEndNote() ) pInfo = &m_pDoc->GetEndNoteInfo(); else - pInfo = &m_pDoc->GetFtnInfo(); - const SwCharFmt* pCFmt = pOutArr - ? pInfo->GetAnchorCharFmt( *m_pDoc ) - : pInfo->GetCharFmt( *m_pDoc ); + pInfo = &m_pDoc->GetFootnoteInfo(); + const SwCharFormat* pCFormat = pOutArr + ? pInfo->GetAnchorCharFormat( *m_pDoc ) + : pInfo->GetCharFormat( *m_pDoc ); if( bWrtWW8 ) SwWW8Writer::InsUInt16( aAttrArr, NS_sprm::LN_CIstd ); else aAttrArr.push_back( 80 ); - SwWW8Writer::InsUInt16( aAttrArr, GetId( pCFmt ) ); + SwWW8Writer::InsUInt16( aAttrArr, GetId( pCFormat ) ); // fSpec-Attribut true // Fuer Auto-Nummer muss ein Spezial-Zeichen @@ -3266,7 +3266,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) WriteChar( 0x02 ); // Auto-Nummer-Zeichen else // User-Nummerierung - OutSwString( rFtn.GetNumStr(), 0, rFtn.GetNumStr().getLength(), + OutSwString( rFootnote.GetNumStr(), 0, rFootnote.GetNumStr().getLength(), IsUnicode(), RTL_TEXTENCODING_MS_1252 ); if( pOutArr ) @@ -3284,19 +3284,19 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) aOutArr.insert( aOutArr.begin(), aAttrArr.begin(), aAttrArr.end() ); // write for the ftn number in the content, the font of the anchor - const SwTxtFtn* pTxtFtn = rFtn.GetTxtFtn(); - if( pTxtFtn ) + const SwTextFootnote* pTextFootnote = rFootnote.GetTextFootnote(); + if( pTextFootnote ) { ww::bytes* pOld = pO; pO = &aOutArr; SfxItemSet aSet( m_pDoc->GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); - pCFmt = pInfo->GetCharFmt( *m_pDoc ); - aSet.Set( pCFmt->GetAttrSet() ); + pCFormat = pInfo->GetCharFormat( *m_pDoc ); + aSet.Set( pCFormat->GetAttrSet() ); - pTxtFtn->GetTxtNode().GetAttr( aSet, pTxtFtn->GetStart(), - (pTxtFtn->GetStart()) + 1 ); + pTextFootnote->GetTextNode().GetAttr( aSet, pTextFootnote->GetStart(), + (pTextFootnote->GetStart()) + 1 ); m_pAttrOutput->OutputItem( aSet.Get( RES_CHRATR_FONT ) ); pO = pOld; } @@ -3305,18 +3305,18 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, ww::bytes* pOutArr ) } } -static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn) +static bool lcl_IsAtTextEnd(const SwFormatFootnote& rFootnote) { bool bRet = true; - if( rFtn.GetTxtFtn() ) + if( rFootnote.GetTextFootnote() ) { - sal_uInt16 nWh = static_cast< sal_uInt16 >(rFtn.IsEndNote() ? RES_END_AT_TXTEND + sal_uInt16 nWh = static_cast< sal_uInt16 >(rFootnote.IsEndNote() ? RES_END_AT_TXTEND : RES_FTN_AT_TXTEND); - const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode(). + const SwSectionNode* pSectNd = rFootnote.GetTextFootnote()->GetTextNode(). FindSectionNode(); while( pSectNd && FTNEND_ATPGORDOCEND == - static_cast<const SwFmtFtnEndAtTxtEnd&>(pSectNd->GetSection().GetFmt()-> - GetFmtAttr( nWh, true)).GetValue() ) + static_cast<const SwFormatFootnoteEndAtTextEnd&>(pSectNd->GetSection().GetFormat()-> + GetFormatAttr( nWh, true)).GetValue() ) pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode(); if (!pSectNd) @@ -3325,60 +3325,60 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn) return bRet; } -void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn ) +void AttributeOutputBase::TextFootnote( const SwFormatFootnote& rFootnote ) { sal_uInt16 nTyp; - if ( rFtn.IsEndNote() ) + if ( rFootnote.IsEndNote() ) { nTyp = REF_ENDNOTE; - if ( GetExport().m_bEndAtTxtEnd ) - GetExport().m_bEndAtTxtEnd = lcl_IsAtTxtEnd( rFtn ); + if ( GetExport().m_bEndAtTextEnd ) + GetExport().m_bEndAtTextEnd = lcl_IsAtTextEnd( rFootnote ); } else { nTyp = REF_FOOTNOTE; - if ( GetExport().m_bFtnAtTxtEnd ) - GetExport().m_bFtnAtTxtEnd = lcl_IsAtTxtEnd( rFtn ); + if ( GetExport().m_bFootnoteAtTextEnd ) + GetExport().m_bFootnoteAtTextEnd = lcl_IsAtTextEnd( rFootnote ); } // if any reference to this footnote/endnote then insert an internal // Bookmark. OUString sBkmkNm; - if ( GetExport().HasRefToObject( nTyp, 0, rFtn.GetTxtFtn()->GetSeqRefNo() )) + if ( GetExport().HasRefToObject( nTyp, 0, rFootnote.GetTextFootnote()->GetSeqRefNo() )) { sBkmkNm = MSWordExportBase::GetBookmarkName( nTyp, 0, - rFtn.GetTxtFtn()->GetSeqRefNo() ); + rFootnote.GetTextFootnote()->GetSeqRefNo() ); GetExport().AppendBookmark( sBkmkNm ); } - TextFootnote_Impl( rFtn ); + TextFootnote_Impl( rFootnote ); if ( !sBkmkNm.isEmpty() ) GetExport().AppendBookmark( sBkmkNm ); // FIXME: Why is it added twice? Shouldn't this one go to WW8AttributeOuput::TextFootnote_Impl()? } -void WW8AttributeOutput::TextFootnote_Impl( const SwFmtFtn& rFtn ) +void WW8AttributeOutput::TextFootnote_Impl( const SwFormatFootnote& rFootnote ) { - WW8_WrPlcFtnEdn* pFtnEnd; - if ( rFtn.IsEndNote() ) - pFtnEnd = m_rWW8Export.pEdn; + WW8_WrPlcFootnoteEdn* pFootnoteEnd; + if ( rFootnote.IsEndNote() ) + pFootnoteEnd = m_rWW8Export.pEdn; else - pFtnEnd = m_rWW8Export.pFtn; + pFootnoteEnd = m_rWW8Export.pFootnote; - pFtnEnd->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), rFtn ); - m_rWW8Export.WriteFtnBegin( rFtn, m_rWW8Export.pO ); + pFootnoteEnd->Append( m_rWW8Export.Fc2Cp( m_rWW8Export.Strm().Tell() ), rFootnote ); + m_rWW8Export.WriteFootnoteBegin( rFootnote, m_rWW8Export.pO ); } -void WW8AttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt ) +void WW8AttributeOutput::TextCharFormat( const SwFormatCharFormat& rCharFormat ) { - if( rCharFmt.GetCharFmt() ) + if( rCharFormat.GetCharFormat() ) { if( m_rWW8Export.bWrtWW8 ) m_rWW8Export.InsUInt16( NS_sprm::LN_CIstd ); else m_rWW8Export.pO->push_back( 80 ); - m_rWW8Export.InsUInt16( m_rWW8Export.GetId( rCharFmt.GetCharFmt() ) ); + m_rWW8Export.InsUInt16( m_rWW8Export.GetId( rCharFormat.GetCharFormat() ) ); } } @@ -3434,7 +3434,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines ) void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) { - const SwTxtNode* pTxtNd = 0; + const SwTextNode* pTextNd = 0; sal_uInt16 nNumId; sal_uInt8 nLvl = 0; if (!rNumRule.GetValue().isEmpty()) @@ -3444,15 +3444,15 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) if ( pRule && USHRT_MAX != ( nNumId = GetExport().GetId( *pRule ) ) ) { ++nNumId; - if ( GetExport().m_pOutFmtNode ) + if ( GetExport().m_pOutFormatNode ) { - if ( GetExport().m_pOutFmtNode->ISA( SwCntntNode ) ) + if ( GetExport().m_pOutFormatNode->ISA( SwContentNode ) ) { - pTxtNd = static_cast<const SwTxtNode*>(GetExport().m_pOutFmtNode); + pTextNd = static_cast<const SwTextNode*>(GetExport().m_pOutFormatNode); - if( pTxtNd->IsCountedInList()) + if( pTextNd->IsCountedInList()) { - int nLevel = pTxtNd->GetActualListLevel(); + int nLevel = pTextNd->GetActualListLevel(); if (nLevel < 0) nLevel = 0; @@ -3462,9 +3462,9 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) nLvl = static_cast< sal_uInt8 >(nLevel); - if ( pTxtNd->IsListRestart() ) + if ( pTextNd->IsListRestart() ) { - sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTxtNd->GetActualListStartValue() ); + sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTextNd->GetActualListStartValue() ); nNumId = GetExport().DuplicateNumRule( pRule, nLvl, nStartWith ); if ( USHRT_MAX != nNumId ) ++nNumId; @@ -3479,9 +3479,9 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) nNumId = 0; } } - else if ( GetExport().m_pOutFmtNode->ISA( SwTxtFmtColl ) ) + else if ( GetExport().m_pOutFormatNode->ISA( SwTextFormatColl ) ) { - const SwTxtFmtColl* pC = static_cast<const SwTxtFmtColl*>(GetExport().m_pOutFmtNode); + const SwTextFormatColl* pC = static_cast<const SwTextFormatColl*>(GetExport().m_pOutFormatNode); if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() ) nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() ); } @@ -3498,11 +3498,11 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule ) if ( nLvl >= WW8ListManager::nMaxLevel ) nLvl = WW8ListManager::nMaxLevel - 1; - ParaNumRule_Impl( pTxtNd, nLvl, nNumId ); + ParaNumRule_Impl( pTextNd, nLvl, nNumId ); } } -void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) +void WW8AttributeOutput::ParaNumRule_Impl( const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) { if ( m_rWW8Export.bWrtWW8 ) { @@ -3512,13 +3512,13 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo ); SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) ); } - else if ( pTxtNd && m_rWW8Export.Out_SwNum( pTxtNd ) ) // NumRules - m_rWW8Export.pSepx->SetNum( pTxtNd ); + else if ( pTextNd && m_rWW8Export.Out_SwNum( pTextNd ) ) // NumRules + m_rWW8Export.pSepx->SetNum( pTextNd ); } /* File FRMATR.HXX */ -void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize ) +void WW8AttributeOutput::FormatFrameSize( const SwFormatFrmSize& rSize ) { if( m_rWW8Export.m_bOutFlyFrmAttrs ) // Flys { @@ -3678,13 +3678,13 @@ void WW8AttributeOutput::TableRowEnd(sal_uInt32 nDepth) //pMagicTable->Append(Fc2Cp(Strm().Tell()),0x1B6); } -void AttributeOutputBase::FormatPageDescription( const SwFmtPageDesc& rPageDesc ) +void AttributeOutputBase::FormatPageDescription( const SwFormatPageDesc& rPageDesc ) { - if ( GetExport().m_bStyDef && GetExport().m_pOutFmtNode && GetExport().m_pOutFmtNode->ISA( SwTxtFmtColl ) ) + if ( GetExport().m_bStyDef && GetExport().m_pOutFormatNode && GetExport().m_pOutFormatNode->ISA( SwTextFormatColl ) ) { - const SwTxtFmtColl* pC = static_cast<const SwTxtFmtColl*>(GetExport().m_pOutFmtNode); + const SwTextFormatColl* pC = static_cast<const SwTextFormatColl*>(GetExport().m_pOutFormatNode); if ( (SfxItemState::SET != pC->GetItemState( RES_BREAK, false ) ) && rPageDesc.KnowsPageDesc() ) - FormatBreak( SvxFmtBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); + FormatBreak( SvxFormatBreakItem( SVX_BREAK_PAGE_BEFORE, RES_BREAK ) ); } } @@ -3702,7 +3702,7 @@ void WW8AttributeOutput::PageBreakBefore( bool bBreak ) // Breaks schreiben nichts in das Ausgabe-Feld rWrt.pO, // sondern nur in den Text-Stream ( Bedingung dafuer, dass sie von Out_Break... // gerufen werden duerfen ) -void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak ) +void AttributeOutputBase::FormatBreak( const SvxFormatBreakItem& rBreak ) { if ( GetExport().m_bStyDef ) { @@ -3758,7 +3758,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak ) nC = msword::PageBreak; // #i76300# - check for follow page description, // if current writing attributes of a paragraph. - if ( dynamic_cast< const SwTxtNode* >( GetExport().m_pOutFmtNode ) && + if ( dynamic_cast< const SwTextNode* >( GetExport().m_pOutFormatNode ) && GetExport().GetCurItemSet() ) { bCheckForFollowPageDesc = true; @@ -3778,7 +3778,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak ) { bFollowPageDescWritten = GetExport().OutputFollowPageDesc( GetExport().GetCurItemSet(), - dynamic_cast<const SwTxtNode*>( GetExport().m_pOutFmtNode ) ); + dynamic_cast<const SwTextNode*>( GetExport().m_pOutFormatNode ) ); } if ( !bFollowPageDescWritten ) { @@ -3796,14 +3796,14 @@ void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSecti sal_uInt32 AttributeOutputBase::GridCharacterPitch( const SwTextGridItem& rGrid ) const { MSWordStyles * pStyles = GetExport().m_pStyles; - const SwFmt * pSwFmt = pStyles->GetSwFmt(0); + const SwFormat * pSwFormat = pStyles->GetSwFormat(0); sal_uInt32 nPageCharSize = 0; - if (pSwFmt != NULL) + if (pSwFormat != NULL) { nPageCharSize = ItemGet<SvxFontHeightItem> - (*pSwFmt, RES_CHRATR_FONTSIZE).GetHeight(); + (*pSwFormat, RES_CHRATR_FONTSIZE).GetHeight(); } sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() : rGrid.GetBaseWidth( ); @@ -3932,12 +3932,12 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR ) if( m_rWW8Export.bWrtWW8 ) { m_rWW8Export.InsUInt16( 0x845E ); //asian version ? - m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() ); + m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTextLeft() ); } else { m_rWW8Export.pO->push_back( 17 ); - m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() ); + m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTextLeft() ); } // sprmPDxaRight @@ -3956,12 +3956,12 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR ) if( m_rWW8Export.bWrtWW8 ) { m_rWW8Export.InsUInt16( 0x8460 ); //asian version ? - m_rWW8Export.InsUInt16( rLR.GetTxtFirstLineOfst() ); + m_rWW8Export.InsUInt16( rLR.GetTextFirstLineOfst() ); } else { m_rWW8Export.pO->push_back( 19 ); - m_rWW8Export.InsUInt16( rLR.GetTxtFirstLineOfst() ); + m_rWW8Export.InsUInt16( rLR.GetTextFirstLineOfst() ); } } } @@ -4047,7 +4047,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL ) // Print, Opaque, Protect fehlen noch -void WW8AttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) +void WW8AttributeOutput::FormatSurround( const SwFormatSurround& rSurround ) { if ( m_rWW8Export.m_bOutFlyFrmAttrs ) { @@ -4061,7 +4061,7 @@ void WW8AttributeOutput::FormatSurround( const SwFmtSurround& rSurround ) } } -void WW8AttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert ) +void WW8AttributeOutput::FormatVertOrientation( const SwFormatVertOrient& rFlyVert ) { //!!!! Ankertyp und entsprechende Umrechnung fehlt noch @@ -4097,7 +4097,7 @@ void WW8AttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert } } -void WW8AttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori ) +void WW8AttributeOutput::FormatHorizOrientation( const SwFormatHoriOrient& rFlyHori ) { if ( !m_rWW8Export.m_pParentFrame ) { @@ -4138,7 +4138,7 @@ void WW8AttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori } } -void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor ) +void WW8AttributeOutput::FormatAnchor( const SwFormatAnchor& rAnchor ) { OSL_ENSURE( m_rWW8Export.m_pParentFrame, "Anchor without mpParentFrame !!" ); @@ -4372,7 +4372,7 @@ void WW8Export::Out_BorderLine(ww::bytes& rO, const SvxBorderLine* pLine, // FormatBox1() ist fuer alle Boxen ausser in Tabellen. // es wird pO des WW8Writers genommen -void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow) +void WW8Export::Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow) { if ( m_bOutPageDescs && !bWrtWW8 ) return; // no page ouline in WW6 @@ -4434,7 +4434,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow) // ( Tabellenumrandungen fransen sonst aus ) // Ein WW8Bytes-Ptr wird als Ausgabe-Parameter uebergeben -void WW8Export::Out_SwFmtTableBox( ww::bytes& rO, const SvxBoxItem * pBox ) +void WW8Export::Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * pBox ) { // moeglich und vielleicht besser waere 0xffff static const SvxBorderLine aBorderLine; @@ -4492,23 +4492,23 @@ void WW8AttributeOutput::FormatBox( const SvxBoxItem& rBox ) && ( p->GetWidth() != 0 ); } - m_rWW8Export.Out_SwFmtBox( rBox, bShadow ); + m_rWW8Export.Out_SwFormatBox( rBox, bShadow ); } } SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const { - const SwFrmFmt* pFmt = m_pAktPageDesc ? &m_pAktPageDesc->GetMaster() + const SwFrameFormat* pFormat = m_pAktPageDesc ? &m_pAktPageDesc->GetMaster() : &m_pDoc->GetPageDesc(0).GetMaster(); - const SvxLRSpaceItem& rLR = pFmt->GetLRSpace(); - SwTwips nPageSize = pFmt->GetFrmSize().GetWidth(); + const SvxLRSpaceItem& rLR = pFormat->GetLRSpace(); + SwTwips nPageSize = pFormat->GetFrmSize().GetWidth(); rLeft = rLR.GetLeft(); rRight = rLR.GetRight(); return nPageSize; } -void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) +void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) { // CColumns if ( m_rWW8Export.bWrtWW8 ) @@ -4569,7 +4569,7 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & } } -void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol ) +void AttributeOutputBase::FormatColumns( const SwFormatCol& rCol ) { const SwColumns& rColumns = rCol.GetColumns(); @@ -4578,38 +4578,38 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol ) { // dann besorge mal die Seitenbreite ohne Raender !! - const SwFrmFmt* pFmt = GetExport( ).m_pAktPageDesc ? &GetExport( ).m_pAktPageDesc->GetMaster() : &const_cast<const SwDoc *>(GetExport( ).m_pDoc)->GetPageDesc(0).GetMaster(); - const SvxFrameDirectionItem &frameDirection = pFmt->GetFrmDir(); + const SwFrameFormat* pFormat = GetExport( ).m_pAktPageDesc ? &GetExport( ).m_pAktPageDesc->GetMaster() : &const_cast<const SwDoc *>(GetExport( ).m_pDoc)->GetPageDesc(0).GetMaster(); + const SvxFrameDirectionItem &frameDirection = pFormat->GetFrmDir(); SwTwips nPageSize; if ( frameDirection.GetValue() == FRMDIR_VERT_TOP_RIGHT || frameDirection.GetValue() == FRMDIR_VERT_TOP_LEFT ) { - const SvxULSpaceItem &rUL = pFmt->GetULSpace(); - nPageSize = pFmt->GetFrmSize().GetHeight(); + const SvxULSpaceItem &rUL = pFormat->GetULSpace(); + nPageSize = pFormat->GetFrmSize().GetHeight(); nPageSize -= rUL.GetUpper() + rUL.GetLower(); - const SwFmtHeader *header = dynamic_cast<const SwFmtHeader *>(pFmt->GetAttrSet().GetItem(RES_HEADER)); + const SwFormatHeader *header = dynamic_cast<const SwFormatHeader *>(pFormat->GetAttrSet().GetItem(RES_HEADER)); if ( header ) { - const SwFrmFmt *headerFmt = header->GetHeaderFmt(); - if (headerFmt) + const SwFrameFormat *headerFormat = header->GetHeaderFormat(); + if (headerFormat) { - nPageSize -= headerFmt->GetFrmSize().GetHeight(); + nPageSize -= headerFormat->GetFrmSize().GetHeight(); } } - const SwFmtFooter *footer = dynamic_cast<const SwFmtFooter *>(pFmt->GetAttrSet().GetItem(RES_FOOTER)); + const SwFormatFooter *footer = dynamic_cast<const SwFormatFooter *>(pFormat->GetAttrSet().GetItem(RES_FOOTER)); if ( footer ) { - const SwFrmFmt *footerFmt = footer->GetFooterFmt(); - if ( footerFmt ) + const SwFrameFormat *footerFormat = footer->GetFooterFormat(); + if ( footerFormat ) { - nPageSize -= footerFmt->GetFrmSize().GetHeight(); + nPageSize -= footerFormat->GetFrmSize().GetHeight(); } } } else { - const SvxLRSpaceItem &rLR = pFmt->GetLRSpace(); - nPageSize = pFmt->GetFrmSize().GetWidth(); + const SvxLRSpaceItem &rLR = pFormat->GetLRSpace(); + nPageSize = pFormat->GetFrmSize().GetWidth(); nPageSize -= rLR.GetLeft() + rLR.GetRight(); //i120133: The Section width should consider page indent value. nPageSize -= rCol.GetAdjustValue(); @@ -4637,7 +4637,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol ) } // "Paragraphs together" -void WW8AttributeOutput::FormatKeep( const SvxFmtKeepItem& rKeep ) +void WW8AttributeOutput::FormatKeep( const SvxFormatKeepItem& rKeep ) { // sprmFKeepFollow if ( m_rWW8Export.bWrtWW8 ) @@ -4649,7 +4649,7 @@ void WW8AttributeOutput::FormatKeep( const SvxFmtKeepItem& rKeep ) } // exclude a paragraph from Line Numbering -void WW8AttributeOutput::FormatLineNumbering( const SwFmtLineNumber& rNumbering ) +void WW8AttributeOutput::FormatLineNumbering( const SwFormatLineNumber& rNumbering ) { // sprmPFNoLineNumb if( m_rWW8Export.bWrtWW8 ) @@ -4698,19 +4698,19 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing ) sal_uInt16 nScript = i18n::ScriptType::LATIN; const SwAttrSet *pSet = 0; - if ( GetExport().m_pOutFmtNode && GetExport().m_pOutFmtNode->ISA( SwFmt ) ) + if ( GetExport().m_pOutFormatNode && GetExport().m_pOutFormatNode->ISA( SwFormat ) ) { - const SwFmt *pFmt = static_cast<const SwFmt*>( GetExport().m_pOutFmtNode ); - pSet = &pFmt->GetAttrSet(); + const SwFormat *pFormat = static_cast<const SwFormat*>( GetExport().m_pOutFormatNode ); + pSet = &pFormat->GetAttrSet(); } - else if ( GetExport().m_pOutFmtNode && GetExport().m_pOutFmtNode->ISA( SwTxtNode ) ) + else if ( GetExport().m_pOutFormatNode && GetExport().m_pOutFormatNode->ISA( SwTextNode ) ) { - const SwTxtNode* pNd = static_cast<const SwTxtNode*>(GetExport().m_pOutFmtNode); + const SwTextNode* pNd = static_cast<const SwTextNode*>(GetExport().m_pOutFormatNode); pSet = &pNd->GetSwAttrSet(); if ( g_pBreakIt->GetBreakIter().is() ) { nScript = g_pBreakIt->GetBreakIter()-> - getScriptType(pNd->GetTxt(), 0); + getScriptType(pNd->GetText(), 0); } } OSL_ENSURE( pSet, "No attrset for lineheight :-(" ); @@ -4775,18 +4775,18 @@ void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust ) */ m_rWW8Export.InsUInt16( NS_sprm::LN_PJcExtra ); //bidi version ? bool bBiDiSwap = false; - if ( m_rWW8Export.m_pOutFmtNode ) + if ( m_rWW8Export.m_pOutFormatNode ) { short nDirection = FRMDIR_HORI_LEFT_TOP; - if ( m_rWW8Export.m_pOutFmtNode->ISA( SwTxtNode ) ) + if ( m_rWW8Export.m_pOutFormatNode->ISA( SwTextNode ) ) { - SwPosition aPos(*static_cast<const SwCntntNode*>(m_rWW8Export.m_pOutFmtNode)); + SwPosition aPos(*static_cast<const SwContentNode*>(m_rWW8Export.m_pOutFormatNode)); nDirection = m_rWW8Export.m_pDoc->GetTextDirection(aPos); } - else if ( m_rWW8Export.m_pOutFmtNode->ISA( SwTxtFmtColl ) ) + else if ( m_rWW8Export.m_pOutFormatNode->ISA( SwTextFormatColl ) ) { - const SwTxtFmtColl* pC = - static_cast<const SwTxtFmtColl*>(m_rWW8Export.m_pOutFmtNode); + const SwTextFormatColl* pC = + static_cast<const SwTextFormatColl*>(m_rWW8Export.m_pOutFormatNode); const SvxFrameDirectionItem &rItem = ItemGet<SvxFrameDirectionItem>(*pC, RES_FRAMEDIR); nDirection = rItem.GetValue(); @@ -4824,21 +4824,21 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir { if ( m_rWW8Export.m_bOutPageDescs ) nDir = m_rWW8Export.GetCurrentPageDirection(); - else if ( m_rWW8Export.m_pOutFmtNode ) + else if ( m_rWW8Export.m_pOutFormatNode ) { if ( m_rWW8Export.m_bOutFlyFrmAttrs ) //frame { nDir = m_rWW8Export.TrueFrameDirection( - *static_cast<const SwFrmFmt*>(m_rWW8Export.m_pOutFmtNode) ); + *static_cast<const SwFrameFormat*>(m_rWW8Export.m_pOutFormatNode) ); } - else if ( m_rWW8Export.m_pOutFmtNode->ISA( SwCntntNode ) ) //pagagraph + else if ( m_rWW8Export.m_pOutFormatNode->ISA( SwContentNode ) ) //pagagraph { - const SwCntntNode* pNd = - static_cast<const SwCntntNode*>(m_rWW8Export.m_pOutFmtNode); + const SwContentNode* pNd = + static_cast<const SwContentNode*>(m_rWW8Export.m_pOutFormatNode); SwPosition aPos( *pNd ); nDir = m_rWW8Export.m_pDoc->GetTextDirection( aPos ); } - else if ( m_rWW8Export.m_pOutFmtNode->ISA( SwTxtFmtColl ) ) + else if ( m_rWW8Export.m_pOutFormatNode->ISA( SwTextFormatColl ) ) nDir = FRMDIR_HORI_LEFT_TOP; //what else can we do :-( } @@ -4892,7 +4892,7 @@ void WW8AttributeOutput::ParaOutlineLevel(const SfxUInt16Item& /*rItem*/) } // "Separate paragraphs" -void WW8AttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit ) +void WW8AttributeOutput::ParaSplit( const SvxFormatSplitItem& rSplit ) { // sprmPFKeep if ( m_rWW8Export.bWrtWW8 ) @@ -5152,7 +5152,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops ) const SfxPoolItem* pLR = m_rWW8Export.HasItem( RES_LR_SPACE ); if ( pLR != NULL ) - nCurrentLeft = static_cast<const SvxLRSpaceItem*>(pLR)->GetTxtLeft(); + nCurrentLeft = static_cast<const SvxLRSpaceItem*>(pLR)->GetTextLeft(); } // #i100264# @@ -5161,7 +5161,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops ) m_rWW8Export.m_pCurrentStyle->DerivedFrom() != NULL ) { SvxTabStopItem aParentTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP ); - const SwFmt *pParentStyle = m_rWW8Export.m_pCurrentStyle->DerivedFrom(); + const SwFormat *pParentStyle = m_rWW8Export.m_pCurrentStyle->DerivedFrom(); { const SvxTabStopItem* pParentTabs = HasItem<SvxTabStopItem>( pParentStyle->GetAttrSet(), RES_PARATR_TABSTOP ); if ( pParentTabs ) @@ -5175,7 +5175,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops ) if ( bTabsRelativeToIndex ) { const SvxLRSpaceItem &rStyleLR = ItemGet<SvxLRSpaceItem>( pParentStyle->GetAttrSet(), RES_LR_SPACE ); - nParentLeft = rStyleLR.GetTxtLeft(); + nParentLeft = rStyleLR.GetTextLeft(); } ParaTabStopDelAdd( m_rWW8Export, aParentTabs, nParentLeft, rTabStops, nCurrentLeft ); @@ -5198,7 +5198,7 @@ void WW8AttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStops ) if ( bTabsRelativeToIndex ) { const SvxLRSpaceItem &rStyleLR = ItemGet<SvxLRSpaceItem>(*m_rWW8Export.m_pStyAttr, RES_LR_SPACE); - nStyleLeft = rStyleLR.GetTxtLeft(); + nStyleLeft = rStyleLR.GetTextLeft(); } ParaTabStopDelAdd( m_rWW8Export, @@ -5324,23 +5324,23 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) CharIdctHint( static_cast< const SfxPoolItem& >( rHt ) ); break; case RES_TXTATR_INETFMT: - TextINetFormat( static_cast< const SwFmtINetFmt& >( rHt ) ); + TextINetFormat( static_cast< const SwFormatINetFormat& >( rHt ) ); break; case RES_TXTATR_CHARFMT: - TextCharFormat( static_cast< const SwFmtCharFmt& >( rHt ) ); + TextCharFormat( static_cast< const SwFormatCharFormat& >( rHt ) ); break; case RES_TXTATR_FIELD: case RES_TXTATR_ANNOTATION: case RES_TXTATR_INPUTFIELD: - TextField( static_cast< const SwFmtFld& >( rHt ) ); + TextField( static_cast< const SwFormatField& >( rHt ) ); break; case RES_TXTATR_FLYCNT: - TextFlyContent( static_cast< const SwFmtFlyCnt& >( rHt ) ); + TextFlyContent( static_cast< const SwFormatFlyCnt& >( rHt ) ); break; case RES_TXTATR_FTN: - TextFootnote( static_cast< const SwFmtFtn& >( rHt ) ); + TextFootnote( static_cast< const SwFormatFootnote& >( rHt ) ); break; case RES_PARATR_LINESPACING: @@ -5350,7 +5350,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) ParaAdjust( static_cast< const SvxAdjustItem& >( rHt ) ); break; case RES_PARATR_SPLIT: - ParaSplit( static_cast< const SvxFmtSplitItem& >( rHt ) ); + ParaSplit( static_cast< const SvxFormatSplitItem& >( rHt ) ); break; case RES_PARATR_WIDOWS: ParaWidows( static_cast< const SvxWidowsItem& >( rHt ) ); @@ -5381,7 +5381,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) break; case RES_FRM_SIZE: - FormatFrameSize( static_cast< const SwFmtFrmSize& >( rHt ) ); + FormatFrameSize( static_cast< const SwFormatFrmSize& >( rHt ) ); break; case RES_PAPER_BIN: FormatPaperBin( static_cast< const SvxPaperBinItem& >( rHt ) ); @@ -5393,22 +5393,22 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) FormatULSpace( static_cast< const SvxULSpaceItem& >( rHt ) ); break; case RES_PAGEDESC: - FormatPageDescription( static_cast< const SwFmtPageDesc& >( rHt ) ); + FormatPageDescription( static_cast< const SwFormatPageDesc& >( rHt ) ); break; case RES_BREAK: - FormatBreak( static_cast< const SvxFmtBreakItem& >( rHt ) ); + FormatBreak( static_cast< const SvxFormatBreakItem& >( rHt ) ); break; case RES_SURROUND: - FormatSurround( static_cast< const SwFmtSurround& >( rHt ) ); + FormatSurround( static_cast< const SwFormatSurround& >( rHt ) ); break; case RES_VERT_ORIENT: - FormatVertOrientation( static_cast< const SwFmtVertOrient& >( rHt ) ); + FormatVertOrientation( static_cast< const SwFormatVertOrient& >( rHt ) ); break; case RES_HORI_ORIENT: - FormatHorizOrientation( static_cast< const SwFmtHoriOrient& >( rHt ) ); + FormatHorizOrientation( static_cast< const SwFormatHoriOrient& >( rHt ) ); break; case RES_ANCHOR: - FormatAnchor( static_cast< const SwFmtAnchor& >( rHt ) ); + FormatAnchor( static_cast< const SwFormatAnchor& >( rHt ) ); break; case RES_BACKGROUND: FormatBackground( static_cast< const SvxBrushItem& >( rHt ) ); @@ -5423,16 +5423,16 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt ) FormatBox( static_cast< const SvxBoxItem& >( rHt ) ); break; case RES_COL: - FormatColumns( static_cast< const SwFmtCol& >( rHt ) ); + FormatColumns( static_cast< const SwFormatCol& >( rHt ) ); break; case RES_KEEP: - FormatKeep( static_cast< const SvxFmtKeepItem& >( rHt ) ); + FormatKeep( static_cast< const SvxFormatKeepItem& >( rHt ) ); break; case RES_TEXTGRID: FormatTextGrid( static_cast< const SwTextGridItem& >( rHt ) ); break; case RES_LINENUMBER: - FormatLineNumbering( static_cast< const SwFmtLineNumber& >( rHt ) ); + FormatLineNumbering( static_cast< const SwFormatLineNumber& >( rHt ) ); break; case RES_FRAMEDIR: FormatFrameDirection( static_cast< const SvxFrameDirectionItem& >( rHt ) ); @@ -5538,18 +5538,18 @@ void AttributeOutputBase::FormatCharBorder( const SvxBoxItem& rBox ) } /* - * This function is used to check if the current SwTxtNode (paragraph) has a redline object + * This function is used to check if the current SwTextNode (paragraph) has a redline object * that is attached to the paragraph marker. * This is done by checking if the range (SwPaM) of the redline is : * - Start = the last character of the current paragraph * - End = the first character of the next paragraph */ -const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTxtNode& rNode, RedlineType_t aRedlineType) +const SwRedlineData* AttributeOutputBase::GetParagraphMarkerRedline( const SwTextNode& rNode, RedlineType_t aRedlineType) { // ToDo : this is not the most ideal ... should start maybe from 'nCurRedlinePos' - for( sal_uInt16 nRedlinePos = 0; nRedlinePos < GetExport().m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl().size(); ++nRedlinePos ) + for( sal_uInt16 nRedlinePos = 0; nRedlinePos < GetExport().m_pDoc->getIDocumentRedlineAccess().GetRedlineTable().size(); ++nRedlinePos ) { - const SwRangeRedline* pRedl = GetExport().m_pDoc->getIDocumentRedlineAccess().GetRedlineTbl()[ nRedlinePos ]; + const SwRangeRedline* pRedl = GetExport().m_pDoc->getIDocumentRedlineAccess().GetRedlineTable()[ nRedlinePos ]; // Only check redlines that are of type 'Delete' if ( pRedl->GetRedlineData().GetType() != aRedlineType ) diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index eb3c64f0f1a7..903e6da50c47 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -36,7 +36,7 @@ public: virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE; /// Called in order to output section breaks. - virtual void SectionBreaks(const SwTxtNode& /*rNode*/) SAL_OVERRIDE {} + virtual void SectionBreaks(const SwTextNode& /*rNode*/) SAL_OVERRIDE {} /// Called before we start outputting the attributes. virtual void StartParagraphProperties() SAL_OVERRIDE {} @@ -71,7 +71,7 @@ public: virtual void RawText( const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) SAL_OVERRIDE; /// Output ruby start. - virtual void StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) SAL_OVERRIDE; + virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) SAL_OVERRIDE; /// Output ruby end. virtual void EndRuby() SAL_OVERRIDE; @@ -82,12 +82,12 @@ public: /// Output URL end. virtual bool EndURL(bool) SAL_OVERRIDE; - virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) SAL_OVERRIDE; + virtual void FieldVanish( const OUString& rText, ww::eField eType ) SAL_OVERRIDE; /// Output redlining. virtual void Redline( const SwRedlineData* pRedline ) SAL_OVERRIDE; - virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE; + virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE; /// Output FKP (Formatted disK Page) - necessary for binary formats only. /// FIXME having it in AttributeOutputBase is probably a hack, it @@ -138,7 +138,7 @@ public: virtual void EndStyleProperties( bool bParProp ) SAL_OVERRIDE; /// Numbering rule and Id. - virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ) SAL_OVERRIDE; + virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFormat &rNFormat, const SwFormat &rFormat ) SAL_OVERRIDE; /// Page break /// As a paragraph property - the paragraph should be on the next page. @@ -166,7 +166,7 @@ public: virtual void SectionTitlePage() SAL_OVERRIDE; /// Description of the page borders. - virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) SAL_OVERRIDE; + virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) SAL_OVERRIDE; /// Columns populated from right/numbers on the right side? virtual void SectionBiDi( bool bBiDi ) SAL_OVERRIDE; @@ -201,7 +201,7 @@ public: protected: /// Output frames - the implementation. - void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) SAL_OVERRIDE; + void OutputFlyFrame_Impl( const sw::Frame& rFormat, const Point& rNdTopLeft ) SAL_OVERRIDE; /// Sfx item Sfx item RES_CHRATR_CASEMAP virtual void CharCaseMap( const SvxCaseMapItem& ) SAL_OVERRIDE; @@ -312,13 +312,13 @@ protected: virtual void CharHighlight( const SvxBrushItem& ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_INETFMT - virtual void TextINetFormat( const SwFmtINetFmt& ) SAL_OVERRIDE; + virtual void TextINetFormat( const SwFormatINetFormat& ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_CHARFMT - virtual void TextCharFormat( const SwFmtCharFmt& ) SAL_OVERRIDE; + virtual void TextCharFormat( const SwFormatCharFormat& ) SAL_OVERRIDE; /// Sfx item RES_TXTATR_FTN - virtual void TextFootnote_Impl( const SwFmtFtn& ) SAL_OVERRIDE; + virtual void TextFootnote_Impl( const SwFormatFootnote& ) SAL_OVERRIDE; /// Sfx item RES_PARATR_LINESPACING virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) SAL_OVERRIDE; @@ -327,7 +327,7 @@ protected: virtual void ParaAdjust( const SvxAdjustItem& rHt ) SAL_OVERRIDE; /// Sfx item RES_PARATR_SPLIT - virtual void ParaSplit( const SvxFmtSplitItem& ) SAL_OVERRIDE; + virtual void ParaSplit( const SvxFormatSplitItem& ) SAL_OVERRIDE; /// Sfx item RES_PARATR_WIDOWS virtual void ParaWidows( const SvxWidowsItem& rHt ) SAL_OVERRIDE; @@ -339,7 +339,7 @@ protected: virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) SAL_OVERRIDE; /// Sfx item RES_PARATR_NUMRULE - virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE; + virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE; /// Sfx item RES_PARATR_SCRIPTSPACE virtual void ParaScriptSpace( const SfxBoolItem& ) SAL_OVERRIDE; @@ -357,7 +357,7 @@ protected: virtual void ParaSnapToGrid( const SvxParaGridItem& ) SAL_OVERRIDE; /// Sfx item RES_FRM_SIZE - virtual void FormatFrameSize( const SwFmtFrmSize& ) SAL_OVERRIDE; + virtual void FormatFrameSize( const SwFormatFrmSize& ) SAL_OVERRIDE; /// Sfx item RES_PAPER_BIN virtual void FormatPaperBin( const SvxPaperBinItem& ) SAL_OVERRIDE; @@ -369,16 +369,16 @@ protected: virtual void FormatULSpace( const SvxULSpaceItem& rHt ) SAL_OVERRIDE; /// Sfx item RES_SURROUND - virtual void FormatSurround( const SwFmtSurround& ) SAL_OVERRIDE; + virtual void FormatSurround( const SwFormatSurround& ) SAL_OVERRIDE; /// Sfx item RES_VERT_ORIENT - virtual void FormatVertOrientation( const SwFmtVertOrient& ) SAL_OVERRIDE; + virtual void FormatVertOrientation( const SwFormatVertOrient& ) SAL_OVERRIDE; /// Sfx item RES_HORI_ORIENT - virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) SAL_OVERRIDE; + virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) SAL_OVERRIDE; /// Sfx item RES_ANCHOR - virtual void FormatAnchor( const SwFmtAnchor& ) SAL_OVERRIDE; + virtual void FormatAnchor( const SwFormatAnchor& ) SAL_OVERRIDE; /// Sfx item RES_BACKGROUND virtual void FormatBackground( const SvxBrushItem& ) SAL_OVERRIDE; @@ -393,16 +393,16 @@ protected: virtual void FormatBox( const SvxBoxItem& ) SAL_OVERRIDE; /// Sfx item RES_COL - virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE; + virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE; /// Sfx item RES_KEEP - virtual void FormatKeep( const SvxFmtKeepItem& ) SAL_OVERRIDE; + virtual void FormatKeep( const SvxFormatKeepItem& ) SAL_OVERRIDE; /// Sfx item RES_TEXTGRID virtual void FormatTextGrid( const SwTextGridItem& ) SAL_OVERRIDE; /// Sfx item RES_LINENUMBER - virtual void FormatLineNumbering( const SwFmtLineNumber& ) SAL_OVERRIDE; + virtual void FormatLineNumbering( const SwFormatLineNumber& ) SAL_OVERRIDE; /// Sfx item RES_FRAMEDIR virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) SAL_OVERRIDE; @@ -417,14 +417,14 @@ protected: virtual void ParaOutlineLevel( const SfxUInt16Item& ) SAL_OVERRIDE; /// Write the expanded field - virtual void WriteExpand( const SwField* pFld ) SAL_OVERRIDE; - - virtual void RefField ( const SwField& rFld, const OUString& rRef ) SAL_OVERRIDE; - virtual void HiddenField( const SwField& rFld ) SAL_OVERRIDE; - virtual void SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE; - virtual void PostitField( const SwField* pFld ) SAL_OVERRIDE; - virtual bool DropdownField( const SwField* pFld ) SAL_OVERRIDE; - virtual bool PlaceholderField( const SwField* pFld ) SAL_OVERRIDE; + virtual void WriteExpand( const SwField* pField ) SAL_OVERRIDE; + + virtual void RefField ( const SwField& rField, const OUString& rRef ) SAL_OVERRIDE; + virtual void HiddenField( const SwField& rField ) SAL_OVERRIDE; + virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE; + virtual void PostitField( const SwField* pField ) SAL_OVERRIDE; + virtual bool DropdownField( const SwField* pField ) SAL_OVERRIDE; + virtual bool PlaceholderField( const SwField* pField ) SAL_OVERRIDE; virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) SAL_OVERRIDE; diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index 2b7d3de7f49e..7a8d0f4f10a4 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -43,7 +43,7 @@ WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVer if (aWwFib.nFibBack >= 0x6A) //Word97 { xTableStream = pStg->OpenSotStream(OUString::createFromAscii( - aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); + aWwFib.fWhichTableStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError()) { @@ -57,14 +57,14 @@ WW8Glossary::WW8Glossary(tools::SvRef<SotStorageStream> &refStrm, sal_uInt8 nVer bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx) { bool bRet=false; - for( sal_uInt16 nCnt = pDoc->GetSpzFrmFmts()->size(); nCnt; ) + for( sal_uInt16 nCnt = pDoc->GetSpzFrameFormats()->size(); nCnt; ) { - const SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --nCnt ]; - if ( RES_FLYFRMFMT != pFrmFmt->Which() && - RES_DRAWFRMFMT != pFrmFmt->Which() ) + const SwFrameFormat* pFrameFormat = (*pDoc->GetSpzFrameFormats())[ --nCnt ]; + if ( RES_FLYFRMFMT != pFrameFormat->Which() && + RES_DRAWFRMFMT != pFrameFormat->Which() ) continue; - const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor(); - SwPosition const*const pAPos = rAnchor.GetCntntAnchor(); + const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); + SwPosition const*const pAPos = rAnchor.GetContentAnchor(); if (pAPos && ((FLY_AT_PARA == rAnchor.GetAnchorId()) || (FLY_AT_CHAR == rAnchor.GetAnchorId())) && @@ -106,18 +106,18 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, if( aStart < aDocEnd ) { - SwTxtFmtColl* pColl = pD->getIDocumentStylePoolAccess().GetTxtCollFromPool + SwTextFormatColl* pColl = pD->getIDocumentStylePoolAccess().GetTextCollFromPool (RES_POOLCOLL_STANDARD, false); sal_uInt16 nGlosEntry = 0; - SwCntntNode* pCNd = 0; + SwContentNode* pCNd = 0; do { SwPaM aPam( aStart ); { SwNodeIndex& rIdx = aPam.GetPoint()->nNode; ++rIdx; - if( 0 == ( pCNd = rIdx.GetNode().GetTxtNode() ) ) + if( 0 == ( pCNd = rIdx.GetNode().GetTextNode() ) ) { - pCNd = pD->GetNodes().MakeTxtNode( rIdx, pColl ); + pCNd = pD->GetNodes().MakeTextNode( rIdx, pColl ); rIdx = *pCNd; } } @@ -126,11 +126,11 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, { SwNodeIndex& rIdx = aPam.GetPoint()->nNode; rIdx = aStart.GetNode().EndOfSectionIndex() - 1; - if(( 0 == ( pCNd = rIdx.GetNode().GetCntntNode() ) ) + if(( 0 == ( pCNd = rIdx.GetNode().GetContentNode() ) ) || HasBareGraphicEnd(pD,rIdx)) { ++rIdx; - pCNd = pD->GetNodes().MakeTxtNode( rIdx, pColl ); + pCNd = pD->GetNodes().MakeTextNode( rIdx, pColl ); rIdx = *pCNd; } } @@ -167,7 +167,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, SwDoc* pGlDoc = rBlocks.GetDoc(); SwNodeIndex aIdx( pGlDoc->GetNodes().GetEndOfContent(), -1 ); - pCNd = aIdx.GetNode().GetCntntNode(); + pCNd = aIdx.GetNode().GetContentNode(); SwPosition aPos(aIdx, SwIndex(pCNd, (pCNd) ? pCNd->Len() : 0)); pD->getIDocumentContentOperations().CopyRange( aPam, aPos, /*bCopyAll=*/false, /*bCheckPos=*/true ); rBlocks.PutDoc(); @@ -215,13 +215,13 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile ) SwNodeIndex aIdx( *pD->GetNodes().GetEndOfContent().StartOfSectionNode(), 1); - if( !aIdx.GetNode().IsTxtNode() ) + if( !aIdx.GetNode().IsTextNode() ) { OSL_ENSURE( false, "wo ist der TextNode?" ); pD->GetNodes().GoNext( &aIdx ); } SwPaM aPamo( aIdx ); - aPamo.GetPoint()->nContent.Assign(aIdx.GetNode().GetCntntNode(), + aPamo.GetPoint()->nContent.Assign(aIdx.GetNode().GetContentNode(), 0); pRdr->LoadDoc(aPamo,this); diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 57bbed68912d..de2c3d0236a0 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -154,12 +154,12 @@ Color WW8TransCol(SVBT32 nWC) return Color(nWC[0], nWC[1], nWC[2]); } -void wwFrameNamer::SetUniqueGraphName(SwFrmFmt *pFrmFmt, const OUString &rFixed) +void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixed) { if (mbIsDisabled || rFixed.isEmpty()) return; - pFrmFmt->SetName(msSeed+OUString::number(++mnImportedGraphicsCount) + ": " + rFixed); + pFrameFormat->SetName(msSeed+OUString::number(++mnImportedGraphicsCount) + ": " + rFixed); } // ReadGrafStart liest die ObjektDaten ein und erzeugt falls noetig einen Anker @@ -178,7 +178,7 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz, if (!bCouldRead) return false; - SwFmtAnchor aAnchor( FLY_AT_CHAR ); + SwFormatAnchor aAnchor( FLY_AT_CHAR ); aAnchor.SetAnchor( m_pPaM->GetPoint() ); rSet.Put( aAnchor ); @@ -478,14 +478,14 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd ) void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl ) { SwWW8StyInf * pStyInf = GetStyle(nColl); - if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl ) + if( pStyInf != NULL && pStyInf->pFormat && pStyInf->bColl ) { const SfxPoolItem* pItem; for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ ) { // If we are set in the source and not set in the destination // then add it in. - if ( SfxItemState::SET == pStyInf->pFmt->GetItemState( + if ( SfxItemState::SET == pStyInf->pFormat->GetItemState( i, true, &pItem ) ) { SfxItemPool *pEditPool = rS.GetPool(); @@ -596,9 +596,9 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, { // nStart is the beginning of the attributes for this range, and // may be before the text itself. So watch out for that - WW8_CP nTxtStart = nStart; - if (nTxtStart < nStartCp) - nTxtStart = nStartCp; + WW8_CP nTextStart = nStart; + if (nTextStart < nStartCp) + nTextStart = nStartCp; // get position of next SPRM bool bStartAttr = m_pPlcxMan->Get(&aRes); @@ -627,7 +627,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, if (!bDoingSymbol && m_bSymbol) { bDoingSymbol = true; - nStartReplace = nTxtStart; + nStartReplace = nTextStart; cReplaceSymbol = m_cSymbol; } } @@ -639,10 +639,10 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, bDoingSymbol = false; OUStringBuffer sTemp; comphelper::string::padToLength(sTemp, - nTxtStart - nStartReplace, cReplaceSymbol); + nTextStart - nStartReplace, cReplaceSymbol); m_pDrawEditEngine->QuickInsertText(sTemp.makeStringAndClear(), GetESelection(nStartReplace - nStartCp, - nTxtStart - nStartCp ) ); + nTextStart - nStartCp ) ); } } } @@ -660,8 +660,8 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, sal_uInt16 nWhich = pItem->Which(); if (nWhich == RES_TXTATR_INETFMT) { - const SwFmtINetFmt *pURL = - static_cast<const SwFmtINetFmt *>(pItem); + const SwFormatINetFormat *pURL = + static_cast<const SwFormatINetFormat *>(pItem); sURL = pURL->GetValue(); } m_pCtrlStck->DeleteAndDestroy(nI-1); @@ -718,7 +718,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, if( pS->Count() ) { m_pDrawEditEngine->QuickSetAttribs( *pS, - GetESelection( nTxtStart - nStartCp, nEnd - nStartCp ) ); + GetESelection( nTextStart - nStartCp, nEnd - nStartCp ) ); delete pS; pS = new SfxItemSet(m_pDrawEditEngine->GetEmptyItemSet()); } @@ -934,13 +934,13 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(OUString &rString, WW8_CP // InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text // und die Attribute ein -SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, +SwFrameFormat* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, - SwFrmFmt* pOldFlyFmt, bool bMakeSdrGrafObj, bool& rbEraseTextObj, + SwFrameFormat* pOldFlyFormat, bool bMakeSdrGrafObj, bool& rbEraseTextObj, bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp, bool* pbContainsGraphics, SvxMSDffImportRec* pRecord) { - SwFrmFmt* pFlyFmt = 0; + SwFrameFormat* pFlyFormat = 0; sal_uLong nOld = m_pStrm->Tell(); ManTypes eType = m_pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX; @@ -1051,21 +1051,21 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, ReplaceObject(pNew, pTextObj->GetOrdNum()); } else - pFlyFmt = ImportOle(); + pFlyFormat = ImportOle(); m_bObj = false; } else { InsertAttrsAsDrawingAttrs(nNewStartCp, nNewStartCp+1, eType, true); - pFlyFmt = ImportGraf(bMakeSdrGrafObj ? pTextObj : 0, - pOldFlyFmt); + pFlyFormat = ImportGraf(bMakeSdrGrafObj ? pTextObj : 0, + pOldFlyFormat); } } break; case 0x8: if ( (!pbTestTxbxContainsText) && (!m_bObj) ) - pFlyFmt = Read_GrafLayer( nPosCp ); + pFlyFormat = Read_GrafLayer( nPosCp ); break; default: bDone = false; @@ -1074,7 +1074,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, if( bDone ) { - if( pFlyFmt ) + if( pFlyFormat ) { if( pRecord ) { @@ -1092,13 +1092,13 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, pRecord->eShapeType, aInnerDist ); - pFlyFmt->SetFmtAttr( aFlySet ); + pFlyFormat->SetFormatAttr( aFlySet ); - MapWrapIntoFlyFmt(pRecord, pFlyFmt); + MapWrapIntoFlyFormat(pRecord, pFlyFormat); } } aString.clear(); - rbEraseTextObj = (0 != pFlyFmt); + rbEraseTextObj = (0 != pFlyFormat); } } } @@ -1140,7 +1140,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj, m_pStrm->Seek( nOld ); if (pbContainsGraphics) *pbContainsGraphics = bContainsGraphics; - return pFlyFmt; + return pFlyFormat; } bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp, @@ -1153,12 +1153,12 @@ bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartC } // TextBoxes only for Ver67 !! -SdrObject* SwWW8ImplReader::ReadTxtBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) +SdrObject* SwWW8ImplReader::ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) { bool bDummy; - WW8_DP_TXTBOX aTxtB; + WW8_DP_TXTBOX aTextB; - if( !ReadGrafStart( (void*)&aTxtB, sizeof( aTxtB ), pHd, rSet ) ) + if( !ReadGrafStart( (void*)&aTextB, sizeof( aTextB ), pHd, rSet ) ) return 0; Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + m_nDrawXOfs2, @@ -1178,8 +1178,8 @@ SdrObject* SwWW8ImplReader::ReadTxtBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet) InsertTxbxText(dynamic_cast<SdrTextObj*>(pObj), &aSize, 0, 0, 0, 0, false, bDummy,0,&nStartCpFly,&nEndCpFly,&bContainsGraphics); - SetStdAttr( rSet, aTxtB.aLnt, aTxtB.aShd ); - SetFill( rSet, aTxtB.aFill ); + SetStdAttr( rSet, aTextB.aLnt, aTextB.aShd ); + SetFill( rSet, aTextB.aFill ); rSet.Put( SdrTextFitToSizeTypeItem( SDRTEXTFIT_NONE ) ); rSet.Put( makeSdrTextAutoGrowWidthItem(false)); @@ -1301,7 +1301,7 @@ SdrObject* SwWW8ImplReader::ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet) if( rLeft >= SVBT16ToShort(aHd.cb) ) // Vorsichtsmassmahme { - rSet.Put(SwFmtSurround(SURROUND_THROUGHT)); + rSet.Put(SwFormatSurround(SURROUND_THROUGHT)); switch (SVBT16ToShort(aHd.dpk) & 0xff ) { case 0: @@ -1311,7 +1311,7 @@ SdrObject* SwWW8ImplReader::ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet) pRet = ReadLine(&aHd, rSet); break; case 2: - pRet = ReadTxtBox(&aHd, rSet); + pRet = ReadTextBox(&aHd, rSet); break; case 3: pRet = ReadRect(&aHd, rSet); @@ -1401,17 +1401,17 @@ void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp ) const int nXAlign = aDo.bx < nCntRelTo ? aDo.bx : 0; const int nYAlign = aDo.by < nCntRelTo ? aDo.by : 0; - aSet.Put(SwFmtHoriOrient(aRect.Left(), text::HoriOrientation::NONE, + aSet.Put(SwFormatHoriOrient(aRect.Left(), text::HoriOrientation::NONE, aHoriRelOriTab[ nXAlign ])); - aSet.Put(SwFmtVertOrient(aRect.Top(), text::VertOrientation::NONE, + aSet.Put(SwFormatVertOrient(aRect.Top(), text::VertOrientation::NONE, aVertRelOriTab[ nYAlign ])); - SwFrmFmt *pFrm = m_rDoc.getIDocumentContentOperations().InsertDrawObj( *m_pPaM, *pObject, aSet ); + SwFrameFormat *pFrm = m_rDoc.getIDocumentContentOperations().InsertDrawObj( *m_pPaM, *pObject, aSet ); pObject->SetMergedItemSet(aSet); - if (pFrm->ISA(SwDrawFrmFmt)) + if (pFrm->ISA(SwDrawFrameFormat)) { - static_cast<SwDrawFrmFmt*>(pFrm)->PosAttrSet(); + static_cast<SwDrawFrameFormat*>(pFrm)->PosAttrSet(); } AddAutoAnchor(pFrm); @@ -1571,14 +1571,14 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, /* am Rahmen zu setzende Frame-Attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - SwFmtFrmSize falls noch nicht gesetzt, hier setzen + SwFormatFrmSize falls noch nicht gesetzt, hier setzen SvxLRSpaceItem hier setzen SvxULSpaceItem hier setzen SvxOpaqueItem (Derzeit bei Rahmen nicht moeglich! khz 10.2.1999) - SwFmtSurround bereits gesetzt - SwFmtVertOrient bereits gesetzt - SwFmtHoriOrient bereits gesetzt - SwFmtAnchor bereits gesetzt + SwFormatSurround bereits gesetzt + SwFormatVertOrient bereits gesetzt + SwFormatHoriOrient bereits gesetzt + SwFormatAnchor bereits gesetzt SvxBoxItem hier setzen SvxBrushItem hier setzen SvxShadowItem hier setzen @@ -1669,21 +1669,21 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT, SdrOnOffItem)); - // Size: SwFmtFrmSize + // Size: SwFormatFrmSize if( SfxItemState::SET != rFlySet.GetItemState(RES_FRM_SIZE, false) ) { const Rectangle& rSnapRect = pSdrObj->GetSnapRect(); // if necessary adapt width and position of the framework: The // recorded interior is to remain equally large despite thick edges. - rFlySet.Put( SwFmtFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + rFlySet.Put( SwFormatFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, rSnapRect.GetWidth() + 2*nOutside, rSnapRect.GetHeight() + 2*nOutside) ); } else // If a size is set, adjust it to consider border thickness { - SwFmtFrmSize aSize = static_cast<const SwFmtFrmSize &>(rFlySet.Get(RES_FRM_SIZE)); + SwFormatFrmSize aSize = static_cast<const SwFormatFrmSize &>(rFlySet.Get(RES_FRM_SIZE)); - SwFmtFrmSize aNewSize = SwFmtFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + SwFormatFrmSize aNewSize = SwFormatFrmSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, aSize.GetWidth() + 2*nOutside, aSize.GetHeight() + 2*nOutside); aNewSize.SetWidthSizeType(aSize.GetWidthSizeType()); @@ -1694,12 +1694,12 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, // graphic in relation to the top left inside the border. We don't if (nOutside) { - SwFmtHoriOrient aHori = static_cast<const SwFmtHoriOrient &>(rFlySet.Get( + SwFormatHoriOrient aHori = static_cast<const SwFormatHoriOrient &>(rFlySet.Get( RES_HORI_ORIENT)); aHori.SetPos(MakeSafePositioningValue(aHori.GetPos()-nOutside)); rFlySet.Put(aHori); - SwFmtVertOrient aVert = static_cast<const SwFmtVertOrient &>(rFlySet.Get( + SwFormatVertOrient aVert = static_cast<const SwFormatVertOrient &>(rFlySet.Get( RES_VERT_ORIENT)); aVert.SetPos(aVert.GetPos()-nOutside); rFlySet.Put(aVert); @@ -1885,10 +1885,10 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins( rUL.SetUpper((sal_uInt16)0); } -void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, - SwFrmFmt* pFlyFmt) +void SwWW8ImplReader::MapWrapIntoFlyFormat(SvxMSDffImportRec* pRecord, + SwFrameFormat* pFlyFormat) { - if (!pRecord || !pFlyFmt) + if (!pRecord || !pFlyFormat) return; if (pRecord->nDxWrapDistLeft || pRecord->nDxWrapDistRight) @@ -1896,20 +1896,20 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SvxLRSpaceItem aLR(writer_cast<sal_uInt16>(pRecord->nDxWrapDistLeft), writer_cast<sal_uInt16>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE); AdjustLRWrapForWordMargins(*pRecord, aLR); - pFlyFmt->SetFmtAttr(aLR); + pFlyFormat->SetFormatAttr(aLR); } if (pRecord->nDyWrapDistTop || pRecord->nDyWrapDistBottom) { SvxULSpaceItem aUL(writer_cast<sal_uInt16>(pRecord->nDyWrapDistTop), writer_cast<sal_uInt16>(pRecord->nDyWrapDistBottom), RES_UL_SPACE); AdjustULWrapForWordMargins(*pRecord, aUL); - pFlyFmt->SetFmtAttr(aUL); + pFlyFormat->SetFormatAttr(aUL); } // If we are contoured and have a custom polygon... - if (pRecord->pWrapPolygon && pFlyFmt->GetSurround().IsContour()) + if (pRecord->pWrapPolygon && pFlyFormat->GetSurround().IsContour()) { - if (SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(*pFlyFmt)) + if (SwNoTextNode *pNd = GetNoTextNodeFromSwFrameFormat(*pFlyFormat)) { /* @@ -2003,9 +2003,9 @@ static sal_Int32 lcl_ConvertCrop(sal_uInt32 const nCrop, sal_Int32 const nSize) void SwWW8ImplReader::SetAttributesAtGrfNode(SvxMSDffImportRec const*const pRecord, - SwFrmFmt *pFlyFmt, WW8_FSPA *pF ) + SwFrameFormat *pFlyFormat, WW8_FSPA *pF ) { - const SwNodeIndex* pIdx = pFlyFmt->GetCntnt(false).GetCntntIdx(); + const SwNodeIndex* pIdx = pFlyFormat->GetContent(false).GetContentIdx(); SwGrfNode* pGrfNd; if( pIdx && 0 != (pGrfNd = m_rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() )) { @@ -2084,17 +2084,17 @@ SwWW8ImplReader::SetAttributesAtGrfNode(SvxMSDffImportRec const*const pRecord, } } -SdrObject* SwWW8ImplReader::CreateContactObject(SwFrmFmt* pFlyFmt) +SdrObject* SwWW8ImplReader::CreateContactObject(SwFrameFormat* pFlyFormat) { - if (pFlyFmt) + if (pFlyFormat) { - SdrObject* pNewObject = m_bNewDoc ? 0 : pFlyFmt->FindRealSdrObject(); + SdrObject* pNewObject = m_bNewDoc ? 0 : pFlyFormat->FindRealSdrObject(); if (!pNewObject) - pNewObject = pFlyFmt->FindSdrObject(); - if (!pNewObject && pFlyFmt->ISA(SwFlyFrmFmt)) + pNewObject = pFlyFormat->FindSdrObject(); + if (!pNewObject && pFlyFormat->ISA(SwFlyFrameFormat)) { SwFlyDrawContact* pContactObject - = new SwFlyDrawContact(static_cast<SwFlyFrmFmt*>(pFlyFmt), + = new SwFlyDrawContact(static_cast<SwFlyFrameFormat*>(pFlyFormat), m_pDrawModel); pNewObject = pContactObject->GetMaster(); } @@ -2174,7 +2174,7 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord, RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // #i43718# - SwFmtAnchor aAnchor( eAnchor ); + SwFormatAnchor aAnchor( eAnchor ); aAnchor.SetAnchor( m_pPaM->GetPoint() ); rFlySet.Put( aAnchor ); @@ -2318,14 +2318,14 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord, if ((eVertRel == text::RelOrientation::TEXT_LINE) && (eVertOri == text::VertOrientation::NONE)) nYPos = -nYPos; - SwFmtHoriOrient aHoriOri(MakeSafePositioningValue( bCurSectionVertical ? nYPos : pFSPA->nXaLeft ), + SwFormatHoriOrient aHoriOri(MakeSafePositioningValue( bCurSectionVertical ? nYPos : pFSPA->nXaLeft ), bCurSectionVertical ? eVertOri : eHoriOri, bCurSectionVertical ? eVertRel : eHoriRel); if( 4 <= nXAlign ) aHoriOri.SetPosToggle(true); rFlySet.Put( aHoriOri ); - rFlySet.Put(SwFmtVertOrient(MakeSafePositioningValue( !bCurSectionVertical ? nYPos : -pFSPA->nXaRight ), + rFlySet.Put(SwFormatVertOrient(MakeSafePositioningValue( !bCurSectionVertical ? nYPos : -pFSPA->nXaRight ), !bCurSectionVertical ? eVertOri : eHoriOri, !bCurSectionVertical ? eVertRel : eHoriRel )); } @@ -2382,7 +2382,7 @@ bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTable return bIsObjectLayoutInTableCell; } -SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) +SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) { if( m_nIniFlags & WW8FL_NO_GRAFLAYER ) return 0; @@ -2524,7 +2524,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) } } - SwFmtSurround aSur( eSurround ); + SwFormatSurround aSur( eSurround ); aSur.SetContour( bContour ); aSur.SetOutside(true); // Winword kann nur Aussen-Konturen aFlySet.Put( aSur ); @@ -2564,7 +2564,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) // inside table cell and its wrapping isn't 'SURROUND_THROUGH' if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT) { - SwFmtFollowTextFlow aFollowTextFlow( true ); + SwFormatFollowTextFlow aFollowTextFlow( true ); aFlySet.Put( aFollowTextFlow ); } @@ -2597,14 +2597,14 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) } } } - SwFmtURL* pFmtURL = new SwFmtURL(); - pFmtURL->SetURL( lnName, false ); + SwFormatURL* pFormatURL = new SwFormatURL(); + pFormatURL->SetURL( lnName, false ); if (!aObjName.isEmpty()) - pFmtURL->SetName(aObjName); + pFormatURL->SetName(aObjName); if (!aTarFrm.isEmpty()) - pFmtURL->SetTargetFrameName(aTarFrm); - pFmtURL->SetMap(0); - aFlySet.Put(*pFmtURL); + pFormatURL->SetTargetFrameName(aTarFrm); + pFormatURL->SetMap(0); + aFlySet.Put(*pFormatURL); } // If we are to be "below text" then we are not to be opaque @@ -2620,11 +2620,11 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) OUString aObjName = pObject->GetName(); - SwFrmFmt* pRetFrmFmt = 0; + SwFrameFormat* pRetFrameFormat = 0; if (bReplaceable) { // Single graphics or ole objects - pRetFrmFmt = ImportReplaceableDrawables(pObject, pOurNewObject, pRecord, + pRetFrameFormat = ImportReplaceableDrawables(pObject, pOurNewObject, pRecord, pF, aFlySet); } else @@ -2642,9 +2642,9 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) // Should we, and is it possible to make this into a writer textbox if ((!(m_nIniFlags1 & WW8FL_NO_FLY_FOR_TXBX)) && pRecord->bReplaceByFly) { - pRetFrmFmt = ConvertDrawTextToFly(pObject, pOurNewObject, pRecord, + pRetFrameFormat = ConvertDrawTextToFly(pObject, pOurNewObject, pRecord, eAnchor, pF, aFlySet); - if (pRetFrmFmt) + if (pRetFrameFormat) bDone = true; } @@ -2668,9 +2668,9 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) m_pWWZOrder->InsertTextLayerObject(pObject); } - pRetFrmFmt = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pObject, aFlySet ); + pRetFrameFormat = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pObject, aFlySet ); - OSL_ENSURE(pRetFrmFmt->GetAnchor().GetAnchorId() == + OSL_ENSURE(pRetFrameFormat->GetAnchor().GetAnchorId() == eAnchor, "Not the anchor type requested!"); /* @@ -2683,9 +2683,9 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) { pRecord = &const_cast<SvxMSDffImportRec&>(*it); if (pRecord->pObj && pRecord->aTextId.nTxBxS) - { // #i52825# pRetFrmFmt can be NULL - pRetFrmFmt = MungeTextIntoDrawBox(pRecord->pObj, - pRecord, nGrafAnchorCp, pRetFrmFmt); + { // #i52825# pRetFrameFormat can be NULL + pRetFrameFormat = MungeTextIntoDrawBox(pRecord->pObj, + pRecord, nGrafAnchorCp, pRetFrameFormat); } } } @@ -2693,20 +2693,20 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp ) } // #i44344#, #i44681# - positioning attributes already set - if ( pRetFrmFmt /*#i52825# */ && pRetFrmFmt->ISA(SwDrawFrmFmt) ) + if ( pRetFrameFormat /*#i52825# */ && pRetFrameFormat->ISA(SwDrawFrameFormat) ) { - static_cast<SwDrawFrmFmt*>(pRetFrmFmt)->PosAttrSet(); + static_cast<SwDrawFrameFormat*>(pRetFrameFormat)->PosAttrSet(); } if (!IsInlineEscherHack()) - MapWrapIntoFlyFmt(pRecord, pRetFrmFmt); + MapWrapIntoFlyFormat(pRecord, pRetFrameFormat); // Set frame name with object name - if( pRetFrmFmt /*#i52825# */ && !aObjName.isEmpty() ) - pRetFrmFmt->SetName( aObjName ); - return AddAutoAnchor(pRetFrmFmt); + if( pRetFrameFormat /*#i52825# */ && !aObjName.isEmpty() ) + pRetFrameFormat->SetName( aObjName ); + return AddAutoAnchor(pRetFrameFormat); } -SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt) +SwFrameFormat *SwWW8ImplReader::AddAutoAnchor(SwFrameFormat *pFormat) { /* * anchored to character at the current position will move along the @@ -2714,15 +2714,15 @@ SwFrmFmt *SwWW8ImplReader::AddAutoAnchor(SwFrmFmt *pFmt) * * Leave to later and set the correct location then. */ - if ((pFmt) && (pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR)) + if ((pFormat) && (pFormat->GetAnchor().GetAnchorId() != FLY_AS_CHAR)) { - m_pAnchorStck->AddAnchor(*m_pPaM->GetPoint(), pFmt); + m_pAnchorStck->AddAnchor(*m_pPaM->GetPoint(), pFormat); } - return pFmt; + return pFormat; } -SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, - SvxMSDffImportRec *pRecord, long nGrafAnchorCp, SwFrmFmt* pRetFrmFmt) +SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, + SvxMSDffImportRec *pRecord, long nGrafAnchorCp, SwFrameFormat* pRetFrameFormat) { SdrTextObj* pSdrTextObj; @@ -2766,7 +2766,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, const size_t nOrdNum = pSdrTextObj->GetOrdNum(); bool bEraseThisObject; InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS, - pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt, + pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrameFormat, (pSdrTextObj != pTrueObject) || (0 != pGroupObject), bEraseThisObject, 0, 0, 0, 0, pRecord); @@ -2799,8 +2799,8 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, m_pDrawPg->RemoveObject( pSdrTextObj->GetOrdNum() ); // und FrameFormat entfernen, da durch Grafik ersetzt (dies // loescht auch das Objekt) - m_rDoc.DelFrmFmt( pRetFrmFmt ); - pRetFrmFmt = 0; + m_rDoc.DelFrameFormat( pRetFrameFormat ); + pRetFrameFormat = 0; // auch den Objektmerker loeschen pRecord->pObj = 0; } @@ -2817,14 +2817,14 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject, pSdrTextObj->SetMergedItemSetAndBroadcast(aItemSet); } } - return pRetFrmFmt; + return pRetFrameFormat; } -SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, +SwFlyFrameFormat* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, RndStdIds eAnchor, WW8_FSPA *pF, SfxItemSet &rFlySet) { - SwFlyFrmFmt* pRetFrmFmt = 0; + SwFlyFrameFormat* pRetFrameFormat = 0; long nStartCp; long nEndCp; @@ -2840,7 +2840,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, Rectangle aInnerDist(pRecord->nDxTextLeft, pRecord->nDyTextTop, pRecord->nDxTextRight, pRecord->nDyTextBottom); - SwFmtFrmSize aFrmSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop); + SwFormatFrmSize aFrmSize(ATT_FIX_SIZE, pF->nXaRight - pF->nXaLeft, pF->nYaBottom - pF->nYaTop); aFrmSize.SetWidthSizeType(pRecord->bAutoWidth ? ATT_VAR_SIZE : ATT_FIX_SIZE); rFlySet.Put(aFrmSize); @@ -2851,13 +2851,13 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, if (pSdrTextObj && pSdrTextObj->IsVerticalWriting()) rFlySet.Put(SvxFrameDirectionItem(FRMDIR_VERT_TOP_RIGHT, RES_FRAMEDIR)); - pRetFrmFmt = m_rDoc.MakeFlySection(eAnchor, m_pPaM->GetPoint(), &rFlySet); - OSL_ENSURE(pRetFrmFmt->GetAnchor().GetAnchorId() == eAnchor, + pRetFrameFormat = m_rDoc.MakeFlySection(eAnchor, m_pPaM->GetPoint(), &rFlySet); + OSL_ENSURE(pRetFrameFormat->GetAnchor().GetAnchorId() == eAnchor, "Not the anchor type requested!"); // if everything is OK, find pointer on new object and correct // Z-order list (oder delete entry) - rpOurNewObject = CreateContactObject(pRetFrmFmt); + rpOurNewObject = CreateContactObject(pRetFrameFormat); // remove old object from the Z-Order list m_pMSDffManager->RemoveFromShapeOrder( rpObject ); @@ -2872,18 +2872,18 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, { /* We do not store our rpOutNewObject in the ShapeOrder because we - have a FrmFmt from which we can regenerate the contact object when + have a FrameFormat from which we can regenerate the contact object when we need it. Because, we can have frames anchored to paragraphs in header/footers and we can copy header/footers, if we do copy a header/footer with a nonpage anchored frame in it then the contact - objects are invalidated. Under this condition the FrmFmt will be + objects are invalidated. Under this condition the FrameFormat will be updated to reflect this change and can be used to get a new contact object, while a raw rpOutNewObject stored here becomes deleted and useless. */ m_pMSDffManager->StoreShapeOrder(pF->nSpId, (((sal_uLong)pRecord->aTextId.nTxBxS) << 16) + - pRecord->aTextId.nSequence, 0, pRetFrmFmt); + pRecord->aTextId.nSequence, 0, pRetFrameFormat); // The Contact object has to be inserted into the draw page, so // SwWW8ImplReader::LoadDoc1() can determine the z-order. @@ -2901,7 +2901,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, // save flags etc and reset them WW8ReaderSave aSave( this ); - MoveInsideFly(pRetFrmFmt); + MoveInsideFly(pRetFrameFormat); SwNodeIndex aStart(m_pPaM->GetPoint()->nNode); @@ -2915,15 +2915,15 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject, m_pWWZOrder->OutsideEscher(); - MoveOutsideFly(pRetFrmFmt, aSave.GetStartPos(),!bJoined); + MoveOutsideFly(pRetFrameFormat, aSave.GetStartPos(),!bJoined); aSave.Restore( this ); - StripNegativeAfterIndent(pRetFrmFmt); + StripNegativeAfterIndent(pRetFrameFormat); } } - return pRetFrmFmt; + return pRetFrameFormat; } void MatchEscherMirrorIntoFlySet(const SvxMSDffImportRec &rRecord, @@ -2942,11 +2942,11 @@ void MatchEscherMirrorIntoFlySet(const SvxMSDffImportRec &rRecord, } } -SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, +SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, WW8_FSPA *pF, SfxItemSet &rFlySet ) { - SwFlyFrmFmt* pRetFrmFmt = 0; + SwFlyFrameFormat* pRetFrameFormat = 0; long nWidthTw = pF->nXaRight - pF->nXaLeft; if (0 > nWidthTw) nWidthTw = 0; @@ -2956,7 +2956,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, ProcessEscherAlign(pRecord, pF, rFlySet, true); - rFlySet.Put(SwFmtFrmSize(ATT_FIX_SIZE, nWidthTw, nHeightTw)); + rFlySet.Put(SwFormatFrmSize(ATT_FIX_SIZE, nWidthTw, nHeightTw)); SfxItemSet aGrSet(m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, RES_GRFATR_END-1); @@ -2974,7 +2974,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, OUString aObjectName(rpObject->GetName()); if (OBJ_OLE2 == SdrObjKind(rpObject->GetObjIdentifier())) - pRetFrmFmt = InsertOle(*static_cast<SdrOle2Obj*>(rpObject), rFlySet, aGrSet); + pRetFrameFormat = InsertOle(*static_cast<SdrOle2Obj*>(rpObject), rFlySet, aGrSet); else { const SdrGrafObj *pGrf = static_cast<const SdrGrafObj*>(rpObject); @@ -2991,7 +2991,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, // as a linked graphic - if (GRAPHIC_NONE == eType || CanUseRemoteLink(aGrfName)) { - pRetFrmFmt = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, aGrfName, OUString(), 0, + pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, aGrfName, OUString(), 0, &rFlySet, &aGrSet, NULL); bDone = true; } @@ -2999,24 +2999,24 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, if (!bDone) { const Graphic& rGraph = pGrf->GetGraphic(); - pRetFrmFmt = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &rGraph, + pRetFrameFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &rGraph, &rFlySet, &aGrSet, NULL); } } - if (pRetFrmFmt) + if (pRetFrameFormat) { if( pRecord ) { if( OBJ_OLE2 != SdrObjKind(rpObject->GetObjIdentifier()) ) - SetAttributesAtGrfNode( pRecord, pRetFrmFmt, pF ); + SetAttributesAtGrfNode( pRecord, pRetFrameFormat, pF ); } // mehrfaches Auftreten gleicher Grafik-Namen vermeiden - m_aGrfNameGenerator.SetUniqueGraphName(pRetFrmFmt, aObjectName); + m_aGrfNameGenerator.SetUniqueGraphName(pRetFrameFormat, aObjectName); } // falls alles Ok, Zeiger auf neues Objekt ermitteln und Z-Order-Liste // entsprechend korrigieren (oder Eintrag loeschen) - rpOurNewObject = CreateContactObject(pRetFrmFmt); + rpOurNewObject = CreateContactObject(pRetFrameFormat); // altes Objekt aus der Z-Order-Liste entfernen m_pMSDffManager->RemoveFromShapeOrder( rpObject ); @@ -3033,7 +3033,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, // Kontakt-Objekt in die Z-Order-Liste und die Page aufnehmen if (rpOurNewObject) { - if (!m_bHdFtFtnEdn) + if (!m_bHdFtFootnoteEdn) m_pMSDffManager->StoreShapeOrder(pF->nSpId, 0, rpOurNewObject, 0 ); // Das Kontakt-Objekt MUSS in die Draw-Page gesetzt werden, damit in @@ -3045,7 +3045,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObject, m_bIsHeader || m_bIsFooter ); } } - return pRetFrmFmt; + return pRetFrameFormat; } void SwWW8ImplReader::GrafikCtor() // Fuer SVDraw und VCControls und Escher @@ -3076,11 +3076,11 @@ void SwWW8ImplReader::GrafikDtor() DELETEZ(m_pWWZOrder); // dito } -void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt) +void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrameFormat *pFormat) { - OSL_ENSURE(pFmt->GetAnchor().GetAnchorId() != FLY_AS_CHAR, + OSL_ENSURE(pFormat->GetAnchor().GetAnchorId() != FLY_AS_CHAR, "Don't use fltanchors with inline frames, slap!"); - NewAttr(rPos, SwFltAnchor(pFmt)); + NewAttr(rPos, SwFltAnchor(pFormat)); } void SwWW8FltAnchorStack::Flush() diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx index 6c5efc2bc0fd..e06a210663b2 100644 --- a/sw/source/filter/ww8/ww8graf2.cxx +++ b/sw/source/filter/ww8/ww8graf2.cxx @@ -344,9 +344,9 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj, } } -// MakeGrafNotInCntnt setzt eine nicht-Zeichengebundene Grafik +// MakeGrafNotInContent setzt eine nicht-Zeichengebundene Grafik // ( bGrafApo == true) -SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD, +SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet) { @@ -361,40 +361,40 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD, WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true); - SwFmtAnchor aAnchor(m_pSFlyPara->eAnchor); + SwFormatAnchor aAnchor(m_pSFlyPara->eAnchor); aAnchor.SetAnchor(m_pPaM->GetPoint()); aFlySet.Put(aAnchor); - aFlySet.Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); + aFlySet.Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); - SwFlyFrmFmt* pFlyFmt = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph, + SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph, &aFlySet, &rGrfSet, NULL); // Damit die Frames bei Einfuegen in existierendes Doc erzeugt werden: if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() && - (FLY_AT_PARA == pFlyFmt->GetAnchor().GetAnchorId())) + (FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId())) { - pFlyFmt->MakeFrms(); + pFlyFormat->MakeFrms(); } - return pFlyFmt; + return pFlyFormat; } -// MakeGrafInCntnt fuegt zeichengebundene Grafiken ein -SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic, +// MakeGrafInContent fuegt zeichengebundene Grafiken ein +SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic, const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet) { WW8FlySet aFlySet(*this, m_pPaM, rPic, rPD.nWidth, rPD.nHeight); - SwFrmFmt* pFlyFmt = 0; + SwFrameFormat* pFlyFormat = 0; if (rFileName.isEmpty() && m_nObjLocFc) // dann sollte ists ein OLE-Object - pFlyFmt = ImportOle(pGraph, &aFlySet, &rGrfSet); + pFlyFormat = ImportOle(pGraph, &aFlySet, &rGrfSet); - if( !pFlyFmt ) // dann eben als Graphic + if( !pFlyFormat ) // dann eben als Graphic { - pFlyFmt = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, rFileName, OUString(), pGraph, &aFlySet, + pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, rFileName, OUString(), pGraph, &aFlySet, &rGrfSet, NULL); } @@ -402,13 +402,13 @@ SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic, // ( nur wenn Auto-Breite ) if( m_pSFlyPara ) m_pSFlyPara->BoxUpWidth( rPD.nWidth ); - return pFlyFmt; + return pFlyFormat; } -SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt, +SwFrameFormat* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos ) { - SwFrmFmt* pRet = 0; + SwFrameFormat* pRet = 0; if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 ) return 0; @@ -433,9 +433,9 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt, } if( m_pWFlyPara && m_pWFlyPara->bGrafApo ) - pRet = MakeGrafNotInCntnt(aPD,pGraph,aFileName,aGrfSet); + pRet = MakeGrafNotInContent(aPD,pGraph,aFileName,aGrfSet); else - pRet = MakeGrafInCntnt(rPic,aPD,pGraph,aFileName,aGrfSet); + pRet = MakeGrafInContent(rPic,aPD,pGraph,aFileName,aGrfSet); delete pGraph; return pRet; } @@ -455,10 +455,10 @@ void SwWW8ImplReader::PicRead(SvStream *pDataStream, WW8_PIC *pPic, pDataStream->SeekRel(2); //cProps } -SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, - SwFrmFmt* pOldFlyFmt) +SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, + SwFrameFormat* pOldFlyFormat) { - SwFrmFmt* pRet = 0; + SwFrameFormat* pRet = 0; if ( ((m_pStrm == m_pDataStream ) && !m_nPicLocFc) || (m_nIniFlags & WW8FL_NO_GRAF) @@ -486,7 +486,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // Feld-Result ein WMF-aehnliches Struct vorkommt. if ((aPic.lcb >= 58) && !m_pDataStream->GetError()) { - if( m_pFlyFmtOfJustInsertedGraphic ) + if( m_pFlyFormatOfJustInsertedGraphic ) { // Soeben haben wir einen Grafik-Link ins Doc inserted. // Wir muessen ihn jetzt noch Positioniern und Skalieren. @@ -499,14 +499,14 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // is after the position if it is anchored in content; because this anchor add // a character into the textnode. #i2806# if (FLY_AS_CHAR == - m_pFlyFmtOfJustInsertedGraphic->GetAnchor().GetAnchorId() ) + m_pFlyFormatOfJustInsertedGraphic->GetAnchor().GetAnchorId() ) { aFlySet.ClearItem( RES_ANCHOR ); } - m_pFlyFmtOfJustInsertedGraphic->SetFmtAttr( aFlySet ); + m_pFlyFormatOfJustInsertedGraphic->SetFormatAttr( aFlySet ); - m_pFlyFmtOfJustInsertedGraphic = 0; + m_pFlyFormatOfJustInsertedGraphic = 0; } else if((0x64 == aPic.MFP.mm) || (0x66 == aPic.MFP.mm)) { @@ -579,7 +579,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, { WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true); - SwFmtAnchor aAnchor(m_pSFlyPara->eAnchor); + SwFormatAnchor aAnchor(m_pSFlyPara->eAnchor); aAnchor.SetAnchor(m_pPaM->GetPoint()); aFlySet.Put(aAnchor); @@ -601,7 +601,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, //Groesse aus der WinWord PIC-Struktur als //Grafik-Groesse nehmen - aAttrSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, aPD.nWidth, + aAttrSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPD.nWidth, aPD.nHeight ) ); } @@ -620,19 +620,19 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, // ggfs. altes AttrSet uebernehmen und // horiz. Positionierungs-Relation korrigieren - if( pOldFlyFmt ) + if( pOldFlyFormat ) { - aAttrSet.Put( pOldFlyFmt->GetAttrSet() ); - const SwFmtHoriOrient &rHori = pOldFlyFmt->GetHoriOrient(); + aAttrSet.Put( pOldFlyFormat->GetAttrSet() ); + const SwFormatHoriOrient &rHori = pOldFlyFormat->GetHoriOrient(); if( text::RelOrientation::FRAME == rHori.GetRelationOrient() ) { - aAttrSet.Put( SwFmtHoriOrient( rHori.GetPos(), + aAttrSet.Put( SwFormatHoriOrient( rHori.GetPos(), text::HoriOrientation::NONE, text::RelOrientation::PAGE_PRINT_AREA ) ); } } bool bTextObjWasGrouped = false; - if (pOldFlyFmt && pTextObj && pTextObj->GetUpGroup()) + if (pOldFlyFormat && pTextObj && pTextObj->GetUpGroup()) bTextObjWasGrouped = true; if (bTextObjWasGrouped) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index a216ed4b9d0e..04a1d7699735 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1201,7 +1201,7 @@ void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short nColl = SVBT16ToShort(pData); if (nColl < m_vColl.size()) { - SetTxtFmtCollAndListLevel( *m_pPaM, m_vColl[nColl] ); + SetTextFormatCollAndListLevel( *m_pPaM, m_vColl[nColl] ); m_bCpxStyle = true; } } @@ -1255,34 +1255,34 @@ SwFltStackEntry* SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt1 return pRet; } -long GetListFirstLineIndent(const SwNumFmt &rFmt) +long GetListFirstLineIndent(const SwNumFormat &rFormat) { - OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, + OSL_ENSURE( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, "<GetListFirstLineIndent> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" ); - SvxAdjust eAdj = rFmt.GetNumAdjust(); + SvxAdjust eAdj = rFormat.GetNumAdjust(); long nReverseListIndented; if (eAdj == SVX_ADJUST_RIGHT) - nReverseListIndented = -rFmt.GetCharTextDistance(); + nReverseListIndented = -rFormat.GetCharTextDistance(); else if (eAdj == SVX_ADJUST_CENTER) - nReverseListIndented = rFmt.GetFirstLineOffset()/2; + nReverseListIndented = rFormat.GetFirstLineOffset()/2; else - nReverseListIndented = rFmt.GetFirstLineOffset(); + nReverseListIndented = rFormat.GetFirstLineOffset(); return nReverseListIndented; } -static long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, +static long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFormat &rFormat, long &rFirstLinePos) { - OSL_ENSURE( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, + OSL_ENSURE( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION, "<lcl_GetTrueMargin> - misusage: position-and-space-mode does not equal LABEL_WIDTH_AND_POSITION" ); - const long nBodyIndent = rLR.GetTxtLeft(); - const long nFirstLineDiff = rLR.GetTxtFirstLineOfst(); + const long nBodyIndent = rLR.GetTextLeft(); + const long nFirstLineDiff = rLR.GetTextFirstLineOfst(); rFirstLinePos = nBodyIndent + nFirstLineDiff; - const long nPseudoListBodyIndent = rFmt.GetAbsLSpace(); - const long nReverseListIndented = GetListFirstLineIndent(rFmt); + const long nPseudoListBodyIndent = rFormat.GetAbsLSpace(); + const long nReverseListIndented = GetListFirstLineIndent(rFormat); long nExtraListIndent = nPseudoListBodyIndent + nReverseListIndented; return nExtraListIndent > 0 ? nExtraListIndent : 0; @@ -1291,56 +1291,56 @@ static long lcl_GetTrueMargin(const SvxLRSpaceItem &rLR, const SwNumFmt &rFmt, // #i103711# // #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, - const SwNumFmt &rFmt, + const SwNumFormat &rFormat, const bool bFirstLineOfstSet, const bool bLeftIndentSet ) { - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { long nWantedFirstLinePos; - long nExtraListIndent = lcl_GetTrueMargin(rLR, rFmt, nWantedFirstLinePos); - rLR.SetTxtLeft(nWantedFirstLinePos - nExtraListIndent); - rLR.SetTxtFirstLineOfst(0); + long nExtraListIndent = lcl_GetTrueMargin(rLR, rFormat, nWantedFirstLinePos); + rLR.SetTextLeft(nWantedFirstLinePos - nExtraListIndent); + rLR.SetTextFirstLineOfst(0); } - else if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + else if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { if ( !bFirstLineOfstSet && bLeftIndentSet && - rFmt.GetFirstLineIndent() != 0 ) + rFormat.GetFirstLineIndent() != 0 ) { - rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); + rLR.SetTextFirstLineOfst( rFormat.GetFirstLineIndent() ); } else if ( bFirstLineOfstSet && !bLeftIndentSet && - rFmt.GetIndentAt() != 0 ) + rFormat.GetIndentAt() != 0 ) { - rLR.SetTxtLeft( rFmt.GetIndentAt() ); + rLR.SetTextLeft( rFormat.GetIndentAt() ); } else if (!bFirstLineOfstSet && !bLeftIndentSet ) { - if ( rFmt.GetFirstLineIndent() != 0 ) + if ( rFormat.GetFirstLineIndent() != 0 ) { - rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() ); + rLR.SetTextFirstLineOfst( rFormat.GetFirstLineIndent() ); } - if ( rFmt.GetIndentAt() != 0 ) + if ( rFormat.GetIndentAt() != 0 ) { - rLR.SetTxtLeft( rFmt.GetIndentAt() ); + rLR.SetTextLeft( rFormat.GetIndentAt() ); } } } } -const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos, - const SwTxtNode &rTxtNode) +const SwNumFormat* SwWW8FltControlStack::GetNumFormatFromStack(const SwPosition &rPos, + const SwTextNode &rTextNode) { - const SwNumFmt *pRet = 0; + const SwNumFormat *pRet = 0; const SfxPoolItem *pItem = GetStackAttr(rPos, RES_FLTR_NUMRULE); - if (pItem && rTxtNode.GetNumRule()) + if (pItem && rTextNode.GetNumRule()) { - if (rTxtNode.IsCountedInList()) + if (rTextNode.IsCountedInList()) { OUString sName(static_cast<const SfxStringItem*>(pItem)->GetValue()); const SwNumRule *pRule = pDoc->FindNumRulePtr(sName); if (pRule) - pRet = GetNumFmtFromSwNumRuleLevel(*pRule, rTxtNode.GetActualListLevel()); + pRet = GetNumFormatFromSwNumRuleLevel(*pRule, rTextNode.GetActualListLevel()); } } return pRet; @@ -1431,31 +1431,31 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, for(; nStart <= nEnd; ++nStart) { SwNode* pNode = pDoc->GetNodes()[ nStart ]; - if (!pNode || !pNode->IsTxtNode()) + if (!pNode || !pNode->IsTextNode()) continue; - SwCntntNode* pNd = static_cast<SwCntntNode*>(pNode); + SwContentNode* pNd = static_cast<SwContentNode*>(pNode); SvxLRSpaceItem aOldLR = static_cast<const SvxLRSpaceItem&>(pNd->GetAttr(RES_LR_SPACE)); - SwTxtNode *pTxtNode = static_cast<SwTxtNode*>(pNode); + SwTextNode *pTextNode = static_cast<SwTextNode*>(pNode); - const SwNumFmt *pNum = 0; - pNum = GetNumFmtFromStack( *aRegion.GetPoint(), *pTxtNode ); + const SwNumFormat *pNum = 0; + pNum = GetNumFormatFromStack( *aRegion.GetPoint(), *pTextNode ); if (!pNum) { - pNum = GetNumFmtFromTxtNode(*pTxtNode); + pNum = GetNumFormatFromTextNode(*pTextNode); } if ( pNum ) { // #i103711# const bool bFirstLineIndentSet = - ( rReader.m_aTxtNodesHavingFirstLineOfstSet.end() != - rReader.m_aTxtNodesHavingFirstLineOfstSet.find( pNode ) ); + ( rReader.m_aTextNodesHavingFirstLineOfstSet.end() != + rReader.m_aTextNodesHavingFirstLineOfstSet.find( pNode ) ); // #i105414# const bool bLeftIndentSet = - ( rReader.m_aTxtNodesHavingLeftIndentSet.end() != - rReader.m_aTxtNodesHavingLeftIndentSet.find( pNode ) ); + ( rReader.m_aTextNodesHavingLeftIndentSet.end() != + rReader.m_aTextNodesHavingLeftIndentSet.find( pNode ) ); SyncIndentWithList( aNewLR, *pNum, bFirstLineIndentSet, bLeftIndentSet ); @@ -1491,18 +1491,18 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwPaM aRegion(rTmpPos); if (rEntry.MakeRegion(pDoc, aRegion, false)) { - SwFrmFmt *pFrm; + SwFrameFormat *pFrm; // If we have just one single inline graphic then // don't insert a field for the single frame, set // the frames hyperlink field attribute directly. if (0 != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion))) { - const SwFmtINetFmt *pAttr = static_cast<const SwFmtINetFmt *>( + const SwFormatINetFormat *pAttr = static_cast<const SwFormatINetFormat *>( rEntry.pAttr); - SwFmtURL aURL; + SwFormatURL aURL; aURL.SetURL(pAttr->GetValue(), false); aURL.SetTargetFrameName(pAttr->GetTargetFrame()); - pFrm->SetFmtAttr(aURL); + pFrm->SetFormatAttr(aURL); } else { @@ -1517,13 +1517,13 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, } } -const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos, +const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos, sal_uInt16 nWhich) { const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich); if (!pItem) { - SwCntntNode const*const pNd = rPos.nNode.GetNode().GetCntntNode(); + SwContentNode const*const pNd = rPos.nNode.GetNode().GetContentNode(); if (!pNd) pItem = &pDoc->GetAttrPool().GetDefaultItem(nWhich); else @@ -1547,11 +1547,11 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos, If we're hunting for a character property, try and exact position within the text node for lookup */ - if (pNd->IsTxtNode()) + if (pNd->IsTextNode()) { const sal_Int32 nPos = rPos.nContent.GetIndex(); SfxItemSet aSet(pDoc->GetAttrPool(), nWhich, nWhich); - if (pNd->GetTxtNode()->GetAttr(aSet, nPos, nPos)) + if (pNd->GetTextNode()->GetAttr(aSet, nPos, nPos)) pItem = aSet.GetItem(nWhich); } @@ -1577,8 +1577,8 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos, ( (rEntry.m_aMkPos.m_nNode <= aFltPos.m_nNode) && (rEntry.m_aPtPos.m_nNode >= aFltPos.m_nNode) && - (rEntry.m_aMkPos.m_nCntnt <= aFltPos.m_nCntnt) && - (rEntry.m_aPtPos.m_nCntnt > aFltPos.m_nCntnt) + (rEntry.m_aMkPos.m_nContent <= aFltPos.m_nContent) && + (rEntry.m_aPtPos.m_nContent > aFltPos.m_nContent) ) ) /* @@ -1593,19 +1593,19 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos, return 0; } -bool SwWW8FltRefStack::IsFtnEdnBkmField( - const SwFmtFld& rFmtFld, +bool SwWW8FltRefStack::IsFootnoteEdnBkmField( + const SwFormatField& rFormatField, sal_uInt16& rBkmNo) { - const SwField* pFld = rFmtFld.GetField(); + const SwField* pField = rFormatField.GetField(); sal_uInt16 nSubType; - if(pFld && (RES_GETREFFLD == pFld->Which()) - && ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType)) - && !static_cast<const SwGetRefField*>(pFld)->GetSetRefName().isEmpty()) + if(pField && (RES_GETREFFLD == pField->Which()) + && ((REF_FOOTNOTE == (nSubType = pField->GetSubType())) || (REF_ENDNOTE == nSubType)) + && !static_cast<const SwGetRefField*>(pField)->GetSetRefName().isEmpty()) { const IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess(); IDocumentMarkAccess::const_iterator_t ppBkmk = - pMarkAccess->findMark( static_cast<const SwGetRefField*>(pFld)->GetSetRefName() ); + pMarkAccess->findMark( static_cast<const SwGetRefField*>(pField)->GetSetRefName() ); if(ppBkmk != pMarkAccess->getAllMarksEnd()) { // find Sequence No of corresponding Foot-/Endnote @@ -1631,33 +1631,33 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos, case RES_TXTATR_INPUTFIELD: { SwNodeIndex aIdx(rEntry.m_aMkPos.m_nNode, 1); - SwPaM aPaM(aIdx, rEntry.m_aMkPos.m_nCntnt); + SwPaM aPaM(aIdx, rEntry.m_aMkPos.m_nContent); - SwFmtFld& rFmtFld = *static_cast<SwFmtFld*>(rEntry.pAttr); - SwField* pFld = rFmtFld.GetField(); + SwFormatField& rFormatField = *static_cast<SwFormatField*>(rEntry.pAttr); + SwField* pField = rFormatField.GetField(); - if (!RefToVar(pFld, rEntry)) + if (!RefToVar(pField, rEntry)) { sal_uInt16 nBkmNo; - if( IsFtnEdnBkmField(rFmtFld, nBkmNo) ) + if( IsFootnoteEdnBkmField(rFormatField, nBkmNo) ) { ::sw::mark::IMark const * const pMark = (pDoc->getIDocumentMarkAccess()->getAllMarksBegin() + nBkmNo)->get(); const SwPosition& rBkMrkPos = pMark->GetMarkPos(); - SwTxtNode* pTxt = rBkMrkPos.nNode.GetNode().GetTxtNode(); - if( pTxt && rBkMrkPos.nContent.GetIndex() ) + SwTextNode* pText = rBkMrkPos.nNode.GetNode().GetTextNode(); + if( pText && rBkMrkPos.nContent.GetIndex() ) { - SwTxtAttr* const pFtn = pTxt->GetTxtAttrForCharAt( + SwTextAttr* const pFootnote = pText->GetTextAttrForCharAt( rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN ); - if( pFtn ) + if( pFootnote ) { - sal_uInt16 nRefNo = static_cast<SwTxtFtn*>(pFtn)->GetSeqRefNo(); + sal_uInt16 nRefNo = static_cast<SwTextFootnote*>(pFootnote)->GetSeqRefNo(); - static_cast<SwGetRefField*>(pFld)->SetSeqNo( nRefNo ); + static_cast<SwGetRefField*>(pField)->SetSeqNo( nRefNo ); - if( pFtn->GetFtn().IsEndNote() ) - static_cast<SwGetRefField*>(pFld)->SetSubType(REF_ENDNOTE); + if( pFootnote->GetFootnote().IsEndNote() ) + static_cast<SwGetRefField*>(pField)->SetSubType(REF_ENDNOTE); } } } @@ -1715,19 +1715,19 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen) SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP); - const SwTxtFmtColl* pSty = 0; + const SwTextFormatColl* pSty = 0; sal_uInt16 nTabBase; if (m_pAktColl && m_nAktColl < m_vColl.size()) // StyleDef { nTabBase = m_vColl[m_nAktColl].nBase; if (nTabBase < m_vColl.size()) // Based On - pSty = static_cast<const SwTxtFmtColl*>(m_vColl[nTabBase].pFmt); + pSty = static_cast<const SwTextFormatColl*>(m_vColl[nTabBase].pFormat); } else { // Text nTabBase = m_nAktColl; if (m_nAktColl < m_vColl.size()) - pSty = static_cast<const SwTxtFmtColl*>(m_vColl[m_nAktColl].pFmt); + pSty = static_cast<const SwTextFormatColl*>(m_vColl[m_nAktColl].pFormat); //TODO: figure out else here } @@ -1757,7 +1757,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen) // current one (prevent loop) aLoopWatch.insert(reinterpret_cast<size_t>(pSty)); if (nTabBase < m_vColl.size()) - pSty = static_cast<const SwTxtFmtColl*>(m_vColl[nTabBase].pFmt); + pSty = static_cast<const SwTextFormatColl*>(m_vColl[nTabBase].pFormat); //TODO figure out the else branch if (aLoopWatch.find(reinterpret_cast<size_t>(pSty)) != @@ -2048,7 +2048,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : mcSymbol(pRdr->m_cSymbol), mbIgnoreText(pRdr->m_bIgnoreText), mbSymbol(pRdr->m_bSymbol), - mbHdFtFtnEdn(pRdr->m_bHdFtFtnEdn), + mbHdFtFootnoteEdn(pRdr->m_bHdFtFootnoteEdn), mbTxbxFlySection(pRdr->m_bTxbxFlySection), mbAnl(pRdr->m_bAnl), mbInHyperlink(pRdr->m_bInHyperlink), @@ -2058,7 +2058,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) : mbFirstPara(pRdr->m_bFirstPara) { pRdr->m_bSymbol = false; - pRdr->m_bHdFtFtnEdn = true; + pRdr->m_bHdFtFootnoteEdn = true; pRdr->m_bTxbxFlySection = pRdr->m_bAnl = pRdr->m_bPgSecBreak = pRdr->m_bWasParaEnd = pRdr->m_bHasBorder = false; pRdr->m_bFirstPara = true; @@ -2103,7 +2103,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->m_cSymbol = mcSymbol; pRdr->m_bSymbol = mbSymbol; pRdr->m_bIgnoreText = mbIgnoreText; - pRdr->m_bHdFtFtnEdn = mbHdFtFtnEdn; + pRdr->m_bHdFtFootnoteEdn = mbHdFtFootnoteEdn; pRdr->m_bTxbxFlySection = mbTxbxFlySection; pRdr->m_nInTable = mnInTable; pRdr->m_bAnl = mbAnl; @@ -2138,14 +2138,14 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr ) pRdr->m_aFieldStack.swap(maOldFieldStack); } -void SwWW8ImplReader::Read_HdFtFtnText( const SwNodeIndex* pSttIdx, +void SwWW8ImplReader::Read_HdFtFootnoteText( const SwNodeIndex* pSttIdx, long nStartCp, long nLen, ManTypes nType ) { // Saves Flags (amongst other things) and resets them WW8ReaderSave aSave( this ); m_pPaM->GetPoint()->nNode = pSttIdx->GetIndex() + 1; - m_pPaM->GetPoint()->nContent.Assign( m_pPaM->GetCntntNode(), 0 ); + m_pPaM->GetPoint()->nContent.Assign( m_pPaM->GetContentNode(), 0 ); // Read Text for Header, Footer or Footnote ReadText( nStartCp, nLen, nType ); // Ignore Sepx when doing so @@ -2203,19 +2203,19 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) DateTime aDate = msfilter::util::DTTM2DateTime(nDateTime); - OUString sTxt; - OutlinerParaObject *pOutliner = ImportAsOutliner( sTxt, pRes->nCp2OrIdx, + OUString sText; + OutlinerParaObject *pOutliner = ImportAsOutliner( sText, pRes->nCp2OrIdx, pRes->nCp2OrIdx + pRes->nMemLen, MAN_AND ); - m_pFmtOfJustInsertedApo = 0; + m_pFormatOfJustInsertedApo = 0; SwPostItField aPostIt( - static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_POSTITFLD)), sAuthor, - sTxt, sInitials, OUString(), aDate ); + static_cast<SwPostItFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), sAuthor, + sText, sInitials, OUString(), aDate ); aPostIt.SetTextObject(pOutliner); SwPaM aEnd(*m_pPaM->End(), *m_pPaM->End()); m_pCtrlStck->NewAttr(*aEnd.GetPoint(), SvxCharHiddenItem(false, RES_CHRATR_HIDDEN)); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(aEnd, SwFmtFld(aPostIt)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(aEnd, SwFormatField(aPostIt)); m_pCtrlStck->SetAttr(*aEnd.GetPoint(), RES_CHRATR_HIDDEN); // If this is a range, make sure that it ends after the just inserted character, not before it. m_pReffedStck->MoveAttrs(*aEnd.GetPoint()); @@ -2224,9 +2224,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes) } void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen, - SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth) + SwFrameFormat &rHdFtFormat, sal_uInt16 nPageWidth) { - const SwNodeIndex* pSttIdx = rHdFtFmt.GetCntnt().GetCntntIdx(); + const SwNodeIndex* pSttIdx = rHdFtFormat.GetContent().GetContentIdx(); OSL_ENSURE(pSttIdx, "impossible"); if (!pSttIdx) return; @@ -2234,23 +2234,23 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen, SwPosition aTmpPos(*m_pPaM->GetPoint()); m_pPaM->GetPoint()->nNode = pSttIdx->GetIndex() + 1; - m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetCntntNode(), 0); + m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetContentNode(), 0); - SwFlyFrmFmt *pFrame = m_rDoc.MakeFlySection(FLY_AT_PARA, m_pPaM->GetPoint()); + SwFlyFrameFormat *pFrame = m_rDoc.MakeFlySection(FLY_AT_PARA, m_pPaM->GetPoint()); - SwFmtAnchor aAnch( pFrame->GetAnchor() ); + SwFormatAnchor aAnch( pFrame->GetAnchor() ); aAnch.SetType( FLY_AT_PARA ); - pFrame->SetFmtAttr( aAnch ); - SwFmtFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY); + pFrame->SetFormatAttr( aAnch ); + SwFormatFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY); SwFrmSize eFrmSize = ATT_MIN_SIZE; if( eFrmSize != aSz.GetWidthSizeType() ) aSz.SetWidthSizeType( eFrmSize ); - pFrame->SetFmtAttr(aSz); - pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT)); - pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO + pFrame->SetFormatAttr(aSz); + pFrame->SetFormatAttr(SwFormatSurround(SURROUND_THROUGHT)); + pFrame->SetFormatAttr(SwFormatHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO // #i43427# - send frame for header/footer into background. - pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) ); + pFrame->SetFormatAttr( SvxOpaqueItem( RES_OPAQUE, false ) ); SdrObject* pFrmObj = CreateContactObject( pFrame ); OSL_ENSURE( pFrmObj, "<SwWW8ImplReader::Read_HdFtTextAsHackedFrame(..)> - missing SdrObject instance" ); @@ -2260,22 +2260,22 @@ void SwWW8ImplReader::Read_HdFtTextAsHackedFrame(long nStart, long nLen, } MoveInsideFly(pFrame); - const SwNodeIndex* pHackIdx = pFrame->GetCntnt().GetCntntIdx(); + const SwNodeIndex* pHackIdx = pFrame->GetContent().GetContentIdx(); - Read_HdFtFtnText(pHackIdx, nStart, nLen - 1, MAN_HDFT); + Read_HdFtFootnoteText(pHackIdx, nStart, nLen - 1, MAN_HDFT); MoveOutsideFly(pFrame, aTmpPos); } -void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrmFmt* pHdFtFmt) +void SwWW8ImplReader::Read_HdFtText(long nStart, long nLen, SwFrameFormat* pHdFtFormat) { - const SwNodeIndex* pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx(); + const SwNodeIndex* pSttIdx = pHdFtFormat->GetContent().GetContentIdx(); if (!pSttIdx) return; SwPosition aTmpPos( *m_pPaM->GetPoint() ); // Remember old cursor position - Read_HdFtFtnText(pSttIdx, nStart, nLen - 1, MAN_HDFT); + Read_HdFtFootnoteText(pSttIdx, nStart, nLen - 1, MAN_HDFT); *m_pPaM->GetPoint() = aTmpPos; } @@ -2357,11 +2357,11 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev, bool bFooter = (nI & ( WW8_FOOTER_EVEN | WW8_FOOTER_ODD | WW8_FOOTER_FIRST )) != 0; - SwFrmFmt& rFmt = bUseLeft ? pPD->GetLeft() + SwFrameFormat& rFormat = bUseLeft ? pPD->GetLeft() : bUseFirst ? pPD->GetFirstMaster() : pPD->GetMaster(); - SwFrmFmt* pHdFtFmt; + SwFrameFormat* pHdFtFormat; // If we have empty first page header and footer. bool bNoFirst = !(grpfIhdt & WW8_HEADER_FIRST) && !(grpfIhdt & WW8_FOOTER_FIRST); if (bFooter) @@ -2369,26 +2369,26 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev, m_bIsFooter = true; //#i17196# Cannot have left without right if (!bDisabledFirst - && !pPD->GetMaster().GetFooter().GetFooterFmt()) - pPD->GetMaster().SetFmtAttr(SwFmtFooter(true)); + && !pPD->GetMaster().GetFooter().GetFooterFormat()) + pPD->GetMaster().SetFormatAttr(SwFormatFooter(true)); if (bUseLeft) - pPD->GetLeft().SetFmtAttr(SwFmtFooter(true)); + pPD->GetLeft().SetFormatAttr(SwFormatFooter(true)); if (bUseFirst || (rSection.maSep.fTitlePage && bNoFirst)) - pPD->GetFirstMaster().SetFmtAttr(SwFmtFooter(true)); - pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetFooter().GetFooterFmt()); + pPD->GetFirstMaster().SetFormatAttr(SwFormatFooter(true)); + pHdFtFormat = const_cast<SwFrameFormat*>(rFormat.GetFooter().GetFooterFormat()); } else { m_bIsHeader = true; //#i17196# Cannot have left without right if (!bDisabledFirst - && !pPD->GetMaster().GetHeader().GetHeaderFmt()) - pPD->GetMaster().SetFmtAttr(SwFmtHeader(true)); + && !pPD->GetMaster().GetHeader().GetHeaderFormat()) + pPD->GetMaster().SetFormatAttr(SwFormatHeader(true)); if (bUseLeft) - pPD->GetLeft().SetFmtAttr(SwFmtHeader(true)); + pPD->GetLeft().SetFormatAttr(SwFormatHeader(true)); if (bUseFirst || (rSection.maSep.fTitlePage && bNoFirst)) - pPD->GetFirstMaster().SetFmtAttr(SwFmtHeader(true)); - pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetHeader().GetHeaderFmt()); + pPD->GetFirstMaster().SetFormatAttr(SwFormatHeader(true)); + pHdFtFormat = const_cast<SwFrameFormat*>(rFormat.GetHeader().GetHeaderFormat()); } if (bOk) @@ -2401,11 +2401,11 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev, if (bHackRequired) { - Read_HdFtTextAsHackedFrame(start, nLen, *pHdFtFmt, + Read_HdFtTextAsHackedFrame(start, nLen, *pHdFtFormat, static_cast< sal_uInt16 >(rSection.GetTextAreaWidth()) ); } else - Read_HdFtText(start, nLen, pHdFtFmt); + Read_HdFtText(start, nLen, pHdFtFormat); } else if (!bOk && pPrev) CopyPageDescHdFt(pPrev, pPD, nI); @@ -2442,14 +2442,14 @@ void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, } -void SwWW8ImplReader::AppendTxtNode(SwPosition& rPos) +void SwWW8ImplReader::AppendTextNode(SwPosition& rPos) { - SwTxtNode* pTxt = m_pPaM->GetNode().GetTxtNode(); + SwTextNode* pText = m_pPaM->GetNode().GetTextNode(); const SwNumRule* pRule = NULL; - if (pTxt != NULL) - pRule = sw::util::GetNumRuleFromTxtNode(*pTxt); + if (pText != NULL) + pRule = sw::util::GetNumRuleFromTextNode(*pText); if ( pRule && !m_pWDop->fDontUseHTMLAutoSpacing && @@ -2501,7 +2501,7 @@ void SwWW8ImplReader::AppendTxtNode(SwPosition& rPos) m_bFirstPara = false; - m_rDoc.getIDocumentContentOperations().AppendTxtNode(rPos); + m_rDoc.getIDocumentContentOperations().AppendTextNode(rPos); // We can flush all anchored graphics at the end of a paragraph. m_pAnchorStck->Flush(); @@ -2512,7 +2512,7 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper ) bool bRet = false; const SwPosition* pSpacingPos = rMyPam.GetPoint(); - const SvxULSpaceItem* pULSpaceItem = static_cast<const SvxULSpaceItem*>(m_pCtrlStck->GetFmtAttr(*pSpacingPos, RES_UL_SPACE)); + const SvxULSpaceItem* pULSpaceItem = static_cast<const SvxULSpaceItem*>(m_pCtrlStck->GetFormatAttr(*pSpacingPos, RES_UL_SPACE)); if(pULSpaceItem != 0) { @@ -2524,9 +2524,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper ) aUL.SetLower( static_cast< sal_uInt16 >(nSpace) ); const sal_Int32 nEnd = pSpacingPos->nContent.GetIndex(); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), 0); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), 0); m_pCtrlStck->NewAttr(*pSpacingPos, aUL); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), nEnd); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), nEnd); m_pCtrlStck->SetAttr(*pSpacingPos, RES_UL_SPACE); bRet = true; } @@ -2652,9 +2652,9 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos); // Look to see if we are in a Table, but Table in foot/end note not allowed - bool bStartTab = (m_nInTable < nCellLevel) && !m_bFtnEdn; + bool bStartTab = (m_nInTable < nCellLevel) && !m_bFootnoteEdn; - bool bStopTab = m_bWasTabRowEnd && (m_nInTable > nCellLevel) && !m_bFtnEdn; + bool bStopTab = m_bWasTabRowEnd && (m_nInTable > nCellLevel) && !m_bFootnoteEdn; m_bWasTabRowEnd = false; // must be deactivated right here to prevent next // WW8TabDesc::TableCellEnd() from making nonsense @@ -2734,7 +2734,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) m_pPlcxMan->GetPap()->Restore( aSave ); } } - } while (!m_bFtnEdn && (m_nInTable < nCellLevel)); + } while (!m_bFootnoteEdn && (m_nInTable < nCellLevel)); return bTableRowEnd; } @@ -2750,7 +2750,7 @@ rtl_TextEncoding SwWW8ImplReader::GetCharSetFromLanguage() correctly set in the character runs involved, so its hard to reproduce documents that require this to be sure of the process involved. */ - const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFmtAttr(RES_CHRATR_LANGUAGE)); + const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFormatAttr(RES_CHRATR_LANGUAGE)); LanguageType eLang = pLang ? pLang->GetLanguage() : LANGUAGE_SYSTEM; ::com::sun::star::lang::Locale aLocale(LanguageTag::convertToLocale(eLang)); return msfilter::util::getBestTextEncodingFromLocale(aLocale); @@ -2768,7 +2768,7 @@ rtl_TextEncoding SwWW8ImplReader::GetCJKCharSetFromLanguage() correctly set in the character runs involved, so its hard to reproduce documents that require this to be sure of the process involved. */ - const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFmtAttr(RES_CHRATR_CJK_LANGUAGE)); + const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFormatAttr(RES_CHRATR_CJK_LANGUAGE)); LanguageType eLang = pLang ? pLang->GetLanguage() : LANGUAGE_SYSTEM; ::com::sun::star::lang::Locale aLocale(LanguageTag::convertToLocale(eLang)); return msfilter::util::getBestTextEncodingFromLocale(aLocale); @@ -2787,8 +2787,8 @@ rtl_TextEncoding SwWW8ImplReader::GetCurrentCharSet() { if (!m_aFontSrcCharSets.empty()) eSrcCharSet = m_aFontSrcCharSets.top(); - if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && m_nCharFmt >= 0 && (size_t)m_nCharFmt < m_vColl.size() ) - eSrcCharSet = m_vColl[m_nCharFmt].GetCharSet(); + if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && m_nCharFormat >= 0 && (size_t)m_nCharFormat < m_vColl.size() ) + eSrcCharSet = m_vColl[m_nCharFormat].GetCharSet(); if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && StyleExists(m_nAktColl) && m_nAktColl < m_vColl.size()) eSrcCharSet = m_vColl[m_nAktColl].GetCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) @@ -2811,8 +2811,8 @@ rtl_TextEncoding SwWW8ImplReader::GetCurrentCJKCharSet() { if (!m_aFontSrcCJKCharSets.empty()) eSrcCharSet = m_aFontSrcCJKCharSets.top(); - if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && m_nCharFmt >= 0 && (size_t)m_nCharFmt < m_vColl.size() ) - eSrcCharSet = m_vColl[m_nCharFmt].GetCJKCharSet(); + if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) && m_nCharFormat >= 0 && (size_t)m_nCharFormat < m_vColl.size() ) + eSrcCharSet = m_vColl[m_nCharFormat].GetCJKCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW && StyleExists(m_nAktColl) && m_nAktColl < m_vColl.size()) eSrcCharSet = m_vColl[m_nAktColl].GetCJKCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) @@ -3022,7 +3022,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp the language is not Japanese */ - const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CJK_LANGUAGE); + const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CJK_LANGUAGE); if (pItem != NULL && LANGUAGE_JAPANESE != static_cast<const SvxLanguageItem *>(pItem)->GetLanguage()) { SAL_WARN("sw.ww8", "discarding word95 RTL_TEXTENCODING_MS_932 encoding"); @@ -3051,7 +3051,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCp sal_uInt16 nUCode; sal_uInt16 nCTLLang = 0; - const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE); + const SfxPoolItem * pItem = GetFormatAttr(RES_CHRATR_CTL_LANGUAGE); if (pItem != NULL) nCTLLang = static_cast<const SvxLanguageItem *>(pItem)->GetLanguage(); @@ -3243,10 +3243,10 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString sal_Int32 nLen = rAddString.getLength(); OUString sParagraphText; - const SwCntntNode *pCntNd = m_pPaM->GetCntntNode(); - const SwTxtNode* pNd = pCntNd ? pCntNd->GetTxtNode() : NULL; + const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL; if (pNd) - sParagraphText = pNd->GetTxt(); + sParagraphText = pNd->GetText(); sal_Int32 nParaOffset = sParagraphText.getLength(); sParagraphText = sParagraphText + rAddString; @@ -3309,9 +3309,9 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString } else { - const SvxFontItem *pSourceFont = static_cast<const SvxFontItem*>(GetFmtAttr(nForceFromFontId)); + const SvxFontItem *pSourceFont = static_cast<const SvxFontItem*>(GetFormatAttr(nForceFromFontId)); sal_uInt16 nDestId = aIds[nWriterScript-1]; - const SvxFontItem *pDestFont = static_cast<const SvxFontItem*>(GetFmtAttr(nDestId)); + const SvxFontItem *pDestFont = static_cast<const SvxFontItem*>(GetFormatAttr(nDestId)); bWriterWillUseSameFontAsWordAutomatically = sameFontIgnoringIrrelevantFields(*pSourceFont, *pDestFont); } } @@ -3319,11 +3319,11 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString // Writer won't use the same font as word, so force the issue if (!bWriterWillUseSameFontAsWordAutomatically) { - const SvxFontItem *pSourceFont = static_cast<const SvxFontItem*>(GetFmtAttr(nForceFromFontId)); + const SvxFontItem *pSourceFont = static_cast<const SvxFontItem*>(GetFormatAttr(nForceFromFontId)); for (size_t i = 0; i < SAL_N_ELEMENTS(aIds); ++i) { - const SvxFontItem *pDestFont = static_cast<const SvxFontItem*>(GetFmtAttr(aIds[i])); + const SvxFontItem *pDestFont = static_cast<const SvxFontItem*>(GetFormatAttr(aIds[i])); aForced[i] = aIds[i] != nForceFromFontId && *pSourceFont != *pDestFont; if (aForced[i]) { @@ -3368,15 +3368,15 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString) } #endif - const SwCntntNode *pCntNd = m_pPaM->GetCntntNode(); - const SwTxtNode* pNd = pCntNd ? pCntNd->GetTxtNode() : NULL; + const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : NULL; OSL_ENSURE(pNd, "What the hell, where's my text node"); if (!pNd) return; - const sal_Int32 nCharsLeft = SAL_MAX_INT32 - pNd->GetTxt().getLength(); + const sal_Int32 nCharsLeft = SAL_MAX_INT32 - pNd->GetText().getLength(); if (nCharsLeft > 0) { if (rAddString.getLength() <= nCharsLeft) @@ -3386,13 +3386,13 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString) else { m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, rAddString.copy(0, nCharsLeft)); - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, rAddString.copy(nCharsLeft)); } } else { - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, rAddString); } @@ -3444,12 +3444,12 @@ bool SwWW8ImplReader::HandlePageBreakChar() if (!m_nInTable) { bool IsTemp=true; - SwTxtNode* pTemp = m_pPaM->GetNode().GetTxtNode(); - if (pTemp && pTemp->GetTxt().isEmpty() + SwTextNode* pTemp = m_pPaM->GetNode().GetTextNode(); + if (pTemp && pTemp->GetText().isEmpty() && (m_bFirstPara || m_bFirstParaOfPage)) { IsTemp = false; - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE)); } @@ -3465,9 +3465,9 @@ bool SwWW8ImplReader::HandlePageBreakChar() bParaEndAdded = true; if (0 >= m_pPaM->GetPoint()->nContent.GetIndex()) { - if (SwTxtNode* pTxtNode = m_pPaM->GetNode().GetTxtNode()) + if (SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode()) { - pTxtNode->SetAttr( + pTextNode->SetAttr( *GetDfltAttr(RES_PARATR_NUMRULE)); } } @@ -3507,10 +3507,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) case 0: { // Page number - SwPageNumberField aFld( - static_cast<SwPageNumberFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( + SwPageNumberField aField( + static_cast<SwPageNumberFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_PAGENUMBERFLD )), PG_RANDOM, SVX_NUM_ARABIC); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); } break; case 0xe: @@ -3520,10 +3520,10 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) else if (!m_nInTable) { // Always insert a txtnode for a column break, e.g. ## - SwCntntNode *pCntNd=m_pPaM->GetCntntNode(); + SwContentNode *pCntNd=m_pPaM->GetContentNode(); if (pCntNd!=NULL && pCntNd->Len()>0) // if par is empty not break is needed - AppendTxtNode(*m_pPaM->GetPoint()); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + AppendTextNode(*m_pPaM->GetPoint()); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); } break; case 0x7: @@ -3600,7 +3600,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) } if( !bReadObj ) { - SwFrmFmt *pResult = 0; + SwFrameFormat *pResult = 0; if (m_bObj) pResult = ImportOle(); else if (m_bSpec) @@ -3666,8 +3666,8 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs) case 0x5: // Annotation reference case 0x13: break; - case 0x2: // TODO: Auto-Footnote-Number, should be replaced by SwWW8ImplReader::End_Ftn later - if (!m_aFtnStack.empty()) + case 0x2: // TODO: Auto-Footnote-Number, should be replaced by SwWW8ImplReader::End_Footnote later + if (!m_aFootnoteStack.empty()) cInsert = 0x2; break; default: @@ -3692,7 +3692,7 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes, m_nAktColl = m_pPlcxMan->GetColl(); // Invalid Style-Id - if (m_nAktColl >= m_vColl.size() || !m_vColl[m_nAktColl].pFmt || !m_vColl[m_nAktColl].bColl) + if (m_nAktColl >= m_vColl.size() || !m_vColl[m_nAktColl].pFormat || !m_vColl[m_nAktColl].bColl) { m_nAktColl = 0; m_bParaAutoBefore = false; @@ -3719,32 +3719,32 @@ void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes, if (!bTabRowEnd && StyleExists(m_nAktColl)) { - SetTxtFmtCollAndListLevel( *m_pPaM, m_vColl[ m_nAktColl ]); + SetTextFormatCollAndListLevel( *m_pPaM, m_vColl[ m_nAktColl ]); ChkToggleAttr(m_vColl[ nOldColl ].n81Flags, m_vColl[ m_nAktColl ].n81Flags); ChkToggleBiDiAttr(m_vColl[nOldColl].n81BiDiFlags, m_vColl[m_nAktColl].n81BiDiFlags); } } -long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine) +long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, bool& rbStartLine) { long nSkipChars = 0; WW8PLCFManResult aRes; - OSL_ENSURE(m_pPaM->GetNode().GetTxtNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); bool bStartAttr = m_pPlcxMan->Get(&aRes); // Get Attribute position again - aRes.nAktCp = rTxtPos; // Current Cp position + aRes.nAktCp = rTextPos; // Current Cp position bool bNewSection = (aRes.nFlags & MAN_MASK_NEW_SEP) && !m_bIgnoreText; if ( bNewSection ) // New Section { - OSL_ENSURE(m_pPaM->GetNode().GetTxtNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); // Create PageDesc and fill it - m_aSectionManager.CreateSep(rTxtPos, m_bPgSecBreak); + m_aSectionManager.CreateSep(rTextPos, m_bPgSecBreak); // -> 0xc was a Sectionbreak, but not a Pagebreak; // Create PageDesc and fill it m_bPgSecBreak = false; - OSL_ENSURE(m_pPaM->GetNode().GetTxtNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); } // New paragraph over Plcx.Fkp.papx @@ -3781,9 +3781,9 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine) (aRes.nSprmId == eFLD) || (aRes.nSprmId == eAND) ) { - // Skip Field/Ftn-/End-Note here - rTxtPos += nSkipChars; - nSkipPos = rTxtPos-1; + // Skip Field/Footnote-/End-Note here + rTextPos += nSkipChars; + nSkipPos = rTextPos-1; } } else @@ -3791,7 +3791,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine) } } - m_pStrm->Seek(m_pSBase->WW8Cp2Fc( m_pPlcxMan->GetCpOfs() + rTxtPos, &m_bIsUnicode)); + m_pStrm->Seek(m_pSBase->WW8Cp2Fc( m_pPlcxMan->GetCpOfs() + rTextPos, &m_bIsUnicode)); // Find next Attr position (and Skip attributes of field contents if needed) if (nSkipChars && !m_bIgnoreText) @@ -3815,7 +3815,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine) if( (0 <= nNext) && (nSkipPos >= nNext) ) { - nNext = ReadTextAttr( rTxtPos, rbStartLine ); + nNext = ReadTextAttr( rTextPos, rbStartLine ); bDoPlcxManPlusPLus = false; m_bIgnoreText = true; } @@ -3866,17 +3866,17 @@ void SwWW8ImplReader::ClearParaEndPosition() m_aEndParaPos.clear(); } -void SwWW8ImplReader::ReadAttrs(WW8_CP& rNext, WW8_CP& rTxtPos, bool& rbStartLine) +void SwWW8ImplReader::ReadAttrs(WW8_CP& rNext, WW8_CP& rTextPos, bool& rbStartLine) { // Dow we have attributes? - if( rTxtPos >= rNext ) + if( rTextPos >= rNext ) { do { - m_aCurrAttrCP = rTxtPos; - rNext = ReadTextAttr( rTxtPos, rbStartLine ); + m_aCurrAttrCP = rTextPos; + rNext = ReadTextAttr( rTextPos, rbStartLine ); } - while( rTxtPos >= rNext ); + while( rTextPos >= rNext ); } else if ( rbStartLine ) @@ -3888,7 +3888,7 @@ void SwWW8ImplReader::ReadAttrs(WW8_CP& rNext, WW8_CP& rTxtPos, bool& rbStartLin * Due to this we need to set the template here as a kind of special treatment. */ if (!m_bCpxStyle && m_nAktColl < m_vColl.size()) - SetTxtFmtCollAndListLevel(*m_pPaM, m_vColl[m_nAktColl]); + SetTextFormatCollAndListLevel(*m_pPaM, m_vColl[m_nAktColl]); rbStartLine = false; } } @@ -3927,7 +3927,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) m_bWasParaEnd = false; m_nAktColl = 0; m_pAktItemSet = 0; - m_nCharFmt = -1; + m_nCharFormat = -1; m_bSpec = false; m_bPgSecBreak = false; @@ -3935,17 +3935,17 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) long nCpOfs = m_pPlcxMan->GetCpOfs(); // Offset for Header/Footer, Footnote WW8_CP nNext = m_pPlcxMan->Where(); - SwTxtNode* pPreviousNode = 0; + SwTextNode* pPreviousNode = 0; sal_uInt8 nDropLines = 0; - SwCharFmt* pNewSwCharFmt = 0; - const SwCharFmt* pFmt = 0; + SwCharFormat* pNewSwCharFormat = 0; + const SwCharFormat* pFormat = 0; m_pStrm->Seek( m_pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &m_bIsUnicode ) ); WW8_CP l = nStartCp; while ( l<nStartCp+nTextLen ) { ReadAttrs( nNext, l, bStartLine );// Takes SectionBreaks into account, too - OSL_ENSURE(m_pPaM->GetNode().GetTxtNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); if (m_pPostProcessAttrsInfo != NULL) PostProcessAttrs(); @@ -3963,13 +3963,13 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) if (m_bCareFirstParaEndInToc) { m_bCareFirstParaEndInToc = false; - if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTxtNode() && m_pPaM->End()->nNode.GetNode().GetTxtNode()->Len() == 0) + if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTextNode() && m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0) bSplit = false; } if (m_bCareLastParaEndInToc) { m_bCareLastParaEndInToc = false; - if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTxtNode() && m_pPaM->End()->nNode.GetNode().GetTxtNode()->Len() == 0) + if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTextNode() && m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0) bSplit = false; } if (bSplit) @@ -3977,14 +3977,14 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) // We will record the CP of a paragraph end ('0x0D'), if current loading contents is from main stream; if (m_bOnLoadingMain) m_aEndParaPos.push_back(l-1); - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); } } if (pPreviousNode && bStartLine) { - SwTxtNode* pEndNd = m_pPaM->GetNode().GetTxtNode(); - const sal_Int32 nDropCapLen = pPreviousNode->GetTxt().getLength(); + SwTextNode* pEndNd = m_pPaM->GetNode().GetTextNode(); + const sal_Int32 nDropCapLen = pPreviousNode->GetText().getLength(); // Need to reset the font size and text position for the dropcap { @@ -3993,9 +3993,9 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) } // Get the default document dropcap which we can use as our template - const SwFmtDrop* defaultDrop = - static_cast<const SwFmtDrop*>( GetFmtAttr(RES_PARATR_DROP)); - SwFmtDrop aDrop(*defaultDrop); + const SwFormatDrop* defaultDrop = + static_cast<const SwFormatDrop*>( GetFormatAttr(RES_PARATR_DROP)); + SwFormatDrop aDrop(*defaultDrop); aDrop.GetLines() = nDropLines; aDrop.GetDistance() = nDistance; @@ -4003,10 +4003,10 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) // Word has no concept of a "whole word dropcap" aDrop.GetWholeWord() = false; - if (pFmt) - aDrop.SetCharFmt(const_cast<SwCharFmt*>(pFmt)); - else if(pNewSwCharFmt) - aDrop.SetCharFmt(const_cast<SwCharFmt*>(pNewSwCharFmt)); + if (pFormat) + aDrop.SetCharFormat(const_cast<SwCharFormat*>(pFormat)); + else if(pNewSwCharFormat) + aDrop.SetCharFormat(const_cast<SwCharFormat*>(pNewSwCharFormat)); SwPosition aStart(*pEndNd); m_pCtrlStck->NewAttr(aStart, aDrop); @@ -4016,7 +4016,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) else if (m_bDropCap) { // If we have found a dropcap store the textnode - pPreviousNode = m_pPaM->GetNode().GetTxtNode(); + pPreviousNode = m_pPaM->GetNode().GetTextNode(); const sal_uInt8 *pDCS; @@ -4035,20 +4035,20 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) else nDistance = 0; - const SwFmtCharFmt *pSwFmtCharFmt = 0; + const SwFormatCharFormat *pSwFormatCharFormat = 0; if(m_pAktItemSet) - pSwFmtCharFmt = &(ItemGet<SwFmtCharFmt>(*m_pAktItemSet, RES_TXTATR_CHARFMT)); + pSwFormatCharFormat = &(ItemGet<SwFormatCharFormat>(*m_pAktItemSet, RES_TXTATR_CHARFMT)); - if(pSwFmtCharFmt) - pFmt = pSwFmtCharFmt->GetCharFmt(); + if(pSwFormatCharFormat) + pFormat = pSwFormatCharFormat->GetCharFormat(); - if(m_pAktItemSet && !pFmt) + if(m_pAktItemSet && !pFormat) { OUString sPrefix(OUStringBuffer("WW8Dropcap").append(m_nDropCap++).makeStringAndClear()); - pNewSwCharFmt = m_rDoc.MakeCharFmt(sPrefix, m_rDoc.GetDfltCharFmt()); + pNewSwCharFormat = m_rDoc.MakeCharFormat(sPrefix, m_rDoc.GetDfltCharFormat()); m_pAktItemSet->ClearItem(RES_CHRATR_ESCAPEMENT); - pNewSwCharFmt->SetFmtAttr( *m_pAktItemSet ); + pNewSwCharFormat->SetFormatAttr( *m_pAktItemSet ); } delete m_pAktItemSet; @@ -4087,10 +4087,10 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) // to insert a text node. if (!bStartLine && !m_pAnchorStck->empty()) { - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); } m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, - SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK)); + SvxFormatBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK)); m_bFirstParaOfPage = true; m_bPgSecBreak = false; } @@ -4098,7 +4098,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType) } if (m_pPaM->GetPoint()->nContent.GetIndex()) - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); if (!m_bInHyperlink) bJoined = JoinNode(*m_pPaM); @@ -4132,8 +4132,8 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_aParaStyleMapper(rD) , m_aCharStyleMapper(rD) , m_pFormImpl(0) - , m_pFlyFmtOfJustInsertedGraphic(0) - , m_pFmtOfJustInsertedApo(0) + , m_pFlyFormatOfJustInsertedGraphic(0) + , m_pFormatOfJustInsertedApo(0) , m_pPreviousNumPaM(0) , m_pPrevNumRule(0) , m_pPostProcessAttrsInfo(0) @@ -4143,13 +4143,13 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_pLstManager(0) , m_pSBase(0) , m_pPlcxMan(0) - , m_aTxtNodesHavingFirstLineOfstSet() - , m_aTxtNodesHavingLeftIndentSet() + , m_aTextNodesHavingFirstLineOfstSet() + , m_aTextNodesHavingLeftIndentSet() , m_pStyles(0) , m_pAktColl(0) , m_pAktItemSet(0) - , m_pDfltTxtFmtColl(0) - , m_pStandardFmtColl(0) + , m_pDfltTextFormatColl(0) + , m_pStandardFormatColl(0) , m_pHdFt(0) , m_pWFlyPara(0) , m_pSFlyPara(0) @@ -4160,7 +4160,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_pDrawPg(0) , m_pDrawEditEngine(0) , m_pWWZOrder(0) - , m_pNumFldType(0) + , m_pNumFieldType(0) , m_pMSDffManager(0) , m_pAtnNames(0) , m_sBaseURL(rBaseURL) @@ -4178,9 +4178,9 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_eHardCharSet(RTL_TEXTENCODING_DONTKNOW) , m_nProgress(0) , m_nAktColl(0) - , m_nFldNum(0) + , m_nFieldNum(0) , m_nLFOPosition(USHRT_MAX) - , m_nCharFmt(0) + , m_nCharFormat(0) , m_nDrawXOfs(0) , m_nDrawYOfs(0) , m_nDrawXOfs2(0) @@ -4194,7 +4194,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_nPgChpLevel(0) , m_bNewDoc(bNewDoc) , m_bSkipImages(bSkipImages) - , m_bReadNoTbl(false) + , m_bReadNoTable(false) , m_bPgSecBreak(false) , m_bSpec(false) , m_bObj(false) @@ -4206,8 +4206,8 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_bWasTabRowEnd(false) , m_bWasTabCellEnd(false) , m_bAnl(false) - , m_bHdFtFtnEdn(false) - , m_bFtnEdn(false) + , m_bHdFtFootnoteEdn(false) + , m_bFootnoteEdn(false) , m_bIsHeader(false) , m_bIsFooter(false) , m_bIsUnicode(false) @@ -4268,7 +4268,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection, SetNumberingType(rSection, rPage); - SwFrmFmt &rFmt = rPage.GetMaster(); + SwFrameFormat &rFormat = rPage.GetMaster(); if(mrReader.m_pWDop->fUseBackGroundInAllmodes) // #i56806# Make sure mrReader is initialized mrReader.GrafikCtor(); @@ -4283,26 +4283,26 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection, // Only handle shape if it is a background shape if ((aData.begin()->nFlags & 0x400) != 0) { - SfxItemSet aSet(rFmt.GetAttrSet()); + SfxItemSet aSet(rFormat.GetAttrSet()); mrReader.MatchSdrItemsIntoFlySet(pObject, aSet, mso_lineSimple, mso_lineSolid, mso_sptRectangle, aRect); - rFmt.SetFmtAttr(aSet.Get(RES_BACKGROUND)); + rFormat.SetFormatAttr(aSet.Get(RES_BACKGROUND)); } } SdrObject::Free(pObject); } wwULSpaceData aULData; GetPageULData(rSection, aULData); - SetPageULSpaceItems(rFmt, aULData, rSection); + SetPageULSpaceItems(rFormat, aULData, rSection); - SetPage(rPage, rFmt, rSection, bIgnoreCols); + SetPage(rPage, rFormat, rSection, bIgnoreCols); if (!(rSection.maSep.pgbApplyTo & 1)) - SwWW8ImplReader::SetPageBorder(rFmt, rSection); + SwWW8ImplReader::SetPageBorder(rFormat, rSection); if (!(rSection.maSep.pgbApplyTo & 2)) SwWW8ImplReader::SetPageBorder(rPage.GetFirstMaster(), rSection); - mrReader.SetDocumentGrid(rFmt, rSection); + mrReader.SetDocumentGrid(rFormat, rSection); } void wwSectionManager::SetUseOn(wwSection &rSection) @@ -4326,7 +4326,7 @@ void wwSectionManager::SetUseOn(wwSection &rSection) * Set the page descriptor on this node, handle the different cases for a text * node or a table */ -void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFmtPageDesc &rPgDesc, +void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFormatPageDesc &rPgDesc, SwDoc &rDoc) { /* @@ -4338,16 +4338,16 @@ void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFmtPageDesc &rPgDesc, { SwTable& rTable = rIdx.GetNode().GetTableNode()->GetTable(); - SwFrmFmt* pApply = rTable.GetFrmFmt(); + SwFrameFormat* pApply = rTable.GetFrameFormat(); OSL_ENSURE(pApply, "impossible"); if (pApply) - pApply->SetFmtAttr(rPgDesc); + pApply->SetFormatAttr(rPgDesc); } else { SwPosition aPamStart(rIdx); aPamStart.nContent.Assign( - rIdx.GetNode().GetCntntNode(), 0); + rIdx.GetNode().GetContentNode(), 0); SwPaM aPage(aPamStart); rDoc.getIDocumentContentOperations().InsertPoolItem(aPage, rPgDesc); @@ -4357,7 +4357,7 @@ void GiveNodePageDesc(SwNodeIndex &rIdx, const SwFmtPageDesc &rPgDesc, /** * Map a word section to a writer page descriptor */ -SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter, +SwFormatPageDesc wwSectionManager::SetSwFormatPageDesc(mySegIter &rIter, mySegIter &rStart, bool bIgnoreCols) { if (IsNewDoc() && rIter == rStart) @@ -4373,7 +4373,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter, } OSL_ENSURE(rIter->mpPage, "no page!"); if (!rIter->mpPage) - return SwFmtPageDesc(); + return SwFormatPageDesc(); // Set page before hd/ft const wwSection *pPrevious = 0; @@ -4385,7 +4385,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter, // Set hd/ft after set page SetSegmentToPageDesc(*rIter, bIgnoreCols); - SwFmtPageDesc aRet(rIter->mpPage); + SwFormatPageDesc aRet(rIter->mpPage); rIter->mpPage->SetFollow(rIter->mpPage); @@ -4415,7 +4415,7 @@ void wwSectionManager::InsertSegments() if ( aIter->maSep.bkc == 1 && aIter->maSep.ccolM1 > 0 ) { SwPaM start( aIter->maStart ); - mrReader.m_rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFmtBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); + mrReader.m_rDoc.getIDocumentContentOperations().InsertPoolItem( start, SvxFormatBreakItem(SVX_BREAK_COLUMN_BEFORE, RES_BREAK)); continue; } @@ -4465,7 +4465,7 @@ void wwSectionManager::InsertSegments() bInsertSection = true; } - SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, bIgnoreCols)); + SwFormatPageDesc aDesc(SetSwFormatPageDesc(aIter, aStart, bIgnoreCols)); if (!aDesc.GetPageDesc()) continue; @@ -4476,15 +4476,15 @@ void wwSectionManager::InsertSegments() // c) create a new style to follow the break page style if ( aIter->maSep.bkc == 3 || aIter->maSep.bkc == 4 ) { - // SetSwFmtPageDesc calls some methods that could + // SetSwFormatPageDesc calls some methods that could // modify aIter (e.g. wwSection ). - // Since we call SetSwFmtPageDesc below to generate the + // Since we call SetSwFormatPageDesc below to generate the // 'Following' style of the Break style, it is safer // to take a copy of the contents of aIter. wwSection aTmpSection = *aIter; // create a new following page style - SwFmtPageDesc aFollow(SetSwFmtPageDesc(aIter, aStart, bIgnoreCols)); - // restore any contents of aIter trashed by SetSwFmtPageDesc + SwFormatPageDesc aFollow(SetSwFormatPageDesc(aIter, aStart, bIgnoreCols)); + // restore any contents of aIter trashed by SetSwFormatPageDesc *aIter = aTmpSection; // Handle the section break @@ -4499,7 +4499,7 @@ void wwSectionManager::InsertSegments() GiveNodePageDesc(aIter->maStart, aDesc, mrReader.m_rDoc); } - SwTxtNode* pTxtNd = 0; + SwTextNode* pTextNd = 0; if (bInsertSection) { // Start getting the bounds of this section @@ -4510,29 +4510,29 @@ void wwSectionManager::InsertSegments() aAnchor = aNext->maStart; aSectPaM.GetPoint()->nNode = aAnchor; aSectPaM.GetPoint()->nContent.Assign( - aNext->maStart.GetNode().GetCntntNode(), 0); + aNext->maStart.GetNode().GetContentNode(), 0); aSectPaM.Move(fnMoveBackward); } const SwPosition* pPos = aSectPaM.GetPoint(); - SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode(); + SwTextNode const*const pSttNd = pPos->nNode.GetNode().GetTextNode(); const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0; if (pTableNd) { - pTxtNd = - mrReader.m_rDoc.GetNodes().MakeTxtNode(aAnchor, - mrReader.m_rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_TEXT )); + pTextNd = + mrReader.m_rDoc.GetNodes().MakeTextNode(aAnchor, + mrReader.m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_TEXT )); - aSectPaM.GetPoint()->nNode = SwNodeIndex(*pTxtNd); + aSectPaM.GetPoint()->nNode = SwNodeIndex(*pTextNd); aSectPaM.GetPoint()->nContent.Assign( - aSectPaM.GetCntntNode(), 0); + aSectPaM.GetContentNode(), 0); } aSectPaM.SetMark(); aSectPaM.GetPoint()->nNode = aIter->maStart; aSectPaM.GetPoint()->nContent.Assign( - aSectPaM.GetCntntNode(), 0); + aSectPaM.GetContentNode(), 0); bool bHasOwnHdFt = false; /* @@ -4555,7 +4555,7 @@ void wwSectionManager::InsertSegments() // no page break in the section SwPageDesc *pOrig = aIter->mpPage; bool bFailed = true; - SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, true)); + SwFormatPageDesc aDesc(SetSwFormatPageDesc(aIter, aStart, true)); if (aDesc.GetPageDesc()) { sal_uLong nStart = aSectPaM.Start()->nNode.GetIndex(); @@ -4581,46 +4581,46 @@ void wwSectionManager::InsertSegments() } // End getting the bounds of this section, quite a job eh? - SwSectionFmt *pRet = InsertSection(aSectPaM, *aIter); + SwSectionFormat *pRet = InsertSection(aSectPaM, *aIter); // The last section if continuous is always unbalanced if (pRet) { // Set the columns to be UnBalanced if that compatibility option is set if (mrReader.m_pWDop->fNoColumnBalance) - pRet->SetFmtAttr(SwFmtNoBalancedColumns(true)); + pRet->SetFormatAttr(SwFormatNoBalancedColumns(true)); else { // Otherwise set to unbalanced if the following section is // not continuous, (which also means that the last section // is unbalanced) if (aNext == aEnd || !aNext->IsContinuous()) - pRet->SetFmtAttr(SwFmtNoBalancedColumns(true)); + pRet->SetFormatAttr(SwFormatNoBalancedColumns(true)); } } } - if (pTxtNd) + if (pTextNd) { - SwNodeIndex aIdx(*pTxtNd); + SwNodeIndex aIdx(*pTextNd); SwPaM aTest(aIdx); mrReader.m_rDoc.getIDocumentContentOperations().DelFullPara(aTest); - pTxtNd = 0; + pTextNd = 0; } } } void wwExtraneousParas::delete_all_from_doc() { - typedef std::vector<SwTxtNode*>::iterator myParaIter; - myParaIter aEnd = m_aTxtNodes.end(); - for (myParaIter aI = m_aTxtNodes.begin(); aI != aEnd; ++aI) + typedef std::vector<SwTextNode*>::iterator myParaIter; + myParaIter aEnd = m_aTextNodes.end(); + for (myParaIter aI = m_aTextNodes.begin(); aI != aEnd; ++aI) { - SwTxtNode *pTxtNode = *aI; - SwNodeIndex aIdx(*pTxtNode); + SwTextNode *pTextNode = *aI; + SwNodeIndex aIdx(*pTextNode); SwPaM aTest(aIdx); m_rDoc.getIDocumentContentOperations().DelFullPara(aTest); } - m_aTxtNodes.clear(); + m_aTextNodes.clear(); } void SwWW8ImplReader::StoreMacroCmds() @@ -4852,7 +4852,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, tools::SvRef<SotStorageStream> refMainStream = rRoot->OpenSotStream( OUString( "WordDocument" )); refMainStream->SetEndian(SvStreamEndian::LITTLE); WW8Fib aWwFib( *refMainStream, 8 ); - tools::SvRef<SotStorageStream> xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); + tools::SvRef<SotStorageStream> xTableStream = rRoot->OpenSotStream(OUString::createFromAscii( aWwFib.fWhichTableStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError()) { @@ -4907,7 +4907,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) m_pRedlineStack = new sw::util::RedlineStack(m_rDoc); /* - RefFldStck: Keeps track of bookmarks which may be inserted as + RefFieldStck: Keeps track of bookmarks which may be inserted as variables intstead. */ m_pReffedStck = new SwWW8ReferencedFltEndStack(&m_rDoc, m_nFieldFlags); @@ -5016,30 +5016,30 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) if (m_pSBase->AreThereFootnotes()) { - static const SwFtnNum eNumA[4] = + static const SwFootnoteNum eNumA[4] = { FTNNUM_DOC, FTNNUM_CHAPTER, FTNNUM_PAGE, FTNNUM_DOC }; - SwFtnInfo aInfo; - aInfo = m_rDoc.GetFtnInfo(); // Copy-Ctor private + SwFootnoteInfo aInfo; + aInfo = m_rDoc.GetFootnoteInfo(); // Copy-Ctor private aInfo.ePos = FTNPOS_PAGE; - aInfo.eNum = eNumA[m_pWDop->rncFtn]; - sal_uInt16 nfcFtnRef = m_pWDop->nfcFtnRef & 0xF; - aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcFtnRef]) ); - if( m_pWDop->nFtn ) - aInfo.nFtnOffset = m_pWDop->nFtn - 1; - m_rDoc.SetFtnInfo( aInfo ); + aInfo.eNum = eNumA[m_pWDop->rncFootnote]; + sal_uInt16 nfcFootnoteRef = m_pWDop->nfcFootnoteRef & 0xF; + aInfo.aFormat.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcFootnoteRef]) ); + if( m_pWDop->nFootnote ) + aInfo.nFootnoteOffset = m_pWDop->nFootnote - 1; + m_rDoc.SetFootnoteInfo( aInfo ); } if( m_pSBase->AreThereEndnotes() ) { SwEndNoteInfo aInfo; - aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Ftn + aInfo = m_rDoc.GetEndNoteInfo(); // Same as for Footnote sal_uInt16 nfcEdnRef = m_pWDop->nfcEdnRef & 0xF; - aInfo.aFmt.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcEdnRef]) ); + aInfo.aFormat.SetNumberingType( static_cast< sal_uInt16 >(eNumTA[nfcEdnRef]) ); if( m_pWDop->nEdn ) - aInfo.nFtnOffset = m_pWDop->nEdn - 1; + aInfo.nFootnoteOffset = m_pWDop->nEdn - 1; m_rDoc.SetEndNoteInfo( aInfo ); } @@ -5057,8 +5057,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) m_rDoc.getIDocumentContentOperations().SplitNode( *pPos, false ); // another split, if insertion position was not at the end of the current paragraph. - SwTxtNode const*const pTxtNd = pPos->nNode.GetNode().GetTxtNode(); - if ( pTxtNd->GetTxt().getLength() ) + SwTextNode const*const pTextNd = pPos->nNode.GetNode().GetTextNode(); + if ( pTextNd->GetText().getLength() ) { m_rDoc.getIDocumentContentOperations().SplitNode( *pPos, false ); // move PaM back to the newly empty paragraph @@ -5067,7 +5067,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) // suppress insertion of tables inside footnotes. const sal_uLong nNd = pPos->nNode.GetIndex(); - m_bReadNoTbl = ( nNd < m_rDoc.GetNodes().GetEndOfInserts().GetIndex() && + m_bReadNoTable = ( nNd < m_rDoc.GetNodes().GetEndOfInserts().GetIndex() && m_rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd ); } @@ -5084,14 +5084,14 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) for (int i = 0; i < pGloss->GetNoStrings(); ++i, aPlc.advance()) { SwNodeIndex aIdx( m_rDoc.GetNodes().GetEndOfContent()); - SwTxtFmtColl* pColl = - m_rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, + SwTextFormatColl* pColl = + m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, false); SwStartNode *pNode = m_rDoc.GetNodes().MakeTextSection(aIdx, SwNormalStartNode,pColl); m_pPaM->GetPoint()->nNode = pNode->GetIndex()+1; - m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetCntntNode(),0); + m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetContentNode(),0); aPlc.Get( nStart, nEnd, pDummy ); ReadText(nStart,nEnd-nStart-1,MAN_MAINTEXT); } @@ -5154,7 +5154,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) if (m_pDrawPg && m_pMSDffManager && m_pMSDffManager->GetShapeOrders()) { - // Helper array to chain the inserted frames (instead of SdrTxtObj) + // Helper array to chain the inserted frames (instead of SdrTextObj) SvxMSDffShapeTxBxSort aTxBxSort; // Ensure correct z-order of read Escher objects @@ -5171,15 +5171,15 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) // Chain Frames if( !aTxBxSort.empty() ) { - SwFmtChain aChain; + SwFormatChain aChain; for( SvxMSDffShapeTxBxSort::iterator it = aTxBxSort.begin(); it != aTxBxSort.end(); ++it ) { SvxMSDffShapeOrder *pOrder = *it; // Initialize FlyFrame Formats - SwFlyFrmFmt* pFlyFmt = pOrder->pFly; - SwFlyFrmFmt* pNextFlyFmt = 0; - SwFlyFrmFmt* pPrevFlyFmt = 0; + SwFlyFrameFormat* pFlyFormat = pOrder->pFly; + SwFlyFrameFormat* pNextFlyFormat = 0; + SwFlyFrameFormat* pPrevFlyFormat = 0; // Determine successor, if we can SvxMSDffShapeTxBxSort::iterator tmpIter1 = it; @@ -5189,7 +5189,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) SvxMSDffShapeOrder *pNextOrder = *tmpIter1; if ((0xFFFF0000 & pOrder->nTxBxComp) == (0xFFFF0000 & pNextOrder->nTxBxComp)) - pNextFlyFmt = pNextOrder->pFly; + pNextFlyFormat = pNextOrder->pFly; } // Determine precessor, if we can if( it != aTxBxSort.begin() ) @@ -5199,15 +5199,15 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) SvxMSDffShapeOrder *pPrevOrder = *tmpIter2; if ((0xFFFF0000 & pOrder->nTxBxComp) == (0xFFFF0000 & pPrevOrder->nTxBxComp)) - pPrevFlyFmt = pPrevOrder->pFly; + pPrevFlyFormat = pPrevOrder->pFly; } // If successor or predecessor present, insert the // chain at the FlyFrame Format - if (pNextFlyFmt || pPrevFlyFmt) + if (pNextFlyFormat || pPrevFlyFormat) { - aChain.SetNext( pNextFlyFmt ); - aChain.SetPrev( pPrevFlyFmt ); - pFlyFmt->SetFmtAttr( aChain ); + aChain.SetNext( pNextFlyFormat ); + aChain.SetPrev( pPrevFlyFormat ); + pFlyFormat->SetFormatAttr( aChain ); } } } @@ -5221,7 +5221,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) eMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE; } - m_aInsertedTables.DelAndMakeTblFrms(); + m_aInsertedTables.DelAndMakeTableFrms(); m_aSectionManager.InsertSegments(); m_vColl.clear(); @@ -5252,7 +5252,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) // For i120928,achieve the graphics from the special bookmark with is for graphic bullet { std::vector<const SwGrfNode*> vecBulletGrf; - std::vector<SwFrmFmt*> vecFrmFmt; + std::vector<SwFrameFormat*> vecFrameFormat; IDocumentMarkAccess* const pMarkAccess = m_rDoc.getIDocumentMarkAccess(); if ( pMarkAccess ) @@ -5261,22 +5261,22 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) if ( ppBkmk != pMarkAccess->getBookmarksEnd() && IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) == IDocumentMarkAccess::MarkType::BOOKMARK ) { - SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode(); + SwTextNode* pTextNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTextNode(); - if ( pTxtNode ) + if ( pTextNode ) { - const SwpHints* pHints = pTxtNode->GetpSwpHints(); + const SwpHints* pHints = pTextNode->GetpSwpHints(); for( size_t nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos) { - const SwTxtAttr *pHt = (*pHints)[nHintPos]; + const SwTextAttr *pHt = (*pHints)[nHintPos]; const sal_Int32 st = pHt->GetStart(); if( pHt && pHt->Which() == RES_TXTATR_FLYCNT && (st >= ppBkmk->get()->GetMarkStart().nContent.GetIndex()) ) { - SwFrmFmt* pFrmFmt = pHt->GetFlyCnt().GetFrmFmt(); - vecFrmFmt.push_back(pFrmFmt); - const SwNodeIndex* pNdIdx = pFrmFmt->GetCntnt().GetCntntIdx(); + SwFrameFormat* pFrameFormat = pHt->GetFlyCnt().GetFrameFormat(); + vecFrameFormat.push_back(pFrameFormat); + const SwNodeIndex* pNdIdx = pFrameFormat->GetContent().GetContentIdx(); const SwNodes* pNodesArray = (pNdIdx != NULL) ? &(pNdIdx->GetNodes()) : NULL; @@ -5293,9 +5293,9 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) SwNumRule* pRule = m_pLstManager->GetNumRule(i); for (sal_uInt16 j = 0; j < MAXLEVEL; ++j) { - SwNumFmt aNumFmt(pRule->Get(j)); - const sal_Int16 nType = aNumFmt.GetNumberingType(); - const sal_uInt16 nGrfBulletCP = aNumFmt.GetGrfBulletCP(); + SwNumFormat aNumFormat(pRule->Get(j)); + const sal_Int16 nType = aNumFormat.GetNumberingType(); + const sal_uInt16 nGrfBulletCP = aNumFormat.GetGrfBulletCP(); if ( nType == SVX_NUM_BITMAP && vecBulletGrf.size() > nGrfBulletCP && vecBulletGrf[nGrfBulletCP] != NULL ) @@ -5309,21 +5309,21 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos) { int nWidth = (nHeight * aPrefSize.Width()) / aPrefSize.Height(); Size aSize(nWidth, nHeight); - aNumFmt.SetGraphicBrush(&aBrush, &aSize); + aNumFormat.SetGraphicBrush(&aBrush, &aSize); } else { - aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); - aNumFmt.SetBulletChar(0x2190); + aNumFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aNumFormat.SetBulletChar(0x2190); } - pRule->Set( j, aNumFmt ); + pRule->Set( j, aNumFormat ); } } } // Remove additional pictures - for (sal_uInt16 i = 0; i < vecFrmFmt.size(); ++i) + for (sal_uInt16 i = 0; i < vecFrameFormat.size(); ++i) { - m_rDoc.getIDocumentLayoutAccess().DelLayoutFmt(vecFrmFmt[i]); + m_rDoc.getIDocumentLayoutAccess().DelLayoutFormat(vecFrameFormat[i]); } } } @@ -5373,7 +5373,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(tools::SvRef<SotStorageStream> &rTableS } rTableStream = m_pStg->OpenSotStream( OUString::createFromAscii( - m_pWwFib->fWhichTblStm ? SL::a1Table : SL::a0Table), + m_pWwFib->fWhichTableStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); m_pTableStream = &rTableStream; @@ -5858,7 +5858,7 @@ void SwWW8ImplReader::SetOutlineStyles() if (pChosenWW8ListStyle != NULL && pStyleInf->mnWW8OutlineLevel == pStyleInf->nListLevel) { - const SwNumFmt& rRule + const SwNumFormat& rRule = pChosenWW8ListStyle->Get(pStyleInf->mnWW8OutlineLevel); aOutlineRule.Set(pStyleInf->mnWW8OutlineLevel, rRule); bAppliedChangedOutlineStyle = true; @@ -5868,7 +5868,7 @@ void SwWW8ImplReader::SetOutlineStyles() nOutlineStyleListLevelWithAssignment |= nOutlineStyleListLevelOfWW8BuiltInHeadingStyle; - SwTxtFmtColl* pTxtFmtColl = static_cast<SwTxtFmtColl*>(pStyleInf->pFmt); + SwTextFormatColl* pTextFormatColl = static_cast<SwTextFormatColl*>(pStyleInf->pFormat); if (pStyleInf->GetOutlineNumrule() != pChosenWW8ListStyle || (pStyleInf->nListLevel < WW8ListManager::nMaxLevel && pStyleInf->mnWW8OutlineLevel != pStyleInf->nListLevel)) @@ -5876,24 +5876,24 @@ void SwWW8ImplReader::SetOutlineStyles() // WW8 Built-In Heading Style does not apply the chosen one. // --> delete assignment to OutlineStyle, but keep its current // outline level - pTxtFmtColl->DeleteAssignmentToListLevelOfOutlineStyle(false); + pTextFormatColl->DeleteAssignmentToListLevelOfOutlineStyle(false); // Apply existing WW8 list style a normal list style at the // Paragraph Style if (pStyleInf->GetOutlineNumrule() != NULL) { - pTxtFmtColl->SetFmtAttr( + pTextFormatColl->SetFormatAttr( SwNumRuleItem(pStyleInf->GetOutlineNumrule()->GetName())); } // apply default outline level of WW8 Built-in Heading Style const sal_uInt8 nOutlineLevel = SwWW8StyInf::WW8OutlineLevelToOutlinelevel( pStyleInf->mnWW8OutlineLevel); - pTxtFmtColl->SetFmtAttr( + pTextFormatColl->SetFormatAttr( SfxUInt16Item(RES_PARATR_OUTLINELEVEL, nOutlineLevel)); } else { - pTxtFmtColl->AssignToListLevelOfOutlineStyle( + pTextFormatColl->AssignToListLevelOfOutlineStyle( pStyleInf->mnWW8OutlineLevel); } } @@ -6094,7 +6094,7 @@ sal_uLong WW8Reader::Read(SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPam, co if (bNew) { // Remove Frame and offsets from Frame Template - Reader::ResetFrmFmts( rDoc ); + Reader::ResetFrameFormats( rDoc ); } SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc, rBaseURL, bNew, bSkipImages); @@ -6276,19 +6276,19 @@ namespace sw namespace hack { Position::Position(const SwPosition &rPos) - : maPtNode(rPos.nNode), mnPtCntnt(rPos.nContent.GetIndex()) + : maPtNode(rPos.nNode), mnPtContent(rPos.nContent.GetIndex()) { } Position::Position(const Position &rPos) - : maPtNode(rPos.maPtNode), mnPtCntnt(rPos.mnPtCntnt) + : maPtNode(rPos.maPtNode), mnPtContent(rPos.mnPtContent) { } Position::operator SwPosition() const { SwPosition aRet(maPtNode); - aRet.nContent.Assign(maPtNode.GetNode().GetCntntNode(), mnPtCntnt); + aRet.nContent.Assign(maPtNode.GetNode().GetContentNode(), mnPtContent); return aRet; } } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index d50b5a0bc660..afe7125c39f9 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -56,17 +56,17 @@ class SwDoc; class SwPaM; class SfxPoolItem; -class SwTxtFmtColl; +class SwTextFormatColl; class SwPageDesc; class SvxBoxItem; -class SwFmt; +class SwFormat; class SwNodeIndex; -class SwFlyFrmFmt; +class SwFlyFrameFormat; class SwAttrSet; class SwNumRule; -class SwFrmFmt; +class SwFrameFormat; class Writer; -class SwFmtFld; +class SwFormatField; class WW8Fib; class WW8PLCFMan; struct WW8PLCFManResult; @@ -79,7 +79,7 @@ struct WW8_PIC; class WW8TabDesc; struct WW8_SHD; struct WW8_OLST; -class SwNumFmt; +class SwNumFormat; struct WW8_ANLD; struct WW8_ANLV; struct WW8_DO; @@ -149,7 +149,7 @@ public: //the rParaSprms returns back the original word paragraph indent //sprms which were attached to the original numbering format SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel, - std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0); + std::vector<sal_uInt8> &rParaSprms, SwTextNode *pNode=0); SwNumRule* CreateNextRule(bool bSimple); ~WW8ListManager(); SwNumRule* GetNumRule(size_t i); @@ -167,17 +167,17 @@ private: WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const; //the rParaSprms returns back the original word paragraph indent //sprms which are attached to this numbering level - bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle, + bool ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle, bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel, ww::bytes &rParaSprms); // Zeichenattribute aus GrpprlChpx typedef SfxItemSet* WW8aISet[nMaxLevel]; // Zeichen Style Pointer - typedef SwCharFmt* WW8aCFmt[nMaxLevel]; + typedef SwCharFormat* WW8aCFormat[nMaxLevel]; void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet, - WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated, + WW8aCFormat& aCharFormat, bool& bNewCharFormatCreated, const OUString& aPrefix = OUString()); WW8ListManager(const WW8ListManager&) SAL_DELETED_FUNCTION; @@ -219,7 +219,7 @@ public: rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font rtl_TextEncoding eCJKFontSrcCharSet; // rtl_TextEncoding fuer den Font - SwFmt* pFmt; + SwFormat* pFormat; WW8FlyPara* pWWFly; SwNumRule* pOutlineNumrule; long nFilePos; @@ -241,13 +241,13 @@ public: SvxLRSpaceItem maWordLR; bool bValid; // leer oder Valid bool bImported; // fuers rekursive Importieren - bool bColl; // true-> pFmt ist SwTxtFmtColl + bool bColl; // true-> pFormat ist SwTextFormatColl bool bImportSkipped; // nur true bei !bNewDoc && vorh. Style bool bHasStyNumRule; // true-> Benannter NumRule in Style bool bHasBrokenWW6List; // true-> WW8+ style has a WW7- list bool bListReleventIndentSet; //true if this style's indent has //been explicitly set, it's set to the value - //of pFmt->GetItemState(RES_LR_SPACE, false) + //of pFormat->GetItemState(RES_LR_SPACE, false) //if it was possible to get the ItemState //for L of the LR space independently bool bParaAutoBefore; // For Auto spacing before a paragraph @@ -259,7 +259,7 @@ public: eLTRFontSrcCharSet(0), eRTLFontSrcCharSet(0), eCJKFontSrcCharSet(0), - pFmt( 0 ), + pFormat( 0 ), pWWFly( 0 ), pOutlineNumrule( 0 ), nFilePos( 0 ), @@ -307,7 +307,7 @@ public: bool HasWW8OutlineLevel() const { - return (pFmt != NULL && (MAXLEVEL > mnWW8OutlineLevel)); + return (pFormat != NULL && (MAXLEVEL > mnWW8OutlineLevel)); } bool IsOutlineNumbered() const @@ -366,8 +366,8 @@ private: sal_uInt16 nToggleBiDiAttrFlags; SwWW8FltControlStack(const SwWW8FltControlStack&) SAL_DELETED_FUNCTION; SwWW8FltControlStack& operator=(const SwWW8FltControlStack&) SAL_DELETED_FUNCTION; - const SwNumFmt* GetNumFmtFromStack(const SwPosition &rPos, - const SwTxtNode &rTxtNode); + const SwNumFormat* GetNumFormatFromStack(const SwPosition &rPos, + const SwTextNode &rTextNode); protected: virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry& rEntry) SAL_OVERRIDE; @@ -410,7 +410,7 @@ public: void SetToggleAttrFlags(sal_uInt16 nFlags) { nToggleAttrFlags = nFlags; } void SetToggleBiDiAttrFlags(sal_uInt16 nFlags) {nToggleBiDiAttrFlags = nFlags;} - const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich); + const SfxPoolItem* GetFormatAttr(const SwPosition& rPos, sal_uInt16 nWhich); const SfxPoolItem* GetStackAttr(const SwPosition& rPos, sal_uInt16 nWhich); }; @@ -422,7 +422,7 @@ class SwWW8FltAnchorStack : public SwFltControlStack public: SwWW8FltAnchorStack(SwDoc* pDo, sal_uLong nFieldFl) : SwFltControlStack( pDo, nFieldFl ) {} - void AddAnchor(const SwPosition& rPos,SwFrmFmt *pFmt); + void AddAnchor(const SwPosition& rPos,SwFrameFormat *pFormat); void Flush(); private: SwWW8FltAnchorStack(const SwWW8FltAnchorStack&) SAL_DELETED_FUNCTION; @@ -436,8 +436,8 @@ class Position public: SwNodeIndex maMkNode; SwNodeIndex maPtNode; - sal_Int32 mnMkCntnt; - sal_Int32 mnPtCntnt; + sal_Int32 mnMkContent; + sal_Int32 mnPtContent; Position(const SwPaM &rPaM); Position(const Position &rEntry); private: @@ -478,14 +478,14 @@ public: : SwFltEndStack( pDo, nFieldFl ) , aFieldVarNames() {} - bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo); + bool IsFootnoteEdnBkmField(const SwFormatField& rFormatField, sal_uInt16& rBkmNo); //Keep track of variable names created with fields, and the bookmark //mapped to their position, hopefully the same, but very possibly //an additional pseudo bookmark std::map<OUString, OUString, SwWW8::ltstr> aFieldVarNames; protected: - SwFltStackEntry *RefToVar(const SwField* pFld,SwFltStackEntry& rEntry); + SwFltStackEntry *RefToVar(const SwField* pField,SwFltStackEntry& rEntry); virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry& rEntry) SAL_OVERRIDE; private: @@ -543,13 +543,13 @@ namespace sw { private: SwNodeIndex maPtNode; - sal_Int32 mnPtCntnt; + sal_Int32 mnPtContent; public: Position(const SwPosition &rPos); Position(const Position &rPos); operator SwPosition() const; SwNodeIndex GetPtNode() { return maPtNode; }; - sal_Int32 GetPtCntnt() { return mnPtCntnt; }; + sal_Int32 GetPtContent() { return mnPtContent; }; }; } } @@ -572,7 +572,7 @@ class WW8FieldEntry void Swap(WW8FieldEntry &rOther) throw(); SwNodeIndex GetPtNode() { return maStartPos.GetPtNode(); }; - sal_Int32 GetPtCntnt() { return maStartPos.GetPtCntnt(); }; + sal_Int32 GetPtContent() { return maStartPos.GetPtContent(); }; OUString GetBookmarkName() { return msBookmarkName;} OUString GetBookmarkCode() { return msMarkCode;} @@ -605,7 +605,7 @@ private: sal_Unicode mcSymbol; bool mbIgnoreText; bool mbSymbol; - bool mbHdFtFtnEdn; + bool mbHdFtFootnoteEdn; bool mbTxbxFlySection; bool mbAnl; bool mbInHyperlink; @@ -859,10 +859,10 @@ private: void GetPageULData(const wwSection &rNewSection, wwULSpaceData& rData) const; - static void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData, + static void SetPageULSpaceItems(SwFrameFormat &rFormat, wwULSpaceData& rData, const wwSection &rSection); - static void SetPage(SwPageDesc &rPageDesc, SwFrmFmt &rFmt, + static void SetPage(SwPageDesc &rPageDesc, SwFrameFormat &rFormat, const wwSection &rSection, bool bIgnoreCols); static void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc); @@ -870,8 +870,8 @@ private: void SetUseOn(wwSection &rSection); void SetHdFt(wwSection &rSection, int nSect, const wwSection *pPrevious); - SwSectionFmt *InsertSection(SwPaM& rMyPaM, wwSection &rSection); - static bool SetCols(SwFrmFmt &rFmt, const wwSection &rSection, + SwSectionFormat *InsertSection(SwPaM& rMyPaM, wwSection &rSection); + static bool SetCols(SwFrameFormat &rFormat, const wwSection &rSection, sal_uInt32 nNetWidth); bool SectionIsProtected(const wwSection &rSection) const; void SetLeftRight(wwSection &rSection); @@ -881,7 +881,7 @@ private: nodeindex of where we want the page break to (normally the segments start position */ - SwFmtPageDesc SetSwFmtPageDesc(mySegIter &rIter, mySegIter &rStart, + SwFormatPageDesc SetSwFormatPageDesc(mySegIter &rIter, mySegIter &rStart, bool bIgnoreCols); wwSectionManager(const wwSectionManager&) SAL_DELETED_FUNCTION; @@ -895,7 +895,7 @@ public: void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode); sal_uInt16 CurrentSectionColCount() const; bool WillHavePageDescHere(const SwNodeIndex& rIdx) const; - void CreateSep(const long nTxtPos, bool bMustHaveBreak); + void CreateSep(const long nTextPos, bool bMustHaveBreak); void InsertSegments(); void JoinNode(const SwPosition &rPos, const SwNode &rNode); sal_uInt32 GetPageLeft() const; @@ -915,21 +915,21 @@ public: //addressed by property entries in a SwFltControlStack which have not yet been //committed to the document. -//Safest thing is to not delete SwTxtNodes from a document during import, and +//Safest thing is to not delete SwTextNodes from a document during import, and //remove these extraneous paragraphs at the end after all SwFltControlStack are //destroyed. class wwExtraneousParas : private ::boost::noncopyable { private: /* - A vector of SwTxtNodes to erase from a document after import is complete + A vector of SwTextNodes to erase from a document after import is complete */ - std::vector<SwTxtNode*> m_aTxtNodes; + std::vector<SwTextNode*> m_aTextNodes; SwDoc& m_rDoc; public: wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {} ~wwExtraneousParas() { delete_all_from_doc(); } - void push_back(SwTxtNode *pTxtNode) { m_aTxtNodes.push_back(pTxtNode); } + void push_back(SwTextNode *pTextNode) { m_aTextNodes.push_back(pTextNode); } void delete_all_from_doc(); }; @@ -940,7 +940,7 @@ private: sal_Int32 mnImportedGraphicsCount; bool mbIsDisabled; public: - void SetUniqueGraphName(SwFrmFmt *pFrmFmt, const OUString &rFixedPart); + void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart); wwFrameNamer(bool bIsDisabled, const OUString &rSeed) : msSeed(rSeed), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled) { @@ -962,7 +962,7 @@ public: { } }; -class FtnDescriptor +class FootnoteDescriptor { public: ManTypes meType; @@ -1143,7 +1143,7 @@ private: /* A stack of open footnotes. Should only be one in it at any time. */ - std::deque<FtnDescriptor> m_aFtnStack; + std::deque<FootnoteDescriptor> m_aFootnoteStack; /* A queue of the ms sections in the document @@ -1192,8 +1192,8 @@ private: SwMSConvertControls *m_pFormImpl; // Control-Implementierung - SwFlyFrmFmt* m_pFlyFmtOfJustInsertedGraphic; - SwFrmFmt* m_pFmtOfJustInsertedApo; + SwFlyFrameFormat* m_pFlyFormatOfJustInsertedGraphic; + SwFrameFormat* m_pFormatOfJustInsertedApo; SwPaM* m_pPreviousNumPaM; const SwNumRule* m_pPrevNumRule; @@ -1204,7 +1204,7 @@ private: Keep track of generated Ruby character formats we can minimize the number of character formats created */ - std::vector<const SwCharFmt*> m_aRubyCharFmts; + std::vector<const SwCharFormat*> m_aRubyCharFormats; WW8PostProcessAttrsInfo * m_pPostProcessAttrsInfo; @@ -1216,17 +1216,17 @@ private: WW8PLCFMan* m_pPlcxMan; std::map<short, OUString> m_aLinkStringMap; - std::set<const SwNode*> m_aTxtNodesHavingFirstLineOfstSet; // #i103711# - std::set<const SwNode*> m_aTxtNodesHavingLeftIndentSet; // #i105414# + std::set<const SwNode*> m_aTextNodesHavingFirstLineOfstSet; // #i103711# + std::set<const SwNode*> m_aTextNodesHavingLeftIndentSet; // #i105414# WW8RStyle* m_pStyles; // Pointer auf die Style-Einleseklasse - SwFmt* m_pAktColl; // gerade zu erzeugende Collection + SwFormat* m_pAktColl; // gerade zu erzeugende Collection // ( ist ausserhalb einer Style-Def immer 0 ) SfxItemSet* m_pAktItemSet;// gerade einzulesende Zeichenattribute // (ausserhalb des WW8ListManager Ctor's immer 0) std::vector<SwWW8StyInf> m_vColl; - const SwTxtFmtColl* m_pDfltTxtFmtColl; // Default - SwFmt* m_pStandardFmtColl;// "Standard" + const SwTextFormatColl* m_pDfltTextFormatColl; // Default + SwFormat* m_pStandardFormatColl;// "Standard" WW8PLCF_HdFt* m_pHdFt; // Pointer auf Header / Footer - Scannerklasse @@ -1247,7 +1247,7 @@ private: EditEngine* m_pDrawEditEngine; wwZOrderer *m_pWWZOrder; - SwFieldType* m_pNumFldType; // fuer Nummernkreis + SwFieldType* m_pNumFieldType; // fuer Nummernkreis SwMSDffManager* m_pMSDffManager; @@ -1280,10 +1280,10 @@ private: rtl_TextEncoding m_eHardCharSet; // Hard rtl_TextEncoding-Attribute sal_uInt16 m_nProgress; // %-Angabe fuer Progressbar sal_uInt16 m_nAktColl; // gemaess WW-Zaehlung - sal_uInt16 m_nFldNum; // laufende Nummer dafuer + sal_uInt16 m_nFieldNum; // laufende Nummer dafuer sal_uInt16 m_nLFOPosition; - short m_nCharFmt; // gemaess WW-Zaehlung, <0 fuer keine + short m_nCharFormat; // gemaess WW-Zaehlung, <0 fuer keine short m_nDrawXOfs, m_nDrawYOfs; short m_nDrawXOfs2, m_nDrawYOfs2; @@ -1302,7 +1302,7 @@ private: bool m_bNewDoc; // Neues Dokument ? bool m_bSkipImages; // skip images for text extraction/indexing - bool m_bReadNoTbl; // Keine Tabellen + bool m_bReadNoTable; // Keine Tabellen bool m_bPgSecBreak; // Page- oder Sectionbreak ist noch einzufuegen bool m_bSpec; // Special-Char im Text folgt bool m_bObj; // Obj im Text @@ -1317,8 +1317,8 @@ private: bool m_bAnl; // Nummerierung in Bearbeitung // Anl heisst Autonumber level - bool m_bHdFtFtnEdn; // Spezialtext: Kopf- Fuss- usw. - bool m_bFtnEdn; // Fussnote oder Endnote + bool m_bHdFtFootnoteEdn; // Spezialtext: Kopf- Fuss- usw. + bool m_bFootnoteEdn; // Fussnote oder Endnote bool m_bIsHeader; // Text aus Header wird gelesen ( Zeilenhoehe ) bool m_bIsFooter; // Text aus Footer wird gelesen ( Zeilenhoehe ) @@ -1380,13 +1380,13 @@ private: bool StyleExists(unsigned int nColl) const { return (nColl < m_vColl.size()); } SwWW8StyInf *GetStyle(sal_uInt16 nColl) const; - void AppendTxtNode(SwPosition& rPos); + void AppendTextNode(SwPosition& rPos); void Read_HdFt(int nSect, const SwPageDesc *pPrev, const wwSection &rSection); - void Read_HdFtText(long nStartCp, long nLen, SwFrmFmt* pHdFtFmt); + void Read_HdFtText(long nStartCp, long nLen, SwFrameFormat* pHdFtFormat); void Read_HdFtTextAsHackedFrame(long nStart, long nLen, - SwFrmFmt &rHdFtFmt, sal_uInt16 nPageWidth); + SwFrameFormat &rHdFtFormat, sal_uInt16 nPageWidth); bool isValid_HdFt_CP(WW8_CP nHeaderCP) const; @@ -1416,22 +1416,22 @@ private: static bool LangUsesHindiNumbers(sal_uInt16 nLang); static sal_Unicode TranslateToHindiNumbers(sal_Unicode); - void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection); + void SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &rSection); void ProcessAktCollChange(WW8PLCFManResult& rRes, bool* pStartAttr, bool bCallProcessSpecial); - long ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine); - void ReadAttrs(WW8_CP& rNext, WW8_CP& rTxtPos, bool& rbStartLine); + long ReadTextAttr(WW8_CP& rTextPos, bool& rbStartLine); + void ReadAttrs(WW8_CP& rNext, WW8_CP& rTextPos, bool& rbStartLine); void CloseAttrEnds(); bool ReadText(long nStartCp, long nTextLen, ManTypes nType); - void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTblPos, - sal_Int32 nTblSiz, SwDoc& rDoc ); + void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTablePos, + sal_Int32 nTableSiz, SwDoc& rDoc ); - void Read_HdFtFtnText( const SwNodeIndex* pSttIdx, long nStartCp, + void Read_HdFtFootnoteText( const SwNodeIndex* pSttIdx, long nStartCp, long nLen, ManTypes nType ); - void ImportTox( int nFldId, const OUString& aStr ); + void ImportTox( int nFieldId, const OUString& aStr ); void EndSprm( sal_uInt16 nId ); // #i103711# @@ -1446,7 +1446,7 @@ private: void ResetCharSetVars(); void ResetCJKCharSetVars(); - const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich ); + const SfxPoolItem* GetFormatAttr( sal_uInt16 nWhich ); bool JoinNode(SwPaM &rPam, bool bStealAttr = false); static bool IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false); @@ -1468,7 +1468,7 @@ private: //returns true is a shadow was set static bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc, short *SizeArray=0); - static void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection); + static void SetPageBorder(SwFrameFormat &rFormat, const wwSection &rSection); static sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth, @@ -1479,10 +1479,10 @@ private: SvxLRSpaceItem &rLR); static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL); - static void MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SwFrmFmt* pFlyFmt); + static void MapWrapIntoFlyFormat(SvxMSDffImportRec* pRecord, SwFrameFormat* pFlyFormat); void SetAttributesAtGrfNode(SvxMSDffImportRec const* pRecord, - SwFrmFmt *pFlyFmt, WW8_FSPA *pF); + SwFrameFormat *pFlyFormat, WW8_FSPA *pF); bool IsDropCap(); bool IsListOrDropcap() { return (!m_pAktItemSet || m_bDropCap); }; @@ -1495,7 +1495,7 @@ private: bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos); - static void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt); + static void StripNegativeAfterIndent(SwFrameFormat *pFlyFormat); void EndSpecial(); bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp); @@ -1507,24 +1507,24 @@ private: static void ReplaceObj(const SdrObject &rReplaceTextObj, SdrObject &rSubObj); - SwFlyFrmFmt* MakeGrafNotInCntnt(const WW8PicDesc& rPD, + SwFlyFrameFormat* MakeGrafNotInContent(const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet); - SwFrmFmt* MakeGrafInCntnt(const WW8_PIC& rPic, const WW8PicDesc& rPD, + SwFrameFormat* MakeGrafInContent(const WW8_PIC& rPic, const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet); - SwFrmFmt *AddAutoAnchor(SwFrmFmt *pFmt); - SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos); - SwFrmFmt* ImportGraf(SdrTextObj* pTextObj = 0, SwFrmFmt* pFlyFmt = 0); + SwFrameFormat *AddAutoAnchor(SwFrameFormat *pFormat); + SwFrameFormat* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos); + SwFrameFormat* ImportGraf(SdrTextObj* pTextObj = 0, SwFrameFormat* pFlyFormat = 0); SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0, const SfxItemSet* pFlySet=0, const Rectangle& aVisArea = Rectangle() ); - SwFrmFmt* ImportOle( const Graphic* = 0, const SfxItemSet* pFlySet = 0, + SwFrameFormat* ImportOle( const Graphic* = 0, const SfxItemSet* pFlySet = 0, const SfxItemSet* pGrfSet = 0, const Rectangle& aVisArea = Rectangle() ); - SwFlyFrmFmt* InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, + SwFlyFrameFormat* InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, const SfxItemSet &rGrfSet); bool ImportFormulaControl(WW8FormulaControl &rBox,WW8_CP nStart, @@ -1559,7 +1559,7 @@ private: // verwaltet werden: rglst, hpllfo und hsttbListNames // die Strukturen hierfuer sind: LSTF, LVLF, LFO LFOLVL - void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, const sal_uInt8* pTxt, + void SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, const sal_uInt8* pText, bool bOutline); void SetAnld(SwNumRule* pNumR, WW8_ANLD const * pAD, sal_uInt8 nSwLevel, bool bOutLine); void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel ); @@ -1587,8 +1587,8 @@ private: sal_uInt16 nSequence); bool GetRangeAsDrawingString(OUString& rString, long StartCp, long nEndCp, ManTypes eType); OutlinerParaObject* ImportAsOutliner(OUString &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType); - SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, - sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrmFmt* pFlyFmt, + SwFrameFormat* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz, + sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrameFormat* pFlyFormat, bool bMakeSdrGrafObj, bool& rbEraseTextObj, bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0, long* pnEndCp = 0, bool* pbContainsGraphics = 0, @@ -1596,25 +1596,25 @@ private: bool TxbxChainContainsRealText( sal_uInt16 nTxBxS, long& rStartCp, long& rEndCp ); - SdrObject *ReadTxtBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet); + SdrObject *ReadTextBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet); SdrObject *ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet); SdrObject *ReadGroup(WW8_DPHEAD* pHd, SfxAllItemSet &rSet); SdrObject *ReadGrafPrimitive(short& rLeft, SfxAllItemSet &rSet); void ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp ); - SdrObject* CreateContactObject(SwFrmFmt* pFlyFmt); + SdrObject* CreateContactObject(SwFrameFormat* pFlyFormat); RndStdIds ProcessEscherAlign(SvxMSDffImportRec* pRecord, WW8_FSPA *pFSPA, SfxItemSet &rFlySet, bool bOrgObjectWasReplace); bool MiserableRTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel); - SwFrmFmt* Read_GrafLayer( long nGrafAnchorCp ); - SwFlyFrmFmt* ImportReplaceableDrawables( SdrObject* &rpObject, + SwFrameFormat* Read_GrafLayer( long nGrafAnchorCp ); + SwFlyFrameFormat* ImportReplaceableDrawables( SdrObject* &rpObject, SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, WW8_FSPA *pF, SfxItemSet &rFlySet ); - SwFlyFrmFmt *ConvertDrawTextToFly( SdrObject* &rpObject, + SwFlyFrameFormat *ConvertDrawTextToFly( SdrObject* &rpObject, SdrObject* &rpOurNewObject, SvxMSDffImportRec* pRecord, RndStdIds eAnchor, WW8_FSPA *pF, SfxItemSet &rFlySet ); - SwFrmFmt* MungeTextIntoDrawBox(SdrObject* pTrueObject, - SvxMSDffImportRec *pRecord, long nGrafAnchorCp, SwFrmFmt *pRetFrmFmt); + SwFrameFormat* MungeTextIntoDrawBox(SdrObject* pTrueObject, + SvxMSDffImportRec *pRecord, long nGrafAnchorCp, SwFrameFormat *pRetFrameFormat); void GrafikCtor(); void GrafikDtor(); @@ -1632,13 +1632,13 @@ private: // Ver8-Listen - void RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel, + void RegisterNumFormatOnTextNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel, const bool bSetAttr = true); - void RegisterNumFmtOnStyle(sal_uInt16 nStyle); + void RegisterNumFormatOnStyle(sal_uInt16 nStyle); void SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO, sal_uInt8 nActLevel); - void RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel); + void RegisterNumFormat(sal_uInt16 nActLFO, sal_uInt8 nActLevel); // spaeter zu ersetzen durch Aufruf in entsprechend erweiterten SvxMSDffManager @@ -1666,8 +1666,8 @@ private: } void PopTableDesc(); - void MoveInsideFly(const SwFrmFmt *pFlyFmt); - SwTwips MoveOutsideFly(SwFrmFmt *pFlyFmt, const SwPosition &rPos, + void MoveInsideFly(const SwFrameFormat *pFlyFormat); + SwTwips MoveOutsideFly(SwFrameFormat *pFlyFormat, const SwPosition &rPos, bool bTableJoin = true); void SetOutlineStyles(); @@ -1697,8 +1697,8 @@ public: // eigentlich private, geht aber leider nur public //Clear the para end position recorded in reader intermittently for the least impact on loading performance void ClearParaEndPosition(); - long Read_Ftn(WW8PLCFManResult* pRes); - sal_uInt16 End_Ftn(); + long Read_Footnote(WW8PLCFManResult* pRes); + sal_uInt16 End_Footnote(); long Read_Field(WW8PLCFManResult* pRes); sal_uInt16 End_Field(); long Read_Book(WW8PLCFManResult*); @@ -1715,10 +1715,10 @@ public: // eigentlich private, geht aber leider nur public void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen); void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen ); bool ConvertSubToGraphicPlacement(); - static SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion); + static SwFrameFormat *ContainsSingleInlineGraphic(const SwPaM &rRegion); void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen ); void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen ); - void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen ); + void Read_TextColor( sal_uInt16, const sal_uInt8*, short nLen ); void openFont(sal_uInt16 nFCode, sal_uInt16 nId); void closeFont(sal_uInt16 nId); void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen ); @@ -1731,7 +1731,7 @@ public: // eigentlich private, geht aber leider nur public void Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen ); void Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen ); void Read_Relief( sal_uInt16, const sal_uInt8* pData, short nLen); - void Read_TxtAnim( sal_uInt16, const sal_uInt8* pData, short nLen); + void Read_TextAnim( sal_uInt16, const sal_uInt8* pData, short nLen); void Read_NoLineNumb( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); @@ -1761,7 +1761,7 @@ public: // eigentlich private, geht aber leider nur public void Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, short nLen ); void Read_Tab( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); void Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen); - void Read_FldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); + void Read_FieldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); // Revision Marks ( == Redlining ) @@ -1801,14 +1801,14 @@ public: // eigentlich private, geht aber leider nur public * -1 to indicate the actual level is finished. */ void Read_LFOPosition( sal_uInt16 nId, const sal_uInt8* pData, short nLen); - bool SetTxtFmtCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo); + bool SetTextFormatCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo); void Read_StyleCode(sal_uInt16, const sal_uInt8* pData, short nLen); void Read_Majority(sal_uInt16, const sal_uInt8* , short ); void Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pDATA, short nLen); - void Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen); - void Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen); + void Read_TextForeColor(sal_uInt16, const sal_uInt8* pData, short nLen); + void Read_TextBackColor(sal_uInt16, const sal_uInt8* pData, short nLen); void Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen); void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen); static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67); @@ -1827,7 +1827,7 @@ public: // eigentlich private, geht aber leider nur public eF_ResT Read_F_TemplName( WW8FieldDesc*, OUString& ); short GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat, sal_uInt16 &rLang, int nWhichDefault, bool bHijri = false); - bool ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang); + bool ForceFieldLanguage(SwField &rField, sal_uInt16 nLang); eF_ResT Read_F_DateTime( WW8FieldDesc*, OUString& rStr ); eF_ResT Read_F_FileName( WW8FieldDesc*, OUString& rStr); eF_ResT Read_F_Anz( WW8FieldDesc* pF, OUString& ); @@ -1875,7 +1875,7 @@ public: // eigentlich private, geht aber leider nur public void SetNAktColl( sal_uInt16 nColl ) { m_nAktColl = nColl; } void SetAktItemSet( SfxItemSet* pItemSet ) { m_pAktItemSet = pItemSet; } sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ; - const SwFmt* GetStyleWithOrgWWName( OUString& rName ) const ; + const SwFormat* GetStyleWithOrgWWName( OUString& rName ) const ; static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc); static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67); @@ -1900,15 +1900,15 @@ public: // eigentlich private, geht aber leider nur public }; bool CanUseRemoteLink(const OUString &rGrfName); -void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt); -void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFmt &rFmt); +void UseListIndent(SwWW8StyInf &rStyle, const SwNumFormat &rFormat); +void SetStyleIndent(SwWW8StyInf &rStyleInfo, const SwNumFormat &rFormat); // #i103711# // #i105414# void SyncIndentWithList( SvxLRSpaceItem &rLR, - const SwNumFmt &rFmt, + const SwNumFormat &rFormat, const bool bFirstLineOfStSet, const bool bLeftIndentSet ); -long GetListFirstLineIndent(const SwNumFmt &rFmt); +long GetListFirstLineIndent(const SwNumFormat &rFormat); OUString BookmarkToWriter(const OUString &rBookmark); bool RTLGraphicsHack(SwTwips &rLeft, SwTwips nWidth, sal_Int16 eHoriOri, sal_Int16 eHoriRel, SwTwips nPageLeft, diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index b70c7896ed02..8929c44432b0 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -116,7 +116,7 @@ class WW8TabDesc: private boost::noncopyable SwPosition* pTmpPos; - SwTableNode* pTblNd; // table node + SwTableNode* pTableNd; // table node const SwTableLines* pTabLines; // row array of node SwTableLine* pTabLine; // current row SwTableBoxes* pTabBoxes; // boxes array in current row @@ -137,7 +137,7 @@ class WW8TabDesc: private boost::noncopyable short nOrgDxaLeft; bool bOk; - bool bClaimLineFmt; + bool bClaimLineFormat; sal_Int16 eOri; bool bIsBiDi; // 2. common admin info @@ -172,7 +172,7 @@ class WW8TabDesc: private boost::noncopyable public: const SwTable* pTable; // table SwPosition* pParentPos; - SwFlyFrmFmt* pFlyFmt; + SwFlyFrameFormat* pFlyFormat; SfxItemSet aItemSet; bool IsValidCell(short nCol) const; bool InFirstParaInCell() const; @@ -181,7 +181,7 @@ public: bool Ok() const { return bOk; } void CreateSwTable(SvxULSpaceItem* pULSpaceItem = 0); void UseSwTable(); - void SetSizePosition(SwFrmFmt* pFrmFmt); + void SetSizePosition(SwFrameFormat* pFrameFormat); void TableCellEnd(); void MoveOutsideTable(); void ParkPaM(); @@ -267,7 +267,7 @@ sal_uInt32 wwSectionManager::GetWWPageTopMargin() const return !maSegments.empty() ? maSegments.back().maSep.dyaTop : 0; } -sal_uInt16 SwWW8ImplReader::End_Ftn() +sal_uInt16 SwWW8ImplReader::End_Footnote() { /* Ignoring Footnote outside of the normal Text. People will put footnotes @@ -279,30 +279,30 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() return 0; } - OSL_ENSURE(!m_aFtnStack.empty(), "footnote end without start"); - if (m_aFtnStack.empty()) + OSL_ENSURE(!m_aFootnoteStack.empty(), "footnote end without start"); + if (m_aFootnoteStack.empty()) return 0; bool bFtEdOk = false; - const FtnDescriptor &rDesc = m_aFtnStack.back(); + const FootnoteDescriptor &rDesc = m_aFootnoteStack.back(); //Get the footnote character and remove it from the txtnode. We'll //replace it with the footnote - SwTxtNode* pTxt = m_pPaM->GetNode().GetTxtNode(); + SwTextNode* pText = m_pPaM->GetNode().GetTextNode(); sal_Int32 nPos = m_pPaM->GetPoint()->nContent.GetIndex(); OUString sChar; - SwTxtAttr* pFN = 0; + SwTextAttr* pFN = 0; //There should have been a footnote char, we will replace this. - if (pTxt && nPos) + if (pText && nPos) { - sChar += OUString(pTxt->GetTxt()[--nPos]); + sChar += OUString(pText->GetText()[--nPos]); m_pPaM->SetMark(); --m_pPaM->GetMark()->nContent; m_rDoc.getIDocumentContentOperations().DeleteRange( *m_pPaM ); m_pPaM->DeleteMark(); - SwFmtFtn aFtn(rDesc.meType == MAN_EDN); - pFN = pTxt->InsertItem(aFtn, nPos, nPos); + SwFormatFootnote aFootnote(rDesc.meType == MAN_EDN); + pFN = pText->InsertItem(aFootnote, nPos, nPos); } OSL_ENSURE(pFN, "Probleme beim Anlegen des Fussnoten-Textes"); if (pFN) @@ -313,18 +313,18 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() m_pPlcxMan->SaveAllPLCFx( aSave ); WW8PLCFMan* pOldPlcxMan = m_pPlcxMan; - const SwNodeIndex* pSttIdx = static_cast<SwTxtFtn*>(pFN)->GetStartNode(); + const SwNodeIndex* pSttIdx = static_cast<SwTextFootnote*>(pFN)->GetStartNode(); OSL_ENSURE(pSttIdx, "Probleme beim Anlegen des Fussnoten-Textes"); - static_cast<SwTxtFtn*>(pFN)->SetSeqNo( m_rDoc.GetFtnIdxs().size() ); + static_cast<SwTextFootnote*>(pFN)->SetSeqNo( m_rDoc.GetFootnoteIdxs().size() ); - bool bOld = m_bFtnEdn; - m_bFtnEdn = true; + bool bOld = m_bFootnoteEdn; + m_bFootnoteEdn = true; // read content of Ft-/End-Note - Read_HdFtFtnText( pSttIdx, rDesc.mnStartCp, rDesc.mnLen, rDesc.meType); + Read_HdFtFootnoteText( pSttIdx, rDesc.mnStartCp, rDesc.mnLen, rDesc.meType); bFtEdOk = true; - m_bFtnEdn = bOld; + m_bFootnoteEdn = bOld; OSL_ENSURE(sChar.getLength()==1 && ((rDesc.mbAutoNum == (sChar[0] == 2))), "footnote autonumbering must be 0x02, and everything else must not be"); @@ -332,7 +332,7 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() // If no automatic numbering use the following char from the main text // as the footnote number if (!rDesc.mbAutoNum) - static_cast<SwTxtFtn*>(pFN)->SetNumber(0, sChar); + static_cast<SwTextFootnote*>(pFN)->SetNumber(0, sChar); /* Delete the footnote char from the footnote if its at the beginning @@ -341,16 +341,16 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() */ SwNodeIndex& rNIdx = m_pPaM->GetPoint()->nNode; rNIdx = pSttIdx->GetIndex() + 1; - SwTxtNode* pTNd = rNIdx.GetNode().GetTxtNode(); - if (pTNd && !pTNd->GetTxt().isEmpty() && !sChar.isEmpty()) + SwTextNode* pTNd = rNIdx.GetNode().GetTextNode(); + if (pTNd && !pTNd->GetText().isEmpty() && !sChar.isEmpty()) { - const OUString &rTxt = pTNd->GetTxt(); - if (rTxt[0] == sChar[0]) + const OUString &rText = pTNd->GetText(); + if (rText[0] == sChar[0]) { m_pPaM->GetPoint()->nContent.Assign( pTNd, 0 ); m_pPaM->SetMark(); // Strip out tabs we may have inserted on export #i24762# - if (rTxt.getLength() > 1 && rTxt[1] == 0x09) + if (rText.getLength() > 1 && rText[1] == 0x09) ++m_pPaM->GetMark()->nContent; ++m_pPaM->GetMark()->nContent; m_pReffingStck->Delete(*m_pPaM); @@ -368,11 +368,11 @@ sal_uInt16 SwWW8ImplReader::End_Ftn() if (bFtEdOk) m_aSectionManager.SetCurrentSectionHasFootnote(); - m_aFtnStack.pop_back(); + m_aFootnoteStack.pop_back(); return 0; } -long SwWW8ImplReader::Read_Ftn(WW8PLCFManResult* pRes) +long SwWW8ImplReader::Read_Footnote(WW8PLCFManResult* pRes) { /* Ignoring Footnote outside of the normal Text. People will put footnotes @@ -384,7 +384,7 @@ long SwWW8ImplReader::Read_Ftn(WW8PLCFManResult* pRes) return 0; } - FtnDescriptor aDesc; + FootnoteDescriptor aDesc; aDesc.mbAutoNum = true; if (eEDN == pRes->nSprmId) { @@ -395,14 +395,14 @@ long SwWW8ImplReader::Read_Ftn(WW8PLCFManResult* pRes) else { aDesc.meType = MAN_FTN; - if (m_pPlcxMan->GetFtn()) - aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_pPlcxMan->GetFtn()->GetData()); + if (m_pPlcxMan->GetFootnote()) + aDesc.mbAutoNum = 0 != *static_cast<short const *>(m_pPlcxMan->GetFootnote()->GetData()); } aDesc.mnStartCp = pRes->nCp2OrIdx; aDesc.mnLen = pRes->nMemLen; - m_aFtnStack.push_back(aDesc); + m_aFootnoteStack.push_back(aDesc); return 0; } @@ -556,7 +556,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd, // helper methods for outline, numbering and bullets -static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLevel ) +static void SetBaseAnlv(SwNumFormat &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLevel ) { static const SvxExtNumType eNumA[8] = { SVX_NUM_ARABIC, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER, SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC, @@ -623,8 +623,8 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV const &rAV, sal_uInt8 nSwLevel } } -void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, - const sal_uInt8* pTxt, bool bOutline) +void SwWW8ImplReader::SetAnlvStrings(SwNumFormat &rNum, WW8_ANLV const &rAV, + const sal_uInt8* pText, bool bOutline) { bool bInsert = false; // Default rtl_TextEncoding eCharSet = m_eStructCharSet; @@ -632,16 +632,16 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, const WW8_FFN* pF = m_pFonts->GetFont(SVBT16ToShort(rAV.ftc)); // FontInfo bool bListSymbol = pF && ( pF->chs == 2 ); // Symbol/WingDings/... - OUString sTxt; + OUString sText; if (m_bVer67) { - sTxt = OUString(reinterpret_cast<char const *>(pTxt), rAV.cbTextBefore + rAV.cbTextAfter, eCharSet); + sText = OUString(reinterpret_cast<char const *>(pText), rAV.cbTextBefore + rAV.cbTextAfter, eCharSet); } else { - for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pTxt += 2) + for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pText += 2) { - sTxt += OUString(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pTxt))); + sText += OUString(SVBT16ToShort(*reinterpret_cast<SVBT16 const *>(pText))); } } @@ -660,7 +660,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, OUStringBuffer aBuf; comphelper::string::padToLength(aBuf, rAV.cbTextBefore + rAV.cbTextAfter, cBulletChar); - sTxt = aBuf.makeStringAndClear(); + sText = aBuf.makeStringAndClear(); } } } @@ -687,7 +687,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, // take only the very first character if (rAV.cbTextBefore || rAV.cbTextAfter) - rNum.SetBulletChar( sTxt[ 0 ] ); + rNum.SetBulletChar( sText[ 0 ] ); else rNum.SetBulletChar( 0x2190 ); } @@ -697,13 +697,13 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, { if (rAV.cbTextBefore) { - OUString sP( sTxt.copy( 0, rAV.cbTextBefore ) ); + OUString sP( sText.copy( 0, rAV.cbTextBefore ) ); rNum.SetPrefix( sP ); } if( rAV.cbTextAfter ) { OUString sP( rNum.GetSuffix() ); - sP += sTxt.copy( rAV.cbTextBefore, rAV.cbTextAfter); + sP += sText.copy( rAV.cbTextBefore, rAV.cbTextAfter); rNum.SetSuffix( sP ); } // The characters before and after multipe digits do not apply because @@ -718,7 +718,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV const &rAV, void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD const * pAD, sal_uInt8 nSwLevel, bool bOutLine) { - SwNumFmt aNF; + SwNumFormat aNF; if (pAD) { // there is a Anld-Sprm m_bAktAND_fNumberAcross = 0 != pAD->fNumberAcross; @@ -745,7 +745,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule() // #i86652# sal_uInt16 nRul = m_rDoc.MakeNumRule( aName, 0, false, SvxNumberFormat::LABEL_ALIGNMENT ); - m_pStyles->pStyRule = m_rDoc.GetNumRuleTbl()[nRul]; + m_pStyles->pStyRule = m_rDoc.GetNumRuleTable()[nRul]; // Auto == false-> Nummerierungsvorlage m_pStyles->pStyRule->SetAutoRule(false); @@ -763,7 +763,7 @@ void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short // StyleDef ? if( m_pAktColl ) { - // only for SwTxtFmtColl, not CharFmt + // only for SwTextFormatColl, not CharFormat // WW: 0 = no Numbering SwWW8StyInf * pColl = GetStyle(m_nAktColl); if (pColl != NULL && pColl->bColl && *pData) @@ -774,7 +774,7 @@ void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short { m_nSwNumLevel = *pData - 1; if (!m_bNoAttrImport) - static_cast<SwTxtFmtColl*>(m_pAktColl)->AssignToListLevelOfOutlineStyle( m_nSwNumLevel ); + static_cast<SwTextFormatColl*>(m_pAktColl)->AssignToListLevelOfOutlineStyle( m_nSwNumLevel ); // For WW-NoNumbering also NO_NUMBERING could be used. // ( For normal numberierung NO_NUM has to be used: // NO_NUM : pauses numbering, @@ -801,7 +801,7 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor { SwWW8StyInf * pStyInf = GetStyle(m_nAktColl); if( !m_pAktColl || nLen <= 0 // only for Styledef - || (pStyInf && !pStyInf->bColl) // ignore CharFmt -> + || (pStyInf && !pStyInf->bColl) // ignore CharFormat -> || ( m_nIniFlags & WW8FL_NO_OUTLINE ) ) { m_nSwNumLevel = 0xff; @@ -812,7 +812,7 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor && m_nSwNumLevel <= 9 ){ // No Bullets or Numbering // If NumRuleItems were set, either directly or through inheritance, disable them now - m_pAktColl->SetFmtAttr( SwNumRuleItem() ); + m_pAktColl->SetFormatAttr( SwNumRuleItem() ); const OUString aName("Outline"); SwNumRule aNR( m_rDoc.GetUniqueNumRuleName( &aName ), @@ -827,7 +827,7 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor }else if( m_pStyles->nWwNumLevel == 10 || m_pStyles->nWwNumLevel == 11 ){ SwNumRule* pNR = GetStyRule(); SetAnld(pNR, reinterpret_cast<WW8_ANLD const *>(pData), 0, false); - m_pAktColl->SetFmtAttr( SwNumRuleItem( pNR->GetName() ) ); + m_pAktColl->SetFormatAttr( SwNumRuleItem( pNR->GetName() ) ); pStyInf = GetStyle(m_nAktColl); if (pStyInf != NULL) @@ -837,24 +837,24 @@ void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, shor // Numbering / Bullets -// SetNumOlst() carries the Numrules for this cell to SwNumFmt. +// SetNumOlst() carries the Numrules for this cell to SwNumFormat. // For this the info is fetched from OLST and not from ANLD ( see later ) // ( only for outline inside text; Bullets / numbering use ANLDs ) void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel) { - SwNumFmt aNF; + SwNumFormat aNF; WW8_ANLV &rAV = pO->rganlv[nSwLevel]; SetBaseAnlv(aNF, rAV, nSwLevel); // ... and then the Strings - int nTxtOfs = 0; + int nTextOfs = 0; sal_uInt8 i; WW8_ANLV* pAV1; // search String-Positions for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1) - nTxtOfs += pAV1->cbTextBefore + pAV1->cbTextAfter; + nTextOfs += pAV1->cbTextBefore + pAV1->cbTextAfter; if (!m_bVer67) - nTxtOfs *= 2; - SetAnlvStrings(aNF, rAV, pO->rgch + nTxtOfs, true); // and apply + nTextOfs *= 2; + SetAnlvStrings(aNF, rAV, pO->rgch + nTextOfs, true); // and apply pNumR->Set(nSwLevel, aNF); } @@ -941,7 +941,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13) SwWW8StyInf * pStyInf = GetStyle(m_nAktColl); if (sNumRule.isEmpty() && pStyInf != NULL && pStyInf->bHasStyNumRule) { - sNumRule = pStyInf->pFmt->GetNumRule().GetValue(); + sNumRule = pStyInf->pFormat->GetNumRule().GetValue(); pNumRule = m_rDoc.FindNumRulePtr(sNumRule); if (!pNumRule) sNumRule.clear(); @@ -952,7 +952,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13) if (!pNumRule) { // #i86652# - pNumRule = m_rDoc.GetNumRuleTbl()[ + pNumRule = m_rDoc.GetNumRuleTable()[ m_rDoc.MakeNumRule( sNumRule, 0, false, SvxNumberFormat::LABEL_ALIGNMENT ) ]; } @@ -991,7 +991,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13) if (*pSprm13 == 10 || *pSprm13 == 11) { m_nSwNumLevel = 0; - if (!pNumRule->GetNumFmt(m_nSwNumLevel)) + if (!pNumRule->GetNumFormat(m_nSwNumLevel)) { // not defined yet // sprmAnld o. 0 @@ -1003,14 +1003,14 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13) { m_nSwNumLevel = *pSprm13 - 1; // outline // undefined - if (!pNumRule->GetNumFmt(m_nSwNumLevel)) + if (!pNumRule->GetNumFormat(m_nSwNumLevel)) { if (m_pNumOlst) // there was a OLST { //Assure upper levels are set, #i9556# for (sal_uInt8 nI = 0; nI < m_nSwNumLevel; ++nI) { - if (!pNumRule->GetNumFmt(nI)) + if (!pNumRule->GetNumFormat(nI)) SetNumOlst(pNumRule, m_pNumOlst, nI); } @@ -1027,7 +1027,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13) else m_nSwNumLevel = 0xff; // no number - SwTxtNode* pNd = m_pPaM->GetNode().GetTxtNode(); + SwTextNode* pNd = m_pPaM->GetNode().GetTextNode(); if (m_nSwNumLevel < MAXLEVEL) pNd->SetAttrListLevel( m_nSwNumLevel ); else @@ -1049,7 +1049,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack) if (bGoBack) { SwPosition aTmpPos(*m_pPaM->GetPoint()); - m_pPaM->Move(fnMoveBackward, fnGoCntnt); + m_pPaM->Move(fnMoveBackward, fnGoContent); m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE); *m_pPaM->GetPoint() = aTmpPos; } @@ -1706,7 +1706,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : pFirstBand(0), pActBand(0), pTmpPos(0), - pTblNd(0), + pTableNd(0), pTabLines(0), pTabLine(0), pTabBoxes(0), @@ -1722,7 +1722,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : nPreferredWidth(0), nOrgDxaLeft(0), bOk(true), - bClaimLineFmt(false), + bClaimLineFormat(false), eOri(text::HoriOrientation::NONE), bIsBiDi(false), nAktRow(0), @@ -1731,7 +1731,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : nRowsToRepeat(0), pTable(0), pParentPos(0), - pFlyFmt(0), + pFlyFormat(0), aItemSet(pIo->m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) { pIo->m_bAktAND_fNumberAcross = false; @@ -1804,7 +1804,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : break; case sprmTFCantSplit: pNewBand->bCantSplit = *pParams; - bClaimLineFmt = true; + bClaimLineFormat = true; break; case sprmTTableBorders: pTableBorders = pParams; // process at end @@ -1832,7 +1832,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) : break; case sprmTDyaRowHeight: pNewBand->nLineHeight = (sal_Int16)SVBT16ToShort( pParams ); - bClaimLineFmt = true; + bClaimLineFormat = true; break; case sprmTDefTable: pNewBand->ReadDef(bOldVer, pParams); @@ -2282,20 +2282,20 @@ void WW8TabDesc::CalcDefaults() OSL_ENSURE( pActBand, "pActBand ist 0" ); } -void WW8TabDesc::SetSizePosition(SwFrmFmt* pFrmFmt) +void WW8TabDesc::SetSizePosition(SwFrameFormat* pFrameFormat) { - SwFrmFmt* pApply = pFrmFmt; + SwFrameFormat* pApply = pFrameFormat; if (!pApply ) - pApply = pTable->GetFrmFmt(); + pApply = pTable->GetFrameFormat(); OSL_ENSURE(pApply,"No frame"); - pApply->SetFmtAttr(aItemSet); - if (pFrmFmt) + pApply->SetFormatAttr(aItemSet); + if (pFrameFormat) { - SwFmtFrmSize aSize = pFrmFmt->GetFrmSize(); + SwFormatFrmSize aSize = pFrameFormat->GetFrmSize(); aSize.SetHeightSizeType(ATT_MIN_SIZE); aSize.SetHeight(MINLAY); - pFrmFmt->SetFmtAttr(aSize); - pTable->GetFrmFmt()->SetFmtAttr(SwFmtHoriOrient(0,text::HoriOrientation::FULL)); + pFrameFormat->SetFormatAttr(aSize); + pTable->GetFrameFormat()->SetFormatAttr(SwFormatHoriOrient(0,text::HoriOrientation::FULL)); } } @@ -2323,18 +2323,18 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) Set fly anchor to its anchor pos, so that if a table starts immediately at this position a new node will be inserted before inserting the table. */ - if (!bInsNode && pIo->m_pFmtOfJustInsertedApo) + if (!bInsNode && pIo->m_pFormatOfJustInsertedApo) { const SwPosition* pAPos = - pIo->m_pFmtOfJustInsertedApo->GetAnchor().GetCntntAnchor(); + pIo->m_pFormatOfJustInsertedApo->GetAnchor().GetContentAnchor(); if (pAPos && &pAPos->nNode.GetNode() == &pPoint->nNode.GetNode()) { bInsNode = true; bSetMinHeight = true; - SwFmtSurround aSur(pIo->m_pFmtOfJustInsertedApo->GetSurround()); + SwFormatSurround aSur(pIo->m_pFormatOfJustInsertedApo->GetSurround()); aSur.SetAnchorOnly(true); - pIo->m_pFmtOfJustInsertedApo->SetFmtAttr(aSur); + pIo->m_pFormatOfJustInsertedApo->SetFormatAttr(aSur); } } @@ -2348,7 +2348,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) } if (bInsNode) - pIo->AppendTxtNode(*pPoint); + pIo->AppendTextNode(*pPoint); pTmpPos = new SwPosition( *pIo->m_pPaM->GetPoint() ); @@ -2360,8 +2360,8 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ), *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, false, true ); - OSL_ENSURE(pTable && pTable->GetFrmFmt(), "insert table failed"); - if (!pTable || !pTable->GetFrmFmt()) + OSL_ENSURE(pTable && pTable->GetFrameFormat(), "insert table failed"); + if (!pTable || !pTable->GetFrameFormat()) return; if (pULSpaceItem && pULSpaceItem->GetUpper() != 0) @@ -2379,7 +2379,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) // contains a Pagedesc. If so that Pagedesc would be moved to the // row after the table, whats wrong. So delete and // set later to the table format. - if (SwTxtNode *const pNd = pTmpPos->nNode.GetNode().GetTxtNode()) + if (SwTextNode *const pNd = pTmpPos->nNode.GetNode().GetTextNode()) { if (const SfxItemSet* pSet = pNd->GetpSwAttrSet()) { @@ -2387,7 +2387,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) const SfxPoolItem* pItem; if (SfxItemState::SET == pSet->GetItemState(RES_BREAK, false, &pItem)) { - pSetAttr = new SvxFmtBreakItem( *static_cast<const SvxFmtBreakItem*>(pItem) ); + pSetAttr = new SvxFormatBreakItem( *static_cast<const SvxFormatBreakItem*>(pItem) ); pNd->ResetAttr( RES_BREAK ); } @@ -2403,23 +2403,23 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) // total width of table if( nMaxRight - nMinLeft > MINLAY * nDefaultSwCols ) { - pTable->GetFrmFmt()->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, nSwWidth)); - aItemSet.Put(SwFmtFrmSize(ATT_FIX_SIZE, nSwWidth)); + pTable->GetFrameFormat()->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, nSwWidth)); + aItemSet.Put(SwFormatFrmSize(ATT_FIX_SIZE, nSwWidth)); } SvxFrameDirectionItem aDirection( bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR ); - pTable->GetFrmFmt()->SetFmtAttr(aDirection); + pTable->GetFrameFormat()->SetFormatAttr(aDirection); if (text::HoriOrientation::LEFT_AND_WIDTH == eOri) { - if (!pIo->m_nInTable && pIo->InLocalApo() && pIo->m_pSFlyPara->pFlyFmt && + if (!pIo->m_nInTable && pIo->InLocalApo() && pIo->m_pSFlyPara->pFlyFormat && GetMinLeft()) { //If we are inside a frame and we have a border, the frames //placement does not consider the tables border, which word //displays outside the frame, so adjust here. - SwFmtHoriOrient aHori(pIo->m_pSFlyPara->pFlyFmt->GetHoriOrient()); + SwFormatHoriOrient aHori(pIo->m_pSFlyPara->pFlyFormat->GetHoriOrient()); sal_Int16 eHori = aHori.GetHoriOrient(); if ((eHori == text::HoriOrientation::NONE) || (eHori == text::HoriOrientation::LEFT) || (eHori == text::HoriOrientation::LEFT_AND_WIDTH)) @@ -2428,7 +2428,7 @@ void WW8TabDesc::CreateSwTable(SvxULSpaceItem* pULSpaceItem) //the maximum is what word does ? aHori.SetPos(pIo->m_pSFlyPara->nXPos + GetMinLeft()); aHori.SetHoriOrient(text::HoriOrientation::NONE); - pIo->m_pSFlyPara->pFlyFmt->SetFmtAttr(aHori); + pIo->m_pSFlyPara->pFlyFormat->SetFormatAttr(aHori); } } else @@ -2471,15 +2471,15 @@ void WW8TabDesc::UseSwTable() pTabLines = &pTable->GetTabLines(); nAktRow = nAktCol = nAktBandRow = 0; - pTblNd = const_cast<SwTableNode*>((*pTabLines)[0]->GetTabBoxes()[0]-> + pTableNd = const_cast<SwTableNode*>((*pTabLines)[0]->GetTabBoxes()[0]-> GetSttNd()->FindTableNode()); - OSL_ENSURE( pTblNd, "wo ist mein TabellenNode" ); + OSL_ENSURE( pTableNd, "wo ist mein TabellenNode" ); // #i69519# - Restrict rows to repeat to a decent value if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) ) nRowsToRepeat = 1; - pTblNd->GetTable().SetRowsToRepeat( nRowsToRepeat ); + pTableNd->GetTable().SetRowsToRepeat( nRowsToRepeat ); // insert extra cells if needed and something like this AdjustNewBand(); @@ -2644,8 +2644,8 @@ void WW8TabDesc::ParkPaM() } while (pIo->m_pPaM->GetNode().GetNodeType() != ND_TEXTNODE && ++nSttNd < nEndNd); - pIo->m_pPaM->GetPoint()->nContent.Assign(pIo->m_pPaM->GetCntntNode(), 0); - pIo->m_rDoc.SetTxtFmtColl(*pIo->m_pPaM, const_cast<SwTxtFmtColl*>(pIo->m_pDfltTxtFmtColl)); + pIo->m_pPaM->GetPoint()->nContent.Assign(pIo->m_pPaM->GetContentNode(), 0); + pIo->m_rDoc.SetTextFormatColl(*pIo->m_pPaM, const_cast<SwTextFormatColl*>(pIo->m_pDfltTextFormatColl)); } } @@ -2674,7 +2674,7 @@ void WW8TabDesc::FinishSwTable() pIo->m_bWasTabRowEnd = false; pIo->m_bWasTabCellEnd = false; - pIo->m_aInsertedTables.InsertTable(*pTblNd, *pIo->m_pPaM); + pIo->m_aInsertedTables.InsertTable(*pTableNd, *pIo->m_pPaM); MergeCells(); @@ -2702,7 +2702,7 @@ void WW8TabDesc::FinishSwTable() } } } - pIo->m_pFmtOfJustInsertedApo = 0; + pIo->m_pFormatOfJustInsertedApo = 0; aMergeGroups.clear(); } } @@ -2884,18 +2884,18 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) pIo->m_pPaM->GetPoint()->nNode = nSttNd; } while (pIo->m_pPaM->GetNode().GetNodeType() != ND_TEXTNODE && ++nSttNd < nEndNd); - pIo->m_pPaM->GetPoint()->nContent.Assign(pIo->m_pPaM->GetCntntNode(), 0); + pIo->m_pPaM->GetPoint()->nContent.Assign(pIo->m_pPaM->GetContentNode(), 0); // Precautionally set now, otherwise the style is not set for cells // that are inserted for margin balancing. - pIo->m_rDoc.SetTxtFmtColl(*pIo->m_pPaM, const_cast<SwTxtFmtColl*>(pIo->m_pDfltTxtFmtColl)); + pIo->m_rDoc.SetTextFormatColl(*pIo->m_pPaM, const_cast<SwTextFormatColl*>(pIo->m_pDfltTextFormatColl)); // because this cells are invisible helper constructions only to simulate - // the frayed view of WW-tables we do NOT need SetTxtFmtCollAndListLevel() + // the frayed view of WW-tables we do NOT need SetTextFormatCollAndListLevel() } // Better to turn Snap to Grid off for all paragraphs in tables - if(SwTxtNode *pNd = pIo->m_pPaM->GetNode().GetTxtNode()) + if(SwTextNode *pNd = pIo->m_pPaM->GetNode().GetTextNode()) { - const SfxPoolItem &rItm = pNd->SwCntntNode::GetAttr(RES_PARATR_SNAPTOGRID); + const SfxPoolItem &rItm = pNd->SwContentNode::GetAttr(RES_PARATR_SNAPTOGRID); const SvxParaGridItem &rSnapToGrid = static_cast<const SvxParaGridItem&>(rItm); if(rSnapToGrid.GetValue()) @@ -2906,9 +2906,9 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) SwPosition* pGridPos = pIo->m_pPaM->GetPoint(); const sal_Int32 nEnd = pGridPos->nContent.GetIndex(); - pGridPos->nContent.Assign(pIo->m_pPaM->GetCntntNode(), 0); + pGridPos->nContent.Assign(pIo->m_pPaM->GetContentNode(), 0); pIo->m_pCtrlStck->NewAttr(*pGridPos, aGridItem); - pGridPos->nContent.Assign(pIo->m_pPaM->GetCntntNode(), nEnd); + pGridPos->nContent.Assign(pIo->m_pPaM->GetContentNode(), nEnd); pIo->m_pCtrlStck->SetAttr(*pGridPos, RES_PARATR_SNAPTOGRID); } } @@ -2924,10 +2924,10 @@ void WW8TabDesc::InsertCells( short nIns ) pTabBoxes = &pTabLine->GetTabBoxes(); pTabBox = (*pTabBoxes)[0]; - pIo->m_rDoc.GetNodes().InsBoxen( pTblNd, pTabLine, static_cast<SwTableBoxFmt*>(pTabBox->GetFrmFmt()), - const_cast<SwTxtFmtColl*>(pIo->m_pDfltTxtFmtColl), 0, pTabBoxes->size(), nIns ); - // The third parameter contains the FrmFmt of the boxes. - // Here it is possible to optimize to save (reduce) FrmFmts. + pIo->m_rDoc.GetNodes().InsBoxen( pTableNd, pTabLine, static_cast<SwTableBoxFormat*>(pTabBox->GetFrameFormat()), + const_cast<SwTextFormatColl*>(pIo->m_pDfltTextFormatColl), 0, pTabBoxes->size(), nIns ); + // The third parameter contains the FrameFormat of the boxes. + // Here it is possible to optimize to save (reduce) FrameFormats. } void WW8TabDesc::SetTabBorders(SwTableBox* pBox, short nWwIdx) @@ -2935,30 +2935,30 @@ void WW8TabDesc::SetTabBorders(SwTableBox* pBox, short nWwIdx) if( nWwIdx < 0 || nWwIdx >= pActBand->nWwCols ) return; // faked cells -> no border - SvxBoxItem aFmtBox( RES_BOX ); + SvxBoxItem aFormatBox( RES_BOX ); if (pActBand->pTCs) // neither Cell Border nor Default Border defined ? { WW8_TCell* pT = &pActBand->pTCs[nWwIdx]; if (SwWW8ImplReader::IsBorder(pT->rgbrc)) - SwWW8ImplReader::SetBorder(aFmtBox, pT->rgbrc); + SwWW8ImplReader::SetBorder(aFormatBox, pT->rgbrc); } if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwTOP)) { - aFmtBox.SetDistance( + aFormatBox.SetDistance( pActBand->nOverrideValues[nWwIdx][WW8TabBandDesc::wwTOP], SvxBoxItemLine::TOP); } else - aFmtBox.SetDistance(pActBand->mnDefaultTop, SvxBoxItemLine::TOP); + aFormatBox.SetDistance(pActBand->mnDefaultTop, SvxBoxItemLine::TOP); if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwBOTTOM)) { - aFmtBox.SetDistance( + aFormatBox.SetDistance( pActBand->nOverrideValues[nWwIdx][WW8TabBandDesc::wwBOTTOM], SvxBoxItemLine::BOTTOM); } else - aFmtBox.SetDistance(pActBand->mnDefaultBottom,SvxBoxItemLine::BOTTOM); + aFormatBox.SetDistance(pActBand->mnDefaultBottom,SvxBoxItemLine::BOTTOM); // nGapHalf for WW is a *horizontal* gap between table cell and content. short nLeftDist = @@ -2967,22 +2967,22 @@ void WW8TabDesc::SetTabBorders(SwTableBox* pBox, short nWwIdx) pActBand->mbHasSpacing ? pActBand->mnDefaultRight : pActBand->nGapHalf; if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwLEFT)) { - aFmtBox.SetDistance( + aFormatBox.SetDistance( pActBand->nOverrideValues[nWwIdx][WW8TabBandDesc::wwLEFT], SvxBoxItemLine::LEFT); } else - aFmtBox.SetDistance(nLeftDist, SvxBoxItemLine::LEFT); + aFormatBox.SetDistance(nLeftDist, SvxBoxItemLine::LEFT); if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwRIGHT)) { - aFmtBox.SetDistance( + aFormatBox.SetDistance( pActBand->nOverrideValues[nWwIdx][WW8TabBandDesc::wwRIGHT], SvxBoxItemLine::RIGHT); } else - aFmtBox.SetDistance(nRightDist,SvxBoxItemLine::RIGHT); + aFormatBox.SetDistance(nRightDist,SvxBoxItemLine::RIGHT); - pBox->GetFrmFmt()->SetFmtAttr(aFmtBox); + pBox->GetFrameFormat()->SetFormatAttr(aFormatBox); } void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx ) @@ -2994,7 +2994,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx ) if (pActBand->pNewSHDs && pActBand->pNewSHDs[nWwIdx] != COL_AUTO) { Color aColor(pActBand->pNewSHDs[nWwIdx]); - pBox->GetFrmFmt()->SetFmtAttr(SvxBrushItem(aColor, RES_BACKGROUND)); + pBox->GetFrameFormat()->SetFormatAttr(SvxBrushItem(aColor, RES_BACKGROUND)); bFound = true; } @@ -3006,7 +3006,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx ) return; SwWW8Shade aSh( pIo->m_bVer67, rSHD ); - pBox->GetFrmFmt()->SetFmtAttr(SvxBrushItem(aSh.aColor, RES_BACKGROUND)); + pBox->GetFrameFormat()->SetFormatAttr(SvxBrushItem(aSh.aColor, RES_BACKGROUND)); } } @@ -3043,7 +3043,7 @@ void WW8TabDesc::SetTabDirection(SwTableBox* pBox, short nWwIdx) if (nWwIdx < 0 || nWwIdx >= pActBand->nWwCols) return; SvxFrameDirectionItem aItem(MakeDirection(pActBand->maDirections[nWwIdx], bIsBiDi), RES_FRAMEDIR); - pBox->GetFrmFmt()->SetFmtAttr(aItem); + pBox->GetFrameFormat()->SetFormatAttr(aItem); } void WW8TabDesc::SetTabVertAlign( SwTableBox* pBox, short nWwIdx ) @@ -3071,7 +3071,7 @@ void WW8TabDesc::SetTabVertAlign( SwTableBox* pBox, short nWwIdx ) } } - pBox->GetFrmFmt()->SetFmtAttr( SwFmtVertOrient(0,eVertOri) ); + pBox->GetFrameFormat()->SetFormatAttr( SwFormatVertOrient(0,eVertOri) ); } void WW8TabDesc::AdjustNewBand() @@ -3083,10 +3083,10 @@ void WW8TabDesc::AdjustNewBand() OSL_ENSURE( pTabBoxes && pTabBoxes->size() == (sal_uInt16)pActBand->nSwCols, "Falsche Spaltenzahl in Tabelle" ); - if( bClaimLineFmt ) + if( bClaimLineFormat ) { - pTabLine->ClaimFrmFmt(); // necessary because of cell height - SwFmtFrmSize aF( ATT_MIN_SIZE, 0, 0 ); // default + pTabLine->ClaimFrameFormat(); // necessary because of cell height + SwFormatFrmSize aF( ATT_MIN_SIZE, 0, 0 ); // default if (pActBand->nLineHeight == 0) // 0 = Auto aF.SetHeightSizeType( ATT_VAR_SIZE ); @@ -3102,18 +3102,18 @@ void WW8TabDesc::AdjustNewBand() aF.SetHeight(pActBand->nLineHeight);// set min/exact height } - pTabLine->GetFrmFmt()->SetFmtAttr(aF); + pTabLine->GetFrameFormat()->SetFormatAttr(aF); } //Word stores 1 for bCantSplit if the row cannot be split, we set true if //we can split the row bool bSetCantSplit = pActBand->bCantSplit; - pTabLine->GetFrmFmt()->SetFmtAttr(SwFmtRowSplit(!bSetCantSplit)); + pTabLine->GetFrameFormat()->SetFormatAttr(SwFormatRowSplit(!bSetCantSplit)); short i; // SW-Index short j; // WW-Index short nW; // Width - SwFmtFrmSize aFS( ATT_FIX_SIZE ); + SwFormatFrmSize aFS( ATT_FIX_SIZE ); j = pActBand->bLEmptyCol ? -1 : 0; for( i = 0; i < pActBand->nSwCols; i++ ) @@ -3135,15 +3135,15 @@ void WW8TabDesc::AdjustNewBand() } SwTableBox* pBox = (*pTabBoxes)[i]; - // could be reduced further by intelligent moving of FrmFmts - pBox->ClaimFrmFmt(); + // could be reduced further by intelligent moving of FrameFormats + pBox->ClaimFrameFormat(); SetTabBorders(pBox, j); // #i18128# word has only one line between adjoining vertical cells // we have to mimick this in the filter by picking the larger of the // sides and using that one on one side of the line (right) - SvxBoxItem aCurrentBox(sw::util::ItemGet<SvxBoxItem>(*(pBox->GetFrmFmt()), RES_BOX)); + SvxBoxItem aCurrentBox(sw::util::ItemGet<SvxBoxItem>(*(pBox->GetFrameFormat()), RES_BOX)); const ::editeng::SvxBorderLine *pLeftLine = aCurrentBox.GetLine(SvxBoxItemLine::LEFT); int nCurrentRightLineWidth = 0; if(pLeftLine) @@ -3152,7 +3152,7 @@ void WW8TabDesc::AdjustNewBand() if (i != 0) { SwTableBox* pBox2 = (*pTabBoxes)[i-1]; - SvxBoxItem aOldBox(sw::util::ItemGet<SvxBoxItem>(*(pBox2->GetFrmFmt()), RES_BOX)); + SvxBoxItem aOldBox(sw::util::ItemGet<SvxBoxItem>(*(pBox2->GetFrameFormat()), RES_BOX)); const ::editeng::SvxBorderLine *pRightLine = aOldBox.GetLine(SvxBoxItemLine::RIGHT); int nOldBoxRightLineWidth = 0; if(pRightLine) @@ -3162,10 +3162,10 @@ void WW8TabDesc::AdjustNewBand() aCurrentBox.SetLine(aOldBox.GetLine(SvxBoxItemLine::RIGHT), SvxBoxItemLine::LEFT); aOldBox.SetLine(0, SvxBoxItemLine::RIGHT); - pBox2->GetFrmFmt()->SetFmtAttr(aOldBox); + pBox2->GetFrameFormat()->SetFormatAttr(aOldBox); } - pBox->GetFrmFmt()->SetFmtAttr(aCurrentBox); + pBox->GetFrameFormat()->SetFormatAttr(aCurrentBox); SetTabVertAlign(pBox, j); SetTabDirection(pBox, j); @@ -3174,7 +3174,7 @@ void WW8TabDesc::AdjustNewBand() j++; aFS.SetWidth( nW ); - pBox->GetFrmFmt()->SetFmtAttr( aFS ); + pBox->GetFrameFormat()->SetFormatAttr( aFS ); // skip non existing cells while( ( j < pActBand->nWwCols ) && !pActBand->bExist[j] ) @@ -3319,7 +3319,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem) m_bFirstPara = true; // keine rekursiven Tabellen Nicht bei EinfuegenDatei in Tabelle oder // Fussnote - if (m_bReadNoTbl) + if (m_bReadNoTable) return false; if (m_pTableDesc) @@ -3380,39 +3380,39 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp, SvxULSpaceItem* pULSpaceItem) RES_FRMATR_BEGIN, RES_FRMATR_END-1); // #i33818# - anchor the Writer fly frame for the nested table at-character. // #i45301# - SwFmtAnchor aAnchor( eAnchor ); + SwFormatAnchor aAnchor( eAnchor ); aAnchor.SetAnchor( m_pTableDesc->pParentPos ); aItemSet.Put( aAnchor ); - m_pTableDesc->pFlyFmt = m_rDoc.MakeFlySection( eAnchor, + m_pTableDesc->pFlyFormat = m_rDoc.MakeFlySection( eAnchor, m_pTableDesc->pParentPos, &aItemSet); - OSL_ENSURE( m_pTableDesc->pFlyFmt->GetAnchor().GetAnchorId() == eAnchor, + OSL_ENSURE( m_pTableDesc->pFlyFormat->GetAnchor().GetAnchorId() == eAnchor, "Not the anchor type requested!" ); - MoveInsideFly(m_pTableDesc->pFlyFmt); + MoveInsideFly(m_pTableDesc->pFlyFormat); } m_pTableDesc->CreateSwTable(pULSpaceItem); - if (m_pTableDesc->pFlyFmt) + if (m_pTableDesc->pFlyFormat) { - m_pTableDesc->SetSizePosition(m_pTableDesc->pFlyFmt); + m_pTableDesc->SetSizePosition(m_pTableDesc->pFlyFormat); // #i33818# - Use absolute position object attributes, // if existing, and apply them to the created Writer fly frame. if ( pTableWFlyPara && pTableSFlyPara ) { WW8FlySet aFlySet( *this, pTableWFlyPara, pTableSFlyPara, false ); - SwFmtAnchor aAnchor( FLY_AT_CHAR ); + SwFormatAnchor aAnchor( FLY_AT_CHAR ); aAnchor.SetAnchor( m_pTableDesc->pParentPos ); aFlySet.Put( aAnchor ); - m_pTableDesc->pFlyFmt->SetFmtAttr( aFlySet ); + m_pTableDesc->pFlyFormat->SetFormatAttr( aFlySet ); } else { - SwFmtHoriOrient aHori = - m_pTableDesc->pTable->GetFrmFmt()->GetHoriOrient(); - m_pTableDesc->pFlyFmt->SetFmtAttr(aHori); - m_pTableDesc->pFlyFmt->SetFmtAttr( SwFmtSurround( SURROUND_NONE ) ); + SwFormatHoriOrient aHori = + m_pTableDesc->pTable->GetFrameFormat()->GetHoriOrient(); + m_pTableDesc->pFlyFormat->SetFormatAttr(aHori); + m_pTableDesc->pFlyFormat->SetFormatAttr( SwFormatSurround( SURROUND_NONE ) ); } // #i33818# - The nested table doesn't have to leave // the table cell. Thus, the Writer fly frame has to follow the text flow. - m_pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( true ) ); + m_pTableDesc->pFlyFormat->SetFormatAttr( SwFormatFollowTextFlow( true ) ); } else m_pTableDesc->SetSizePosition(0); @@ -3452,9 +3452,9 @@ void SwWW8ImplReader::Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short void SwWW8ImplReader::PopTableDesc() { - if (m_pTableDesc && m_pTableDesc->pFlyFmt) + if (m_pTableDesc && m_pTableDesc->pFlyFormat) { - MoveOutsideFly(m_pTableDesc->pFlyFmt,*m_pTableDesc->pParentPos); + MoveOutsideFly(m_pTableDesc->pFlyFormat,*m_pTableDesc->pParentPos); } delete m_pTableDesc; @@ -3520,16 +3520,16 @@ sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const return nRes; } -const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( OUString& rName ) const +const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( OUString& rName ) const { - SwFmt* pRet = 0; + SwFormat* pRet = 0; if( !m_vColl.empty() ) { for(sal_uInt16 nI = 0; nI < m_pStyles->GetCount(); nI++ ) if( m_vColl[ nI ].bValid && (rName.equals( m_vColl[ nI ].GetOrgWWName())) ) { - pRet = m_vColl[ nI ].pFmt; + pRet = m_vColl[ nI ].pFormat; break; } } @@ -3669,7 +3669,7 @@ WW8RStyle::WW8RStyle(WW8Fib& _rFib, SwWW8ImplReader* pI) , pParaSprms(0) , nSprmsLen(0) , nWwNumLevel(0) - , bTxtColChanged(false) + , bTextColChanged(false) , bFontChanged(false) , bCJKFontChanged(false) , bCTLFontChanged(false) @@ -3696,16 +3696,16 @@ void WW8RStyle::Set1StyleDefaults() if( !pIo->m_bNoAttrImport ) { // Style has no text color set, winword default is auto - if ( !bTxtColChanged ) - pIo->m_pAktColl->SetFmtAttr(SvxColorItem(Color(COL_AUTO), RES_CHRATR_COLOR)); + if ( !bTextColChanged ) + pIo->m_pAktColl->SetFormatAttr(SvxColorItem(Color(COL_AUTO), RES_CHRATR_COLOR)); // Style has no FontSize ? WinWord Default is 10pt for western and asian if( !bFSizeChanged ) { SvxFontHeightItem aAttr(200, 100, RES_CHRATR_FONTSIZE); - pIo->m_pAktColl->SetFmtAttr(aAttr); + pIo->m_pAktColl->SetFormatAttr(aAttr); aAttr.SetWhich(RES_CHRATR_CJK_FONTSIZE); - pIo->m_pAktColl->SetFmtAttr(aAttr); + pIo->m_pAktColl->SetFormatAttr(aAttr); } // Style has no FontSize ? WinWord Default is 10pt for western and asian @@ -3713,20 +3713,20 @@ void WW8RStyle::Set1StyleDefaults() { SvxFontHeightItem aAttr(200, 100, RES_CHRATR_FONTSIZE); aAttr.SetWhich(RES_CHRATR_CTL_FONTSIZE); - pIo->m_pAktColl->SetFmtAttr(aAttr); + pIo->m_pAktColl->SetFormatAttr(aAttr); } if( !bWidowsChanged ) // Widows ? { - pIo->m_pAktColl->SetFmtAttr( SvxWidowsItem( 2, RES_PARATR_WIDOWS ) ); - pIo->m_pAktColl->SetFmtAttr( SvxOrphansItem( 2, RES_PARATR_ORPHANS ) ); + pIo->m_pAktColl->SetFormatAttr( SvxWidowsItem( 2, RES_PARATR_WIDOWS ) ); + pIo->m_pAktColl->SetFormatAttr( SvxOrphansItem( 2, RES_PARATR_ORPHANS ) ); } } } bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisStyle, sal_uInt16 nNextStyle) { - SwFmt* pColl; + SwFormat* pColl; bool bStyExist; if (rSI.bColl) @@ -3761,12 +3761,12 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty { if (bStyExist) { - pColl->ResetAllFmtAttr(); // #i73790# - method renamed + pColl->ResetAllFormatAttr(); // #i73790# - method renamed } pColl->SetAuto(false); // suggested by JP } // but changes the UI pIo->m_pAktColl = pColl; - rSI.pFmt = pColl; // remember translation WW->SW + rSI.pFormat = pColl; // remember translation WW->SW rSI.bImportSkipped = !bImport; // Set Based on style @@ -3774,9 +3774,9 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty if (j != nThisStyle && j < cstd ) { SwWW8StyInf* pj = &pIo->m_vColl[j]; - if (rSI.pFmt && pj->pFmt && rSI.bColl == pj->bColl) + if (rSI.pFormat && pj->pFormat && rSI.bColl == pj->bColl) { - rSI.pFmt->SetDerivedFrom( pj->pFmt ); // ok, set Based on + rSI.pFormat->SetDerivedFrom( pj->pFormat ); // ok, set Based on rSI.eLTRFontSrcCharSet = pj->eLTRFontSrcCharSet; rSI.eRTLFontSrcCharSet = pj->eRTLFontSrcCharSet; rSI.eCJKFontSrcCharSet = pj->eCJKFontSrcCharSet; @@ -3794,12 +3794,12 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty } } else if( pIo->m_bNewDoc && bStyExist ) - rSI.pFmt->SetDerivedFrom(0); + rSI.pFormat->SetDerivedFrom(0); rSI.nFollow = nNextStyle; // remember Follow pStyRule = 0; // recreate if necessary - bTxtColChanged = bFontChanged = bCJKFontChanged = bCTLFontChanged = + bTextColChanged = bFontChanged = bCJKFontChanged = bCTLFontChanged = bFSizeChanged = bFCTLSizeChanged = bWidowsChanged = false; pIo->SetNAktColl( nThisStyle ); pIo->m_bStyNormal = nThisStyle == 0; @@ -3811,7 +3811,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp) // Reset attribute flags, because there are no style-ends. pIo->m_bHasBorder = pIo->m_bSpec = pIo->m_bObj = pIo->m_bSymbol = false; - pIo->m_nCharFmt = -1; + pIo->m_nCharFormat = -1; // If Style basiert auf Nichts oder Basis ignoriert if ((rSI.nBase >= cstd || pIo->m_vColl[rSI.nBase].bImportSkipped) && rSI.bColl) @@ -3898,7 +3898,7 @@ void WW8RStyle::RecursiveReg(sal_uInt16 nNr) if( rSI.nBase < cstd && !pIo->m_vColl[rSI.nBase].bImported ) RecursiveReg(rSI.nBase); - pIo->RegisterNumFmtOnStyle(nNr); + pIo->RegisterNumFormatOnStyle(nNr); } @@ -4093,7 +4093,7 @@ Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize) aChpx.fItalic = (nFlags8 & 0x02) >> 1; aChpx.fRMarkDel = (nFlags8 & 0x04) >> 2; aChpx.fOutline = (nFlags8 & 0x08) >> 3; - aChpx.fFldVanish = (nFlags8 & 0x10) >> 4; + aChpx.fFieldVanish = (nFlags8 & 0x10) >> 4; aChpx.fSmallCaps = (nFlags8 & 0x20) >> 5; aChpx.fCaps = (nFlags8 & 0x40) >> 6; aChpx.fVanish = (nFlags8 & 0x80) >> 7; @@ -4416,9 +4416,9 @@ void WW8RStyle::ImportStyles() void WW8RStyle::Import() { - pIo->m_pDfltTxtFmtColl = pIo->m_rDoc.GetDfltTxtFmtColl(); - pIo->m_pStandardFmtColl = - pIo->m_rDoc.getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false); + pIo->m_pDfltTextFormatColl = pIo->m_rDoc.GetDfltTextFormatColl(); + pIo->m_pStandardFormatColl = + pIo->m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, false); if( pIo->m_nIniFlags & WW8FL_NO_STYLES ) return; @@ -4434,12 +4434,12 @@ void WW8RStyle::Import() { SwWW8StyInf* pj = &pIo->m_vColl[j]; if ( j != i // rational Index ? - && pi->pFmt // Format ok ? - && pj->pFmt // Derived-Format ok ? + && pi->pFormat // Format ok ? + && pj->pFormat // Derived-Format ok ? && pi->bColl // only possible for paragraph templates (WW) && pj->bColl ){ // identical Typ ? - static_cast<SwTxtFmtColl*>(pi->pFmt)->SetNextTxtFmtColl( - *static_cast<SwTxtFmtColl*>(pj->pFmt) ); // ok, register + static_cast<SwTextFormatColl*>(pi->pFormat)->SetNextTextFormatColl( + *static_cast<SwTextFormatColl*>(pj->pFormat) ); // ok, register } } } @@ -4449,21 +4449,21 @@ void WW8RStyle::Import() // That is empty by default ( WW6 dt and US ) and not changeable // via WW-UI so this does not matter. // This could be done by: - // if( bNew ) rDoc.SetDefault( pDefCharFmt->GetAttrSet() ); + // if( bNew ) rDoc.SetDefault( pDefCharFormat->GetAttrSet() ); // for e.g. tables an always valid Std-Style is necessary if( pIo->StyleExists(0) && !pIo->m_vColl.empty() && - pIo->m_vColl[0].pFmt && pIo->m_vColl[0].bColl && pIo->m_vColl[0].bValid ) - pIo->m_pDfltTxtFmtColl = static_cast<SwTxtFmtColl*>(pIo->m_vColl[0].pFmt); + pIo->m_vColl[0].pFormat && pIo->m_vColl[0].bColl && pIo->m_vColl[0].bValid ) + pIo->m_pDfltTextFormatColl = static_cast<SwTextFormatColl*>(pIo->m_vColl[0].pFormat); else - pIo->m_pDfltTxtFmtColl = pIo->m_rDoc.GetDfltTxtFmtColl(); + pIo->m_pDfltTextFormatColl = pIo->m_rDoc.GetDfltTextFormatColl(); // set Hyphenation flag on BASIC para-style - if (pIo->m_bNewDoc && pIo->m_pStandardFmtColl) + if (pIo->m_bNewDoc && pIo->m_pStandardFormatColl) { if (pIo->m_pWDop->fAutoHyphen - && SfxItemState::SET != pIo->m_pStandardFmtColl->GetItemState( + && SfxItemState::SET != pIo->m_pStandardFormatColl->GetItemState( RES_PARATR_HYPHENZONE, false) ) { SvxHyphenZoneItem aAttr(true, RES_PARATR_HYPHENZONE); @@ -4471,7 +4471,7 @@ void WW8RStyle::Import() aAttr.GetMinTrail() = 2; aAttr.GetMaxHyphens() = 0; - pIo->m_pStandardFmtColl->SetFmtAttr( aAttr ); + pIo->m_pStandardFormatColl->SetFormatAttr( aAttr ); } /* @@ -4479,10 +4479,10 @@ void WW8RStyle::Import() the page/sections rtl setting the standard style lack of rtl still means ltr */ - if (SfxItemState::SET != pIo->m_pStandardFmtColl->GetItemState(RES_FRAMEDIR, + if (SfxItemState::SET != pIo->m_pStandardFormatColl->GetItemState(RES_FRAMEDIR, false)) { - pIo->m_pStandardFmtColl->SetFmtAttr( + pIo->m_pStandardFormatColl->SetFormatAttr( SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); } } @@ -4493,14 +4493,14 @@ void WW8RStyle::Import() rtl_TextEncoding SwWW8StyInf::GetCharSet() const { - if ((pFmt) && (pFmt->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((pFormat) && (pFormat->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return eRTLFontSrcCharSet; return eLTRFontSrcCharSet; } rtl_TextEncoding SwWW8StyInf::GetCJKCharSet() const { - if ((pFmt) && (pFmt->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) + if ((pFormat) && (pFormat->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return eRTLFontSrcCharSet; return eCJKFontSrcCharSet; } diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx index 1108b69d93c6..453dfb3de1e8 100644 --- a/sw/source/filter/ww8/ww8par2.hxx +++ b/sw/source/filter/ww8/ww8par2.hxx @@ -45,7 +45,7 @@ private: struct WW8SwFlyPara { - SwFlyFrmFmt* pFlyFmt; + SwFlyFrameFormat* pFlyFormat; // 1. Teil: daraus abgeleitete Sw-Attribute sal_Int16 nXPos, nYPos; // Position @@ -99,7 +99,7 @@ friend class SwWW8ImplReader; sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles - bool bTxtColChanged; + bool bTextColChanged; bool bFontChanged; // For Simulating Default-Font bool bCJKFontChanged; // For Simulating Default-CJK Font bool bCTLFontChanged; // For Simulating Default-CTL Font diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 8d4251ce50ff..c87815cccbdd 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -124,16 +124,16 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, OUString& rStr ) { aFormula.msDefault = GetFieldResult(pF); - SwInputField aFld( - static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_INPUTFLD )), + SwInputField aField( + static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_INPUTFLD )), aFormula.msDefault, aFormula.msTitle, INP_TXT, 0 ); - aFld.SetHelp(aFormula.msHelp); - aFld.SetToolTip(aFormula.msToolTip); + aField.SetHelp(aFormula.msHelp); + aField.SetToolTip(aFormula.msToolTip); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } else @@ -242,20 +242,20 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, OUString& rStr) if (!bUseEnhFields) { - SwDropDownField aFld(static_cast<SwDropDownFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DROPDOWN))); + SwDropDownField aField(static_cast<SwDropDownFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_DROPDOWN))); - aFld.SetName(aFormula.msTitle); - aFld.SetHelp(aFormula.msHelp); - aFld.SetToolTip(aFormula.msToolTip); + aField.SetName(aFormula.msTitle); + aField.SetHelp(aFormula.msHelp); + aField.SetToolTip(aFormula.msToolTip); if (!aFormula.maListEntries.empty()) { - aFld.SetItems(aFormula.maListEntries); + aField.SetItems(aFormula.maListEntries); int nIndex = aFormula.mfDropdownIndex < aFormula.maListEntries.size() ? aFormula.mfDropdownIndex : 0; - aFld.SetSelectedItem(aFormula.maListEntries[nIndex]); + aField.SetSelectedItem(aFormula.maListEntries[nIndex]); } - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } else @@ -323,7 +323,7 @@ typedef sal_uInt16 WW8aIdSty[WW8ListManager::nMaxLevel]; // Zeichenattribute aus GrpprlChpx typedef SfxItemSet* WW8aISet[WW8ListManager::nMaxLevel]; // Zeichen Style Pointer -typedef SwCharFmt* WW8aCFmt[WW8ListManager::nMaxLevel]; +typedef SwCharFormat* WW8aCFormat[WW8ListManager::nMaxLevel]; struct WW8LST // nur DIE Eintraege, die WIR benoetigen! { @@ -393,7 +393,7 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id) std::vector<ww::bytes> maParaSprms; WW8aIdSty aIdSty; // Style Id's for each level WW8aISet aItemSet; // Zeichenattribute aus GrpprlChpx - WW8aCFmt aCharFmt; // Zeichen Style Pointer + WW8aCFormat aCharFormat; // Zeichen Style Pointer SwNumRule* pNumRule; // Zeiger auf entsprechende Listenvorlage im Writer sal_uInt32 nIdLst; // WW8Id dieser Liste @@ -407,7 +407,7 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id) { memcpy( aIdSty, aLST.aIdSty, sizeof( aIdSty )); memset(&aItemSet, 0, sizeof( aItemSet )); - memset(&aCharFmt, 0, sizeof( aCharFmt )); + memset(&aCharFormat, 0, sizeof( aCharFormat )); } }; @@ -518,7 +518,7 @@ OUString sanitizeString(const OUString& rString) return rString; } -bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, +bool WW8ListManager::ReadLVL(SwNumFormat& rNumFormat, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle, bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel, ww::bytes &rParaSprms) @@ -628,7 +628,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, "of unexpected configuration"); (void)bDone; } - if ( rNumFmt.GetPositionAndSpaceMode() == + if ( rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { // If there is a tab setting with a larger value, then use that. @@ -705,7 +705,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, rReader.SetNAktColl( nNewColl ); // Nun den GrpprlChpx einfach durchnudeln: die Read_xy() Methoden - // in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFmtAttr() + // in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFormatAttr() // und diese merken am besetzten Reader-ItemSet-Pointer, dass dieser // spezielle ItemSet relevant ist - und nicht ein Stack oder Style! sal_uInt16 nOldFlags1 = rReader.GetToggleAttrFlags(); @@ -918,58 +918,58 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, break; } - // 6. entsprechendes NumFmt konfigurieren + // 6. entsprechendes NumFormat konfigurieren if( bSetStartNo ) - rNumFmt.SetStart( nStartNo ); - rNumFmt.SetNumberingType( nType ); - rNumFmt.SetNumAdjust( eAdj ); + rNumFormat.SetStart( nStartNo ); + rNumFormat.SetNumberingType( nType ); + rNumFormat.SetNumAdjust( eAdj ); if( style::NumberingType::CHAR_SPECIAL == nType ) { // first character of the Prefix-Text is the Bullet - rNumFmt.SetBulletChar(cBullet); + rNumFormat.SetBulletChar(cBullet); // Don't forget: unten, nach dem Bauen eventueller Styles auch noch // SetBulletFont() rufen !!! } //For i120928,position index info else if (style::NumberingType::BITMAP == nType) { - rNumFmt.SetGrfBulletCP(cGrfBulletCP); + rNumFormat.SetGrfBulletCP(cGrfBulletCP); } else { // reminder: Garnix ist default Prefix if( !sPrefix.isEmpty() ) - rNumFmt.SetPrefix( sPrefix ); + rNumFormat.SetPrefix( sPrefix ); // reminder: Point is default Postfix - rNumFmt.SetSuffix( sPostfix ); - rNumFmt.SetIncludeUpperLevels( nUpperLevel ); + rNumFormat.SetSuffix( sPostfix ); + rNumFormat.SetIncludeUpperLevels( nUpperLevel ); } // #i89181# - if ( rNumFmt.GetPositionAndSpaceMode() == + if ( rNumFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { if (eAdj == SVX_ADJUST_RIGHT) { - rNumFmt.SetAbsLSpace(aLVL.nDxaLeft); - rNumFmt.SetFirstLineOffset(-aLVL.nDxaLeft); - rNumFmt.SetCharTextDistance(-aLVL.nDxaLeft1); + rNumFormat.SetAbsLSpace(aLVL.nDxaLeft); + rNumFormat.SetFirstLineOffset(-aLVL.nDxaLeft); + rNumFormat.SetCharTextDistance(-aLVL.nDxaLeft1); } else { - rNumFmt.SetAbsLSpace( aLVL.nDxaLeft ); - rNumFmt.SetFirstLineOffset(aLVL.nDxaLeft1); + rNumFormat.SetAbsLSpace( aLVL.nDxaLeft ); + rNumFormat.SetFirstLineOffset(aLVL.nDxaLeft1); } } else { - rNumFmt.SetIndentAt( aLVL.nDxaLeft ); - rNumFmt.SetFirstLineIndent(aLVL.nDxaLeft1); + rNumFormat.SetIndentAt( aLVL.nDxaLeft ); + rNumFormat.SetFirstLineIndent(aLVL.nDxaLeft1); if ( !aLVL.bV6 ) - rNumFmt.SetListtabPos( nTabPos ); + rNumFormat.SetListtabPos( nTabPos ); else - rNumFmt.SetListtabPos( aLVL.nV6Indent ); + rNumFormat.SetListtabPos( aLVL.nV6Indent ); SvxNumberFormat::LabelFollowedBy eNumLabelFollowedBy = SvxNumberFormat::LISTTAB; switch ( ixchFollow ) { @@ -989,22 +989,22 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, } break; } - rNumFmt.SetLabelFollowedBy( eNumLabelFollowedBy ); + rNumFormat.SetLabelFollowedBy( eNumLabelFollowedBy ); } return true; } void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule, - WW8aISet& rListItemSet, WW8aCFmt& rCharFmt, bool& bNewCharFmtCreated, + WW8aISet& rListItemSet, WW8aCFormat& rCharFormat, bool& bNewCharFormatCreated, const OUString& sPrefix ) { - bNewCharFmtCreated = false; + bNewCharFormatCreated = false; SfxItemSet* pThisLevelItemSet; sal_uInt8 nIdenticalItemSetLevel; const SfxPoolItem* pItem; - SwNumFmt aNumFmt = rNumRule.Get( nLevel ); + SwNumFormat aNumFormat = rNumRule.Get( nLevel ); pThisLevelItemSet = rListItemSet[ nLevel ]; @@ -1043,7 +1043,7 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule, } } - SwCharFmt* pFmt; + SwCharFormat* pFormat; if (nMaxLevel == nIdenticalItemSetLevel) { // Style definieren @@ -1051,65 +1051,65 @@ void WW8ListManager::AdjustLVL( sal_uInt8 nLevel, SwNumRule& rNumRule, + "z" + OUString::number( nLevel ) ); // const Wegcasten - pFmt = rDoc.MakeCharFmt(aName, rDoc.GetDfltCharFmt()); - bNewCharFmtCreated = true; + pFormat = rDoc.MakeCharFormat(aName, rDoc.GetDfltCharFormat()); + bNewCharFormatCreated = true; // Attribute reinsetzen - pFmt->SetFmtAttr( *pThisLevelItemSet ); + pFormat->SetFormatAttr( *pThisLevelItemSet ); } else { // passenden Style hier anhaengen - pFmt = rCharFmt[ nIdenticalItemSetLevel ]; + pFormat = rCharFormat[ nIdenticalItemSetLevel ]; } // merken - rCharFmt[ nLevel ] = pFmt; + rCharFormat[ nLevel ] = pFormat; // Style an das NumFormat haengen - aNumFmt.SetCharFmt( pFmt ); + aNumFormat.SetCharFormat( pFormat ); } //Ensure the default char fmt is initialized for any level of num ruler if no customized attr else { - SwCharFmt* pFmt = aNumFmt.GetCharFmt(); - if ( !pFmt) + SwCharFormat* pFormat = aNumFormat.GetCharFormat(); + if ( !pFormat) { const OUString aName( (!sPrefix.isEmpty() ? sPrefix : rNumRule.GetName()) + "z" + OUString::number( nLevel ) ); - pFmt = rDoc.MakeCharFmt(aName, rDoc.GetDfltCharFmt()); - bNewCharFmtCreated = true; - rCharFmt[ nLevel ] = pFmt; - aNumFmt.SetCharFmt( pFmt ); + pFormat = rDoc.MakeCharFormat(aName, rDoc.GetDfltCharFormat()); + bNewCharFormatCreated = true; + rCharFormat[ nLevel ] = pFormat; + aNumFormat.SetCharFormat( pFormat ); } } // ggfs. Bullet Font an das NumFormat haengen - if( SVX_NUM_CHAR_SPECIAL == aNumFmt.GetNumberingType() ) + if( SVX_NUM_CHAR_SPECIAL == aNumFormat.GetNumberingType() ) { - SwCharFmt* pFmt = aNumFmt.GetCharFmt(); + SwCharFormat* pFormat = aNumFormat.GetCharFormat(); vcl::Font aFont; - if( !pFmt ) + if( !pFormat ) { aFont = numfunc::GetDefBulletFont(); } else { - const SvxFontItem& rFontItem = pFmt->GetFont(); + const SvxFontItem& rFontItem = pFormat->GetFont(); aFont.SetFamily( rFontItem.GetFamily() ); aFont.SetName( rFontItem.GetFamilyName() ); aFont.SetStyleName( rFontItem.GetStyleName() ); aFont.SetPitch( rFontItem.GetPitch() ); aFont.SetCharSet( rFontItem.GetCharSet() ); } - aNumFmt.SetBulletFont( &aFont ); + aNumFormat.SetBulletFont( &aFont ); } // und wieder rein in die NumRule - rNumRule.Set(nLevel, aNumFmt); + rNumRule.Set(nLevel, aNumFormat); } SwNumRule* WW8ListManager::CreateNextRule(bool bSimple) @@ -1120,7 +1120,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple) sal_uInt16 nRul = rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, false, SvxNumberFormat::LABEL_ALIGNMENT ); - SwNumRule* pMyNumRule = rDoc.GetNumRuleTbl()[nRul]; + SwNumRule* pMyNumRule = rDoc.GetNumRuleTable()[nRul]; pMyNumRule->SetAutoRule(false); pMyNumRule->SetContinusNum(bSimple); return pMyNumRule; @@ -1248,15 +1248,15 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) pListInfo->maParaSprms.resize(nMaxLevel); for (sal_uInt8 nLevel = 0; nLevel < nLvlCount; ++nLevel) { - SwNumFmt aNumFmt( rMyNumRule.Get( nLevel ) ); + SwNumFormat aNumFormat( rMyNumRule.Get( nLevel ) ); // LVLF einlesen - bLVLOk = ReadLVL( aNumFmt, pListInfo->aItemSet[nLevel], + bLVLOk = ReadLVL( aNumFormat, pListInfo->aItemSet[nLevel], pListInfo->aIdSty[nLevel], true, aNotReallyThere, nLevel, pListInfo->maParaSprms[nLevel]); if( !bLVLOk ) break; // und in die rMyNumRule aufnehmen - rMyNumRule.Set( nLevel, aNumFmt ); + rMyNumRule.Set( nLevel, aNumFormat ); } if( !bLVLOk ) break; @@ -1268,7 +1268,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) { bool bDummy; AdjustLVL( nLevel, rMyNumRule, pListInfo->aItemSet, - pListInfo->aCharFmt, bDummy ); + pListInfo->aCharFormat, bDummy ); } // 1.2.3 ItemPools leeren und loeschen @@ -1370,14 +1370,14 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) { sal_uInt16 nRul = rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName( &sPrefix ), pParentNumRule); - rLFOInfo.pNumRule = rDoc.GetNumRuleTbl()[ nRul ]; + rLFOInfo.pNumRule = rDoc.GetNumRuleTable()[ nRul ]; rLFOInfo.pNumRule->SetAutoRule(false); } else { sal_uInt16 nRul = rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(), pParentNumRule); - rLFOInfo.pNumRule = rDoc.GetNumRuleTbl()[ nRul ]; + rLFOInfo.pNumRule = rDoc.GetNumRuleTable()[ nRul ]; rLFOInfo.pNumRule->SetAutoRule(true); // = default } @@ -1385,9 +1385,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // einlesen WW8aISet aItemSet; // Zeichenattribute aus GrpprlChpx - WW8aCFmt aCharFmt; // Zeichen Style Pointer + WW8aCFormat aCharFormat; // Zeichen Style Pointer memset(&aItemSet, 0, sizeof( aItemSet )); - memset(&aCharFmt, 0, sizeof( aCharFmt )); + memset(&aCharFormat, 0, sizeof( aCharFormat )); //2.2.2.0 skip inter-group of override header ? //See #i25438# for why I moved this here, compare @@ -1438,7 +1438,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // 2.2.2.2 eventuell auch den zugehoerigen LVL einlesen - SwNumFmt aNumFmt( + SwNumFormat aNumFormat( rLFOInfo.pNumRule->Get(aLFOLVL.nLevel)); if (aBits1 & 0x20) { @@ -1446,7 +1446,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // falls bStartup true, hier den Startup-Level // durch den im LVL vermerkten ersetzen LVLF // einlesen - bLVLOk = ReadLVL(aNumFmt, aItemSet[nLevel], + bLVLOk = ReadLVL(aNumFormat, aItemSet[nLevel], pParentListInfo->aIdSty[nLevel], aLFOLVL.bStartAt, aNotReallyThere, nLevel, rLFOInfo.maParaSprms[nLevel]); @@ -1456,13 +1456,13 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) } else if (aLFOLVL.bStartAt) { - aNumFmt.SetStart( + aNumFormat.SetStart( writer_cast<sal_uInt16>(aLFOLVL.nStartAt)); } - // 2.2.2.3 das NumFmt in die NumRule aufnehmen + // 2.2.2.3 das NumFormat in die NumRule aufnehmen - rLFOInfo.pNumRule->Set(aLFOLVL.nLevel, aNumFmt); + rLFOInfo.pNumRule->Set(aLFOLVL.nLevel, aNumFormat); } bLVLOk = true; @@ -1474,14 +1474,14 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) // 2.2.3 die LVL der neuen NumRule anpassen - sal_uInt16 aFlagsNewCharFmt = 0; - bool bNewCharFmtCreated = false; + sal_uInt16 aFlagsNewCharFormat = 0; + bool bNewCharFormatCreated = false; for (sal_uInt8 nLevel = 0; nLevel < rLFOInfo.nLfoLvl; ++nLevel) { - AdjustLVL( nLevel, *rLFOInfo.pNumRule, aItemSet, aCharFmt, - bNewCharFmtCreated, sPrefix ); - if( bNewCharFmtCreated ) - aFlagsNewCharFmt += (1 << nLevel); + AdjustLVL( nLevel, *rLFOInfo.pNumRule, aItemSet, aCharFormat, + bNewCharFormatCreated, sPrefix ); + if( bNewCharFormatCreated ) + aFlagsNewCharFormat += (1 << nLevel); } // 2.2.4 ItemPools leeren und loeschen @@ -1533,7 +1533,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo) rOne.GetRuleType() == rTwo.GetRuleType() && rOne.IsContinusNum() == rTwo.IsContinusNum() && rOne.IsAbsSpaces() == rTwo.IsAbsSpaces() && - rOne.GetPoolFmtId() == rTwo.GetPoolFmtId() && + rOne.GetPoolFormatId() == rTwo.GetPoolFormatId() && rOne.GetPoolHelpId() == rTwo.GetPoolHelpId() && rOne.GetPoolHlpFileId() == rTwo.GetPoolHlpFileId() ); @@ -1542,7 +1542,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo) { for (sal_uInt8 n = 0; n < MAXLEVEL; ++n ) { - //The SvxNumberFormat compare, not the SwNumFmt compare + //The SvxNumberFormat compare, not the SwNumFormat compare const SvxNumberFormat &rO = rOne.Get(n); const SvxNumberFormat &rT = rTwo.Get(n); if (!(rO == rT)) @@ -1556,7 +1556,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo) } SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, - const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode) + const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTextNode *pNode) { if (pLFOInfos.size() <= nLFOPosition) return 0; @@ -1571,14 +1571,14 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, // #i25545# // #i100132# - a number format does not have to exist on given list level - SwNumFmt pFmt(rLFOInfo.pNumRule->Get(nLevel)); + SwNumFormat pFormat(rLFOInfo.pNumRule->Get(nLevel)); if (rReader.IsRightToLeft() && nLastLFOPosition != nLFOPosition) { - if ( pFmt.GetNumAdjust() == SVX_ADJUST_RIGHT) - pFmt.SetNumAdjust(SVX_ADJUST_LEFT); - else if ( pFmt.GetNumAdjust() == SVX_ADJUST_LEFT) - pFmt.SetNumAdjust(SVX_ADJUST_RIGHT); - rLFOInfo.pNumRule->Set(nLevel, pFmt); + if ( pFormat.GetNumAdjust() == SVX_ADJUST_RIGHT) + pFormat.SetNumAdjust(SVX_ADJUST_LEFT); + else if ( pFormat.GetNumAdjust() == SVX_ADJUST_LEFT) + pFormat.SetNumAdjust(SVX_ADJUST_RIGHT); + rLFOInfo.pNumRule->Set(nLevel, pFormat); } nLastLFOPosition = nLFOPosition; /* @@ -1638,10 +1638,10 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, { if (rOverride.bStartAt) { - const SwNumFmt &rFmt = + const SwNumFormat &rFormat = pParentListInfo->pNumRule->Get(nLevel); if ( - rFmt.GetStart() == + rFormat.GetStart() == rLFOInfo.maOverrides[nLevel].nStartAt ) { @@ -1675,71 +1675,71 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, // SwWW8ImplReader: anhaengen einer Liste an einen Style oder Absatz -bool SwWW8ImplReader::SetTxtFmtCollAndListLevel(const SwPaM& rRg, +bool SwWW8ImplReader::SetTextFormatCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo) { bool bRes = true; - if( rStyleInfo.pFmt && rStyleInfo.bColl ) + if( rStyleInfo.pFormat && rStyleInfo.bColl ) { - bRes = m_rDoc.SetTxtFmtColl(rRg, static_cast<SwTxtFmtColl*>(rStyleInfo.pFmt)); - SwTxtNode* pTxtNode = m_pPaM->GetNode().GetTxtNode(); - OSL_ENSURE( pTxtNode, "No Text-Node at PaM-Position" ); - if ( !pTxtNode ) + bRes = m_rDoc.SetTextFormatColl(rRg, static_cast<SwTextFormatColl*>(rStyleInfo.pFormat)); + SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode(); + OSL_ENSURE( pTextNode, "No Text-Node at PaM-Position" ); + if ( !pTextNode ) { // make code robust return bRes; } - const SwNumRule * pNumRule = pTxtNode->GetNumRule(); // #i27610# + const SwNumRule * pNumRule = pTextNode->GetNumRule(); // #i27610# if( !IsInvalidOrToBeMergedTabCell() && ! (pNumRule && pNumRule->IsOutlineRule()) ) // #i27610# { - pTxtNode->ResetAttr( RES_PARATR_NUMRULE ); + pTextNode->ResetAttr( RES_PARATR_NUMRULE ); } if (USHRT_MAX > rStyleInfo.nLFOIndex && WW8ListManager::nMaxLevel > rStyleInfo.nListLevel) { const bool bApplyListStyle = false; - RegisterNumFmtOnTxtNode(rStyleInfo.nLFOIndex, rStyleInfo.nListLevel, + RegisterNumFormatOnTextNode(rStyleInfo.nLFOIndex, rStyleInfo.nListLevel, bApplyListStyle); } } return bRes; } -void UseListIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) +void UseListIndent(SwWW8StyInf &rStyle, const SwNumFormat &rFormat) { // #i86652# - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { - const long nAbsLSpace = rFmt.GetAbsLSpace(); - const long nListFirstLineIndent = GetListFirstLineIndent(rFmt); - SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFmt, RES_LR_SPACE)); - aLR.SetTxtLeft(nAbsLSpace); - aLR.SetTxtFirstLineOfst(writer_cast<short>(nListFirstLineIndent)); - rStyle.pFmt->SetFmtAttr(aLR); + const long nAbsLSpace = rFormat.GetAbsLSpace(); + const long nListFirstLineIndent = GetListFirstLineIndent(rFormat); + SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFormat, RES_LR_SPACE)); + aLR.SetTextLeft(nAbsLSpace); + aLR.SetTextFirstLineOfst(writer_cast<short>(nListFirstLineIndent)); + rStyle.pFormat->SetFormatAttr(aLR); rStyle.bListReleventIndentSet = true; } } -void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFmt &rFmt) +void SetStyleIndent(SwWW8StyInf &rStyle, const SwNumFormat &rFormat) { - if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) // #i86652# + if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) // #i86652# { - SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFmt, RES_LR_SPACE)); + SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(*rStyle.pFormat, RES_LR_SPACE)); if (rStyle.bListReleventIndentSet) { - SyncIndentWithList( aLR, rFmt, false, false ); // #i103711#, #i105414# + SyncIndentWithList( aLR, rFormat, false, false ); // #i103711#, #i105414# } else { - aLR.SetTxtLeft(0); - aLR.SetTxtFirstLineOfst(0); + aLR.SetTextLeft(0); + aLR.SetTextFirstLineOfst(0); } - rStyle.pFmt->SetFmtAttr(aLR); + rStyle.pFormat->SetFormatAttr(aLR); } } @@ -1783,18 +1783,18 @@ void SwWW8ImplReader::SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO, } } -void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle) +void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle) { if (nStyle >= m_vColl.size()) return; SwWW8StyInf &rStyleInf = m_vColl[nStyle]; - if (rStyleInf.bValid && rStyleInf.pFmt) + if (rStyleInf.bValid && rStyleInf.pFormat) { //Save old pre-list modified indent, which are the word indent values rStyleInf.maWordLR = - ItemGet<SvxLRSpaceItem>(*rStyleInf.pFmt, RES_LR_SPACE); + ItemGet<SvxLRSpaceItem>(*rStyleInf.pFormat, RES_LR_SPACE); // Phase 2: aktualisieren der StyleDef nach einlesen aller Listen SwNumRule* pNmRule = 0; @@ -1818,7 +1818,7 @@ void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle) } else { - rStyleInf.pFmt->SetFmtAttr( + rStyleInf.pFormat->SetFormatAttr( SwNumRuleItem(pNmRule->GetName())); rStyleInf.bHasStyNumRule = true; } @@ -1830,7 +1830,7 @@ void SwWW8ImplReader::RegisterNumFmtOnStyle(sal_uInt16 nStyle) } } -void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, +void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel, const bool bSetAttr) { @@ -1841,29 +1841,29 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, if (m_pLstManager) // sind die Listendeklarationen gelesen? { - SwTxtNode* pTxtNd = m_pPaM->GetNode().GetTxtNode(); - OSL_ENSURE(pTxtNd, "No Text-Node at PaM-Position"); - if (!pTxtNd) + SwTextNode* pTextNd = m_pPaM->GetNode().GetTextNode(); + OSL_ENSURE(pTextNd, "No Text-Node at PaM-Position"); + if (!pTextNd) return; std::vector<sal_uInt8> aParaSprms; const SwNumRule* pRule = bSetAttr ? m_pLstManager->GetNumRuleForActivation( nActLFO, nActLevel, - aParaSprms, pTxtNd) : 0; + aParaSprms, pTextNd) : 0; if (pRule != NULL || !bSetAttr) { - if (bSetAttr && pTxtNd->GetNumRule() != pRule - && pTxtNd->GetNumRule() != m_rDoc.GetOutlineNumRule()) + if (bSetAttr && pTextNd->GetNumRule() != pRule + && pTextNd->GetNumRule() != m_rDoc.GetOutlineNumRule()) { - pTxtNd->SetAttr(SwNumRuleItem(pRule->GetName())); + pTextNd->SetAttr(SwNumRuleItem(pRule->GetName())); } - pTxtNd->SetAttrListLevel(nActLevel); + pTextNd->SetAttrListLevel(nActLevel); // <IsCounted()> state of text node has to be adjusted accordingly. if ( /*nActLevel >= 0 &&*/ nActLevel < MAXLEVEL ) { - pTxtNd->SetCountedInList( true ); + pTextNd->SetCountedInList( true ); } // #i99822# @@ -1871,10 +1871,10 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, // needed for list levels of mode LABEL_ALIGNMENT bool bApplyListLevelIndentDirectlyAtPara(true); { - if (pTxtNd->GetNumRule() && nActLevel < MAXLEVEL) + if (pTextNd->GetNumRule() && nActLevel < MAXLEVEL) { - const SwNumFmt& rFmt = pTxtNd->GetNumRule()->Get(nActLevel); - if (rFmt.GetPositionAndSpaceMode() + const SwNumFormat& rFormat = pTextNd->GetNumRule()->Get(nActLevel); + if (rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT) { bApplyListLevelIndentDirectlyAtPara = false; @@ -1887,7 +1887,7 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, SfxItemSet aListIndent(m_rDoc.GetAttrPool(), RES_LR_SPACE, RES_LR_SPACE); const SvxLRSpaceItem *pItem = static_cast<const SvxLRSpaceItem*>( - GetFmtAttr(RES_LR_SPACE)); + GetFormatAttr(RES_LR_SPACE)); OSL_ENSURE(pItem, "impossible"); if (pItem) aListIndent.Put(*pItem); @@ -1926,13 +1926,13 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, } } -void SwWW8ImplReader::RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel) +void SwWW8ImplReader::RegisterNumFormat(sal_uInt16 nActLFO, sal_uInt8 nActLevel) { // sind wir erst beim Einlesen der StyleDef ? if (m_pAktColl) SetStylesList( m_nAktColl , nActLFO, nActLevel); else - RegisterNumFmtOnTxtNode(nActLFO, nActLevel); + RegisterNumFormatOnTextNode(nActLFO, nActLevel); } void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData, @@ -1976,7 +1976,7 @@ void SwWW8ImplReader::Read_ListLevel(sal_uInt16, const sal_uInt8* pData, (WW8ListManager::nMaxLevel > m_nListLevel) ) { - RegisterNumFmt(m_nLFOPosition, m_nListLevel); + RegisterNumFormat(m_nLFOPosition, m_nListLevel); m_nLFOPosition = USHRT_MAX; m_nListLevel = WW8ListManager::nMaxLevel; } @@ -2021,33 +2021,33 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData, // here a "named" style is being configured // disable the numbering/list in the style currently configured - m_pAktColl->SetFmtAttr(*GetDfltAttr(RES_PARATR_NUMRULE)); + m_pAktColl->SetFormatAttr(*GetDfltAttr(RES_PARATR_NUMRULE)); // reset/blank the indent - m_pAktColl->SetFmtAttr(SvxLRSpaceItem(RES_LR_SPACE)); + m_pAktColl->SetFormatAttr(SvxLRSpaceItem(RES_LR_SPACE)); } - else if (SwTxtNode* pTxtNode = m_pPaM->GetNode().GetTxtNode()) + else if (SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode()) { // here a paragraph is being directly formatted // empty the numbering/list style applied to the current paragraph SwNumRuleItem aEmptyRule( aEmptyOUStr ); - pTxtNode->SetAttr( aEmptyRule ); + pTextNode->SetAttr( aEmptyRule ); // create an empty SvxLRSpaceItem SvxLRSpaceItem aLR( RES_LR_SPACE ); // replace it with the one of the current node if it exist - const SfxPoolItem* pLR = GetFmtAttr(RES_LR_SPACE); + const SfxPoolItem* pLR = GetFormatAttr(RES_LR_SPACE); if( pLR ) aLR = *static_cast<const SvxLRSpaceItem*>(pLR); // reset/blank the left indent (and only the left) - aLR.SetTxtLeft(0); - aLR.SetTxtFirstLineOfst(0); + aLR.SetTextLeft(0); + aLR.SetTextFirstLineOfst(0); // apply the modified SvxLRSpaceItem to the current paragraph - pTxtNode->SetAttr( aLR ); + pTextNode->SetAttr( aLR ); } m_nLFOPosition = USHRT_MAX; @@ -2074,7 +2074,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData, m_nListLevel = 0; if (WW8ListManager::nMaxLevel > m_nListLevel) { - RegisterNumFmt(m_nLFOPosition, m_nListLevel); + RegisterNumFormat(m_nLFOPosition, m_nListLevel); m_nLFOPosition = USHRT_MAX; m_nListLevel = WW8ListManager::nMaxLevel; } @@ -2319,7 +2319,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString, for (const CtrlFontMapEntry* pMap = aMapTable; pMap->nWhichId; ++pMap) { bool bSet = true; - const SfxPoolItem* pItem = GetFmtAttr( pMap->nWhichId ); + const SfxPoolItem* pItem = GetFormatAttr( pMap->nWhichId ); OSL_ENSURE(pItem, "Impossible"); if (!pItem) continue; @@ -2604,11 +2604,11 @@ bool SwMSConvertControls::InsertControl( aTmp <<= nTemp; xShapePropSet->setPropertyValue("VertOrient", aTmp ); - uno::Reference< text::XText > xDummyTxtRef; - uno::Reference< text::XTextRange > xTxtRg = - new SwXTextRange( *pPaM, xDummyTxtRef ); + uno::Reference< text::XText > xDummyTextRef; + uno::Reference< text::XTextRange > xTextRg = + new SwXTextRange( *pPaM, xDummyTextRef ); - aTmp.setValue(&xTxtRg, cppu::UnoType<text::XTextRange>::get()); + aTmp.setValue(&xTextRg, cppu::UnoType<text::XTextRange>::get()); xShapePropSet->setPropertyValue("TextRange", aTmp ); // Das Control-Model am Control-Shape setzen diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index cc6b92af8571..03b0278f4a8c 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -197,7 +197,7 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, tools::SvRef<SotStorage>& rS return SwWW8ImplReader::GetPictGrafFromStream(rGraph, *pStp); } -SwFlyFrmFmt* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, +SwFlyFrameFormat* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, const SfxItemSet &rFlySet, const SfxItemSet &rGrfSet) { SfxObjectShell *pPersist = m_rDoc.GetPersist(); @@ -205,7 +205,7 @@ SwFlyFrmFmt* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, if (!pPersist) return 0; - SwFlyFrmFmt *pRet = 0; + SwFlyFrameFormat *pRet = 0; SfxItemSet *pMathFlySet = 0; uno::Reference < embed::XClassifiedObject > xClass( rObject.GetObjRef(), uno::UNO_QUERY ); @@ -244,11 +244,11 @@ SwFlyFrmFmt* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, return pRet; } -SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf, +SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, const SfxItemSet* pFlySet, const SfxItemSet *pGrfSet, const Rectangle& aVisArea ) { ::SetProgressState(m_nProgress, m_pDocShell); // Update - SwFrmFmt* pFmt = 0; + SwFrameFormat* pFormat = 0; GrafikCtor(); @@ -266,18 +266,18 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf, // Abstand/Umrandung raus if (!m_bNewDoc) - Reader::ResetFrmFmtAttrs( *pTempSet ); + Reader::ResetFrameFormatAttrs( *pTempSet ); - SwFmtAnchor aAnchor( FLY_AS_CHAR ); + SwFormatAnchor aAnchor( FLY_AS_CHAR ); aAnchor.SetAnchor( m_pPaM->GetPoint() ); pTempSet->Put( aAnchor ); const Size aSizeTwip = OutputDevice::LogicToLogic( aGraph.GetPrefSize(), aGraph.GetPrefMapMode(), MAP_TWIP ); - pTempSet->Put( SwFmtFrmSize( ATT_FIX_SIZE, aSizeTwip.Width(), + pTempSet->Put( SwFormatFrmSize( ATT_FIX_SIZE, aSizeTwip.Width(), aSizeTwip.Height() ) ); - pTempSet->Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); + pTempSet->Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); if( m_pSFlyPara ) { @@ -291,22 +291,22 @@ SwFrmFmt* SwWW8ImplReader::ImportOle(const Graphic* pGrf, { if (pRet->ISA(SdrOle2Obj)) { - pFmt = InsertOle(*static_cast<SdrOle2Obj*>(pRet), *pFlySet, *pGrfSet); + pFormat = InsertOle(*static_cast<SdrOle2Obj*>(pRet), *pFlySet, *pGrfSet); SdrObject::Free( pRet ); // das brauchen wir nicht mehr } else - pFmt = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pRet, *pFlySet ); + pFormat = m_rDoc.getIDocumentContentOperations().InsertDrawObj(*m_pPaM, *pRet, *pFlySet ); } else if ( GRAPHIC_GDIMETAFILE == aGraph.GetType() || GRAPHIC_BITMAP == aGraph.GetType() ) { - pFmt = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &aGraph, pFlySet, + pFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, OUString(), OUString(), &aGraph, pFlySet, pGrfSet, NULL); } delete pTempSet; - return pFmt; + return pFormat; } bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &rWMF, @@ -383,8 +383,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, if (pFlySet) { - if (const SwFmtFrmSize* pSize = - static_cast<const SwFmtFrmSize*>(pFlySet->GetItem(RES_FRM_SIZE, false))) + if (const SwFormatFrmSize* pSize = + static_cast<const SwFormatFrmSize*>(pFlySet->GetItem(RES_FRM_SIZE, false))) { aRect.SetSize(pSize->GetSize()); } @@ -446,10 +446,10 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph, } void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm, - sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut ) + sal_Int32 nTablePos, sal_Int32 nTableSiz, SwDoc& rDocOut ) { ::std::vector<OUString> aAuthorNames; - WW8ReadSTTBF( !m_bVer67, rStrm, nTblPos, nTblSiz, m_bVer67 ? 2 : 0, + WW8ReadSTTBF( !m_bVer67, rStrm, nTablePos, nTableSiz, m_bVer67 ? 2 : 0, m_eStructCharSet, aAuthorNames ); sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size()); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index a01a99e8ba0b..0d62c9a106ed 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -367,19 +367,19 @@ static SvxExtNumType GetNumberPara(const OUString& rStr, bool bAllowPageDesc = f return aType; } -bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang) +bool SwWW8ImplReader::ForceFieldLanguage(SwField &rField, sal_uInt16 nLang) { bool bRet(false); const SvxLanguageItem *pLang = - static_cast<const SvxLanguageItem*>(GetFmtAttr(RES_CHRATR_LANGUAGE)); + static_cast<const SvxLanguageItem*>(GetFormatAttr(RES_CHRATR_LANGUAGE)); OSL_ENSURE(pLang, "impossible"); sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US; if (nLang != nDefault) { - rFld.SetAutomaticLanguage(false); - rFld.SetLanguage(nLang); + rField.SetAutomaticLanguage(false); + rField.SetLanguage(nLang); bRet = true; } @@ -420,7 +420,7 @@ short SwWW8ImplReader::GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat, bRTL = true; } RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE; - const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFmtAttr( static_cast< sal_uInt16 >(eLang))); + const SvxLanguageItem *pLang = static_cast<const SvxLanguageItem*>(GetFormatAttr( static_cast< sal_uInt16 >(eLang))); OSL_ENSURE(pLang, "impossible"); rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US; @@ -462,15 +462,15 @@ short SwWW8ImplReader::GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat, return bHasTime ? css::util::NumberFormat::DATETIME : css::util::NumberFormat::DATE; } - sal_uLong nFmtIdx = + sal_uLong nFormatIdx = sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri, GetFib().lid); - short nNumFmtType = css::util::NumberFormat::UNDEFINED; - if (nFmtIdx) - nNumFmtType = pFormatter->GetType(nFmtIdx); - rFormat = nFmtIdx; + short nNumFormatType = css::util::NumberFormat::UNDEFINED; + if (nFormatIdx) + nNumFormatType = pFormatter->GetType(nFormatIdx); + rFormat = nFormatIdx; - return nNumFmtType; + return nNumFormatType; } // Felder @@ -478,14 +478,14 @@ short SwWW8ImplReader::GetTimeDatePara(OUString& rStr, sal_uInt32& rFormat, // Am Ende des Einlesens entsprechende Felder updaten ( z.Zt. die Referenzen ) void SwWW8ImplReader::UpdateFields() { - m_rDoc.getIDocumentState().SetUpdateExpFldStat(true); // JP: neu fuer alles wichtige + m_rDoc.getIDocumentState().SetUpdateExpFieldStat(true); // JP: neu fuer alles wichtige m_rDoc.SetInitDBFields(true); // Datenbank-Felder auch } sal_uInt16 SwWW8ImplReader::End_Field() { sal_uInt16 nRet = 0; - WW8PLCFx_FLD* pF = m_pPlcxMan->GetFld(); + WW8PLCFx_FLD* pF = m_pPlcxMan->GetField(); OSL_ENSURE(pF, "WW8PLCFx_FLD - Pointer nicht da"); WW8_CP nCP = 0; if (!pF || !pF->EndPosIsFieldEnd(nCP)) @@ -508,10 +508,10 @@ sal_uInt16 SwWW8ImplReader::End_Field() case 70: if (bUseEnhFields && m_pPaM!=NULL && m_pPaM->GetPoint()!=NULL) { SwPosition aEndPos = *m_pPaM->GetPoint(); - SwPaM aFldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex()); + SwPaM aFieldPam( m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.nContent.GetIndex()); IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( ); IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeFieldBookmark( - aFldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT ) ); + aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_FORMTEXT ) ); OSL_ENSURE(pFieldmark!=NULL, "hmmm; why was the bookmark not created?"); if (pFieldmark!=NULL) { const IFieldmark::parameter_map_t& pParametersToAdd = m_aFieldStack.back().getParameters(); @@ -534,8 +534,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() m_aTOXEndCps.insert(nCP); m_bLoadingTOXCache = false; if ( m_pPaM->End() && - m_pPaM->End()->nNode.GetNode().GetTxtNode() && - m_pPaM->End()->nNode.GetNode().GetTxtNode()->Len() == 0 ) + m_pPaM->End()->nNode.GetNode().GetTextNode() && + m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0 ) { JoinNode(*m_pPaM); } @@ -575,14 +575,14 @@ sal_uInt16 SwWW8ImplReader::End_Field() { // Unhandled field with stored code SwPosition aEndPos = *m_pPaM->GetPoint(); - SwPaM aFldPam( - m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtCntnt(), + SwPaM aFieldPam( + m_aFieldStack.back().GetPtNode(), m_aFieldStack.back().GetPtContent(), aEndPos.nNode, aEndPos.nContent.GetIndex()); IDocumentMarkAccess* pMarksAccess = m_rDoc.getIDocumentMarkAccess( ); IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark( - aFldPam, + aFieldPam, m_aFieldStack.back().GetBookmarkName(), ODF_UNHANDLED ); if ( pFieldmark ) @@ -816,7 +816,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes) OSL_ENSURE( ( sizeof( aWW8FieldTab ) / sizeof( *aWW8FieldTab ) == eMax+1 ), "FeldFunc-Tabelle stimmt nicht" ); - WW8PLCFx_FLD* pF = m_pPlcxMan->GetFld(); + WW8PLCFx_FLD* pF = m_pPlcxMan->GetField(); OSL_ENSURE(pF, "WW8PLCFx_FLD - Pointer nicht da"); if (!pF || !pF->StartPosIsFieldStart()) @@ -1050,20 +1050,20 @@ void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const OUString& rTag if( SwFltGetFlag(m_nFieldFlags, SwFltControlStack::TAGS_IN_TEXT)) { - aName += rTagText; // als Txt taggen + aName += rTagText; // als Text taggen m_rDoc.getIDocumentContentOperations().InsertString(*m_pPaM, aName, SwInsertFlags::NOHINTEXPAND); } else { // normal tagggen - SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFldType( + SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( SwSetExpFieldType( &m_rDoc, aName, nsSwGetSetExpType::GSE_STRING ) ); - SwSetExpField aFld( static_cast<SwSetExpFieldType*>(pFT), rTagText ); // SUB_INVISIBLE + SwSetExpField aField( static_cast<SwSetExpFieldType*>(pFT), rTagText ); // SUB_INVISIBLE sal_uInt16 nSubType = ( SwFltGetFlag( m_nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE; - aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING); + aField.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); } } @@ -1076,12 +1076,12 @@ long SwWW8ImplReader::Read_F_Tag( WW8FieldDesc* pF ) if( nL > MAX_FIELDLEN ) nL = MAX_FIELDLEN; // MaxLaenge, durch Quoten // max. 4* so gross - OUString sFTxt; - nL = m_pSBase->WW8ReadString( *m_pStrm, sFTxt, + OUString sFText; + nL = m_pSBase->WW8ReadString( *m_pStrm, sFText, m_pPlcxMan->GetCpOfs() + nStart, nL, m_eStructCharSet); OUString aTagText; - MakeTagString( aTagText, sFTxt ); + MakeTagString( aTagText, sFText ); InsertTagField( pF->nId, aTagText ); m_pStrm->Seek( nOldPos ); @@ -1118,9 +1118,9 @@ eF_ResT SwWW8ImplReader::Read_F_Input( WW8FieldDesc* pF, OUString& rStr ) if ( pF->nId != 0x01 ) // 0x01 fields have no result { - SwInputField aFld( static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_INPUTFLD )), + SwInputField aField( static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_INPUTFLD )), aDef, aQ, INP_TXT, 0, false ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); } return FLD_OK; @@ -1229,23 +1229,23 @@ can be left as references, because a bookmark is also inserted at the position of a set or ask field, either by word, or in some special cases by the import filter itself. */ -SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pFld, +SwFltStackEntry *SwWW8FltRefStack::RefToVar(const SwField* pField, SwFltStackEntry &rEntry) { SwFltStackEntry *pRet=0; - if (pFld && RES_GETREFFLD == pFld->Which()) + if (pField && RES_GETREFFLD == pField->Which()) { //Get the name of the ref field, and see if actually a variable - const OUString sName = pFld->GetPar1(); + const OUString sName = pField->GetPar1(); ::std::map<OUString, OUString, SwWW8::ltstr>::const_iterator aResult = aFieldVarNames.find(sName); if (aResult != aFieldVarNames.end()) { - SwGetExpField aFld( static_cast<SwGetExpFieldType*>( - pDoc->getIDocumentFieldsAccess().GetSysFldType(RES_GETEXPFLD)), sName, nsSwGetSetExpType::GSE_STRING, 0); + SwGetExpField aField( static_cast<SwGetExpFieldType*>( + pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_GETEXPFLD)), sName, nsSwGetSetExpType::GSE_STRING, 0); delete rEntry.pAttr; - SwFmtFld aTmp(aFld); + SwFormatField aTmp(aField); rEntry.pAttr = aTmp.Clone(); pRet = &rEntry; } @@ -1311,14 +1311,14 @@ eF_ResT SwWW8ImplReader::Read_F_InputVar( WW8FieldDesc* pF, OUString& rStr ) const long nNo = MapBookmarkVariables(pF, sOrigName, aResult); - SwSetExpFieldType* pFT = static_cast<SwSetExpFieldType*>(m_rDoc.getIDocumentFieldsAccess().InsertFldType( + SwSetExpFieldType* pFT = static_cast<SwSetExpFieldType*>(m_rDoc.getIDocumentFieldsAccess().InsertFieldType( SwSetExpFieldType(&m_rDoc, sOrigName, nsSwGetSetExpType::GSE_STRING))); - SwSetExpField aFld(pFT, aResult); - aFld.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE | nsSwGetSetExpType::GSE_STRING); - aFld.SetInputFlag(true); - aFld.SetPromptText( aQ ); + SwSetExpField aField(pFT, aResult); + aField.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE | nsSwGetSetExpType::GSE_STRING); + aField.SetInputFlag(true); + aField.SetPromptText( aQ ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); m_pReffedStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_BOOKMARK, true, nNo); return FLD_OK; @@ -1327,14 +1327,14 @@ eF_ResT SwWW8ImplReader::Read_F_InputVar( WW8FieldDesc* pF, OUString& rStr ) // "AUTONR" eF_ResT SwWW8ImplReader::Read_F_ANumber( WW8FieldDesc*, OUString& rStr ) { - if( !m_pNumFldType ){ // 1. Mal + if( !m_pNumFieldType ){ // 1. Mal SwSetExpFieldType aT( &m_rDoc, OUString("AutoNr"), nsSwGetSetExpType::GSE_SEQ ); - m_pNumFldType = m_rDoc.getIDocumentFieldsAccess().InsertFldType( aT ); + m_pNumFieldType = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( aT ); } - SwSetExpField aFld( static_cast<SwSetExpFieldType*>(m_pNumFldType), OUString(), + SwSetExpField aField( static_cast<SwSetExpFieldType*>(m_pNumFieldType), OUString(), GetNumberPara( rStr ) ); - aFld.SetValue( ++m_nFldNum ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + aField.SetValue( ++m_nFieldNum ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } @@ -1398,20 +1398,20 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, OUString& rStr ) if (aSequenceName.isEmpty() && aBook.isEmpty()) return FLD_TAGIGN; - SwSetExpFieldType* pFT = static_cast<SwSetExpFieldType*>(m_rDoc.getIDocumentFieldsAccess().InsertFldType( + SwSetExpFieldType* pFT = static_cast<SwSetExpFieldType*>(m_rDoc.getIDocumentFieldsAccess().InsertFieldType( SwSetExpFieldType( &m_rDoc, aSequenceName, nsSwGetSetExpType::GSE_SEQ ) ) ); - SwSetExpField aFld( pFT, OUString(), eNumFormat ); + SwSetExpField aField( pFT, OUString(), eNumFormat ); //#i120654# Add bHidden for /h flag (/h: Hide the field result.) if (bHidden) - aFld.SetSubType(aFld.GetSubType() | nsSwExtendedSubType::SUB_INVISIBLE); + aField.SetSubType(aField.GetSubType() | nsSwExtendedSubType::SUB_INVISIBLE); if (!sStart.isEmpty()) - aFld.SetFormula( ( aSequenceName += "=" ) += sStart ); + aField.SetFormula( ( aSequenceName += "=" ) += sStart ); else if (!bCountOn) - aFld.SetFormula(aSequenceName); + aField.SetFormula(aSequenceName); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } @@ -1499,12 +1499,12 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr ) = "REVISIONNUMBER"; static const sal_Char* aName54 // Spanish = "SNUBBEL BUBBEL"; - static const sal_uInt16 nFldCnt = 5; + static const sal_uInt16 nFieldCnt = 5; // additional fields are to be coded soon! :-) static const sal_uInt16 nLangCnt = 4; - static const sal_Char *aNameSet_26[nFldCnt][nLangCnt+1] = + static const sal_Char *aNameSet_26[nFieldCnt][nLangCnt+1] = { {aName10, aName11, aName12, aName13, aName14}, {aName20, aName21, aName22, aName23, aName24}, @@ -1513,26 +1513,26 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr ) {aName50, aName51, aName52, aName53, aName54} }; - bool bFldFound= false; + bool bFieldFound= false; sal_uInt16 nFIdx; - for(sal_uInt16 nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx) + for(sal_uInt16 nLIdx=1; !bFieldFound && (nLangCnt > nLIdx); ++nLIdx) { - for(nFIdx = 0; !bFldFound && (nFldCnt > nFIdx); ++nFIdx) + for(nFIdx = 0; !bFieldFound && (nFieldCnt > nFIdx); ++nFIdx) { if( aDocProperty == OUString( aNameSet_26[nFIdx][nLIdx], strlen(aNameSet_26[nFIdx][nLIdx]), RTL_TEXTENCODING_MS_1252 ) ) { - bFldFound = true; + bFieldFound = true; pF->nId = aNameSet_26[nFIdx][0][0]; } } } - if( !bFldFound ) + if( !bFieldFound ) { - SwDocInfoField aFld( static_cast<SwDocInfoFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )), DI_CUSTOM|nReg, aDocProperty, GetFieldResult( pF ) ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + SwDocInfoField aField( static_cast<SwDocInfoFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_DOCINFOFLD )), DI_CUSTOM|nReg, aDocProperty, GetFieldResult( pF ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } @@ -1637,11 +1637,11 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, OUString& rStr ) aData = comphelper::string::remove(aData, '"'); } - SwDocInfoField aFld( static_cast<SwDocInfoFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )), nSub|nReg, aData, nFormat ); + SwDocInfoField aField( static_cast<SwDocInfoFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_DOCINFOFLD )), nSub|nReg, aData, nFormat ); if (bDateTime) - ForceFieldLanguage(aFld, nLang); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + ForceFieldLanguage(aField, nLang); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } @@ -1650,18 +1650,18 @@ eF_ResT SwWW8ImplReader::Read_F_Author( WW8FieldDesc*, OUString& ) { // SH: Das SwAuthorField bezeichnet nicht den urspruenglichen // Autor, sondern den aktuellen Benutzer, also besser ueber DocInfo - SwDocInfoField aFld( static_cast<SwDocInfoFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCINFOFLD )), + SwDocInfoField aField( static_cast<SwDocInfoFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_DOCINFOFLD )), DI_CREATE|DI_SUB_AUTHOR, OUString() ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } eF_ResT SwWW8ImplReader::Read_F_TemplName( WW8FieldDesc*, OUString& ) { - SwTemplNameField aFld( static_cast<SwTemplNameFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_TEMPLNAMEFLD )), FF_NAME ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + SwTemplNameField aField( static_cast<SwTemplNameFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_TEMPLNAMEFLD )), FF_NAME ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } @@ -1714,17 +1714,17 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, OUString& rStr ) if (nDT & css::util::NumberFormat::DATE) { - SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD )), DATEFLD, nFormat); - ForceFieldLanguage(aFld, nLang); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + SwDateTimeField aField(static_cast<SwDateTimeFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_DATETIMEFLD )), DATEFLD, nFormat); + ForceFieldLanguage(aField, nLang); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); } else if (nDT == css::util::NumberFormat::TIME) { - SwDateTimeField aFld(static_cast<SwDateTimeFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_DATETIMEFLD)), TIMEFLD, nFormat); - ForceFieldLanguage(aFld, nLang); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + SwDateTimeField aField(static_cast<SwDateTimeFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_DATETIMEFLD)), TIMEFLD, nFormat); + ForceFieldLanguage(aField, nLang); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); } return FLD_OK; @@ -1754,9 +1754,9 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, OUString &rStr) } } - SwFileNameField aFld( - static_cast<SwFileNameFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_FILENAMEFLD)), eType); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + SwFileNameField aField( + static_cast<SwFileNameFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_FILENAMEFLD)), eType); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); return FLD_OK; } @@ -1767,21 +1767,21 @@ eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, OUString& rStr ) case 27: nSub = DS_WORD; break; // number of words case 28: nSub = DS_CHAR; break; // number of characters } - SwDocStatField aFld( static_cast<SwDocStatFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_DOCSTATFLD )), nSub, + SwDocStatField aField( static_cast<SwDocStatFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_DOCSTATFLD )), nSub, GetNumberPara( rStr ) ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, OUString& rStr ) { // page number - SwPageNumberField aFld( static_cast<SwPageNumberFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_PAGENUMBERFLD )), PG_RANDOM, + SwPageNumberField aField( static_cast<SwPageNumberFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_PAGENUMBERFLD )), PG_RANDOM, GetNumberPara(rStr, true)); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } @@ -1905,12 +1905,12 @@ eF_ResT SwWW8ImplReader::Read_F_Set( WW8FieldDesc* pF, OUString& rStr ) const long nNo = MapBookmarkVariables(pF, sOrigName, sVal); - SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFldType( SwSetExpFieldType( &m_rDoc, sOrigName, + SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( SwSetExpFieldType( &m_rDoc, sOrigName, nsSwGetSetExpType::GSE_STRING ) ); - SwSetExpField aFld( static_cast<SwSetExpFieldType*>(pFT), sVal, ULONG_MAX ); - aFld.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE | nsSwGetSetExpType::GSE_STRING); + SwSetExpField aField( static_cast<SwSetExpFieldType*>(pFT), sVal, ULONG_MAX ); + aField.SetSubType(nsSwExtendedSubType::SUB_INVISIBLE | nsSwGetSetExpType::GSE_STRING); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); m_pReffedStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_BOOKMARK, true, nNo); @@ -1978,8 +1978,8 @@ eF_ResT SwWW8ImplReader::Read_F_Ref( WW8FieldDesc*, OUString& rStr ) m_pReffedStck->aReferencedTOCBookmarks.insert( sBkmName ); } - SwGetRefField aFld( - static_cast<SwGetRefFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD )), + SwGetRefField aField( + static_cast<SwGetRefFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_GETREFFLD )), sBkmName,REF_BOOKMARK,0,eFormat); if (eFormat == REF_CONTENT) @@ -1990,12 +1990,12 @@ eF_ResT SwWW8ImplReader::Read_F_Ref( WW8FieldDesc*, OUString& rStr ) must store it until the end of the document to see if it was, in which case we'll turn it into a show variable */ - m_pReffingStck->NewAttr( *m_pPaM->GetPoint(), SwFmtFld(aFld) ); + m_pReffingStck->NewAttr( *m_pPaM->GetPoint(), SwFormatField(aField) ); m_pReffingStck->SetAttr( *m_pPaM->GetPoint(), RES_TXTATR_FIELD); } else { - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); } return FLD_OK; } @@ -2034,17 +2034,17 @@ eF_ResT SwWW8ImplReader::Read_F_NoteReference( WW8FieldDesc*, OUString& rStr ) // set Sequence No of corresponding Foot-/Endnote to Zero // (will be corrected in - SwGetRefField aFld( static_cast<SwGetRefFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD )), aBkmName, REF_FOOTNOTE, 0, + SwGetRefField aField( static_cast<SwGetRefFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_GETREFFLD )), aBkmName, REF_FOOTNOTE, 0, REF_ONLYNUMBER ); - m_pReffingStck->NewAttr(*m_pPaM->GetPoint(), SwFmtFld(aFld)); + m_pReffingStck->NewAttr(*m_pPaM->GetPoint(), SwFormatField(aField)); m_pReffingStck->SetAttr(*m_pPaM->GetPoint(), RES_TXTATR_FIELD); if (bAboveBelow) { - SwGetRefField aFld2( static_cast<SwGetRefFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD )),aBkmName, REF_FOOTNOTE, 0, + SwGetRefField aField2( static_cast<SwGetRefFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_GETREFFLD )),aBkmName, REF_FOOTNOTE, 0, REF_UPDOWN ); - m_pReffingStck->NewAttr(*m_pPaM->GetPoint(), SwFmtFld(aFld2)); + m_pReffingStck->NewAttr(*m_pPaM->GetPoint(), SwFormatField(aField2)); m_pReffingStck->SetAttr(*m_pPaM->GetPoint(), RES_TXTATR_FIELD); } return FLD_OK; @@ -2091,12 +2091,12 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr ) } OUString sURL = "#" + sBookmarkName; const OUString sTarget; - SwFmtINetFmt aURL( sURL, sTarget ); + SwFormatINetFormat aURL( sURL, sTarget ); const OUString sLinkStyle("Index Link"); const sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); - aURL.SetVisitedFmtAndId( sLinkStyle, nPoolId); - aURL.SetINetFmtAndId( sLinkStyle, nPoolId ); + aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId); + aURL.SetINetFormatAndId( sLinkStyle, nPoolId ); m_pCtrlStck->NewAttr( *m_pPaM->GetPoint(), aURL ); } return FLD_TEXT; @@ -2115,9 +2115,9 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr ) { sPageRefBookmarkName = sName; } - SwGetRefField aFld( static_cast<SwGetRefFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_GETREFFLD )), + SwGetRefField aField( static_cast<SwGetRefFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_GETREFFLD )), sPageRefBookmarkName, REF_BOOKMARK, 0, REF_PAGE ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); return FLD_OK; } @@ -2194,13 +2194,13 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr) bool bApplyWingdings = ConvertMacroSymbol( aName, aVText ); aName = "StarOffice.Standard.Modul1." + aName; - SwMacroField aFld( static_cast<SwMacroFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_MACROFLD )), aName, aVText ); + SwMacroField aField( static_cast<SwMacroFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_MACROFLD )), aName, aVText ); if( !bApplyWingdings ) { - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); WW8_CP nOldCp = m_pPlcxMan->Where(); WW8_CP nCp = nOldCp + nOffset; @@ -2232,7 +2232,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr) { SetNewFontAttr( i, true, RES_CHRATR_FONT ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_CHRATR_FONT ); ResetCharSetVars(); } @@ -2309,7 +2309,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr ) /* Besonderheit: - Wir setzen jetzt den Link ins Doc und merken uns den SwFlyFrmFmt. + Wir setzen jetzt den Link ins Doc und merken uns den SwFlyFrameFormat. Da wir ja unten auf jjeden Fall mit Return-Wert FLD_READ_FSPA enden, wird der Skip-Wert so bemessen, dass das folgende Char-1 eingelesen wird. @@ -2319,15 +2319,15 @@ eF_ResT SwWW8ImplReader::Read_F_IncludePicture( WW8FieldDesc*, OUString& rStr ) */ SfxItemSet aFlySet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); - aFlySet.Put( SwFmtAnchor( FLY_AS_CHAR ) ); - aFlySet.Put( SwFmtVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); - m_pFlyFmtOfJustInsertedGraphic = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, + aFlySet.Put( SwFormatAnchor( FLY_AS_CHAR ) ); + aFlySet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::FRAME )); + m_pFlyFormatOfJustInsertedGraphic = m_rDoc.getIDocumentContentOperations().Insert( *m_pPaM, aGrfName, OUString(), 0, // Graphic* &aFlySet, - 0, 0); // SwFrmFmt* - m_aGrfNameGenerator.SetUniqueGraphName(m_pFlyFmtOfJustInsertedGraphic, + 0, 0); // SwFrameFormat* + m_aGrfNameGenerator.SetUniqueGraphName(m_pFlyFormatOfJustInsertedGraphic, INetURLObject(aGrfName).GetBase()); } return FLD_READ_FSPA; @@ -2393,13 +2393,13 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt OSL_ENSURE(pSection, "no section inserted"); if (!pSection) return FLD_TEXT; - const SwSectionNode* pSectionNode = pSection->GetFmt()->GetSectionNode(); + const SwSectionNode* pSectionNode = pSection->GetFormat()->GetSectionNode(); OSL_ENSURE(pSectionNode, "no section node!"); if (!pSectionNode) return FLD_TEXT; m_pPaM->GetPoint()->nNode = pSectionNode->GetIndex()+1; - m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetCntntNode(), 0 ); + m_pPaM->GetPoint()->nContent.Assign(m_pPaM->GetContentNode(), 0 ); //we have inserted a section before this point, so adjust pos //for future page/section segment insertion @@ -2432,9 +2432,9 @@ eF_ResT SwWW8ImplReader::Read_F_DBField( WW8FieldDesc* pF, OUString& rStr ) } SwDBFieldType aD( &m_rDoc, aName, SwDBData() ); // Datenbank: Nichts - SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFldType( aD ); - SwDBField aFld( static_cast<SwDBFieldType*>(pFT) ); - aFld.SetFieldCode( rStr ); + SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( aD ); + SwDBField aField( static_cast<SwDBFieldType*>(pFT) ); + aField.SetFieldCode( rStr ); OUString aResult; m_pSBase->WW8ReadString( *m_pStrm, aResult, m_pPlcxMan->GetCpOfs()+ @@ -2442,9 +2442,9 @@ eF_ResT SwWW8ImplReader::Read_F_DBField( WW8FieldDesc* pF, OUString& rStr ) aResult = aResult.replace( '\xb', '\n' ); - aFld.InitContent(aResult); + aField.InitContent(aResult); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld( aFld )); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField( aField )); #endif return FLD_OK; } @@ -2454,10 +2454,10 @@ eF_ResT SwWW8ImplReader::Read_F_DBNext( WW8FieldDesc*, OUString& ) { #if HAVE_FEATURE_DBCONNECTIVITY SwDBNextSetFieldType aN; - SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFldType( aN ); - SwDBNextSetField aFld( static_cast<SwDBNextSetFieldType*>(pFT), OUString(), OUString(), + SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( aN ); + SwDBNextSetField aField( static_cast<SwDBNextSetFieldType*>(pFT), OUString(), OUString(), SwDBData() ); // Datenbank: Nichts - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); #endif return FLD_OK; } @@ -2467,10 +2467,10 @@ eF_ResT SwWW8ImplReader::Read_F_DBNum( WW8FieldDesc*, OUString& ) { #if HAVE_FEATURE_DBCONNECTIVITY SwDBSetNumberFieldType aN; - SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFldType( aN ); - SwDBSetNumberField aFld( static_cast<SwDBSetNumberFieldType*>(pFT), + SwFieldType* pFT = m_rDoc.getIDocumentFieldsAccess().InsertFieldType( aN ); + SwDBSetNumberField aField( static_cast<SwDBSetNumberFieldType*>(pFT), SwDBData() ); // Datenbank: Nichts - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); #endif return FLD_OK; } @@ -2494,15 +2494,15 @@ eF_ResT SwWW8ImplReader::Read_F_Equation( WW8FieldDesc*, OUString& rStr ) if (aResult.sType == "Input") { - SwInputField aFld( static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFldType( RES_INPUTFLD )), + SwInputField aField( static_cast<SwInputFieldType*>(m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_INPUTFLD )), aResult.sResult, aResult.sResult, INP_TXT, 0 ); - m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFmtFld( aFld ) ); // insert input field + m_rDoc.getIDocumentContentOperations().InsertPoolItem( *m_pPaM, SwFormatField( aField ) ); // insert input field } else if (aResult.sType == "CombinedCharacters") { - SwCombinedCharField aFld(static_cast<SwCombinedCharFieldType*>( - m_rDoc.getIDocumentFieldsAccess().GetSysFldType(RES_COMBINED_CHARS)), aResult.sType); - m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFmtFld(aFld)); + SwCombinedCharField aField(static_cast<SwCombinedCharFieldType*>( + m_rDoc.getIDocumentFieldsAccess().GetSysFieldType(RES_COMBINED_CHARS)), aResult.sType); + m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SwFormatField(aField)); } } else if ('*' == cChar) @@ -2616,8 +2616,8 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) break; } - SwFmtRuby aRuby(sRuby); - const SwCharFmt *pCharFmt=0; + SwFormatRuby aRuby(sRuby); + const SwCharFormat *pCharFormat=0; //Make a guess at which of asian of western we should be setting sal_uInt16 nScript; if (g_pBreakIt->GetBreakIter().is()) @@ -2626,10 +2626,10 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) nScript = i18n::ScriptType::ASIAN; //Check to see if we already have a ruby charstyle that this fits - std::vector<const SwCharFmt*>::const_iterator aEnd = - m_aRubyCharFmts.end(); - for(std::vector<const SwCharFmt*>::const_iterator aIter - = m_aRubyCharFmts.begin(); aIter != aEnd; ++aIter) + std::vector<const SwCharFormat*>::const_iterator aEnd = + m_aRubyCharFormats.end(); + for(std::vector<const SwCharFormat*>::const_iterator aIter + = m_aRubyCharFormats.begin(); aIter != aEnd; ++aIter) { const SvxFontHeightItem &rFH = ItemGet<SvxFontHeightItem>(*(*aIter), @@ -2640,35 +2640,35 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam) GetWhichOfScript(RES_CHRATR_FONT,nScript)); if (rF.GetFamilyName().equals(sFontName)) { - pCharFmt=*aIter; + pCharFormat=*aIter; break; } } } //Create a new char style if necessary - if (!pCharFmt) + if (!pCharFormat) { - SwCharFmt *pFmt=0; + SwCharFormat *pFormat=0; OUString aNm; //Take this as the base name SwStyleNameMapper::FillUIName(RES_POOLCHR_RUBYTEXT,aNm); - aNm+=OUString::number(m_aRubyCharFmts.size()+1); - pFmt = m_rDoc.MakeCharFmt(aNm, m_rDoc.GetDfltCharFmt()); + aNm+=OUString::number(m_aRubyCharFormats.size()+1); + pFormat = m_rDoc.MakeCharFormat(aNm, m_rDoc.GetDfltCharFormat()); SvxFontHeightItem aHeightItem(nFontSize*10, 100, RES_CHRATR_FONTSIZE); SvxFontItem aFontItem(FAMILY_DONTKNOW,sFontName, OUString(), PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT); aHeightItem.SetWhich(GetWhichOfScript(RES_CHRATR_FONTSIZE,nScript)); aFontItem.SetWhich(GetWhichOfScript(RES_CHRATR_FONT,nScript)); - pFmt->SetFmtAttr(aHeightItem); - pFmt->SetFmtAttr(aFontItem); - m_aRubyCharFmts.push_back(pFmt); - pCharFmt = pFmt; + pFormat->SetFormatAttr(aHeightItem); + pFormat->SetFormatAttr(aFontItem); + m_aRubyCharFormats.push_back(pFormat); + pCharFormat = pFormat; } //Set the charstyle and justification - aRuby.SetCharFmtName(pCharFmt->GetName()); - aRuby.SetCharFmtId(pCharFmt->GetPoolFmtId()); + aRuby.SetCharFormatName(pCharFormat->GetName()); + aRuby.SetCharFormatId(pCharFormat->GetPoolFormatId()); aRuby.SetAdjustment(nJustificationCode); NewAttr(aRuby); @@ -2738,7 +2738,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, } if( -1 == nIndex ) { - const SwFmt* pStyle = rReader.GetStyleWithOrgWWName(sTemplate); + const SwFormat* pStyle = rReader.GetStyleWithOrgWWName(sTemplate); if( pStyle ) sTemplate = pStyle->GetName(); // Store Style for Level 0 into TOXBase @@ -2760,7 +2760,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, { nLevel--; // Store Style and Level into TOXBase - const SwFmt* pStyle + const SwFormat* pStyle = rReader.GetStyleWithOrgWWName( sTemplate ); if( pStyle ) @@ -3190,8 +3190,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) if (rSI.IsOutlineNumbered()) { sal_uInt16 nStyleLevel = rSI.mnWW8OutlineLevel; - const SwNumFmt& rFmt = rSI.GetOutlineNumrule()->Get( nStyleLevel ); - if ( SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType() ) + const SwNumFormat& rFormat = rSI.GetOutlineNumrule()->Get( nStyleLevel ); + if ( SVX_NUM_NUMBER_NONE != rFormat.GetNumberingType() ) { ++nStyleLevel; @@ -3276,21 +3276,21 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) //#i10028# inserting a toc implicltly acts like a parabreak in word and writer if ( m_pPaM->End() && - m_pPaM->End()->nNode.GetNode().GetTxtNode() && - m_pPaM->End()->nNode.GetNode().GetTxtNode()->Len() != 0 ) + m_pPaM->End()->nNode.GetNode().GetTextNode() && + m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() != 0 ) { m_bCareFirstParaEndInToc = true; } if (m_pPaM->GetPoint()->nContent.GetIndex()) - AppendTxtNode(*m_pPaM->GetPoint()); + AppendTextNode(*m_pPaM->GetPoint()); const SwPosition* pPos = m_pPaM->GetPoint(); SwFltTOX aFltTOX( pBase, nIndexCols ); // test if there is already a break item on this node - if(SwCntntNode* pNd = pPos->nNode.GetNode().GetCntntNode()) + if(SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode()) { const SfxItemSet* pSet = pNd->GetpSwAttrSet(); if( pSet ) @@ -3331,7 +3331,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) { // Set the column number for index SfxItemSet aSet( m_rDoc.GetAttrPool(), RES_COL, RES_COL ); - SwFmtCol aCol; + SwFormatCol aCol; aCol.Init( nIndexCols, 708, USHRT_MAX ); aSet.Put( aCol ); pBase2->SetAttrSet( aSet ); @@ -3438,15 +3438,15 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, OUString& rStr if( !sMark.isEmpty() ) ( sURL += "#" ) += sMark; - SwFmtINetFmt aURL(sURL, sTarget); + SwFormatINetFormat aURL(sURL, sTarget); // If on loading TOC field, change the default style into the "index link" if (m_bLoadingTOXCache) { OUString sLinkStyle("Index Link"); sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ); - aURL.SetVisitedFmtAndId( sLinkStyle, nPoolId ); - aURL.SetINetFmtAndId( sLinkStyle, nPoolId ); + aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId ); + aURL.SetINetFormatAndId( sLinkStyle, nPoolId ); } //As an attribute this needs to be closed, and that'll happen from @@ -3463,7 +3463,7 @@ static void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const OUString &rStr, bool b sal_uInt16 nLevel = 1; - OUString sFldTxt; + OUString sFieldText; WW8ReadFieldParams aReadParam(rStr); for (;;) { @@ -3473,10 +3473,10 @@ static void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const OUString &rStr, bool b switch( nRet ) { case -2: - if( sFldTxt.isEmpty() ) + if( sFieldText.isEmpty() ) { // PrimaryKey ohne ":", 2nd dahinter - sFldTxt = aReadParam.GetResult(); + sFieldText = aReadParam.GetResult(); } break; @@ -3512,23 +3512,23 @@ static void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const OUString &rStr, bool b aM.SetLevel( nLevel ); else { - sal_Int32 nFnd = sFldTxt.indexOf( WW8_TOX_LEVEL_DELIM ); + sal_Int32 nFnd = sFieldText.indexOf( WW8_TOX_LEVEL_DELIM ); if( -1 != nFnd ) // it exist levels { - aM.SetPrimaryKey( sFldTxt.copy( 0, nFnd ) ); - sal_Int32 nScndFnd = sFldTxt.indexOf( WW8_TOX_LEVEL_DELIM, nFnd+1 ); + aM.SetPrimaryKey( sFieldText.copy( 0, nFnd ) ); + sal_Int32 nScndFnd = sFieldText.indexOf( WW8_TOX_LEVEL_DELIM, nFnd+1 ); if( -1 != nScndFnd ) { - aM.SetSecondaryKey( sFldTxt.copy( nFnd+1, nScndFnd - nFnd - 1 )); + aM.SetSecondaryKey( sFieldText.copy( nFnd+1, nScndFnd - nFnd - 1 )); nFnd = nScndFnd; } - sFldTxt = sFldTxt.copy( nFnd+1 ); + sFieldText = sFieldText.copy( nFnd+1 ); } } - if (!sFldTxt.isEmpty()) + if (!sFieldText.isEmpty()) { - aM.SetAlternativeText( sFldTxt ); + aM.SetAlternativeText( sFieldText ); rDoc.getIDocumentContentOperations().InsertPoolItem( rPaM, aM ); } } @@ -3538,13 +3538,13 @@ void sw::ms::ImportXE(SwDoc &rDoc, SwPaM &rPaM, const OUString &rStr) lcl_ImportTox(rDoc, rPaM, rStr, true); } -void SwWW8ImplReader::ImportTox( int nFldId, const OUString& aStr ) +void SwWW8ImplReader::ImportTox( int nFieldId, const OUString& aStr ) { - bool bIdx = (nFldId != 9); + bool bIdx = (nFieldId != 9); lcl_ImportTox(m_rDoc, *m_pPaM, aStr, bIdx); } -void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen ) +void SwWW8ImplReader::Read_FieldVanish( sal_uInt16, const sal_uInt8*, short nLen ) { //Meaningless in a style if (m_pAktColl || !m_pPlcxMan) @@ -3553,9 +3553,9 @@ void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen ) const int nChunk = 64; //number of characters to read at one time // Vorsicht: Bei Feldnamen mit Umlauten geht das MEMICMP nicht! - const static sal_Char *aFldNames[] = { "\x06""INHALT", "\x02""XE", // dt. + const static sal_Char *aFieldNames[] = { "\x06""INHALT", "\x02""XE", // dt. "\x02""TC" }; // us - const static sal_uInt8 aFldId[] = { 9, 4, 9 }; + const static sal_uInt8 aFieldId[] = { 9, 4, 9 }; if( nLen < 0 ) { @@ -3623,11 +3623,11 @@ void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen ) for( int i = 0; i < 3; i++ ) { - const sal_Char* pName = aFldNames[i]; + const sal_Char* pName = aFieldNames[i]; const sal_Int32 nNameLen = static_cast<sal_Int32>(*pName++); if( sFieldName.matchIgnoreAsciiCaseAsciiL( pName, nNameLen, nC ) ) { - ImportTox( aFldId[i], sFieldName.copy( nC + nNameLen ) ); + ImportTox( aFieldId[i], sFieldName.copy( nC + nNameLen ) ); break; // keine Mehrfachnennungen moeglich } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 8863e0a4cf51..267cd7909a00 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -208,20 +208,20 @@ bool wwSection::IsVertical() const ruby stuff, and the elements are rectangles. By misusing the ruby row I can handle distortions in one direction, but its all a bit of a mess: */ -void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection) +void SwWW8ImplReader::SetDocumentGrid(SwFrameFormat &rFormat, const wwSection &rSection) { if (m_bVer67) return; - rFmt.SetFmtAttr(SvxFrameDirectionItem(rSection.meDir, RES_FRAMEDIR)); + rFormat.SetFormatAttr(SvxFrameDirectionItem(rSection.meDir, RES_FRAMEDIR)); - SwTwips nTextareaHeight = rFmt.GetFrmSize().GetHeight(); - const SvxULSpaceItem &rUL = ItemGet<SvxULSpaceItem>(rFmt, RES_UL_SPACE); + SwTwips nTextareaHeight = rFormat.GetFrmSize().GetHeight(); + const SvxULSpaceItem &rUL = ItemGet<SvxULSpaceItem>(rFormat, RES_UL_SPACE); nTextareaHeight -= rUL.GetUpper(); nTextareaHeight -= rUL.GetLower(); - SwTwips nTextareaWidth = rFmt.GetFrmSize().GetWidth(); - const SvxLRSpaceItem &rLR = ItemGet<SvxLRSpaceItem>(rFmt, RES_LR_SPACE); + SwTwips nTextareaWidth = rFormat.GetFrmSize().GetWidth(); + const SvxLRSpaceItem &rLR = ItemGet<SvxLRSpaceItem>(rFormat, RES_LR_SPACE); nTextareaWidth -= rLR.GetLeft(); nTextareaWidth -= rLR.GetRight(); @@ -270,10 +270,10 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection) sal_uInt32 nCharWidth=240; for (sal_uInt16 nI = 0; nI < m_pStyles->GetCount(); ++nI) { - if (m_vColl[nI].bValid && m_vColl[nI].pFmt && + if (m_vColl[nI].bValid && m_vColl[nI].pFormat && m_vColl[nI].IsWW8BuiltInDefaultStyle()) { - nCharWidth = ItemGet<SvxFontHeightItem>(*(m_vColl[nI].pFmt), + nCharWidth = ItemGet<SvxFontHeightItem>(*(m_vColl[nI].pFormat), RES_CHRATR_CJK_FONTSIZE).GetHeight(); break; } @@ -306,7 +306,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection) sal_Int32 nRubyHeight = 0; aGrid.SetRubyHeight(writer_cast<sal_uInt16>(nRubyHeight)); - rFmt.SetFmtAttr(aGrid); + rFormat.SetFormatAttr(aGrid); } void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen) @@ -321,7 +321,7 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL } } -bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection, +bool wwSectionManager::SetCols(SwFrameFormat &rFormat, const wwSection &rSection, sal_uInt32 nNetWidth) { //sprmSCcolumns - number of columns - 1 @@ -330,7 +330,7 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection, if (nCols < 2) //check for no columns or other weird state return false; - SwFmtCol aCol; // Create SwFmtCol + SwFormatCol aCol; // Create SwFormatCol //sprmSDxaColumns - Default distance is 1.25 cm sal_Int32 nColSpace = rSection.StandardColSeparation(); @@ -367,7 +367,7 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection, } aCol.SetWishWidth(writer_cast<sal_uInt16>(nNetWidth)); } - rFmt.SetFmtAttr(aCol); + rFormat.SetFormatAttr(aCol); return true; } @@ -411,23 +411,23 @@ void wwSectionManager::SetLeftRight(wwSection &rSection) rSection.nPgRight = nWWRi; } -void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt, +void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrameFormat &rFormat, const wwSection &rSection, bool bIgnoreCols) { // 1. Orientierung rInPageDesc.SetLandscape(rSection.IsLandScape()); // 2. Papiergroesse - SwFmtFrmSize aSz( rFmt.GetFrmSize() ); + SwFormatFrmSize aSz( rFormat.GetFrmSize() ); aSz.SetWidth(rSection.GetPageWidth()); aSz.SetHeight(SvxPaperInfo::GetSloppyPaperDimension(rSection.GetPageHeight())); - rFmt.SetFmtAttr(aSz); + rFormat.SetFormatAttr(aSz); - rFmt.SetFmtAttr( + rFormat.SetFormatAttr( SvxLRSpaceItem(rSection.GetPageLeft(), rSection.GetPageRight(), 0, 0, RES_LR_SPACE)); if (!bIgnoreCols) - SetCols(rFmt, rSection, rSection.GetTextAreaWidth()); + SetCols(rFormat, rSection, rSection.GetTextAreaWidth()); } static sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn) @@ -437,12 +437,12 @@ static sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn) return nIn; } -void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) +void SwWW8ImplReader::SetPageBorder(SwFrameFormat &rFormat, const wwSection &rSection) { if (!IsBorder(rSection.brc)) return; - SfxItemSet aSet(rFmt.GetAttrSet()); + SfxItemSet aSet(rFormat.GetAttrSet()); short aSizeArray[5]={0}; SetFlyBordersShadow(aSet, rSection.brc, &aSizeArray[0]); SvxLRSpaceItem aLR(ItemGet<SvxLRSpaceItem>(aSet, RES_LR_SPACE)); @@ -508,7 +508,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) aSet.Put(aLR); aSet.Put(aUL); - rFmt.SetFmtAttr(aSet); + rFormat.SetFormatAttr(aSet); } void wwSectionManager::GetPageULData(const wwSection &rSection, @@ -578,85 +578,85 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, rData.nSwLo = std::abs(nWWLo); } -void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt, +void wwSectionManager::SetPageULSpaceItems(SwFrameFormat &rFormat, wwSectionManager::wwULSpaceData& rData, const wwSection &rSection) { if (rData.bHasHeader) // ... und Header-Lower setzen { //Kopfzeilenhoehe minimal sezten - if (SwFrmFmt* pHdFmt = const_cast<SwFrmFmt*>(rFmt.GetHeader().GetHeaderFmt())) + if (SwFrameFormat* pHdFormat = const_cast<SwFrameFormat*>(rFormat.GetHeader().GetHeaderFormat())) { - SvxULSpaceItem aHdUL(pHdFmt->GetULSpace()); + SvxULSpaceItem aHdUL(pHdFormat->GetULSpace()); if (!rSection.IsFixedHeightHeader()) //normal { - pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo)); + pHdFormat->SetFormatAttr(SwFormatFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo)); // #i19922# - minimum page header height is now 1mm // use new constant <cMinHdFtHeight> aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) ); - pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem( + pHdFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, true)); } else { // #i48832# - set correct spacing between header and body. const SwTwips nHdLowerSpace( std::abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo ); - pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace)); + pHdFormat->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace)); aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) ); - pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem( + pHdFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, false)); } - pHdFmt->SetFmtAttr(aHdUL); + pHdFormat->SetFormatAttr(aHdUL); } } if (rData.bHasFooter) // ... und Footer-Upper setzen { - if (SwFrmFmt* pFtFmt = const_cast<SwFrmFmt*>(rFmt.GetFooter().GetFooterFmt())) + if (SwFrameFormat* pFtFormat = const_cast<SwFrameFormat*>(rFormat.GetFooter().GetFooterFormat())) { - SvxULSpaceItem aFtUL(pFtFmt->GetULSpace()); + SvxULSpaceItem aFtUL(pFtFormat->GetULSpace()); if (!rSection.IsFixedHeightFooter()) //normal { - pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp)); + pFtFormat->SetFormatAttr(SwFormatFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp)); // #i19922# - minimum page header height is now 1mm // use new constant <cMinHdFtHeight> aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) ); - pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem( + pFtFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, true)); } else { // #i48832# - set correct spacing between footer and body. const SwTwips nFtUpperSpace( std::abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp ); - pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace)); + pFtFormat->SetFormatAttr(SwFormatFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace)); aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) ); - pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem( + pFtFormat->SetFormatAttr(SwHeaderAndFooterEatSpacingItem( RES_HEADER_FOOTER_EAT_SPACING, false)); } - pFtFmt->SetFmtAttr(aFtUL); + pFtFormat->SetFormatAttr(aFtUL); } } SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp), writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE); - rFmt.SetFmtAttr(aUL); + rFormat.SetFormatAttr(aUL); } -SwSectionFmt *wwSectionManager::InsertSection( +SwSectionFormat *wwSectionManager::InsertSection( SwPaM& rMyPaM, wwSection &rSection) { SwSectionData aSection( CONTENT_SECTION, mrReader.m_rDoc.GetUniqueSectionName() ); - SfxItemSet aSet( mrReader.m_rDoc.GetAttrPool(), aFrmFmtSetRange ); + SfxItemSet aSet( mrReader.m_rDoc.GetAttrPool(), aFrameFormatSetRange ); bool nRTLPgn = !maSegments.empty() && maSegments.back().IsBiDi(); aSet.Put(SvxFrameDirectionItem( nRTLPgn ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); if (2 == mrReader.m_pWDop->fpc) - aSet.Put( SwFmtFtnAtTxtEnd(FTNEND_ATTXTEND)); + aSet.Put( SwFormatFootnoteAtTextEnd(FTNEND_ATTXTEND)); if (0 == mrReader.m_pWDop->epc) - aSet.Put( SwFmtEndAtTxtEnd(FTNEND_ATTXTEND)); + aSet.Put( SwFormatEndAtTextEnd(FTNEND_ATTXTEND)); aSection.SetProtectFlag(SectionIsProtected(rSection)); @@ -682,13 +682,13 @@ SwSectionFmt *wwSectionManager::InsertSection( if (!pPage) return 0; - SwSectionFmt *pFmt = rSection.mpSection->GetFmt(); - OSL_ENSURE(pFmt, "impossible"); - if (!pFmt) + SwSectionFormat *pFormat = rSection.mpSection->GetFormat(); + OSL_ENSURE(pFormat, "impossible"); + if (!pFormat) return 0; - SwFrmFmt& rFmt = pPage->GetMaster(); - const SvxLRSpaceItem& rLR = rFmt.GetLRSpace(); + SwFrameFormat& rFormat = pPage->GetMaster(); + const SvxLRSpaceItem& rLR = rFormat.GetLRSpace(); long nPageLeft = rLR.GetLeft(); long nPageRight = rLR.GetRight(); long nSectionLeft = rSection.GetPageLeft() - nPageLeft; @@ -696,11 +696,11 @@ SwSectionFmt *wwSectionManager::InsertSection( if ((nSectionLeft != 0) || (nSectionRight != 0)) { SvxLRSpaceItem aLR(nSectionLeft, nSectionRight, 0, 0, RES_LR_SPACE); - pFmt->SetFmtAttr(aLR); + pFormat->SetFormatAttr(aLR); } - SetCols(*pFmt, rSection, rSection.GetTextAreaWidth()); - return pFmt; + SetCols(*pFormat, rSection, rSection.GetTextAreaWidth()); + return pFormat; } void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection) @@ -740,9 +740,9 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection) (bRestartLnNumPerSection && !m_bNoLnNumYet) ) { - SwFmtLineNumber aLN; - if (const SwFmtLineNumber* pLN - = static_cast<const SwFmtLineNumber*>(GetFmtAttr(RES_LINENUMBER))) + SwFormatLineNumber aLN; + if (const SwFormatLineNumber* pLN + = static_cast<const SwFormatLineNumber*>(GetFormatAttr(RES_LINENUMBER))) { aLN.SetCountLines( pLN->IsCount() ); } @@ -781,7 +781,7 @@ void wwSectionManager::SetNumberingType(const wwSection &rNewSection, // mit Attributen un KF-Texten fuellt. // Dieses Vorgehen ist noetig geworden, da die UEbersetzung der verschiedenen // Seiten-Attribute zu stark verflochten ist. -void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/) +void wwSectionManager::CreateSep(const long nTextPos, bool /*bMustHaveBreak*/) { /* #i1909# section/page breaks should not occur in tables or subpage @@ -801,11 +801,11 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/) bool insert = true; SwPaM pam( *mrReader.m_pLastAnchorPos ); if( pam.Move(fnMoveBackward, fnGoNode)) - if( SwTxtNode* txtNode = pam.GetPoint()->nNode.GetNode().GetTxtNode()) + if( SwTextNode* txtNode = pam.GetPoint()->nNode.GetNode().GetTextNode()) if( txtNode->Len() == 0 ) insert = false; if( insert ) - mrReader.AppendTxtNode(*mrReader.m_pPaM->GetPoint()); + mrReader.AppendTextNode(*mrReader.m_pPaM->GetPoint()); } ww::WordVersion eVer = mrReader.GetFib().GetFIBVersion(); @@ -813,8 +813,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/) // M.M. Create a linked section if the WkbPLCF // has an entry for one at this cp WW8PLCFspecial* pWkb = mrReader.m_pPlcxMan->GetWkbPLCF(); - if (pWkb && pWkb->SeekPosExact(nTxtPos) && - pWkb->Where() == nTxtPos) + if (pWkb && pWkb->SeekPosExact(nTextPos) && + pWkb->Where() == nTextPos) { void* pData; WW8_CP nTest; @@ -1625,12 +1625,12 @@ void WW8FlyPara::ReadFull(sal_uInt8 nOrigSp29, SwWW8ImplReader* pIo) bGrafApo = false; do{ // Block zum rausspringen - sal_uInt8 nTxt[2]; + sal_uInt8 nText[2]; - if (!checkRead(*pIoStrm, nTxt, 2)) // lies Text + if (!checkRead(*pIoStrm, nText, 2)) // lies Text break; - if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ? + if( nText[0] != 0x01 || nText[1] != 0x0d )// nur Grafik + CR ? break; // Nein pPap->advance(); // Naechste Zeile @@ -2012,7 +2012,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, : SfxItemSet(rReader.m_rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1) { if (!rReader.m_bNewDoc) - Reader::ResetFrmFmtAttrs(*this); // Abstand/Umrandung raus + Reader::ResetFrameFormatAttrs(*this); // Abstand/Umrandung raus // Position Put(SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR)); @@ -2021,8 +2021,8 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, sal_Int16 eHRel = pFS->eHRel; rReader.MiserableRTLGraphicsHack(nXPos, pFS->nWidth, pFS->eHAlign, eHRel); /*Above can all go when we have from left in rtl mode*/ - Put( SwFmtHoriOrient(nXPos, pFS->eHAlign, pFS->eHRel, pFS->bToggelPos )); - Put( SwFmtVertOrient( pFS->nYPos, pFS->eVAlign, pFS->eVRel ) ); + Put( SwFormatHoriOrient(nXPos, pFS->eHAlign, pFS->eHRel, pFS->bToggelPos )); + Put( SwFormatVertOrient( pFS->nYPos, pFS->eVAlign, pFS->eVRel ) ); if (pFS->nLeMgn || pFS->nRiMgn) // Raender setzen Put(SvxLRSpaceItem(pFS->nLeMgn, pFS->nRiMgn, 0, 0, RES_LR_SPACE)); @@ -2031,7 +2031,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, Put(SvxULSpaceItem(pFS->nUpMgn, pFS->nLoMgn, RES_UL_SPACE)); //we no longer need to hack around the header/footer problems - SwFmtSurround aSurround(pFS->eSurround); + SwFormatSurround aSurround(pFS->eSurround); if ( pFS->eSurround == SURROUND_IDEAL ) aSurround.SetAnchorOnly( true ); Put( aSurround ); @@ -2043,12 +2043,12 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, // #i27767# // #i35017# - constant name has changed - Put( SwFmtWrapInfluenceOnObjPos( + Put( SwFormatWrapInfluenceOnObjPos( text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) ); if( !bGraf ) { - Put( SwFmtAnchor(pFS->eAnchor) ); + Put( SwFormatAnchor(pFS->eAnchor) ); // Groesse einstellen //Ordinarily with frames, the border width and spacing is @@ -2056,7 +2056,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, //types of frames, the left right thickness and space makes //it wider, but the top bottom spacing and border thickness //is placed inside. - Put( SwFmtFrmSize( pFS->eHeightFix, pFS->nWidth + + Put( SwFormatFrmSize( pFS->eHeightFix, pFS->nWidth + aSizeArray[WW8_LEFT] + aSizeArray[WW8_RIGHT], pFS->nHeight)); } @@ -2092,7 +2092,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, aSizeArray[WW8_BOT]*=2; } - Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth+aSizeArray[WW8_LEFT]+ + Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth+aSizeArray[WW8_LEFT]+ aSizeArray[WW8_RIGHT], nHeight+aSizeArray[WW8_TOP] + aSizeArray[WW8_BOT]) ); } @@ -2100,10 +2100,10 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) { if (!rReader.m_bNewDoc) - Reader::ResetFrmFmtAttrs(*this); // Abstand/Umrandung raus + Reader::ResetFrameFormatAttrs(*this); // Abstand/Umrandung raus Put(SvxLRSpaceItem(RES_LR_SPACE)); //inline writer ole2 objects start with 0.2cm l/r - SwFmtAnchor aAnchor(FLY_AS_CHAR); + SwFormatAnchor aAnchor(FLY_AS_CHAR); aAnchor.SetAnchor(pPaM->GetPoint()); Put(aAnchor); @@ -2111,9 +2111,9 @@ void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM) //The horizontal default is on the baseline, the vertical is centered //around the character center it appears if (rReader.m_aSectionManager.CurrentSectionIsVertical()) - Put(SwFmtVertOrient(0, text::VertOrientation::CHAR_CENTER,text::RelOrientation::CHAR)); + Put(SwFormatVertOrient(0, text::VertOrientation::CHAR_CENTER,text::RelOrientation::CHAR)); else - Put(SwFmtVertOrient(0, text::VertOrientation::TOP, text::RelOrientation::FRAME)); + Put(SwFormatVertOrient(0, text::VertOrientation::TOP, text::RelOrientation::FRAME)); } WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk) @@ -2162,26 +2162,26 @@ void WW8DupProperties::Insert(const SwPosition &rPos) } } -void SwWW8ImplReader::MoveInsideFly(const SwFrmFmt *pFlyFmt) +void SwWW8ImplReader::MoveInsideFly(const SwFrameFormat *pFlyFormat) { WW8DupProperties aDup(m_rDoc,m_pCtrlStck); m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), 0, false); // Setze Pam in den FlyFrame - const SwFmtCntnt& rCntnt = pFlyFmt->GetCntnt(); - OSL_ENSURE( rCntnt.GetCntntIdx(), "Kein Inhalt vorbereitet." ); - m_pPaM->GetPoint()->nNode = rCntnt.GetCntntIdx()->GetIndex() + 1; - m_pPaM->GetPoint()->nContent.Assign( m_pPaM->GetCntntNode(), 0 ); + const SwFormatContent& rContent = pFlyFormat->GetContent(); + OSL_ENSURE( rContent.GetContentIdx(), "Kein Inhalt vorbereitet." ); + m_pPaM->GetPoint()->nNode = rContent.GetContentIdx()->GetIndex() + 1; + m_pPaM->GetPoint()->nContent.Assign( m_pPaM->GetContentNode(), 0 ); aDup.Insert(*m_pPaM->GetPoint()); } -SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrmFmt *pFlyFmt, +SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrameFormat *pFlyFormat, const SwPosition &rPos, bool bTableJoin) { SwTwips nRetWidth = 0; - if (!pFlyFmt) + if (!pFlyFormat) return nRetWidth; // Alle Attribute schliessen, da sonst Attribute entstehen koennen, // die aus Flys rausragen @@ -2197,8 +2197,8 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrmFmt *pFlyFmt, */ if (bTableJoin) { - const SwNodeIndex* pNodeIndex = pFlyFmt->GetCntnt(). - GetCntntIdx(); + const SwNodeIndex* pNodeIndex = pFlyFormat->GetContent(). + GetContentIdx(); if (pNodeIndex) { SwNodeIndex aIdx( *pNodeIndex, 1 ), @@ -2211,11 +2211,11 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrmFmt *pFlyFmt, SwTableNode *pTable = aIdx.GetNode().GetTableNode(); aIdx = *aIdx.GetNode().EndOfSectionNode(); ++aIdx; - if ( (aIdx < aEnd) && aIdx.GetNode().IsTxtNode() ) + if ( (aIdx < aEnd) && aIdx.GetNode().IsTextNode() ) { - SwTxtNode *pNd = aIdx.GetNode().GetTxtNode(); + SwTextNode *pNd = aIdx.GetNode().GetTextNode(); ++aIdx; - if (aIdx == aEnd && pNd && pNd->GetTxt().isEmpty()) + if (aIdx == aEnd && pNd && pNd->GetText().isEmpty()) { //An extra pre-created by writer unused paragraph @@ -2225,22 +2225,22 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrmFmt *pFlyFmt, m_aExtraneousParas.push_back(pNd); SwTable& rTable = pTable->GetTable(); - SwFrmFmt* pTblFmt = rTable.GetFrmFmt(); + SwFrameFormat* pTableFormat = rTable.GetFrameFormat(); - if (pTblFmt) + if (pTableFormat) { - SwFmtFrmSize aSize = pTblFmt->GetFrmSize(); + SwFormatFrmSize aSize = pTableFormat->GetFrmSize(); aSize.SetHeightSizeType(ATT_MIN_SIZE); aSize.SetHeight(MINLAY); - pFlyFmt->SetFmtAttr(aSize); - SwFmtHoriOrient aHori = pTblFmt->GetHoriOrient(); + pFlyFormat->SetFormatAttr(aSize); + SwFormatHoriOrient aHori = pTableFormat->GetHoriOrient(); // passing the table orientaion of // LEFT_AND_WIDTH to the frame seems to // work better than FULL, especially if the // table width exceeds the page width, however // I am not brave enough to set it in all // instances - pTblFmt->SetFmtAttr( SwFmtHoriOrient(0, ( aHori.GetHoriOrient() == text::HoriOrientation::LEFT_AND_WIDTH ) ? ::text::HoriOrientation::LEFT_AND_WIDTH : text::HoriOrientation::FULL ) ); + pTableFormat->SetFormatAttr( SwFormatHoriOrient(0, ( aHori.GetHoriOrient() == text::HoriOrientation::LEFT_AND_WIDTH ) ? ::text::HoriOrientation::LEFT_AND_WIDTH : text::HoriOrientation::FULL ) ); nRetWidth = aSize.GetWidth(); } } @@ -2340,7 +2340,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, if (pTabPos && pTabPos->bNoFly) { - m_pSFlyPara->pFlyFmt = 0; + m_pSFlyPara->pFlyFormat = 0; if (pULSpaceItem) { // Word positioned tables can have a position (like a @@ -2351,7 +2351,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const SfxPoolItem* pItem = 0; if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem)) { - const SwFmtVertOrient* pOrient = static_cast<const SwFmtVertOrient*>(pItem); + const SwFormatVertOrient* pOrient = static_cast<const SwFormatVertOrient*>(pItem); if (pOrient->GetPos() != 0) pULSpaceItem->SetUpper(pOrient->GetPos()); } @@ -2359,24 +2359,24 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, } else { - m_pSFlyPara->pFlyFmt = m_rDoc.MakeFlySection( m_pSFlyPara->eAnchor, + m_pSFlyPara->pFlyFormat = m_rDoc.MakeFlySection( m_pSFlyPara->eAnchor, m_pPaM->GetPoint(), &aFlySet ); - OSL_ENSURE(m_pSFlyPara->pFlyFmt->GetAnchor().GetAnchorId() == + OSL_ENSURE(m_pSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() == m_pSFlyPara->eAnchor, "Not the anchor type requested!"); } - if (m_pSFlyPara->pFlyFmt) + if (m_pSFlyPara->pFlyFormat) { if (!m_pDrawModel) GrafikCtor(); - SdrObject* pOurNewObject = CreateContactObject(m_pSFlyPara->pFlyFmt); + SdrObject* pOurNewObject = CreateContactObject(m_pSFlyPara->pFlyFormat); m_pWWZOrder->InsertTextLayerObject(pOurNewObject); } - if (FLY_AS_CHAR != m_pSFlyPara->eAnchor && m_pSFlyPara->pFlyFmt) + if (FLY_AS_CHAR != m_pSFlyPara->eAnchor && m_pSFlyPara->pFlyFormat) { - m_pAnchorStck->AddAnchor(*m_pPaM->GetPoint(),m_pSFlyPara->pFlyFmt); + m_pAnchorStck->AddAnchor(*m_pPaM->GetPoint(),m_pSFlyPara->pFlyFormat); } // remember Pos in body text @@ -2388,8 +2388,8 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, m_pSFlyPara->pOldAnchorStck = m_pAnchorStck; m_pAnchorStck = new SwWW8FltAnchorStack(&m_rDoc, m_nFieldFlags); - if (m_pSFlyPara->pFlyFmt) - MoveInsideFly(m_pSFlyPara->pFlyFmt); + if (m_pSFlyPara->pFlyFormat) + MoveInsideFly(m_pSFlyPara->pFlyFormat); // 1) ReadText() is not called recursively because the length of // the Apo is unknown at that time, and ReadText() needs it. @@ -2415,11 +2415,11 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) SwNodeIndex aPref(rPam.GetPoint()->nNode, -1); - if (SwTxtNode* pNode = aPref.GetNode().GetTxtNode()) + if (SwTextNode* pNode = aPref.GetNode().GetTextNode()) { m_aSectionManager.JoinNode(*rPam.GetPoint(), aPref.GetNode()); rPam.GetPoint()->nNode = aPref; - rPam.GetPoint()->nContent.Assign(pNode, pNode->GetTxt().getLength()); + rPam.GetPoint()->nContent.Assign(pNode, pNode->GetText().getLength()); if (bStealAttr) m_pCtrlStck->StealAttr(rPam.GetPoint()->nNode); @@ -2431,9 +2431,9 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) } //In auto-width word frames negative after-indent values are ignored -void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) +void SwWW8ImplReader::StripNegativeAfterIndent(SwFrameFormat *pFlyFormat) { - const SwNodeIndex* pSttNd = pFlyFmt->GetCntnt().GetCntntIdx(); + const SwNodeIndex* pSttNd = pFlyFormat->GetContent().GetContentIdx(); if (!pSttNd) return; @@ -2441,7 +2441,7 @@ void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) SwNodeIndex aEnd(*pSttNd->GetNode().EndOfSectionNode()); while (aIdx < aEnd) { - SwTxtNode *pNd = aIdx.GetNode().GetTxtNode(); + SwTextNode *pNd = aIdx.GetNode().GetTextNode(); if (pNd) { const SvxLRSpaceItem& rLR = ItemGet<SvxLRSpaceItem>(*pNd, RES_LR_SPACE); @@ -2493,14 +2493,14 @@ void SwWW8ImplReader::StopApo() SwNodeIndex aPref(m_pPaM->GetPoint()->nNode, -1); SwTwips nNewWidth = - MoveOutsideFly(m_pSFlyPara->pFlyFmt, *m_pSFlyPara->pMainTextPos); + MoveOutsideFly(m_pSFlyPara->pFlyFormat, *m_pSFlyPara->pMainTextPos); if (nNewWidth) m_pSFlyPara->BoxUpWidth(nNewWidth); Color aBg(0xFE, 0xFF, 0xFF, 0xFF); //Transparent by default - SwTxtNode* pNd = aPref.GetNode().GetTxtNode(); - if (pNd && m_pSFlyPara->pFlyFmt) + SwTextNode* pNd = aPref.GetNode().GetTextNode(); + if (pNd && m_pSFlyPara->pFlyFormat) { /* #i582# @@ -2508,7 +2508,7 @@ void SwWW8ImplReader::StopApo() it. Otherwise, make it transparent, this appears to be how MSWord works */ - const SfxPoolItem &rItm = pNd->SwCntntNode::GetAttr(RES_BACKGROUND); + const SfxPoolItem &rItm = pNd->SwContentNode::GetAttr(RES_BACKGROUND); const SvxBrushItem &rBrush = static_cast<const SvxBrushItem&>(rItm); if (rBrush.GetColor().GetColor() != COL_AUTO) aBg = rBrush.GetColor(); @@ -2517,8 +2517,8 @@ void SwWW8ImplReader::StopApo() pNd->JoinNext(); } - if (m_pSFlyPara->pFlyFmt) - m_pSFlyPara->pFlyFmt->SetFmtAttr(SvxBrushItem(aBg, RES_BACKGROUND)); + if (m_pSFlyPara->pFlyFormat) + m_pSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND)); DeleteAnchorStk(); m_pAnchorStck = m_pSFlyPara->pOldAnchorStck; @@ -2527,12 +2527,12 @@ void SwWW8ImplReader::StopApo() // function, the extension of the SW-fly has to be set // manually as the SW fly has no auto function to adjust the // frame´s size. - if(m_pSFlyPara->nNewNetWidth > MINFLY && m_pSFlyPara->pFlyFmt) // BoxUpWidth ? + if(m_pSFlyPara->nNewNetWidth > MINFLY && m_pSFlyPara->pFlyFormat) // BoxUpWidth ? { long nW = m_pSFlyPara->nNewNetWidth; nW += m_pSFlyPara->nWidth - m_pSFlyPara->nNetWidth; // Rand dazu - m_pSFlyPara->pFlyFmt->SetFmtAttr( - SwFmtFrmSize( m_pSFlyPara->eHeightFix, nW, m_pSFlyPara->nHeight ) ); + m_pSFlyPara->pFlyFormat->SetFormatAttr( + SwFormatFrmSize( m_pSFlyPara->eHeightFix, nW, m_pSFlyPara->nHeight ) ); } /* Word set *no* width meaning its an automatic width. The @@ -2542,24 +2542,24 @@ void SwWW8ImplReader::StopApo() #i27204# Added AutoWidth setting. Left the old CalculateFlySize in place so that if the user unselects autowidth, the width doesn't max out */ - else if( !m_pWFlyPara->nSp28 && m_pSFlyPara->pFlyFmt) + else if( !m_pWFlyPara->nSp28 && m_pSFlyPara->pFlyFormat) { using namespace sw::util; - SfxItemSet aFlySet( m_pSFlyPara->pFlyFmt->GetAttrSet() ); + SfxItemSet aFlySet( m_pSFlyPara->pFlyFormat->GetAttrSet() ); - SwFmtFrmSize aSize(ItemGet<SwFmtFrmSize>(aFlySet, RES_FRM_SIZE)); + SwFormatFrmSize aSize(ItemGet<SwFormatFrmSize>(aFlySet, RES_FRM_SIZE)); aFlySet.ClearItem(RES_FRM_SIZE); CalculateFlySize(aFlySet, m_pSFlyPara->pMainTextPos->nNode, m_pSFlyPara->nWidth); - nNewWidth = ItemGet<SwFmtFrmSize>(aFlySet, RES_FRM_SIZE).GetWidth(); + nNewWidth = ItemGet<SwFormatFrmSize>(aFlySet, RES_FRM_SIZE).GetWidth(); aSize.SetWidth(nNewWidth); aSize.SetWidthSizeType(ATT_VAR_SIZE); - m_pSFlyPara->pFlyFmt->SetFmtAttr(aSize); + m_pSFlyPara->pFlyFormat->SetFormatAttr(aSize); } delete m_pSFlyPara->pMainTextPos, m_pSFlyPara->pMainTextPos = 0; @@ -2569,8 +2569,8 @@ void SwWW8ImplReader::StopApo() } //#i8062# - if (m_pSFlyPara && m_pSFlyPara->pFlyFmt) - m_pFmtOfJustInsertedApo = m_pSFlyPara->pFlyFmt; + if (m_pSFlyPara && m_pSFlyPara->pFlyFormat) + m_pFormatOfJustInsertedApo = m_pSFlyPara->pFlyFormat; DELETEZ( m_pSFlyPara ); DELETEZ( m_pWFlyPara ); @@ -2610,7 +2610,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, if (m_pAktColl) { OSL_ENSURE(rAttr.Which() != RES_FLTR_REDLINE, "redline in style!"); - m_pAktColl->SetFmtAttr(rAttr); + m_pAktColl->SetFormatAttr(rAttr); } else if (m_pAktItemSet) { @@ -2627,13 +2627,13 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, if ( bFirstLineOfStSet ) { const SwNode* pNd = &(m_pPaM->GetPoint()->nNode.GetNode()); - m_aTxtNodesHavingFirstLineOfstSet.insert( pNd ); + m_aTextNodesHavingFirstLineOfstSet.insert( pNd ); } // #i105414# if ( bLeftIndentSet ) { const SwNode* pNd = &(m_pPaM->GetPoint()->nNode.GetNode()); - m_aTxtNodesHavingLeftIndentSet.insert( pNd ); + m_aTextNodesHavingLeftIndentSet.insert( pNd ); } } @@ -2642,17 +2642,17 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, } } -// holt Attribut aus der FmtColl / Stack / Doc -const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich ) +// holt Attribut aus der FormatColl / Stack / Doc +const SfxPoolItem* SwWW8ImplReader::GetFormatAttr( sal_uInt16 nWhich ) { const SfxPoolItem* pRet = 0; if (m_pAktColl) - pRet = &(m_pAktColl->GetFmtAttr(nWhich)); + pRet = &(m_pAktColl->GetFormatAttr(nWhich)); else if (m_pAktItemSet) { pRet = m_pAktItemSet->GetItem(nWhich); if (!pRet) - pRet = m_pStandardFmtColl ? &(m_pStandardFmtColl->GetFmtAttr(nWhich)) : 0; + pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : 0; if (!pRet) pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich); } @@ -2661,19 +2661,19 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich ) pRet = m_pCtrlStck->GetStackAttr(*m_pPaM->GetPoint(), nWhich); if (!pRet) { - if (m_nAktColl < m_vColl.size() && m_vColl[m_nAktColl].pFmt && + if (m_nAktColl < m_vColl.size() && m_vColl[m_nAktColl].pFormat && m_vColl[m_nAktColl].bColl) { - pRet = &(m_vColl[m_nAktColl].pFmt->GetFmtAttr(nWhich)); + pRet = &(m_vColl[m_nAktColl].pFormat->GetFormatAttr(nWhich)); } } if (!pRet) - pRet = m_pStandardFmtColl ? &(m_pStandardFmtColl->GetFmtAttr(nWhich)) : 0; + pRet = m_pStandardFormatColl ? &(m_pStandardFormatColl->GetFormatAttr(nWhich)) : 0; if (!pRet) pRet = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich); } else - pRet = m_pCtrlStck->GetFmtAttr(*m_pPaM->GetPoint(), nWhich); + pRet = m_pCtrlStck->GetFormatAttr(*m_pPaM->GetPoint(), nWhich); return pRet; } @@ -3140,7 +3140,7 @@ void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short n NewAttr( SvxEscapementItem( nEs, nProp, RES_CHRATR_ESCAPEMENT ) ); } -SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion) +SwFrameFormat *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion) { /* For inline graphics and objects word has a hacked in feature to use @@ -3149,25 +3149,25 @@ SwFrmFmt *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion) contains only a single graphic, and if that graphic is anchored as FLY_AS_CHAR and then we can change its anchoring to centered in the line. */ - SwFrmFmt *pRet=0; + SwFrameFormat *pRet=0; SwNodeIndex aBegin(rRegion.Start()->nNode); const sal_Int32 nBegin(rRegion.Start()->nContent.GetIndex()); SwNodeIndex aEnd(rRegion.End()->nNode); const sal_Int32 nEnd(rRegion.End()->nContent.GetIndex()); - const SwTxtNode* pTNd; - const SwTxtAttr* pTFlyAttr; + const SwTextNode* pTNd; + const SwTextAttr* pTFlyAttr; if ( aBegin == aEnd && nBegin == nEnd - 1 && - 0 != (pTNd = aBegin.GetNode().GetTxtNode()) && - 0 != (pTFlyAttr = pTNd->GetTxtAttrForCharAt(nBegin, RES_TXTATR_FLYCNT)) + 0 != (pTNd = aBegin.GetNode().GetTextNode()) && + 0 != (pTFlyAttr = pTNd->GetTextAttrForCharAt(nBegin, RES_TXTATR_FLYCNT)) ) { - const SwFmtFlyCnt& rFly = pTFlyAttr->GetFlyCnt(); - SwFrmFmt *pFlyFmt = rFly.GetFrmFmt(); - if (pFlyFmt && - (FLY_AS_CHAR == pFlyFmt->GetAnchor().GetAnchorId())) + const SwFormatFlyCnt& rFly = pTFlyAttr->GetFlyCnt(); + SwFrameFormat *pFlyFormat = rFly.GetFrameFormat(); + if (pFlyFormat && + (FLY_AS_CHAR == pFlyFormat->GetAnchor().GetAnchorId())) { - pRet = pFlyFmt; + pRet = pFlyFormat; } } return pRet; @@ -3184,21 +3184,21 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement() */ bool bIsGraphicPlacementHack = false; sal_uInt16 nPos; - if (m_pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos)) + if (m_pCtrlStck->GetFormatStackAttr(RES_CHRATR_ESCAPEMENT, &nPos)) { SwPaM aRegion(*m_pPaM->GetPoint()); SwFltPosition aMkPos((*m_pCtrlStck)[nPos].m_aMkPos); SwFltPosition aPtPos(*m_pPaM->GetPoint()); - SwFrmFmt *pFlyFmt = 0; + SwFrameFormat *pFlyFormat = 0; if ( SwFltStackEntry::MakeRegion(&m_rDoc,aRegion,false,aMkPos,aPtPos) && - 0 != (pFlyFmt = ContainsSingleInlineGraphic(aRegion)) + 0 != (pFlyFormat = ContainsSingleInlineGraphic(aRegion)) ) { m_pCtrlStck->DeleteAndDestroy(nPos); - pFlyFmt->SetFmtAttr(SwFmtVertOrient(0, text::VertOrientation::CHAR_CENTER, text::RelOrientation::CHAR)); + pFlyFormat->SetFormatAttr(SwFormatVertOrient(0, text::VertOrientation::CHAR_CENTER, text::RelOrientation::CHAR)); bIsGraphicPlacementHack = true; } } @@ -3220,7 +3220,7 @@ void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, sho short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToShort( pData ); sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw const SvxFontHeightItem* pF - = static_cast<const SvxFontHeightItem*>(GetFmtAttr(RES_CHRATR_FONTSIZE)); + = static_cast<const SvxFontHeightItem*>(GetFormatAttr(RES_CHRATR_FONTSIZE)); OSL_ENSURE(pF, "Expected to have the fontheight available here"); // #i59022: Check ensure nHeight != 0. Div by zero otherwise. @@ -3326,7 +3326,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData } } -void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen ) +void SwWW8ImplReader::Read_TextColor( sal_uInt16, const sal_uInt8* pData, short nLen ) { //Has newer colour variant, ignore this old variant if (!m_bVer67 && m_pPlcxMan && m_pPlcxMan->GetChpPLCF()->HasSprm(NS_sprm::LN_CCv)) @@ -3343,11 +3343,11 @@ void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short n NewAttr( SvxColorItem(Color(GetCol(b)), RES_CHRATR_COLOR)); if (m_pAktColl && m_pStyles) - m_pStyles->bTxtColChanged = true; + m_pStyles->bTextColChanged = true; } } -void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen) +void SwWW8ImplReader::Read_TextForeColor(sal_uInt16, const sal_uInt8* pData, short nLen) { if( nLen < 0 ) m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_CHRATR_COLOR ); @@ -3356,7 +3356,7 @@ void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, shor Color aColor(msfilter::util::BGRToRGB(SVBT32ToUInt32(pData))); NewAttr(SvxColorItem(aColor, RES_CHRATR_COLOR)); if (m_pAktColl && m_pStyles) - m_pStyles->bTxtColChanged = true; + m_pStyles->bTextColChanged = true; } } @@ -3381,7 +3381,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh = static_cast<SvxUnderlineItem *>(aSet.Get( RES_CHRATR_UNDERLINE, false ).Clone()); if(pUnderline){ pUnderline->SetColor( Color( msfilter::util::BGRToRGB(SVBT32ToUInt32(pData)) ) ); - m_pAktColl->SetFmtAttr( *pUnderline ); + m_pAktColl->SetFormatAttr( *pUnderline ); delete pUnderline; } } @@ -3766,12 +3766,12 @@ void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen { if( nLen < 0 ){ // Ende des Attributes m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_TXTATR_CHARFMT ); - m_nCharFmt = -1; + m_nCharFormat = -1; return; } sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!) - if( nId >= m_vColl.size() || !m_vColl[nId].pFmt // ungueltige Id ? + if( nId >= m_vColl.size() || !m_vColl[nId].pFormat // ungueltige Id ? || m_vColl[nId].bColl ) // oder Para-Style ? return; // dann ignorieren @@ -3784,8 +3784,8 @@ void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen return; } - NewAttr( SwFmtCharFmt( static_cast<SwCharFmt*>(m_vColl[nId].pFmt) ) ); - m_nCharFmt = (short) nId; + NewAttr( SwFormatCharFormat( static_cast<SwCharFormat*>(m_vColl[nId].pFormat) ) ); + m_nCharFormat = (short) nId; } /* @@ -3828,14 +3828,14 @@ void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, shor NewAttr( SvxBrushItem( aSh.aColor, RES_CHRATR_BACKGROUND )); // Add a marker to the grabbag indicating that character background was imported from MSO shading - SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFmtAttr(RES_CHRATR_GRABBAG))); + SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFormatAttr(RES_CHRATR_GRABBAG))); std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag(); rMap.insert(std::pair<OUString, com::sun::star::uno::Any>("CharShadingMarker",uno::makeAny(true))); NewAttr(aGrabBag); } } -void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen ) +void SwWW8ImplReader::Read_TextBackColor(sal_uInt16, const sal_uInt8* pData, short nLen ) { if( nLen <= 0 ) { @@ -3850,7 +3850,7 @@ void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, shor NewAttr(SvxBrushItem(aColour, RES_CHRATR_BACKGROUND)); // Add a marker to the grabbag indicating that character background was imported from MSO shading - SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFmtAttr(RES_CHRATR_GRABBAG))); + SfxGrabBagItem aGrabBag = *(static_cast<const SfxGrabBagItem*>(GetFormatAttr(RES_CHRATR_GRABBAG))); std::map<OUString, com::sun::star::uno::Any>& rMap = aGrabBag.GetGrabBag(); rMap.insert(std::pair<OUString, com::sun::star::uno::Any>("CharShadingMarker",uno::makeAny(true))); NewAttr(aGrabBag); @@ -3882,9 +3882,9 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_LINENUMBER ); return; } - SwFmtLineNumber aLN; - if (const SwFmtLineNumber* pLN - = static_cast<const SwFmtLineNumber*>(GetFmtAttr(RES_LINENUMBER))) + SwFormatLineNumber aLN; + if (const SwFormatLineNumber* pLN + = static_cast<const SwFormatLineNumber*>(GetFormatAttr(RES_LINENUMBER))) { aLN.SetStartValue( pLN->GetStartValue() ); } @@ -3917,29 +3917,29 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe short nPara = SVBT16ToShort( pData ); SvxLRSpaceItem aLR( RES_LR_SPACE ); - const SfxPoolItem* pLR = GetFmtAttr(RES_LR_SPACE); + const SfxPoolItem* pLR = GetFormatAttr(RES_LR_SPACE); if( pLR ) aLR = *static_cast<const SvxLRSpaceItem*>(pLR); // Fix the regression issue: #i99822#: Discussion? // Since the list level formatting doesn't apply into paragraph style // for list levels of mode LABEL_ALIGNMENT.(see ww8par3.cxx - // W8ImplReader::RegisterNumFmtOnTxtNode). + // W8ImplReader::RegisterNumFormatOnTextNode). // Need to apply the list format to the paragraph here. - SwTxtNode* pTxtNode = m_pPaM->GetNode().GetTxtNode(); - if( pTxtNode && pTxtNode->AreListLevelIndentsApplicable() ) + SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode(); + if( pTextNode && pTextNode->AreListLevelIndentsApplicable() ) { - SwNumRule * pNumRule = pTxtNode->GetNumRule(); + SwNumRule * pNumRule = pTextNode->GetNumRule(); if( pNumRule ) { - sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTxtNode->GetActualListLevel()); - const SwNumFmt* pFmt = pNumRule->GetNumFmt( nLvl ); - if ( pFmt && pFmt->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) + sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTextNode->GetActualListLevel()); + const SwNumFormat* pFormat = pNumRule->GetNumFormat( nLvl ); + if ( pFormat && pFormat->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT ) { - aLR.SetTxtLeft( pFmt->GetIndentAt() ); - aLR.SetTxtFirstLineOfst( static_cast<short>(pFmt->GetFirstLineIndent()) ); + aLR.SetTextLeft( pFormat->GetIndentAt() ); + aLR.SetTextFirstLineOfst( static_cast<short>(pFormat->GetFirstLineIndent()) ); // make paragraph have hard-set indent attributes - pTxtNode->SetAttr( aLR ); + pTextNode->SetAttr( aLR ); } } } @@ -3979,7 +3979,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe case 17: case 0x840F: case 0x845E: - aLR.SetTxtLeft( nPara ); + aLR.SetTextLeft( nPara ); if (m_pAktColl && m_nAktColl < m_vColl.size()) { m_vColl[m_nAktColl].bListReleventIndentSet = true; @@ -4007,28 +4007,28 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe if (pIsZeroed && *pIsZeroed == 0) { const SvxLRSpaceItem &rLR = - ItemGet<SvxLRSpaceItem>(*(m_vColl[m_nAktColl].pFmt), + ItemGet<SvxLRSpaceItem>(*(m_vColl[m_nAktColl].pFormat), RES_LR_SPACE); - nPara = nPara - rLR.GetTxtFirstLineOfst(); + nPara = nPara - rLR.GetTextFirstLineOfst(); } } - aLR.SetTxtFirstLineOfst(nPara); + aLR.SetTextFirstLineOfst(nPara); if (!m_pAktColl) { - if (const SwTxtNode* pNode = m_pPaM->GetNode().GetTxtNode()) + if (const SwTextNode* pNode = m_pPaM->GetNode().GetTextNode()) { - if ( const SwNumFmt *pNumFmt = GetNumFmtFromTxtNode(*pNode) ) + if ( const SwNumFormat *pNumFormat = GetNumFormatFromTextNode(*pNode) ) { if (!lcl_HasExplicitLeft(m_pPlcxMan, m_bVer67)) { - aLR.SetTxtLeft(pNumFmt->GetIndentAt()); + aLR.SetTextLeft(pNumFormat->GetIndentAt()); // If have not explicit left, set number format list tab position is doc default tab const SvxTabStopItem *pDefaultStopItem = static_cast<const SvxTabStopItem *>(m_rDoc.GetAttrPool().GetPoolDefaultItem(RES_PARATR_TABSTOP)); if ( pDefaultStopItem && pDefaultStopItem->Count() > 0 ) - const_cast<SwNumFmt*>(pNumFmt)->SetListtabPos( ((SvxTabStop&)(*pDefaultStopItem)[0]).GetTabPos() ); + const_cast<SwNumFormat*>(pNumFormat)->SetListtabPos( ((SvxTabStop&)(*pDefaultStopItem)[0]).GetTabPos() ); } } } @@ -4102,7 +4102,7 @@ void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short if( n>200 ) n = 200; // SW_UI-Maximum aLSpc.SetPropLineSpace( (const sal_uInt8)n ); const SvxFontHeightItem* pH = static_cast<const SvxFontHeightItem*>( - GetFmtAttr( RES_CHRATR_FONTSIZE )); + GetFormatAttr( RES_CHRATR_FONTSIZE )); nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 ); } else // Fixed / Minimum @@ -4136,7 +4136,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, sh if (*pData) { - SvxULSpaceItem aUL(*static_cast<const SvxULSpaceItem*>(GetFmtAttr(RES_UL_SPACE))); + SvxULSpaceItem aUL(*static_cast<const SvxULSpaceItem*>(GetFormatAttr(RES_UL_SPACE))); aUL.SetUpper(GetParagraphAutoSpace(m_pWDop->fDontUseHTMLAutoSpacing)); NewAttr(aUL); if (m_pAktColl && m_nAktColl < m_vColl.size()) @@ -4163,7 +4163,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, sho if (*pData) { - SvxULSpaceItem aUL(*static_cast<const SvxULSpaceItem*>(GetFmtAttr(RES_UL_SPACE))); + SvxULSpaceItem aUL(*static_cast<const SvxULSpaceItem*>(GetFormatAttr(RES_UL_SPACE))); aUL.SetLower(GetParagraphAutoSpace(m_pWDop->fDontUseHTMLAutoSpacing)); NewAttr(aUL); if (m_pAktColl && m_nAktColl < m_vColl.size()) @@ -4205,7 +4205,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe if( nPara < 0 ) nPara = -nPara; - SvxULSpaceItem aUL( *static_cast<const SvxULSpaceItem*>(GetFmtAttr( RES_UL_SPACE ))); + SvxULSpaceItem aUL( *static_cast<const SvxULSpaceItem*>(GetFormatAttr( RES_UL_SPACE ))); switch( nId ) { @@ -4233,7 +4233,7 @@ void SwWW8ImplReader::Read_ParaContextualSpacing( sal_uInt16, const sal_uInt8* p m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_UL_SPACE ); return; } - SvxULSpaceItem aUL( *static_cast<const SvxULSpaceItem*>(GetFmtAttr( RES_UL_SPACE ))); + SvxULSpaceItem aUL( *static_cast<const SvxULSpaceItem*>(GetFormatAttr( RES_UL_SPACE ))); aUL.SetContextValue(*pData); NewAttr( aUL ); } @@ -4302,7 +4302,7 @@ bool SwWW8ImplReader::IsRightToLeft() else { const SvxFrameDirectionItem* pItem= - static_cast<const SvxFrameDirectionItem*>(GetFmtAttr(RES_FRAMEDIR)); + static_cast<const SvxFrameDirectionItem*>(GetFormatAttr(RES_FRAMEDIR)); if (pItem && (pItem->GetValue() == FRMDIR_HORI_RIGHT_TOP)) bRTL = true; } @@ -4400,7 +4400,7 @@ void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short n else { nLang = static_cast<const SvxLanguageItem *>( - GetFmtAttr(RES_CHRATR_CJK_LANGUAGE))->GetLanguage(); + GetFormatAttr(RES_CHRATR_CJK_LANGUAGE))->GetLanguage(); } sal_uInt16 nVal; @@ -4465,7 +4465,7 @@ void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short // the actual value must be searched over the stack / template const SvxCharReliefItem* pOld = static_cast<const SvxCharReliefItem*>( - GetFmtAttr( RES_CHRATR_RELIEF )); + GetFormatAttr( RES_CHRATR_RELIEF )); FontRelief nNewValue = 0x854 == nId ? RELIEF_ENGRAVED : ( 0x858 == nId ? RELIEF_EMBOSSED : RELIEF_NONE ); @@ -4479,7 +4479,7 @@ void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short } } -void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen) +void SwWW8ImplReader::Read_TextAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen) { if (nLen < 0) m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_CHRATR_BLINK); @@ -4735,7 +4735,7 @@ void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8*, short nLen) // werden, sonst ist kein hartes Ausschalten von Style-Attrs // moeglich const SvxBoxItem* pBox - = static_cast<const SvxBoxItem*>(GetFmtAttr( RES_BOX )); + = static_cast<const SvxBoxItem*>(GetFormatAttr( RES_BOX )); SvxBoxItem aBox(RES_BOX); if (pBox) aBox = *pBox; @@ -4782,7 +4782,7 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, sh else { const SvxBoxItem* pBox - = static_cast<const SvxBoxItem*>(GetFmtAttr( RES_CHRATR_BOX )); + = static_cast<const SvxBoxItem*>(GetFormatAttr( RES_CHRATR_BOX )); if( pBox ) { SvxBoxItem aBoxItem(RES_CHRATR_BOX); @@ -4819,7 +4819,7 @@ void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, shor else { SvxHyphenZoneItem aAttr( - *static_cast<const SvxHyphenZoneItem*>(GetFmtAttr( RES_PARATR_HYPHENZONE ) )); + *static_cast<const SvxHyphenZoneItem*>(GetFormatAttr( RES_PARATR_HYPHENZONE ) )); aAttr.SetHyphen( 0 == *pData ); // sic ! @@ -4905,7 +4905,7 @@ void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short if( nLen <= 0 ) m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_PARATR_SPLIT ); else - NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) ); + NewAttr( SvxFormatSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) ); } void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen ) @@ -4913,7 +4913,7 @@ void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short if( nLen <= 0 ) m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_KEEP ); else - NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) ); + NewAttr( SvxFormatKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) ); } void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen ) @@ -4921,7 +4921,7 @@ void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, shor if( nLen <= 0 ) m_pCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_BREAK ); else - NewAttr( SvxFmtBreakItem( + NewAttr( SvxFormatBreakItem( ( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) ); } @@ -4986,8 +4986,8 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes) static const FNReadRecordExt aWwSprmTab[] = { - /* 0 (256) */ &SwWW8ImplReader::Read_Ftn, // FootNote - /* 1 (257) */ &SwWW8ImplReader::Read_Ftn, // EndNote + /* 0 (256) */ &SwWW8ImplReader::Read_Footnote, // FootNote + /* 1 (257) */ &SwWW8ImplReader::Read_Footnote, // EndNote /* 2 (258) */ &SwWW8ImplReader::Read_Field, // Feld /* 3 (259) */ &SwWW8ImplReader::Read_Book, // Bookmark /* 4 (260) */ &SwWW8ImplReader::Read_And, // Annotation @@ -5013,8 +5013,8 @@ void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId) static const FNReadRecordExt aWwSprmTab[] = { - /* 0 (256) */ &SwWW8ImplReader::End_Ftn, // FootNote - /* 1 (257) */ &SwWW8ImplReader::End_Ftn, // EndNote + /* 0 (256) */ &SwWW8ImplReader::End_Footnote, // FootNote + /* 1 (257) */ &SwWW8ImplReader::End_Footnote, // EndNote /* 2 (258) */ &SwWW8ImplReader::End_Field, // Feld /* 3 (259) */ 0, // Bookmark /* 4 (260) */ 0 // Annotation @@ -5165,7 +5165,7 @@ const wwSprmDispatcher *GetWW2SprmDispatcher() {71, &SwWW8ImplReader::Read_Kern}, //"sprmCDxaSpace", //chp.dxaSpace dxa word {72, &SwWW8ImplReader::Read_Language}, //"sprmCLid", chp.lid LID word - {73, &SwWW8ImplReader::Read_TxtColor}, //"sprmCIco", chp.ico ico byte + {73, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco", chp.ico ico byte {74, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps", chp.hps hps word! {75, 0}, //"sprmCHpsInc", chp.hps byte {76, &SwWW8ImplReader::Read_SubSuperProp}, //"sprmCHpsPos", chp.hpsPos @@ -5178,7 +5178,7 @@ const wwSprmDispatcher *GetWW2SprmDispatcher() {81, &SwWW8ImplReader::Read_BoldBiDiUsw}, //sprmCFItalicBi {82, &SwWW8ImplReader::Read_FontCode}, //sprmCFtcBi {83, &SwWW8ImplReader::Read_Language}, //sprmClidBi - {84, &SwWW8ImplReader::Read_TxtColor}, //sprmCIcoBi + {84, &SwWW8ImplReader::Read_TextColor}, //sprmCIcoBi {85, &SwWW8ImplReader::Read_FontSize}, //sprmCHpsBi {86, 0}, //sprmCFBiDi {87, 0}, //sprmCFDiacColor @@ -5305,8 +5305,8 @@ const wwSprmDispatcher *GetWW6SprmDispatcher() //chp.fRMarkDel 1 or 0 bit {66, &SwWW8ImplReader::Read_CFRMark}, //"sprmCFRMark", chp.fRMark //1 or 0 bit - {67, &SwWW8ImplReader::Read_FldVanish}, //"sprmCFFldVanish", - //chp.fFldVanish 1 or 0 bit + {67, &SwWW8ImplReader::Read_FieldVanish}, //"sprmCFFieldVanish", + //chp.fFieldVanish 1 or 0 bit {68, &SwWW8ImplReader::Read_PicLoc}, //"sprmCPicLocation", //chp.fcPic and chp.fSpec {69, 0}, //"sprmCIbstRMark", @@ -5363,7 +5363,7 @@ const wwSprmDispatcher *GetWW6SprmDispatcher() {96, &SwWW8ImplReader::Read_Kern}, //"sprmCDxaSpace", //chp.dxaSpace dxa word {97, &SwWW8ImplReader::Read_Language}, //"sprmCLid", chp.lid LID word - {98, &SwWW8ImplReader::Read_TxtColor}, //"sprmCIco", chp.ico ico byte + {98, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco", chp.ico ico byte {99, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps", chp.hps hps word! {100, 0}, //"sprmCHpsInc", chp.hps byte {101, &SwWW8ImplReader::Read_SubSuperProp}, //"sprmCHpsPos", chp.hpsPos @@ -5392,7 +5392,7 @@ const wwSprmDispatcher *GetWW6SprmDispatcher() {112, &SwWW8ImplReader::Read_FontCode}, //ww7 CJK font {113, &SwWW8ImplReader::Read_FontCode}, //ww7 rtl font {114, &SwWW8ImplReader::Read_Language}, //ww7 lid - {115, &SwWW8ImplReader::Read_TxtColor}, //ww7 rtl colour ? + {115, &SwWW8ImplReader::Read_TextColor}, //ww7 rtl colour ? {116, &SwWW8ImplReader::Read_FontSize}, {117, &SwWW8ImplReader::Read_Special}, //"sprmCFSpec", chp.fSpec 1 //or 0 bit @@ -5727,8 +5727,8 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() //chp.fRMarkDel;1 or 0;bit; {0x0801, &SwWW8ImplReader::Read_CFRMark}, //"sprmCFRMark" chp.fRMark;1 //or 0;bit; - {0x0802, &SwWW8ImplReader::Read_FldVanish}, //"sprmCFFldVanish" - //chp.fFldVanish;1 or 0;bit; + {0x0802, &SwWW8ImplReader::Read_FieldVanish}, //"sprmCFFieldVanish" + //chp.fFieldVanish;1 or 0;bit; {0x6A03, &SwWW8ImplReader::Read_PicLoc}, //"sprmCPicLocation" chp.fcPic //and chp.fSpec;variable //length, length recorded is @@ -5800,7 +5800,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() //dxa;word; {0x4A41, &SwWW8ImplReader::Read_Language}, //"sprmCLid" ;only used //internally never stored;word; - {0x2A42, &SwWW8ImplReader::Read_TxtColor}, //"sprmCIco" chp.ico;ico;byte; + {0x2A42, &SwWW8ImplReader::Read_TextColor}, //"sprmCIco" chp.ico;ico;byte; {0x4A43, &SwWW8ImplReader::Read_FontSize}, //"sprmCHps" chp.hps;hps;byte; {0x2A44, 0}, //"sprmCHpsInc" chp.hps;byte; {0x4845, &SwWW8ImplReader::Read_SubSuperProp},//"sprmCHpsPos" chp.hpsPos; @@ -5860,7 +5860,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() //recorded as 7 bytes; {0x0858, &SwWW8ImplReader::Read_Relief}, //"sprmCFEmboss" chp.fEmboss; //1 or 0;bit; - {0x2859, &SwWW8ImplReader::Read_TxtAnim}, //"sprmCSfxText" chp.sfxtText; + {0x2859, &SwWW8ImplReader::Read_TextAnim}, //"sprmCSfxText" chp.sfxtText; //text animation;byte; {0x085A, &SwWW8ImplReader::Read_Bidi}, //"sprmCFBiDi" {0x085B, 0}, //"sprmCFDiacColor" @@ -5870,10 +5870,10 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() {0x485F, &SwWW8ImplReader::Read_Language}, //"sprmCLidBi" //0x4A60, ? ? ?, //"sprmCIcoBi", {0x4A61, &SwWW8ImplReader::Read_FontSize}, //"sprmCHpsBi" - {0xCA62, 0}, //"sprmCDispFldRMark" - //chp.fDispFldRMark, - //chp.ibstDispFldRMark, - //chp.dttmDispFldRMark ; + {0xCA62, 0}, //"sprmCDispFieldRMark" + //chp.fDispFieldRMark, + //chp.ibstDispFieldRMark, + //chp.dttmDispFieldRMark ; //Complex;variable length //always recorded as 39 bytes; {0x4863, 0}, //"sprmCIbstRMarkDel" @@ -6136,14 +6136,14 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() // subtable "sprmPFTtp" {0x6815, 0}, //undocumented {0x6816, 0}, //undocumented - {NS_sprm::LN_CCv, &SwWW8ImplReader::Read_TxtForeColor}, + {NS_sprm::LN_CCv, &SwWW8ImplReader::Read_TextForeColor}, {0x6877, &SwWW8ImplReader::Read_UnderlineColor}, {0xC64D, &SwWW8ImplReader::Read_ParaBackColor}, {0x6467, 0}, //undocumented {0xF617, 0}, //undocumented {0xD660, 0}, //undocumented {0xD670, 0}, //undocumented - {0xCA71, &SwWW8ImplReader::Read_TxtBackColor},//"sprmCShd" + {0xCA71, &SwWW8ImplReader::Read_TextBackColor},//"sprmCShd" {0x303C, 0}, //undocumented {0x245B, &SwWW8ImplReader::Read_ParaAutoBefore},//undocumented, para {0x245C, &SwWW8ImplReader::Read_ParaAutoAfter},//undocumented, para diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 0afbef8749c1..0446bfc69aea 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -167,7 +167,7 @@ const wwSprmSearcher *wwSprmParser::GetWW2SprmSearcher() { 52, { 0, L_FIX} }, // "?sprmPRuler 52" { 53, { 1, L_FIX} }, // "sprmCFStrikeRM" chp.fRMarkDel 1 or 0 bit { 54, { 1, L_FIX} }, // "sprmCFRMark" chp.fRMark 1 or 0 bit - { 55, { 1, L_FIX} }, // "sprmCFFldVanish" chp.fFldVanish 1 or 0 bit + { 55, { 1, L_FIX} }, // "sprmCFFieldVanish" chp.fFieldVanish 1 or 0 bit { 57, { 0, L_VAR} }, // "sprmCDefault" whole CHP { 58, { 0, L_FIX} }, // "sprmCPlain" whole CHP { 60, { 1, L_FIX} }, // "sprmCFBold" chp.fBold 0,1, 128, or 129 @@ -319,7 +319,7 @@ const wwSprmSearcher *wwSprmParser::GetWW6SprmSearcher() { 64, { 0, L_VAR} }, // rtl property ? { 65, { 1, L_FIX} }, // "sprmCFStrikeRM" chp.fRMarkDel 1 or 0 bit { 66, { 1, L_FIX} }, // "sprmCFRMark" chp.fRMark 1 or 0 bit - { 67, { 1, L_FIX} }, // "sprmCFFldVanish" chp.fFldVanish 1 or 0 bit + { 67, { 1, L_FIX} }, // "sprmCFFieldVanish" chp.fFieldVanish 1 or 0 bit { 68, { 0, L_VAR} }, // "sprmCPicLocation" chp.fcPic and chp.fSpec { 69, { 2, L_FIX} }, // "sprmCIbstRMark" chp.ibstRMark index into sttbRMark { 70, { 4, L_FIX} }, // "sprmCDttmRMark" chp.dttm DTTM long @@ -534,7 +534,7 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher() {0x2448, { 1, L_FIX} }, // "sprmPFAdjustRight" pap.fAdjustRight;1 or 0;byte; {0x0800, { 1, L_FIX} }, // "sprmCFRMarkDel" chp.fRMarkDel;1 or 0;bit; {0x0801, { 1, L_FIX} }, // "sprmCFRMark" chp.fRMark;1 or 0;bit; - {0x0802, { 1, L_FIX} }, // "sprmCFFldVanish" chp.fFldVanish;1 or 0;bit; + {0x0802, { 1, L_FIX} }, // "sprmCFFieldVanish" chp.fFieldVanish;1 or 0;bit; {0x6A03, { 4, L_FIX} }, // "sprmCPicLocation" chp.fcPic and chp.fSpec; {0x4804, { 2, L_FIX} }, // "sprmCIbstRMark" chp.ibstRMark;index into // sttbRMark @@ -613,8 +613,8 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher() {0x485F, { 2, L_FIX} }, // "sprmCLidBi" ;;; {0x4A60, { 1, L_FIX} }, // "sprmCIcoBi" ;;; {0x4A61, { 2, L_FIX} }, // "sprmCHpsBi" ;;; - {0xCA62, { 0, L_VAR} }, // "sprmCDispFldRMark" chp.fDispFldRMark, - // chp.ibstDispFldRMark, chp.dttmDispFldRMark ; + {0xCA62, { 0, L_VAR} }, // "sprmCDispFieldRMark" chp.fDispFieldRMark, + // chp.ibstDispFieldRMark, chp.dttmDispFieldRMark ; {0x4863, { 2, L_FIX} }, // "sprmCIbstRMarkDel" chp.ibstRMarkDel;index into // sttbRMark;short; {NS_sprm::LN_CDttmRMarkDel, { 4, L_FIX} }, // chp.dttmRMarkDel;DTTM;long; @@ -1069,7 +1069,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p) 0x2436,0x2437,0x2438,0x0000, // sprmNoop, sprmPISnapBaseLine, sprmNoop, sprmNoop 0x0000,0x243B,0x000,0x0000, - // sprmNoop, sprmCFStrikeRM, sprmCFRMark, sprmCFFldVanish + // sprmNoop, sprmCFStrikeRM, sprmCFRMark, sprmCFFieldVanish 0x0000,0x0800,0x0801,0x0802, // sprmNoop, sprmNoop, sprmNoop, sprmCFData 0x0000,0x0000,0x0000,0x0806, @@ -1612,13 +1612,13 @@ void WW8ScannerBase::DeletePieceTable() } } -WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, +WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, WW8Fib* pWwFib ) : pWw8Fib(pWwFib), pMainFdoa(0), pHdFtFdoa(0), pMainTxbx(0), pMainTxbxBkd(0), pHdFtTxbx(0), pHdFtTxbxBkd(0), pMagicTables(0), pSubdocs(0), pExtendedAtrds(0), pPieceGrpprls(0) { - pPiecePLCF = OpenPieceTable( pTblSt, pWw8Fib ); // Complex + pPiecePLCF = OpenPieceTable( pTableSt, pWw8Fib ); // Complex if( pPiecePLCF ) { pPieceIter = new WW8PLCFpcd_Iter( *pPiecePLCF ); @@ -1635,38 +1635,38 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, } // pChpPLCF and pPapPLCF may NOT be created before pPLCFx_PCD !! - pChpPLCF = new WW8PLCFx_Cp_FKP( pSt, pTblSt, pDataSt, *this, CHP ); // CHPX - pPapPLCF = new WW8PLCFx_Cp_FKP( pSt, pTblSt, pDataSt, *this, PAP ); // PAPX + pChpPLCF = new WW8PLCFx_Cp_FKP( pSt, pTableSt, pDataSt, *this, CHP ); // CHPX + pPapPLCF = new WW8PLCFx_Cp_FKP( pSt, pTableSt, pDataSt, *this, PAP ); // PAPX - pSepPLCF = new WW8PLCFx_SEPX( pSt, pTblSt, *pWwFib, 0 ); // SEPX + pSepPLCF = new WW8PLCFx_SEPX( pSt, pTableSt, *pWwFib, 0 ); // SEPX // Footnotes - pFtnPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->GetFIBVersion(), 0, - pWwFib->fcPlcffndRef, pWwFib->lcbPlcffndRef, pWwFib->fcPlcffndTxt, - pWwFib->lcbPlcffndTxt, 2 ); + pFootnotePLCF = new WW8PLCFx_SubDoc( pTableSt, pWwFib->GetFIBVersion(), 0, + pWwFib->fcPlcffndRef, pWwFib->lcbPlcffndRef, pWwFib->fcPlcffndText, + pWwFib->lcbPlcffndText, 2 ); // Endnotes - pEdnPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->GetFIBVersion(), 0, - pWwFib->fcPlcfendRef, pWwFib->lcbPlcfendRef, pWwFib->fcPlcfendTxt, - pWwFib->lcbPlcfendTxt, 2 ); + pEdnPLCF = new WW8PLCFx_SubDoc( pTableSt, pWwFib->GetFIBVersion(), 0, + pWwFib->fcPlcfendRef, pWwFib->lcbPlcfendRef, pWwFib->fcPlcfendText, + pWwFib->lcbPlcfendText, 2 ); // Comments - pAndPLCF = new WW8PLCFx_SubDoc( pTblSt, pWwFib->GetFIBVersion(), 0, - pWwFib->fcPlcfandRef, pWwFib->lcbPlcfandRef, pWwFib->fcPlcfandTxt, - pWwFib->lcbPlcfandTxt, IsSevenMinus(pWwFib->GetFIBVersion()) ? 20 : 30); + pAndPLCF = new WW8PLCFx_SubDoc( pTableSt, pWwFib->GetFIBVersion(), 0, + pWwFib->fcPlcfandRef, pWwFib->lcbPlcfandRef, pWwFib->fcPlcfandText, + pWwFib->lcbPlcfandText, IsSevenMinus(pWwFib->GetFIBVersion()) ? 20 : 30); // Fields Main Text - pFldPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_MAINTEXT); + pFieldPLCF = new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_MAINTEXT); // Fields Header / Footer - pFldHdFtPLCF= new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_HDFT); + pFieldHdFtPLCF= new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_HDFT); // Fields Footnote - pFldFtnPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_FTN); + pFieldFootnotePLCF = new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_FTN); // Fields Endnote - pFldEdnPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_EDN); + pFieldEdnPLCF = new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_EDN); // Fields Comments - pFldAndPLCF = new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_AND); + pFieldAndPLCF = new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_AND); // Fields in Textboxes in Main Text - pFldTxbxPLCF= new WW8PLCFx_FLD(pTblSt, *pWwFib, MAN_TXBX); + pFieldTxbxPLCF= new WW8PLCFx_FLD(pTableSt, *pWwFib, MAN_TXBX); // Fields in Textboxes in Header / Footer - pFldTxbxHdFtPLCF = new WW8PLCFx_FLD(pTblSt,*pWwFib,MAN_TXBX_HDFT); + pFieldTxbxHdFtPLCF = new WW8PLCFx_FLD(pTableSt,*pWwFib,MAN_TXBX_HDFT); // Note: 6 stands for "6 OR 7", 7 stands for "ONLY 7" switch( pWw8Fib->nVersion ) @@ -1675,62 +1675,62 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, case 7: if( pWwFib->fcPlcfdoaMom && pWwFib->lcbPlcfdoaMom ) { - pMainFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfdoaMom, + pMainFdoa = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfdoaMom, pWwFib->lcbPlcfdoaMom, 6 ); } if( pWwFib->fcPlcfdoaHdr && pWwFib->lcbPlcfdoaHdr ) { - pHdFtFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfdoaHdr, + pHdFtFdoa = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfdoaHdr, pWwFib->lcbPlcfdoaHdr, 6 ); } break; case 8: if( pWwFib->fcPlcfspaMom && pWwFib->lcbPlcfspaMom ) { - pMainFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfspaMom, + pMainFdoa = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfspaMom, pWwFib->lcbPlcfspaMom, 26 ); } if( pWwFib->fcPlcfspaHdr && pWwFib->lcbPlcfspaHdr ) { - pHdFtFdoa = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfspaHdr, + pHdFtFdoa = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfspaHdr, pWwFib->lcbPlcfspaHdr, 26 ); } // PLCF for TextBox break-descriptors in the main text if( pWwFib->fcPlcftxbxBkd && pWwFib->lcbPlcftxbxBkd ) { - pMainTxbxBkd = new WW8PLCFspecial( pTblSt, + pMainTxbxBkd = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcftxbxBkd, pWwFib->lcbPlcftxbxBkd, 0); } // PLCF for TextBox break-descriptors in Header/Footer range if( pWwFib->fcPlcfHdrtxbxBkd && pWwFib->lcbPlcfHdrtxbxBkd ) { - pHdFtTxbxBkd = new WW8PLCFspecial( pTblSt, + pHdFtTxbxBkd = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfHdrtxbxBkd, pWwFib->lcbPlcfHdrtxbxBkd, 0); } // Sub table cp positions if (pWwFib->fcPlcfTch && pWwFib->lcbPlcfTch) { - pMagicTables = new WW8PLCFspecial( pTblSt, + pMagicTables = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfTch, pWwFib->lcbPlcfTch, 4); } // Sub document cp positions if (pWwFib->fcPlcfwkb && pWwFib->lcbPlcfwkb) { - pSubdocs = new WW8PLCFspecial( pTblSt, + pSubdocs = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfwkb, pWwFib->lcbPlcfwkb, 12); } // Extended ATRD if (pWwFib->fcAtrdExtra && pWwFib->lcbAtrdExtra) { - sal_Size nOldPos = pTblSt->Tell(); - if (checkSeek(*pTblSt, pWwFib->fcAtrdExtra) && (pTblSt->remainingSize() >= pWwFib->lcbAtrdExtra)) + sal_Size nOldPos = pTableSt->Tell(); + if (checkSeek(*pTableSt, pWwFib->fcAtrdExtra) && (pTableSt->remainingSize() >= pWwFib->lcbAtrdExtra)) { pExtendedAtrds = new sal_uInt8[pWwFib->lcbAtrdExtra]; - pWwFib->lcbAtrdExtra = pTblSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra); + pWwFib->lcbAtrdExtra = pTableSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra); } else pWwFib->lcbAtrdExtra = 0; - pTblSt->Seek(nOldPos); + pTableSt->Seek(nOldPos); } break; @@ -1741,21 +1741,21 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, // PLCF for TextBox stories in main text sal_uInt32 nLenTxBxS = (8 > pWw8Fib->nVersion) ? 0 : 22; - if( pWwFib->fcPlcftxbxTxt && pWwFib->lcbPlcftxbxTxt ) + if( pWwFib->fcPlcftxbxText && pWwFib->lcbPlcftxbxText ) { - pMainTxbx = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcftxbxTxt, - pWwFib->lcbPlcftxbxTxt, nLenTxBxS ); + pMainTxbx = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcftxbxText, + pWwFib->lcbPlcftxbxText, nLenTxBxS ); } // PLCF for TextBox stories in Header/Footer range - if( pWwFib->fcPlcfHdrtxbxTxt && pWwFib->lcbPlcfHdrtxbxTxt ) + if( pWwFib->fcPlcfHdrtxbxText && pWwFib->lcbPlcfHdrtxbxText ) { - pHdFtTxbx = new WW8PLCFspecial( pTblSt, pWwFib->fcPlcfHdrtxbxTxt, - pWwFib->lcbPlcfHdrtxbxTxt, nLenTxBxS ); + pHdFtTxbx = new WW8PLCFspecial( pTableSt, pWwFib->fcPlcfHdrtxbxText, + pWwFib->lcbPlcfHdrtxbxText, nLenTxBxS ); } - pBook = new WW8PLCFx_Book(pTblSt, *pWwFib); - pAtnBook = new WW8PLCFx_AtnBook(pTblSt, *pWwFib); + pBook = new WW8PLCFx_Book(pTableSt, *pWwFib); + pAtnBook = new WW8PLCFx_AtnBook(pTableSt, *pWwFib); } WW8ScannerBase::~WW8ScannerBase() @@ -1767,15 +1767,15 @@ WW8ScannerBase::~WW8ScannerBase() delete pPiecePLCF; delete pAtnBook; delete pBook; - delete pFldEdnPLCF; - delete pFldFtnPLCF; - delete pFldAndPLCF; - delete pFldHdFtPLCF; - delete pFldPLCF; - delete pFldTxbxPLCF; - delete pFldTxbxHdFtPLCF; + delete pFieldEdnPLCF; + delete pFieldFootnotePLCF; + delete pFieldAndPLCF; + delete pFieldHdFtPLCF; + delete pFieldPLCF; + delete pFieldTxbxPLCF; + delete pFieldTxbxHdFtPLCF; delete pEdnPLCF; - delete pFtnPLCF; + delete pFootnotePLCF; delete pAndPLCF; delete pSepPLCF; delete pPapPLCF; @@ -1902,7 +1902,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF) if((static_cast<sal_uInt8*>(pData)[0] & 0x1f ) == 0x15 ) { // Field end ? - // INDEX-Fld has set Bit7? + // INDEX-Field has set Bit7? rF.nOpt = static_cast<sal_uInt8*>(pData)[1]; // yes -> copy flags }else{ rF.nId = 0; // no -> Field invalid @@ -2905,7 +2905,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp() return true; } -WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream* pSt, SvStream* pTblSt, +WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL) : WW8PLCFx(rFib.GetFIBVersion(), true), pFKPStrm(pSt), pDataStrm(pDataSt), pFkp(0), ePLCF(ePl), pPCDAttrs(0) @@ -2914,12 +2914,12 @@ WW8PLCFx_Fc_FKP::WW8PLCFx_Fc_FKP(SvStream* pSt, SvStream* pTblSt, long nLenStruct = (8 > rFib.nVersion) ? 2 : 4; if (ePl == CHP) { - pPLCF = new WW8PLCF(*pTblSt, rFib.fcPlcfbteChpx, rFib.lcbPlcfbteChpx, + pPLCF = new WW8PLCF(*pTableSt, rFib.fcPlcfbteChpx, rFib.lcbPlcfbteChpx, nLenStruct, GetStartFc(), rFib.pnChpFirst, rFib.cpnBteChp); } else { - pPLCF = new WW8PLCF(*pTblSt, rFib.fcPlcfbtePapx, rFib.lcbPlcfbtePapx, + pPLCF = new WW8PLCF(*pTableSt, rFib.fcPlcfbtePapx, rFib.lcbPlcfbtePapx, nLenStruct, GetStartFc(), rFib.pnPapFirst, rFib.cpnBtePap); } } @@ -3117,9 +3117,9 @@ bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rR return !rResult.empty(); } -WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTblSt, +WW8PLCFx_Cp_FKP::WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, const WW8ScannerBase& rBase, ePLCFT ePl ) - : WW8PLCFx_Fc_FKP(pSt, pTblSt, pDataSt, *rBase.pWw8Fib, ePl, + : WW8PLCFx_Fc_FKP(pSt, pTableSt, pDataSt, *rBase.pWw8Fib, ePl, rBase.WW8Cp2Fc(0)), rSBase(rBase), nAttrStart(-1), nAttrEnd(-1), bLineEnd(false), bComplex( (7 < rBase.pWw8Fib->nVersion) || rBase.pWw8Fib->fComplex ) @@ -3405,13 +3405,13 @@ void WW8PLCFx_Cp_FKP::advance() bLineEnd = (ePLCF == PAP); } -WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt, +WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTableSt, const WW8Fib& rFib, WW8_CP nStartCp) : WW8PLCFx(rFib.GetFIBVersion(), true), maSprmParser(rFib.GetFIBVersion()), pStrm(pSt), nArrMax(256), nSprmSiz(0) { pPLCF = rFib.lcbPlcfsed - ? new WW8PLCF(*pTblSt, rFib.fcPlcfsed, rFib.lcbPlcfsed, + ? new WW8PLCF(*pTableSt, rFib.fcPlcfsed, rFib.lcbPlcfsed, GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp) : 0; @@ -3589,28 +3589,28 @@ const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const } WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, - WW8_CP nStartCp, long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, + WW8_CP nStartCp, long nFcRef, long nLenRef, long nFcText, long nLenText, long nStruct) - : WW8PLCFx(eVersion, true), pRef(0), pTxt(0) + : WW8PLCFx(eVersion, true), pRef(0), pText(0) { - if( nLenRef && nLenTxt ) + if( nLenRef && nLenText ) { pRef = new WW8PLCF(*pSt, nFcRef, nLenRef, nStruct, nStartCp); - pTxt = new WW8PLCF(*pSt, nFcTxt, nLenTxt, 0, nStartCp); + pText = new WW8PLCF(*pSt, nFcText, nLenText, 0, nStartCp); } } WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc() { delete pRef; - delete pTxt; + delete pText; } sal_uInt32 WW8PLCFx_SubDoc::GetIdx() const { - // Probably pTxt ... no need for it + // Probably pText ... no need for it if( pRef ) - return ( pRef->GetIdx() << 16 | pTxt->GetIdx() ); + return ( pRef->GetIdx() << 16 | pText->GetIdx() ); return 0; } @@ -3619,8 +3619,8 @@ void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx ) if( pRef ) { pRef->SetIdx( nIdx >> 16 ); - // Probably pTxt ... no need for it - pTxt->SetIdx( nIdx & 0xFFFF ); + // Probably pText ... no need for it + pText->SetIdx( nIdx & 0xFFFF ); } } @@ -3656,12 +3656,12 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p) p->nEndPos = p->nStartPos + 1; - if (!pTxt) + if (!pText) return; - pTxt->SetIdx(nNr); + pText->SetIdx(nNr); - if (!pTxt->Get(p->nCp2OrIdx, p->nSprmsLen, pData)) + if (!pText->Get(p->nCp2OrIdx, p->nSprmsLen, pData)) { p->nEndPos = p->nStartPos = WW8_CP_MAX; p->nSprmsLen = 0; @@ -3673,10 +3673,10 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p) void WW8PLCFx_SubDoc::advance() { - if (pRef && pTxt) + if (pRef && pText) { pRef->advance(); - pTxt->advance(); + pText->advance(); } } @@ -3693,8 +3693,8 @@ WW8PLCFx_FLD::WW8PLCFx_FLD( SvStream* pSt, const WW8Fib& rMyFib, short nType) nLen = rFib.lcbPlcffldHdr; break; case MAN_FTN: - nFc = rFib.fcPlcffldFtn; - nLen = rFib.lcbPlcffldFtn; + nFc = rFib.fcPlcffldFootnote; + nLen = rFib.lcbPlcffldFootnote; break; case MAN_EDN: nFc = rFib.fcPlcffldEdn; @@ -3983,7 +3983,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen rStrm.Seek(nOldPos); } -WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib) +WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTableSt, const WW8Fib& rFib) : WW8PLCFx(rFib.GetFIBVersion(), false), pStatus(0), nIsEnd(0), nBookmarkId(1) { if( !rFib.fcPlcfbkf || !rFib.lcbPlcfbkf || !rFib.fcPlcfbkl || @@ -3994,13 +3994,13 @@ WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib) } else { - pBook[0] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4); + pBook[0] = new WW8PLCFspecial(pTableSt,rFib.fcPlcfbkf,rFib.lcbPlcfbkf,4); - pBook[1] = new WW8PLCFspecial(pTblSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0); + pBook[1] = new WW8PLCFspecial(pTableSt,rFib.fcPlcfbkl,rFib.lcbPlcfbkl,0); rtl_TextEncoding eStructChrSet = WW8Fib::GetFIBCharset(rFib.chseTables, rFib.lid); - WW8ReadSTTBF( (7 < rFib.nVersion), *pTblSt, rFib.fcSttbfbkmk, + WW8ReadSTTBF( (7 < rFib.nVersion), *pTableSt, rFib.fcSttbfbkmk, rFib.lcbSttbfbkmk, 0, eStructChrSet, aBookNames ); nIMax = aBookNames.size(); @@ -4248,7 +4248,7 @@ const OUString* WW8PLCFx_Book::GetName() const return pRet; } -WW8PLCFx_AtnBook::WW8PLCFx_AtnBook(SvStream* pTblSt, const WW8Fib& rFib) +WW8PLCFx_AtnBook::WW8PLCFx_AtnBook(SvStream* pTableSt, const WW8Fib& rFib) : WW8PLCFx(rFib.GetFIBVersion(), /*bSprm=*/false), m_bIsEnd(false) { @@ -4259,8 +4259,8 @@ WW8PLCFx_AtnBook::WW8PLCFx_AtnBook(SvStream* pTblSt, const WW8Fib& rFib) } else { - m_pBook[0] = new WW8PLCFspecial(pTblSt, rFib.fcPlcfAtnbkf, rFib.lcbPlcfAtnbkf, 4); - m_pBook[1] = new WW8PLCFspecial(pTblSt, rFib.fcPlcfAtnbkl, rFib.lcbPlcfAtnbkl, 0); + m_pBook[0] = new WW8PLCFspecial(pTableSt, rFib.fcPlcfAtnbkf, rFib.lcbPlcfAtnbkf, 4); + m_pBook[1] = new WW8PLCFspecial(pTableSt, rFib.fcPlcfAtnbkl, rFib.lcbPlcfAtnbkl, 0); nIMax = m_pBook[0]->GetIMax(); if (m_pBook[1]->GetIMax() < nIMax) @@ -4477,9 +4477,9 @@ sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const { sal_uInt16 nId = 0; // Id = 0 for empty attributes - if (p == pFld) + if (p == pField) nId = eFLD; - else if (p == pFtn) + else if (p == pFootnote) nId = eFTN; else if (p == pEdn) nId = eEDN; @@ -4507,10 +4507,10 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, { // Suchreihenfolge der Attribute nPLCF = MAN_ANZ_PLCF; - pFld = &aD[0]; + pField = &aD[0]; pBkm = &aD[1]; pEdn = &aD[2]; - pFtn = &aD[3]; + pFootnote = &aD[3]; pAnd = &aD[4]; pPcd = ( pBase->pPLCFx_PCD ) ? &aD[5] : 0; @@ -4523,7 +4523,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, pAtnBkm = &aD[10]; pSep->pPLCFx = pBase->pSepPLCF; - pFtn->pPLCFx = pBase->pFtnPLCF; + pFootnote->pPLCFx = pBase->pFootnotePLCF; pEdn->pPLCFx = pBase->pEdnPLCF; pBkm->pPLCFx = pBase->pBook; pAnd->pPLCFx = pBase->pAndPLCF; @@ -4534,7 +4534,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, { // Suchreihenfolge der Attribute nPLCF = 7; - pFld = &aD[0]; + pField = &aD[0]; pBkm = ( pBase->pBook ) ? &aD[1] : 0; pPcd = ( pBase->pPLCFx_PCD ) ? &aD[2] : 0; @@ -4545,7 +4545,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, pPap = &aD[5]; pSep = &aD[6]; // Dummy - pAnd = pAtnBkm = pFtn = pEdn = 0; // unbenutzt bei SpezText + pAnd = pAtnBkm = pFootnote = pEdn = 0; // unbenutzt bei SpezText } pChp->pPLCFx = pBase->pChpPLCF; @@ -4564,37 +4564,37 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp, switch( nType ) // Feld-Initialisierung { case MAN_HDFT: - pFld->pPLCFx = pBase->pFldHdFtPLCF; + pField->pPLCFx = pBase->pFieldHdFtPLCF; pFdoa = pBase->pHdFtFdoa; pTxbx = pBase->pHdFtTxbx; pTxbxBkd = pBase->pHdFtTxbxBkd; break; case MAN_FTN: - pFld->pPLCFx = pBase->pFldFtnPLCF; + pField->pPLCFx = pBase->pFieldFootnotePLCF; pFdoa = pTxbx = pTxbxBkd = 0; break; case MAN_EDN: - pFld->pPLCFx = pBase->pFldEdnPLCF; + pField->pPLCFx = pBase->pFieldEdnPLCF; pFdoa = pTxbx = pTxbxBkd = 0; break; case MAN_AND: - pFld->pPLCFx = pBase->pFldAndPLCF; + pField->pPLCFx = pBase->pFieldAndPLCF; pFdoa = pTxbx = pTxbxBkd = 0; break; case MAN_TXBX: - pFld->pPLCFx = pBase->pFldTxbxPLCF; + pField->pPLCFx = pBase->pFieldTxbxPLCF; pTxbx = pBase->pMainTxbx; pTxbxBkd = pBase->pMainTxbxBkd; pFdoa = 0; break; case MAN_TXBX_HDFT: - pFld->pPLCFx = pBase->pFldTxbxHdFtPLCF; + pField->pPLCFx = pBase->pFieldTxbxHdFtPLCF; pTxbx = pBase->pHdFtTxbx; pTxbxBkd = pBase->pHdFtTxbxBkd; pFdoa = 0; break; default: - pFld->pPLCFx = pBase->pFldPLCF; + pField->pPLCFx = pBase->pFieldPLCF; pFdoa = pBase->pMainFdoa; pTxbx = pBase->pMainTxbx; pTxbxBkd = pBase->pMainTxbxBkd; @@ -4728,7 +4728,7 @@ void WW8PLCFMan::SeekPos( long nNewCp ) { pChp->pPLCFx->SeekPos( nNewCp + nCpO ); // Attribute neu pPap->pPLCFx->SeekPos( nNewCp + nCpO ); // aufsetzen - pFld->pPLCFx->SeekPos( nNewCp ); + pField->pPLCFx->SeekPos( nNewCp ); if( pPcd ) pPcd->pPLCFx->SeekPos( nNewCp + nCpO ); if( pBkm ) @@ -4782,7 +4782,7 @@ void WW8PLCFMan::GetSprmStart( short nIdx, WW8PLCFManResult* pRes ) const pRes->pMemPos = p->pMemPos; pRes->nSprmId = GetId(p); pRes->nCp2OrIdx = p->nCp2OrIdx; - if ((p == pFtn) || (p == pEdn) || (p == pAnd)) + if ((p == pFootnote) || (p == pEdn) || (p == pAnd)) pRes->nMemLen = p->nSprmsLen; else if (p->nSprmsLen >= maSprmParser.MinSprmLen()) //Normal { @@ -4814,9 +4814,9 @@ void WW8PLCFMan::GetNoSprmStart( short nIdx, WW8PLCFManResult* pRes ) const pRes->nMemLen = p->nSprmsLen; pRes->nCp2OrIdx = p->nCp2OrIdx; - if( p == pFld ) + if( p == pField ) pRes->nSprmId = eFLD; - else if( p == pFtn ) + else if( p == pFootnote ) pRes->nSprmId = eFTN; else if( p == pEdn ) pRes->nSprmId = eEDN; @@ -5108,9 +5108,9 @@ sal_uInt16 WW8PLCFMan::GetColl() const } } -WW8PLCFx_FLD* WW8PLCFMan::GetFld() const +WW8PLCFx_FLD* WW8PLCFMan::GetField() const { - return static_cast<WW8PLCFx_FLD*>(pFld->pPLCFx); + return static_cast<WW8PLCFx_FLD*>(pField->pPLCFx); } const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const @@ -5254,7 +5254,7 @@ WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const nOffset = ccpText; break; case MAN_HDFT: - nOffset = ccpText + ccpFtn; + nOffset = ccpText + ccpFootnote; break; /* A subdocument of this kind (MAN_MACRO) probably exists in some defunct @@ -5262,21 +5262,21 @@ WW8_CP WW8Fib::GetBaseCp(ManTypes nType) const uses this comes to light, this is the likely calculation required case MAN_MACRO: - nOffset = ccpText + ccpFtn + ccpHdr; + nOffset = ccpText + ccpFootnote + ccpHdr; break; */ case MAN_AND: - nOffset = ccpText + ccpFtn + ccpHdr + ccpMcr; + nOffset = ccpText + ccpFootnote + ccpHdr + ccpMcr; break; case MAN_EDN: - nOffset = ccpText + ccpFtn + ccpHdr + ccpMcr + ccpAtn; + nOffset = ccpText + ccpFootnote + ccpHdr + ccpMcr + ccpAtn; break; case MAN_TXBX: - nOffset = ccpText + ccpFtn + ccpHdr + ccpMcr + ccpAtn + ccpEdn; + nOffset = ccpText + ccpFootnote + ccpHdr + ccpMcr + ccpAtn + ccpEdn; break; case MAN_TXBX_HDFT: - nOffset = ccpText + ccpFtn + ccpHdr + ccpMcr + ccpAtn + ccpEdn + + nOffset = ccpText + ccpFootnote + ccpHdr + ccpMcr + ccpAtn + ccpEdn + ccpTxbx; break; } @@ -5452,7 +5452,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) rSt.SeekRel( 2 * sizeof( sal_Int32) ); rSt.ReadInt32( ccpText ); - rSt.ReadInt32( ccpFtn ); + rSt.ReadInt32( ccpFootnote ); rSt.ReadInt32( ccpHdr ); rSt.ReadInt32( ccpMcr ); rSt.ReadInt32( ccpAtn ); @@ -5489,12 +5489,12 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) lcbStshf = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcffndRef ); lcbPlcffndRef = Readcb(rSt, eVer); - rSt.ReadInt32( fcPlcffndTxt ); - lcbPlcffndTxt = Readcb(rSt, eVer); + rSt.ReadInt32( fcPlcffndText ); + lcbPlcffndText = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcfandRef ); lcbPlcfandRef = Readcb(rSt, eVer); - rSt.ReadInt32( fcPlcfandTxt ); - lcbPlcfandTxt = Readcb(rSt, eVer); + rSt.ReadInt32( fcPlcfandText ); + lcbPlcfandText = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcfsed ); lcbPlcfsed = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcfpad ); @@ -5519,8 +5519,8 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) lcbPlcffldMom = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcffldHdr ); lcbPlcffldHdr = Readcb(rSt, eVer); - rSt.ReadInt32( fcPlcffldFtn ); - lcbPlcffldFtn = Readcb(rSt, eVer); + rSt.ReadInt32( fcPlcffldFootnote ); + lcbPlcffldFootnote = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcffldAtn ); lcbPlcffldAtn = Readcb(rSt, eVer); rSt.ReadInt32( fcPlcffldMcr ); @@ -5559,8 +5559,8 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) lcbSttbfAssoc = Readcb(rSt, eVer); rSt.ReadInt32( fcClx ); lcbClx = Readcb(rSt, eVer); - rSt.ReadInt32( fcPlcfpgdFtn ); - lcbPlcfpgdFtn = Readcb(rSt, eVer); + rSt.ReadInt32( fcPlcfpgdFootnote ); + lcbPlcfpgdFootnote = Readcb(rSt, eVer); rSt.ReadInt32( fcAutosaveSource ); lcbAutosaveSource = Readcb(rSt, eVer); rSt.ReadInt32( fcGrpStAtnOwners ); @@ -5601,12 +5601,12 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) rSt.ReadInt32( lcbPlcfAtnbkl ); rSt.ReadInt32( fcPms ); rSt.ReadInt32( lcbPMS ); - rSt.ReadInt32( fcFormFldSttbf ); - rSt.ReadInt32( lcbFormFldSttbf ); + rSt.ReadInt32( fcFormFieldSttbf ); + rSt.ReadInt32( lcbFormFieldSttbf ); rSt.ReadInt32( fcPlcfendRef ); rSt.ReadInt32( lcbPlcfendRef ); - rSt.ReadInt32( fcPlcfendTxt ); - rSt.ReadInt32( lcbPlcfendTxt ); + rSt.ReadInt32( fcPlcfendText ); + rSt.ReadInt32( lcbPlcfendText ); rSt.ReadInt32( fcPlcffldEdn ); rSt.ReadInt32( lcbPlcffldEdn ); rSt.ReadInt32( fcPlcfpgdEdn ); @@ -5623,12 +5623,12 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) rSt.ReadInt32( lcbPlcfwkb ); rSt.ReadInt32( fcPlcfspl ); rSt.ReadInt32( lcbPlcfspl ); - rSt.ReadInt32( fcPlcftxbxTxt ); - rSt.ReadInt32( lcbPlcftxbxTxt ); + rSt.ReadInt32( fcPlcftxbxText ); + rSt.ReadInt32( lcbPlcftxbxText ); rSt.ReadInt32( fcPlcffldTxbx ); rSt.ReadInt32( lcbPlcffldTxbx ); - rSt.ReadInt32( fcPlcfHdrtxbxTxt ); - rSt.ReadInt32( lcbPlcfHdrtxbxTxt ); + rSt.ReadInt32( fcPlcfHdrtxbxText ); + rSt.ReadInt32( lcbPlcfHdrtxbxText ); rSt.ReadInt32( fcPlcffldHdrTxbx ); rSt.ReadInt32( lcbPlcffldHdrTxbx ); rSt.ReadInt32( fcStwUser ); @@ -5646,7 +5646,7 @@ WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset) fHasPic = ( aBits1 & 0x08 ) >> 3; cQuickSaves = ( aBits1 & 0xf0 ) >> 4; fEncrypted = aBits2 & 0x01 ; - fWhichTblStm= ( aBits2 & 0x02 ) >> 1; + fWhichTableStm= ( aBits2 & 0x02 ) >> 1; fReadOnlyRecommended = (aBits2 & 0x4) >> 2; fWriteReservation = (aBits2 & 0x8) >> 3; fExtChar = ( aBits2 & 0x10 ) >> 4; @@ -5808,7 +5808,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm) if( fHasPic ) nBits16 |= 0x0008; nBits16 |= (0xf0 & ( cQuickSaves << 4 )); if( fEncrypted ) nBits16 |= 0x0100; - if( fWhichTblStm ) nBits16 |= 0x0200; + if( fWhichTableStm ) nBits16 |= 0x0200; if (fReadOnlyRecommended) nBits16 |= 0x0400; @@ -5892,7 +5892,7 @@ bool WW8Fib::Write(SvStream& rStrm) pData += 2 * sizeof( sal_Int32); Set_UInt32( pData, ccpText ); - Set_UInt32( pData, ccpFtn ); + Set_UInt32( pData, ccpFootnote ); Set_UInt32( pData, ccpHdr ); Set_UInt32( pData, ccpMcr ); Set_UInt32( pData, ccpAtn ); @@ -5929,12 +5929,12 @@ bool WW8Fib::Write(SvStream& rStrm) Set_UInt32( pData, lcbStshf ); Set_UInt32( pData, fcPlcffndRef ); Set_UInt32( pData, lcbPlcffndRef ); - Set_UInt32( pData, fcPlcffndTxt ); - Set_UInt32( pData, lcbPlcffndTxt ); + Set_UInt32( pData, fcPlcffndText ); + Set_UInt32( pData, lcbPlcffndText ); Set_UInt32( pData, fcPlcfandRef ); Set_UInt32( pData, lcbPlcfandRef ); - Set_UInt32( pData, fcPlcfandTxt ); - Set_UInt32( pData, lcbPlcfandTxt ); + Set_UInt32( pData, fcPlcfandText ); + Set_UInt32( pData, lcbPlcfandText ); Set_UInt32( pData, fcPlcfsed ); Set_UInt32( pData, lcbPlcfsed ); Set_UInt32( pData, fcPlcfpad ); @@ -5959,8 +5959,8 @@ bool WW8Fib::Write(SvStream& rStrm) Set_UInt32( pData, lcbPlcffldMom ); Set_UInt32( pData, fcPlcffldHdr ); Set_UInt32( pData, lcbPlcffldHdr ); - Set_UInt32( pData, fcPlcffldFtn ); - Set_UInt32( pData, lcbPlcffldFtn ); + Set_UInt32( pData, fcPlcffldFootnote ); + Set_UInt32( pData, lcbPlcffldFootnote ); Set_UInt32( pData, fcPlcffldAtn ); Set_UInt32( pData, lcbPlcffldAtn ); Set_UInt32( pData, fcPlcffldMcr ); @@ -5991,8 +5991,8 @@ bool WW8Fib::Write(SvStream& rStrm) Set_UInt32( pData, lcbSttbfAssoc ); Set_UInt32( pData, fcClx ); Set_UInt32( pData, lcbClx ); - Set_UInt32( pData, fcPlcfpgdFtn ); - Set_UInt32( pData, lcbPlcfpgdFtn ); + Set_UInt32( pData, fcPlcfpgdFootnote ); + Set_UInt32( pData, lcbPlcfpgdFootnote ); Set_UInt32( pData, fcAutosaveSource ); Set_UInt32( pData, lcbAutosaveSource ); Set_UInt32( pData, fcGrpStAtnOwners ); @@ -6026,12 +6026,12 @@ bool WW8Fib::Write(SvStream& rStrm) Set_UInt32( pData, lcbPlcfAtnbkl ); Set_UInt32( pData, fcPms ); Set_UInt32( pData, lcbPMS ); - Set_UInt32( pData, fcFormFldSttbf ); - Set_UInt32( pData, lcbFormFldSttbf ); + Set_UInt32( pData, fcFormFieldSttbf ); + Set_UInt32( pData, lcbFormFieldSttbf ); Set_UInt32( pData, fcPlcfendRef ); Set_UInt32( pData, lcbPlcfendRef ); - Set_UInt32( pData, fcPlcfendTxt ); - Set_UInt32( pData, lcbPlcfendTxt ); + Set_UInt32( pData, fcPlcfendText ); + Set_UInt32( pData, lcbPlcfendText ); Set_UInt32( pData, fcPlcffldEdn ); Set_UInt32( pData, lcbPlcffldEdn ); Set_UInt32( pData, fcPlcfpgdEdn ); @@ -6048,12 +6048,12 @@ bool WW8Fib::Write(SvStream& rStrm) Set_UInt32( pData, lcbPlcfwkb ); Set_UInt32( pData, fcPlcfspl ); // in Ver67 leere Reserve Set_UInt32( pData, lcbPlcfspl ); // in Ver67 leere Reserve - Set_UInt32( pData, fcPlcftxbxTxt ); - Set_UInt32( pData, lcbPlcftxbxTxt ); + Set_UInt32( pData, fcPlcftxbxText ); + Set_UInt32( pData, lcbPlcftxbxText ); Set_UInt32( pData, fcPlcffldTxbx ); Set_UInt32( pData, lcbPlcffldTxbx ); - Set_UInt32( pData, fcPlcfHdrtxbxTxt ); - Set_UInt32( pData, lcbPlcfHdrtxbxTxt ); + Set_UInt32( pData, fcPlcfHdrtxbxText ); + Set_UInt32( pData, lcbPlcfHdrtxbxText ); Set_UInt32( pData, fcPlcffldHdrTxbx ); Set_UInt32( pData, lcbPlcffldHdrTxbx ); @@ -6672,7 +6672,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop ) if( nI & rDop.grpfIhdt ) // Bit gesetzt ? nIdxOffset++; - nTextOfs = rFib.ccpText + rFib.ccpFtn; // Groesse des Haupttextes + nTextOfs = rFib.ccpText + rFib.ccpFootnote; // Groesse des Haupttextes // und der Fussnoten } @@ -6754,8 +6754,8 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) grpfIhdt = ( a16Bit & 0xff00 ) >> 8; a16Bit = Get_UShort( pData ); // 2 0x02 - rncFtn = a16Bit & 0x0003 ; - nFtn = ( a16Bit & ~0x0003 ) >> 2 ; + rncFootnote = a16Bit & 0x0003 ; + nFootnote = ( a16Bit & ~0x0003 ) >> 2 ; a8Bit = Get_Byte( pData ); // 4 0x04 fOutlineDirtySave = 0 != ( a8Bit & 0x01 ); @@ -6783,7 +6783,7 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) a8Bit = Get_Byte( pData ); // 7 0x07 fPagSuppressTopSpacing = 0 != ( a8Bit & 0x01 ); fProtEnabled = 0 != ( a8Bit & 0x02 ); - fDispFormFldSel = 0 != ( a8Bit & 0x04 ); + fDispFormFieldSel = 0 != ( a8Bit & 0x04 ); fRMView = 0 != ( a8Bit & 0x08 ); fRMPrint = 0 != ( a8Bit & 0x10 ); fWriteReservation = 0 != ( a8Bit & 0x20 ); @@ -6828,19 +6828,19 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) a16Bit = Get_UShort( pData ); // 54 0x36 epc = a16Bit & 0x0003 ; - nfcFtnRef = ( a16Bit & 0x003c ) >> 2; + nfcFootnoteRef = ( a16Bit & 0x003c ) >> 2; nfcEdnRef = ( a16Bit & 0x03c0 ) >> 6; fPrintFormData = 0 != ( a16Bit & 0x0400 ); fSaveFormData = 0 != ( a16Bit & 0x0800 ); fShadeFormData = 0 != ( a16Bit & 0x1000 ); - fWCFtnEdn = 0 != ( a16Bit & 0x8000 ); + fWCFootnoteEdn = 0 != ( a16Bit & 0x8000 ); cLines = Get_Long( pData ); // 56 0x38 - cWordsFtnEnd = Get_Long( pData ); // 60 0x3c - cChFtnEdn = Get_Long( pData ); // 64 0x40 - cPgFtnEdn = Get_Short( pData ); // 68 0x44 - cParasFtnEdn = Get_Long( pData ); // 70 0x46 - cLinesFtnEdn = Get_Long( pData ); // 74 0x4a + cWordsFootnoteEnd = Get_Long( pData ); // 60 0x3c + cChFootnoteEdn = Get_Long( pData ); // 64 0x40 + cPgFootnoteEdn = Get_Short( pData ); // 68 0x44 + cParasFootnoteEdn = Get_Long( pData ); // 70 0x46 + cLinesFootnoteEdn = Get_Long( pData ); // 74 0x4a lKeyProtDoc = Get_Long( pData ); // 78 0x4e a16Bit = Get_UShort( pData ); // 82 0x52 @@ -6890,17 +6890,17 @@ WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) pData += 12; // 414 0x19e cChWS = Get_Long( pData ); // 426 0x1aa - cChWSFtnEdn = Get_Long( pData ); // 430 0x1ae + cChWSFootnoteEdn = Get_Long( pData ); // 430 0x1ae grfDocEvents = Get_Long( pData ); // 434 0x1b2 pData += 4+30+8; // 438 0x1b6; 442 0x1ba; 472 0x1d8; 476 0x1dc cDBC = Get_Long( pData ); // 480 0x1e0 - cDBCFtnEdn = Get_Long( pData ); // 484 0x1e4 + cDBCFootnoteEdn = Get_Long( pData ); // 484 0x1e4 pData += 1 * sizeof( sal_Int32); // 488 0x1e8 - nfcFtnRef = Get_Short( pData ); // 492 0x1ec + nfcFootnoteRef = Get_Short( pData ); // 492 0x1ec nfcEdnRef = Get_Short( pData ); // 494 0x1ee hpsZoonFontPag = Get_Short( pData ); // 496 0x1f0 dywDispPag = Get_Short( pData ); // 498 0x1f2 @@ -6953,7 +6953,7 @@ WW8Dop::WW8Dop() fWidowControl = true; fpc = 1; - nFtn = 1; + nFootnote = 1; fOutlineDirtySave = true; fHyphCapitals = true; fBackup = true; @@ -6989,10 +6989,10 @@ WW8Dop::WW8Dop() fIncludeFooter = true; cChWS = /**!!**/ 0; - cChWSFtnEdn = /**!!**/ 0; + cChWSFootnoteEdn = /**!!**/ 0; cDBC = /**!!**/ 0; - cDBCFtnEdn = /**!!**/ 0; + cDBCFootnoteEdn = /**!!**/ 0; fAcetateShowAtn = true; } @@ -7179,8 +7179,8 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const Set_UInt16( pData, a16Bit ); a16Bit = 0; // 2 0x02 - a16Bit |= ( 0x0003 & rncFtn ); - a16Bit |= ( ~0x0003 & (nFtn << 2)); + a16Bit |= ( 0x0003 & rncFootnote ); + a16Bit |= ( ~0x0003 & (nFootnote << 2)); Set_UInt16( pData, a16Bit ); a8Bit = 0; // 4 0x04 @@ -7212,7 +7212,7 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const a8Bit = 0; // 7 0x07 if( fPagSuppressTopSpacing ) a8Bit |= 0x01; if( fProtEnabled ) a8Bit |= 0x02; - if( fDispFormFldSel ) a8Bit |= 0x04; + if( fDispFormFieldSel ) a8Bit |= 0x04; if( fRMView ) a8Bit |= 0x08; if( fRMPrint ) a8Bit |= 0x10; if( fWriteReservation ) a8Bit |= 0x20; @@ -7261,20 +7261,20 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const a16Bit = 0; // 54 0x36 a16Bit |= (0x0003 & epc ); - a16Bit |= (0x003c & (nfcFtnRef << 2)); + a16Bit |= (0x003c & (nfcFootnoteRef << 2)); a16Bit |= (0x03c0 & (nfcEdnRef << 6)); if( fPrintFormData ) a16Bit |= 0x0400; if( fSaveFormData ) a16Bit |= 0x0800; if( fShadeFormData ) a16Bit |= 0x1000; - if( fWCFtnEdn ) a16Bit |= 0x8000; + if( fWCFootnoteEdn ) a16Bit |= 0x8000; Set_UInt16( pData, a16Bit ); Set_UInt32( pData, cLines ); // 56 0x38 - Set_UInt32( pData, cWordsFtnEnd ); // 60 0x3c - Set_UInt32( pData, cChFtnEdn ); // 64 0x40 - Set_UInt16( pData, cPgFtnEdn ); // 68 0x44 - Set_UInt32( pData, cParasFtnEdn ); // 70 0x46 - Set_UInt32( pData, cLinesFtnEdn ); // 74 0x4a + Set_UInt32( pData, cWordsFootnoteEnd ); // 60 0x3c + Set_UInt32( pData, cChFootnoteEdn ); // 64 0x40 + Set_UInt16( pData, cPgFootnoteEdn ); // 68 0x44 + Set_UInt32( pData, cParasFootnoteEdn ); // 70 0x46 + Set_UInt32( pData, cLinesFootnoteEdn ); // 74 0x4a Set_UInt32( pData, lKeyProtDoc ); // 78 0x4e a16Bit = 0; // 82 0x52 @@ -7312,17 +7312,17 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const pData += 12; // 414 0x19e Set_UInt32( pData, cChWS ); // 426 0x1aa - Set_UInt32( pData, cChWSFtnEdn ); // 430 0x1ae + Set_UInt32( pData, cChWSFootnoteEdn ); // 430 0x1ae Set_UInt32( pData, grfDocEvents ); // 434 0x1b2 pData += 4+30+8; // 438 0x1b6; 442 0x1ba; 472 0x1d8; 476 0x1dc Set_UInt32( pData, cDBC ); // 480 0x1e0 - Set_UInt32( pData, cDBCFtnEdn ); // 484 0x1e4 + Set_UInt32( pData, cDBCFootnoteEdn ); // 484 0x1e4 pData += 1 * sizeof( sal_Int32); // 488 0x1e8 - Set_UInt16( pData, nfcFtnRef ); // 492 0x1ec + Set_UInt16( pData, nfcFootnoteRef ); // 492 0x1ec Set_UInt16( pData, nfcEdnRef ); // 494 0x1ee Set_UInt16( pData, hpsZoonFontPag ); // 496 0x1f0 Set_UInt16( pData, dywDispPag ); // 498 0x1f2 diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 02ebf3bc19cf..678482f85e9c 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -581,7 +581,7 @@ protected: WW8PLCFx_PCDAttrs* pPCDAttrs; public: - WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt, + WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL ); virtual ~WW8PLCFx_Fc_FKP(); virtual sal_uInt32 GetIdx() const SAL_OVERRIDE; @@ -612,7 +612,7 @@ private: WW8PLCFx_Cp_FKP& operator=(const WW8PLCFx_Cp_FKP&) SAL_DELETED_FUNCTION; public: - WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt, + WW8PLCFx_Cp_FKP( SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, const WW8ScannerBase& rBase, ePLCFT ePl ); virtual ~WW8PLCFx_Cp_FKP(); void ResetAttrStartEnd(); @@ -644,7 +644,7 @@ private: WW8PLCFx_SEPX& operator=(const WW8PLCFx_SEPX&) SAL_DELETED_FUNCTION; public: - WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, const WW8Fib& rFib, + WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTablexySt, const WW8Fib& rFib, WW8_CP nStartCp ); virtual ~WW8PLCFx_SEPX(); virtual sal_uInt32 GetIdx() const SAL_OVERRIDE; @@ -667,14 +667,14 @@ class WW8PLCFx_SubDoc : public WW8PLCFx { private: WW8PLCF* pRef; - WW8PLCF* pTxt; + WW8PLCF* pText; WW8PLCFx_SubDoc(const WW8PLCFx_SubDoc&) SAL_DELETED_FUNCTION; WW8PLCFx_SubDoc& operator=(const WW8PLCFx_SubDoc&) SAL_DELETED_FUNCTION; public: WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, WW8_CP nStartCp, - long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, long nStruc = 0); + long nFcRef, long nLenRef, long nFcText, long nLenText, long nStruc = 0); virtual ~WW8PLCFx_SubDoc(); virtual sal_uInt32 GetIdx() const SAL_OVERRIDE; virtual void SetIdx( sal_uLong nIdx ) SAL_OVERRIDE; @@ -734,7 +734,7 @@ private: WW8PLCFx_Book& operator=(const WW8PLCFx_Book&) SAL_DELETED_FUNCTION; public: - WW8PLCFx_Book(SvStream* pTblSt,const WW8Fib& rFib); + WW8PLCFx_Book(SvStream* pTableSt,const WW8Fib& rFib); virtual ~WW8PLCFx_Book(); long GetIMax() const { return nIMax; } virtual sal_uInt32 GetIdx() const SAL_OVERRIDE; @@ -772,7 +772,7 @@ private: WW8PLCFx_AtnBook& operator=(const WW8PLCFx_AtnBook&) SAL_DELETED_FUNCTION; public: - WW8PLCFx_AtnBook(SvStream* pTblSt,const WW8Fib& rFib); + WW8PLCFx_AtnBook(SvStream* pTableSt,const WW8Fib& rFib); virtual ~WW8PLCFx_AtnBook(); virtual sal_uInt32 GetIdx() const SAL_OVERRIDE; virtual void SetIdx( sal_uLong nI ) SAL_OVERRIDE; @@ -892,7 +892,7 @@ private: //drawboxes we want the true offsets WW8PLCFxDesc aD[MAN_ANZ_PLCF]; - WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFtn, *pEdn, *pBkm, *pPcd, + WW8PLCFxDesc *pChp, *pPap, *pSep, *pField, *pFootnote, *pEdn, *pBkm, *pPcd, *pPcdA, *pAnd, *pAtnBkm; WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd,*pMagicTables, *pSubdocs; sal_uInt8* pExtendedAtrds; @@ -925,9 +925,9 @@ public: bool Get(WW8PLCFManResult* pResult) const; void advance(); sal_uInt16 GetColl() const; // index of actual Style - WW8PLCFx_FLD* GetFld() const; + WW8PLCFx_FLD* GetField() const; WW8PLCFx_SubDoc* GetEdn() const { return static_cast<WW8PLCFx_SubDoc*>(pEdn->pPLCFx); } - WW8PLCFx_SubDoc* GetFtn() const { return static_cast<WW8PLCFx_SubDoc*>(pFtn->pPLCFx); } + WW8PLCFx_SubDoc* GetFootnote() const { return static_cast<WW8PLCFx_SubDoc*>(pFootnote->pPLCFx); } WW8PLCFx_SubDoc* GetAtn() const { return static_cast<WW8PLCFx_SubDoc*>(pAnd->pPLCFx); } WW8PLCFx_Book* GetBook() const { return static_cast<WW8PLCFx_Book*>(pBkm->pPLCFx); } WW8PLCFx_AtnBook* GetAtnBook() const { return static_cast<WW8PLCFx_AtnBook*>(pAtnBkm->pPLCFx); } @@ -989,16 +989,16 @@ private: WW8PLCFx_Cp_FKP* pChpPLCF; // Character-Attrs WW8PLCFx_Cp_FKP* pPapPLCF; // Para-Attrs WW8PLCFx_SEPX* pSepPLCF; // Section-Attrs - WW8PLCFx_SubDoc* pFtnPLCF; // Footnotes + WW8PLCFx_SubDoc* pFootnotePLCF; // Footnotes WW8PLCFx_SubDoc* pEdnPLCF; // EndNotes WW8PLCFx_SubDoc* pAndPLCF; // Anmerkungen - WW8PLCFx_FLD* pFldPLCF; // Fields in Main Text - WW8PLCFx_FLD* pFldHdFtPLCF; // Fields in Header / Footer - WW8PLCFx_FLD* pFldTxbxPLCF; // Fields in Textboxes in Main Text - WW8PLCFx_FLD* pFldTxbxHdFtPLCF; // Fields in Textboxes in Header / Footer - WW8PLCFx_FLD* pFldFtnPLCF; // Fields in Footnotes - WW8PLCFx_FLD* pFldEdnPLCF; // Fields in Endnotes - WW8PLCFx_FLD* pFldAndPLCF; // Fields in Anmerkungen + WW8PLCFx_FLD* pFieldPLCF; // Fields in Main Text + WW8PLCFx_FLD* pFieldHdFtPLCF; // Fields in Header / Footer + WW8PLCFx_FLD* pFieldTxbxPLCF; // Fields in Textboxes in Main Text + WW8PLCFx_FLD* pFieldTxbxHdFtPLCF; // Fields in Textboxes in Header / Footer + WW8PLCFx_FLD* pFieldFootnotePLCF; // Fields in Footnotes + WW8PLCFx_FLD* pFieldEdnPLCF; // Fields in Endnotes + WW8PLCFx_FLD* pFieldAndPLCF; // Fields in Anmerkungen WW8PLCFspecial* pMainFdoa; // Graphic Primitives in Main Text WW8PLCFspecial* pHdFtFdoa; // Graphic Primitives in Header / Footer WW8PLCFspecial* pMainTxbx; // Textboxen in Main Text @@ -1022,10 +1022,10 @@ private: void DeletePieceTable(); public: - WW8ScannerBase( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt, + WW8ScannerBase( SvStream* pSt, SvStream* pTableSt, SvStream* pDataSt, WW8Fib* pWwF ); ~WW8ScannerBase(); - bool AreThereFootnotes() const { return pFtnPLCF->Count() > 0; }; + bool AreThereFootnotes() const { return pFootnotePLCF->Count() > 0; }; bool AreThereEndnotes() const { return pEdnPLCF->Count() > 0; }; //If you use WW8Fc2Cp you are almost certainly doing the wrong thing @@ -1096,7 +1096,7 @@ public: bool fHasPic :1; // 0008 file contains 1 or more pictures sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved bool fEncrypted :1; //0100 1 if file is encrypted, 0 if not - bool fWhichTblStm :1; //0200 When 0, this fib refers to the table stream + bool fWhichTableStm :1; //0200 When 0, this fib refers to the table stream bool fReadOnlyRecommended :1; bool fWriteReservation :1; // named "0Table", when 1, this fib refers to the @@ -1153,7 +1153,7 @@ public: // WW8_FC u4[4]; // 0x24 WW8_CP ccpText; // 0x34 length of main document text stream - WW8_CP ccpFtn; // 0x38 length of footnote subdocument text stream + WW8_CP ccpFootnote; // 0x38 length of footnote subdocument text stream WW8_CP ccpHdr; // 0x3c length of header subdocument text stream WW8_CP ccpMcr; // 0x40 length of macro subdocument text stream WW8_CP ccpAtn; // 0x44 length of annotation subdocument text stream @@ -1197,15 +1197,15 @@ public: sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF // == 0 if no footnotes defined in document. - WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF. - sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF. + WW8_FC fcPlcffndText; // 0x70 file offset of footnote text PLCF. + sal_Int32 lcbPlcffndText; // 0x74 count of bytes of footnote text PLCF. // == 0 if no footnotes defined in document WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF. sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF. - WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF. - sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF + WW8_FC fcPlcfandText; // 0x80 file offset of annotation text PLCF. + sal_Int32 lcbPlcfandText; // 0x84 count of bytes of the annotation text PLCF WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF. sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF. @@ -1251,8 +1251,8 @@ public: WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument. sal_Int32 lcbPlcffldHdr; // 0xe4 - WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument. - sal_Int32 lcbPlcffldFtn; // 0xec + WW8_FC fcPlcffldFootnote; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument. + sal_Int32 lcbPlcffldFootnote; // 0xec WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument. sal_Int32 lcbPlcffldAtn; // 0xf4 @@ -1300,8 +1300,8 @@ public: WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files. sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex. - WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument. - sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument. + WW8_FC fcPlcfpgdFootnote; // 0x168 file offset of page descriptor PLCF for footnote subdocument. + sal_Int32 lcbPlcfpgdFootnote; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument. // ==0 if document has not been paginated. The length of the PGD is 8 bytes. WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file. @@ -1346,15 +1346,15 @@ public: WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS - WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls - sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf + WW8_FC fcFormFieldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls + sal_Int32 lcbFormFieldSttbf; // 0x1CE length in bytes of form field Sttbf WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream sal_Int32 lcbPlcfendRef; // 0x1D6 - WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document + WW8_FC fcPlcfendText; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document // stream which corresponds with the PLCFendRef - sal_Int32 lcbPlcfendTxt; // 0x1DE + sal_Int32 lcbPlcfendText; // 0x1DE WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc sal_Int32 lcbPlcffldEdn; // 0x1E6 @@ -1383,12 +1383,12 @@ public: // war in Ver67 nur leere Reserve sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve - WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc - sal_Int32 lcbPlcftxbxTxt; // 0x226 + WW8_FC fcPlcftxbxText; // 0x222 ...PLCF of beginning CP in the text box subdoc + sal_Int32 lcbPlcftxbxText; // 0x226 WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc. sal_Int32 lcbPlcffldTxbx; // 0x22e - WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc - sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236 + WW8_FC fcPlcfHdrtxbxText;// 0x232 ...PLCF of beginning CP in the header text box subdoc + sal_Int32 lcbPlcfHdrtxbxText;// 0x236 WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc. sal_Int32 lcbPlcffldHdrTxbx;// 0x23e WW8_FC fcStwUser; @@ -1541,8 +1541,8 @@ public: sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic. - sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page - sal_uInt16 nFtn : 14; // 1 initial footnote number for document + sal_uInt16 rncFootnote : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page + sal_uInt16 nFootnote : 14; // 1 initial footnote number for document bool fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied sal_uInt16 : 7; // reserved bool fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh @@ -1563,7 +1563,7 @@ public: bool fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x) bool fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x). bool fProtEnabled : 1; // when 1, document is protected from edit operations - bool fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields + bool fDispFormFieldSel : 1;// when 1, restrict selections to occur only within form fields bool fRMView : 1; // when 1, show revision markings on screen bool fRMPrint : 1; // when 1, print revision marks when document is printed bool fWriteReservation : 1; @@ -1606,13 +1606,13 @@ public: bool fSaveFormData : 1; // only save document data that is inside of a form field. bool fShadeFormData : 1; // shade form fields sal_uInt16 : 2; // reserved - bool fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count + bool fWCFootnoteEdn : 1; // when 1, include footnotes and endnotes in word count sal_Int32 cLines; // count of lines tallied by last Word Count operation - sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation - sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation - sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation - sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation - sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation + sal_Int32 cWordsFootnoteEnd; // count of words in footnotes and endnotes tallied by last Word Count operation + sal_Int32 cChFootnoteEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation + sal_Int16 cPgFootnoteEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation + sal_Int32 cParasFootnoteEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation + sal_Int32 cLinesFootnoteEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1. sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View sal_uInt16 wScaleSaved : 9; ///< Specifies the zoom percentage that was in use when the document was saved. @@ -1685,13 +1685,13 @@ public: sal_uInt16 : 14; // reserved // Skip 12 Bytes here: ASUMI sal_Int32 cChWS; - sal_Int32 cChWSFtnEdn; + sal_Int32 cChWSFootnoteEdn; sal_Int32 grfDocEvents; // Skip 4+30+8 Bytes here sal_Int32 cDBC; - sal_Int32 cDBCFtnEdn; + sal_Int32 cDBCFootnoteEdn; // Skip 4 Bytes here - sal_Int16 nfcFtnRef; + sal_Int16 nfcFootnoteRef; sal_Int16 nfcEdnRef; sal_Int16 hpsZoonFontPag; sal_Int16 dywDispPag; @@ -1777,7 +1777,7 @@ public: void UpdateIndex( sal_uInt8 grpfIhdt ); }; -void SwapQuotesInField(OUString &rFmt); +void SwapQuotesInField(OUString &rFormat); Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize); std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx); diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx index 38a4d1ba6fd4..08d80c77558b 100644 --- a/sw/source/filter/ww8/ww8struc.hxx +++ b/sw/source/filter/ww8/ww8struc.hxx @@ -56,7 +56,7 @@ struct Word2CHPX sal_uInt16 fItalic:1; sal_uInt16 fRMarkDel:1; sal_uInt16 fOutline:1; - sal_uInt16 fFldVanish:1; + sal_uInt16 fFieldVanish:1; sal_uInt16 fSmallCaps:1; sal_uInt16 fCaps:1; sal_uInt16 fVanish:1; @@ -101,7 +101,7 @@ struct Word2CHPX fItalic = 0; fRMarkDel = 0; fOutline = 0; - fFldVanish = 0; + fFieldVanish = 0; fSmallCaps = 0; fCaps = 0; fVanish = 0; diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 5534068aeb3d..b864bf936379 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -172,7 +172,7 @@ XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc) { rPos.nNode = *pIndex; rPos.nNode++; // pIndex points to previous index !!! - rPos.nContent.Assign( rPos.nNode.GetNode().GetCntntNode(), 0 ); + rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), 0 ); } } @@ -467,7 +467,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection( } // create text section for redline - SwTxtFmtColl *pColl = pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool + SwTextFormatColl *pColl = pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool (RES_POOLCOLL_STANDARD, false ); SwStartNode* pRedlineNode = pDoc->GetNodes().MakeTextSection( pDoc->GetNodes().GetEndOfRedlines(), diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index bcdb63b16d0c..db7c647115ab 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -85,18 +85,18 @@ using namespace ::com::sun::star::lang; static void lcl_EnsureValidPam( SwPaM& rPam ) { - if( rPam.GetCntntNode() != NULL ) + if( rPam.GetContentNode() != NULL ) { // set proper point content - if( rPam.GetCntntNode() != rPam.GetPoint()->nContent.GetIdxReg() ) + if( rPam.GetContentNode() != rPam.GetPoint()->nContent.GetIdxReg() ) { - rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), 0 ); + rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 ); } // else: point was already valid // if mark is invalid, we delete it - if( ( rPam.GetCntntNode( false ) == NULL ) || - ( rPam.GetCntntNode( false ) != rPam.GetMark()->nContent.GetIdxReg() ) ) + if( ( rPam.GetContentNode( false ) == NULL ) || + ( rPam.GetContentNode( false ) != rPam.GetMark()->nContent.GetIdxReg() ) ) { rPam.DeleteMark(); } @@ -108,7 +108,7 @@ static void lcl_EnsureValidPam( SwPaM& rPam ) rPam.GetPoint()->nNode = *rPam.GetDoc()->GetNodes().GetEndOfContent().StartOfSectionNode(); ++ rPam.GetPoint()->nNode; - rPam.Move( fnMoveForward, fnGoCntnt ); // go into content + rPam.Move( fnMoveForward, fnGoContent ); // go into content } } @@ -392,7 +392,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc) // array indicating, which outline level already has a style assigned. bool aOutlineLevelAssigned[ MAXLEVEL ]; // array of the default outline styles, which are created for the document. - SwTxtFmtColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ]; + SwTextFormatColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ]; { for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i ) @@ -404,10 +404,10 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc) // determine, which outline level has already a style assigned and // which of the default outline styles is created. - const SwTxtFmtColls& rColls = *(_rDoc.GetTxtFmtColls()); + const SwTextFormatColls& rColls = *(_rDoc.GetTextFormatColls()); for ( size_t n = 1; n < rColls.size(); ++n ) { - SwTxtFmtColl* pColl = rColls[ n ]; + SwTextFormatColl* pColl = rColls[ n ]; if ( pColl->IsAssignedToListLevelOfOutlineStyle() ) { aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true; @@ -441,11 +441,11 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc) // apply outline numbering rule, if none is set. const SfxPoolItem& rItem = - aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, false ); + aCreatedDefaultOutlineStyles[ i ]->GetFormatAttr( RES_PARATR_NUMRULE, false ); if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().isEmpty() ) { SwNumRuleItem aItem( pOutlineRule->GetName() ); - aCreatedDefaultOutlineStyles[ i ]->SetFmtAttr( aItem ); + aCreatedDefaultOutlineStyles[ i ]->SetFormatAttr( aItem ); } } } @@ -687,23 +687,23 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c *pArgs++ <<= xStatusIndicator; // prepare for special modes - if( aOpt.IsFmtsOnly() ) + if( aOpt.IsFormatsOnly() ) { sal_Int32 nCount = - (aOpt.IsFrmFmts() ? 1 : 0) + + (aOpt.IsFrameFormats() ? 1 : 0) + (aOpt.IsPageDescs() ? 1 : 0) + - (aOpt.IsTxtFmts() ? 2 : 0) + + (aOpt.IsTextFormats() ? 2 : 0) + (aOpt.IsNumRules() ? 1 : 0); Sequence< OUString> aFamiliesSeq( nCount ); OUString *pSeq = aFamiliesSeq.getArray(); - if( aOpt.IsFrmFmts() ) + if( aOpt.IsFrameFormats() ) // SFX_STYLE_FAMILY_FRAME; *pSeq++ = "FrameStyles"; if( aOpt.IsPageDescs() ) // SFX_STYLE_FAMILY_PAGE; *pSeq++ = "PageStyles"; - if( aOpt.IsTxtFmts() ) + if( aOpt.IsTextFormats() ) { // (SFX_STYLE_FAMILY_CHAR|SFX_STYLE_FAMILY_PARA); *pSeq++ = "CharacterStyles"; @@ -803,7 +803,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c } sal_uInt32 nWarnRDF = 0; - if ( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFmtsOnly() || + if ( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFormatsOnly() || bInsertMode) ) { // RDF metadata - must be read before styles/content @@ -847,7 +847,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c aEmptyArgs, rName, false ); sal_uInt32 nWarn2 = 0; - if( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFmtsOnly() || + if( !(IsOrganizerMode() || IsBlockMode() || aOpt.IsFormatsOnly() || bInsertMode) ) { nWarn2 = ReadThroughComponent( @@ -863,7 +863,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c : "com.sun.star.comp.Writer.XMLStylesImporter"), aFilterArgs, rName, true ); - if( !nRet && !(IsOrganizerMode() || aOpt.IsFmtsOnly()) ) + if( !nRet && !(IsOrganizerMode() || aOpt.IsFormatsOnly()) ) nRet = ReadThroughComponent( xStorage, xModelComp, "content.xml", "Content.xml", xContext, (bOASIS ? "com.sun.star.comp.Writer.XMLOasisContentImporter" @@ -871,7 +871,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c aFilterArgs, rName, true ); if( !(IsOrganizerMode() || IsBlockMode() || bInsertMode || - aOpt.IsFmtsOnly() ) ) + aOpt.IsFormatsOnly() ) ) { try { @@ -894,7 +894,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) ); - aOpt.ResetAllFmtsOnly(); + aOpt.ResetAllFormatsOnly(); // redline password Any aAny = xInfoSet->getPropertyValue( sRedlineProtectionKey ); diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 6e6edcad8ece..91f336ce970b 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -253,7 +253,7 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >& if( !xModelComp.is() ) return ERR_SWG_WRITE_ERROR; - PutNumFmtFontsInAttrPool(); + PutNumFormatFontsInAttrPool(); PutEditEngFontsInAttrPool(); // properties diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 6841331b23f8..f167e98fda25 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -220,9 +220,9 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) // The styles in pDoc also count the default style that never // gets exported -> subtract one. sal_Int32 nRef = 1; // meta.xml - nRef += pDoc->GetCharFmts()->size() - 1; - nRef += pDoc->GetFrmFmts()->size() - 1; - nRef += pDoc->GetTxtFmtColls()->size() - 1; + nRef += pDoc->GetCharFormats()->size() - 1; + nRef += pDoc->GetFrameFormats()->size() - 1; + nRef += pDoc->GetTextFormatColls()->size() - 1; nRef *= 2; // for the above styles, xmloff will increment by 2! // #i93174#: count all paragraphs for the progress bar nRef += pDoc->getIDocumentStatistics().GetUpdatedDocStat( false, true ).nAllPara; // 1: only content, no autostyle diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index a16aeca00f32..108d00b1bcfa 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -26,8 +26,8 @@ #include <vector> class SwDoc; -class SwFmt; -class SwFrmFmt; +class SwFormat; +class SwFrameFormat; class SvXMLUnitConverter; class SvXMLExportItemMapper; class SvXMLAutoStylePoolP; @@ -37,7 +37,7 @@ class SwTableBox; class SwXMLTableColumn_Impl; class SwXMLTableLines_Impl; class SwXMLTableColumnsSortByWidth_Impl; -class SwXMLTableFrmFmtsSort_Impl; +class SwXMLTableFrameFormatsSort_Impl; class SwXMLTableInfo_Impl; class SwTableNode; class XMLPropertySetMapper; @@ -69,22 +69,22 @@ class SwXMLExport : public SvXMLExport sal_uInt32 nBaseWidth, const OUString& rNamePrefix, SwXMLTableColumnsSortByWidth_Impl& rExpCols, - SwXMLTableFrmFmtsSort_Impl& rExpRows, - SwXMLTableFrmFmtsSort_Impl& rExpCells, - SwXMLTableInfo_Impl& rTblInfo, + SwXMLTableFrameFormatsSort_Impl& rExpRows, + SwXMLTableFrameFormatsSort_Impl& rExpCells, + SwXMLTableInfo_Impl& rTableInfo, bool bTop=false ); - void ExportFmt( const SwFmt& rFmt, enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ); - void ExportTableFmt( const SwFrmFmt& rFmt, sal_uInt32 nAbsWidth ); + void ExportFormat( const SwFormat& rFormat, enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID ); + void ExportTableFormat( const SwFrameFormat& rFormat, sal_uInt32 nAbsWidth ); void ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol ); void ExportTableBox( const SwTableBox& rBox, sal_uInt32 nColSpan, sal_uInt32 nRowSpan, - SwXMLTableInfo_Impl& rTblInfo ); + SwXMLTableInfo_Impl& rTableInfo ); void ExportTableLine( const SwTableLine& rLine, const SwXMLTableLines_Impl& rLines, - SwXMLTableInfo_Impl& rTblInfo ); + SwXMLTableInfo_Impl& rTableInfo ); void ExportTableLines( const SwTableLines& rLines, - SwXMLTableInfo_Impl& rTblInfo, + SwXMLTableInfo_Impl& rTableInfo, sal_uInt32 nHeaderRows = 0 ); virtual void _ExportMeta() SAL_OVERRIDE; @@ -125,8 +125,8 @@ public: inline const SvXMLUnitConverter& GetTwipUnitConverter() const; - void ExportTableAutoStyles( const SwTableNode& rTblNd ); - void ExportTable( const SwTableNode& rTblNd ); + void ExportTableAutoStyles( const SwTableNode& rTableNd ); + void ExportTable( const SwTableNode& rTableNd ); SvXMLExportItemMapper& GetTableItemMapper() { return *pTableItemMapper; } const rtl::Reference < XMLPropertySetMapper >& GetParaPropMapper() diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index f842d5a75992..af971b8e412b 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -117,7 +117,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, { if( 0 != (rEntry.nMemberId & MID_SW_FLAG_SPECIAL_ITEM_EXPORT) ) { - if( rItem.ISA( SwFmtRowSplit ) ) + if( rItem.ISA( SwFormatRowSplit ) ) { OUString aValue; bool bAddAttribute = true; @@ -429,15 +429,15 @@ bool SvXMLExportItemMapper::QueryXMLValue( case MID_FIRST_LINE_INDENT: if( !pLRSpace->IsAutoFirst() ) { - if(pLRSpace->GetPropTxtFirstLineOfst() != 100) + if(pLRSpace->GetPropTextFirstLineOfst() != 100) { ::sax::Converter::convertPercent( - aOut, pLRSpace->GetPropTxtFirstLineOfst() ); + aOut, pLRSpace->GetPropTextFirstLineOfst() ); } else { rUnitConverter.convertMeasureToXML( - aOut, pLRSpace->GetTxtFirstLineOfst() ); + aOut, pLRSpace->GetTextFirstLineOfst() ); } } else @@ -827,15 +827,15 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_BREAK: { - const SvxFmtBreakItem* pFmtBreak = PTR_CAST(SvxFmtBreakItem, &rItem); - OSL_ENSURE( pFmtBreak != NULL, "Wrong Which-ID" ); + const SvxFormatBreakItem* pFormatBreak = PTR_CAST(SvxFormatBreakItem, &rItem); + OSL_ENSURE( pFormatBreak != NULL, "Wrong Which-ID" ); unsigned int eEnum = 0; switch( nMemberId ) { case MID_BREAK_BEFORE: - switch( pFmtBreak->GetValue() ) + switch( pFormatBreak->GetValue() ) { case SVX_BREAK_COLUMN_BEFORE: eEnum = 1; @@ -851,7 +851,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( } break; case MID_BREAK_AFTER: - switch( pFmtBreak->GetValue() ) + switch( pFormatBreak->GetValue() ) { case SVX_BREAK_COLUMN_AFTER: eEnum = 1; @@ -874,11 +874,11 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_KEEP: { - const SvxFmtKeepItem* pFmtKeep = PTR_CAST(SvxFmtKeepItem, &rItem); - assert(pFmtKeep && "Wrong Which-ID"); - if (pFmtKeep) + const SvxFormatKeepItem* pFormatKeep = PTR_CAST(SvxFormatKeepItem, &rItem); + assert(pFormatKeep && "Wrong Which-ID"); + if (pFormatKeep) { - aOut.append( pFmtKeep->GetValue() + aOut.append( pFormatKeep->GetValue() ? GetXMLToken( XML_ALWAYS ) : GetXMLToken( XML_AUTO ) ); bOk = true; @@ -1002,7 +1002,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_PAGEDESC: { - const SwFmtPageDesc* pPageDesc = PTR_CAST(SwFmtPageDesc, &rItem); + const SwFormatPageDesc* pPageDesc = PTR_CAST(SwFormatPageDesc, &rItem); OSL_ENSURE( pPageDesc != NULL, "Wrong Which-ID" ); if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) @@ -1038,7 +1038,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_HORI_ORIENT: { - const SwFmtHoriOrient* pHoriOrient = PTR_CAST(SwFmtHoriOrient, &rItem); + const SwFormatHoriOrient* pHoriOrient = PTR_CAST(SwFormatHoriOrient, &rItem); assert(pHoriOrient && "Wrong Which-ID"); if (pHoriOrient) { @@ -1051,7 +1051,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_VERT_ORIENT: { - const SwFmtVertOrient* pVertOrient = PTR_CAST(SwFmtVertOrient, &rItem); + const SwFormatVertOrient* pVertOrient = PTR_CAST(SwFormatVertOrient, &rItem); assert(pVertOrient && "Wrong Which-ID"); SvXMLUnitConverter::convertEnum( aOut, pVertOrient->GetVertOrient(), @@ -1062,7 +1062,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_FRM_SIZE: { - const SwFmtFrmSize* pFrmSize = PTR_CAST(SwFmtFrmSize, &rItem); + const SwFormatFrmSize* pFrmSize = PTR_CAST(SwFormatFrmSize, &rItem); OSL_ENSURE( pFrmSize != NULL, "Wrong Which-ID" ); bool bOutHeight = false; diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index b4f243b13657..f9281cf8117b 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -386,7 +386,7 @@ void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite ) const SwDoc *pDoc = pStyle->GetDoc(); - SwTxtFmtColl *pColl = pDoc->FindTxtFmtCollByName( pStyle->GetStyleName() ); + SwTextFormatColl *pColl = pDoc->FindTextFormatCollByName( pStyle->GetStyleName() ); OSL_ENSURE( pColl, "Text collection not found" ); if( !pColl || RES_CONDTXTFMTCOLL != pColl->Which() ) return; @@ -403,14 +403,14 @@ void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite ) sName, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); - SwTxtFmtColl* pCondColl = pDoc->FindTxtFmtCollByName( sName ); + SwTextFormatColl* pCondColl = pDoc->FindTextFormatCollByName( sName ); OSL_ENSURE( pCondColl, "SwXMLItemSetStyleContext_Impl::ConnectConditions: cond coll missing" ); if( pCondColl ) { SwCollCondition aCond( pCondColl, pCond->GetCondition(), pCond->GetSubCondition() ); - static_cast<SwConditionTxtFmtColl*>(pColl)->InsertCondition( aCond ); + static_cast<SwConditionTextFormatColl*>(pColl)->InsertCondition( aCond ); } } } @@ -653,21 +653,21 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc() } const SfxPoolItem *pItem; - SwFmtPageDesc *pFmtPageDesc = 0; + SwFormatPageDesc *pFormatPageDesc = 0; if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false, &pItem ) ) { - if( static_cast<const SwFmtPageDesc *>(pItem)->GetPageDesc() != pPageDesc ) - pFmtPageDesc = new SwFmtPageDesc( *static_cast<const SwFmtPageDesc *>(pItem) ); + if( static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc() != pPageDesc ) + pFormatPageDesc = new SwFormatPageDesc( *static_cast<const SwFormatPageDesc *>(pItem) ); } else - pFmtPageDesc = new SwFmtPageDesc(); + pFormatPageDesc = new SwFormatPageDesc(); - if( pFmtPageDesc ) + if( pFormatPageDesc ) { - pFmtPageDesc->RegisterToPageDesc( *pPageDesc ); - pItemSet->Put( *pFmtPageDesc ); - delete pFmtPageDesc; + pFormatPageDesc->RegisterToPageDesc( *pPageDesc ); + pItemSet->Put( *pFormatPageDesc ); + delete pFormatPageDesc; } } @@ -690,7 +690,7 @@ bool SwXMLItemSetStyleContext_Impl::ResolveDataStyleName() SfxItemPool& rItemPool = pDoc->GetAttrPool(); pItemSet = new SfxItemSet( rItemPool, aTableBoxSetRange ); } - SwTblBoxNumFormat aNumFormatItem(nFormat); + SwTableBoxNumFormat aNumFormatItem(nFormat); pItemSet->Put(aNumFormatItem); } @@ -998,20 +998,20 @@ void SwXMLImport::FinishStyles() GetStyles()->FinishStyles( !IsInsertMode() ); } -void SwXMLImport::UpdateTxtCollConditions( SwDoc *pDoc ) +void SwXMLImport::UpdateTextCollConditions( SwDoc *pDoc ) { if( !pDoc ) pDoc = SwImport::GetDocFromXMLImport( *this ); - const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls(); + const SwTextFormatColls& rColls = *pDoc->GetTextFormatColls(); const size_t nCount = rColls.size(); for( size_t i=0; i < nCount; ++i ) { - SwTxtFmtColl *pColl = rColls[i]; + SwTextFormatColl *pColl = rColls[i]; if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() ) { - const SwFmtCollConditions& rConditions = - static_cast<const SwConditionTxtFmtColl *>(pColl)->GetCondColls(); + const SwFormatCollConditions& rConditions = + static_cast<const SwConditionTextFormatColl *>(pColl)->GetCondColls(); bool bSendModify = false; for( size_t j=0; j < rConditions.size() && !bSendModify; ++j ) { diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index ec0594b0f402..b966c22a4d2a 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -46,48 +46,48 @@ using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::lang; using namespace ::xmloff::token; -void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily ) +void SwXMLExport::ExportFormat( const SwFormat& rFormat, enum XMLTokenEnum eFamily ) { // <style:style ...> CheckAttrList(); // style:family="..." - OSL_ENSURE( RES_FRMFMT==rFmt.Which(), "frame format expected" ); - if( RES_FRMFMT != rFmt.Which() ) + OSL_ENSURE( RES_FRMFMT==rFormat.Which(), "frame format expected" ); + if( RES_FRMFMT != rFormat.Which() ) return; OSL_ENSURE( eFamily != XML_TOKEN_INVALID, "family must be specified" ); // style:name="..." bool bEncoded = false; AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, EncodeStyleName( - rFmt.GetName(), &bEncoded ) ); + rFormat.GetName(), &bEncoded ) ); if( bEncoded ) - AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, rFmt.GetName() ); + AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, rFormat.GetName() ); if( eFamily != XML_TOKEN_INVALID ) AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, eFamily ); #if OSL_DEBUG_LEVEL > 0 // style:parent-style-name="..." (if its not the default only) - const SwFmt* pParent = rFmt.DerivedFrom(); + const SwFormat* pParent = rFormat.DerivedFrom(); // Parent-Namen nur uebernehmen, wenn kein Default OSL_ENSURE( !pParent || pParent->IsDefault(), "unexpected parent" ); - OSL_ENSURE( USHRT_MAX == rFmt.GetPoolFmtId(), "pool ids arent'supported" ); - OSL_ENSURE( USHRT_MAX == rFmt.GetPoolHelpId(), "help ids arent'supported" ); - OSL_ENSURE( USHRT_MAX == rFmt.GetPoolHelpId() || - UCHAR_MAX == rFmt.GetPoolHlpFileId(), "help file ids aren't supported" ); + OSL_ENSURE( USHRT_MAX == rFormat.GetPoolFormatId(), "pool ids arent'supported" ); + OSL_ENSURE( USHRT_MAX == rFormat.GetPoolHelpId(), "help ids arent'supported" ); + OSL_ENSURE( USHRT_MAX == rFormat.GetPoolHelpId() || + UCHAR_MAX == rFormat.GetPoolHlpFileId(), "help file ids aren't supported" ); #endif // style:master-page-name - if( RES_FRMFMT == rFmt.Which() && XML_TABLE == eFamily ) + if( RES_FRMFMT == rFormat.Which() && XML_TABLE == eFamily ) { const SfxPoolItem *pItem; - if( SfxItemState::SET == rFmt.GetAttrSet().GetItemState( RES_PAGEDESC, + if( SfxItemState::SET == rFormat.GetAttrSet().GetItemState( RES_PAGEDESC, false, &pItem ) ) { OUString sName; const SwPageDesc *pPageDesc = - static_cast<const SwFmtPageDesc *>(pItem)->GetPageDesc(); + static_cast<const SwFormatPageDesc *>(pItem)->GetPageDesc(); if( pPageDesc ) SwStyleNameMapper::FillProgName( pPageDesc->GetName(), @@ -101,15 +101,15 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily ) if( XML_TABLE_CELL == eFamily ) { - OSL_ENSURE(RES_FRMFMT == rFmt.Which(), "only frame format"); + OSL_ENSURE(RES_FRMFMT == rFormat.Which(), "only frame format"); const SfxPoolItem *pItem; if( SfxItemState::SET == - rFmt.GetAttrSet().GetItemState( RES_BOXATR_FORMAT, + rFormat.GetAttrSet().GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { sal_Int32 nFormat = (sal_Int32) - static_cast<const SwTblBoxNumFormat *>(pItem)->GetValue(); + static_cast<const SwTableBoxNumFormat *>(pItem)->GetValue(); if ( (nFormat != -1) && (nFormat != css::util::NumberFormat::TEXT) ) { @@ -152,7 +152,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily ) rItemMapper.setMapEntries( xItemMap ); GetTableItemMapper().exportXML( *this, - rFmt.GetAttrSet(), + rFormat.GetAttrSet(), GetTwipUnitConverter(), ePropToken, SvXmlExportFlags::IGN_WS ); @@ -228,7 +228,7 @@ void SwXMLExport::_ExportAutoStyles() GetPageExport()->exportAutoStyles(); // we rely on data styles being written after cell styles in the - // ExportFmt() method; so be careful when changing order. + // ExportFormat() method; so be careful when changing order. exportAutoDataStyles(); SvXMLExportFlags nContentAutostyles = SvXMLExportFlags::CONTENT | SvXMLExportFlags::AUTOSTYLES; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 08ab57c90ebb..a9d264554f8d 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -492,10 +492,10 @@ static OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCurso OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); if( !xCrsrTunnel.is() ) return 0; - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper *>( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - return pTxtCrsr; + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + return pTextCrsr; } void SwXMLImport::startDocument() @@ -596,7 +596,7 @@ void SwXMLImport::startDocument() // We also might change into the insert mode later, so we have to make // sure to first set the insert mode and then create the text import // helper. Otherwise it won't have the insert flag set! - OTextCursorHelper *pTxtCrsr = 0; + OTextCursorHelper *pTextCrsr = 0; Reference < XTextCursor > xTextCursor; if( HasTextImport() ) xTextCursor = GetTextImport()->GetCursor(); @@ -609,12 +609,12 @@ void SwXMLImport::startDocument() SwDoc *pDoc = 0; if( SvXMLImportFlags::ALL == getImportFlags() ) { - pTxtCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - if( !pTxtCrsr ) + pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + if( !pTextCrsr ) return; - pDoc = pTxtCrsr->GetDoc(); + pDoc = pTextCrsr->GetDoc(); OSL_ENSURE( pDoc, "SwDoc missing" ); if( !pDoc ) return; @@ -632,7 +632,7 @@ void SwXMLImport::startDocument() *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) ); setTextInsertMode( xInsertTextRange ); xTextCursor = GetTextImport()->GetCursor(); - pTxtCrsr = 0; + pTextCrsr = 0; } else GetTextImport()->SetCursor( xTextCursor ); @@ -641,13 +641,13 @@ void SwXMLImport::startDocument() if( (!(getImportFlags() & (SvXMLImportFlags::CONTENT|SvXMLImportFlags::MASTERSTYLES)))) return; - if( !pTxtCrsr ) - pTxtCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - if( !pTxtCrsr ) + if( !pTextCrsr ) + pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor ); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + if( !pTextCrsr ) return; - SwDoc *pDoc = pTxtCrsr->GetDoc(); + SwDoc *pDoc = pTextCrsr->GetDoc(); OSL_ENSURE( pDoc, "SwDoc missing" ); if( !pDoc ) return; @@ -657,7 +657,7 @@ void SwXMLImport::startDocument() pSttNdIdx = new SwNodeIndex( pDoc->GetNodes() ); if( IsInsertMode() ) { - SwPaM *pPaM = pTxtCrsr->GetPaM(); + SwPaM *pPaM = pTextCrsr->GetPaM(); const SwPosition* pPos = pPaM->GetPoint(); // Split once and remember the node that has been splitted. @@ -669,8 +669,8 @@ void SwXMLImport::startDocument() // Insert all content into the new node pPaM->Move( fnMoveBackward ); - pDoc->SetTxtFmtColl - ( *pPaM, pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ) ); + pDoc->SetTextFormatColl + ( *pPaM, pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD, false ) ); } } @@ -729,18 +729,18 @@ void SwXMLImport::endDocument() Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(), UNO_QUERY); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper *>( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - assert(pTxtCrsr && "SwXTextCursor missing"); - SwPaM *pPaM = pTxtCrsr->GetPaM(); + assert(pTextCrsr && "SwXTextCursor missing"); + SwPaM *pPaM = pTextCrsr->GetPaM(); if( IsInsertMode() && pSttNdIdx->GetIndex() ) { // If we are in insert mode, join the splitted node that is in front // of the new content with the first new node. Or in other words: // Revert the first split node. - SwTxtNode* pTxtNode = pSttNdIdx->GetNode().GetTxtNode(); + SwTextNode* pTextNode = pSttNdIdx->GetNode().GetTextNode(); SwNodeIndex aNxtIdx( *pSttNdIdx ); - if( pTxtNode && pTxtNode->CanJoinNext( &aNxtIdx ) && + if( pTextNode && pTextNode->CanJoinNext( &aNxtIdx ) && pSttNdIdx->GetIndex() + 1 == aNxtIdx.GetIndex() ) { // If the PaM points to the first new node, move the PaM to the @@ -748,8 +748,8 @@ void SwXMLImport::endDocument() if( pPaM->GetPoint()->nNode == aNxtIdx ) { pPaM->GetPoint()->nNode = *pSttNdIdx; - pPaM->GetPoint()->nContent.Assign( pTxtNode, - pTxtNode->GetTxt().getLength()); + pPaM->GetPoint()->nContent.Assign( pTextNode, + pTextNode->GetText().getLength()); } #if OSL_DEBUG_LEVEL > 0 @@ -766,27 +766,27 @@ void SwXMLImport::endDocument() { const sal_Int32 nCntPos = pPaM->GetBound( true ).nContent.GetIndex(); - pPaM->GetBound( true ).nContent.Assign( pTxtNode, - pTxtNode->GetTxt().getLength() + nCntPos ); + pPaM->GetBound( true ).nContent.Assign( pTextNode, + pTextNode->GetText().getLength() + nCntPos ); } if( pSttNdIdx->GetIndex()+1 == pPaM->GetBound( false ).nNode.GetIndex() ) { const sal_Int32 nCntPos = pPaM->GetBound( false ).nContent.GetIndex(); - pPaM->GetBound( false ).nContent.Assign( pTxtNode, - pTxtNode->GetTxt().getLength() + nCntPos ); + pPaM->GetBound( false ).nContent.Assign( pTextNode, + pTextNode->GetText().getLength() + nCntPos ); } #endif // If the first new node isn't empty, convert the node's text // attributes into hints. Otherwise, set the new node's // paragraph style at the previous (empty) node. - SwTxtNode* pDelNd = aNxtIdx.GetNode().GetTxtNode(); - if (!pTxtNode->GetTxt().isEmpty()) - pDelNd->FmtToTxtAttr( pTxtNode ); + SwTextNode* pDelNd = aNxtIdx.GetNode().GetTextNode(); + if (!pTextNode->GetText().isEmpty()) + pDelNd->FormatToTextAttr( pTextNode ); else - pTxtNode->ChgFmtColl( pDelNd->GetTxtColl() ); - pTxtNode->JoinNext(); + pTextNode->ChgFormatColl( pDelNd->GetTextColl() ); + pTextNode->JoinNext(); } } @@ -794,21 +794,21 @@ void SwXMLImport::endDocument() OSL_ENSURE( !pPos->nContent.GetIndex(), "last paragraph isn't empty" ); if( !pPos->nContent.GetIndex() ) { - SwTxtNode* pCurrNd; + SwTextNode* pCurrNd; sal_uLong nNodeIdx = pPos->nNode.GetIndex(); pDoc = pPaM->GetDoc(); - OSL_ENSURE( pPos->nNode.GetNode().IsCntntNode(), + OSL_ENSURE( pPos->nNode.GetNode().IsContentNode(), "insert position is not a content node" ); if( !IsInsertMode() ) { // If we're not in insert mode, the last node is deleted. const SwNode *pPrev = pDoc->GetNodes()[nNodeIdx -1]; - if( pPrev->IsCntntNode() || + if( pPrev->IsContentNode() || ( pPrev->IsEndNode() && pPrev->StartOfSectionNode()->IsSectionNode() ) ) { - SwCntntNode* pCNd = pPaM->GetCntntNode(); + SwContentNode* pCNd = pPaM->GetContentNode(); if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() ) { @@ -818,13 +818,13 @@ void SwXMLImport::endDocument() } } } - else if( 0 != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTxtNode()) ) + else if( 0 != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTextNode()) ) { // Id we're in insert mode, the empty node is joined with // the next and the previous one. if( pCurrNd->CanJoinNext( &pPos->nNode )) { - SwTxtNode* pNextNd = pPos->nNode.GetNode().GetTxtNode(); + SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); pPos->nContent.Assign( pNextNd, 0 ); pPaM->SetMark(); pPaM->DeleteMark(); pNextNd->JoinPrev(); @@ -837,7 +837,7 @@ void SwXMLImport::endDocument() pNextNd->JoinPrev(); } } - else if (pCurrNd->GetTxt().isEmpty()) + else if (pCurrNd->GetText().isEmpty()) { pPos->nContent.Assign( 0, 0 ); pPaM->SetMark(); pPaM->DeleteMark(); @@ -855,9 +855,9 @@ void SwXMLImport::endDocument() if( (getImportFlags() & SvXMLImportFlags::CONTENT) || ((getImportFlags() & SvXMLImportFlags::MASTERSTYLES) && IsStylesOnlyMode()) ) { - // pDoc might be 0. In this case UpdateTxtCollCondition is looking + // pDoc might be 0. In this case UpdateTextCollCondition is looking // for it itself. - UpdateTxtCollConditions( pDoc ); + UpdateTextCollConditions( pDoc ); } GetTextImport()->ResetCursor(); @@ -1503,11 +1503,11 @@ void SwXMLImport::initialize( SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport ) { uno::Reference<lang::XUnoTunnel> xModelTunnel( rImport.GetModel(), uno::UNO_QUERY ); - SwXTextDocument *pTxtDoc = reinterpret_cast< SwXTextDocument *>( + SwXTextDocument *pTextDoc = reinterpret_cast< SwXTextDocument *>( sal::static_int_cast< sal_IntPtr >( xModelTunnel->getSomething(SwXTextDocument::getUnoTunnelId() ))); - assert( pTxtDoc ); - assert( pTxtDoc->GetDocShell() ); - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + assert( pTextDoc ); + assert( pTextDoc->GetDocShell() ); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); OSL_ENSURE( pDoc, "Where is my document?" ); return pDoc; } diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx index e6006f12b6d3..7fae001383c5 100644 --- a/sw/source/filter/xml/xmlimp.hxx +++ b/sw/source/filter/xml/xmlimp.hxx @@ -83,7 +83,7 @@ class SwXMLImport: public SvXMLImport void _InitItemImport(); void _FinitItemImport(); - void UpdateTxtCollConditions( SwDoc *pDoc ); + void UpdateTextCollConditions( SwDoc *pDoc ); void setTextInsertMode( const ::com::sun::star::uno::Reference< diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 7bd9541f659a..7774d194de86 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -283,7 +283,7 @@ bool SvXMLImportItemMapper::PutXMLValue( switch( nMemberId ) { case MID_L_MARGIN: - pLRSpace->SetTxtLeft( (sal_Int32)nAbs, (sal_uInt16)nProp ); + pLRSpace->SetTextLeft( (sal_Int32)nAbs, (sal_uInt16)nProp ); break; case MID_R_MARGIN: pLRSpace->SetRight( (sal_Int32)nAbs, (sal_uInt16)nProp ); @@ -304,7 +304,7 @@ bool SvXMLImportItemMapper::PutXMLValue( bOk = rUnitConverter.convertMeasureToCore(nAbs, rValue, -0x7fff, 0x7fff ); - pLRSpace->SetTxtFirstLineOfst( (short)nAbs, (sal_uInt16)nProp ); + pLRSpace->SetTextFirstLineOfst( (short)nAbs, (sal_uInt16)nProp ); } break; @@ -589,8 +589,8 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_BREAK: { - SvxFmtBreakItem* pFmtBreak = PTR_CAST(SvxFmtBreakItem, &rItem); - OSL_ENSURE( pFmtBreak != NULL, "Wrong Which-ID" ); + SvxFormatBreakItem* pFormatBreak = PTR_CAST(SvxFormatBreakItem, &rItem); + OSL_ENSURE( pFormatBreak != NULL, "Wrong Which-ID" ); sal_uInt16 eEnum; @@ -599,7 +599,7 @@ bool SvXMLImportItemMapper::PutXMLValue( if( eEnum == 0 ) { - pFmtBreak->SetValue( SVX_BREAK_NONE ); + pFormatBreak->SetValue( SVX_BREAK_NONE ); bOk = true; } else @@ -607,12 +607,12 @@ bool SvXMLImportItemMapper::PutXMLValue( switch( nMemberId ) { case MID_BREAK_BEFORE: - pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? + pFormatBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? SVX_BREAK_COLUMN_BEFORE : SVX_BREAK_PAGE_BEFORE) ); break; case MID_BREAK_AFTER: - pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? + pFormatBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ? SVX_BREAK_COLUMN_AFTER : SVX_BREAK_PAGE_AFTER) ); break; @@ -624,19 +624,19 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_KEEP: { - SvxFmtKeepItem* pFmtKeep = PTR_CAST(SvxFmtKeepItem, &rItem); - OSL_ENSURE( pFmtKeep != NULL, "Wrong Which-ID" ); + SvxFormatKeepItem* pFormatKeep = PTR_CAST(SvxFormatKeepItem, &rItem); + OSL_ENSURE( pFormatKeep != NULL, "Wrong Which-ID" ); if( IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_TRUE ) ) { - pFmtKeep->SetValue( true ); + pFormatKeep->SetValue( true ); bOk = true; } else if( IsXMLToken( rValue, XML_AUTO ) || IsXMLToken( rValue, XML_FALSE ) ) { - pFmtKeep->SetValue( false ); + pFormatKeep->SetValue( false ); bOk = true; } } @@ -787,7 +787,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_PAGEDESC: { - SwFmtPageDesc* pPageDesc = PTR_CAST(SwFmtPageDesc, &rItem); + SwFormatPageDesc* pPageDesc = PTR_CAST(SwFormatPageDesc, &rItem); OSL_ENSURE( pPageDesc != NULL, "Wrong Which-ID" ); if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) @@ -824,7 +824,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_HORI_ORIENT: { - SwFmtHoriOrient* pHoriOrient = PTR_CAST(SwFmtHoriOrient, &rItem); + SwFormatHoriOrient* pHoriOrient = PTR_CAST(SwFormatHoriOrient, &rItem); OSL_ENSURE( pHoriOrient != NULL, "Wrong Which-ID" ); sal_uInt16 nValue; @@ -837,7 +837,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_VERT_ORIENT: { - SwFmtVertOrient* pVertOrient = PTR_CAST(SwFmtVertOrient, &rItem); + SwFormatVertOrient* pVertOrient = PTR_CAST(SwFormatVertOrient, &rItem); OSL_ENSURE( pVertOrient != NULL, "Wrong Which-ID" ); sal_uInt16 nValue; @@ -856,7 +856,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_FRM_SIZE: { - SwFmtFrmSize* pFrmSize = PTR_CAST(SwFmtFrmSize, &rItem); + SwFormatFrmSize* pFrmSize = PTR_CAST(SwFormatFrmSize, &rItem); OSL_ENSURE( pFrmSize != NULL, "Wrong Which-ID" ); bool bSetHeight = false; diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 614ba83ea162..536dc949e43e 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -130,7 +130,7 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem( &pItem ) ) { sal_Int16 eHoriOrient = - static_cast<const SwFmtHoriOrient *>(pItem)->GetHoriOrient(); + static_cast<const SwFormatHoriOrient *>(pItem)->GetHoriOrient(); bool bExport = false; sal_uInt16 nMemberId = static_cast<sal_uInt16>( rEntry.nMemberId & MID_SW_FLAG_MASK ); @@ -232,11 +232,11 @@ void SwXMLExport::_FinitItemExport() delete pTwipUnitConv; } -void SwXMLExport::ExportTableFmt( const SwFrmFmt& rFmt, sal_uInt32 nAbsWidth ) +void SwXMLExport::ExportTableFormat( const SwFrameFormat& rFormat, sal_uInt32 nAbsWidth ) { static_cast<SwXMLTableItemMapper_Impl *>(pTableItemMapper) ->SetAbsWidth( nAbsWidth ); - ExportFmt( rFmt, XML_TABLE ); + ExportFormat( rFormat, XML_TABLE ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index ef4d17cf5010..9a201702688f 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -94,7 +94,7 @@ struct statistic { }; static const struct statistic s_stats [] = { - { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTbl, 0 }, + { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTable, 0 }, { XML_TOK_META_STAT_IMAGE, "ImageCount", &SwDocStat::nGrf, 0 }, { XML_TOK_META_STAT_OLE, "ObjectCount", &SwDocStat::nOLE, 0 }, { XML_TOK_META_STAT_PAGE, "PageCount", 0, &SwDocStat::nPage }, diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 0716e6154571..d9dd57abe32d 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -175,33 +175,33 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : } } -typedef vector< SwFrmFmt* > SwXMLFrmFmts_Impl; +typedef vector< SwFrameFormat* > SwXMLFrameFormats_Impl; -class SwXMLTableFrmFmtsSort_Impl +class SwXMLTableFrameFormatsSort_Impl { private: - SwXMLFrmFmts_Impl aFormatList; + SwXMLFrameFormats_Impl aFormatList; public: - bool AddRow( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix, sal_uInt32 nLine ); - bool AddCell( SwFrmFmt& rFrmFmt, const OUString& rNamePrefix, + bool AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine ); + bool AddCell( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nCol, sal_uInt32 nRow, bool bTop ); }; -bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, +bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine ) { - const SwFmtFrmSize *pFrmSize = 0; - const SwFmtRowSplit* pRowSplit = 0; + const SwFormatFrmSize *pFrmSize = 0; + const SwFormatRowSplit* pRowSplit = 0; const SvxBrushItem *pBrush = 0; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) - pFrmSize = static_cast<const SwFmtFrmSize *>(pItem); + pFrmSize = static_cast<const SwFormatFrmSize *>(pItem); if( SfxItemState::SET == rItemSet.GetItemState( RES_ROW_SPLIT, false, &pItem ) ) - pRowSplit = static_cast<const SwFmtRowSplit *>(pItem); + pRowSplit = static_cast<const SwFormatRowSplit *>(pItem); if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) pBrush = static_cast<const SvxBrushItem *>(pItem); @@ -212,21 +212,21 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, // order is: -/brush, size/-, size/brush bool bInsert = true; - SwXMLFrmFmts_Impl::iterator i; + SwXMLFrameFormats_Impl::iterator i; for( i = aFormatList.begin(); i < aFormatList.end(); ++i ) { - const SwFmtFrmSize *pTestFrmSize = 0; - const SwFmtRowSplit* pTestRowSplit = 0; + const SwFormatFrmSize *pTestFrmSize = 0; + const SwFormatRowSplit* pTestRowSplit = 0; const SvxBrushItem *pTestBrush = 0; - const SwFrmFmt *pTestFmt = *i; - const SfxItemSet& rTestSet = pTestFmt->GetAttrSet(); + const SwFrameFormat *pTestFormat = *i; + const SfxItemSet& rTestSet = pTestFormat->GetAttrSet(); if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false, &pItem ) ) { if( !pFrmSize ) break; - pTestFrmSize = static_cast<const SwFmtFrmSize *>(pItem); + pTestFrmSize = static_cast<const SwFormatFrmSize *>(pItem); } else { @@ -254,7 +254,7 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, if( !pRowSplit ) break; - pTestRowSplit = static_cast<const SwFmtRowSplit *>(pItem); + pTestRowSplit = static_cast<const SwFormatRowSplit *>(pItem); } else { @@ -274,16 +274,16 @@ bool SwXMLTableFrmFmtsSort_Impl::AddRow( SwFrmFmt& rFrmFmt, continue; // found! - rFrmFmt.SetName( pTestFmt->GetName() ); + rFrameFormat.SetName( pTestFormat->GetName() ); bInsert = false; break; } if( bInsert ) { - rFrmFmt.SetName( rNamePrefix + "." + OUString::number(nLine+1UL) ); + rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1UL) ); if ( i != aFormatList.end() ) ++i; - aFormatList.insert( i, &rFrmFmt ); + aFormatList.insert( i, &rFrameFormat ); } return bInsert; @@ -295,7 +295,7 @@ static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix, if( bTop ) { OUString sTmp; - sw_GetTblBoxColStr( (sal_uInt16)nCol, sTmp ); + sw_GetTableBoxColStr( (sal_uInt16)nCol, sTmp ); return rNamePrefix + "." + sTmp + OUString::number(nRow + 1); } return rNamePrefix @@ -303,21 +303,21 @@ static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix, + "." + OUString::number(nRow + 1); } -bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, +bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nCol, sal_uInt32 nRow, bool bTop ) { - const SwFmtVertOrient *pVertOrient = 0; + const SwFormatVertOrient *pVertOrient = 0; const SvxBrushItem *pBrush = 0; const SvxBoxItem *pBox = 0; - const SwTblBoxNumFormat *pNumFmt = 0; + const SwTableBoxNumFormat *pNumFormat = 0; const SvxFrameDirectionItem *pFrameDir = 0; - const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet(); + const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet(); const SfxPoolItem *pItem; if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) - pVertOrient = static_cast<const SwFmtVertOrient *>(pItem); + pVertOrient = static_cast<const SwFormatVertOrient *>(pItem); if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false, &pItem ) ) pBrush = static_cast<const SvxBrushItem *>(pItem); @@ -327,13 +327,13 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, if ( SfxItemState::SET == rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) - pNumFmt = static_cast<const SwTblBoxNumFormat *>(pItem); + pNumFormat = static_cast<const SwTableBoxNumFormat *>(pItem); if ( SfxItemState::SET == rItemSet.GetItemState( RES_FRAMEDIR, false, &pItem ) ) pFrameDir = static_cast<const SvxFrameDirectionItem *>(pItem); // empty styles have not to be exported - if( !pVertOrient && !pBrush && !pBox && !pNumFmt && !pFrameDir ) + if( !pVertOrient && !pBrush && !pBox && !pNumFormat && !pFrameDir ) return false; // order is: -/-/-/num, @@ -343,23 +343,23 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, // vert/brush/-/-, vert/brush/-/num, vert/brush/box/-, // vert/brush/box/num bool bInsert = true; - SwXMLFrmFmts_Impl::iterator i; + SwXMLFrameFormats_Impl::iterator i; for( i = aFormatList.begin(); i < aFormatList.end(); ++i ) { - const SwFmtVertOrient *pTestVertOrient = 0; + const SwFormatVertOrient *pTestVertOrient = 0; const SvxBrushItem *pTestBrush = 0; const SvxBoxItem *pTestBox = 0; - const SwTblBoxNumFormat *pTestNumFmt = 0; + const SwTableBoxNumFormat *pTestNumFormat = 0; const SvxFrameDirectionItem *pTestFrameDir = 0; - const SwFrmFmt* pTestFmt = *i; - const SfxItemSet& rTestSet = pTestFmt->GetAttrSet(); + const SwFrameFormat* pTestFormat = *i; + const SfxItemSet& rTestSet = pTestFormat->GetAttrSet(); if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) ) { if( !pVertOrient ) break; - pTestVertOrient = static_cast<const SwFmtVertOrient *>(pItem); + pTestVertOrient = static_cast<const SwFormatVertOrient *>(pItem); } else { @@ -397,14 +397,14 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, if ( SfxItemState::SET == rTestSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) ) { - if( !pNumFmt ) + if( !pNumFormat ) break; - pTestNumFmt = static_cast<const SwTblBoxNumFormat *>(pItem); + pTestNumFormat = static_cast<const SwTableBoxNumFormat *>(pItem); } else { - if( pNumFmt ) + if( pNumFormat ) continue; } @@ -434,23 +434,23 @@ bool SwXMLTableFrmFmtsSort_Impl::AddCell( SwFrmFmt& rFrmFmt, if( pBox && ( *pBox != *pTestBox ) ) continue; - if( pNumFmt && pNumFmt->GetValue() != pTestNumFmt->GetValue() ) + if( pNumFormat && pNumFormat->GetValue() != pTestNumFormat->GetValue() ) continue; if( pFrameDir && pFrameDir->GetValue() != pTestFrameDir->GetValue() ) continue; // found! - rFrmFmt.SetName( pTestFmt->GetName() ); + rFrameFormat.SetName( pTestFormat->GetName() ); bInsert = false; break; } if( bInsert ) { - rFrmFmt.SetName( lcl_xmltble_appendBoxPrefix( rNamePrefix, nCol, nRow, bTop ) ); + rFrameFormat.SetName( lcl_xmltble_appendBoxPrefix( rNamePrefix, nCol, nRow, bTop ) ); if ( i != aFormatList.end() ) ++i; - aFormatList.insert( i, &rFrmFmt ); + aFormatList.insert( i, &rFrameFormat ); } return bInsert; @@ -465,10 +465,10 @@ class SwXMLTableInfo_Impl public: - inline SwXMLTableInfo_Impl( const SwTable *pTbl, sal_uInt16 nPrefix ); + inline SwXMLTableInfo_Impl( const SwTable *pTable, sal_uInt16 nPrefix ); const SwTable *GetTable() const { return m_pTable; } - const SwFrmFmt *GetTblFmt() const { return m_pTable->GetFrmFmt(); } + const SwFrameFormat *GetTableFormat() const { return m_pTable->GetFrameFormat(); } bool IsBaseSectionValid() const { return m_bBaseSectionValid; } const Reference<XTextSection>& GetBaseSection() const { return m_xBaseSection; } @@ -537,9 +537,9 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, sal_uInt32 nAbsWidth, sal_uInt32 nBaseWidth, const OUString& rNamePrefix, SwXMLTableColumnsSortByWidth_Impl& rExpCols, - SwXMLTableFrmFmtsSort_Impl& rExpRows, - SwXMLTableFrmFmtsSort_Impl& rExpCells, - SwXMLTableInfo_Impl& rTblInfo, + SwXMLTableFrameFormatsSort_Impl& rExpRows, + SwXMLTableFrameFormatsSort_Impl& rExpCells, + SwXMLTableInfo_Impl& rTableInfo, bool bTop ) { // pass 1: calculate columns @@ -597,7 +597,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, if( bTop ) { OUString sTmp; - sw_GetTblBoxColStr( nColumn, sTmp ); + sw_GetTableBoxColStr( nColumn, sTmp ); pColumn->SetStyleName( rNamePrefix + "." + sTmp ); } else @@ -616,9 +616,9 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, { SwTableLine *pLine = rLines[nLine]; - SwFrmFmt *pFrmFmt = pLine->GetFrmFmt(); - if( rExpRows.AddRow( *pFrmFmt, rNamePrefix, nLine ) ) - ExportFmt( *pFrmFmt, XML_TABLE_ROW ); + SwFrameFormat *pFrameFormat = pLine->GetFrameFormat(); + if( rExpRows.AddRow( *pFrameFormat, rNamePrefix, nLine ) ) + ExportFormat( *pFrameFormat, XML_TABLE_ROW ); const SwTableBoxes& rBoxes = pLine->GetTabBoxes(); const size_t nBoxes = rBoxes.size(); @@ -644,26 +644,26 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, const SwStartNode *pBoxSttNd = pBox->GetSttNd(); if( pBoxSttNd ) { - SwFrmFmt *pFrmFmt2 = pBox->GetFrmFmt(); - if( rExpCells.AddCell( *pFrmFmt2, rNamePrefix, nOldCol, nLine, + SwFrameFormat *pFrameFormat2 = pBox->GetFrameFormat(); + if( rExpCells.AddCell( *pFrameFormat2, rNamePrefix, nOldCol, nLine, bTop) ) - ExportFmt( *pFrmFmt2, XML_TABLE_CELL ); + ExportFormat( *pFrameFormat2, XML_TABLE_CELL ); Reference < XCell > xCell = SwXCell::CreateXCell( - const_cast<SwFrmFmt *>(rTblInfo.GetTblFmt()), + const_cast<SwFrameFormat *>(rTableInfo.GetTableFormat()), pBox, - const_cast<SwTable *>(rTblInfo.GetTable()) ); + const_cast<SwTable *>(rTableInfo.GetTable()) ); if (xCell.is()) { Reference < XText > xText( xCell, UNO_QUERY ); - if( !rTblInfo.IsBaseSectionValid() ) + if( !rTableInfo.IsBaseSectionValid() ) { Reference<XPropertySet> xCellPropertySet( xCell, UNO_QUERY ); Any aAny = xCellPropertySet->getPropertyValue("TextSection"); Reference < XTextSection > xTextSection; aAny >>= xTextSection; - rTblInfo.SetBaseSection( xTextSection ); + rTableInfo.SetBaseSection( xTextSection ); } const bool bExportContent = bool(getExportFlags() & SvXMLExportFlags::CONTENT ); @@ -671,7 +671,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, { // AUTOSTYLES - not needed anymore if we are currently exporting content.xml GetTextParagraphExport()->collectTextAutoStyles( - xText, rTblInfo.GetBaseSection(), IsShowProgress() ); + xText, rTableInfo.GetBaseSection(), IsShowProgress() ); } } else { @@ -685,7 +685,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, lcl_xmltble_appendBoxPrefix( rNamePrefix, nOldCol, nLine, bTop ), rExpCols, rExpRows, rExpCells, - rTblInfo ); + rTableInfo ); } nCol++; @@ -693,15 +693,15 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, } } -void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd ) +void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd ) { - const SwTable& rTbl = rTblNd.GetTable(); - const SwFrmFmt *pTblFmt = rTbl.GetFrmFmt(); + const SwTable& rTable = rTableNd.GetTable(); + const SwFrameFormat *pTableFormat = rTable.GetFrameFormat(); - if( pTblFmt ) + if( pTableFormat ) { - sal_Int16 eTabHoriOri = pTblFmt->GetHoriOrient().GetHoriOrient(); - const SwFmtFrmSize& rFrmSize = pTblFmt->GetFrmSize(); + sal_Int16 eTabHoriOri = pTableFormat->GetHoriOrient().GetHoriOrient(); + const SwFormatFrmSize& rFrmSize = pTableFormat->GetFrmSize(); sal_uInt32 nAbsWidth = rFrmSize.GetSize().Width(); sal_uInt32 nBaseWidth = 0UL; @@ -712,36 +712,36 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd ) if( bFixAbsWidth ) { nBaseWidth = nAbsWidth; - nAbsWidth = pTblFmt->FindLayoutRect(true).Width(); + nAbsWidth = pTableFormat->FindLayoutRect(true).Width(); if( !nAbsWidth ) { // TODO? } } - ExportTableFmt( *pTblFmt, nAbsWidth ); + ExportTableFormat( *pTableFormat, nAbsWidth ); SwXMLTableColumnsSortByWidth_Impl aExpCols; - SwXMLTableFrmFmtsSort_Impl aExpRows; - SwXMLTableFrmFmtsSort_Impl aExpCells; - SwXMLTableInfo_Impl aTblInfo( &rTbl, XML_NAMESPACE_TABLE ); - ExportTableLinesAutoStyles( rTbl.GetTabLines(), nAbsWidth, nBaseWidth, - pTblFmt->GetName(), aExpCols, aExpRows, aExpCells, - aTblInfo, true); + SwXMLTableFrameFormatsSort_Impl aExpRows; + SwXMLTableFrameFormatsSort_Impl aExpCells; + SwXMLTableInfo_Impl aTableInfo( &rTable, XML_NAMESPACE_TABLE ); + ExportTableLinesAutoStyles( rTable.GetTabLines(), nAbsWidth, nBaseWidth, + pTableFormat->GetName(), aExpCols, aExpRows, aExpCells, + aTableInfo, true); } } void SwXMLExport::ExportTableBox( const SwTableBox& rBox, sal_uInt32 nColSpan, sal_uInt32 nRowSpan, - SwXMLTableInfo_Impl& rTblInfo ) + SwXMLTableInfo_Impl& rTableInfo ) { const SwStartNode *pBoxSttNd = rBox.GetSttNd(); if( pBoxSttNd ) { - const SwFrmFmt *pFrmFmt = rBox.GetFrmFmt(); - if( pFrmFmt ) + const SwFrameFormat *pFrameFormat = rBox.GetFrameFormat(); + if( pFrameFormat ) { - const OUString sName = pFrmFmt->GetName(); + const OUString sName = pFrameFormat->GetName(); if( !sName.isEmpty() ) { AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(sName) ); @@ -766,9 +766,9 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, { // start node -> normal cell // get cell range for table - Reference<XCell> xCell = SwXCell::CreateXCell( const_cast<SwFrmFmt *>(rTblInfo.GetTblFmt()), + Reference<XCell> xCell = SwXCell::CreateXCell( const_cast<SwFrameFormat *>(rTableInfo.GetTableFormat()), const_cast<SwTableBox *>(&rBox), - const_cast<SwTable *>(rTblInfo.GetTable()) ); + const_cast<SwTable *>(rTableInfo.GetTable()) ); if (xCell.is()) { @@ -822,22 +822,22 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, XML_TRUE ); } - if( !rTblInfo.IsBaseSectionValid() ) + if( !rTableInfo.IsBaseSectionValid() ) { aAny = xCellPropertySet->getPropertyValue("TextSection"); Reference < XTextSection > xTextSection; aAny >>= xTextSection; - rTblInfo.SetBaseSection( xTextSection ); + rTableInfo.SetBaseSection( xTextSection ); } } // export cell element - SvXMLElementExport aElem( *this, rTblInfo.GetPrefix(), + SvXMLElementExport aElem( *this, rTableInfo.GetPrefix(), XML_TABLE_CELL, true, true ); // export cell content GetTextParagraphExport()->exportText( xText, - rTblInfo.GetBaseSection(), + rTableInfo.GetBaseSection(), IsShowProgress() ); } else @@ -857,7 +857,7 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, SvXMLElementExport aElemExport( *this, XML_NAMESPACE_TABLE, XML_TABLE, true, true ); - ExportTableLines( rBox.GetTabLines(), rTblInfo ); + ExportTableLines( rBox.GetTabLines(), rTableInfo ); } } } @@ -865,17 +865,17 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, void SwXMLExport::ExportTableLine( const SwTableLine& rLine, const SwXMLTableLines_Impl& rLines, - SwXMLTableInfo_Impl& rTblInfo ) + SwXMLTableInfo_Impl& rTableInfo ) { if( rLine.hasSoftPageBreak() ) { SvXMLElementExport aElem( *this, XML_NAMESPACE_TEXT, XML_SOFT_PAGE_BREAK, true, true ); } - const SwFrmFmt *pFrmFmt = rLine.GetFrmFmt(); - if( pFrmFmt ) + const SwFrameFormat *pFrameFormat = rLine.GetFrameFormat(); + if( pFrameFormat ) { - const OUString sName = pFrmFmt->GetName(); + const OUString sName = pFrameFormat->GetName(); if( !sName.isEmpty() ) { AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(sName) ); @@ -883,7 +883,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, } { - SvXMLElementExport aElem( *this, rTblInfo.GetPrefix(), XML_TABLE_ROW, true, true ); + SvXMLElementExport aElem( *this, rTableInfo.GetPrefix(), XML_TABLE_ROW, true, true ); const SwTableBoxes& rBoxes = rLine.GetTabBoxes(); const size_t nBoxes = rBoxes.size(); @@ -897,7 +897,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, const long nRowSpan = pBox->getRowSpan(); if( nRowSpan < 1 ) { - SvXMLElementExport aElem2( *this, rTblInfo.GetPrefix(), + SvXMLElementExport aElem2( *this, rTableInfo.GetPrefix(), XML_COVERED_TABLE_CELL, true, false ); } @@ -926,11 +926,11 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, const sal_uInt32 nColSpan = nCol - nOldCol + 1U; if ( nRowSpan >= 1 ) - ExportTableBox( *pBox, nColSpan, static_cast< sal_uInt32 >(nRowSpan), rTblInfo ); + ExportTableBox( *pBox, nColSpan, static_cast< sal_uInt32 >(nRowSpan), rTableInfo ); for( size_t i=nOldCol; i<nCol; ++i ) { - SvXMLElementExport aElemExport( *this, rTblInfo.GetPrefix(), + SvXMLElementExport aElemExport( *this, rTableInfo.GetPrefix(), XML_COVERED_TABLE_CELL, true, false ); } @@ -941,7 +941,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine, } void SwXMLExport::ExportTableLines( const SwTableLines& rLines, - SwXMLTableInfo_Impl& rTblInfo, + SwXMLTableInfo_Impl& rTableInfo, sal_uInt32 nHeaderRows ) { OSL_ENSURE( pTableLines && !pTableLines->empty(), @@ -1004,7 +1004,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines, } { - SvXMLElementExport aElem( *this, rTblInfo.GetPrefix(), XML_TABLE_COLUMN, true, true ); + SvXMLElementExport aElem( *this, rTableInfo.GetPrefix(), XML_TABLE_COLUMN, true, true ); } nColRep = 1; @@ -1022,12 +1022,12 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines, OSL_ENSURE( nHeaderRows <= nLines, "more headers then lines?" ); for( size_t nLine = 0U; nLine < nHeaderRows; ++nLine ) - ExportTableLine( *(rLines[nLine]), *pLines, rTblInfo ); + ExportTableLine( *(rLines[nLine]), *pLines, rTableInfo ); } // export remaining rows for( size_t nLine = nHeaderRows; nLine < nLines; ++nLine ) { - ExportTableLine( *(rLines[nLine]), *pLines, rTblInfo ); + ExportTableLine( *(rLines[nLine]), *pLines, rTableInfo ); } delete pLines; @@ -1044,9 +1044,9 @@ static void lcl_xmltble_ClearName_Box( SwTableBox* pBox ) } else { - SwFrmFmt *pFrmFmt = pBox->GetFrmFmt(); - if( pFrmFmt && !pFrmFmt->GetName().isEmpty() ) - pFrmFmt->SetName( OUString() ); + SwFrameFormat *pFrameFormat = pBox->GetFrameFormat(); + if( pFrameFormat && !pFrameFormat->GetName().isEmpty() ) + pFrameFormat->SetName( OUString() ); } } @@ -1056,21 +1056,21 @@ void lcl_xmltble_ClearName_Line( SwTableLine* pLine ) lcl_xmltble_ClearName_Box( pBox ); } -void SwXMLExport::ExportTable( const SwTableNode& rTblNd ) +void SwXMLExport::ExportTable( const SwTableNode& rTableNd ) { - const SwTable& rTbl = rTblNd.GetTable(); - const SwFrmFmt *pTblFmt = rTbl.GetFrmFmt(); - if( pTblFmt && !pTblFmt->GetName().isEmpty() ) + const SwTable& rTable = rTableNd.GetTable(); + const SwFrameFormat *pTableFormat = rTable.GetFrameFormat(); + if( pTableFormat && !pTableFormat->GetName().isEmpty() ) { - AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, pTblFmt->GetName() ); + AddAttribute( XML_NAMESPACE_TABLE, XML_NAME, pTableFormat->GetName() ); AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME, - EncodeStyleName( pTblFmt->GetName() ) ); + EncodeStyleName( pTableFormat->GetName() ) ); } sal_uInt16 nPrefix = XML_NAMESPACE_TABLE; - if (const SwFrmFmt* pFlyFormat = rTblNd.GetFlyFmt()) + if (const SwFrameFormat* pFlyFormat = rTableNd.GetFlyFormat()) { - std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(rTblNd.GetDoc()); + std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(rTableNd.GetDoc()); if (aTextBoxes.find(pFlyFormat) != aTextBoxes.end()) nPrefix = XML_NAMESPACE_LO_EXT; } @@ -1079,18 +1079,18 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd ) SvXMLElementExport aElem( *this, nPrefix, XML_TABLE, true, true ); // export DDE source (if this is a DDE table) - if ( rTbl.ISA(SwDDETable) ) + if ( rTable.ISA(SwDDETable) ) { // get DDE Field Type (contains the DDE connection) - const SwDDEFieldType* pDDEFldType = - static_cast<const SwDDETable&>(rTbl).GetDDEFldType(); + const SwDDEFieldType* pDDEFieldType = + static_cast<const SwDDETable&>(rTable).GetDDEFieldType(); // connection name AddAttribute( XML_NAMESPACE_OFFICE, XML_NAME, - pDDEFldType->GetName() ); + pDDEFieldType->GetName() ); // DDE command - const OUString sCmd = pDDEFldType->GetCmd(); + const OUString sCmd = pDDEFieldType->GetCmd(); AddAttribute( XML_NAMESPACE_OFFICE, XML_DDE_APPLICATION, sCmd.getToken(0, sfx2::cTokenSeparator) ); AddAttribute( XML_NAMESPACE_OFFICE, XML_DDE_ITEM, @@ -1099,7 +1099,7 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd ) sCmd.getToken(2, sfx2::cTokenSeparator) ); // auto update - if (pDDEFldType->GetType() == SfxLinkUpdateMode::ALWAYS) + if (pDDEFieldType->GetType() == SfxLinkUpdateMode::ALWAYS) { AddAttribute( XML_NAMESPACE_OFFICE, XML_AUTOMATIC_UPDATE, XML_TRUE ); @@ -1110,10 +1110,10 @@ void SwXMLExport::ExportTable( const SwTableNode& rTblNd ) XML_DDE_SOURCE, true, false); } - SwXMLTableInfo_Impl aTblInfo( &rTbl, nPrefix ); - ExportTableLines( rTbl.GetTabLines(), aTblInfo, rTbl.GetRowsToRepeat() ); + SwXMLTableInfo_Impl aTableInfo( &rTable, nPrefix ); + ExportTableLines( rTable.GetTabLines(), aTableInfo, rTable.GetRowsToRepeat() ); - for( SwTableLine *pLine : ((SwTable &)rTbl).GetTabLines() ) + for( SwTableLine *pLine : ((SwTable &)rTable).GetTabLines() ) lcl_xmltble_ClearName_Line( pLine ); } } @@ -1125,9 +1125,9 @@ void SwXMLTextParagraphExport::exportTable( bool bOldShowProgress = static_cast<SwXMLExport&>(GetExport()).IsShowProgress(); static_cast<SwXMLExport&>(GetExport()).SetShowProgress( _bProgress ); - Reference < XTextTable > xTxtTbl( rTextContent, UNO_QUERY ); - OSL_ENSURE( xTxtTbl.is(), "text table missing" ); - if( xTxtTbl.is() ) + Reference < XTextTable > xTextTable( rTextContent, UNO_QUERY ); + OSL_ENSURE( xTextTable.is(), "text table missing" ); + if( xTextTable.is() ) { const SwXTextTable *pXTable = 0; Reference<XUnoTunnel> xTableTunnel( rTextContent, UNO_QUERY); @@ -1139,27 +1139,27 @@ void SwXMLTextParagraphExport::exportTable( } if( pXTable ) { - SwFrmFmt *pFmt = pXTable->GetFrmFmt(); - OSL_ENSURE( pFmt, "table format missing" ); - const SwTable *pTbl = SwTable::FindTable( pFmt ); - OSL_ENSURE( pTbl, "table missing" ); - const SwTableNode *pTblNd = pTbl->GetTableNode(); - OSL_ENSURE( pTblNd, "table node missing" ); + SwFrameFormat *pFormat = pXTable->GetFrameFormat(); + OSL_ENSURE( pFormat, "table format missing" ); + const SwTable *pTable = SwTable::FindTable( pFormat ); + OSL_ENSURE( pTable, "table missing" ); + const SwTableNode *pTableNd = pTable->GetTableNode(); + OSL_ENSURE( pTableNd, "table node missing" ); if( bAutoStyles ) { - SwNodeIndex aIdx( *pTblNd ); + SwNodeIndex aIdx( *pTableNd ); // AUTOSTYLES: Optimization: Do not export table autostyle if // we are currently exporting the content.xml stuff and // the table is located in header/footer: // During the flat XML export (used e.g. by .sdw-export) // ALL flags are set at the same time. const bool bExportStyles = bool( GetExport().getExportFlags() & SvXMLExportFlags::STYLES ); - if ( bExportStyles || !pFmt->GetDoc()->IsInHeaderFooter( aIdx ) ) - static_cast<SwXMLExport&>(GetExport()).ExportTableAutoStyles( *pTblNd ); + if ( bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter( aIdx ) ) + static_cast<SwXMLExport&>(GetExport()).ExportTableAutoStyles( *pTableNd ); } else { - static_cast<SwXMLExport&>(GetExport()).ExportTable( *pTblNd ); + static_cast<SwXMLExport&>(GetExport()).ExportTable( *pTableNd ); } } } diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 42b9437aa075..a478cb726ee2 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -643,12 +643,12 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext( { if( !HasContent() ) { - SwXMLTableContext *pTblContext = + SwXMLTableContext *pTableContext = new SwXMLTableContext( GetSwImport(), nPrefix, rLocalName, xAttrList, GetTable() ); - pContext = pTblContext; + pContext = pTableContext; if( GetTable()->IsValid() ) - InsertContent( pTblContext ); + InsertContent( pTableContext ); GetTable()->SetHasSubTables( true ); } @@ -683,18 +683,18 @@ void SwXMLTableCellContext_Impl::EndElement() { // The original text is invalid after deleting the last // paragraph - Reference < XTextCursor > xSrcTxtCursor = + Reference < XTextCursor > xSrcTextCursor = GetImport().GetTextImport()->GetText()->createTextCursor(); - xSrcTxtCursor->gotoEnd( sal_True ); + xSrcTextCursor->gotoEnd( sal_True ); // Until we have an API for copying we have to use the core. - Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTxtCursor, UNO_QUERY); + Reference<XUnoTunnel> xSrcCrsrTunnel( xSrcTextCursor, UNO_QUERY); assert(xSrcCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pSrcTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pSrcTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xSrcCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - assert(pSrcTxtCrsr && "SwXTextCursor missing"); - SwDoc *pDoc = pSrcTxtCrsr->GetDoc(); - const SwPaM *pSrcPaM = pSrcTxtCrsr->GetPaM(); + assert(pSrcTextCrsr && "SwXTextCursor missing"); + SwDoc *pDoc = pSrcTextCrsr->GetDoc(); + const SwPaM *pSrcPaM = pSrcTextCrsr->GetPaM(); while( nColRepeat > 1 && GetTable()->IsInsertCellPossible() ) { @@ -703,11 +703,11 @@ void SwXMLTableCellContext_Impl::EndElement() Reference<XUnoTunnel> xDstCrsrTunnel( GetImport().GetTextImport()->GetCursor(), UNO_QUERY); assert(xDstCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pDstTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pDstTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xDstCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )) ); - assert(pDstTxtCrsr && "SwXTextCursor missing"); + assert(pDstTextCrsr && "SwXTextCursor missing"); SwPaM aSrcPaM(*pSrcPaM->GetMark(), *pSrcPaM->GetPoint()); - SwPosition aDstPos( *pDstTxtCrsr->GetPaM()->GetPoint() ); + SwPosition aDstPos( *pDstTextCrsr->GetPaM()->GetPoint() ); pDoc->getIDocumentContentOperations().CopyRange( aSrcPaM, aDstPos, /*bCopyAll=*/false, /*bCheckPos=*/true ); nColRepeat--; @@ -798,7 +798,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) { - const SwFmtFrmSize *pSize = static_cast<const SwFmtFrmSize *>(pItem); + const SwFormatFrmSize *pSize = static_cast<const SwFormatFrmSize *>(pItem); nWidth = pSize->GetWidth(); bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType(); } @@ -1144,7 +1144,7 @@ void SwXMLDDETableContext_Impl::StartElement( } // generate a new name for DDE field type (called by lcl_GetDDEFieldType below) -static OUString lcl_GenerateFldTypeName(const OUString& sPrefix, SwTableNode* pTableNode) +static OUString lcl_GenerateFieldTypeName(const OUString& sPrefix, SwTableNode* pTableNode) { const OUString sPrefixStr(sPrefix.isEmpty() ? OUString("_") : sPrefix); @@ -1160,7 +1160,7 @@ static OUString lcl_GenerateFldTypeName(const OUString& sPrefix, SwTableNode* pT ++nCount; sName = sPrefixStr + OUString::number(nCount); } - while (NULL != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFldType(RES_DDEFLD, sName, false)); + while (NULL != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false)); return sName; } @@ -1188,13 +1188,13 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, // valid name? if (sName.isEmpty()) { - sName = lcl_GenerateFldTypeName(pContext->GetDDEApplication(), + sName = lcl_GenerateFieldTypeName(pContext->GetDDEApplication(), pTableNode); } else { // check for existing DDE field type with the same name - SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFldType(RES_DDEFLD, sName, false)); + SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false)); if (NULL != pOldType) { // same values -> return old type @@ -1207,7 +1207,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, else { // same name, different values -> think of new name - sName = lcl_GenerateFldTypeName(pContext->GetDDEApplication(), + sName = lcl_GenerateFieldTypeName(pContext->GetDDEApplication(), pTableNode); } } @@ -1220,7 +1220,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, // create new field type and return SwDDEFieldType aDDEFieldType(sName, sCommand, nType); pType = static_cast<SwDDEFieldType*>(pTableNode-> - GetDoc()->getIDocumentFieldsAccess().InsertFldType(aDDEFieldType)); + GetDoc()->getIDocumentFieldsAccess().InsertFieldType(aDDEFieldType)); } OSL_ENSURE(NULL != pType, "We really want a SwDDEFieldType here!"); @@ -1284,8 +1284,8 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, pTableNode( 0 ), pBox1( 0 ), pSttNd1( 0 ), - pBoxFmt( 0 ), - pLineFmt( 0 ), + pBoxFormat( 0 ), + pLineFormat( 0 ), pSharedBoxFormats(NULL), pDDESource(NULL), bFirstSection( true ), @@ -1330,18 +1330,18 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, SwDoc *pDoc = SwImport::GetDocFromXMLImport( GetSwImport() ); - OUString sTblName; + OUString sTableName; if( !aName.isEmpty() ) { - const SwTableFmt *pTblFmt = pDoc->FindTblFmtByName( aName ); - if( !pTblFmt ) - sTblName = aName; + const SwTableFormat *pTableFormat = pDoc->FindTableFormatByName( aName ); + if( !pTableFormat ) + sTableName = aName; } - if( sTblName.isEmpty() ) + if( sTableName.isEmpty() ) { - sTblName = pDoc->GetUniqueTblName(); + sTableName = pDoc->GetUniqueTableName(); GetImport().GetTextImport() - ->GetRenameMap().Add( XML_TEXT_RENAME_TYPE_TABLE, aName, sTblName ); + ->GetRenameMap().Add( XML_TEXT_RENAME_TYPE_TABLE, aName, sTableName ); } Reference< XTextTable > xTable; @@ -1398,14 +1398,14 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, } if( pXTable ) { - SwFrmFmt *pTblFrmFmt = pXTable->GetFrmFmt(); - OSL_ENSURE( pTblFrmFmt, "table format missing" ); - SwTable *pTbl = SwTable::FindTable( pTblFrmFmt ); - OSL_ENSURE( pTbl, "table missing" ); - pTableNode = pTbl->GetTableNode(); + SwFrameFormat *pTableFrameFormat = pXTable->GetFrameFormat(); + OSL_ENSURE( pTableFrameFormat, "table format missing" ); + SwTable *pTable = SwTable::FindTable( pTableFrameFormat ); + OSL_ENSURE( pTable, "table missing" ); + pTableNode = pTable->GetTableNode(); OSL_ENSURE( pTableNode, "table node missing" ); - pTblFrmFmt->SetName( sTblName ); + pTableFrameFormat->SetName( sTableName ); SwTableLine *pLine1 = pTableNode->GetTable().GetTabLines()[0U]; pBox1 = pLine1->GetTabBoxes()[0U]; @@ -1424,8 +1424,8 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, pTableNode( pTable->pTableNode ), pBox1( 0 ), pSttNd1( 0 ), - pBoxFmt( 0 ), - pLineFmt( 0 ), + pBoxFormat( 0 ), + pLineFormat( 0 ), pSharedBoxFormats(NULL), xParentTable( pTable ), pDDESource(NULL), @@ -1844,12 +1844,12 @@ SwTableBox *SwXMLTableContext::NewTableBox( const SwStartNode *pStNd, pBox1 = 0; } else - pBox = new SwTableBox( pBoxFmt, *pStNd, pUpper ); + pBox = new SwTableBox( pBoxFormat, *pStNd, pUpper ); return pBox; } -SwTableBoxFmt* SwXMLTableContext::GetSharedBoxFormat( +SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat( SwTableBox* pBox, const OUString& rStyleName, sal_Int32 nColumnWidth, @@ -1859,48 +1859,48 @@ SwTableBoxFmt* SwXMLTableContext::GetSharedBoxFormat( bool* pModifyLocked ) { if ( pSharedBoxFormats == NULL ) - pSharedBoxFormats = new map_BoxFmt(); + pSharedBoxFormats = new map_BoxFormat(); - SwTableBoxFmt* pBoxFmt2; + SwTableBoxFormat* pBoxFormat2; TableBoxIndex aKey( rStyleName, nColumnWidth, bProtected ); - map_BoxFmt::iterator aIter = pSharedBoxFormats->find( aKey ); + map_BoxFormat::iterator aIter = pSharedBoxFormats->find( aKey ); if ( aIter == pSharedBoxFormats->end() ) { // unknown format so far -> construct a new one // get the old format, and reset all attributes // (but preserve FillOrder) - pBoxFmt2 = static_cast<SwTableBoxFmt*>(pBox->ClaimFrmFmt()); - SwFmtFillOrder aFillOrder( pBoxFmt2->GetFillOrder() ); - pBoxFmt2->ResetAllFmtAttr(); // #i73790# - method renamed - pBoxFmt2->SetFmtAttr( aFillOrder ); + pBoxFormat2 = static_cast<SwTableBoxFormat*>(pBox->ClaimFrameFormat()); + SwFormatFillOrder aFillOrder( pBoxFormat2->GetFillOrder() ); + pBoxFormat2->ResetAllFormatAttr(); // #i73790# - method renamed + pBoxFormat2->SetFormatAttr( aFillOrder ); bNew = true; // it's a new format now // share this format, if allowed if ( bMayShare ) - (*pSharedBoxFormats)[ aKey ] = pBoxFmt2; + (*pSharedBoxFormats)[ aKey ] = pBoxFormat2; } else { // set the shared format - pBoxFmt2 = aIter->second; - pBox->ChgFrmFmt( pBoxFmt2 ); + pBoxFormat2 = aIter->second; + pBox->ChgFrameFormat( pBoxFormat2 ); bNew = false; // copied from an existing format // claim it, if we are not allowed to share if ( !bMayShare ) - pBoxFmt2 = static_cast<SwTableBoxFmt*>(pBox->ClaimFrmFmt()); + pBoxFormat2 = static_cast<SwTableBoxFormat*>(pBox->ClaimFrameFormat()); } // lock format (if so desired) if ( pModifyLocked != NULL ) { - (*pModifyLocked) = pBoxFmt2->IsModifyLocked(); - pBoxFmt2->LockModify(); + (*pModifyLocked) = pBoxFormat2->IsModifyLocked(); + pBoxFormat2->LockModify(); } - return pBoxFmt2; + return pBoxFormat2; } SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, @@ -1910,18 +1910,18 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, sal_uInt32 nRightCol ) { //FIXME: here would be a great place to handle XmlId for cell - SwTableBox *pBox = new SwTableBox( pBoxFmt, 0, pUpper ); + SwTableBox *pBox = new SwTableBox( pBoxFormat, 0, pUpper ); sal_uInt32 nColSpan = nRightCol - nLeftCol; sal_Int32 nColWidth = GetColumnWidth( nLeftCol, nColSpan ); // TODO: Share formats! - SwFrmFmt *pFrmFmt = pBox->ClaimFrmFmt(); - SwFmtFillOrder aFillOrder( pFrmFmt->GetFillOrder() ); - pFrmFmt->ResetAllFmtAttr(); // #i73790# - method renamed - pFrmFmt->SetFmtAttr( aFillOrder ); + SwFrameFormat *pFrameFormat = pBox->ClaimFrameFormat(); + SwFormatFillOrder aFillOrder( pFrameFormat->GetFillOrder() ); + pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed + pFrameFormat->SetFormatAttr( aFillOrder ); - pFrmFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nColWidth ) ); + pFrameFormat->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nColWidth ) ); SwTableLines& rLines = pBox->GetTabLines(); bool bSplitted = false; @@ -2018,7 +2018,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( { // and it is a table: therefore we build a new box and // put the rows of the table into the rows of the box - pBox = new SwTableBox( pBoxFmt, 0, pUpper ); + pBox = new SwTableBox( pBoxFormat, 0, pUpper ); pCell->GetSubTable()->MakeTable( pBox, nColWidth ); } @@ -2026,7 +2026,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( const OUString sStyleName = pCell->GetStyleName(); bool bModifyLocked; bool bNew; - SwTableBoxFmt *pBoxFmt2 = GetSharedBoxFormat( + SwTableBoxFormat *pBoxFormat2 = GetSharedBoxFormat( pBox, sStyleName, nColWidth, pCell->IsProtected(), pCell->GetStartNode() && pCell->GetFormula().isEmpty() && ! pCell->HasValue(), @@ -2042,7 +2042,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) ) { if( pAutoItemSet ) - pBoxFmt2->SetFmtAttr( *pAutoItemSet ); + pBoxFormat2->SetFormatAttr( *pAutoItemSet ); } } @@ -2051,14 +2051,14 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if (pCell->HasStringValue()) { SwNodeIndex const aNodeIndex(*(pCell->GetStartNode()), 1); - SwTxtNode *const pTxtNode(aNodeIndex.GetNode().GetTxtNode()); - SAL_WARN_IF(!pTxtNode, "sw", "Should have a text node in cell?"); - if (pTxtNode) + SwTextNode *const pTextNode(aNodeIndex.GetNode().GetTextNode()); + SAL_WARN_IF(!pTextNode, "sw", "Should have a text node in cell?"); + if (pTextNode) { - SAL_WARN_IF(!pTxtNode->GetTxt().isEmpty(), "sw", + SAL_WARN_IF(!pTextNode->GetText().isEmpty(), "sw", "why text here?"); - pTxtNode->InsertText(*pCell->GetStringValue(), - SwIndex(pTxtNode, 0)); + pTextNode->InsertText(*pCell->GetStringValue(), + SwIndex(pTextNode, 0)); } } @@ -2076,11 +2076,11 @@ SwTableBox *SwXMLTableContext::MakeTableBox( { // default num format? const SfxPoolItem* pItem = NULL; - if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) + if( pBoxFormat2->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) == SfxItemState::SET ) { - const SwTblBoxNumFormat* pNumFormat = - static_cast<const SwTblBoxNumFormat*>( pItem ); + const SwTableBoxNumFormat* pNumFormat = + static_cast<const SwTableBoxNumFormat*>( pItem ); if( ( pNumFormat != NULL ) && ( pNumFormat->GetValue() == 0 ) ) { // only one text node? @@ -2088,11 +2088,11 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if( ( aNodeIndex.GetNode().EndOfSectionIndex() - aNodeIndex.GetNode().StartOfSectionIndex() ) == 2 ) { - SwTxtNode* pTxtNode= aNodeIndex.GetNode().GetTxtNode(); - if( pTxtNode != NULL ) + SwTextNode* pTextNode= aNodeIndex.GetNode().GetTextNode(); + if( pTextNode != NULL ) { // check text: does it look like some form of 0.0? - const OUString& rText = pTxtNode->GetTxt(); + const OUString& rText = pTextNode->GetText(); if( ( rText.getLength() > 10 ) || ( rText.indexOf( '0' ) == -1 ) ) { @@ -2109,9 +2109,9 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if( bSuppressNumericContent ) { // suppress numeric content? Then reset number format! - pBoxFmt2->ResetFmtAttr( RES_BOXATR_FORMULA ); - pBoxFmt2->ResetFmtAttr( RES_BOXATR_FORMAT ); - pBoxFmt2->ResetFmtAttr( RES_BOXATR_VALUE ); + pBoxFormat2->ResetFormatAttr( RES_BOXATR_FORMULA ); + pBoxFormat2->ResetFormatAttr( RES_BOXATR_FORMAT ); + pBoxFormat2->ResetFormatAttr( RES_BOXATR_VALUE ); } else { @@ -2121,8 +2121,8 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if (!rFormula.isEmpty()) { // formula cell: insert formula if valid - SwTblBoxFormula aFormulaItem( rFormula ); - pBoxFmt2->SetFmtAttr( aFormulaItem ); + SwTableBoxFormula aFormulaItem( rFormula ); + pBoxFormat2->SetFormatAttr( aFormulaItem ); } else if (!pCell->HasValue() && pCell->HasStringValue()) { @@ -2131,24 +2131,24 @@ SwTableBox *SwXMLTableContext::MakeTableBox( // Solution: the number format will be removed, // the cell gets the default text format. const SfxPoolItem* pItem = NULL; - if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) + if( pBoxFormat->GetItemState( RES_BOXATR_FORMAT, false, &pItem ) == SfxItemState::SET ) { - const SwDoc* pDoc = pBoxFmt->GetDoc(); + const SwDoc* pDoc = pBoxFormat->GetDoc(); const SvNumberFormatter* pNumberFormatter = pDoc ? pDoc->GetNumberFormatter() : 0; - const SwTblBoxNumFormat* pNumFormat = - static_cast<const SwTblBoxNumFormat*>( pItem ); + const SwTableBoxNumFormat* pNumFormat = + static_cast<const SwTableBoxNumFormat*>( pItem ); if( pNumFormat != NULL && pNumberFormatter && !pNumberFormatter->GetEntry( pNumFormat->GetValue() )->IsTextFormat() ) - pBoxFmt->ResetFmtAttr( RES_BOXATR_FORMAT ); + pBoxFormat->ResetFormatAttr( RES_BOXATR_FORMAT ); } } // always insert value, even if default if( pCell->HasValue() ) { - SwTblBoxValue aValueItem( pCell->GetValue() ); - pBoxFmt2->SetFmtAttr( aValueItem ); + SwTableBoxValue aValueItem( pCell->GetValue() ); + pBoxFormat2->SetFormatAttr( aValueItem ); } } @@ -2160,15 +2160,15 @@ SwTableBox *SwXMLTableContext::MakeTableBox( if( pCell->IsProtected() ) { SvxProtectItem aProtectItem( RES_PROTECT ); - aProtectItem.SetCntntProtect( true ); - pBoxFmt2->SetFmtAttr( aProtectItem ); + aProtectItem.SetContentProtect( true ); + pBoxFormat2->SetFormatAttr( aProtectItem ); } // restore old modify-lock state if (! bModifyLocked) - pBoxFmt2->UnlockModify(); + pBoxFormat2->UnlockModify(); - pBoxFmt2->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nColWidth ) ); + pBoxFormat2->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nColWidth ) ); return pBox; } @@ -2187,14 +2187,14 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, } else { - pLine = new SwTableLine( pLineFmt, 0, pUpper ); + pLine = new SwTableLine( pLineFormat, 0, pUpper ); } // TODO: Share formats! - SwFrmFmt *pFrmFmt = pLine->ClaimFrmFmt(); - SwFmtFillOrder aFillOrder( pFrmFmt->GetFillOrder() ); - pFrmFmt->ResetAllFmtAttr(); // #i73790# - method renamed - pFrmFmt->SetFmtAttr( aFillOrder ); + SwFrameFormat *pFrameFormat = pLine->ClaimFrameFormat(); + SwFormatFillOrder aFillOrder( pFrameFormat->GetFillOrder() ); + pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed + pFrameFormat->SetFormatAttr( aFillOrder ); const SfxItemSet *pAutoItemSet = 0; const OUString& rStyleName = (*pRows)[nTopRow].GetStyleName(); @@ -2204,7 +2204,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, XML_STYLE_FAMILY_TABLE_ROW, rStyleName, &pAutoItemSet ) ) { if( pAutoItemSet ) - pFrmFmt->SetFmtAttr( *pAutoItemSet ); + pFrameFormat->SetFormatAttr( *pAutoItemSet ); } SwTableBoxes& rBoxes = pLine->GetTabBoxes(); @@ -2651,7 +2651,7 @@ void SwXMLTableContext::MakeTable() SwXMLImport& rSwImport = GetSwImport(); - SwFrmFmt *pFrmFmt = pTableNode->GetTable().GetFrmFmt(); + SwFrameFormat *pFrameFormat = pTableNode->GetTable().GetFrameFormat(); sal_Int16 eHoriOrient = text::HoriOrientation::FULL; bool bSetHoriOrient = false; @@ -2676,7 +2676,7 @@ void SwXMLTableContext::MakeTable() if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false, &pItem ) ) { - eHoriOrient = static_cast<const SwFmtHoriOrient *>(pItem)->GetHoriOrient(); + eHoriOrient = static_cast<const SwFormatHoriOrient *>(pItem)->GetHoriOrient(); switch( eHoriOrient ) { case text::HoriOrientation::FULL: @@ -2702,10 +2702,10 @@ void SwXMLTableContext::MakeTable() bSetHoriOrient = true; } - const SwFmtFrmSize *pSize = 0; + const SwFormatFrmSize *pSize = 0; if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false, &pItem ) ) - pSize = static_cast<const SwFmtFrmSize *>(pItem); + pSize = static_cast<const SwFormatFrmSize *>(pItem); switch( eHoriOrient ) { @@ -2751,7 +2751,7 @@ void SwXMLTableContext::MakeTable() break; } - pFrmFmt->SetFmtAttr( *pAutoItemSet ); + pFrameFormat->SetFormatAttr( *pAutoItemSet ); } else { @@ -2765,21 +2765,21 @@ void SwXMLTableContext::MakeTable() pBox1->pSttNd = pSttNd1; pLine1->GetTabBoxes().erase( pLine1->GetTabBoxes().begin() ); - pLineFmt = static_cast<SwTableLineFmt*>(pLine1->GetFrmFmt()); - pBoxFmt = static_cast<SwTableBoxFmt*>(pBox1->GetFrmFmt()); + pLineFormat = static_cast<SwTableLineFormat*>(pLine1->GetFrameFormat()); + pBoxFormat = static_cast<SwTableBoxFormat*>(pBox1->GetFrameFormat()); _MakeTable( 0 ); if( bSetHoriOrient ) - pFrmFmt->SetFmtAttr( SwFmtHoriOrient( 0, eHoriOrient ) ); + pFrameFormat->SetFormatAttr( SwFormatHoriOrient( 0, eHoriOrient ) ); // This must be after the call to _MakeTable, because nWidth might be // changed there. - pFrmFmt->LockModify(); - SwFmtFrmSize aSize( ATT_VAR_SIZE, nWidth ); + pFrameFormat->LockModify(); + SwFormatFrmSize aSize( ATT_VAR_SIZE, nWidth ); aSize.SetWidthPercent( nPrcWidth ); - pFrmFmt->SetFmtAttr( aSize ); - pFrmFmt->UnlockModify(); + pFrameFormat->SetFormatAttr( aSize ); + pFrameFormat->UnlockModify(); for( size_t i=0; i<pRows->size(); i++ ) (*pRows)[i].Dispose(); @@ -2789,7 +2789,7 @@ void SwXMLTableContext::MakeTable() { // change existing table into DDE table: // 1) Get DDE field type (get data from dde-source context), - SwDDEFieldType* pFldType = lcl_GetDDEFieldType( pDDESource, + SwDDEFieldType* pFieldType = lcl_GetDDEFieldType( pDDESource, pTableNode ); // 2) release the DDE source context, @@ -2797,7 +2797,7 @@ void SwXMLTableContext::MakeTable() // 3) create new DDE table, and SwDDETable* pDDETable = new SwDDETable( pTableNode->GetTable(), - pFldType, false ); + pFieldType, false ); // 4) set new (DDE)table at node. pTableNode->SetNewTable(pDDETable, false); @@ -2815,8 +2815,8 @@ void SwXMLTableContext::MakeTable() void SwXMLTableContext::MakeTable( SwTableBox *pBox, sal_Int32 nW ) { //FIXME: here would be a great place to handle XmlId for subtable - pLineFmt = GetParentTable()->pLineFmt; - pBoxFmt = GetParentTable()->pBoxFmt; + pLineFormat = GetParentTable()->pLineFormat; + pBoxFormat = GetParentTable()->pBoxFormat; nWidth = nW; bRelWidth = GetParentTable()->bRelWidth; @@ -2840,14 +2840,14 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( Reference<XUnoTunnel> xCrsrTunnel( GetImport().GetTextImport()->GetCursor(), UNO_QUERY); OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" ); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); if( bFirstSection ) { // The Cursor already is in the first section - pStNd = pTxtCrsr->GetPaM()->GetNode().FindTableBoxStartNode(); + pStNd = pTextCrsr->GetPaM()->GetNode().FindTableBoxStartNode(); bFirstSection = false; GetImport().GetTextImport()->SetStyleAndAttrs( GetImport(), GetImport().GetTextImport()->GetCursor(), "Standard", true ); @@ -2865,8 +2865,8 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( } sal_uInt32 nOffset = pPrevSttNd ? 1UL : 0UL; SwNodeIndex aIdx( *pEndNd, nOffset ); - SwTxtFmtColl *pColl = - pDoc->getIDocumentStylePoolAccess().GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false ); + SwTextFormatColl *pColl = + pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD, false ); pStNd = pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode, pColl ); // Consider the case that a table is defined without a row. @@ -2874,8 +2874,8 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( { pBox1->pSttNd = pStNd; - SwCntntNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex() + 1 ] - ->GetCntntNode(); + SwContentNode *pCNd = pDoc->GetNodes()[ pStNd->GetIndex() + 1 ] + ->GetContentNode(); SwPosition aPos( *pCNd ); aPos.nContent.Assign( pCNd, 0U ); diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index f5017fbaf909..2882cb41fad3 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -32,8 +32,8 @@ class SwTableNode; class SwTableBox; class SwTableLine; class SwStartNode; -class SwTableBoxFmt; -class SwTableLineFmt; +class SwTableBoxFormat; +class SwTableLineFormat; class SwXMLTableCell_Impl; class SwXMLTableRow_Impl; typedef boost::ptr_vector<SwXMLTableRow_Impl> SwXMLTableRows_Impl; @@ -71,14 +71,14 @@ class SwXMLTableContext : public XMLTextTableContext SwTableBox *pBox1; const SwStartNode *pSttNd1; - SwTableBoxFmt *pBoxFmt; - SwTableLineFmt *pLineFmt; + SwTableBoxFormat *pBoxFormat; + SwTableLineFormat *pLineFormat; // hash map of shared format, indexed by the (XML) style name, // the column width, and protection flag - typedef std::unordered_map<TableBoxIndex,SwTableBoxFmt*, - TableBoxIndexHasher> map_BoxFmt; - map_BoxFmt* pSharedBoxFormats; + typedef std::unordered_map<TableBoxIndex,SwTableBoxFormat*, + TableBoxIndexHasher> map_BoxFormat; + map_BoxFormat* pSharedBoxFormats; SvXMLImportContextRef xParentTable; // if table is a sub table @@ -118,8 +118,8 @@ class SwXMLTableContext : public XMLTextTableContext void FixRowSpan( sal_uInt32 nRow, sal_uInt32 nCol, sal_uInt32 nColSpan ); void ReplaceWithEmptyCell( sal_uInt32 nRow, sal_uInt32 nCol, bool bRows ); - /** sets the appropriate SwTblBoxFmt at pBox. */ - SwTableBoxFmt* GetSharedBoxFormat( + /** sets the appropriate SwTableBoxFormat at pBox. */ + SwTableBoxFormat* GetSharedBoxFormat( SwTableBox* pBox, /// the table box const OUString& rStyleName, /// XML style name sal_Int32 nColumnWidth, /// width of column diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 0fb0538b8520..aaae93503da0 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -65,7 +65,7 @@ enum SvEmbeddedObjectTypes SV_EMBEDDED_FRAME }; -SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode( +SwNoTextNode *SwXMLTextParagraphExport::GetNoTextNode( const Reference < XPropertySet >& rPropSet ) { Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); @@ -73,10 +73,10 @@ SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode( SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); assert(pFrame && "SwXFrame missing"); - SwFrmFmt *pFrmFmt = pFrame->GetFrmFmt(); - const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); - const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx(); - return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTxtNode(); + SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat(); + const SwFormatContent& rContent = pFrameFormat->GetContent(); + const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); + return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode(); } void SwXMLTextParagraphExport::exportStyleContent( @@ -93,13 +93,13 @@ void SwXMLTextParagraphExport::exportStyleContent( if( pStyle && SFX_STYLE_FAMILY_PARA == pStyle->GetFamily() ) { const SwDoc *pDoc = pStyle->GetDoc(); - const SwTxtFmtColl *pColl = - pDoc->FindTxtFmtCollByName( pStyle->GetStyleName() ); + const SwTextFormatColl *pColl = + pDoc->FindTextFormatCollByName( pStyle->GetStyleName() ); OSL_ENSURE( pColl, "There is the text collection?" ); if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() ) { - const SwFmtCollConditions& rConditions = - static_cast<const SwConditionTxtFmtColl *>(pColl)->GetCondColls(); + const SwFormatCollConditions& rConditions = + static_cast<const SwConditionTextFormatColl *>(pColl)->GetCondColls(); for( size_t i=0; i < rConditions.size(); ++i ) { const SwCollCondition& rCond = rConditions[i]; @@ -142,7 +142,7 @@ void SwXMLTextParagraphExport::exportStyleContent( break; } OSL_ENSURE( eFunc != XML_TOKEN_INVALID, - "SwXMLExport::ExportFmt: unknown condition" ); + "SwXMLExport::ExportFormat: unknown condition" ); if( eFunc != XML_TOKEN_INVALID ) { OUString sCond = GetXMLToken(eFunc) + "()"; @@ -155,7 +155,7 @@ void SwXMLTextParagraphExport::exportStyleContent( XML_CONDITION, sCond ); OUString aString; SwStyleNameMapper::FillProgName( - rCond.GetTxtFmtColl()->GetName(), + rCond.GetTextFormatColl()->GetName(), aString, nsSwGetPoolIdFromName::GET_POOLID_TXTCOLL, true); @@ -324,7 +324,7 @@ static void lcl_addFrameProperties( void SwXMLTextParagraphExport::_collectTextEmbeddedAutoStyles( const Reference < XPropertySet > & rPropSet ) { - SwOLENode *pOLENd = GetNoTxtNode( rPropSet )->GetOLENode(); + SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode(); svt::EmbeddedObjectRef& rObjRef = pOLENd->GetOLEObj().GetObject(); if( !rObjRef.is() ) return; @@ -360,7 +360,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( const Reference < XPropertySet > & rPropSet, const Reference < XPropertySetInfo > & rPropSetInfo ) { - SwOLENode *pOLENd = GetNoTxtNode( rPropSet )->GetOLENode(); + SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode(); SwOLEObj& rOLEObj = pOLENd->GetOLEObj(); svt::EmbeddedObjectRef& rObjRef = rOLEObj.GetObject(); if( !rObjRef.is() ) @@ -465,9 +465,9 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( sURL = GetExport().AddEmbeddedObject( sURL ); lcl_addURL( rXMLExport, sURL, false ); } - if( SV_EMBEDDED_OWN == nType && !pOLENd->GetChartTblName().isEmpty() ) + if( SV_EMBEDDED_OWN == nType && !pOLENd->GetChartTableName().isEmpty() ) { - OUString sRange( pOLENd->GetChartTblName() ); + OUString sRange( pOLENd->GetChartTableName() ); OUStringBuffer aBuffer( sRange.getLength() + 2 ); for( sal_Int32 i=0; i < sRange.getLength(); i++ ) { diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx index 98fe1fbf47cb..0131f1d414b1 100644 --- a/sw/source/filter/xml/xmltexte.hxx +++ b/sw/source/filter/xml/xmltexte.hxx @@ -25,7 +25,7 @@ class SwXMLExport; class SvXMLAutoStylePoolP; -class SwNoTxtNode; +class SwNoTextNode; namespace com { namespace sun { namespace star { namespace style { class XStyle; } } } } @@ -41,7 +41,7 @@ class SwXMLTextParagraphExport : public XMLTextParagraphExport const SvGlobalName aIFrameClassId; const SvGlobalName aOutplaceClassId; - static SwNoTxtNode *GetNoTxtNode( + static SwNoTextNode *GetNoTextNode( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& rPropSet ); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 5a70eb307cc9..1b3f08d787c0 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -105,10 +105,10 @@ static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet, nHeight = convertMm100ToTwip( nHeight ); if( nHeight < MINFLY ) nHeight = MINFLY; - rItemSet.Put( SwFmtFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); + rItemSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, nWidth, nHeight ) ); } - SwFmtAnchor aAnchor( FLY_AT_CHAR ); + SwFormatAnchor aAnchor( FLY_AT_CHAR ); rItemSet.Put( aAnchor ); if( pTwipWidth ) @@ -186,21 +186,21 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const uno::Reference<XUnoTunnel> xCrsrTunnel( const_cast<SwXMLTextImportHelper *>(this)->GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - SAL_WARN_IF(!pTxtCrsr, "sw.uno", "SwXTextCursor missing"); - SwDoc *pDoc = pTxtCrsr ? pTxtCrsr->GetDoc() : NULL; + SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing"); + SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : NULL; - return pDoc && pDoc->IsInHeaderFooter( pTxtCrsr->GetPaM()->GetPoint()->nNode ); + return pDoc && pDoc->IsInHeaderFooter( pTextCrsr->GetPaM()->GetPoint()->nNode ); } -static SwOLENode *lcl_GetOLENode( const SwFrmFmt *pFrmFmt ) +static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat ) { SwOLENode *pOLENd = 0; - if( pFrmFmt ) + if( pFrameFormat ) { - const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); - const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx(); + const SwFormatContent& rContent = pFrameFormat->GetContent(); + const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode(); } OSL_ENSURE( pOLENd, "Where is the OLE node" ); @@ -211,7 +211,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( SvXMLImport& rImport, const OUString& rHRef, const OUString& rStyleName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nWidth, sal_Int32 nHeight ) { // this method will modify the document directly -> lock SolarMutex @@ -230,9 +230,9 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - SAL_WARN_IF(!pTxtCrsr, "sw.uno", "SwXTextCursor missing"); + SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing"); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, @@ -242,7 +242,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( lcl_putHeightAndWidth( aItemSet, nHeight, nWidth, &aTwipSize.Height(), &aTwipSize.Width() ); - SwFrmFmt *pFrmFmt = 0; + SwFrameFormat *pFrameFormat = 0; SwOLENode *pOLENd = 0; if( rHRef.copy( 0, nPos ) == "vnd.sun.star.ServiceName" ) { @@ -286,14 +286,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( lcl_setObjectVisualArea( xObj, nAspect, aTwipSize, MAP_TWIP ); } - if( pTxtCrsr ) + if( pTextCrsr ) { - pFrmFmt = pDoc->getIDocumentContentOperations().Insert( *pTxtCrsr->GetPaM(), + pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, NULL, NULL ); - pOLENd = lcl_GetOLENode( pFrmFmt ); + pOLENd = lcl_GetOLENode( pFrameFormat ); } if( pOLENd ) @@ -308,8 +308,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( { // check whether an object with this name already exists in the document OUString aName; - SwIterator<SwCntntNode,SwFmtColl> aIter( *pDoc->GetDfltGrfFmtColl() ); - for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) + SwIterator<SwContentNode,SwFormatColl> aIter( *pDoc->GetDfltGrfFormatColl() ); + for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() ) { SwOLENode* pExistingOLENd = pNd->GetOLENode(); if( pExistingOLENd ) @@ -342,47 +342,47 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( // the correct aspect will be set later // TODO/LATER: Actually it should be set here - if( pTxtCrsr ) + if( pTextCrsr ) { - pFrmFmt = pDoc->getIDocumentContentOperations().InsertOLE( *pTxtCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, NULL, NULL ); - pOLENd = lcl_GetOLENode( pFrmFmt ); + pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, NULL, NULL ); + pOLENd = lcl_GetOLENode( pFrameFormat ); } aObjName = aName; } - if( !pFrmFmt ) + if( !pFrameFormat ) return xPropSet; if( IsInsertMode() ) { if( !pOLENd ) - pOLENd = lcl_GetOLENode( pFrmFmt ); + pOLENd = lcl_GetOLENode( pFrameFormat ); if( pOLENd ) pOLENd->SetOLESizeInvalid( true ); } xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pDoc, pFrmFmt), uno::UNO_QUERY); + *pDoc, pFrameFormat), uno::UNO_QUERY); if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) { // req for z-order - SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrmFmt*>(pFrmFmt)); + SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrameFormat*>(pFrameFormat)); } - if( !rTblName.isEmpty() ) + if( !rTableName.isEmpty() ) { - const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); - const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx(); + const SwFormatContent& rContent = pFrameFormat->GetContent(); + const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); SwOLENode *pOLENode = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode(); OSL_ENSURE( pOLENode, "Where is the OLE node" ); - OUStringBuffer aBuffer( rTblName.getLength() ); + OUStringBuffer aBuffer( rTableName.getLength() ); bool bQuoted = false; bool bEscape = false; bool bError = false; - for( sal_Int32 i=0; i < rTblName.getLength(); i++ ) + for( sal_Int32 i=0; i < rTableName.getLength(); i++ ) { bool bEndOfNameFound = false; - sal_Unicode c = rTblName[i]; + sal_Unicode c = rTableName[i]; switch( c ) { case '\'': @@ -439,8 +439,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( } if( !bError ) { - OUString sTblName( aBuffer.makeStringAndClear() ); - pOLENode->SetChartTblName( GetRenameMap().Get( XML_TEXT_RENAME_TYPE_TABLE, sTblName ) ); + OUString sTableName( aBuffer.makeStringAndClear() ); + pOLENode->SetChartTableName( GetRenameMap().Get( XML_TEXT_RENAME_TYPE_TABLE, sTableName ) ); } } @@ -534,7 +534,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( SvXMLImport& rImport, const OUString& rHRef, const OUString& /*rStyleName*/, - const OUString& /*rTblName*/, + const OUString& /*rTableName*/, sal_Int32 nWidth, sal_Int32 nHeight ) { // this method will modify the document directly -> lock SolarMutex @@ -544,9 +544,9 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); SwDoc *pDoc = SwImport::GetDocFromXMLImport( rImport ); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, @@ -593,7 +593,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( uno::UNO_QUERY_THROW ); { - SwFrmFmt *pFrmFmt = pDoc->getIDocumentContentOperations().Insert( *pTxtCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, NULL, @@ -602,11 +602,11 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( // TODO/LATER: in future may need a way to set replacement image url to the link ( may be even to the object ), needs oasis cws??? xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pDoc, pFrmFmt), uno::UNO_QUERY); + *pDoc, pFrameFormat), uno::UNO_QUERY); if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) { SwXFrame::GetOrCreateSdrObject(* - static_cast<SwFlyFrmFmt*>(pFrmFmt)); // req for z-order + static_cast<SwFlyFrameFormat*>(pFrameFormat)); // req for z-order } } } @@ -614,7 +614,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink( { } - // TODO/LATER: should the rStyleName and rTblName be handled as for usual embedded object? + // TODO/LATER: should the rStyleName and rTableName be handled as for usual embedded object? return xPropSet; } @@ -632,10 +632,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTxtCrsr->GetDoc(); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCrsr->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -655,17 +655,17 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet( Size( nWidth, nHeight ), MAP_100TH_MM ); - SwFrmFmt *pFrmFmt = pDoc->getIDocumentContentOperations().Insert( *pTxtCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), ::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ), &aAppletImpl.GetItemSet(), NULL, NULL); xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pDoc, pFrmFmt), uno::UNO_QUERY); + *pDoc, pFrameFormat), uno::UNO_QUERY); if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) { // req for z-order - SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrmFmt*>(pFrmFmt)); + SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrameFormat*>(pFrameFormat)); } return xPropSet; @@ -679,10 +679,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTxtCrsr->GetDoc(); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCrsr->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -730,17 +730,17 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( makeAny( OUString( rMimeType ) ) ); } - SwFrmFmt *pFrmFmt = pDoc->getIDocumentContentOperations().Insert( *pTxtCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, NULL, NULL); xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pDoc, pFrmFmt), uno::UNO_QUERY); + *pDoc, pFrameFormat), uno::UNO_QUERY); if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) { SwXFrame::GetOrCreateSdrObject(* - static_cast<SwFlyFrmFmt*>(pFrmFmt)); // req for z-order + static_cast<SwFlyFrameFormat*>(pFrameFormat)); // req for z-order } } } @@ -762,10 +762,10 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra uno::Reference < XPropertySet > xPropSet; uno::Reference<XUnoTunnel> xCrsrTunnel( GetCursor(), UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for Cursor"); - OTextCursorHelper *pTxtCrsr = reinterpret_cast< OTextCursorHelper * >( + OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() ))); - OSL_ENSURE( pTxtCrsr, "SwXTextCursor missing" ); - SwDoc *pDoc = pTxtCrsr->GetDoc(); + OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" ); + SwDoc *pDoc = pTextCrsr->GetDoc(); SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END ); @@ -883,18 +883,18 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra makeAny( sal_Int32( aMargin.Height() ) ) ); } - SwFrmFmt *pFrmFmt = pDoc->getIDocumentContentOperations().Insert( *pTxtCrsr->GetPaM(), + SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(), ::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ), &aItemSet, NULL, NULL); xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject( - *pDoc, pFrmFmt), uno::UNO_QUERY); + *pDoc, pFrameFormat), uno::UNO_QUERY); if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) { // req for z-order SwXFrame::GetOrCreateSdrObject(* - static_cast<SwFlyFrmFmt*>(pFrmFmt)); + static_cast<SwFlyFrameFormat*>(pFrameFormat)); } } } @@ -917,10 +917,10 @@ void SwXMLTextImportHelper::endAppletOrPlugin( SwXFrame *pFrame = reinterpret_cast< SwXFrame * >( sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( SwXFrame::getUnoTunnelId() ))); OSL_ENSURE( pFrame, "SwXFrame missing" ); - SwFrmFmt *pFrmFmt = pFrame->GetFrmFmt(); - const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); - const SwNodeIndex *pNdIdx = rCntnt.GetCntntIdx(); - SwOLENode *pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTxtNode()->GetOLENode(); + SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat(); + const SwFormatContent& rContent = pFrameFormat->GetContent(); + const SwNodeIndex *pNdIdx = rContent.GetContentIdx(); + SwOLENode *pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode()->GetOLENode(); SwOLEObj& rOLEObj = pOLENd->GetOLEObj(); uno::Reference < embed::XEmbeddedObject > xEmbObj( rOLEObj.GetOleRef() ); diff --git a/sw/source/filter/xml/xmltexti.hxx b/sw/source/filter/xml/xmltexti.hxx index 83868b11b984..23e4051eab23 100644 --- a/sw/source/filter/xml/xmltexti.hxx +++ b/sw/source/filter/xml/xmltexti.hxx @@ -52,14 +52,14 @@ public: createAndInsertOLEObject( SvXMLImport& rImport, const OUString& rHRef, const OUString& rStyleName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nWidth, sal_Int32 nHeight ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> createAndInsertOOoLink( SvXMLImport& rImport, const OUString& rHRef, const OUString& rStyleName, - const OUString& rTblName, + const OUString& rTableName, sal_Int32 nWidth, sal_Int32 nHeight ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> |