ditch the font/screen-scaling thing

its of limited utility wrt the vcl layout work and optimal size widgets,
and its confuses people looking for hidpi settings

Change-Id: I37d21b480446f9fe2845b3a2d9fd59cdeddf1a93
This commit is contained in:
Caolán McNamara 2016-07-10 16:13:16 +01:00
parent cc8ffd0f49
commit ec950f8ebb
13 changed files with 42 additions and 219 deletions

View File

@ -619,7 +619,6 @@ OfaViewTabPage::OfaViewTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
, mpDrawinglayerOpt(new SvtOptionsDrawinglayer)
, mpOpenGLConfig(new svt::OpenGLCfg)
{
get(m_pWindowSizeMF, "windowsize");
get(m_pIconSizeLB, "iconsize");
get(m_pSidebarIconSizeLB, "sidebariconsize");
get(m_pIconStyleLB, "iconstyle");
@ -701,7 +700,6 @@ void OfaViewTabPage::dispose()
pCanvasSettings = nullptr;
delete pAppearanceCfg;
pAppearanceCfg = nullptr;
m_pWindowSizeMF.clear();
m_pIconSizeLB.clear();
m_pSidebarIconSizeLB.clear();
m_pIconStyleLB.clear();
@ -795,17 +793,6 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* )
bool bAppearanceChanged = false;
// Screen Scaling
sal_uInt16 nOldScale = pAppearanceCfg->GetScaleFactor();
sal_uInt16 nNewScale = (sal_uInt16)m_pWindowSizeMF->GetValue();
if ( nNewScale != nOldScale )
{
pAppearanceCfg->SetScaleFactor(nNewScale);
bAppearanceChanged = true;
}
// Mouse Snap Mode
SnapType eOldSnap = pAppearanceCfg->GetSnapMode();
SnapType eNewSnap = (SnapType)m_pMousePosLB->GetSelectEntryPos();
@ -941,8 +928,6 @@ void OfaViewTabPage::Reset( const SfxItemSet* )
m_pIconStyleLB->SelectEntryPos( nStyleLB_InitialSelection );
m_pIconStyleLB->SaveValue();
// Screen Scaling
m_pWindowSizeMF->SetValue ( pAppearanceCfg->GetScaleFactor() );
// Mouse Snap
m_pMousePosLB->SelectEntryPos((sal_Int32)pAppearanceCfg->GetSnapMode());
m_pMousePosLB->SaveValue();

View File

@ -79,7 +79,6 @@ class SvtTabAppearanceCfg;
class OfaViewTabPage : public SfxTabPage
{
private:
VclPtr<MetricField> m_pWindowSizeMF;
VclPtr<ListBox> m_pIconSizeLB;
VclPtr<ListBox> m_pSidebarIconSizeLB;
VclPtr<ListBox> m_pIconStyleLB;

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
@ -305,33 +305,6 @@
<property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes">Sc_aling:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">windowsize:0%</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="windowsize:0%">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="invisible_char">•</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
@ -343,7 +316,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -367,7 +340,7 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
@ -382,7 +355,7 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
@ -396,7 +369,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
@ -411,7 +384,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="top_attach">3</property>
<property name="width">2</property>
</packing>
</child>
@ -426,7 +399,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
@ -439,7 +412,7 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
@ -453,7 +426,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
@ -468,7 +441,7 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>

View File

@ -41,7 +41,6 @@ enum class DragMode {
class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
{
DragMode nDragMode ;
short nScaleFactor ;
SnapType nSnapMode ;
MouseMiddleButtonAction nMiddleMouse;
#if defined( UNX )
@ -66,9 +65,6 @@ public:
DragMode GetDragMode () const { return nDragMode; }
sal_uInt16 GetScaleFactor () const { return nScaleFactor; }
void SetScaleFactor ( sal_uInt16 nSet );
SnapType GetSnapMode () const { return nSnapMode; }
void SetSnapMode ( SnapType nSet );

View File

@ -501,12 +501,6 @@ public:
void SetCursorBlinkTime( sal_uInt64 nBlinkTime );
sal_uInt64 GetCursorBlinkTime() const;
void SetScreenZoom( sal_uInt16 nPercent );
sal_uInt16 GetScreenZoom() const;
void SetScreenFontZoom( sal_uInt16 nPercent );
sal_uInt16 GetScreenFontZoom() const;
void SetDragFullOptions( DragFullOptions nOptions );
DragFullOptions GetDragFullOptions() const;

View File

@ -2621,29 +2621,6 @@
<info>
<desc>Contains window and dialog settings.</desc>
</info>
<prop oor:name="FontScaling" oor:type="xs:short" oor:nillable="false">
<!--OldPath: General/View -->
<!--OldLocation: soffice.cfg-->
<!--UIHints: Tools Options - General View [Section] Display-->
<info>
<desc>Specifies the scaling only of the screen representation
[UNIT=%].</desc>
<label>Scaling</label>
</info>
<constraints>
<minInclusive oor:value="50">
<info>
<desc>Specifies the minimum range of the scaling.</desc>
</info>
</minInclusive>
<maxInclusive oor:value="200">
<info>
<desc>Specifies the maximum range of the scaling.</desc>
</info>
</maxInclusive>
</constraints>
<value>100</value>
</prop>
<group oor:name="NewDocumentHandling">
<info>
<desc>Contains settings to change new document window behavior.</desc>

View File

@ -500,6 +500,8 @@ class ScGlobal
static ScFieldEditEngine* pFieldEditEngine;
static void InitPPT();
public:
static SvtSysLocale* pSysLocale;
// for faster access a pointer to the single instance provided by SvtSysLocale
@ -556,8 +558,6 @@ public:
static void InitAddIns();
static void Clear(); // at the end of the program
static void UpdatePPT(OutputDevice* pDev);
static void InitTextHeight(SfxItemPool* pPool);
static SvxBrushItem* GetEmptyBrushItem() { return pEmptyBrushItem; }
static SvxBrushItem* GetButtonBrushItem();

View File

@ -130,8 +130,6 @@ sal_uInt16 ScGlobal::nStdRowHeight = 256;
long ScGlobal::nLastRowHeightExtra = 0;
long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
SfxViewShell* pScActiveViewShell = nullptr; //FIXME: Make this a member
sal_uInt16 nScClickMouseModifier = 0; //FIXME: This too
sal_uInt16 nScFillModeMouseModifier = 0; //FIXME: And this
@ -521,7 +519,7 @@ void ScGlobal::Init()
pEmbeddedBrushItem = new SvxBrushItem( Color( COL_LIGHTCYAN ), ATTR_BACKGROUND );
pProtectedBrushItem = new SvxBrushItem( Color( COL_LIGHTGRAY ), ATTR_BACKGROUND );
UpdatePPT(nullptr);
InitPPT();
//ScCompiler::InitSymbolsNative();
// ScParameterClassification _after_ Compiler, needs function resources if
// arguments are to be merged in, which in turn need strings of function
@ -536,23 +534,12 @@ void ScGlobal::Init()
// ScDocumentPool::InitVersionMaps() has been called earlier already
}
void ScGlobal::UpdatePPT( OutputDevice* pDev )
void ScGlobal::InitPPT()
{
sal_uInt16 nCurrentZoom = Application::GetSettings().GetStyleSettings().GetScreenZoom();
if ( nCurrentZoom != nPPTZoom )
{
// Screen PPT values must be updated when ScreenZoom has changed.
// If called from Window::DataChanged, the window is passed as pDev,
// to make sure LogicToPixel uses a device which already uses the new zoom.
// For the initial settings, NULL is passed and GetDefaultDevice used.
if ( !pDev )
pDev = Application::GetDefaultDevice();
Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MAP_TWIP );
nScreenPPTX = aPix1000.X() / 100000.0;
nScreenPPTY = aPix1000.Y() / 100000.0;
nPPTZoom = nCurrentZoom;
}
OutputDevice* pDev = Application::GetDefaultDevice();
Point aPix1000 = pDev->LogicToPixel( Point(100000,100000), MAP_TWIP );
nScreenPPTX = aPix1000.X() / 100000.0;
nScreenPPTY = aPix1000.Y() / 100000.0;
}
const OUString& ScGlobal::GetClipDocName()

View File

@ -1905,8 +1905,6 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
ScTabView* pView = pViewData->GetView();
// update scale in case the UI ScreenZoom has changed
ScGlobal::UpdatePPT(this);
pView->RecalcPPT();
// RepeatResize in case scroll bar sizes have changed

View File

@ -749,20 +749,6 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
(rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
{
// When the screen zoom factor has changed then reset the zoom
// factor of the frame to always display the whole page.
const AllSettings* pOldSettings = rDCEvt.GetOldSettings ();
const AllSettings& rNewSettings = GetSettings ();
if (pOldSettings && mpViewShell)
{
if (pOldSettings->GetStyleSettings().GetScreenZoom()
!= rNewSettings.GetStyleSettings().GetScreenZoom())
{
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
}
}
/* Rearrange or initiate Resize for scroll bars since the size of
the scroll bars my have changed. Within this, inside the resize-
handler, the size of the scroll bars will be asked from the

View File

@ -28,7 +28,6 @@
#define DEFAULT_DRAGMODE DragMode::SystemDep
#define DEFAULT_SNAPMODE SnapType::ToButton
#define DEFAULT_SCALEFACTOR 100
#if defined UNX
#define DEFAULT_AAMINHEIGHT 8
#endif
@ -40,7 +39,6 @@ bool SvtTabAppearanceCfg::bInitialized = false;
SvtTabAppearanceCfg::SvtTabAppearanceCfg()
:ConfigItem(OUString("Office.Common/View"))
,nDragMode ( DEFAULT_DRAGMODE )
,nScaleFactor ( DEFAULT_SCALEFACTOR )
,nSnapMode ( DEFAULT_SNAPMODE )
,nMiddleMouse ( MouseMiddleButtonAction::AutoScroll )
#if defined( UNX )
@ -64,26 +62,25 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
{
switch(nProp)
{
case 0: *pValues >>= nScaleFactor; break; //"FontScaling",
case 1: //"Window/Drag"
case 0: //"Window/Drag"
{
short nTmp;
if (*pValues >>= nTmp)
nDragMode = (DragMode)nTmp;
break;
}
case 2: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse",
case 3:
case 1: bMenuMouseFollow = *o3tl::doAccess<bool>(*pValues); break; //"Menu/FollowMouse",
case 2:
{
short nTmp;
if (*pValues >>= nTmp)
nSnapMode = (SnapType)nTmp; //"Dialog/MousePositioning",
break;
}
case 4: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton",
case 3: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton",
#if defined( UNX )
case 5: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled",
case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
case 4: bFontAntialiasing = *o3tl::doAccess<bool>(*pValues); break; // "FontAntialising/Enabled",
case 5: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
#endif
}
}
@ -102,14 +99,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames()
{
static const sal_Char* aPropNames[] =
{
"FontScaling" // 0
,"Window/Drag" // 1
,"Menu/FollowMouse" // 2
,"Dialog/MousePositioning" // 3
,"Dialog/MiddleMouseButton" // 4
"Window/Drag" // 0
,"Menu/FollowMouse" // 1
,"Dialog/MousePositioning" // 2
,"Dialog/MiddleMouseButton" // 3
#if defined( UNX )
,"FontAntiAliasing/Enabled" // 5
,"FontAntiAliasing/MinPixelHeight" // 6
,"FontAntiAliasing/Enabled" // 4
,"FontAntiAliasing/MinPixelHeight" // 5
#endif
};
const int nCount = SAL_N_ELEMENTS( aPropNames );
@ -133,14 +129,13 @@ void SvtTabAppearanceCfg::ImplCommit()
{
switch(nProp)
{
case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling",
case 1: pValues[nProp] <<= (short)nDragMode; break; //"Window/Drag",
case 2: pValues[nProp] <<= bMenuMouseFollow; break; //"Menu/FollowMouse",
case 3: pValues[nProp] <<= (short)nSnapMode; break; //"Dialog/MousePositioning",
case 4: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; //"Dialog/MiddleMouseButton",
case 0: pValues[nProp] <<= (short)nDragMode; break; // "Window/Drag",
case 1: pValues[nProp] <<= bMenuMouseFollow; break; // "Menu/FollowMouse",
case 2: pValues[nProp] <<= (short)nSnapMode; break; // "Dialog/MousePositioning",
case 3: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; // "Dialog/MiddleMouseButton",
#if defined( UNX )
case 5: pValues[nProp] <<= bFontAntialiasing; break; // "FontAntialising/Enabled",
case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
case 4: pValues[nProp] <<= bFontAntialiasing; break; // "FontAntialising/Enabled",
case 5: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight",
#endif
}
}
@ -151,12 +146,6 @@ void SvtTabAppearanceCfg::Notify( const css::uno::Sequence< OUString >& )
{
}
void SvtTabAppearanceCfg::SetScaleFactor ( sal_uInt16 nSet )
{
nScaleFactor = nSet;
SetModified();
}
void SvtTabAppearanceCfg::SetSnapMode ( SnapType nSet )
{
nSnapMode = nSet;
@ -183,11 +172,6 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// and set it here
hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts );
// Screen and ScreenFont Scaling
hAppStyle.SetScreenZoom( nScaleFactor );
hAppStyle.SetScreenFontZoom( nScaleFactor );
#if defined( UNX )
// font anti aliasing
hAppStyle.SetAntialiasingMinPixelHeight( nAAMinPixelHeight );

View File

@ -171,8 +171,6 @@ struct ImplStyleData
ToolbarIconSize mnToolbarIconSize;
bool mnUseFlatMenus;
StyleSettingsOptions mnOptions;
sal_uInt16 mnScreenZoom;
sal_uInt16 mnScreenFontZoom;
bool mbHighContrast;
bool mbUseSystemUIFonts;
bool mbAutoMnemonic;
@ -539,8 +537,6 @@ ImplStyleData::ImplStyleData() :
mnAntialiasedMin = 0;
mnCursorSize = 2;
mnCursorBlinkTime = STYLE_CURSOR_NOBLINKTIME;
mnScreenZoom = 100;
mnScreenFontZoom = 100;
mnDragFullOptions = DragFullOptions::All;
mnSelectionOptions = SelectionOptions::NONE;
mnDisplayOptions = DisplayOptions::NONE;
@ -648,8 +644,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) :
mnAntialiasedMin = rData.mnAntialiasedMin;
mnCursorSize = rData.mnCursorSize;
mnCursorBlinkTime = rData.mnCursorBlinkTime;
mnScreenZoom = rData.mnScreenZoom;
mnScreenFontZoom = rData.mnScreenFontZoom;
mnDragFullOptions = rData.mnDragFullOptions;
mnSelectionOptions = rData.mnSelectionOptions;
mnDisplayOptions = rData.mnDisplayOptions;
@ -1833,32 +1827,6 @@ StyleSettings::GetCursorBlinkTime() const
return (long) mxData->mnCursorBlinkTime;
}
void
StyleSettings::SetScreenZoom( sal_uInt16 nPercent )
{
CopyData();
mxData->mnScreenZoom = nPercent;
}
sal_uInt16
StyleSettings::GetScreenZoom() const
{
return mxData->mnScreenZoom;
}
void
StyleSettings::SetScreenFontZoom( sal_uInt16 nPercent )
{
CopyData();
mxData->mnScreenFontZoom = nPercent;
}
sal_uInt16
StyleSettings::GetScreenFontZoom() const
{
return mxData->mnScreenFontZoom;
}
void
StyleSettings::SetDragFullOptions( DragFullOptions nOptions )
{
@ -2312,8 +2280,6 @@ bool StyleSettings::operator ==( const StyleSettings& rSet ) const
(mxData->mnSplitSize == rSet.mxData->mnSplitSize) &&
(mxData->mnSpinSize == rSet.mxData->mnSpinSize) &&
(mxData->mnAntialiasedMin == rSet.mxData->mnAntialiasedMin) &&
(mxData->mnScreenZoom == rSet.mxData->mnScreenZoom) &&
(mxData->mnScreenFontZoom == rSet.mxData->mnScreenFontZoom) &&
(mxData->mbHighContrast == rSet.mxData->mbHighContrast) &&
(mxData->mbUseSystemUIFonts == rSet.mxData->mbUseSystemUIFonts) &&
(mxData->mnUseFlatBorders == rSet.mxData->mnUseFlatBorders) &&

View File

@ -1138,14 +1138,13 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
// setup the scale factor for Hi-DPI displays
mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
mnDPIX = mpWindowImpl->mpFrameData->mnDPIX;
mnDPIY = mpWindowImpl->mpFrameData->mnDPIY;
if (!utl::ConfigManager::IsAvoidConfig())
{
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
maFont = rStyleSettings.GetAppFont();
maFont = rStyleSettings.GetAppFont();
if ( nStyle & WB_3DLOOK )
{
@ -1160,8 +1159,6 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
}
else
{
mnDPIX = 96;
mnDPIY = 96;
maFont = GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::NONE );
}
@ -1326,13 +1323,12 @@ void Window::ImplInitResolutionSettings()
// recalculate AppFont-resolution and DPI-resolution
if (mpWindowImpl->mbFrame)
{
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom();
mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100;
mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100;
mnDPIX = mpWindowImpl->mpFrameData->mnDPIX;
mnDPIY = mpWindowImpl->mpFrameData->mnDPIY;
// setup the scale factor for Hi-DPI displays
mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings();
SetPointFont(*this, rStyleSettings.GetAppFont());
}
else if ( mpWindowImpl->mpParent )
@ -1355,25 +1351,16 @@ void Window::ImplInitResolutionSettings()
void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const
{
Size aSize = rFont.GetFontSize();
sal_uInt16 nScreenFontZoom;
if (!utl::ConfigManager::IsAvoidConfig())
nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom();
else
nScreenFontZoom = 100;
if (aSize.Width())
{
aSize.Width() *= mpWindowImpl->mpFrameData->mnDPIX;
aSize.Width() += 72 / 2;
aSize.Width() /= 72;
aSize.Width() *= nScreenFontZoom;
aSize.Width() /= 100;
}
aSize.Height() *= mpWindowImpl->mpFrameData->mnDPIY;
aSize.Height() += 72/2;
aSize.Height() /= 72;
aSize.Height() *= nScreenFontZoom;
aSize.Height() /= 100;
if (rRenderContext.IsMapModeEnabled())
aSize = rRenderContext.PixelToLogic(aSize);
@ -1384,25 +1371,16 @@ void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFo
void Window::ImplLogicToPoint(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const
{
Size aSize = rFont.GetFontSize();
sal_uInt16 nScreenFontZoom;
if (!utl::ConfigManager::IsAvoidConfig())
nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom();
else
nScreenFontZoom = 100;
if (rRenderContext.IsMapModeEnabled())
aSize = rRenderContext.LogicToPixel(aSize);
if (aSize.Width())
{
aSize.Width() *= 100;
aSize.Width() /= nScreenFontZoom;
aSize.Width() *= 72;
aSize.Width() += mpWindowImpl->mpFrameData->mnDPIX / 2;
aSize.Width() /= mpWindowImpl->mpFrameData->mnDPIX;
}
aSize.Height() *= 100;
aSize.Height() /= nScreenFontZoom;
aSize.Height() *= 72;
aSize.Height() += mpWindowImpl->mpFrameData->mnDPIY / 2;
aSize.Height() /= mpWindowImpl->mpFrameData->mnDPIY;