summaryrefslogtreecommitdiff
path: root/basctl/source/basicide
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-31 20:28:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-31 20:28:16 +0000
commitec6050497acb445d168f835dfc745ceace072ab9 (patch)
tree8ec86a188f691e34b6c4b0417106f10a06a50197 /basctl/source/basicide
parentc6aea0bac0b168c3b0e5172d10e2d974cf5fd331 (diff)
convert goto line dialog to .ui
Change-Id: I4c4ec4f2169d001e6f09c9c7bb06a4b0b327a2f8
Diffstat (limited to 'basctl/source/basicide')
-rw-r--r--basctl/source/basicide/basidesh.src5
-rw-r--r--basctl/source/basicide/moduldl2.cxx23
-rw-r--r--basctl/source/basicide/moduldlg.hxx10
-rw-r--r--basctl/source/basicide/moduldlg.src37
4 files changed, 13 insertions, 62 deletions
diff --git a/basctl/source/basicide/basidesh.src b/basctl/source/basicide/basidesh.src
index 6876130f944f..b52526e2cbd3 100644
--- a/basctl/source/basicide/basidesh.src
+++ b/basctl/source/basicide/basidesh.src
@@ -601,11 +601,6 @@ String RID_STR_DLGIMP_MISMATCH_TEXT
Text [ en-US ] = "The dialog to be imported supports other languages than the target library.\n\nAdd these languages to the library to keep additional language resources provided by the dialog or omit them to stay with the current library languages.\n\nNote: For languages not supported by the dialog the resources of the dialog's default language will be used.\n " ;
};
-String RID_STR_GETLINE
-{
- Text [ en-US ] = "Goto Line";
-};
-
#define MN_EDIT 20
#define MN_VIEW 21
#define MN_EXTRA 22
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 6ad6b4f8253d..315479d182c2 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -436,23 +436,18 @@ NewObjectDialog::~NewObjectDialog()
//----------------------------------------------------------------------------
GotoLineDialog::GotoLineDialog(Window * pParent )
- : ModalDialog( pParent, IDEResId( RID_DLG_GOTOLINE ) ),
- aText( this, IDEResId( RID_FT_LINE ) ),
- aEdit( this, IDEResId( RID_ED_LINE ) ),
- aOKButton( this, IDEResId( RID_PB_OK ) ),
- aCancelButton( this, IDEResId( RID_PB_CANCEL ) )
+ : ModalDialog(pParent, "GotoLineDialog",
+ "modules/BasicIDE/ui/gotolinedialog.ui")
{
- FreeResource();
- aEdit.GrabFocus();
-
- SetText( IDE_RESSTR(RID_STR_GETLINE) );
- aOKButton.SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
-
+ get(m_pEdit, "entry");
+ get(m_pOKButton, "ok");
+ m_pEdit->GrabFocus();
+ m_pOKButton->SetClickHdl(LINK(this, GotoLineDialog, OkButtonHandler));
}
-sal_Int32 GotoLineDialog::GetLineNumber()
+sal_Int32 GotoLineDialog::GetLineNumber() const
{
- return OUString( aEdit.GetText() ).toInt32();
+ return m_pEdit->GetText().toInt32();
}
IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
@@ -460,7 +455,7 @@ IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
if ( GetLineNumber() )
EndDialog(1);
else
- aEdit.SetText( aEdit.GetText(), Selection(0, aEdit.GetText().getLength() ));
+ m_pEdit->SetText(m_pEdit->GetText(), Selection(0, m_pEdit->GetText().getLength()));
return 0;
}
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 0ea6a2dac6e1..921aa7df31d9 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -71,14 +71,12 @@ public:
class GotoLineDialog : public ModalDialog
{
- FixedText aText;
- Edit aEdit;
- OKButton aOKButton;
- CancelButton aCancelButton;
+ Edit* m_pEdit;
+ OKButton* m_pOKButton;
DECL_LINK(OkButtonHandler, void *);
public:
- GotoLineDialog( Window * pParent );
- sal_Int32 GetLineNumber();
+ GotoLineDialog(Window * pParent);
+ sal_Int32 GetLineNumber() const;
};
class ExportDialog : public ModalDialog
diff --git a/basctl/source/basicide/moduldlg.src b/basctl/source/basicide/moduldlg.src
index febc9b5fd658..20fd38106958 100644
--- a/basctl/source/basicide/moduldlg.src
+++ b/basctl/source/basicide/moduldlg.src
@@ -272,43 +272,6 @@ ModalDialog RID_DLG_LIBS
};
};
-ModalDialog RID_DLG_GOTOLINE
-{
- HelpID = "basctl:ModalDialog:RID_DLG_GOTOLINE";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 160 , 55 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- OKButton RID_PB_OK
- {
- Pos = MAP_APPFONT ( 104 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton RID_PB_CANCEL
- {
- Pos = MAP_APPFONT ( 104 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- FixedText RID_FT_LINE
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 96 , 10 ) ;
- Text [ en-US ] = "~Line Number:" ;
- };
- Edit RID_ED_LINE
- {
- HelpID = "basctl:Edit:RID_DLG_GOTOLINE:RID_ED_LINE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 19 ) ;
- Size = MAP_APPFONT ( 62 , 12 ) ;
- TabStop = TRUE ;
- };
-};
-
ModalDialog RID_DLG_NEWLIB
{
HelpID = "basctl:ModalDialog:RID_DLG_NEWLIB";