Kaydet (Commit) 3d46ec6f authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ImpPDFTabDialog

Change-Id: I0b7f439a6e712c9824008b21bfc511432641dbee
Reviewed-on: https://gerrit.libreoffice.org/56041
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6f2b115d
This diff is collapsed.
...@@ -61,21 +61,14 @@ class ImpPDFTabLinksPage; ...@@ -61,21 +61,14 @@ class ImpPDFTabLinksPage;
/// Class tabbed dialog /// Class tabbed dialog
class ImpPDFTabDialog final : public SfxTabDialog class ImpPDFTabDialog final : public SfxTabDialogController
{ {
FilterConfigItem maConfigItem; FilterConfigItem maConfigItem;
FilterConfigItem maConfigI18N; FilterConfigItem maConfigI18N;
Any maSelection; Any maSelection;
DECL_LINK(CancelHdl, Button*, void); DECL_LINK(CancelHdl, weld::Button&, void);
sal_uInt16 mnSigningPageId;
sal_uInt16 mnSecurityPageId;
sal_uInt16 mnLinksPage;
sal_uInt16 mnInterfacePageId;
sal_uInt16 mnViewPageId;
sal_uInt16 mnGeneralPageId;
// the following data are the configuration used throughout the dialog and pages // the following data are the configuration used throughout the dialog and pages
bool mbIsPresentation; bool mbIsPresentation;
...@@ -158,13 +151,10 @@ public: ...@@ -158,13 +151,10 @@ public:
friend class ImpPDFTabLinksPage; friend class ImpPDFTabLinksPage;
friend class ImpPDFTabSigningPage; friend class ImpPDFTabSigningPage;
ImpPDFTabDialog( vcl::Window* pParent, ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue >& rFilterData,
Sequence< PropertyValue >& rFilterData, const css::uno::Reference< XComponent >& rDoc);
const css::uno::Reference< XComponent >& rDoc);
virtual ~ImpPDFTabDialog() override; virtual ~ImpPDFTabDialog() override;
virtual void dispose() override;
Sequence< PropertyValue > GetFilterData(); Sequence< PropertyValue > GetFilterData();
ImpPDFTabSecurityPage* getSecurityPage() const; ImpPDFTabSecurityPage* getSecurityPage() const;
...@@ -172,7 +162,7 @@ public: ...@@ -172,7 +162,7 @@ public:
ImpPDFTabGeneralPage* getGeneralPage() const; ImpPDFTabGeneralPage* getGeneralPage() const;
private: private:
virtual void PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage ) override; virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
virtual short Ok() override; virtual short Ok() override;
}; };
...@@ -187,9 +177,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage ...@@ -187,9 +177,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
bool mbIsPresentation; bool mbIsPresentation;
bool mbIsSpreadsheet; bool mbIsSpreadsheet;
bool mbIsWriter; bool mbIsWriter;
ImpPDFTabDialog* mpParent;
VclPtr<ImpPDFTabDialog> mpaParent;
std::unique_ptr<weld::RadioButton> mxRbAll; std::unique_ptr<weld::RadioButton> mxRbAll;
std::unique_ptr<weld::RadioButton> mxRbRange; std::unique_ptr<weld::RadioButton> mxRbRange;
...@@ -242,7 +230,6 @@ public: ...@@ -242,7 +230,6 @@ public:
ImpPDFTabGeneralPage(TabPageParent pParent, const SfxItemSet& rSet); ImpPDFTabGeneralPage(TabPageParent pParent, const SfxItemSet& rSet);
virtual ~ImpPDFTabGeneralPage() override; virtual ~ImpPDFTabGeneralPage() override;
virtual void dispose() override;
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet); static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet);
......
...@@ -83,21 +83,20 @@ Sequence< OUString > SAL_CALL PDFDialog::getSupportedServiceNames() ...@@ -83,21 +83,20 @@ Sequence< OUString > SAL_CALL PDFDialog::getSupportedServiceNames()
return PDFDialog_getSupportedServiceNames(); return PDFDialog_getSupportedServiceNames();
} }
svt::OGenericUnoDialog::Dialog PDFDialog::createDialog( vcl::Window* pParent ) svt::OGenericUnoDialog::Dialog PDFDialog::createDialog(vcl::Window* pParent)
{ {
if( mxSrcDoc.is() ) if( mxSrcDoc.is() )
return svt::OGenericUnoDialog::Dialog(VclPtr<ImpPDFTabDialog>::Create(pParent, maFilterData, mxSrcDoc)); return svt::OGenericUnoDialog::Dialog(new ImpPDFTabDialog(pParent ? pParent->GetFrameWeld() : nullptr, maFilterData, mxSrcDoc));
return svt::OGenericUnoDialog::Dialog(VclPtr<::Dialog>()); return svt::OGenericUnoDialog::Dialog(static_cast<weld::DialogController*>(nullptr));
} }
void PDFDialog::executedDialog( sal_Int16 nExecutionResult ) void PDFDialog::executedDialog( sal_Int16 nExecutionResult )
{ {
if (nExecutionResult && m_aDialog) if (nExecutionResult && m_aDialog)
maFilterData = static_cast< ImpPDFTabDialog* >( m_aDialog.m_xVclDialog.get() )->GetFilterData(); maFilterData = static_cast<ImpPDFTabDialog*>(m_aDialog.m_xWeldDialog.get())->GetFilterData();
destroyDialog(); destroyDialog();
} }
Reference< XPropertySetInfo > SAL_CALL PDFDialog::getPropertySetInfo() Reference< XPropertySetInfo > SAL_CALL PDFDialog::getPropertySetInfo()
{ {
Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<object class="GtkGrid" id="PdfGeneralPage"> <object class="GtkGrid" id="PdfGeneralPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<object class="GtkBox" id="PdfLinksPage"> <object class="GtkBox" id="PdfLinksPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">12</property> <property name="spacing">12</property>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 --> <!-- Generated with glade 3.22.1 -->
<interface domain="flt"> <interface domain="flt">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="PdfOptionsDialog"> <object class="GtkDialog" id="PdfOptionsDialog">
...@@ -7,7 +7,13 @@ ...@@ -7,7 +7,13 @@
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes" context="pdfoptionsdialog|PdfOptionsDialog">PDF Options</property> <property name="title" translatable="yes" context="pdfoptionsdialog|PdfOptionsDialog">PDF Options</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="modal">True</property>
<property name="default_width">0</property>
<property name="default_height">0</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -17,6 +23,19 @@ ...@@ -17,6 +23,19 @@
<object class="GtkButtonBox" id="dialog-action_area1"> <object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="layout_style">end</property> <property name="layout_style">end</property>
<child>
<object class="GtkButton" id="reset">
<property name="label">gtk-revert-to-saved</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">0</property>
</packing>
</child>
<child> <child>
<object class="GtkButton" id="ok"> <object class="GtkButton" id="ok">
<property name="label" translatable="yes" context="pdfoptionsdialog|ok">E_xport</property> <property name="label" translatable="yes" context="pdfoptionsdialog|ok">E_xport</property>
...@@ -30,7 +49,7 @@ ...@@ -30,7 +49,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">0</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -44,7 +63,7 @@ ...@@ -44,7 +63,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
...@@ -58,7 +77,7 @@ ...@@ -58,7 +77,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">3</property>
<property name="secondary">True</property> <property name="secondary">True</property>
</packing> </packing>
</child> </child>
...@@ -83,6 +102,30 @@ ...@@ -83,6 +102,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
</child> </child>
<child type="tab"> <child type="tab">
...@@ -102,6 +145,30 @@ ...@@ -102,6 +145,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
...@@ -125,6 +192,30 @@ ...@@ -125,6 +192,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">2</property> <property name="position">2</property>
...@@ -148,6 +239,30 @@ ...@@ -148,6 +239,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">3</property> <property name="position">3</property>
...@@ -171,6 +286,30 @@ ...@@ -171,6 +286,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">4</property> <property name="position">4</property>
...@@ -194,6 +333,30 @@ ...@@ -194,6 +333,30 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">5</property> <property name="position">5</property>
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<object class="GtkBox" id="PdfSecurityPage"> <object class="GtkBox" id="PdfSecurityPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
...@@ -29,7 +31,6 @@ ...@@ -29,7 +31,6 @@
<object class="GtkButton" id="setpassword"> <object class="GtkButton" id="setpassword">
<property name="label" translatable="yes" context="pdfsecuritypage|setpassword">Set _Passwords…</property> <property name="label" translatable="yes" context="pdfsecuritypage|setpassword">Set _Passwords…</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">True</property>
<property name="halign">start</property> <property name="halign">start</property>
...@@ -295,6 +296,7 @@ ...@@ -295,6 +296,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">printhigh</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -310,7 +312,7 @@ ...@@ -310,7 +312,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">printnone</property> <property name="group">printhigh</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -327,7 +329,6 @@ ...@@ -327,7 +329,6 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">printnone</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -381,6 +382,7 @@ ...@@ -381,6 +382,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">changeany</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -396,7 +398,7 @@ ...@@ -396,7 +398,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">changenone</property> <property name="group">changeany</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -412,7 +414,7 @@ ...@@ -412,7 +414,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">changenone</property> <property name="group">changeany</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -428,7 +430,7 @@ ...@@ -428,7 +430,7 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">changenone</property> <property name="group">changeany</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -445,7 +447,6 @@ ...@@ -445,7 +447,6 @@
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="active">True</property> <property name="active">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="group">changenone</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
<object class="GtkFrame" id="PdfSignPage"> <object class="GtkFrame" id="PdfSignPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
<property name="shadow_type">none</property> <property name="shadow_type">none</property>
...@@ -154,6 +156,7 @@ ...@@ -154,6 +156,7 @@
<object class="GtkComboBoxText" id="tsa"> <object class="GtkComboBoxText" id="tsa">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="active">0</property>
<items> <items>
<item translatable="yes" context="pdfsignpage|tsa">None</item> <item translatable="yes" context="pdfsignpage|tsa">None</item>
</items> </items>
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<object class="GtkBox" id="PdfUserInterfacePage"> <object class="GtkBox" id="PdfUserInterfacePage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">6</property> <property name="spacing">6</property>
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
<object class="GtkBox" id="PdfViewPage"> <object class="GtkBox" id="PdfViewPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
......
...@@ -272,6 +272,7 @@ protected: ...@@ -272,6 +272,7 @@ protected:
*/ */
void SavePosAndId(); void SavePosAndId();
void Start_Impl();
public: public:
SfxTabDialogController(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID, SfxTabDialogController(weld::Window* pParent, const OUString& rUIXMLDescription, const OString& rID,
const SfxItemSet * = nullptr); const SfxItemSet * = nullptr);
...@@ -305,8 +306,6 @@ public: ...@@ -305,8 +306,6 @@ public:
const std::function<void(sal_Int32)>&); const std::function<void(sal_Int32)>&);
const SfxItemSet* GetExampleSet() const { return m_xExampleSet.get(); } const SfxItemSet* GetExampleSet() const { return m_xExampleSet.get(); }
SAL_DLLPRIVATE void Start_Impl();
}; };
namespace sfx { class ItemConnectionBase; } namespace sfx { class ItemConnectionBase; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment