filter/source/pdf/impdialog.cxx           |   94 +++++---
 filter/source/pdf/impdialog.hxx           |   10 
 filter/uiconfig/ui/pdfgeneralpage.ui      |  331 +++++++++++++++---------------
 sc/qa/uitest/calc_tests4/exportToPDF.py   |    2 
 sd/qa/uitest/impress_tests/exportToPDF.py |    2 
 sw/qa/uitest/writer_tests4/exportToPDF.py |    2 
 6 files changed, 246 insertions(+), 195 deletions(-)

New commits:
commit 94378114b58a89812ce9d98887b0fd193c06b15d
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Wed Dec 11 13:42:03 2024 +0900
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Thu Dec 26 07:51:48 2024 +0100

    pdf: Rearrange general tab of PDF dialog, add PDF vers. selection
    
    Repurpuses PDF/A combobox to also add PDF 1.7 and PDF 2.0 as
    options, as those are exclusive (either you have classic PDF, or
    you select PDF/A which is a special version of some PDF version.
    No need to have a check box for PDF/A anymore, so this was removed.
    
    - Moved the version selection to top
    - Added "Forms" frame, which for all the form options.
    - Moved Tagged PDF into "Structure" frame.
    - Reworded some text (extended tips, tooltips) for PDF versions
    
    Change-Id: I731222ee02afea6a49e4213d18f27d1beae9da10
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178270
    Tested-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178768
    Tested-by: Tomaž Vajngerl <qui...@gmail.com>
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 8584dd1a698e..03250388c5d6 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -491,12 +491,11 @@ 
ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogC
     , mxNfQuality(m_xBuilder->weld_metric_spin_button(u"quality"_ustr, 
FieldUnit::PERCENT))
     , 
mxCbReduceImageResolution(m_xBuilder->weld_check_button(u"changeresolution"_ustr))
     , mxCoReduceImageResolution(m_xBuilder->weld_combo_box(u"resolution"_ustr))
-    , mxCbPDFA(m_xBuilder->weld_check_button(u"pdfa"_ustr))
     , mxCbPDFUA(m_xBuilder->weld_check_button(u"pdfua"_ustr))
-    , mxRbPDFAVersion(m_xBuilder->weld_combo_box(u"pdfaversion"_ustr))
+    , mxRbPDFVersion(m_xBuilder->weld_combo_box(u"pdf_version"_ustr))
     , mxCbTaggedPDF(m_xBuilder->weld_check_button(u"tagged"_ustr))
     , mxCbExportFormFields(m_xBuilder->weld_check_button(u"forms"_ustr))
-    , mxFormsFrame(m_xBuilder->weld_widget(u"formsframe"_ustr))
+    , mxFormsFrame(m_xBuilder->weld_widget(u"forms_frame"_ustr))
     , mxLbFormsFormat(m_xBuilder->weld_combo_box(u"format"_ustr))
     , 
mxCbAllowDuplicateFieldNames(m_xBuilder->weld_check_button(u"allowdups"_ustr))
     , mxCbExportBookmarks(m_xBuilder->weld_check_button(u"bookmarks"_ustr))
@@ -525,6 +524,17 @@ ImpPDFTabGeneralPage::~ImpPDFTabGeneralPage()
         mxPasswordUnusedWarnDialog->response(RET_CANCEL);
 }
 
+bool ImpPDFTabGeneralPage::IsPdfaSelected() const
+{
+    OUString aVersion = mxRbPDFVersion->get_active_id();
+
+    return
+        aVersion == u"1"_ustr ||
+        aVersion == u"2"_ustr ||
+        aVersion == u"3"_ustr ||
+        aVersion == u"4"_ustr;
+}
+
 void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
 {
     mpParent = pParent;
@@ -572,38 +582,51 @@ void 
ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
     mxCbWatermark->connect_toggled( LINK( this, ImpPDFTabGeneralPage, 
ToggleWatermarkHdl ) );
     mxFtWatermark->set_sensitive(false );
     mxEdWatermark->set_sensitive( false );
-    mxCbPDFA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHandle));
 
