summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/vml/vmlformatting.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index d2132c0bc8b7..99c95eab372e 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -961,7 +961,7 @@ void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Referen
if (!moTrim.has() || !moTrim.get())
{
OUString sText = moString.get();
- VclPtr<VirtualDevice> pDevice = VclPtr<VirtualDevice>::Create();
+ ScopedVclPtrInstance<VirtualDevice> pDevice;
vcl::Font aFont = pDevice->GetFont();
aFont.SetFamilyName(sFont);
aFont.SetFontSize(Size(0, 96));
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 1de00b60633d..43ec52565128 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1483,7 +1483,7 @@ void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
// Calc the ratio.
double fRatio = 0;
- VclPtr<VirtualDevice> pDevice = VclPtr<VirtualDevice>::Create();
+ ScopedVclPtrInstance<VirtualDevice> pDevice;
vcl::Font aFont = pDevice->GetFont();
aFont.SetFamilyName(sFont);
aFont.SetFontSize(Size(0, 96));