diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2025-01-09 09:23:41 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2025-01-11 14:46:11 +0100 |
commit | f3fc477dab60f4f1c741b4453b4d0d34d00a46ba (patch) | |
tree | 9274c38276ff0b3ed311f7ae34b7769cd45b2f8d /vcl/inc | |
parent | de0023b819e56d696e2e20bcb766d536ecf41427 (diff) |
pdf: change StructElement to enum class, move out of PDFWriter
Moves the StructElement out of PDFWriter and changes it to enum
class. This makes it mroe type safe, easier to search and more
clear what type we are using.
Change-Id: Icf469319a01f58397b131c3517bc75fba4072500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179977
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/pdf/pdfwriter_impl.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/inc/pdf/pdfwriter_impl.hxx b/vcl/inc/pdf/pdfwriter_impl.hxx index 6781d0f935fd..2d931ba729f8 100644 --- a/vcl/inc/pdf/pdfwriter_impl.hxx +++ b/vcl/inc/pdf/pdfwriter_impl.hxx @@ -573,7 +573,7 @@ typedef ::std::variant<ObjReference, ObjReferenceObj, MCIDReference> PDFStructur struct PDFStructureElement { sal_Int32 m_nObject; - ::std::optional<PDFWriter::StructElement> m_oType; + std::optional<vcl::pdf::StructElement> m_oType; OString m_aAlias; sal_Int32 m_nOwnElement; // index into structure vector sal_Int32 m_nParentElement; // index into structure vector @@ -694,8 +694,8 @@ class PDFWriterImpl final : public VirtualDevice, public PDFObjectContainer public: friend struct vcl::pdf::PDFPage; - const char* getStructureTag( PDFWriter::StructElement ); - static const char* getAttributeTag( PDFWriter::StructAttribute eAtr ); + const char* getStructureTag(vcl::pdf::StructElement eElement); + static const char* getAttributeTag(PDFWriter::StructAttribute eAtr ); static const char* getAttributeValueTag( PDFWriter::StructAttributeValue eVal ); // returns true if compression was done @@ -857,7 +857,7 @@ private: /* the buffer where the data are encrypted, dynamically allocated */ std::vector<sal_uInt8> m_vEncryptionBuffer; - void addRoleMap(const OString& aAlias, PDFWriter::StructElement eType); + void addRoleMap(const OString& aAlias, vcl::pdf::StructElement eType); void checkAndEnableStreamEncryption( sal_Int32 nObject ) override; @@ -1295,7 +1295,7 @@ public: sal_Int32 createNote(const tools::Rectangle& rRect, const tools::Rectangle& rPopupRect, const PDFNote& rNote, sal_Int32 nPageNr); // structure elements sal_Int32 ensureStructureElement(); - void initStructureElement(sal_Int32 id, PDFWriter::StructElement eType, std::u16string_view rAlias); + void initStructureElement(sal_Int32 id, vcl::pdf::StructElement eType, std::u16string_view rAlias); void beginStructureElement(sal_Int32 id); void endStructureElement(); bool setCurrentStructureElement( sal_Int32 nElement ); |