Kaydet (Commit) cee1991a authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of SwViewShellImp

Change-Id: I36fb0314f8d946b3aeb9fcf6d4cdc711ca79a84e
üst 9b3495b4
...@@ -61,33 +61,33 @@ class SwViewShellImp ...@@ -61,33 +61,33 @@ class SwViewShellImp
// for paint of page preview // for paint of page preview
friend class SwPagePreviewLayout; friend class SwPagePreviewLayout;
SwViewShell *pSh; // If someone passes an Imp, but needs a SwViewShell, we SwViewShell *m_pShell; // If someone passes an Imp, but needs a SwViewShell, we
// keep a backlink here // keep a backlink here
SwDrawView *pDrawView; // Our DrawView SwDrawView *m_pDrawView; // Our DrawView
SdrPageView *pSdrPageView; // Exactly one Page for our DrawView SdrPageView *m_pSdrPageView; // Exactly one Page for our DrawView
SwPageFrm *pFirstVisPage; // Always points to the first visible Page SwPageFrm *m_pFirstVisiblePage; // Always points to the first visible Page
SwRegionRects *pRegion; // Collector of Paintrects from the LayAction SwRegionRects *m_pRegion; // Collector of Paintrects from the LayAction
SwLayAction *pLayAct; // Is set if an Action object exists SwLayAction *m_pLayAction; // Is set if an Action object exists
// Is registered by the SwLayAction ctor and deregistered by the dtor // Is registered by the SwLayAction ctor and deregistered by the dtor
SwLayIdle *pIdleAct; // The same as SwLayAction for SwLayIdle SwLayIdle *m_pIdleAct; // The same as SwLayAction for SwLayIdle
SwAccessibleMap *pAccMap; // Accessible wrappers SwAccessibleMap *m_pAccessibleMap; // Accessible wrappers
mutable const SdrObject * pSdrObjCached; mutable const SdrObject * m_pSdrObjectCached;
mutable OUString sSdrObjCachedComment; mutable OUString m_sSdrObjectCachedComment;
bool bFirstPageInvalid : 1; // Pointer to the first Page invalid? bool m_bFirstPageInvalid : 1; // Pointer to the first Page invalid?
bool bResetHdlHiddenPaint : 1; // Ditto bool m_bResetHdlHiddenPaint : 1; // Ditto
bool bSmoothUpdate : 1; // For SmoothScroll bool m_bSmoothUpdate : 1; // For SmoothScroll
bool bStopSmooth : 1; bool m_bStopSmooth : 1;
sal_uInt16 nRestoreActions ; // Count for the Action that need to be restored (UNO) sal_uInt16 m_nRestoreActions ; // Count for the Action that need to be restored (UNO)
SwRect aSmoothRect; SwRect m_aSmoothRect;
SwPagePreviewLayout* mpPgPreviewLayout; SwPagePreviewLayout* m_pPagePreviewLayout;
void SetFirstVisPage(OutputDevice* pRenderContext); // Recalculate the first visible Page void SetFirstVisPage(OutputDevice* pRenderContext); // Recalculate the first visible Page
...@@ -140,26 +140,26 @@ public: ...@@ -140,26 +140,26 @@ public:
~SwViewShellImp(); ~SwViewShellImp();
void Init( const SwViewOption * ); /// Only for SwViewShell::Init() void Init( const SwViewOption * ); /// Only for SwViewShell::Init()
const SwViewShell *GetShell() const { return pSh; } const SwViewShell *GetShell() const { return m_pShell; }
SwViewShell *GetShell() { return pSh; } SwViewShell *GetShell() { return m_pShell; }
Color GetRetoucheColor() const; Color GetRetoucheColor() const;
/// Management of the first visible Page /// Management of the first visible Page
const SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext) const; const SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext) const;
SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext); SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext);
void SetFirstVisPageInvalid() { bFirstPageInvalid = true; } void SetFirstVisPageInvalid() { m_bFirstPageInvalid = true; }
bool AddPaintRect( const SwRect &rRect ); bool AddPaintRect( const SwRect &rRect );
SwRegionRects *GetRegion() { return pRegion; } SwRegionRects *GetRegion() { return m_pRegion; }
void DelRegion(); void DelRegion();
/// New Interface for StarView Drawing /// New Interface for StarView Drawing
bool HasDrawView() const { return 0 != pDrawView; } bool HasDrawView() const { return 0 != m_pDrawView; }
SwDrawView* GetDrawView() { return pDrawView; } SwDrawView* GetDrawView() { return m_pDrawView; }
const SwDrawView* GetDrawView() const { return pDrawView; } const SwDrawView* GetDrawView() const { return m_pDrawView; }
SdrPageView*GetPageView() { return pSdrPageView; } SdrPageView*GetPageView() { return m_pSdrPageView; }
const SdrPageView*GetPageView() const { return pSdrPageView; } const SdrPageView*GetPageView() const { return m_pSdrPageView; }
void MakeDrawView(); void MakeDrawView();
/** /**
...@@ -187,10 +187,10 @@ public: ...@@ -187,10 +187,10 @@ public:
void NotifySizeChg( const Size &rNewSz ); void NotifySizeChg( const Size &rNewSz );
/// SS for the Lay-/IdleAction and relatives /// SS for the Lay-/IdleAction and relatives
bool IsAction() const { return pLayAct != 0; } bool IsAction() const { return m_pLayAction != 0; }
bool IsIdleAction() const { return pIdleAct != 0; } bool IsIdleAction() const { return m_pIdleAct != 0; }
SwLayAction &GetLayAction() { return *pLayAct; } SwLayAction &GetLayAction() { return *m_pLayAction; }
const SwLayAction &GetLayAction() const { return *pLayAct; } const SwLayAction &GetLayAction() const { return *m_pLayAction; }
/** /**
* If an Action is running we ask it to check whether it's time * If an Action is running we ask it to check whether it's time
...@@ -208,18 +208,18 @@ public: ...@@ -208,18 +208,18 @@ public:
*/ */
bool IsUpdateExpFields(); bool IsUpdateExpFields();
void SetRestoreActions(sal_uInt16 nSet){nRestoreActions = nSet;} void SetRestoreActions(sal_uInt16 nSet){m_nRestoreActions = nSet;}
sal_uInt16 GetRestoreActions() const{return nRestoreActions;} sal_uInt16 GetRestoreActions() const{return m_nRestoreActions;}
void InitPagePreviewLayout(); void InitPagePreviewLayout();
inline SwPagePreviewLayout* PagePreviewLayout() inline SwPagePreviewLayout* PagePreviewLayout()
{ {
return mpPgPreviewLayout; return m_pPagePreviewLayout;
} }
/// Is this view accessible? /// Is this view accessible?
bool IsAccessible() const { return pAccMap != 0; } bool IsAccessible() const { return m_pAccessibleMap != 0; }
inline SwAccessibleMap& GetAccessibleMap(); inline SwAccessibleMap& GetAccessibleMap();
...@@ -272,10 +272,10 @@ public: ...@@ -272,10 +272,10 @@ public:
inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap() inline SwAccessibleMap& SwViewShellImp::GetAccessibleMap()
{ {
if( !pAccMap ) if( !m_pAccessibleMap )
CreateAccessibleMap(); CreateAccessibleMap();
return *pAccMap; return *m_pAccessibleMap;
} }
inline void SwViewShellImp::DisposeAccessibleFrm( const SwFrm *pFrm, inline void SwViewShellImp::DisposeAccessibleFrm( const SwFrm *pFrm,
......
...@@ -276,14 +276,14 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) : ...@@ -276,14 +276,14 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) :
// OD 14.04.2003 #106346# - init new flag <mbFormatContentOnInterrupt>. // OD 14.04.2003 #106346# - init new flag <mbFormatContentOnInterrupt>.
mbFormatContentOnInterrupt = false; mbFormatContentOnInterrupt = false;
assert(!pImp->pLayAct); // there can be only one SwLayAction assert(!pImp->m_pLayAction); // there can be only one SwLayAction
pImp->pLayAct = this; // register there pImp->m_pLayAction = this; // register there
} }
SwLayAction::~SwLayAction() SwLayAction::~SwLayAction()
{ {
OSL_ENSURE( !pWait, "Wait object not destroyed" ); OSL_ENSURE( !pWait, "Wait object not destroyed" );
pImp->pLayAct = 0; // unregister pImp->m_pLayAction = 0; // unregister
} }
void SwLayAction::Reset() void SwLayAction::Reset()
...@@ -2118,7 +2118,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : ...@@ -2118,7 +2118,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
{ {
SAL_INFO("sw.idle", "SwLayIdle() entry"); SAL_INFO("sw.idle", "SwLayIdle() entry");
pImp->pIdleAct = this; pImp->m_pIdleAct = this;
SHOW_IDLE( COL_LIGHTRED ); SHOW_IDLE( COL_LIGHTRED );
...@@ -2306,7 +2306,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : ...@@ -2306,7 +2306,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
SwLayIdle::~SwLayIdle() SwLayIdle::~SwLayIdle()
{ {
pImp->pIdleAct = 0; pImp->m_pIdleAct = 0;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -1048,8 +1048,8 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan ...@@ -1048,8 +1048,8 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan
// prepare paint // prepare paint
if ( maPreviewPages.size() > 0 ) if ( maPreviewPages.size() > 0 )
{ {
mrParentViewShell.Imp()->bFirstPageInvalid = false; mrParentViewShell.Imp()->m_bFirstPageInvalid = false;
mrParentViewShell.Imp()->pFirstVisPage = mrParentViewShell.Imp()->m_pFirstVisiblePage =
const_cast<SwPageFrm*>(maPreviewPages[0]->pPage); const_cast<SwPageFrm*>(maPreviewPages[0]->pPage);
} }
...@@ -1197,8 +1197,8 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const ...@@ -1197,8 +1197,8 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const
// prepare paint // prepare paint
if ( maPreviewPages.size() > 0 ) if ( maPreviewPages.size() > 0 )
{ {
mrParentViewShell.Imp()->bFirstPageInvalid = false; mrParentViewShell.Imp()->m_bFirstPageInvalid = false;
mrParentViewShell.Imp()->pFirstVisPage = mrParentViewShell.Imp()->m_pFirstVisiblePage =
const_cast<SwPageFrm*>(maPreviewPages[0]->pPage); const_cast<SwPageFrm*>(maPreviewPages[0]->pPage);
} }
......
...@@ -48,8 +48,8 @@ void SwViewShellImp::StartAction() ...@@ -48,8 +48,8 @@ void SwViewShellImp::StartAction()
if ( HasDrawView() ) if ( HasDrawView() )
{ {
SET_CURR_SHELL( GetShell() ); SET_CURR_SHELL( GetShell() );
if ( pSh->ISA(SwFEShell) ) if ( m_pShell->ISA(SwFEShell) )
static_cast<SwFEShell*>(pSh)->HideChainMarker(); // might have changed static_cast<SwFEShell*>(m_pShell)->HideChainMarker(); // might have changed
} }
} }
...@@ -58,8 +58,8 @@ void SwViewShellImp::EndAction() ...@@ -58,8 +58,8 @@ void SwViewShellImp::EndAction()
if ( HasDrawView() ) if ( HasDrawView() )
{ {
SET_CURR_SHELL( GetShell() ); SET_CURR_SHELL( GetShell() );
if ( pSh->ISA(SwFEShell) ) if ( m_pShell->ISA(SwFEShell) )
static_cast<SwFEShell*>(pSh)->SetChainMarker(); // might have changed static_cast<SwFEShell*>(m_pShell)->SetChainMarker(); // might have changed
} }
} }
...@@ -67,18 +67,18 @@ void SwViewShellImp::LockPaint() ...@@ -67,18 +67,18 @@ void SwViewShellImp::LockPaint()
{ {
if ( HasDrawView() ) if ( HasDrawView() )
{ {
bResetHdlHiddenPaint = !GetDrawView()->areMarkHandlesHidden(); m_bResetHdlHiddenPaint = !GetDrawView()->areMarkHandlesHidden();
GetDrawView()->hideMarkHandles(); GetDrawView()->hideMarkHandles();
} }
else else
{ {
bResetHdlHiddenPaint = false; m_bResetHdlHiddenPaint = false;
} }
} }
void SwViewShellImp::UnlockPaint() void SwViewShellImp::UnlockPaint()
{ {
if ( bResetHdlHiddenPaint ) if ( m_bResetHdlHiddenPaint )
GetDrawView()->showMarkHandles(); GetDrawView()->showMarkHandles();
} }
...@@ -204,8 +204,8 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz ) ...@@ -204,8 +204,8 @@ void SwViewShellImp::NotifySizeChg( const Size &rNewSz )
if ( !bCheckDrawObjs ) if ( !bCheckDrawObjs )
return; return;
OSL_ENSURE( pSh->getIDocumentDrawModelAccess().GetDrawModel(), "NotifySizeChg without DrawModel" ); OSL_ENSURE( m_pShell->getIDocumentDrawModelAccess().GetDrawModel(), "NotifySizeChg without DrawModel" );
SdrPage* pPage = pSh->getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 ); SdrPage* pPage = m_pShell->getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 );
const size_t nObjs = pPage->GetObjCount(); const size_t nObjs = pPage->GetObjCount();
for( size_t nObj = 0; nObj < nObjs; ++nObj ) for( size_t nObj = 0; nObj < nObjs; ++nObj )
{ {
......
...@@ -43,106 +43,106 @@ ...@@ -43,106 +43,106 @@
void SwViewShellImp::Init( const SwViewOption *pNewOpt ) void SwViewShellImp::Init( const SwViewOption *pNewOpt )
{ {
OSL_ENSURE( pDrawView, "SwViewShellImp::Init without DrawView" ); OSL_ENSURE( m_pDrawView, "SwViewShellImp::Init without DrawView" );
//Create PageView if it doesn't exist //Create PageView if it doesn't exist
SwRootFrm *pRoot = pSh->GetLayout(); SwRootFrm *pRoot = m_pShell->GetLayout();
if ( !pSdrPageView ) if ( !m_pSdrPageView )
{ {
IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess(); IDocumentDrawModelAccess& rIDDMA = m_pShell->getIDocumentDrawModelAccess();
if ( !pRoot->GetDrawPage() ) if ( !pRoot->GetDrawPage() )
pRoot->SetDrawPage( rIDDMA.GetDrawModel()->GetPage( 0 ) ); pRoot->SetDrawPage( rIDDMA.GetDrawModel()->GetPage( 0 ) );
if ( pRoot->GetDrawPage()->GetSize() != pRoot->Frm().SSize() ) if ( pRoot->GetDrawPage()->GetSize() != pRoot->Frm().SSize() )
pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() ); pRoot->GetDrawPage()->SetSize( pRoot->Frm().SSize() );
pSdrPageView = pDrawView->ShowSdrPage( pRoot->GetDrawPage()); m_pSdrPageView = m_pDrawView->ShowSdrPage( pRoot->GetDrawPage());
// OD 26.06.2003 #108784# - notify drawing page view about invisible // OD 26.06.2003 #108784# - notify drawing page view about invisible
// layers. // layers.
rIDDMA.NotifyInvisibleLayers( *pSdrPageView ); rIDDMA.NotifyInvisibleLayers( *m_pSdrPageView );
} }
pDrawView->SetDragStripes( pNewOpt->IsCrossHair() ); m_pDrawView->SetDragStripes( pNewOpt->IsCrossHair() );
pDrawView->SetGridSnap( pNewOpt->IsSnap() ); m_pDrawView->SetGridSnap( pNewOpt->IsSnap() );
pDrawView->SetGridVisible( pNewOpt->IsGridVisible() ); m_pDrawView->SetGridVisible( pNewOpt->IsGridVisible() );
const Size &rSz = pNewOpt->GetSnapSize(); const Size &rSz = pNewOpt->GetSnapSize();
pDrawView->SetGridCoarse( rSz ); m_pDrawView->SetGridCoarse( rSz );
const Size aFSize const Size aFSize
( rSz.Width() ? rSz.Width() /std::max(short(1),pNewOpt->GetDivisionX()):0, ( rSz.Width() ? rSz.Width() /std::max(short(1),pNewOpt->GetDivisionX()):0,
rSz.Height()? rSz.Height()/std::max(short(1),pNewOpt->GetDivisionY()):0); rSz.Height()? rSz.Height()/std::max(short(1),pNewOpt->GetDivisionY()):0);
pDrawView->SetGridFine( aFSize ); m_pDrawView->SetGridFine( aFSize );
Fraction aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1); Fraction aSnGrWdtX(rSz.Width(), pNewOpt->GetDivisionX() + 1);
Fraction aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1); Fraction aSnGrWdtY(rSz.Height(), pNewOpt->GetDivisionY() + 1);
pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY ); m_pDrawView->SetSnapGridWidth( aSnGrWdtX, aSnGrWdtY );
if ( pRoot->Frm().HasArea() ) if ( pRoot->Frm().HasArea() )
pDrawView->SetWorkArea( pRoot->Frm().SVRect() ); m_pDrawView->SetWorkArea( pRoot->Frm().SVRect() );
if ( GetShell()->IsPreview() ) if ( GetShell()->IsPreview() )
pDrawView->SetAnimationEnabled( false ); m_pDrawView->SetAnimationEnabled( false );
pDrawView->SetUseIncompatiblePathCreateInterface( false ); m_pDrawView->SetUseIncompatiblePathCreateInterface( false );
// set handle size to 9 pixels, always // set handle size to 9 pixels, always
pDrawView->SetMarkHdlSizePixel(9); m_pDrawView->SetMarkHdlSizePixel(9);
} }
/// CTor for the core internals /// CTor for the core internals
SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) : SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) :
pSh( pParent ), m_pShell( pParent ),
pDrawView( 0 ), m_pDrawView( 0 ),
pSdrPageView( 0 ), m_pSdrPageView( 0 ),
pFirstVisPage( 0 ), m_pFirstVisiblePage( 0 ),
pRegion( 0 ), m_pRegion( 0 ),
pLayAct( 0 ), m_pLayAction( 0 ),
pIdleAct( 0 ), m_pIdleAct( 0 ),
pAccMap( 0 ), m_pAccessibleMap( 0 ),
pSdrObjCached(NULL), m_pSdrObjectCached(NULL),
bFirstPageInvalid( true ), m_bFirstPageInvalid( true ),
bResetHdlHiddenPaint( false ), m_bResetHdlHiddenPaint( false ),
bSmoothUpdate( false ), m_bSmoothUpdate( false ),
bStopSmooth( false ), m_bStopSmooth( false ),
nRestoreActions( 0 ), m_nRestoreActions( 0 ),
// OD 12.12.2002 #103492# // OD 12.12.2002 #103492#
mpPgPreviewLayout( 0 ) m_pPagePreviewLayout( 0 )
{ {
} }
SwViewShellImp::~SwViewShellImp() SwViewShellImp::~SwViewShellImp()
{ {
delete pAccMap; delete m_pAccessibleMap;
// OD 12.12.2002 #103492# // OD 12.12.2002 #103492#
delete mpPgPreviewLayout; delete m_pPagePreviewLayout;
//JP 29.03.96: after ShowSdrPage HideSdrPage must also be executed!!! //JP 29.03.96: after ShowSdrPage HideSdrPage must also be executed!!!
if( pDrawView ) if( m_pDrawView )
pDrawView->HideSdrPage(); m_pDrawView->HideSdrPage();
delete pDrawView; delete m_pDrawView;
DelRegion(); DelRegion();
OSL_ENSURE( !pLayAct, "Have action for the rest of your life." ); OSL_ENSURE( !m_pLayAction, "Have action for the rest of your life." );
OSL_ENSURE( !pIdleAct,"Be idle for the rest of your life." ); OSL_ENSURE( !m_pIdleAct,"Be idle for the rest of your life." );
} }
void SwViewShellImp::DelRegion() void SwViewShellImp::DelRegion()
{ {
DELETEZ(pRegion); DELETEZ(m_pRegion);
} }
bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
{ {
// In case of tiled rendering the visual area is the last painted tile -> not interesting. // In case of tiled rendering the visual area is the last painted tile -> not interesting.
if ( rRect.IsOver( pSh->VisArea() ) || pSh->isTiledRendering() ) if ( rRect.IsOver( m_pShell->VisArea() ) || m_pShell->isTiledRendering() )
{ {
if ( !pRegion ) if ( !m_pRegion )
{ {
// In case of normal rendering, this makes sure only visible rectangles are painted. // In case of normal rendering, this makes sure only visible rectangles are painted.
// Otherwise get the rectangle of the full document, so all paint rectangles are invalidated. // Otherwise get the rectangle of the full document, so all paint rectangles are invalidated.
const SwRect& rArea = pSh->isTiledRendering() ? pSh->GetLayout()->Frm() : pSh->VisArea(); const SwRect& rArea = m_pShell->isTiledRendering() ? m_pShell->GetLayout()->Frm() : m_pShell->VisArea();
pRegion = new SwRegionRects( rArea ); m_pRegion = new SwRegionRects( rArea );
} }
(*pRegion) -= rRect; (*m_pRegion) -= rRect;
return true; return true;
} }
return false; return false;
...@@ -150,20 +150,20 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect ) ...@@ -150,20 +150,20 @@ bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
void SwViewShellImp::CheckWaitCrsr() void SwViewShellImp::CheckWaitCrsr()
{ {
if ( pLayAct ) if ( m_pLayAction )
pLayAct->CheckWaitCrsr(); m_pLayAction->CheckWaitCrsr();
} }
bool SwViewShellImp::IsCalcLayoutProgress() const bool SwViewShellImp::IsCalcLayoutProgress() const
{ {
return pLayAct && pLayAct->IsCalcLayout(); return m_pLayAction && m_pLayAction->IsCalcLayout();
} }
bool SwViewShellImp::IsUpdateExpFields() bool SwViewShellImp::IsUpdateExpFields()
{ {
if ( pLayAct && pLayAct->IsCalcLayout() ) if ( m_pLayAction && m_pLayAction->IsCalcLayout() )
{ {
pLayAct->SetUpdateExpFields(); m_pLayAction->SetUpdateExpFields();
return true; return true;
} }
return false; return false;
...@@ -171,23 +171,23 @@ bool SwViewShellImp::IsUpdateExpFields() ...@@ -171,23 +171,23 @@ bool SwViewShellImp::IsUpdateExpFields()
void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext) void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext)
{ {
if ( pSh->mbDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() ) if ( m_pShell->mbDocSizeChgd && m_pShell->VisArea().Top() > m_pShell->GetLayout()->Frm().Height() )
{ {
//We are in an action and because of erase actions the VisArea is //We are in an action and because of erase actions the VisArea is
//after the first visible page. //after the first visible page.
//To avoid excessive formatting, hand back the last page. //To avoid excessive formatting, hand back the last page.
pFirstVisPage = static_cast<SwPageFrm*>(pSh->GetLayout()->Lower()); m_pFirstVisiblePage = static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower());
while ( pFirstVisPage && pFirstVisPage->GetNext() ) while ( m_pFirstVisiblePage && m_pFirstVisiblePage->GetNext() )
pFirstVisPage = static_cast<SwPageFrm*>(pFirstVisPage->GetNext()); m_pFirstVisiblePage = static_cast<SwPageFrm*>(m_pFirstVisiblePage->GetNext());
} }
else else
{ {
const SwViewOption* pSwViewOption = GetShell()->GetViewOptions(); const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
const bool bBookMode = pSwViewOption->IsViewLayoutBookMode(); const bool bBookMode = pSwViewOption->IsViewLayoutBookMode();
SwPageFrm *pPage = static_cast<SwPageFrm*>(pSh->GetLayout()->Lower()); SwPageFrm *pPage = static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower());
SwRect aPageRect = pPage->GetBoundRect(pRenderContext); SwRect aPageRect = pPage->GetBoundRect(pRenderContext);
while ( pPage && !aPageRect.IsOver( pSh->VisArea() ) ) while ( pPage && !aPageRect.IsOver( m_pShell->VisArea() ) )
{ {
pPage = static_cast<SwPageFrm*>(pPage->GetNext()); pPage = static_cast<SwPageFrm*>(pPage->GetNext());
if ( pPage ) if ( pPage )
...@@ -200,9 +200,9 @@ void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext) ...@@ -200,9 +200,9 @@ void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext)
} }
} }
} }
pFirstVisPage = pPage ? pPage : static_cast<SwPageFrm*>(pSh->GetLayout()->Lower()); m_pFirstVisiblePage = pPage ? pPage : static_cast<SwPageFrm*>(m_pShell->GetLayout()->Lower());
} }
bFirstPageInvalid = false; m_bFirstPageInvalid = false;
} }
void SwViewShellImp::MakeDrawView() void SwViewShellImp::MakeDrawView()
...@@ -217,7 +217,7 @@ void SwViewShellImp::MakeDrawView() ...@@ -217,7 +217,7 @@ void SwViewShellImp::MakeDrawView()
} }
else else
{ {
if ( !pDrawView ) if ( !m_pDrawView )
{ {
// #i72809# // #i72809#
// Discussed with FME, he also thinks that the getPrinter is old and not correct. When i got // Discussed with FME, he also thinks that the getPrinter is old and not correct. When i got
...@@ -232,7 +232,7 @@ void SwViewShellImp::MakeDrawView() ...@@ -232,7 +232,7 @@ void SwViewShellImp::MakeDrawView()
pOutDevForDrawView = GetShell()->GetOut(); pOutDevForDrawView = GetShell()->GetOut();
} }
pDrawView = new SwDrawView( *this, rIDDMA.GetDrawModel(), pOutDevForDrawView); m_pDrawView = new SwDrawView( *this, rIDDMA.GetDrawModel(), pOutDevForDrawView);
} }
GetDrawView()->SetActiveLayer("Heaven"); GetDrawView()->SetActiveLayer("Heaven");
...@@ -241,11 +241,11 @@ void SwViewShellImp::MakeDrawView() ...@@ -241,11 +241,11 @@ void SwViewShellImp::MakeDrawView()
// #i68597# If document is read-only, we will not profit from overlay, // #i68597# If document is read-only, we will not profit from overlay,
// so switch it off. // so switch it off.
if (pDrawView->IsBufferedOverlayAllowed()) if (m_pDrawView->IsBufferedOverlayAllowed())
{ {
if(pSwViewOption->IsReadonly()) if(pSwViewOption->IsReadonly())
{ {
pDrawView->SetBufferedOverlayAllowed(false); m_pDrawView->SetBufferedOverlayAllowed(false);
} }
} }
} }
...@@ -271,24 +271,24 @@ Color SwViewShellImp::GetRetoucheColor() const ...@@ -271,24 +271,24 @@ Color SwViewShellImp::GetRetoucheColor() const
SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext)
{ {
if ( bFirstPageInvalid ) if ( m_bFirstPageInvalid )
SetFirstVisPage(pRenderContext); SetFirstVisPage(pRenderContext);
return pFirstVisPage; return m_pFirstVisiblePage;
} }
const SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) const const SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) const
{ {
if ( bFirstPageInvalid ) if ( m_bFirstPageInvalid )
const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pRenderContext); const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pRenderContext);
return pFirstVisPage; return m_pFirstVisiblePage;
} }
// create page preview layout // create page preview layout
void SwViewShellImp::InitPagePreviewLayout() void SwViewShellImp::InitPagePreviewLayout()
{ {
OSL_ENSURE( pSh->GetLayout(), "no layout - page preview layout can not be created."); OSL_ENSURE( m_pShell->GetLayout(), "no layout - page preview layout can not be created.");
if ( pSh->GetLayout() ) if ( m_pShell->GetLayout() )
mpPgPreviewLayout = new SwPagePreviewLayout( *pSh, *(pSh->GetLayout()) ); m_pPagePreviewLayout = new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) );
} }
void SwViewShellImp::UpdateAccessible() void SwViewShellImp::UpdateAccessible()
...@@ -442,9 +442,9 @@ void SwViewShellImp::InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage ) ...@@ -442,9 +442,9 @@ void SwViewShellImp::InvalidateAccessiblePreviewSelection( sal_uInt16 nSelPage )
SwAccessibleMap *SwViewShellImp::CreateAccessibleMap() SwAccessibleMap *SwViewShellImp::CreateAccessibleMap()
{ {
OSL_ENSURE( !pAccMap, "accessible map exists" ); OSL_ENSURE( !m_pAccessibleMap, "accessible map exists" );
pAccMap = new SwAccessibleMap( GetShell() ); m_pAccessibleMap = new SwAccessibleMap( GetShell() );
return pAccMap; return m_pAccessibleMap;
} }
void SwViewShellImp::FireAccessibleEvents() void SwViewShellImp::FireAccessibleEvents()
......
...@@ -331,7 +331,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) ...@@ -331,7 +331,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
{ {
SwRootFrm* pCurrentLayout = GetLayout(); SwRootFrm* pCurrentLayout = GetLayout();
Imp()->pRegion = NULL; Imp()->m_pRegion = NULL;
//First Invert then Compress, never the other way round! //First Invert then Compress, never the other way round!
pRegion->Invert(); pRegion->Invert();
...@@ -1237,7 +1237,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect ...@@ -1237,7 +1237,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
if(bSmoothScrollAllowed) if(bSmoothScrollAllowed)
{ {
Imp()->bStopSmooth = false; Imp()->m_bStopSmooth = false;
const SwRect aOldVis( VisArea() ); const SwRect aOldVis( VisArea() );
...@@ -1333,7 +1333,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect ...@@ -1333,7 +1333,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
while ( lDiff ) while ( lDiff )
{ {
long lScroll; long lScroll;
if ( Imp()->bStopSmooth || std::abs(lDiff) <= std::abs(lMaDelta) ) if ( Imp()->m_bStopSmooth || std::abs(lDiff) <= std::abs(lMaDelta) )
{ {
lScroll = lDiff; lScroll = lDiff;
lDiff = 0; lDiff = 0;
...@@ -1367,28 +1367,28 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect ...@@ -1367,28 +1367,28 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
Imp()->GetDrawView()->VisAreaChanged( GetWin() ); Imp()->GetDrawView()->VisAreaChanged( GetWin() );
SetFirstVisPageInvalid(); SetFirstVisPageInvalid();
if ( !Imp()->bStopSmooth ) if ( !Imp()->m_bStopSmooth )
{ {
const bool bScrollDirectionIsUp(lScroll > 0); const bool bScrollDirectionIsUp(lScroll > 0);
Imp()->aSmoothRect = VisArea(); Imp()->m_aSmoothRect = VisArea();
if(bScrollDirectionIsUp) if(bScrollDirectionIsUp)
{ {
Imp()->aSmoothRect.Bottom( VisArea().Top() + lScroll + aPixSz.Height()); Imp()->m_aSmoothRect.Bottom( VisArea().Top() + lScroll + aPixSz.Height());
} }
else else
{ {
Imp()->aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height()); Imp()->m_aSmoothRect.Top( VisArea().Bottom() + lScroll - aPixSz.Height());
} }
Imp()->bSmoothUpdate = true; Imp()->m_bSmoothUpdate = true;
GetWin()->Update(); GetWin()->Update();
Imp()->bSmoothUpdate = false; Imp()->m_bSmoothUpdate = false;
if(!Imp()->bStopSmooth) if(!Imp()->m_bStopSmooth)
{ {
// start paint on logic base // start paint on logic base
const Rectangle aTargetLogic(Imp()->aSmoothRect.SVRect()); const Rectangle aTargetLogic(Imp()->m_aSmoothRect.SVRect());
DLPrePaint2(vcl::Region(aTargetLogic)); DLPrePaint2(vcl::Region(aTargetLogic));
// get target rectangle in discrete pixels // get target rectangle in discrete pixels
...@@ -1422,7 +1422,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect ...@@ -1422,7 +1422,7 @@ bool SwViewShell::SmoothScroll( long lXDiff, long lYDiff, const Rectangle *pRect
} }
pVout.disposeAndClear(); pVout.disposeAndClear();
GetWin()->Update(); GetWin()->Update();
if ( !Imp()->bStopSmooth ) if ( !Imp()->m_bStopSmooth )
--mnLockPaint; --mnLockPaint;
SetFirstVisPageInvalid(); SetFirstVisPageInvalid();
return true; return true;
...@@ -1720,14 +1720,14 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe ...@@ -1720,14 +1720,14 @@ void SwViewShell::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRe
RenderContextGuard aGuard(mpOut, &rRenderContext, this); RenderContextGuard aGuard(mpOut, &rRenderContext, this);
if ( mnLockPaint ) if ( mnLockPaint )
{ {
if ( Imp()->bSmoothUpdate ) if ( Imp()->m_bSmoothUpdate )
{ {
SwRect aTmp( rRect ); SwRect aTmp( rRect );
if ( !Imp()->aSmoothRect.IsInside( aTmp ) ) if ( !Imp()->m_aSmoothRect.IsInside( aTmp ) )
Imp()->bStopSmooth = true; Imp()->m_bStopSmooth = true;
else else
{ {
Imp()->aSmoothRect = aTmp; Imp()->m_aSmoothRect = aTmp;
return; return;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment