summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 08:54:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 12:27:52 +0100
commit702b981d9a9bd079a98660153747aee7337424fa (patch)
treed04bcd66371518641b02403c6ac44122015ac6e2 /sfx2/source/dialog
parent8ab6621cac3a43acfb61222dbf434df496230b36 (diff)
QueryBox MSG_QUERY_OPENASTEMPLATE -> MessageDialog + string
Change-Id: I031a145ca62e3bf7e74b9d447ff8bb041974daa6
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/dialog.hrc2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.src6
-rw-r--r--sfx2/source/dialog/newstyle.cxx19
-rw-r--r--sfx2/source/dialog/newstyle.src6
-rw-r--r--sfx2/source/dialog/templdlg.cxx12
6 files changed, 19 insertions, 30 deletions
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 1cf86cdb54c0..74eaba91b313 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -34,7 +34,7 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( RC_DIALOG_BEGIN + 0)
-#define MSG_OVERWRITE ( RC_DIALOG_BEGIN + 1)
+#define STR_QUERY_OVERWRITE ( RC_DIALOG_BEGIN + 1)
#define STR_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define STR_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
#define STR_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16)
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 7ba8c7e2cbcf..d92fa6b6d62f 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -18,7 +18,7 @@
*/
#include <tools/urlobj.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/layout.hxx>
#include <svl/eitem.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
@@ -1601,7 +1601,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
if ( bIsFromTypeBox ) // LoseFocus of TypeBox
pLine->m_bTypeLostFocus = true;
Window* pParent = GetParent()->GetParent();
- if ( QueryBox( pParent, SfxResId( SFX_QB_WRONG_TYPE ) ).Execute() == RET_OK )
+ if (MessageDialog(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VCL_MESSAGE_QUESTION, VCL_BUTTONS_OK_CANCEL).Execute() == RET_OK)
pLine->m_aTypeBox.SelectEntryPos( m_aTypeBox.GetEntryPos( (void*)CUSTOM_TYPE_TEXT ) );
else
pLine->m_aValueEdit.GrabFocus();
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index 8f6ad2e9ac00..ac379b194dc5 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -172,11 +172,9 @@ Image SFX_IMG_PROPERTY_REMOVE
MaskColor = Color { Red=0xffff; Green=0x0000; Blue=0xffff; };
};
-QueryBox SFX_QB_WRONG_TYPE
+String STR_SFX_QUERY_WRONG_TYPE
{
- Buttons = WB_OK_CANCEL ;
- DefButton = WB_DEF_OK ;
- Message [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
+ Text [ en-US ] = "The value entered does not match the specified type.\nThe value will be stored as text." ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index b2927b692375..56ae0e9c1aca 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -50,8 +50,6 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
return 0;
}
-
-
IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
{
m_pOKBtn->Enable( !comphelper::string::remove(pBox->GetText(), ' ').isEmpty() );
@@ -59,16 +57,11 @@ IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
}
IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
-// CTOR / DTOR -----------------------------------------------------------
-
-SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool ) :
-
- ModalDialog( pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui" ),
-
- aQueryOverwriteBox ( this, SfxResId( MSG_OVERWRITE ) ),
-
- rPool( rInPool )
-
+SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool )
+ : ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
+ , aQueryOverwriteBox(this, SfxResId(STR_QUERY_OVERWRITE),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO)
+ , rPool(rInPool)
{
get(m_pColBox, "stylename");
m_pColBox->set_width_request(m_pColBox->approximate_char_width() * 25);
@@ -87,8 +80,6 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool
}
}
-
-
SfxNewStyleDlg::~SfxNewStyleDlg()
{
}
diff --git a/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src
index 10c7744e2a46..d595e553536d 100644
--- a/sfx2/source/dialog/newstyle.src
+++ b/sfx2/source/dialog/newstyle.src
@@ -21,11 +21,9 @@
#include "dialog.hrc"
#include <sfx2/sfxcommands.h>
-QueryBox MSG_OVERWRITE
+String STR_QUERY_OVERWRITE
{
- Buttons = WB_YES_NO ;
- DefButton = WB_DEF_NO ;
- Message [ en-US ] = "Style already exists. Overwrite?" ;
+ Text [ en-US ] = "Style already exists. Overwrite?" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 7b022d35f825..09f30cedcde1 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2115,11 +2115,13 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
// we only want to show the dialog once and if we want to delete a style in use (UX-advice)
if ( bUsedStyle )
{
- #if defined UNX
- QueryBox aBox( SfxGetpApp()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
- #else
- QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , aMsg );
- #endif
+ #if defined UNX
+ MessageDialog aBox(SfxGetpApp()->GetTopWindow(), aMsg,
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+ #else
+ MessageDialog aBox(GetWindow(), aMsg,
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+ #endif
aApproved = aBox.Execute() == RET_YES;
}