Kaydet (Commit) 9852f09b authored tarafından Noel Grandin's avatar Noel Grandin

return unique_ptr from FmXFormShell::GetConversionMenu_Lock

Change-Id: I8b262c18862429f8b6822742fb8fa454af1090a6
Reviewed-on: https://gerrit.libreoffice.org/69802
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 16676ea2
...@@ -1030,9 +1030,9 @@ void FmXFormShell::ForceUpdateSelection_Lock() ...@@ -1030,9 +1030,9 @@ void FmXFormShell::ForceUpdateSelection_Lock()
} }
} }
VclBuilder* FmXFormShell::GetConversionMenu_Lock() std::unique_ptr<VclBuilder> FmXFormShell::GetConversionMenu_Lock()
{ {
VclBuilder* pBuilder = new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/convertmenu.ui", ""); std::unique_ptr<VclBuilder> pBuilder(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/convertmenu.ui", ""));
VclPtr<PopupMenu> pNewMenu(pBuilder->get_menu("menu")); VclPtr<PopupMenu> pNewMenu(pBuilder->get_menu("menu"));
for (size_t i = 0; i < SAL_N_ELEMENTS(aConvertSlots); ++i) for (size_t i = 0; i < SAL_N_ELEMENTS(aConvertSlots); ++i)
{ {
......
...@@ -410,7 +410,7 @@ namespace svxform ...@@ -410,7 +410,7 @@ namespace svxform
const sal_Int16 nChangeId = aContextMenu->GetItemId("change"); const sal_Int16 nChangeId = aContextMenu->GetItemId("change");
if (!m_bRootSelected && !m_nFormsSelected && (m_nControlsSelected == 1)) if (!m_bRootSelected && !m_nFormsSelected && (m_nControlsSelected == 1))
{ {
xBuilder.reset(FmXFormShell::GetConversionMenu_Lock()); xBuilder = FmXFormShell::GetConversionMenu_Lock();
xConversionMenu = xBuilder->get_menu("menu"); xConversionMenu = xBuilder->get_menu("menu");
aContextMenu->SetPopupMenu(nChangeId, xConversionMenu); aContextMenu->SetPopupMenu(nChangeId, xConversionMenu);
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
......
...@@ -411,7 +411,7 @@ public: ...@@ -411,7 +411,7 @@ public:
SAL_DLLPRIVATE void stopFiltering_Lock(bool bSave); SAL_DLLPRIVATE void stopFiltering_Lock(bool bSave);
// a menu that contains all ControlConversion entries // a menu that contains all ControlConversion entries
SAL_DLLPRIVATE static VclBuilder* GetConversionMenu_Lock(); SAL_DLLPRIVATE static std::unique_ptr<VclBuilder> GetConversionMenu_Lock();
/// checks whether a given control conversion slot can be applied to the current selection /// checks whether a given control conversion slot can be applied to the current selection
SAL_DLLPRIVATE bool canConvertCurrentSelectionToControl_Lock(const OString& rIdent); SAL_DLLPRIVATE bool canConvertCurrentSelectionToControl_Lock(const OString& rIdent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment