summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-15 12:02:57 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-15 16:07:35 +0200
commit5a3653f87502e40cf00d8f1ed1c0ecf5a979e67d (patch)
treec7d9c0fa638a4ecb3ff917f423bd6ffcd727d372 /sw
parent6e72f0251bb8767942edf74f612547c12ca0cdf1 (diff)
sw lok: fix shape text editing with multiple views
When changing the active view shell, sw::DocumentLayoutManager::GetCurrentViewShell() is not instantly updated, only when e.g. the focus changes. This means that calling setView() + paintTile() pairs on random views typically did not use the matching view shell, but the last one. This has a visible effect when editing shape text, as the non-text-edit views had the outdated shape text visible, unlike on the desktop. Fix the problem by using SwDocShell::GetWrtShell() instead. Change-Id: Ia4b67d0a8931692ed4fc5c5e97cc1a09ef81e647
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index da2675e47559..9093b7d4215c 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3132,16 +3132,14 @@ void SwXTextDocument::paintTile( VirtualDevice &rDevice,
int nTilePosX, int nTilePosY,
long nTileWidth, long nTileHeight )
{
- SwDoc* pDoc = pDocShell->GetDoc();
- SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell* pViewShell = pDocShell->GetWrtShell();
pViewShell->PaintTile(rDevice, nOutputWidth, nOutputHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
}
Size SwXTextDocument::getDocumentSize()
{
- SwDoc* pDoc = pDocShell->GetDoc();
- SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell* pViewShell = pDocShell->GetWrtShell();
Size aDocSize = pViewShell->GetDocSize();
return Size(aDocSize.Width() + 2L * DOCUMENTBORDER,
@@ -3262,8 +3260,7 @@ void SwXTextDocument::initializeForTiledRendering(const css::uno::Sequence<css::
{
SolarMutexGuard aGuard;
- SwDoc* pDoc = pDocShell->GetDoc();
- SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ SwViewShell* pViewShell = pDocShell->GetWrtShell();
bool bBookMode = false;
sal_Int16 nColumns = 1;