diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2020-06-03 17:52:03 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2020-06-03 17:52:03 +0200 |
commit | 21b2346f227c7833d6e98bfdd947230006c20529 (patch) | |
tree | 46c797cf0a4e3e336f5e81844b1b26e77f3cec07 /svx | |
parent | 170fbb1ffc2b47dd6ade7c719685c91c19c9bdf5 (diff) |
Remove duplicated InterimItemWindow
Change-Id: Ic5074c239d96efacbacc50b50c0e6da56cec0dc4
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index 184448e00f1f..3f0e05060fd5 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 travese - 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) |