[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 24 07:00:39 PDT 2015
sw/inc/pagepreviewlayout.hxx | 2 +-
sw/source/core/view/pagepreviewlayout.cxx | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 0c114151343cbe6853dd46833c42368d738afd8a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jul 24 15:42:08 2015 +0200
tdf#92914 SwPagePreviewLayout::_PaintSelectMarkAtPage: handle rendercontext
With this, the print preview window does not paint the selection
rectangle on opening anymore.
Change-Id: Ie4d24dfc4d64c74b22dcd1476778f4eac6f4cd13
diff --git a/sw/inc/pagepreviewlayout.hxx b/sw/inc/pagepreviewlayout.hxx
index 809b76d..828b1a1 100644
--- a/sw/inc/pagepreviewlayout.hxx
+++ b/sw/inc/pagepreviewlayout.hxx
@@ -215,7 +215,7 @@ private:
@author OD
*/
- void _PaintSelectMarkAtPage( const PreviewPage* _aSelectedPreviewPage ) const;
+ void _PaintSelectMarkAtPage(vcl::RenderContext& rRenderContext, const PreviewPage* _aSelectedPreviewPage) const;
public:
/** constructor of <SwPagePreviewLayout>
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index a24a5ed..44dc5fe 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1122,7 +1122,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const Rectan
if ( (*aPageIter)->pPage->GetPhyPageNum() == mnSelectedPageNum )
{
- _PaintSelectMarkAtPage( (*aPageIter) );
+ _PaintSelectMarkAtPage(rRenderContext, *aPageIter);
}
}
@@ -1203,10 +1203,10 @@ void SwPagePreviewLayout::Repaint( const Rectangle& rInvalidCoreRect ) const
OD 17.12.2002 #103492#
*/
-void SwPagePreviewLayout::_PaintSelectMarkAtPage(
+void SwPagePreviewLayout::_PaintSelectMarkAtPage(vcl::RenderContext& rRenderContext,
const PreviewPage* _aSelectedPreviewPage ) const
{
- OutputDevice* pOutputDev = mrParentViewShell.GetOut();
+ OutputDevice* pOutputDev = &rRenderContext;
MapMode aMapMode( pOutputDev->GetMapMode() );
// save mapping mode of output device
MapMode aSavedMapMode = aMapMode;
@@ -1270,12 +1270,12 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
// re-paint for current selected page in order to unmark it.
const PreviewPage* pOldSelectedPreviewPage = _GetPreviewPageByPageNum( nOldSelectedPageNum );
+ OutputDevice* pOutputDev = mrParentViewShell.GetOut();
if ( pOldSelectedPreviewPage && pOldSelectedPreviewPage->bVisible )
{
// OD 20.02.2003 #107369# - invalidate only areas of selection mark.
SwRect aPageRect( pOldSelectedPreviewPage->aPreviewWinPos,
pOldSelectedPreviewPage->aPageSize );
- OutputDevice* pOutputDev = mrParentViewShell.GetOut();
::SwAlignRect( aPageRect, &mrParentViewShell, pOutputDev );
Rectangle aPxPageRect = pOutputDev->LogicToPixel( aPageRect.SVRect() );
// invalidate top mark line
@@ -1299,7 +1299,7 @@ void SwPagePreviewLayout::MarkNewSelectedPage( const sal_uInt16 _nSelectedPage )
// re-paint for new selected page in order to mark it.
const PreviewPage* pNewSelectedPreviewPage = _GetPreviewPageByPageNum( _nSelectedPage );
if ( pNewSelectedPreviewPage && pNewSelectedPreviewPage->bVisible )
- _PaintSelectMarkAtPage( pNewSelectedPreviewPage );
+ _PaintSelectMarkAtPage( *pOutputDev, pNewSelectedPreviewPage );
}
// helper methods
More information about the Libreoffice-commits
mailing list