tdf#153251 remove s_nPixelTwips
Change-Id: I43d39925931071b78e08adf47bf3c6c590b1a2ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180360 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -262,8 +262,6 @@ class SwViewOption
|
|||||||
static SwViewColors s_aInitialColorConfig;
|
static SwViewColors s_aInitialColorConfig;
|
||||||
OUString m_sThemeName;
|
OUString m_sThemeName;
|
||||||
|
|
||||||
static sal_uInt16 s_nPixelTwips;// 1 Pixel == ? Twips
|
|
||||||
|
|
||||||
OUString m_sSymbolFont; // Symbolfont.
|
OUString m_sSymbolFont; // Symbolfont.
|
||||||
ViewOptFlags1 m_nCoreOptions; // Bits for SwViewShell.
|
ViewOptFlags1 m_nCoreOptions; // Bits for SwViewShell.
|
||||||
ViewOptCoreFlags2 m_nCore2Options; // Bits for SwViewShell.
|
ViewOptCoreFlags2 m_nCore2Options; // Bits for SwViewShell.
|
||||||
@@ -317,8 +315,6 @@ public:
|
|||||||
SW_DLLPUBLIC SwViewOption(const SwViewOption&);
|
SW_DLLPUBLIC SwViewOption(const SwViewOption&);
|
||||||
SW_DLLPUBLIC ~SwViewOption();
|
SW_DLLPUBLIC ~SwViewOption();
|
||||||
|
|
||||||
static void Init(const OutputDevice* pWin); // Initializing of static data.
|
|
||||||
|
|
||||||
inline void SetUIOptions( const SwViewOption& );
|
inline void SetUIOptions( const SwViewOption& );
|
||||||
|
|
||||||
void SetColorConfig(const SwViewColors& rColorConfig)
|
void SetColorConfig(const SwViewColors& rColorConfig)
|
||||||
|
@@ -104,7 +104,6 @@ void SwViewShell::Init( const SwViewOption *pNewOpt )
|
|||||||
SAL_INFO( "sw.core", "View::Init - after InitPrt" );
|
SAL_INFO( "sw.core", "View::Init - after InitPrt" );
|
||||||
if( GetWin() )
|
if( GetWin() )
|
||||||
{
|
{
|
||||||
SwViewOption::Init( GetWin()->GetOutDev() );
|
|
||||||
GetWin()->GetOutDev()->SetFillColor();
|
GetWin()->GetOutDev()->SetFillColor();
|
||||||
GetWin()->SetBackground();
|
GetWin()->SetBackground();
|
||||||
GetWin()->GetOutDev()->SetLineColor();
|
GetWin()->GetOutDev()->SetLineColor();
|
||||||
|
@@ -41,7 +41,6 @@
|
|||||||
#include <comphelper/lok.hxx>
|
#include <comphelper/lok.hxx>
|
||||||
#include <comphelper/configurationlistener.hxx>
|
#include <comphelper/configurationlistener.hxx>
|
||||||
|
|
||||||
sal_uInt16 SwViewOption::s_nPixelTwips = 0; // one pixel on the screen
|
|
||||||
SwViewColors SwViewOption::s_aInitialColorConfig {};
|
SwViewColors SwViewOption::s_aInitialColorConfig {};
|
||||||
|
|
||||||
SwViewColors::SwViewColors() :
|
SwViewColors::SwViewColors() :
|
||||||
@@ -212,7 +211,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool b
|
|||||||
Color aOldLineColor( pOut->GetLineColor() );
|
Color aOldLineColor( pOut->GetLineColor() );
|
||||||
pOut->SetLineColor( COL_GRAY );
|
pOut->SetLineColor( COL_GRAY );
|
||||||
// to make it look nice, we subtract two pixels everywhere
|
// 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 )
|
if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
|
||||||
nPix = 0;
|
nPix = 0;
|
||||||
const Point aTopLeft( rRect.Left() + nPix, rRect.Top() + nPix );
|
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()
|
bool SwViewOption::IsAutoCompleteWords()
|
||||||
{
|
{
|
||||||
const SvxSwAutoFormatFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
|
const SvxSwAutoFormatFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
|
||||||
|
Reference in New Issue
Block a user