summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dochdl
diff options
context:
space:
mode:
authorPhilippe Jung <phil.jung@free.fr>2015-05-26 16:26:35 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-28 08:44:31 +0000
commit1379e2feaad6344999358bbfb271edbaea66ce2a (patch)
treef2d15c298b21e8aa83ec4bbc025ca0561896906e /sw/source/uibase/dochdl
parentf9e0e3a4eb8a23bfb9fb66055511c53d120e6579 (diff)
Rewrite all calls like Dialog(params).Execute()
Replace all calls looking like ADialog(some params).Execute() by ScopedVclPtrInstance<ADialog>::Create(some parms)->Execute() Change-Id: I0b6f0a9ea5ef0a749ffa30ce131e9dc989604639 Reviewed-on: https://gerrit.libreoffice.org/15915 Tested-by: Jenkins <ci@libreoffice.org> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sw/source/uibase/dochdl')
-rw-r--r--sw/source/uibase/dochdl/gloshdl.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx
index fbd4f6d92332..844f6b6ab6af 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -327,7 +327,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, const OUString& rShortNam
rCfg.IsSaveRelFile(), pOnlyText );
if(nSuccess == (sal_uInt16) -1 )
{
- MessageDialog(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(pWrtShell->GetView().GetWindow(), SW_RES(STR_ERR_INSERT_GLOS), VCL_MESSAGE_INFO)->Execute();
}
if( !pCurGrp )
delete pTmp;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 9178fd23692d..5e00968a0de9 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1717,7 +1717,7 @@ bool SwTransferable::_PasteFileContent( TransferableDataHelper& rData,
if( bMsg && nResId )
{
- MessageDialog( 0, SW_RES( nResId ), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES( nResId ), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}
@@ -1793,7 +1793,7 @@ bool SwTransferable::_PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
if( !IsError( aReader.Read( *pRead )) )
nRet = true;
else if( bMsg )
- MessageDialog( 0, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO ).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_ERROR_CLPBRD_READ), VCL_MESSAGE_INFO )->Execute();
}
else
{
@@ -2172,7 +2172,7 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
if( !nRows || !nCols )
{
if( bMsg )
- MessageDialog(0, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute();
pDDETyp = 0;
break;
}
@@ -2717,7 +2717,7 @@ bool SwTransferable::_PasteDBData( TransferableDataHelper& rData,
}
else if( bMsg )
{
- MessageDialog( 0, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}
@@ -2756,7 +2756,7 @@ bool SwTransferable::_PasteFileList( TransferableDataHelper& rData,
}
else if( bMsg )
{
- MessageDialog( 0, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO).Execute();
+ ScopedVclPtrInstance<MessageDialog>::Create( nullptr, SW_RES(STR_CLPBRD_FORMAT_ERROR), VCL_MESSAGE_INFO)->Execute();
}
return nRet;
}