summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2013-08-07 00:20:56 -0300
committerCaolán McNamara <caolanm@redhat.com>2013-08-08 07:56:27 +0000
commitcb45c6bd429430e5158d150acf4590885dfba766 (patch)
tree4daf2a4b48b9fbcc3886befe659fa614847cf8d9
parent34f0db2cfe6806503a3d1df239d12a69dbe0f83d (diff)
Use new save list dialogs in tab pages
Change-Id: I2d85f8ab0c220d82476c4cc587921c7fb9aa5df4 Reviewed-on: https://gerrit.libreoffice.org/5301 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/source/tabpages/tpbitmap.cxx9
-rw-r--r--cui/source/tabpages/tpcolor.cxx9
-rw-r--r--cui/source/tabpages/tpgradnt.cxx9
-rw-r--r--cui/source/tabpages/tphatch.cxx5
4 files changed, 15 insertions, 17 deletions
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 160af950b44c..7143a9acbc92 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -754,8 +754,9 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
if ( *pnBitmapListState & CT_MODIFIED )
{
- nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ),
- String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute();
+ nReturn = MessageDialog( GetParentDialog()
+ ,"AskSaveList"
+ ,"cui/ui/querysavelistdialog.ui").Execute();
if ( nReturn == RET_YES )
pBitmapList->Save();
@@ -763,9 +764,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg(
- com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0 );
+ ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aStrFilterType( "*.sob" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index f14ab7656db7..e20b648b59b0 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -137,8 +137,9 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
if( IsModified() && GetList()->Count() > 0 )
{
- nReturn = WarningBox( mpTopDlg, WinBits( WB_YES_NO_CANCEL ),
- String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute();
+ nReturn = MessageDialog( GetParentDialog()
+ ,"AskSaveList"
+ ,"cui/ui/querysavelistdialog.ui").Execute();
if ( nReturn == RET_YES )
GetList()->Save();
@@ -146,9 +147,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickLoadHdl_Impl)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0 );
+ ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aStrFilterType( XPropertyList::GetDefaultExtFilter( meType ) );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index e84c892aeff9..e8a8fef048a4 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -620,8 +620,9 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
if ( *pnGradientListState & CT_MODIFIED )
{
- nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ),
- String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute();
+ nReturn = MessageDialog( GetParentDialog()
+ ,"AskSaveList"
+ ,"cui/ui/querysavelistdialog.ui").Execute();
if ( nReturn == RET_YES )
pGradientList->Save();
@@ -629,9 +630,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg(
- com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- 0 );
+ ::sfx2::FileDialogHelper aDlg( com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
String aStrFilterType( "*.sog" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 95b64f53516d..eb2da03ad40f 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -663,8 +663,9 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
if ( *pnHatchingListState & CT_MODIFIED )
{
- nReturn = WarningBox( GetParentDialog(), WinBits( WB_YES_NO_CANCEL ),
- String( ResId( RID_SVXSTR_WARN_TABLE_OVERWRITE, rMgr ) ) ).Execute();
+ nReturn = MessageDialog( GetParentDialog()
+ ,"AskSaveList"
+ ,"cui/ui/querysavelistdialog.ui").Execute();
if ( nReturn == RET_YES )
pHatchingList->Save();