summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-09 20:46:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-10 15:20:40 +0100
commit48a307b69713a244e747b3a4d444d6793d59b8d9 (patch)
treeea67c623b2e4dc156be2bd8a558e367ab8ad354b /sfx2
parentabfdfe6ac1bfc917d1693874f9dec80167e0806f (diff)
weld SvxFmAbsRecWin item window
Change-Id: I6a11d8ba226b28447e2ab04925090491d6953132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88348 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/InterimItemWindow.cxx14
-rw-r--r--sfx2/source/inet/inettbc.cxx4
-rw-r--r--sfx2/source/view/classificationcontroller.cxx4
3 files changed, 19 insertions, 3 deletions
diff --git a/sfx2/source/control/InterimItemWindow.cxx b/sfx2/source/control/InterimItemWindow.cxx
index 8e6ddb096318..6f26b99acab5 100644
--- a/sfx2/source/control/InterimItemWindow.cxx
+++ b/sfx2/source/control/InterimItemWindow.cxx
@@ -18,7 +18,8 @@ InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& rUIXM
m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription));
m_xContainer = m_xBuilder->weld_container(rID);
- SetBackground(Wallpaper(COL_TRANSPARENT));
+ SetBackground();
+ SetPaintTransparent(true);
}
InterimItemWindow::~InterimItemWindow() { disposeOnce(); }
@@ -45,6 +46,17 @@ Size InterimItemWindow::GetOptimalSize() const
return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
}
+void InterimItemWindow::GetFocus()
+{
+ /* let toolbox know this item window has focus so it updates its mnHighItemId to point
+ to this toolitem in case tab means to move to another toolitem within
+ the toolbox
+ */
+ vcl::Window* pToolBox = GetParent();
+ NotifyEvent aNEvt(MouseNotifyEvent::GETFOCUS, this);
+ pToolBox->EventNotify(aNEvt);
+}
+
bool InterimItemWindow::ChildKeyInput(const KeyEvent& rKEvt)
{
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index b1fc33e9afd7..ee5adc326ee3 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -90,7 +90,9 @@ public:
virtual void GetFocus() override
{
- m_xWidget->grab_focus();
+ if (m_xWidget)
+ m_xWidget->grab_focus();
+ InterimItemWindow::GetFocus();
}
void set_sensitive(bool bSensitive)
diff --git a/sfx2/source/view/classificationcontroller.cxx b/sfx2/source/view/classificationcontroller.cxx
index e335d6d05927..034606623afa 100644
--- a/sfx2/source/view/classificationcontroller.cxx
+++ b/sfx2/source/view/classificationcontroller.cxx
@@ -106,7 +106,9 @@ class SAL_WARN_UNUSED ClassificationControl final : public InterimItemWindow
void DataChanged(const DataChangedEvent& rEvent) override;
void GetFocus() override
{
- m_xCategory->grab_focus();
+ if (m_xCategory)
+ m_xCategory->grab_focus();
+ InterimItemWindow::GetFocus();
}
public: