[Libreoffice-commits] core.git: sfx2/source
Stephan Bergmann
sbergman at redhat.com
Mon Apr 16 07:43:24 UTC 2018
sfx2/source/dialog/infobar.cxx | 2 +-
sfx2/source/sidebar/SidebarController.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 74b6e61dde64c5e24bffacda6f67dbf3d1fc7032
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Apr 16 09:35:16 2018 +0200
-Werror,-Wreturn-std-move (recent Clang trunk)
An explicit std::move would be needed in the return statements, as there's a
conversion from VclPtrInstance to base class VclPtr involved. One more reason
to better get rid of VclPtrInstance completely in favor of VclPtr::Create, as
already mentioned in
<https://lists.freedesktop.org/archives/libreoffice/2017-May/077756.html>
"VclPtr some improvements ?"
Change-Id: Id96a58b425749b9be07b422bb4161a3af864ff6c
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 2946a5da5aac..d552a4d637a2 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -327,7 +327,7 @@ VclPtr<SfxInfoBarWindow> SfxInfoBarContainerWindow::appendInfoBar(const OUString
{
Size aSize = GetSizePixel();
- VclPtrInstance<SfxInfoBarWindow> pInfoBar(this, sId, sMessage, ibType, nMessageStyle);
+ auto pInfoBar = VclPtr<SfxInfoBarWindow>::Create(this, sId, sMessage, ibType, nMessageStyle);
basegfx::BColor aBackgroundColor;
basegfx::BColor aForegroundColor;
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index c7652bdf9e52..b205559c6326 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -961,7 +961,7 @@ VclPtr<PopupMenu> SidebarController::CreatePopupMenu (
const ::std::vector<TabBar::DeckMenuData>& rMenuData) const
{
// Create the top level popup menu.
- VclPtrInstance<PopupMenu> pMenu;
+ auto pMenu = VclPtr<PopupMenu>::Create();
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
if (pMenuWindow != nullptr)
{
More information about the Libreoffice-commits
mailing list