summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-01 09:27:07 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:40:40 +0100
commit4ff758fea152d6de492d472fba1f889592a3f696 (patch)
tree673296a7e7baed667ff66a1262978a66853debf4
parent8a65284fe31e6c0a927cb88b75df7845cd248572 (diff)
Manual cleanup of misc. issues.
Change-Id: Ib0b9b17010f7c1b0814b48f6fb0144e5296418df
-rw-r--r--cppcanvas/qa/unit/test.cxx2
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--framework/source/services/autorecovery.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx7
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
-rw-r--r--sd/source/ui/view/Outliner.cxx8
-rw-r--r--svx/source/form/fmshell.cxx5
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/toolbars/fontworkbar.cxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx8
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx2
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx2
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx3
16 files changed, 33 insertions, 28 deletions
diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx
index fa7b21e2ceaa..6b909e058a44 100644
--- a/cppcanvas/qa/unit/test.cxx
+++ b/cppcanvas/qa/unit/test.cxx
@@ -43,7 +43,7 @@ public:
void CanvasTest::testComposite()
{
#ifdef LINUX
- VclPtrInstance<WorkWindow> pWin( nullptr );
+ VclPtrInstance<WorkWindow> pWin( nullptr, WB_STDWORK );
uno::Reference<rendering::XCanvas> xCanvas = pWin->GetCanvas ();
if( !xCanvas.is() )
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8de41a4531d5..05c5b5596860 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2563,8 +2563,8 @@ IMPL_LINK( SvxMenuConfigPage, NewMenuHdl, Button *, pButton )
{
(void)pButton;
- VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog( nullptr,
- GetSaveInData()->GetEntries(), NULL, true );
+ VclPtrInstance<SvxMainMenuOrganizerDialog> pDialog(
+ nullptr, GetSaveInData()->GetEntries(), nullptr, true );
if ( pDialog->Execute() == RET_OK )
{
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e5dd36af5983..b44242d3a4cb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -606,7 +606,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
#ifndef IOS
InitSvpForLibreOfficeKit();
- ScopedVclPtrInstance< VirtualDevice > pDevice(0, Size(1, 1), (sal_uInt16)32) ;
+ ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)32) ;
boost::shared_array< sal_uInt8 > aBuffer( pBuffer, NoDelete< sal_uInt8 >() );
pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(),
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 5ead4fc1900e..597375082a21 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -4206,7 +4206,7 @@ void AutoRecovery::impl_showFullDiscError()
sBackupPath = sBackupURL;
ScopedVclPtrInstance<ErrorBox> dlgError(
- 0, WB_OK,
+ nullptr, WB_OK,
sMsg.replaceAll("%PATH", sBackupPath));
dlgError->SetButtonText(dlgError->GetButtonId(0), sBtn);
dlgError->Execute();
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7ba2540ff9d4..10a51a06c22f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2480,9 +2480,10 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
}
{ // want the dialog to be destroyed before our set
- ScopedVclPtr<ORptPageDialog> aDlg(getView(), pDescriptor.get(),_xSection.is()
- ? OUString("BackgroundDialog")
- : OUString("PageDialog"));
+ ScopedVclPtrInstance<ORptPageDialog> aDlg(
+ getView(), pDescriptor.get(),_xSection.is()
+ ? OUString("BackgroundDialog")
+ : OUString("PageDialog"));
if (RET_OK == aDlg->Execute())
{
diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index da874ef34a41..98846c9d336c 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -217,7 +217,7 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl)
sal_uInt16 nId = 1;
ScModule* pScMod = SC_MOD();
pScMod->SetRefDialog( nId, true );
- VclPtrInstance<ScCondFormatDlg> pDlg(this, mpDoc, NULL, ScRangeList(),
+ VclPtrInstance<ScCondFormatDlg> pDlg(this, mpDoc, nullptr, ScRangeList(),
maPos, condformat::dialog::CONDITION);
Show(false, 0);
if(pDlg->Execute() == RET_OK)
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 714919b71c97..69d725a66e1f 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -924,7 +924,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
bool bContinue = true;
if ( HasName() )
{
- ScopedVclPtrInstance<QueryBox> aBox(new QueryBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<QueryBox> aBox(
+ GetActiveDialogParent(),
+ WinBits( WB_YES_NO | WB_DEF_YES ),
ScGlobal::GetRscString( STR_DOC_WILLBESAVED ) );
if ( aBox->Execute() == RET_NO )
{
@@ -1021,7 +1023,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else
{
- ScopedVclPtrInstance<WarningBox> aBox(new WarningBox( GetActiveDialogParent(), WinBits( WB_YES_NO | WB_DEF_YES ),
+ ScopedVclPtrInstance<WarningBox> aBox(
+ GetActiveDialogParent(),
+ WinBits( WB_YES_NO | WB_DEF_YES ),
ScGlobal::GetRscString( STR_DOC_DISABLESHARED ) );
if ( aBox->Execute() == RET_YES )
{
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 7dfde4e00329..ce5ab7a658dd 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1110,9 +1110,7 @@ bool Outliner::ShowWrapArroundDialog (void)
// Pop up question box that asks the user whether to wrap around.
// The dialog is made modal with respect to the whole application.
ScopedVclPtrInstance<QueryBox> aQuestionBox (
- NULL,
- WB_YES_NO | WB_DEF_YES,
- SD_RESSTR(nStringId));
+ nullptr, WB_YES_NO | WB_DEF_YES, SD_RESSTR(nStringId));
aQuestionBox->SetImage (QueryBox::GetStandardImage());
sal_uInt16 nBoxResult = ShowModalMessageBox(*aQuestionBox.get());
bDoWrapArround = (nBoxResult == RET_YES);
@@ -1157,8 +1155,8 @@ void Outliner::PrepareSpellCheck (void)
{
mbError = true;
mbEndOfSearch = true;
- ScopedVclPtrInstance<MessageDialog> aErrorBox (nullptr
- SD_RESSTR(STR_NOLANGUAGE));
+ ScopedVclPtrInstance<MessageDialog> aErrorBox (
+ nullptr, SD_RESSTR(STR_NOLANGUAGE));
ShowModalMessageBox (*aErrorBox.get());
}
else if (eState != EE_SPELL_OK)
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 69514c7d37a9..c4714155e1a2 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -269,8 +269,9 @@ bool FmFormShell::PrepareClose(bool bUI)
if ( bModified && bUI )
{
- ScopedVclPtr<MessageDialog> aQry(nullptr, "SaveModifiedDialog",
- "svx/ui/savemodifieddialog.ui");
+ ScopedVclPtrInstance<MessageDialog> aQry(
+ nullptr, "SaveModifiedDialog",
+ "svx/ui/savemodifieddialog.ui");
switch (aQry->Execute())
{
case RET_NO:
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index bde80c43b67d..912b8d8fa357 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -583,7 +583,7 @@ void ExtrusionBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rB
double fDepth = static_cast<const SvxDoubleItem*>(rReq.GetArgs()->GetItem(SID_EXTRUSION_DEPTH))->GetValue();
FieldUnit eUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(rReq.GetArgs()->GetItem(SID_ATTR_METRIC))->GetValue();
- ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(0L, fDepth, eUnit);
+ ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(nullptr, fDepth, eUnit);
sal_uInt16 nRet = aDlg->Execute();
if( nRet != 0 )
{
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index 575cdc81d5d1..72b2661cfd73 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -491,7 +491,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
if( rReq.GetArgs() && ( rReq.GetArgs()->GetItemState( SID_FONTWORK_CHARACTER_SPACING ) == SfxItemState::SET ) )
{
sal_Int32 nCharSpacing = static_cast<const SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_CHARACTER_SPACING))->GetValue();
- ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( 0L, nCharSpacing );
+ ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( nullptr, nCharSpacing );
sal_uInt16 nRet = aDlg->Execute();
if( nRet != 0 )
{
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a274cbd426c7..be99a7ddacc5 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1478,11 +1478,11 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
{
- VclPtr<SwAddStylesDlg_Impl> pDlg(pButton,
- static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
- aStyleArr);
+ ScopedVclPtrInstance<SwAddStylesDlg_Impl> pDlg(
+ pButton, static_cast<SwMultiTOXTabDialog*>(GetTabDialog())->GetWrtShell(),
+ aStyleArr);
pDlg->Execute();
- pDlg.reset();
+ pDlg.disposeAndClear();
ModifyHdl(0);
return 0;
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 83640f5e6e17..492472e62806 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -356,7 +356,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
{
case SID_STYLE_NEW_BY_EXAMPLE:
{
- VclPtrInstance<SfxNewStyleDlg> pDlg( 0, *GetStyleSheetPool());
+ VclPtrInstance<SfxNewStyleDlg> pDlg( nullptr, *GetStyleSheetPool());
if(RET_OK == pDlg->Execute())
{
aParam = pDlg->GetName();
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index f6924e73b40a..53980635be55 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -158,7 +158,7 @@ bool SwGlossaryList::GetShortName(const OUString& rLongName,
}
else if(1 < nCount)
{
- ScopedVclPtrInstance< SwGlossDecideDlg > aDlg(0);
+ ScopedVclPtrInstance< SwGlossDecideDlg > aDlg(nullptr);
OUString sTitle = aDlg->GetText() + " " + aTripleStrings.front().sBlock;
aDlg->SetText(sTitle);
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 54c671294cc0..b60e592a0bd1 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -119,7 +119,7 @@ throw (RuntimeException, std::exception)
int unsuccessfulAttempts = 0;
while (true)
{
- ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(0);
+ ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(nullptr);
aPasswdDlg->SetMinLen(0);
if (!aPasswdDlg->Execute())
return false;
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 57c338dfe81a..287b5cf50125 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -223,7 +223,8 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
{
bool bChanges = false;
ScopedVclPtrInstance<DigitalSignaturesDialog> aSignaturesDialog(
- NULL, mxCtx, eMode, bReadOnly, m_sODFVersion, m_bHasDocumentSignature);
+ nullptr, mxCtx, eMode, bReadOnly, m_sODFVersion,
+ m_bHasDocumentSignature);
bool bInit = aSignaturesDialog->Init();
DBG_ASSERT( bInit, "Error initializing security context!" );
if ( bInit )