diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-08-11 22:50:52 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-12 07:53:28 +0000 |
commit | 571ba1611c82d2373a470ab4a57b69804af8598f (patch) | |
tree | 0e02146ebcf15776c189e12707378751077be006 /cui/source/tabpages/tpbitmap.cxx | |
parent | b74bf4146e866fbcd41ad075296c9a4eee16c829 (diff) |
Replace old dialogs with new one (widget UI)
Change-Id: Ia91ce634dee434de841b9b61455e447588926f17
Reviewed-on: https://gerrit.libreoffice.org/5355
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source/tabpages/tpbitmap.cxx')
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index d918b5922c60..5f6550bfe647 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -455,7 +455,7 @@ long SvxBitmapTabPage::CheckChanges_Impl() IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl) { - ResMgr& rMgr = CUI_MGR(); + String aNewName( SVX_RES( RID_SVXSTR_BITMAP ) ); String aDesc( CUI_RES( RID_SVXSTR_DESC_NEW_BITMAP ) ); String aName; @@ -480,8 +480,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), aName, aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - WarningBox* pWarnBox = NULL; - sal_uInt16 nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + MessageDialog* pWarnBox = NULL; + sal_uInt16 nError(1); while( pDlg->Execute() == RET_OK ) { @@ -500,10 +500,10 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl) if( !pWarnBox ) { - pWarnBox = new WarningBox( GetParentDialog(), - WinBits( WB_OK_CANCEL ), - String( ResId( nError, rMgr ) ) ); - pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); + pWarnBox = new MessageDialog( GetParentDialog() + ,"DuplicateNameDialog" + ,"cui/ui/queryduplicatedialog.ui"); +// pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); } if( pWarnBox->Execute() != RET_OK ) @@ -582,7 +582,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) if( !nError ) { String aDesc( ResId(RID_SVXSTR_DESC_EXT_BITMAP, rMgr) ); - WarningBox* pWarnBox = NULL; + MessageDialog* pWarnBox = NULL; // convert file URL to UI name String aName; @@ -591,7 +591,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) DBG_ASSERT(pFact, "Dialogdiet fail!"); AbstractSvxNameDialog* pDlg = pFact->CreateSvxNameDialog( GetParentDialog(), String(aURL.GetName()).GetToken( 0, '.' ), aDesc ); DBG_ASSERT(pDlg, "Dialogdiet fail!"); - nError = RID_SVXSTR_WARN_NAME_DUPLICATE; + nError = 1; while( pDlg->Execute() == RET_OK ) { @@ -611,13 +611,12 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl) if( !pWarnBox ) { - pWarnBox = new WarningBox( GetParentDialog(), - WinBits( WB_OK_CANCEL ), - String( ResId( nError, rMgr ) ) ); - pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); + pWarnBox = new MessageDialog( GetParentDialog() + ,"DuplicateNameDialog" + ,"cui/ui/queryduplicatedialog.ui"); +// pWarnBox->SetHelpId( HID_WARN_NAME_DUPLICATE ); } - if( pWarnBox->Execute() != RET_OK ) break; } @@ -700,8 +699,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickModifyHdl_Impl) } else { - WarningBox aBox( GetParentDialog(), WinBits( WB_OK ), String( ResId( RID_SVXSTR_WARN_NAME_DUPLICATE, rMgr ) ) ); - aBox.SetHelpId( HID_WARN_NAME_DUPLICATE ); + MessageDialog aBox( GetParentDialog() + ,"DuplicateNameDialog" + ,"cui/ui/queryduplicatedialog.ui"); aBox.Execute(); } } |