summaryrefslogtreecommitdiff
path: root/sw/source/core/view
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-29 15:36:40 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-29 15:39:12 +0200
commit8527dfbd4d3f79de8b02c561e5f0fef0d54d3eeb (patch)
tree7f394392091b5067bdb2400ab752bf78e1d8a43d /sw/source/core/view
parente05fbf07bb8dd0094b9e7f20cebfb88678f1e676 (diff)
SwFrm::Calc: use vcl::RenderContext
Change-Id: I98de3f5413756c494c677d592ea921155e4c08be
Diffstat (limited to 'sw/source/core/view')
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx6
-rw-r--r--sw/source/core/view/vprint.cxx2
2 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 9d91d13e5063..a2c98a853174 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -122,6 +122,7 @@ void SwPagePreviewLayout::_ClearPreviewPageData()
*/
void SwPagePreviewLayout::_CalcPreviewLayoutSizes()
{
+ vcl::RenderContext* pRenderContext = mrParentViewShell.GetOut();
// calculate maximal page size; calculate also number of pages
const SwPageFrm* pPage = static_cast<const SwPageFrm*>(mrLayoutRootFrm.Lower());
@@ -134,7 +135,7 @@ void SwPagePreviewLayout::_CalcPreviewLayoutSizes()
}
++mnPages;
- pPage->Calc();
+ pPage->Calc(pRenderContext);
const Size& rPageSize = pPage->Frm().SSize();
if ( rPageSize.Width() > maMaxPageSize.Width() )
maMaxPageSize.Width() = rPageSize.Width();
@@ -547,6 +548,7 @@ void SwPagePreviewLayout::_CalcDocPreviewPaintRect()
*/
void SwPagePreviewLayout::_CalcPreviewPages()
{
+ vcl::RenderContext* pRenderContext = mrParentViewShell.GetOut();
_ClearPreviewPageData();
if ( mbNoPageVisible )
@@ -589,7 +591,7 @@ void SwPagePreviewLayout::_CalcPreviewPages()
continue;
}
- pPage->Calc();
+ pPage->Calc(pRenderContext);
// consider only pages, which have to be painted.
if ( nCurrCol < mnPaintStartCol )
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 4bec7c62d081..ac331b6e8ebc 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -303,7 +303,7 @@ void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax )
pMyLayout->StartAllAction();
for ( sal_uInt16 i = 1; pPage && i <= nMax; pPage = pPage->GetNext(), ++i )
{
- pPage->Calc();
+ pPage->Calc(GetOut());
SwRect aOldVis( VisArea() );
maVisArea = pPage->Frm();
Imp()->SetFirstVisPageInvalid();