summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-10-12 11:07:13 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-10-12 11:08:27 -0400
commita551cad4e35b6b664167d65dfc25e5a0f6990687 (patch)
treedb5df74980627fdc6012c8812687810b93666048 /sc/source
parente02ff224b64671db33543a1be2b48c0fa5caf786 (diff)
Always disable anti-aliasing for drawing cell borders.
It looks better that way & that's the way it was before. Change-Id: Iedb5234f4b032d4362f91f811bb9131824267704
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/view/output.cxx30
1 files changed, 26 insertions, 4 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1922a087c3a4..24b4fca77e41 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -33,6 +33,7 @@
#include <editeng/brshitem.hxx>
#include <editeng/editdata.hxx>
#include <svtools/colorcfg.hxx>
+#include "svtools/optionsdrawinglayer.hxx"
#include <svx/rotmodit.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/svxfont.hxx>
@@ -1237,10 +1238,7 @@ void ScOutputData::DrawClear()
}
}
-
-//
-// Linien
-//
+namespace {
long lclGetSnappedX( OutputDevice& rDev, long nPosX, bool bSnapPixel )
{
@@ -1257,8 +1255,32 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) );
}
+/**
+ * Temporarily turn off antialiasing.
+ */
+class AntiAliasingSwitch
+{
+ SvtOptionsDrawinglayer maDrawOpt;
+ bool mbOldSetting;
+public:
+ AntiAliasingSwitch(bool bOn) : mbOldSetting(maDrawOpt.IsAntiAliasing())
+ {
+ maDrawOpt.SetAntiAliasing(bOn);
+ }
+
+ ~AntiAliasingSwitch()
+ {
+ maDrawOpt.SetAntiAliasing(mbOldSetting);
+ }
+};
+
+}
+
void ScOutputData::DrawFrame()
{
+ // No anti-aliasing for drawing cell borders.
+ AntiAliasingSwitch aAASwitch(false);
+
sal_uLong nOldDrawMode = mpDev->GetDrawMode();
Color aSingleColor;