-    const bool bIsPDFA = (pParent->mnPDFTypeSelection>=1) && 
(pParent->mnPDFTypeSelection <= 3);
-    mxCbPDFA->set_active(bIsPDFA);
-    switch( pParent->mnPDFTypeSelection )
+    bool bIsPDFA = false;
+    switch (pParent->mnPDFTypeSelection)
     {
     case 1: // PDF/A-1
-        mxRbPDFAVersion->set_active_id(u"1"_ustr);
+        bIsPDFA = true;
+        mxRbPDFVersion->set_active_id(u"1"_ustr);
         break;
     case 2: // PDF/A-2
-        mxRbPDFAVersion->set_active_id(u"2"_ustr);
+        bIsPDFA = true;
+        mxRbPDFVersion->set_active_id(u"2"_ustr);
         break;
     case 3: // PDF/A-3
+        bIsPDFA = true;
+        mxRbPDFVersion->set_active_id(u"3"_ustr);
+        break;
+    case 4: // PDF/A-4
+        bIsPDFA = true;
+        mxRbPDFVersion->set_active_id(u"4"_ustr);
+        break;
+    case 20: // PDF 2.0
+        mxRbPDFVersion->set_active_id(u"20"_ustr);
+        break;
+    case 17:
     default: // PDF 1.x
-        mxRbPDFAVersion->set_active_id(u"3"_ustr);
+        mxRbPDFVersion->set_active_id(u"17"_ustr);
         break;
     }
 
+    mxRbPDFVersion->connect_changed(LINK(this, ImpPDFTabGeneralPage, 
SelectPDFVersion));
+
     const bool bIsPDFUA = pParent->mbPDFUACompliance;
     mxCbPDFUA->set_active(bIsPDFUA);
-    mxCbPDFUA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHandle));
+    mxCbPDFUA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, 
TogglePDFUniversalAccessibilityHandle));
     
mxCbPDFUA->set_sensitive(!pParent->maConfigItem.IsReadOnly(u"PDFUACompliance"_ustr));
 
-    // the TogglePDFVersionOrUniversalAccessibilityHandle handler will read or 
write the *UserSelection based
-    // on the mxCbPDFA (= bIsPDFA) state, so we have to prepare the correct 
input state.
+    // the thePDFVersionChanged will read or write the *UserSelection based on 
widget state,
+    // so we have to prepare the correct input state.
     if (bIsPDFA || bIsPDFUA)
         mxCbTaggedPDF->set_active(pParent->mbUseTaggedPDFUserSelection);
     else
         mbUseTaggedPDFUserSelection = pParent->mbUseTaggedPDFUserSelection;
 
     mxCbExportBookmarks->set_active(pParent->mbExportBookmarksUserSelection);
-    TogglePDFVersionOrUniversalAccessibilityHandle(*mxCbPDFA);
+    thePDFVersionChanged();
 
     mxCbExportFormFields->set_active(pParent->mbExportFormFields);
     mxCbExportFormFields->connect_toggled( LINK( this, ImpPDFTabGeneralPage, 
ToggleExportFormFieldsHdl ) );
@@ -751,23 +774,23 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( 
ImpPDFTabDialog* pParent )
     pParent->mnPDFTypeSelection = 0;
     pParent->mbUseTaggedPDF = mxCbTaggedPDF->get_active();
 
-    const bool bIsPDFA = mxCbPDFA->get_active();
+    const bool bIsPDFA = IsPdfaSelected();
     const bool bIsPDFUA = mxCbPDFUA->get_active();
 
-    if (bIsPDFA)
-    {
-        pParent->mnPDFTypeSelection = 3;
-        OUString currentPDFAMode = mxRbPDFAVersion->get_active_id();
-        if( currentPDFAMode == "1" )
-            pParent->mnPDFTypeSelection = 1;
-        else if(currentPDFAMode == "2")
-            pParent->mnPDFTypeSelection = 2;
-    }
+    OUString sCurrentPDFVersion = mxRbPDFVersion->get_active_id();
+    sal_Int32 nValue = sCurrentPDFVersion.toInt32();
+
+    static constexpr const auto constValidValues = 
std::to_array<sal_Int32>({1, 2, 3, 4, 17, 20});
+    if (std::find(constValidValues.begin(), constValidValues.end(), nValue) != 
constValidValues.end())
+        pParent->mnPDFTypeSelection = nValue;
+    else
+        pParent->mnPDFTypeSelection = 17;
 
     pParent->mbPDFUACompliance = bIsPDFUA;
 
     if (!bIsPDFA && !bIsPDFUA)
         mbUseTaggedPDFUserSelection = pParent->mbUseTaggedPDF;
