summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorKayo Hamid <revol.code@yahoo.com>2010-11-30 16:44:46 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-30 16:44:46 +0100
commit8036602120283b01dac0253c83b931cc94c3ac02 (patch)
treef7ad4ca583010f0f07137ba3448b59932e1494fc /sw/source
parent7f75773f59f4e755c8e18b8f604d3ac56d94914e (diff)
clean code at writer
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/ribbar/conarc.cxx5
-rw-r--r--sw/source/ui/shells/annotsh.cxx10
-rw-r--r--sw/source/ui/shells/basesh.cxx26
-rw-r--r--sw/source/ui/shells/drwbassh.cxx14
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx4
-rw-r--r--sw/source/ui/shells/drwtxtsh.cxx12
-rw-r--r--sw/source/ui/shells/frmsh.cxx8
-rw-r--r--sw/source/ui/shells/grfsh.cxx24
-rw-r--r--sw/source/ui/shells/tabsh.cxx54
-rw-r--r--sw/source/ui/shells/textfld.cxx6
-rw-r--r--sw/source/ui/shells/textidx.cxx2
-rw-r--r--sw/source/ui/shells/textsh.cxx7
-rw-r--r--sw/source/ui/shells/textsh1.cxx25
-rw-r--r--sw/source/ui/shells/txtattr.cxx10
-rw-r--r--sw/source/ui/shells/txtnum.cxx4
-rw-r--r--sw/source/ui/smartmenu/stmenu.cxx2
-rw-r--r--sw/source/ui/table/chartins.cxx3
-rw-r--r--sw/source/ui/table/tabledlg.cxx32
-rw-r--r--sw/source/ui/table/tautofmt.cxx21
-rw-r--r--sw/source/ui/uiview/pview.cxx36
-rw-r--r--sw/source/ui/uiview/scroll.cxx1
-rw-r--r--sw/source/ui/uiview/srcview.cxx3
-rw-r--r--sw/source/ui/uiview/view0.cxx1
-rw-r--r--sw/source/ui/uiview/view2.cxx73
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx5
-rw-r--r--sw/source/ui/uiview/viewling.cxx12
-rw-r--r--sw/source/ui/uiview/viewmdi.cxx11
-rw-r--r--sw/source/ui/uiview/viewport.cxx4
-rw-r--r--sw/source/ui/uiview/viewprt.cxx3
-rw-r--r--sw/source/ui/uiview/viewsrch.cxx32
-rw-r--r--sw/source/ui/uiview/viewstat.cxx2
-rw-r--r--sw/source/ui/uiview/viewtab.cxx4
-rw-r--r--sw/source/ui/uno/SwXDocumentSettings.cxx1
-rw-r--r--sw/source/ui/uno/dlelstnr.cxx1
-rw-r--r--sw/source/ui/uno/swdet2.cxx29
-rw-r--r--sw/source/ui/uno/swdetect.cxx3
-rw-r--r--sw/source/ui/uno/unoatxt.cxx4
-rw-r--r--sw/source/ui/uno/unodispatch.cxx2
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx3
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx19
-rw-r--r--sw/source/ui/uno/unotxvw.cxx3
-rw-r--r--sw/source/ui/utlui/navicfg.cxx1
-rw-r--r--sw/source/ui/utlui/numfmtlb.cxx7
-rw-r--r--sw/source/ui/utlui/unotools.cxx1
-rw-r--r--sw/source/ui/utlui/viewlayoutctrl.cxx14
-rw-r--r--sw/source/ui/vba/vbaautotextentry.cxx3
-rw-r--r--sw/source/ui/vba/vbabookmarks.cxx3
-rw-r--r--sw/source/ui/vba/vbaborders.cxx5
-rw-r--r--sw/source/ui/vba/vbacolumn.cxx35
-rw-r--r--sw/source/ui/vba/vbadocument.cxx1
-rw-r--r--sw/source/ui/vba/vbadocumentproperties.cxx1
-rw-r--r--sw/source/ui/vba/vbafield.cxx2
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx1
-rw-r--r--sw/source/ui/vba/vbapagesetup.cxx1
-rw-r--r--sw/source/ui/vba/vbaparagraph.cxx2
-rw-r--r--sw/source/ui/vba/vbaselection.cxx5
-rw-r--r--sw/source/ui/vba/vbastyles.cxx1
-rw-r--r--sw/source/ui/vba/vbatablehelper.cxx9
-rw-r--r--sw/source/ui/vba/vbatables.cxx6
-rw-r--r--sw/source/ui/vba/vbatablesofcontents.cxx2
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx1
-rw-r--r--sw/source/ui/vba/vbaview.cxx3
-rw-r--r--sw/source/ui/web/wview.cxx2
-rw-r--r--sw/source/ui/wrtsh/delete.cxx4
-rw-r--r--sw/source/ui/wrtsh/move.cxx1
-rw-r--r--sw/source/ui/wrtsh/select.cxx1
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx62
-rw-r--r--sw/source/ui/wrtsh/wrtsh2.cxx5
-rw-r--r--sw/source/ui/wrtsh/wrtsh3.cxx2
-rw-r--r--sw/source/ui/wrtsh/wrtsh4.cxx27
70 files changed, 22 insertions, 707 deletions
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx
index 65f066475e..af0a511484 100644
--- a/sw/source/ui/ribbar/conarc.cxx
+++ b/sw/source/ui/ribbar/conarc.cxx
@@ -107,11 +107,6 @@ BOOL ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
m_pSh->EndCreate(SDRCREATE_NEXTPOINT);
}
}
-/* else if ( pView->IsCreateObj() && rMEvt.IsRight() )
- {
- pView->EndCreateObj( SDRCREATE_FORCEEND );
- bReturn = TRUE;
- }*/
return (bReturn);
}
diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx
index bcd0dcd5fa..1c5e64e010 100644
--- a/sw/source/ui/shells/annotsh.cxx
+++ b/sw/source/ui/shells/annotsh.cxx
@@ -902,7 +902,6 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet)
SvxClipboardFmtItem aFormats( SID_CLIPBOARD_FORMAT_ITEMS );
if ( aDataHelper.HasFormat( SOT_FORMAT_RTF ) )
aFormats.AddClipbrdFormat( SOT_FORMAT_RTF );
- //if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) )
aFormats.AddClipbrdFormat( SOT_FORMAT_STRING );
rSet.Put( aFormats );
}
@@ -1024,15 +1023,6 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
}
case FN_HIDE_NOTE:
- /*
- if ( Mgr()->GetActiveSidebarWin() == this )
- {
- Mgr()->SetActivePostIt(0);
- // put the cursor back into the document
- SwitchToFieldPos();
- }
- Mgr()->Hide(mpFld);
- */
break;
case FN_HIDE_ALL_NOTES:
pPostItMgr->Hide();
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 71a212c18b..a40c951282 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -229,10 +229,6 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq)
BOOL bLeft = rSh.Left( CRSR_SKIP_CHARS, TRUE, 1, FALSE );
if( bLeft )
{
- // JP 28.03.96: ein Backspace im Absatz ohne Nummer wird zum Delete
- //rSh.SwapPam();
- //rSh.DelRight( FALSE );
-
rSh.DelLeft();
}
else
@@ -749,22 +745,6 @@ void SwBaseShell::Execute(SfxRequest &rReq)
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
GetView().GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
-/*
- String sURL( pGal->GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
- String sLabel( pGal->GetURL().getBase() );
- String sTarget; // empty string!
-
- bool bIsHTMLMode =
- 0 == ( HTMLMODE_ON &
- ::GetHtmlMode( GetView().GetDocShell() ) );
-
- // in Writer, we insert a button which plays the
- // sound. In Writer/Web, we just insert a (text) link.
- if( bIsHTMLMode )
- InsertURLButton( sURL, sTarget, sLabel );
- else
- rSh.InsertURL( SwFmtINetFmt( sURL, sTarget ), sLabel );
-*/
}
}
}
@@ -2192,7 +2172,6 @@ void SwBaseShell::GetBckColState(SfxItemSet &rSet)
USHORT nWhich = aIter.FirstWhich();
int nSelType = rSh.GetSelectionType();
-// if ( nSelType & nsSelectionType::SEL_GRF ||
if( nSelType & nsSelectionType::SEL_OLE )
{
rSet.DisableItem( SID_BACKGROUND_COLOR );
@@ -2272,8 +2251,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
aBrushItem = (const SvxBrushItem&)aCoreSet.Get(RES_BACKGROUND);
}
-// BOOL bMsgOk = FALSE;
-
switch (nSlot)
{
// RES_BACKGROUND (=SID_ATTR_BRUSH) muss ueber zwei IDs
@@ -2282,7 +2259,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
{
aBrushItem.SetGraphicPos(GPOS_NONE);
- //Brush &rBrush = aBrushItem.GetBrush();
if(pArgs)
{
const SvxColorItem& rNewColorItem = (const SvxColorItem&)
@@ -2308,7 +2284,6 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
}
break;
default:
-// bMsgOk = FALSE;
rReq.Ignore();
OSL_ENSURE(false, "unknown message in ExecuteAttr!" );
return;
@@ -2509,7 +2484,6 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
aSet.Put( aBrush );
if ( pDlg->Execute() == RET_OK )
{
- //aBrush = (SvxBrushItem) pDlg->GetOutputItemSet()->Get( RES_BACKGROUND );
rSh.SetBoxBackground( (SvxBrushItem&)
pDlg->GetOutputItemSet()->Get( RES_BACKGROUND ));
diff --git a/sw/source/ui/shells/drwbassh.cxx b/sw/source/ui/shells/drwbassh.cxx
index e7d461b82c..be375cf90e 100644
--- a/sw/source/ui/shells/drwbassh.cxx
+++ b/sw/source/ui/shells/drwbassh.cxx
@@ -407,7 +407,6 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{
pSh->LeaveSelFrmMode();
// #105852# FME
-// pSh->NoEdit();
}
bNotify = TRUE;
}
@@ -638,19 +637,6 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNam
{
nRet = 1;
SdrModel* pModel = rSh.getIDocumentDrawModelAccess()->GetDrawModel();
- // --> OD 2006-03-09 #i51726# - all drawing objects can be named now.
- // consider also drawing objects inside group objects
-// SdrPage* pPage = pModel->GetPage(0);
-// sal_uInt32 nCount = pPage->GetObjCount();
-// for( sal_uInt32 i=0; i< nCount; i++ )
-// {
-// SdrObject* pTemp = pPage->GetObj(i);
-// if(pObj != pTemp && pTemp->ISA(SdrObjGroup) && pTemp->GetName() == sNewName)
-// {
-// nRet = 0;
-// break;
-// }
-// }
SdrObjListIter aIter( *(pModel->GetPage(0)), IM_DEEPWITHGROUPS );
while( aIter.IsMore() )
{
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index a3598f9780..47316132d1 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -411,10 +411,6 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
aDlgAttr.Put(aEditAttr);
- // Die Werte sind erst einmal uebernommen worden, um den Dialog anzuzeigen.
- // Muss natuerlich noch geaendert werden
- // aDlgAttr.Put( SvxParaDlgLimitsItem( 567 * 50, 5670) );
-
aDlgAttr.Put( SvxHyphenZoneItem( sal_False, RES_PARATR_HYPHENZONE) );
aDlgAttr.Put( SvxFmtBreakItem( SVX_BREAK_NONE, RES_BREAK ) );
aDlgAttr.Put( SvxFmtSplitItem( sal_True, RES_PARATR_SPLIT ) );
diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx
index 3ef80c8b60..2ff0170445 100644
--- a/sw/source/ui/shells/drwtxtsh.cxx
+++ b/sw/source/ui/shells/drwtxtsh.cxx
@@ -151,18 +151,6 @@ __EXPORT SwDrawTextShell::~SwDrawTextShell()
{
if ( GetView().GetCurShell() == this )
rView.ResetSubShell();
-
- //MA 13. Nov. 96: Das kommt durchaus vor #33141#:
- //(doppel-)Klick von einem Texteditmode in ein anderes Objekt, zwischendurch
- //wird eine andere (Draw-)Shell gepusht, die alte aber noch nicht deletet.
- //Dann wird vor dem Flush wieder ein DrawTextShell gepusht und der Mode ist
- //eingeschaltet. In diesem Moment wird der Dispatcher geflusht und die alte
- //DrawTextShell zerstoert.
-// OSL_ENSURE( !pSdrView->IsTextEdit(), "TextEdit in DTor DrwTxtSh?" );
-// if (pSdrView->IsTextEdit())
-// GetShell().EndTextEdit(); // Danebengeklickt, Ende mit Edit
-
-// GetShell().Edit();
}
SwWrtShell& SwDrawTextShell::GetShell()
diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx
index 0c5bea7a0f..302d35658e 100644
--- a/sw/source/ui/shells/frmsh.cxx
+++ b/sw/source/ui/shells/frmsh.cxx
@@ -418,10 +418,8 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if( nSel & nsSelectionType::SEL_OLE )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
+ // #i73249#
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
const SwRect &rPg = rSh.GetAnyCurRect(RECT_PAGE);
@@ -479,10 +477,8 @@ void SwFrameShell::Execute(SfxRequest &rReq)
}
if (SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_ALT_NAME, TRUE, &pItem))
{
- // --> OD 2009-07-13 #i73249#
-// rSh.SetAlternateText(((const SfxStringItem*)pItem)->GetValue());
+ // #i73249#
rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue());
- // <--
}
// Vorlagen-AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx
index bb6481c5b0..8ebea83287 100644
--- a/sw/source/ui/shells/grfsh.cxx
+++ b/sw/source/ui/shells/grfsh.cxx
@@ -152,10 +152,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
aSet.Put(SfxStringItem(FN_SET_FRM_NAME, rSh.GetFlyName()));
if ( nSlot == FN_FORMAT_GRAFIC_DLG )
{
- // --> OD 2009-07-13 #i73249#
-// aSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, rSh.GetAlternateText()));
+ // #i73249#
aSet.Put( SfxStringItem( FN_SET_FRM_ALT_NAME, rSh.GetObjTitle() ) );
- // <--
}
pRect = &rSh.GetAnyCurRect(RECT_PAGE_PRT);
@@ -328,11 +326,8 @@ void SwGrfShell::Execute(SfxRequest &rReq)
if ( SFX_ITEM_SET == pSet->GetItemState(
FN_SET_FRM_ALT_NAME, TRUE, &pItem ))
{
- // --> OD 2009-07-13 #i73249#
-// rSh.SetAlternateText(
-// ((const SfxStringItem*)pItem)->GetValue() );
+ // #i73249#
rSh.SetObjTitle( ((const SfxStringItem*)pItem)->GetValue() );
- // <--
}
SfxItemSet aGrfSet( rSh.GetAttrPool(), RES_GRFATR_BEGIN,
@@ -518,10 +513,6 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
rSh.GetCurAttr( aCoreSet );
BOOL bParentCntProt = 0 != rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT );
BOOL bIsGrfCntnt = CNT_GRF == GetShell().GetCntType();
- // --> OD 2006-11-03 #i59688#
-// BOOL bSwappedOut = rSh.IsGrfSwapOut( TRUE );
-// BOOL bBitmapType = !bSwappedOut && GRAPHIC_BITMAP == rSh.GetGraphicType();
- // <--
SetGetStateSet( &rSet );
@@ -651,16 +642,7 @@ void SwGrfShell::GetAttrState(SfxItemSet &rSet)
{
if( bParentCntProt || !bIsGrfCntnt )
bDisable = TRUE;
- // --> OD 2006-11-03 #i59688#
- // load graphic only if type is unknown
-// else if( bSwappedOut )
-// {
-// rSet.DisableItem( nWhich );
-// if( AddGrfUpdateSlot( nWhich ))
-// rSh.GetGraphic(FALSE); // start the loading
-// }
-// else
-// bDisable = !bBitmapType;
+ // #i59688# load graphic only if type is unknown
else
{
const USHORT eGraphicType( rSh.GetGraphicType() );
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index 41672f1e90..16fcb3aa54 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -178,8 +178,6 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
USHORT nBackgroundDestination = rSh.GetViewOptions()->GetTblDest();
rSet.Put(SwBackgroundDestinationItem(SID_BACKGRND_DESTINATION, nBackgroundDestination ));
SvxBrushItem aBrush( RES_BACKGROUND );
-// rSh.GetBoxBackground(aBrush);
-// rSet.Put( aBrush );
if(rSh.GetRowBackground(aBrush))
rSet.Put( aBrush, SID_ATTR_BRUSH_ROW );
else
@@ -494,23 +492,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
{
case SID_ATTR_BORDER:
{
-/* BOOL bPopCrsr = FALSE;
- if ( !rReq.IsAPI() )
- {
- //Keine Tabellenselektion -> Aenderung wird auf die gesamte
- //Tabelle.
- if ( !rSh.IsTableMode() )
- {
- rSh.StartAction();
- bPopCrsr = TRUE;
- rSh.Push();
- rSh.EnterStdMode();
- rSh.MoveTable( fnTableCurr, fnTableStart );
- rSh.SttSelect();
- rSh.MoveTable( fnTableCurr, fnTableEnd );
- rSh.EndSelect();
- }
- }*/
if(!pArgs)
break;
//Items erzeugen, weil wir sowieso nacharbeiten muessen
@@ -586,9 +567,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
if ((pBorderLine = aInfo.GetVert()) != NULL)
aInfo.SetLine(&aBorderLine, BOXINFO_LINE_VERT), bLine |= TRUE;
-// if ( bPopCrsr && !bLine )
-// aBox.SetDistance( 0 );
-
aCoreSet.Put( aBox );
aCoreSet.Put( aInfo );
rSh.SetTabBorders( aCoreSet );
@@ -600,12 +578,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
rReq.AppendItem( aInfo );
bCallDone = TRUE;
-/* if ( bPopCrsr )
- {
- rSh.KillPams();
- rSh.Pop(FALSE);
- rSh.EndAction();
- }*/
}
break;
case FN_INSERT_TABLE:
@@ -1268,7 +1240,6 @@ void SwTableShell::GetState(SfxItemSet &rSet)
case FN_INSERT_TABLE:
// Irgendeinen Wert "putten", damit Controller enabled bleibt.
// Statt "Insert:Table" erscheint dann "Format:Table".
-// rSet.Put(SfxUInt16Item(nSlot, 1));
break;
case FN_TABLE_OPTIMAL_HEIGHT:
@@ -1428,24 +1399,6 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
case SID_FRAME_LINESTYLE:
case SID_FRAME_LINECOLOR:
{
-/* Tabellenselektion ist abgeschafft
- BOOL bPopCrsr = FALSE;
- if ( !rReq.IsAPI() )
- {
- //Keine Tabellenselektion -> Aenderung wird auf die gesamte
- //Tabelle.
- if ( !rSh.IsTableMode() )
- {
- bPopCrsr = TRUE;
- rSh.Push();
- rSh.StartAction();
- rSh.EnterStdMode();
- rSh.MoveTable( fnTableCurr, fnTableStart );
- rSh.SttSelect();
- rSh.MoveTable( fnTableCurr, fnTableEnd );
- rSh.EndSelect();
- }
- }*/
if ( rReq.GetSlot() == SID_FRAME_LINESTYLE )
{
const SvxLineItem &rLineItem = (const SvxLineItem&)pArgs->
@@ -1461,12 +1414,7 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
}
rReq.Done();
-/* if ( bPopCrsr )
- {
- rSh.KillPams();
- rSh.Pop(FALSE);
- rSh.EndAction();
- }*/
+
break;
}
}
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 8de4dc91ed..924db97114 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -640,12 +640,6 @@ void SwTextShell::StateField( SfxItemSet &rSet )
break;
case FN_EDIT_FIELD:
{
- /* #108536# Fields can be selected, too now. Removed
-
- if( rSh.HasSelection() )
- rSet.DisableItem(nWhich);
- else ...
- */
if( !bGetField )
{
diff --git a/sw/source/ui/shells/textidx.cxx b/sw/source/ui/shells/textidx.cxx
index 941f2db760..7f307e9f82 100644
--- a/sw/source/ui/shells/textidx.cxx
+++ b/sw/source/ui/shells/textidx.cxx
@@ -213,7 +213,7 @@ void SwTextShell::GetIdxState(SfxItemSet &rSet)
rSet.Put(SfxBoolItem(FN_INSERT_AUTH_ENTRY_DLG, TRUE));
}
- else //if( SFX_ITEM_UNKNOWN != rSet.GetItemState( FN_EDIT_IDX_ENTRY_DLG ))
+ else
{
BOOL bEnableEdit = TRUE;
diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx
index 9c9719d4be..7ae62b5562 100644
--- a/sw/source/ui/shells/textsh.cxx
+++ b/sw/source/ui/shells/textsh.cxx
@@ -411,13 +411,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode")),
uno::makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) );
- //if ( aFrmDescr.IsFrameBorderSet() )
if ( pBorderItem )
xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder")),
uno::makeAny( (sal_Bool) pBorderItem->GetValue() ) );
- /*else
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder")),
- makeAny( sal_True ) );*/
if ( pMarginItem )
{
@@ -461,9 +457,6 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
SwFrmFmt* pTblFmt = GetShell().GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
- // String aText( String::CreateFromAscii("<.>") ); // was used for UI
- // aText.Insert( rWrtShell.GetBoxNms(), 2);
- // aText.Insert( aCurrentTblName, 1 );
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += GetShell().GetBoxNms();
diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx
index d8eb6abccd..5cd60bd342 100644
--- a/sw/source/ui/shells/textsh1.cxx
+++ b/sw/source/ui/shells/textsh1.cxx
@@ -425,7 +425,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
String aStr;
SFX_REQUEST_ARG( rReq, pFont, SfxStringItem, FN_PARAM_1 , sal_False );
-// SFX_REQUEST_ARG( rReq, pCharset, SfxInt16Item, FN_PARAM_2 , sal_False );
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nSlot , sal_False );
if ( pNameItem )
aStr = pNameItem->GetValue();
@@ -440,7 +439,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT );
SvxFontItem aFont( rFont.GetFamily(), pFont->GetValue(),
rFont.GetStyleName(), rFont.GetPitch(), RTL_TEXTENCODING_DONTKNOW, RES_CHRATR_FONT );
- //pCharset ? (CharSet) pCharset->GetValue() : RTL_TEXTENCODING_DONTKNOW );
rWrtSh.SetAttr( aSet, nsSetAttrMode::SETATTR_DONTEXPAND );
rWrtSh.ResetSelect(0, FALSE);
rWrtSh.EndSelect();
@@ -466,7 +464,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
aReq.AppendItem( SfxStringItem( nId, pDlg->GetStr() ) );
if ( pDlg->GetFontName().Len() )
aReq.AppendItem( SfxStringItem( FN_PARAM_1, pDlg->GetFontName() ) );
- //aReq.AppendItem( SfxStringItem( FN_PARAM_2, pDlg->GetCharSet() ) );
ExecuteSlot( aReq );
}
@@ -933,12 +930,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart() );
aCoreSet.Put(aStart);
- // --> OD 2008-02-29 #refactorlists#
-// SfxUInt16Item aStartAt(FN_NUMBER_NEWSTART_AT,
-// rWrtSh.IsNodeNumStart());
SfxUInt16Item aStartAt( FN_NUMBER_NEWSTART_AT,
rWrtSh.GetNodeNumStart() );
- // <--
aCoreSet.Put(aStartAt);
}
SfxAbstractTabDialog* pDlg = NULL;
@@ -1004,14 +997,12 @@ void SwTextShell::Execute(SfxRequest &rReq)
if( pSet->Count() )
{
rWrtSh.StartAction();
-// rWrtSh.StartUndo( UNDO_START );
if ( SFX_ITEM_SET == pSet->GetItemState(FN_DROP_TEXT, FALSE, &pItem) )
{
if ( ((SfxStringItem*)pItem)->GetValue().Len() )
rWrtSh.ReplaceDropTxt(((SfxStringItem*)pItem)->GetValue());
}
rWrtSh.SetAttr( *pSet );
-// rWrtSh.EndUndo( UNDO_END );
rWrtSh.EndAction();
SwTxtFmtColl* pColl = rWrtSh.GetCurTxtFmtColl();
if(pColl && pColl->IsAutoUpdateFmt())
@@ -1148,15 +1139,6 @@ void SwTextShell::Execute(SfxRequest &rReq)
rReq.Done();
-/* OS 22.02.97 18:40 Das alte Verhalten ist unerwuenscht
- if(!pApply || pApply->nColor != SID_ATTR_CHAR_COLOR_BACKGROUND_EXT)
- {
- Brush aBrush(pItem ? BRUSH_SOLID : BRUSH_NULL);
- if(pItem)
- aBrush.SetColor( aSet );
- GetShell().SetAttr( SvxBrushItem(aBrush, RES_CHRATR_BACKGROUND) );
- }
-*/
}
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
@@ -1673,13 +1655,6 @@ void SwTextShell::GetState( SfxItemSet &rSet )
break;
case FN_NUM_CONTINUE:
{
- // --> OD 2009-08-26 #i86492#
- // Allow continuation of previous list, even if at current cursor
- // a list is active.
-// if ( rSh.GetCurNumRule() )
-// rSet.DisableItem(nWhich);
-// else
- // <--
{
// --> OD 2009-08-26 #i86492#
// Search also for bullet list
diff --git a/sw/source/ui/shells/txtattr.cxx b/sw/source/ui/shells/txtattr.cxx
index 498ed63901..31a1ea372d 100644
--- a/sw/source/ui/shells/txtattr.cxx
+++ b/sw/source/ui/shells/txtattr.cxx
@@ -420,14 +420,7 @@ SET_LINESPACE:
int eState = pArgs ? pArgs->GetItemState(nSlot) : SFX_ITEM_DISABLED;
if (pArgs && SFX_ITEM_SET == eState)
bSet = ((const SfxBoolItem&)pArgs->Get(nSlot)).GetValue();
-/*
-// toggling of the slots not used anymore
-
- if(!bSet)
- nSlot = SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot ?
- SID_ATTR_PARA_RIGHT_TO_LEFT :
- SID_ATTR_PARA_LEFT_TO_RIGHT;
-*/
+
SfxItemSet aAdjustSet( GetPool(),
RES_PARATR_ADJUST, RES_PARATR_ADJUST );
GetShell().GetCurAttr(aAdjustSet);
@@ -437,7 +430,6 @@ SET_LINESPACE:
{
int eAdjust = (int)(( const SvxAdjustItem& )
aAdjustSet.Get(RES_PARATR_ADJUST)).GetAdjust();
-// bChgAdjust = SVX_ADJUST_CENTER != eAdjust && SVX_ADJUST_BLOCK != eAdjust;
bChgAdjust = (SVX_ADJUST_LEFT == eAdjust && SID_ATTR_PARA_RIGHT_TO_LEFT == nSlot) ||
(SVX_ADJUST_RIGHT == eAdjust && SID_ATTR_PARA_LEFT_TO_RIGHT == nSlot);
}
diff --git a/sw/source/ui/shells/txtnum.cxx b/sw/source/ui/shells/txtnum.cxx
index d3ac0e32f2..b7f1da7e75 100644
--- a/sw/source/ui/shells/txtnum.cxx
+++ b/sw/source/ui/shells/txtnum.cxx
@@ -95,10 +95,6 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
break;
case FN_NUMBER_BULLETS:
{
- // --> OD 2008-02-29 #refactorlists#
-// // per default TRUE, damit die Schleife im Dialog richtig arbeitet!
-// BOOL bHasChild = TRUE;
- // <--
SfxItemSet aSet(GetPool(),
SID_HTML_MODE, SID_HTML_MODE,
SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL,
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index 7103610a41..aa1ba7d53c 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -54,8 +54,6 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
mpSwView ( pSwView ),
mxTextRange( xTextRange )
{
- //CreateAutoMnemonics();
-
Reference <frame::XController> xController = mpSwView->GetController();
const lang::Locale aLocale( SW_BREAKITER()->GetLocale( (LanguageType)GetAppLanguage() ) );
diff --git a/sw/source/ui/table/chartins.cxx b/sw/source/ui/table/chartins.cxx
index 551f562559..6f0e7d85ff 100644
--- a/sw/source/ui/table/chartins.cxx
+++ b/sw/source/ui/table/chartins.cxx
@@ -173,9 +173,6 @@ void SwInsertChart(Window* pParent, SfxBindings* pBindings )
{
SwFrmFmt* pTblFmt = rWrtShell.GetTableFmt();
String aCurrentTblName = pTblFmt->GetName();
-// String aText( String::CreateFromAscii("<.>") ); // was used for UI
-// aText.Insert( rWrtShell.GetBoxNms(), 2);
-// aText.Insert( aCurrentTblName, 1 );
aRangeString = aCurrentTblName;
aRangeString += OUString::valueOf( sal_Unicode('.') );
aRangeString += rWrtShell.GetBoxNms();
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 8115b8ec89..9c77e5cd8a 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -318,9 +318,7 @@ IMPL_LINK( SwFormatTablePage, RightModifyHdl, MetricField *, EMPTYARG )
if(aFreeBtn.IsChecked())
{
BOOL bEnable = aRightMF.GetValue() == 0;
-// aWidthMF.Enable(bEnable);
aRelWidthCB.Enable(bEnable);
-// aWidthFT.Enable(bEnable);
if ( !bEnable )
{
aRelWidthCB.Check(FALSE);
@@ -785,8 +783,6 @@ int SwFormatTablePage::DeactivatePage( SfxItemSet* _pSet )
pTblData->SetAlign(nAlign);
}
-
- // if( text::HoriOrientation::CENTER && lWidth != (SwTwips)aWidthMF.GetSavedValue())
if(pTblData->GetWidth() != lWidth )
{
pTblData->SetWidthChanged();
@@ -1165,29 +1161,6 @@ void SwTableColumnPage::UpdateCols( USHORT nAktPos )
}
nTableWidth += nAdd;
-
- }
- else
- {
-// Die Differenz wird gleichmaessig auf alle anderen Spalten aufgeteilt
-// die Tabellenbreite bleibt konstant
-/*
- SwTwips nDiffn = nDiff/(nNoOfVisibleCols - 1);
- if(nDiff < 0 && (nNoOfVisibleCols - 1) * nDiffn != nDiff)
- nDiffn-- ;
- USHORT nStart = nAktPos++;
- if(nAktPos == nNoOfVisibleCols)
- nStart = 0;
- for(USHORT i = 0; i < nNoOfVisibleCols; i++ )
- {
- if((nVisWidth = GetVisibleWidth(i)) + nDiff < MINLAY)
- {
- nAdd += nVisWidth - MINLAY;
- SetVisibleWidth(i, MINLAY);
- }
- }
-*/
-
}
#ifdef DEBUG_TBLDLG
@@ -1246,10 +1219,6 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& )
aModifyTableCB.Enable( !bPercentMode && bModifyTbl );
aProportionalCB.Enable(!bPercentMode && bModifyTbl );
-/* if(pTblData->IsLineSelected() && pTblData->IsComplex())
- {
-
- }*/
aSpaceED.SetValue(aSpaceED.Normalize(
pTblData->GetSpace() - nTableWidth) , FUNIT_TWIP);
@@ -1339,7 +1308,6 @@ SwTwips SwTableColumnPage::GetVisibleWidth(USHORT nPos)
while(!pTblData->GetColumns()[i].bVisible && (i + 1) < nNoOfCols)
nReturn += pTblData->GetColumns()[++i].nWidth;
-// return (*ppTableColumns)[i].nWidth;
return nReturn;
}
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index b55aa85225..8363380b36 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -328,8 +328,6 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
pData->SetBackground( bCheck );
else if ( pBtn == &aBtnAlignment )
pData->SetJustify( bCheck );
-// else if ( pBtn == &aBtnAdjust )
-// pData->SetIncludeWidthHeight( bCheck );
else
bDataChgd = FALSE;
@@ -755,9 +753,6 @@ MAKENUMSTR:
Rectangle cellRect = maArray.GetCellRect( nCol, nRow );
Point aPos = cellRect.TopLeft();
USHORT nRightX = 0;
-// BOOL bJustify = aCurData.IsJustify();
-// ScHorJustifyAttr aHorJustifyItem;
-// CellHorJustify eJustification;
Size theMaxStrSize( cellRect.GetWidth() - FRAME_OFFSET,
cellRect.GetHeight() - FRAME_OFFSET );
@@ -786,9 +781,6 @@ MAKENUMSTR:
while( theMaxStrSize.Width() <= aStrSize.Width() &&
cellString.Len() > 1 )
{
-// if( eJustification == SVX_HOR_JUSTIFY_RIGHT )
-// cellString.Erase( 0, 1 );
-// else
cellString.Erase( cellString.Len() - 1 );
aScriptedText.SetText( cellString, m_xBreak );
aStrSize = aScriptedText.GetTextSize();
@@ -797,18 +789,6 @@ MAKENUMSTR:
nRightX = (USHORT)( cellRect.GetWidth()
- aStrSize.Width()
- FRAME_OFFSET );
- //-------------
- // Ausrichtung:
- //-------------
- /* if ( bJustify )
- {
- aCurData.GetHorJustify( nFmtIndex, aHorJustifyItem );
- eJustification = (CellHorJustify)aHorJustifyItem.GetValue();
- }
- else
- {
- eJustification = SC_HOR_JUSTIFY_STANDARD;
- }*/
//-----------------------------
// vertikal (immer zentrieren):
@@ -818,7 +798,6 @@ MAKENUMSTR:
//-----------
// horizontal
//-----------
-/* if ( eJustification != SC_HOR_JUSTIFY_STANDARD )*/
if( mbRTL )
aPos.X() += nRightX;
else if (aCurData.IsJustify())
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index 45da8eadad..a98ef6c807 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -1311,17 +1311,7 @@ SwPagePreView::~SwPagePreView()
delete pPageUpBtn;
delete pPageDownBtn;
-/* SfxObjectShell* pDocSh = GetDocShell();
- for( SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocSh );
- pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocSh ) )
- if( pFrame != GetViewFrame() )
- {
- // es gibt noch eine weitere Sicht auf unser Dokument, also
- // aktiviere dieses
- pFrame->GetFrame().Appear();
- break;
- }
-*/}
+}
SwDocShell* SwPagePreView::GetDocShell()
{
@@ -1811,30 +1801,6 @@ Size SwPagePreView::GetOptimalSizePixel() const
{
OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed ??" );
return Size( -1, -1 );
-/*
- //JP 09.06.99: was wird hier errechnet ?????
-// ALT:
-// SfxApplicationWindow* pWin = SFX_APPWINDOW ;
-// Rectangle aRect = pWin->GetClientAreaPixel();
-
- Window& rWin = GetViewFrame()->GetWindow();
- Rectangle aRect( Point(0, 0), rWin.GetOutputSizePixel() );
- Size aMaxSize( aRect.GetWidth(), aRect.GetHeight() );
- Size aInSize = rWin.GetOutputSizePixel();
- Size aOutSize = rWin.GetSizePixel();
- USHORT nXBorder = USHORT(aOutSize.Width() - aInSize.Width());
- USHORT nYBorder = USHORT(aOutSize.Height() - aInSize.Height());
- aMaxSize.Width() -= nXBorder;
- //'auf Verdacht' etwas vom Border abziehen (Menue)
- nYBorder -= (nYBorder - nXBorder) / 2;
- aMaxSize.Height() -= nYBorder;
- //mit der max. moeglichen Outputsize guenstigstes Verhaeltnis ausrechnen
- aViewWin.GetOptimalSize(aMaxSize);
- // Border wieder dazuzaehlen
- aMaxSize.Height() += nYBorder;
- aMaxSize.Width() += nXBorder;
- return aMaxSize;
-*/
}
// OD 12.12.2002 #103492#
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 819938fee4..7909f9733e 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -66,7 +66,6 @@ void SwScrollbar::DocSzChgd( const Size &rSize )
SetRange( Range( 0, bHori ? rSize.Width() : rSize.Height()) );
const ULONG nVisSize = GetVisibleSize();
SetLineSize( SCROLL_LINE_SIZE );
-// SetLineSize( nVisSize * 10 / 100 );
SetPageSize( nVisSize * 77 / 100 );
}
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index bea24340dd..d6f585d3c2 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -254,7 +254,6 @@ SwSrcView::~SwSrcView()
sal_Int32 delay = xDocProps->getAutoloadSecs();
pDocShell->SetAutoLoad(INetURLObject(url), delay,
(delay != 0) || !url.equalsAscii(""));
-// EndListening(*GetViewFrame());
EndListening(*pDocShell);
delete pSearchItem;
}
@@ -281,7 +280,6 @@ void SwSrcView::Init()
aEditWin.SetReadonly(TRUE);
}
-// StartListening(*GetViewFrame());
StartListening(*pDocShell,TRUE);
}
@@ -314,7 +312,6 @@ void SwSrcView::Execute(SfxRequest& rReq)
TemplateDescription::FILESAVE_AUTOEXTENSION,
TemplateDescription::FILESAVE_SIMPLE );
uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
-// pFileDlg->SetHelpId(HID_FILEDLG_SRCVIEW);
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
// search for an html filter for export
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index f06c991222..c49e8bb230 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -127,7 +127,6 @@ SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD_DATA_ONLY);
SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_SYNC_LABELS, CHILDWIN_LABEL );
SFX_FEATURED_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_CHILDWINDOW, CHILDWIN_MAILMERGE);
-// SFX_CHILDWINDOW_REGISTRATION(FN_MAILMERGE_SENDMAIL_CHILDWINDOW);
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS|
SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
SW_RES(RID_TOOLS_TOOLBOX) );
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 172192f631..7936bccfb3 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -973,10 +973,10 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
JumpToSwMark( (( const SfxStringItem*)pItem)->GetValue() );
break;
case SID_GALLERY :
- GetViewFrame()->ChildWindowExecute(rReq);//ToggleChildWindow(SID_GALLERY);
+ GetViewFrame()->ChildWindowExecute(rReq);
break;
case SID_AVMEDIA_PLAYER :
- GetViewFrame()->ChildWindowExecute(rReq);//ToggleChildWindow(SID_AVMEDIA_PLAYER);
+ GetViewFrame()->ChildWindowExecute(rReq);
break;
case SID_VIEW_DATA_SOURCE_BROWSER:
{
@@ -995,7 +995,6 @@ void __EXPORT SwView::Execute(SfxRequest &rReq)
if( pArgs &&
SFX_ITEM_SET == pArgs->GetItemState(nSlot, FALSE, &pItem ))
bShow = ((const SfxBoolItem*)pItem)->GetValue();
- //GetViewFrame()->ShowChildWindow(nSlot, bShow && bInMailMerge);
if((bShow && bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
GetViewFrame()->ToggleChildWindow(nSlot);
//if fields have been succesfully inserted call the "real"
@@ -1189,19 +1188,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
{
switch( nWhich )
{
- case FN_STAT_PAGE:
-/*
-//JP 07.01.00: is a nice feature - show the selektion of DrawObjects
- if( rShell.IsObjSelected()
-//??? || rShell.IsFrmSelected()
- )
- {
- String sDisplay( rShell.GetDrawView()->GetMarkedObjectList().
- GetDescriptionOfMarkedObjects() );
- rSet.Put( SfxStringItem( FN_STAT_PAGE, sDisplay ));
- }
- else
-*/ {
+ case FN_STAT_PAGE: {
// Anzahl der Seiten, log. SeitenNr. SeitenNr ermitteln
USHORT nPage, nLogPage;
String sDisplay;
@@ -1384,45 +1371,6 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
}
}
}
-
- //#outline level, removed by zhaojianwei
- //const SwNumRule* pNumRule = rShell.GetCurNumRule();
- //if (pNumRule) // Cursor in Numerierung
- //{
- // BYTE nNumLevel = rShell.GetNumLevel();
- // if( IsShowNum(nNumLevel) && MAXLEVEL >
- // ( nNumLevel = GetRealLevel( nNumLevel )) )
- // {
- // if( sStr.Len() )
- // sStr.AppendAscii(sStatusDelim);
- // sStr += SW_RESSTR(STR_NUM_LEVEL);
- // sStr += String::CreateFromInt32( nNumLevel + 1 );
- // if(!pNumRule->IsAutoRule())
- // {
- // SfxItemSet aSet(GetPool(),
- // RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
- // rShell.GetCurAttr(aSet);
- // /* const SfxPoolItem* pItem; */
- // if(SFX_ITEM_AVAILABLE <=
- // aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
- // /*, &pItem */ ))
- // {
- // const String& rNumStyle =
- // ((const SfxStringItem &)
- // aSet.Get(RES_PARATR_NUMRULE)).GetValue();
- // /* #i5116# GetItemState does not necessarily
- // change pItem */
- // // ((const SfxStringItem*)pItem)->GetValue();
- // if(rNumStyle.Len())
- // {
- // sStr.AppendAscii(sStatusDelim);
- // sStr += rNumStyle;
- // }
- // }
- // }
- // }
- //}//<-removed end ,zhaojianwei
-
//-->#outline level,added by zhaojianwei
const SwNumRule* pNumRule = rShell.GetCurNumRule();
const bool bOutlineNum = pNumRule ? pNumRule->IsOutlineRule() : 0;
@@ -1431,18 +1379,13 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
BYTE nNumLevel = rShell.GetNumLevel();
- // --> OD 2008-04-02 #refactorlists#
-// if( IsShowNum(nNumLevel) && MAXLEVEL >
-// ( nNumLevel = GetRealLevel( nNumLevel )) )
if ( nNumLevel < MAXLEVEL )
- // <--
{
if(!pNumRule->IsAutoRule())
{
SfxItemSet aSet(GetPool(),
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
rShell.GetCurAttr(aSet);
- /* const SfxPoolItem* pItem; */
if(SFX_ITEM_AVAILABLE <=
aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
/*, &pItem */ ))
@@ -1450,9 +1393,6 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
const String& rNumStyle =
((const SfxStringItem &)
aSet.Get(RES_PARATR_NUMRULE)).GetValue();
- /* #i5116# GetItemState does not necessarily
- change pItem */
- // ((const SfxStringItem*)pItem)->GetValue();
if(rNumStyle.Len())
{
if( sStr.Len() )
@@ -1818,13 +1758,6 @@ void SwView::EditLinkDlg()
pDlg->Execute();
delete pDlg;
}
-/*
- SwLinkDlg* pDlg = new SwLinkDlg(GetFrameWindow());
- pDlg->SetShell(&GetWrtShell());
- pDlg->Execute();
-
- DELETEZ(pDlg);
-*/
}
BOOL SwView::JumpToSwMark( const String& rMark )
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index bb472c7188..014c4d6b37 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -496,7 +496,6 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
// #108784#
// To allow SwDrawVirtObj text objects to be activated, allow their type, too.
- //pObj->ISA( SdrTextObj ) &&
( pObj->ISA( SdrTextObj ) ||
( pObj->ISA(SwDrawVirtObj) &&
((SwDrawVirtObj*)pObj)->GetReferencedObj().ISA(SdrTextObj) ) ) &&
@@ -552,10 +551,6 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
if( bIsNewObj )
pOutliner->SetVertical( SID_DRAW_TEXT_VERTICAL == nDrawSfxId ||
SID_DRAW_CAPTION_VERTICAL == nDrawSfxId );
- // #i7672#
- // No longer necessary, see text below
- // Color aBackground(pSh->GetShapeBackgrd());
- // pOutliner->SetBackgroundColor(aBackground);
// OD 09.12.2002 #103045# - set default horizontal text direction at outliner
EEHorizontalTextDirection aDefHoriTextDir =
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index bbeca70074..1cfe892649 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -865,12 +865,10 @@ public:
protected:
virtual void LoseFocus() {
-// printf("ListBox: lose focus!!\n");
ListBox::LoseFocus();
}
virtual void Select() {
-// printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect());
ListBox::Select();
}
};
@@ -915,21 +913,12 @@ public:
aText.SetPosPixel(Point(0, lbSize.Height()));
aText.Show();
SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height()));
-// SetSizePixel(Size(200, 200));
}
int getSelection() {
return selection;
}
protected:
- /*
- virtual void LoseFocus() {
- printf("lose focus!!\n");
- Dialog::LoseFocus();
- printf("close:\n");
- EndDialog(8);
- }
- */
virtual long PreNotify( NotifyEvent& rNEvt ) {
if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) {
@@ -937,7 +926,6 @@ protected:
return 1;
}
if (rNEvt.GetType() == EVENT_KEYINPUT) {
-// printf("PreNotify::KEYINPUT\n");
}
return Dialog::PreNotify(rNEvt);
}
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 158fc595da..9edb1ce53f 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -150,7 +150,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
nFac = Min( nFac, nVisPercent );
}
}
- else /*if( SVX_ZOOM_PAGEWIDTH_NOBORDER == eZoomType )*/
+ else
{
const long nTmpWidth = bAutomaticViewLayout ? aPageSize.Width() : aRootSize.Width();
nFac = aWindowSize.Width() * 100 / nTmpWidth;
@@ -222,15 +222,6 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
pWrtShell->UnlockPaint();
if( bUnLockView )
pWrtShell->LockView( FALSE );
-
-// if ( mpPostItMgr )
-// {
-// mpPostItMgr->Rescale();
-// mpPostItMgr->CalcRects();
-// mpPostItMgr->LayoutPostIts();
-// }
-
-// eZoom = eZoomType;
}
void SwView::SetViewLayout( USHORT nColumns, bool bBookMode, BOOL bViewOnly )
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 4bdd79d27d..327049b6ad 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -701,10 +701,6 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
String sDisplay;
if(pWrtShell->GetPageNumber( aPos.Y(), FALSE, nPhNum, nVirtNum, sDisplay ))
{
- // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
- // so we dont must do it agin.
-// if(!GetViewFrame()->GetFrame().IsInPlace())
-// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 878cb0ff2c..73ec66a4d6 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -182,12 +182,9 @@ SfxTabPage* __EXPORT SwView::CreatePrintOptionsPage(Window* pParent,
PrintDialog* CreatePrintDialog( Window* pParent, USHORT nPg, SwWrtShell* pSh )
{
PrintDialog *pDlg = new PrintDialog( pParent, false );
-// pDlg->ChangeFirstPage( 1 );
if ( !nPg )
nPg = 1;
-// pDlg->ChangeLastPage( nPg );
-// pDlg->ChangeMaxPage( 9999 );
pDlg->EnableRange( PRINTDIALOG_FROMTO );
if (pSh && (pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected()))
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 09782b0028..b85816dd6a 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -764,38 +764,6 @@ void SwView::StateSearch(SfxItemSet &rSet)
rSet.Put( *pSrchItem );
}
break;
-
-/* case SID_SEARCH_REPLACESET:
- case SID_SEARCH_SEARCHSET:
- {
- static USHORT __READONLY_DATA aSearchAttrRange[] =
- {
- RES_CHRATR_CASEMAP, RES_CHRATR_POSTURE,
- RES_CHRATR_SHADOWED, RES_CHRATR_WORDLINEMODE,
- RES_PARATR_LINESPACING, RES_PARATR_HYPHENZONE,
- RES_LR_SPACE, RES_UL_SPACE,
- SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP,
- 0
- };
-
- SfxItemSet aSet(pWrtShell->GetAttrPool(), aSearchAttrRange );
- if( SID_SEARCH_REPLACESET==nWhich )
- {
- if( pReplList )
- {
- pReplList->Get( aSet );
- DELETEZ( pReplList );
- }
- }
- else if( pSrchList )
- {
- pSrchList->Get( aSet );
- DELETEZ( pSrchList );
- }
- rSet.Put( SvxSetItem( nWhich, aSet ));
- }
- break;
-*/
}
nWhich = aIter.NextWhich();
}
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index e693d8d4cf..b37741dfce 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -331,7 +331,6 @@ void SwView::GetState(SfxItemSet &rSet)
case SID_DOCUMENT_COMPARE:
case SID_DOCUMENT_MERGE:
if( GetDocShell()->IsA( SwGlobalDocShell::StaticType() ) ||
-// pWrtShell->IsAnySectionInDoc( sal_True, sal_True, sal_True )||
(SID_DOCUMENT_MERGE == nWhich && pWrtShell->getIDocumentRedlineAccess()->GetRedlinePassword().getLength()))
rSet.DisableItem(nWhich);
break;
@@ -459,7 +458,6 @@ void SwView::GetDrawState(SfxItemSet &rSet)
case SID_SHOW_HIDDEN:
case SID_SHOW_FORMS:
rSet.DisableItem( nWhich );
- // rSet.Put( SfxBoolItem(nWhich,sal_True ));
break;
case SID_DRAW_TEXT_MARQUEE:
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 2ac3c40a47..8f52d920b0 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -946,8 +946,6 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
switch ( nWhich )
{
-// case RES_LR_SPACE:
-// case SID_ATTR_LRSPACE:
case SID_ATTR_LONG_LRSPACE:
{
SvxLongLRSpaceItem aLongLR( (long)aPageLRSpace.GetLeft(),
@@ -1010,8 +1008,6 @@ void SwView::StateTabWin(SfxItemSet& rSet)
break;
}
case SID_ATTR_LONG_ULSPACE:
-// case SID_ATTR_ULSPACE:
-// case RES_UL_SPACE:
{
// Rand Seite Oben Unten
SvxULSpaceItem aUL( rDesc.GetMaster().GetULSpace() );
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 4b1740ec91..d74a7e6af0 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -821,7 +821,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_IS_KERN_ASIAN_PUNCTUATION:
{
- //sal_Bool bParaSpace = mpDoc->IsKernAsianPunctuation();
sal_Bool bParaSpace = mpDoc->get(IDocumentSettingAccess::KERN_ASIAN_PUNCTUATION);
rValue.setValue(&bParaSpace, ::getBooleanCppuType());
}
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index c2703deb4d..ecffc0c9ae 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -165,7 +165,6 @@ void SAL_CALL SwLinguServiceEventListener::queryTermination(
const EventObject& /*rEventObj*/ )
throw(TerminationVetoException, RuntimeException)
{
- //SolarMutexGuard aGuard;
}
void SAL_CALL SwLinguServiceEventListener::notifyTermination(
diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx
index 1956fe8b75..04315c56e1 100644
--- a/sw/source/ui/uno/swdet2.cxx
+++ b/sw/source/ui/uno/swdet2.cxx
@@ -76,36 +76,7 @@ ULONG SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilt
const SfxFilter* pTmp = SwIoSystem::GetFileFilter( rMedium.GetPhysicalName(), aPrefFlt, &rMedium );
if( !pTmp )
return ERRCODE_ABORT;
- /*
- else if( *ppFilter && (*ppFilter)->GetUserData().EqualsAscii( "W4W", 0, 3 )
- && pTmp->GetUserData().EqualsAscii( FILTER_TEXT, 0, 4 ) )
- {
- // Bug 95262 - if the user (or short detect) select a
- // Word 4 Word filter, but the autodect of mastersoft
- // can't detect it, we normally return the ascii filter
- // But the user may have a change to use the W4W filter,
- // so the SFX must show now a dialog with the 2 filters
- nRet = ERRCODE_SFX_CONSULTUSER;
- *ppFilter = pTmp;
- } */
- // sollte der voreingestellte Filter ASCII sein und wir haben
- // ASCII erkannt, dann ist das ein gultiger Filter, ansonsten ist das
- // ein Fehler und wir wollen die Filterbox sehen
- /*
- else if( pTmp->GetUserData().EqualsAscii( FILTER_TEXT ) )
- {
- // Bug 28974: "Text" erkannt, aber "Text Dos" "Text ..." eingestellt
- // -> keine FilterBox, sondern den eingestellten Filter benutzen
- if( *ppFilter && (*ppFilter)->GetUserData().EqualsAscii( FILTER_TEXT, 0, 4 ) )
- ;
- else
-// if( !*ppFilter || COMPARE_EQUAL != pTmp->GetUserData().Compare((*ppFilter)->GetUserData(), 4 ))
- {
-// nRet = ERRCODE_ABORT;
- *ppFilter = pTmp;
- }
- } */
else
{
//Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index ab62a5d422..e96dd912a0 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -170,9 +170,7 @@ SwFilterDetect::~SwFilterDetect()
nIndexOfDocumentTitle = nProperty;
}
- // can't check the type for external filters, so set the "dont" flag accordingly
SolarMutexGuard aGuard;
- //SfxFilterFlags nMust = SFX_FILTER_IMPORT, nDont = SFX_FILTER_NOTINSTALLED;
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
@@ -190,7 +188,6 @@ SwFilterDetect::~SwFilterDetect()
String aPattern( aPrefix );
aPattern += String::CreateFromAscii("swriter");
if ( aURL.Match( aPattern ) >= aPattern.Len() )
- //pFilter = SfxFilter::GetDefaultFilterFromFactory( aURL );
return aTypeName;
}
}
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index c05d258f63..83dc806ef7 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -395,10 +395,6 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
String sLongName(aTitle);
if(pGlosGroup && !pGlosGroup->GetError())
{
- /*if( pGlosGroup->IsOld() && pGlosGroup->ConvertToNew())
- {
- throw uno::RuntimeException();
- } */
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
SwXTextRange* pxRange = 0;
OTextCursorHelper* pxCursor = 0;
diff --git a/sw/source/ui/uno/unodispatch.cxx b/sw/source/ui/uno/unodispatch.cxx
index 7f4037680e..417efa3e21 100644
--- a/sw/source/ui/uno/unodispatch.cxx
+++ b/sw/source/ui/uno/unodispatch.cxx
@@ -234,7 +234,6 @@ void SwXDispatch::dispatch(
FN_MAILMERGE_WIZARD,
SFX_CALLMODE_ASYNCHRON,
&aDBProperties, 0L);
-// pNewDBMgr->ExecuteFormLetter(rSh, aArgs);
}
else if(!aURL.Complete.compareToAscii(cURLDocumentDataSource))
{
@@ -393,7 +392,6 @@ const sal_Char* SwXDispatch::GetDBChangeURL()
SwXDispatchProviderInterceptor::DispatchMutexLock_Impl::DispatchMutexLock_Impl(
SwXDispatchProviderInterceptor& ) :
-// aGuard(rInterceptor.m_aMutex) #102295# solar mutex has to be used currently
aGuard(Application::GetSolarMutex())
{
}
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 7a11f86a6e..abc697a45e 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -735,7 +735,6 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aCurFileNamePrefix = aURLObj.GetBase(); // filename without extension
if (!aCurOutputURL.getLength())
{
- //aCurOutputURL = aURLObj.GetURLPath();
aURLObj.removeSegment();
aCurOutputURL = aURLObj.GetMainURL( INetURLObject::DECODE_TO_IURI );
}
@@ -768,7 +767,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aMergeDesc.aSaveToFilterData = aSaveFilterData;
aMergeDesc.bCreateSingleFile = bSaveAsSingleFile;
}
- else /*if(MailMergeType::MAIL == nCurOutputType)*/
+ else
{
pMgr->SetEMailColumn( sAddressFromColumn );
if(!sAddressFromColumn.getLength())
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index 4954e49bda..89e41af850 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -1370,11 +1370,6 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage(void) throw( Runti
// for the case that it did something by purpose
((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc());
((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage >(pDrawPage);
-
- //((SwXTextDocument*)this)->pxXDrawPage = new Reference< drawing::XDrawPage > ;
- //((SwXTextDocument*)this)->pDrawPage = new SwXDrawPage(pDocShell->GetDoc());
- //Reference< drawing::XShapes > xTmp = pDrawPage;
- //*pxXDrawPage = Reference< drawing::XDrawPage>(xTmp, UNO_QUERY);
}
return *pxXDrawPage;
}
@@ -2507,7 +2502,6 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
if (!m_pPrintUIOptions)
m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
- // const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
OSL_ENSURE( pDoc && pView, "doc or view shell missing!" );
@@ -2819,9 +2813,6 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
if (pView)
rbIsSwSrcView = pSwSrcView != 0;
return pView;
-// return pSwView ? dynamic_cast< SfxViewShell * >(pSwView) :
-// (pSwSrcView ? dynamic_cast< SfxViewShell * >(pSwSrcView) :
-// dynamic_cast< SfxViewShell * >(pSwPagePreView) );
}
void SAL_CALL SwXTextDocument::render(
@@ -3266,14 +3257,6 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName)
Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
aRet.setValue(&xRet, ::getCppuType((Reference< XPropertySet>*)0));
}
-/* else if(sToCompare == )
- {
- sSuffix += UniString::CreateFromAscii(pMarkToText);
- Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper(
- pxDoc->, sSuffix );
- Reference< XPropertySet > xRet(xTbls, UNO_QUERY);
- aRet.setValue(&xRet, ::getCppuType((const XPropertySet*)0));
- }*/
else if(sToCompare == sGraphics)
{
sSuffix += UniString::CreateFromAscii(pMarkToGraphic);
@@ -3579,8 +3562,6 @@ Any lcl_GetDisplayBitmap(String sLinkSuffix)
nImgId = CONTENT_TYPE_FRAME;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToGraphic))
nImgId = CONTENT_TYPE_GRAPHIC;
-// else if(== sLinkSuffix)
-// nImgId = CONTENT_TYPE_BOOKMARK;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToRegion))
nImgId = CONTENT_TYPE_REGION;
else if(COMPARE_EQUAL == sLinkSuffix.CompareToAscii(pMarkToOLE))
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index a4c276c838..cb76509021 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -167,7 +167,6 @@ void SwXTextView::Invalidate()
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException)
{
-// uno::Sequence< uno::Type > aViewTypes = SwXTextViewBaseClass::getTypes();
uno::Sequence< uno::Type > aBaseTypes = SfxBaseController::getTypes();
long nIndex = aBaseTypes.getLength();
@@ -454,7 +453,6 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
SdrObject *pObj = pSvxShape->GetSdrObject();
if (pObj)
{
-// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
SdrPageView* pPV = pDrawView->GetSdrPageView();
if ( pPV && pObj->GetPage() == pPV->GetPage() )
{
@@ -487,7 +485,6 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface) throw( lang::IllegalArg
{
if (!pPV) // erstes Objekt
{
-// lcl_ShowObject( *m_pViewSh, *pDrawView, pObj );
pPV = pDrawView->GetSdrPageView();
}
if ( pPV && pObj->GetPage() == pPV->GetPage() )
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index cac1ddd195..768e7c9159 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -77,7 +77,6 @@ SwNavigationConfig::SwNavigationConfig() :
{
Sequence<OUString> aNames = GetPropertyNames();
Sequence<Any> aValues = GetProperties(aNames);
-// EnableNotification(aNames);
const Any* pValues = aValues.getConstArray();
OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
if(aValues.getLength() == aNames.getLength())
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index cfdc2d7c4c..31d97a794c 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -335,7 +335,6 @@ void NumFormatListBox::SetDefFormat(const ULONG nDefFmt)
while ((ULONG)GetEntryData(nPos) == ULONG_MAX)
nPos++;
-//
ULONG nSysNumFmt = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, eCurLanguage);
ULONG nSysShortDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eCurLanguage);
ULONG nSysLongDateFmt = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eCurLanguage);
@@ -471,12 +470,6 @@ double NumFormatListBox::GetDefValue(const short nFormatType) const
case NUMBERFORMAT_TIME:
fDefValue = SVX_NUMVAL_TIME;
break;
-/* {
- String sValue("31.8.1997 16:57:34");
- ULONG nFormat = pFormatter->GetStandardFormat(nFormatType, LANGUAGE_GERMAN);
- pFormatter->IsNumberFormat( sValue, nFormat, fDefValue );
- }
- break;*/
case NUMBERFORMAT_TEXT:
case NUMBERFORMAT_UNDEFINED:
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index f9dd3cf8a3..6bc62d49e1 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -308,7 +308,6 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer )
if( aInitializedLink.IsSet() )
{
rWindow.Enable(sal_False, sal_True);
- //rWindow.Enable(sal_True, sal_False);
aInitializedLink.Call(this);
}
diff --git a/sw/source/ui/utlui/viewlayoutctrl.cxx b/sw/source/ui/utlui/viewlayoutctrl.cxx
index e06868b4fc..352caac58c 100644
--- a/sw/source/ui/utlui/viewlayoutctrl.cxx
+++ b/sw/source/ui/utlui/viewlayoutctrl.cxx
@@ -115,9 +115,6 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
Color aOldLineColor = pDev->GetLineColor();
Color aOldFillColor = pDev->GetFillColor();
- //pDev->SetLineColor();
- //pDev->SetFillColor( pDev->GetBackground().GetColor() );
-
const bool bSingleColumn = 0 == mpImpl->mnState;
const bool bAutomatic = 1 == mpImpl->mnState;
const bool bBookMode = 2 == mpImpl->mnState;
@@ -138,17 +135,6 @@ void SwViewLayoutControl::Paint( const UserDrawEvent& rUsrEvt )
// draw bookmode image:
aRect.Left() += nImageWidthAuto;
pDev->DrawImage( aRect.TopLeft(), bBookMode ? mpImpl->maImageBookMode_Active : mpImpl->maImageBookMode );
-
- // draw separators
- //aRect = rUsrEvt.GetRect();
- //aRect.Left() += nImageWidth;
- //aRect.setWidth( 1 );
- //pDev->DrawRect( aRect );
- //aRect.Left() += nImageWidth;
- //pDev->DrawRect( aRect );
-
- //pDev->SetLineColor( aOldLineColor );
- //pDev->SetFillColor( aOldFillColor );
}
BOOL SwViewLayoutControl::MouseButtonDown( const MouseEvent & rEvt )
diff --git a/sw/source/ui/vba/vbaautotextentry.cxx b/sw/source/ui/vba/vbaautotextentry.cxx
index a5777142af..5c302da869 100644
--- a/sw/source/ui/vba/vbaautotextentry.cxx
+++ b/sw/source/ui/vba/vbaautotextentry.cxx
@@ -78,7 +78,6 @@ uno::Reference< word::XRange > SAL_CALL SwVbaAutoTextEntry::Insert( const uno::R
}
}
xEndMarker->setString( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("") ) ); // remove marker
- //xTC->gotoRange( xEndMarker, sal_True );
xTC = xText->createTextCursorByRange( xEndMarker->getEnd() );
pWhere->setXTextCursor( xTC );
}
@@ -118,8 +117,6 @@ SwVbaAutoTextEntries::getElementType() throw (uno::RuntimeException)
uno::Reference< container::XEnumeration >
SwVbaAutoTextEntries::createEnumeration() throw (uno::RuntimeException)
{
- //uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
- //return xEnumerationAccess->createEnumeration();
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx
index ea1022bc92..9c45b8f193 100644
--- a/sw/source/ui/vba/vbabookmarks.cxx
+++ b/sw/source/ui/vba/vbabookmarks.cxx
@@ -118,8 +118,6 @@ SwVbaBookmarks::SwVbaBookmarks( const uno::Reference< XHelperInterface >& xParen
{
mxBookmarksSupplier.set( mxModel, uno::UNO_QUERY_THROW );
uno::Reference< text::XTextDocument > xDocument( mxModel, uno::UNO_QUERY_THROW );
- // use view cursor to insert bookmark, or it will fail if insert bookmark in table
- //mxText = word::getXTextViewCursor( mxModel )->getText();
}
// XEnumerationAccess
uno::Type
@@ -175,7 +173,6 @@ SwVbaBookmarks::Add( const rtl::OUString& rName, const uno::Any& rRange ) throw
}
// remove the exist bookmark
- // rtl::OUString aName = rName.toAsciiLowerCase();
rtl::OUString aName = rName;
if( m_xNameAccess->hasByName( aName ) )
removeBookmarkByName( aName );
diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx
index 0170eb88c2..26d5a6bf18 100644
--- a/sw/source/ui/vba/vbaborders.cxx
+++ b/sw/source/ui/vba/vbaborders.cxx
@@ -350,11 +350,6 @@ SwVbaBorders::getItemByIntIndex( const sal_Int32 nIndex ) throw (uno::RuntimeEx
sal_Bool SAL_CALL SwVbaBorders::getShadow() throw (uno::RuntimeException)
{
- /*
- table::ShadowFormat aShadowFormat;
- m_xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ShadowFormat") ) ) >>= aShadowFormat;
- return ( aShadowFormat.Location != table::ShadowLocation_NONE );
- */
// always return False for table border in MS Word
return sal_False;
}
diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx
index f3cc4238aa..9a945f33a1 100644
--- a/sw/source/ui/vba/vbacolumn.cxx
+++ b/sw/source/ui/vba/vbacolumn.cxx
@@ -111,15 +111,6 @@ void SwVbaColumn::calculateRelativeColumnWidth( const double* pAbsWidth, double*
sal_Int32 SAL_CALL
SwVbaColumn::getWidth( ) throw ( css::uno::RuntimeException )
{
- /* uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
- uno::Sequence< text::TableColumnSeparator > aSeparators;
- xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TableColumnSeparators") ) ) >>= aSeparators;
- sal_Int32 nTableWidth = SwVbaTable::getTableWidth( xTableProps );
- sal_Int32 nColCont = aSeparators.getLength() + 1;
- double dAbsColWidth[ nColCont ];
- calculateAbsoluteColumnWidth( nTableWidth, aSeparators, dAbsColWidth );
- return Millimeter::getInPoints( (sal_Int32)( dAbsColWidth[ mnIndex ] ) );
- */
SwVbaTableHelper aTableHelper( mxTextTable );
return aTableHelper.GetColWidth( mnIndex );
}
@@ -127,32 +118,6 @@ SwVbaColumn::getWidth( ) throw ( css::uno::RuntimeException )
void SAL_CALL
SwVbaColumn::setWidth( sal_Int32 _width ) throw ( css::uno::RuntimeException )
{
-/* uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW );
- uno::Sequence< text::TableColumnSeparator > aSeparators;
- xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TableColumnSeparators") ) ) >>= aSeparators;
- sal_Int32 nTableWidth = SwVbaTable::getTableWidth( xTableProps );
- sal_Int32 nColCont = aSeparators.getLength() + 1;
- double dAbsColWidth[ nColCont ];
- calculateAbsoluteColumnWidth( nTableWidth, aSeparators, dAbsColWidth );
- dAbsColWidth[ mnIndex ] = Millimeter::getInHundredthsOfOneMillimeter( _width );
- double tableWidth = 0.0;
- for( sal_Int32 i = 0; i < nColCont; i++ )
- {
- tableWidth += dAbsColWidth[i];
- }
-
- double dRelColWidth[ nColCont ];
- calculateRelativeColumnWidth( dAbsColWidth, dRelColWidth, nColCont);
-
- text::TableColumnSeparator* pArray = aSeparators.getArray();
- for( sal_Int32 i = 0; i < nColCont - 1; i++ )
- {
- pArray[i].Position = (sal_Int16)(dRelColWidth[i]);
- }
-
- xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TableColumnSeparators") ), uno::makeAny( aSeparators ) );
- SwVbaTable::setTableWidth( xTableProps, (sal_Int32)( tableWidth ) );
- */
SwVbaTableHelper aTableHelper( mxTextTable );
aTableHelper.SetColWidth( _width, mnIndex );
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index d76d3218ad..603bd3c1fd 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -210,7 +210,6 @@ uno::Any SAL_CALL
SwVbaDocument::Shapes( const uno::Any& index ) throw (uno::RuntimeException)
{
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( getModel(), uno::UNO_QUERY_THROW );
- //uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< XCollection > xCol( new ScVbaShapes( this, mxContext, xIndexAccess, xModel ) );
diff --git a/sw/source/ui/vba/vbadocumentproperties.cxx b/sw/source/ui/vba/vbadocumentproperties.cxx
index 805d64b32f..a8d7666e4d 100644
--- a/sw/source/ui/vba/vbadocumentproperties.cxx
+++ b/sw/source/ui/vba/vbadocumentproperties.cxx
@@ -136,7 +136,6 @@ public:
{
// Characters, ParagraphCount & WordCount are available from
// the model ( and addtionally these also update the statics object )
- //return mxProps->getPropertyValue( rPropName );
return mxModelProps->getPropertyValue( rPropName );
}
catch( uno::Exception& )
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index c92dd11cd0..9f7f3da8f9 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -126,13 +126,11 @@ _ReadFieldParams::_ReadFieldParams( const String& _rData )
nFnd = nNext;
nSavPtr = nNext;
aFieldName = aData.Copy( 0, nFnd );
-// cLastChar = aData.GetChar( nSavPtr );
}
_ReadFieldParams::~_ReadFieldParams()
{
-// aData.SetChar( nSavPtr, cLastChar );
}
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index ef35be9883..75e4266a9b 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -119,7 +119,6 @@ void SwVbaListHelper::Init() throw( css::uno::RuntimeException )
// insert this style into style family, or the property NumberingRules doesn't exist.
mxStyleFamily->insertByName( msStyleName, uno::makeAny( mxStyleProps ) );
mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("NumberingRules") ) ) >>= mxNumberingRules;
- //mxNumberingRules.set( xDocMSF->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingRules") ) ), uno::UNO_QUERY_THROW );
CreateListTemplate();
diff --git a/sw/source/ui/vba/vbapagesetup.cxx b/sw/source/ui/vba/vbapagesetup.cxx
index ad8f133492..80dfe57e1e 100644
--- a/sw/source/ui/vba/vbapagesetup.cxx
+++ b/sw/source/ui/vba/vbapagesetup.cxx
@@ -237,7 +237,6 @@ rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException
sal_Int32 wdSectionStart = word::WdSectionStart::wdSectionNewPage;
uno::Reference< container::XNamed > xNamed( mxPageProps, uno::UNO_QUERY_THROW );
rtl::OUString sStyleName = xNamed->getName();
- //mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sStyleName;
if( sStyleName.equalsAscii("Left Page") )
wdSectionStart = word::WdSectionStart::wdSectionEvenPage;
else if( sStyleName.equalsAscii("Right Page") )
diff --git a/sw/source/ui/vba/vbaparagraph.cxx b/sw/source/ui/vba/vbaparagraph.cxx
index 74afa8da62..f512c5844a 100644
--- a/sw/source/ui/vba/vbaparagraph.cxx
+++ b/sw/source/ui/vba/vbaparagraph.cxx
@@ -82,8 +82,6 @@ SwVbaParagraph::getServiceNames()
return aServiceNames;
}
-
-//typedef ::cppu::WeakImplHelper1< container::XEnumeration > ParagraphEnumeration_BASE;
typedef ::cppu::WeakImplHelper2< container::XIndexAccess, container::XEnumerationAccess > ParagraphCollectionHelper_BASE;
class ParagraphCollectionHelper : public ParagraphCollectionHelper_BASE
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 04f7e3fdaf..1507d3fc0e 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -576,7 +576,6 @@ uno::Reference< word::XRange > SAL_CALL SwVbaSelection::GoTo( const uno::Any& _w
uno::Reference< word::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< word::XBookmark > xBookmark( xApplication->getActiveDocument()->Bookmarks(_name), uno::UNO_QUERY_THROW );
xBookmark->Select();
- //return uno::Reference< word::XRange >( xBookmark->Range(), uno::UNO_QUERY_THROW );
break;
}
case word::WdGoToItem::wdGoToPage:
@@ -683,8 +682,6 @@ void SAL_CALL SwVbaSelection::setLanguageID( ::sal_Int32 _languageid ) throw (un
uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::RuntimeException)
{
uno::Any result;
- //uno::Reference< view::XSelectionSupplier > xSel( mxModel->getCurrentController(), uno::UNO_QUERY_THROW );
- //uno::Any aSelectedObject = xSel->getSelection();
switch( _type )
{
case word::WdInformation::wdActiveEndPageNumber:
@@ -781,8 +778,6 @@ uno::Any SAL_CALL SwVbaSelection::Information( sal_Int32 _type ) throw (uno::Run
default:
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
- // This method fails to restore the previouse selection
- //xSel->select( aSelectedObject );
return result;
}
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index 5c7b166645..e5d00da7f2 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -326,7 +326,6 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
rtl::OUString aStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
if( aStyleName.getLength() > 0 )
{
- //rtl::OUString aStyleType = SwVbaStyle::getOOoStyleTypeFromMSWord( pTable->wdStyleType );
rtl::OUString aStyleType;
switch( pTable->wdStyleType )
{
diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx
index 05e0a8addf..452ba5024d 100644
--- a/sw/source/ui/vba/vbatablehelper.cxx
+++ b/sw/source/ui/vba/vbatablehelper.cxx
@@ -190,11 +190,6 @@ void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart,
rCols.SetLeft ( 0 );
rCols.SetRight ( UNO_TABLE_COLUMN_SUM );
rCols.SetRightMax( UNO_TABLE_COLUMN_SUM );
-
- //if( !pDoc )
- // {
- // pDoc = word::getDocShell( getCurrentDocument() )->GetDoc();
- // }
pTable->GetTabCols( rCols, pStart, sal_False, sal_False );
}
@@ -272,14 +267,11 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32
SwTabCols aOldCols;
InitTabCols( aOldCols, pStart, bCurRowOnly );
- //BOOL bCurRowOnly = FALSE;
SwTwips nWidth = 0;
SwTabCols aCols( aOldCols );
if ( aCols.Count() > 0 )
{
- // if(aCols.Count() != GetColCount( aCols ))
- // bCurRowOnly = TRUE;
nWidth = GetColWidth( aCols, nCol);
int nDiff = (int)(nNewWidth - nWidth);
@@ -302,7 +294,6 @@ void SwVbaTableHelper::SetColWidth( sal_Int32 _width, sal_Int32 nCol, sal_Int32
else
aCols.SetRight( Min( (long)nNewWidth, aCols.GetRightMax()) );
- //pDoc->SetTabCols(*pTable, aCols, aOldCols, pStartBox, bCurRowOnly );
pTable->SetTabCols(aCols, aOldCols, pStart, bCurRowOnly );
}
diff --git a/sw/source/ui/vba/vbatables.cxx b/sw/source/ui/vba/vbatables.cxx
index ab7ab7c677..77e3a464f6 100644
--- a/sw/source/ui/vba/vbatables.cxx
+++ b/sw/source/ui/vba/vbatables.cxx
@@ -161,11 +161,7 @@ SwVbaTables::Add( const uno::Reference< word::XRange >& Range, const uno::Any& N
uno::Reference< text::XTextTable > xTable;
xTable.set( xMsf->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable")) ), uno::UNO_QUERY_THROW );
-/*
- comphelper::ComponentContext aCtx( xMsf );
- if ( !aCtx.createComponent( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextTable") ), xTable ) );
- throw uno::RuntimeException(); // #FIXME better exception??
-*/
+
xTable->initialize( nRows, nCols );
uno::Reference< text::XText > xText = xTextRange->getText();
uno::Reference< text::XTextContent > xContext( xTable, uno::UNO_QUERY_THROW );
diff --git a/sw/source/ui/vba/vbatablesofcontents.cxx b/sw/source/ui/vba/vbatablesofcontents.cxx
index 93f665939a..00123c9459 100644
--- a/sw/source/ui/vba/vbatablesofcontents.cxx
+++ b/sw/source/ui/vba/vbatablesofcontents.cxx
@@ -143,8 +143,6 @@ SwVbaTablesOfContents::Add( const uno::Reference< word::XRange >& Range, const u
xToc->setUseFields( bUseFields );
sal_Bool bUseOutlineLevels = sal_True;
- //if( UseOutlineLevels.hasValue() )
- // UseOutlineLevels >>= bUseOutlineLevels;
xToc->setUseOutlineLevels( bUseOutlineLevels );
SwVbaRange* pVbaRange = dynamic_cast<SwVbaRange*>( Range.get() );
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 3f4298f128..d63e003786 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -118,7 +118,6 @@ SwVbaTemplate::AutoTextEntries( const uno::Any& index ) throw (uno::RuntimeExcep
else
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Auto Text Entry doesn't exist") ), uno::Reference< uno::XInterface >() );
- //xGroup.set( xAutoTextContainer->insertNewByName( sGroup ), uno::UNO_QUERY_THROW );
}
uno::Reference< XCollection > xCol( new SwVbaAutoTextEntries( this, mxContext, xGroup ) );
diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx
index 45b5a9f880..b53b1d5150 100644
--- a/sw/source/ui/vba/vbaview.cxx
+++ b/sw/source/ui/vba/vbaview.cxx
@@ -130,9 +130,6 @@ SwVbaView::setSeekView( ::sal_Int32 _seekview ) throw (css::uno::RuntimeExceptio
// document, so we can jump back to this position, if the macro sets
// the ViewMode back to wdSeekMainDocument
- // if( _seekview == getSeekView() )
- // return;
-
word::gotoSelectedObjectAnchor( mxModel );
switch( _seekview )
{
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index ddf856eac7..ade1cf9dc4 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -145,8 +145,6 @@ void SwWebView::SelectShell()
}
else
{
-
- // DELETEZ(pxSelectionObj); //Selektionsobjekt loeschen
SfxDispatcher &rDispatcher = *GetViewFrame()->GetDispatcher();
SwToolbarConfigItem *pBarCfg = SW_MOD()->GetWebToolbarConfig();
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx
index 600fb86c3d..367361fe43 100644
--- a/sw/source/ui/wrtsh/delete.cxx
+++ b/sw/source/ui/wrtsh/delete.cxx
@@ -112,9 +112,7 @@ long SwWrtShell::DelLine()
SwCrsrShell::LeftMargin();
SetMark();
SwCrsrShell::RightMargin();
-//Warum soll hier noch ein Zeichen in der naechsten Zeile geloescht werden?
-// if(!IsEndOfPara())
-// SwCrsrShell::Right();
+
long nRet = Delete();
Pop(FALSE);
if( nRet )
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx
index 6b8ed8f9f4..919d15b961 100644
--- a/sw/source/ui/wrtsh/move.cxx
+++ b/sw/source/ui/wrtsh/move.cxx
@@ -522,7 +522,6 @@ BOOL SwWrtShell::PushCrsr(SwTwips lOffset, BOOL bSelect)
if( bIsFrmSel )
{
-// CallChgLnk();
// bei Frames immer nur die obere Ecke nehmen, damit dieser
// wieder selektiert werden kann
aOldRect.SSize( 5, 5 );
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 415e9a9879..0833ac6c7d 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -620,7 +620,6 @@ long SwWrtShell::SttLeaveSelect(const Point *, BOOL )
if(SwCrsrShell::HasSelection() && !IsSelTblCells() && bClearMark) {
return 0;
}
-// if( IsSelTblCells() ) aSelTblLink.Call(this);
ClearMark();
return 1;
}
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index e1a8e9ef3e..7bce1630e5 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -256,18 +256,6 @@ void SwWrtShell::Insert( const String &rStr )
bDeleted = DelRight() != 0;
}
- /*
-JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
- naechste Zeichen.
- if( bHasSel && !bIns && 1 < rStr.Len() )
- {
- // falls mehrere Zeichen anstehen, nur das erste einfuegen,
- // der Rest muss dann aber Ueberschrieben werden.
- SwEditShell::Insert( rStr.GetChar( 0 ) );
- SwEditShell::Overwrite( rStr.Copy( 1 ) );
- }
- else
-*/
bCallIns ?
SwEditShell::Insert2( rStr, bDeleted ) : SwEditShell::Overwrite( rStr );
@@ -277,7 +265,6 @@ JP 21.01.98: Ueberschreiben ueberschreibt nur die Selektion, nicht das
EndAllAction();
EndUndo(UNDO_REPLACE);
}
-// delete pChgFlg;
}
/* Begrenzung auf maximale Hoehe geht nicht, da die maximale Hoehe
@@ -1052,7 +1039,6 @@ void SwWrtShell::SplitNode( BOOL bAutoFmt, BOOL bCheckTableStart )
// extern void SetNumChrFmt( SwWrtShell*, SwNumRules& );
// -> #i40041#
-// --> OD 2005-10-25 #b6340308#
// Preconditions (as far as OD has figured out):
// - <SwEditShell::HasNumber()> is FALSE, if <bNum> is TRUE
// - <SwEditShell::HasBullet()> is FALSE, if <bNum> is FALSE
@@ -1067,7 +1053,6 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
const SwNumRule * pNumRule = pCurRule;
- // --> OD 2005-10-25 #b6340308#
// - activate outline rule respectively turning on outline rule for
// current text node. But, only for turning on a numbering (<bNum> == TRUE).
// - overwrite found numbering rule at current cursor position, if
@@ -1078,7 +1063,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
SwTxtFmtColl * pColl = GetCurTxtFmtColl();
if ( pColl )
{
- // --> OD 2005-10-25 #b6340308# - retrieve numbering rule at paragraph
+ // retrieve numbering rule at paragraph
// style, which is found at current cursor position in the document.
SwNumRule* pCollRule = pDoc->FindNumRulePtr(pColl->GetNumRule().GetValue());
// --> OD 2005-10-25 #125993# - The outline numbering rule isn't allowed
@@ -1094,29 +1079,15 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
pCollRule = 0;
}
}
- // --> OD 2006-11-20 #i71764#
- // Document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE has no influence
- // any more.
-// if ( pCollRule == NULL &&
-// NO_NUMBERING != pColl->GetOutlineLevel() &&
-// GetDoc()->get(IDocumentSettingAccess::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE) )
-// {
-// pCollRule = GetDoc()->GetOutlineNumRule();
-// }
- // <--
- // <--
- // --> OD 2005-10-25 #b6340308#
if ( !pCollRule )
{
pNumRule = pCollRule;
}
- // --> OD 2006-06-12 #b6435904#
// no activation or continuation of outline numbering in Writer/Web document
else if ( bNum &&
!dynamic_cast<SwWebDocShell*>(GetDoc()->GetDocShell()) &&
pCollRule == GetDoc()->GetOutlineNumRule() )
- // <--
{
if ( pNumRule == pCollRule )
{
@@ -1198,7 +1169,6 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
}
}
- // --> OD 2005-10-25 #b6340308#
// Only automatic numbering/bullet rules should be changed.
// Note: The outline numbering rule is also an automatic one. It's only
// changed, if it has to be activated.
@@ -1214,11 +1184,8 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
pNumRule = 0;
}
}
- // <--
- // --> OD 2005-10-25 #b6340308#
// Search for a previous numbering/bullet rule to continue it.
- // --> OD 2008-03-18 #refactorlists#
String sContinuedListId;
if ( !pNumRule )
{
@@ -1227,13 +1194,11 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
sContinuedListId );
bContinueFoundNumRule = pNumRule != 0;
}
- // <--
if (pNumRule)
{
SwNumRule aNumRule(*pNumRule);
- // --> OD 2005-10-25 #b6340308#
// do not change found numbering/bullet rule, if it should only be continued.
if ( !bContinueFoundNumRule )
{
@@ -1241,12 +1206,10 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if (pTxtNode)
{
- // --> OD 2005-10-26 #b6340308# - use above retrieve outline
- // level, if outline numbering has to be activated.
- int nLevel = bActivateOutlineRule ////#outline level,zhaojianwei,need more consideration
+ // use above retrieve outline level, if outline numbering has to be activated.
+ int nLevel = bActivateOutlineRule
? nActivateOutlineLvl
: pTxtNode->GetActualListLevel();
- // <--
if (nLevel < 0)
nLevel = 0;
@@ -1260,37 +1223,29 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
aFmt.SetNumberingType(SVX_NUM_ARABIC);
else
{
- // --> OD 2008-06-03 #i63395#
- // Only apply user defined default bullet font
+ // #i63395# Only apply user defined default bullet font
if ( numfunc::IsDefBulletFontUserDefined() )
{
const Font* pFnt = &numfunc::GetDefBulletFont();
aFmt.SetBulletFont( pFnt );
}
- // <--
aFmt.SetBulletChar( numfunc::GetBulletChar(static_cast<BYTE>(nLevel)));
aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
}
aNumRule.Set(static_cast<USHORT>(nLevel), aFmt);
}
}
- // <--
- // --> OD 2008-02-08 #newlistlevelattrs#
// reset indent attribute on applying list style
- // --> OD 2008-03-27 #refactorlists#
SetCurNumRule( aNumRule, false, sContinuedListId, true );
- // <--
}
else
{
// --> OD 2009-08-27 #i95907#
const SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode(
numfunc::GetDefaultPositionAndSpaceMode() );
- // --> OD 2008-02-11 #newlistlevelattrs#
SwNumRule aNumRule( GetUniqueNumRuleName(), ePosAndSpaceMode );
// <--
- // <--
// Zeichenvorlage an die Numerierung haengen
SwCharFmt* pChrFmt;
SwDocShell* pDocSh = GetView().GetDocShell();
@@ -1366,11 +1321,7 @@ void SwWrtShell::NumOrBulletOn(BOOL bNum)
if ( pTxtNode &&
ePosAndSpaceMode == SvxNumberFormat::LABEL_ALIGNMENT )
{
- // --> OD 2010-01-05 #b6884103#
-// short nTxtNodeFirstLineOffset( 0 );
-// pTxtNode->GetFirstLineOfsWithNum( nTxtNodeFirstLineOffset );
-// const SwTwips nTxtNodeIndent = pTxtNode->GetLeftMarginForTabCalculation() +
-// nTxtNodeFirstLineOffset;
+
const SwTwips nTxtNodeIndent = pTxtNode->GetAdditionalIndentForStartingNewList();
// <--
if ( ( nTxtNodeIndent + nWidthOfTabs ) != 0 )
@@ -1473,9 +1424,6 @@ SelectionType SwWrtShell::GetSelectionType() const
if ( BasicActionPend() )
return IsSelFrmMode() ? nsSelectionType::SEL_FRM : nsSelectionType::SEL_TXT;
-// if ( IsTableMode() )
-// return nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS;
-
SwView &_rView = ((SwView&)GetView());
if (_rView.GetPostItMgr() && _rView.GetPostItMgr()->HasActiveSidebarWin() )
return nsSelectionType::SEL_POSTIT;
diff --git a/sw/source/ui/wrtsh/wrtsh2.cxx b/sw/source/ui/wrtsh/wrtsh2.cxx
index d6c2abfa81..651be62130 100644
--- a/sw/source/ui/wrtsh/wrtsh2.cxx
+++ b/sw/source/ui/wrtsh/wrtsh2.cxx
@@ -149,9 +149,6 @@ void SwWrtShell::UpdateInputFlds( SwInputFieldList* pLst, BOOL bOnlyInSel )
BOOL SwWrtShell::StartInputFldDlg( SwField* pFld, BOOL bNextButton,
Window* pParentWin, ByteString* pWindowState )
{
-//JP 14.08.96: Bug 30332 - nach Umbau der modularietaet im SFX, muss jetzt
-// das TopWindow der Application benutzt werden.
-// SwFldInputDlg* pDlg = new SwFldInputDlg( GetWin(), *this, pFld );
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
@@ -258,7 +255,6 @@ void SwWrtShell::ClickToField( const SwField& rFld )
case JE_FMT_GRAPHIC: nSlotId = SID_INSERT_GRAPHIC; break;
case JE_FMT_OLE: nSlotId = SID_INSERT_OBJECT; break;
-// case JE_FMT_TEXT:
}
Right( CRSR_SKIP_CHARS, TRUE, 1, FALSE ); // Feld selektieren
@@ -415,7 +411,6 @@ void LoadURL( const String& rURL, ViewShell* pVSh, USHORT nFilter,
SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
//#39076# Silent kann lt. SFX entfernt werden.
-// SfxBoolItem aSilent( SID_SILENT, TRUE );
SfxBoolItem aBrowse( SID_BROWSE, TRUE );
if( nFilter & URLLOAD_NEWVIEW )
diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
index 9c3658fbbd..0bcb2f23bb 100644
--- a/sw/source/ui/wrtsh/wrtsh3.cxx
+++ b/sw/source/ui/wrtsh/wrtsh3.cxx
@@ -58,8 +58,6 @@ extern sal_Bool bNoInterrupt; // in mainwn.cxx
BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark)
{
-//JP 08.03.96: die Wizards brauchen die Selektion !!
-// EndSelect();
(this->*fnKillSel)( 0, sal_False );
BOOL bRet = sal_True;
diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx
index f16a1a66c3..dfed2f208a 100644
--- a/sw/source/ui/wrtsh/wrtsh4.cxx
+++ b/sw/source/ui/wrtsh/wrtsh4.cxx
@@ -248,16 +248,6 @@ BOOL SwWrtShell::_FwdPara()
{
Push();
ClearMark();
- // --> OD 2009-01-06 #i81824#
- // going right and back again left not needed and causes too much
- // accessibility events due to the cursor movements.
-// if(!SwCrsrShell::Right(1,CRSR_SKIP_CHARS))
-// {
-// Pop(FALSE);
-// return 0;
-// }
-// SwCrsrShell::Left(1,CRSR_SKIP_CHARS);
- // <--
BOOL bRet = SwCrsrShell::MovePara(fnParaNext, fnParaStart);
ClearMark();
@@ -270,22 +260,7 @@ BOOL SwWrtShell::_BwdPara()
{
Push();
ClearMark();
- // --> OD 2009-01-06 #i81824#
- // going left and back again right not needed and causes too much
- // accessibility events due to the cursor movements.
-// if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS))
-// {
-// Pop(FALSE);
-// return 0;
-// }
-// SwCrsrShell::Right(1,CRSR_SKIP_CHARS);
- // <--
- // --> OD 2009-01-06 #i81824#
- // going to start of paragraph only needed, if move to previous paragraph
- // does not happen. Otherwise, useless accessibility events are triggered
- // due to cursor movements.
-// if(!IsSttOfPara())
-// SttPara();
+
BOOL bRet = SwCrsrShell::MovePara(fnParaPrev, fnParaStart);
if ( !bRet && !IsSttOfPara() )
{