summaryrefslogtreecommitdiff
path: root/dbaccess/source/ext
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 /dbaccess/source/ext
parent81fb15d33fcdf8adb0776d22dba06a1fde549936 (diff)
convert TP_PREPARE to .ui
Change-Id: Iad0c94ffd08117f79cba5d5305f03c836ac6ada9
Diffstat (limited to 'dbaccess/source/ext')
-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
5 files changed, 20 insertions, 66 deletions
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