diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index f9bc9bd93b61..59ca37b08eda 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -221,7 +221,17 @@ namespace pcr OFontPropertyExtractor aPropExtractor(_rxModel); // some items, which may be in default state, have to be filled with non-void information - vcl::Font aDefaultVCLFont = Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont(); + StyleSettings aStyleSettings + = Application::GetDefaultDevice()->GetSettings().GetStyleSettings(); + + // if PROPERTY_STANDARD_THEME is set, use style settings independent of platform (theme) + // KEEP IN SYNC WITH UnoControl::createPeer + bool bStandardTheme = false; + css::uno::Any aAnyStandardTheme = _rxModel->getPropertyValue(PROPERTY_STANDARD_THEME); + if ((aAnyStandardTheme >>= bStandardTheme) && bStandardTheme) + aStyleSettings.SetStandardStyles(); + + const vcl::Font aDefaultVCLFont = aStyleSettings.GetAppFont(); css::awt::FontDescriptor aDefaultFont = VCLUnoHelper::CreateFontDescriptor(aDefaultVCLFont); // get the current properties diff --git a/extensions/source/propctrlr/formstrings.hxx b/extensions/source/propctrlr/formstrings.hxx index 41deed74c8fb..495e178f842e 100644 --- a/extensions/source/propctrlr/formstrings.hxx +++ b/extensions/source/propctrlr/formstrings.hxx @@ -198,6 +198,7 @@ inline constexpr OUString PROPERTY_NOLABEL = u"NoLabel"_ustr; inline constexpr OUString PROPERTY_URL = u"URL"_ustr; inline constexpr OUString PROPERTY_SELECTION_TYPE = u"SelectionType"_ustr; +inline constexpr OUString PROPERTY_STANDARD_THEME = u"StandardTheme"_ustr; inline constexpr OUString PROPERTY_ROOT_DISPLAYED = u"RootDisplayed"_ustr; inline constexpr OUString PROPERTY_SHOWS_HANDLES = u"ShowsHandles"_ustr; inline constexpr OUString PROPERTY_SHOWS_ROOT_HANDLES = u"ShowsRootHandles"_ustr; diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 8368070a754c..e54bf5433ba2 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -271,7 +271,7 @@ namespace svxform } // the font (only if we use the document's ref devices for rendering control text, otherwise, the - // default font of VCL controls is assumed to be fine) + // default font from application or standard style is assumed to be fine) if ( useDocumentReferenceDevice( _eDocType ) && xPSI->hasPropertyByName( FM_PROP_FONT ) ) diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 1065ca2f14ac..f4757f5d79b6 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -1297,6 +1297,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer nStyle |= WindowBorderStyle::NONATIVEBORDER; pVclPeer->SetBorderStyle(nStyle); + // KEEP IN SYNC WITH ControlCharacterDialog::translatePropertiesToItems AllSettings aAllSettings = pVclPeer->GetSettings(); StyleSettings aStyleSettings = aAllSettings.GetStyleSettings(); aStyleSettings.SetStandardStyles();