Kaydet (Commit) d731f30e authored tarafından Thomas Arnhold's avatar Thomas Arnhold

InfoBox to String

Change-Id: Ic12f04bf80639d89ecc531bceb8378c7d97e9325
üst 58c7c4c2
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0) #define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( RC_DIALOG_BEGIN + 0) #define STR_RESET ( RC_DIALOG_BEGIN + 0)
#define MSG_OVERWRITE ( RC_DIALOG_BEGIN + 1) #define MSG_OVERWRITE ( RC_DIALOG_BEGIN + 1)
#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13) #define STR_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14) #define STR_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
#define MSG_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16) #define STR_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16)
#define MSG_TABPAGE_INVALIDPARENT ( RC_DIALOG_BEGIN + 18) #define STR_TABPAGE_INVALIDPARENT ( RC_DIALOG_BEGIN + 18)
#define STR_DELETE_STYLE ( RC_DIALOG_BEGIN + 18) #define STR_DELETE_STYLE ( RC_DIALOG_BEGIN + 19)
#define STR_DELETE_STYLE_USED ( RC_DIALOG_BEGIN + 20) #define STR_DELETE_STYLE_USED ( RC_DIALOG_BEGIN + 20)
#define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46) #define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
......
...@@ -30,27 +30,21 @@ String STR_APPLY ...@@ -30,27 +30,21 @@ String STR_APPLY
{ {
Text [ en-US ] = "Apply"; Text [ en-US ] = "Apply";
}; };
InfoBox MSG_TABPAGE_INVALIDNAME String STR_TABPAGE_INVALIDNAME
{ {
BUTTONS = WB_OK ; Text [ en-US ] = "This name is already in use." ;
DEFBUTTON = WB_DEF_OK ;
Message [ en-US ] = "This name is already in use." ;
}; };
InfoBox MSG_TABPAGE_INVALIDSTYLE String STR_TABPAGE_INVALIDSTYLE
{ {
BUTTONS = WB_OK ; Text [ en-US ] = "This Style does not exist." ;
DEFBUTTON = WB_DEF_OK ;
Message [ en-US ] = "This Style does not exist." ;
}; };
InfoBox MSG_TABPAGE_INVALIDPARENT String STR_TABPAGE_INVALIDPARENT
{ {
BUTTONS = WB_OK ; Text [ en-US ] = "This Style cannot be used as a base Style,\nbecause it would result in a recursive reference." ;
DEFBUTTON = WB_DEF_OK ;
Message [ en-US ] = "This Style cannot be used as a base Style,\nbecause it would result in a recursive reference." ;
}; };
InfoBox MSG_POOL_STYLE_NAME String STR_POOL_STYLE_NAME
{ {
Message [ en-US ] = "Name already exists as a default Style.\nPlease choose another name." ; Text [ en-US ] = "Name already exists as a default Style.\nPlease choose another name." ;
}; };
String STR_DELETE_STYLE_USED String STR_DELETE_STYLE_USED
{ {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
#include <vcl/layout.hxx>
#include <vcl/msgbox.hxx> #include <vcl/msgbox.hxx>
#include <vcl/field.hxx> #include <vcl/field.hxx>
#include <svl/eitem.hxx> #include <svl/eitem.hxx>
...@@ -538,7 +539,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) ...@@ -538,7 +539,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
if (!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' '))) if (!pStyle->SetName(comphelper::string::stripStart(m_pNameRw->GetText(), ' ')))
{ {
InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDNAME ) ); MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDNAME ), VCL_MESSAGE_INFO );
aBox.Execute(); aBox.Execute();
m_pNameRw->GrabFocus(); m_pNameRw->GrabFocus();
m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); m_pNameRw->SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
...@@ -555,7 +556,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) ...@@ -555,7 +556,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
{ {
if ( !pStyle->SetFollow( aFollowEntry ) ) if ( !pStyle->SetFollow( aFollowEntry ) )
{ {
InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDSTYLE ) ); MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDSTYLE ), VCL_MESSAGE_INFO );
aBox.Execute(); aBox.Execute();
m_pFollowLb->GrabFocus(); m_pFollowLb->GrabFocus();
return SfxTabPage::KEEP_PAGE; return SfxTabPage::KEEP_PAGE;
...@@ -575,7 +576,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet ) ...@@ -575,7 +576,7 @@ int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pItemSet )
{ {
if ( !pStyle->SetParent( aParentEntry ) ) if ( !pStyle->SetParent( aParentEntry ) )
{ {
InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDPARENT ) ); MessageDialog aBox( this, SfxResId( STR_TABPAGE_INVALIDPARENT ), VCL_MESSAGE_INFO );
aBox.Execute(); aBox.Execute();
m_pBaseLb->GrabFocus(); m_pBaseLb->GrabFocus();
return SfxTabPage::KEEP_PAGE; return SfxTabPage::KEEP_PAGE;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <sfx2/newstyle.hxx> #include <sfx2/newstyle.hxx>
#include "dialog.hrc" #include "dialog.hrc"
#include <sfx2/sfxresid.hxx> #include <sfx2/sfxresid.hxx>
#include <vcl/layout.hxx>
// PRIVATE METHODES ------------------------------------------------------ // PRIVATE METHODES ------------------------------------------------------
...@@ -36,7 +37,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl ) ...@@ -36,7 +37,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
{ {
if ( !pStyle->IsUserDefined() ) if ( !pStyle->IsUserDefined() )
{ {
InfoBox( this, SfxResId( MSG_POOL_STYLE_NAME ) ).Execute(); MessageDialog( this, SfxResId( STR_POOL_STYLE_NAME ), VCL_MESSAGE_INFO ).Execute();
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment