summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-31 23:04:14 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:40:25 +0100
commit8a65284fe31e6c0a927cb88b75df7845cd248572 (patch)
tree0427685579288f412d1890619e8bc224339bb228 /starmath
parentd46e0d9656670dcd7dcca2f32062606400ff6246 (diff)
Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx8
-rw-r--r--starmath/source/document.cxx8
2 files changed, 8 insertions, 8 deletions
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 424e10c25e05..29d554a7e477 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -519,7 +519,7 @@ void Test::testBinomInBinHor()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- ScopedVclPtr<VirtualDevice> pOutputDevice( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
int i;
@@ -547,7 +547,7 @@ void Test::testBinVerInUnary()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- ScopedVclPtr<VirtualDevice> pOutputDevice( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
int i;
@@ -576,7 +576,7 @@ void Test::testBinHorInSubSup()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- ScopedVclPtr<VirtualDevice> pOutputDevice( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// Insert an RSup expression with a BinHor for the exponent
aCursor.InsertText("a");
@@ -604,7 +604,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
SmCursor aCursor(pTree, xDocShRef);
- ScopedVclPtr<VirtualDevice> pOutputDevice( new VirtualDevice() );
+ ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
// move forward (more than) enough places to be at the end
for (size_t i = 0; i < 3; ++i)
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index a78f678d24de..14276a84333f 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -989,7 +989,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
pDev = &SM_MOD()->GetDefaultVirtualDev();
OSL_ENSURE (pDev, "device for font list missing" );
- VclPtr<SmFontTypeDialog> xFontTypeDialog(new SmFontTypeDialog( NULL, pDev ));
+ VclPtrInstance< SmFontTypeDialog > xFontTypeDialog( nullptr, pDev );
SmFormat aOldFormat = GetFormat();
xFontTypeDialog->ReadFrom( aOldFormat );
@@ -1011,7 +1011,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_FONTSIZE:
{
- VclPtr<SmFontSizeDialog> xFontSizeDialog(new SmFontSizeDialog(NULL));
+ VclPtrInstance< SmFontSizeDialog > xFontSizeDialog(nullptr);
SmFormat aOldFormat = GetFormat();
xFontSizeDialog->ReadFrom( aOldFormat );
@@ -1034,7 +1034,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_DISTANCE:
{
- VclPtr<SmDistanceDialog> xDistanceDialog(new SmDistanceDialog(NULL));
+ VclPtrInstance< SmDistanceDialog > xDistanceDialog(nullptr);
SmFormat aOldFormat = GetFormat();
xDistanceDialog->ReadFrom( aOldFormat );
@@ -1057,7 +1057,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_ALIGN:
{
- VclPtr<SmAlignDialog> xAlignDialog(new SmAlignDialog(NULL));
+ VclPtrInstance< SmAlignDialog > xAlignDialog(nullptr);
SmFormat aOldFormat = GetFormat();
xAlignDialog->ReadFrom( aOldFormat );