summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-09-09 20:51:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-10 08:39:09 +0200
commit9d30a59ee1f4b280d70d43e6ee3fc7472e8efa2a (patch)
tree882f324d807b1bfddd7520b00f28da770b02414a /vcl/source
parentc9974818bdf9ab8ccf2f8db140ff6b2b3eb1c461 (diff)
unique_ptr->optional for AllSettings
AllSettings is just a cow_wrapper, so no need to allocate this separately Change-Id: I8f7705d55ab70da209d1383f3812249e0750df5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/outdev/outdev.cxx4
-rw-r--r--vcl/source/window/settings.cxx10
-rw-r--r--vcl/source/window/window.cxx6
3 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 2bb047acc223..ab677b468f73 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -61,7 +61,7 @@ OutputDevice::OutputDevice(OutDevType eOutDevType) :
maRegion(true),
maFillColor( COL_WHITE ),
maTextLineColor( COL_TRANSPARENT ),
- mxSettings( new AllSettings(Application::GetSettings()) )
+ moSettings( Application::GetSettings() )
{
mpGraphics = nullptr;
mpUnoGraphicsList = nullptr;
@@ -215,7 +215,7 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf )
void OutputDevice::SetSettings( const AllSettings& rSettings )
{
- *mxSettings = rSettings;
+ *moSettings = rSettings;
if( mpAlphaVDev )
mpAlphaVDev->SetSettings( rSettings );
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index f9af6982a0d4..11d863c98196 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -53,7 +53,7 @@ void WindowOutputDevice::SetSettings( const AllSettings& rSettings, bool bChild
static_cast<vcl::WindowOutputDevice*>(static_cast<ImplBorderWindow*>(pBorderWindow)->mpMenuBarWindow->GetOutDev())->SetSettings( rSettings, true );
}
- AllSettings aOldSettings(*mxSettings);
+ AllSettings aOldSettings(*moSettings);
OutputDevice::SetSettings( rSettings );
AllSettingsFlags nChangeFlags = aOldSettings.GetChangeFlags( rSettings );
@@ -88,8 +88,8 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->UpdateSettings( rSettings, true );
}
- AllSettings aOldSettings(*mpWindowImpl->mxOutDev->mxSettings);
- AllSettingsFlags nChangeFlags = mpWindowImpl->mxOutDev->mxSettings->Update( AllSettings::GetWindowUpdate(), rSettings );
+ AllSettings aOldSettings(*mpWindowImpl->mxOutDev->moSettings);
+ AllSettingsFlags nChangeFlags = mpWindowImpl->mxOutDev->moSettings->Update( AllSettings::GetWindowUpdate(), rSettings );
// recalculate AppFont-resolution and DPI-resolution
ImplInitResolutionSettings();
@@ -101,9 +101,9 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
* so we can spare all our users the hassle of reacting on
* this in their respective DataChanged.
*/
- MouseSettings aSet( mpWindowImpl->mxOutDev->mxSettings->GetMouseSettings() );
+ MouseSettings aSet( mpWindowImpl->mxOutDev->moSettings->GetMouseSettings() );
aSet.SetWheelBehavior( aOldSettings.GetMouseSettings().GetWheelBehavior() );
- mpWindowImpl->mxOutDev->mxSettings->SetMouseSettings( aSet );
+ mpWindowImpl->mxOutDev->moSettings->SetMouseSettings( aSet );
if( (nChangeFlags & AllSettingsFlags::STYLE) && IsBackground() )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ef43f19e720d..a233327900f1 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1152,7 +1152,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
if (!utl::ConfigManager::IsFuzzing())
{
- const StyleSettings& rStyleSettings = mpWindowImpl->mxOutDev->mxSettings->GetStyleSettings();
+ const StyleSettings& rStyleSettings = mpWindowImpl->mxOutDev->moSettings->GetStyleSettings();
mpWindowImpl->mxOutDev->maFont = rStyleSettings.GetAppFont();
if ( nStyle & WB_3DLOOK )
@@ -1353,7 +1353,7 @@ void Window::ImplInitResolutionSettings()
// setup the scale factor for HiDPI displays
GetOutDev()->mnDPIScalePercentage = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY);
- const StyleSettings& rStyleSettings = GetOutDev()->mxSettings->GetStyleSettings();
+ const StyleSettings& rStyleSettings = GetOutDev()->moSettings->GetStyleSettings();
SetPointFont(*GetOutDev(), rStyleSettings.GetAppFont());
}
else if ( mpWindowImpl->mpParent )
@@ -3689,7 +3689,7 @@ void Window::EnableNativeWidget( bool bEnable )
// send datachanged event to allow for internal changes required for NWF
// like clipmode, transparency, etc.
- DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, GetOutDev()->mxSettings.get(), AllSettingsFlags::STYLE );
+ DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &*GetOutDev()->moSettings, AllSettingsFlags::STYLE );
CompatDataChanged( aDCEvt );
// sometimes the borderwindow is queried, so keep it in sync