summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/viewport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uiview/viewport.cxx')
-rw-r--r--sw/source/ui/uiview/viewport.cxx86
1 files changed, 43 insertions, 43 deletions
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 2e92bc864234..4bdd79d27de0 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,7 @@ 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!
+ // diese von der VisArea herausgerechnet werden!
long nTmp = pView->GetVisArea().Right()+lDelta;
if ( bHori && nTmp > lSize )
lDelta -= nTmp - lSize;
@@ -113,7 +113,7 @@ void lcl_GetPos(SwView* pView,
}
/*--------------------------------------------------------------------
- Beschreibung: Nullpunkt Lineal setzen
+ Beschreibung: Nullpunkt Lineal setzen
--------------------------------------------------------------------*/
void SwView::InvalidateRulerPos()
{
@@ -136,7 +136,7 @@ void SwView::InvalidateRulerPos()
}
/*--------------------------------------------------------------------
- Beschreibung: begrenzt das Scrollen soweit, dass jeweils nur einen
+ Beschreibung: begrenzt das Scrollen soweit, dass jeweils nur einen
viertel Bildschirm bis vor das Ende des Dokumentes
gescrollt werden kann.
--------------------------------------------------------------------*/
@@ -154,7 +154,7 @@ long SwView::SetVScrollMax( long lMax )
{
const long lBorder = IsDocumentBorder() ? DOCUMENTBORDER : DOCUMENTBORDER * 2;
long lSize = GetDocSz().Height() + lBorder - aVisArea.GetHeight();
- return Max( Min( lMax, lSize), 0L ); // siehe horz.
+ return Max( Min( lMax, lSize), 0L ); // siehe horz.
}
Point SwView::AlignToPixel(const Point &rPt) const
@@ -163,7 +163,7 @@ Point SwView::AlignToPixel(const Point &rPt) const
}
/*--------------------------------------------------------------------
- Beschreibung: Dokumentgroesse hat sich geaendert
+ Beschreibung: Dokumentgroesse hat sich geaendert
--------------------------------------------------------------------*/
void SwView::DocSzChgd(const Size &rSz)
{
@@ -173,7 +173,7 @@ extern int bDocSzUpdated;
aDocSz = rSz;
- if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
+ if( !pWrtShell || aVisArea.IsEmpty() ) // keine Shell -> keine Aenderung
{
bDocSzUpdated = FALSE;
return;
@@ -213,13 +213,13 @@ aDocSz = rSz;
}
/*--------------------------------------------------------------------
- Beschreibung: Visarea neu setzen
+ Beschreibung: Visarea neu setzen
--------------------------------------------------------------------*/
void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
{
const Size aOldSz( aVisArea.GetSize() );
- const Point aTopLeft( AlignToPixel( rRect.TopLeft() ));
+ const Point aTopLeft( AlignToPixel( rRect.TopLeft() ));
const Point aBottomRight( AlignToPixel( rRect.BottomRight() ));
Rectangle aLR( aTopLeft, aBottomRight );
@@ -306,7 +306,7 @@ void SwView::SetVisArea( const Rectangle &rRect, BOOL bUpdateScrollbar )
}
/*--------------------------------------------------------------------
- Beschreibung: Pos VisArea setzen
+ Beschreibung: Pos VisArea setzen
--------------------------------------------------------------------*/
void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
{
@@ -318,7 +318,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
//mal sehen wie weit wir mit der halben BrushSize kommen.
//TODO: why BRUSH_SIZE?
Point aPt( rPt );
-// const long nTmp = GetWrtShell().IsFrameView() ? BRUSH_SIZE/2 : BRUSH_SIZE;
+// const long nTmp = GetWrtShell().IsFrameView() ? BRUSH_SIZE/2 : BRUSH_SIZE;
const long nTmp = GetWrtShell().IsFrameView() ? 4 : 8;
aPt = GetEditWin().LogicToPixel( aPt );
aPt.X() -= aPt.X() % nTmp;
@@ -329,7 +329,7 @@ void SwView::SetVisArea( const Point &rPt, BOOL bUpdateScrollbar )
return;
const long lXDiff = aVisArea.Left() - aPt.X();
- const long lYDiff = aVisArea.Top() - aPt.Y();
+ const long lYDiff = aVisArea.Top() - aPt.Y();
SetVisArea( Rectangle( aPt,
Point( aVisArea.Right() - lXDiff, aVisArea.Bottom() - lYDiff ) ),
bUpdateScrollbar);
@@ -353,13 +353,13 @@ void SwView::CheckVisArea()
}
/*--------------------------------------------------------------------
- Beschreibung: Sichtbaren Bereich berechnen
+ Beschreibung: Sichtbaren Bereich berechnen
- OUT Point *pPt: neue Position des sichtbaren
+ OUT Point *pPt: neue Position des sichtbaren
Bereiches
- IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
+ IN Rectangle &rRect: Rechteck, das sich innerhalb des neuen
sichtbaren Bereiches befinden soll
- USHORT nRange optional exakte Angabe des Bereiches,
+ USHORT nRange optional exakte Angabe des Bereiches,
um den ggfs. gescrollt werden soll
--------------------------------------------------------------------*/
void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
@@ -377,12 +377,12 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
pPt->Y() = rRect.Top();
pPt->Y() = Max( lMin, pPt->Y() );
}
- else if ( rRect.Top() < aVisArea.Top() ) //Verschiebung nach oben
+ else if ( rRect.Top() < aVisArea.Top() ) //Verschiebung nach oben
{
pPt->Y() = rRect.Top() - (nRangeY != USHRT_MAX ? nRangeY : nYScroll);
pPt->Y() = Max( lMin, pPt->Y() );
}
- else if( rRect.Bottom() > aVisArea.Bottom() ) //Verschiebung nach unten
+ else if( rRect.Bottom() > aVisArea.Bottom() ) //Verschiebung nach unten
{
pPt->Y() = rRect.Bottom() -
(aVisArea.GetHeight()) + ( nRangeY != USHRT_MAX ?
@@ -390,14 +390,14 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
pPt->Y() = SetVScrollMax( pPt->Y() );
}
long nXScroll = GetXScroll();
- if ( rRect.Right() > aVisArea.Right() ) //Verschiebung nach rechts
+ if ( rRect.Right() > aVisArea.Right() ) //Verschiebung nach rechts
{
pPt->X() = rRect.Right() -
(aVisArea.GetWidth()) +
(nRangeX != USHRT_MAX ? nRangeX : nXScroll);
pPt->X() = SetHScrollMax( pPt->X() );
}
- else if ( rRect.Left() < aVisArea.Left() ) //Verschiebung nach links
+ else if ( rRect.Left() < aVisArea.Left() ) //Verschiebung nach links
{
pPt->X() = rRect.Left() - (nRangeX != USHRT_MAX ? nRangeX : nXScroll);
pPt->X() = Max( ::GetLeftMargin( *this ) + nLeftOfst, pPt->X() );
@@ -407,7 +407,7 @@ void SwView::CalcPt( Point *pPt, const Rectangle &rRect,
}
/*--------------------------------------------------------------------
- Beschreibung: Scrolling
+ Beschreibung: Scrolling
--------------------------------------------------------------------*/
BOOL SwView::IsScroll( const Rectangle &rRect ) const
{
@@ -446,7 +446,7 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
if ( nTopDiff < nBottomDiff )
{
if ( nBottomDiff > 0 ) // Ist unterhalb ueberhaupt Platz?
- { // dann verschieben wir die Oberkante und merken uns dies
+ { // dann verschieben wir die Oberkante und merken uns dies
nDiffY = aDlgRect.Bottom() - aVisArea.Top();
aVisArea.Top() += nDiffY;
}
@@ -518,7 +518,7 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
aPnt.Y() += ( rRect.Top() + rRect.Bottom()
- aVisArea.Top() - aVisArea.Bottom() ) / 2 - nDiffY;
// ... in X-Richtung nur, wenn das Rechteck rechts oder links aus der
- // VisArea hinausragt.
+ // VisArea hinausragt.
if ( rRect.Right() > aVisArea.Right() || rRect.Left() < aVisArea.Left() )
{
aPnt.X() += ( rRect.Left() + rRect.Right()
@@ -537,7 +537,7 @@ void SwView::Scroll( const Rectangle &rRect, USHORT nRangeX, USHORT nRangeY )
}
/*--------------------------------------------------------------------
- Beschreibung: Seitenweises Scrollen
+ Beschreibung: Seitenweises Scrollen
Liefern den Wert, um den bei PageUp / -Down gescrollt werden soll
--------------------------------------------------------------------*/
BOOL SwView::GetPageScrollUpOffset( SwTwips &rOff ) const
@@ -674,7 +674,7 @@ long SwView::PageDownCrsr(BOOL bSelect)
}
/*------------------------------------------------------------------------
- Beschreibung: Handler der Scrollbars
+ Beschreibung: Handler der Scrollbars
------------------------------------------------------------------------*/
IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
{
@@ -689,7 +689,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
{
//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.
+ // so we dont must do it agin.
EndScrollHdl(pScrollbar);
Point aPos( aVisArea.TopLeft() );
@@ -702,9 +702,9 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
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.
+ // so we dont must do it agin.
// if(!GetViewFrame()->GetFrame().IsInPlace())
-// S F X_BINDINGS().Update(FN_STAT_PAGE);
+// S F X_BINDINGS().Update(FN_STAT_PAGE);
//QuickHelp:
if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() )
@@ -716,8 +716,8 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
pScrollbar->GetPosPixel() ).X() -8;
aRect.Top() = pScrollbar->OutputToScreenPixel(
pScrollbar->GetPointerPosPixel() ).Y();
- aRect.Right() = aRect.Left();
- aRect.Bottom() = aRect.Top();
+ aRect.Right() = aRect.Left();
+ aRect.Bottom() = aRect.Top();
String sPageStr( GetPageStr( nPhNum, nVirtNum, sDisplay ));
SwContentAtPos aCnt( SwContentAtPos::SW_OUTLINE );
@@ -748,7 +748,7 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
}
/*------------------------------------------------------------------------
- Beschreibung: Handler der Scrollbars
+ Beschreibung: Handler der Scrollbars
------------------------------------------------------------------------*/
IMPL_LINK( SwView, EndScrollHdl, SwScrollbar *, pScrollbar )
{
@@ -807,8 +807,8 @@ void SwView::CalcVisArea( const Size &rOutPixel )
const long lHeight = GetWrtShell().GetDocSize().Height() + lBorder;
if ( aRect.Bottom() > lHeight )
{
- long lDelta = aRect.Bottom() - lHeight;
- aRect.Top() -= lDelta;
+ long lDelta = aRect.Bottom() - lHeight;
+ aRect.Top() -= lDelta;
aRect.Bottom() -= lDelta;
}
}
@@ -818,7 +818,7 @@ void SwView::CalcVisArea( const Size &rOutPixel )
}
/*--------------------------------------------------------------------
- Beschreibung: Bedienelemente neu anordnen
+ Beschreibung: Bedienelemente neu anordnen
--------------------------------------------------------------------*/
void SwView::CalcAndSetBorderPixel( SvBorder &rToFill, BOOL /*bInner*/ )
{
@@ -911,7 +911,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
+// #46802 VCL ruft an unsichtbaren Fenstern kein Resize
// fuer das Lineal ist das aber keine gute Idee
if(!pHLineal->IsVisible())
pHLineal->Resize();
@@ -958,7 +958,7 @@ void ViewResizePixel( const Window &rRef,
if(!bHidePageButtons)
aSize.Height() -= nSubSize;
else
- aImgSz.Width() = 0; // kein Hide, weil das im Update Scrollbar missverstanden wird
+ aImgSz.Width() = 0; // kein Hide, weil das im Update Scrollbar missverstanden wird
if ( nHBSzHeight )
aSize.Height() -= nHBSzHeight;
@@ -981,7 +981,7 @@ void ViewResizePixel( const Window &rRef,
aScrollFillPos.X() = aPos.X();
rScrollBarBox.SetPosSizePixel( aScrollFillPos,
- Size( nHBSzHeight, nVBSzWidth) );
+ Size( nHBSzHeight, nVBSzWidth) );
}
}
}
@@ -1052,7 +1052,7 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize )
const Fraction aFrac( nZoom, 100 );
pVRuler->SetZoom( aFrac );
pHRuler->SetZoom( aFrac );
- InvalidateRulerPos(); //Inhalt invalidieren.
+ InvalidateRulerPos(); //Inhalt invalidieren.
}
//CursorStack zuruecksetzen, da die Cursorpositionen fuer PageUp/-Down
//nicht mehr zum aktuell sichtbaren Bereich passen
@@ -1080,7 +1080,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
// FME 22.08.2003 #i16909# - return, if no size (caused by minimize window).
if ( bInOuterResizePixel || ( !rSize.Width() && !rSize.Height() ) )
return;
- bInOuterResizePixel = TRUE;
+ bInOuterResizePixel = TRUE;
// feststellen, ob Scrollbars angezeigt werden duerfen
BOOL bBrowse = pWrtShell->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE);
@@ -1151,7 +1151,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
ShowAtResize();
if( pHRuler->IsVisible() || pVRuler->IsVisible() )
- InvalidateRulerPos(); //Inhalt invalidieren.
+ InvalidateRulerPos(); //Inhalt invalidieren.
//CursorStack zuruecksetzen, da die Cursorpositionen fuer PageUp/-Down
//nicht mehr zum aktuell sichtbaren Bereich passen
@@ -1187,7 +1187,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize )
//Nicht endlosschleifen. Moeglichst dann stoppen wenn die
//(Auto-)Scrollbars sichtbar sind.
- if ( bRepeat &&
+ if ( bRepeat &&
( nCnt > 10 || ( nCnt > 3 && bHAuto && bAuto ) )
)
{
@@ -1304,7 +1304,7 @@ BOOL SwView::UpdateScrollbars()
void SwView::Move()
{
if ( GetWrtShell().IsInSelect() )
- GetWrtShell().EndSelect(); //#32427#
+ GetWrtShell().EndSelect(); //#32427#
SfxViewShell::Move();
}
@@ -1324,7 +1324,7 @@ BOOL SwView::HandleWheelCommands( const CommandEvent& rCEvt )
bOk = TRUE;
}
else
- {
+ {
if (pWData && (COMMAND_WHEEL_SCROLL==pWData->GetMode()) && (((ULONG)0xFFFFFFFF) == pWData->GetScrollLines()))
{
if (pWData->GetDelta()<0)