summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 5b73f62e9f46..e89ef6d42781 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3157,12 +3157,22 @@ void SwXTextDocument::initializeForTiledRendering()
SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
pViewShell->setTiledRendering(true);
+ if ( pViewShell->GetWin() )
+ {
+ // Check initial window size and set minimal size (1,1)
+ Size aSize( pViewShell->GetWin()->GetOutputSizePixel() );
+ if ( aSize.Width() == 0 || aSize.Height() == 0 )
+ pViewShell->GetWin()->SetOutputSizePixel(Size( std::max( aSize.Width() , long(1)),
+ std::max( aSize.Height(), long(1)) ));
+ }
+
bool bBookMode = false;
sal_Int16 nColumns = 1;
SwView* pView = pDocShell->GetView();
if (!pView)
return;
+
pView->SetViewLayout(nColumns, bBookMode, true);
// Tiled rendering defaults.