diff options
Diffstat (limited to 'svx/source/svdraw/svdpntv.cxx')
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 101 |
1 files changed, 52 insertions, 49 deletions
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index f9ab9e9a28..2bc11793b8 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1,10 +1,11 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -145,7 +146,7 @@ void ImplEncirclementOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPos SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const { - for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); a++) + for(SdrPaintWindowVector::const_iterator a = maPaintWindows.begin(); a != maPaintWindows.end(); ++a) { if(&((*a)->GetOutputDevice()) == &rOut) { @@ -187,7 +188,7 @@ SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld) } OutputDevice* SdrPaintView::GetFirstOutputDevice() const -{ +{ if(PaintWindowCount()) { return &(GetPaintWindow(0)->GetOutputDevice()); @@ -279,7 +280,7 @@ SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut) pMod=pModel1; ImpClearVars(); - if(pOut) + if(pOut) { AddWindowToPaintView(pOut); } @@ -301,7 +302,7 @@ SdrPaintView::~SdrPaintView() ClearPageView(); #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { delete pItemBrowser; } @@ -398,7 +399,7 @@ void SdrPaintView::ModelHasChanged() } #ifdef DBG_UTIL - if(pItemBrowser) + if(pItemBrowser) { pItemBrowser->SetDirty(); } @@ -414,7 +415,7 @@ BOOL SdrPaintView::IsAction() const void SdrPaintView::MovAction(const Point& rPnt) { - if (IsEncirclement()) + if (IsEncirclement()) { MovEncirclement(rPnt); } @@ -422,7 +423,7 @@ void SdrPaintView::MovAction(const Point& rPnt) void SdrPaintView::EndAction() { - if(IsEncirclement()) + if(IsEncirclement()) { EndEncirclement(); } @@ -440,7 +441,7 @@ void SdrPaintView::BrkAction() void SdrPaintView::TakeActionRect(Rectangle& rRect) const { - if(IsEncirclement()) + if(IsEncirclement()) { rRect = Rectangle(aDragStat.GetStart(),aDragStat.GetNow()); } @@ -464,7 +465,7 @@ SdrPageView* SdrPaintView::GetTextEditPageView() const USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const { if (nMinMov>=0) return USHORT(nMinMov); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -478,7 +479,7 @@ USHORT SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) USHORT SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const { if (nHitTol>=0) return USHORT(nHitTol); - if (pOut==NULL) + if (pOut==NULL) { pOut = GetFirstOutputDevice(); } @@ -520,7 +521,7 @@ void SdrPaintView::BegEncirclement(const Point& rPnt) void SdrPaintView::MovEncirclement(const Point& rPnt) { - if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) + if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) { aDragStat.NextMove(rPnt); @@ -536,10 +537,10 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) if(IsEncirclement()) { - if(aDragStat.IsMinMoved()) + if(aDragStat.IsMinMoved()) { aRetval = Rectangle(aDragStat.GetStart(), aDragStat.GetNow()); - + if(!bNoJustify) { aRetval.Justify(); @@ -555,7 +556,7 @@ Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) void SdrPaintView::BrkEncirclement() { - if(IsEncirclement()) + if(IsEncirclement()) { DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)"); delete mpEncirclementOverlay; @@ -616,7 +617,7 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -638,7 +639,7 @@ void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin) } #ifdef DBG_UTIL - if (pItemBrowser!=NULL) + if (pItemBrowser!=NULL) pItemBrowser->ForceParent(); #endif } @@ -687,7 +688,7 @@ bool SdrPaintView::IsLayerLocked(const XubString& rName) const { return mpPageView->IsLayerLocked(rName); } - + return false; } @@ -766,11 +767,11 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c #endif // SVX_REPAINT_TIMER_TEST // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType()) { Window* pWindow = (Window*)pOut; @@ -788,7 +789,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -964,11 +965,11 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& if(pKnownTarget) { // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region - // rReg may be made more granular (fine) with using it. Normally, rReg - // does come from Window::Paint() anyways and thus is based on a single + // rReg may be made more granular (fine) with using it. Normally, rReg + // does come from Window::Paint() anyways and thus is based on a single // rectangle which was derived from exactly that repaint region Region aOptimizedRepaintRegion(rReg); - + // #i76114# Intersecting the region with the Window's paint region is disabled // for print preview in Calc, because the intersection can be empty (if the paint // region is outside of the table area of the page), and then no clip region @@ -990,7 +991,7 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region& { RegionHandle aRegionHandle(aOptimizedRepaintRegion.BeginEnumRects()); Rectangle aRegionRectangle; - + while(aOptimizedRepaintRegion.GetEnumRects(aRegionHandle, aRegionRectangle)) { pWindow->SetLineColor(COL_LIGHTGREEN); @@ -1083,7 +1084,7 @@ void SdrPaintView::GlueInvalidate() const { SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); @@ -1111,7 +1112,7 @@ void SdrPaintView::InvalidateAllWin() { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { InvalidateOneWin((Window&)pPaintWindow->GetOutputDevice()); } @@ -1126,12 +1127,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) { SdrPaintWindow* pPaintWindow = GetPaintWindow(a); - if(pPaintWindow->OutputToWindow()) + if(pPaintWindow->OutputToWindow()) { OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); Rectangle aRect(rRect); - if(bPlus1Pix) + if(bPlus1Pix) { Size aPixSiz(1,1); Size aSiz(rOutDev.PixelToLogic(aPixSiz)); @@ -1140,12 +1141,12 @@ void SdrPaintView::InvalidateAllWin(const Rectangle& rRect, BOOL bPlus1Pix) aRect.Right ()+=aSiz.Width(); aRect.Bottom()+=aSiz.Height(); } - + Point aOrg(rOutDev.GetMapMode().GetOrigin()); aOrg.X()=-aOrg.X(); aOrg.Y()=-aOrg.Y(); Rectangle aOutRect(aOrg, rOutDev.GetOutputSize()); - - if (aRect.IsOver(aOutRect)) + + if (aRect.IsOver(aOutRect)) { InvalidateOneWin((Window&)rOutDev, aRect); } @@ -1388,16 +1389,16 @@ void SdrPaintView::DoConnect(SdrOle2Obj* /*pOleObj*/) { } -void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) -{ - SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); +void SdrPaintView::SetAnimationEnabled( BOOL bEnable ) +{ + SetAnimationMode( bEnable ? SDR_ANIMATION_ANIMATE : SDR_ANIMATION_DISABLE ); } -void SdrPaintView::SetAnimationPause( bool bSet ) -{ +void SdrPaintView::SetAnimationPause( bool bSet ) +{ if((bool)bAnimationPause != bSet) { - bAnimationPause = bSet; + bAnimationPause = bSet; if(mpPageView) { @@ -1416,9 +1417,9 @@ void SdrPaintView::SetAnimationPause( bool bSet ) } } -void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) -{ - eAnimationMode = eMode; +void SdrPaintView::SetAnimationMode( const SdrAnimationMode eMode ) +{ + eAnimationMode = eMode; } void SdrPaintView::VisAreaChanged(const OutputDevice* pOut) @@ -1489,8 +1490,8 @@ void SdrPaintView::SetApplicationDocumentColor(Color aDocumentColor) } // #114898# -bool SdrPaintView::IsBufferedOutputAllowed() const -{ +bool SdrPaintView::IsBufferedOutputAllowed() const +{ return (mbBufferedOutputAllowed && maDrawinglayerOpt.IsPaintBuffer()); } @@ -1503,8 +1504,8 @@ void SdrPaintView::SetBufferedOutputAllowed(bool bNew) } } -bool SdrPaintView::IsBufferedOverlayAllowed() const -{ +bool SdrPaintView::IsBufferedOverlayAllowed() const +{ return (mbBufferedOverlayAllowed && maDrawinglayerOpt.IsOverlayBuffer()); } @@ -1516,9 +1517,9 @@ void SdrPaintView::SetBufferedOverlayAllowed(bool bNew) } } -sal_Bool SdrPaintView::IsPagePaintingAllowed() const -{ - return mbPagePaintingAllowed; +sal_Bool SdrPaintView::IsPagePaintingAllowed() const +{ + return mbPagePaintingAllowed; } void SdrPaintView::SetPagePaintingAllowed(bool bNew) @@ -1546,3 +1547,5 @@ void SdrPaintView::SetAnimationTimer(sal_uInt32 nTime) } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |