summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-05 15:56:54 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-06 17:38:14 +0100
commitcb3cd9644fdc556234f62fb80f6ecf60afedf3cf (patch)
tree3836e71904638dc2fe2cab514fbe0db9bfb551c1
parent14b70adc6b8da9accf5a873f6dffab9c5dea15fb (diff)
Remove dead code
-rw-r--r--starmath/inc/node.hxx18
-rw-r--r--starmath/source/visitors.cxx4
-rw-r--r--sw/inc/fmtmeta.hxx1
-rw-r--r--sw/source/core/inc/swblocks.hxx95
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks.cxx37
-rw-r--r--sw/source/core/table/swtable.cxx43
-rw-r--r--sw/source/core/text/frmform.cxx81
-rw-r--r--sw/source/core/text/itradj.cxx14
-rw-r--r--sw/source/core/text/txtfld.cxx21
-rw-r--r--sw/source/core/text/txthyph.cxx1
-rw-r--r--sw/source/core/unocore/unoredline.cxx37
-rw-r--r--sw/source/core/unocore/unostyle.cxx140
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx6
-rw-r--r--sw/source/ui/dochdl/swdtflvr.cxx12
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx108
-rw-r--r--sw/source/ui/utlui/content.cxx18
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx31
17 files changed, 16 insertions, 651 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 9d35e6b20b..fe4afe72ba 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -35,24 +35,6 @@
#include <stdio.h>
#define j_assert(cond, msg) DBG_ASSERT(cond, msg)
-#if 0
-// easier to read assert macro
- do{ \
- if(!(cond)) \
- { \
- std::cerr<<"Failed assertion: "<<msg<<", at line "; \
- char* f = (char*)__FILE__; \
- f += strlen(f); \
- do f--; while(*f != '/'); \
- do f--; while(*f != '/'); \
- do f--; while(*f != '/'); \
- fprintf(stderr, "%d in %s\n", __LINE__, f + 1); \
- } \
- } while(false)
-#endif
-
-// Comment out below to disable dumpasdot
-//#define DEBUG_ENABLE_DUMPASDOT
#include "parse.hxx"
#include "types.hxx"
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 9d0a8c5ebe..a6778eb315 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -682,7 +682,6 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
// This is done by shifting it's output-position to a point that
// corresponds exactly to a pixel on the output device.
Point aDrawPos( rDev.PixelToLogic( rDev.LogicToPixel( aBar.TopLeft( ) ) ) );
- //aDrawPos.X( ) = aBar.Left( ); //! don't change X position
aBar.SetPos( aDrawPos );
rDev.DrawRect( aBar );
@@ -1051,11 +1050,8 @@ SmCaretPosGraphBuildingVisitor::SmCaretPosGraphBuildingVisitor( SmNode* pRootNod
}
void SmCaretPosGraphBuildingVisitor::Visit( SmLineNode* pNode ){
- //pRightMost = NULL;
SmNodeIterator it( pNode );
while( it.Next( ) ){
- //if( !pRightMost )
- // pRightMost = pGraph->Add( SmCaretPos( it.Current( ), 0 ) );
it->Accept( this );
}
}
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index b708fc8ef2..ebbdb72c00 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -120,7 +120,6 @@ public:
// SfxPoolItem
virtual int operator==( const SfxPoolItem & ) const;
virtual SfxPoolItem * Clone( SfxItemPool *pPool = 0 ) const;
-// TYPEINFO();
/// notify clients registered at m_pMeta that this meta is being (re-)moved
void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx
index bdc1ccd7af..07d88fa95c 100644
--- a/sw/source/core/inc/swblocks.hxx
+++ b/sw/source/core/inc/swblocks.hxx
@@ -143,101 +143,6 @@ public:
virtual BOOL PutMuchEntries( BOOL bOn );
};
-/*
-class Sw3Persist : public SvPersist
-{
- virtual void FillClass( SvGlobalName * pClassName,
- ULONG * pClipFormat,
- String * pAppName,
- String * pLongUserName,
- String * pUserName,
- sal_Int32 nFileFormat=SOFFICE_FILEFORMAT_CURRENT ) const;
- virtual BOOL Save();
- virtual BOOL SaveCompleted( SvStorage * );
-public:
- Sw3Persist();
-};
-
-class SwSwgReader;
-
-class Sw2TextBlocks : public SwImpBlocks
-{
- SvPersistRef refPersist; // Fuer OLE-Objekte
- SwSwgReader* pRdr; // Lese-Routinen
- SfxMedium* pMed; // der logische Input-Stream
- String* pText; // String fuer GetText()
- long nDocStart; // Beginn des Doc-Records
- long nDocSize; // Laenge des Doc-Records
- long nStart; // Beginn des CONTENTS-Records
- long nSize; // Laenge des CONTENTS-Records
- USHORT nNamedFmts; // benannte Formate
- USHORT nColls; // Text-Collections
- USHORT nBlks; // Anzahl Elemente im CONTENTS-Record
-public:
- Sw2TextBlocks( const String& );
- virtual ~Sw2TextBlocks();
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual ULONG GetDoc( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
- virtual short GetFileType( ) const;
- ULONG LoadDoc();
-
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
- virtual void CloseFile();
-
- void StatLineStartPercent(); // zum Anzeigen des Prozessbars
-};
-
-class Sw3Io;
-class Sw3IoImp;
-
-class Sw3TextBlocks : public SwImpBlocks
-{
- Sw3Io* pIo3;
- Sw3IoImp* pImp;
- BOOL bAutocorrBlock;
-
-public:
- Sw3TextBlocks( const String& );
- Sw3TextBlocks( SvStorage& );
- virtual ~Sw3TextBlocks();
- virtual ULONG Delete( USHORT );
- virtual ULONG Rename( USHORT, const String&, const String& );
- virtual ULONG CopyBlock( SwImpBlocks& rImp, String& rShort, const String& rLong);
- virtual ULONG GetDoc( USHORT );
- virtual ULONG GetDocForConversion( USHORT );
- virtual ULONG BeginPutDoc( const String&, const String& );
- virtual ULONG PutDoc();
- virtual void SetDoc( SwDoc * pNewDoc);
- virtual ULONG GetText( USHORT, String& );
- virtual ULONG PutText( const String&, const String&, const String& );
- virtual ULONG MakeBlockList();
- virtual short GetFileType( ) const;
-
- virtual ULONG OpenFile( BOOL bReadOnly = TRUE );
- virtual void CloseFile();
-
- // Methoden fuer die neue Autokorrektur
- ULONG GetText( const String& rShort, String& );
- SwDoc* GetDoc() const { return pDoc; }
-
- virtual BOOL IsOnlyTextBlock( const String& rShort ) const;
-
- virtual ULONG GetMacroTable( USHORT, SvxMacroTableDtor& rMacroTbl,
- sal_Bool bFileAlreadyOpen = sal_False );
- virtual ULONG SetMacroTable( USHORT nIdx,
- const SvxMacroTableDtor& rMacroTbl,
- sal_Bool bFileAlreadyOpen = sal_False );
-
- void ReadInfo();
-};
-*/
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx
index 4563b4a705..6d72e41951 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -278,10 +278,6 @@ ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
{
uno::Reference < embed::XStorage > rSourceRoot = xBlkRoot->openStorageElement( aGroup, embed::ElementModes::READ );
uno::Reference < embed::XStorage > rDestRoot = ((SwXMLTextBlocks&)rDestImp).xBlkRoot->openStorageElement( sDestShortName, embed::ElementModes::READWRITE );
- //if(!rSourceRoot.Is())
- // nError = ERR_SWG_READ_ERROR;
- //else
- //{
rSourceRoot->copyToStorage( rDestRoot );
}
catch ( uno::Exception& )
@@ -289,26 +285,9 @@ ULONG SwXMLTextBlocks::CopyBlock( SwImpBlocks& rDestImp, String& rShort,
nError = ERR_SWG_WRITE_ERROR;
}
- /* I think this should work now that text only blocks are in sub-storages as well
- else
- {
- SvStorageStreamRef rSourceStream = xBlkRoot->OpenStream( aGroup, STREAM_STGREAD );
- SvStorageStreamRef rDestStream = ((SwXMLTextBlocks&)rDestImp).xBlkRoot-> OpenStream( sDestShortName, STREAM_STGWRITE );
- if(!rDestStream.Is())
- nError = ERR_SWG_WRITE_ERROR;
- else
- {
- if(!rSourceStream->CopyTo(&rDestStream))
- nError = ERR_SWG_WRITE_ERROR;
- else
- rDestStream->Commit();
- }
- }
- */
if(!nError)
{
rShort = sDestShortName;
- //((SwXMLTextBlocks&)rDestImp).xBlkRoot->Commit();
((SwXMLTextBlocks&)rDestImp).AddName( rShort, rLong, bTextOnly );
((SwXMLTextBlocks&)rDestImp).MakeBlockList();
}
@@ -324,13 +303,6 @@ ULONG SwXMLTextBlocks::StartPutBlock( const String& rShort, const String& rPacka
if(!xBlkRoot.is())
return 0;
GetIndex ( rShort );
- /*
- if( xBlkRoot->IsContained( rPackageName ) )
- {
- xBlkRoot->Remove( rPackageName );
- xBlkRoot->Commit();
- }
- */
try
{
xRoot = xBlkRoot->openStorageElement( rPackageName, embed::ElementModes::READWRITE );
@@ -431,14 +403,6 @@ ULONG SwXMLTextBlocks::PutBlock( SwPaM& , const String& )
}
//TODO/LATER: error handling
- /*
- ULONG nErr = xBlkRoot->GetError();
- if( nErr == SVSTREAM_DISK_FULL )
- nRes = ERR_W4W_WRITE_FULL;
- else if( nErr != SVSTREAM_OK )
- nRes = ERR_SWG_WRITE_ERROR;
- nFlags |= nCommitFlags;
- return nErr;*/
return 0;
}
@@ -624,7 +588,6 @@ void SwXMLTextBlocks::MakeBlockText( const String& rText )
{
SwTxtNode* pTxtNode = pDoc->GetNodes()[ pDoc->GetNodes().GetEndOfContent().
GetIndex() - 1 ]->GetTxtNode();
- //JP 18.09.98: Bug 56706 - Standard sollte zumindest gesetzt sein!
if( pTxtNode->GetTxtColl() == pDoc->GetDfltTxtFmtColl() )
pTxtNode->ChgFmtColl( pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index a28dd7060d..ec2791dfa1 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -44,7 +44,6 @@
#include <sfx2/linkmgr.hxx>
#include <editeng/boxitem.hxx>
-
#include <fmtfsize.hxx>
#include <fmtornt.hxx>
#include <fmtpdsc.hxx>
@@ -264,7 +263,6 @@ void _InsTblBox( SwDoc* pDoc, SwTableNode* pTblNd,
|*
|* SwTable::SwTable()
|*
-|*
|*************************************************************************/
SwTable::SwTable( SwTableFmt* pFmt )
: SwClient( pFmt ),
@@ -331,7 +329,6 @@ SwTable::~SwTable()
|*
|* SwTable::Modify()
|*
-|*
|*************************************************************************/
inline void FmtInArr( SvPtrarr& rFmtArr, SwFmt* pBoxFmt )
{
@@ -450,7 +447,6 @@ void SwTable::AdjustWidths( const long nOld, const long nNew )
|*
|* SwTable::GetTabCols()
|*
-|*
|*************************************************************************/
void lcl_RefreshHidden( SwTabCols &rToFill, USHORT nPos )
{
@@ -702,7 +698,6 @@ void SwTable::GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
|*
|* SwTable::SetTabCols()
|*
-|*
|*************************************************************************/
//Struktur zur Parameteruebergabe
struct Parm
@@ -820,11 +815,6 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
nRightDiff = (long)rParm.rNew[nLeftPos] -
(long)rParm.rOld[nLeftPos];
}
-//MA 11. Feb. 99: #61577# 0 sollte doch gerade richtig sein, weil die
-//Kante doch schon in SetTabCols() korrigiert wurde.
-// else
-// nRightDiff = (long)rParm.rNew.GetRight() -
-// (long)rParm.rOld.GetRight();
}
if( pBox->getRowSpan() == 1 )
@@ -926,8 +916,6 @@ void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm )
//Groesse der Box anpassen.
SwFmtFrmSize aFmtFrmSize( pBox->GetFrmFmt()->GetFrmSize() );
aFmtFrmSize.SetWidth( aFmtFrmSize.GetWidth() + nDiff );
-//#30009# if ( aFmtFrmSize.GetWidth() < 0 )
-// aFmtFrmSize.SetWidth( -aFmtFrmSize.GetWidth() );
rParm.aShareFmts.SetSize( *pBox, aFmtFrmSize );
}
@@ -1396,7 +1384,6 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew,
|* const SwTableBox* SwTable::GetTblBox( const Strn?ng& rName ) const
|* gebe den Pointer auf die benannte Box zurueck.
|*
-|*
|*************************************************************************/
BOOL IsValidRowName( const String& rStr )
@@ -1582,7 +1569,6 @@ BOOL SwTable::IsTblComplex() const
|*
|* SwTableLine::SwTableLine()
|*
-|*
|*************************************************************************/
SwTableLine::SwTableLine( SwTableLineFmt *pFmt, USHORT nBoxes,
SwTableBox *pUp )
@@ -1606,7 +1592,6 @@ SwTableLine::~SwTableLine()
|*
|* SwTableLine::ClaimFrmFmt(), ChgFrmFmt()
|*
-|*
|*************************************************************************/
SwFrmFmt* SwTableLine::ClaimFrmFmt()
{
@@ -1731,7 +1716,6 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const
|*
|* SwTableBox::SwTableBox()
|*
-|*
|*************************************************************************/
SwTableBox::SwTableBox( SwTableBoxFmt* pFmt, USHORT nLines, SwTableLine *pUp )
: SwClient( 0 ),
@@ -1834,7 +1818,6 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
|*
|* SwTableBox::ClaimFrmFmt(), ChgFrmFmt()
|*
-|*
|*************************************************************************/
SwFrmFmt* SwTableBox::ClaimFrmFmt()
{
@@ -1919,7 +1902,6 @@ void SwTableBox::ChgFrmFmt( SwTableBoxFmt* pNewFmt )
|* gebe den Namen dieser Box zurueck. Dieser wird dynamisch bestimmt
|* und ergibt sich aus der Position in den Lines/Boxen/Tabelle
|*
-|*
|*************************************************************************/
void lcl_GetTblBoxColStr( USHORT nCol, String& rNm )
{
@@ -2468,13 +2450,6 @@ void SwTableBoxFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
}
else if( bNewIsTxtFmt && nOldFmt != nNewFmt )
{
- // auf jedenfall muessen jetzt die Formeln/Values
- // geloescht werden!
- // LockModify();
- // ResetAttr( RES_BOXATR_FORMULA, RES_BOXATR_VALUE );
- // UnlockModify();
-
-
ChgNumToText( *pBox, nNewFmt );
}
}
@@ -2518,21 +2493,6 @@ BOOL SwTableBox::HasNumCntnt( double& rNum, sal_uInt32& rFmtIndex,
rFmtIndex = 0;
bRet = pNumFmtr->IsNumberFormat( aTxt, rFmtIndex, rNum );
-
-/*
-// wie bekommt man aus dem neuen String den neuen Wert?
-// denn der Numberformater erkennt aus "123.--DM" kein Zahlenformat!
- if( !bRet && rFmtIndex && !pNumFmtr->IsTextFormat( rFmtIndex ) &&
- SFX_ITEM_SET == GetFrmFmt()->GetItemState( RES_BOXATR_VALUE,
- FALSE, &pItem ))
- {
- Color* pCol;
- String sNewTxt;
- pNumFmtr->GetOutputString( ((SwTblBoxValue*)pItem)->GetValue(),
- rFmtIndex, sNewTxt, &pCol );
- bRet = aTxt == sNewTxt;
- }
-*/
}
else
rIsEmptyTxtNd = FALSE;
@@ -2589,14 +2549,13 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const
{
const SwNode* pNode = pSttNd->GetNodes()[nIndex];
if( pNode->IsTableNode() )
- { /*return ULONG_MAX if the cell contains a table(in table)*/
pTextNode = 0;
break;
}
if( pNode->IsTxtNode() )
{
if( pTextNode )
- { /*return ULONG_MAX if the cell contains complex paragraphs*/
+ {
pTextNode = 0;
break;
}
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 6616a20c84..b63542dd5d 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <editeng/keepitem.hxx>
#include <editeng/hyznitem.hxx>
@@ -85,23 +84,6 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame
( pFrm->IsVertical() &&
pFrm->Frm().Height() == pFrm->GetUpper()->Prt().Height() ) )
pFrm->bValidSize = sal_True;
-/*
- pFrm->bValidPrtArea = sal_True;
- //Die Position validieren um nicht unnoetige (Test-)Moves zu provozieren.
- //Dabei darf allerdings nicht eine tatsaechlich falsche Coordinate
- //validiert werden.
- if ( !pFrm->bValidPos )
- {
- //Leider muessen wir dazu die korrekte Position berechnen.
- Point aOld( pFrm->Frm().Pos() );
- pFrm->MakePos();
- if ( aOld != pFrm->Pos() )
- {
- pFrm->Frm().Pos( aOld );
- pFrm->bValidPos = sal_False;
- }
- }
-*/
}
void SwTxtFrm::ValidateFrm()
@@ -889,7 +871,6 @@ sal_Bool SwTxtFrm::CalcPreps()
else
rRepaint.Chg( Frm().Pos() + Prt().Pos(), Prt().SSize() );
- // 6792: Rrand < LRand und Repaint
if( 0 >= rRepaint.Width() )
rRepaint.Width(1);
}
@@ -1141,53 +1122,9 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
AdjustFrm( nChg, bHasToFit );
-/*
- // FME 16.07.2003 #i16930# - removed this code because it did not
- // work correctly. In SwCntntFrm::MakeAll, the frame did not move to the
- // next page, instead the print area was recalculated and
- // Prepare( PREP_POS_CHGD, (const void*)&bFormatted, FALSE ) invalidated
- // the other flags => loop
-
- // OD 04.04.2003 #108446# - handle special case:
- // If text frame contains no content and just has split, because of a
- // line stop, it has to move forward. To force this forward move without
- // unnecessary formatting of its footnotes and its follow, especially in
- // columned sections, adjust frame height to zero (0) and do not perform
- // the intrinsic format of the follow.
- // The formating method <SwCntntFrm::MakeAll()> will initiate the move forward.
- sal_Bool bForcedNoIntrinsicFollowCalc = sal_False;
- if ( nEnd == 0 &&
- rLine.IsStop() && HasFollow() && nNew == 1
- )
- {
- AdjustFrm( -Frm().SSize().Height(), bHasToFit );
- Prt().Pos().Y() = 0;
- Prt().Height( Frm().Height() );
- if ( FollowFormatAllowed() )
- {
- bForcedNoIntrinsicFollowCalc = sal_True;
- ForbidFollowFormat();
- }
- }
- else
- {
- AdjustFrm( nChg, bHasToFit );
- }
- */
-
if( HasFollow() || IsInFtn() )
_AdjustFollow( rLine, nEnd, nStrLen, nNew );
- // FME 16.07.2003 #i16930# - removed this code because it did not work
- // correctly
- // OD 04.04.2003 #108446# - allow intrinsic format of follow, if above
- // special case has forbit it.
-/* if ( bForcedNoIntrinsicFollowCalc )
- {
- AllowFollowFormat();
- }
- */
-
pPara->SetPrepMustFit( sal_False );
UNDO_SWAP( this )
@@ -1206,10 +1143,6 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
OSL_ENSURE( ! IsVertical() || IsSwapped(),
"SwTxtFrm::FormatLine( rLine, bPrev) with unswapped frame" );
SwParaPortion *pPara = rLine.GetInfo().GetParaPortion();
- // Nach rLine.FormatLine() haelt nStart den neuen Wert,
- // waehrend in pOldStart der alte Offset gepflegt wird.
- // Ueber diesen Weg soll das nDelta ersetzt werden.
- // *pOldStart += rLine.GetCurr()->GetLen();
const SwLineLayout *pOldCur = rLine.GetCurr();
const xub_StrLen nOldLen = pOldCur->GetLen();
const KSHORT nOldAscent = pOldCur->GetAscent();
@@ -1235,7 +1168,6 @@ sal_Bool SwTxtFrm::FormatLine( SwTxtFormatter &rLine, const sal_Bool bPrev )
bOldHyph == pNew->IsEndHyph();
if ( bUnChg && !bPrev )
{
- // 6672: Toleranz von SLOPPY_TWIPS (5 Twips); vgl. 6922
const long nWidthDiff = nOldWidth > pNew->Width()
? nOldWidth - pNew->Width()
: pNew->Width() - nOldWidth;
@@ -1439,7 +1371,6 @@ void SwTxtFrm::_Format( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf,
if( pPara->IsMargin() )
rRepaint.Width( rRepaint.Width() + pPara->GetHangingMargin() );
rRepaint.Top( rLine.Y() );
- // 6792: Rrand < LRand und Repaint
if( 0 >= rRepaint.Width() )
rRepaint.Width(1);
WidowsAndOrphans aFrmBreak( this, rInf.IsTest() ? 1 : 0 );
@@ -1747,11 +1678,6 @@ void SwTxtFrm::_Format( SwParaPortion *pPara )
{
const xub_StrLen nStrLen = GetTxt().Len();
- // AMA: Wozu soll das gut sein? Scheint mir zuoft zu einem kompletten
- // Formatieren und Repainten zu fuehren???
-// if ( !(*pPara->GetDelta()) )
-// *(pPara->GetDelta()) = nStrLen;
-// else
if ( !nStrLen )
{
// Leere Zeilen werden nicht lange gequaelt:
@@ -1832,7 +1758,6 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
const SwFrm *pDbgFtnCont = (const SwFrm*)(FindPageFrm()->FindFtnCont());
(void)pDbgFtnCont;
-#if OSL_DEBUG_LEVEL > 1
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -1841,7 +1766,6 @@ void SwTxtFrm::Format( const SwBorderAttrs * )
(void)i;
}
#endif
-#endif
#ifdef DEBUG_FTN
//Fussnote darf nicht auf einer Seite vor ihrer Referenz stehen.
@@ -2076,7 +2000,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
const XubString aXXX = GetTxtNode()->GetTxt();
const SwTwips nDbgY = Frm().Top();
(void)nDbgY;
-#if OSL_DEBUG_LEVEL > 1
// nStopAt laesst sich vom CV bearbeiten.
static MSHORT nStopAt = 0;
if( nStopAt == GetFrmId() )
@@ -2085,7 +2008,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
(void)i;
}
#endif
-#endif
if( IsEmpty() && FormatEmpty() )
return sal_True;
@@ -2122,10 +2044,8 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
//DBG_LOOP; shadows declaration above.
//resolved into:
#if OSL_DEBUG_LEVEL > 1
-#if OSL_DEBUG_LEVEL > 1
DbgLoop aDbgLoop2( (const void*) this );
#endif
-#endif
nStart = aLine.FormatLine( nStart );
if( aInf.IsNewLine() || (!aInf.IsStop() && nStart < nEnd) )
aLine.Insert( new SwLineLayout() );
@@ -2140,7 +2060,6 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
if( !bForceQuickFormat && nNewHeight != nOldHeight && !IsUndersized() )
{
// Achtung: Durch FormatLevel==12 kann diese Situation auftreten, don't panic!
- // OSL_ENSURE( nNewHeight == nOldHeight, "!FormatQuick: rosebud" );
const xub_StrLen nStrt = GetOfst();
_InvalidateRange( SwCharRange( nStrt, nEnd - nStrt) );
return sal_False;
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index 4f667f7524..47af51d0aa 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -731,20 +731,6 @@ void SwTxtAdjuster::CalcAdjLine( SwLineLayout *pCurrent )
case SVX_ADJUST_BLOCK:
{
// disabled for #i13507#
- // 8311: In Zeilen mit LineBreaks gibt es keinen Blocksatz!
-/* if( pCurrent->GetLen() &&
- CH_BREAK == GetInfo().GetChar( nStart + pCurrent->GetLen() - 1 ) &&
- !IsLastBlock() )
- {
- if( IsLastCenter() )
- {
- CalcFlyAdjust( pCurrent );
- pPara->GetRepaint()->SetOfst( 0 );
- break;
- }
- return;
- }
-*/ FormatBlock();
break;
}
default : return;
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 1d9b92a2f0..a4afbfa165 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -193,20 +193,6 @@ SwExpandPortion *SwTxtFormatter::NewFldPortion( SwTxtFormatInfo &rInf,
{
SwDBField* pDBFld = (SwDBField*)pFld;
pDBFld->ChgBodyTxtFlag( ::lcl_IsInBody( pFrame ) );
-/* Solange das ChangeExpansion auskommentiert ist.
- * Aktualisieren in Kopf/Fuszeilen geht aktuell nicht.
- if( !::lcl_IsInBody( pFrame ) )
- {
- pDBFld->ChgBodyTxtFlag( sal_False );
- pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- }
- else if( !pDBFld->IsInBodyTxt() )
- {
- // war vorher anders, also erst expandieren, dann umsetzen!!
- pDBFld->ChangeExpansion( pFrame, (SwTxtFld*)pHint );
- pDBFld->ChgBodyTxtFlag( sal_True );
- }
-*/
}
pRet = new SwFldPortion( pFld->GetCntnt( bName ) );
break;
@@ -321,9 +307,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
SwLinePortion *pRet = 0;
if( !pHint )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: hint not found?" << endl;
-#endif
pRet = new SwTxtPortion;
pRet->SetLen( 1 );
rInf.SetLen( 1 );
@@ -366,9 +349,6 @@ SwLinePortion *SwTxtFormatter::NewExtraPortion( SwTxtFormatInfo &rInf )
}
if( !pRet )
{
-#if OSL_DEBUG_LEVEL > 1
-// aDbstream << "NewExtraPortion: unknown hint" << endl;
-#endif
const XubString aNothing;
pRet = new SwFldPortion( aNothing );
rInf.SetLen( 1 );
@@ -489,7 +469,6 @@ SwNumberPortion *SwTxtFormatter::NewNumberPortion( SwTxtFormatInfo &rInf ) const
// use method <SwNumRule::MakeNumString(..)> instead of
// method <SwTxtNode::GetNumString()>, because for levels with
// numbering none the prefix and the suffix strings have to be provided.
-// XubString aTxt( pTxtNd->GetNumString() );
XubString aTxt( pNumRule->MakeNumString( *(pTxtNd->GetNum()) ) );
// <--
if ( aTxt.Len() > 0 )
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 0e7d07adc6..7aac7aa5d8 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -65,7 +65,6 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord(
{
if( rTxt.Len() < 4 || pFnt->IsSymbol(pVsh) )
return 0;
-// OSL_ENSURE( IsHyphenate(), "SwTxtFormatter::HyphWord: why?" );
Reference< XHyphenator > xHyph = ::GetHyphenator();
Reference< XHyphenatedWord > xHyphWord;
diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx
index 333f5cceaa..e444d00e53 100644
--- a/sw/source/core/unocore/unoredline.cxx
+++ b/sw/source/core/unocore/unoredline.cxx
@@ -197,8 +197,6 @@ SwXRedlinePortion::SwXRedlinePortion( const SwRedline* pRed,
const SwUnoCrsr* pPortionCrsr,
uno::Reference< text::XText > xParent, BOOL bStart) :
SwXTextPortion(pPortionCrsr, xParent, bStart ? PORTION_REDLINE_START : PORTION_REDLINE_END),
-// SwXText(pPortionCrsr->GetDoc(), CURSOR_REDLINE),
-// SwXRedlineText(pPortionCrsr->GetDoc(), *pRed->GetContentIdx()),
pRedline(pRed)
{
SetCollapsed(!pRedline->HasMark());
@@ -445,9 +443,6 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_DATE_TIME)))
{
DBG_ERROR("currently not available");
-// util::DateTime aDT;
-// if(aValue >>= aDT)
-// pRedline->SetTimeStamp(lcl_DateTimeFromUno(aDT));
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_COMMENT)))
{
@@ -460,41 +455,11 @@ void SwXRedline::setPropertyValue( const OUString& rPropertyName, const uno::Any
OUString sTmp; aValue >>= sTmp;
if(!sTmp.getLength())
throw lang::IllegalArgumentException();
-// pRedline->SetType(lcl_OUStringToRedlineType(sTmp));
}
else if(rPropertyName.equalsAsciiL(SW_PROP_NAME(UNO_NAME_REDLINE_SUCCESSOR_DATA)))
{
DBG_ERROR("currently not available");
-/* SwRedlineData* pNext = pRedline->GetRedlineData().Next();
- uno::Sequence<beans::PropertyValue> aValues;
- if(!(aValue =>> aValues) || !pNext)
- throw lang::IllegalArgumentException();
-
- const beans::PropertyValue* pValues = aValues.getConstArray();
- for(sal_Int32 nValue = 0; nValue < aValues.getLength(); nValue++)
- {
- if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_AUTHOR.pName)
- {
- DBG_ERROR("currently not available");
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_DATE_TIME.pName))
- {
- util::DateTime aDT;
- if(pValues[nValue].Value >>= aDT)
- pNext->SetTimeStamp(lcl_DateTimeFromUno(aDT));
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_COMMENT.pName))
- {
- OUString sTmp; pValues[nValue].Value >>= sTmp;
- pNext->SetComment(sTmp);
- }
- else if(pValues[nValue].Name.equalsAscii(UNO_NAME_REDLINE_TYPE.pName))
- {
- OUString sTmp; pValues[nValue].Value >>= sTmp;
- pNext->SetType(lcl_OUStringToRedlineType(sTmp);
- }
- }
-*/ }
+ }
else
{
throw lang::IllegalArgumentException();
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 2401fa1686..46add15001 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -465,24 +465,6 @@ SwXStyleFamily::SwXStyleFamily(SwDocShell* pDocSh, sal_uInt16 nFamily) :
pBasePool(pDocSh->GetStyleSheetPool()),
pDocShell(pDocSh)
{
-/* switch( nFamily )
- {
- case SFX_STYLE_FAMILY_CHAR:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_CHAR_STYLE);
- break;
- case SFX_STYLE_FAMILY_PARA:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_PARA_STYLE);
- break;
- case SFX_STYLE_FAMILY_PAGE:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_PAGE_STYLE);
- break;
- case SFX_STYLE_FAMILY_FRAME:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_FRAME_STYLE);
- break;
- case SFX_STYLE_FAMILY_PSEUDO:
- _pPropMap = aSwMapProvider.GetPropertyMap(PROPERTY_MAP_NUM_STYLE);
- break;
- }*/
StartListening(*pBasePool);
}
@@ -585,8 +567,6 @@ sal_Int32 lcl_GetCountOrName ( const SwDoc &rDoc, SfxStyleFamily eFamily, String
{
const SwPageDesc& rDesc = rDoc.GetPageDesc(i);
- /*if(rDesc.IsDefault() || rDesc.IsAuto())
- continue;*/
if ( IsPoolUserFmt ( rDesc.GetPoolFmtId() ) )
{
if ( nIndex == nCount )
@@ -1098,12 +1078,10 @@ public:
};
SwStyleProperties_Impl::SwStyleProperties_Impl(const SfxItemPropertyMap* pMap) :
-// _pMap(pMap),
aPropertyEntries( pMap->getPropertyEntries() ),
nArrLen(0)
{
nArrLen = aPropertyEntries.size();
- //const SfxItemPropertyMap* pTmp = _pMap;
pAnyArr = new uno::Any* [nArrLen];
for ( sal_uInt32 i =0 ; i < nArrLen; i++ )
@@ -1306,8 +1284,6 @@ SwXStyle::SwXStyle( SwDoc *pDoc, SfxStyleFamily eFam, BOOL bConditional) :
aAny = xFamilies->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "CharacterStyles" ) ) );
// Get the Frame family (and keep it for later)
aAny >>= mxStyleFamily;
- //aAny = mxStyleFamily->getByName ( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "Standard" ) ) );
- //aAny >>= mxStyleData;
}
break;
case SFX_STYLE_FAMILY_PARA:
@@ -1830,23 +1806,14 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
}
break;
- // case FN_UNO_DEFAULT_OUTLINE_LEVEL: //#outline level,removed by zahojianwei
- //{
- // sal_Int8 nLevel = 0;
- // if( rValue >>= nLevel )
- // rBase.mxNewBase->GetCollection()->SetOutlineLevel( nLevel );
- // else
- // rBase.mxNewBase->GetCollection()->SetOutlineLevel( NO_NUMBERING );
- //}
- //break;
- case RES_PARATR_OUTLINELEVEL: //add by zahojianwei
+ case RES_PARATR_OUTLINELEVEL:
{
sal_Int16 nLevel = 0;
rValue >>= nLevel;
if( 0 <= nLevel && nLevel <= MAXLEVEL)
rBase.mxNewBase->GetCollection()->SetAttrOutlineLevel( nLevel );
}
- break; //<-end,zhaojianwei
+ break;
case FN_UNO_FOLLOW_STYLE:
{
OUString sTmp;
@@ -1879,7 +1846,6 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
SwStyleNameMapper::FillUIName(uDescName, sDescName, nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC, sal_True );
if(!pNewDesc->GetPageDesc() || pNewDesc->GetPageDesc()->GetName() != sDescName)
{
- //sal_uInt16 nCount = pDoc->GetPageDescCnt();
sal_Bool bPut = sal_False;
if(sDescName.Len())
{
@@ -1940,7 +1906,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
// check for correct context and style name
//
sal_Int16 nIdx = GetCommandContextIndex( pSeq[i].Name );
- //
+
pBasePool->SetSearchMask( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
sal_Bool bStyleFound = sal_False;
const SfxStyleSheetBase* pBase = pBasePool->First();
@@ -1950,7 +1916,7 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
bStyleFound = sal_True;
pBase = pBasePool->Next();
}
- //
+
if (nIdx == -1 || !bStyleFound)
{
bFailed = sal_True;
@@ -2042,7 +2008,6 @@ void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
throw lang::IllegalArgumentException();
}
goto put_itemset;
- //break;
case RES_PARATR_DROP:
{
if( MID_DROPCAP_CHAR_STYLE_NAME == rEntry.nMemberId)
@@ -2084,12 +2049,11 @@ put_itemset:
aSet.SetParent(&rStyleSet);
rPropSet.setPropertyValue(rEntry, rValue, aSet);
rStyleSet.Put(aSet);
- // --> OD 2006-10-18 #i70223#
+ // #i70223#
if ( SFX_STYLE_FAMILY_PARA == eFamily &&
rEntry.nWID == RES_PARATR_NUMRULE &&
rBase.mxNewBase.is() && rBase.mxNewBase->GetCollection() &&
- //rBase.mxNewBase->GetCollection()->GetOutlineLevel() < MAXLEVEL /* assigned to list level of outline style */) //#outline level,removed by zhaojianwei
- rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() ) ////<-end,add by zhaojianwei
+ rBase.mxNewBase->GetCollection()->IsAssignedToListLevelOfOutlineStyle() )
{
OUString sNewNumberingRuleName;
@@ -2098,9 +2062,7 @@ put_itemset:
if ( sNewNumberingRuleName.getLength() == 0 ||
sTmp != pDoc->GetOutlineNumRule()->GetName() )
{
- // delete assignment to list level of outline style.
- //rBase.mxNewBase->GetCollection()->SetOutlineLevel( NO_NUMBERING ); //#outline level,removed by zhaojianwei
- rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,adde by zhaojianwei
+ rBase.mxNewBase->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
}
}
}
@@ -2251,21 +2213,13 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
aRet.setValue(&xRules, ::getCppuType((uno::Reference<container::XIndexReplace>*)0));
}
break;
- //case FN_UNO_DEFAULT_OUTLINE_LEVEL: //#outline level,removed by zahojianwei
- //{
- // DBG_ASSERT( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
- // BYTE nLevel = rBase.mxNewBase->GetCollection()->GetOutlineLevel();
- // if( nLevel != NO_NUMBERING )
- // aRet <<= static_cast<sal_Int8>( nLevel );
- //}
- //break;
- case RES_PARATR_OUTLINELEVEL: //add by zahojianwei
+ case RES_PARATR_OUTLINELEVEL:
{
DBG_ASSERT( SFX_STYLE_FAMILY_PARA == eFamily, "only paras" );
int nLevel = rBase.mxNewBase->GetCollection()->GetAttrOutlineLevel();
aRet <<= static_cast<sal_Int16>( nLevel );
}
- break; //<-end,zhaojianwei
+ break;
case FN_UNO_FOLLOW_STYLE:
{
String aString;
@@ -2311,7 +2265,6 @@ uno::Any lcl_GetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
{
DBG_ASSERT(COND_COMMAND_COUNT == 28,
"invalid size of comman count?");
- //SfxItemSet& rStyleSet = rBase.GetItemSet();
uno::Sequence< beans::NamedValue > aSeq(COND_COMMAND_COUNT);
beans::NamedValue *pSeq = aSeq.getArray();
@@ -2634,14 +2587,6 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
}
- // else if( FN_UNO_DEFAULT_OUTLINE_LEVEL == pEntry->nWID ) //#outline level,removed by zahojianwei
- // {
- // pStates[i] =
- // ( xStyle->GetCollection()->GetOutlineLevel()
- // == NO_NUMBERING )
- // ? beans::PropertyState_DEFAULT_VALUE
- // : beans::PropertyState_DIRECT_VALUE;
- // } //<-end,zhaojianwei
else if(SFX_STYLE_FAMILY_PAGE == eFamily &&
(rPropName.EqualsAscii("Header", 0, 6)
|| rPropName.EqualsAscii("Footer", 0, 6)))
@@ -2763,14 +2708,10 @@ void SAL_CALL SwXStyle::setPropertiesToDefault( const uno::Sequence< OUString >&
if ( pEntry->nFlags & beans::PropertyAttribute::READONLY )
throw uno::RuntimeException( OUString ( RTL_CONSTASCII_USTRINGPARAM ( "setPropertiesToDefault: property is read-only: " ) ) + pNames[nProp], static_cast < cppu::OWeakObject * > ( this ) );
- //if( pEntry->nWID == FN_UNO_DEFAULT_OUTLINE_LEVEL ) //#outline level, removed by zhaojianwei
- // static_cast<SwTxtFmtColl*>(pTargetFmt)->SetOutlineLevel( NO_NUMBERING );
- //else
- // pTargetFmt->ResetFmtAttr( pEntry->nWID );
- if( pEntry->nWID == RES_PARATR_OUTLINELEVEL ) //add by zhaojianwei
+ if( pEntry->nWID == RES_PARATR_OUTLINELEVEL )
static_cast<SwTxtFmtColl*>(pTargetFmt)->DeleteAssignmentToListLevelOfOutlineStyle();
else
- pTargetFmt->ResetFmtAttr( pEntry->nWID ); //<-end,zhaojianwei
+ pTargetFmt->ResetFmtAttr( pEntry->nWID );
}
}
else if ( bIsDescriptor )
@@ -2804,13 +2745,8 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
case SFX_STYLE_FAMILY_PARA :
{
pTargetFmt = xStyle->GetCollection();
- // --> OD 2007-07-25 #132402# - make code robust
if ( xStyle->GetCollection() )
- {
- // xStyle->GetCollection()->SetOutlineLevel( NO_NUMBERING ); //#outline level,removed by zhaojianwei
- xStyle->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end,add by zhaojianwei
- }
- // <--
+ xStyle->GetCollection()->DeleteAssignmentToListLevelOfOutlineStyle();
}
break;
case SFX_STYLE_FAMILY_FRAME:
@@ -2860,13 +2796,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
aFrmSz.SetSize( aPhysSize );
}
else
- {
- // --> OD 2008-07-25 #i91928#
-// aFrmSz.SetWidth( LONG_MAX );
-// aFrmSz.SetHeight( LONG_MAX );
aFrmSz.SetSize( SvxPaperInfo::GetDefaultPaperSize() );
- // <--
- }
}
else
@@ -2882,11 +2812,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault( )
pTargetFmt->SetFmtAttr( aFrmSz );
}
else
- {
- // --> OD 2007-01-25 #i73790# - method renamed
pTargetFmt->ResetAllFmtAttr();
- // <--
- }
if( USHRT_MAX != nPgDscPos )
m_pDoc->ChgPageDesc( nPgDscPos,
@@ -3005,8 +2931,8 @@ void SwXStyle::Invalidate()
******************************************************************/
SwXPageStyle::SwXPageStyle(SfxStyleSheetBasePool& rPool,
SwDocShell* pDocSh, SfxStyleFamily eFam,
- const String& rStyleName)://, const SfxItemPropertyMap* _pMap) :
- SwXStyle(rPool, eFam, pDocSh->GetDoc(), rStyleName),//, _pMap),
+ const String& rStyleName):
+ SwXStyle(rPool, eFam, pDocSh->GetDoc(), rStyleName),
pDocShell(pDocSh)
{
@@ -4162,22 +4088,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
const SfxItemPropertySet* pPropSet = aSwMapProvider.GetPropertySet(nPropSetId);
const SfxItemPropertyMap *pMap = pPropSet->getPropertyMap();
PropertyEntryVector_t aPropVector = pMap->getPropertyEntries();
-// struct compareWhichIds
-// {
-// bool operator()(const USHORT w1, const USHORT w2) const
-// {
-// return w1 < w2;
-// }
-// };
-// typedef std::map<const USHORT, SfxItemPropertyNamedEntry, compareWhichIds> PropertyMap_t;
-// PropertyMap_t aPropMap;
-// aPropMap.reserve( aPropVector.size() );
-// PropertyEntryVector_t::const_iterator aIt = aPropertyEntries.begin();
-// while( aIt != aPropertyEntries.end() )
-// {
-// aPropMap[aIt->nWID] = *aIt;
-// ++aIt;
-// }
SfxItemSet& rSet = *pSet.get();
SfxItemIter aIter(rSet);
@@ -4187,14 +4097,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
{
const USHORT nWID = pItem->Which();
-// PropertyMap_t::const_iterator aMapIt = aPropMap[nWID];
-// if( aMapIt != aPropMap.getEnd() )
-// {
-// beans::PropertyValue aPropertyValue;
-// aPropertyValue.Name = aIt->sName;
-// pItem->QueryValue( aPropertyValue.Value, aIt->nMemberId );
-// aPropertyVector.push_back( aPropertyValue );
-// }
// TODO: Optimize - and fix! the old iteration filled each WhichId
// only once but there are more properties than WhichIds
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
@@ -4209,20 +4111,6 @@ uno::Sequence< beans::PropertyValue > SwXAutoStyle::getProperties() throw (uno::
}
++aIt;
}
-/* int i = 0;
- while ( pMap[i].nWID != 0 )
- {
- if ( pMap[i].nWID == nWID )
- {
- beans::PropertyValue aPropertyValue;
- String sString( OUString::createFromAscii( pMap[i].pName ) );
- aPropertyValue.Name = sString;
- pItem->QueryValue( aPropertyValue.Value, pMap[i].nMemberId );
- aPropertyVector.push_back( aPropertyValue );
- break;
- }
- ++i;
- }*/
pItem = aIter.NextItem();
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 0f8bc8192c..3b51896887 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -595,8 +595,6 @@ void MSWordStyles::OutputStylesTable()
m_rExport.bStyDef = false;
}
-/* */
-
//---------------------------------------------------------------------------
// Fonts
//---------------------------------------------------------------------------
@@ -880,8 +878,6 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) );
}
-/* */
-
WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
{
@@ -905,7 +901,6 @@ void WW8_WrPlc0::Write( SvStream& rStrm )
//------------------------------------------------------------------------------
-/* */
//------------------------------------------------------------------------------
// class MSWordSections : Uebersetzung PageDescs in Sections
// behandelt auch Header und Footer
@@ -1881,7 +1876,6 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
}
}
-/* */
//------------------------------------------------------------------------------
// class WW8_WrPlcFtnEdn : Sammeln der Fuss/Endnoten und Ausgeben der Texte
// und Plcs am Ende des Docs.
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 3bb769db81..871ee66d8d 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -1554,18 +1554,6 @@ USHORT SwTransferable::GetSotDestination( const SwWrtShell& rSh,
// was mmchen wir bei Mehrfachselektion???
default:
{
-/*
-JP 13.07.98: Bug 52637: es wird ein URL-Feld erkannt also werden nur die
- Inhalte zugelassen. Das ist aber bestimmt nicht das
- gewollte.
- SwContentAtPos aCntntAtPos( SwContentAtPos::SW_INETATTR );
- SfxItemSet aSet( (SfxItemPool&)rSh.GetAttrPool(),
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT );
- if( pPt ? ((SwWrtShell&)rSh).GetContentAtPos( *pPt, aCntntAtPos, FALSE )
- : (rSh.GetAttr( aSet ) && aSet.Count()) )
- nRet = EXCHG_DEST_DOC_URLFIELD;
- else
-*/
if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
nRet = EXCHG_DEST_SWDOC_FREE_AREA_WEB;
else
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 686dbc4c5d..40c5bfa12c 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -1277,112 +1277,4 @@ css::uno::Reference< css::accessibility::XAccessible > SwSidebarWin::CreateAcces
} } // eof of namespace sw::sidebarwindows
-/********** SwRedComment**************/
-/*
-SwRedComment::SwRedComment( Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits,SwRedline* pRed)
- : SwSidebarWin(pParent,nBits,aMgr,aBits),
- pRedline(pRed)
-{
-}
-
-void SwRedComment::SetPopup()
-{
- mpButtonPopup = new PopupMenu(SW_RES(MN_REDCOMMENT_BUTTON));
- //mpButtonPopup->SetMenuFlags(MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES);
-}
-
-void SwRedComment::UpdateData()
-{
- if ( Engine()->IsModified() )
- {
- // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- // SetRedline is calling SetModified already
- DocView()->GetWrtShell().SetRedlineComment(Engine()->GetEditEngine().GetText());
- }
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
-}
-
-void SwRedComment::SetPostItText()
-{
- Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
-
- Engine()->Clear();
- View()->SetAttribs(DefaultItem());
- View()->InsertText(pRedline->GetComment(),false);
-
- Engine()->ClearModifyFlag();
- Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
- Engine()->SetModifyHdl( LINK( this, SwSidebarWin, ModifyHdl ) );
- Invalidate();
-}
-
-void SwRedComment::DeactivatePostIt()
-{
- SwSidebarWin::DeactivatePostIt();
- // current Redline is still selected
- DocView()->GetWrtShellPtr()->ClearMark();
-}
-
-void SwRedComment::ActivatePostIt()
-{
- SwSidebarWin::ActivatePostIt();
-
- // do we want the redline selected?
- // otherwise, SwRedComment::ActivatePostIt() as well as SwRedComment::DeactivatePostIt()
- // can be thrown out completly
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()),true);
-}
-
-void SwRedComment::MouseButtonDown( const MouseEvent& rMEvt )
-{
- if (mRectMetaButton.IsInside(PixelToLogic(rMEvt.GetPosPixel())) && rMEvt.IsLeft())
- {
- ExecuteCommand( mpButtonPopup->Execute( this,Rectangle(LogicToPixel(mRectMetaButton.BottomLeft()),LogicToPixel(mRectMetaButton.BottomLeft())),POPUPMENU_EXECUTE_DOWN | POPUPMENU_NOMOUSEUPCLOSE) );
- }
-}
-
-void SwRedComment::Delete()
-{
- SwSidebarWin::Delete();
- // we are not neccessarily on our redline, so let's move there
- GotoPos();
- DocView()->GetWrtShell().SetRedlineComment(EMPTYSTRING);
- DocView()->GetWrtShell().ClearMark();
- // so we get a new layout of notes (Anchor position is still the same and we would otherwise not get one)
- Mgr()->SetLayout();
- Mgr()->RemoveItem(pRedline);
-}
-
-void SwRedComment::GotoPos()
-{
- DocView()->GetDocShell()->GetWrtShell()->GotoRedline(
- DocView()->GetDocShell()->GetWrtShell()->FindRedlineOfData(pRedline->GetRedlineData()));
-}
-
-String SwRedComment::GetAuthor()
-{
- return pRedline->GetAuthorString();
-}
-
-Date SwRedComment::GetDate()
-{
- return pRedline->GetTimeStamp().GetDate();
-}
-
-Time SwRedComment::GetTime()
-{
- return pRedline->GetTimeStamp().GetTime();
-}
-
-bool SwRedComment::IsProtected()
-{
- return SwSidebarWin::IsProtected() || pRedline->Start()->nNode.GetNode().GetTxtNode()->IsInProtectSect();
-}
-*/
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index f09927a942..289659af97 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -750,24 +750,6 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
nMemberCount++;
}
}
- /* this code can be used once we want redline comments in the margin
- else // redcomment
- {
- SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster());
- if ( pRedline->GetComment().Len() )
- {
- String sEntry = pRedline->GetComment();
- RemoveNewline(sEntry);
- SwPostItContent* pCnt = new SwPostItContent(
- this,
- sEntry,
- pRedline,
- nMemberCount);
- pMember->Insert(pCnt);
- nMemberCount++;
- }
- }
- */
}
}
}
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index f4d7981040..e04221af16 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -406,37 +406,8 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
// TODO/LATER: recording! Convert properties to items
case SID_INSERT_PLUGIN:
- /*
- if(pReq)
- {
- INetURLObject* pURL = aDlg.GetURL();
- if(pURL)
- pReq->AppendItem(SfxStringItem(FN_PARAM_2, pURL->GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
- } */
case SID_INSERT_APPLET:
- /*
- if(pReq)
- {
- SvAppletObjectRef xApplet ( xIPObj );
- if(xApplet.Is())
- pReq->AppendItem(SfxStringItem(FN_PARAM_1 , xApplet->GetCodeBase()));
- pReq->AppendItem(SfxStringItem(FN_PARAM_2 , aDlg.GetClass()));
- pReq->AppendItem(SfxStringItem(FN_PARAM_3 , aDlg.GetCommands()));
- }*/
case SID_INSERT_FLOATINGFRAME:
- /*
- if(pReq && xFloatingFrame.Is())
- {
- const SfxFrameDescriptor* pDescriptor = xFloatingFrame->GetFrameDescriptor();
- pReq->AppendItem(SfxStringItem(FN_PARAM_1, pDescriptor->GetName()));
- pReq->AppendItem(
- SfxStringItem( FN_PARAM_2,
- pDescriptor->GetURL().GetMainURL(INetURLObject::NO_DECODE)));
- pReq->AppendItem(SvxSizeItem(FN_PARAM_3, pDescriptor->GetMargin()));
- pReq->AppendItem(SfxByteItem(FN_PARAM_4, pDescriptor->GetScrollingMode()));
- pReq->AppendItem(SfxBoolItem(FN_PARAM_5, pDescriptor->HasFrameBorder()));
- }*/
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
@@ -492,8 +463,6 @@ void SwWrtShell::InsertObject( const svt::EmbeddedObjectRef& xRef, SvGlobalName
pClient->DoVerb( SVVERB_SHOW );
// TODO/LATER: set document name - should be done in Client
- //if ( !ERRCODE_TOERROR( nErr ) )
- // xIPObj->SetDocumentName( GetView().GetDocShell()->GetTitle() );
}
}
}