24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <com/sun/star/frame/XModel.hpp>
26#include <com/sun/star/lang/XMultiServiceFactory.hpp>
32 return std::make_unique<SfxDocumentFontsPage>(pPage, pController, *
set);
36 :
SfxTabPage(pPage, pController,
"sfx/ui/documentfontspage.ui",
"DocumentFontsPage", &
set)
37 , embedFontsCheckbox(m_xBuilder->weld_check_button(
"embedFonts"))
38 , embedUsedFontsCheckbox(m_xBuilder->weld_check_button(
"embedUsedFonts"))
39 , embedLatinScriptFontsCheckbox(m_xBuilder->weld_check_button(
"embedLatinScriptFonts"))
40 , embedAsianScriptFontsCheckbox(m_xBuilder->weld_check_button(
"embedAsianScriptFonts"))
41 , embedComplexScriptFontsCheckbox(m_xBuilder->weld_check_button(
"embedComplexScriptFonts"))
51 bool bEmbedFonts =
false;
52 bool bEmbedUsedFonts =
false;
54 bool bEmbedLatinScriptFonts =
false;
55 bool bEmbedAsianScriptFonts =
false;
56 bool bEmbedComplexScriptFonts =
false;
63 uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->
GetModel(), uno::UNO_QUERY_THROW );
64 uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY_THROW );
66 xProps->getPropertyValue(
"EmbedFonts") >>= bEmbedFonts;
67 xProps->getPropertyValue(
"EmbedOnlyUsedFonts") >>= bEmbedUsedFonts;
68 xProps->getPropertyValue(
"EmbedLatinScriptFonts") >>= bEmbedLatinScriptFonts;
69 xProps->getPropertyValue(
"EmbedAsianScriptFonts") >>= bEmbedAsianScriptFonts;
70 xProps->getPropertyValue(
"EmbedComplexScriptFonts") >>= bEmbedComplexScriptFonts;
72 catch( uno::Exception& )
98 uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->
GetModel(), uno::UNO_QUERY_THROW );
99 uno::Reference< beans::XPropertySet > xProps( xFac->createInstance(
"com.sun.star.document.Settings"), uno::UNO_QUERY_THROW );
100 xProps->setPropertyValue(
"EmbedFonts",
uno::Any(bEmbedFonts));
101 xProps->setPropertyValue(
"EmbedOnlyUsedFonts",
uno::Any(bEmbedUsedFonts));
102 xProps->setPropertyValue(
"EmbedLatinScriptFonts",
uno::Any(bEmbedLatinScriptFonts));
103 xProps->setPropertyValue(
"EmbedAsianScriptFonts",
uno::Any(bEmbedAsianScriptFonts));
104 xProps->setPropertyValue(
"EmbedComplexScriptFonts",
uno::Any(bEmbedComplexScriptFonts));
106 catch( uno::Exception& )
SfxDocumentFontsPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &set)
virtual ~SfxDocumentFontsPage() override
virtual bool FillItemSet(SfxItemSet *set) override
std::unique_ptr< weld::CheckButton > embedUsedFontsCheckbox
std::unique_ptr< weld::CheckButton > embedFontsCheckbox
std::unique_ptr< weld::CheckButton > embedComplexScriptFontsCheckbox
std::unique_ptr< weld::CheckButton > embedLatinScriptFontsCheckbox
std::unique_ptr< weld::CheckButton > embedAsianScriptFontsCheckbox
virtual void Reset(const SfxItemSet *set) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *set)
css::uno::Reference< css::frame::XModel3 > GetModel() const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
void set(css::uno::UnoInterfaceReference const &value)