+
     if (!bIsPDFUA)
     {
         pParent->mbExportBookmarksUserSelection = pParent->mbExportBookmarks;
@@ -907,9 +930,9 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl, 
weld::Toggleable&, voi
     }
 }
 
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHandle, weld::Toggleable&, void)
+void ImpPDFTabGeneralPage::thePDFVersionChanged()
 {
-    const bool bIsPDFA = mxCbPDFA->get_active();
+    const bool bIsPDFA = IsPdfaSelected();
     const bool bIsPDFUA = mxCbPDFUA->get_active();
 
     // set the security page status (and its controls as well)
@@ -919,8 +942,8 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHa
 
     mxCbTaggedPDF->set_sensitive(
         !bIsPDFA && !bIsPDFUA && !IsReadOnlyProperty(u"UseTaggedPDF"_ustr));
-    mxRbPDFAVersion->set_sensitive(
-        bIsPDFA && !IsReadOnlyProperty(u"SelectPdfVersion"_ustr));
+
+    
mxRbPDFVersion->set_sensitive(!IsReadOnlyProperty(u"SelectPdfVersion"_ustr));
 
     if (bIsPDFA || bIsPDFUA)
     {
@@ -968,8 +991,7 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHa
         
mxCbExportBookmarks->set_active(mpParent->mbExportBookmarksUserSelection);
         
mxCbUseReferenceXObject->set_active(mpParent->mbUseReferenceXObjectUserSelection);
     }
-    mxCbExportBookmarks->set_sensitive(
-        !bIsPDFUA && !IsReadOnlyProperty(u"ExportBookmarks"_ustr));
+    mxCbExportBookmarks->set_sensitive(!bIsPDFUA && 
!IsReadOnlyProperty(u"ExportBookmarks"_ustr));
     mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA);
 
     ImpPDFTabOpnFtrPage *const pOpenPage(mpParent ? mpParent->getOpenPage() : 
nullptr);
@@ -984,6 +1006,16 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, 
TogglePDFVersionOrUniversalAccessibilityHa
         pLinksPage->ImplPDFALinkControl(!bIsPDFA);
 }
 
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFUniversalAccessibilityHandle, 
weld::Toggleable&, void)
+{
+    thePDFVersionChanged();
+}
+
+IMPL_LINK_NOARG(ImpPDFTabGeneralPage, SelectPDFVersion, weld::ComboBox&, void)
+{
+    thePDFVersionChanged();
+}
+
 /// The option features tab page
 ImpPDFTabOpnFtrPage::ImpPDFTabOpnFtrPage(weld::Container* pPage, 
weld::DialogController* pController, const SfxItemSet& rCoreSet)
     : SfxTabPage(pPage, pController, u"filter/ui/pdfviewpage.ui"_ustr, 
u"PdfViewPage"_ustr, &rCoreSet)
@@ -1604,7 +1636,7 @@ void ImpPDFTabLinksPage::SetFilterConfigItem( const  
ImpPDFTabDialog* pParent )
 
     ImpPDFTabGeneralPage* pGeneralPage = pParent->getGeneralPage();
     if (pGeneralPage)
-        ImplPDFALinkControl(!pGeneralPage->mxCbPDFA->get_active());
+        ImplPDFALinkControl(!pGeneralPage->IsPdfaSelected());
 }
 
 
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 0db3c4e66ed5..1b697b257ece 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -197,9 +197,8 @@ class ImpPDFTabGeneralPage : public SfxTabPage
     std::unique_ptr<weld::MetricSpinButton> mxNfQuality;
     std::unique_ptr<weld::CheckButton> mxCbReduceImageResolution;
     std::unique_ptr<weld::ComboBox> mxCoReduceImageResolution;
-    std::unique_ptr<weld::CheckButton> mxCbPDFA;
     std::unique_ptr<weld::CheckButton> mxCbPDFUA;
