26#include <editeng/editeng.hxx>
27#include <document.hxx>
41 void AddFontItems(
const sal_uInt16* pWhichIds,
sal_uInt8 nIdCount,
const SfxItemPool* pItemPool,
const bool bExportDefaults);
44 ScXMLFontAutoStylePool_Impl(
ScXMLExport& rExport,
bool bEmbedFonts);
49void ScXMLFontAutoStylePool_Impl::AddFontItems(
const sal_uInt16* pWhichIds,
sal_uInt8 nIdCount,
const SfxItemPool* pItemPool,
const bool bExportDefaults)
51 for( sal_uInt16 i=0;
i < nIdCount; ++
i )
53 sal_uInt16 nWhichId(pWhichIds[i]);
58 Add( pFont->GetFamilyName(), pFont->GetStyleName(),
59 pFont->GetFamily(), pFont->GetPitch(),
60 pFont->GetCharSet() );
65 Add( pFont->GetFamilyName(), pFont->GetStyleName(),
66 pFont->GetFamily(), pFont->GetPitch(),
67 pFont->GetCharSet() );
72ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(
ScXMLExport& rExportP,
bool bEmbedFonts)
84 AddFontItems(aWhichIds, 3, pItemPool,
true);
86 AddFontItems(aEditWhichIds, 3, pEditPool,
false);
106 EditEngine aEditEngine(mpEditEnginePool.get());
110 const SfxItemPool& rPagePool(pStyle->GetPool()->GetPool());
112 for (sal_uInt16 nPageWhichId : aPageWhichIds)
114 for (
const SfxPoolItem* pItem : rPagePool.GetItemSurrogates( nPageWhichId ))
120 aEditEngine.SetText(*pLeftArea);
121 AddFontItems(aEditWhichIds, 3, mpEditEnginePool.get(),
false);
126 aEditEngine.SetText(*pCenterArea);
127 AddFontItems(aEditWhichIds, 3, mpEditEnginePool.get(),
false);
132 aEditEngine.SetText(*pRightArea);
133 AddFontItems(aEditWhichIds, 3, mpEditEnginePool.get(),
false);
138 pStyle = pItr->Next();
144 bool blockFontEmbedding =
false;
150 blockFontEmbedding =
true;
152 blockFontEmbedding =
true;
153 return new ScXMLFontAutoStylePool_Impl( *
this, !blockFontEmbedding );
static rtl::Reference< SfxItemPool > CreatePool()
bool IsEmbedUsedFontsOnly() const
SC_DLLPUBLIC ScDocumentPool * GetPool()
bool IsEmbedFontScriptComplex() const
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
bool IsEmbedFontScriptLatin() const
bool IsEmbedFontScriptAsian() const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
const EditTextObject * GetCenterArea() const
const EditTextObject * GetLeftArea() const
const EditTextObject * GetRightArea() const
ScDocument * GetDocument()
virtual XMLFontAutoStylePool * CreateFontAutoStylePool() override
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
virtual std::unique_ptr< SfxStyleSheetIterator > CreateIterator(SfxStyleFamily, SfxStyleSearchBits nMask=SfxStyleSearchBits::All)
SvXMLExportFlags getExportFlags() const
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CJK(EE_CHAR_START+17)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO_CTL(EE_CHAR_START+18)
constexpr TypedWhichId< SvxFontItem > EE_CHAR_FONTINFO(EE_CHAR_START+1)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(179)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(178)
constexpr TypedWhichId< SvxFontItem > ATTR_CJK_FONT(111)
constexpr TypedWhichId< SvxFontItem > ATTR_CTL_FONT(116)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERFIRST(182)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERFIRST(183)
constexpr TypedWhichId< SvxFontItem > ATTR_FONT(100)