diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 5b73f62e9f461da7f79d176d2fd44d03583e1c0f..e89ef6d42781498db552109e578c719eefd8439a 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.