summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-06 17:15:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-06 21:26:14 +0100
commit57db1bb55855645693001ea2c642330afc1c4ebb (patch)
tree0a7ea2d83cef773aa5a381ce5388150ff2a96589 /svx
parent2f86601db1ff8f198666a07f4b25d113760c879c (diff)
weld ClassificationControl ToolboxWindow
Change-Id: Idda0b5187201aa77b5b6d682b740a8e55719742a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88129 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx3
-rw-r--r--svx/source/sidebar/paragraph/ParaSpacingWindow.cxx72
-rw-r--r--svx/source/sidebar/paragraph/ParaSpacingWindow.hxx2
-rw-r--r--svx/source/tbxctrls/itemwin.cxx5
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
5 files changed, 9 insertions, 75 deletions
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 30ef3c4d351d..aa8b8295692a 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-01 11:40:35 using:
+ Generated on 2020-02-06 17:42:27 using:
./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -95,6 +95,7 @@
#include <vcl/AccessibleBrowseBoxObjType.hxx>
#include <vcl/EnumContext.hxx>
#include <vcl/GraphicExternalLink.hxx>
+#include <vcl/IContext.hxx>
#include <vcl/NotebookBarAddonsMerger.hxx>
#include <vcl/Scanline.hxx>
#include <vcl/accel.hxx>
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index 00c3dc6fee83..05fdfe721fec 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -34,78 +34,6 @@ using namespace svx;
#define MAX_SC_SD 116220200
#define NEGA_MAXVALUE -10000000
-InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID)
- : Control(pParent, WB_TABSTOP)
-{
- m_xVclContentArea = VclPtr<VclVBox>::Create(this);
- m_xVclContentArea->Show();
- m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription));
- m_xContainer = m_xBuilder->weld_container(rID);
-}
-
-InterimItemWindow::~InterimItemWindow()
-{
- disposeOnce();
-}
-
-void InterimItemWindow::dispose()
-{
- m_xContainer.reset();
- m_xBuilder.reset();
- m_xVclContentArea.disposeAndClear();
-
- Control::dispose();
-}
-
-void InterimItemWindow::Resize()
-{
- vcl::Window *pChild = GetWindow(GetWindowType::FirstChild);
- assert(pChild);
- VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel());
- Control::Resize();
-}
-
-Size InterimItemWindow::GetOptimalSize() const
-{
- return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
-}
-
-bool InterimItemWindow::ChildKeyInput(const KeyEvent& rKEvt)
-{
- sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
- if (nCode != KEY_TAB)
- return false;
-
- /* if the native widget has focus, then no vcl window has focus.
-
- We want to grab focus to this vcl widget so that pressing tab will traverse
- to the next vcl widget.
-
- But just using GrabFocus will, because no vcl widget has focus, trigger
- bringing the toplevel to front with the expectation that a suitable widget
- will be picked for focus when that happen, which is no use to us here.
-
- SetFakeFocus avoids the problem, allowing GrabFocus to do the expected thing
- then sending the Tab to our parent will do the right traversal
- */
- SetFakeFocus(true);
- GrabFocus();
-
- /* let toolbox know we have focus so it updates its mnHighItemId to point
- to this toolitem in case tab means to move to another toolitem within
- the toolbox
- */
- NotifyEvent aNEvt(MouseNotifyEvent::GETFOCUS, this);
- vcl::Window* pToolBox = GetParent();
- pToolBox->EventNotify(aNEvt);
-
- /* now give focus to our toolbox parent and send it the tab */
- pToolBox->GrabFocus();
- pToolBox->KeyInput(rKEvt);
-
- return true;
-}
-
// ParaULSpacingWindow
ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent)
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
index b09f5addf8c6..fad11830f100 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
@@ -21,7 +21,7 @@
#include <editeng/ulspitem.hxx>
#include <vcl/EnumContext.hxx>
-#include <svx/InterimItemWindow.hxx>
+#include <sfx2/InterimItemWindow.hxx>
#include <svx/relfld.hxx>
using namespace com::sun::star;
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index e0ac4cdbfb8d..4be04c13f882 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -178,6 +178,11 @@ void SvxMetricField::DataChanged( const DataChangedEvent& rDCEvt )
InterimItemWindow::DataChanged( rDCEvt );
}
+void SvxMetricField::GetFocus()
+{
+ m_xWidget->grab_focus();
+}
+
SvxFillTypeBox::SvxFillTypeBox( vcl::Window* pParent ) :
ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_TABSTOP ),
nCurPos ( 0 ),
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index fda45184209f..fc56a7d0e286 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -39,9 +39,9 @@
#include <memory>
+#include <sfx2/InterimItemWindow.hxx>
#include <sfx2/sidebar/SidebarToolBox.hxx>
#include <boost/property_tree/ptree.hpp>
-#include <svx/InterimItemWindow.hxx>
using namespace ::com::sun::star;