[Libreoffice-commits] core.git: cui/source
Olivier Hallot
olivier.hallot at edx.srv.br
Thu Aug 8 00:56:48 PDT 2013
cui/source/tabpages/tpbitmap.cxx | 9 ++++-----
cui/source/tabpages/tpcolor.cxx | 9 ++++-----
cui/source/tabpages/tpgradnt.cxx | 9 ++++-----
cui/source/tabpages/tphatch.cxx | 5 +++--
4 files changed, 15 insertions(+), 17 deletions(-)
New commits:
commit cb45c6bd429430e5158d150acf4590885dfba766
Author: Olivier Hallot <olivier.hallot at edx.srv.br>
Date: Wed Aug 7 00:20:56 2013 -0300
Use new save list dialogs in tab pages
Change-Id: I2d85f8ab0c220d82476c4cc587921c7fb9aa5df4
Reviewed-on: https://gerrit.libreoffice.org/5301
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 160af95..7143a9a 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 f14ab76..e20b648 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 e84c892..e8a8fef 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 95b64f5..eb2da03 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();
More information about the Libreoffice-commits
mailing list