diff options
Diffstat (limited to 'sw/source/filter')
41 files changed, 330 insertions, 629 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index eece35d3da4e..bcee1e0a0ae1 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -36,25 +36,23 @@ using namespace ::com::sun::star; namespace { - -SvStream& lcl_OutLongExt( SvStream& rStrm, sal_uLong nVal, bool bNeg ) -{ - sal_Char aBuf[28]; - - int i = SAL_N_ELEMENTS(aBuf); - aBuf[--i] = 0; - do + SvStream& lcl_OutLongExt( SvStream& rStrm, sal_uLong nVal, bool bNeg ) { - aBuf[--i] = '0' + static_cast<sal_Char>(nVal % 10); - nVal /= 10; - } while (nVal); + sal_Char aBuf[28]; - if (bNeg) - aBuf[--i] = '-'; + int i = SAL_N_ELEMENTS(aBuf); + aBuf[--i] = 0; + do + { + aBuf[--i] = '0' + static_cast<sal_Char>(nVal % 10); + nVal /= 10; + } while (nVal); - return rStrm.WriteCharPtr( &aBuf[i] ); -} + if (bNeg) + aBuf[--i] = '-'; + return rStrm.WriteCharPtr( &aBuf[i] ); + } } typedef std::multimap<sal_uLong, const ::sw::mark::IMark*> SwBookmarkNodeTable; @@ -93,7 +91,6 @@ void Writer_Impl::RemoveFontList( SwDoc& rDoc ) void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) { - sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex(); aBkmkNodePos.insert( SwBookmarkNodeTable::value_type( nNd, &rBkmk ) ); @@ -167,7 +164,7 @@ sal_Bool Writer::CopyNextPam( SwPaM ** ppPam ) if( (*ppPam)->GetNext() == pOrigPam ) { *ppPam = pOrigPam; // set back to the beginning pam - return sal_False; // end of the ring + return sal_False; // end of the ring } // otherwise copy the next value from the next Pam @@ -220,8 +217,6 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId return pNew; } -///////////////////////////////////////////////////////////////////////////// - // Stream-specific SvStream& Writer::Strm() { @@ -432,10 +427,7 @@ sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, sal_Int32 nStt, return rArr.size(); } -//////////////////////////////////////////////////////////////////////////// - // Storage-specific - sal_uLong StgWriter::WriteStream() { OSL_ENSURE( !this, "Write in Storages on a stream?" ); diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx index 4011ddb70e48..d0917733d19f 100644 --- a/sw/source/filter/writer/wrt_fn.cxx +++ b/sw/source/filter/writer/wrt_fn.cxx @@ -90,7 +90,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt, Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt ) { - // It must be a CntntNode !! + // It must be a CntntNode! SwCntntNode * pCNd = rNode.GetCntntNode(); if( !pCNd ) return rWrt; @@ -117,5 +117,4 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt ) return rWrt; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 994dad4e2d3d..8a1cc74862ce 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -77,7 +77,7 @@ static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext) return pCNd; } -// ------ Stack entry for all text attributes ----------- +// Stack entry for all text attributes SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt) : m_aMkPos(rStartPos) , m_aPtPos(rStartPos) @@ -85,9 +85,9 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt) , mnEndCP(-1) , bIsParaEnd(false) { - pAttr = pHt; // store a copy of the attribute + pAttr = pHt; // store a copy of the attribute bOld = sal_False; // used for marking Attributes *before* skipping field results - bOpen = sal_True; // lock the attribute --> may first + bOpen = sal_True; // lock the attribute --> may first bConsumedByField = sal_False; } @@ -129,7 +129,7 @@ bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, bool bCheck, { return false; } - // !!! The content indices always apply to the node !!! + // 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); @@ -426,7 +426,7 @@ static void MakeBookRegionOrPoint(const SwFltStackEntry& rEntry, SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck ) { if (rEntry.MakeRegion(pDoc, rRegion, bCheck )){ -// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0; + // sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0; if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode() != rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode()) { @@ -670,7 +670,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, break; default: { - //Revised for more complex situations should be considered + // Revised for more complex situations should be considered if ( !bSdODChecked ) { bHasSdOD = HasSdOD(); @@ -772,7 +772,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam) SwNodeIndex aEndNode(pEnd->nNode, -1); const sal_Int32 nEndIdx = pEnd->nContent.GetIndex(); - //We don't support deleting content that is over one node, or removing a node. + // We don't support deleting content that is over one node, or removing a node. OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended"); if (aEndNode != aStartNode) return; @@ -813,19 +813,19 @@ void SwFltControlStack::Delete(const SwPaM &rPam) if (bTotallyContained) { - //after start, before end, delete + // after start, before end, delete DeleteAndDestroy(nSize); continue; } const sal_Int32 nCntntDiff = nEndIdx - nStartIdx; - //to be adjusted + // to be adjusted if (bEntryStartAfterSelStart) { if (bEntryStartBeforeSelEnd) { - //move start to new start + // move start to new start rEntry.m_aMkPos.SetPos(aStartNode, nStartIdx); } else @@ -846,7 +846,7 @@ void SwFltControlStack::Delete(const SwPaM &rPam) } } -//------ methods of SwFltAnchor follow ----------- +// methods of SwFltAnchor follow SwFltAnchor::SwFltAnchor(SwFrmFmt* pFmt) : SfxPoolItem(RES_FLTR_ANCHOR), pFrmFmt(pFmt) { @@ -914,7 +914,7 @@ void SwFltAnchorClient::Modify(const SfxPoolItem *, const SfxPoolItem * pNew) } } -//------ methods of SwFltRedline follow ----------- +// methods of SwFltRedline follow bool SwFltRedline::operator==(const SfxPoolItem& rItem) const { return this == &rItem; @@ -925,7 +925,7 @@ SfxPoolItem* SwFltRedline::Clone( SfxItemPool* ) const return new SwFltRedline(*this); } -//------ methods of SwFltBookmark follow ----------- +// methods of SwFltBookmark follow SwFltBookmark::SwFltBookmark( const OUString& rNa, const OUString& rVa, long nHand, const bool bIsTOCBookmark ) : SfxPoolItem( RES_FLTR_BOOKMARK ) @@ -967,8 +967,7 @@ SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const return new SwFltBookmark(*this); } -//------ methods of SwFltTOX follow ----------- - +// methods of SwFltTOX follow SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols) : SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ), bHadBreakItem( sal_False ), bHadPageDescItem( sal_False ) @@ -991,8 +990,7 @@ SfxPoolItem* SwFltTOX::Clone(SfxItemPool*) const return new SwFltTOX(*this); } -//------ methods of SwFltSwSection follow ----------- - +// methods of SwFltSwSection follow SwFltSection::SwFltSection(SwSectionData *const pSect) : SfxPoolItem(RES_FLTR_SECTION) , m_pSection(pSect) @@ -1015,14 +1013,11 @@ SfxPoolItem* SwFltSection::Clone(SfxItemPool*) const return new SwFltSection(*this); } -/////////////////////////////////////////////////////////////////////// -// // here starts code generated by mdt. this is a shell, if possible, soon for // all filters. the whole trouble of inserting texts and formatting attributes, // manage positions, styles & headers/footers etc. // - -//////////////////////////////////////////////////////////// SwFltShell +// SwFltShell SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const OUString& rBaseURL, sal_Bool bNew, sal_uLong nFieldFl) : pCurrentPageDesc(0), pSavedPos(0), @@ -1322,7 +1317,6 @@ const SfxPoolItem& SwFltFormatCollection::GetAttr(sal_uInt16 nWhich) // Bei Formatdefinitionen aus dem altuellen Style mit Parents // sonst aus dem Node mit Parents // Im Stack wird nicht nachgesehen - const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(sal_uInt16 nWhich) { SwCntntNode * pNd = pPaM->GetPoint()->nNode.GetNode().GetCntntNode(); @@ -1392,10 +1386,7 @@ bool SwFltShell::GetCaseVersalien() .GetCaseMap() == SVX_CASEMAP_VERSALIEN; } -//------------------------------------------------------------------------- // Tables -//------------------------------------------------------------------------- - SwFltOutBase::~SwFltOutBase() { } @@ -1510,7 +1501,7 @@ SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */) if( nx == USHRT_MAX ) // current cell nx = usTableX; -// get structs to table cells + // get structs to table cells const SwTableLines* pTableLines = &pTable->GetTabLines(); if(!pTableLines){ OSL_FAIL("SwFltOutDoc:GetBox:pTableLines"); @@ -1553,8 +1544,8 @@ void SwFltOutDoc::NextTableCell() OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:NextTableCell:pTableBox"); if(!pTableBox) return; -//#pragma message(__FILE__ "(?) : Sw's const problem") -// insert cells: + //#pragma message(__FILE__ "(?) : Sw's const problem") + // insert cells: if (++usTableX >= pTableBoxes->size()) GetDoc().GetNodes().InsBoxen( GetDoc().IsIdxInTbl(pPaM->GetPoint()->nNode), @@ -1575,7 +1566,7 @@ void SwFltOutDoc::NextTableRow() SwTableBox* pTableBox = GetBox(usTableY, 0); if (pTableBox) { -// duplicate row: + // duplicate row: SwSelBoxes aSelBoxes; aSelBoxes.insert( pTableBox ); GetDoc().InsertRow(aSelBoxes); @@ -1665,7 +1656,7 @@ void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox, pTableBox->GetFrmFmt()->SetFmtAttr(rFmtBox); } -// not activated !!! +// not activated! void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist) { if(!pTable){ @@ -1721,8 +1712,8 @@ void SwFltOutDoc::EndTable() OSL_ENSURE(pTable, "EndTable without table"); return; } - // Close all attributes, because otherwise - // attributes extending into Flys might be created + // Close all attributes, because otherwise + // attributes extending into Flys might be created rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); @@ -1743,7 +1734,7 @@ void SwFltOutDoc::EndTable() sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam) { -// get structs to table cells + // get structs to table cells const SwTableLines* pTableLines = &pTable->GetTabLines(); SwTableLine* pTableLine = (*pTableLines)[usTableY]; SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes(); @@ -1774,16 +1765,11 @@ sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam) return sal_True; } - -//----------------------------------------------------------------------------- // Flys in SwFltOutBase -//----------------------------------------------------------------------------- - SfxItemSet* SwFltOutBase::NewFlyDefaults() { -// Set required default values ( except when they will be explicitly set -// later ) - + // Set required default values ( except when they will be explicitly set + // later ) SfxItemSet* p = new SfxItemSet( GetDoc().GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); SwFmtFrmSize aSz( ATT_VAR_SIZE, MINFLY, MINFLY ); @@ -1827,10 +1813,7 @@ void SwFltOutBase::EndFly() } } -//----------------------------------------------------------------------------- // Flys in SwFltDoc -//----------------------------------------------------------------------------- - /* virtual */ bool SwFltOutDoc::IsInFly() { return pFly != 0; @@ -1851,23 +1834,23 @@ bool SwFltOutDoc::BeginFly( RndStdIds eAnchor, SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, 0 ); SfxItemSet* pSet = NewFlyDefaults(); -// Close all attributes, because otherwise attributes extending into Flys might -// be created + // Close all attributes, because otherwise attributes extending into Flys might + // be created rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); -// create Fly: + // create Fly: OSL_ENSURE(pFlySavedPos == NULL, "BeginFly in Fly"); // recursive doesn't work yet pFlySavedPos = new SwPosition(*pPaM->GetPoint()); SwFmtAnchor aAnchor( eAnchor, 1 ); -// If the style contained Fly attributes, use them as defaults now + // If the style contained Fly attributes, use them as defaults now if (pMoreAttrs) pSet->Put(*pMoreAttrs); -// this NOT for page-dependent Fly with page NUMBER ! + // this NOT for page-dependent Fly with page NUMBER ! aAnchor.SetAnchor(pPaM->GetPoint()); // surprisingly, doesn't require // the stack @@ -1875,7 +1858,7 @@ bool SwFltOutDoc::BeginFly( RndStdIds eAnchor, SwFrmFmt* pF = MakeFly( eAnchor, pSet ); delete pSet; -// set pam in Fly + // set pam in Fly const SwFmtCntnt& rCntnt = pF->GetCntnt(); OSL_ENSURE( rCntnt.GetCntntIdx(), "No prepared content." ); pPaM->GetPoint()->nNode = rCntnt.GetCntntIdx()->GetIndex() + 1; @@ -1911,8 +1894,8 @@ void SwFltOutDoc::EndFly() OSL_FAIL( "SwFltOutDoc::EndFly() in Table" ); return; } - // Close all attributes, because otherwise - // attributes extending into Flys might be created + // Close all attributes, because otherwise + // attributes extending into Flys might be created rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); @@ -1923,9 +1906,6 @@ void SwFltOutDoc::EndFly() pFly = 0; } -//----------------------------------------------------------------------------- -// Flys in SwFltFormatCollection -//----------------------------------------------------------------------------- /*virtual*/ bool SwFltFormatCollection::IsInFly() { return bHasFly; @@ -1971,10 +1951,6 @@ bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc ) return false; } -//----------------------------------------------------------------------------- -// Flys in SwFltShell -//----------------------------------------------------------------------------- - bool SwFltShell::BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos) { @@ -2018,10 +1994,6 @@ void SwFltShell::EndFly() eSubMode = None; } -//----------------------------------------------------------------------------- -// Footnotes -//----------------------------------------------------------------------------- - void SwFltShell::BeginFootnote() { if( pOut->IsInFly() ){ // Happens at footnote in Fly, among others @@ -2033,11 +2005,11 @@ void SwFltShell::BeginFootnote() return; } -// Close all attributes, because otherwise attributes extending into -// footnotes might be created + // Close all attributes, because otherwise attributes extending into + // footnotes might be created aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); -// Don't force-close EndStack for now, so bookmarks on footnotes can -// be applied to PMW + // Don't force-close EndStack for now, so bookmarks on footnotes can + // be applied to PMW SwFmtFtn aFtn; GetDoc().InsertPoolItem(*pPaM, aFtn, 0); @@ -2062,12 +2034,12 @@ void SwFltShell::EndFootnote() { if(!pSavedPos) return; - // Close all attributes, because otherwise - // attributes extending out of footnotes might - // be created + // Close all attributes, because otherwise + // attributes extending out of footnotes might + // be created aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False ); -// Don't force-close EndStack for now, so bookmarks on footnotes can -// be applied to PMW + // Don't force-close EndStack for now, so bookmarks on footnotes can + // be applied to PMW *pPaM->GetPoint() = *pSavedPos; // restore Cursor delete pSavedPos; @@ -2123,8 +2095,8 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc) sal_uInt16 nPos; if (bFollow && pFirstPageDesc->GetFollow() != pFirstPageDesc) return pFirstPageDesc; // Error: already has Follow -// Detection of duplicate names still missing (low probability of this -// actually occurring) + // Detection of duplicate names still missing (low probability of this + // actually occurring) nPos = GetDoc().MakePageDesc( SwViewShell::GetShellRes()->GetPageDescName( GetDoc().GetPageDescCnt(), bFollow ? ShellResource::FOLLOW_PAGE : ShellResource::NORMAL_PAGE), @@ -2132,7 +2104,8 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc) pNewPD = &GetDoc().GetPageDesc(nPos); if (bFollow) - { // This one follows pPageDesc + { + // This one follows pPageDesc pFirstPageDesc->SetFollow(pNewPD); pNewPD->SetFollow(pNewPD); } @@ -2145,7 +2118,6 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc) return pNewPD; } -///////////////////////////////////////////////// SwFltFormatCollection SwFltFormatCollection::SwFltFormatCollection( SwDoc& _rDoc, RES_POOL_COLLFMT_TYPE nType ) : SwFltOutBase(_rDoc), diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx index bfcbf3bbcbd5..7bdb397c29e4 100644 --- a/sw/source/filter/ww1/w1class.cxx +++ b/sw/source/filter/ww1/w1class.cxx @@ -37,7 +37,7 @@ Ww1SingleSprm* Ww1Sprm::pSingleSprm = 0; -/////////////////////////////////////////////////////////////////// Fib +// Fib Ww1Fib::Ww1Fib( SvStream& _rStream ) : rStream(_rStream) { @@ -45,8 +45,7 @@ Ww1Fib::Ww1Fib( SvStream& _rStream ) rStream.Read( &aFib, sizeof( aFib )) == sizeof( aFib ); } -///////////////////////////////////////////////////////////// PlainText - +// PlainText Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes) : rFib(rWwFib), ulFilePos(nFilePos), ulCountBytes(nCountBytes), ulSeek(0), bOK(true) @@ -80,7 +79,7 @@ OUString Ww1PlainText::GetText( sal_uLong ulOffset, sal_uLong nLen ) const OUString(); } -///////////////////////////////////////////////////////////////// Style +// Style Ww1Style::Ww1Style() : pPapx(0), pParent(0), stcBase(0), stcNext(0), bUsed(false) { @@ -213,7 +212,7 @@ sal_uInt16 Ww1Style::ReadEstcp(sal_uInt8*&p, sal_uInt16& rnCountBytes) return 0; } -//////////////////////////////////////////////////////////// StyleSheet +// StyleSheet Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib) : cstcStd(0), rFib(_rFib), @@ -315,33 +314,32 @@ sal_uInt16 Ww1StyleSheet::ReadEstcp(sal_uInt8*& p, sal_uInt16& rnCountBytes) return 0; } -///////////////////////////////////////////////////////////////// Fonts - +// Fonts Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs) : pFontA(0), rFib(rInFib), nFieldFlags(nFieldFlgs), nMax(0), bOK(false) { - if(rFib.GetFIB().cbSttbfffnGet() > 2 ) // ueberhaupt fonts? + if(rFib.GetFIB().cbSttbfffnGet() > 2 ) // any fonts at all? { SVBT16 nCountBytes; OSL_ENSURE(rFib.GetFIB().cbSttbfffnGet() > sizeof(nCountBytes), "Ww1Fonts"); if (rFib.GetStream().Seek(rFib.GetFIB().fcSttbfffnGet()) == (sal_uLong)rFib.GetFIB().fcSttbfffnGet()) if (rFib.GetStream().Read(nCountBytes, sizeof(nCountBytes)) - == sizeof(nCountBytes)) // Laenge steht hier nochmal + == sizeof(nCountBytes)) // length is repeated here { OSL_ENSURE(SVBT16ToShort(nCountBytes) == rFib.GetFIB().cbSttbfffnGet(), "redundant-size missmatch"); - // hoffentlich sind sie immer gleich + // hopefully they're always equal W1_FFN* pA = (W1_FFN*)new char[rFib.GetFIB().cbSttbfffnGet() - - sizeof(nCountBytes)]; // Alloziere Font-Array + - sizeof(nCountBytes)]; // allocate Font-Array //~ Ww1: new-NULL if (rFib.GetStream().Read(pA, rFib.GetFIB().cbSttbfffnGet() - sizeof(nCountBytes)) == (sal_uLong)rFib.GetFIB().cbSttbfffnGet() - - sizeof(nCountBytes)) // lese alle Fonts - {} //nothing + - sizeof(nCountBytes)) // read all Fonts + {} // nothing long nLeft = rFib.GetFIB().cbSttbfffnGet() - - sizeof(nCountBytes); // Zaehle, wieviele Fonts enthalten + - sizeof(nCountBytes); // count how many contain fonts W1_FFN* p = pA; while (true) { @@ -357,9 +355,9 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs) } if (nMax) { - pFontA = new W1_FFN*[nMax]; // alloziere Index-Array + pFontA = new W1_FFN*[nMax]; // allocate Index-Array //~ Ww1: new-NULL - pFontA[0] = pA; // fuelle Index-Array + pFontA[0] = pA; // fill Index-Array sal_uInt16 i; for(i=1, p=pA; i<nMax; i++) { @@ -368,7 +366,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs) } } else - pFontA = 0; // Keine Eintraege -> kein Array + pFontA = 0; // no entries -> no Array } } bOK = sal_True; @@ -383,7 +381,7 @@ W1_FFN* Ww1Fonts::GetFFN(sal_uInt16 nNum) return pRet; } -/////////////////////////////////////////////////////////////////// DOP +// DOP Ww1Dop::Ww1Dop(Ww1Fib& _rFib) : rFib(_rFib) { @@ -398,7 +396,7 @@ Ww1Dop::Ww1Dop(Ww1Fib& _rFib) rFib.GetStream().Read(&aDop, nRead) == (sal_uLong)nRead; } -/////////////////////////////////////////////////////////////// Picture +// Picture Ww1Picture::Ww1Picture(SvStream& rStream, sal_uLong ulFilePos) : bOK(false), pPic(0) { @@ -416,7 +414,7 @@ Ww1Picture::Ww1Picture(SvStream& rStream, sal_uLong ulFilePos) } } -////////////////////////////////////////////////////////////////// Sprm +// Sprm Ww1Sprm::Ww1Sprm(sal_uInt8* x, sal_uInt16 _nCountBytes) : p(NULL), nCountBytes(_nCountBytes), @@ -699,7 +697,7 @@ void Ww1Sprm::InitTab() aTab[163] = new Ww1SingleSprm(5, DUMPNAME("sprmTSetBrc10")); // 163 tap.rgtc[].rgbrc complex (see below) 5 bytes } -////////////////////////////////////////////////////////////// SprmPapx +// SprmPapx Ww1SprmPapx::Ww1SprmPapx(sal_uInt8* pByte, sal_uInt16 nSize) : Ww1Sprm(Sprm(pByte, nSize), SprmSize(pByte, nSize)) { @@ -724,7 +722,7 @@ sal_uInt8* Ww1SprmPapx::Sprm(sal_uInt8* pByte, sal_uInt16 nSize) return pRet; } -/////////////////////////////////////////////////////////////////// Plc +// Plc Ww1Plc::Ww1Plc(Ww1Fib& rInFib, sal_uLong ulFilePos, sal_uInt16 nInCountBytes, sal_uInt16 nInItemSize) : p(0), nCountBytes(nInCountBytes), iMac(0), nItemSize(nInItemSize), @@ -778,11 +776,11 @@ sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex) OSL_ENSURE(nIndex < iMac, "index out of bounds"); if (nIndex < iMac) pRet = p + (iMac + 1) * sizeof(SVBT32) + - nIndex * nItemSize; // Pointer auf Inhalts-Array + nIndex * nItemSize; // Pointer to content array return pRet; } -///////////////////////////////////////////////////////////// PlcBookmarks +// PlcBookmarks // class Ww1StringList liest im Ctor eine Anzahl von P-Strings aus dem Stream // in den Speicher und patcht sie zu C-Strings um. // Die Anzahl wird in nMax zurueckgeliefert. @@ -791,7 +789,7 @@ sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex) Ww1StringList::Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb ) : pIdxA(0), nMax(0) { - if( nCb > 2 ) // ueberhaupt Eintraege ? + if( nCb > 2 ) // any entries at all? { SVBT16 nCountBytes; OSL_ENSURE(nCb > sizeof(nCountBytes), "Ww1StringList"); @@ -929,7 +927,7 @@ const OUString Ww1Bookmarks::GetName() const return aNames.GetStr( nPlcIdx[0] ); } -/////////////////////////////////////////////////////////////////// Fkp +// Fkp Ww1Fkp::Ww1Fkp(SvStream& rStream, sal_uLong ulFilePos, sal_uInt16 _nItemSize) : nItemSize(_nItemSize), bOK(sal_False) @@ -954,11 +952,11 @@ sal_uInt8* Ww1Fkp::GetData(sal_uInt16 nIndex) OSL_ENSURE(nIndex<=Count(), "index out of bounds"); if (nIndex<=Count()) pRet = aFkp + (Count()+1) * sizeof(SVBT32) + - nIndex * nItemSize; // beginn der strukturen + nIndex * nItemSize; // start of the structures return pRet; } -//////////////////////////////////////////////////////////////// FkpPap +// FkpPap sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBytes) { OSL_ENSURE( nIndex < Count(), "Ww1FkpPap::Fill() Index out of Range" ); @@ -985,7 +983,7 @@ sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBy return sal_True; } -//////////////////////////////////////////////////////////////// FkpChp +// FkpChp sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp) { OSL_ENSURE( nIndex < Count(), "Ww1FkpChp::Fill() Index out of Range" ); @@ -1003,7 +1001,7 @@ sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp) return sal_True; } -///////////////////////////////////////////////////////////////// Assoc +// Assoc Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib) : rFib(_rFib), pBuffer(NULL), bOK(sal_False) { @@ -1039,7 +1037,7 @@ OUString Ww1Assoc::GetStr(sal_uInt16 code) RTL_TEXTENCODING_MS_1252); } -/////////////////////////////////////////////////////////////////// Pap +// Pap Ww1Pap::Ww1Pap(Ww1Fib& _rFib) : Ww1PlcPap(_rFib), nPlcIndex(0), nPushedPlcIndex(0xffff), nFkpIndex(0), nPushedFkpIndex(0xffff), ulOffset(0), pPap(0) @@ -1137,7 +1135,7 @@ sal_Bool Ww1Pap::HasId(sal_uInt16 nId) return bRet; } -/////////////////////////////////////////////////////////////////// Chp +// Chp Ww1Chp::Ww1Chp(Ww1Fib& _rFib) : Ww1PlcChp(_rFib), nPlcIndex(0), nPushedPlcIndex(0xffff), nFkpIndex(0), nPushedFkpIndex(0xffff), ulOffset(0), pChp(0) @@ -1183,7 +1181,7 @@ void Ww1Chp::operator++() } } -////////////////////////////////////////////////////////////// Manager +// Manager Ww1Manager::Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs) : bOK(sal_False), bInTtp(false), bInStyle(false), bStopAll(false), aFib(rStrm), aDop(aFib), aFonts(aFib, nFieldFlgs), aDoc(aFib), pDoc(&aDoc), diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx index 279575128d2f..1d0da194e3d1 100644 --- a/sw/source/filter/ww1/w1class.hxx +++ b/sw/source/filter/ww1/w1class.hxx @@ -65,8 +65,6 @@ class Ww1SprmSep; class Ww1Style; class Ww1StyleSheet; -/////////////////////////////////////////////////////////////////////// -// // nach moeglichkeit wurden in diesem modul methoden aehnlicher // funktionalitaet gleich benannt. Die namen wurden wenn moeglich vom // ww-filter uebernommen. @@ -86,14 +84,10 @@ class Ww1StyleSheet; // GetError() gibt zurueck, ob fehler aufgetreten ist // Start(), Stop(), Out(), op<< siehe modul w1filter // Dump() siehe modul w1dump -// - -/////////////////////////////////////////////////////////////////// Fib -// -// file information block: wurzel des uebels: steht am beginn der -// datei (seek(0)) und enthaelt alle positionen der strukturen der -// datei -// + +// file information block: root of the evil: it's at the start of the +// file (seek(0)) and contains all positions of the structures of the +// file. class Ww1Fib { W1_FIB aFib; @@ -107,10 +101,7 @@ public: SvStream& GetStream() { return rStream; } }; -/////////////////////////////////////////////////////////////////// Dop -// -// document property: eigenschaften des gesamten dokuments -// +// document property: properties of the entire document class Ww1Dop { W1_DOP aDop; @@ -126,11 +117,8 @@ public: void Out(Ww1Shell&); }; -///////////////////////////////////////////////////////////// PlainText -// -// ww-dateien koennen mehrere textbloecke enthalten (main-text, -// fusznoten etc). PlainText vereinigt die gemeinsamkeiten -// +// ww-files can contain several blocks of text (main-text, +// footnotes etc). PlainText vereinigt die gemeinsamkeiten class Ww1PlainText { protected: @@ -141,7 +129,7 @@ protected: sal_Bool bOK; public: Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes); - // innerhalb des textes + // within the text sal_uLong Where() const { return ulSeek; } void Seek( sal_uLong ulNew ) { @@ -175,7 +163,6 @@ public: static bool IsChar( sal_Unicode c ) { return c >= MinChar; } }; -/////////////////////////////////////////////////////////////// DocText class Ww1DocText : public Ww1PlainText { public: @@ -185,7 +172,6 @@ public: } }; -/////////////////////////////////////////////////////////////// FtnText class Ww1FtnText : public Ww1PlainText { public: @@ -197,7 +183,6 @@ public: } }; -/////////////////////////////////////////////////////////////// HddText class Ww1HddText : public Ww1PlainText { public: @@ -209,7 +194,6 @@ public: } }; -/////////////////////////////////////////////////////////////// McrText class Ww1McrText : public Ww1PlainText { public: @@ -222,7 +206,6 @@ public: } }; -/////////////////////////////////////////////////////////////// AtnText class Ww1AtnText : public Ww1PlainText { public: @@ -235,10 +218,7 @@ public: } }; -///////////////////////////////////////////////////////////////// Style -// -// ein einzelner style oder vorlage -// +// a single style or template class Ww1Style { OUString aName; @@ -267,10 +247,7 @@ public: void Out(Ww1Shell&, Ww1Manager&); }; -//////////////////////////////////////////////////////////// StyleSheet -// -// die sammlung aller vorlagen (max. 256) -// +// collection of all templates (max. 256) class Ww1StyleSheet { Ww1Style aStyles[256]; @@ -299,19 +276,16 @@ public: return !bOK; } }; -///////////////////////////////////////////////////////////////// Fonts -// // ww kennt nur font-nummern beim formatieren. nebenher gibts ein // array von fonts, damit man aus der nummer einen konkreten font // machen kann. -// class Ww1Fonts { protected: W1_FFN** pFontA; // Array of Pointers to Font Description Ww1Fib& rFib; sal_uLong nFieldFlags; - sal_uInt16 nMax; // Array-Groesse + sal_uInt16 nMax; // Array size sal_Bool bOK; public: Ww1Fonts(Ww1Fib&, sal_uLong nFieldFlgs); @@ -328,8 +302,7 @@ public: SvxFontItem GetFont(sal_uInt16); }; -//////////////////////////////////////////////////////////// SingleSprm -// +// SingleSprm // diese klassen ersetzen die aSprmTab etc des ww6-filters. die // funktionspointer sind hier virtuale methoden, fuer die typen (byte, // word, var-sized etc) gibt es abgeleitete klassen. diese haben @@ -341,20 +314,17 @@ public: // wohlgemerkt: SingleSprms sind die _beschreibung_ und _funktion_ der // Sprms, nicht deren inhalt. dieser musz uebergeben werden an die // einzelnen methoden wie Size, Dump und Start/Stop. -// class Ww1SingleSprm { public: #ifdef DUMP -// -// allein die virtuellen methoden stehen in der vtab, also je nachdem, -// ob fuer dumper oder filter uebersetzt wird ausblenden: das spart -// platz. ausserdem stehen die methoden fuer dumper bzw filter in -// verschiedenen modulen, die im jeweils anderen projekt nicht -// uebersetzt werden. das diese dann beim linken nicht zur verfuegung -// stehen faellt dann auch nicht auf. Der Namensstring ist nur im -// Dumper noetig: weg damit im Filter. -// + // allein die virtuellen methoden stehen in der vtab, also je nachdem, + // ob fuer dumper oder filter uebersetzt wird ausblenden: das spart + // platz. ausserdem stehen die methoden fuer dumper bzw filter in + // verschiedenen modulen, die im jeweils anderen projekt nicht + // uebersetzt werden. das diese dann beim linken nicht zur verfuegung + // stehen faellt dann auch nicht auf. Der Namensstring ist nur im + // Dumper noetig: weg damit im Filter. void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); virtual std::ostream& Dump(std::ostream&, sal_uInt8*, sal_uInt16); @@ -523,7 +493,7 @@ public: Ww1SingleSprmWord(sName) { } void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); - // SetBorder() wird auch fuer Tabellen gebraucht, deshalb public + // SetBorder() is needed for tables, too. That's why it's public static editeng::SvxBorderLine* SetBorder(editeng::SvxBorderLine*, W1_BRC10*); }; @@ -586,7 +556,7 @@ public: Ww1SingleSprmPChgTabsPapx(sal_Char* sName) : Ww1SingleSprmByteSized(0, sName) { } - // Size() ist noch nicht aktiviert !! + // Size() is not yet activated! void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); }; @@ -700,10 +670,7 @@ public: void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&); }; -////////////////////////////////////////////////////////////////// Sprm -// // der tatsaechlich in der datei auftretende datentyp Sprm -// class Ww1Sprm { sal_Bool ReCalc(); @@ -723,17 +690,17 @@ protected: sal_Bool bOK; sal_uInt16* pArr; sal_uInt16 count; -// ohne Token, mit laengen-byte/word + // ohne Token, mit laengen-byte/word sal_uInt16 GetSize(sal_uInt8 nId, sal_uInt8* pSprm); -// mit Token und LaengenByte + // mit Token und LaengenByte sal_uInt16 GetSizeBrutto(sal_uInt8* pSprm) { sal_uInt8 nId = *pSprm++; return GetSize(nId, pSprm) + 1; } -// gibt fuer nTh element id, size & zeiger auf daten: -// sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&); + // returns for the n-th element id, size & pointer to data: + // sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&); public: -// SH: brauche ich public -// gibt fuer nTh element id, size & zeiger auf daten: + // SH: I need it to be public + // returns for the n-th element id, size & pointer to data: sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&); Ww1Sprm(sal_uInt8*, sal_uInt16); @@ -752,11 +719,8 @@ public: static void DeinitTab(); }; -/////////////////////////////////////////////////////////////// Picture -// -// der wrapper um den datentyp PIC, eine struktur, die am beginn eines -// bild-dateinamens oder eines eingebetteten bildes steht. -// +// the wrapper around the type PIC, a structure, which stands at the beginning +// of a picture filename or an embedded picture class Ww1Picture { sal_Bool bOK; @@ -772,12 +736,9 @@ public: void WriteBmp(SvStream&); }; -/////////////////////////////////////////////////////////////////// Plc -// // eine der wichtigen array-strukturen der ww-dateien. sie beinhalten // n+1 dateipositionen und n attribute, die zwischen den // dateipositionen gelten. -// class Ww1Plc { sal_uInt8* p; @@ -792,7 +753,7 @@ public: Ww1Plc(Ww1Fib&, sal_uLong, sal_uInt16, sal_uInt16); ~Ww1Plc(); friend std::ostream& operator <<(std::ostream&, Ww1Plc&); - sal_uLong Where(sal_uInt16); // wie im jeweiligen plc + sal_uLong Where(sal_uInt16); // like in each plc void Seek(sal_uLong, sal_uInt16&); void Fill(sal_uInt16 nIndex, sal_uLong& begin, sal_uLong& end) { begin = Where(nIndex); @@ -808,7 +769,6 @@ public: //Plc 2, 2, 6, 0, 2, 0 //Fkp 1, 1, 0, 0, 0, 0 -/////////////////////////////////////////////////////////// PlcGlossary class Ww1PlcGlossary : public Ww1Plc { public: @@ -818,7 +778,6 @@ public: } }; -////////////////////////////////////////////////////// PlcAnnotationRef class Ww1PlcAnnotationRef : public Ww1Plc { public: @@ -828,7 +787,6 @@ public: } }; -////////////////////////////////////////////////////// PlcAnnotationTxt class Ww1PlcAnnotationTxt : public Ww1Plc { public: @@ -838,7 +796,7 @@ public: } }; -///////////////////////////////////////////////////////// PlcAnnotation +// PlcAnnotation class Ww1Annotation { Ww1PlcAnnotationRef aRef; Ww1PlcAnnotationTxt aTxt; @@ -850,7 +808,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1Annotation&); }; -//////////////////////////////////////////////////////////////// PlcSep class Ww1PlcSep : public Ww1Plc { public: @@ -861,7 +818,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1PlcSep&); }; -//////////////////////////////////////////////////////////////// PlcChp class Ww1PlcChp : public Ww1Plc { public: @@ -872,7 +828,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1PlcChp&); }; -//////////////////////////////////////////////////////////////// PlcPap class Ww1PlcPap : public Ww1Plc { public: @@ -883,7 +838,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1PlcPap&); }; -//////////////////////////////////////////////////////// PlcFootnoteRef class Ww1PlcFootnoteRef : public Ww1Plc { public: @@ -894,7 +848,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1PlcFootnoteRef&); }; -//////////////////////////////////////////////////////// PlcFootnoteTxt class Ww1PlcFootnoteTxt : public Ww1Plc { public: @@ -905,7 +858,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1PlcFootnoteTxt&); }; -///////////////////////////////////////////////////////////// PlcFields class Ww1PlcFields : public Ww1Plc { public: @@ -914,12 +866,12 @@ public: {} W1_FLD* GetData(sal_uInt16 nIndex) { return (W1_FLD*)Ww1Plc::GetData(nIndex); } - sal_uLong Where(sal_uInt16 nIndex) // absolut im file + sal_uLong Where(sal_uInt16 nIndex) // absolute within the file { return Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet(); } friend std::ostream& operator <<(std::ostream&, Ww1PlcFields&); }; -///////////////////////////////////////////////////////////// PlcBookmarks +// PlcBookmarks class Ww1StringList { sal_Char** pIdxA; @@ -950,9 +902,9 @@ public: {} sal_uInt8* GetData(sal_uInt16 nIndex) { return Ww1Plc::GetData(nIndex); } - // Position als CP + // Position as CP sal_uLong WhereCP(sal_uInt16 nIndex) { return Ww1Plc::Where(nIndex); } - // absolut im file + // absolute within the file sal_uLong Where(sal_uInt16 nIndex) { return ( nIndex < Count() ) @@ -961,7 +913,6 @@ public: } }; -//////////////////////////////////////////////////////////////// PlcHdd class Ww1PlcHdd : public Ww1Plc { public: @@ -971,11 +922,8 @@ public: {} }; -/////////////////////////////////////////////////////////////////// Fkp -// // aehnlich den plcs aufgebaute arrays, die sich auf eine groesze von -// 512 byte beschraenken. -// +// 512 byte beschraenken class Ww1Fkp { protected: @@ -990,7 +938,6 @@ public: sal_uLong Where(sal_uInt16); // wie im entsprechenden fkp }; -//////////////////////////////////////////////////////////////// FkpPap class Ww1FkpPap : public Ww1Fkp { public: @@ -1001,7 +948,6 @@ public: sal_Bool Fill(sal_uInt16, sal_uInt8*&, sal_uInt16&); }; -//////////////////////////////////////////////////////////////// FkpChp class Ww1FkpChp : public Ww1Fkp { #ifdef DUMP @@ -1020,7 +966,6 @@ public: sal_Bool Fill(sal_uInt16, W1_CHP&); }; -////////////////////////////////////////////////////////////// SprmPapx class Ww1SprmPapx : public Ww1Sprm { W1_PAPX aPapx; @@ -1033,7 +978,6 @@ public: void Stop(Ww1Shell&, Ww1Manager&); }; -/////////////////////////////////////////////////////////////// SprmSep class Ww1SprmSep : public Ww1Sprm { public: @@ -1043,7 +987,6 @@ public: friend std::ostream& operator <<(std::ostream&, Ww1SprmSep&); }; -///////////////////////////////////////////////////////////////// Assoc class Ww1Assoc { enum fields { FileNext, Dot, Title, Subject, KeyWords, Comments, @@ -1065,8 +1008,6 @@ public: void Out(Ww1Shell&); }; -////////////////////////////////////////////////////////// HeaderFooter -// // Header/Footer/Footnoteseparators sind einer nach dem naechsten in // einem eigenen text gespeichert. ein plc trennt diesen text in // einzelne teile. diese werden durchnummeriert als ihdd. nun gibt es @@ -1080,19 +1021,18 @@ public: // HeaderFooter merkt sich fuer jede der 9 die momentane einstellung // (jedoch nicht die alten) und den naechstvergebbaren ihdd. ist ein // teil nicht vorhanden bekommt er den wert 0xffff. -// class Ww1HeaderFooter : public Ww1PlcHdd { - sal_uInt16 nextIhdd; // naechster textteil im HddText - sal_uInt16 nFtnSep; // fusznoten trenner - sal_uInt16 nFtnFollowSep; // folge fusznoten trenner - sal_uInt16 nFtnNote; // folgefunsznotennotiz - sal_uInt16 nEvenHeadL; // kopfzeilen grader seiten - sal_uInt16 nOddHeadL; // kopfzeilen ungrader seiten - sal_uInt16 nEvenFootL; // fuszzeilen grader seiten - sal_uInt16 nOddFootL; // fuszzeilen ungerader seiten - sal_uInt16 nFirstHeadL; // kopfzeilen der ersten seite - sal_uInt16 nFirstFootL; // fuszzeilen der ersten seite + sal_uInt16 nextIhdd; // naechster textteil im HddText + sal_uInt16 nFtnSep; // fusznoten trenner + sal_uInt16 nFtnFollowSep; // folge fusznoten trenner + sal_uInt16 nFtnNote; // folgefunsznotennotiz + sal_uInt16 nEvenHeadL; // kopfzeilen grader seiten + sal_uInt16 nOddHeadL; // kopfzeilen ungrader seiten + sal_uInt16 nEvenFootL; // fuszzeilen grader seiten + sal_uInt16 nOddFootL; // fuszzeilen ungerader seiten + sal_uInt16 nFirstHeadL; // kopfzeilen der ersten seite + sal_uInt16 nFirstFootL; // fuszzeilen der ersten seite enum HeaderFooterMode { None, FtnSep, FtnFollowSep, FtnNote, EvenHeadL, OddHeadL, EvenFootL, OddFootL, FirstHeadL, MaxHeaderFooterMode @@ -1205,20 +1145,19 @@ public: void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&); }; -//////////////////////////////////////////////////////////////// Fields class Ww1Fields : public Ww1PlcFields { sal_uInt16 nPlcIndex; OUString sErgebnis; // das von word errechnete ergebniss SwField* pField; - sal_uLong Where(sal_uInt16 nIndex) // innerhalb des textes + sal_uLong Where(sal_uInt16 nIndex) // within the text { return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); } public: Ww1Fields(Ww1Fib& rFibL, sal_uLong ulFilePos, sal_uInt16 nBytes) : Ww1PlcFields(rFibL, ulFilePos, nBytes), nPlcIndex(0), pField(0) {} - // innerhalb des textes + // within the text sal_uLong Where() { return Where(nPlcIndex); } void operator++() { @@ -1274,7 +1213,6 @@ public: {} }; -//////////////////////////////////////////////////////////////// Bookmarks class Ww1Bookmarks { Ww1PlcBookmarkTxt aNames; @@ -1304,7 +1242,6 @@ public: void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0); }; -///////////////////////////////////////////////////////////// Footnotes class Ww1Footnotes : public Ww1PlcFootnoteRef { sal_uInt16 nPlcIndex; @@ -1314,7 +1251,7 @@ public: Ww1Footnotes(Ww1Fib& rFibL) : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(sal_False) {} - // innerhalb des textes + // within the text sal_uLong Where() { sal_uLong ulRet = 0xffffffff; @@ -1331,7 +1268,6 @@ public: void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&); }; -/////////////////////////////////////////////////////////////////// Sep class Ww1Sep : public Ww1PlcSep { Ww1HeaderFooter aHdd; @@ -1343,7 +1279,7 @@ public: Ww1HeaderFooter& GetHdd() { return aHdd; } void operator++() { nPlcIndex++; } sal_uInt8* GetData() { return Ww1PlcSep::GetData(nPlcIndex); } - // innerhalb des textes + // within the text sal_uLong Where() { return Ww1PlcSep::Where(nPlcIndex); } void SetGrpfIhdt(sal_uInt8 grpfIhdt) { @@ -1354,7 +1290,6 @@ public: { aHdd.Stop(rOut, rMan, c); } }; -/////////////////////////////////////////////////////////////////// Pap class Ww1Pap : public Ww1PlcPap { sal_uInt16 nPlcIndex; @@ -1381,7 +1316,7 @@ class Ww1Pap : public Ww1PlcPap public: Ww1Pap(Ww1Fib& rFib); ~Ww1Pap() { delete pPap; } - sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes + sal_uLong Where( sal_Bool bSetIndex = sal_True ); // within the text void operator++(); sal_Bool FillStart(sal_uInt8*& pB, sal_uInt16& nSize) { @@ -1424,7 +1359,6 @@ public: sal_Bool HasId(sal_uInt16 nId); }; -/////////////////////////////////////////////////////////////////// Chp class Ww1Chp : public Ww1PlcChp { sal_uInt16 nPlcIndex; @@ -1448,7 +1382,7 @@ class Ww1Chp : public Ww1PlcChp public: Ww1Chp( Ww1Fib& rFib ); ~Ww1Chp() { delete pChp; } - sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes + sal_uLong Where( sal_Bool bSetIndex = sal_True ); // within the text void operator++(); sal_Bool FillStart(W1_CHP& rChp) { @@ -1485,12 +1419,9 @@ public: } }; -/////////////////////////////////////////////////////////////// Manager -// // zentraler aufhaenger der ww-seite des filters, konstruiert aus dem // inputstream (ww-datei) enthaelt er alles, was noetig ist, um in die // shell (pm-seite) gepiped zu werden. -// class Ww1Manager { sal_Bool bOK; @@ -1500,17 +1431,17 @@ class Ww1Manager Ww1Fib aFib; Ww1Dop aDop; Ww1Fonts aFonts; -// ab jetzt alles paarig, fuer 'pushed': + // ab jetzt alles paarig, fuer 'pushed': Ww1DocText aDoc; Ww1PlainText* pDoc; sal_uLong ulDocSeek; sal_uLong* pSeek; Ww1TextFields aFld; Ww1Fields* pFld; -// selbst 'push'bar: + // selbst 'push'bar: Ww1Chp aChp; Ww1Pap aPap; -// nicht in textbereichen vorhanden, wenn ge'pushed' + // nicht in textbereichen vorhanden, wenn ge'pushed' Ww1Footnotes aFtn; Ww1Bookmarks aBooks; Ww1Sep aSep; @@ -1523,7 +1454,7 @@ public: Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs); sal_Bool GetError() const { return !bOK; } -// Fuer Tabellen + // for tables void SetInTtp(bool bSet = true) { bInTtp = bSet; } bool IsInTtp() const { return bInTtp; } void SetInStyle(bool bSet = true) { bInStyle = bSet; } @@ -1534,7 +1465,7 @@ public: sal_Bool HasTtp(); sal_Bool LastHasTtp(); -// Fuer Flys + // for flys sal_Bool HasPPc(); sal_Bool HasPDxaAbs(); @@ -1542,7 +1473,7 @@ public: Ww1PlainText& GetText() { return *pDoc; } Ww1Dop& GetDop() { return aDop; } Ww1Sep& GetSep() { return aSep; } - // innerhalb des textes + // within the text sal_uLong Where() { return pDoc->Where(); } void Fill( sal_Unicode& rChr ) { pDoc->Out( rChr ); } sal_uInt8 Fill( OUString& rStr, sal_uLong ulLen) diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx index 06b074b1772a..970461e97796 100644 --- a/sw/source/filter/ww1/w1filter.cxx +++ b/sw/source/filter/ww1/w1filter.cxx @@ -67,9 +67,6 @@ using namespace css; using namespace nsSwDocInfoSubType; - -/////////////////////////////////////////////////////////////////////// -// // hier stehen die methoden operator<<, Out, Start und Stop mit // folgender Bedeutung: wenn moeglich wird die information aus dem // dokument per @@ -85,45 +82,46 @@ using namespace nsSwDocInfoSubType; // ausnahme haben: hier stehen auch methoden, die aus anderen gruenden // fuer den dumper sinnlos sind, zB wenn sie auf sv-strukturen beruhen // wie zB GetFont() auf SvxFontItem. -// -/////////////////////////////////////////////////////////////// Manager +// Manager Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This) { // verhindern, das bei rekusivem aufruf dies mehrfach passiert: if (!This.Pushed()) { - { // der wird nur temporaer gebraucht: + { + // is only needed temporarily This.SetInStyle( true ); Ww1StyleSheet(This.aFib).Out(rOut, This); This.SetInStyle( false ); } - { // dieser auch: + { + // this one, too Ww1Assoc(This.aFib).Out(rOut); } - // dieser nicht, der ist bereits member: + // dieser nicht, der ist bereits member: This.aDop.Out(rOut); - // Jetzt entscheiden, wie Seitenvorlagen erzeugt werden + // Jetzt entscheiden, wie Seitenvorlagen erzeugt werden if (This.GetSep().Count() <= 1) rOut.SetUseStdPageDesc(); } - // und jetzt das eigentliche dok: + // and now the actual dok sal_Unicode cUnknown = ' '; while (*This.pSeek < This.pDoc->Count()) { - // ausgabe des ProgressState nur, wenn im haupttext, da sonst - // nicht bestimmt werden kann, wie weit wir sind: + // ausgabe des ProgressState nur, wenn im haupttext, da sonst + // nicht bestimmt werden kann, wie weit wir sind: if (!This.Pushed()) ::SetProgressState(This.Where() * 100 / This.pDoc->Count(), rOut.GetDoc().GetDocShell()); - // hier werden abwechselnd die attribute und die zeichen in die - // shell gepumpt. die positionen werden durch das lesen der - // zeichen aus dem manager hoch- gezaehlt. erst alle attribute: + // hier werden abwechselnd die attribute und die zeichen in die + // shell gepumpt. die positionen werden durch das lesen der + // zeichen aus dem manager hoch- gezaehlt. erst alle attribute: This.Out(rOut, cUnknown); - // das textdocument pDoc ist ein Ww1PlainText, dessen Out() - // methode solange ausgibt, bis entweder ein sonderzeichen - // auftaucht oder die anzahl der auszugebenden zeichen erreicht - // ist: + // das textdocument pDoc ist ein Ww1PlainText, dessen Out() + // methode solange ausgibt, bis entweder ein sonderzeichen + // auftaucht oder die anzahl der auszugebenden zeichen erreicht + // ist: cUnknown = This.pDoc->Out(rOut, *This.pSeek); } This.SetStopAll(true); @@ -134,7 +132,7 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This) void Ww1Manager::OutStop(Ww1Shell& rOut, sal_Unicode cUnknown) { - // Bookmarks brauchen nicht beendet werden ??? + // bookmarks don't need to be ended? if (pFld) pFld->Stop(rOut, *this, cUnknown); if (!Pushed()) @@ -149,7 +147,7 @@ void Ww1Manager::OutStop(Ww1Shell& rOut, sal_Unicode cUnknown) void Ww1Manager::OutStart( Ww1Shell& rOut ) { -// alle attribute, die's brauchen beginnen + // alle attribute, die's brauchen beginnen if (!Pushed()) aSep.Start(rOut, *this); if (true) @@ -162,27 +160,27 @@ void Ww1Manager::OutStart( Ww1Shell& rOut ) pFld->Start(rOut, *this); if (!Pushed()) aBooks.Start(rOut, *this); -// bestimmen, wo das naechste Ereigniss ist: + // bestimmen, wo das naechste Ereigniss ist: sal_uLong ulEnd = pDoc->Count(); // spaetestens am textende if (!Pushed()) - if (ulEnd > aSep.Where()) // naechster Sep vorher? + if (ulEnd > aSep.Where()) // next Sep prior? ulEnd = aSep.Where(); if (true) - if (ulEnd > aPap.Where()) // naechster Pap vorher? + if (ulEnd > aPap.Where()) // next Pap prior? ulEnd = aPap.Where(); if (true) - if (ulEnd > aChp.Where()) // naechster Chp vorher? + if (ulEnd > aChp.Where()) // next Chp prior? ulEnd = aChp.Where(); if (!Pushed()) - if (ulEnd > aFtn.Where()) // naechster Ftn vorher? + if (ulEnd > aFtn.Where()) // next Ftn prior? ulEnd = aFtn.Where(); if (pFld) - if (ulEnd > pFld->Where()) // naechster Fld vorher? + if (ulEnd > pFld->Where()) // next Fld prior? ulEnd = pFld->Where(); if (!Pushed()) - if (ulEnd > aBooks.Where()) // naechster Bookmark vorher? + if (ulEnd > aBooks.Where()) // next Bookmark prior? ulEnd = aBooks.Where(); - *pSeek = Where(); // momentane position + *pSeek = Where(); // current position if (*pSeek < ulEnd) // sind wir bereits weiter? *pSeek = ulEnd; } @@ -197,7 +195,7 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown) // unbehandelte sonderzeichen augegeben. das werden genauso alle // start-methoden gerufen und danach per where festgestellt, an // welcher stelle die naechste aktion zu erwarten ist. -// + // ist der manager in einem ge'push'ten mode, werden bestimmte // elemente ausgeklammert. felder werden wiederum nur in besonderen // faellen augeklammert, wenn naemlich bereiche ausgegeben werden, die @@ -221,7 +219,7 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown) OutStop( rOut, cUnknown ); // Attrs ggfs. beenden -// meta-zeichen interpretieren: + // meta-zeichen interpretieren: if (!Ww1PlainText::IsChar(cUnknown)) switch (cUnknown) { @@ -306,8 +304,6 @@ void Ww1Manager::Pop() pFld = &aFld; } -///////////////////////////////////////////////////////////// Bookmarks - void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16) { if (GetIsEnd()) @@ -317,7 +313,7 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16) } const OUString & rName = GetName(); - if( rName.startsWith( "_Toc" ) ) // "_Toc*" ist ueberfluessig + if( rName.startsWith( "_Toc" ) ) // "_Toc*" is superfluous return; if( rOut.IsFlagSet( SwFltControlStack::HYPO ) @@ -329,11 +325,11 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16) if( nLen > MAX_FIELDLEN ) nLen = MAX_FIELDLEN; - // Lese Inhalt des Bookmark + // read content of the bookmark // geht vermulich auch ueber Ww1PlainText OUString aVal( rMan.GetText().GetText( Where(), nLen ) ); - // in 2 Schritten, da OS/2 zu doof ist + // in 2 steps, since OS/2 is too stupid SwFltBookmark aBook( rName, aVal, GetHandle() ); rOut << aBook; } @@ -347,7 +343,6 @@ void Ww1Bookmarks::Start(Ww1Shell& rOut, Ww1Manager& rMan) } } -///////////////////////////////////////////////////////////// Footnotes void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if (rMan.Where() >= Where()) @@ -393,7 +388,6 @@ void Ww1Footnotes::Stop(Ww1Shell& /*rOut*/, Ww1Manager& rMan, sal_Unicode& c) } } -//////////////////////////////////////////////////////////////// Fields void Ww1Fields::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if (rMan.Where() >= Where()){ @@ -449,7 +443,7 @@ static WWDateTime GetTimeDatePara( const OUString& rForm, if( pTime ) *pTime = TF_SSMM_12; } - else // keine Zeit + else // no time { eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_TIME ); } @@ -457,7 +451,7 @@ static WWDateTime GetTimeDatePara( const OUString& rForm, sal_Int32 nDPos = 0; while (true) { - nDPos = rForm.indexOf('M', nDPos); // M -> Datum + nDPos = rForm.indexOf('M', nDPos); // M -> date if (nDPos == 0 || nDPos == -1) break; sal_Unicode cPrev = rForm[nDPos - 1]; @@ -468,7 +462,7 @@ static WWDateTime GetTimeDatePara( const OUString& rForm, ++nDPos; } - if (nDPos != -1) // Monat -> Datum ? + if (nDPos != -1) // month -> date ? { static SwDateFormat const aDateA[32] = { @@ -536,10 +530,10 @@ extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich, void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth) { - OUString sType; // der typ als string - OUString sFormel; // die formel + OUString sType; // the type as string + OUString sFormel; // the formula OUString sFormat; - OUString sDTFormat; // Datum / Zeit-Format + OUString sDTFormat; // date/time format W1_FLD* pData = GetData(); // die an den plc gebunden daten OSL_ENSURE(pData->chGet()==19, "Ww1Fields"); // sollte beginn sein @@ -655,12 +649,12 @@ oncemore: SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) ); pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr); ((SwSetExpField*)pField)->SetSubType( nsSwExtendedSubType::SUB_INVISIBLE ); -// Invisible macht in 378 AErger, soll aber demnaechst gehen + // Invisible macht in 378 AErger, soll aber demnaechst gehen // das Ignorieren des Bookmarks ist nicht implementiert } break; - case 14: // info var + case 14: // info variable { OUString aSubType; pos = aStr.indexOf(' '); @@ -678,16 +672,16 @@ oncemore: aSubType = rOut.ConvertUStr(aSubType); - // ganz grosze schiete: der typ 'info' kann einem der - // typen 15..31 entsprechen. er enthaelt als formel - // das eingentliche feld der doc-info. - // kein ';' benutzen mit folgendem macro: + // huge pile of shit: the type 'info' can represent one of + // types 15 to 31. it contains as formula the actual field + // of the doc info. + // Don't use ';' with the following macro #define IS(sd, se, t) \ if (aSubType == sd || aSubType == se) \ rbType = t; \ else - // deutsche bez. englische bez. typ-code + // german name english name type-code IS("titel", "title", 15) IS("thema", "subject", 16) IS("autor", "author", 17) @@ -756,7 +750,7 @@ oncemore: case WW_BOTH: nReg = DI_SUB_DATE; break; default: break; - // WW_DONTKNOW -> Default bereits gesetzt + // WW_DONTKNOW -> Default already set } pField = new SwDocInfoField((SwDocInfoFieldType*) rOut.GetSysFldType(RES_DOCINFOFLD), nSub | nReg, OUString()); @@ -792,8 +786,8 @@ oncemore: SwTimeFormat aTime = TF_SYSTEM; WWDateTime eDT = GetTimeDatePara(sDTFormat, &aTime, &aDate); - if( eDT == WW_DONTKNOW ) // kein D/T-Formatstring - eDT = ( rbType == 32 ) ? WW_TIME : WW_DATE; // benutze ID + if( eDT == WW_DONTKNOW ) // no D/T-format string + eDT = ( rbType == 32 ) ? WW_TIME : WW_DATE; // use ID if( eDT & WW_DATE ) { @@ -807,7 +801,7 @@ oncemore: if( eDT == WW_BOTH ) rOut << * pField << ' '; - // Mogel: direkt einfuegen und Space dahinter + // Cheat: insert directly and a space afterwards } if( eDT & WW_TIME ) { @@ -913,7 +907,7 @@ oncemore: ((SwSetExpField*)pField)->SetInputFlag( sal_True ); ((SwSetExpField*)pField)->SetSubType(nsSwExtendedSubType::SUB_INVISIBLE); } - case 39: // fillin command + case 39: // filling command pField = new SwInputField( static_cast<SwInputFieldType*>(rOut.GetSysFldType( RES_INPUTFLD )), OUString(), sFormel, @@ -949,11 +943,11 @@ oncemore: OUString sName; while (*pFormel != '\0' && *pFormel != ' ') { - // ab hier koennte eine extension kommen + // from here on a extension could appear if (*pFormel == '.') pDot = pFormel; else - // aha: wir waren bislang noch in dirs + // so far we were in directories if (*pFormel == '\\') { pDot = 0; @@ -1032,16 +1026,15 @@ oncemore: sal_uLong Ww1Fields::GetLength() { -// berechnet die laenge eines feldteiles. nicht mitgerechnet werden -// die terminierenden zeichen im text (19, 20, 21) die beginn, trenner -// und ende bedeuten. + // berechnet die laenge eines feldteiles. nicht mitgerechnet werden + // die terminierenden zeichen im text (19, 20, 21) die beginn, trenner + // und ende bedeuten. sal_uLong ulBeg = Where(); sal_uLong ulEnd = Where(nPlcIndex+1); OSL_ENSURE(ulBeg<ulEnd, "Ww1Fields"); return (ulEnd - ulBeg) - 1; } -/////////////////////////////////////////////////////////////////// Sep void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if (rMan.Where() >= Where()) @@ -1059,10 +1052,10 @@ void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan) rFmt.SetFmtAttr(aLR); SvxULSpaceItem aUL(rDOP.dyaTopGet(), rDOP.dyaBottomGet(), RES_UL_SPACE); rFmt.SetFmtAttr(aUL); - // sobald wir mit dem lesen der zeichen soweit sind, wo sep's - // momentanes attribut beginnt, wird dieses attribut eingefuegt. - // diese methode ist bei den meisten start/stop methoden der - // memberklassen des managers identisch. + // sobald wir mit dem lesen der zeichen soweit sind, wo sep's + // momentanes attribut beginnt, wird dieses attribut eingefuegt. + // diese methode ist bei den meisten start/stop methoden der + // memberklassen des managers identisch. sal_uInt8* pByte = GetData(); Ww1SprmSep aSprm(rFib, SVBT32ToUInt32(pByte + 2)); aSprm.Start(rOut, rMan); @@ -1072,18 +1065,17 @@ void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan) } } -/////////////////////////////////////////////////////////////////// Pap void Ww1Pap::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if (rMan.Where() >= Where()) { sal_uInt8* pByte; sal_uInt16 cb; - // bereitstellen der zu startenden attribute + // bereitstellen der zu startenden attribute if (FillStart(pByte, cb)) { Ww1SprmPapx aSprm(pByte, cb); - // und ausgeben: + // and give the following output aSprm.Start(rOut, rMan); } ++(*this); @@ -1105,11 +1097,8 @@ void Ww1Pap::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&) } } -//////////////////////////////////////////////////////////////// W1_CHP -// // momentan laesst sich die ausgabe von W1CHPxen nicht nur per define -// loesen.... -// +// loesen... void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan) { if (fBoldGet()) @@ -1190,7 +1179,6 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan) } } -/////////////////////////////////////////////////////////////////// Chp void Ww1Chp::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if (rMan.Where() >= Where()) @@ -1218,7 +1206,7 @@ void Ww1Chp::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&) W1_CHP aChpx; if (FillStop(aChpx)) { - // zuerst alle toggle-flags + // zuerst alle toggle-flags if (aChpx.fBoldGet()) rOut.EndItem(RES_CHRATR_WEIGHT); if (aChpx.fItalicGet()) @@ -1229,8 +1217,8 @@ void Ww1Chp::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&) rOut.EndItem(RES_CHRATR_CONTOUR); if (aChpx.fSmallCapsGet() || aChpx.fCapsGet()) rOut.EndItem(RES_CHRATR_CASEMAP); - // dann alle zahl-werte, diese haben flags, wenn sie gesetzt - // sind.................. + // dann alle zahl-werte, diese haben flags, wenn sie gesetzt + // sind... if (aChpx.fsHpsGet()) rOut.EndItem(RES_CHRATR_FONTSIZE); if (aChpx.fsKulGet()) @@ -1250,23 +1238,20 @@ void Ww1Chp::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&) } } -///////////////////////////////////////////////////////////////// Style void Ww1Style::Out(Ww1Shell& rOut, Ww1Manager& rMan) { -// Zuerst Basis, damit Attribute des Basis-Styles erkannt werden -// first: Base................................................ + // Zuerst Basis, damit Attribute des Basis-Styles erkannt werden + // first: Base if(pParent->GetStyle(stcBase).IsUsed() ) // Basis gueltig ? rOut.BaseStyle(stcBase); -// next of all: CHP............................................... + // next of all: CHP aChpx.Out(rOut, rMan); -// Last: PAP....................................................... + // Last: PAP if (pPapx) pPapx->Start(rOut, rMan); } -////////////////////////////////////////////////////////// Ww1PlainText -// // die Out() methoden von plaintext fuer den filter geben eine anzahl // zeichen aus auf die shell, einen string oder einen char, wieviel // zeichen ausgegeben werden, bestimmt ulEnd, das das ende bestimmt, @@ -1280,11 +1265,10 @@ void Ww1Style::Out(Ww1Shell& rOut, Ww1Manager& rMan) // also beachten, dasz wenn !IsChar(Out(...)) gilt, ulEnd unter // umstaenden nicht erreicht wurde. dann wurde das kontrollzeichen // zwar (weg-)gelesen, jedoch noch nicht ausgegeben. -// sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd ) { -// gibt die zeichen bis ulEnd aus, es sei den es kommen sonderzeichen -// die eine bedeutung haben wie absatzende oder seitenumbruch. + // gibt die zeichen bis ulEnd aus, es sei den es kommen sonderzeichen + // die eine bedeutung haben wie absatzende oder seitenumbruch. if (ulEnd > Count()) ulEnd = Count(); while (ulSeek < ulEnd) @@ -1301,7 +1285,7 @@ sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd ) sal_Unicode Ww1PlainText::Out(OUString& rStr, sal_uLong ulEnd) { -// wie Out(Shell..., jedoch ausgabe auf einen string + // wie Out(Shell..., jedoch ausgabe auf einen string rStr = ""; if (ulEnd > Count()) ulEnd = Count(); @@ -1317,9 +1301,7 @@ sal_Unicode Ww1PlainText::Out(OUString& rStr, sal_uLong ulEnd) return Ww1PlainText::MinChar; } -// // hier eruebrigt sich ulEnd...oder? -// sal_Unicode Ww1PlainText::Out( sal_Unicode& rRead ) { rRead = (*this)[ulSeek]; @@ -1327,8 +1309,6 @@ sal_Unicode Ww1PlainText::Out( sal_Unicode& rRead ) return rRead; } -/////////////////////////////////////////////////////////// Ww1SprmPapx - void Ww1SprmPapx::Start(Ww1Shell& rOut, Ww1Manager& rMan) { if( !rMan.IsInStyle() ){ // Innerhalb Style gehts ueber die @@ -1364,19 +1344,18 @@ void Ww1SprmPapx::Stop(Ww1Shell& rOut, Ww1Manager& rMan) } } -///////////////////////////////////////////////////////////////// Fonts SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) { -// erzeugen eine fonts im sw-sinne aus den word-strukturen + // erzeugen eine fonts im sw-sinne aus den word-strukturen FontFamily eFamily = FAMILY_DONTKNOW; OUString aName; FontPitch ePitch = PITCH_DONTKNOW; rtl_TextEncoding eCharSet = RTL_TEXTENCODING_DONTKNOW; switch (nFCode) { -// In the Winword 1.x format, the names of the first three fonts were -// omitted from the table and assumed to be "Tms Rmn" (for ftc = 0), -// "Symbol", and "Helv" + // In the Winword 1.x format, the names of the first three fonts were + // omitted from the table and assumed to be "Tms Rmn" (for ftc = 0), + // "Symbol", and "Helv" case 0: eFamily = FAMILY_ROMAN; aName = "Tms Rmn"; @@ -1399,23 +1378,23 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) W1_FFN* pF = GetFFN(nFCode - 3); if (pF != 0) { - // Fontname ......................................... + // Fontname aName = OUString( (sal_Char*)pF->szFfnGet(), strlen( (sal_Char*)pF->szFfnGet() ), RTL_TEXTENCODING_MS_1252 ); - // Pitch ............................................. + // Pitch static const FontPitch ePitchA[] = { PITCH_DONTKNOW, PITCH_FIXED, PITCH_VARIABLE, PITCH_DONTKNOW }; ePitch = ePitchA[pF->prgGet()]; - // CharSet ........................................... + // CharSet eCharSet = RTL_TEXTENCODING_MS_1252; if (aName.equalsIgnoreAsciiCase("Symbol") || aName.equalsIgnoreAsciiCase("Symbol Set") || aName.equalsIgnoreAsciiCase("Wingdings") || aName.equalsIgnoreAsciiCase("ITC Zapf Dingbats") ) eCharSet = RTL_TEXTENCODING_SYMBOL; - // FontFamily ........................................ + // FontFamily sal_uInt16 b = pF->ffGet(); static const FontFamily eFamilyA[] = { @@ -1436,7 +1415,7 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) } break; } - // Extrawurst Hypo + // Extrawurst Hypo if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO ) && ( aName.equalsIgnoreAsciiCase("Helv") || aName.equalsIgnoreAsciiCase("Helvetica") ) ) @@ -1447,12 +1426,12 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) } else { - // VCL matcht die Fonts selber - // allerdings passiert bei Helv, Tms Rmn und System Monospaced - // Scheisse, so dass diese ersetzt werden muessen. - // Nach TH sollen diese durch feste Werte ersetzt werden, - // also nicht ueber System::GetStandardFont, damit keine - // Namenslisten auftauchen ( Dieses koennte den User verwirren ) + // VCL matcht die Fonts selber + // allerdings passiert bei Helv, Tms Rmn und System Monospaced + // Scheisse, so dass diese ersetzt werden muessen. + // Nach TH sollen diese durch feste Werte ersetzt werden, + // also nicht ueber System::GetStandardFont, damit keine + // Namenslisten auftauchen ( Dieses koennte den User verwirren ) if( aName.equalsIgnoreAsciiCase("Helv")) { aName = "Helvetica"; @@ -1471,11 +1450,10 @@ SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode) ePitch = PITCH_FIXED; } } -// nun koennen wir den font basteln: ......................... + // nun koennen wir den font basteln return SvxFontItem(eFamily, aName, OUString(), ePitch, eCharSet, RES_CHRATR_FONT); } -/////////////////////////////////////////////////////////////////// Dop void Ww1Dop::Out(Ww1Shell& rOut) { //~ mdt: fehlt @@ -1521,11 +1499,10 @@ void Ww1Dop::Out(Ww1Shell& rOut) } -///////////////////////////////////////////////////////////////// Assoc void Ww1Assoc::Out(Ww1Shell& rOut) { -//~ mdt: fehlen: FileNext, Dot, DataDoc, HeaderDoc, Criteria1, -// Criteria2, Criteria3, Criteria4, Criteria5, Criteria6, Criteria7 + //~ mdt: fehlen: FileNext, Dot, DataDoc, HeaderDoc, Criteria1, + // Criteria2, Criteria3, Criteria4, Criteria5, Criteria6, Criteria7 SwDocShell *pDocShell(rOut.GetDoc().GetDocShell()); OSL_ENSURE(pDocShell, "no SwDocShell"); if (pDocShell) { @@ -1546,7 +1523,6 @@ void Ww1Assoc::Out(Ww1Shell& rOut) } } -//////////////////////////////////////////////////////////// StyleSheet void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc) { switch (stc){ @@ -1787,7 +1763,7 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan) } } -////////////////////////////////////////////////////////////// Picture +// Picture static sal_uLong GuessPicSize(W1_PIC* pPic) { sal_uInt16 maxx = pPic->mfp.xExtGet(); @@ -1796,11 +1772,9 @@ static sal_uLong GuessPicSize(W1_PIC* pPic) return 120L + (sal_uLong)padx * maxy; } -// // folgende methode schreibt eine windows-.BMP-datei aus einem // embeddeten bild in ww-1 dateien // gelesen wird 4-bit format, geschrieben jedoch 8-bit. -// void Ww1Picture::WriteBmp(SvStream& rOut) { long nSize = pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb)); @@ -1971,11 +1945,10 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/) rOut << *pGraphic; } -////////////////////////////////////////////////////////// HeaderFooter void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan) { -// wird sowieso nur bei SEPs aufgerufen, keine weitere pruefung -// noetig: + // wird sowieso nur bei SEPs aufgerufen, keine weitere pruefung + // noetig: if (!rMan.Pushed()) { while (++(*this)) @@ -2045,5 +2018,4 @@ void Ww1HeaderFooter::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&) } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx index ba035c80eb2e..cef5b5911544 100644 --- a/sw/source/filter/ww1/w1par.cxx +++ b/sw/source/filter/ww1/w1par.cxx @@ -27,13 +27,10 @@ #include <swerror.h> #include <statstr.hrc> -//---------------------------------------- -// Initialisieren der Feld-FilterFlags -//---------------------------------------- - +// Initialisieren der Feld-FilterFlags static sal_uLong WW1_Read_FieldIniFlags() { -// sal_uInt16 i; + // sal_uInt16 i; static const sal_Char* aNames[ 1 ] = { "WinWord/WW1F" }; sal_uInt32 aVal[ 1 ]; SwFilterOptions aOpt( 1, aNames, aVal ); @@ -49,21 +46,18 @@ static sal_uLong WW1_Read_FieldIniFlags() return nFieldFlags; } -////////////////////////////////////////////////// StarWriter-Interface -// +// StarWriter-Interface // Eine Methode liefern die call-Schnittstelle fuer den Writer. // Read() liest eine Datei. hierzu werden zwei Objekte erzeugt, die Shell, // die die Informationen aufnimmt und der Manager der sie aus der Datei liest. // Diese werden dann einfach per Pipe 'uebertragen'. -// - sal_uLong WW1Reader::Read(SwDoc& rDoc, const OUString& rBaseURL, SwPaM& rPam, const OUString& /*cName*/) { sal_uLong nRet = ERR_SWG_READ_ERROR; OSL_ENSURE(pStrm!=NULL, "W1-Read ohne Stream"); if (pStrm != NULL) { - sal_Bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen ) + sal_Bool bNew = !bInsertMode; // New Doc ( kein Einfuegen ) // erstmal eine shell konstruieren: die ist schnittstelle // zum writer-dokument @@ -91,12 +85,12 @@ sal_uLong WW1Reader::Read(SwDoc& rDoc, const OUString& rBaseURL, SwPaM& rPam, co else { if( pMan->GetFib().GetFIB().fComplexGet() ) - //!!! ACHTUNG: hier muss eigentlich ein Error + // Attention: hier muss eigentlich ein Error // wegen Fastsave kommen, das der PMW-Filter // das nicht unterstuetzt. Stattdessen temporaer // nur eine Warnung, bis die entsprechende // Meldung und Behandlung weiter oben eingebaut ist. -// nRet = WARN_WW6_FASTSAVE_ERR; + // nRet = WARN_WW6_FASTSAVE_ERR; // Zum Einchecken mit neuem String: nRet = ERR_WW6_FASTSAVE_ERR; } @@ -109,18 +103,14 @@ sal_uLong WW1Reader::Read(SwDoc& rDoc, const OUString& rBaseURL, SwPaM& rPam, co return nRet; } -///////////////////////////////////////////////////////////////// Shell -// // Die Shell ist die Schnittstelle vom Filter zum Writer. Sie ist // abgeleitet von der mit ww-filter gemeinsam benutzten Shell // SwFltShell und enthaelt alle fuer ww1 noetigen Erweiterungen. Wie // in einen Stream werden alle Informationen, die aus der Datei // gelesen werden, in die shell ge'piped'. -// Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const OUString& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags) : SwFltShell(&rD, rPam, rBaseURL, bNew, nFieldFlags) { } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx index 6759f53d1ff1..db4e093da221 100644 --- a/sw/source/filter/ww1/w1sprm.cxx +++ b/sw/source/filter/ww1/w1sprm.cxx @@ -51,11 +51,10 @@ using ::editeng::SvxBorderLine; using namespace ::com::sun::star; -/////////////////////////////////////////////////////////////// Ww1Sprm void Ww1Sprm::Stop( Ww1Shell& rOut, Ww1Manager& rMan) { if(IsUsed()) - for(short i=Count()-1;i>=0;i--){ // rueckwaerts + for(short i=Count()-1;i>=0;i--){ // backwards sal_uInt8 nId; sal_uInt16 nSize; sal_uInt8* pSprm; @@ -82,7 +81,6 @@ void Ww1Sprm::Start( Start(rOut, rMan, i); } -//////////////////////////////////////////////////////////// SingleSprm void Ww1SingleSprm::Start( Ww1Shell&, sal_uInt8 /*nId*/, sal_uInt8*, sal_uInt16, Ww1Manager&) { @@ -94,12 +92,10 @@ void Ww1SingleSprm::Stop( // OSL_ENSURE(FALSE, "Unknown Sprm"); } -////////////////////////////////////////////////////////////////// STOP -// +// STOP // The following defines are used for implementing the SingleSprm // classes' Stop() members, because they normally merely put // EndItem(s) into the shell. -// #define STOP1(Class, Code) \ void Class::Stop( \ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \ @@ -109,14 +105,12 @@ void Ww1SingleSprm::Stop( Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \ rOut.EndItem(Code1).EndItem(Code2); } -/////////////////////////////////////////////////////// SingleSprmXxxxx -// +// SingleSprmXxxxx // This starts the evaluation of the actual sprms. Each sprmtyp has // its own class implementing the virtual methods start and stop. The // classes are referenced from the sprm table, a static member of // Ww1Sprm. When an sprm is encountered in the document, the virtual // methods will be called at the formatting boundaries. -// void Ww1SingleSprmPDxaLeft::Start( Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&) { @@ -637,5 +631,4 @@ void Ww1SingleSprmPFromText::Start( #undef STOP1 #undef STOP2 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx index 611fe8410a23..058ad9317e8b 100644 --- a/sw/source/filter/ww1/w1struct.hxx +++ b/sw/source/filter/ww1/w1struct.hxx @@ -27,7 +27,7 @@ class Ww1Shell; class Ww1Manager; -struct W1_FIB ///////////////////////////////////////////////////////// +struct W1_FIB { SVBT16 wIdent;// 0x0 int magic number sal_uInt16 wIdentGet() { @@ -371,7 +371,7 @@ struct W1_FIB ///////////////////////////////////////////////////////// // entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete. }; -struct W1_DOP ///////////////////////////////////// Document Properties +struct W1_DOP //Document Properties { SVBT16 fFlags; sal_uInt16 fFlagsGet() { @@ -497,7 +497,7 @@ struct W1_DOP ///////////////////////////////////// Document Properties }; // cbDOP is 66. -struct W1_CHP ///////////////////////////////////////////////////////// +struct W1_CHP { SVBT16 fChar; SVBT16 ftc;// Font Code @@ -604,7 +604,7 @@ struct W1_FFN ///////////////////////////////////////// Font Descriptor sal_uInt8* szFfnGet() { return szFfn; } }; -struct W1_PHE /////////////////////////////////////// Paragraph Height +struct W1_PHE // Paragraph Height { SVBT16 fFlags; sal_uInt16 fFlagsGet() { @@ -629,7 +629,7 @@ struct W1_PHE /////////////////////////////////////// Paragraph Height return SVBT16ToShort(xxx); } }; -struct W1_PAPX ///////////////////////// Paragraph Property Difference +struct W1_PAPX // Paragraph Property Difference { sal_uInt8 stc; sal_uInt8 stcGet() { return stc; } @@ -639,7 +639,7 @@ struct W1_PAPX ///////////////////////// Paragraph Property Difference return grpprl; } }; -struct W1_BRC //////////////////////////////////////////// Border Code +struct W1_BRC // Border Code { SVBT16 aBits; sal_uInt16 aBitsGet() { @@ -668,7 +668,7 @@ struct W1_BRC //////////////////////////////////////////// Border Code return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); } }; -struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0 +struct W1_BRC10 // Border Code Word 1.0 { SVBT16 aBits; sal_uInt16 aBitsGet() { @@ -687,7 +687,7 @@ struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0 return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); } }; -struct W1_FLD //////////////////////////////////////// FieldDescriptor +struct W1_FLD // FieldDescriptor { sal_uInt8 ch; // boundary-type (begin(19), separator (20), end (21)) sal_uInt8 chGet() { return ch; } @@ -708,7 +708,7 @@ struct W1_FLD //////////////////////////////////////// FieldDescriptor return (fltGet() >> 6) & 1; } }; -struct W1_PIC /////////////////////////////////////// PictureStructure +struct W1_PIC // PictureStructure { SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file. sal_uLong lcbGet() { @@ -797,7 +797,7 @@ struct W1_PIC /////////////////////////////////////// PictureStructure sal_uInt8* rgbGet() { return &rgb; } }; -struct W1_TBD ///////////////////////////////////////////////////////// +struct W1_TBD { sal_uInt8 aBits1; sal_uInt8 aBits1Get() { return aBits1; } @@ -811,7 +811,7 @@ struct W1_TBD ///////////////////////////////////////////////////////// // * int :2 C0 reserved }; -struct W1_TC ////////////////////////////////////////////////////////// +struct W1_TC { sal_uInt8 aBits1; sal_uInt8 aBits1Get() { return aBits1; } diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index aef72a3887e2..3c230fda29d6 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -32,8 +32,6 @@ #include <vcl/svapp.hxx> #include <osl/mutex.hxx> - - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::xmloff::token; @@ -49,11 +47,7 @@ using ::com::sun::star::beans::XPropertySetInfo; // collision with tools/DateTime: use UNO DateTime as util::DateTime // using util::DateTime; - -// // a few helper functions -// - static SwDoc* lcl_GetDocViaTunnel( Reference<XTextCursor> & rCursor ) { Reference<XUnoTunnel> xTunnel( rCursor, UNO_QUERY); @@ -71,12 +65,10 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange ) SwXTextRange *const pXRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xTunnel); // #i115174#: this may be a SvxUnoTextRange -// OSL_ENSURE( pXRange, "SwXTextRange missing" ); + // OSL_ENSURE( pXRange, "SwXTextRange missing" ); return (pXRange) ? pXRange->GetDoc() : 0; } - -// // XTextRangeOrNodeIndexPosition: store a position into the text // *either* as an XTextRange or as an SwNodeIndex. The reason is that // we must store either pointers to StartNodes (because redlines may @@ -84,12 +76,11 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange ) // be no existing type that could do both. Things are complicated by // the matter that (e.g in section import) we delete a few characters, // which may cause bookmarks (as used by XTextRange) to be deleted. -// class XTextRangeOrNodeIndexPosition { Reference<XTextRange> xRange; - SwNodeIndex* pIndex; /// pIndex will point to the *previous* node + SwNodeIndex* pIndex; // pIndex will point to the *previous* node public: XTextRangeOrNodeIndexPosition(); @@ -197,25 +188,21 @@ bool XTextRangeOrNodeIndexPosition::IsValid() return ( xRange.is() || (pIndex != NULL) ); } - -// // RedlineInfo: temporary storage for redline data -// - class RedlineInfo { public: RedlineInfo(); ~RedlineInfo(); - /// redline type (insert, delete, ...) + // redline type (insert, delete, ...) RedlineType_t eType; // info fields: - OUString sAuthor; /// change author string - OUString sComment; /// change comment string - util::DateTime aDateTime; /// change DateTime - sal_Bool bMergeLastParagraph; /// the SwRangeRedline::IsDelLastPara flag + OUString sAuthor; // change author string + OUString sComment; // change comment string + util::DateTime aDateTime; // change DateTime + sal_Bool bMergeLastParagraph; // the SwRangeRedline::IsDelLastPara flag // each position can may be either empty, an XTextRange, or an SwNodeIndex @@ -225,13 +212,13 @@ public: // end pos of anchor (may be empty) XTextRangeOrNodeIndexPosition aAnchorEnd; - /// index of content node (maybe NULL) + // index of content node (maybe NULL) SwNodeIndex* pContentIndex; - /// next redline info (for hierarchical redlines) + // next redline info (for hierarchical redlines) RedlineInfo* pNextRedline; - /// store whether we expect an adjustment for this redline + // store whether we expect an adjustment for this redline bool bNeedsAdjustment; }; @@ -255,11 +242,7 @@ RedlineInfo::~RedlineInfo() delete pNextRedline; } - -// // XMLRedlineImportHelper -// - XMLRedlineImportHelper::XMLRedlineImportHelper( bool bNoRedlinesPlease, const Reference<XPropertySet> & rModel, @@ -752,7 +735,6 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline( return pData; } - void XMLRedlineImportHelper::SetShowChanges( sal_Bool bShow ) { bShowChanges = bShow; diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx index 0b562bcaa9ac..391c78968465 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx @@ -36,7 +36,6 @@ namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } } - typedef ::std::map< OUString, RedlineInfo* > RedlineMapType; class XMLRedlineImportHelper @@ -51,11 +50,11 @@ class XMLRedlineImportHelper RedlineMapType aRedlineMap; - /// if sal_True, no redlines should be inserted into document - /// (This typically happen when a document is loaded in 'insert'-mode.) + // if sal_True, no redlines should be inserted into document + // (This typically happen when a document is loaded in 'insert'-mode.) bool bIgnoreRedlines; - /// save information for saving and reconstruction of the redline mode + // save information for saving and reconstruction of the redline mode ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xModelPropertySet; ::com::sun::star::uno::Reference< @@ -67,7 +66,7 @@ class XMLRedlineImportHelper public: XMLRedlineImportHelper( - bool bIgnoreRedlines, /// ignore redlines mode + bool bIgnoreRedlines, // ignore redlines mode // property sets of model + import info for saving + restoring the // redline mode @@ -77,34 +76,34 @@ public: ::com::sun::star::beans::XPropertySet> & rImportInfoSet ); virtual ~XMLRedlineImportHelper(); - /// create a redline object - /// (The redline will be inserted into the document after both start - /// and end cursor has been set.) + // create a redline object + // (The redline will be inserted into the document after both start + // and end cursor has been set.) void Add( - const OUString& rType, /// redline type (insert, del,... ) - const OUString& rId, /// use to identify this redline - const OUString& rAuthor, /// name of the author - const OUString& rComment, /// redline comment - const ::com::sun::star::util::DateTime& rDateTime, /// date+time - sal_Bool bMergeLastParagraph); /// merge last paragraph? - - /// create a text section for the redline, and return an - /// XText/XTextCursor that may be used to write into it. + const OUString& rType, // redline type (insert, del,... ) + const OUString& rId, // use to identify this redline + const OUString& rAuthor, // name of the author + const OUString& rComment, // redline comment + const ::com::sun::star::util::DateTime& rDateTime, // date+time + sal_Bool bMergeLastParagraph); // merge last paragraph? + + // create a text section for the redline, and return an + // XText/XTextCursor that may be used to write into it. ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor> CreateRedlineTextSection( - ::com::sun::star::uno::Reference< /// needed to get the document + ::com::sun::star::uno::Reference< // needed to get the document ::com::sun::star::text::XTextCursor> xOldCursor, - const OUString& rId); /// ID used to RedlineAdd() call + const OUString& rId); // ID used to RedlineAdd() call - /// Set start or end position for a redline in the text body. - /// Accepts XTextRange objects. + // Set start or end position for a redline in the text body. + // Accepts XTextRange objects. void SetCursor( - const OUString& rId, /// ID used in RedlineAdd() call - sal_Bool bStart, /// start or end Range - ::com::sun::star::uno::Reference< /// the actual XTextRange + const OUString& rId, // ID used in RedlineAdd() call + sal_Bool bStart, // start or end Range + ::com::sun::star::uno::Reference< // the actual XTextRange ::com::sun::star::text::XTextRange> & rRange, - /// text range is (from an XML view) outside of a paragraph - /// (i.e. before a table) + // text range is (from an XML view) outside of a paragraph + // (i.e. before a table) sal_Bool bIsOusideOfParagraph); /** @@ -116,19 +115,19 @@ public: * only be considered valid if it points to the next text node * after the position given in a previous SetCursor */ void AdjustStartNodeCursor( - const OUString& rId, /// ID used in RedlineAdd() call + const OUString& rId, // ID used in RedlineAdd() call sal_Bool bStart, - /// XTextRange _inside_ a table/section + // XTextRange _inside_ a table/section ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange> & rRange); - /// set redline mode: show changes + // set redline mode: show changes void SetShowChanges( sal_Bool bShowChanges ); - /// set redline mode: record changes + // set redline mode: record changes void SetRecordChanges( sal_Bool bRecordChanges ); - /// set redline protection key + // set redline protection key void SetProtectionKey( const ::com::sun::star::uno::Sequence<sal_Int8> & rKey ); @@ -139,15 +138,15 @@ private: void InsertIntoDocument(RedlineInfo* pRedline); SwRedlineData* ConvertRedline( - RedlineInfo* pRedline, /// RedlineInfo to be converted - SwDoc* pDoc); /// document needed for Author-ID conversion + RedlineInfo* pRedline, // RedlineInfo to be converted + SwDoc* pDoc); // document needed for Author-ID conversion - /** save the redline mode (if rPropertySet is non-null) */ + // save the redline mode (if rPropertySet is non-null) void SaveRedlineMode( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> & rPropertySet); - /** don't restore the saved redline mode */ + // don't restore the saved redline mode void DontRestoreRedlineMode(); }; diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index f7ab28263365..25e8d73fe9db 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -269,7 +269,7 @@ sal_Int32 ReadThroughComponent( return 0; } -/// read a component (storage version) +// read a component (storage version) sal_Int32 ReadThroughComponent( uno::Reference<embed::XStorage> xStorage, uno::Reference<XComponent> xModelComponent, @@ -616,8 +616,7 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aInfoMap ) ) ); - // ---- get BuildId from parent container if available - + // get BuildId from parent container if available uno::Reference< container::XChild > xChild( xModelComp, uno::UNO_QUERY ); if( xChild.is() ) { diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index 0c761d587580..587ff082a345 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -63,12 +63,10 @@ SwXMLWriter::SwXMLWriter( const OUString& rBaseURL ) SetBaseURL( rBaseURL ); } - SwXMLWriter::~SwXMLWriter() { } - sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >& xStatusIndicator, const OUString& aDocHierarchicalName ) { @@ -587,14 +585,9 @@ bool SwXMLWriter::WriteThroughComponent( return xFilter->filter( rMediaDesc ); } - -// ----------------------------------------------------------------------- - void GetXMLWriter( const OUString& /*rName*/, const OUString& rBaseURL, WriterRef& xRet ) { xRet = new SwXMLWriter( rBaseURL ); } -// ----------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx index 8a8f8d0f3906..130f036c886c 100644 --- a/sw/source/filter/xml/wrtxml.hxx +++ b/sw/source/filter/xml/wrtxml.hxx @@ -58,25 +58,25 @@ private: // helper methods to write XML streams - /// write a single XML stream into the package + // write a single XML stream into the package bool WriteThroughComponent( - /// the component we export + // the component we export const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> & xComponent, - const sal_Char* pStreamName, /// the stream name - /// service factory for pServiceName + const sal_Char* pStreamName, // the stream name + // service factory for pServiceName const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> & rFactory, - const sal_Char* pServiceName, /// service name of the component - /// the argument (XInitialization) + const sal_Char* pServiceName, // service name of the component + // the argument (XInitialization) const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any> & rArguments, - /// output descriptor + // output descriptor const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> & rMediaDesc ); - /// write a single output stream - /// (to be called either directly or by WriteThroughComponent(...)) + // write a single output stream + // (to be called either directly or by WriteThroughComponent(...)) bool WriteThroughComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream> & xOutputStream, diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx index 9d7976d0cb18..a077b7200bfa 100644 --- a/sw/source/filter/xml/xmlbrsh.cxx +++ b/sw/source/filter/xml/xmlbrsh.cxx @@ -239,5 +239,4 @@ void SwXMLBrushItemExport::exportXML( const SvxBrushItem& rItem ) } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx index 4ca96faaa13f..ab960ca8f9cb 100644 --- a/sw/source/filter/xml/xmlbrshe.hxx +++ b/sw/source/filter/xml/xmlbrshe.hxx @@ -23,7 +23,6 @@ #include <rtl/ustring.hxx> #include <xmloff/attrlist.hxx> - class SvxBrushItem; class SwXMLExport; @@ -43,7 +42,6 @@ public: void exportXML( const SvxBrushItem& rItem ); }; - #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlbrshi.hxx b/sw/source/filter/xml/xmlbrshi.hxx index f862558fc0c6..943315f6bb72 100644 --- a/sw/source/filter/xml/xmlbrshi.hxx +++ b/sw/source/filter/xml/xmlbrshi.hxx @@ -76,7 +76,6 @@ public: const SvxBrushItem& GetItem() const { return *pItem; } }; - #endif // _XMLBRSHI_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index df90df5b57ad..103474304f66 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -63,7 +63,6 @@ #include <pausethreadstarting.hxx> - using namespace ::com::sun::star; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index 07f6e158b2bc..27e249a200d0 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -153,7 +153,6 @@ inline const SvXMLUnitConverter& SwXMLExport::GetTwipUnitConverter() const return *pTwipUnitConv; } - #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLEXP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index b1e5182bf6d0..53013664cc18 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -50,13 +50,12 @@ #include "fmtrowsplt.hxx" - using ::editeng::SvxBorderLine; using namespace ::com::sun::star; using namespace ::xmloff::token; using uno::Any; -/** fills the given attribute list with the items in the given set */ +// fills the given attribute list with the items in the given set void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, SvXMLAttributeList& rAttrList, const SfxItemSet& rSet, diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 64c1a6eddd65..6e025f4b7c93 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -187,8 +187,6 @@ SwXMLConditionParser_Impl::SwXMLConditionParser_Impl( const OUString& rInp ) : } } -// --------------------------------------------------------------------- - class SwXMLConditionContext_Impl : public SvXMLImportContext { sal_uInt32 nCondition; @@ -259,8 +257,6 @@ SwXMLConditionContext_Impl::~SwXMLConditionContext_Impl() TYPEINIT1( SwXMLConditionContext_Impl, XMLTextStyleContext ); -// --------------------------------------------------------------------- - typedef std::vector<SwXMLConditionContext_Impl*> SwXMLConditions_Impl; class SwXMLTextStyleContext_Impl : public XMLTextStyleContext @@ -423,8 +419,6 @@ void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite ) } } -// --------------------------------------------------------------------- - class SwXMLItemSetStyleContext_Impl : public SvXMLStyleContext { OUString sMasterPageName; @@ -717,8 +711,6 @@ bool SwXMLItemSetStyleContext_Impl::ResolveDataStyleName() } } -// --------------------------------------------------------------------- -// class SwXMLStylesContext_Impl : public SvXMLStylesContext { SwXMLItemSetStyleContext_Impl *GetSwStyle( sal_uInt16 i ) const; @@ -927,8 +919,6 @@ void SwXMLStylesContext_Impl::EndElement() GetSwImport().InsertStyles( IsAutomaticStyle() ); } -// --------------------------------------------------------------------- -// class SwXMLMasterStylesContext_Impl : public XMLTextMasterStylesContext { protected: @@ -983,7 +973,6 @@ void SwXMLMasterStylesContext_Impl::EndElement() FinishStyles( !GetSwImport().IsInsertMode() ); GetSwImport().FinishStyles(); } -// --------------------------------------------------------------------- SvXMLImportContext *SwXMLImport::CreateStylesContext( const OUString& rLocalName, diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx index 7404235f082b..3aa03025311f 100644 --- a/sw/source/filter/xml/xmlfmte.cxx +++ b/sw/source/filter/xml/xmlfmte.cxx @@ -251,7 +251,6 @@ void SwXMLExport::_ExportMasterStyles() GetPageExport()->exportMasterStyles( sal_False ); } -// --------------------------------------------------------------------- class SwXMLAutoStylePoolP : public SvXMLAutoStylePoolP { SvXMLExport& rExport; @@ -338,7 +337,6 @@ SwXMLAutoStylePoolP::SwXMLAutoStylePoolP(SvXMLExport& rExp ) : { } - SwXMLAutoStylePoolP::~SwXMLAutoStylePoolP() { } diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx index 1f1dd574de06..78b614d08384 100644 --- a/sw/source/filter/xml/xmlfonte.cxx +++ b/sw/source/filter/xml/xmlfonte.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "hintids.hxx" #include <com/sun/star/text/XTextDocument.hpp> #include <xmloff/XMLFontAutoStylePool.hxx> @@ -27,7 +26,6 @@ #include <xmlexp.hxx> #include <xmlimp.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::text; @@ -35,9 +33,7 @@ using namespace ::com::sun::star::text; class SwXMLFontAutoStylePool_Impl: public XMLFontAutoStylePool { public: - SwXMLFontAutoStylePool_Impl( SwXMLExport& rExport, bool blockFontEmbedding ); - }; SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( @@ -73,7 +69,6 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl( } } - XMLFontAutoStylePool* SwXMLExport::CreateFontAutoStylePool() { bool blockFontEmbedding = false; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index f1a999f5054d..77278f2ad0bb 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> @@ -66,7 +65,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/processfactory.hxx> - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; @@ -79,8 +77,6 @@ using namespace ::com::sun::star::xforms; using namespace ::xmloff::token; using namespace ::std; -//---------------------------------------------------------------------------- - enum SwXMLDocTokens { XML_TOK_DOC_FONTDECLS, @@ -109,8 +105,6 @@ static SvXMLTokenMapEntry aDocTokenMap[] = XML_TOKEN_MAP_END }; -// ---------------------------------------------------------------------------- - class SwXMLBodyContext_Impl : public SvXMLImportContext { const SwXMLImport& GetSwImport() const @@ -152,8 +146,6 @@ SvXMLImportContext *SwXMLBodyContext_Impl::CreateChildContext( return GetSwImport().CreateBodyContentContext( rLocalName ); } -// ---------------------------------------------------------------------------- - // #i69629# // enhance class <SwXMLDocContext_Impl> in order to be able to create subclasses // NB: virtually inherit so we can multiply inherit properly @@ -357,7 +349,6 @@ void SwXMLDocStylesContext_Impl::EndElement() GetImport().GetTextImport()->SetOutlineStyles( (rSwImport.GetStyleFamilyMask() & SFX_STYLE_FAMILY_PARA ) ? sal_True : sal_False); } -//---------------------------------------------------------------------------- const SvXMLTokenMap& SwXMLImport::GetDocElemTokenMap() { @@ -924,7 +915,6 @@ void SwXMLImport::endDocument( void ) ClearTextImport(); } - // Locally derive XMLTextShapeImportHelper, so we can take care of the // form import This is Writer, but not text specific, so it should go // here! @@ -942,7 +932,6 @@ class SvTextShapeImportHelper : public XMLTextShapeImportHelper Reference<drawing::XDrawPage> xPage; public: - SvTextShapeImportHelper(SvXMLImport& rImp); virtual ~SvTextShapeImportHelper(); }; @@ -976,7 +965,6 @@ SvTextShapeImportHelper::~SvTextShapeImportHelper() } } - XMLTextImportHelper* SwXMLImport::CreateTextImport() { return new SwXMLTextImportHelper( GetModel(), *this, getImportInfo(), @@ -1518,11 +1506,7 @@ void SwXMLImport::initialize( } } - -// // UNO component registration helper functions -// - OUString SAL_CALL SwXMLImport_getImplementationName() throw() { return OUString( @@ -1648,7 +1632,6 @@ SwDoc* SwImport::GetDocFromXMLImport( SvXMLImport& rImport ) return pDoc; } - void SwXMLImport::initXForms() { // obtain SwDoc diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 1b73883d6c10..3bdac75eac22 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "xmlimpit.hxx" #include <sax/tools/converter.hxx> @@ -31,7 +30,6 @@ #include <editeng/xmlcnitm.hxx> #include <editeng/memberids.hrc> - #include "hintids.hxx" #include "unomid.h" #include <svx/unomid.hxx> @@ -75,7 +73,7 @@ SvXMLImportItemMapper::setMapEntries( SvXMLItemMapEntriesRef rMapEntries ) mrMapEntries = rMapEntries; } -/** fills the given itemset with the attributes in the given list */ +// fills the given itemset with the attributes in the given list void SvXMLImportItemMapper::importXML( SfxItemSet& rSet, uno::Reference< xml::sax::XAttributeList > xAttrList, const SvXMLUnitConverter& rUnitConverter, @@ -439,7 +437,7 @@ bool SvXMLImportItemMapper::PutXMLValue( SvxBoxItem* pBox = PTR_CAST(SvxBoxItem, &rItem); OSL_ENSURE( pBox != NULL, "Wrong WHich-ID" ); - /** copy SvxBorderLines */ + // copy SvxBorderLines BoxHolder aBoxes(pBox); sal_Int32 nTemp; @@ -988,5 +986,4 @@ bool SvXMLImportItemMapper::PutXMLValue( return bOk; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx index 75445bbfe76f..7e674ac05944 100644 --- a/sw/source/filter/xml/xmlitem.cxx +++ b/sw/source/filter/xml/xmlitem.cxx @@ -71,5 +71,4 @@ SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix, return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx index 2573ce8a10f8..2d0670c9a160 100644 --- a/sw/source/filter/xml/xmlitem.hxx +++ b/sw/source/filter/xml/xmlitem.hxx @@ -66,7 +66,6 @@ public: }; - #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITEM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index 645d0285e480..538412e1fa0f 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/util/MeasureUnit.hpp> #include <hintids.hxx> @@ -51,7 +50,6 @@ extern SvXMLItemMapEntry aXMLTableItemMap[]; extern SvXMLItemMapEntry aXMLTableRowItemMap[]; extern SvXMLItemMapEntry aXMLTableCellItemMap[]; - class SwXMLTableItemMapper_Impl: public SvXMLExportItemMapper { SwXMLBrushItemExport aBrushItemExport; @@ -217,8 +215,6 @@ inline void SwXMLTableItemMapper_Impl::SetAbsWidth( sal_uInt32 nAbs ) nAbsWidth = nAbs; } -// ---------------------------------------------------------------------------- - void SwXMLExport::_InitItemExport() { pTwipUnitConv = new SvXMLUnitConverter(getComponentContext(), diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx index 6441658e998b..86d9a3e66888 100644 --- a/sw/source/filter/xml/xmlitemi.cxx +++ b/sw/source/filter/xml/xmlitemi.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <rtl/ustring.hxx> #include <com/sun/star/util/MeasureUnit.hpp> @@ -243,8 +242,6 @@ void SwXMLImportTableItemMapper_Impl::finished( } } -// --------------------------------------------------------------------- - class SwXMLItemSetContext_Impl : public SvXMLItemSetContext { SvXMLImportContextRef xBackground; @@ -331,8 +328,6 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext( return pContext; } -// --------------------------------------------------------------------- - void SwXMLImport::_InitItemImport() { pTwipUnitConv = new SvXMLUnitConverter( GetComponentContext(), diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index 4907c074c0e6..e1a383bbebac 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -40,7 +40,6 @@ using ::editeng::SvxBorderLine; using namespace ::xmloff::token; using namespace ::com::sun::star; - #define API_LINE_NONE 0x7FFF #define API_LINE_SOLID 0 #define API_LINE_DOTTED 1 @@ -55,7 +54,6 @@ using namespace ::com::sun::star; #define SVX_XML_BORDER_WIDTH_MIDDLE 1 #define SVX_XML_BORDER_WIDTH_THICK 2 - const struct SvXMLEnumMapEntry psXML_BorderStyles[] = { { XML_NONE, API_LINE_NONE }, @@ -353,5 +351,4 @@ const struct SvXMLEnumMapEntry aXML_KeepTogetherType[] = { XML_TOKEN_INVALID, 0} }; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx index 7abab391bd2e..5388fa063bc2 100644 --- a/sw/source/filter/xml/xmlithlp.hxx +++ b/sw/source/filter/xml/xmlithlp.hxx @@ -31,11 +31,8 @@ struct SvXMLEnumMapEntry; class SvXMLUnitConverter; class Color; - - /** Define various helper variables and functions for xmlimpit.cxx and * xmlexpit.cxx. */ - bool sw_frmitems_parseXMLBorder( const OUString& rValue, const SvXMLUnitConverter& rUnitConverter, bool& rHasStyle, sal_uInt16& rStyle, @@ -69,7 +66,6 @@ extern const struct SvXMLEnumMapEntry aXMLTableAlignMap[]; extern const struct SvXMLEnumMapEntry aXMLTableVAlignMap[]; extern const struct SvXMLEnumMapEntry aXML_KeepTogetherType[]; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx index 2fd6fdc9dc6b..031853f0a7a4 100644 --- a/sw/source/filter/xml/xmlitmap.hxx +++ b/sw/source/filter/xml/xmlitmap.hxx @@ -24,11 +24,9 @@ #include <tools/ref.hxx> #include <xmloff/xmltoken.hxx> - #define MID_SW_FLAG_MASK 0x0000ffff // this flags are used in the item mapper for import and export - #define MID_SW_FLAG_SPECIAL_ITEM_IMPORT 0x80000000 #define MID_SW_FLAG_NO_ITEM_IMPORT 0x40000000 #define MID_SW_FLAG_SPECIAL_ITEM_EXPORT 0x20000000 @@ -39,8 +37,6 @@ #define MID_SW_FLAG_ELEMENT_ITEM_EXPORT 0x04000000 #define MID_SW_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export -// --- - struct SvXMLItemMapEntry { sal_uInt16 nNameSpace; // declares the Namespace in which this item @@ -56,8 +52,6 @@ struct SvXMLItemMapEntry // and localName }; -// --- - class SvXMLItemMapEntries_impl; /** this class manages an array of SvXMLItemMapEntry. It is @@ -83,7 +77,6 @@ public: SV_DECL_REF( SvXMLItemMapEntries ) SV_IMPL_REF( SvXMLItemMapEntries ) - #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx index f2796f8bee66..e19630af2c48 100644 --- a/sw/source/filter/xml/xmlitmpr.cxx +++ b/sw/source/filter/xml/xmlitmpr.cxx @@ -24,7 +24,6 @@ using ::xmloff::token::IsXMLToken; using ::xmloff::token::XML_TOKEN_INVALID; // TODO: optimize this! - class SvXMLItemMapEntries_impl { public: diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx index 6352f2be4134..79b121a2773a 100644 --- a/sw/source/filter/xml/xmlmeta.cxx +++ b/sw/source/filter/xml/xmlmeta.cxx @@ -41,8 +41,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::text; using namespace ::xmloff::token; -// --------------------------------------------------------------------- - uno::Reference<document::XDocumentProperties> SwXMLImport::GetDocumentProperties() const { @@ -76,8 +74,6 @@ SvXMLImportContext *SwXMLImport::CreateMetaContext( return pContext; } -// --------------------------------------------------------------------- - enum SvXMLTokenMapAttrs { XML_TOK_META_STAT_TABLE = 1, @@ -161,8 +157,6 @@ void SwXMLImport::SetStatistics( pProgress->SetValue( 0 ); } -// --------------------------------------------------------------------- - void SwXMLExport::_ExportMeta() { SvXMLExport::_ExportMeta(); diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx index e5f55ad44c15..39b8dda5a884 100644 --- a/sw/source/filter/xml/xmlscript.cxx +++ b/sw/source/filter/xml/xmlscript.cxx @@ -26,8 +26,6 @@ using namespace ::com::sun::star; -// --------------------------------------------------------------------- - SvXMLImportContext *SwXMLImport::CreateScriptContext( const OUString& rLocalName ) { diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index e3c8ab72e1a7..4eb18137900b 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextSection.hpp> @@ -94,8 +93,6 @@ struct SwXMLTableColumnCmpWidth_Impl } }; -// --------------------------------------------------------------------- - class SwXMLTableColumns_Impl : public o3tl::sorted_vector<SwXMLTableColumn_Impl*, o3tl::less_ptr_to<SwXMLTableColumn_Impl> > { public: ~SwXMLTableColumns_Impl() { DeleteAndDestroyAll(); } @@ -180,8 +177,6 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : } } -// --------------------------------------------------------------------- - typedef vector< SwFrmFmt* > SwXMLFrmFmts_Impl; class SwXMLTableFrmFmtsSort_Impl @@ -746,7 +741,7 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd ) nAbsWidth = pTblFmt->FindLayoutRect(sal_True).Width(); if( !nAbsWidth ) { - // TODO??? + // TODO? } } ExportTableFmt( *pTblFmt, nAbsWidth ); @@ -762,8 +757,6 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTblNd ) } } -// --------------------------------------------------------------------- - void SwXMLExport::ExportTableBox( const SwTableBox& rBox, sal_uInt16 nColSpan, sal_uInt16 nRowSpan, @@ -803,7 +796,6 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox, if( pBoxSttNd ) { // start node -> normal cell - // get cell range for table Reference<XCell> xCell = SwXCell::CreateXCell( (SwFrmFmt *)rTblInfo.GetTblFmt(), (SwTableBox *)&rBox, diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 11802da12ffc..a554381d476a 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -155,8 +155,6 @@ const SvXMLTokenMap& SwXMLImport::GetTableCellAttrTokenMap() return *pTableCellAttrTokenMap; } -// --------------------------------------------------------------------- - class SwXMLTableCell_Impl { OUString aStyleName; @@ -283,8 +281,6 @@ inline void SwXMLTableCell_Impl::Dispose() xSubTable = 0; } -// --------------------------------------------------------------------- - typedef boost::ptr_vector<SwXMLTableCell_Impl> SwXMLTableCells_Impl; class SwXMLTableRow_Impl @@ -398,8 +394,6 @@ void SwXMLTableRow_Impl::Dispose() aCells[i].Dispose(); } -// --------------------------------------------------------------------- - class SwXMLTableCellContext_Impl : public SvXMLImportContext { OUString aStyleName; @@ -650,7 +644,7 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext( { sXmlId = xAttrList->getValueByIndex( i ); } -//FIXME: RDFa + //FIXME: RDFa } } @@ -747,8 +741,6 @@ void SwXMLTableCellContext_Impl::EndElement() GetImport().GetTextImport()->SetCellParaStyleDefault(sSaveParaDefault); } -// --------------------------------------------------------------------- - class SwXMLTableColContext_Impl : public SvXMLImportContext { SvXMLImportContextRef xMyTable; @@ -800,7 +792,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( IsXMLToken( aLocalName, XML_ID ) ) { (void) rValue; -//FIXME where to put this??? columns do not actually exist in writer... + //FIXME where to put this??? columns do not actually exist in writer... } } @@ -834,8 +826,6 @@ SwXMLTableColContext_Impl::~SwXMLTableColContext_Impl() { } -// --------------------------------------------------------------------- - class SwXMLTableColsContext_Impl : public SvXMLImportContext { SvXMLImportContextRef xMyTable; @@ -892,8 +882,6 @@ SvXMLImportContext *SwXMLTableColsContext_Impl::CreateChildContext( return pContext; } -// --------------------------------------------------------------------- - class SwXMLTableRowContext_Impl : public SvXMLImportContext { SvXMLImportContextRef xMyTable; @@ -1014,8 +1002,6 @@ SvXMLImportContext *SwXMLTableRowContext_Impl::CreateChildContext( return pContext; } -// --------------------------------------------------------------------- - class SwXMLTableRowsContext_Impl : public SvXMLImportContext { SvXMLImportContextRef xMyTable; @@ -1078,8 +1064,6 @@ SvXMLImportContext *SwXMLTableRowsContext_Impl::CreateChildContext( return pContext; } -// --------------------------------------------------------------------- - class SwXMLDDETableContext_Impl : public SvXMLImportContext { OUString sConnectionName; @@ -1260,9 +1244,6 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, return pType; } - -// --------------------------------------------------------------------- - class TableBoxIndex { public: @@ -1415,7 +1396,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport, if( xTable.is() ) { -//FIXME + //FIXME // xml:id for RDF metadata GetImport().SetXmlId(xTable, sXmlId); @@ -1954,7 +1935,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, sal_uInt32 nBottomRow, sal_uInt32 nRightCol ) { -//FIXME: here would be a great place to handle XmlId for cell + //FIXME: here would be a great place to handle XmlId for cell SwTableBox *pBox = new SwTableBox( pBoxFmt, 0, pUpper ); sal_uInt32 nColSpan = nRightCol - nLeftCol; @@ -2051,7 +2032,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( sal_uInt32 /*nTopRow*/, sal_uInt32 nLeftCol, sal_uInt32 /*nBottomRow*/, sal_uInt32 nRightCol ) { -//FIXME: here would be a great place to handle XmlId for cell + //FIXME: here would be a great place to handle XmlId for cell SwTableBox *pBox; sal_uInt32 nColSpan = nRightCol - nLeftCol; sal_Int32 nColWidth = GetColumnWidth( nLeftCol, nColSpan ); @@ -2225,7 +2206,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, sal_uInt32 nBottomRow, sal_uInt32 nRightCol ) { -//FIXME: here would be a great place to handle XmlId for row + //FIXME: here would be a great place to handle XmlId for row SwTableLine *pLine; if( !pUpper && 0UL==nTopRow ) { @@ -2507,7 +2488,6 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox ) // In this case, the columns get the correct width even if the // the sum of the relative withs is smaller than the available // width in TWIP. Therfore, we can use the relative width. - // nWidth = nRelWidth > USHRT_MAX ? USHRT_MAX : nRelWidth; } if( nRelWidth != nWidth && nRelWidth && nCols ) @@ -2861,7 +2841,7 @@ void SwXMLTableContext::MakeTable() void SwXMLTableContext::MakeTable( SwTableBox *pBox, sal_Int32 nW ) { -//FIXME: here would be a great place to handle XmlId for subtable + //FIXME: here would be a great place to handle XmlId for subtable pLineFmt = GetParentTable()->pLineFmt; pBoxFmt = GetParentTable()->pBoxFmt; nWidth = nW; diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index 3423eea0ceb7..cc5c36e4072e 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -46,8 +46,6 @@ namespace com { namespace sun { namespace star { namespace text { class XTextCursor; } } } } - - class SwXMLTableContext : public XMLTextTableContext { OUString aStyleName; diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx index 8e1e208334d9..d04345bba744 100644 --- a/sw/source/filter/xml/xmltext.cxx +++ b/sw/source/filter/xml/xmltext.cxx @@ -24,9 +24,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; -// --------------------------------------------------------------------- - - class SwXMLBodyContentContext_Impl : public SvXMLImportContext { SwXMLImport& GetSwImport() { return (SwXMLImport&)GetImport(); } diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 17105e61411c..e3612656635f 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -64,8 +64,6 @@ enum SvEmbeddedObjectTypes SV_EMBEDDED_FRAME }; -// --------------------------------------------------------------------- - SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode( const Reference < XPropertySet >& rPropSet ) const { diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 8acec644cded..c3bc76b7a796 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -62,7 +62,6 @@ #include <svtools/embedhlp.hxx> #include <svl/urihelper.hxx> - using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -71,7 +70,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace xml::sax; - struct XMLServiceMapEntry_Impl { const sal_Char *sFilterService; @@ -955,7 +953,6 @@ void SwXMLTextImportHelper::endAppletOrPlugin( // redlining helper methods // (override to provide the real implementation) - void SwXMLTextImportHelper::RedlineAdd( const OUString& rType, const OUString& rId, @@ -1030,6 +1027,4 @@ void SwXMLTextImportHelper::SetChangesProtectionKey( pRedlineHelper->SetProtectionKey( rKey ); } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |