summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoidx.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unoidx.cxx')
-rw-r--r--sw/source/core/unocore/unoidx.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 99802a72a1cc..00baf17aad6d 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -39,6 +39,7 @@
#include <shellres.hxx>
#include <viewsh.hxx>
#include <doc.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <docary.hxx>
#include <poolfmt.hxx>
#include <poolfmt.hrc>
@@ -1245,7 +1246,13 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
void lcl_CalcLayout(SwDoc *pDoc)
{
SwViewShell *pViewShell = 0;
- SwEditShell* pEditShell = pDoc ? pDoc->GetEditShell(&pViewShell) : 0;
+ SwEditShell* pEditShell = 0;
+ if( pDoc )
+ {
+ pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+ pEditShell = pDoc->GetEditShell();
+ }
+
if (pEditShell)
{
pEditShell->CalcLayout();