diff options
-rw-r--r-- | vcl/inc/fontsubset.hxx | 2 | ||||
-rw-r--r-- | vcl/source/fontsubset/cff.cxx | 2 | ||||
-rw-r--r-- | vcl/source/fontsubset/fontsubset.cxx | 5 |
3 files changed, 3 insertions, 6 deletions
diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx index 01bd67f4bff8..490d4839f711 100644 --- a/vcl/inc/fontsubset.hxx +++ b/vcl/inc/fontsubset.hxx @@ -77,7 +77,7 @@ private: // subset-request details FontType mnReqFontTypeMask; ///< allowed subset-target font types SvStream* mpOutFile; - const char* mpReqFontName; + OString maReqFontName; const sal_GlyphId* mpReqGlyphIds; const sal_uInt8* mpReqEncodedIds; int mnReqGlyphCount; diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 2021a6a44d71..384556458b4d 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -2615,7 +2615,7 @@ bool FontSubsetInfo::CreateFontSubsetFromCff() // TODO: also support CFF->CFF subsetting (when PDF-export and PS-printing need it) const bool bPfbSubset(mnReqFontTypeMask & FontType::TYPE1_PFB); Type1Emitter aType1Emitter( mpOutFile, bPfbSubset); - aType1Emitter.setSubsetName( mpReqFontName); + aType1Emitter.setSubsetName( maReqFontName.getStr() ); aCff.emitAsType1( aType1Emitter, mpReqGlyphIds, mpReqEncodedIds, mnReqGlyphCount, *this); diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx index d0e05058f967..0fab8bfbf087 100644 --- a/vcl/source/fontsubset/fontsubset.cxx +++ b/vcl/source/fontsubset/fontsubset.cxx @@ -35,7 +35,6 @@ FontSubsetInfo::FontSubsetInfo() , meInFontType( FontType::NO_FONT) , mnReqFontTypeMask( FontType::NO_FONT ) , mpOutFile(nullptr) - , mpReqFontName(nullptr) , mpReqGlyphIds(nullptr) , mpReqEncodedIds(nullptr) , mnReqGlyphCount(0) @@ -67,9 +66,7 @@ bool FontSubsetInfo::CreateFontSubset( mpReqGlyphIds = pReqGlyphIds; mpReqEncodedIds = pReqEncodedIds; mnReqGlyphCount = nReqGlyphCount; - - OString aPSName = m_aPSName.toUtf8(); - mpReqFontName = aPSName.getStr(); + maReqFontName = m_aPSName.toUtf8(); // TODO: move the glyphid/encid/notdef reshuffling from the callers to here |