[Libreoffice-commits] core.git: 2 commits - filter/inc filter/source filter/uiconfig filter/UIConfig_xsltdlg.mk vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jul 8 05:10:25 PDT 2013


 filter/UIConfig_xsltdlg.mk             |    1 
 filter/inc/filter.hrc                  |    1 
 filter/source/pdf/impdialog.cxx        |  196 +++++++++++++++++++--------------
 filter/source/pdf/impdialog.hrc        |    1 
 filter/source/pdf/impdialog.hxx        |   14 ++
 filter/source/pdf/impdialog.src        |   49 --------
 filter/uiconfig/ui/pdfoptionsdialog.ui |  174 +++++++++++++++++++++++++++++
 vcl/source/control/button.cxx          |   13 ++
 vcl/source/window/builder.cxx          |   15 +-
 9 files changed, 328 insertions(+), 136 deletions(-)

New commits:
commit a024849cf7bd2869ff18e111577454751278e7f6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 8 13:08:01 2013 +0100

    map gtk image-position to vcl imagealign
    
    and set default alignment of builder-created buttons
    to the default gtk left alignment, instead of the default
    vcl top alignment
    
    Change-Id: Ie6069ed7b0359c6d76e00fe1bcd3618625923cc1

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a79088d..515db35 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1720,6 +1720,19 @@ bool PushButton::set_property(const OString &rKey, const OString &rValue)
             nBits |= WB_DEFBUTTON;
         SetStyle(nBits);
     }
+    else if (rKey == "image-position")
+    {
+        ImageAlign eAlign = IMAGEALIGN_LEFT;
+        if (rValue == "left")
+            eAlign = IMAGEALIGN_LEFT;
+        else if (rValue == "right")
+            eAlign = IMAGEALIGN_RIGHT;
+        else if (rValue == "top")
+            eAlign = IMAGEALIGN_TOP;
+        else if (rValue == "bottom")
+            eAlign = IMAGEALIGN_BOTTOM;
+        SetImageAlign(eAlign);
+    }
     else
         return Control::set_property(rKey, rValue);
     return true;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7018789..9a3ebd5 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -689,7 +689,7 @@ namespace
         return sTooltipText;
     }
 
