summaryrefslogtreecommitdiff
path: root/sw/source/uibase/config/viewopt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/config/viewopt.cxx')
-rw-r--r--sw/source/uibase/config/viewopt.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 082f8f4331dd..162d6a103d66 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -41,7 +41,6 @@
#include <comphelper/lok.hxx>
#include <comphelper/configurationlistener.hxx>
-sal_uInt16 SwViewOption::s_nPixelTwips = 0; // one pixel on the screen
SwViewColors SwViewOption::s_aInitialColorConfig {};
SwViewColors::SwViewColors() :
@@ -212,7 +211,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool b
Color aOldLineColor( pOut->GetLineColor() );
pOut->SetLineColor( COL_GRAY );
// to make it look nice, we subtract two pixels everywhere
- SwTwips nPix = s_nPixelTwips * 2;
+ SwTwips nPix = o3tl::narrowing<sal_uInt16>(pOut->PixelToLogic( Size(1,1) ).Height()) * 2;
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
nPix = 0;
const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix );
@@ -387,14 +386,6 @@ SwViewOption::~SwViewOption()
{
}
-void SwViewOption::Init(const OutputDevice* pWin)
-{
- if( !s_nPixelTwips && pWin )
- {
- s_nPixelTwips = o3tl::narrowing<sal_uInt16>(pWin->PixelToLogic( Size(1,1) ).Height());
- }
-}
-
bool SwViewOption::IsAutoCompleteWords()
{
const SvxSwAutoFormatFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();