-    std::unique_ptr<weld::ComboBox> mxRbPDFAVersion;
+    std::unique_ptr<weld::ComboBox> mxRbPDFVersion;
     std::unique_ptr<weld::CheckButton> mxCbTaggedPDF;
     std::unique_ptr<weld::CheckButton> mxCbExportFormFields;
     std::unique_ptr<weld::Widget> mxFormsFrame;
@@ -238,7 +237,8 @@ class ImpPDFTabGeneralPage : public SfxTabPage
     void                        ToggleSheetsHdl();
     void                        EnableExportNotesPages();
 
-    DECL_LINK(TogglePDFVersionOrUniversalAccessibilityHandle, 
weld::Toggleable&, void);
+    DECL_LINK(TogglePDFUniversalAccessibilityHandle, weld::Toggleable&, void);
+    DECL_LINK(SelectPDFVersion, weld::ComboBox&, void);
 
     std::shared_ptr<weld::MessageDialog> mxPasswordUnusedWarnDialog;
 
@@ -247,6 +247,8 @@ class ImpPDFTabGeneralPage : public SfxTabPage
         return mpParent && mpParent->maConfigItem.IsReadOnly(rPropertyName);
     }
 
+    void thePDFVersionChanged();
+
 public:
 
     ImpPDFTabGeneralPage(weld::Container* pPage, weld::DialogController* 
pController, const SfxItemSet& rSet);
@@ -256,7 +258,7 @@ public:
 
     void                        GetFilterConfigItem(ImpPDFTabDialog* paParent);
     void                        SetFilterConfigItem(ImpPDFTabDialog* paParent);
-    bool                        IsPdfaSelected() const { return 
mxCbPDFA->get_active(); }
+    bool IsPdfaSelected() const;
     bool IsPdfUaSelected() const { return mxCbPDFUA->get_active(); }
 };
 
diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui 
b/filter/uiconfig/ui/pdfgeneralpage.ui
index ef6d9767b06b..212631e6c2de 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -527,15 +527,15 @@
         <property name="orientation">vertical</property>
         <property name="spacing">12</property>
         <child>
-          <object class="GtkFrame" id="frame4">
+          <object class="GtkFrame" id="general_frame">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="margin-end">6</property>
             <property name="label-xalign">0</property>
             <property name="shadow-type">none</property>
             <child>
-              <!-- n-columns=1 n-rows=6 -->
-              <object class="GtkGrid" id="grid10">
+              <!-- n-columns=1 n-rows=3 -->
+              <object class="GtkGrid" id="general_grid">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="margin-start">12</property>
@@ -547,68 +547,167 @@
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
                     <property name="receives-default">False</property>
-                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that is easily 
editable in %PRODUCTNAME</property>
+                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that embeds the 
original ODF file as an attachment.</property>
                     <property name="halign">start</property>
                     <property name="use-underline">True</property>
                     <property name="draw-indicator">True</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="embed-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|embed">This setting 
enables you to export the document as a .pdf file containing two file formats: 
PDF and ODF.</property>
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|embed">This setting 
enables you to export the document as a .pdf file containing two file formats: 
PDF and ODF as an attachment. </property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
+                    <property name="top-attach">2</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="tagged">
-                    <property name="label" translatable="yes" 
context="pdfgeneralpage|tagged">_Tagged PDF (add document structure)</property>
+                  <!-- n-columns=1 n-rows=1 -->
+                  <object class="GtkGrid">
                     <property name="visible">True</property>
