summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlexp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/xml/xmlexp.cxx')
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 5ba2fd3e68ab..bed17185ad80 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -51,6 +51,7 @@
#include <doc.hxx>
#include <swmodule.hxx>
#include <docsh.hxx>
+#include <viewsh.hxx>
#include <docstat.hxx>
#include <swerror.h>
#include <unotext.hxx>
@@ -583,7 +584,8 @@ void SwXMLExport::SetBodyAttributes()
if( pText )
{
SwDoc *pDoc = pText->GetDoc();
- if( pDoc && pDoc->GetPageCount() > 1 )
+ if( pDoc && pDoc->GetCurrentViewShell() &&
+ pDoc->GetCurrentViewShell()->GetPageCount() > 1 )
{
sal_Bool bValue = sal_True;
rtl::OUStringBuffer sBuffer;