summaryrefslogtreecommitdiff
path: root/fpicker/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-16 10:27:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-16 10:41:27 +0000
commitae22d6388827958cfd89cd702b8c3c41ff9821e5 (patch)
tree01907f4a0a46162521688835bbbc847f68727e61 /fpicker/source
parent1327020b6723ef988fe4e8399a87ce70e21419d7 (diff)
convert query folder dialog to .ui
Change-Id: I844b45b4cc9834550d0d187dfdbc69686e512e5d
Diffstat (limited to 'fpicker/source')
-rw-r--r--fpicker/source/office/OfficeFilePicker.hrc2
-rw-r--r--fpicker/source/office/iodlg.cxx46
-rw-r--r--fpicker/source/office/iodlg.hrc9
-rw-r--r--fpicker/source/office/iodlg.src45
4 files changed, 20 insertions, 82 deletions
diff --git a/fpicker/source/office/OfficeFilePicker.hrc b/fpicker/source/office/OfficeFilePicker.hrc
index 53d8a983340b..bdc9455c04c6 100644
--- a/fpicker/source/office/OfficeFilePicker.hrc
+++ b/fpicker/source/office/OfficeFilePicker.hrc
@@ -12,7 +12,7 @@
#include <vcl/fpicker.hrc>
#define DLG_FPICKER_EXPLORERFILE (RID_FPICKER_START+14)
-#define DLG_FPICKER_QUERYFOLDERNAME (RID_FPICKER_START+15)
+
#define DLG_FPICKER_PLACE_EDIT (RID_FPICKER_START+16)
#define RID_FILEPICKER_IMAGES (RID_FPICKER_START+17)
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 009b61d7fcb0..face054e63e9 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -3336,37 +3336,29 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl )
namespace svtools {
-QueryFolderNameDialog::QueryFolderNameDialog
-(
- Window* _pParent,
- const OUString& rTitle,
- const OUString& rDefaultText,
- OUString* pGroupName
-) :
- ModalDialog( _pParent, SvtResId( DLG_FPICKER_QUERYFOLDERNAME ) ),
-
- aNameText ( this, SvtResId( FT_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aNameEdit ( this, SvtResId( ED_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aNameLine ( this, SvtResId( FL_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aOKBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_OK ) ),
- aCancelBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_CANCEL ) )
+QueryFolderNameDialog::QueryFolderNameDialog(Window* _pParent,
+ const OUString& rTitle, const OUString& rDefaultText, OUString* pGroupName)
+ : ModalDialog(_pParent, "FolderNameDialog", "fps/ui/foldernamedialog.ui")
{
- FreeResource();
+ get(m_pNameEdit, "entry");
+ get(m_pNameLine, "frame");
+ get(m_pOKBtn, "ok");
+
SetText( rTitle );
- aNameEdit.SetText( rDefaultText );
- aNameEdit.SetSelection( Selection( 0, rDefaultText.getLength() ) );
- aOKBtn.SetClickHdl( LINK( this, QueryFolderNameDialog, OKHdl ) );
- aNameEdit.SetModifyHdl( LINK( this, QueryFolderNameDialog, NameHdl ) );
+ m_pNameEdit->SetText( rDefaultText );
+ m_pNameEdit->SetSelection( Selection( 0, rDefaultText.getLength() ) );
+ m_pOKBtn->SetClickHdl( LINK( this, QueryFolderNameDialog, OKHdl ) );
+ m_pNameEdit->SetModifyHdl( LINK( this, QueryFolderNameDialog, NameHdl ) );
- if ( pGroupName )
- aNameLine.SetText( *pGroupName );
+ if (pGroupName)
+ m_pNameLine->set_label( *pGroupName );
};
// -----------------------------------------------------------------------
IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl)
{
// trim the strings
- aNameEdit.SetText(comphelper::string::strip(aNameEdit.GetText(), ' '));
+ m_pNameEdit->SetText(comphelper::string::strip(m_pNameEdit->GetText(), ' '));
EndDialog( RET_OK );
return 1;
}
@@ -3375,16 +3367,16 @@ IMPL_LINK_NOARG(QueryFolderNameDialog, OKHdl)
IMPL_LINK_NOARG(QueryFolderNameDialog, NameHdl)
{
// trim the strings
- OUString aName = comphelper::string::strip(aNameEdit.GetText(), ' ');
+ OUString aName = comphelper::string::strip(m_pNameEdit->GetText(), ' ');
if ( !aName.isEmpty() )
{
- if ( !aOKBtn.IsEnabled() )
- aOKBtn.Enable( sal_True );
+ if ( !m_pOKBtn->IsEnabled() )
+ m_pOKBtn->Enable( sal_True );
}
else
{
- if ( aOKBtn.IsEnabled() )
- aOKBtn.Enable( sal_False );
+ if ( m_pOKBtn->IsEnabled() )
+ m_pOKBtn->Enable( sal_False );
}
return 0;
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index cc7d90fcd4c0..73e7901bf3b2 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -68,15 +68,6 @@
#define STR_DEFAULT_DIRECTORY 9
#define STR_PLACES_TITLE 10
-// DLG_SVT_QUERYFOLDERNAME -----------------------
-
-#define FT_SVT_QUERYFOLDERNAME_DLG_NAME 10
-#define ED_SVT_QUERYFOLDERNAME_DLG_NAME 11
-#define FL_SVT_QUERYFOLDERNAME_DLG_NAME 12
-#define BT_SVT_QUERYFOLDERNAME_DLG_OK 13
-#define BT_SVT_QUERYFOLDERNAME_DLG_CANCEL 14
-#define BT_SVT_QUERYFOLDERNAME_DLG_HELP 15
-
// -----------------------------------------------
#define SID_SFX_START 5000
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index 052454768326..1a6b3a9f32cc 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -240,51 +240,6 @@ ModalDialog DLG_FPICKER_EXPLORERFILE
};
};
-// QueryFolderNameDialog ----------------------------------------------------------
-
-ModalDialog DLG_FPICKER_QUERYFOLDERNAME
-{
- HelpID = "fpicker:ModalDialog:DLG_SVT_QUERYFOLDERNAME";
- Border = TRUE ;
- Moveable = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Text = "Ordner" ;
- Size = MAP_APPFONT ( 215 , 45 ) ;
- FixedText FT_SVT_QUERYFOLDERNAME_DLG_NAME
- {
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 138 , 10 ) ;
- Text [ en-US ] = "Na~me" ;
- };
- Edit ED_SVT_QUERYFOLDERNAME_DLG_NAME
- {
- HelpID = "fpicker:Edit:DLG_SVT_QUERYFOLDERNAME:ED_SVT_QUERYFOLDERNAME_DLG_NAME";
- Pos = MAP_APPFONT ( 12 , 27 ) ;
- Size = MAP_APPFONT ( 138 , 12 ) ;
- Border = TRUE ;
- Left = TRUE ;
- };
- FixedLine FL_SVT_QUERYFOLDERNAME_DLG_NAME
- {
- Group = TRUE ;
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 150 , 8 ) ;
- Text [ en-US ] = "Create new folder" ;
- };
- OKButton BT_SVT_QUERYFOLDERNAME_DLG_OK
- {
- Pos = MAP_APPFONT ( 162 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
- };
- CancelButton BT_SVT_QUERYFOLDERNAME_DLG_CANCEL
- {
- Pos = MAP_APPFONT ( 162 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- };
-};
-
// strings *******************************************************************
String RID_FILEOPEN_NOTEXISTENTFILE