summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/dialog/_contdlg.cxx10
-rw-r--r--svx/source/dialog/dlgctrl.cxx8
-rw-r--r--svx/source/dialog/docrecovery.cxx8
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/dialog/svxruler.cxx2
-rw-r--r--svx/source/form/databaselocationinput.cxx2
-rw-r--r--svx/source/form/datanavi.cxx42
-rw-r--r--svx/source/gallery2/galobj.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx2
-rw-r--r--svx/source/svdraw/svdotext.cxx2
-rw-r--r--svx/source/svdraw/svdtrans.cxx4
-rw-r--r--svx/source/svdraw/svdxcgv.cxx4
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx2
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/linectrl.cxx2
-rw-r--r--svx/source/toolbars/extrusionbar.cxx2
-rw-r--r--svx/source/toolbars/fontworkbar.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx4
24 files changed, 61 insertions, 61 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 1b69bc730d35..7e033863237f 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -165,7 +165,7 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape,
aFont.SetOrientation( 0 );
// initializing virtual device
- ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice( 1 ) );
+ ScopedVclPtrInstance< VirtualDevice > pVirDev( 1 );
pVirDev->SetMapMode( MAP_100TH_MM );
pVirDev->SetFont( aFont );
@@ -259,7 +259,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
aFont.SetWeight( rWeightItem.GetWeight() );
// initializing virtual device
- ScopedVclPtr<VirtualDevice> pVirDev( new VirtualDevice( 1 ) );
+ ScopedVclPtrInstance< VirtualDevice > pVirDev( 1 );
pVirDev->SetMapMode( MAP_100TH_MM );
pVirDev->SetFont( aFont );
pVirDev->EnableRTL( true );
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index bb95f7eea8a5..fce58061722b 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1006,7 +1006,7 @@ Animation SvxBmpMask::ImpReplaceTransparency( const Animation& rAnim, const Colo
GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const Color& rColor )
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
GDIMetaFile aMtf;
const MapMode& rPrefMap = rMtf.GetPrefMapMode();
const Size& rPrefSize = rMtf.GetPrefSize();
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index ba659b0c2bed..ce3e70bb1aae 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -113,7 +113,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
{
if( rGraphic.IsAnimated() )
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
MapMode aTransMap;
const Animation aAnim( rGraphic.GetAnimation() );
const Size& rSizePix = aAnim.GetDisplaySizePixel();
@@ -152,7 +152,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
else if( rGraphic.GetType() != GRAPHIC_NONE )
{
const Graphic aTmpGrf( rGraphic.GetGDIMetaFile().GetMonochromeMtf( Color( COL_BLACK ) ) );
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
Size aSizePix( pVDev->LogicToPixel( aTmpGrf.GetPrefSize(), aTmpGrf.GetPrefMapMode() ) );
if( aSizePix.Width() && aSizePix.Height() && ( aSizePix.Width() > 512 || aSizePix.Height() > 512 ) )
@@ -314,7 +314,7 @@ bool SvxSuperContourDlg::Close()
if (m_pTbx1->IsItemEnabled(mnApplyId))
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui") );
+ ScopedVclPtrInstance< MessageDialog > aQBox( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui");
const long nRet = aQBox->Execute();
if ( nRet == RET_YES )
@@ -446,7 +446,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
{
if (m_pTbx1->IsItemChecked(mnWorkSpaceId))
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui" ));
+ ScopedVclPtrInstance< MessageDialog > aQBox( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui" );
if ( !m_pContourWnd->IsContourChanged() || ( aQBox->Execute() == RET_YES ) )
m_pContourWnd->SetWorkplaceMode( true );
@@ -713,7 +713,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd )
if( !!aMask )
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui" ));
+ ScopedVclPtrInstance< MessageDialog > aQBox( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui" );
bool bNewContour;
aRedoGraphic = Graphic();
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 95584d7ac674..88baa47cb942 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1439,7 +1439,7 @@ namespace
{
if(!rBitmapEx.IsEmpty() && rSize.Width() > 0 && rSize.Height() > 0)
{
- ScopedVclPtr<VirtualDevice> pVirtualDevice( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVirtualDevice;
pVirtualDevice->SetOutputSizePixel(rSize);
if(rBitmapEx.IsTransparent())
@@ -1710,7 +1710,7 @@ void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart )
return;
long nCount = pList->Count();
- ScopedVclPtrInstance<VirtualDevice> pVD;
+ ScopedVclPtrInstance< VirtualDevice > pVD;
SetUpdateMode( false );
for( long i = 0; i < nCount; i++ )
@@ -1740,7 +1740,7 @@ void LineEndLB::Append( const XLineEndEntry& rEntry, const Bitmap& rBitmap, bool
{
if(!rBitmap.IsEmpty())
{
- ScopedVclPtr<VirtualDevice> pVD( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVD;
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
@@ -1765,7 +1765,7 @@ void LineEndLB::Modify( const XLineEndEntry& rEntry, sal_Int32 nPos, const Bitma
if(!rBitmap.IsEmpty())
{
- ScopedVclPtr<VirtualDevice> pVD( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVD;
const Size aBmpSize(rBitmap.GetSizePixel());
pVD->SetOutputSizePixel(aBmpSize, false);
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 43eafbeb7698..ed4522f306a7 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -682,7 +682,7 @@ void SaveDialog::dispose()
IMPL_LINK_NOARG(SaveDialog, OKButtonHdl)
{
// start crash-save with progress
- ScopedVclPtr<SaveProgressDialog> pProgress(new SaveProgressDialog(this, m_pCore));
+ ScopedVclPtrInstance< SaveProgressDialog > pProgress(this, m_pCore);
short nResult = pProgress->Execute();
pProgress.reset();
@@ -855,7 +855,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
short impl_askUserForWizardCancel(vcl::Window* pParent, sal_Int16 nRes)
{
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQuery(pParent, SVX_RES(nRes), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
if (aQuery->Execute() == RET_YES)
return DLG_RET_OK;
else
@@ -988,7 +988,7 @@ short RecoveryDialog::execute()
// failed recovery documents. They must be saved to
// a user selected directrory.
short nRet = DLG_RET_UNKNOWN;
- ScopedVclPtr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
+ ScopedVclPtrInstance< BrokenRecoveryDialog > pBrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted);
OUString sSaveDir = pBrokenRecoveryDialog->getSaveDirURL(); // get the default dir
if (pBrokenRecoveryDialog->isExecutionNeeded())
{
@@ -1057,7 +1057,7 @@ short RecoveryDialog::execute()
// If no temp files exists or user decided to ignore it ...
// we have to remove all recovery/session data anyway!
short nRet = DLG_RET_UNKNOWN;
- ScopedVclPtr<BrokenRecoveryDialog> pBrokenRecoveryDialog(new BrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted));
+ ScopedVclPtrInstance< BrokenRecoveryDialog > pBrokenRecoveryDialog(this, m_pCore, !m_bWasRecoveryStarted);
OUString sSaveDir = pBrokenRecoveryDialog->getSaveDirURL(); // get the default save location
// dialog itself checks if there is a need to copy files for this mode.
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 7378ea95d466..d99bb6818c8d 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -242,7 +242,7 @@ bool SvxIMapDlg::Close()
if ( m_pTbxIMapDlg1->IsItemEnabled( mnApplyId ) )
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this,"QueryModifyImageMapChangesDialog","svx/ui/querymodifyimagemapchangesdialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQBox(this,"QueryModifyImageMapChangesDialog","svx/ui/querymodifyimagemapchangesdialog.ui");
const long nRet = aQBox->Execute();
if( nRet == RET_YES )
@@ -256,7 +256,7 @@ bool SvxIMapDlg::Close()
}
else if( pIMapWnd->IsChanged() )
{
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this,"QuerySaveImageMapChangesDialog","svx/ui/querysaveimagemapchangesdialog.ui"));
+ ScopedVclPtrInstance< MessageDialog > aQBox(this,"QuerySaveImageMapChangesDialog","svx/ui/querysaveimagemapchangesdialog.ui");
const long nRet = aQBox->Execute();
if( nRet == RET_YES )
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 6930ee9327ce..94ccd8cfc576 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3457,7 +3457,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
{
PopupMenu aMenu;
aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect));
- ScopedVclPtrInstance<VirtualDevice()
+ ScopedVclPtrInstance< VirtualDevice > pDev;
const Size aSz(ruler_tab_svx.width + 2, ruler_tab_svx.height + 2);
pDev->SetOutputSize(aSz);
pDev->SetBackground(Wallpaper(Color(COL_WHITE)));
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index a5df5977bbe9..b7069a27b317 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -128,7 +128,7 @@ namespace svx
{
if ( ::utl::UCBContentHelper::Exists( sURL ) )
{
- ScopedVclPtr<QueryBox> aBox(new QueryBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SVX_RESSTR(RID_STR_ALREADYEXISTOVERWRITE) ) );
+ ScopedVclPtrInstance< QueryBox > aBox( m_rLocationInput.GetSystemWindow(), WB_YES_NO, SVX_RESSTR(RID_STR_ALREADYEXISTOVERWRITE) );
if ( aBox->Execute() != RET_YES )
return false;
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index ea4f4c6ad6b1..7a7229f9b499 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -483,7 +483,7 @@ namespace svxform
DBG_ASSERT( xModel.is(), "XFormsPage::DoToolBoxAction(): Action without model" );
if ( DGTSubmission == m_eGroup )
{
- ScopedVclPtr<AddSubmissionDialog> aDlg(new AddSubmissionDialog( this, NULL, m_xUIHelper ));
+ ScopedVclPtrInstance< AddSubmissionDialog > aDlg( this, nullptr, m_xUIHelper );
if ( aDlg->Execute() == RET_OK && aDlg->GetNewSubmission().is() )
{
try
@@ -515,7 +515,7 @@ namespace svxform
{
if ( !m_sInstanceURL.isEmpty() )
{
- ScopedVclPtr<LinkedInstanceWarningBox> aMsgBox(new LinkedInstanceWarningBox( this ));
+ ScopedVclPtrInstance< LinkedInstanceWarningBox > aMsgBox( this );
if ( aMsgBox->Execute() != RET_OK )
return bHandled;
}
@@ -610,7 +610,7 @@ namespace svxform
}
}
- ScopedVclPtr<AddDataItemDialog> aDlg(new AddDataItemDialog( this, pNode, m_xUIHelper ));
+ ScopedVclPtrInstance< AddDataItemDialog > aDlg( this, pNode, m_xUIHelper );
aDlg->SetText( SVX_RESSTR( nResId ) );
aDlg->InitText( eType );
short nReturn = aDlg->Execute();
@@ -678,12 +678,12 @@ namespace svxform
{
if ( DGTInstance == m_eGroup && !m_sInstanceURL.isEmpty() )
{
- ScopedVclPtr<LinkedInstanceWarningBox> aMsgBox(new LinkedInstanceWarningBox( this ));
+ ScopedVclPtrInstance< LinkedInstanceWarningBox > aMsgBox( this );
if ( aMsgBox->Execute() != RET_OK )
return bHandled;
}
- ScopedVclPtr<AddDataItemDialog> aDlg(new AddDataItemDialog( this, pNode, m_xUIHelper ));
+ ScopedVclPtrInstance< AddDataItemDialog > aDlg( this, pNode, m_xUIHelper );
DataItemType eType = DITElement;
sal_uInt16 nResId = RID_STR_DATANAV_EDIT_ELEMENT;
if ( pNode && pNode->m_xNode.is() )
@@ -749,7 +749,7 @@ namespace svxform
}
else
{
- ScopedVclPtr<AddSubmissionDialog> aDlg(new AddSubmissionDialog( this, pNode, m_xUIHelper ));
+ ScopedVclPtrInstance< AddSubmissionDialog > aDlg( this, pNode, m_xUIHelper );
aDlg->SetText( SVX_RESSTR( RID_STR_DATANAV_EDIT_SUBMISSION ) );
if ( aDlg->Execute() == RET_OK )
{
@@ -764,7 +764,7 @@ namespace svxform
bHandled = true;
if ( DGTInstance == m_eGroup && !m_sInstanceURL.isEmpty() )
{
- ScopedVclPtr<LinkedInstanceWarningBox> aMsgBox(new LinkedInstanceWarningBox( this ));
+ ScopedVclPtrInstance< LinkedInstanceWarningBox > aMsgBox( this );
if ( aMsgBox->Execute() != RET_OK )
return bHandled;
}
@@ -956,7 +956,7 @@ namespace svxform
bool bIsElement = ( eChildType == css::xml::dom::NodeType_ELEMENT_NODE );
sal_uInt16 nResId = bIsElement ? RID_STR_QRY_REMOVE_ELEMENT : RID_STR_QRY_REMOVE_ATTRIBUTE;
OUString sVar = bIsElement ? OUString(ELEMENTNAME) : OUString(ATTRIBUTENAME);
- ScopedVclPtr<MessageDialog> aQBox(new MessageDialog(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance< MessageDialog > aQBox(this, SVX_RES(nResId), VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
OUString sMessText = aQBox->get_primary_text();
sMessText = sMessText.replaceFirst(
sVar, m_xUIHelper->getNodeDisplayName( pNode->m_xNode, sal_False ) );
@@ -1496,7 +1496,7 @@ namespace svxform
OString sIdent(pBtn->GetCurItemIdent());
if (sIdent == "modelsadd")
{
- ScopedVclPtr<AddModelDialog> aDlg(new AddModelDialog( this, false ));
+ ScopedVclPtrInstance< AddModelDialog > aDlg( this, false );
bool bShowDialog = true;
while ( bShowDialog )
{
@@ -1509,7 +1509,7 @@ namespace svxform
if ( m_pModelsBox->GetEntryPos( sNewName ) != LISTBOX_ENTRY_NOTFOUND )
{
// error: model name already exists
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, SVX_RES( RID_STR_DOUBLE_MODELNAME ) ));
+ ScopedVclPtrInstance< MessageDialog > aErrBox( this, SVX_RES( RID_STR_DOUBLE_MODELNAME ) );
aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName));
aErrBox->Execute();
bShowDialog = true;
@@ -1542,7 +1542,7 @@ namespace svxform
}
else if (sIdent == "modelsedit")
{
- ScopedVclPtr<AddModelDialog> aDlg(new AddModelDialog( this, true ));
+ ScopedVclPtrInstance< AddModelDialog > aDlg( this, true );
aDlg->SetName( sSelectedModel );
bool bDocumentData( false );
@@ -1637,7 +1637,7 @@ namespace svxform
OString sIdent(pBtn->GetCurItemIdent());
if (sIdent == "instancesadd")
{
- ScopedVclPtr<AddInstanceDialog> aDlg(new AddInstanceDialog( this, false ));
+ ScopedVclPtrInstance< AddInstanceDialog > aDlg( this, false );
if ( aDlg->Execute() == RET_OK )
{
sal_uInt16 nInst = GetNewPageId();
@@ -1669,7 +1669,7 @@ namespace svxform
XFormsPage* pPage = GetCurrentPage( nId );
if ( pPage )
{
- ScopedVclPtr<AddInstanceDialog> aDlg(new AddInstanceDialog( this, true ));
+ ScopedVclPtrInstance< AddInstanceDialog > aDlg( this, true );
aDlg->SetName( pPage->GetInstanceName() );
aDlg->SetURL( pPage->GetInstanceURL() );
aDlg->SetLinkInstance( pPage->GetLinkOnce() );
@@ -2405,7 +2405,7 @@ namespace svxform
sPropName = PN_READONLY_EXPR;
else if (m_pCalculateBtn == pBtn)
sPropName = PN_CALCULATE_EXPR;
- ScopedVclPtr<AddConditionDialog> aDlg(new AddConditionDialog(this, sPropName, m_xTempBinding));
+ ScopedVclPtrInstance< AddConditionDialog > aDlg(this, sPropName, m_xTempBinding);
bool bIsDefBtn = ( m_pDefaultBtn == pBtn );
OUString sCondition;
if ( bIsDefBtn )
@@ -2479,7 +2479,7 @@ namespace svxform
( bIsHandleBinding && sNewName.isEmpty() ) )
{
// Error and don't close the dialog
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog( this, SVX_RES( RID_STR_INVALID_XMLNAME ) ) );
+ ScopedVclPtrInstance< MessageDialog > aErrBox( this, SVX_RES( RID_STR_INVALID_XMLNAME ) );
aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sNewName));
aErrBox->Execute();
return 0;
@@ -2845,7 +2845,7 @@ namespace svxform
{
SAL_WARN( "svx.form", "AddDataItemDialog::EditHdl(): exception caught" );
}
- ScopedVclPtr<NamespaceItemDialog> aDlg(new NamespaceItemDialog( this, xNameContnr ) );
+ ScopedVclPtrInstance< NamespaceItemDialog > aDlg( this, xNameContnr );
aDlg->Execute();
try
{
@@ -2975,7 +2975,7 @@ namespace svxform
{
if ( m_pAddNamespaceBtn == pBtn )
{
- ScopedVclPtr<ManageNamespaceDialog> aDlg( new ManageNamespaceDialog(this, m_pConditionDlg, false) );
+ ScopedVclPtrInstance< ManageNamespaceDialog > aDlg(this, m_pConditionDlg, false);
if ( aDlg->Execute() == RET_OK )
{
OUString sEntry = aDlg->GetPrefix();
@@ -2986,7 +2986,7 @@ namespace svxform
}
else if ( m_pEditNamespaceBtn == pBtn )
{
- ScopedVclPtr<ManageNamespaceDialog> aDlg(new ManageNamespaceDialog( this, m_pConditionDlg, true ));
+ ScopedVclPtrInstance< ManageNamespaceDialog > aDlg( this, m_pConditionDlg, true );
SvTreeListEntry* pEntry = m_pNamespacesList->FirstSelected();
DBG_ASSERT( pEntry, "NamespaceItemDialog::ClickHdl(): no entry" );
OUString sPrefix( SvTabListBox::GetEntryText( pEntry, 0 ) );
@@ -3120,7 +3120,7 @@ namespace svxform
{
if ( !m_pConditionDlg->GetUIHelper()->isValidPrefixName( sPrefix ) )
{
- ScopedVclPtr<MessageDialog> aErrBox(new MessageDialog(this, SVX_RES( RID_STR_INVALID_XMLPREFIX ) ) );
+ ScopedVclPtrInstance< MessageDialog > aErrBox(this, SVX_RES( RID_STR_INVALID_XMLPREFIX ) );
aErrBox->set_primary_text(aErrBox->get_primary_text().replaceFirst(MSG_VARIABLE, sPrefix));
aErrBox->Execute();
return 0;
@@ -3183,7 +3183,7 @@ namespace svxform
IMPL_LINK_NOARG(AddSubmissionDialog, RefHdl)
{
- ScopedVclPtr<AddConditionDialog> aDlg(new AddConditionDialog(this, PN_BINDING_EXPR, m_xTempBinding ));
+ ScopedVclPtrInstance< AddConditionDialog > aDlg(this, PN_BINDING_EXPR, m_xTempBinding );
aDlg->SetCondition( m_pRefED->GetText() );
if ( aDlg->Execute() == RET_OK )
m_pRefED->SetText( aDlg->GetCondition() );
@@ -3197,7 +3197,7 @@ namespace svxform
OUString sName(m_pNameED->GetText());
if(sName.isEmpty()) {
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(this,SVX_RES(RID_STR_EMPTY_SUBMISSIONNAME)));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(this,SVX_RES(RID_STR_EMPTY_SUBMISSIONNAME));
aErrorBox->set_primary_text( Application::GetDisplayName() );
aErrorBox->Execute();
return 0;
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 73e9b377d557..3565465e47c1 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -484,7 +484,7 @@ bool SgaObjectSvDraw::CreateThumb( const FmFormModel& rModel )
if(aObjRect.GetWidth() && aObjRect.GetHeight())
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
FmFormView aView(const_cast< FmFormModel* >(&rModel), pVDev);
aView.ShowSdrPage(const_cast< FmFormPage* >(pPage));
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 902438338f9b..69f3771eda3b 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -808,7 +808,7 @@ bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgre
bRet = true;
else
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode( MapMode( MAP_100TH_MM ) );
FmFormView aView( aModel.GetModel(), pVDev );
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 7577db59558c..f9bdc1fd6474 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1558,7 +1558,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaFloatTransparentAction& rAct)
else
{
// gradient transparence
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetOutputSizePixel(aBitmapEx.GetBitmap().GetSizePixel());
pVDev->DrawGradient(Rectangle(Point(0, 0), pVDev->GetOutputSizePixel()), rGradient);
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 4244aa2747c1..a0c519d97555 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1026,7 +1026,7 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
if(isEmbeddedSvg() && GetModel())
{
- ScopedVclPtr<VirtualDevice> pOut( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pOut;
const Rectangle aBoundRect(GetCurrentBoundRect());
const MapMode aMap(GetModel()->GetScaleUnit(), Point(), GetModel()->GetScaleFraction(), GetModel()->GetScaleFraction());
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 61a9fb2a7792..4f5dc1510a67 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1877,7 +1877,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle(
// create the MetaFile
pRetval = new GDIMetaFile;
- ScopedVclPtr<VirtualDevice> pBlackHole(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pBlackHole;
pBlackHole->EnableOutput(false);
pRetval->Record(pBlackHole);
Point aPaintPos = aPaintRect.TopLeft();
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index d9ffbdac1849..488d6c66d601 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -634,13 +634,13 @@ FrPair GetInchOrMM(MapUnit eU)
case MAP_MM : return FrPair( 1,1);
case MAP_CM : return FrPair( 1,10);
case MAP_PIXEL : {
- ScopedVclPtr<VirtualDevice> pVD( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetMapMode(MapMode(MAP_100TH_MM));
Point aP(pVD->PixelToLogic(Point(64,64))); // 64 pixels for more accuracy
return FrPair(6400,aP.X(),6400,aP.Y());
}
case MAP_APPFONT: case MAP_SYSFONT: {
- ScopedVclPtr<VirtualDevice> pVD( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetMapMode(MapMode(eU));
Point aP(pVD->LogicToPixel(Point(32,32))); // 32 units for more accuracy
pVD->SetMapMode(MapMode(MAP_100TH_MM));
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 569d5a1ac8e2..a033fd8c7eb8 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -553,7 +553,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co
if( !aMtf.GetActionSize() )
{
- ScopedVclPtr<VirtualDevice> pOut(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pOut;
const Size aDummySize(2, 2);
pOut->SetOutputSizePixel(aDummySize);
@@ -640,7 +640,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
// if graphic could not be retrieved => go the hard way and create a MetaFile
if( ( GRAPHIC_NONE == aRet.GetType() ) || ( GRAPHIC_DEFAULT == aRet.GetType() ) )
{
- ScopedVclPtr<VirtualDevice> pOut(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pOut;
GDIMetaFile aMtf;
const Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
const MapMode aMap( pModel->GetScaleUnit(),
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index df7954b0f313..103aa77a9505 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -277,7 +277,7 @@ void SvxColorDockingWindow::FillValueSet()
const Size aColorSize(aColorSet->getEntryEdgeLength(), aColorSet->getEntryEdgeLength());
long nPtX = aColorSize.Width() - 1;
long nPtY = aColorSize.Height() - 1;
- ScopedVclPtr<VirtualDevice> pVD(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pVD;
pVD->SetOutputSizePixel( aColorSize );
pVD->SetLineColor( Color( COL_BLACK ) );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 2ee00f7460f0..2dfc0ad0806e 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -124,7 +124,7 @@ void FontWorkGalleryDialog::initFavorites(sal_uInt16 nThemeId)
if (GalleryExplorer::GetSdrObj(nThemeId, nModelPos, pModel, &aThumb) && !!aThumb)
{
- ScopedVclPtr<VirtualDevice> pVDev(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
const Point aNull(0, 0);
if (GetDPIScaleFactor() > 1)
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index eb19aa1171f4..fb591df68d04 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -401,7 +401,7 @@ void SvxLineEndWindow::FillValueSet()
if( pLineEndList.is() )
{
XLineEndEntry* pEntry = NULL;
- ScopedVclPtr<VirtualDevice> pVD(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > pVD;
long nCount = pLineEndList->Count();
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index d3b9fac6d88d..bde80c43b67d 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();
- ScopedVclPtr<ExtrusionDepthDialog> aDlg(new ExtrusionDepthDialog(0L, fDepth, eUnit));
+ ScopedVclPtrInstance< ExtrusionDepthDialog > aDlg(0L, 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 e0589a258d91..575cdc81d5d1 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -432,7 +432,7 @@ void FontworkBar::execute( SdrView* pSdrView, SfxRequest& rReq, SfxBindings& rBi
{
case SID_FONTWORK_GALLERY_FLOATER:
{
- ScopedVclPtr<FontWorkGalleryDialog> aDlg(new FontWorkGalleryDialog( pSdrView, ImpGetViewWin(pSdrView), nSID ) );
+ ScopedVclPtrInstance< FontWorkGalleryDialog > aDlg( pSdrView, ImpGetViewWin(pSdrView), nSID );
aDlg->Execute();
}
break;
@@ -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();
- ScopedVclPtr<FontworkCharacterSpacingDialog> aDlg(new FontworkCharacterSpacingDialog( 0L, nCharSpacing ) );
+ ScopedVclPtrInstance< FontworkCharacterSpacingDialog > aDlg( 0L, nCharSpacing );
sal_uInt16 nRet = aDlg->Execute();
if( nRet != 0 )
{
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index adfbf587abec..b61c625b4cc2 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -624,7 +624,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
if( !pPage )
return false;
- ScopedVclPtr<VirtualDevice> aVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > aVDev;
const MapMode aMap( mpDoc->GetScaleUnit(), Point(), rSettings.maScaleX, rSettings.maScaleY );
SdrOutliner& rOutl=mpDoc->GetDrawOutliner(NULL);
@@ -907,7 +907,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
if( !bSingleGraphic )
{
// create a metafile for all shapes
- ScopedVclPtr<VirtualDevice> aOut(new VirtualDevice());
+ ScopedVclPtrInstance< VirtualDevice > aOut;
// calculate bound rect for all shapes
Rectangle aBound;
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 9c1981ee027f..e93ae4010d2b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -670,7 +670,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
if( !mpObj.is() || mpModel == NULL || !mpObj->IsInserted() || NULL == mpObj->GetPage() )
return aAny;
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MAP_100TH_MM));
SdrModel* pModel = mpObj->GetModel();
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index cecfc7c27725..73316ec1a6cb 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -140,7 +140,7 @@ const GraphicObject& XOBitmap::GetGraphicObject() const
void XOBitmap::Bitmap2Array()
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
bool bPixelColor = false;
const Bitmap aBitmap( GetBitmap() );
const sal_uInt16 nLines = 8; // type dependent
@@ -175,7 +175,7 @@ void XOBitmap::Bitmap2Array()
/// convert array, fore- and background color into a bitmap
void XOBitmap::Array2Bitmap()
{
- ScopedVclPtr<VirtualDevice> pVDev( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
sal_uInt16 nLines = 8; // type dependent
if( !pPixelArray )