summaryrefslogtreecommitdiff
path: root/svx/source/dialog/svxruler.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-19 16:19:50 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 12:20:00 +0100
commited953d1842caf0b8a00d1528cd012e3a9b83bdd2 (patch)
tree8ff6f9e055a11b7f5892dc28d13c2cd3f798b32f /svx/source/dialog/svxruler.cxx
parent8fa63f31ab84131fc1551563ae5d9bf86208c906 (diff)
Fix OutputDevice members / stack allocation: svx.
Change-Id: Id28aeb44b4c48fec944e21fed7a9acf9f7f8b68a
Diffstat (limited to 'svx/source/dialog/svxruler.cxx')
-rw-r--r--svx/source/dialog/svxruler.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 120b5ac3ec52..6930ee9327ce 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3457,23 +3457,23 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent )
{
PopupMenu aMenu;
aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect));
- VirtualDevice aDev;
+ ScopedVclPtrInstance<VirtualDevice()
const Size aSz(ruler_tab_svx.width + 2, ruler_tab_svx.height + 2);
- aDev.SetOutputSize(aSz);
- aDev.SetBackground(Wallpaper(Color(COL_WHITE)));
- Color aFillColor(aDev.GetSettings().GetStyleSettings().GetShadowColor());
+ pDev->SetOutputSize(aSz);
+ pDev->SetBackground(Wallpaper(Color(COL_WHITE)));
+ Color aFillColor(pDev->GetSettings().GetStyleSettings().GetShadowColor());
const Point aPt(aSz.Width() / 2, aSz.Height() / 2);
for ( sal_uInt16 i = RULER_TAB_LEFT; i < RULER_TAB_DEFAULT; ++i )
{
sal_uInt16 nStyle = bRTL ? i|RULER_TAB_RTL : i;
nStyle |= static_cast<sal_uInt16>(bHorz ? WB_HORZ : WB_VERT);
- DrawTab(&aDev, aFillColor, aPt, nStyle);
+ DrawTab(pDev, aFillColor, aPt, nStyle);
aMenu.InsertItem(i + 1,
ResId(RID_SVXSTR_RULER_START + i, DIALOG_MGR()).toString(),
- Image(aDev.GetBitmap(Point(), aSz), Color(COL_WHITE)));
+ Image(pDev->GetBitmap(Point(), aSz), Color(COL_WHITE)));
aMenu.CheckItem(i + 1, i == mpTabs[mxRulerImpl->nIdx + TAB_GAP].nStyle);
- aDev.SetOutputSize(aSz); // delete device
+ pDev->SetOutputSize(aSz); // delete device
}
aMenu.Execute( this, rCommandEvent.GetMousePosPixel() );
}