[Libreoffice-commits] core.git: 2 commits - accessibility/source include/vcl osx/soffice.xcodeproj solenv/clang-format vcl/Library_vcl.mk vcl/qt5 vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jun 12 18:14:08 UTC 2020
accessibility/source/helper/acc_factory.cxx | 15 -----
include/vcl/button.hxx | 32 ------------
include/vcl/popupmenuwindow.hxx | 46 -----------------
include/vcl/toolkit/button.hxx | 32 ++++++++++++
osx/soffice.xcodeproj/project.pbxproj | 2
solenv/clang-format/blacklist | 2
vcl/Library_vcl.mk | 1
vcl/qt5/Qt5AccessibleWidget.cxx | 1
vcl/source/window/accessibility.cxx | 10 ---
vcl/source/window/popupmenuwindow.cxx | 74 ----------------------------
10 files changed, 35 insertions(+), 180 deletions(-)
New commits:
commit a854500861e469835b8d1fd37ac86b1b514c43a6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 12 15:16:52 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 12 20:13:46 2020 +0200
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 at redhat.com>
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx
index 02d75771fb98..3ede3d7157df 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -57,7 +57,6 @@
#include <vcl/toolkit/combobox.hxx>
#include <extended/AccessibleGridControl.hxx>
#include <vcl/accessibletable.hxx>
-#include <vcl/popupmenuwindow.hxx>
#include <floatingwindowaccessible.hxx>
@@ -328,19 +327,7 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX
else if ( nType == WindowType::BORDERWINDOW && hasFloatingChild( pWindow ) )
{
- // The logic here has to match that of Window::GetAccessibleParentWindow in
- // vcl/source/window/window.cxx to avoid PopupMenuFloatingWindow
- // becoming a11y parents of themselves
- vcl::Window* pChild = pWindow->GetAccessibleChildWindow(0);
- if (PopupMenuFloatingWindow::isPopupMenu(pChild))
- {
- // Get the accessible context from the child window.
- Reference<XAccessible> xAccessible = pChild->CreateAccessible();
- if (xAccessible.is())
- xContext = xAccessible->getAccessibleContext();
- }
- else
- xContext = new FloatingWindowAccessible( _pXWindow );
+ xContext = new FloatingWindowAccessible( _pXWindow );
}
else if ( ( nType == WindowType::HELPTEXTWINDOW ) || ( nType == WindowType::FIXEDLINE ) )
diff --git a/include/vcl/popupmenuwindow.hxx b/include/vcl/popupmenuwindow.hxx
deleted file mode 100644
index 42488c2ee206..000000000000
--- a/include/vcl/popupmenuwindow.hxx
+++ /dev/null
@@ -1,46 +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 .
- */
-
-#ifndef INCLUDED_VCL_POPUPMENUWINDOW_HXX
-#define INCLUDED_VCL_POPUPMENUWINDOW_HXX
-
-#include <vcl/floatwin.hxx>
-#include <memory>
-
-class VCL_DLLPUBLIC PopupMenuFloatingWindow : public FloatingWindow
-{
-private:
- struct SAL_DLLPRIVATE ImplData;
- std::unique_ptr<ImplData> mpImplData;
-public:
- PopupMenuFloatingWindow( vcl::Window* pParent );
- virtual ~PopupMenuFloatingWindow() override;
- virtual void dispose() override;
-
- sal_uInt16 GetMenuStackLevel() const;
- void SetMenuStackLevel( sal_uInt16 nLevel );
- bool IsPopupMenu() const;
-
- //determine if a given window is an activated PopupMenuFloatingWindow
- static bool isPopupMenu(const vcl::Window *pWindow);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/osx/soffice.xcodeproj/project.pbxproj b/osx/soffice.xcodeproj/project.pbxproj
index 98cf4cd9096a..42f20e8847ea 100644
--- a/osx/soffice.xcodeproj/project.pbxproj
+++ b/osx/soffice.xcodeproj/project.pbxproj
@@ -133,7 +133,6 @@
BE2DAD11182FAB5200A4D2F7 /* mnemonicengine.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mnemonicengine.cxx; path = ../vcl/source/window/mnemonicengine.cxx; sourceTree = "<group>"; };
BE2DAD12182FAB5200A4D2F7 /* mouseevent.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = mouseevent.cxx; path = ../vcl/source/window/mouseevent.cxx; sourceTree = "<group>"; };
BE2DAD13182FAB5200A4D2F7 /* msgbox.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = msgbox.cxx; path = ../vcl/source/window/msgbox.cxx; sourceTree = "<group>"; };
- BE2DAD14182FAB5200A4D2F7 /* popupmenuwindow.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = popupmenuwindow.cxx; path = ../vcl/source/window/popupmenuwindow.cxx; sourceTree = "<group>"; };
BE2DAD15182FAB5200A4D2F7 /* printdlg.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = printdlg.cxx; path = ../vcl/source/window/printdlg.cxx; sourceTree = "<group>"; };
BE2DAD16182FAB5200A4D2F7 /* scrwnd.cxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = scrwnd.cxx; path = ../vcl/source/window/scrwnd.cxx; sourceTree = "<group>"; };
BE2DAD17182FAB5200A4D2F7 /* scrwnd.hxx */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = scrwnd.hxx; path = ../vcl/source/window/scrwnd.hxx; sourceTree = "<group>"; };
@@ -802,7 +801,6 @@
BE2DAD11182FAB5200A4D2F7 /* mnemonicengine.cxx */,
BE2DAD12182FAB5200A4D2F7 /* mouseevent.cxx */,
BE2DAD13182FAB5200A4D2F7 /* msgbox.cxx */,
- BE2DAD14182FAB5200A4D2F7 /* popupmenuwindow.cxx */,
BE2DAD15182FAB5200A4D2F7 /* printdlg.cxx */,
BE2DAD16182FAB5200A4D2F7 /* scrwnd.cxx */,
BE2DAD17182FAB5200A4D2F7 /* scrwnd.hxx */,
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 1a1e268591ae..739d49d9ea30 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7410,7 +7410,6 @@ include/vcl/pdfextoutdevdata.hxx
include/vcl/pdfwriter.hxx
include/vcl/pngread.hxx
include/vcl/pngwrite.hxx
-include/vcl/popupmenuwindow.hxx
include/vcl/print.hxx
include/vcl/prntypes.hxx
include/vcl/ptrstyle.hxx
@@ -17302,7 +17301,6 @@ vcl/source/window/mnemonic.cxx
vcl/source/window/mnemonicengine.cxx
vcl/source/window/mouse.cxx
vcl/source/window/paint.cxx
-vcl/source/window/popupmenuwindow.cxx
vcl/source/window/printdlg.cxx
vcl/source/window/scrwnd.cxx
vcl/source/window/seleng.cxx
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: */
commit ea84e714a49fae80b20a9e4706b0274126614611
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun May 31 16:48:01 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jun 12 20:13:31 2020 +0200
OKButton and CancelButton can be toolkit-only classes now
Change-Id: Icaf90c19217e4f8e5dad0e3542e6d54fc509de54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95224
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 02371c996e95..1d062581a355 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -215,38 +215,6 @@ inline bool PushButton::IsChecked() const
return (GetState() == TRISTATE_TRUE);
}
-class VCL_DLLPUBLIC OKButton : public PushButton
-{
-protected:
- using PushButton::ImplInit;
-private:
- SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
-
- OKButton (const OKButton &) = delete;
- OKButton & operator= (const OKButton &) = delete;
-
-public:
- explicit OKButton( vcl::Window* pParent, WinBits nStyle = WB_DEFBUTTON );
-
- virtual void Click() override;
-};
-
-class VCL_DLLPUBLIC CancelButton : public PushButton
-{
-protected:
- using PushButton::ImplInit;
-private:
- SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
-
- CancelButton (const CancelButton &) = delete;
- CancelButton & operator= (const CancelButton &) = delete;
-
-public:
- explicit CancelButton( vcl::Window* pParent, WinBits nStyle = 0 );
-
- virtual void Click() override;
-};
-
class VCL_DLLPUBLIC RadioButton : public Button
{
private:
diff --git a/include/vcl/toolkit/button.hxx b/include/vcl/toolkit/button.hxx
index 6f8910e435a9..fd9692cae2ac 100644
--- a/include/vcl/toolkit/button.hxx
+++ b/include/vcl/toolkit/button.hxx
@@ -24,6 +24,38 @@
#include <vcl/button.hxx>
+class VCL_DLLPUBLIC OKButton : public PushButton
+{
+protected:
+ using PushButton::ImplInit;
+private:
+ SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
+
+ OKButton (const OKButton &) = delete;
+ OKButton & operator= (const OKButton &) = delete;
+
+public:
+ explicit OKButton( vcl::Window* pParent, WinBits nStyle = WB_DEFBUTTON );
+
+ virtual void Click() override;
+};
+
+class VCL_DLLPUBLIC CancelButton : public PushButton
+{
+protected:
+ using PushButton::ImplInit;
+private:
+ SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
+
+ CancelButton (const CancelButton &) = delete;
+ CancelButton & operator= (const CancelButton &) = delete;
+
+public:
+ explicit CancelButton( vcl::Window* pParent, WinBits nStyle = 0 );
+
+ virtual void Click() override;
+};
+
class CloseButton final : public CancelButton
{
public:
More information about the Libreoffice-commits
mailing list