-                    <property name="can-focus">True</property>
-                    <property name="receives-default">False</property>
-                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content 
structure information in a PDF</property>
-                    <property name="halign">start</property>
-                    <property name="use-underline">True</property>
-                    <property name="draw-indicator">True</property>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="tagged-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|tagged">Select to write 
PDF tags. This can increase file size by huge amounts.</property>
+                    <property name="can-focus">False</property>
+                    <property name="row-spacing">6</property>
+                    <child>
+                      <!-- n-columns=2 n-rows=1 -->
+                      <object class="GtkGrid" id="pdfagrid">
+                        <property name="visible">True</property>
+                        <property name="can-focus">False</property>
+                        <property name="margin-start">18</property>
+                        <property name="hexpand">True</property>
+                        <property name="column-spacing">14</property>
+                        <child>
+                          <object class="GtkComboBoxText" id="pdf_version">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|pdf_version|tooltip_text">Select the PDF version. PDF/A 
version variants creates an ISO 19005 compliant PDF file, ideal for long-term 
document preservation.</property>
+                            <property name="hexpand">True</property>
+                            <property name="active">3</property>
+                            <items>
+                              <item id="17" translatable="yes" 
context="pdfgeneralpage|pdf_version">PDF 1.7</item>
+                              <item id="20" translatable="yes" 
context="pdfgeneralpage|pdf_version">PDF 2.0</item>
+                              <item id="1" 
context="pdfgeneralpage|pdf_version">PDF/A-1b (PDF 1.4 base)</item>
+                              <item id="2" 
context="pdfgeneralpage|pdf_version">PDF/A-2b (PDF 1.7 base)</item>
+                              <item id="3" 
context="pdfgeneralpage|pdf_version">PDF/A-3b (PDF 1.7 base)</item>
+                              <item id="4" translatable="yes" 
context="pdfgeneralpage|pdf_version">PDF/A-4 (PDF 2.0 base)</item>
+                            </items>
+                            <accessibility>
+                              <relation type="labelled-by" 
target="pdf_version_label"/>
+                            </accessibility>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" 
id="pdf_version-atkobject">
+                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="pdfgeneralpage|extended_tip|pdf_version">Versions can be either the 
"classic" PDF (i.e. PDF 1.7, PDF 2.0) or PDF/A conformant. PDF/A is defined as 
an electronic document file format for long term preservation  and archiving. 
It allows only a subset of PDF features that are compatible with that use case. 
For example: All fonts that were used in the source document will be embedded 
into the generated PDF file. PDF tags will be written.</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left-attach">1</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkBox" id="pdfabox">
+                            <property name="visible">True</property>
+                            <property name="can-focus">False</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkLabel" id="pdf_version_label">
+                                <property name="visible">True</property>
+                                <property name="can-focus">False</property>
+                                <property name="halign">start</property>
+                                <property name="valign">baseline</property>
+                                <property name="vexpand">True</property>
+                                <property name="label" translatable="yes" 
context="pdfgeneralpage|pdf_version">PDF_ Version:</property>
+                                <property name="use-underline">True</property>
+                                <accessibility>
+                                  <relation type="label-for" 
target="pdf_version"/>
+                                </accessibility>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">0</property>
+                          </packing>
+                        </child>
                       </object>
+                      <packing>
+                        <property name="left-attach">0</property>
+                        <property name="top-attach">0</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">3</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="forms">
-                    <property name="label" translatable="yes" 
context="pdfgeneralpage|forms">Create PDF for_m</property>
+                  <object class="GtkCheckButton" id="pdfua">
+                    <property name="label" translatable="yes" 
context="pdfgeneralpage|pdfua">Universal Accessibilit_y (PDF/UA)</property>
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
                     <property name="receives-default">False</property>
-                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can 
be filled out</property>
+                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|pdfua|tooltip_text">Creates a universal 
accessibility-compliant PDF file that follows the requirements of PDF/UA (ISO 
14289) specifications.</property>
                     <property name="halign">start</property>
                     <property name="use-underline">True</property>
                     <property name="draw-indicator">True</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="forms-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|forms">Choose to create 
a PDF form. This can be filled out and printed by the user of the PDF 
document.</property>
+                      <object class="AtkObject" id="pdfua-atkobject">
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|pdfua">Creates a 
universal accessibility-complying PDF file that follows the requirements of 
PDF/UA (ISO 14289) specifications.</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">4</property>
+                    <property name="top-attach">1</property>
                   </packing>
                 </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="general_label">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="label" translatable="yes" 
context="pdfgeneralpage|general_label">General</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="forms_frame">
+            <property name="visible">True</property>
+            <property name="can-focus">False</property>
+            <property name="label-xalign">0</property>
+            <property name="shadow-type">none</property>
+            <child>
+              <!-- n-columns=1 n-rows=2 -->
+              <object class="GtkGrid" id="forms_grid">
+                <property name="visible">True</property>
+                <property name="can-focus">False</property>
+                <property name="double-buffered">False</property>
+                <property name="margin-start">12</property>
+                <property name="margin-top">6</property>
+                <property name="row-spacing">3</property>
                 <child>
                   <!-- n-columns=2 n-rows=2 -->
