summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-03-09 12:25:30 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-16 09:37:59 +0100
commitc25062f4b541eaa384c8a33f9cd0c848da8f6b13 (patch)
treebbae9bccc743fdbed4a8624084a65882c9383121 /sc
parent9916032140e5134fea4ad2358c93248b1c923f90 (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx62
1 files changed, 35 insertions, 27 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 6e916b36dcd3..eae8cc04950b 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 )