summaryrefslogtreecommitdiff
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-21 10:22:55 +0200
commit76a18147044dc29379d50810541182aa12756d80 (patch)
tree632eba03ce24f08d4233bdd099b36b0135cb66b3
parentfa5a1490a6d2af662117b60b4e53a783cc66f989 (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 (cherry picked from commit 5a3653f87502e40cf00d8f1ed1c0ecf5a979e67d)
-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 8374da9e2005..396e79ddaacb 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3105,16 +3105,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,
@@ -3235,8 +3233,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;