-                  <object class="GtkGrid" id="formsframe">
+                  <object class="GtkGrid" id="forms_options_grid">
                     <property name="visible">True</property>
                     <property name="can-focus">False</property>
+                    <property name="double-buffered">False</property>
                     <property name="margin-start">18</property>
                     <property name="hexpand">True</property>
                     <property name="row-spacing">6</property>
@@ -657,12 +756,12 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkBox" id="submitformatbox">
+                      <object class="GtkBox" id="submitformatbox1">
                         <property name="visible">True</property>
                         <property name="can-focus">False</property>
                         <property name="orientation">vertical</property>
                         <child>
-                          <object class="GtkLabel" id="label7">
+                          <object class="GtkLabel" id="submit_format_label">
                             <property name="visible">True</property>
                             <property name="can-focus">False</property>
                             <property name="halign">start</property>
@@ -687,136 +786,39 @@
                       </packing>
                     </child>
                   </object>
-                  <packing>
-                    <property name="left-attach">0</property>
-                    <property name="top-attach">5</property>
-                  </packing>
-                </child>
-                <child>
-                  <!-- n-columns=1 n-rows=2 -->
-                  <object class="GtkGrid">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <property name="row-spacing">6</property>
-                    <child>
-                      <object class="GtkCheckButton" id="pdfa">
-                        <property name="label" translatable="yes" 
context="pdfgeneralpage|pdfa">Archival (P_DF/A, ISO 19005)</property>
-                        <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">False</property>
-                        <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|pdfa|tooltip_text">Creates an ISO 19005-2 compliant PDF 
file, ideal for long-term document preservation</property>
-                        <property name="halign">start</property>
-                        <property name="use-underline">True</property>
-                        <property name="draw-indicator">True</property>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="pdfa-atkobject">
-                            <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|pdfa">Converts to the 
PDF/A-2b or PDF/A-1b format. This is defined as an electronic document file 
format for long term preservation. All fonts that were used in the source 
document will be embedded into the generated PDF file. PDF tags will be 
written.</property>
-                          </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left-attach">0</property>
-                        <property name="top-attach">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <!-- n-columns=2 n-rows=1 -->
-                      <object class="GtkGrid" id="pdfagrid">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="margin-start">18</property>
-                        <property name="hexpand">True</property>
-                        <property name="column-spacing">14</property>
-                        <child>
-                          <object class="GtkComboBoxText" id="pdfaversion">
-                            <property name="visible">True</property>
-                            <property name="can-focus">False</property>
-                            <property name="hexpand">True</property>
-                            <property name="active">3</property>
-                            <items>
-                              <item id="1" 
context="pdfgeneralpage|pdfaversion">PDF/A-1b</item>
-                              <item id="2" 
context="pdfgeneralpage|pdfaversion">PDF/A-2b</item>
-                              <item id="3" 
context="pdfgeneralpage|pdfaversion">PDF/A-3b</item>
-                            </items>
-                            <accessibility>
-                              <relation type="labelled-by" 
target="pdfaversionlabel"/>
-                            </accessibility>
-                          </object>
-                          <packing>
-                            <property name="left-attach">1</property>
-                            <property name="top-attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkBox" id="pdfabox">
-                            <property name="visible">True</property>
-                            <property name="can-focus">False</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <object class="GtkLabel" id="pdfaversionlabel">
-                                <property name="visible">True</property>
-                                <property name="can-focus">False</property>
-                                <property name="halign">start</property>
-                                <property name="valign">baseline</property>
-                                <property name="vexpand">True</property>
-                                <property name="label" translatable="yes" 
context="pdfgeneralpage|pdfaversion">PDF_/A version:</property>
-                                <property name="use-underline">True</property>
-                                <accessibility>
-                                  <relation type="label-for" 
target="pdfaversion"/>
-                                </accessibility>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">True</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left-attach">0</property>
-                            <property name="top-attach">0</property>
-                          </packing>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="left-attach">0</property>
-                        <property name="top-attach">1</property>
-                      </packing>
-                    </child>
-                  </object>
                   <packing>
                     <property name="left-attach">0</property>
                     <property name="top-attach">1</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkCheckButton" id="pdfua">
