summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-03-09 12:25:30 +0100
committerJan Holesovsky <kendy@collabora.com>2015-03-10 14:37:03 +0100
commitd3524c3a03c8f92e425d1454d7ed1864b1549ebc (patch)
tree56d2a127bd87a118289090a749aa1c9930bef942
parent88834835e9c097b0bee691a508a23ef92ba15682 (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
-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 46471c9b3287..75bdcc6f52e9 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -65,44 +65,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;
@@ -520,6 +522,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 )