summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-24 18:07:31 +0200
committerJan Holesovsky <kendy@collabora.com>2015-07-28 16:08:45 +0000
commit540cb7302d3fd515bb6c39693c561ca62c7860a4 (patch)
treedadd663b6961064a6789376f2a1fbdec6c51f8ab
parentb2c40908c05d0d526bfaee523895399ab88087f7 (diff)
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 (cherry picked from commit da24bd36a5213670b5636abf4dbac317c4135c07) Reviewed-on: https://gerrit.libreoffice.org/17381 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index da9f1f141b9f..4baed4f7fd80 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1297,7 +1297,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