26 #include <editeng/editeng.hxx>
27 #include <document.hxx>
30 #include <stlpool.hxx>
41 void AddFontItems(
const sal_uInt16* pWhichIds,
sal_uInt8 nIdCount,
const SfxItemPool* pItemPool,
const bool bExportDefaults);
44 ScXMLFontAutoStylePool_Impl(
ScXMLExport& rExport,
bool bEmbedFonts);
45 virtual ~ScXMLFontAutoStylePool_Impl()
override;
50 void ScXMLFontAutoStylePool_Impl::AddFontItems(
const sal_uInt16* pWhichIds,
sal_uInt8 nIdCount,
const SfxItemPool* pItemPool,
const bool bExportDefaults)
52 for( sal_uInt16 i=0;
i < nIdCount; ++
i )
54 sal_uInt16 nWhichId(pWhichIds[i]);
58 const SvxFontItem *pFont(static_cast<const SvxFontItem *>(pItem));
59 Add( pFont->GetFamilyName(), pFont->GetStyleName(),
60 pFont->GetFamily(), pFont->GetPitch(),
61 pFont->GetCharSet() );
65 const SvxFontItem *pFont(static_cast<const SvxFontItem *>(pItem));
66 Add( pFont->GetFamilyName(), pFont->GetStyleName(),
67 pFont->GetFamily(), pFont->GetPitch(),
68 pFont->GetCharSet() );
73 ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(
ScXMLExport& rExportP,
bool bEmbedFonts)
75 , mpEditEnginePool(nullptr)
85 AddFontItems(aWhichIds, 3, pItemPool,
true);
87 AddFontItems(aEditWhichIds, 3, pEditPool,
false);
111 const SfxItemPool& rPagePool(pStyle->GetPool()->GetPool());
113 for (sal_uInt16 nPageWhichId : aPageWhichIds)
115 for (
const SfxPoolItem* pItem : rPagePool.GetItemSurrogates( nPageWhichId ))
121 aEditEngine.SetText(*pLeftArea);
122 AddFontItems(aEditWhichIds, 3, mpEditEnginePool,
false);
127 aEditEngine.SetText(*pCenterArea);
128 AddFontItems(aEditWhichIds, 3, mpEditEnginePool,
false);
133 aEditEngine.SetText(*pRightArea);
134 AddFontItems(aEditWhichIds, 3, mpEditEnginePool,
false);
139 pStyle = pItr->Next();
143 ScXMLFontAutoStylePool_Impl::~ScXMLFontAutoStylePool_Impl()
154 bool blockFontEmbedding =
false;
160 blockFontEmbedding =
true;
162 blockFontEmbedding =
true;
163 return new ScXMLFontAutoStylePool_Impl( *
this, !blockFontEmbedding );
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
bool IsEmbedFontScriptLatin() const
const EditTextObject * GetCenterArea() const
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)
SC_DLLPUBLIC ScDocumentPool * GetPool()
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
bool IsEmbedUsedFontsOnly() const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(178)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(179)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(180)
static SfxItemPool * CreatePool()
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
ScDocument * GetDocument()
static void Free(SfxItemPool *pPool)
const EditTextObject * GetRightArea() const
const EditTextObject * GetLeftArea() const
bool IsEmbedFontScriptComplex() const
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
bool IsEmbedFontScriptAsian() const
virtual XMLFontAutoStylePool * CreateFontAutoStylePool() override
SvXMLExportFlags getExportFlags() const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(177)