-    Window * extractStockAndBuildPushButton(Window *pParent, VclBuilder::stringmap &rMap)
+    Button* extractStockAndBuildPushButton(Window *pParent, VclBuilder::stringmap &rMap)
     {
         WinBits nBits = WB_CENTER|WB_VCENTER;
 
@@ -697,7 +697,7 @@ namespace
 
         bool bIsStock = extractStock(rMap);
 
-        Window *pWindow = NULL;
+        Button *pWindow = NULL;
 
         if (bIsStock)
         {
@@ -722,11 +722,11 @@ namespace
         return pWindow;
     }
 
-    Window * extractStockAndBuildMenuButton(Window *pParent, VclBuilder::stringmap &rMap)
+    Button * extractStockAndBuildMenuButton(Window *pParent, VclBuilder::stringmap &rMap)
     {
         WinBits nBits = WB_CENTER|WB_VCENTER|WB_3DLOOK;
 
-        Window *pWindow = new MenuButton(pParent, nBits);
+        Button *pWindow = new MenuButton(pParent, nBits);
 
         if (extractStock(rMap))
         {
@@ -1090,14 +1090,17 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
         pWindow = new VclAlignment(pParent);
     else if (name == "GtkButton")
     {
+        Button *pButton;
         OString sMenu = extractCustomProperty(rMap);
         if (sMenu.isEmpty())
-            pWindow = extractStockAndBuildPushButton(pParent, rMap);
+            pButton = extractStockAndBuildPushButton(pParent, rMap);
         else
         {
-            pWindow = extractStockAndBuildMenuButton(pParent, rMap);
+            pButton = extractStockAndBuildMenuButton(pParent, rMap);
             m_pParserState->m_aButtonMenuMaps.push_back(ButtonMenuMap(id, sMenu));
         }
+        pButton->SetImageAlign(IMAGEALIGN_LEFT); //default to left
+        pWindow = pButton;
     }
     else if (name == "GtkRadioButton")
     {
commit 28d6687131db2dd471fd0dfae04b05d03105ef49
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jul 8 12:31:03 2013 +0100

    convert pdf options dialog to .ui format
    
    Change-Id: I7c186ea77bbadd20ac881dcb0aa2cf7db525dc1e

diff --git a/filter/UIConfig_xsltdlg.mk b/filter/UIConfig_xsltdlg.mk
index d428f65..987211b 100644
--- a/filter/UIConfig_xsltdlg.mk
+++ b/filter/UIConfig_xsltdlg.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,filter))
 $(eval $(call gb_UIConfig_add_uifiles,filter,\
     filter/uiconfig/ui/pdfgeneralpage \
     filter/uiconfig/ui/pdflinkspage \
+    filter/uiconfig/ui/pdfoptionsdialog \
     filter/uiconfig/ui/pdfsecuritypage \
     filter/uiconfig/ui/pdfuserinterfacepage \
     filter/uiconfig/ui/pdfviewpage \
diff --git a/filter/inc/filter.hrc b/filter/inc/filter.hrc
index 8077a81..1ba4c08 100644
--- a/filter/inc/filter.hrc
+++ b/filter/inc/filter.hrc
@@ -31,7 +31,6 @@
 
 // warning, next range is RID_FILTER_START + 100 !
 
-#define HID_FILTER_PDF_OPTIONS      "HID_FILTER_PDF_OPTIONS"
 #define HID_FILTER_PDF_SIGNING        "HID_FILTER_PDF_SIGNING"
 
 #endif
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 76ac1eb..756e030 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -59,13 +59,19 @@ using namespace ::com::sun::star;
 // please note: the default used here are the same as per specification,
 // they should be the same in  PDFFilter::implExport and  in PDFExport::PDFExport
 // -----------------------------------------------------------------------------
-ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
-                                  Sequence< PropertyValue >& rFilterData,
-                                  const Reference< XComponent >& rxDoc
-                                  ) :
-    SfxTabDialog( pParent, PDFFilterResId( RID_PDF_EXPORT_DLG ), 0, sal_False, 0 ),
+ImpPDFTabDialog::ImpPDFTabDialog(Window* pParent, Sequence< PropertyValue >& rFilterData,
+    const Reference< XComponent >& rxDoc)
+    : SfxTabDialog(pParent, "PdfOptionsDialog","filter/ui/pdfoptionsdialog.ui",
+        0, false),
+
     maConfigItem( "Office.Common/Filter/PDF/Export/", &rFilterData ),
     maConfigI18N( "Office.Common/I18N/CTL/" ),
+    mnSigningPageId(0),
+    mnSecurityPageId(0),
+    mnLinksPage(0),
+    mnInterfacePageId(0),
+    mnViewPageId(0),
+    mnGeneralPageId(0),
     mbIsPresentation( sal_False ),
     mbIsWriter( sal_False ),
 
@@ -122,7 +128,6 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
     mbSignPDF( sal_False )
 
 {
-    FreeResource();
 // check for selection
     try
     {
@@ -241,19 +246,19 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
     mbSignPDF = maConfigItem.ReadBool( "SignPDF", sal_False );
 
 //queue the tab pages for later creation (created when first shown)
-    AddTabPage( RID_PDF_TAB_SIGNING, ImpPDFTabSigningPage::Create, 0 );
-    AddTabPage( RID_PDF_TAB_SECURITY, ImpPDFTabSecurityPage::Create, 0 );
-    AddTabPage( RID_PDF_TAB_LINKS, ImpPDFTabLinksPage::Create, 0 );
-    AddTabPage( RID_PDF_TAB_VPREFER, ImpPDFTabViewerPage::Create, 0 );
-    AddTabPage( RID_PDF_TAB_OPNFTR, ImpPDFTabOpnFtrPage::Create, 0 );
+    mnSigningPageId = AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, 0);
+    mnSecurityPageId = AddTabPage("security", ImpPDFTabSecurityPage::Create, 0);
+    mnLinksPage = AddTabPage("links", ImpPDFTabLinksPage::Create, 0);
+    mnInterfacePageId = AddTabPage("userinterface", ImpPDFTabViewerPage::Create, 0);
+    mnViewPageId = AddTabPage("initialview", ImpPDFTabOpnFtrPage::Create, 0);
 
 //remove tabpage if experimentalmode is not set
     SvtMiscOptions aMiscOptions;
     if (!aMiscOptions.IsExperimentalMode())
-        RemoveTabPage( RID_PDF_TAB_SIGNING );
+        RemoveTabPage(mnSigningPageId);
 
 //last queued is the first to be displayed (or so it seems..)
-    AddTabPage( RID_PDF_TAB_GENER, ImpPDFTabGeneralPage::Create, 0 );
+    mnGeneralPageId = AddTabPage("general", ImpPDFTabGeneralPage::Create, 0 );
 
 //get the string property value (from sfx2/source/dialog/mailmodel.cxx) to overwrite the text for the Ok button
     OUString sOkButtonText = maConfigItem.ReadString( "_OkButtonString", OUString() );
@@ -270,6 +275,36 @@ ImpPDFTabDialog::ImpPDFTabDialog( Window* pParent,
 /////////////////
 }
 
+ImpPDFTabSecurityPage* ImpPDFTabDialog::getSecurityPage() const
+{
+    SfxTabPage* pSecurityPage = GetTabPage(mnSecurityPageId);
+    if (pSecurityPage)
+    {
+        return static_cast<ImpPDFTabSecurityPage*>(pSecurityPage);
+    }
+    return NULL;
+}
+
+ImpPDFTabLinksPage* ImpPDFTabDialog::getLinksPage() const
+{
+    SfxTabPage* pLinksPage = GetTabPage(mnLinksPage);
+    if (pLinksPage)
+    {
+        return static_cast<ImpPDFTabLinksPage*>(pLinksPage);
+    }
+    return NULL;
+}
+
+ImpPDFTabGeneralPage* ImpPDFTabDialog::getGeneralPage() const
+{
+    SfxTabPage* pGeneralPage = GetTabPage(mnGeneralPageId);
+    if (pGeneralPage)
+    {
+        return static_cast<ImpPDFTabGeneralPage*>(pGeneralPage);
+    }
+    return NULL;
+}
+
 IMPL_LINK_NOARG(ImpPDFTabDialog, CancelHdl)
 {
     EndDialog( sal_False );
@@ -281,42 +316,45 @@ ImpPDFTabDialog::~ImpPDFTabDialog()
 {
 //delete the pages, needed because otherwise the child tab pages
 //don't get destroyed
-    RemoveTabPage( RID_PDF_TAB_GENER );
-    RemoveTabPage( RID_PDF_TAB_VPREFER );
-    RemoveTabPage( RID_PDF_TAB_OPNFTR );
-    RemoveTabPage( RID_PDF_TAB_LINKS );
-    RemoveTabPage( RID_PDF_TAB_SECURITY );
+    RemoveTabPage(mnGeneralPageId);
+    RemoveTabPage(mnInterfacePageId);
+    RemoveTabPage(mnViewPageId);
+    RemoveTabPage(mnLinksPage);
+    RemoveTabPage(mnSecurityPageId);
 
 //remove tabpage if experimentalmode is set
     SvtMiscOptions aMiscOptions;
     if (aMiscOptions.IsExperimentalMode())
-        RemoveTabPage( RID_PDF_TAB_SIGNING );
+        RemoveTabPage(mnSigningPageId);
 }
 
 // -----------------------------------------------------------------------------
 void ImpPDFTabDialog::PageCreated( sal_uInt16 _nId,
                                    SfxTabPage& _rPage )
 {
-    switch( _nId )
+    if (_nId == mnGeneralPageId)
     {
-    case RID_PDF_TAB_GENER:
         ( ( ImpPDFTabGeneralPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
-    case RID_PDF_TAB_VPREFER:
+    }
+    else if (_nId == mnInterfacePageId)
+    {
         ( ( ImpPDFTabViewerPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
-    case RID_PDF_TAB_OPNFTR:
+    }
+    else if (_nId == mnViewPageId)
+    {
         ( ( ImpPDFTabOpnFtrPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
-    case RID_PDF_TAB_LINKS:
+    }
+    else if (_nId == mnLinksPage)
+    {
         ( ( ImpPDFTabLinksPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
-    case RID_PDF_TAB_SECURITY:
+    }
+    else if (_nId == mnSecurityPageId)
+    {
         ( ( ImpPDFTabSecurityPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
-    case RID_PDF_TAB_SIGNING:
+    }
+    else if (_nId == mnSigningPageId)
+    {
         ( ( ImpPDFTabSigningPage* )&_rPage )->SetFilterConfigItem( this );
-        break;
     }
 }
 
@@ -332,18 +370,18 @@ short ImpPDFTabDialog::Ok( )
 Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
 {
 // updating the FilterData sequence and storing FilterData to configuration
-    if( GetTabPage( RID_PDF_TAB_GENER ) )
-        ( ( ImpPDFTabGeneralPage* )GetTabPage( RID_PDF_TAB_GENER ) )->GetFilterConfigItem( this );
-    if( GetTabPage( RID_PDF_TAB_VPREFER ) )
-        ( ( ImpPDFTabViewerPage* )GetTabPage( RID_PDF_TAB_VPREFER ) )->GetFilterConfigItem( this );
-    if( GetTabPage( RID_PDF_TAB_OPNFTR ) )
-        ( ( ImpPDFTabOpnFtrPage* )GetTabPage( RID_PDF_TAB_OPNFTR ) )->GetFilterConfigItem( this );
-    if( GetTabPage( RID_PDF_TAB_LINKS ) )
-        ( ( ImpPDFTabLinksPage* )GetTabPage( RID_PDF_TAB_LINKS ) )->GetFilterConfigItem( this );
-    if( GetTabPage( RID_PDF_TAB_SECURITY ) )
-        ( ( ImpPDFTabSecurityPage* )GetTabPage( RID_PDF_TAB_SECURITY ) )->GetFilterConfigItem( this );
-    if( GetTabPage( RID_PDF_TAB_SIGNING ) )
-        ( ( ImpPDFTabSigningPage* )GetTabPage( RID_PDF_TAB_SIGNING ) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnGeneralPageId) )
+        ( ( ImpPDFTabGeneralPage* )GetTabPage(mnGeneralPageId) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnInterfacePageId) )
+        ( ( ImpPDFTabViewerPage* )GetTabPage(mnInterfacePageId) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnViewPageId) )
+        ( ( ImpPDFTabOpnFtrPage* )GetTabPage(mnViewPageId) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnLinksPage) )
+        ( ( ImpPDFTabLinksPage* )GetTabPage(mnLinksPage) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnSecurityPageId) )
+        ( ( ImpPDFTabSecurityPage* )GetTabPage(mnSecurityPageId) )->GetFilterConfigItem( this );
+    if( GetTabPage(mnSigningPageId) )
+        ( ( ImpPDFTabSigningPage* )GetTabPage(mnSigningPageId) )->GetFilterConfigItem( this );
 
 //prepare the items to be returned
     maConfigItem.WriteBool( "UseLosslessCompression", mbUseLosslessCompression );
@@ -738,12 +776,11 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleAddStreamHdl)
 // -----------------------------------------------------------------------------
 IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl)
 {
-    ImpPDFTabSecurityPage* pSecPage = NULL;
-//set the security page status (and its controls as well)
-    if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ) )
+    //set the security page status (and its controls as well)
+    ImpPDFTabSecurityPage* pSecPage = mpaParent ? mpaParent->getSecurityPage() : NULL;
+    if (pSecPage)
     {
-        pSecPage = static_cast<ImpPDFTabSecurityPage*>(mpaParent->GetTabPage( RID_PDF_TAB_SECURITY ));
-        pSecPage->ImplPDFASecurityControl( !mpCbPDFA1b->IsChecked() );
+        pSecPage->ImplPDFASecurityControl(!mpCbPDFA1b->IsChecked());
     }
 
 //PDF/A-1 needs tagged PDF, so  force disable the control, will be forced in pdfexport.
@@ -767,10 +804,11 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportPDFAHdl)
         mpCbExportFormFields->Check( mbExportFormFieldsUserSelection );
         mpCbExportFormFields->Enable();
     }
-// PDF/A-1 doesn't allow launch action, so enable/disable the selection on
-// Link page
-    if( mpaParent && mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )
-        ( ( ImpPDFTabLinksPage* )mpaParent->GetTabPage( RID_PDF_TAB_LINKS ) )->ImplPDFALinkControl( !mpCbPDFA1b->IsChecked() );
+    // PDF/A-1 doesn't allow launch action, so enable/disable the selection on
+    // Link page
+    ImpPDFTabLinksPage* pLinksPage = mpaParent ? mpaParent->getLinksPage() : NULL;
+    if (pLinksPage)
+        pLinksPage->ImplPDFALinkControl(!mpCbPDFA1b->IsChecked());
 
     // if a password was set, inform the user that this will not be used in PDF/A case
     if( mpCbPDFA1b->IsChecked() && pSecPage && pSecPage->hasPassword() )
@@ -1157,9 +1195,10 @@ void ImpPDFTabSecurityPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParen
 // set the status of this windows, according to the PDFA selection
     enablePermissionControls();
 
-    if( paParent && paParent->GetTabPage( RID_PDF_TAB_GENER ) )
-        ImplPDFASecurityControl(
-            !( ( ImpPDFTabGeneralPage* )paParent->GetTabPage( RID_PDF_TAB_GENER ) )->IsPdfaSelected() );
+    ImpPDFTabGeneralPage* pGeneralPage = paParent ? paParent->getGeneralPage() : NULL;
+
+    if (pGeneralPage)
+        ImplPDFASecurityControl(!pGeneralPage->IsPdfaSelected());
 }
 
 IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
@@ -1194,14 +1233,14 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl)
 
 void ImpPDFTabSecurityPage::enablePermissionControls()
 {
-    sal_Bool bIsPDFASel =  sal_False;
+    bool bIsPDFASel = false;
     ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetTabDialog());
-    if( pParent && pParent->GetTabPage( RID_PDF_TAB_GENER ) )
+    ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : NULL;
+    if (pGeneralPage)
     {
-        bIsPDFASel = ( ( ImpPDFTabGeneralPage* )pParent->
-                       GetTabPage( RID_PDF_TAB_GENER ) )->IsPdfaSelected();
+        bIsPDFASel = pGeneralPage->IsPdfaSelected();
     }
-    if( bIsPDFASel )
+    if (bIsPDFASel)
     {
         mpUserPwdPdfa->Show();
         mpUserPwdSet->Hide();
@@ -1223,8 +1262,8 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
         }
     }
 
-    sal_Bool bLocalEnable = mbHaveOwnerPassword && IsEnabled();
-    if( bIsPDFASel )
+    bool bLocalEnable = mbHaveOwnerPassword && IsEnabled();
+    if (bIsPDFASel)
     {
         mpOwnerPwdPdfa->Show();
         mpOwnerPwdSet->Hide();
@@ -1304,20 +1343,20 @@ void ImpPDFTabLinksPage::GetFilterConfigItem( ImpPDFTabDialog* paParent  )
 {
     paParent->mbExportRelativeFsysLinks = m_pCbExportRelativeFsysLinks->IsChecked();
 
-    sal_Bool bIsPDFASel =  sal_False;
-    if( paParent && paParent->GetTabPage( RID_PDF_TAB_GENER ) )
-        bIsPDFASel = ( ( ImpPDFTabGeneralPage* )paParent->
-                       GetTabPage( RID_PDF_TAB_GENER ) )->IsPdfaSelected();
-// if PDF/A-1 was not selected while exiting dialog...
+    bool bIsPDFASel = false;
+    ImpPDFTabGeneralPage* pGeneralPage = paParent ? paParent->getGeneralPage() : NULL;
+    if (pGeneralPage)
+        bIsPDFASel = pGeneralPage->IsPdfaSelected();
+    // if PDF/A-1 was not selected while exiting dialog...
     if( !bIsPDFASel )
     {
-// ...get the control states
+        // ...get the control states
         mbOpnLnksDefaultUserState = m_pRbOpnLnksDefault->IsChecked();
         mbOpnLnksLaunchUserState =  m_pRbOpnLnksLaunch->IsChecked();
         mbOpnLnksBrowserUserState = m_pRbOpnLnksBrowser->IsChecked();
     }
-// the control states, or the saved is used
-// to form the stored selection
+    // the control states, or the saved is used
+    // to form the stored selection
     paParent->mnViewPDFMode = 0;
     if( mbOpnLnksBrowserUserState )
         paParent->mnViewPDFMode = 2;
@@ -1354,14 +1393,13 @@ void ImpPDFTabLinksPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent )
         mbOpnLnksBrowserUserState = sal_True;
         break;
     }
-// now check the status of PDF/A selection
-// and set the link action accordingly
-// PDF/A-1 doesn't allow launch action on links
-//
-    if( paParent && paParent->GetTabPage( RID_PDF_TAB_GENER ) )
-        ImplPDFALinkControl(
-            !( ( ImpPDFTabGeneralPage* )paParent->
-               GetTabPage( RID_PDF_TAB_GENER ) )->mpCbPDFA1b->IsChecked() );
+    // now check the status of PDF/A selection
+    // and set the link action accordingly
+    // PDF/A-1 doesn't allow launch action on links
+    //
+    ImpPDFTabGeneralPage* pGeneralPage = paParent ? paParent->getGeneralPage() : NULL;
+    if (pGeneralPage)
+        ImplPDFALinkControl(!pGeneralPage->mpCbPDFA1b->IsChecked());
 }
 
 // -----------------------------------------------------------------------------
diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc
index f55071b..1877d62 100644
--- a/filter/source/pdf/impdialog.hrc
+++ b/filter/source/pdf/impdialog.hrc
@@ -19,7 +19,6 @@
 
 #include <filter.hrc>
 
-#define RID_PDF_EXPORT_DLG          (RID_PDF_DIALOG_START +   0)
 #define RID_PDF_TAB_GENER           (RID_PDF_DIALOG_START +   1)
 #define RID_PDF_TAB_VPREFER         (RID_PDF_DIALOG_START +   2)
 #define RID_PDF_TAB_OPNFTR          (RID_PDF_DIALOG_START +   3)
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 8d97e2c..56a8983 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -69,6 +69,9 @@ class ImplErrorDialog : public ModalDialog
     ~ImplErrorDialog();
 };
 
+class ImpPDFTabSecurityPage;
+class ImpPDFTabLinksPage;
+
 ////////////////////////////////////////////////////////////////////////
 //class tabbed dialog
 class ImpPDFTabDialog : public SfxTabDialog
@@ -82,6 +85,13 @@ private:
 
     DECL_LINK(CancelHdl, void *);
 
+    sal_uInt16 mnSigningPageId;
+    sal_uInt16 mnSecurityPageId;
+    sal_uInt16 mnLinksPage;
+    sal_uInt16 mnInterfacePageId;
+    sal_uInt16 mnViewPageId;
+    sal_uInt16 mnGeneralPageId;
+
 protected:
 //the following data are the configuration used throughout the dialog and pages
     sal_Bool                    mbIsPresentation;
@@ -167,6 +177,10 @@ public:
 
     Sequence< PropertyValue >   GetFilterData();
 
+    ImpPDFTabSecurityPage* getSecurityPage() const;
+    ImpPDFTabLinksPage* getLinksPage() const;
+    ImpPDFTabGeneralPage* getGeneralPage() const;
+
 protected:
     virtual void                PageCreated( sal_uInt16 _nId,
                                              SfxTabPage& _rPage );
diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src
index 34c3b10..c401736 100644
--- a/filter/source/pdf/impdialog.src
+++ b/filter/source/pdf/impdialog.src
@@ -145,55 +145,6 @@ TabPage  RID_PDF_TAB_SIGNING
 
 };
 