-                    <property name="label" translatable="yes" 
context="pdfgeneralpage|pdfua">Universal Accessibilit_y (PDF/UA)</property>
+                  <object class="GtkCheckButton" id="forms">
+                    <property name="label" translatable="yes" 
context="pdfgeneralpage|forms">Create PDF for_m</property>
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
                     <property name="receives-default">False</property>
-                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|pdfua|tooltip_text">Creates a universal 
accessibility-compliant PDF file that follows the requirements of PDF/UA (ISO 
14289) specifications.</property>
+                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can 
be filled out</property>
                     <property name="halign">start</property>
                     <property name="use-underline">True</property>
                     <property name="draw-indicator">True</property>
                     <child internal-child="accessible">
-                      <object class="AtkObject" id="pdfua-atkobject">
-                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|pdfua">Creates a 
universal accessibility-complying PDF file that follows the requirements of 
PDF/UA (ISO 14289) specifications.</property>
+                      <object class="AtkObject" id="forms-atkobject">
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|forms">Choose to create 
a PDF form. This can be filled out and printed by the user of the PDF 
document.</property>
                       </object>
                     </child>
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label4">
+              <object class="GtkLabel" id="forms_label">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="label" translatable="yes" 
context="pdfgeneralpage|label4">General</property>
+                <property name="label" translatable="yes" 
context="pdfgeneralpage|forms_label">Forms</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
@@ -826,18 +828,18 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">0</property>
+            <property name="position">1</property>
           </packing>
         </child>
         <child>
-          <object class="GtkFrame" id="frame7">
+          <object class="GtkFrame" id="structure_frame">
             <property name="visible">True</property>
             <property name="can-focus">False</property>
             <property name="label-xalign">0</property>
             <property name="shadow-type">none</property>
             <child>
-              <!-- n-columns=1 n-rows=10 -->
-              <object class="GtkGrid" id="grid2">
+              <!-- n-columns=1 n-rows=11 -->
+              <object class="GtkGrid" id="structure_grid">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
                 <property name="margin-start">12</property>
@@ -849,10 +851,10 @@
                     <property name="visible">True</property>
                     <property name="can-focus">True</property>
                     <property name="receives-default">False</property>
+                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|bookmarks|tooltip_text">Export headings along with 
hyperlinked entries in Table of Contents as PDF bookmarks.</property>
                     <property name="halign">start</property>
                     <property name="use-underline">True</property>
                     <property name="draw-indicator">True</property>
-                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|bookmarks|tooltip_text">Export headings along with 
hyperlinked entries in Table of Contents as PDF bookmarks.</property>
                     <child internal-child="accessible">
                       <object class="AtkObject" id="bookmarks-atkobject">
                         <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|bookmarks">PDF 
bookmarks are created for all paragraphs with outline level 1 or greater and 
for all “Table of Contents” entries with hyperlinks.</property>
@@ -861,7 +863,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">0</property>
+                    <property name="top-attach">1</property>
                   </packing>
                 </child>
                 <child>
@@ -881,7 +883,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">1</property>
+                    <property name="top-attach">2</property>
                   </packing>
                 </child>
                 <child>
@@ -901,7 +903,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">2</property>
+                    <property name="top-attach">3</property>
                   </packing>
                 </child>
                 <child>
@@ -921,7 +923,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">8</property>
+                    <property name="top-attach">9</property>
                   </packing>
                 </child>
                 <child>
@@ -941,7 +943,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">9</property>
+                    <property name="top-attach">10</property>
                   </packing>
                 </child>
                 <child>
@@ -961,7 +963,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">6</property>
+                    <property name="top-attach">7</property>
                   </packing>
                 </child>
                 <child>
@@ -981,7 +983,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">4</property>
+                    <property name="top-attach">5</property>
                   </packing>
                 </child>
                 <child>
@@ -1002,7 +1004,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">5</property>
+                    <property name="top-attach">6</property>
                   </packing>
                 </child>
                 <child>
@@ -1022,7 +1024,7 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">7</property>
+                    <property name="top-attach">8</property>
                   </packing>
                 </child>
                 <child>
@@ -1042,16 +1044,37 @@
                   </object>
                   <packing>
                     <property name="left-attach">0</property>
