summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorKayo Hamid <revol.code@yahoo.com>2010-11-22 10:32:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-22 10:32:27 +0000
commit05505f72eab1a8b39a283283c34265397747d78f (patch)
tree774d5f52987b0865fd7206239e92935a44792f63 /sw/source
parentbfe33f821e176353753a28d34371ff778fadab59 (diff)
Clean code and comments at writer
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/except/errhdl.cxx1
-rw-r--r--sw/source/core/fields/authfld.cxx1
-rw-r--r--sw/source/core/fields/cellfml.cxx14
-rw-r--r--sw/source/core/fields/chpfld.cxx24
-rw-r--r--sw/source/core/fields/dbfld.cxx19
-rw-r--r--sw/source/core/fields/docufld.cxx6
-rw-r--r--sw/source/core/fields/expfld.cxx2
-rw-r--r--sw/source/core/fields/fldbas.cxx2
-rw-r--r--sw/source/core/fields/postithelper.cxx17
-rw-r--r--sw/source/core/frmedt/fefly1.cxx24
-rw-r--r--sw/source/core/frmedt/feshview.cxx16
-rw-r--r--sw/source/core/frmedt/fetab.cxx20
-rw-r--r--sw/source/core/frmedt/fews.cxx2
-rw-r--r--sw/source/core/frmedt/tblsel.cxx26
-rw-r--r--sw/source/core/graphic/grfatr.cxx4
-rw-r--r--sw/source/core/graphic/ndgrf.cxx22
-rw-r--r--sw/source/core/objectpositioning/anchoredobjectposition.cxx48
-rw-r--r--sw/source/core/ole/ndole.cxx10
-rw-r--r--sw/source/core/para/paratr.cxx2
-rw-r--r--sw/source/core/sw3io/sw3convert.cxx2
20 files changed, 13 insertions, 249 deletions
diff --git a/sw/source/core/except/errhdl.cxx b/sw/source/core/except/errhdl.cxx
index 5677a41553..96d530defb 100644
--- a/sw/source/core/except/errhdl.cxx
+++ b/sw/source/core/except/errhdl.cxx
@@ -64,7 +64,6 @@ BOOL bAssert = FALSE; // TRUE, wenn mal ein ASSERT kam.
void AssertFail( const sal_Char* pError, const sal_Char* pFileName, USHORT nLine )
{
CVBREAK;
- // NOTE4("ASSERT: %s at %d: %s\n", pFileName, nLine, pError);
bAssert = TRUE;
if( !bAssertFail && GetpApp() && GetpApp()->IsInMain() )
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 9f5cb60df0..80f9ba4be8 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -121,7 +121,6 @@ SwAuthorityFieldType::SwAuthorityFieldType( const SwAuthorityFieldType& rFType)
SwAuthorityFieldType::~SwAuthorityFieldType()
{
-// DBG_ASSERT(!m_pDataArr->Count(), "Array is not empty");
m_pSortKeyArr->DeleteAndDestroy(0, m_pSortKeyArr->Count());
delete m_pSortKeyArr;
delete m_pSequArr;
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index cdbbdfc55b..e8302c39ce 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -725,20 +725,6 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const String& rNm ) const
const SwFrm* lcl_GetBoxFrm( const SwTableBox& rBox )
{
-/*
-
- // oder besser ueber die Box den Frame suchen
-
- SwClientIter aIter( *pBox->GetFrmFmt() );
- ULONG nMinPos = ULONG_MAX;
- const SwFrm* pFnd = 0;
- for( SwFrm* pF = (SwFrm*)aIter.First( TYPE( SwCellFrm )); pF;
- pF = (SwFrm*)aIter.Next() )
- {
- if( pF->Frm().Y() <
- }
-*/
-
SwNodeIndex aIdx( *rBox.GetSttNd() );
SwCntntNode* pCNd = aIdx.GetNodes().GoNext( &aIdx );
ASSERT( pCNd, "Box hat keinen TextNode" );
diff --git a/sw/source/core/fields/chpfld.cxx b/sw/source/core/fields/chpfld.cxx
index 874d6747bc..11c588b695 100644
--- a/sw/source/core/fields/chpfld.cxx
+++ b/sw/source/core/fields/chpfld.cxx
@@ -102,22 +102,6 @@ SwField* SwChapterField::Copy() const
return pTmp;
}
-// --> OD 2008-02-14 #i53420#
-//void SwChapterField::ChangeExpansion( const SwFrm* pFrm,
-// const SwTxtNode* pTxtNd,
-// sal_Bool bSrchNum )
-//{
-// ASSERT( pFrm, "in welchem Frame stehe ich denn?" )
-// SwDoc* pDoc = (SwDoc*)pTxtNd->GetDoc();
-// SwPosition aPos( pDoc->GetNodes().GetEndOfContent() );
-
-// if( pFrm->IsInDocBody() )
-// aPos.nNode = *pTxtNd;
-// else if( 0 == (pTxtNd = GetBodyTxtNode( *pDoc, aPos, *pFrm )) )
-// // kein TxtNode (Formatierung Kopf/Fusszeile)
-// return;
-// ChangeExpansion(*pTxtNd, bSrchNum);
-//}
void SwChapterField::ChangeExpansion(const SwFrm* pFrm,
const SwCntntNode* pCntntNode,
sal_Bool bSrchNum )
@@ -153,12 +137,6 @@ void SwChapterField::ChangeExpansion(const SwTxtNode &rTxtNd, sal_Bool bSrchNum)
{
BYTE nPrevLvl = nLevel;
- // --> OD 2008-04-02 #refactorlists#
-// nLevel = GetRealLevel( pONd->GetTxtColl()->
-// GetOutlineLevel() );
- //ASSERT( pONd->GetOutlineLevel() >= 0 && pONd->GetOutlineLevel() < MAXLEVEL, //#outline level,zhaojianwei
- // "<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
- //nLevel = static_cast<BYTE>(pONd->GetOutlineLevel());
ASSERT( pONd->GetAttrOutlineLevel() >= 0 && pONd->GetAttrOutlineLevel() <= MAXLEVEL,
"<SwChapterField::ChangeExpansion(..)> - outline node with inconsistent outline level. Serious defect -> please inform OD." );
nLevel = static_cast<BYTE>(pONd->GetAttrOutlineLevel()); //<-end,zhaojianwei
@@ -289,7 +267,7 @@ bool SwChapterField::PutValue( const uno::Any& rAny, USHORT nWhichId )
case text::ChapterFormat::DIGIT:
SetFormat(CF_NUMBER_NOPREPST);
break;
- //case text::ChapterFormat::NAME_NUMBER:
+
default: SetFormat(CF_NUM_TITLE);
}
}
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index b54b69efa1..2298577f5d 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -278,10 +278,7 @@ String SwDBField::GetCntnt(BOOL bName) const
if(bName)
{
const String& rDBName = ((SwDBFieldType*)GetTyp())->GetName();
- //TODO/CLEANUP
- //Funktion tut nichts!
- //String sContent( SFX_APP()->LocalizeDBName(INI2NATIONAL,
- // rDBName.GetToken(0, DB_DELIM)));
+
String sContent( rDBName.GetToken(0, DB_DELIM) );
if (sContent.Len() > 1)
@@ -704,18 +701,6 @@ bool SwDBNextSetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
return bRet;
}
-/*
-String SwDBNextSetField::GetPar2() const
-{
- return GetDBName();
-}
-
-void SwDBNextSetField::SetPar2(const String& rStr)
-{
- GetDBName() = rStr;
-}
-*/
-
/*--------------------------------------------------------------------
Beschreibung: Datensatz mit bestimmter ID
--------------------------------------------------------------------*/
@@ -1005,8 +990,6 @@ bool SwDBSetNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nSet < (INT16) SVX_NUMBER_NONE )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
}
break;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 0213b38e30..9ad1c89594 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -294,8 +294,6 @@ bool SwPageNumberField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nSet <= SVX_NUM_PAGEDESC )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
break;
case FIELD_PROP_USHORT1:
@@ -1963,7 +1961,6 @@ bool SwPostItField::PutValue( const uno::Any& rAny, USHORT nWhichId )
break;
case FIELD_PROP_TEXT:
DBG_ERROR("Not implemented!");
- // ::GetString( rAny, sTxt );
break;
case FIELD_PROP_DATE:
if( rAny.getValueType() == ::getCppuType((util::Date*)0) )
@@ -2495,8 +2492,6 @@ bool SwRefPageGetField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nSet <= SVX_NUM_PAGEDESC )
SetFormat(nSet);
else {
- //exception(wrong_value)
- ;
}
}
break;
@@ -2612,7 +2607,6 @@ bool SwJumpEditField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
case JE_FMT_FRAME: nRet = text::PlaceholderType::TEXTFRAME; break;
case JE_FMT_GRAPHIC:nRet = text::PlaceholderType::GRAPHIC; break;
case JE_FMT_OLE: nRet = text::PlaceholderType::OBJECT; break;
-// case JE_FMT_TEXT:
default:
nRet = text::PlaceholderType::TEXT; break;
}
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 951210d692..113b8b5fef 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1253,8 +1253,6 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, USHORT nWhichId )
if(nTmp16 <= SVX_NUMBER_NONE )
SetFormat(nTmp16);
else {
- //exception(wrong_value)
- ;
}
}
break;
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index d9e7ca411b..785a1e2a49 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -308,13 +308,11 @@ void SwField::SetPar2(const String& )
USHORT SwField::GetSubType() const
{
-// ASSERT(0, "Sorry Not implemented");
return 0;
}
void SwField::SetSubType(USHORT )
{
-// ASSERT(0, "Sorry Not implemented");
}
bool SwField::QueryValue( uno::Any& rVal, USHORT nWhichId ) const
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index d281c0a802..a2f81554f3 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -206,21 +206,4 @@ sw::sidebarwindows::SwSidebarWin* SwAnnotationItem::GetSidebarWindow(
pFmtFld );
}
-/*
-SwPosition SwRedCommentItem::GetAnchorPosition()
-{
- return *pRedline->Start();
-}
-
-SwSidebarWin* SwRedCommentItem::GetSidebarWindow(Window* pParent, WinBits nBits,SwPostItMgr* aMgr,SwPostItBits aBits)
-{
- return new SwRedComment(pParent,nBits,aMgr,aBits,pRedline);
-}
-
-bool SwRedCommentItem::UseElement()
-{
- return true;
-}
-*/
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 4b3e8ef696..11cb64961b 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -253,13 +253,6 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, sal_Bool bNew )
if( rFrm.IsFlyInCntFrm() && rFrm.GetAnchorFrm() )
rFrm.GetAnchorFrm()->SetCompletePaint();
- // --> OD 2004-06-11 #i28701# - no format at all.
-// //Hier wurde immer kalkuliert. Leider ist der Sonderfall Fly in Fly mit
-// //Spalten u.U. sehr kritisch wenn der innenliegende zuerst formatiert
-// //wird. Um kein Risiko einzugehen entschaerfen wir nur diesen Sonderfall.
-// if( !rFrm.GetAnchorFrm()->IsInFly() )
-// rFrm.Calc();
-
if( pImpl->GetDrawView()->AreObjectsMarked() )
pImpl->GetDrawView()->UnmarkAll();
@@ -352,9 +345,7 @@ const SwFrmFmt* SwFEShell::IsFlyInFly()
Point aPoint( aTmpPos );
aPoint.X() -= 1; //nicht im Fly landen!!
GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState );
- // OD 01.07.2003 #108784# - determine text frame by left-top-corner
- // of object
- //pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm( 0, 0, sal_False );
+ // #108784# - determine text frame by left-top-corner of object
pTxtFrm = aPos.nNode.GetNode().GetCntntNode()->GetFrm( &aTmpPos, 0, sal_False );
}
const SwFrm *pTmp = ::FindAnchor( pTxtFrm, aTmpPos );
@@ -395,8 +386,6 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
else
{
const SwFrm *pAnch = pFly->GetAnchorFrm();
- // --> OD 2004-06-11 #i28701# - no format here
-// pAnch->Calc();
Point aOrient( pAnch->Frm().Pos() );
if ( pFly->IsFlyInCntFrm() )
@@ -407,8 +396,6 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
aOrient.Y() = rAbsPos.Y() - aOrient.Y();
pFly->ChgRelPos( aOrient );
}
- // --> OD 2004-06-11 #i28701# - no format here
-// pFly->Calc();
CallChgLnk(); // rufe das AttrChangeNotify auf der UI-Seite.
}
@@ -656,9 +643,6 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
// we better get the current pCurCrsr instead of working with the
// deleted one:
pCrsr = GetCrsr();
- // <--
-
-// KillPams();
}
else
bMoveCntnt = sal_False;
@@ -1087,7 +1071,6 @@ sal_Bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const
{
// OD 12.11.2003 #i22341# - content anchor of anchor item is needed.
// Thus, don't overwrite anchor item by default contructed anchor item.
- //rSet.Put( SwFmtAnchor( eType ) );
if ( FLY_AS_CHAR == eType )
{
rSet.ClearItem( RES_OPAQUE );
@@ -1929,11 +1912,6 @@ sal_Bool SwFEShell::ReplaceSdrObj( const String& rGrfName, const String& rFltNam
pFmt = GetDoc()->Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, NULL, NULL );
- // die Ordnungsnummer (Z-Order) noch uebertragen
- // JP 04.07.98: klappt aber nicht richtig!
- //SdrObject* pNewObj = ::FindSdrObject( pFmt );
- //pNewObj->SetOrdNum( nOrdNum );
-
EndUndo();
EndAllAction();
bRet = sal_True;
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 9f70daf355..08ac82c210 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -623,7 +623,6 @@ void SwFEShell::ScrollTo( const Point &rPt )
(!Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ||
Imp()->IsDragPossible( rPt )) )
{
- //SwSaveHdl aSave( Imp() );
ScrollMDI( this, aRect, SCROLLVAL, SCROLLVAL );
}
}
@@ -659,7 +658,7 @@ long SwFEShell::BeginDrag( const Point* pPt, BOOL )
{
delete pChainFrom; delete pChainTo; pChainFrom = pChainTo = 0;
SdrHdl* pHdl = pView->PickHandle( *pPt );
- pView->BegDragObj( *pPt, 0 /*GetWin()*/, pHdl );
+ pView->BegDragObj( *pPt, 0, pHdl );
::FrameNotify( this, FLY_DRAG );
return 1;
}
@@ -778,8 +777,6 @@ const SwFrmFmt* SwFEShell::SelFlyGrabCrsr()
if( pFly )
{
- // --> OD 2004-06-11 #i28701# - no format here
-// pFly->GetAnchorFrm()->Calc();
SwCntntFrm *pCFrm = pFly->ContainsCntnt();
if ( pCFrm )
{
@@ -1334,7 +1331,7 @@ namespace
};
}
-const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT /*GOTOOBJ_...*/ eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter )
+const SdrObject* SwFEShell::GetBestObject( BOOL bNext, USHORT eType, BOOL bFlat, const ::svx::ISdrObjectFilter* pFilter )
{
if( !Imp()->HasDrawView() )
return NULL;
@@ -1568,7 +1565,7 @@ BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Poin
return bRet;
}
-BOOL SwFEShell::BeginCreate( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, UINT32 eObjInventor,
+BOOL SwFEShell::BeginCreate( UINT16 eSdrObjectKind, UINT32 eObjInventor,
const Point &rPos )
{
BOOL bRet = FALSE;
@@ -2058,7 +2055,6 @@ void SwFEShell::MoveMark( const Point &rPos )
{
ScrollTo( rPos );
SwDrawView* pDView = Imp()->GetDrawView();
-// Imp()->GetDrawView()->MovMarkObj( rPos );
if (pDView->IsInsObjPoint())
pDView->MovInsObjPoint( rPos );
@@ -2104,7 +2100,6 @@ BOOL SwFEShell::EndMark()
{
if ( !bShowHdl )
{
- //HMHpDView->HideMarkHdl();
bShowHdl = TRUE;
}
rMrkList.DeleteMark( i );
@@ -2116,7 +2111,6 @@ BOOL SwFEShell::EndMark()
{
pDView->MarkListHasChanged();
pDView->AdjustMarkHdl();
- //HMHpDView->ShowMarkHdl();
}
if ( rMrkList.GetMarkCount() )
@@ -2512,8 +2506,6 @@ static BYTE __READONLY_DATA aChkArr[ 4 ] = {
}
else
{
- // --> OD 2004-06-11 #i28701# - no format here
-// pFrm->GetAnchorFrm()->Calc();
SwCntntFrm *pCFrm = pFrm->ContainsCntnt();
if ( pCFrm )
{
@@ -2930,7 +2922,7 @@ long SwFEShell::GetSectionWidth( SwFmt& rFmt ) const
return 0;
}
-void SwFEShell::CreateDefaultShape( UINT16 /*SdrObjKind ?*/ eSdrObjectKind, const Rectangle& rRect,
+void SwFEShell::CreateDefaultShape( UINT16 eSdrObjectKind, const Rectangle& rRect,
USHORT nSlotId)
{
SdrView* pDrawView = GetDrawView();
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index d2fcd35f3b..797b2813a9 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -582,10 +582,6 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const
{
pLastCols->SetLeftMin( nLeftMin );
- //ASSERT( bVert ||
- // pLastCols->GetLeftMin() == (pTab->Frm().*fnRect->fnGetLeft)(),
- // "GetTabCols: wrong result" )
-
pColumnCacheLastTabFrm = pTab;
}
else
@@ -990,9 +986,7 @@ BOOL SwFEShell::HasBoxSelection() const
if( IsTableMode() )
return TRUE;
SwPaM* pPam = GetCrsr();
- // leere Boxen gelten auch ohne Selektion als selektiert
-// if( !pPam->HasMark() )
-// return FALSE;
+ // empty boxes are also selected as the absence of selection
BOOL bChg = FALSE;
if( pPam->GetPoint() == pPam->End())
{
@@ -1879,7 +1873,7 @@ Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& rPoint,
else if ( aRet.Y() < aMin1.Y() )
aRet.Y() = aMin1.Y();
}
- else //if ( bTop )
+ else
{
aRet.Y() = aMin1.Y();
if ( aRet.X() > aMin2.X() )
@@ -2529,16 +2523,6 @@ BOOL SwFEShell::GetAutoSum( String& rFml ) const
if( nW )
{
rFml += ')';
-
-/*
- // TabellenSelektion erzeugen??
- SwTblBoxFormula aTmp( rFml );
- SwSelBoxes aBoxes;
- for( USHORT nSelBoxes = aTmp.GetBoxesOfFormula( rTbl,aBoxes );
- nSelBoxes; )
- {
- }
-*/
}
}
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index 0dbe66d084..8bf691a992 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -353,7 +353,6 @@ void SwFEShell::ShLooseFcs()
Imp()->GetDrawView()->hideMarkHandles();
FrameNotify( this, FLY_DRAG_END );
}
-// ::ResetShell();
}
/*************************************************************************
@@ -496,7 +495,6 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const
//Bei Flys den Index auf den StartNode herunterreichen.
nIdx = pCnt->FindFlyFrm()->
GetFmt()->GetCntnt().GetCntntIdx()->GetIndex();
-//warum?? Bug 61913 ParkCrsr( GetCrsr()->GetPoint()->nNode );
}
break;
case LTYPE_TABLE:
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index e0df392ea9..2b1fbea55c 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -1013,7 +1013,6 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
//JP 24.09.96: Merge mit wiederholenden TabellenHeadline funktioniert nicht
// richtig. Warum nicht Point 0,0 benutzen? Dann ist garantiert,
// das die 1. Headline mit drin ist.
-// Point aPt( rShell.GetCharRect().Pos() );
Point aPt( 0, 0 );
const SwLayoutFrm *pStart = rPam.GetCntntNode()->GetFrm(
&aPt )->GetUpper(),
@@ -1603,31 +1602,6 @@ SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish,
return nRet;
}
-/* MA: 20. Sep. 93 wird nicht mehr gebraucht.
-static const SwLayoutFrm *GetPrevCell( const SwLayoutFrm *pCell )
-{
- const SwLayoutFrm *pLay = pCell->GetPrevLayoutLeaf();
- if ( pLay && pLay->IsLayoutFrm() && !pLay->IsTab() )
- {
- //GetPrevLayoutLeaf() liefert ggf. auch die Umgebung einer Tab zurueck
- //(naehmlich genau dann, wenn die Zelle noch Vorgaenger hat).
- const SwFrm *pFrm = pLay->Lower();
- while ( pFrm->GetNext() )
- pFrm = pFrm->GetNext();
- pLay = pFrm->IsTabFrm() ? (SwLayoutFrm*)pFrm : 0;
- }
- if ( pLay && pLay->IsTabFrm() )
- {
- //GetPrevLayoutLeaf() liefert ggf. auch Tabellen zurueck die letzte
- //Zelle dieser Tabelle ist das das gesuchte Blatt.
- pLay = ((SwTabFrm*)pLay)->FindLastCntnt()->GetUpper();
- while ( !pLay->IsCellFrm() )
- pLay = pLay->GetUpper();
- }
- return pLay;
-}
-*/
-
void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart,
const SwLayoutFrm *&rpEnd,
const int bChkProtected )
diff --git a/sw/source/core/graphic/grfatr.cxx b/sw/source/core/graphic/grfatr.cxx
index 76248dbde6..ce11878871 100644
--- a/sw/source/core/graphic/grfatr.cxx
+++ b/sw/source/core/graphic/grfatr.cxx
@@ -332,10 +332,6 @@ SfxPoolItem* SwDrawModeGrf::Clone( SfxItemPool * ) const
USHORT SwDrawModeGrf::GetValueCount() const
{
- // GRAPHICDRAWMODE_STANDARD = 0,
- // GRAPHICDRAWMODE_GREYS = 1,
- // GRAPHICDRAWMODE_MONO = 2,
- // GRAPHICDRAWMODE_WATERMARK = 3
return GRAPHICDRAWMODE_WATERMARK + 1;
}
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 3e69022602..8fc9450a02 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -287,10 +287,7 @@ BOOL SwGrfNode::ReRead(
// der neue Kink nicht geladen werden konnte.
Graphic aGrf; aGrf.SetDefaultType();
aGrfObj.SetGraphic( aGrf, rGrfName );
- // --> OD 2006-11-03 #i59688#
- // do not load linked graphic, if it isn't a new linked graphic.
-// //TODO refLink->setInputStream(getInputStream());
-// ((SwBaseLink*)&refLink)->SwapIn();
+ // #i59688# - do not load linked graphic, if it isn't a new linked graphic.
if ( bNewGrf )
{
((SwBaseLink*)&refLink)->SwapIn();
@@ -459,10 +456,7 @@ short SwGrfNode::SwapIn( BOOL bWaitForData )
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -640,8 +634,6 @@ void SwGrfNode::ReleaseLink()
{
if( refLink.Is() )
{
- // erst die Grafik reinswappen!
-// if( aGraphic.IsSwapOut() || !refLink->IsSynchron() )
{
bInSwapIn = TRUE;
SwBaseLink* pLink = (SwBaseLink*)(::sfx2::SvBaseLink*) refLink;
@@ -901,10 +893,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
@@ -988,10 +977,7 @@ IMPL_LINK( SwGrfNode, SwapGraphic, GraphicObject*, pGrfObj )
// --> OD 2005-05-04 #i48434# - usage of new method <_GetStreamForEmbedGrf(..)>
try
{
- // --> OD, MAV 2005-08-17 #i53025# - needed correction of new
- // method <_GetStreamForEmbedGrf(..)>
-// bool bGraphic(false);
-// SvStream* pStrm = _GetStreamForEmbedGrf( bGraphic );
+ // #i53025# - needed correction of new method <_GetStreamForEmbedGrf(..)>
String aStrmName, aPicStgName;
_GetStreamStorageNames( aStrmName, aPicStgName );
uno::Reference < embed::XStorage > refPics = _GetDocSubstorageOrRoot( aPicStgName );
diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
index 12e8c57b7a..c0cbe6a0e7 100644
--- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx
@@ -327,10 +327,6 @@ void SwAnchoredObjectPosition::_GetVertAlignmentValues(
break;
// no break here, because text::RelOrientation::CHAR is invalid, if !mbAnchorToChar
default:
- //case text::RelOrientation::PAGE_LEFT: not valid for vertical alignment
- //case text::RelOrientation::PAGE_RIGHT: not valid for vertical alignment
- //case text::RelOrientation::FRAME_LEFT: not valid for vertical alignment
- //case text::RelOrientation::FRAME_RIGHT: not valid for vertical alignment
{
ASSERT( false,
"<SwAnchoredObjectPosition::_GetVertAlignmentValues(..)> - invalid relative alignment" );
@@ -469,17 +465,9 @@ SwTwips SwAnchoredObjectPosition::_ImplAdjustVertRelPos( const SwTwips _nTopOfAn
// OD 2004-07-22 #i31805# - consider value of <_bCheckBottom>
if ( _bCheckBottom &&
_nTopOfAnch + nAdjustedRelPosY + aObjSize.Height() >
- // --> OD 2006-01-13 #129959#
- // Do not mix usage of <top + height> and <bottom>
-// aPgAlignArea.Bottom() )
aPgAlignArea.Top() + aPgAlignArea.Height() )
- // <--
{
- // --> OD 2006-01-13 #129959#
- // Do not mix usage of <top + height> and <bottom>
-// nAdjustedRelPosY = aPgAlignArea.Bottom() -
nAdjustedRelPosY = aPgAlignArea.Top() + aPgAlignArea.Height() -
- // <--
_nTopOfAnch -
aObjSize.Height();
}
@@ -626,8 +614,6 @@ void SwAnchoredObjectPosition::_GetHoriAlignmentValues( const SwFrm& _rHoriOrie
// align at right border of anchor frame
// OD 19.08.2003 #110978# - unify and simplify
nWidth = (_rHoriOrientFrm.*fnRect->fnGetRightMargin)();
- //nOffset = (_rHoriOrientFrm.Frm().*fnRect->fnGetWidth)() -
- // nWidth;
nOffset = (_rHoriOrientFrm.Prt().*fnRect->fnGetRight)();
}
break;
@@ -838,40 +824,6 @@ SwTwips SwAnchoredObjectPosition::_CalcRelPosX(
nRelPosX += (*fnRect->fnXDiff)( nLeftOrient, nLeftAnchor );
}
- // OD 2004-05-21 #i28701# - deactivate follow code
-// // adjust relative horizontal position, if object is manual horizontal
-// // positioned (not 'page' aligned) and orients not at the anchor frame,
-// // but it overlaps anchor frame.
-// if ( _rHoriOrient.GetHoriOrient() == text::HoriOrientation::NONE && !bAlignedRelToPage &&
-// &rAnchorFrm != &_rHoriOrientFrm )
-// {
-// // E.g.: consider a columned page/section with an horizontal
-// // negative positioned object.
-// // OD 2004-03-23 #i26791#
-// const SwRect& rObjRect = GetAnchoredObj().GetObjRect();
-// if( bVert )
-// {
-// if( _rHoriOrientFrm.Frm().Top() > rAnchorFrm.Frm().Bottom() &&
-// rObjRect.Right() > rAnchorFrm.Frm().Left() )
-// {
-// const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Top();
-// if ( nProposedPosX < rAnchorFrm.Frm().Bottom() )
-// nRelPosX = rAnchorFrm.Frm().Height() + 1;
-// }
-// }
-// else
-// {
-// if( _rHoriOrientFrm.Frm().Left() > rAnchorFrm.Frm().Right() &&
-// rObjRect.Top() < rAnchorFrm.Frm().Bottom() )
-// {
-// // OD 04.08.2003 #110978# - correction: use <nRelPosX>
-// // instead of <aRelPos.X()>
-// const SwTwips nProposedPosX = nRelPosX + rAnchorFrm.Frm().Left();
-// if ( nProposedPosX < rAnchorFrm.Frm().Right() )
-// nRelPosX = rAnchorFrm.Frm().Width() + 1;
-// }
-// }
-// }
// adjust calculated relative horizontal position, in order to
// keep object inside 'page' alignment layout frame
const SwFrm& rEnvironmentLayFrm =
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 2458dbc0ba..ecb7289241 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -223,8 +223,6 @@ void SwEmbedObjectLink::DataChanged( const String& ,
}
pOleNode->GetNewReplacement();
- // Initiate repainting
- // pObj->SetChanged();
}
// -----------------------------------------------------------------------------
@@ -513,9 +511,6 @@ BOOL SwOLENode::IsOLEObjectDeleted() const
if( p ) // muss da sein
{
return !p->GetEmbeddedObjectContainer().HasEmbeddedObject( aOLEObj.aName );
- //SvInfoObjectRef aRef( p->Find( aOLEObj.aName ) );
- //if( aRef.Is() )
- // bRet = aRef->IsDeleted();
}
}
return bRet;
@@ -837,9 +832,6 @@ svt::EmbeddedObjectRef& SwOLEObj::GetObject()
BOOL SwOLEObj::UnloadObject()
{
BOOL bRet = TRUE;
- //Nicht notwendig im Doc DTor (MM)
- //ASSERT( pOLERef && pOLERef->Is() && 1 < (*pOLERef)->GetRefCount(),
- // "Falscher RefCount fuers Unload" );
if ( pOLENd )
{
const SwDoc* pDoc = pOLENd->GetDoc();
@@ -953,8 +945,6 @@ void SwOLELRUCache::Load()
{
sal_Int32 nVal = 0;
*pValues >>= nVal;
- //if( 20 > nVal )
- // nVal = 20;
{
if( nVal < nLRU_InitSize )
diff --git a/sw/source/core/para/paratr.cxx b/sw/source/core/para/paratr.cxx
index 1c73b9a225..206c29e4ed 100644
--- a/sw/source/core/para/paratr.cxx
+++ b/sw/source/core/para/paratr.cxx
@@ -230,8 +230,6 @@ bool SwFmtDrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
nDistance = MM100_TO_TWIP(pDrop->Distance);
}
else {
- //exception( wrong_type)
- ;
}
}
break;
diff --git a/sw/source/core/sw3io/sw3convert.cxx b/sw/source/core/sw3io/sw3convert.cxx
index 4a2bdde451..06ad257c17 100644
--- a/sw/source/core/sw3io/sw3convert.cxx
+++ b/sw/source/core/sw3io/sw3convert.cxx
@@ -378,8 +378,6 @@ SW_DLLPUBLIC void sw3io_ConvertToOldField( const SwField* pFld, USHORT& rWhich,
break;
default:
- // case REF_UPDOWN:
- // case REF_PAGE_PGDESC:
rFmt = REF_PAGE;
break;
}