[Libreoffice-commits] core.git: include/svx svx/source svx/uiconfig svx/UIConfig_svx.mk
Szymon KÅos
eszkadev at gmail.com
Mon Aug 11 03:40:19 PDT 2014
include/svx/dialogs.hrc | 4
svx/UIConfig_svx.mk | 1
svx/source/dialog/docrecovery.cxx | 35 ++---
svx/source/dialog/docrecovery.hrc | 32 -----
svx/source/dialog/docrecovery.src | 69 ----------
svx/source/inc/docrecovery.hxx | 14 --
svx/uiconfig/ui/docrecoverybrokendialog.ui | 185 +++++++++++++++++++++++++++++
7 files changed, 206 insertions(+), 134 deletions(-)
New commits:
commit 6271f2e1f7f2e3662511b6d65b8c09faae9adbc8
Author: Szymon KÅos <eszkadev at gmail.com>
Date: Mon Aug 11 12:30:41 2014 +0200
RID_SVX_MDLG_DOCRECOVERY_BROKEN conversion to .ui
Change-Id: Ic3ed2c73e255c99b48f4dab5ea434c75313ec93d
Reviewed-on: https://gerrit.libreoffice.org/10865
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index b4b11dd..ce486d9 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -1038,10 +1038,6 @@
// "ModalDialog" resource ids
-// document recovery and error report
-// recycling ids from DBManager
-#define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 )
-
// !!!! double defined ID's (see below) !!!
#define RID_OFA_AUTOCORR_DLG (RID_OFA_START + 101)
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 1d9d266..9545379 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/docrecoverybrokendialog \
svx/uiconfig/ui/docrecoveryprogressdialog \
svx/uiconfig/ui/docrecoveryrecoverdialog \
svx/uiconfig/ui/docrecoverysavedialog \
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 4cf976b..be7e9da 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -1200,31 +1200,26 @@ OUString RecoveryDialog::impl_getStatusString( const TURLInfo& rInfo ) const
BrokenRecoveryDialog::BrokenRecoveryDialog(Window* pParent ,
RecoveryCore* pCore ,
bool bBeforeRecovery)
- : ModalDialog ( pParent, SVX_RES( RID_SVX_MDLG_DOCRECOVERY_BROKEN ) )
- , m_aDescrFT ( this , SVX_RES( FT_BROKEN_DESCR ) )
- , m_aFileListFT ( this , SVX_RES( FT_BROKEN_FILELIST ) )
- , m_aFileListLB ( this , SVX_RES( LB_BROKEN_FILELIST ) )
- , m_aSaveDirFT ( this , SVX_RES( FT_BROKEN_SAVEDIR ) )
- , m_aSaveDirED ( this , SVX_RES( ED_BROKEN_SAVEDIR ) )
- , m_aSaveDirBtn ( this , SVX_RES( BTN_BROKEN_SAVEDIR ) )
- , m_aBottomFL ( this , SVX_RES( FL_BROKEN_BOTTOM ) )
- , m_aOkBtn ( this , SVX_RES( BTN_BROKEN_OK ) )
- , m_aCancelBtn ( this , SVX_RES( BTN_BROKEN_CANCEL ) )
+ : ModalDialog ( pParent, "DocRecoveryBrokenDialog", "svx/ui/docrecoverybrokendialog.ui" )
, m_pCore ( pCore )
, m_bBeforeRecovery (bBeforeRecovery)
, m_bExecutionNeeded(false)
{
- FreeResource();
+ get(m_pFileListLB, "filelist");
+ get(m_pSaveDirED, "savedir");
+ get(m_pSaveDirBtn, "change");
+ get(m_pOkBtn, "save");
+ get(m_pCancelBtn, "cancel");
- m_aSaveDirBtn.SetClickHdl( LINK( this, BrokenRecoveryDialog, SaveButtonHdl ) );
- m_aOkBtn.SetClickHdl( LINK( this, BrokenRecoveryDialog, OkButtonHdl ) );
- m_aCancelBtn.SetClickHdl( LINK( this, BrokenRecoveryDialog, CancelButtonHdl ) );
+ m_pSaveDirBtn->SetClickHdl( LINK( this, BrokenRecoveryDialog, SaveButtonHdl ) );
+ m_pOkBtn->SetClickHdl( LINK( this, BrokenRecoveryDialog, OkButtonHdl ) );
+ m_pCancelBtn->SetClickHdl( LINK( this, BrokenRecoveryDialog, CancelButtonHdl ) );
m_sSavePath = SvtPathOptions().GetWorkPath();
INetURLObject aObj( m_sSavePath );
OUString sPath;
::utl::LocalFileHelper::ConvertURLToSystemPath( aObj.GetMainURL( INetURLObject::NO_DECODE ), sPath );
- m_aSaveDirED.SetText( sPath );
+ m_pSaveDirED->SetText( sPath );
impl_refresh();
}
@@ -1263,11 +1258,11 @@ void BrokenRecoveryDialog::impl_refresh()
m_bExecutionNeeded = true;
- sal_uInt16 nPos = m_aFileListLB.InsertEntry(rInfo.DisplayName, rInfo.StandardImage );
- m_aFileListLB.SetEntryData( nPos, (void*)&rInfo );
+ sal_uInt16 nPos = m_pFileListLB->InsertEntry(rInfo.DisplayName, rInfo.StandardImage );
+ m_pFileListLB->SetEntryData( nPos, (void*)&rInfo );
}
m_sSavePath = "";
- m_aOkBtn.GrabFocus();
+ m_pOkBtn->GrabFocus();
}
@@ -1285,7 +1280,7 @@ OUString BrokenRecoveryDialog::getSaveDirURL()
IMPL_LINK_NOARG(BrokenRecoveryDialog, OkButtonHdl)
{
- OUString sPhysicalPath = comphelper::string::strip(m_aSaveDirED.GetText(), ' ');
+ OUString sPhysicalPath = comphelper::string::strip(m_pSaveDirED->GetText(), ' ');
OUString sURL;
::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPhysicalPath, sURL );
m_sSavePath = sURL;
@@ -1324,7 +1319,7 @@ void BrokenRecoveryDialog::impl_askForSavePath()
m_sSavePath = xFolderPicker->getDirectory();
OUString sPath;
::utl::LocalFileHelper::ConvertURLToSystemPath( m_sSavePath, sPath );
- m_aSaveDirED.SetText( sPath );
+ m_pSaveDirED->SetText( sPath );
}
}
diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc
index 36781a9..205ef5e 100644
--- a/svx/source/dialog/docrecovery.hrc
+++ b/svx/source/dialog/docrecovery.hrc
@@ -69,38 +69,6 @@
#define RECOV_FILELISTHEIGHT (RECOV_ROW7-RECOV_ROW6)
#define RECOV_CONTROLWIDTH (SAVE_COL2-SAVE_COL0)
-// TabPage Broken Recovery
-
-#define FT_BROKEN_DESCR 1
-#define FT_BROKEN_FILELIST 2
-#define LB_BROKEN_FILELIST 3
-#define FT_BROKEN_SAVEDIR 4
-#define ED_BROKEN_SAVEDIR 5
-#define BTN_BROKEN_SAVEDIR 6
-#define FL_BROKEN_BOTTOM 7
-#define BTN_BROKEN_OK 8
-#define BTN_BROKEN_CANCEL 9
-
-#define BROKEN_WIDTH 210
-#define BROKEN_HEIGHT 160
-#define BROKEN_COL0 (RSC_SP_DLG_INNERBORDER_LEFT)
-#define BROKEN_COL4 (BROKEN_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
-#define BROKEN_COL3 (BROKEN_COL4-RSC_CD_PUSHBUTTON_WIDTH)
-#define BROKEN_COL2 (BROKEN_COL3-RSC_SP_CTRL_GROUP_X)
-#define BROKEN_COL1 (BROKEN_COL2-RSC_CD_PUSHBUTTON_WIDTH)
-
-#define BROKEN_ROW0 (RSC_SP_DLG_INNERBORDER_TOP)
-#define BROKEN_ROW1 (BROKEN_ROW0+5*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_GROUP_Y)
-#define BROKEN_ROW2 (BROKEN_ROW1+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_GROUP_Y)
-#define BROKEN_ROW8 (BROKEN_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM)
-#define BROKEN_ROW7 (BROKEN_ROW8-RSC_CD_PUSHBUTTON_HEIGHT)
-#define BROKEN_ROW6 (BROKEN_ROW7-RSC_SP_FLGR_INNERBORDER_BOTTOM-RSC_CD_FIXEDLINE_HEIGHT)
-#define BROKEN_ROW5 (BROKEN_ROW6-RSC_SP_FLGR_INNERBORDER_TOP-RSC_CD_PUSHBUTTON_HEIGHT)
-#define BROKEN_ROW4 (BROKEN_ROW5-RSC_SP_CTRL_GROUP_Y-RSC_CD_FIXEDTEXT_HEIGHT)
-#define BROKEN_ROW3 (BROKEN_ROW4-RSC_SP_CTRL_GROUP_Y)
-
-#define BROKEN_CONTROLWIDTH (BROKEN_COL4-BROKEN_COL0)
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src
index d0c6e24..0e5e895 100644
--- a/svx/source/dialog/docrecovery.src
+++ b/svx/source/dialog/docrecovery.src
@@ -29,73 +29,4 @@ QueryBox RID_SVXQB_EXIT_RECOVERY
Message [ en-US ] = "Are you sure you want to cancel the %PRODUCTNAME document recovery?";
};
-ModalDialog RID_SVX_MDLG_DOCRECOVERY_BROKEN
-{
- Size = MAP_APPFONT( BROKEN_WIDTH, BROKEN_HEIGHT );
- HelpId = HID_SVX_MDLG_DOCRECOVERY_BROKEN;
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Text = "%PRODUCTNAME %PRODUCTVERSION";
-
- FixedText FT_BROKEN_DESCR
- {
- Pos = MAP_APPFONT( BROKEN_COL0, BROKEN_ROW0 );
- Size = MAP_APPFONT( BROKEN_CONTROLWIDTH, (5*RSC_CD_FIXEDTEXT_HEIGHT) );
- WordBreak = TRUE;
- Text[ en-US ] = "The automatic recovery process was interrupted.\n\nThe documents listed below will be saved in the folder noted below if you click 'Save'. Click 'Cancel' to close the wizard without saving the documents.";
- };
- FixedText FT_BROKEN_FILELIST
- {
- Pos = MAP_APPFONT( BROKEN_COL0, BROKEN_ROW1 );
- Size = MAP_APPFONT( BROKEN_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "Documents";
- };
- ListBox LB_BROKEN_FILELIST
- {
- HelpID = "svx:ListBox:RID_SVX_MDLG_DOCRECOVERY_BROKEN:LB_BROKEN_FILELIST";
- Pos = MAP_APPFONT( BROKEN_COL0, BROKEN_ROW2 );
- Size = MAP_APPFONT( BROKEN_CONTROLWIDTH, (BROKEN_ROW3-BROKEN_ROW2) );
- Border = TRUE;
- TabStop = TRUE;
- };
- FixedText FT_BROKEN_SAVEDIR
- {
- Pos = MAP_APPFONT( BROKEN_COL0, BROKEN_ROW4 + 1 ); // see ED_BROKEN_SAVEDIR
- Size = MAP_APPFONT( BROKEN_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "~Save to";
- };
- Edit ED_BROKEN_SAVEDIR
- {
- HelpID = "svx:Edit:RID_SVX_MDLG_DOCRECOVERY_BROKEN:ED_BROKEN_SAVEDIR";
- Pos = MAP_APPFONT( BROKEN_COL0, BROKEN_ROW5 + 1 ); // center to pushbutton
- Size = MAP_APPFONT( BROKEN_COL2 - BROKEN_COL0, RSC_CD_TEXTBOX_HEIGHT );
- Border = TRUE;
- };
- PushButton BTN_BROKEN_SAVEDIR
- {
- HelpID = "svx:PushButton:RID_SVX_MDLG_DOCRECOVERY_BROKEN:BTN_BROKEN_SAVEDIR";
- Pos = MAP_APPFONT( BROKEN_COL3, BROKEN_ROW5 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text [ en-US ] = "Chan~ge...";
- };
- FixedLine FL_BROKEN_BOTTOM
- {
- Pos = MAP_APPFONT( 0 , BROKEN_ROW6 );
- Size = MAP_APPFONT( BROKEN_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
- OKButton BTN_BROKEN_OK
- {
- Pos = MAP_APPFONT( BROKEN_COL1, BROKEN_ROW7 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- DefButton = TRUE;
- Text [ en-US ] = "~Save";
- };
- CancelButton BTN_BROKEN_CANCEL
- {
- Pos = MAP_APPFONT( BROKEN_COL3, BROKEN_ROW7 );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 2b819c0..7c0a7c5 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -558,15 +558,11 @@ class BrokenRecoveryDialog : public ModalDialog
// member
private:
- FixedText m_aDescrFT;
- FixedText m_aFileListFT;
- ListBox m_aFileListLB;
- FixedText m_aSaveDirFT;
- Edit m_aSaveDirED;
- PushButton m_aSaveDirBtn;
- FixedLine m_aBottomFL;
- OKButton m_aOkBtn;
- CancelButton m_aCancelBtn;
+ ListBox *m_pFileListLB;
+ Edit *m_pSaveDirED;
+ PushButton *m_pSaveDirBtn;
+ PushButton *m_pOkBtn;
+ CancelButton *m_pCancelBtn;
OUString m_sSavePath;
RecoveryCore* m_pCore;
diff --git a/svx/uiconfig/ui/docrecoverybrokendialog.ui b/svx/uiconfig/ui/docrecoverybrokendialog.ui
new file mode 100644
index 0000000..bad017d
--- /dev/null
+++ b/svx/uiconfig/ui/docrecoverybrokendialog.ui
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="DocRecoveryBrokenDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION</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="save">
+ <property name="label" translatable="yes">_Save</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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>
+ </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="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">The automatic recovery process was interrupted.
+
+The documents listed below will be saved in the folder noted below if you click 'Save'. Click 'Cancel' to close the wizard without saving the documents.</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Documents</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="filelist:border">
+ <property name="height_request">100</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Save to</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkEntry" id="savedir">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">â¢</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="change">
+ <property name="label" translatable="yes">Chan_ge...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">save</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list