vcl/source/pdf/PDFiumLibrary.cxx |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

New commits:
commit dcb411bc33d13d1764bbac9fc3757a052fc7fcf1
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Thu Jun 13 22:03:37 2024 +0900
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Jun 18 12:25:42 2024 +0200

    annot: make sure the annotation subtypes in PDFium match with ours
    
    Change-Id: Ic18f394b532118f39988a650d046880b049c9ec3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168847
    Tested-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 4c3872979d1d..ffdc94adcf29 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -170,6 +170,36 @@ 
static_assert(static_cast<int>(vcl::pdf::PDFAnnotAActionType::Calculate)
                   == FPDF_ANNOT_AACTION_CALCULATE,
               "PDFAnnotAActionType::Calculate) value mismatch");
 
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Unknown) == 
FPDF_ANNOT_UNKNOWN);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Text) == FPDF_ANNOT_TEXT);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Link) == FPDF_ANNOT_LINK);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::FreeText) == 
FPDF_ANNOT_FREETEXT);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Line) == FPDF_ANNOT_LINE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Square) == 
FPDF_ANNOT_SQUARE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Circle) == 
FPDF_ANNOT_CIRCLE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Polygon) == 
FPDF_ANNOT_POLYGON);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Polyline) == 
FPDF_ANNOT_POLYLINE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Highlight) == 
FPDF_ANNOT_HIGHLIGHT);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Underline) == 
FPDF_ANNOT_UNDERLINE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Squiggly) == 
FPDF_ANNOT_SQUIGGLY);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Strikeout) == 
FPDF_ANNOT_STRIKEOUT);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Stamp) == FPDF_ANNOT_STAMP);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Caret) == FPDF_ANNOT_CARET);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Ink) == FPDF_ANNOT_INK);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Popup) == FPDF_ANNOT_POPUP);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::FileAttachment) == 
FPDF_ANNOT_FILEATTACHMENT);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Sound) == FPDF_ANNOT_SOUND);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Movie) == FPDF_ANNOT_MOVIE);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Widget) == 
FPDF_ANNOT_WIDGET);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Screen) == 
FPDF_ANNOT_SCREEN);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Printermark) == 
FPDF_ANNOT_PRINTERMARK);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Trapnet) == 
FPDF_ANNOT_TRAPNET);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Watermark) == 
FPDF_ANNOT_WATERMARK);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Threed) == 
FPDF_ANNOT_THREED);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Richmedia) == 
FPDF_ANNOT_RICHMEDIA);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::XFAWidget) == 
FPDF_ANNOT_XFAWIDGET);
+static_assert(int(vcl::pdf::PDFAnnotationSubType::Redact) == 
FPDF_ANNOT_REDACT);
+
 namespace
 {
 /// Callback class to be used with FPDF_SaveWithVersion().

Reply via email to