Kaydet (Commit) 30066838 authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Andras Timar

SwViewShellImp::SetFirstVisPage: use vcl::RenderContext

Change-Id: If36b6fdda54dfbe6e4eea14883d659302a1db6be
(cherry picked from commit 85cd7a6c)
üst bfb681f8
......@@ -89,7 +89,7 @@ class SwViewShellImp
SwPagePreviewLayout* mpPgPreviewLayout;
void SetFirstVisPage(); // Recalculate the first visible Page
void SetFirstVisPage(OutputDevice* pRenderContext); // Recalculate the first visible Page
void StartAction(); // Show handle and hide
void EndAction(); // Called by SwViewShell::ImplXXXAction
......
......@@ -169,7 +169,7 @@ bool SwViewShellImp::IsUpdateExpFields()
return false;
}
void SwViewShellImp::SetFirstVisPage()
void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext)
{
if ( pSh->mbDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() )
{
......@@ -186,18 +186,18 @@ void SwViewShellImp::SetFirstVisPage()
const bool bBookMode = pSwViewOption->IsViewLayoutBookMode();
SwPageFrm *pPage = static_cast<SwPageFrm*>(pSh->GetLayout()->Lower());
SwRect aPageRect = pPage->GetBoundRect(pSh->GetOut());
SwRect aPageRect = pPage->GetBoundRect(pRenderContext);
float fAmount = pSh->VisArea().Height() * 0.43;
while ( pPage && aPageRect.Bottom() < pSh->VisArea().Top() + fAmount )
{
pPage = static_cast<SwPageFrm*>(pPage->GetNext());
if ( pPage )
{
aPageRect = pPage->GetBoundRect(pSh->GetOut());
aPageRect = pPage->GetBoundRect(pRenderContext);
if ( bBookMode && pPage->IsEmptyPage() )
{
const SwPageFrm& rFormatPage = pPage->GetFormatPage();
aPageRect.SSize() = rFormatPage.GetBoundRect(pSh->GetOut()).SSize();
aPageRect.SSize() = rFormatPage.GetBoundRect(pRenderContext).SSize();
}
}
}
......@@ -273,14 +273,14 @@ Color SwViewShellImp::GetRetoucheColor() const
SwPageFrm *SwViewShellImp::GetFirstVisPage()
{
if ( bFirstPageInvalid )
SetFirstVisPage();
SetFirstVisPage(pSh->GetOut());
return pFirstVisPage;
}
const SwPageFrm *SwViewShellImp::GetFirstVisPage() const
{
if ( bFirstPageInvalid )
const_cast<SwViewShellImp*>(this)->SetFirstVisPage();
const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pSh->GetOut());
return pFirstVisPage;
}
......
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