-//----------------------------------------------------------
-TabDialog  RID_PDF_EXPORT_DLG
-{
-    HelpId = HID_FILTER_PDF_OPTIONS ;
-    OutputSize = TRUE;
-    SVLook = TRUE;
-    Moveable = TRUE;
-    Text [ en-US ] = "PDF Options";
-
-    TabControl 1
-    {
-        HelpId = HID_FILTER_PDF_OPTIONS ;
-        OutputSize = TRUE;
-        PageList =
-        {
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_GENER;
-                Text [ en-US ] = "General";
-            };
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_OPNFTR;
-                Text [ en-US ] = "Initial View";
-            };
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_VPREFER;
-                Text [ en-US ] = "User Interface";
-            };
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_LINKS;
-                Text [ en-US ] = "Links";
-            };
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_SECURITY;
-                Text [ en-US ] = "Security";
-            };
-            PageItem
-            {
-                Identifier = RID_PDF_TAB_SIGNING;
-                Text [ en-US ] = "Digital Signatures";
-            };
-        };
-    };
-};
-
 ModalDialog RID_PDF_ERROR_DLG
 {
     HelpID = "filter:ModalDialog:RID_PDF_ERROR_DLG";
diff --git a/filter/uiconfig/ui/pdfoptionsdialog.ui b/filter/uiconfig/ui/pdfoptionsdialog.ui
new file mode 100644
index 0000000..25f222e
--- /dev/null
+++ b/filter/uiconfig/ui/pdfoptionsdialog.ui
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.6 -->
+  <object class="GtkDialog" id="PdfOptionsDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">PDF Options</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="export">
+                <property name="label" translatable="yes">E_xport</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="can_default">True</property>
+                <property name="has_default">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_underline">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkNotebook" id="tabcontrol">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="general">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">General</property>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="initialview">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Initial View</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="userinterface">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">User Interface</property>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="links">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Links</property>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="security">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Security</property>
+              </object>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child type="tab">
+              <object class="GtkLabel" id="digitalsignatures">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Digital Signatures</property>
+              </object>
+              <packing>
+                <property name="position">5</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">export</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>


More information about the Libreoffice-commits mailing list