summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-12-30 17:57:54 +0100
committerTomaž Vajngerl <quikee@gmail.com>2019-12-30 21:15:03 +0100
commitc6ea20161c7e8004021ad3b6976a2b35ac8b9b31 (patch)
treeb15fa05b37ef4e4ed9949ee19c849d47085cd87b
parent7cd0a5b1a1b23a7c50b92302511e081703c8ec3a (diff)
pdf: move PDFWidget out of PDFWriterImpl class
Change-Id: I0fce968ec566cb663352ecb57279110f0ae9f3e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86021 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx92
2 files changed, 48 insertions, 48 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3f1a3aaadb7f..372d5e2c15d7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5421,9 +5421,9 @@ struct AnnotSortContainer
struct AnnotSorterLess
{
- std::vector< PDFWriterImpl::PDFWidget >& m_rWidgets;
+ std::vector<PDFWidget>& m_rWidgets;
- explicit AnnotSorterLess( std::vector< PDFWriterImpl::PDFWidget >& rWidgets ) : m_rWidgets( rWidgets ) {}
+ explicit AnnotSorterLess( std::vector<PDFWidget>& rWidgets ) : m_rWidgets( rWidgets ) {}
bool operator()( const AnnotationSortEntry& rLeft, const AnnotationSortEntry& rRight )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index c2145aa8c2de..9c4a527aa5ab 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -410,6 +410,52 @@ struct PDFScreen : public PDFAnnotation
}
};
+struct PDFWidget : public PDFAnnotation
+{
+ typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
+
+ PDFWriter::WidgetType m_eType;
+ OString m_aName;
+ OUString m_aDescription;
+ OUString m_aText;
+ DrawTextFlags m_nTextStyle;
+ OUString m_aValue;
+ OString m_aDAString;
+ OString m_aDRDict;
+ OString m_aMKDict;
+ OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
+ // since the object number is not known at the moment
+ // of filling m_aMKDict, the string will be encrypted when emitted.
+ // the /CA string MUST BE the last added to m_aMKDict
+ // see code for details
+ sal_Int32 m_nFlags;
+ sal_Int32 m_nParent; // if not 0, parent's object number
+ std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
+ std::vector<sal_Int32> m_aKidsIndex; // widget children, contains index to m_aWidgets
+ OUString m_aOnValue;
+ sal_Int32 m_nTabOrder; // lowest number gets first in tab order
+ sal_Int32 m_nRadioGroup;
+ sal_Int32 m_nMaxLen;
+ bool m_bSubmit;
+ bool m_bSubmitGet;
+ sal_Int32 m_nDest;
+ std::vector<OUString> m_aListEntries;
+ std::vector<sal_Int32> m_aSelectedEntries;
+ std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
+ PDFWidget()
+ : m_eType( PDFWriter::PushButton ),
+ m_nTextStyle( DrawTextFlags::NONE ),
+ m_nFlags( 0 ),
+ m_nParent( 0 ),
+ m_nTabOrder( 0 ),
+ m_nRadioGroup( -1 ),
+ m_nMaxLen( 0 ),
+ m_bSubmit( false ),
+ m_bSubmitGet( false ),
+ m_nDest( -1 )
+ {}
+};
+
}
class PDFWriterImpl : public VirtualDevice
@@ -419,52 +465,6 @@ class PDFWriterImpl : public VirtualDevice
public:
friend struct vcl::pdf::PDFPage;
- struct PDFWidget : public PDFAnnotation
- {
- typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
-
- PDFWriter::WidgetType m_eType;
- OString m_aName;
- OUString m_aDescription;
- OUString m_aText;
- DrawTextFlags m_nTextStyle;
- OUString m_aValue;
- OString m_aDAString;
- OString m_aDRDict;
- OString m_aMKDict;
- OString m_aMKDictCAString; // i12626, added to be able to encrypt the /CA text string
- // since the object number is not known at the moment
- // of filling m_aMKDict, the string will be encrypted when emitted.
- // the /CA string MUST BE the last added to m_aMKDict
- // see code for details
- sal_Int32 m_nFlags;
- sal_Int32 m_nParent; // if not 0, parent's object number
- std::vector<sal_Int32> m_aKids; // widget children, contains object numbers
- std::vector<sal_Int32> m_aKidsIndex; // widget children, contains index to m_aWidgets
- OUString m_aOnValue;
- sal_Int32 m_nTabOrder; // lowest number gets first in tab order
- sal_Int32 m_nRadioGroup;
- sal_Int32 m_nMaxLen;
- bool m_bSubmit;
- bool m_bSubmitGet;
- sal_Int32 m_nDest;
- std::vector<OUString> m_aListEntries;
- std::vector<sal_Int32> m_aSelectedEntries;
- std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
- PDFWidget()
- : m_eType( PDFWriter::PushButton ),
- m_nTextStyle( DrawTextFlags::NONE ),
- m_nFlags( 0 ),
- m_nParent( 0 ),
- m_nTabOrder( 0 ),
- m_nRadioGroup( -1 ),
- m_nMaxLen( 0 ),
- m_bSubmit( false ),
- m_bSubmitGet( false ),
- m_nDest( -1 )
- {}
- };
-
struct PDFStructureAttribute
{
PDFWriter::StructAttributeValue eValue;