summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-12-30 12:19:26 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-12-30 17:41:01 +0100
commitfffc244319a4f39beef3739c9d08c087e713f36b (patch)
treead5b22b39c84d5aeee2243b79bf2a00162e64176 /vcl
parente11dd7a101f2ab64cb7ee4a5c6ac46232356c573 (diff)
pdf: move GlyphEmit out of PDFWriterImpl class
Change-Id: I9ea67cd219a7304baa7abe20be207156a4c0e75e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86004 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx59
1 files changed, 30 insertions, 29 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 57e9ca4eb9c7..3696316c0626 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -256,6 +256,36 @@ struct TransparencyEmit
{}
};
+// font subsets
+class GlyphEmit
+{
+ // performance: actually this should probably a vector;
+ std::vector<sal_Ucs> m_CodeUnits;
+ sal_uInt8 m_nSubsetGlyphID;
+
+public:
+ GlyphEmit() : m_nSubsetGlyphID(0)
+ {
+ }
+
+ void setGlyphId( sal_uInt8 i_nId ) { m_nSubsetGlyphID = i_nId; }
+ sal_uInt8 getGlyphId() const { return m_nSubsetGlyphID; }
+
+ void addCode( sal_Ucs i_cCode )
+ {
+ m_CodeUnits.push_back(i_cCode);
+ }
+ sal_Int32 countCodes() const { return m_CodeUnits.size(); }
+ const std::vector<sal_Ucs>& codes() const { return m_CodeUnits; }
+ sal_Ucs getCode( sal_Int32 i_nIndex ) const
+ {
+ sal_Ucs nRet = 0;
+ if (static_cast<size_t>(i_nIndex) < m_CodeUnits.size())
+ nRet = m_CodeUnits[i_nIndex];
+ return nRet;
+ }
+};
+
}
class PDFWriterImpl : public VirtualDevice
@@ -265,35 +295,6 @@ class PDFWriterImpl : public VirtualDevice
public:
friend struct vcl::pdf::PDFPage;
- // font subsets
- class GlyphEmit
- {
- // performance: actually this should probably a vector;
- std::vector<sal_Ucs> m_CodeUnits;
- sal_uInt8 m_nSubsetGlyphID;
-
- public:
- GlyphEmit() : m_nSubsetGlyphID(0)
- {
- }
-
- void setGlyphId( sal_uInt8 i_nId ) { m_nSubsetGlyphID = i_nId; }
- sal_uInt8 getGlyphId() const { return m_nSubsetGlyphID; }
-
- void addCode( sal_Ucs i_cCode )
- {
- m_CodeUnits.push_back(i_cCode);
- }
- sal_Int32 countCodes() const { return m_CodeUnits.size(); }
- const std::vector<sal_Ucs>& codes() const { return m_CodeUnits; }
- sal_Ucs getCode( sal_Int32 i_nIndex ) const
- {
- sal_Ucs nRet = 0;
- if (static_cast<size_t>(i_nIndex) < m_CodeUnits.size())
- nRet = m_CodeUnits[i_nIndex];
- return nRet;
- }
- };
struct FontEmit
{
sal_Int32 m_nFontID;