Hi,
Under LGPLv3+/MPL.
Cheers,
-- Takeshi Abe
From d9f9c96a017d7d21011f923079cc08dda5d2840a Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Sat, 29 Jan 2011 10:26:56 +0900
Subject: [PATCH 1/3] removed unused comments and fix a typo
---
sw/source/ui/uiview/formatclipboard.cxx | 12 ++--
sw/source/ui/uiview/pview.cxx | 135 ++++++++++++------------------
sw/source/ui/uiview/scroll.cxx | 2 -
sw/source/ui/uiview/srcview.cxx | 8 +-
sw/source/ui/uiview/swcli.cxx | 5 +-
sw/source/ui/uiview/uivwimp.cxx | 2 -
sw/source/ui/uiview/view0.cxx | 4 +-
sw/source/ui/uiview/view1.cxx | 3 +-
sw/source/ui/uiview/view2.cxx | 36 ++++-----
sw/source/ui/uiview/viewcoll.cxx | 3 -
sw/source/ui/uiview/viewdlg.cxx | 3 -
sw/source/ui/uiview/viewdlg2.cxx | 2 -
sw/source/ui/uiview/viewdraw.cxx | 12 +---
sw/source/ui/uiview/viewling.cxx | 9 +-
sw/source/ui/uiview/viewmdi.cxx | 6 +-
sw/source/ui/uiview/viewport.cxx | 19 ++---
sw/source/ui/uiview/viewprt.cxx | 5 +-
sw/source/ui/uiview/viewsrch.cxx | 7 +-
sw/source/ui/uiview/viewstat.cxx | 4 +-
sw/source/ui/uiview/viewtab.cxx | 24 ++----
20 files changed, 115 insertions(+), 186 deletions(-)
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 4182565..40cba7f 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -423,7 +423,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP
}
typedef boost::shared_ptr< SfxPoolItem > SfxPoolItemSharedPtr;
typedef std::vector< SfxPoolItemSharedPtr > ItemVector;
-// #144857# collect all PoolItems from the applied styles
+// collect all PoolItems from the applied styles
void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSet )
{
const USHORT* pRanges = rStyleAttrSet.GetRanges();
@@ -440,7 +440,7 @@ void lcl_AppendSetItems( ItemVector& rItemVector, const SfxItemSet& rStyleAttrSe
pRanges += 2;
}
}
-// #144857# remove all items that are inherited from the styles
+// remove all items that are inherited from the styles
void lcl_RemoveEqualItems( SfxItemSet& rTemplateItemSet, ItemVector& rItemVector )
{
ItemVector::iterator aEnd = rItemVector.end();
@@ -482,9 +482,9 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if( pStyle )
{
SwFmtCharFmt aFmt(pStyle->GetCharFmt());
- // #144857# collect items from character style
+ // collect items from character style
lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
- USHORT nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
+ USHORT nFlags=0;
rWrtShell.SetAttr( aFmt, nFlags );
}
}
@@ -493,7 +493,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aParaStyle,
SFX_STYLE_FAMILY_PARA);
if( pStyle )
{
- // #144857# collect items from paragraph style
+ // collect items from paragraph style
lcl_AppendSetItems( aItemVector, pStyle->GetCollection()->GetAttrSet());
rWrtShell.SetTxtFmtColl( pStyle->GetCollection() );
}
@@ -519,7 +519,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if(pTemplateItemSet)
{
pTemplateItemSet->Put( *m_pItemSet );
- // #144857# only _set_ attributes that differ from style attributes should be
applied - the style is applied anyway
+ // only _set_ attributes that differ from style attributes should be applied - the
style is applied anyway
lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector );
if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE |
nsSelectionType::SEL_GRF) )
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index a3a02a8..95d403e 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include <sfx2/objface.hxx>
#include <vcl/timer.hxx>
#include <vcl/field.hxx>
@@ -57,7 +55,6 @@
#include <svx/zoomslideritem.hxx>
#include <svx/svxids.hrc>
-
#include <swwait.hxx>
#include <globdoc.hxx>
#include <wdocsh.hxx>
@@ -77,7 +74,6 @@
#include <usrpref.hxx>
#include <viewfunc.hxx>
-
#include <helpid.h>
#include <cmdid.h>
#include <globals.hrc>
@@ -87,7 +83,6 @@
#define SwPagePreView
#include <sfx2/msg.hxx>
#include <swslots.hxx>
-// OD 12.12.2002 #103492#
#include <pagepreviewlayout.hxx>
#include <svx/svxdlg.hxx>
@@ -205,7 +200,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
mbCalcScaleForPreviewLayout( true ),
maPaintedPreviewDocRect( Rectangle(0,0,0,0) )
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW ); //#106611#
+ SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
SetHelpId(HID_PAGEPREVIEW);
SetFillColor( GetBackground().GetColor() );
SetLineColor( GetBackground().GetColor());
@@ -214,7 +209,7 @@ SwPagePreViewWin::SwPagePreViewWin( Window *pParent, SwPagePreView& rPView )
const SwMasterUsrPref *pUsrPref = SW_MOD()->GetUsrPref(FALSE);
mnRow = pUsrPref->GetPagePrevRow(); // 1 Zeile
mnCol = pUsrPref->GetPagePrevCol(); // 1 Spalte
- // OD 24.03.2003 #108282# - member <mnVirtPage> no longer exists.
+ // member <mnVirtPage> no longer exists.
mnSttPage = USHRT_MAX;
}
@@ -258,7 +253,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
return;
USHORT nOldCol = mnCol;
- // OD 02.12.2002 #103492# - update <mnRow> and <mnCol>.
+ // update <mnRow> and <mnCol>.
mnRow = nNewRow;
mnCol = nNewCol;
USHORT nPages = mnRow * mnCol,
@@ -280,7 +275,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
mrView.ScrollDocSzChg();
// Sortierung muss eingehalten werden!!
- // OD 24.03.2003 #108282# - additional invalidate page status.
+ // additional invalidate page status.
static USHORT const aInval[] =
{
SID_ATTR_ZOOM, SID_ZOOM_OUT, SID_ZOOM_IN,
@@ -294,7 +289,7 @@ void SwPagePreViewWin::CalcWish( BYTE nNewRow, BYTE nNewCol )
rBindings.Invalidate( aInval );
rBindings.Update( FN_SHOW_TWO_PAGES );
rBindings.Update( FN_SHOW_MULTIPLE_PAGES );
- // OD 18.12.2002 #103492# - adjust scrollbars
+ // adjust scrollbars
mrView.ScrollViewSzChg();
}
@@ -306,10 +301,8 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
// soviele Seiten hoch
USHORT nPages = mnRow * mnCol;
USHORT nNewSttPage = mnSttPage;
- // OD 04.12.2002 #103492#
USHORT nPageCount = mrView.GetPageCount();
USHORT nDefSttPg = GetDefSttPage();
- // OD 06.12.2002 #103492#
bool bPaintPageAtFirstCol = true;
switch( eMoveMode )
@@ -347,37 +340,37 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SetSelectedPage( mpPgPrevwLayout->ConvertRelativeToAbsolutePageNum( nNewSttPage ?
nNewSttPage : 1 ) );
break;
case MV_DOC_END:
- // OD 03.12.2002 #103492# - correct calculation of new start page.
+ // correct calculation of new start page.
nNewSttPage = nPageCount;
SetSelectedPage( nPageCount );
break;
- // OD 12.12.2002 #103492# - add new move mode
+ // add new move mode
case MV_SELPAGE:
// <nNewSttPage> and <SelectedPage()> are already set.
- // OD 20.02.2003 #107369# - not start at first column, only if the
+ // not start at first column, only if the
// complete preview layout columns doesn't fit into window.
if ( !mpPgPrevwLayout->DoesPreviewLayoutColsFitIntoWindow() )
bPaintPageAtFirstCol = false;
break;
case MV_SCROLL:
- // OD 17.01.2003 #103492# - check, if paint page at first column
+ // check, if paint page at first column
// has to be avoided
if ( !mpPgPrevwLayout->DoesPreviewLayoutRowsFitIntoWindow() ||
!mpPgPrevwLayout->DoesPreviewLayoutColsFitIntoWindow() )
bPaintPageAtFirstCol = false;
break;
case MV_NEWWINSIZE:
- // OD 18.12.2002 #103492# - nothing special to do.
+ // nothing special to do.
break;
case MV_CALC:
- // OD 18.12.2002 #103492# - re-init page preview layout.
+ // re-init page preview layout.
mpPgPrevwLayout->ReInit();
- // OD 03.12.2002 #103492# - correct calculation of new start page.
+ // correct calculation of new start page.
if( nNewSttPage > nPageCount )
nNewSttPage = nPageCount;
- // OD 18.12.2002 #103492# - correct selected page number
+ // correct selected page number
if( SelectedPage() > nPageCount )
SetSelectedPage( nNewSttPage ? nNewSttPage : 1 );
}
@@ -392,7 +385,7 @@ int SwPagePreViewWin::MovePage( int eMoveMode )
SetPagePreview(mnRow, mnCol);
mnSttPage = nNewSttPage;
- // OD 24.03.2003 #108282# - additional invalidate page status.
+ // additional invalidate page status.
static USHORT const aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
@@ -434,7 +427,7 @@ void SwPagePreViewWin::SetWinSize( const Size& rNewSize )
void SwPagePreViewWin::GetStatusStr( String& rStr, USHORT nPageCnt ) const
{
- // OD 24.03.2003 #108282# - show physical and virtual page number of
+ // show physical and virtual page number of
// selected page, if it's visible.
sal_uInt16 nPageNum;
if ( mpPgPrevwLayout->IsPageVisible( mpPgPrevwLayout->SelectedPage() ) )
@@ -508,7 +501,7 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
}
break;
default:
- // OD 17.12.2002 #103492# - delete assertion
+ // delete assertion
;
}
@@ -518,7 +511,7 @@ void SwPagePreViewWin::Command( const CommandEvent& rCEvt )
void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
{
- // OD 17.12.2002 #103492# - consider single-click to set selected page
+ // consider single-click to set selected page
if( MOUSE_LEFT == ( rMEvt.GetModifier() + rMEvt.GetButtons() ) )
{
Point aPrevwPos( PixelToLogic( rMEvt.GetPosPixel() ) );
@@ -543,17 +536,17 @@ void SwPagePreViewWin::MouseButtonDown( const MouseEvent& rMEvt )
SFX_CALLMODE_ASYNCHRON );
}
else if ( bIsDocPos || bPosInEmptyPage )
- // OD 2004-03-04 #i20684# - add missing parenthesis
+ // add missing parenthesis
{
// show clicked page as the selected one
mpPgPrevwLayout->MarkNewSelectedPage( nNewSelectedPage );
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
- // OD 19.02.2003 #107369# - adjust position at vertical scrollbar.
+ // adjust position at vertical scrollbar.
if ( mpPgPrevwLayout->DoesPreviewLayoutRowsFitIntoWindow() )
{
mrView.SetVScrollbarThumbPos( nNewSelectedPage );
}
- // OD 24.03.2003 #108282# - invalidate page status.
+ // invalidate page status.
static USHORT const aInval[] =
{
FN_STAT_PAGE, 0
@@ -584,8 +577,6 @@ void SwPagePreViewWin::SetPagePreview( BYTE nRow, BYTE nCol )
/** get selected page in document preview
- OD 13.12.2002 #103492#
-
@author OD
*/
sal_uInt16 SwPagePreViewWin::SelectedPage() const
@@ -595,8 +586,6 @@ sal_uInt16 SwPagePreViewWin::SelectedPage() const
/** set selected page number in document preview
- OD 13.12.2002 #103492#
-
@author OD
*/
void SwPagePreViewWin::SetSelectedPage( sal_uInt16 _nSelectedPageNum )
@@ -606,8 +595,6 @@ void SwPagePreViewWin::SetSelectedPage( sal_uInt16 _nSelectedPageNum )
/** method to enable/disable book preview
- OD 2004-03-05 #i18143#
-
@author OD
*/
bool SwPagePreViewWin::SetBookPreviewMode( const bool _bBookPreview )
@@ -630,7 +617,7 @@ void SwPagePreViewWin::DataChanged( const DataChangedEvent& rDCEvt )
// den Settings abgefragt werden.
if( rDCEvt.GetFlags() & SETTINGS_STYLE )
mrView.InvalidateBorder(); //Scrollbarbreiten
- //#106746# zoom has to be disabled if Accessibility support is switched on
+ // zoom has to be disabled if Accessibility support is switched on
lcl_InvalidateZoomSlots(mrView.GetViewFrame()->GetBindings());
break;
@@ -647,8 +634,6 @@ void SwPagePreViewWin::DataChanged( const DataChangedEvent& rDCEvt )
/** help method to execute SfxRequest FN_PAGEUP and FN_PAGEDOWN
- OD 04.03.2003 #107369#
-
@author OD
*/
void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
@@ -707,7 +692,7 @@ void SwPagePreView::_ExecPgUpAndPgDown( const bool _bPgUp,
aViewWin.SetSelectedPage( nNewSelectedPageNum );
}
ScrollViewSzChg();
- // OD 24.03.2003 #108282# - additional invalidate page status.
+ // additional invalidate page status.
static USHORT const aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
@@ -883,7 +868,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
if ( pPagePrevwLay->IsPageVisible( nNewSelectedPage ) )
{
pPagePrevwLay->MarkNewSelectedPage( nNewSelectedPage );
- // OD 19.02.2003 #107369# - adjust position at vertical scrollbar.
+ // adjust position at vertical scrollbar.
SetVScrollbarThumbPos( nNewSelectedPage );
bRefresh = false;
}
@@ -895,7 +880,7 @@ void SwPagePreView::Execute( SfxRequest &rReq )
bRefresh = 0 != nRet;
}
GetViewShell()->ShowPreViewSelection( nNewSelectedPage );
- // OD 24.03.2003 #108282# - invalidate page status.
+ // invalidate page status.
static USHORT const aInval[] =
{
FN_STAT_PAGE, 0
@@ -997,8 +982,7 @@ void SwPagePreView::GetState( SfxItemSet& rSet )
USHORT nWhich = aIter.FirstWhich();
OSL_ENSURE(nWhich, "empty set");
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
- //#106746# zoom has to be disabled if Accessibility support is switched on
- // MT 2010/01, see #110498#
+ // zoom has to be disabled if Accessibility support is switched on
BOOL bZoomEnabled = TRUE; //
!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
while(nWhich)
@@ -1201,7 +1185,7 @@ void SwPagePreView::Init(const SwViewOption * pPrefs)
GetViewShell()->ApplyViewOptions( aOpt );
GetViewShell()->ApplyAccessiblityOptions(SW_MOD()->GetAccessibilityOptions());
- // OD 09.01.2003 #i6467# - adjust view shell option to the same as for print
+ // adjust view shell option to the same as for print
SwPrtOptions aPrintOptions( GetViewFrame()->GetObjectShell()->GetTitle(0) );
aPrintOptions.MakeOptions( false );
GetViewShell()->AdjustOptionsForPagePreview( aPrintOptions );
@@ -1235,7 +1219,6 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh):
pScrollFill(new ScrollBarBox( &pViewFrame->GetWindow(),
pViewFrame->GetFrame().GetParentFrame() ? 0 : WB_SIZEABLE )),
mnPageCount( 0 ),
- // OD 09.01.2003 #106334#
mbResetFormDesignMode( false ),
mbFormDesignModeToReset( false )
{
@@ -1274,14 +1257,14 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell*
pOldSh):
{
// setze die akt. Seite als die erste
USHORT nPhysPg, nVirtPg;
- ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, /*FALSE*/TRUE, FALSE );
+ ((SwCrsrShell*)pVS)->GetPageNum( nPhysPg, nVirtPg, TRUE, FALSE );
if( 1 != aViewWin.GetCol() && 1 == nPhysPg )
--nPhysPg;
aViewWin.SetSttPage( nPhysPg );
}
}
- // OD 09.01.2003 #106334# - for form shell remember design mode of draw view
+ // for form shell remember design mode of draw view
// of previous view shell
if ( pVS && pVS->HasDrawView() )
{
@@ -1358,7 +1341,7 @@ int SwPagePreView::_CreateScrollbar( BOOL bHori )
*/
IMPL_LINK_INLINE_START( SwPagePreView, BtnPage, Button *, pButton )
{
- // OD 04.03.2003 #107369# - use new helper method to perform page up
+ // use new helper method to perform page up
// respectively page down.
_ExecPgUpAndPgDown( pButton == pPageUpBtn );
return 0;
@@ -1399,9 +1382,8 @@ int SwPagePreView::ChgPage( int eMvMode, int bUpdateScrollbar )
// ab hier alles aus der SwView uebernommen
void SwPagePreView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
{
-// const long nAdd = bInner ? 0 : ScrollBar::GetWindowOverlapPixel();
const StyleSettings &rSet = aViewWin.GetSettings().GetStyleSettings();
- const long nTmp = rSet.GetScrollBarSize();// - nAdd;
+ const long nTmp = rSet.GetScrollBarSize();
if ( pVScrollbar->IsVisible( FALSE ))
rToFill.Right() = nTmp;
if ( pHScrollbar->IsVisible( FALSE ) )
@@ -1472,7 +1454,7 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar
)
if(aLR.Right() < 0) aLR.Right() = 0;
if(aLR.Bottom() < 0) aLR.Bottom() = 0;
if(aLR == aVisArea ||
- // JP 29.10.97: Bug 45173 - Leeres Rechteck nicht beachten
+ // Leeres Rechteck nicht beachten
( 0 == aLR.Bottom() - aLR.Top() && 0 == aLR.Right() - aLR.Left() ) )
return;
@@ -1491,7 +1473,7 @@ void SwPagePreView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar
)
// setze am View-Win die aktuelle Size
aVisArea = aLR;
aViewWin.SetWinSize( aLR.GetSize() );
- // OD 18.12.2002 #103492# - use new mode
+ // use new mode
ChgPage( SwPagePreViewWin::MV_NEWWINSIZE, bUpdateScrollbar );
aViewWin.Invalidate();
@@ -1535,7 +1517,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
if(!GetViewShell())
return 0;
- // OD 04.03.2003 #107369# - boolean to avoid unnecessary invalidation of the window.
+ // boolean to avoid unnecessary invalidation of the window.
bool bInvalidateWin = true;
if( !pScrollbar->IsHoriScroll() ) // scroll vertically
@@ -1546,33 +1528,33 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
// wieviele Seiten scrollen ??
USHORT nThmbPos = (USHORT)pScrollbar->GetThumbPos();
- // OD 05.12.2002 #103492# - adjust to new preview functionality
+ // adjust to new preview functionality
if( nThmbPos != aViewWin.SelectedPage() )
{
- // OD 17.01.2003 #103492# - consider case that page <nThmbPos>
+ // consider case that page <nThmbPos>
// is already visible
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
if ( pPagePrevwLay->IsPageVisible( nThmbPos ) )
{
pPagePrevwLay->MarkNewSelectedPage( nThmbPos );
- // OD 04.03.2003 #107369# - invalidation of window is unnecessary
+ // invalidation of window is unnecessary
bInvalidateWin = false;
}
else
{
- // OD 17.01.2003 #103492# - consider whether layout columns
+ // consider whether layout columns
// fit or not.
if ( !pPagePrevwLay->DoesPreviewLayoutColsFitIntoWindow() )
{
aViewWin.SetSttPage( nThmbPos );
aViewWin.SetSelectedPage( nThmbPos );
ChgPage( SwPagePreViewWin::MV_SCROLL, FALSE );
- // OD 20.01.2003 #103492# - update scrollbars
+ // update scrollbars
ScrollViewSzChg();
}
else
{
- // OD 04.03.2003 #107369# - correct scroll amount
+ // correct scroll amount
const sal_Int16 nPageDiff = nThmbPos - aViewWin.SelectedPage();
const sal_uInt16 nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
sal_Int16 nWinPagesToScroll = nPageDiff / nVisPages;
@@ -1585,12 +1567,12 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
aViewWin.Scroll( 0, pPagePrevwLay->GetWinPagesScrollAmount(
nWinPagesToScroll ) );
}
}
- // OD 17.01.2003 #103492# - update accessibility
+ // update accessibility
GetViewShell()->ShowPreViewSelection( nThmbPos );
}
else
{
- // OD 04.03.2003 #107369# - invalidation of window is unnecessary
+ // invalidation of window is unnecessary
bInvalidateWin = false;
}
}
@@ -1605,7 +1587,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
long nThmbPos = pScrollbar->GetThumbPos();
aViewWin.Scroll(nThmbPos - aViewWin.GetPaintedPreviewDocRect().Left(), 0);
}
- // OD 24.03.2003 #108282# - additional invalidate page status.
+ // additional invalidate page status.
static USHORT const aInval[] =
{
FN_START_OF_DOCUMENT, FN_END_OF_DOCUMENT, FN_PAGEUP, FN_PAGEDOWN,
@@ -1613,7 +1595,7 @@ IMPL_LINK( SwPagePreView, EndScrollHdl, SwScrollbar *, pScrollbar )
};
SfxBindings& rBindings = GetViewFrame()->GetBindings();
rBindings.Invalidate( aInval );
- // OD 04.03.2003 #107369# - control invalidation of window
+ // control invalidation of window
if ( bInvalidateWin )
{
aViewWin.Invalidate();
@@ -1633,7 +1615,6 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aDocSz = rSz;
- // --> OD 2009-08-20 #i96726#
// Due to the multiple page layout it is needed to trigger recalculation
// of the page preview layout, even if the count of pages is not changing.
mnPageCount = GetViewShell()->GetNumPages();
@@ -1645,7 +1626,6 @@ void SwPagePreView::DocSzChgd( const Size &rSz )
aViewWin.Invalidate();
}
- // <--
}
void SwPagePreView::ScrollViewSzChg()
@@ -1657,10 +1637,10 @@ void SwPagePreView::ScrollViewSzChg()
if(GetViewShell()->PagePreviewLayout()->DoesPreviewLayoutRowsFitIntoWindow())
{
//vertical scrolling by row
- // OD 04.12.2002 #103492# - adjust to new preview functionality
+ // adjust to new preview functionality
USHORT nVisPages = aViewWin.GetRow() * aViewWin.GetCol();
pVScrollbar->SetVisibleSize( nVisPages );
- // OD 19.02.2003 #107369# - set selected page as scroll bar position,
+ // set selected page as scroll bar position,
// if it is visible.
SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout();
if ( pPagePrevwLay->IsPageVisible( aViewWin.SelectedPage() ) )
@@ -1677,7 +1657,7 @@ void SwPagePreView::ScrollViewSzChg()
Range aScrollbarRange( 1, mnPageCount );
// increase range by one, because left-top-corner is left blank.
++aScrollbarRange.Max();
- // OD 17.01.2003 #103492# - increase range in order to access all pages
+ // increase range in order to access all pages
aScrollbarRange.Max() += ( nVisPages - 1 );
pVScrollbar->SetRange( aScrollbarRange );
}
@@ -1795,14 +1775,13 @@ PrintDialog* SwPagePreView::CreatePrintDialog( Window *pParent )
return pDlg;
}
-// OD 18.12.2002 #103492# - no longer needed ??
+// no longer needed ??
Size SwPagePreView::GetOptimalSizePixel() const
{
OSL_ENSURE( false, "overloaded virtual method <SwPagePreView::GetOptimalSizePixel()> needed
??" );
return Size( -1, -1 );
}
-// OD 12.12.2002 #103492#
void SwPagePreViewWin::SetViewShell( ViewShell* pShell )
{
mpViewShell = pShell;
@@ -1814,7 +1793,6 @@ void SwPagePreViewWin::SetViewShell( ViewShell* pShell )
void SwPagePreViewWin::RepaintCoreRect( const SwRect& rRect )
{
- // OD 2004-03-04 #i24183#
if ( mpPgPrevwLayout->PreviewLayoutValid() )
{
mpPgPrevwLayout->Repaint( Rectangle( rRect.Pos(), rRect.SSize() ) );
@@ -1823,13 +1801,12 @@ void SwPagePreViewWin::RepaintCoreRect( const SwRect& rRect )
/** method to adjust preview to a new zoom factor
- OD 02.12.2002 #103492#
- OD 24.09.2003 #i19975# - also consider zoom type - adding parameter <_eZoomType>
+ also consider zoom type - adding parameter <_eZoomType>
*/
void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16 _nZoomFactor,
const SvxZoomType _eZoomType )
{
- // OD 24.09.2003 #i19975# - consider zoom type
+ // consider zoom type
if ( _eZoomType == SVX_ZOOM_WHOLEPAGE )
{
mnRow = 1;
@@ -1865,11 +1842,11 @@ void SwPagePreViewWin::AdjustPreviewToNewZoom( const sal_uInt16
_nZoomFactor,
}
-/* -----------------04.12.2002 10:46-----------------
+/**
* pixel scrolling - horizontally always or vertically
* when less than the desired number of rows fits into
* the view
- * --------------------------------------------------*/
+ */
void SwPagePreViewWin::Scroll(long nXMove, long nYMove, USHORT /*nFlags*/)
{
maPaintedPreviewDocRect.Move(nXMove, nYMove);
@@ -1913,8 +1890,7 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt )
uno::Reference< ::com::sun::star::accessibility::XAccessible >
SwPagePreViewWin::CreateAccessible()
{
- SolarMutexGuard aGuard; // this should have
- // happend already!!!
+ SolarMutexGuard aGuard; // this should have happend already!!!
OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" );
return GetViewShell()->CreateAccessiblePreview();
@@ -1941,7 +1917,7 @@ void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
{
ViewShell& rSh = *GetViewShell();
SwViewOption aOpt(*rSh.GetViewOptions());
- // OD 16.12.2002 #103492# - perform action only on changes of zoom or zoom type.
+ // perform action only on changes of zoom or zoom type.
if ( aOpt.GetZoom() != nFactor ||
aOpt.GetZoomType() != eType )
{
@@ -1949,8 +1925,7 @@ void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
aOpt.SetZoomType(eType);
rSh.ApplyViewOptions( aOpt );
lcl_InvalidateZoomSlots(GetViewFrame()->GetBindings());
- // OD 02.12.2002 #103492#
- // OD 24.09.2003 #i19975# - also consider zoom type
+ // also consider zoom type
aViewWin.AdjustPreviewToNewZoom( nFactor, eType );
ScrollViewSzChg();
}
@@ -1958,8 +1933,6 @@ void SwPagePreView::SetZoom(SvxZoomType eType, USHORT nFactor)
/** adjust position of vertical scrollbar
- OD 19.02.2003 #107369
-
@author OD
*/
void SwPagePreView::SetVScrollbarThumbPos( const sal_uInt16 _nNewThumbPos )
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 7909f97..6755d90 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "swtypes.hxx"
#include "swrect.hxx"
#include "scroll.hxx"
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index d6f585d..03d8603 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -262,7 +262,7 @@ void SwSrcView::SaveContentTo(SfxMedium& rMed)
{
SvStream* pOutStream = rMed.GetOutStream();
pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding));
- aEditWin.Write( *pOutStream );//, EE_FORMAT_TEXT);
+ aEditWin.Write( *pOutStream );
}
void SwSrcView::Init()
@@ -294,7 +294,7 @@ void SwSrcView::SaveContent(const String& rTmpFile)
SfxMedium aMedium( rTmpFile, STREAM_WRITE, TRUE);
SvStream* pOutStream = aMedium.GetOutStream();
pOutStream->SetStreamCharSet( lcl_GetStreamCharSet(eLoadEncoding) );
- aEditWin.Write(*pOutStream);//, EE_FORMAT_TEXT);
+ aEditWin.Write(*pOutStream);
aMedium.Commit();
}
@@ -816,7 +816,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pStream->Seek(0);
TextEngine* pTextEngine = aEditWin.GetTextEngine();
pTextEngine->EnableUndo(FALSE);
- aEditWin.Read(*pStream);//, EE_FORMAT_TEXT);
+ aEditWin.Read(*pStream);
pTextEngine->EnableUndo(TRUE);
}
else
@@ -852,7 +852,7 @@ void SwSrcView::Load(SwDocShell* pDocShell)
pInStream->SetStreamCharSet( eDestEnc );
- aEditWin.Read(*pInStream);//, EE_FORMAT_TEXT);
+ aEditWin.Read(*pInStream);
}
}
aEditWin.ClearModifyFlag();
diff --git a/sw/source/ui/uiview/swcli.cxx b/sw/source/ui/uiview/swcli.cxx
index 2966c00..aea6565 100644
--- a/sw/source/ui/uiview/swcli.cxx
+++ b/sw/source/ui/uiview/swcli.cxx
@@ -30,7 +30,6 @@
#include "precompiled_sw.hxx"
#include <com/sun/star/embed/NoVisualAreaSizeException.hpp>
-
#include <wrtsh.hxx>
#include <swtypes.hxx>
#include <view.hxx>
@@ -140,8 +139,8 @@ void SwOleClient::ViewChanged()
Size aVisSize( aSz.Width, aSz.Height );
- // Bug 24833: solange keine vernuenftige Size vom Object kommt,
- // kann nichts skaliert werden
+ // solange keine vernuenftige Size vom Object kommt,
+ // kann nichts skaliert werden
if( !aVisSize.Width() || !aVisSize.Height() )
return;
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 5394818..9880515 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <cmdid.h>
#include "globals.hrc"
@@ -59,7 +58,6 @@
#include <view.hrc>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::scanner;
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index c49e8bb..07e2af3 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
#include <vcl/graph.hxx>
#include <svx/galbrws.hxx>
@@ -518,7 +516,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
pModule->ApplyUsrPref( *pOpt, this, bWebView ? VIEWOPT_DEST_WEB : VIEWOPT_DEST_TEXT );
- //mod #i6193# let postits know about new spellcheck setting
+ // let postits know about new spellcheck setting
if ( nSlot == SID_AUTOSPELL_CHECK )
GetPostItMgr()->SetSpellChecking();
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 70aeb58..7e94e76 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <svx/svdpagv.hxx>
#include <svx/svdview.hxx>
#include <svx/ruler.hxx>
@@ -70,7 +69,7 @@ void SwView::Activate(BOOL bMDIActivate)
if(!bDocSzUpdated)
DocSzChgd(aDocSz);
- // #b6330459# make selection visible
+ // make selection visible
if(bMakeSelectionVisible)
{
pWrtShell->MakeSelVisible();
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index e0e38c7..7f4892b 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -221,7 +221,7 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
{
if( !pFlt )
pFlt = GraphicFilter::GetGraphicFilter();
- nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt /*, nFilter*/ );
+ nRes = GraphicFilter::LoadGraphic( rPath, rFilter, aGrf, pFlt );
}
if( GRFILTER_OK == nRes )
@@ -363,7 +363,7 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
}
catch(Exception& )
{
- OSL_ENSURE(false, "control acces failed");
+ OSL_ENSURE(false, "control access failed");
}
}
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
@@ -413,7 +413,6 @@ BOOL SwView::InsertGraphicDlg( SfxRequest& rReq )
rSh.LockPaint();
rSh.StartAction();
- /// #111827#
SwRewriter aRewriter;
aRewriter.AddRule(UNDO_ARG1, String(SW_RES(STR_GRAPHIC_DEFNAME)));
@@ -493,9 +492,8 @@ void SwView::Execute(SfxRequest &rReq)
switch( nSlot )
{
case SID_CREATE_SW_DRAWVIEW:
- // --> OD 2005-08-08 #i52858# - method name changed
+ // method name changed
pWrtShell->getIDocumentDrawModelAccess()->GetOrCreateDrawModel();
- // <--
break;
case FN_LINE_NUMBERING_DLG:
@@ -528,7 +526,7 @@ void SwView::Execute(SfxRequest &rReq)
rReq.SetReturnValue(SfxBoolItem(nSlot,
aVis != GetVisArea()));
- //#i42732# - notify the edit window that from now on we do not use the input language
+ // notify the edit window that from now on we do not use the input language
rTmpWin.SetUseInputLanguage( sal_False );
}
break;
@@ -551,7 +549,7 @@ void SwView::Execute(SfxRequest &rReq)
pParent = &GetViewFrame()->GetWindow();
SfxPasswordDialog aPasswdDlg( pParent );
aPasswdDlg.SetMinLen( 1 );
- //#i69751# the result of Execute() can be ignored
+ // the result of Execute() can be ignored
aPasswdDlg.Execute();
String sNewPasswd( aPasswdDlg.GetPassword() );
Sequence <sal_Int8> aNewPasswd = pIDRA->GetRedlinePassword();
@@ -859,8 +857,8 @@ void SwView::Execute(SfxRequest &rReq)
pWrtShell->ApplyAutoMark();
bAutoMarkApplied = TRUE;
}
- // JP 15.07.96: das pBase wird nur fuer die Schnittstelle
- // benoetigt. Muss mal umgetstellt werden!!!
+ // das pBase wird nur fuer die Schnittstelle
+ // benoetigt. Muss mal umgetstellt werden!!!
pWrtShell->UpdateTableOf( *pBase );
if( pWrtShell->GotoNextTOXBase() )
@@ -964,7 +962,7 @@ void SwView::Execute(SfxRequest &rReq)
{
// call the handlers of PageUp/DownButtons, only
bool* pbNext = new bool ( ((const SfxBoolItem*)pItem)->GetValue() );
- // #i75416# move the execution of the search to an asynchronously called static
link
+ // move the execution of the search to an asynchronously called static link
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
}
break;
@@ -1132,7 +1130,7 @@ void SwView::Execute(SfxRequest &rReq)
break;
case SID_RESTORE_EDITING_VIEW:
{
- //#i33307# restore editing position
+ // restore editing position
Point aCrsrPos;
bool bSelectObj;
if(pViewImpl->GetRestorePosition(aCrsrPos, bSelectObj))
@@ -1329,7 +1327,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
if( rShell.IsFrmSelected() || rShell.IsObjSelected() )
{
- // #i39171# Don't put a SvxSizeItem into a slot which is defined as SfxStringItem.
+ // Don't put a SvxSizeItem into a slot which is defined as SfxStringItem.
// SvxPosSizeStatusBarControl no longer resets to empty display if only one slot
// has no item, so SID_TABLE_CELL can remain empty (the SvxSizeItem is supplied
// in SID_ATTR_SIZE).
@@ -1374,7 +1372,6 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
//-->#outline level,added by zhaojianwei
const SwNumRule* pNumRule = rShell.GetCurNumRule();
const bool bOutlineNum = pNumRule ? pNumRule->IsOutlineRule() : 0;
-
//((SwTxtFmtColl*)rShell.GetCrsr()->GetNode()->GetTxtNode()->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle();
if (pNumRule && !bOutlineNum ) // Cursor in Numerierung
{
@@ -1387,8 +1384,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
RES_PARATR_NUMRULE, RES_PARATR_NUMRULE);
rShell.GetCurAttr(aSet);
if(SFX_ITEM_AVAILABLE <=
- aSet.GetItemState(RES_PARATR_NUMRULE, TRUE
- /*, &pItem */ ))
+ aSet.GetItemState(RES_PARATR_NUMRULE, TRUE ))
{
const String& rNumStyle =
((const SfxStringItem &)
@@ -1770,7 +1766,6 @@ BOOL SwView::JumpToSwMark( const String& rMark )
BOOL bSaveCT = IsCrsrAtTop();
SetCrsrAtTop( TRUE );
- //JP 27.04.98: Bug 49786
// Damit in FrameSet auch gescrollt werden kann, muss die
// entsprechende Shell auch das Focus-Flag gesetzt haben!
BOOL bHasShFocus = pWrtShell->HasShFcs();
@@ -1880,7 +1875,7 @@ BOOL SwView::JumpToSwMark( const String& rMark )
return bRet;
}
-// #i67305, #1367991: Undo after insert from file:
+// Undo after insert from file:
// Undo "Insert form file" crashes with documents imported from binary filter (.sdw) => disabled
// Undo "Insert form file" crashes with (.odt) documents crashes if these documents contains
// page styles with active header/footer => disabled for those documents
@@ -2005,7 +2000,7 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion
)
SfxObjectShellRef aRef( pDocSh );
sal_uInt32 nError = SfxObjectShell::HandleFilter( pMedium, pDocSh );
- // #i16722# aborted?
+ // aborted?
if(nError != ERRCODE_NONE)
{
delete pMedium;
@@ -2055,8 +2050,8 @@ long SwView::InsertMedium( USHORT nSlotId, SfxMedium* pMedium, INT16 nVersion
)
}
if( pDoc )
- { // Disable Undo for .sdw (136991) or
- // if the number of page styles with header/footer has changed (#i67305)
+ { // Disable Undo for .sdw or
+ // if the number of page styles with header/footer has changed
if( !pRead || nUndoCheck != lcl_PageDescWithHeader( *pDoc ) )
pDoc->DelAllUndoObj();
}
@@ -2329,7 +2324,6 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
// but we want that the new document is on top
pTopWin->ToTop();
-// return;
}
}
diff --git a/sw/source/ui/uiview/viewcoll.cxx b/sw/source/ui/uiview/viewcoll.cxx
index c5bbdd2..8d6288c 100644
--- a/sw/source/ui/uiview/viewcoll.cxx
+++ b/sw/source/ui/uiview/viewcoll.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "cmdid.h"
#include "uiitems.hxx"
#include <tools/list.hxx>
@@ -40,7 +38,6 @@
#include <svl/stritem.hxx>
#include <rsc/rscsfx.hxx>
-
#include "errhdl.hxx"
#include "view.hxx"
#include "wrtsh.hxx"
diff --git a/sw/source/ui/uiview/viewdlg.cxx b/sw/source/ui/uiview/viewdlg.cxx
index 52d0013..e769766 100644
--- a/sw/source/ui/uiview/viewdlg.cxx
+++ b/sw/source/ui/uiview/viewdlg.cxx
@@ -29,15 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include "hintids.hxx"
#include <sfx2/viewfrm.hxx>
#include <editeng/tstpitem.hxx>
#include <svl/stritem.hxx>
#include <sfx2/request.hxx>
-
#include "view.hxx"
#include "wrtsh.hxx"
#include "basesh.hxx"
diff --git a/sw/source/ui/uiview/viewdlg2.cxx b/sw/source/ui/uiview/viewdlg2.cxx
index 718ad43..5aca43a 100644
--- a/sw/source/ui/uiview/viewdlg2.cxx
+++ b/sw/source/ui/uiview/viewdlg2.cxx
@@ -29,11 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <sfx2/request.hxx>
#include <sfx2/viewfrm.hxx>
-
#include <fldmgr.hxx>
#include <expfld.hxx>
#include <modcfg.hxx>
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 71ccb88..03f3132 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <svl/aeitem.hxx>
#include <svl/itempool.hxx>
@@ -74,10 +73,8 @@
#include "dselect.hxx"
#include "edtwin.hxx"
-// #108784#
#include <dcontact.hxx>
-// #108784#
#include <svx/svdpagv.hxx>
#include <svx/extrusionbar.hxx>
#include <vcl/svapp.hxx>
@@ -417,7 +414,7 @@ void SwView::ExitDraw()
if(pShell)
{
- //#126062 # the shell may be invalid at close/reload/SwitchToViewShell
+ // the shell may be invalid at close/reload/SwitchToViewShell
SfxDispatcher* pDispatch = GetViewFrame()->GetDispatcher();
USHORT nIdx = 0;
SfxShell* pTest = 0;
@@ -494,7 +491,6 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
!pSdrView->PickHandle( aDocPos ) && IsTextTool() &&
pSdrView->PickObj( aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKTEXTEDIT )
&&
- // #108784#
// To allow SwDrawVirtObj text objects to be activated, allow their type, too.
( pObj->ISA( SdrTextObj ) ||
( pObj->ISA(SwDrawVirtObj) &&
@@ -552,19 +548,17 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window*
pWin,
pOutliner->SetVertical( SID_DRAW_TEXT_VERTICAL == nDrawSfxId ||
SID_DRAW_CAPTION_VERTICAL == nDrawSfxId );
- // OD 09.12.2002 #103045# - set default horizontal text direction at outliner
+ // set default horizontal text direction at outliner
EEHorizontalTextDirection aDefHoriTextDir =
pSh->IsShapeDefaultHoriTextDirR2L() ? EE_HTEXTDIR_R2L : EE_HTEXTDIR_L2R;
pOutliner->SetDefaultHorizontalTextDirection( aDefHoriTextDir );
}
- // #108784#
// To allow editing the referenced object from a SwDrawVirtObj here
// the original needs to be fetched evenually. This ATM activates the
// text edit mode for the original object.
SdrObject* pToBeActivated = pObj;
- // #108784#
// Always the original object is edited. To allow the TextEdit to happen
// where the VirtObj is positioned, on demand a occurring offset is set at
// the TextEdit object. That offset is used for creating and managing the
@@ -583,7 +577,6 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
sal_Bool bRet(pSdrView->SdrBeginTextEdit( pToBeActivated, pPV, pWin, sal_True, pOutliner, 0,
sal_False, sal_False, sal_False ));
- // #i7672#
// Since SdrBeginTextEdit actually creates the OutlinerView and thus also
// sets the background color, an own background color needs to be set
// after TextEditing was started. This is now done here.
@@ -727,7 +720,6 @@ sal_Bool SwView::HasOnlyObj(SdrObject *pSdrObj, sal_uInt32 eObjInventor) const
return bRet;
}
-//#i87414# mod
IMPL_LINK(SwView, OnlineSpellCallback, SpellCallbackInfo*, pInfo)
{
if (pInfo->nCommand == SPELLCMD_STARTSPELLDLG)
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 94433f0..3067183 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -559,8 +559,8 @@ void SwView::InsertThesaurusSynonym( const String &rSynonmText, const String &rL
// adjust existing selection
SwPaM *pCrsr = pWrtShell->GetCrsr();
- pCrsr->GetPoint()->nContent/*.nIndex*/ -= nRight;
- pCrsr->GetMark()->nContent/*.nIndex*/ += nLeft;
+ pCrsr->GetPoint()->nContent -= nRight;
+ pCrsr->GetMark()->nContent += nLeft;
}
pWrtShell->Insert( rSynonmText );
@@ -685,7 +685,7 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
// default context menu.
bool bUseGrammarContext = false;
Reference< XSpellAlternatives > xAlt( pWrtShell->GetCorrection(&rPt, aToFill) );
- /*linguistic2::*/ProofreadingResult aGrammarCheckRes;
+ ProofreadingResult aGrammarCheckRes;
sal_Int32 nErrorInResult = -1;
uno::Sequence< rtl::OUString > aSuggestions;
bool bCorrectionRes = false;
@@ -933,7 +933,6 @@ protected:
IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
{
-// printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect());
if (pBox->IsTravelSelect()) {
return 0;
} else {
@@ -956,7 +955,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
SwFieldDialog aFldDlg(pEditWin, fieldBM);
aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos));
- /*short ret=*/aFldDlg.Execute();
+ aFldDlg.Execute();
sal_Int32 selection=aFldDlg.getSelection();
if (selection>=0) {
(*fieldBM->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT))]
= makeAny(selection);
diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx
index 9edb1ce..cad8f8b 100644
--- a/sw/source/ui/uiview/viewmdi.cxx
+++ b/sw/source/ui/uiview/viewmdi.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
-
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
#include "hintids.hxx"
@@ -109,7 +107,7 @@ void SwView::_SetZoom( const Size &rEditSize, SvxZoomType eZoomType,
Size aPageSize( aPageRect.SSize() );
Size aRootSize( aRootRect.SSize() );
- //mod #i6193# added sidebar width
+ // added sidebar width
SwPostItMgr* pPostItMgr = GetPostItMgr();
if (pPostItMgr->HasNotes() && pPostItMgr->ShowNotes())
aPageSize.Width() += pPostItMgr->GetSidebarWidth() +
pPostItMgr->GetSidebarBorderWidth();
@@ -375,7 +373,7 @@ void SwView::CreatePageButtons(BOOL bShow)
*/
IMPL_LINK( SwView, BtnPage, Button *, pButton )
{
- // #i75416# move the execution of the search to an asynchronously called static link
+ // move the execution of the search to an asynchronously called static link
bool* pbNext = new bool( (pButton == pPageDownBtn) );
Application::PostUserEvent( STATIC_LINK(this, SwView, MoveNavigationHdl), pbNext );
return 0;
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 742513b..b0b8216 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include "hintids.hxx"
#include <vcl/help.hxx>
#include <svx/ruler.hxx>
@@ -98,8 +97,8 @@ void lcl_GetPos(SwView* pView,
long lDelta = lPos - rSh.VisArea().Pos().*pPt;
const long lSize = aDocSz.*pSz + lBorder;
- // Bug 11693: sollte rechts oder unten zuviel Wiese sein, dann muss
- // diese von der VisArea herausgerechnet werden!
+ // sollte rechts oder unten zuviel Wiese sein, dann muss
+ // diese von der VisArea herausgerechnet werden!
long nTmp = pView->GetVisArea().Right()+lDelta;
if ( bHori && nTmp > lSize )
lDelta -= nTmp - lSize;
@@ -688,8 +687,8 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
pScrollbar->GetType() == SCROLL_DRAG)
{
//Hier wieder auskommentieren wenn das mitscrollen nicht gewuenscht ist.
- // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE,
- // so we dont must do it agin.
+ // the end scrollhandler invalidate the FN_STAT_PAGE,
+ // so we dont must do it agin.
EndScrollHdl(pScrollbar);
Point aPos( aVisArea.TopLeft() );
@@ -841,7 +840,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
else
rToFill.Right() = nTmp;
}
- //#i32913# in browse mode the visibility of the horizontal scrollbar
+ // in browse mode the visibility of the horizontal scrollbar
// depends on the content (fixed width tables may require a scrollbar)
if (
pHScrollbar->IsVisible(pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
)
rToFill.Bottom() = nTmp;
@@ -907,7 +906,7 @@ void ViewResizePixel( const Window &rRef,
if(!aSize.Height())
aSize.Height() = pHLineal->GetSizePixel().Height();
pHLineal->SetPosSizePixel( rOfst, aSize );
-// #46802 VCL ruft an unsichtbaren Fenstern kein Resize
+// VCL ruft an unsichtbaren Fenstern kein Resize
// fuer das Lineal ist das aber keine gute Idee
if(!pHLineal->IsVisible())
pHLineal->Resize();
@@ -945,7 +944,7 @@ void ViewResizePixel( const Window &rRef,
Size aImgSz( nVBSzWidth, nVBSzWidth );
- //#55949# wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
+ // wenn der Platz fuer Scrollbar und Page-Buttons zu klein wird, dann
// werden die Buttons versteckt
USHORT nCnt = pNaviBtn ? 3 : 2;
long nSubSize = (aImgSz.Width() * nCnt );
@@ -1073,7 +1072,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
{
- // FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
+ // return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
bInOuterResizePixel = TRUE;
@@ -1300,7 +1299,7 @@ BOOL SwView::UpdateScrollbars()
void SwView::Move()
{
if ( GetWrtShell().IsInSelect() )
- GetWrtShell().EndSelect(); //#32427#
+ GetWrtShell().EndSelect();
SfxViewShell::Move();
}
diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx
index 5e7d728..7dc5b73 100644
--- a/sw/source/ui/uiview/viewprt.cxx
+++ b/sw/source/ui/uiview/viewprt.cxx
@@ -266,8 +266,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
}
else if( rReq.GetSlot() == SID_PRINTDOCDIRECT && ! bSilent )
{
- if( /*!bIsAPI && */
- ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
+ if( ( pSh->IsSelection() || pSh->IsFrmSelected() || pSh->IsObjSelected() ) )
{
short nBtn = SvxPrtQryBox(&GetEditWin()).Execute();
if( RET_CANCEL == nBtn )
@@ -278,7 +277,7 @@ void SwView::ExecutePrint(SfxRequest& rReq)
}
}
- //#i61455# if master documentes are printed silently without loaded links then update
the links now
+ // if master documentes are printed silently without loaded links then update the
links now
if( bSilent && pSh->IsGlobalDoc() && !pSh->IsGlblDocSaveLinks() )
{
pSh->GetLinkManager().UpdateAllLinks( sal_False, sal_False, sal_False, 0 );
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index b0879d9..54dcfa3 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
#include <hintids.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
@@ -305,7 +304,7 @@ void SwView::ExecSearch(SfxRequest& rReq, BOOL bNoMessage)
SwWait aWait( *GetDocShell(), TRUE );
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
- // i#8288: Now that everything has been replaced, restore the original
cursor position.
+ // Now that everything has been replaced, restore the original cursor
position.
pWrtShell->GetSwCrsr()->RestoreSavePos(); // (position saved by
SwCrsrSaveState above)
pWrtShell->EndAllAction();
}
@@ -579,13 +578,13 @@ void SwView::Replace()
aRewriter.AddRule(UNDO_ARG2, SW_RES(STR_YIELDS));
aRewriter.AddRule(UNDO_ARG3, pSrchItem->GetReplaceString());
- pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter); // #111827#
+ pWrtShell->StartUndo(UNDO_UI_REPLACE_STYLE, &aRewriter);
pWrtShell->SetTxtFmtColl( pWrtShell->GetParaStyle(
pSrchItem->GetReplaceString(),
SwWrtShell::GETSTYLE_CREATESOME ));
- pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE); // #111827#
+ pWrtShell->EndUndo(UNDO_UI_REPLACE_STYLE);
}
else
{
diff --git a/sw/source/ui/uiview/viewstat.cxx b/sw/source/ui/uiview/viewstat.cxx
index b37741d..20812fb 100644
--- a/sw/source/ui/uiview/viewstat.cxx
+++ b/sw/source/ui/uiview/viewstat.cxx
@@ -157,8 +157,8 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case SID_UNDO:
{
- //JP 21.07.98: Bug 53429 - die muss noch nicht vorhanden sein
- // also lasse sie mal anlegen:
+ // die muss noch nicht vorhanden sein
+ // also lasse sie mal anlegen:
if( !pShell )
SelectShell();
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 592fb0f..4a2cab4 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <tools/list.hxx>
#include <hintids.hxx>
@@ -66,10 +65,8 @@
#include "fmtcol.hxx"
#include "section.hxx"
-// -> #i23726#
#include "ndtxt.hxx"
#include "pam.hxx"
-// <- #i23726#
#include <IDocumentSettingAccess.hxx>
@@ -129,7 +126,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
SwFmtCol& rCols)
{
OSL_ENSURE( rCols.GetNumCols() == rColItem.Count(), "Column count mismatch" );
- // #126939# ruler executes that change the columns shortly after the selection has changed
+ // ruler executes that change the columns shortly after the selection has changed
// can result in a crash
if(rCols.GetNumCols() != rColItem.Count())
return;
@@ -601,10 +598,9 @@ void SwView::ExecTabWin( SfxRequest& rReq )
aParaMargin.SetWhich( RES_LR_SPACE );
SwTxtFmtColl* pColl = rSh.GetCurTxtFmtColl();
- // #i23726#
if (pNumRuleNodeFromDoc)
{
- // --> FME 2005-02-22 #i42922# Mouse move of numbering label
+ // --> Mouse move of numbering label
// has to consider the left indent of the paragraph
SfxItemSet aSet( GetPool(), RES_LR_SPACE, RES_LR_SPACE );
rSh.GetCurAttr( aSet );
@@ -613,11 +609,8 @@ void SwView::ExecTabWin( SfxRequest& rReq )
// <--
SwPosition aPos(*pNumRuleNodeFromDoc);
- // --> OD 2008-06-09 #i90078#
rSh.SetIndent( static_cast< short >(aParaMargin.GetTxtLeft() - rLR.GetTxtLeft()),
aPos);
- // <--
- // --> OD 2005-02-18 #i42921# - invalidate state of indent in order
- // to get a ruler update.
+ // --> invalidate state of indent in order to get a ruler update.
aParaMargin.SetWhich( nSlot );
GetViewFrame()->GetBindings().SetState( aParaMargin );
// <--
@@ -918,7 +911,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
nRulerStyle = pVRuler->GetStyle() & ~WB_EXTRAFIELD;
pVRuler->SetStyle(bVerticalWriting ? nRulerStyle|WB_EXTRAFIELD : nRulerStyle);
- //#i24363# tab stops relative to indent
+ // tab stops relative to indent
bool bRelative =
rSh.getIDocumentSettingAccess()->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT);
pHRuler->SetTabsRelativeToIndent( bRelative );
pVRuler->SetTabsRelativeToIndent( bRelative );
@@ -956,7 +949,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
SwFrmFmt *pFmt = (SwFrmFmt*) (nFrmType & FRMTYPE_HEADER ?
rDesc.GetMaster().GetHeader().GetHeaderFmt() :
rDesc.GetMaster().GetFooter().GetFooterFmt());
- if( pFmt )// #i80890# if rDesc is not the one belonging to the current page is
might crash
+ if( pFmt )// if rDesc is not the one belonging to the current page is might crash
{
SwRect aRect( rSh.GetAnyCurRect( RECT_HEADERFOOTER, pPt));
aRect.Pos() -= rSh.GetAnyCurRect( RECT_PAGE, pPt ).Pos();
@@ -1096,11 +1089,10 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
aLR = (const SvxLRSpaceItem&)aCoreSet.Get(RES_LR_SPACE);
- // #i23726#
if (pNumRuleNodeFromDoc)
{
short nOffset = static_cast< short >(aLR.GetTxtLeft() +
- // --> FME 2005-02-22 #i42922# Mouse move of numbering
label
+ // --> Mouse move of numbering label
// has to consider the left indent of the paragraph
pNumRuleNodeFromDoc->GetLeftMarginWithNum( TRUE ) );
// <--
@@ -1203,14 +1195,14 @@ void SwView::StateTabWin(SfxItemSet& rSet)
rMaster.GetHeader();
const SwFmtHeader& rHeaderFmt = rMaster.GetHeader();
SwFrmFmt *pHeaderFmt = (SwFrmFmt*)rHeaderFmt.GetHeaderFmt();
- if( pHeaderFmt )// #i80890# if rDesc is not the one belonging to the
current page is might crash
+ if( pHeaderFmt )// if rDesc is not the one belonging to the current page
is might crash
pBox = & (const SvxBoxItem&)pHeaderFmt->GetBox();
}
else if(nFrmType & FRMTYPE_FOOTER )
{
const SwFmtFooter& rFooterFmt = rMaster.GetFooter();
SwFrmFmt *pFooterFmt = (SwFrmFmt*)rFooterFmt.GetFooterFmt();
- if( pFooterFmt )// #i80890# if rDesc is not the one belonging to the
current page is might crash
+ if( pFooterFmt )// if rDesc is not the one belonging to the current page
is might crash
pBox = & (const SvxBoxItem&)pFooterFmt->GetBox();
}
if(pBox)
--
1.7.2.3
From 3b17eede4448246264bf74bf7d71b51461dec30e Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Sat, 29 Jan 2011 10:28:04 +0900
Subject: [PATCH 2/3] reduced scopes
---
sw/source/ui/uiview/scroll.cxx | 2 --
sw/source/ui/uiview/uivwimp.cxx | 2 +-
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx
index 6755d90..e8b6f4f 100644
--- a/sw/source/ui/uiview/scroll.cxx
+++ b/sw/source/ui/uiview/scroll.cxx
@@ -129,7 +129,6 @@ void SwScrollbar::AutoShow()
{
long nVis = GetVisibleSize();
long nLen = GetRange().Len();
- {
if( nVis >= nLen - 1)
{
if(ScrollBar::IsVisible())
@@ -142,7 +141,6 @@ void SwScrollbar::AutoShow()
{
ScrollBar::Show(TRUE);
}
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx
index 9880515..80f3758 100644
--- a/sw/source/ui/uiview/uivwimp.cxx
+++ b/sw/source/ui/uiview/uivwimp.cxx
@@ -265,8 +265,8 @@ SwScannerEventListener::~SwScannerEventListener()
void SAL_CALL SwScannerEventListener::disposing( const EventObject& rEventObject)
throw(uno::RuntimeException)
{
- SolarMutexGuard aGuard;
#if defined WIN || defined WNT || defined UNX
+ SolarMutexGuard aGuard;
if( pView )
pView->ScannerEventHdl( rEventObject );
#endif
--
1.7.2.3
From 4b552b953e1662da13f9d20a364f55a230fb8c3e Mon Sep 17 00:00:00 2001
From: Takeshi Abe <tabe@fixedpoint.jp>
Date: Sat, 29 Jan 2011 10:31:05 +0900
Subject: [PATCH 3/3] removed useless codes
---
sw/source/ui/uiview/viewtab.cxx | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 4a2cab4..43bc94b 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -691,13 +691,6 @@ void SwView::ExecTabWin( SfxRequest& rReq )
nBorder = (bVerticalWriting ? nPageHeight : nPageWidth) - aTabCols.GetLeftMin() -
aColItem.GetRight();
-#ifdef DEBUG
- long nTmp1 = nPageWidth;
- long nTmp2 = aTabCols.GetLeftMin() + nBorder;
- (void)nTmp1;
- (void)nTmp2;
-#endif
-
if ( aColItem.GetRight() > 0 )
aTabCols.SetRight( nBorder );
--
1.7.2.3
Context
- [Libreoffice] cleanup on writer · Takeshi Abe
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.