-                    <property name="top-attach">3</property>
+                    <property name="top-attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkCheckButton" id="tagged">
+                    <property name="label" translatable="yes" 
context="pdfgeneralpage|tagged">_Tagged PDF (add document structure)</property>
+                    <property name="visible">True</property>
+                    <property name="can-focus">True</property>
+                    <property name="receives-default">False</property>
+                    <property name="tooltip-text" translatable="yes" 
context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content 
structure information in a PDF</property>
+                    <property name="halign">start</property>
+                    <property name="use-underline">True</property>
+                    <property name="draw-indicator">True</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="tagged-atkobject">
+                        <property name="AtkObject::accessible-description" 
translatable="yes" context="pdfgeneralpage|extended_tip|tagged">Select to write 
PDF tags. This can increase file size by huge amounts.</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left-attach">0</property>
+                    <property name="top-attach">0</property>
                   </packing>
                 </child>
               </object>
             </child>
             <child type="label">
-              <object class="GtkLabel" id="label9">
+              <object class="GtkLabel" id="structure_label">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
-                <property name="label" translatable="yes" 
context="pdfgeneralpage|label9">Structure</property>
+                <property name="label" translatable="yes" 
context="pdfgeneralpage|structure_label">Structure</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
@@ -1061,7 +1084,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </object>
@@ -1071,15 +1094,8 @@
       </packing>
     </child>
   </object>
-  <object class="GtkSizeGroup" id="comboBoxSizegroup">
-    <widgets>
-      <widget name="format"/>
-      <widget name="pdfaversion"/>
-    </widgets>
-  </object>
   <object class="GtkSizeGroup" id="pdfSizeGroup">
     <widgets>
-      <widget name="submitformatbox"/>
       <widget name="pdfabox"/>
     </widgets>
   </object>
@@ -1104,4 +1120,5 @@
       <widget name="watermarkentry"/>
     </widgets>
   </object>
+  <object class="GtkSizeGroup" id="comboBoxSizegroup"/>
 </interface>
diff --git a/sc/qa/uitest/calc_tests4/exportToPDF.py 
b/sc/qa/uitest/calc_tests4/exportToPDF.py
index 35e96a044df6..6993702b5734 100644
--- a/sc/qa/uitest/calc_tests4/exportToPDF.py
+++ b/sc/qa/uitest/calc_tests4/exportToPDF.py
@@ -41,7 +41,7 @@ class exportToPDF(UITestCase):
                         self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
 
                     nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
-                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfua', 'resize', 'singlepagesheets',
                             'toolbar', 'usereferencexobject', 'viewpdf', 
'watermark', 'window']
 
                     for child in nonSelectedChildren:
diff --git a/sd/qa/uitest/impress_tests/exportToPDF.py 
b/sd/qa/uitest/impress_tests/exportToPDF.py
index b9cdc9934faf..4a1f1800f649 100644
--- a/sd/qa/uitest/impress_tests/exportToPDF.py
+++ b/sd/qa/uitest/impress_tests/exportToPDF.py
@@ -43,7 +43,7 @@ class exportToPDF(UITestCase):
                         self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
 
                     nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
-                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfua', 'resize', 'singlepagesheets',
                             'toolbar', 'usereferencexobject', 'viewpdf', 
'watermark', 'window']
 
                     for child in nonSelectedChildren:
diff --git a/sw/qa/uitest/writer_tests4/exportToPDF.py 
b/sw/qa/uitest/writer_tests4/exportToPDF.py
index 76e2e0420700..84105bd1e750 100644
--- a/sw/qa/uitest/writer_tests4/exportToPDF.py
+++ b/sw/qa/uitest/writer_tests4/exportToPDF.py
@@ -39,7 +39,7 @@ class exportToPDF(UITestCase):
                         self.assertEqual("true", 
get_state_as_dict(xDialog.getChild(child))['Selected'])
 
                     nonSelectedChildren = ['allowdups', 'center', 'comments', 
'convert', 'embed', 'emptypages', 'export', 'exportplaceholders',
-                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfa', 'pdfua', 'resize', 'singlepagesheets',
+                            'firstonleft', 'forms', 'hiddenpages', 'menubar', 
'notes', 'onlynotes', 'open', 'pdfua', 'resize', 'singlepagesheets',
                             'toolbar', 'usereferencexobject', 'viewpdf', 
'watermark', 'window']
 
                     for child in nonSelectedChildren:

Reply via email to