diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 3bcbc405e2e8..3542e99ea48e 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -1049,7 +1049,6 @@ // document recovery and error report // recycling ids from DBManager -#define RID_SVX_MDLG_DOCRECOVERY_PROGR ( RID_SVX_START + 11 ) #define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 ) // !!!! double defined ID's (see below) !!! diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 746dc32cb8e9..30eda494bf06 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/compressgraphicdialog \ svx/uiconfig/ui/deleteheaderdialog \ svx/uiconfig/ui/deletefooterdialog \ + svx/uiconfig/ui/docrecoveryprogressdialog \ svx/uiconfig/ui/docrecoveryrecoverdialog \ svx/uiconfig/ui/docrecoverysavedialog \ svx/uiconfig/ui/extrustiondepthdialog \ diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 62ca4451a9fa..acb9fb3ac897 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -133,7 +133,6 @@ #define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX" #define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL" #define HID_SVX_MDLG_DOCRECOVERY_BROKEN "SVX_HID_SVX_MDLG_DOCRECOVERY_BROKEN" -#define HID_SVX_MDLG_DOCRECOVERY_PROGR "SVX_HID_SVX_MDLG_DOCRECOVERY_PROGR" #define HID_SVX_TP_DOCRECOVERY_RECOVER "SVX_HID_SVX_TP_DOCRECOVERY_RECOVER" #define HID_VALUESET_EXTRUSION_DIRECTION "SVX_HID_VALUESET_EXTRUSION_DIRECTION" #define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING" diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index d9d41d0eef37..f20ab7b48f88 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -668,24 +668,20 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl) return 0; } -SaveProgressDialog::SaveProgressDialog(Window* pParent, - RecoveryCore* pCore ) - : ModalDialog ( pParent , SVX_RES( RID_SVX_MDLG_DOCRECOVERY_PROGR ) ) - , m_aHintFT ( this , SVX_RES ( FT_SAVEPROGR_HINT ) ) - , m_aProgrFT ( this , SVX_RES ( FT_SAVEPROGR_PROGR ) ) - , m_aProgrParent( this , SVX_RES ( WIN_SAVEPROGR_PROGR ) ) - , m_pCore ( pCore ) +SaveProgressDialog::SaveProgressDialog(Window* pParent, RecoveryCore* pCore) + : ModalDialog(pParent, "DocRecoveryProgressDialog", + "svx/ui/docrecoveryprogressdialog.ui") + , m_pCore(pCore) { - FreeResource(); - PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() ); + get(m_pProgrParent, "progress"); + Size aSize(LogicToPixel(Size(SAVEPROGR_CONTROLWIDTH, PROGR_HEIGHT))); + m_pProgrParent->set_width_request(aSize.Width()); + m_pProgrParent->set_height_request(aSize.Height()); + + PluginProgress* pProgress = new PluginProgress(m_pProgrParent, pCore->getComponentContext()); m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); } - -SaveProgressDialog::~SaveProgressDialog() -{ -} - short SaveProgressDialog::Execute() { ::SolarMutexGuard aLock; diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc index 2d65d24188c5..36781a98809f 100644 --- a/svx/source/dialog/docrecovery.hrc +++ b/svx/source/dialog/docrecovery.hrc @@ -26,35 +26,14 @@ #define PROGR_HEIGHT (RSC_CD_PUSHBUTTON_HEIGHT) -// TabDialog -#define TABDLG_WIDTH 290 -#define TABDLG_HEIGHT 238 - #define SAVE_WIDTH 290 #define SAVE_HEIGHT 238 #define SAVE_TITLEWINHEIGHT 36 #define SAVE_COL0 (RSC_SP_DLG_INNERBORDER_LEFT) #define SAVE_COL2 (SAVE_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) -#define SAVE_COL1 (SAVE_COL2-RSC_CD_PUSHBUTTON_WIDTH) -#define SAVE_ROW0 ((SAVE_TITLEWINHEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2) -#define SAVE_ROW1 (SAVE_TITLEWINHEIGHT) -#define SAVE_ROW2 (SAVE_ROW1+RSC_SP_CTRL_Y) -#define SAVE_ROW3 (SAVE_ROW2+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) -#define SAVE_ROW4 (SAVE_ROW3+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) -#define SAVE_ROW9 (SAVE_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM) -#define SAVE_ROW8 (SAVE_ROW9-RSC_CD_PUSHBUTTON_HEIGHT) -#define SAVE_ROW7 (SAVE_ROW8-RSC_SP_CTRL_GROUP_Y-RSC_CD_FIXEDLINE_HEIGHT) -#define SAVE_ROW6 (SAVE_ROW7-RSC_SP_CTRL_GROUP_Y-RSC_CD_CHECKBOX_HEIGHT) -#define SAVE_ROW5 (SAVE_ROW6-RSC_SP_CTRL_Y) -#define SAVE_FILELISTHEIGHT (SAVE_ROW5-SAVE_ROW4) #define SAVE_CONTROLWIDTH (SAVE_COL2-SAVE_COL0) // Save Progress Dialog - -#define FT_SAVEPROGR_HINT 1 -#define FT_SAVEPROGR_PROGR 2 -#define WIN_SAVEPROGR_PROGR 3 - #define SAVEPROGR_WIDTH 240 #define SAVEPROGR_COL0 (RSC_SP_DLG_INNERBORDER_LEFT) #define SAVEPROGR_COL1 (SAVEPROGR_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src index 028be6059fab..d0c6e24a7fa0 100644 --- a/svx/source/dialog/docrecovery.src +++ b/svx/source/dialog/docrecovery.src @@ -22,36 +22,6 @@ #include "docrecovery.hrc" -ModalDialog RID_SVX_MDLG_DOCRECOVERY_PROGR -{ - Size = MAP_APPFONT( SAVEPROGR_WIDTH, SAVEPROGR_HEIGHT ); - HelpId = HID_SVX_MDLG_DOCRECOVERY_PROGR; - OutputSize = TRUE; - SVLook = TRUE; - Moveable = TRUE; - Closeable = FALSE; - Text = "%PRODUCTNAME %PRODUCTVERSION"; - - FixedText FT_SAVEPROGR_HINT - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW0 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - Text[ en-US ] = "Documents are being saved."; - }; - FixedText FT_SAVEPROGR_PROGR - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW1 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - Text[ en-US ] = "Progress of saving: "; - }; - Window WIN_SAVEPROGR_PROGR - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW2 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, PROGR_HEIGHT ); - Border = TRUE; - }; -}; - QueryBox RID_SVXQB_EXIT_RECOVERY { BUTTONS = WB_YES_NO ; diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index ba09a935a760..2b819c002d63 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -400,26 +400,18 @@ class SaveDialog : public Dialog class SaveProgressDialog : public ModalDialog , public IRecoveryUpdateListener { - // member private: - - FixedText m_aHintFT; - FixedText m_aProgrFT; - OUString m_aProgrBaseTxt; - Window m_aProgrParent; + OUString m_aProgrBaseTxt; + Window* m_pProgrParent; // @short TODO RecoveryCore* m_pCore; // @short TODO css::uno::Reference< css::task::XStatusIndicator > m_xProgress; - - // interface public: - - /** @short create all child controls of this dialog. @descr The dialog isn't shown nor it starts any @@ -436,11 +428,6 @@ class SaveProgressDialog : public ModalDialog SaveProgressDialog(Window* pParent, RecoveryCore* pCore ); - - /** @short free all controls and used memory. */ - virtual ~SaveProgressDialog(); - - /** @short start the emergency save operation. */ virtual short Execute() SAL_OVERRIDE; diff --git a/svx/uiconfig/ui/docrecoveryprogressdialog.ui b/svx/uiconfig/ui/docrecoveryprogressdialog.ui new file mode 100644 index 000000000000..fb98d64d9b52 --- /dev/null +++ b/svx/uiconfig/ui/docrecoveryprogressdialog.ui @@ -0,0 +1,101 @@ + + + + + + False + 6 + %PRODUCTNAME %PRODUCTVERSION + dialog + + + False + vertical + 12 + + + False + end + + + + + + False + True + end + 0 + + + + + True + False + True + 0 + none + + + True + False + True + 6 + 12 + + + True + False + True + + + True + False + 0 + Progress of saving: + True + + + 0 + 0 + 1 + 1 + + + + + True + False + True + + + 0 + 1 + 1 + 1 + + + + + + + + + True + False + Documents are being saved. + + + + + + + + False + True + 1 + + + + + +