[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 2 commits - sc/source

Jan Holesovsky kendy at collabora.com
Mon Mar 9 04:38:33 PDT 2015


 sc/source/ui/unoobj/docuno.cxx |   62 +++++++++++++++++++++++------------------
 sc/source/ui/view/gridwin4.cxx |    2 -
 2 files changed, 36 insertions(+), 28 deletions(-)

New commits:
commit 389f160228930704f7746f77dcf4f0d7f2b572ae
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Mar 9 12:25:30 2015 +0100

    sc tiled rendering: Don't adjust the text width according to printer.
    
    When we don't set the 'wysiwyg' text, tiled rendering gets confused, because
    nPrtToScreenFactor is not 1.0, and everything gets horizontally shrunk.
    
    There is still a problem with vertical direction unfortunately - in order to
    have the same height of all the cells, the zooms where it does not fit the
    pixels can lead to an offset there too; but still this commit improves the
    situation a lot already.
    
    Also sort the includes when touching this, otherwise no idea where to add the
    inputopt.hxx :-)
    
    Change-Id: I15bf367af72a898248af81f34dc857ceb66187af

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6e916b3..eae8cc0 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -66,44 +66,46 @@
 #include <opencl/platforminfo.hxx>
 #endif
 
-#include "docuno.hxx"
 #include "cellsuno.hxx"
-#include "nameuno.hxx"
+#include <columnspanset.hxx>
+#include "convuno.hxx"
 #include "datauno.hxx"
+#include "docfunc.hxx"
+#include "dociter.hxx"
+#include "docoptio.hxx"
+#include "docsh.hxx"
+#include "docuno.hxx"
+#include "drwlayer.hxx"
+#include "forbiuno.hxx"
+#include "formulacell.hxx"
+#include "formulagroup.hxx"
+#include "gridwin.hxx"
+#include "hints.hxx"
+#include <inputopt.hxx>
+#include "interpre.hxx"
+#include "linkuno.hxx"
+#include "markdata.hxx"
 #include "miscuno.hxx"
+#include "nameuno.hxx"
 #include "notesuno.hxx"
-#include "styleuno.hxx"
-#include "linkuno.hxx"
-#include "servuno.hxx"
-#include "targuno.hxx"
-#include "convuno.hxx"
 #include "optuno.hxx"
-#include "forbiuno.hxx"
-#include "docsh.hxx"
-#include "hints.hxx"
-#include "docfunc.hxx"
+#include "pfuncache.hxx"
 #include "postit.hxx"
-#include "dociter.hxx"
-#include "formulacell.hxx"
-#include "drwlayer.hxx"
+#include "printfun.hxx"
 #include "rangeutl.hxx"
-#include "markdata.hxx"
-#include "docoptio.hxx"
-#include "unonames.hxx"
+#include "scmod.hxx"
+#include "scresid.hxx"
+#include "servuno.hxx"
 #include "shapeuno.hxx"
-#include "viewuno.hxx"
+#include "sheetevents.hxx"
+#include "styleuno.hxx"
 #include "tabvwsh.hxx"
-#include "printfun.hxx"
-#include "pfuncache.hxx"
-#include "scmod.hxx"
+#include "targuno.hxx"
+#include "unonames.hxx"
 #include "ViewSettingsSequenceDefines.hxx"
-#include "sheetevents.hxx"
+#include "viewuno.hxx"
+
 #include "sc.hrc"
-#include "scresid.hxx"
-#include "interpre.hxx"
-#include "formulagroup.hxx"
-#include "gridwin.hxx"
-#include <columnspanset.hxx>
 
 using namespace com::sun::star;
 
@@ -552,6 +554,12 @@ void ScModelObj::initializeForTiledRendering()
 {
     SolarMutexGuard aGuard;
     pDocShell->GetDocument().GetDrawLayer()->setTiledRendering(true);
+
+    // show us the text exactly
+    ScInputOptions aInputOptions(SC_MOD()->GetInputOptions());
+    aInputOptions.SetTextWysiwyg(true);
+    SC_MOD()->SetInputOptions(aInputOptions);
+    pDocShell->CalcOutputFactor();
 }
 
 uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
commit cc105587aa165842f42dcf487bc9b2dd765e30c1
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Mar 9 09:41:48 2015 +0100

    sc tiled rendering: RefreshZoom() is called already in SetZoom().
    
    Change-Id: I985275e3a1a944dffebe3987dee748f604e065f9

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 22d4171..b3cf5c1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -934,8 +934,8 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
     Fraction aFracX(long(nOutputWidth * TWIPS_PER_PIXEL), nTileWidth);
     Fraction aFracY(long(nOutputHeight * TWIPS_PER_PIXEL), nTileHeight);
 
+    // page break zoom
     pViewData->SetZoom(aFracX, aFracY, true);
-    pViewData->RefreshZoom();
 
     double fTilePosXPixel = static_cast<double>(nTilePosX) * nOutputWidth / nTileWidth;
     double fTilePosYPixel = static_cast<double>(nTilePosY) * nOutputHeight / nTileHeight;


More information about the Libreoffice-commits mailing list