Blame SOURCES/0036-sw-tiled-rendering-set-minimal-window-size.patch

f325b2
From 8bc21ff727beb36e68076995cc642ac98296b689 Mon Sep 17 00:00:00 2001
f325b2
From: Henry Castro <hcastro@collabora.com>
f325b2
Date: Tue, 9 Jun 2015 23:19:40 -0400
f325b2
Subject: [PATCH 036/398] sw: tiled rendering, set minimal window size.
f325b2
f325b2
Set minimal window size (1,1), so it can trigger
f325b2
LOK_CALLBACK_INVALIDATE_TILES
f325b2
f325b2
Change-Id: If6ef9aeec94b396febd41375b3ce96b1aa1d6115
f325b2
(cherry picked from commit 2281a4922f2209511f79b961ca2140c112bc41eb)
f325b2
---
f325b2
 sw/source/uibase/uno/unotxdoc.cxx | 9 +++++++++
f325b2
 1 file changed, 9 insertions(+)
f325b2
f325b2
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
index c19976c05289..450650d26c13 100644
f325b2
--- a/sw/source/uibase/uno/unotxdoc.cxx
f325b2
+++ b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
@@ -3164,6 +3164,15 @@ void SwXTextDocument::initializeForTiledRendering()
f325b2
     SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
f325b2
     pViewShell->setTiledRendering(true);
f325b2
 
f325b2
+    if ( pViewShell->GetWin() )
f325b2
+    {
f325b2
+        // Check initial window size and set minimal size (1,1)
f325b2
+        Size aSize( pViewShell->GetWin()->GetOutputSizePixel() );
f325b2
+        if ( aSize.Width() == 0 || aSize.Height() == 0 )
f325b2
+            pViewShell->GetWin()->SetOutputSizePixel(Size( std::max( aSize.Width() , long(1)),
f325b2
+                                                           std::max( aSize.Height(), long(1)) ));
f325b2
+    }
f325b2
+
f325b2
     bool      bBookMode = false;
f325b2
     sal_Int16 nColumns = 1;
f325b2
 
f325b2
-- 
f325b2
2.12.0
f325b2