Kaydet (Commit) a551cad4 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Always disable anti-aliasing for drawing cell borders.

It looks better that way & that's the way it was before.

Change-Id: Iedb5234f4b032d4362f91f811bb9131824267704
üst e02ff224
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include <editeng/brshitem.hxx> #include <editeng/brshitem.hxx>
#include <editeng/editdata.hxx> #include <editeng/editdata.hxx>
#include <svtools/colorcfg.hxx> #include <svtools/colorcfg.hxx>
#include "svtools/optionsdrawinglayer.hxx"
#include <svx/rotmodit.hxx> #include <svx/rotmodit.hxx>
#include <editeng/shaditem.hxx> #include <editeng/shaditem.hxx>
#include <editeng/svxfont.hxx> #include <editeng/svxfont.hxx>
...@@ -1237,10 +1238,7 @@ void ScOutputData::DrawClear() ...@@ -1237,10 +1238,7 @@ void ScOutputData::DrawClear()
} }
} }
namespace {
//
// Linien
//
long lclGetSnappedX( OutputDevice& rDev, long nPosX, bool bSnapPixel ) long lclGetSnappedX( OutputDevice& rDev, long nPosX, bool bSnapPixel )
{ {
...@@ -1257,8 +1255,32 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF ...@@ -1257,8 +1255,32 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
return static_cast< size_t >( bRTL ? (nCellInfoLastX + 2 - nCellInfoX) : (nCellInfoX - nCellInfoFirstX) ); 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() void ScOutputData::DrawFrame()
{ {
// No anti-aliasing for drawing cell borders.
AntiAliasingSwitch aAASwitch(false);
sal_uLong nOldDrawMode = mpDev->GetDrawMode(); sal_uLong nOldDrawMode = mpDev->GetDrawMode();
Color aSingleColor; Color aSingleColor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment