diff options
author | Kayo Hamid <revol.code@yahoo.com> | 2010-11-22 11:30:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-22 11:30:51 +0000 |
commit | 94ae5e188dc42aa35171cac11478b7c7aef72c58 (patch) | |
tree | 1839c50a01a2c1a38195c520f6d513124d57811a | |
parent | 45a980cd8a09fd53aa35214c5262ee5873051e33 (diff) |
remove bogus comments
22 files changed, 17 insertions, 439 deletions
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx index 64057950315a..d08038589580 100644 --- a/sw/source/filter/ascii/parasc.cxx +++ b/sw/source/filter/ascii/parasc.cxx @@ -405,12 +405,6 @@ ULONG SwASCIIParser::ReadChars() bool bIns = true, bSplitNode = false; switch( *pStt ) { -//JP 12.11.2001: task 94636 - don't ignore all behind the zero character, -// change it to the default "control character" -// case 0: -// pEnd = pStt; -// bIns = false ; -// break; case 0x0a: if( LINEEND_LF == pUseMe->GetParaFlags() ) { @@ -456,8 +450,6 @@ ULONG SwASCIIParser::ReadChars() *pStt++ = 0; if( nLineLen ) { - // Change to charset system!!!! - //rOpt.GetCharSet(); InsertText( String( pLastStt )); } pDoc->SplitNode( *pPam->GetPoint(), false ); diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index a2403bf4ae19..3962e094e84b 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -180,7 +180,6 @@ ULONG SwASCWriter::WriteStream() BYTE(0xBF); break; case RTL_TEXTENCODING_UCS2: - //Strm().StartWritingUnicodeText(); Strm().SetEndianSwap(FALSE); #ifdef OSL_LITENDIAN Strm() << BYTE(0xFF) << BYTE(0xFE); diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index a69686cbd358..b9e1273ac848 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -122,11 +122,6 @@ void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL, xWrt = WriterRef(0); } -/*SwRead SwGetReaderSw3() // SW_DLLPUBLIC -{ - return ReadSw3; -} -*/ SwRead SwGetReaderXML() // SW_DLLPUBLIC { return ReadXML; @@ -208,15 +203,6 @@ SwRead GetReader( const String& rFltName ) /* */ -/////////////// die Storage Reader/Writer //////////////////////////////// - -/*void GetSw3Writer( const String&, const String& rBaseURL, WriterRef& xRet ) -{ - DBG_ERROR( "Shouldn't happen!"); - xRet = new Sw3Writer; -} -*/ - ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) { ULONG nRet = ERR_SWG_READ_ERROR; @@ -244,81 +230,6 @@ ULONG StgReader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize ) } /* */ -/* -ULONG Sw3Reader::Read( SwDoc &rDoc, SwPaM &rPam, const String & ) -{ - ULONG nRet; - if( pStg && pIO ) - { - // TRUE: Vorlagen ueberschreiben - pIO->SetReadOptions( aOpt,TRUE ); - if( !bInsertMode ) - { - // Im Laden-Modus darf der PaM-Content-Teil nicht - // in den Textbereich zeigen (Nodes koennen geloescht werden) - rPam.GetBound( TRUE ).nContent.Assign( 0, 0 ); - rPam.GetBound( FALSE ).nContent.Assign( 0, 0 ); - } - nRet = pIO->Load( pStg, bInsertMode ? &rPam : 0 ); - aOpt.ResetAllFmtsOnly(); - pIO->SetReadOptions( aOpt, TRUE ); - } - else - { - ASSERT( !this, "Sw3-Read ohne Storage und/oder IO-System" ); - nRet = ERR_SWG_READ_ERROR; - } - return nRet; -} - - // read the sections of the document, which is equal to the medium. - // returns the count of it -USHORT Sw3Reader::GetSectionList( SfxMedium& rMedium, - SvStrings& rStrings ) const -{ - SvStorageRef aStg( rMedium.GetStorage() ); - const SfxFilter* pFlt = rMedium.GetFilter(); - ASSERT( pFlt && pFlt->GetVersion(), - "Kein Filter oder Filter ohne FF-Version" ); - if( pFlt && pFlt->GetVersion() ) - aStg->SetVersion( (long)pFlt->GetVersion() ); - - if( pIO ) - pIO->GetSectionList( &aStg, rStrings ); - return rStrings.Count(); - return 0; -} -*/ - -/*ULONG Sw3Writer::WriteStorage() -{ - ULONG nRet; - if( pIO ) - { - // der gleiche Storage -> Save, sonst SaveAs aufrufen - if( !bSaveAs ) - nRet = pIO->Save( pOrigPam, bWriteAll ); - else - nRet = pIO->SaveAs( pStg, pOrigPam, bWriteAll ); - - pIO = 0; // nach dem Schreiben ist der Pointer ungueltig !! - } - else - { - ASSERT( !this, "Sw3-Writer ohne IO-System" ) - nRet = ERR_SWG_WRITE_ERROR; - } - return nRet; -} - -ULONG Sw3Writer::WriteMedium( SfxMedium& ) -{ - DBG_ERROR( "Shouldn't be used currently!"); - return WriteStorage(); -} - -BOOL Sw3Writer::IsSw3Writer() const { return TRUE; } -*/ void Writer::SetPasswd( const String& ) {} @@ -327,7 +238,6 @@ void Writer::SetVersion( const String&, long ) {} BOOL Writer::IsStgWriter() const { return FALSE; } -//BOOL Writer::IsSw3Writer() const { return FALSE; } BOOL StgWriter::IsStgWriter() const { return TRUE; } @@ -491,18 +401,6 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc ) // Rule noch gueltig und am Doc vorhanden? if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule )) { - // --> OD 2008-02-19 #refactorlists# -// SwNumRuleInfo aUpd( pRule->GetName() ); -// aUpd.MakeList( rDoc ); - -// // bei allen nmumerierten Absaetzen vom linken Rand -// // den absoluten Wert des NumFormates abziehen -// for( ULONG nUpdPos = 0; nUpdPos < aUpd.GetList().Count(); -// ++nUpdPos ) -// { -// SwTxtNode* pNd = aUpd.GetList().GetObject( nUpdPos ); -// SetNumLSpace( *pNd, *pRule ); -// } SwNumRule::tTxtNodeList aTxtNodeList; pRule->GetTxtNodeList( aTxtNodeList ); for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin(); @@ -511,7 +409,6 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc ) SwTxtNode* pNd = *aIter; SetNumLSpace( *pNd, *pRule ); } - // <-- } } } @@ -551,16 +448,14 @@ void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt, void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule ) { BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType(); - // --> OD 2005-11-18 #128056# - // correction of refactoring done by cws swnumtree: + // #128056# correction of refactoring done by cws swnumtree: // - assure a correct level for retrieving numbering format. -// BYTE nLvl = rNd.GetLevel(); BYTE nLvl = 0; if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL ) { nLvl = static_cast< BYTE >(rNd.GetActualListLevel()); } - // <-- + const SwNumFmt& rFmt = rRule.Get( nLvl ); const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace(); diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index c1ae8efa39c9..7cd99c0494af 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -194,8 +194,6 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter) bRet = !(nByte & 1); } } - // else if( !rFilter.GetUserData().EqualsAscii(sCExcel) ) - // bRet = rFilter.GetFormat() == nStgFmtId; } return bRet; } @@ -392,18 +390,6 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName, nBytesRead = pIStrm->Read(aBuffer, nMaxRead); pIStrm->Seek( nCurrPos ); } - /* - else - { - SvFileStream aStrm( rFileName, STREAM_READ ); - - // ohne FileName oder ohne Stream gibts nur den ANSI-Filter - if( !rFileName.Len() || SVSTREAM_OK != aStrm.GetError() ) - return 0; - - nBytesRead = aStrm.Read(aBuffer, nMaxRead); - aStrm.Close(); - }*/ TerminateBuffer(aBuffer, nBytesRead, sizeof(aBuffer)); diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 8be6ead5cd68..5cf9d109524b 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -95,12 +95,6 @@ ULONG SwReader::Read( const Reader& rOptions ) GetDoc(); - // am Sw3-Reader noch den pIo-Pointer "loeschen" - /* - if( po == ReadSw3 && pDoc->GetDocShell() && - ((Sw3Reader*)po)->GetSw3Io() != pDoc->GetDocShell()->GetIoSystem() ) - ((Sw3Reader*)po)->SetSw3Io( pDoc->GetDocShell()->GetIoSystem() );*/ - // waehrend des einlesens kein OLE-Modified rufen Link aOLELink( pDoc->GetOle2Link() ); pDoc->SetOle2Link( Link() ); @@ -403,10 +397,6 @@ ULONG SwReader::Read( const Reader& rOptions ) { pDoc->SetModified(); } - // <-- - -// if( po == ReadSw3 ) // am Sw3-Reader noch den pIo-Pointer "loeschen" -// ((Sw3Reader*)po)->SetSw3Io( 0 ); po->SetReadUTF8( FALSE ); po->SetBlockMode( FALSE ); @@ -421,20 +411,6 @@ ULONG SwReader::Read( const Reader& rOptions ) * Konstruktoren, Destruktor */ -// Initiales Einlesben - - /* -SwReader::SwReader(SvStorage& rStg, const String& rFileName, SwDoc *pDoc) - : SwDocFac(pDoc), pStrm(0), pStg(&rStg), pMedium(0), pCrsr(0), - aFileName(rFileName) -{ -} - -SwReader::SwReader(const uno::Reference < embed::XStorage >& rStg, const String& rFileName, SwDoc *pDoc) - : SwDocFac(pDoc), pStrm(0), pMedium(0), pCrsr(0), xStg( rStg ), aFileName(rFileName) -{ -} - */ SwReader::SwReader(SfxMedium& rMedium, const String& rFileName, SwDoc *pDocument) : SwDocFac(pDocument), pStrm(0), pMedium(&rMedium), pCrsr(0), aFileName(rFileName) @@ -450,13 +426,7 @@ SwReader::SwReader(SvStream& rStrm, const String& rFileName, const String& rBase { SetBaseURL( rBaseURL ); } -/* -SwReader::SwReader(SvStorage& rStg, const String& rFileName, SwPaM& rPam) - : SwDocFac(rPam.GetDoc()), pStrm(0), pStg(&rStg), pMedium(0), pCrsr(&rPam), - aFileName(rFileName) -{ -} -*/ + SwReader::SwReader(SfxMedium& rMedium, const String& rFileName, SwPaM& rPam) : SwDocFac(rPam.GetDoc()), pStrm(0), pMedium(&rMedium), pCrsr(&rPam), aFileName(rFileName) diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 6caa08440fbe..3c10b4c30aa9 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -191,7 +191,6 @@ SwApplet_Impl::~SwApplet_Impl() } void SwApplet_Impl::FinishApplet() { - //xApplet->EnableSetModified( TRUE ); uno::Reference < beans::XPropertySet > xSet( xApplet->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 2abe0733d60c..599aea0228e9 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -3629,11 +3629,6 @@ Writer& OutCSS1_SvxBox( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; - // Das Zeichen-Attribut wird nicht ausgegeben, wenn gerade - // Optionen ausgegeben werden -// if( !rHTMLWrt.IsHTMLMode(HTMLMODE_PARA_BORDER)) -// return rWrt; - const SvxBoxItem& rBoxItem = (const SvxBoxItem&)rHt; const SvxBorderLine *pTop = rBoxItem.GetTop(); const SvxBorderLine *pBottom = rBoxItem.GetBottom(); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 99c8b6eb160a..e76a74fb9922 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1529,10 +1529,6 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) case RES_PARATR_DROP: eState = HTML_DROPCAP_VALUE; break; - -// default: -// eState = HTML_NOT_SUPPORTED; -// break; } return eState; @@ -2793,11 +2789,6 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt ) if( rHTMLWrt.bOutOpts ) return rWrt; - // die Default-Farbe nur Schreiben, wenn sie als Hint vorkommt - //if( rHTMLWrt.bTagOn && !rHTMLWrt.bTxtAttr && rHTMLWrt.pDfltColor - // && rColor == *rHTMLWrt.pDfltColor ) - // return rWrt; - if( !rHTMLWrt.bTxtAttr && rHTMLWrt.bCfgOutStyles && rHTMLWrt.bCfgPreferStyles ) { // Font-Farbe nicht als Tag schreiben, wenn Styles normalen Tags diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index fb2a44943fa7..af40a46108f2 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -103,10 +103,6 @@ void SwHTMLParser::EndScript() bIgnoreRawData = FALSE; aScriptSource.ConvertLineEnd(); -// MIB 23.5.97: SGML-Kommentare brauchen nicht mehr entfernt zu werden, -// weil JS das jetzt selber kann. -// RemoveSGMLComment( aScriptSource, TRUE ); - // Ausser StarBasic und unbenutzem JavaScript jedes Script oder den // Modulnamen in einem Feld merken merken if( bInsSrcIntoFld && !bIgnoreHTMLComments ) diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 4db44baed94c..2d87dc005d71 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -175,9 +175,6 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet, case SVX_CSS1_PBREAK_AUTO: bSetBreak = bSetPageDesc = TRUE; break; -// case SVX_CSS1_PBREAK_AVOID: - // Hier koennte man SvxKeepItem am Absatz davor einfuegen -// break; default: ; } @@ -763,13 +760,12 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector, (pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_left) || pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_right) || pNext->GetString().EqualsIgnoreCaseAscii(sCSS1_first)) ) ) - // || CSS1_SELTYPE_ELEMENT == pNext->GetType() ) { String aName; if( pNext ) aName = pNext->GetString(); InsertPage( aName, - pNext != 0 /*CSS1_SELTYPE_PSEUDO == pNext->GetType()*/, + pNext != 0, rItemSet, rPropInfo ); } } @@ -1518,10 +1514,6 @@ void SwCSS1Parser::AddClassName( String& rFmtName, const String& rClass ) { ASSERT( rClass.Len(), "Style-Klasse ohne Laenge?" ); -// ?????????? -// String aTmp( rClass ); -// GetpApp()->GetAppInternational().ToLower( aTmp ); - (rFmtName += '.') += rClass; } @@ -1919,13 +1911,6 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn ) pPageEntry->GetPropertyInfo() ); SetPageDescAttrs( GetRightPageDesc(), pPageEntry->GetItemSet(), pPageEntry->GetPropertyInfo() ); -// if( pNamedPageDescs ) -// { -// for( USHORT i=0; i<pNamedPageDescs->Count(); i++ ) -// SetPageDescAttrs( (*pNamedPageDescs)[i], -// pPageEntry->GetItemSet(), -// pPageEntry->GetPropertyInfo() ); -// } } @@ -1950,29 +1935,6 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn ) SetPageDescAttrs( GetLeftPageDesc(TRUE), pPageEntry->GetItemSet(), pPageEntry->GetPropertyInfo() ); - // und jetzt noch die benannten Vorlagen -// for( USHORT i=0; i < GetPageCount(); i++ ) -// { -// pPageEntry = GetPage( i ); -// const String& rKey = pPageEntry->GetKey(); -// if( !rKey.Len() || rKey.GetChar(0) == ':' ) -// continue; -// -// String aName( rKey ); -// GetpApp()->GetAppInternational().ToLower( aName ); -// USHORT nPage = pDoc->MakePageDesc( aName ); -// SwPageDesc *pPageDesc = &pDoc->_GetPageDesc( nPage ); -// -// // Die neue Seitenvorlage entsteht aus dem Master durch kopieren. -// pDoc->CopyPageDesc( *pMasterPageDesc, *pPageDesc ); -// SetPageDescAttrs( pPageDesc, pPageEntry->GetItemSet(), -// pPageEntry->GetPropertyInfo() ); -// -// if( !pNamedPageDescs ) -// pNamedPageDescs = new SwHTMLPageDescs; -// pNamedPageDescs->Insert( pPageDesc, pNamedPageDescs->Count() ); -// } - return TRUE; } diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 98812e1646e4..57a664f66e5e 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -898,7 +898,6 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt, } while( bFound ); BOOL bScale = FALSE; - //Size aGrfSize( rNode.GetTwipSize() ); Fraction aScaleX( 1, 1 ); Fraction aScaleY( 1, 1 ); @@ -1439,8 +1438,6 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt, rHTMLWrt.Out_SwDoc( rWrt.pCurPam ); } -// rHTMLWrt.ChangeParaToken( 0 ); // MIB 8.7.97: Passiert jetzt in Out_SwDoc - rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken; if( rHTMLWrt.bLFPossible ) rHTMLWrt.OutNewLine(); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index f0c217621637..2aa725fba9fd 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -763,8 +763,6 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); -//!!! if( rHTMLWrt.pForm != pVCSbxCtrl->GetVCForm() ) -//!!! rHTMLWrt.nWarn = 1; // Control wird falscher Form zugeordnet rHTMLWrt.nFormCntrlCnt++; enum Tag { TAG_INPUT, TAG_SELECT, TAG_TEXTAREA, TAG_NONE }; diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index c0b6c0dc9888..72a279229e6f 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -895,9 +895,6 @@ void SwHTMLParser::InsertBodyOptions() break; case HTML_O_ONERROR: -// if( bAnyStarBasic ) -// InsertBasicDocEvent( SFX_EVENT_ACTIVATEDOC, -// pOption->GetString() ); break; case HTML_O_STYLE: diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 7e4fdba47520..dd85b003f5e8 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -75,9 +75,6 @@ static HTMLOptionEnum __FAR_DATA aHTMLULTypeTable[] = void SwHTMLNumRuleInfo::Set( const SwTxtNode& rTxtNd ) { - // --> OD 2006-06-12 #b6435904# - // export all numberings, except the outline numbering. -// if( rTxtNd.GetNumRule() && ! rTxtNd.IsOutline()) const SwNumRule* pTxtNdNumRule( rTxtNd.GetNumRule() ); if ( pTxtNdNumRule && pTxtNdNumRule != rTxtNd.GetDoc()->GetOutlineNumRule() ) @@ -92,8 +89,6 @@ void SwHTMLNumRuleInfo::Set( const SwTxtNode& rTxtNd ) // text node and the start value equals <USHRT_MAX>. // Start value <USHRT_MAX> indicates, that at this text node the numbering // is restarted with the value given at the corresponding level. -// bRestart = rTxtNd.IsListRestart() && -// GetNum() && rTxtNd.GetNum()->GetStartValue() == USHRT_MAX; bRestart = rTxtNd.IsListRestart() && !rTxtNd.HasAttrListRestartValue(); // <-- } @@ -309,11 +304,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) // den aktuellen Absatz erst einmal nicht numerieren { BYTE nLvl = nLevel; - // --> OD 2008-04-02 #refactorlists# -// SetNoNum(&nLvl, TRUE); // #115962# -// SetNodeNum( nLvl ); SetNodeNum( nLvl, false ); - // <-- } // einen neuen Kontext anlegen @@ -470,9 +461,7 @@ void SwHTMLParser::EndNumBulList( int nToken ) } else { - // den naechsten Absatz erstmal nicht numerieren - // --> OD 2008-04-02 #refactorlists# -// SetNodeNum( rInfo.GetLevel() | NO_NUMLEVEL ); + // the next paragraph not numbered first SetNodeNum( rInfo.GetLevel(), false ); // <-- } @@ -588,9 +577,8 @@ void SwHTMLParser::NewNumBulListItem( int nToken ) SwTxtNode* pTxtNode = pPam->GetNode()->GetTxtNode(); ((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(aNumRuleName) ); pTxtNode->SetAttrListLevel(nLevel); - // --> OD 2005-11-14 #i57656# - // <IsCounted()> state of text node has to be adjusted accordingly. - if ( /*nLevel >= 0 &&*/ nLevel < MAXLEVEL ) + // #i57656# - <IsCounted()> state of text node has to be adjusted accordingly. + if ( nLevel < MAXLEVEL ) { // --> OD 2008-04-02 #refactorlists# pTxtNode->SetCountedInList( bCountedInList ); @@ -693,22 +681,8 @@ void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel, bool bCountedInList ) const String& rName = GetNumInfo().GetNumRule()->GetName(); ((SwCntntNode *)pTxtNode)->SetAttr( SwNumRuleItem(rName) ); - // --> OD 2008-04-02 #refactorlists# -// // --> OD 2005-11-14 #i57656# -// // consider usage of NO_NUMLEVEL - see implementation of <SwTxtNode::SetLevel(..)> -// if ( /*nLevel >= 0 &&*/ ( nLevel & NO_NUMLEVEL ) ) -// { -// pTxtNode->SetAttrListLevel( nLevel & ~NO_NUMLEVEL ); -// pTxtNode->SetCountedInList( false ); -// } -// else -// { -// pTxtNode->SetAttrListLevel( nLevel ); -// pTxtNode->SetCountedInList( true ); -// } pTxtNode->SetAttrListLevel( nLevel ); pTxtNode->SetCountedInList( bCountedInList ); - // <-- // NumRule invalidieren, weil sie durch ein EndAction bereits // auf valid geschaltet worden sein kann. diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 47cc5b420900..6e0232fe8216 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -442,8 +442,6 @@ void SwHTMLParser::InsertEmbed() aCmdLst.FillSequence( aProps ); xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands")), uno::makeAny( aProps ) ); - // TODO/LATER: EnableSetModified?! - //pPlugin->EnableSetModified( TRUE ); } } @@ -896,7 +894,6 @@ void SwHTMLParser::InsertFloatingFrame() ::rtl::OUString aObjName; uno::Reference < embed::XEmbeddedObject > xObj = aCnt.CreateEmbeddedObject( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence(), aObjName ); - //pFrame->EnableSetModified( FALSE ); try { // TODO/MBA: testing @@ -920,12 +917,8 @@ void SwHTMLParser::InsertFloatingFrame() xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")), uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) ); - //if ( aFrmDescr.IsFrameBorderSet() ) xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")), uno::makeAny( bHasBorder ) ); - /*else - xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")), - uno::makeAny( sal_True ) );*/ xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")), uno::makeAny( sal_Int32( aMargin.Width() ) ) ); @@ -939,8 +932,6 @@ void SwHTMLParser::InsertFloatingFrame() { } - //pFrame->EnableSetModified( TRUE ); - SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() ); SvxCSS1PropertyInfo aPropInfo; if( HasStyleOptions( aStyle, aId, aClass ) ) @@ -979,89 +970,6 @@ void SwHTMLParser::InsertFloatingFrame() /* */ -/* -#define SWHTML_OPTTYPE_IGNORE 0 -#define SWHTML_OPTTYPE_TAG 1 -#define SWHTML_OPTTYPE_PARAM 2 - - -static USHORT GetOptionType( const String& rName, BOOL bApplet ) -{ - USHORT nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG; - - switch( rName.GetChar(0) ) - { - case 'A': - case 'a': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_align ) || - rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_alt ) ) - nType = SWHTML_OPTTYPE_IGNORE; - else if( bApplet && - (rName.EqualsIgnoreCaseAscii( sHTML_O_archive ) || - rName.EqualsIgnoreCaseAscii( sHTML_O_Archives )) ) - nType = SWHTML_OPTTYPE_TAG; - break; - case 'C': - case 'c': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_class ) || - (bApplet && (rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_code ) || - rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_codebase ))) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'H': - case 'h': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_height ) || - rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_hspace ) || - (!bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SW_HTML_O_Hidden )) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'I': - case 'i': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_id ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'M': - case 'm': - if( bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_mayscript ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'N': - case 'n': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_name ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'O': - case 'o': - if( bApplet && rName.EqualsIgnoreCaseAscii( sHTML_O_Object ) ) - nType = SWHTML_OPTTYPE_TAG; - break; - case 'S': - case 's': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_style ) || - (!bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_src )) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'T': - case 't': - if( !bApplet && rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_type ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'V': - case 'v': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_vspace ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - case 'W': - case 'w': - if( rName.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_O_width ) ) - nType = SWHTML_OPTTYPE_IGNORE; - break; - } - - return nType; -} -*/ - USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode ) { SwOLEObj& rObj = ((SwOLENode*)rNode.GetOLENode())->GetOLEObj(); @@ -1365,12 +1273,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, if( !pOLENd ) return rWrt; - // Inhalt des Nodes als Grafik speichern - //uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef(); - //GDIMetaFile aPic; - //if( xObj.is() && xRef->GetGDIMetaFile( aPic ).GetActionCount() ) { - //Graphic aGrf( aPic ); Graphic aGrf( *pOLENd->GetGraphic() ); String aGrfNm; const String* pTempFileName = rHTMLWrt.GetOrigFileName(); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 748da920e894..f00f9f462b18 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -67,7 +67,6 @@ #define CONTEXT_FLAGS_MULTICOL (HTML_CNTXT_STRIP_PARA | \ HTML_CNTXT_KEEP_NUMRULE | \ HTML_CNTXT_KEEP_ATTRS) -//#define CONTEXT_FLAGS_HDRFTR (HTML_CNTXT_STRIP_PARA|HTML_CNTXT_PROTECT_STACK) #define CONTEXT_FLAGS_HDRFTR (CONTEXT_FLAGS_MULTICOL) #define CONTEXT_FLAGS_FTN (CONTEXT_FLAGS_MULTICOL) diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index f4a1d1f9078e..b177b8af2a1c 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2064,7 +2064,7 @@ void HTMLTable::SetBorders() if( HTML_TF_BELOW==eFrame || HTML_TF_HSIDES==eFrame || HTML_TF_BOX==eFrame ) ((*pRows)[nRows-1])->bBottomBorder = sal_True; - if( /*bRightAlwd &&*/ (HTML_TF_RHS==eFrame || HTML_TF_VSIDES==eFrame || + if( (HTML_TF_RHS==eFrame || HTML_TF_VSIDES==eFrame || HTML_TF_BOX==eFrame) ) bRightBorder = sal_True; if( HTML_TF_LHS==eFrame || HTML_TF_VSIDES==eFrame || HTML_TF_BOX==eFrame ) @@ -2276,8 +2276,7 @@ inline void HTMLTable::CloseSection( sal_Bool bHead ) ASSERT( nCurRow<=nRows, "ungeultige aktuelle Zeile" ); if( nCurRow>0 && nCurRow<=nRows ) ((*pRows)[nCurRow-1])->SetEndOfGroup(); - if( bHead /*&& nCurRow==1*/ ) -// bHeadlineRepeat = sal_True; + if( bHead ) nHeadlineRepeat = nCurRow; } @@ -3002,14 +3001,6 @@ xub_StrLen SwHTMLParser::StripTrailingLF() if( nLFCount ) { -// MIB 6.6.97: Warum sollte man bei leeren Absaetzen nur ein LF loeschen? -// Das stimmt doch irgendwi nicht ... -// if( nLFCount == nLen ) -// { -// // nur Lfs, dann nur ein LF loeschen -// nLFCount = 1; -// } -// else if( nLFCount > 2 ) if( nLFCount > 2 ) { // Bei Netscape entspricht ein Absatz-Ende zwei LFs @@ -3503,9 +3494,7 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents( { // 1. Absatz auf nicht numeriert setzen BYTE nLvl = GetNumInfo().GetLevel(); - // --> OD 2008-04-02 #refactorlists# -// SetNoNum(&nLvl, TRUE); -// SetNodeNum( nLvl); + SetNodeNum( nLvl, false ); } @@ -3649,14 +3638,6 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions, // oder es gibt bereits Inhalt an der entsprechenden Stelle. ASSERT( !bForceFrame || pCurTable->HasParentSection(), "Tabelle im Rahmen hat keine Umgebung!" ); -// SCHOEN WAER'S, aber wie bekommen den Inhalt nicht zurueck -// in die umgebende Zelle -// if( bForceFrame && !pCurTable->HasParentSection() ) -// { -// pCurTable->SetParentContents( -// InsertTableContents( sal_False, SVX_ADJUST_END ) ); -// pCurTable->SetHasParentSection( sal_True ); -// } sal_Bool bAppend = sal_False; if( bForceFrame ) @@ -3832,11 +3813,6 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions, pDoc->GetNodes().GoNext( &(pPam->GetPoint()->nNode) ); pPam->GetPoint()->nContent.Assign( pCNd, 0 ); - // automatisch verankerte Rahmen muessen noch um - // eine Position nach vorne verschoben werden. - //if( FLY_AUTO_CNTNT==eAnchorId ) - // aMoveFlyFrms.C40_INSERT( SwFrmFmt, pFrmFmt, - // aMoveFlyFrms.Count() ); } // eine SwTable mit einer Box anlegen und den PaM in den @@ -4394,10 +4370,7 @@ void SwHTMLParser::BuildTableRow( HTMLTable *pCurTable, sal_Bool bReadOptions, SkipToken( -1 ); bDone = sal_True; } -// else -// { -// NextToken( nToken ); -// } + break; case HTML_TABLEROW_ON: case HTML_THEAD_ON: @@ -4573,10 +4546,7 @@ void SwHTMLParser::BuildTableSection( HTMLTable *pCurTable, SkipToken( -1 ); bDone = sal_True; } -// else -// { -// NextToken( nToken ); -// } + break; case HTML_THEAD_ON: case HTML_TFOOT_ON: @@ -4771,10 +4741,7 @@ void SwHTMLParser::BuildTableColGroup( HTMLTable *pCurTable, SkipToken( -1 ); bDone = sal_True; } -// else -// { -// NextToken( nToken ); -// } + break; case HTML_COLGROUP_ON: case HTML_THEAD_ON: @@ -5371,10 +5338,7 @@ HTMLTable *SwHTMLParser::BuildTable( SvxAdjust eParentAdjust, SkipToken( -1 ); bDone = sal_True; } -// else -// { -// NextToken( nToken ); -// } + break; case HTML_TABLE_OFF: bDone = sal_True; diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index a34843835e0d..8ed5532cfda6 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -68,7 +68,6 @@ #include <viewopt.hxx> #endif -//#define MAX_DEPTH (USHRT_MAX) #define MAX_DEPTH (3) using namespace ::com::sun::star; @@ -282,8 +281,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, SwWriteTableCol *pCol = aCols[nCol]; -// sal_Bool bOutWidth = nColSpan>1 || pCol->GetOutWidth(); - sal_Bool bOutWidth = sal_True; //nColSpan==1 && pCol->GetOutWidth(); + sal_Bool bOutWidth = sal_True; const SwStartNode* pSttNd = pBox->GetSttNd(); sal_Bool bHead = sal_False; @@ -729,9 +727,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, case 4: pFrame = OOO_STRING_SVTOOLS_HTML_TF_lhs ;break; case 8: pFrame = OOO_STRING_SVTOOLS_HTML_TF_rhs ;break; case 12: pFrame = OOO_STRING_SVTOOLS_HTML_TF_vsides ;break; - //FRAME=BOX ist der default wenn BORDER>0 - //case 15: - //default: pFrame = OOO_STRING_SVTOOLS_HTML_TF_box ;break; // geht nicht }; if( pFrame ) (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_frame ) += '=') += pFrame; diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx index f31c1fe37fa9..8c53176ecf04 100644 --- a/sw/source/filter/html/parcss1.cxx +++ b/sw/source/filter/html/parcss1.cxx @@ -525,8 +525,6 @@ CSS1Token CSS1Parser::GetNextToken() nRet = bPrevWhiteSpace ? CSS1_DOT_W_WS : CSS1_DOT_WO_WS; break; - // case '/': siehe oben - case '+': // '+' nRet = CSS1_PLUS; break; @@ -1406,7 +1404,6 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const nColor += c; } } - // bRet = i==6; bRet = TRUE; } break; diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx index d588171c8720..d72231e467e5 100644 --- a/sw/source/filter/html/svxcss1.cxx +++ b/sw/source/filter/html/svxcss1.cxx @@ -856,8 +856,6 @@ BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn ) BOOL bSuccess = CSS1Parser::ParseStyleSheet( rIn ); - // die bisher geparsten Items auf die Styles verteilt werden -// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() ); for( USHORT i=0; i<aSelectors.Count(); i++ ) { StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo ); @@ -884,7 +882,6 @@ BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn, BOOL bSuccess = CSS1Parser::ParseStyleOption( rIn ); rItemSet.ClearItem( aItemIds.nDirection ); -// pPropInfo->CreateBoxItem( *pItemSet, GetDfltBorderDist() ); pItemSet = 0; pPropInfo = 0; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 79003eaa671a..2f8650e8b582 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -324,7 +324,6 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn, bSelect( FALSE ), bInFootEndNoteAnchor( FALSE ), bInFootEndNoteSymbol( FALSE ), -// bIgnoreHTMLComments( bNoHTMLComments ) bIgnoreHTMLComments( bNoHTMLComments ), bRemoveHidden( FALSE ), pTempViewFrame(0) @@ -478,7 +477,6 @@ __EXPORT SwHTMLParser::~SwHTMLParser() ASSERT( !pTable, "Es existiert noch eine offene Tabelle" ); delete pImageMaps; - //delete pTable; ASSERT( !pPendStack, "SwHTMLParser::~SwHTMLParser: Hier sollte es keinen Pending-Stack mehr geben" ); @@ -2284,11 +2282,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum ) if( GetNumInfo().GetDepth() ) { BYTE nLvl = GetNumInfo().GetLevel(); - // --> OD 2008-04-02 #refactorlists# -// SetNoNum (&nLvl, TRUE); -// SetNodeNum( nLvl); SetNodeNum( nLvl, false ); - // <-- } else pPam->GetNode()->GetTxtNode()->ResetAttr( RES_PARATR_NUMRULE ); @@ -2973,16 +2967,11 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr, pLast = pLast->GetNext(); ASSERT( pLast, "Attribut nicht in eigener Liste gefunden!" ); - - // das Attribut nicht an der PaM-Psoition beenden, sondern da, - // wo das danch gestartete Attribut anfing??? - //pEndIdx = &pPrev->GetSttPara(); - //nEndCnt = pPrev->GetSttCnt(); } BOOL bMoveBack = FALSE; USHORT nWhich = pAttr->pItem->Which(); - if( /*!pLast &&*/ !nEndCnt && RES_PARATR_BEGIN <= nWhich && + if( !nEndCnt && RES_PARATR_BEGIN <= nWhich && *pEndIdx != pAttr->GetSttPara() ) { // dann eine Cntntnt Position zurueck! diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 2c9c19612187..0b291e98c16e 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -157,7 +157,6 @@ ULONG SwHTMLWriter::WriteStream() nHTMLMode |= HTMLMODE_ABS_POS_FLY|HTMLMODE_ABS_POS_DRAW; if( HTML_CFG_WRITER==nExportMode ) -// nHTMLMode |= HTMLMODE_FLY_MARGINS | HTMLMODE_FRSTLINE_IN_NUMBUL; nHTMLMode |= HTMLMODE_FLY_MARGINS; if( HTML_CFG_NS40==nExportMode ) @@ -193,14 +192,6 @@ ULONG SwHTMLWriter::WriteStream() rtl_getBestMimeCharsetFromTextEncoding( eDestEnc ); eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet ); - // fuer Netscape optimieren heisst Spacer- und Multicol ausgeben -// bCfgMultiCol = pHtmlOptions->IsNetscape3(); -// bCfgSpacer = pHtmlOptions->IsNetscape3(); - - // wenn Styles exportiert werden, wird ein Style einem HTML-Tag manchmal - // vorgezogen, wenn nicht fuer Netscape exportiert wird - // bCfgPreferStyles = bCfgOutStyles; // && !pHtmlOptions->IsNetscape3(); - // Nur noch fuer den MS-IE ziehen wir den Export von Styles vor. bCfgPreferStyles = HTML_CFG_MSIE==nExportMode; @@ -934,7 +925,6 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) // DokumentInfo ByteString sIndent; GetIndentString( sIndent ); -// OutNewLine(); using namespace ::com::sun::star; uno::Reference<document::XDocumentProperties> xDocProps; SwDocShell *pDocShell(pDoc->GetDocShell()); @@ -955,8 +945,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) OutFootEndNoteInfo(); const SwPageDesc *pPageDesc = 0; - //if( !pDoc->IsHTMLMode() ) - //{ + // In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage // exportiert und wenn keine gesetzt ist die Standard-Vorlage ULONG nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex(); @@ -982,12 +971,6 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) if( !pPageDesc ) pPageDesc = &const_cast<const SwDoc *>(pDoc)->GetPageDesc( 0 ); - //} - //else - //{ - // In HTML-Dokumenten nehmen wir immer die HTML-Vorlage - // pPageDesc = pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML ); - //} // und nun ... das Style-Sheet!!! if( bCfgOutStyles ) |