diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index d7d3f0b9724c..397c14451c7e 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -29,6 +29,7 @@ #if HAVE_FEATURE_ODFSTUDIO #include +#include #endif namespace svx::sidebar { diff --git a/vcl/source/font/fontcache.cxx b/vcl/source/font/fontcache.cxx index d3d5b8f14a71..7119a8881eda 100644 --- a/vcl/source/font/fontcache.cxx +++ b/vcl/source/font/fontcache.cxx @@ -27,7 +27,7 @@ #endif #if HAVE_FEATURE_ODFSTUDIO && defined(LINUX) -#include +#include #endif #include @@ -174,10 +174,11 @@ rtl::Reference ImplFontCache::GetFontInstance( PhysicalFont #if defined(LINUX) OString aFontFile; - const auto nFontId = static_cast(pFontData->GetFontId()); - psp::PrintFontManager& rFontManager = psp::PrintFontManager::get(); - if (rFontManager.getFont(nFontId)) - aFontFile = rFontManager.getFontFileSysPath(nFontId); + if (const auto* pGenericFontFace = + dynamic_cast(pFontData)) + { + aFontFile = pGenericFontFace->GetFontFileName(); + } #endif SAL_INFO("odfstudio.fonts",