[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 24 09:10:28 PDT 2015
sw/source/core/view/pagepreviewlayout.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit da24bd36a5213670b5636abf4dbac317c4135c07
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jul 24 18:07:31 2015 +0200
tdf#92914 SwPagePreviewLayout::MarkNewSelectedPage: avoid direct paint
With this, when the user select an other page in the print preview
window, the selection rectangle is no longer painted directly.
Change-Id: I85f1cb9d09c8545222ed49ff0acf819540d10920
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index 44dc5fe..f088700 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1299,7 +1299,12 @@ 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( *pOutputDev, pNewSelectedPreviewPage );
+ {
+ const PreviewPage* pSelectedPreviewPage = _GetPreviewPageByPageNum(mnSelectedPageNum);
+ SwRect aPageRect(pSelectedPreviewPage->aPreviewWinPos, pSelectedPreviewPage->aPageSize);
+ ::SwAlignRect(aPageRect, &mrParentViewShell, pOutputDev);
+ mrParentViewShell.GetWin()->Invalidate(aPageRect.SVRect());
+ }
}
// helper methods
More information about the Libreoffice-commits
mailing list