filter: inline PptFontCollection to avoid inheritance of std::vector
Change-Id: Ib431f6f69dc3da958629f54d6d2a1ce76b9d63a5
Reviewed-on: https://gerrit.libreoffice.org/69108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 69597b3..7b4e365 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -461,10 +461,6 @@ SvStream& ReadPptFontEntityAtom( SvStream& rIn, PptFontEntityAtom& rAtom )
return rIn;
}
class PptFontCollection : public std::vector<std::unique_ptr<PptFontEntityAtom>>
{
};
SvStream& ReadPptUserEditAtom( SvStream& rIn, PptUserEditAtom& rAtom )
{
sal_Int16 lastViewType = 0;
@@ -2163,7 +2159,7 @@ bool SdrPowerPointImport::ReadFontCollection()
{
bRet = true;
if (!m_pFonts)
m_pFonts.reset( new PptFontCollection );
m_pFonts.reset( new std::vector<std::unique_ptr<PptFontEntityAtom>> );
std::unique_ptr<PptFontEntityAtom> pFont(new PptFontEntityAtom);
ReadPptFontEntityAtom( rStCtrl, *pFont );
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index f907cc0..66be395 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -281,7 +281,6 @@ struct PptFontEntityAtom
friend SvStream& ReadPptFontEntityAtom(SvStream& rIn, PptFontEntityAtom& rAtom);
};
class PptFontCollection;
enum class PptViewTypeEnum : sal_uInt16
{
NONE = 0,
@@ -463,7 +462,7 @@ protected:
::std::vector< PPTOleEntry > aOleObjectList;
std::unique_ptr<PptFontCollection> m_pFonts;
std::unique_ptr<std::vector<std::unique_ptr<PptFontEntityAtom>>> m_pFonts;
sal_uInt32 nStreamLen;