libreofficekit/source/gtk/lokdocview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit 1cde56c3600b5b5b006609c24bfcaf66887167d3 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Jul 28 17:41:41 2014 +0200 -Werror=declaration-after-statement Change-Id: I97b1d03410e98c5ff2ad3cc15cef692e9b994a6c diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c index e8fe526..07d07a1 100644 --- a/libreofficekit/source/gtk/lokdocview.c +++ b/libreofficekit/source/gtk/lokdocview.c @@ -98,6 +98,13 @@ void renderDocument( LOKDocView* pDocView ) int nRenderWidth, nRenderHeight; unsigned char* pBuffer; int nRowStride; + // TODO: we really should scale by screen DPI here -- 10 seems to be a vaguely + // correct factor for my screen at least. + const float fScaleFactor = 0.1; + + // Various things blow up if we try to draw too large a tile, + // this size seems to be safe. (Very rare/unlikely that + const int nMaxWidth = 100000; g_assert( pDocView->pDocument ); @@ -108,13 +115,6 @@ void renderDocument( LOKDocView* pDocView ) pDocView->pDocument->pClass->getDocumentSize( pDocView->pDocument, &nWidth, &nHeight ); - // TODO: we really should scale by screen DPI here -- 10 seems to be a vaguely - // correct factor for my screen at least. - const float fScaleFactor = 0.1; - - // Various things blow up if we try to draw too large a tile, - // this size seems to be safe. (Very rare/unlikely that - const int nMaxWidth = 100000; if ( nWidth * fScaleFactor > nMaxWidth ) { nWidth = nMaxWidth; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits