summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-21 16:26:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-21 16:28:41 +0100
commitaa7d58a1e6e6f809a5372d893b70fc298a240676 (patch)
tree86db954c1fc8a380640ba3dd091e5d3385cac437
parent81fb15d33fcdf8adb0776d22dba06a1fde549936 (diff)
convert TP_PREPARE to .ui
Change-Id: Iad0c94ffd08117f79cba5d5305f03c836ac6ada9
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ext/macromigration/dbmm_global.hrc1
-rw-r--r--dbaccess/source/ext/macromigration/macromigration.hrc1
-rw-r--r--dbaccess/source/ext/macromigration/macromigration.src49
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx25
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.hxx10
-rw-r--r--dbaccess/uiconfig/ui/preparepage.ui72
7 files changed, 93 insertions, 66 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 197e4a3d0bca..c6060f1ea634 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/indexdesigndialog \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/password \
+ dbaccess/uiconfig/ui/preparepage \
dbaccess/uiconfig/ui/queryfilterdialog \
dbaccess/uiconfig/ui/querypropertiesdialog \
dbaccess/uiconfig/ui/relationdialog \
diff --git a/dbaccess/source/ext/macromigration/dbmm_global.hrc b/dbaccess/source/ext/macromigration/dbmm_global.hrc
index 2918be19d506..9354332e1324 100644
--- a/dbaccess/source/ext/macromigration/dbmm_global.hrc
+++ b/dbaccess/source/ext/macromigration/dbmm_global.hrc
@@ -38,7 +38,6 @@
//= tab pages
-#define TP_PREPARE ( RID_DBMM_TAPPAGE_START + 0 )
#define TP_SAVE_DBDOC_AS ( RID_DBMM_TAPPAGE_START + 1 )
#define TP_MIGRATE ( RID_DBMM_TAPPAGE_START + 2 )
#define TP_SUMMARY ( RID_DBMM_TAPPAGE_START + 3 )
diff --git a/dbaccess/source/ext/macromigration/macromigration.hrc b/dbaccess/source/ext/macromigration/macromigration.hrc
index d55a9e1c315f..ada05ff5e7c0 100644
--- a/dbaccess/source/ext/macromigration/macromigration.hrc
+++ b/dbaccess/source/ext/macromigration/macromigration.hrc
@@ -47,7 +47,6 @@
//... fixed texts .......................................................
#define FT_HEADER 1
-#define FT_INTRODUCTION 2
#define FT_EXPLANATION 3
#define FT_SAVE_AS_LABEL 4
#define FT_START_MIGRATION 5
diff --git a/dbaccess/source/ext/macromigration/macromigration.src b/dbaccess/source/ext/macromigration/macromigration.src
index 52da579410d8..b58891c579fe 100644
--- a/dbaccess/source/ext/macromigration/macromigration.src
+++ b/dbaccess/source/ext/macromigration/macromigration.src
@@ -51,55 +51,6 @@ ModalDialog DLG_MACRO_MIGRATION
};
};
-//= PreparationPage
-
-TabPage TP_PREPARE
-{
- HelpID = "dbaccess:TabPage:TP_PREPARE";
- Pos = MAP_APPFONT( 40, 130 );
- Size = MAP_APPFONT( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT );
-
- Hide = TRUE;
-
- FixedText FT_HEADER
- {
- Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN, TAB_PAGE_CONTENT_MARGIN );
- Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN, FIXED_TEXT_HEIGHT );
-
- Text [ en-US ] = "Welcome to the Database Macro Migration Wizard";
- };
-
- FixedText FT_INTRODUCTION
- {
- Pos = MAP_APPFONT( TAB_PAGE_CONTENT_MARGIN, CONTENT_POS_X );
- Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN,
- TAB_PAGE_HEIGHT - CONTENT_POS_X - TAB_PAGE_CONTENT_MARGIN - ( 2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED ) );
- WordBreak = TRUE;
-
- Text [ en-US ] = "This wizard will guide you through the task of migrating your macros.\n\n"
-
- "After you finished it, all macros which were formerly embedded into the forms and reports of "
- "the current database document will have been moved to the document itself. In this course, "
- "libraries will be renamed as needed.\n\n"
-
- "If your forms and reports contain references to those macros, they will be adjusted, where "
- "possible.\n\n"
-
- "Before the migration can start, all forms, reports, queries and tables belonging to the document must be closed. "
- "Press 'Next' to do so.";
- };
-
- FixedText FT_CLOSE_DOC_ERROR
- {
- Pos = MAP_APPFONT ( TAB_PAGE_CONTENT_MARGIN,
- TAB_PAGE_HEIGHT - TAB_PAGE_CONTENT_MARGIN - ( 2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED ) );
- Size = MAP_APPFONT( TAB_PAGE_WIDTH - 2 * TAB_PAGE_CONTENT_MARGIN,
- 2 * FIXED_TEXT_HEIGHT - SPACING_UNRELATED );
- Text [ en-US ] = "Not all objects could be closed. Please close them manually, and re-start the wizard.";
- hide = TRUE;
- };
-};
-
//= SaveDBDocPage
TabPage TP_SAVE_DBDOC_AS
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 762a5e99decd..4591eb3b8e99 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -48,15 +48,22 @@ namespace dbmm
// MacroMigrationPage
MacroMigrationPage::MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes )
:MacroMigrationPage_Base( &_rParentDialog, _rRes )
- ,m_aHeader( this, MacroMigrationResId( FT_HEADER ) )
{
- Font aFont( m_aHeader.GetFont() );
+ m_pHeader = new FixedText(this, MacroMigrationResId(FT_HEADER));
+ Font aFont( m_pHeader->GetFont() );
aFont.SetWeight( WEIGHT_BOLD );
- m_aHeader.SetFont( aFont );
+ m_pHeader->SetFont( aFont );
+ }
+
+ MacroMigrationPage::MacroMigrationPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription)
+ : MacroMigrationPage_Base(pParent, rID, rUIXMLDescription)
+ , m_pHeader(0) //remove when upper ctor is removed
+ {
}
MacroMigrationPage::~MacroMigrationPage()
{
+ delete m_pHeader;
}
const MacroMigrationDialog& MacroMigrationPage::getDialog() const
@@ -70,22 +77,20 @@ namespace dbmm
}
// PreparationPage
- PreparationPage::PreparationPage( MacroMigrationDialog& _rParentDialog )
- :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_PREPARE ) )
- ,m_aIntroduction ( this, MacroMigrationResId( FT_INTRODUCTION ) )
- ,m_aCloseDocError( this, MacroMigrationResId( FT_CLOSE_DOC_ERROR ) )
+ PreparationPage::PreparationPage(Window *pParent)
+ : MacroMigrationPage(pParent, "PreparePage" ,"dbaccess/ui/preparepage.ui")
{
- FreeResource();
+ get(m_pCloseDocError, "closedocerror");
}
void PreparationPage::showCloseDocsError( bool _bShow )
{
- m_aCloseDocError.Show( _bShow );
+ m_pCloseDocError->Show( _bShow );
}
TabPage* PreparationPage::Create( ::svt::RoadmapWizard& _rParentDialog )
{
- return new PreparationPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) );
+ return new PreparationPage(&_rParentDialog);
}
// SaveDBDocPage
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index be05f5619a52..fa59d77ee515 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -46,6 +46,7 @@ namespace dbmm
{
public:
MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes );
+ MacroMigrationPage(Window *pParent, const OString& rID, const OUString& rUIXMLDescription);
virtual ~MacroMigrationPage();
protected:
@@ -53,23 +54,22 @@ namespace dbmm
MacroMigrationDialog& getDialog() ;
protected:
- FixedText m_aHeader;
+ FixedText* m_pHeader;
};
// PreparationPage
class PreparationPage : public MacroMigrationPage
{
public:
- PreparationPage( MacroMigrationDialog& _rParentDialog );
+ PreparationPage(Window *pParent);
static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
public:
- void showCloseDocsError( bool _bShow );
+ void showCloseDocsError(bool _bShow);
protected:
- FixedText m_aIntroduction;
- FixedText m_aCloseDocError;
+ FixedText* m_pCloseDocError;
};
// SaveDBDocPage
diff --git a/dbaccess/uiconfig/ui/preparepage.ui b/dbaccess/uiconfig/ui/preparepage.ui
new file mode 100644
index 000000000000..f6cb6393d25c
--- /dev/null
+++ b/dbaccess/uiconfig/ui/preparepage.ui
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkGrid" id="PreparePage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">24</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Welcome to the Database Macro Migration Wizard</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">This wizard will guide you through the task of migrating your macros.
+
+After you finished it, all macros which were formerly embedded into the forms and reports of the current database document will have been moved to the document itself. In this course, libraries will be renamed as needed.
+
+If your forms and reports contain references to those macros, they will be adjusted, where possible.
+
+Before the migration can start, all forms, reports, queries and tables belonging to the document must be closed. Press 'Next' to do so.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">64</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="closedocerror">
+ <property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Not all objects could be closed. Please close them manually, and re-start the wizard.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">64</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>