summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-10-30 14:34:18 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-10-30 15:50:31 +0200
commit94876fe2704cb5107234ad76c86122ac9d95f866 (patch)
treed55701606099ce3db9f3b051166a4ba33fb58e7f /sw
parent99da628e17e873a5fa2f726e7a1732b21c3d4b33 (diff)
Let Menu dispose submenus
(I'm not sure about how good are the changes from ScopedVclPtr to non-scoped, and disposeAndClear to clear. They aren't really needed, because of the VclReferenceBase::mbDisposed logic. But at least they should be safe, as long as we have disposeOnce calls in Menu's dtor.) See also previous commits: 4433d95b374c13a3501cdf3a6e273f68eb49873a ("MenuItemData now properly disposes the submenu") 89c23b4aaef931b5d6009efaf44ce6e6c976e8d4 ("Sub menus no longer need manual disposing") Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/utlui/unotools.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx
index 4a89a65a9229..9dec8ec22798 100644
--- a/sw/source/uibase/utlui/unotools.cxx
+++ b/sw/source/uibase/utlui/unotools.cxx
@@ -451,7 +451,6 @@ static const sal_Int16 nZoomValues[] =
void SwOneExampleFrame::CreatePopup(const Point& rPt)
{
ScopedVclPtrInstance<PopupMenu> aPop;
- ScopedVclPtrInstance<PopupMenu> aSubPop1;
ResStringArray& rArr = aMenuRes.GetMenuArray();
aPop->InsertItem(ITEM_UP, rArr.GetString(rArr.FindIndex(ST_MENU_UP )));
@@ -470,6 +469,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt)
sal_Int16 nZoom = 0;
aZoom >>= nZoom;
+ VclPtrInstance<PopupMenu> aSubPop1;
for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(nZoomValues); ++i)
{
OUString sTemp = unicode::formatPercent(nZoomValues[i],