[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jan 12 14:41:44 UTC 2020
svx/source/tbxctrls/tbcontrl.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit caf4006c3e593816c78a8dabf949ac33e5cceca8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Jan 11 19:50:21 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jan 12 15:41:08 2020 +0100
cid#1457616 Unchecked return value
and
cid#1457618 Unchecked return value
Change-Id: I5459ac00a19e7d1b136a58969c3d7672864a8aea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86626
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 104c34256b18..3c5cb37ad2e7 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3464,14 +3464,15 @@ std::unique_ptr<WeldToolbarPopup> SvxColorToolBoxControl::weldPopupWindow()
VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pParent )
{
- EnsurePaletteManager();
+ ToolBox* pToolBox = nullptr;
+ sal_uInt16 nId = 0;
+ if (!getToolboxId(nId, &pToolBox))
+ return nullptr;
const css::uno::Reference<css::awt::XWindow> xParent = m_xFrame->getContainerWindow();
weld::Window* pParentFrame = Application::GetFrameWeld(xParent);
- ToolBox* pToolBox = nullptr;
- sal_uInt16 nId = 0;
- getToolboxId(nId, &pToolBox);
+ EnsurePaletteManager();
auto xPopover = std::make_unique<ColorWindow>(
m_aCommandURL,
@@ -3486,8 +3487,6 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pPar
if ( m_bSplitButton )
xPopover->SetSelectedHdl( LINK( this, SvxColorToolBoxControl, SelectedHdl ) );
- EnsurePaletteManager();
-
mxInterimPopover = VclPtr<InterimToolbarPopup>::Create(getFrameInterface(), pParent,
std::move(xPopover));
@@ -3505,7 +3504,8 @@ void SvxColorToolBoxControl::statusChanged( const css::frame::FeatureStateEvent&
{
ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
- getToolboxId(nId, &pToolBox);
+ if (!getToolboxId(nId, &pToolBox) && !m_pToolbar)
+ return;
if ( rEvent.FeatureURL.Complete == m_aCommandURL )
{
More information about the Libreoffice-commits
mailing list