diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-06-12 15:16:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-06-12 20:13:46 +0200 |
commit | a854500861e469835b8d1fd37ac86b1b514c43a6 (patch) | |
tree | f388dd25baa440f69a6d9dda6e5432ed5e81e158 /vcl | |
parent | ea84e714a49fae80b20a9e4706b0274126614611 (diff) |
PopupMenuFloatingWindow is now unused
Change-Id: Ie8fa026becb1899e466fb0e7dbb987290788aaf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96207
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/qt5/Qt5AccessibleWidget.cxx | 1 | ||||
-rw-r--r-- | vcl/source/window/accessibility.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/popupmenuwindow.cxx | 74 |
4 files changed, 2 insertions, 84 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 4ee0873bd189..430cc4d9c0b5 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -159,7 +159,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/mouse \ vcl/source/window/NotebookBarAddonsMerger \ vcl/source/window/OptionalBox \ - vcl/source/window/popupmenuwindow \ vcl/source/window/printdlg \ vcl/source/window/scrwnd \ vcl/source/window/seleng \ diff --git a/vcl/qt5/Qt5AccessibleWidget.cxx b/vcl/qt5/Qt5AccessibleWidget.cxx index 829e7e3a818d..ccca1cd2072f 100644 --- a/vcl/qt5/Qt5AccessibleWidget.cxx +++ b/vcl/qt5/Qt5AccessibleWidget.cxx @@ -53,7 +53,6 @@ #include <comphelper/AccessibleImplementationHelper.hxx> #include <o3tl/any.hxx> #include <sal/log.hxx> -#include <vcl/popupmenuwindow.hxx> using namespace css; using namespace css::accessibility; diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index ddcfd56aaa73..169c69451c5f 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -22,7 +22,6 @@ #include <vcl/window.hxx> #include <vcl/menu.hxx> #include <vcl/wrkwin.hxx> -#include <vcl/popupmenuwindow.hxx> #include <window.h> #include <brdwin.hxx> @@ -130,14 +129,9 @@ vcl::Window* Window::GetAccessibleParentWindow() const pParent = pWorkWin; } // If this is a floating window which has a native border window, then that border should be reported as - // the accessible parent, unless the floating window is a PopupMenuFloatingWindow - - // The logic here has to match that of AccessibleFactory::createAccessibleContext in - // accessibility/source/helper/acc_factory.cxx to avoid PopupMenuFloatingWindow - // becoming a11y parents of themselves + // the accessible parent else if( GetType() == WindowType::FLOATINGWINDOW && - mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame && - !PopupMenuFloatingWindow::isPopupMenu(this)) + mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame ) { pParent = mpWindowImpl->mpBorderWindow; } diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx deleted file mode 100644 index f85298e63642..000000000000 --- a/vcl/source/window/popupmenuwindow.cxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <vcl/popupmenuwindow.hxx> - -#include <limits> - -struct PopupMenuFloatingWindow::ImplData -{ - sal_uInt16 mnMenuStackLevel; // Store the stack level of a popup menu. 0 = top-level menu. - - ImplData(); -}; - -PopupMenuFloatingWindow::ImplData::ImplData() : - mnMenuStackLevel( ::std::numeric_limits<sal_uInt16>::max() ) -{ -} - -PopupMenuFloatingWindow::PopupMenuFloatingWindow( vcl::Window* pParent ) : - FloatingWindow(pParent, WB_SYSTEMFLOATWIN | WB_SYSTEMWINDOW | WB_NOBORDER ), - mpImplData(new ImplData) -{ -} - -PopupMenuFloatingWindow::~PopupMenuFloatingWindow() -{ - disposeOnce(); -} - -void PopupMenuFloatingWindow::dispose() -{ - mpImplData.reset(); - FloatingWindow::dispose(); -} - -sal_uInt16 PopupMenuFloatingWindow::GetMenuStackLevel() const -{ - return mpImplData->mnMenuStackLevel; -} - -void PopupMenuFloatingWindow::SetMenuStackLevel( sal_uInt16 nLevel ) -{ - mpImplData->mnMenuStackLevel = nLevel; -} - -bool PopupMenuFloatingWindow::IsPopupMenu() const -{ - return mpImplData->mnMenuStackLevel != ::std::numeric_limits<sal_uInt16>::max(); -} - -bool PopupMenuFloatingWindow::isPopupMenu(const vcl::Window *pWindow) -{ - const PopupMenuFloatingWindow* pChild = dynamic_cast<const PopupMenuFloatingWindow*>(pWindow); - return pChild && pChild->IsPopupMenu(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |