summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-21 15:48:51 +0200
committerThomas Arnhold <thomas@arnhold.org>2016-12-21 16:19:37 +0000
commit6b8ee3c9ba9b9262b34743a9f4e2a5b9dda4173f (patch)
treeba5bf03e1b94e30a76ac66d5dcd3c7749e3c568f /sfx2/source
parentc7964e48b6d9a85d8d08ed3b7cbd58c117ac4e0a (diff)
convert VclButtonsType to scoped enum
Change-Id: I9b91108c18e190060dc71546977aa8a3c11f06e1 Reviewed-on: https://gerrit.libreoffice.org/32285 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/templatelocalview.cxx8
-rw-r--r--sfx2/source/control/templatesearchview.cxx4
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--sfx2/source/dialog/newstyle.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx4
-rw-r--r--sfx2/source/doc/objserv.cxx6
-rw-r--r--sfx2/source/doc/saveastemplatedlg.cxx2
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx2
11 files changed, 21 insertions, 21 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 9bb058093a72..ffb3eeefc61c 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -285,7 +285,7 @@ IMPL_LINK(TemplateLocalView, ContextMenuSelectHdl, Menu*, pMenu, bool)
break;
case MNI_DELETE:
{
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
break;
@@ -518,7 +518,7 @@ bool TemplateLocalView::moveTemplate (const ThumbnailViewItem *pItem, const sal_
{
OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
getRegionName(nTargetRegion));
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
return false;
@@ -619,7 +619,7 @@ bool TemplateLocalView::moveTemplates(const std::set<const ThumbnailViewItem*, s
{
OUString sQuery = (OUString(SfxResId(STR_MSG_QUERY_COPY).toString()).replaceFirst("$1", pViewItem->maTitle)).replaceFirst("$2",
getRegionName(nTargetRegion));
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, sQuery, VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
{
@@ -912,7 +912,7 @@ void TemplateLocalView::KeyInput( const KeyEvent& rKEvt )
}
else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
{
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
return;
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 3b1a6fb31b6d..0628e0d8b760 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -59,7 +59,7 @@ void TemplateSearchView::KeyInput( const KeyEvent& rKEvt )
}
else if( aKeyCode == KEY_DELETE && !mFilteredItemList.empty())
{
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
return;
@@ -158,7 +158,7 @@ IMPL_LINK(TemplateSearchView, ContextMenuSelectHdl, Menu*, pMenu, bool)
break;
case MNI_DELETE:
{
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, SfxResId(STR_QMSG_SEL_TEMPLATE_DELETE), VclMessageType::Question, VclButtonsType::YesNo);
if ( aQueryDlg->Execute() != RET_YES )
break;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 4739073e2e17..c321af97ff05 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1687,7 +1687,7 @@ void CustomPropertiesWindow::ValidateLine( CustomPropertyLine* pLine, bool bIsFr
if ( bIsFromTypeBox ) // LoseFocus of TypeBox
pLine->m_bTypeLostFocus = true;
vcl::Window* pParent = GetParent()->GetParent();
- if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VCL_BUTTONS_OK_CANCEL)->Execute() == RET_OK)
+ if (ScopedVclPtrInstance<MessageDialog>(pParent, SfxResId(STR_SFX_QUERY_WRONG_TYPE), VclMessageType::Question, VclButtonsType::OkCancel)->Execute() == RET_OK)
pLine->m_aTypeBox->SelectEntryPos( m_aTypeBox->GetEntryPos( reinterpret_cast<void*>(CUSTOM_TYPE_TEXT) ) );
else
pLine->m_aValueEdit->GrabFocus();
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
index 903a9342e9a0..11f58bb798ee 100644
--- a/sfx2/source/dialog/newstyle.cxx
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -59,7 +59,7 @@ IMPL_LINK( SfxNewStyleDlg, ModifyHdl, Edit&, rBox, void )
SfxNewStyleDlg::SfxNewStyleDlg( vcl::Window* pParent, SfxStyleSheetBasePool& rInPool )
: ModalDialog(pParent, "CreateStyleDialog", "sfx/ui/newstyle.ui")
, aQueryOverwriteBox(VclPtr<MessageDialog>::Create(this, SfxResId(STR_QUERY_OVERWRITE),
- VclMessageType::Question, VCL_BUTTONS_YES_NO))
+ VclMessageType::Question, VclButtonsType::YesNo))
, rPool(rInPool)
{
get(m_pColBox, "stylename");
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index fb562750e857..8e5f32ea26a5 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1888,10 +1888,10 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl()
{
#if defined UNX
ScopedVclPtrInstance<MessageDialog> aBox(SfxGetpApp()->GetTopWindow(), aMsg,
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
#else
ScopedVclPtrInstance<MessageDialog> aBox(GetWindow(), aMsg,
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
#endif
aApproved = aBox->Execute() == RET_YES;
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index a2053b41e1c1..4077a2ab60f9 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -653,7 +653,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
// notify the user that SaveAs is going to be done
vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
ScopedVclPtrInstance<MessageDialog> aMessageBox(pWin, SfxResId(STR_NEW_FILENAME_SAVE),
- VclMessageType::Question, VCL_BUTTONS_OK_CANCEL);
+ VclMessageType::Question, VclButtonsType::OkCancel);
if ( aMessageBox->Execute() == RET_OK )
nResult = STATUS_SAVEAS;
else
@@ -1399,7 +1399,7 @@ bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xMo
|| SignatureState::PARTIAL_OK == nDocumentSignatureState)
{
if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_LOSINGSIGNATURE),
- VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() != RET_YES)
+ VclMessageType::Question, VclButtonsType::YesNo)->Execute() != RET_YES)
{
// the user has decided not to store the document
throw task::ErrorCodeIOException(
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 82b94fd0b467..0d5dcfa84183 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -839,7 +839,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
case SID_CANCELCHECKOUT:
{
- if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
+ if (ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_QUERY_CANCELCHECKOUT), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
{
CancelCheckOut( );
@@ -1378,8 +1378,8 @@ void SfxObjectShell::ImplSign( bool bScriptingContent )
if ( nVersion >= SvtSaveOptions::ODFVER_012 )
{
- if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES)
- || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() == RET_YES) )
+ if ( (bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES)
+ || (!bHasSign && ScopedVclPtrInstance<MessageDialog>(nullptr, SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN), VclMessageType::Question, VclButtonsType::YesNo)->Execute() == RET_YES) )
{
sal_uInt16 nId = SID_SAVEDOC;
if ( !GetMedium() || GetMedium()->GetName().isEmpty() )
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx b/sfx2/source/doc/saveastemplatedlg.cxx
index a4c0db6f0628..1aadfebc781a 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -78,7 +78,7 @@ void SfxSaveAsTemplateDialog::setDocumentModel(const uno::Reference<frame::XMode
IMPL_LINK_NOARG(SfxSaveAsTemplateDialog, OkClickHdl, Button*, void)
{
- ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ ScopedVclPtrInstance< MessageDialog > aQueryDlg(this, OUString(), VclMessageType::Question, VclButtonsType::YesNo);
if(!IsTemplateNameUnique())
{
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 63056eb7254a..3b35ed496e45 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1172,7 +1172,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
OUString sCategory = aDlg->GetSelectedCategory();
aDlg.disposeAndClear();
ScopedVclPtrInstance< MessageDialog > popupDlg(this, SfxResId(STR_QMSG_SEL_FOLDER_DELETE),
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
if ( popupDlg->Execute() != RET_YES )
return;
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index c0e4c13f94bb..6e35adef40c1 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -462,7 +462,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
// css::sdbcx::User offering to open it as a template
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
if ( RET_YES == aBox->Execute() )
{
SfxApplication* pApp = SfxGetpApp();
@@ -545,7 +545,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
{
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_LASTVERSION),
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
bDo = ( RET_YES == aBox->Execute() );
}
@@ -721,7 +721,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
{
// ask user for opening as template
ScopedVclPtrInstance<MessageDialog> aBox(&GetWindow(), SfxResId(STR_QUERY_OPENASTEMPLATE),
- VclMessageType::Question, VCL_BUTTONS_YES_NO);
+ VclMessageType::Question, VclButtonsType::YesNo);
if ( RET_YES == aBox->Execute() )
{
SfxAllItemSet aSet( pApp->GetPool() );
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index f9d6c9a99044..dfe49c1e4855 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -511,7 +511,7 @@ void SfxViewShell::SetPrinter_Impl( VclPtr<SfxPrinter>& pNewPrinter )
// Ask if possible, if page format should be taken over from printer.
if ( ( bOriChg || bPgSzChg ) &&
- RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VCL_BUTTONS_YES_NO)->Execute() )
+ RET_YES == ScopedVclPtrInstance<MessageDialog>(nullptr, aMsg, VclMessageType::Question, VclButtonsType::YesNo)->Execute() )
{
// Flags with changes for <SetPrinter(SfxPrinter*)> are maintained
nChangedFlags |= nNewOpt;