[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Widget.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 034f56015c1c7a61faede33fb5306f63b5585632 Author: Michael Weghorn AuthorDate: Mon Feb 17 10:38:15 2020 +0100 Commit: Michael Weghorn CommitDate: Mon Feb 17 12:40:46 2020 +0100 tdf#126785 qt5: Ignore external QEvent::ShortcutOverride For some reason, an extra external QEvent::ShortcutOverride event is triggered when a key is pressed and e.g. the Orca screen reader is enabled, which would result in duplicated input when handled as key input event as well. Therefore, ignore those ShortcutOverride events that are "spontaneous", i.e. "the event originated outside the application (a system event)". [1] [1] https://doc.qt.io/qt-5/qevent.html#spontaneous Change-Id: Ibccacb69c31d4d7ebd512c704f0e4df978c5281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88852 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 5073dbff1a82..0bca51ea55c8 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -450,6 +450,16 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { +// ignore QEvent::ShortcutOverride events originating from outside the application, +// since such an extra event is sent e.g. with Orca screen reader enabled, +// so that two events of that kind (the "real one" and one from outside) +// would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' +// is called below (s. tdf#122053) +if (pEvent->spontaneous()) +{ +return false; +} + // Accepted event disables shortcut activation, // but enables keypress event. // If event is not accepted and shortcut is successfully activated, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/qt5
vcl/qt5/Qt5Widget.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit cc4f16ca02c97847d05ee6479ae138a47db148f7 Author: Michael Weghorn AuthorDate: Mon Feb 17 10:38:15 2020 +0100 Commit: Caolán McNamara CommitDate: Mon Feb 17 15:45:45 2020 +0100 tdf#126785 qt5: Ignore external QEvent::ShortcutOverride For some reason, an extra external QEvent::ShortcutOverride event is triggered when a key is pressed and e.g. the Orca screen reader is enabled, which would result in duplicated input when handled as key input event as well. Therefore, ignore those ShortcutOverride events that are "spontaneous", i.e. "the event originated outside the application (a system event)". [1] [1] https://doc.qt.io/qt-5/qevent.html#spontaneous Change-Id: Ibccacb69c31d4d7ebd512c704f0e4df978c5281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88852 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 034f56015c1c7a61faede33fb5306f63b5585632) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88791 Reviewed-by: Caolán McNamara diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 1fe4b505055f..8c0c5244c2bb 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -449,6 +449,16 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { +// ignore QEvent::ShortcutOverride events originating from outside the application, +// since such an extra event is sent e.g. with Orca screen reader enabled, +// so that two events of that kind (the "real one" and one from outside) +// would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' +// is called below (s. tdf#122053) +if (pEvent->spontaneous()) +{ +return false; +} + // Accepted event disables shortcut activation, // but enables keypress event. // If event is not accepted and shortcut is successfully activated, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/qt5
vcl/qt5/Qt5Widget.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 1260b71c6796f12053cddd4c7a8f3f727fdf1890 Author: Michael Weghorn AuthorDate: Mon Feb 17 10:38:15 2020 +0100 Commit: Katarina Behrens CommitDate: Tue Feb 18 09:04:28 2020 +0100 tdf#126785 qt5: Ignore external QEvent::ShortcutOverride For some reason, an extra external QEvent::ShortcutOverride event is triggered when a key is pressed and e.g. the Orca screen reader is enabled, which would result in duplicated input when handled as key input event as well. Therefore, ignore those ShortcutOverride events that are "spontaneous", i.e. "the event originated outside the application (a system event)". [1] [1] https://doc.qt.io/qt-5/qevent.html#spontaneous Change-Id: Ibccacb69c31d4d7ebd512c704f0e4df978c5281f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88852 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 034f56015c1c7a61faede33fb5306f63b5585632) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88790 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 70f480364f57..a17bcb0ca7ce 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -450,6 +450,16 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { +// ignore QEvent::ShortcutOverride events originating from outside the application, +// since such an extra event is sent e.g. with Orca screen reader enabled, +// so that two events of that kind (the "real one" and one from outside) +// would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' +// is called below (s. tdf#122053) +if (pEvent->spontaneous()) +{ +return false; +} + // Accepted event disables shortcut activation, // but enables keypress event. // If event is not accepted and shortcut is successfully activated, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/inc vcl/qt5
vcl/inc/qt5/Qt5Menu.hxx | 16 vcl/qt5/Qt5Menu.cxx | 34 -- 2 files changed, 48 insertions(+), 2 deletions(-) New commits: commit ceb2f69e0ef2381ce6ed8c65ea45e72aa86cda56 Author: Michael Weghorn AuthorDate: Wed Feb 12 08:07:42 2020 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Wed Feb 19 11:56:11 2020 +0100 tdf#128921 tdf#130341 tdf#122053 qt5: Native PopupMenus This implements native PopupMenus for the qt5 VCL plugin, which not only gives them the native look and feel, but also makes context menus faster (tdf#128921), accessible (e.g. to the Orca screen reader, tdf#122053), and makes them work for a case in Base's relationship dialog where entries in the non-native context menu were not selectable/clickable (tdf#130341). For now, this always shows the popup menu at cursor position, which can be changed by taking the Rectangle passed to 'Qt5Menu::ShowNativePopupMenu' into account if there should be any need. Change-Id: Ie52cbc682acacb92716ff51e8bf7f1ab07d34cf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88512 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 1e0b16f8695498e4eea7c2208aabf7e7664ce749) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88491 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx index efcfb8eeb81c..2e5434f4db74 100644 --- a/vcl/inc/qt5/Qt5Menu.hxx +++ b/vcl/inc/qt5/Qt5Menu.hxx @@ -24,6 +24,17 @@ class QMenuBar; class Qt5MenuItem; class Qt5Frame; +/* + * Qt5Menu can represent + * (1) the top-level menu of a menubar, in which case 'mbMenuBar' is true and + * 'mpQMenuBar' refers to the corresponding QMenuBar + * (2) another kind of menu (like a PopupMenu), in which case the corresponding QMenu + * object is instantiated and owned by this Qt5Menu (held in 'mpOwnedQMenu'). + * (3) a "submenu" in an existing menu (like (1)), in which case the corresponding + * QMenu object is owned by the corresponding Qt5MenuItem. + * + * For (2) and (3), member 'mpQMenu' points to the corresponding QMenu object. + */ class Qt5Menu : public QObject, public SalMenu { Q_OBJECT @@ -34,6 +45,9 @@ private: Qt5Frame* mpFrame; bool mbMenuBar; QMenuBar* mpQMenuBar; +// self-created QMenu that this Qt5Menu represents, if applicable (s. comment for class) +std::unique_ptr mpOwnedQMenu; +// pointer to QMenu owned by the corresponding Qt5MenuItem or self (-> mpOwnedQMenu) QMenu* mpQMenu; QPushButton* mpCloseButton; QMetaObject::Connection maCloseButtonConnection; @@ -58,6 +72,8 @@ public: virtual void SetFrame(const SalFrame* pFrame) override; const Qt5Frame* GetFrame() const; virtual void ShowMenuBar(bool bVisible) override; +virtual bool ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, + FloatWinPopupFlags nFlags) override; Qt5Menu* GetTopLevel(); virtual void SetItemBits(unsigned nPos, MenuItemBits nBits) override; virtual void CheckItem(unsigned nPos, bool bCheck) override; diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index dd5c9895273e..2a3147fa14b8 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -23,6 +23,9 @@ #include #include +#include +#include + Qt5Menu::Qt5Menu(bool bMenuBar) : mpVCLMenu(nullptr) , mpParentSalMenu(nullptr) @@ -76,8 +79,15 @@ void Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos) [pSalMenuItem] { slotMenuAboutToHide(pSalMenuItem); }); } } -else if (mpQMenu) +else { +if (!mpQMenu) +{ +// no QMenu set, instantiate own one +mpOwnedQMenu.reset(new QMenu); +mpQMenu = mpOwnedQMenu.get(); +} + if (pSalMenuItem->mpSubMenu) { // submenu @@ -147,7 +157,9 @@ void Qt5Menu::InsertMenuItem(Qt5MenuItem* pSalMenuItem, unsigned nPos) UpdateActionGroupItem(pSalMenuItem); - pAction->setShortcut(toQString(nAccelKey.GetName(GetFrame()->GetWindow(; +const Qt5Frame* pFrame = GetFrame(); +if (pFrame) + pAction->setShortcut(toQString(nAccelKey.GetName(pFrame->GetWindow(; connect(pAction, &QAction::triggered, this, [pSalMenuItem] { slotMenuTriggered(pSalMenuItem); }); @@ -441,6 +453,11 @@ void Qt5Menu::DoFullMenuUpdate(Menu* pMenuBar) Qt5MenuItem* pSalMenuItem = GetItemAtPos(nItem); InsertMenuItem(pSalMenuItem, nItem); SetItemImage(nItem, pSalMenuItem, pSalMenuItem->maImage); +const bool bShowDisabled += bool(pMenuBar->GetMenuFlags() & MenuFlags::AlwaysShowDisabledEntries) + || !bool(pMenuBar->GetMenuFlags() & M
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/Qt5Widget.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 69e708868f6046cada955a16bca966370ce3218a Author: Michael Weghorn AuthorDate: Thu Feb 20 08:14:36 2020 +0100 Commit: Michael Weghorn CommitDate: Thu Feb 20 10:38:45 2020 +0100 tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverride In fact, the assumption in commit 034f56015c1c7a61faede33fb5306f63b5585632 ("tdf#126785 qt5: Ignore external QEvent::ShortcutOverride") was a fallacy and it's exactly the other way around: "Normal" typing leads to "spontaneous" events of type QEvent::ShortcutOverride, since those originate from outside, are triggered via X11 events or Wayland equivalent, and the non-spontaneous ones are the additional ones that happen when e.g. the Orca screen reader is enabled. In a short test, no non-spontaneous QEvent::ShortcutOverride ever occured when using LibreOffice a bit with Orca disabled on X11 or Wayland (and on Wayland also not with Orca enabled, since Qt accessibility is broken there, s. QTBUG-73945 [1]). (Side note: In a quick test with Qt 5.12.5 and Plasma on Wayland, 'xcbSourceDispatch' from Qt library's qxcbeventdispatcher.cpp was also used in the Wayland case to when processing the keyboard events). [1] https://bugreports.qt.io/browse/QTBUG-73945 Change-Id: I1be1977e67f84fa657f6fc197e0b91822b6a3a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89073 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 0bca51ea55c8..27b617a91568 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -450,12 +450,12 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { -// ignore QEvent::ShortcutOverride events originating from outside the application, +// ignore non-spontaneous QEvent::ShortcutOverride events, // since such an extra event is sent e.g. with Orca screen reader enabled, -// so that two events of that kind (the "real one" and one from outside) +// so that two events of that kind (the "real one" and a non-spontaneous one) // would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' // is called below (s. tdf#122053) -if (pEvent->spontaneous()) +if (!pEvent->spontaneous()) { return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/qt5
vcl/qt5/Qt5Widget.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 620c7ddea10649b03250cd07a050ce4e1935c7b5 Author: Michael Weghorn AuthorDate: Thu Feb 20 08:14:36 2020 +0100 Commit: Katarina Behrens CommitDate: Thu Feb 20 14:14:35 2020 +0100 tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverride In fact, the assumption in commit 034f56015c1c7a61faede33fb5306f63b5585632 ("tdf#126785 qt5: Ignore external QEvent::ShortcutOverride") was a fallacy and it's exactly the other way around: "Normal" typing leads to "spontaneous" events of type QEvent::ShortcutOverride, since those originate from outside, are triggered via X11 events or Wayland equivalent, and the non-spontaneous ones are the additional ones that happen when e.g. the Orca screen reader is enabled. In a short test, no non-spontaneous QEvent::ShortcutOverride ever occured when using LibreOffice a bit with Orca disabled on X11 or Wayland (and on Wayland also not with Orca enabled, since Qt accessibility is broken there, s. QTBUG-73945 [1]). (Side note: In a quick test with Qt 5.12.5 and Plasma on Wayland, 'xcbSourceDispatch' from Qt library's qxcbeventdispatcher.cpp was also used in the Wayland case to when processing the keyboard events). [1] https://bugreports.qt.io/browse/QTBUG-73945 Change-Id: I1be1977e67f84fa657f6fc197e0b91822b6a3a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89073 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 69e708868f6046cada955a16bca966370ce3218a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88960 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index a17bcb0ca7ce..8c3d15b14efa 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -450,12 +450,12 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { -// ignore QEvent::ShortcutOverride events originating from outside the application, +// ignore non-spontaneous QEvent::ShortcutOverride events, // since such an extra event is sent e.g. with Orca screen reader enabled, -// so that two events of that kind (the "real one" and one from outside) +// so that two events of that kind (the "real one" and a non-spontaneous one) // would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' // is called below (s. tdf#122053) -if (pEvent->spontaneous()) +if (!pEvent->spontaneous()) { return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/qt5
vcl/qt5/Qt5Widget.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 2bc83c9691701ffa486babc161e945b285a5d7f1 Author: Michael Weghorn AuthorDate: Thu Feb 20 08:14:36 2020 +0100 Commit: Katarina Behrens CommitDate: Thu Feb 20 15:30:24 2020 +0100 tdf#130794 qt5: Actually, ignore non-spontaneous QEvent::ShortcutOverride In fact, the assumption in commit 034f56015c1c7a61faede33fb5306f63b5585632 ("tdf#126785 qt5: Ignore external QEvent::ShortcutOverride") was a fallacy and it's exactly the other way around: "Normal" typing leads to "spontaneous" events of type QEvent::ShortcutOverride, since those originate from outside, are triggered via X11 events or Wayland equivalent, and the non-spontaneous ones are the additional ones that happen when e.g. the Orca screen reader is enabled. In a short test, no non-spontaneous QEvent::ShortcutOverride ever occured when using LibreOffice a bit with Orca disabled on X11 or Wayland (and on Wayland also not with Orca enabled, since Qt accessibility is broken there, s. QTBUG-73945 [1]). (Side note: In a quick test with Qt 5.12.5 and Plasma on Wayland, 'xcbSourceDispatch' from Qt library's qxcbeventdispatcher.cpp was also used in the Wayland case to when processing the keyboard events). [1] https://bugreports.qt.io/browse/QTBUG-73945 Change-Id: I1be1977e67f84fa657f6fc197e0b91822b6a3a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89073 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 69e708868f6046cada955a16bca966370ce3218a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88961 Reviewed-by: Katarina Behrens diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 8c0c5244c2bb..4f596033e724 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -449,12 +449,12 @@ bool Qt5Widget::handleEvent(Qt5Frame& rFrame, const QWidget& rWidget, QEvent* pE { if (pEvent->type() == QEvent::ShortcutOverride) { -// ignore QEvent::ShortcutOverride events originating from outside the application, +// ignore non-spontaneous QEvent::ShortcutOverride events, // since such an extra event is sent e.g. with Orca screen reader enabled, -// so that two events of that kind (the "real one" and one from outside) +// so that two events of that kind (the "real one" and a non-spontaneous one) // would otherwise be processed, resulting in duplicate input as 'handleKeyEvent' // is called below (s. tdf#122053) -if (pEvent->spontaneous()) +if (!pEvent->spontaneous()) { return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/components/dtranscomp.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 491fa499d6b957b9c8f03fece5ed06d5932e9448 Author: Michael Weghorn AuthorDate: Fri Jul 31 15:04:57 2020 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 31 16:45:06 2020 +0200 tdf#135212 Don't crash when unable to create clipboard Gracefully handle the case where the SalInstance returns an empty Reference when trying to create clipboard. Primary selection support on Wayland has only recently been added to the relevant KDE components ([1], [2]), and an empty Reference would be returned for the qt5/kf5 VCL plugin when trying to create create a clipboard for primary selection in a Plasma Wayland session with that functionality not yet being available. Regression from commit 05d286e0065ff1c10e75827ac4726b5a74747128 ("vcl/clipboard: create instances with uno constructors", 2020-07-07). [1] https://invent.kde.org/plasma/kwayland-server/-/merge_requests/15 [2] https://invent.kde.org/plasma/kwin/-/merge_requests/27 Change-Id: Ia9016f56b775003b2ffe81a6f3bf44f411ad39a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99871 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 7e5f36f67f7d..bd89a1404e01 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -193,7 +193,8 @@ vcl_SystemClipboard_get_implementation( { SolarMutexGuard aGuard; auto xClipboard = ImplGetSVData()->mpDefInst->CreateClipboard( args ); -xClipboard->acquire(); +if (xClipboard.is()) +xClipboard->acquire(); return xClipboard.get(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/source
vcl/source/treelist/iconviewimpl.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 0037f2a071c9d8b94e841e6e7201770e08fdd85c Author: Michael Weghorn AuthorDate: Fri Jun 10 14:06:42 2022 +0200 Commit: Mike Kaganski CommitDate: Tue Jun 14 09:30:09 2022 +0200 vcl: Trigger IconView action on space key as well Handle space key the same as the return key. This e.g. allows to insert the selected element into the formula this way in Math again after the switch to IconView in commit d79c527c2a599c7821d27cf03b95cb79e2abe685 Date: Wed Jun 1 11:20:12 2022 +0300 Use IconView in SmElementsControl gtk3 was already behaving that way without this change in place. Change-Id: I061b286723fedf023551afbb2184abc946b54b9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135592 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 025477e244df2cdb4917e202030c3cab0536550d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135743 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mike Kaganski diff --git a/vcl/source/treelist/iconviewimpl.cxx b/vcl/source/treelist/iconviewimpl.cxx index c350eb49c151..f3f2edfda464 100644 --- a/vcl/source/treelist/iconviewimpl.cxx +++ b/vcl/source/treelist/iconviewimpl.cxx @@ -710,6 +710,7 @@ bool IconViewImpl::KeyInput( const KeyEvent& rKEvt ) break; case KEY_RETURN: +case KEY_SPACE: { bHandled = !m_pView->aDoubleClickHdl.Call(m_pView); break;
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/UAccCOM/MAccessible.cxx | 33 ++-- 1 file changed, 4 insertions(+), 29 deletions(-) New commits: commit d8e827890f9ff3fca642b3af9475704fc376f845 Author: Michael Weghorn AuthorDate: Wed Jun 15 12:47:50 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Jun 15 20:59:45 2022 +0200 wina11y: Drop implemenation for obsolete IAccessible::put_accName Just return `E_NOTIMPL`, as the `IAccessible::put_accName` doc now says [1]: > The IAccessible::put_accName method is no longer supported. Client > applications should use a control-specific workaround, such as the > SetWindowText function. Servers should return E_NOTIMPL. [1] https://docs.microsoft.com/en-us/windows/win32/api/oleacc/nf-oleacc-iaccessible-put_accname Change-Id: I4b36b6a4c4215f237ba7e7583d2f130e8d80f200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135903 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index f2f616980157..69353484d522 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -1049,37 +1049,12 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::QueryService(REFGUID guidService } /** -* Set the accessible name of the current COM object self or its one child from UNO. -* @paramvarChild, vt member of varChild must be VT_I4,and lVal member stores the child ID, -* the child ID specify child index from 0 to children count, 0 stands for object self. -* @paramszName, the name used to set the name of the proper object. -* @return S_OK if successful and E_FAIL if failure. +* No longer supported according to IAccessible doc. +* Servers should return E_NOTIMPL */ -COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName(VARIANT varChild, BSTR szName) +COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::put_accName(VARIANT, BSTR) { -SolarMutexGuard g; - -try { -if (m_isDestroy) return S_FALSE; -if(varChild.vt==VT_I4) -{ -if(varChild.lVal==CHILDID_SELF) -{ -SysFreeString(m_pszName); -m_pszName=SysAllocString(szName); -return S_OK; -} - -long lVal = varChild.lVal; -varChild.lVal = CHILDID_SELF; -IMAccessible *pChild = this->GetChildInterface(lVal); -if(!pChild) -return E_FAIL; -return pChild->put_accName(varChild,szName); -} -return E_FAIL; - -} catch(...) { return E_FAIL; } +return E_NOTIMPL; } /**
[Libreoffice-commits] core.git: sw/source
sw/source/core/access/accpara.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 8bb6190dd406390b404f0c1855894e8a48d0fda2 Author: Michael Weghorn AuthorDate: Wed Jun 15 09:55:10 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Jun 15 22:42:52 2022 +0200 tdf#147084 sw a11y: Ensure focus event gets sent when moving to table The code responsible for sending an a11y focus event when the cursor moves from elsewhere into e.g. a table cell depends on the fact that the cursor was previously not in that object, i.e. the previous/old cursor/caret position is -1, s. e.g. `SwAccessibleParagraph::InvalidateCursorPos_`. Already setting `m_nOldCaretPos` to the the actual cursor position instead of -1 in the `SwAccessibleParagraph` ctor resulted in that assumption no longer holding when initially moving the cursor into a table (cell), so no focus event would get sent and the NVDA screen reader on Windows would therefore also not refer to the correct a11y object when handling the subsequent CARET_CHANGED event and fail to retrieve the caret position in the previously focused object (because focus/cursor have moved on). Make focus announcement work by only setting `m_nOldCaretPos` to the actual cursor position when processing the corresponding events related to change of cursor position, not in the ctor. Setting the cursor pos already in the ctor had been added to fix an issue with IM handling in commit 817da76529aa39f641d76805d429b09681348811 Date: Sat Nov 8 19:37:22 2014 +0300 fdo#85912 Delete surrounding text failing for input method calls regression. When Apache OpenOffice code was merged in, a few lines were removed for no apparent reason. This just adds the code back in, and resolves the bug. See the comments in fdo#85912 for details about this bug. It is hard for majority language users to reproduce since they don't use ibus/kmfl to type their language's letters. The issue mentioned in the referenced tdf#85912 (== fdo#85912) is not reproducible for me with this change here in place either, neither with the gtk3 VCL plugin nor with kf5 (for which the relevant IM handling has been added in the context of tdf#149255, which has some more information on the ibus/kmfl setup needed to reproduce the original bug). The bug report already mentioned that the issue was reproducible with Linux 13 Mint and LibreOffice 4.3.3.2, but not Linux 17 Mint with exactly the same LO version, so without being able to analyze this any further, the best explanation I can come up with is that the root cause for tdf#85912 was somewhere else and has been fixed in the meanwhile. In hindsight, comment 5 in tdf#85912 already has further information on why adding the assignment back to the ctor was problematic: > Reviewed OpenOffice code as well. The missing lines exist (but are > commented out) in the current AOO code. The commenting out > occurred when Steven Ying implemented his huge "AOO IA2 enabled draft > version 1" change on 27 Sep 2013. > https://github.com/apache/openoffice/commit/0deba7fbda3d9908785c25a443701a293b6f4e71#diff-50d752f41bb880abd1094d09d9e1a7fc > > The current AOO comment is > // If this object has the focus, then it is remembered by the map itself. > // not necessary to remember this pos here. Generally, the pos will be updated in invalidateXXX method, which may fire the > //Focus event based on the difference of new & old caret pos. > //nOldCaretPos = GetCaretPos(); Change-Id: If8cd4e92bc1f6233775ccc2834230f3a388ccadb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135868 Reviewed-by: Justin Luth Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 1447b97a6dbd..94a1df603c4a 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -412,9 +412,6 @@ SwAccessibleParagraph::SwAccessibleParagraph( //Get the real heading level, Heading1 ~ Heading10 m_nHeadingLevel = GetRealHeadingLevel(); SetName( OUString() ); // set an empty accessibility name for paragraphs - -// If this object has the focus, then it is remembered by the map itself. -m_nOldCaretPos = GetCaretPos(); } SwAccessibleParagraph::~SwAccessibleParagraph()
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/source
sw/source/core/access/accpara.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 2603a7d51d5c6a283831ba8b92af561eb5931692 Author: Michael Weghorn AuthorDate: Wed Jun 15 09:55:10 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Jun 16 07:55:01 2022 +0200 tdf#147084 sw a11y: Ensure focus event gets sent when moving to table The code responsible for sending an a11y focus event when the cursor moves from elsewhere into e.g. a table cell depends on the fact that the cursor was previously not in that object, i.e. the previous/old cursor/caret position is -1, s. e.g. `SwAccessibleParagraph::InvalidateCursorPos_`. Already setting `m_nOldCaretPos` to the the actual cursor position instead of -1 in the `SwAccessibleParagraph` ctor resulted in that assumption no longer holding when initially moving the cursor into a table (cell), so no focus event would get sent and the NVDA screen reader on Windows would therefore also not refer to the correct a11y object when handling the subsequent CARET_CHANGED event and fail to retrieve the caret position in the previously focused object (because focus/cursor have moved on). Make focus announcement work by only setting `m_nOldCaretPos` to the actual cursor position when processing the corresponding events related to change of cursor position, not in the ctor. Setting the cursor pos already in the ctor had been added to fix an issue with IM handling in commit 817da76529aa39f641d76805d429b09681348811 Date: Sat Nov 8 19:37:22 2014 +0300 fdo#85912 Delete surrounding text failing for input method calls regression. When Apache OpenOffice code was merged in, a few lines were removed for no apparent reason. This just adds the code back in, and resolves the bug. See the comments in fdo#85912 for details about this bug. It is hard for majority language users to reproduce since they don't use ibus/kmfl to type their language's letters. The issue mentioned in the referenced tdf#85912 (== fdo#85912) is not reproducible for me with this change here in place either, neither with the gtk3 VCL plugin nor with kf5 (for which the relevant IM handling has been added in the context of tdf#149255, which has some more information on the ibus/kmfl setup needed to reproduce the original bug). The bug report already mentioned that the issue was reproducible with Linux 13 Mint and LibreOffice 4.3.3.2, but not Linux 17 Mint with exactly the same LO version, so without being able to analyze this any further, the best explanation I can come up with is that the root cause for tdf#85912 was somewhere else and has been fixed in the meanwhile. In hindsight, comment 5 in tdf#85912 already has further information on why adding the assignment back to the ctor was problematic: > Reviewed OpenOffice code as well. The missing lines exist (but are > commented out) in the current AOO code. The commenting out > occurred when Steven Ying implemented his huge "AOO IA2 enabled draft > version 1" change on 27 Sep 2013. > https://github.com/apache/openoffice/commit/0deba7fbda3d9908785c25a443701a293b6f4e71#diff-50d752f41bb880abd1094d09d9e1a7fc > > The current AOO comment is > // If this object has the focus, then it is remembered by the map itself. > // not necessary to remember this pos here. Generally, the pos will be updated in invalidateXXX method, which may fire the > //Focus event based on the difference of new & old caret pos. > //nOldCaretPos = GetCaretPos(); Change-Id: If8cd4e92bc1f6233775ccc2834230f3a388ccadb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135868 Reviewed-by: Justin Luth Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 38b14d4b61cdcf894d42e159bcf7aa8edab44de8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135941 diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 1447b97a6dbd..94a1df603c4a 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -412,9 +412,6 @@ SwAccessibleParagraph::SwAccessibleParagraph( //Get the real heading level, Heading1 ~ Heading10 m_nHeadingLevel = GetRealHeadingLevel(); SetName( OUString() ); // set an empty accessibility name for paragraphs - -// If this object has the focus, then it is remembered by the map itself. -m_nOldCaretPos = GetCaretPos(); } SwAccessibleParagraph::~SwAccessibleParagraph()
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/QtAccessibleEventListener.hxx |3 vcl/qt5/QtAccessibleEventListener.cxx | 115 +- 2 files changed, 116 insertions(+), 2 deletions(-) New commits: commit 8c3e8af0e60865ec6d38e2117efdb4ed2f10a20c Author: Michael Weghorn AuthorDate: Fri Jun 17 17:29:19 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Jun 17 19:30:29 2022 +0200 qt a11y: Forward STATE_CHANGED event as such Handle `AccessibleEventId::STATE_CHANGED` by sending a corresponding `QAccessibleStateChangeEvent`. The previous way of sending a `QAccessible::ForegroundChanged` event looked rather arbitrary and had no effect in practice, since that type of event is currently ignored in Qt's AT-SPI adapter anyway. At this point in time, the Qt library doesn't forward changes of all states to the AT-SPI layer. Most notably, it ignores changes to the focused state. (Qt itself uses events of type `QAccessible::Focus` instead of `QAccessibleStateChangeEvent` with the `focused` state set to notify about focus changes, but that's not exactly the same, and e.g. causes Orca to ignore some focus changes). I have submitted a change to Qt to implement forwarding of `QAccessibleStateChangeEvent`s for the focused state to the AT-SPI layer, currently awaiting review. [1] With that Qt change in place, Orca still ignored these events in LibreOffice message dialogs, since those use a11y role `ALERT`, which wasn't previously considered when trying to retrieve a potential dialog that an a11y object belonged to. The corresponding Orca merge request [2] has just been merged. With these two in place, Orca now announces the focused button when switching focus using the tab key e.g. in the "Save document?" dialog when using the qt6 VCL plugin. (Most other things in the LO UI are still usually not announced.) For some reason, forwarding changes to state `AccessibleStateType::ACTIVE` resulted in Orca becoming unresponsive (stop talking) quite quickly. That needs further analysis, so that state change isn't forwarded to Qt for now. [1] https://codereview.qt-project.org/c/qt/qtbase/+/416510 [2] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/127 Change-Id: I81c9a0f5ec8c74f95943d3073bba5b304f995d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136057 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/inc/qt5/QtAccessibleEventListener.hxx b/vcl/inc/qt5/QtAccessibleEventListener.hxx index a73f6d31f2f8..1103dc9da598 100644 --- a/vcl/inc/qt5/QtAccessibleEventListener.hxx +++ b/vcl/inc/qt5/QtAccessibleEventListener.hxx @@ -33,6 +33,9 @@ public: private: css::uno::Reference m_xAccessible; QtAccessibleWidget* m_pAccessibleWidget; + +static void HandleStateChangedEvent(QAccessibleInterface* pQAccessibleInterface, +const css::accessibility::AccessibleEventObject& rEvent); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 515584351c74..ee9acc651599 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -41,6 +42,117 @@ QtAccessibleEventListener::QtAccessibleEventListener(const Reference>= nState; +// States in 'QAccessibleStateChangeEvent' indicate what states have changed, so if e.g. +// an object loses focus (not just if it gains it), 'focus' state needs to be set to 'true', +// so retrieve the old/previous value from the event if necessary. +if (nState == AccessibleStateType::INVALID) +rEvent.OldValue >>= nState; + +switch (nState) +{ +case AccessibleStateType::ACTIVE: +// ignore for now, since it somehow causes Orca to become unresponsive quite quickly +// TODO: analyze further and fix root cause +/* +aState.active = true; +break; +*/ +return; +case AccessibleStateType::BUSY: +aState.busy = true; +break; +case AccessibleStateType::CHECKED: +aState.checked = true; +break; +case AccessibleStateType::COLLAPSE: +aState.collapsed = true; +break; +case AccessibleStateType::DEFAULT: +aState.defaultButton = true; +break; +case AccessibleStateType::ENABLED: +aState.disabled = true; +break; +case AccessibleStateType::EDITABLE: +aState.editable = true; +break; +case AccessibleStateType::EXPANDABLE: +aState.expandable = true; +break; +case AccessibleStateType::EXPANDED: +
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleWidget.cxx |4 1 file changed, 4 insertions(+) New commits: commit 85c564285036f92f76c1095487c5d5e12709b1e2 Author: Michael Weghorn AuthorDate: Sat Jun 18 10:54:45 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Jun 18 12:36:24 2022 +0200 qt a11y: Handle special value of -1 for text offset As the note in the Qt doc for `QAccessibleTextInterface::textAtOffset` says [1]: > An offset of -1 is used for the text length and custom implementations > of this function have to return the result as if the length was passed > in as offset. Without this, LO happened to crash quite frequently with Orca enabled when moving the cursor between paragraphs in a Writer doc when using the qt6 VCL plugin in a WIP branch including more changes to qt5/qt6 a11y. [1] https://doc.qt.io/qt-6/qaccessibletextinterface.html#textAtOffset Change-Id: I5c6ca69f8a9b2edad204bb1af740d4de17668f18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136073 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 0211fc045c27..3461ec1ae38c 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -1039,6 +1039,10 @@ QString QtAccessibleWidget::textAtOffset(int offset, QAccessible::TextBoundaryTy sal_Int16 nUnoBoundaryType = lcl_matchQtTextBoundaryType(boundaryType); assert(nUnoBoundaryType > 0); +// special value of -1 for offset means text length +if (offset == -1) +offset = xText->getCharacterCount(); + const TextSegment segment = xText->getTextAtIndex(offset, nUnoBoundaryType); *startOffset = segment.SegmentStart; *endOffset = segment.SegmentEnd;
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/QtFrame.hxx |6 ++ vcl/qt5/QtFrame.cxx |4 vcl/qt5/QtX11Support.cxx | 12 +++- 3 files changed, 17 insertions(+), 5 deletions(-) New commits: commit e4d23c27288b99c3ed3cfa332ff308b31c01f97d Author: Michael Weghorn AuthorDate: Sat Jun 18 21:11:28 2022 +0200 Commit: Michael Weghorn CommitDate: Sun Jun 19 02:09:29 2022 +0200 qt: Fix qt6 build after fbc61e06584ff8e6d9240f8b67be8dc28ecab5b9 Failed like this: In file included from /home/michi/development/git/libreoffice/vcl/qt6/QtX11Support.cxx:10: /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtX11Support.cxx:15:10: fatal error: QtX11Extras/QX11Info: No such file or directory 15 | #include | ^~ compilation terminated. make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:334: /home/michi/development/git/libreoffice/workdir/CxxObject/vcl/qt6/QtX11Support.o] Error 1 make[1]: *** Waiting for unfinished jobs In file included from /home/michi/development/git/libreoffice/vcl/qt6/QtFrame.cxx:10: /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx: In member function ‘virtual void QtFrame::StartPresentation(bool)’: /home/michi/development/git/libreoffice/vcl/qt6/../qt5/QtFrame.cxx:746:5: error: ‘m_ScreenSaverInhibitor’ was not declared in this scope 746 | m_ScreenSaverInhibitor.inhibit(bStart, u"presentation", bIsX11, aRootWindow, aDisplay); | ^~ make[1]: *** [/home/michi/development/git/libreoffice/solenv/gbuild/LinkTarget.mk:334: /home/michi/development/git/libreoffice/workdir/CxxObject/vcl/qt6/QtFrame.o] Error 1 make: *** [Makefile:288: build] Error 2 As mentioned in [1], `QX11Info` has been removed in Qt 6. The `ScreenSaverInhibitor` related code (except for the `QX11Info` part) can be used for Qt 6 as well, so adapt the checks in the header accordingly. [1] https://www.qt.io/blog/qt-extras-modules-in-qt-6 Co-authored-by: Jan-Marek Glogowski Change-Id: Ifd546b4f4210aaf7f09ebaa8c36d2a031763d492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136091 Reviewed-by: Jan-Marek Glogowski Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx index 562c7d3ba89a..963572ca819b 100644 --- a/vcl/inc/qt5/QtFrame.hxx +++ b/vcl/inc/qt5/QtFrame.hxx @@ -33,7 +33,7 @@ #include -#if CHECK_QT5_USING_X11 +#if CHECK_ANY_QT_USING_X11 #include // any better way to get rid of the X11 / Qt type clashes? #undef Bool @@ -101,10 +101,8 @@ class VCLPLUG_QT_PUBLIC QtFrame : public QObject, public SalFrame sal_uInt32 m_nRestoreScreen; QRect m_aRestoreGeometry; -#if CHECK_QT5_USING_X11 -ScreenSaverInhibitor m_ScreenSaverInhibitor; -#endif #if CHECK_ANY_QT_USING_X11 +ScreenSaverInhibitor m_ScreenSaverInhibitor; ModKeyFlags m_nKeyModifiers; #endif diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 006ad4a8bfc1..9ccfd8ec5147 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -728,6 +728,7 @@ void QtFrame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen) void QtFrame::StartPresentation(bool bStart) { +#if CHECK_ANY_QT_USING_X11 // meh - so there's no Qt platform independent solution // https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver assert(m_aSystemData.platform != SystemEnvData::Platform::Invalid); @@ -744,6 +745,9 @@ void QtFrame::StartPresentation(bool bStart) #endif m_ScreenSaverInhibitor.inhibit(bStart, u"presentation", bIsX11, aRootWindow, aDisplay); +#else +Q_UNUSED(bStart) +#endif } void QtFrame::SetAlwaysOnTop(bool bOnTop) diff --git a/vcl/qt5/QtX11Support.cxx b/vcl/qt5/QtX11Support.cxx index 93f3085ffab3..d6f372fdadf5 100644 --- a/vcl/qt5/QtX11Support.cxx +++ b/vcl/qt5/QtX11Support.cxx @@ -12,11 +12,14 @@ #include #include -#include #include #include +#if CHECK_QT5_USING_X11 +#include +#endif + #if QT5_HAVE_XCB_ICCCM #include #endif @@ -41,16 +44,19 @@ xcb_atom_t QtX11Support::lookupAtom(xcb_connection_t* pConn, const char* const s void QtX11Support::fetchAtoms() { +#if CHECK_QT5_USING_X11 if (m_bDidAtomLookups) return; m_bDidAtomLookups = true; xcb_connection_t* pXcbConn = QX11Info::connection(); m_nWindowGroupAtom = lookupAtom(pXcbConn, m_sWindowGroupName); +#endif } void QtX11Support::setApplicationID(const xcb_window_t nWinId, std::u16string_view rWMClass) { +#if CHECK_QT5_USING_X11 OString aResClass = OUStringToOString(rWMClass, RTL_TEXTENCODING_ASCII_US); const char* pResClass = !aResClass.isEmpty() ? aResClass.getStr() : SalGenericSystem::getFrameClassName(); @@ -65,6 +71,10 @@ void QtX11Support::setApplicationI
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtMenu.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit ee3976f2c613f9015477ab327996c074e8516f9d Author: Michael Weghorn AuthorDate: Fri Jun 24 10:27:04 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Jul 1 07:28:01 2022 +0200 tdf#149680 qt: Open native popup menu at given position Calculate the position at which to open the popup menu from the passed window and rectangle, rather than always opening the native popup menu at the cursor position. The commit message in commit 1e0b16f8695498e4eea7c2208aabf7e7664ce749 Date: Wed Feb 12 08:07:42 2020 +0100 tdf#128921 tdf#130341 tdf#122053 qt5: Native PopupMenus which had implemented native poup menus, already said: > For now, this always shows the popup menu at cursor position, which > can be changed by taking the Rectangle passed to > 'Qt5Menu::ShowNativePopupMenu' into account if there should be any > need. Change-Id: If1a44b6d53f3dcd6fa7ceec0738219f11cfc22c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136356 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx index 5a4d3e859e9d..c1e4cb0e1a29 100644 --- a/vcl/qt5/QtMenu.cxx +++ b/vcl/qt5/QtMenu.cxx @@ -828,15 +828,19 @@ void QtMenu::ShowCloseButton(bool bShow) lcl_force_menubar_layout_update(*mpQMenuBar); } -bool QtMenu::ShowNativePopupMenu(FloatingWindow*, const tools::Rectangle&, +bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { assert(mpQMenu); DoFullMenuUpdate(mpVCLMenu); mpQMenu->setTearOffEnabled(bool(nFlags & FloatWinPopupFlags::AllowTearOff)); -const QPoint aPos = QCursor::pos(); -mpQMenu->exec(aPos); +const VclPtr xParent = pWin->ImplGetWindowImpl()->mpRealParent; +const QtFrame* pFrame = static_cast(xParent->ImplGetFrame()); +assert(pFrame); +const tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); +const QRect aRect = toQRect(aFloatRect, 1 / pFrame->devicePixelRatioF()); +mpQMenu->exec(aRect.topLeft()); return true; }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/qt5
vcl/qt5/QtMenu.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit fc5edcf8c02ce81715a3db7c58e9b6d4a9a3b796 Author: Michael Weghorn AuthorDate: Fri Jun 24 10:27:04 2022 +0200 Commit: Xisco Fauli CommitDate: Fri Jul 1 15:06:32 2022 +0200 tdf#149680 qt: Open native popup menu at given position Calculate the position at which to open the popup menu from the passed window and rectangle, rather than always opening the native popup menu at the cursor position. The commit message in commit 1e0b16f8695498e4eea7c2208aabf7e7664ce749 Date: Wed Feb 12 08:07:42 2020 +0100 tdf#128921 tdf#130341 tdf#122053 qt5: Native PopupMenus which had implemented native poup menus, already said: > For now, this always shows the popup menu at cursor position, which > can be changed by taking the Rectangle passed to > 'Qt5Menu::ShowNativePopupMenu' into account if there should be any > need. Change-Id: If1a44b6d53f3dcd6fa7ceec0738219f11cfc22c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136356 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit ee3976f2c613f9015477ab327996c074e8516f9d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136707 Reviewed-by: Xisco Fauli diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx index ccd2eb431f7e..83ca58ad4092 100644 --- a/vcl/qt5/QtMenu.cxx +++ b/vcl/qt5/QtMenu.cxx @@ -828,15 +828,19 @@ void QtMenu::ShowCloseButton(bool bShow) lcl_force_menubar_layout_update(*mpQMenuBar); } -bool QtMenu::ShowNativePopupMenu(FloatingWindow*, const tools::Rectangle&, +bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { assert(mpQMenu); DoFullMenuUpdate(mpVCLMenu); mpQMenu->setTearOffEnabled(bool(nFlags & FloatWinPopupFlags::AllowTearOff)); -const QPoint aPos = QCursor::pos(); -mpQMenu->exec(aPos); +const VclPtr xParent = pWin->ImplGetWindowImpl()->mpRealParent; +const QtFrame* pFrame = static_cast(xParent->ImplGetFrame()); +assert(pFrame); +const tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); +const QRect aRect = toQRect(aFloatRect, 1 / pFrame->devicePixelRatioF()); +mpQMenu->exec(aRect.topLeft()); return true; }
[Libreoffice-commits] core.git: vcl/qt5 vcl/unx vcl/win
vcl/qt5/QtFrame.cxx |4 vcl/unx/gtk3/salnativewidgets-gtk.cxx |5 + vcl/win/window/salframe.cxx |4 3 files changed, 13 insertions(+) New commits: commit 169ff786a6694ab412d53c911550db101fb50876 Author: Michael Weghorn AuthorDate: Fri Jul 1 10:45:13 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Jul 2 06:55:15 2022 +0200 tdf#149804 Set newly introduced list box colors from system colors commit 3c6a53b9ce64180b2a03e097c1844f7496f26815 Date: Sat Apr 17 14:49:43 2021 +0200 improve the look of the macOS combobox had introduced separate style colors to be used for list/combo boxes, but since those new colors were not set explicitly for gtk3, qt5/qt6 and Windows, this resulted in style/theme/system colors no longer being used, but only the default colors introduced in above commit. This sets the style/theme/system colors for qt5/qt6, gtk3 and Windows as well, using the same values that were used previously. Change-Id: I31401af38b991e7e0cdc436b894ee0f491a22752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136735 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 3a240b2808ca..1b9f8ae88175 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -1085,6 +1085,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings) // Text style.SetFieldTextColor(aText); style.SetFieldRolloverTextColor(aText); +style.SetListBoxWindowTextColor(aText); style.SetWindowTextColor(aText); style.SetToolTextColor(aText); @@ -1092,6 +1093,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings) style.SetFieldColor(aBase); style.SetWindowColor(aBase); style.SetActiveTabColor(aBase); +style.SetListBoxWindowBackgroundColor(aBase); style.SetAlternatingRowColor(toColor(pal.color(QPalette::Active, QPalette::AlternateBase))); // Buttons @@ -1129,6 +1131,8 @@ void QtFrame::UpdateSettings(AllSettings& rSettings) // Selection style.SetHighlightColor(aHigh); style.SetHighlightTextColor(aHighText); +style.SetListBoxWindowHighlightColor(aHigh); +style.SetListBoxWindowHighlightTextColor(aHighText); style.SetActiveColor(aHigh); style.SetActiveTextColor(aHighText); diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 3eaffc903e16..3074dd0fbad7 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2306,6 +2306,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) aStyleSet.SetButtonTextColor( aTextColor ); aStyleSet.SetDefaultActionButtonTextColor(aTextColor); aStyleSet.SetActionButtonTextColor(aTextColor); +aStyleSet.SetListBoxWindowTextColor( aTextColor ); aStyleSet.SetRadioCheckTextColor( aTextColor ); aStyleSet.SetGroupTextColor( aTextColor ); aStyleSet.SetLabelTextColor( aTextColor ); @@ -2406,6 +2407,8 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) ::Color aHighlightTextColor = getColor( text_color ); aStyleSet.SetHighlightColor( aHighlightColor ); aStyleSet.SetHighlightTextColor( aHighlightTextColor ); +aStyleSet.SetListBoxWindowHighlightColor( aHighlightColor ); +aStyleSet.SetListBoxWindowHighlightTextColor( aHighlightTextColor ); // make active like highlight, except with a small contrast. Note, see // a GtkListBoxRow in a GtkStackSidebar for a gtk widget with a // difference between highlighted and highlighted with focus. @@ -2424,6 +2427,8 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) aStyleSet.SetFieldColor( aBackFieldColor ); // This baby is the default page/paper color aStyleSet.SetWindowColor( aBackFieldColor ); +// listbox background color +aStyleSet.SetListBoxWindowBackgroundColor( aBackFieldColor ); #if GTK_CHECK_VERSION(4, 0, 0) double caretAspectRatio = 0.04f; diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index b419a259c450..598b5ea70fa8 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2714,10 +2714,14 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetActiveTabColor( aStyleSettings.GetWindowColor() ); aStyleSettings.SetToolTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) ); aStyleSettings.SetFieldColor( aStyleSettings.GetWindowColor() ); +aStyleSettings.SetListBoxWindowBackgroundColor( aStyleSettings.GetWindowColor() ); aStyleSettings.SetFieldTextColor( aStyleSettings.GetWindowTextColor() ); aStyleSettings.SetFieldRolloverTextColor( aStyleSettings.GetFieldTextColor() ); +aStyleSettings.SetListBoxWindowTextColor( aStyleSettings.GetFieldTe
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleWidget.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1a8132515babca53b1f1a464236e05f780cbfef3 Author: Michael Weghorn AuthorDate: Sat Jul 2 11:00:01 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Jul 2 12:41:21 2022 +0200 tdf#149816 qt a11y: Report position in screen coordinates `QAccessibleInterface::rect()` is supposed to report the geometry in screen coordinates [1]. `XAccessibleComponent::getLocationOnScreen` returns the position in screen coordinates, so use that instead of `XAccessibleComponent::getLocation`, which returns the position relative to the parent. With this in place, Accerciser correctly highlights the area of the item curently selected in its treeview of the LO a11y hierarchy. [1] https://doc.qt.io/qt-6/qaccessibleinterface.html#rect Change-Id: Iefb1e8792cd3ee720feafc81744e5e6ed6a949c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136781 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 3461ec1ae38c..5e66459ce054 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -264,7 +264,7 @@ QRect QtAccessibleWidget::rect() const return QRect(); Reference xAccessibleComponent(xAc, UNO_QUERY); -awt::Point aPoint = xAccessibleComponent->getLocation(); +awt::Point aPoint = xAccessibleComponent->getLocationOnScreen(); awt::Size aSize = xAccessibleComponent->getSize(); return QRect(aPoint.X, aPoint.Y, aSize.Width, aSize.Height);
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/QtAccessibleWidget.hxx |9 + vcl/qt5/QtAccessibleWidget.cxx | 21 ++--- 2 files changed, 23 insertions(+), 7 deletions(-) New commits: commit 3a9d36d49d1fc7bd0b461d0ef1d1cc5a6c3a76dd Author: Michael Weghorn AuthorDate: Sat Jul 2 14:11:34 2022 +0200 Commit: Michael Weghorn CommitDate: Sat Jul 2 16:25:07 2022 +0200 qt a11y: Only return actually supported a11y interfaces Let `QtAccessibleWidget::interface_cast` only return a pointer to self if the underlying accessible (`m_xAccessible`)'s context implements the `XAccessible...` interface needed to have the corresponding `QAccessible...Interface` methods do anything useful (s.a. the checks at the beginning of the implementations of the corresponding `QAccessible...Interface` methods). This way, the other interfaces (or their AT-SPI equivalents) are no longer advertised as supported. (See the corresponding handling of the "GetInterfaces" AT-SPI method inside of the Qt library [1].) While at it, also add/adjust the comments indicating what methods override those from `QAccessibleTable{,Cell}Interface`. I ran into this when clicking through the LO a11y hierarchy in the Accerciser tree view and seeing the following warning in the terminal from which I had started Accerciser, after clicking on an item that was in no way related to any table in the first place: > (accerciser:192270): dbind-WARNING **: 14:05:51.582: atspi_dbus_get_property: expected a variant when fetching Caption from interface org.a11y.atspi.Table; got (so) With this change in place, unsupported interfaces are grayed out in Accerciser's "Interface Viewer" as expected, rather than being shown as active, but not displaying any useful data. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?h=6.3.0#n1408 Change-Id: I1edbd451514253392e6b0a9caa6ffef2f789b55c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136782 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/inc/qt5/QtAccessibleWidget.hxx b/vcl/inc/qt5/QtAccessibleWidget.hxx index 102b5658fb28..fdd97b0b407d 100644 --- a/vcl/inc/qt5/QtAccessibleWidget.hxx +++ b/vcl/inc/qt5/QtAccessibleWidget.hxx @@ -153,6 +153,15 @@ private: css::uno::Reference m_xAccessible; css::uno::Reference getAccessibleContextImpl() const; css::uno::Reference getAccessibleTableForParent() const; + +template bool accessibleProvidesInterface() const +{ +css::uno::Reference xContext += getAccessibleContextImpl(); +css::uno::Reference xInterface(xContext, css::uno::UNO_QUERY); +return xInterface.is(); +} + QObject* m_pObject; }; diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 5e66459ce054..88616a555efd 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -734,17 +734,23 @@ QColor QtAccessibleWidget::backgroundColor() const void* QtAccessibleWidget::interface_cast(QAccessible::InterfaceType t) { -if (t == QAccessible::ActionInterface) +if (t == QAccessible::ActionInterface && accessibleProvidesInterface()) return static_cast(this); -if (t == QAccessible::TextInterface) +if (t == QAccessible::TextInterface && accessibleProvidesInterface()) return static_cast(this); -if (t == QAccessible::EditableTextInterface) +if (t == QAccessible::EditableTextInterface +&& accessibleProvidesInterface()) return static_cast(this); -if (t == QAccessible::ValueInterface) +if (t == QAccessible::ValueInterface && accessibleProvidesInterface()) return static_cast(this); if (t == QAccessible::TableCellInterface) -return static_cast(this); -if (t == QAccessible::TableInterface) +{ +// parent must be a table +Reference xTable = getAccessibleTableForParent(); +if (xTable.is()) +return static_cast(this); +} +if (t == QAccessible::TableInterface && accessibleProvidesInterface()) return static_cast(this); return nullptr; } @@ -1164,7 +1170,7 @@ void QtAccessibleWidget::setCurrentValue(const QVariant& value) xValue->setCurrentValue(Any(value.toDouble())); } -// QAccessibleTable +// QAccessibleTableInterface QAccessibleInterface* QtAccessibleWidget::caption() const { Reference xAc = getAccessibleContextImpl(); @@ -1386,6 +1392,7 @@ bool QtAccessibleWidget::unselectRow(int row) return xTableSelection->unselectRow(row); } +// QAccessibleTableCellInterface QList QtAccessibleWidget::columnHeaderCells() const { SAL_WARN("vcl.qt", "Unsupported QAccessibleTableCellInterface::columnHeaderCells");
[Libreoffice-commits] core.git: vcl/source
vcl/source/app/settings.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bf731dedfad5f498e4eebdc9fbf776c6e10eafce Author: Michael Weghorn AuthorDate: Fri Jul 1 13:58:07 2022 +0200 Commit: Noel Grandin CommitDate: Mon Jul 4 14:18:42 2022 +0200 tdf#149804 Set default listbox bg color to white This restores white background color for list/combo boxes for the the "gen" VCL plugin after commit 3c6a53b9ce64180b2a03e097c1844f7496f26815 Date: Sat Apr 17 14:49:43 2021 +0200 improve the look of the macOS combobox Other VCL plugins and Windows, which use the system style, are covered in Change-Id I31401af38b991e7e0cdc436b894ee0f491a22752, "tdf#149804 Set newly introduced list box colors from system colors". macOS Should be unaffected by this change of the default color, since it explicitly sets one in `AquaSalFrame::UpdateSettings`. Change-Id: Ia9a660bceade683386a07c84a45a1757af38882f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136738 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 82093fcf2d65..bed7e4c90a62 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -700,7 +700,7 @@ void ImplStyleData::SetStandardStyles() maMenuBarRolloverColor = COL_BLUE; maMenuBorderColor = COL_LIGHTGRAY; maMenuTextColor = COL_BLACK; -maListBoxWindowBackgroundColor = COL_LIGHTGRAY; +maListBoxWindowBackgroundColor = COL_WHITE; maListBoxWindowTextColor= COL_BLACK; maListBoxWindowHighlightColor = COL_BLUE; maListBoxWindowHighlightTextColor = COL_WHITE;
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleWidget.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit e4066a41406b1ddd454901b4fa718cf9be2746c4 Author: Michael Weghorn AuthorDate: Tue Jul 5 18:30:02 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Jul 5 20:30:00 2022 +0200 qt a11y: Implement QtAccessibleWidget::table Implement that `QAccessibleTableCellInterface::table` override by returning the parent, if it is a table. This turned out to be the missing piece when working on an implementation for the Qt library to expose the AT-SPI table cell interface for a11y objects that implement `QAccessibleTableCellInterface`, and testing the "GetTable" method by calling `acc.queryTableCell().get_table()` on a selected LO Calc cell in Accerciser's IPython console. Change-Id: I6144c613f31cafc338ccac739cd7db1bf314d4a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136836 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx index 88616a555efd..44d9f896217b 100644 --- a/vcl/qt5/QtAccessibleWidget.cxx +++ b/vcl/qt5/QtAccessibleWidget.cxx @@ -1480,8 +1480,15 @@ int QtAccessibleWidget::rowIndex() const QAccessibleInterface* QtAccessibleWidget::table() const { -SAL_WARN("vcl.qt", "Unsupported QAccessibleTableCellInterface::table"); -return nullptr; +Reference xTable = getAccessibleTableForParent(); +if (!xTable.is()) +return nullptr; + +Reference xTableAcc(xTable, UNO_QUERY); +if (!xTableAcc.is()) +return nullptr; + +return QAccessible::queryAccessibleInterface(new QtXAccessible(xTableAcc)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/qt5
vcl/qt5/QtMenu.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 3f8c6e73bc23d3295ea97f204745cf1869272c66 Author: Michael Weghorn AuthorDate: Fri Jun 24 10:27:04 2022 +0200 Commit: Michael Stahl CommitDate: Fri Jul 8 11:33:26 2022 +0200 tdf#149680 qt: Open native popup menu at given position Calculate the position at which to open the popup menu from the passed window and rectangle, rather than always opening the native popup menu at the cursor position. The commit message in commit 1e0b16f8695498e4eea7c2208aabf7e7664ce749 Date: Wed Feb 12 08:07:42 2020 +0100 tdf#128921 tdf#130341 tdf#122053 qt5: Native PopupMenus which had implemented native poup menus, already said: > For now, this always shows the popup menu at cursor position, which > can be changed by taking the Rectangle passed to > 'Qt5Menu::ShowNativePopupMenu' into account if there should be any > need. Change-Id: If1a44b6d53f3dcd6fa7ceec0738219f11cfc22c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136356 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit ee3976f2c613f9015477ab327996c074e8516f9d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136707 Reviewed-by: Xisco Fauli (cherry picked from commit fc5edcf8c02ce81715a3db7c58e9b6d4a9a3b796) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136855 Reviewed-by: Michael Stahl diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx index 9400f5e129bf..0646c9232d5d 100644 --- a/vcl/qt5/QtMenu.cxx +++ b/vcl/qt5/QtMenu.cxx @@ -676,15 +676,19 @@ void QtMenu::ShowCloseButton(bool bShow) pButton->hide(); } -bool QtMenu::ShowNativePopupMenu(FloatingWindow*, const tools::Rectangle&, +bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags) { assert(mpQMenu); DoFullMenuUpdate(mpVCLMenu); mpQMenu->setTearOffEnabled(bool(nFlags & FloatWinPopupFlags::AllowTearOff)); -const QPoint aPos = QCursor::pos(); -mpQMenu->exec(aPos); +const VclPtr xParent = pWin->ImplGetWindowImpl()->mpRealParent; +const QtFrame* pFrame = static_cast(xParent->ImplGetFrame()); +assert(pFrame); +const tools::Rectangle aFloatRect = FloatingWindow::ImplConvertToAbsPos(xParent, rRect); +const QRect aRect = toQRect(aFloatRect, 1 / pFrame->devicePixelRatioF()); +mpQMenu->exec(aRect.topLeft()); return true; }
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atklistener.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit ca1b528972235c16dab74e3662ff768c68a6cc38 Author: Michael Weghorn AuthorDate: Wed Jul 13 10:23:59 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Jul 13 12:04:22 2022 +0200 gtk3 a11y: Activate code that needs AtkRectangle I don't see where `HAS_ATKRECTANGLE` would be defined, not even in what we have as a single git commit that adds the code: commit 9b5df79fbd9e84ef9c2dde845867dbb1f98ac98a Date: Fri May 5 09:55:52 2006 + INTEGRATION: CWS atkbridge (1.1.2); FILE ADDED 2006/03/31 14:09:17 obr 1.1.2.20: #i63580# AtkRectangle already in atk 1.7.0, but ATK_TYPE_RECTANGLE in 1.7.2 2006/03/31 12:19:39 obr 1.1.2.19: #i63583# eliminated warnings 2006/03/30 12:39:35 obr 1.1.2.18: #i63580# AtkRectangle not defined in older atk versions [...] The above extract from the commmit message as well as a quick look into the corresponding OOo ticket [1] suggest that the only concern were old ATK versions that didn't have `AtkRectangle` yet. Since the code looks sane at a quick glance at the corresponding ATK doc [2], just drop the `#ifdev HAS_ATKRECTANGLE` check and enable this unconditionally. (atk >= 2.28.1 is required by now, which definitely has AtkRectangle.) While at it, switch to the new style of using a dash instead of an underscore in the signal name. [1] https://bz.apache.org/ooo/show_bug.cgi?id=63580 [2] https://docs.gtk.org/atk/signal.Component.bounds-changed.html Change-Id: If448c5e79df6f2dd38c3a9acd414cc778f4d1f3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137011 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atklistener.cxx b/vcl/unx/gtk3/a11y/atklistener.cxx index 0c6842ab130c..600bb2273881 100644 --- a/vcl/unx/gtk3/a11y/atklistener.cxx +++ b/vcl/unx/gtk3/a11y/atklistener.cxx @@ -486,7 +486,6 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven case accessibility::AccessibleEventId::BOUNDRECT_CHANGED: -#ifdef HAS_ATKRECTANGLE if( ATK_IS_COMPONENT( atk_obj ) ) { AtkRectangle rect; @@ -498,12 +497,10 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven &rect.height, ATK_XY_SCREEN ); -g_signal_emit_by_name( atk_obj, "bounds_changed", &rect ); +g_signal_emit_by_name( atk_obj, "bounds-changed", &rect ); } else -g_warning( "bounds_changed event for object not implementing AtkComponent\n"); -#endif - +g_warning( "bounds-changed event for object not implementing AtkComponent\n"); break; case accessibility::AccessibleEventId::VISIBLE_DATA_CHANGED:
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/SpellDialog.cxx | 12 1 file changed, 4 insertions(+), 8 deletions(-) New commits: commit 684502c24b5f0f5e67c189e79d9f3ffa79d1975e Author: Michael Weghorn AuthorDate: Wed Mar 16 22:55:10 2022 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 17 09:59:07 2022 +0100 cui: Use range-based for in SpellDialog None of the widgets should be nullptr. Change-Id: Iaaa2528571a7f301c5fab5ddf938494ed1c57f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131686 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dae7b92c9155..11ed7225cc32 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -969,15 +969,11 @@ void SpellDialog::InvalidateDialog() m_xChangePB.get(), m_xChangeAllPB.get(), m_xAutoCorrPB.get(), -m_xUndoPB.get(), -nullptr +m_xUndoPB.get() }; -sal_Int16 i = 0; -while(aDisableArr[i]) -{ -aDisableArr[i]->set_sensitive(false); -i++; -} +for (weld::Widget* pWidget : aDisableArr) +pWidget->set_sensitive(false); + SfxModelessDialogController::Deactivate(); }
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/SpellDialog.cxx | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) New commits: commit 58f29c4f1de3e116aec62d69b0921f2ee44b8c70 Author: Michael Weghorn AuthorDate: Thu Mar 17 07:24:32 2022 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 17 09:59:30 2022 +0100 cui: Use range-based for in SentenceEditWindow_Impl Change-Id: I0e324d6b961f632130974d90f22345122650b666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131687 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 11ed7225cc32..1eba79a15a0c 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -2059,15 +2059,10 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) pSpellDialog->m_xLanguageLB->get_widget(), pSpellDialog->m_xAddToDictMB.get(), pSpellDialog->m_xAddToDictPB.get(), -pSpellDialog->m_xAutoCorrPB.get(), -nullptr +pSpellDialog->m_xAutoCorrPB.get() }; -sal_Int32 nIdx = 0; -do -{ -aControls[nIdx]->set_sensitive(false); -} -while(aControls[++nIdx]); +for (weld::Widget* pWidget : aControls) +pWidget->set_sensitive(false); //remove error marks ESelection aAll(0, 0, 0, EE_TEXTPOS_ALL);
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/SpellDialog.cxx | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) New commits: commit 229012b4a5546c4611e3ff789432806d1b301e4a Author: Michael Weghorn AuthorDate: Thu Mar 17 07:26:15 2022 +0100 Commit: Michael Weghorn CommitDate: Thu Mar 17 10:00:03 2022 +0100 cui: Use more range-based for in SpellDialog Change-Id: I566af40d67154ee8891c97257b6ef232556fe1f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131688 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 1eba79a15a0c..aa22a9b86a1d 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -364,16 +364,10 @@ void SpellDialog::SpellContinue_Impl(std::unique_ptr* pGua { m_xNotInDictFT.get(), m_xSentenceED->GetDrawingArea(), -m_xLanguageFT.get(), -nullptr +m_xLanguageFT.get() }; -sal_Int32 nIdx = 0; -do -{ -aControls[nIdx]->set_sensitive(true); -} -while(aControls[++nIdx]); - +for (weld::Widget* pWidget : aControls) +pWidget->set_sensitive(true); } if( bNextSentence ) {
[Libreoffice-commits] core.git: cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7de27fe664f2fbb310907b5f945010792cd79ed3 Author: Michael Weghorn AuthorDate: Thu Mar 17 08:26:59 2022 +0100 Commit: Caolán McNamara CommitDate: Thu Mar 17 12:34:29 2022 +0100 Call corresponding base class method in SpellDialog::Deactivate At a quick glance, the fact that `SpellDialog::Deactivate` previously did the same as `SpellDialog::Activate` looks like a copy-paste mistake; both were added in commit 5261417cbb3051b812164838d19c0f748573df45 Date: Fri Jun 14 21:56:44 2019 +0100 weld SpellDialog Change-Id: Ib06d19e46470141d5bfcfc7e790160c1879b6a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131694 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index aa22a9b86a1d..0317ce370794 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -939,7 +939,7 @@ void SpellDialog::Activate() void SpellDialog::Deactivate() { -SfxModelessDialogController::Activate(); +SfxModelessDialogController::Deactivate(); ToplevelFocusChanged(); }
[Libreoffice-commits] core.git: 2 commits - chart2/source editeng/source include/vcl sc/source svx/source vcl/source
chart2/source/controller/accessibility/AccessibleBase.cxx | 23 +++- chart2/source/controller/inc/AccessibleBase.hxx |6 --- editeng/source/accessibility/AccessibleEditableTextPara.cxx |4 -- include/vcl/unohelp.hxx |1 sc/source/ui/Accessibility/AccessibleContextBase.cxx|4 -- svx/source/accessibility/AccessibleTextHelper.cxx |4 -- vcl/source/app/unohelp.cxx | 19 - 7 files changed, 8 insertions(+), 53 deletions(-) New commits: commit dadc8a8771645d475b6287dd4c65b88cdad81d93 Author: Michael Weghorn AuthorDate: Fri Mar 18 12:01:06 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 18 13:21:12 2022 +0100 a11y: Drop vcl::unohelper::NotifyAccessibleStateEventGlobally As mentioned in Change-Id I4681c28c9d18cf1953be5127765f4aa94563662d ("chart a11y: Drop bSendGlobally param from AccessibleBase::BroadcastAccEvent"), calling it has no effect, the `fireFocusGained` and `fireFocusLost` methods of the `XExtendedToolkit` interface in its only implementation in `VCLXToolkit` do nothing, so just drop it. Change-Id: Ie9352a4e4021d7bf0b35de71f55afc660795b906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131736 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 22576523f9e6..cf605db6c4eb 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -560,10 +560,6 @@ namespace accessibility AccessibleEventObject aEvent(xThis, nEventId, rNewValue, rOldValue); -// #102261# Call global queue for focus events -if( nEventId == AccessibleEventId::STATE_CHANGED ) -vcl::unohelper::NotifyAccessibleStateEventGlobally( aEvent ); - // #106234# Delegate to EventNotifier if( getNotifierClientId() != -1 ) ::comphelper::AccessibleEventNotifier::addEvent( getNotifierClientId(), diff --git a/include/vcl/unohelp.hxx b/include/vcl/unohelp.hxx index 5ba919edd577..c7b9dcc06956 100644 --- a/include/vcl/unohelp.hxx +++ b/include/vcl/unohelp.hxx @@ -37,7 +37,6 @@ namespace vcl::unohelper { VCL_DLLPUBLIC css::uno::Reference < css::i18n::XBreakIterator > CreateBreakIterator(); css::uno::Reference < css::i18n::XCharacterClassification> CreateCharacterClassification(); -VCL_DLLPUBLIC void NotifyAccessibleStateEventGlobally( const css::accessibility::AccessibleEventObject& rEventObject ); VCL_DLLPUBLIC float ConvertFontWidth( FontWidth eWidth ); VCL_DLLPUBLIC FontWidth ConvertFontWidth( float f ); VCL_DLLPUBLIC float ConvertFontWeight( FontWeight eWeight ); diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 38620240baaf..cdbb5ea71494 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -474,8 +474,6 @@ void ScAccessibleContextBase::CommitFocusGained() const aEvent.NewValue <<= AccessibleStateType::FOCUSED; CommitChange(aEvent); - -vcl::unohelper::NotifyAccessibleStateEventGlobally(aEvent); } void ScAccessibleContextBase::CommitFocusLost() const @@ -486,8 +484,6 @@ void ScAccessibleContextBase::CommitFocusLost() const aEvent.OldValue <<= AccessibleStateType::FOCUSED; CommitChange(aEvent); - -vcl::unohelper::NotifyAccessibleStateEventGlobally(aEvent); } tools::Rectangle ScAccessibleContextBase::GetBoundingBoxOnScreen() const diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx index 046fec99224b..3331a88e552c 100644 --- a/svx/source/accessibility/AccessibleTextHelper.cxx +++ b/svx/source/accessibility/AccessibleTextHelper.cxx @@ -1410,10 +1410,6 @@ namespace accessibility void AccessibleTextHelper_Impl::FireEvent( const AccessibleEventObject& rEvent ) const { -// #102261# Call global queue for focus events -if( rEvent.EventId == AccessibleStateType::FOCUSED ) -vcl::unohelper::NotifyAccessibleStateEventGlobally( rEvent ); - // #106234# Delegate to EventNotifier ::comphelper::AccessibleEventNotifier::addEvent( getNotifierClientId(), rEvent ); diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index f08e54131259..89b526c91ffa 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -45,25 +45,6 @@ uno::Reference < i18n::XCharacterClassification > vcl::unohelper::CreateCharacte return i18n::CharacterClassification::create( comphelper::getProcessComponentContext() ); } -void vcl::unohelper::N
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/gtkinst.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 0f3f71cc3470b9d15ae5e35eb206040897e74135 Author: Michael Weghorn AuthorDate: Fri Mar 18 13:29:25 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 18 14:39:37 2022 +0100 gtk3 a11y: Rename drawing_area_get_accessib{ity -> le} "...get_accessibity" looks like a typo, but "...get_accessible" fits the naming scheme better anyway. Change-Id: Ie71ade5bb2ef58ac23ecff0efa5adaae792a9620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131738 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index a16c6cc7f75f..117c5c88a788 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -22437,7 +22437,7 @@ IMPL_LINK_NOARG(GtkInstancePopover, async_signal_closed, void*, void) namespace { -AtkObject* drawing_area_get_accessibity(GtkWidget *pWidget) +AtkObject* drawing_area_get_accessible(GtkWidget *pWidget) { AtkObject* pDefaultAccessible = default_drawing_area_get_accessible(pWidget); void* pData = g_object_get_data(G_OBJECT(pWidget), "g-lo-GtkInstanceDrawingArea"); @@ -22456,7 +22456,7 @@ void ensure_intercept_drawing_area_accessibility() gpointer pClass = g_type_class_ref(GTK_TYPE_DRAWING_AREA); GtkWidgetClass* pWidgetClass = GTK_WIDGET_CLASS(pClass); default_drawing_area_get_accessible = pWidgetClass->get_accessible; -pWidgetClass->get_accessible = drawing_area_get_accessibity; +pWidgetClass->get_accessible = drawing_area_get_accessible; g_type_class_unref(pClass); bDone = true; }
[Libreoffice-commits] core.git: sd/source svx/source sw/source
sd/source/ui/annotations/annotationwindow.cxx |4 +--- svx/source/dialog/weldeditview.cxx|4 +--- sw/source/uibase/docvw/SidebarTxtControl.cxx |2 -- 3 files changed, 2 insertions(+), 8 deletions(-) New commits: commit cfa5489982a84f847d86b8bf8ce49b25e033ed48 Author: Michael Weghorn AuthorDate: Fri Mar 18 14:17:28 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 18 15:28:44 2022 +0100 WeldEditView: Just pass new Size object as param Just pass `aOutputSize` as parameter instead of assigning that to `aSize` again and then passing that one as parameter in `WeldEditView::SetDrawingArea` and overrides in derived classes. `aSize.setHeight(aSize.Height())` can just be dropped as an overly complicated way of keeping the height as it is. In `SidebarTextControl::SetDrawingArea`, `aOutputSize` was already passed as param, so the new value of `aSize` was ignored anyway. Change-Id: I23192d3c5c85e4371a48774b3b8f854beb751b82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131741 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 42ebe77c306f..6c1210575915 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -188,14 +188,12 @@ void AnnotationTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); EditView* pEditView = GetEditView(); pEditView->setEditViewCallbacks(this); EditEngine* pEditEngine = GetEditEngine(); -pEditEngine->SetPaperSize(aSize); +pEditEngine->SetPaperSize(aOutputSize); pEditEngine->SetRefDevice(&rDevice); pEditView->SetOutputArea(::tools::Rectangle(Point(0, 0), aOutputSize)); diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index d3f3c3f79c9e..42eb22c12223 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -1554,11 +1554,9 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); makeEditEngine(); -m_xEditEngine->SetPaperSize(aSize); +m_xEditEngine->SetPaperSize(aOutputSize); m_xEditEngine->SetRefDevice(&rDevice); m_xEditEngine->SetControlWord(m_xEditEngine->GetControlWord() | EEControlBits::MARKFIELDS); diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index fecaf6aafef3..8502601e8b1e 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -107,8 +107,6 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) rDevice.SetBackground(aBgColor); Size aOutputSize(rDevice.PixelToLogic(aSize)); -aSize = aOutputSize; -aSize.setHeight(aSize.Height()); EditView* pEditView = GetEditView(); pEditView->setEditViewCallbacks(this);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5aa42d256fa5081d79da3eb21ddd8000d7b6cc1c Author: Michael Weghorn AuthorDate: Thu Mar 17 08:26:59 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 21 13:34:58 2022 +0100 Call corresponding base class method in SpellDialog::Deactivate At a quick glance, the fact that `SpellDialog::Deactivate` previously did the same as `SpellDialog::Activate` looks like a copy-paste mistake; both were added in commit 5261417cbb3051b812164838d19c0f748573df45 Date: Fri Jun 14 21:56:44 2019 +0100 weld SpellDialog Change-Id: Ib06d19e46470141d5bfcfc7e790160c1879b6a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131598 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dae7b92c9155..329b20d54e29 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -945,7 +945,7 @@ void SpellDialog::Activate() void SpellDialog::Deactivate() { -SfxModelessDialogController::Activate(); +SfxModelessDialogController::Deactivate(); ToplevelFocusChanged(); }
[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - cui/source
cui/source/dialogs/SpellDialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bfe8263b6d4ebfe11f380fb5f87d07f127a67f9a Author: Michael Weghorn AuthorDate: Thu Mar 17 08:26:59 2022 +0100 Commit: Xisco Fauli CommitDate: Mon Mar 21 17:44:54 2022 +0100 Call corresponding base class method in SpellDialog::Deactivate At a quick glance, the fact that `SpellDialog::Deactivate` previously did the same as `SpellDialog::Activate` looks like a copy-paste mistake; both were added in commit 5261417cbb3051b812164838d19c0f748573df45 Date: Fri Jun 14 21:56:44 2019 +0100 weld SpellDialog Change-Id: Ib06d19e46470141d5bfcfc7e790160c1879b6a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131598 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit 5aa42d256fa5081d79da3eb21ddd8000d7b6cc1c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131861 diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 7b17b25e71f2..02f1fc85212f 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -945,7 +945,7 @@ void SpellDialog::Activate() void SpellDialog::Deactivate() { -SfxModelessDialogController::Activate(); +SfxModelessDialogController::Deactivate(); ToplevelFocusChanged(); }
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3_kde5/kde5_filepicker.cxx |5 - 1 file changed, 5 deletions(-) New commits: commit f0734deb7a3bcae2615adbe6a465ec39952b3e98 Author: Michael Weghorn AuthorDate: Tue Mar 22 08:38:01 2022 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 22 09:46:09 2022 +0100 gtk3_kde5: Don't call deprecated QFileDialog::setConfirmOverwrite QFileDialog documentation says [1]: > This property is obsolete. It is provided to keep old source code > working. We strongly advise against using it in new code. > > This property holds whether the filedialog should ask before accepting a > selected file, when the accept mode is AcceptSave > > Use setOption(DontConfirmOverwrite, !enabled) or > !testOption(DontConfirmOverwrite) instead. Documentation on `QFileDialog::DontConfirmOverwrite` [2] says: > QFileDialog::DontConfirmOverwrite 0x0004 Don't ask for > confirmation if an existing file is selected. By default confirmation is > requested. It already said that 10 years ago. Given that's the default, there's no need to set it explicitly at all. [1] https://doc.qt.io/qt-5/qfiledialog-obsolete.html#confirmOverwrite-prop [2] https://doc.qt.io/qt-5/qfiledialog.html#Option-enum Change-Id: I77a0022dc4128d157ba49c9aa8de447bb2c08379 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131923 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx index 65953e4f2763..b3382b33d109 100644 --- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx +++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx @@ -229,12 +229,7 @@ void KDE5FilePicker::initialize(bool saveDialog) _dialog->setAcceptMode(operationMode); if (saveDialog) -{ -SAL_WNODEPRECATED_DECLARATIONS_PUSH -_dialog->setConfirmOverwrite(true); -SAL_WNODEPRECATED_DECLARATIONS_POP _dialog->setFileMode(QFileDialog::AnyFile); -} } void KDE5FilePicker::setWinId(sal_uInt64 winId) { _winId = winId; }
[Libreoffice-commits] core.git: winaccessibility/inc winaccessibility/source
winaccessibility/inc/ResIDGenerator.hxx| 10 ++ winaccessibility/source/service/ResIDGenerator.cxx |6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) New commits: commit 6c5257b680044514debc1dde1267ab985ef4548c Author: Michael Weghorn AuthorDate: Tue Mar 22 09:06:26 2022 +0100 Commit: Michael Weghorn CommitDate: Tue Mar 22 13:26:54 2022 +0100 wina11y: Slightly clean up WinResIDGenerator Changes: * drop the optional `maxNum` param for the constructor, it's never set to anything different than the default value * store negative number in member (renamed from `max` to `m_nMin`) instead of storing positive number and inverting that when returning it in `ResIDGenerator::GenerateNewResID` * Use -1 as the first resource ID instead of -2. Also, add a comment that negative child IDs are used because it's common to use such ones to indicate unique resource IDs in IAccessible2. Quoting James Teh's comment on an NVDA pull request of mine [1]: > The use of negative child ids doesn't fit well into the IAccessible > spec, but it has been done by IAccessible2 for a very long time and > should be considered standard for all intents and purposes. A negative > child id should be treated as a unique id, while a positive child id > should be treated as a child index. > > That said, as noted in #13277 (comment), IAccessible2 elements are > always full IAccessible objects, not "simple elements". Thus, anything > that returns an accessible (including accSelection) really should return > an object pointer. In the case of accSelection, this means VT_DISPATCH > for a single selection or VT_UNKNOWN and iEnumVARIANT (with VT_DISPATCH > elements) for multiple selection. > > In short, NVDA supporting negative child ids returned from accSelection > isn't necessarily "wrong", but ideally, LibreOffice would be fixed to > return full objects. The latter (returning full objects) has already been addressed in commit 00c0ee8cf0fac0c933c5ae600e99a64b1c7d4397 Author: Michael Weghorn Date: Mon Jan 31 07:41:14 2022 + tdf#147083 wina11y: Return a11y object instead of child ID but a unique ID is still relevant, s. e.g. the documentation of `IAccessible2::uniqueID` [2], which also mentions potential ways to implement unique IDs: > One means of implementing this would be to create a factory with a 32 > bit number generator and a reuse pool. The number generator would emit > numbers starting at 1. Each time an object's life cycle ended, its > number would be saved into a reuse pool. The number generator would be > used whenever the reuse pool was empty. > > Another way to create a unique ID is to generate it from a pointer > value, e.g. an object's address. That would be unique because no two > active objects can use the same allocated memory space. The first approach is what the LO implementation currently does, except that negative numbers are used. [1] https://github.com/nvaccess/nvda/pull/13277#issuecomment-1024622871 [2] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible2.html#aac1342376cf195a6a6e9ee3b7e30ae3b Change-Id: I6c0a6c4a4e3a69396205fe2d69cd66af6525a273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131927 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/inc/ResIDGenerator.hxx b/winaccessibility/inc/ResIDGenerator.hxx index 19e06c9b88ad..400f58a2e620 100644 --- a/winaccessibility/inc/ResIDGenerator.hxx +++ b/winaccessibility/inc/ResIDGenerator.hxx @@ -19,20 +19,22 @@ #pragma once -#define PRIMARY_RESID 0x0001 #include //ResID i.e. MSAA child ID, //this class is responsible for generating a child ID +// +// In IAccessible2, negative child IDs are commonly used to +// indicate unique resource IDs. class ResIDGenerator { private: -long max; +long m_nMin; std::deque subList; public: -ResIDGenerator(long maxNum = PRIMARY_RESID) -: max(maxNum) +ResIDGenerator() +: m_nMin(-1) { } ~ResIDGenerator(); diff --git a/winaccessibility/source/service/ResIDGenerator.cxx b/winaccessibility/source/service/ResIDGenerator.cxx index 6c88a12a402c..7498380300c7 100644 --- a/winaccessibility/source/service/ResIDGenerator.cxx +++ b/winaccessibility/source/service/ResIDGenerator.cxx @@ -25,7 +25,7 @@ ResIDGenerator::~ResIDGenerator() {} /** * SubList stores those IDs that were ever generated and deleted, the method - * return the ID from subList first if subList is not empty,else return ++max. + * return the ID from subList first if subList is not empty, else return m_nMin--. * Add the obsolete IDs by calling SetSub method *
[Libreoffice-commits] core.git: instsetoo_native/inc_openoffice
instsetoo_native/inc_openoffice/unix/find-requires-x11.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d6ea4b8ffce91d7956cea0267c95ca69e208db24 Author: Michael Weghorn AuthorDate: Fri Mar 25 08:37:37 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 25 12:06:37 2022 +0100 Depend on 64-bit packages for aarch64 as well As Christian Lohmaier pointed out in [1]: > When building packages using the epm method, the dependency gets added > by instsetoo_native/inc_openoffice/unix/find-requires-x11.sh - and it > looks like it should also add the ()(64bit) marker to the dependency > when PLATFORMID is linux_aarch64 and not only for linux_x86_64 > > check with rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 whether > it provides "libXinerama.so.1()(64bit)" The reply of 2022-03-25T10:41 (public mailing list version probably still pending in some moderator queue) shows it does: > [root@1 rpm2]# `rpm -q --provides > > ^CbXinerama-1.1.3-2.1.el7.aarch64 > [root@1 rpm2]# rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 > libXinerama = 1.1.3-2.1.el7 > libXinerama(aarch-64) = 1.1.3-2.1.el7 > libXinerama.so.1()(64bit) [1] https://lists.freedesktop.org/archives/libreoffice/2022-March/088637.html Change-Id: I1b9a4025399d82ac5f5e51ea5523417e3e6cf395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132094 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn diff --git a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh index 6808b3631d73..9fec571f5f99 100644 --- a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh +++ b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh @@ -18,7 +18,7 @@ # cat > /dev/null -[[ "${PLATFORMID}" == "linux_x86_64" ]] && mark64="()(64bit)" +[[ "${PLATFORMID}" == "linux_x86_64" || "${PLATFORMID}" == "linux_aarch64" ]] && mark64="()(64bit)" if [[ "${OS}" == "AIX" ]]; then echo "libfreetype.a(libfreetype.so.6${mark64})" else
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - instsetoo_native/inc_openoffice
instsetoo_native/inc_openoffice/unix/find-requires-x11.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5f05b79821699456309a9b7434772cc3eb2dc64a Author: Michael Weghorn AuthorDate: Fri Mar 25 08:37:37 2022 +0100 Commit: Caolán McNamara CommitDate: Sat Mar 26 11:25:13 2022 +0100 Depend on 64-bit packages for aarch64 as well As Christian Lohmaier pointed out in [1]: > When building packages using the epm method, the dependency gets added > by instsetoo_native/inc_openoffice/unix/find-requires-x11.sh - and it > looks like it should also add the ()(64bit) marker to the dependency > when PLATFORMID is linux_aarch64 and not only for linux_x86_64 > > check with rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 whether > it provides "libXinerama.so.1()(64bit)" The reply of 2022-03-25T10:41 (public mailing list version probably still pending in some moderator queue) shows it does: > [root@1 rpm2]# `rpm -q --provides > > ^CbXinerama-1.1.3-2.1.el7.aarch64 > [root@1 rpm2]# rpm -q --provides libXinerama-1.1.3-2.1.el7.aarch64 > libXinerama = 1.1.3-2.1.el7 > libXinerama(aarch-64) = 1.1.3-2.1.el7 > libXinerama.so.1()(64bit) [1] https://lists.freedesktop.org/archives/libreoffice/2022-March/088637.html Change-Id: I1b9a4025399d82ac5f5e51ea5523417e3e6cf395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132094 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn (cherry picked from commit d6ea4b8ffce91d7956cea0267c95ca69e208db24) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132044 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh index 0fe0b1d27dde..338b7919d4ed 100644 --- a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh +++ b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh @@ -18,7 +18,7 @@ # cat > /dev/null -[[ "${PLATFORMID}" == "linux_x86_64" ]] && mark64="()(64bit)" +[[ "${PLATFORMID}" == "linux_x86_64" || "${PLATFORMID}" == "linux_aarch64" ]] && mark64="()(64bit)" if [[ "${OS}" == "AIX" ]]; then echo "libfreetype.a(libfreetype.so.6${mark64})" else
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swxform/toolbar/formdesign.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4f9bf4201bb706cd19142f0805cfc4c859186cd4 Author: Michael Weghorn AuthorDate: Mon Mar 28 11:05:34 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Mar 28 16:39:06 2022 +0200 tdf#148235 Restore toolbar item to switch XForm to design mode commit 45b6f096e7ae86d0692ecdfd5b7069622d8a6efa Date: Sun Oct 28 17:02:34 2018 +0100 sw toolbars sync context toolbars between different apps had replaced the "Form Design" toolbar item to switch a complete XForm to design mode with an entry that switches the form controls to design mode instead. (The former one is labelled "Design Mode On/Off", the latter one just "Design Mode" in the English UI.) This meant that the XForm could no longer be switched to design mode from there, unless the toolbar was manually customized to add the entry back. This brings the previous toolbar item back. It also removes the one to switch the form controls to design mode again, since that one is already contained in the "Form Controls" toolbar, where it fits better. (And having two different toolbar items with almost identical labels but different functionality would probably be rather confusing.) Change-Id: Ia4c98dfa6ad8372eba08a9f08920153133a7f88d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132207 Reviewed-by: Andreas Kainz Reviewed-by: Michael Weghorn Tested-by: Jenkins diff --git a/sw/uiconfig/swxform/toolbar/formdesign.xml b/sw/uiconfig/swxform/toolbar/formdesign.xml index 067ddff0675f..f748bcf68e2e 100644 --- a/sw/uiconfig/swxform/toolbar/formdesign.xml +++ b/sw/uiconfig/swxform/toolbar/formdesign.xml @@ -44,7 +44,7 @@ - +
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - sw/uiconfig
sw/uiconfig/swxform/toolbar/formdesign.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e42219cb3664b3727a6b399153d7891108c01f0c Author: Michael Weghorn AuthorDate: Mon Mar 28 11:05:34 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:16:16 2022 +0200 tdf#148235 Restore toolbar item to switch XForm to design mode commit 45b6f096e7ae86d0692ecdfd5b7069622d8a6efa Date: Sun Oct 28 17:02:34 2018 +0100 sw toolbars sync context toolbars between different apps had replaced the "Form Design" toolbar item to switch a complete XForm to design mode with an entry that switches the form controls to design mode instead. (The former one is labelled "Design Mode On/Off", the latter one just "Design Mode" in the English UI.) This meant that the XForm could no longer be switched to design mode from there, unless the toolbar was manually customized to add the entry back. This brings the previous toolbar item back. It also removes the one to switch the form controls to design mode again, since that one is already contained in the "Form Controls" toolbar, where it fits better. (And having two different toolbar items with almost identical labels but different functionality would probably be rather confusing.) Change-Id: Ia4c98dfa6ad8372eba08a9f08920153133a7f88d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132207 Reviewed-by: Andreas Kainz Reviewed-by: Michael Weghorn Tested-by: Jenkins (cherry picked from commit 4f9bf4201bb706cd19142f0805cfc4c859186cd4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132177 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/uiconfig/swxform/toolbar/formdesign.xml b/sw/uiconfig/swxform/toolbar/formdesign.xml index 067ddff0675f..f748bcf68e2e 100644 --- a/sw/uiconfig/swxform/toolbar/formdesign.xml +++ b/sw/uiconfig/swxform/toolbar/formdesign.xml @@ -44,7 +44,7 @@ - +
[Libreoffice-commits] core.git: offapi/com vcl/osx vcl/unx
offapi/com/sun/star/accessibility/AccessibleTableModelChange.idl |4 offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl | 64 +- vcl/osx/a11ylistener.cxx |6 vcl/unx/gtk3/a11y/atklistener.cxx| 17 ++ 4 files changed, 81 insertions(+), 10 deletions(-) New commits: commit 5371eef48a34acd06307a7b2bf898586938e27ff Author: Michael Weghorn AuthorDate: Mon Mar 28 08:40:59 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:48:25 2022 +0200 a11y: Add new table model change types for row/col insertion/del So far, there were two types/constants to use in an `AcessibleTableModelChange` event to indicate the insertion or deletion of rows and/or columns. From `offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl`: > /** One or more rows and/or columns have been inserted. > > Use the fields of the AccessibleTableModelChange > structure to determine the indices of the rows and/or columns that > have been inserted. > */ > const short INSERT = 1; > > /** One or more rows and/or columns have been deleted. > > The affected area of the table is stored in the fields of the > AccessibleTableModelChange structure. > */ > const short DELETE = 2; From the documentation, it would be possible to indicate an insertion or deletion of both, rows and columns in a single event. However, there is no single instance where this is actually used to indicate the deletion/insertion of both, whole rows and whole columns at the same time. The way that indices are currently used is rather confusing and results in incorrect a11y events being sent on maOS as well as the gtk3 VCL plugin: When only rows are inserted, row indices are set as expected (index of the first and last inserted row), but the column indices are set to the first and last column in the table; i.e. the indices actually give the range of the newly inserted cell range, rather than just the indices of the rows that have been inserted. (The same applies the other way around when only columns are inserted.) That's not what I would have expected when reading the documentation. ("Use the fields of the AccessibleTableModelChange structure to determine the indices of the rows and/or columns that have been inserted.") In the same way, the range of deleted cells is set when emitting `AccessibleTableModelChangeType::DELETE` events. In this case, this can be seen as matching what the documentation says. ("The affected area of the table is stored in the fields of the AccessibleTableModelChange structure.") In any case, the way that the events are handled in the gtk3 VCL plugin and for macOS results in the emission of incorrect events, since those are handling such indices as if both, rows and columns had been inserted/deleted. Example for the gtk3 VCL plugin: Row with index 1 has been deleted from a table. -> an AccessibleTableModelChange event is sent with Type=AccessibleTableModelChangeType::DELETE FirstRow=1 LastRow=1 FirstColumn=0 LastColumn= This would then result in 2 AT-SPI events being emitted by the gtk3 VCL plugin: * one that indicates that row 1 has been deleted (OK) * another event that indicates that all columns have been deleted (NOT OK) Instead of changing the handling of the existing `AccessibleTableModelChangeType`s, introduce 4 new types to replace the existing ones that don't mix handling of rows and columns at the same time: one for row insertion, one for column insertion, one for row deletion, one for column deletion. This commit also adds handling for the newly added change types for macOS and the gtk3 VCL plugin on Linux. winaccessibility is unaffected because it doesn't have any handling specific to the change type. The qt5/qt6 VCL plugins don't yet have any handling for the `AcessibleTableModelChange` event yet (but that will be added in a follow-up commit). Existing uses of `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` will be migrated to use the new types in follow-up commits. From a UNO API perspective, this change and the final removal of the `AccessibleTableModelChangeType::DELETE` and `AccessibleTableModelChangeType::INSERT` constants in a follow-up commit should be unproblematic, because the corresponding APIs have been unpublished in commit 70626249cd247d9acdad417b8eaf252bae22c059 Date: Thu Nov 29 00:27:03
[Libreoffice-commits] core.git: accessibility/source sc/source svtools/source
accessibility/source/extended/AccessibleGridControlTable.cxx |4 - sc/source/ui/Accessibility/AccessibleCsvControl.cxx |4 - svtools/source/brwbox/brwbox1.cxx| 42 +-- svtools/source/table/tablecontrol_impl.cxx |8 +- 4 files changed, 30 insertions(+), 28 deletions(-) New commits: commit 5a9340bc0e20817ecf23dc1e12653751ca1d Author: Michael Weghorn AuthorDate: Mon Mar 28 15:24:23 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:51:02 2022 +0200 a11y: Use new table model change types for row/col ins/del This ports most existing uses of the now deprecated `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` to emit events of the the four new table model change types added in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" instead, which among others fixes the a11y events that are sent on the platform level for gtk3 and macOS, s. commit message of the mentioned change for more details. From all I can see, `AccessibleGridControlTable::commitEvent` is just meant to handle removal of rows, not columns, so add a corresponding assert there. (See how only row-related a11y events are emitted in `svtools/source/table/tablecontrol_impl.cxx`, and the "columns aren't selectable" comment for `AccessibleGridControlTable::isAccessibleColumnSelected`. Given that the full range of rows would previously have been sent in the `AccessibleTableModelChangeType::DELETE` event for column removal, this should still have worked in practice, since this would have cleared the whole vector, and elements would have been inserted on demand as needed again later. However, if that should ever be needed in the future, it should be handled more explicitly.) The handling of sending events when rows or columns are inserted or deleted in a Calc spreadsheet is more fundamentally broken and will be handled in a separate commit. Change-Id: Icfd5e326143e8e90cc513e430bfabbba39e7bdc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132218 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 3c635e910d72..00788cdf2d31 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -312,7 +312,9 @@ void AccessibleGridControlTable::commitEvent(sal_Int16 nEventId, const css::uno: AccessibleTableModelChange aChange; if (rNewValue >>= aChange) { -if (aChange.Type == AccessibleTableModelChangeType::DELETE) +assert(aChange.Type != AccessibleTableModelChangeType::COLUMNS_REMOVED); + +if (aChange.Type == AccessibleTableModelChangeType::ROWS_REMOVED) { int nColCount = m_aTable.GetColumnCount(); // check valid index - entries are inserted lazily diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 7db93dbe6d25..e9a4a1deef65 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -1163,7 +1163,7 @@ void ScAccessibleCsvGrid::SendInsertColumnEvent( sal_uInt32 nFirstColumn, sal_uI if( nFirstColumn <= nLastColumn ) { AccessibleTableModelChange aModelChange( -AccessibleTableModelChangeType::INSERT, 0, implGetRowCount() - 1, +AccessibleTableModelChangeType::COLUMNS_INSERTED, -1, -1, lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) ); Any aOldAny, aNewAny; aNewAny <<= aModelChange; @@ -1176,7 +1176,7 @@ void ScAccessibleCsvGrid::SendRemoveColumnEvent( sal_uInt32 nFirstColumn, sal_uI if( nFirstColumn <= nLastColumn ) { AccessibleTableModelChange aModelChange( -AccessibleTableModelChangeType::DELETE, 0, implGetRowCount() - 1, +AccessibleTableModelChangeType::COLUMNS_REMOVED, -1, -1, lcl_GetApiColumn( nFirstColumn ), lcl_GetApiColumn( nLastColumn ) ); Any aOldAny, aNewAny; aNewAny <<= aModelChange; diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 64efb0e7023f..18a5f772613f 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -495,9 +495,9 @@ void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ) commitTableEvent( TABLE_MODEL_CHANGED, makeAny( AccessibleTableModelChange( -DELETE, -0, -GetRowCount(), +
[Libreoffice-commits] core.git: sc/source
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 579f3d91c98cc35961538628c772e74b2f7df85a Author: Michael Weghorn AuthorDate: Mon Mar 28 15:31:07 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:51:28 2022 +0200 sc a11y: OSL_ENSURE -> assert Change-Id: I79f477c950e0aca75e2a6041c5fb6a78be4b07c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132219 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 8abbe1f7b967..1f6d899c9db5 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -424,7 +424,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ScRange aRange(pRefHint->GetRange()); if ((nX < 0) || (nY < 0)) { -OSL_ENSURE(!((nX < 0) && (nY < 0)), "should not be possible to remove row and column at the same time"); +assert(!((nX < 0) && (nY < 0)) && "should not be possible to remove row and column at the same time"); nId = AccessibleTableModelChangeType::DELETE; if (nX < 0) { @@ -439,13 +439,13 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint } else if ((nX > 0) || (nY > 0)) { -OSL_ENSURE(!((nX > 0) && (nY > 0)), "should not be possible to add row and column at the same time"); +assert(!((nX > 0) && (nY > 0)) && "should not be possible to add row and column at the same time"); nId = AccessibleTableModelChangeType::INSERT; nX = aRange.aEnd.Col() - aRange.aStart.Col(); } else { -OSL_FAIL("is it a deletion or an insertion?"); +assert(false && "is it a deletion or an insertion?"); } CommitTableModelChange(pRefHint->GetRange().aStart.Row(),
[Libreoffice-commits] core.git: sc/source
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 41 +-- 1 file changed, 30 insertions(+), 11 deletions(-) New commits: commit 623c8502a5af5c0061f5285e8c0c4ac973990b7c Author: Michael Weghorn AuthorDate: Mon Mar 28 15:54:52 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:53:17 2022 +0200 sc a11y: Fix + port events for row/col ins/del Previously, incorrect indices were sent when inserting or deleting rows or columns from a Calc spreadsheet, e.g. when deleting rows 4 to 12 (i.e. rows with indices 3 to 11), the pyatspi script from Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" would have this output: > object:row-deleted(12, 10, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] > object:column-deleted(0, 16384, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] i.e. LO would announce the deletion of all columns and the deletion of 10 rows, starting at index 12, which is obviously wrong. For the case where rows or columns have been deleted, the range in the update hint passed to `ScAccessibleSpreadsheet::Notify` is the spreadhseet range after the removed rows/columns; for the case where rows or columns have been inserted, the range in the update hint is from the first inserted row/column to the last row/column in the spreadsheet. So, calculate the indices of the actually inserted/deleted rows/columns from that. Also, switch to using the table model change event types introduced in the change mentioned above. With this in place, output of the Python script for the above case now is as expected (9 rows, starting at row index 3, have been deleted): > object:row-deleted(3, 9, 0) > source: [table | Sheet Sheet1] > host_application: [application | soffice] > sender: [application | soffice] Deletion of non-contiguous row/column ranges (e.g. deleting columns A to C and F to H) also results in the correct events getting sent, since `ScAccessibleSpreadsheet::Notify` gets called multiple times, once for each contiguous cell range. Change-Id: I6e61eb45f255741661b29efb72394029109d682e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132220 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 1f6d899c9db5..09d8ad605043 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -418,6 +418,11 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint // ignore next SfxHintId::ScDataChanged notification mbDelIns = true; +SCROW nFirstRow = -1; +SCROW nLastRow = -1; +SCCOL nFirstCol = -1; +SCCOL nLastCol = -1; + sal_Int16 nId(0); SCCOL nX(pRefHint->GetDx()); SCROW nY(pRefHint->GetDy()); @@ -425,33 +430,47 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint if ((nX < 0) || (nY < 0)) { assert(!((nX < 0) && (nY < 0)) && "should not be possible to remove row and column at the same time"); -nId = AccessibleTableModelChangeType::DELETE; + +// Range in the update hint is the range after the removed rows/columns; +// calculate indices for the removed ones from that if (nX < 0) { -nX = -nX; -nY = aRange.aEnd.Row() - aRange.aStart.Row(); +nId = AccessibleTableModelChangeType::COLUMNS_REMOVED; +nFirstCol = aRange.aStart.Col() + nX; +nLastCol = aRange.aStart.Col() - 1; } else { -nY = -nY; -nX = aRange.aEnd.Col() - aRange.aStart.Col(); +nId = AccessibleTableModelChangeType::ROWS_REMOVED; +nFirstRow = aRange.aStart.Row() + nY; +nLastRow = aRange.aStart.Row() - 1; } } else if ((nX > 0) || (nY > 0)) { assert(!((nX > 0) && (nY > 0)) && "should not be possible to add row and column at the same time"); -nId = AccessibleTableModelChange
[Libreoffice-commits] core.git: offapi/com vcl/osx vcl/unx
offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl | 23 -- vcl/osx/a11ylistener.cxx |4 - vcl/unx/gtk3/a11y/atklistener.cxx| 20 3 files changed, 1 insertion(+), 46 deletions(-) New commits: commit f622149cb2ee3a8259f8e8f3b013ca5b4b5e1d80 Author: Michael Weghorn AuthorDate: Mon Mar 28 16:15:57 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:54:19 2022 +0200 a11y: Drop unused, deprecated table model change event types All places that were previously emitting `AccessibleTableModelChangeType::INSERT` and `AccessibleTableModelChangeType::DELETE` events have been ported to emit the 4 new event types introduced in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89, "a11y: Add new table model change types for row/col insertion/del" instead. Therefore, the handling of those events can be dropped from the gtk3 VCL plugin and for macOS's a11y listener as well. Also, drop the now completely unused constants from the IDL file as mentioned in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89: > From a UNO API perspective, this change > and the final removal of the > `AccessibleTableModelChangeType::DELETE` > and `AccessibleTableModelChangeType::INSERT` > constants in a follow-up commit > should be unproblematic, because the > corresponding APIs have been unpublished in > > commit 70626249cd247d9acdad417b8eaf252bae22c059 > Date: Thu Nov 29 00:27:03 2012 +0100 > > API CHANGE a11y unpublishing and add/removeListener rename. Change-Id: I1c062e26481b916af882e301c5f911aba9550ea3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132221 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl b/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl index 69669eb11eda..02164df9731e 100644 --- a/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl +++ b/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl @@ -44,29 +44,6 @@ module com { module sun { module star { module accessibility { */ constants AccessibleTableModelChangeType { -/** One or more rows and/or columns have been inserted. - -Use the fields of the AccessibleTableModelChange -structure to determine the indices of the rows and/or columns that -have been inserted. - -@deprecated: use ROWS_INSERTED/COLUMNS_INSERTED instead. -This constant will be removed once all remaining uses have been -ported. -*/ -const short INSERT = 1; - -/** One or more rows and/or columns have been deleted. - -The affected area of the table is stored in the fields of the -AccessibleTableModelChange structure. - -@deprecated: use ROWS_REMOVED/COLUMNS_REMOVED instead. -This constant will be removed once all remaining uses have been -ported. - */ -const short DELETE = 2; - /** Some of the table data has changed. The number of rows and columns remains unchanged. Only (some of) diff --git a/vcl/osx/a11ylistener.cxx b/vcl/osx/a11ylistener.cxx index fd275dab3079..b49b4509270e 100644 --- a/vcl/osx/a11ylistener.cxx +++ b/vcl/osx/a11ylistener.cxx @@ -42,9 +42,7 @@ static NSString * getTableNotification( const AccessibleEventObject& aEvent ) if( (aEvent.NewValue >>= aChange) && (aChange.Type == AccessibleTableModelChangeType::ROWS_INSERTED || - aChange.Type == AccessibleTableModelChangeType::ROWS_REMOVED || -(( AccessibleTableModelChangeType::INSERT == aChange.Type || AccessibleTableModelChangeType::DELETE == aChange.Type ) && -aChange.FirstRow != aChange.LastRow ))) + aChange.Type == AccessibleTableModelChangeType::ROWS_REMOVED)) { notification = NSAccessibilityRowCountChangedNotification; } diff --git a/vcl/unx/gtk3/a11y/atklistener.cxx b/vcl/unx/gtk3/a11y/atklistener.cxx index d73c2f753b3b..f0c2504c9acf 100644 --- a/vcl/unx/gtk3/a11y/atklistener.cxx +++ b/vcl/unx/gtk3/a11y/atklistener.cxx @@ -625,28 +625,8 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven sal_Int32 nRowsChanged = aChange.LastRow - aChange.FirstRow + 1; sal_Int32 nColumnsChanged = aChange.LastColumn - aChange.FirstColumn + 1; -static const struct { -const char *row; -const char *col; -} aSignalNames[] = -{ -{ nullptr, nullptr }, // dummy -{ "row_inserted", "column_inserted" }, // INSERT = 1 -{ "row_deleted", "column_deleted" } // DELETE = 2 -}; switch( aChange.Type ) {
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx | 39 +- 1 file changed, 38 insertions(+), 1 deletion(-) New commits: commit 9ee8b709594d2d106dc6ba7b7cac5a7e4300609c Author: Michael Weghorn AuthorDate: Mon Mar 28 16:24:23 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 06:55:18 2022 +0200 qt a11y: Handle TABLE_MODEL_CHANGED event Note however, that as of now, this doesn't have any effect in practice, since `AtSpiAdaptor` for Linux in the Qt library currently just ignores `QAccessible::TableModelChanged` events instead of forwarding them as corresponding AT-SPI events. [1] [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=9a4c32cedda3a00e06eb3aed13a731d23f6c56d9#n1105 Change-Id: I6339d172da54bc30987bb9261ce37005ebce5501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/13 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 29aba6ef3b0d..515584351c74 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -23,6 +23,8 @@ #include #include +#include +#include #include #include @@ -132,6 +134,42 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableColumnHeaderChanged)); return; +case AccessibleEventId::TABLE_MODEL_CHANGED: +{ +AccessibleTableModelChange aChange; +aEvent.NewValue >>= aChange; + +QAccessibleTableModelChangeEvent::ModelChangeType nType; +switch (aChange.Type) +{ +case AccessibleTableModelChangeType::COLUMNS_INSERTED: +nType = QAccessibleTableModelChangeEvent::ColumnsInserted; +break; +case AccessibleTableModelChangeType::COLUMNS_REMOVED: +nType = QAccessibleTableModelChangeEvent::ColumnsRemoved; +break; +case AccessibleTableModelChangeType::ROWS_INSERTED: +nType = QAccessibleTableModelChangeEvent::RowsInserted; +break; +case AccessibleTableModelChangeType::ROWS_REMOVED: +nType = QAccessibleTableModelChangeEvent::RowsRemoved; +break; +case AccessibleTableModelChangeType::UPDATE: +nType = QAccessibleTableModelChangeEvent::DataChanged; +break; +default: +assert(false && "Unhandled AccessibleTableModelChangeType"); +return; +} +QAccessibleTableModelChangeEvent* pTableEvent += new QAccessibleTableModelChangeEvent(pQAccessibleInterface, nType); +pTableEvent->setFirstRow(aChange.FirstRow); +pTableEvent->setLastRow(aChange.LastRow); +pTableEvent->setFirstColumn(aChange.FirstColumn); +pTableEvent->setLastColumn(aChange.LastColumn); +QAccessible::updateAccessibility(pTableEvent); +return; +} case AccessibleEventId::TABLE_ROW_DESCRIPTION_CHANGED: QAccessible::updateAccessibility(new QAccessibleEvent( pQAccessibleInterface, QAccessible::TableRowDescriptionChanged)); @@ -197,7 +235,6 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible case AccessibleEventId::LABELED_BY_RELATION_CHANGED: case AccessibleEventId::MEMBER_OF_RELATION_CHANGED: case AccessibleEventId::SUB_WINDOW_OF_RELATION_CHANGED: -case AccessibleEventId::TABLE_MODEL_CHANGED: case AccessibleEventId::LISTBOX_ENTRY_EXPANDED: case AccessibleEventId::LISTBOX_ENTRY_COLLAPSED: case AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS:
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml |2 -- 1 file changed, 2 deletions(-) New commits: commit 44950bc4bbcafb86d9e6466b5ce0852122d7f2be Author: Michael Weghorn AuthorDate: Tue Mar 29 10:42:33 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Mar 29 11:59:28 2022 +0200 android: Enable support for FODS Enable support for MIME type "application/vnd.oasis.opendocument.spreadsheet-flat-xml" in AndroidManifest, the comment saying it crashes the app is obsolete. However, at least on my Android 10 AVD, that MIME type does not seem to be associated with '*.fods' files, so they were not offered to be opened. MIME type "application/octet-stream" was used instead, for which no support is declared. For testing, I just disabled the MIME type filter locally and was then able to open an FODS file just fine: --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -266,7 +266,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings } intent.setType("*/*"); -intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; +//intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; Change-Id: Ibf3f559a313f0b89bc4c25498e3efa0fcbded506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132263 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 53a064fb901b..987aeed66ae6 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -48,9 +48,7 @@ -
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtWidget.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fd8b0796092566576a80004cbffa95f3b05923f0 Author: Michael Weghorn AuthorDate: Tue Mar 29 14:46:29 2022 +0200 Commit: Julien Nabet CommitDate: Tue Mar 29 18:30:39 2022 +0200 qt: Fix typo in function name: lcl_MapUndrelineStyle Change-Id: I50b2ffeb1b6bb490c14a307152634cc51022a426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132276 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx index 77d9222a74f9..9685be9ffa57 100644 --- a/vcl/qt5/QtWidget.cxx +++ b/vcl/qt5/QtWidget.cxx @@ -637,7 +637,7 @@ QtWidget::QtWidget(QtFrame& rFrame, Qt::WindowFlags f) setFocusPolicy(Qt::ClickFocus); } -static ExtTextInputAttr lcl_MapUndrelineStyle(QTextCharFormat::UnderlineStyle us) +static ExtTextInputAttr lcl_MapUnderlineStyle(QTextCharFormat::UnderlineStyle us) { switch (us) { @@ -684,7 +684,7 @@ void QtWidget::inputMethodEvent(QInputMethodEvent* pEvent) if (aCharFormat.isValid()) { ExtTextInputAttr aETIP -= lcl_MapUndrelineStyle(aCharFormat.underlineStyle()); += lcl_MapUnderlineStyle(aCharFormat.underlineStyle()); if (aCharFormat.hasProperty(QTextFormat::BackgroundBrush)) aETIP |= ExtTextInputAttr::Highlight; if (aCharFormat.fontStrikeOut())
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-3+backports' - android/source
android/source/AndroidManifest.xml |2 -- 1 file changed, 2 deletions(-) New commits: commit 00e7d7588b8a9990271c39bda916a8c45d3daefa Author: Michael Weghorn AuthorDate: Tue Mar 29 10:42:33 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Mar 30 06:48:59 2022 +0200 android: Enable support for FODS Enable support for MIME type "application/vnd.oasis.opendocument.spreadsheet-flat-xml" in AndroidManifest, the comment saying it crashes the app is obsolete. However, at least on my Android 10 AVD, that MIME type does not seem to be associated with '*.fods' files, so they were not offered to be opened. MIME type "application/octet-stream" was used instead, for which no support is declared. For testing, I just disabled the MIME type filter locally and was then able to open an FODS file just fine: --- a/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java +++ b/android/source/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java @@ -266,7 +266,7 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings } intent.setType("*/*"); -intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; +//intent.putExtra(Intent.EXTRA_MIME_TYPES, SUPPORTED_MIME_TYPES);; Change-Id: Ibf3f559a313f0b89bc4c25498e3efa0fcbded506 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132263 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 44950bc4bbcafb86d9e6466b5ce0852122d7f2be) diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 53a064fb901b..987aeed66ae6 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -48,9 +48,7 @@ -
[Libreoffice-commits] core.git: .gitignore
.gitignore |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit ab9422621bc0aa26a00aa92f8bdebe91a6519792 Author: Michael Weghorn AuthorDate: Wed Mar 30 07:21:24 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Mar 30 10:46:37 2022 +0200 .gitignore: Add Qt Creator's '.qtc_clangd' Qt Creator 7 switched to using Clangd as the default backend for the code model. [1] After upgrading, `.qtc_clangd/compile_command.json` started showing up. [1] https://www.qt.io/blog/qt-creator-7-released Change-Id: I3cf30f1ef2873523d76c15c39d2d24c6227f8017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132290 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/.gitignore b/.gitignore index f5fbde5c1f67..9c85f02f90c3 100644 --- a/.gitignore +++ b/.gitignore @@ -143,11 +143,12 @@ DerivedData *.VC.db LibreOffice.VC.VC.opendb -# QtCreator specific +# Qt Creator specific *.pro *.pro.shared *.pro.user *.pro.user.* +.qtc_clangd # doxygen output /docs @@ -190,4 +191,4 @@ LibreOffice.VC.VC.opendb # Android builds /android/jniLibs/ -/android/obj/ \ No newline at end of file +/android/obj/
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-7-3+backports' - 20 commits - external/liborcus hwpfilter/source include/oox include/svx instsetoo_native/inc_openoffice oox/qa oox/sourc
external/liborcus/UnpackedTarball_liborcus.mk|5 external/liborcus/forcepoint-83.patch.1 | 38 hwpfilter/source/hbox.cxx| 12 include/oox/export/drawingml.hxx | 13 include/svx/svdedtv.hxx |2 instsetoo_native/inc_openoffice/unix/find-requires-x11.sh|2 oox/qa/unit/data/tdf147978_endsubpath.odp|binary oox/qa/unit/data/tdf147978_enhancedPath_commandA.odp |binary oox/qa/unit/data/tdf147978_enhancedPath_commandHIJK.odp |binary oox/qa/unit/data/tdf147978_enhancedPath_commandT.odp |binary oox/qa/unit/data/tdf147978_enhancedPath_commandXY.odp|binary oox/qa/unit/data/tdf147978_enhancedPath_subpath.pptx |binary oox/qa/unit/export.cxx | 155 + oox/source/export/drawingml.cxx | 919 ++ oox/source/export/shapes.cxx | 31 sc/qa/unit/data/xlsx/tdf147014.xlsx |binary sc/qa/unit/subsequent_filters_test2.cxx | 18 sc/qa/unit/tiledrendering/tiledrendering.cxx | 31 sc/source/filter/oox/worksheethelper.cxx | 25 sc/source/ui/view/cellsh2.cxx| 49 sc/source/ui/view/gridwin4.cxx |4 sc/source/ui/view/tabvwsh2.cxx | 11 sd/qa/unit/data/odp/tdf147978_enhancedPath_viewBox.odp |binary sd/qa/unit/data/xml/tdf92001_0.xml | 42 sd/qa/unit/export-tests-ooxml2.cxx | 32 sd/qa/unit/export-tests-ooxml3.cxx | 16 svx/sdi/svx.sdi |2 svx/source/svdraw/svdedtv.cxx|7 sw/inc/deletelistener.hxx| 92 + sw/qa/extras/layout/data/forcepoint92.doc|binary sw/qa/extras/layout/layout.cxx |6 sw/qa/extras/ooxmlexport/data/tdf147978_enhancedPath_commandABVW.odt |binary sw/qa/extras/ooxmlexport/data/tdf148111.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 44 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx| 24 sw/qa/extras/uiwriter/uiwriter3.cxx | 16 sw/source/core/frmedt/tblsel.cxx | 11 sw/source/core/layout/layact.cxx |3 sw/source/core/layout/tabfrm.cxx |8 sw/source/core/text/itratr.cxx |2 sw/source/core/undo/untbl.cxx| 29 sw/source/filter/ww8/docxsdrexport.cxx | 20 sw/source/filter/ww8/rtfattributeoutput.cxx |4 sw/source/filter/ww8/ww8par2.cxx | 71 sw/uiconfig/swxform/toolbar/formdesign.xml |2 vcl/source/helper/strhelper.cxx |3 writerfilter/source/dmapper/SdtHelper.cxx|3 47 files changed, 1245 insertions(+), 507 deletions(-) New commits: commit a39eed087762afe703561782aeebdd8aa28118be Merge: 00e7d7588b8a 6b1071b6096f Author: Michael Weghorn AuthorDate: Wed Mar 30 06:50:04 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Mar 30 06:50:04 2022 +0200 Merge branch 'libreoffice-7-3' into distro/lhm/libreoffice-7-3+backports Change-Id: I0a6e4a1a1dd38bdad0a146aec1f839786fd78fa5 commit 6b1071b6096f65de1244f8f3994366bb9cd0ff09 Author: Caolán McNamara AuthorDate: Wed Mar 23 16:49:03 2022 + Commit: Michael Stahl CommitDate: Tue Mar 29 11:53:22 2022 +0200 forcepoint#83 Invalid read of size 1 Change-Id: I1576dfd8c9731d943107764aeb66bb1c2294ad5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131996 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 87e462e33d91..a87da7edb88d 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -15,8 +15,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1)) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus)) -# crashtesting-crash-on-passing-null-to-std-string_vie.p
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/uiconfig
sw/uiconfig/swxform/toolbar/formdesign.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 755676b63bbe4c404814cb409962867d2782c8ae Author: Michael Weghorn AuthorDate: Mon Mar 28 11:05:34 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Mar 31 16:02:06 2022 +0200 tdf#148235 Restore toolbar item to switch XForm to design mode commit 45b6f096e7ae86d0692ecdfd5b7069622d8a6efa Date: Sun Oct 28 17:02:34 2018 +0100 sw toolbars sync context toolbars between different apps had replaced the "Form Design" toolbar item to switch a complete XForm to design mode with an entry that switches the form controls to design mode instead. (The former one is labelled "Design Mode On/Off", the latter one just "Design Mode" in the English UI.) This meant that the XForm could no longer be switched to design mode from there, unless the toolbar was manually customized to add the entry back. This brings the previous toolbar item back. It also removes the one to switch the form controls to design mode again, since that one is already contained in the "Form Controls" toolbar, where it fits better. (And having two different toolbar items with almost identical labels but different functionality would probably be rather confusing.) Change-Id: Ia4c98dfa6ad8372eba08a9f08920153133a7f88d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132207 Reviewed-by: Andreas Kainz Reviewed-by: Michael Weghorn Tested-by: Jenkins (cherry picked from commit 4f9bf4201bb706cd19142f0805cfc4c859186cd4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132176 Tested-by: Michael Weghorn diff --git a/sw/uiconfig/swxform/toolbar/formdesign.xml b/sw/uiconfig/swxform/toolbar/formdesign.xml index 067ddff0675f..f748bcf68e2e 100644 --- a/sw/uiconfig/swxform/toolbar/formdesign.xml +++ b/sw/uiconfig/swxform/toolbar/formdesign.xml @@ -44,7 +44,7 @@ - +
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source
sc/source/ui/inc/gridwin.hxx |7 --- sc/source/ui/view/gridwin.cxx |6 --- sc/source/ui/view/gridwin4.cxx | 73 - sc/source/ui/view/tabview5.cxx | 11 -- 4 files changed, 97 deletions(-) New commits: commit 1f966bb3e38a028c82cee40f6c5a17fe9619b53c Author: Michael Weghorn AuthorDate: Fri Apr 1 00:32:14 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 1 10:00:11 2022 +0200 trac#34262 Revert "Do not count pages for initial page breaks, tdf#124983 follow-up" Analyzing trac#36262 showed that the issue with WollMux mail merge using wrong data record count when a large amount of records is involved starts with this commit. (The issue was not reliably reproducible on all systems, though; I can e.g. only reproduce issue about wrong data record count on my LHM Win client, not on Linux or my non-LHM Win client.) Other tdf#124983-related commits are missing on this branch, which might be related. There is the initial fix commit caeb7b141280a65e60525f11a7e6514b76e12e11 Author: Ilhan Yesil Date: Wed Jul 10 15:41:27 2019 +0200 tdf#124983 In calc make printable page borders also initially visible with follow-up commit 8728eddf938c9c843ab72929cfd3947735ca8da2 Author: Miklos Vajna Date: Mon Jan 6 10:31:50 2020 +0100 tdf#129552 sc: avoid infinite invalidation loop when the print range is empty and the revert of the initial fix in commit b3e302b98dd7b992b7aa5a7f6756980d3edafc83 Author: Xisco Fauli Date: Thu Feb 13 17:06:58 2020 +0100 tdf#130640: Revert "tdf#124983 In calc make printable page... and the commit reverted now in this commit commit 129c680f02564c8bee93930dec9f2ad80980cc1c Author: Eike Rathke Date: Wed Aug 18 23:42:45 2021 +0200 Do not count pages for initial page breaks, tdf#124983 follow-up without the second version of the fix being present at all (master commit commit 86e300df241312f6152da1cfa3cb2b8c668d1df5 Author: Ilhan Yesil Date: Fri Mar 6 13:40:59 2020 +0100 tdf#124983 In calc make printable page borders initially visible ) after the revert, so maybe having the follow-up without the underlying fix is not a good idea. And there would be another follow-up commit on master that we don't have either: commit 3d7007ef8784e92bb56a91c40e7bdff812251677 Author: Eike Rathke Date: Tue Jun 29 14:31:19 2021 +0200 maShowPageBreaksTimer.Stop() in ScGridWindow::dispose(), tdf#124983 follow-up Revert this for now to unbreak WollMux mail merge. This reverts commit 129c680f02564c8bee93930dec9f2ad80980cc1c. Change-Id: I74c93ab7cd27eba347b78a198e3d8fbe5fdeb0e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132370 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index e9363a1f96d2..5ebb26241d10 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -190,8 +190,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel RfCorneraRFSelectedCorned; -Timer maShowPageBreaksTimer; - boolbEEMouse:1; // Edit Engine has mouse boolbDPMouse:1; // DataPilot D&D (new Pivot table) boolbRFMouse:1; // RangeFinder drag @@ -202,7 +200,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel boolbNeedsRepaint:1; boolbAutoMarkVisible:1; boolbListValButton:1; -boolbInitialPageBreaks:1; DECL_LINK( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK( PopupSpellingHdl, SpellCallbackInfo&, void ); @@ -291,8 +288,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel voidGetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ); -voidSetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab); -DECL_LINK(InitiatePageBreaksTimer, Timer*, void); protected: virtual voidPrePaint(vcl::RenderContext& rRenderContext) override; @@ -467,8 +462,6 @@ public: void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const; -void initiatePageBreaks(); - protected: void ImpCreateOverlayObjects(); void ImpDestroyOverlayObjects(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index aa540b5d5134..0ed015bb31da 100644 --- a/sc/source/ui/view/gridwin.c
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source
sw/source/core/doc/docnew.cxx | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) New commits: commit 228537cebb6ffa75e7e2270fb7bfd6e91fa6ba2c Author: Michael Weghorn AuthorDate: Fri Apr 1 08:14:30 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Apr 1 10:00:44 2022 +0200 trac#34262 Revert "tdf#144565 sw_redlinehide: fix mailmerge when flys anchored at last node" Causes significant performance regressions with WollMux mail merge, so revert for now. Mail merge with the test doc from tdf#144565 at least already fails with LO 6.1 (Build-ID 2103) on moviA as well, so for now, better live with an existing bug than introducing a new one in our LO 6.4 based releases. This reverts commit beae7a08c30f2f368708dbc7a9988ecfad08af60. Change-Id: I6271ffe3f3036df6e16d93389ad21419b541e03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132394 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index e125e44420b7..984f2335bc45 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1054,14 +1054,19 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu { SwNodeIndex aBreakIdx( GetNodes().GetEndOfContent(), -1 ); SwPosition aBreakPos( aBreakIdx ); -// insert new node - will be removed at the end... -// (don't SplitNode() as it may move flys to the wrong node) -getIDocumentContentOperations().AppendTextNode(aBreakPos); -SwFormatPageDesc pageDesc(pTargetPageDesc); -pageDesc.SetNumOffset(nStartPageNumber); -// set break on the last paragraph -getIDocumentContentOperations().InsertPoolItem(SwPaM(aBreakPos), -pageDesc, SetAttrMode::DEFAULT, pTargetShell->GetLayout()); +// InsertPageBreak just works on SwTextNode nodes, so make +// sure the last node is one! +bool bIsTextNode = aBreakIdx.GetNode().IsTextNode(); +if ( !bIsTextNode ) +getIDocumentContentOperations().AppendTextNode( aBreakPos ); +const OUString name = pTargetPageDesc->GetName(); +pTargetShell->InsertPageBreak( &name, nStartPageNumber ); +if ( !bIsTextNode ) +{ +pTargetShell->SttEndDoc( false ); +--aBreakIdx; +GetNodes().Delete( aBreakIdx ); +} // There is now a new empty text node on the new page. If it has // any marks, those are from the previous page: move them back
[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sc/source
sc/source/ui/inc/gridwin.hxx |7 +++ sc/source/ui/view/gridwin.cxx |6 +++ sc/source/ui/view/gridwin4.cxx | 73 + sc/source/ui/view/tabview5.cxx | 11 ++ 4 files changed, 97 insertions(+) New commits: commit df5aeb624e328fb191996632f2874618b618e94c Author: Michael Weghorn AuthorDate: Tue Apr 5 13:40:23 2022 +0200 Commit: Michael Weghorn CommitDate: Tue Apr 5 15:30:12 2022 +0200 Revert "trac#34262 Revert "Do not count pages for initial page breaks, tdf#124983 follow-up"" The actual root cause of the WollMux mail merge issue (too little Java heap space) has been identified in the meantime. In addition, when reverting, I was confused by the fact that the commit msg was only that of the follow-up commit commit 129c680f02564c8bee93930dec9f2ad80980cc1c Author: Eike Rathke Date: Wed Aug 18 23:42:45 2021 +0200 Do not count pages for initial page breaks, tdf#124983 follow-up but the second version of the underlying fix commit 86e300df241312f6152da1cfa3cb2b8c668d1df5 Author: Ilhan Yesil Date: Fri Mar 6 13:40:59 2020 +0100 tdf#124983 In calc make printable page borders initially visible as well as a cherry-pick of the follow-up commit 3d7007ef8784e92bb56a91c40e7bdff812251677 Author: Eike Rathke Date: Tue Jun 29 14:31:19 2021 +0200 maShowPageBreaksTimer.Stop() in ScGridWindow::dispose(), tdf#124983 follow-up were actually all already contained in that single commit as well, without being mentioned explicitly. This reverts commit 1f966bb3e38a028c82cee40f6c5a17fe9619b53c. Change-Id: Ib42a2612843bd78ecb9aa538ab64f2a953a3c093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132572 Tested-by: Michael Weghorn Reviewed-by: Michael Weghorn diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 5ebb26241d10..e9363a1f96d2 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -190,6 +190,8 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel RfCorneraRFSelectedCorned; +Timer maShowPageBreaksTimer; + boolbEEMouse:1; // Edit Engine has mouse boolbDPMouse:1; // DataPilot D&D (new Pivot table) boolbRFMouse:1; // RangeFinder drag @@ -200,6 +202,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel boolbNeedsRepaint:1; boolbAutoMarkVisible:1; boolbListValButton:1; +boolbInitialPageBreaks:1; DECL_LINK( PopupModeEndHdl, FloatingWindow*, void ); DECL_LINK( PopupSpellingHdl, SpellCallbackInfo&, void ); @@ -288,6 +291,8 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel voidGetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects ); +voidSetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab); +DECL_LINK(InitiatePageBreaksTimer, Timer*, void); protected: virtual voidPrePaint(vcl::RenderContext& rRenderContext) override; @@ -462,6 +467,8 @@ public: void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const; +void initiatePageBreaks(); + protected: void ImpCreateOverlayObjects(); void ImpDestroyOverlayObjects(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 0ed015bb31da..aa540b5d5134 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -482,6 +482,10 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() ); EnableRTL( false ); + +bInitialPageBreaks = true; +maShowPageBreaksTimer.SetInvokeHandler(LINK(this, ScGridWindow, InitiatePageBreaksTimer)); +maShowPageBreaksTimer.SetTimeout(1); } ScGridWindow::~ScGridWindow() @@ -491,6 +495,8 @@ ScGridWindow::~ScGridWindow() void ScGridWindow::dispose() { +maShowPageBreaksTimer.Stop(); + ImpDestroyOverlayObjects(); mpFilterBox.disposeAndClear(); diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 9426c8842bf0..aa7ad1312acc 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1055,6 +1055,28 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI if (mpNoteMarker) mpNoteMarker->Draw(); // Above the cursor, in drawing map mode + +if (bPage && bInitialPageBreaks) +SetupInitialPageBreaks(rDoc, nTab); +} + + +void ScGr
[Libreoffice-commits] core.git: sw/inc
sw/inc/accmap.hxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 1afa29d1e526c4e10318a4b05767fa4333786cd4 Author: Michael Weghorn AuthorDate: Fri Feb 18 08:55:08 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Feb 18 18:51:06 2022 +0100 sw a11y: Make these SwAccessibleMap members private And drop the 'SET_PARA' typedef which was no longer referring to a set by now anyway. Change-Id: I303b335cd3276562ed02e668a912895f78dc506c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130140 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 5b32fe204c57..0090d7837876 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -96,6 +96,11 @@ class SwAccessibleMap final : public ::accessibility::IAccessibleViewForwarder, SwShapeList_Impl mvShapes; std::unique_ptr mpEvents; std::unique_ptr mpEventMap; + +// Para Container for InvalidateCursorPosition +o3tl::sorted_vector m_setParaAdd; +o3tl::sorted_vector m_setParaRemove; + // #i27301 data structure to keep information about // accessible paragraph, which have a selection. std::unique_ptr mpSelectedParas; @@ -302,11 +307,6 @@ private: MapMode& _orMapMode ) const; public: virtual bool IsDocumentSelAll() override; - -//Para Container for InvalidateCursorPosition -typedef o3tl::sorted_vector< SwAccessibleParagraph* > SET_PARA; -SET_PARA m_setParaAdd; -SET_PARA m_setParaRemove; }; #endif
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit dc6eb44e625c541be1db5911d53b3b0cc30a2b1f Author: Michael Weghorn AuthorDate: Fri Feb 18 12:38:16 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Feb 18 20:04:39 2022 +0100 qt a11y: Map CARET_CHANGED event to Qt equivalent The previous handling of mapping that to QAccessible::TableSummaryChanged looks rather arbitrary. Change-Id: I066cee4bd90a49a47dd29252c11f8f74edccb637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130141 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 1ceb6f6de0e1..5a8e84144210 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -60,6 +60,14 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::ActiveDescendantChanged)); return; +case AccessibleEventId::CARET_CHANGED: +{ +sal_Int32 nNewCursorPos = 0; +aEvent.NewValue >>= nNewCursorPos; +QAccessible::updateAccessibility( +new QAccessibleTextCursorEvent(pQAccessibleInterface, nNewCursorPos)); +return; +} case AccessibleEventId::CHILD: { QAccessible::Event event = QAccessible::InvalidEvent; @@ -109,7 +117,6 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableRowHeaderChanged)); return; case AccessibleEventId::TABLE_SUMMARY_CHANGED: -case AccessibleEventId::CARET_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableSummaryChanged)); return;
[Libreoffice-commits] core.git: configure.ac vcl/unx
configure.ac |2 +- vcl/unx/gtk3/a11y/atkwrapper.cxx | 23 +-- 2 files changed, 6 insertions(+), 19 deletions(-) New commits: commit c688fd1393dccfb3df39bd05cceed1cf0c401b02 Author: Michael Weghorn AuthorDate: Mon Feb 21 15:49:52 2022 +0100 Commit: Michael Weghorn CommitDate: Tue Feb 22 10:18:46 2022 +0100 gtk3 a11y: Require atk >= 2.28.1, drop code for < 2.15.2 README.md lists RHEL 7 or CentOS 7 as runtime baseline, which has ATK 2.28.1 [1]. Therefore, check for that version in configure.ac and drop some code for versions < 2.15.2. Requiring 2.28.1 as minimum ATK version will allow for further cleanup in follow-up commits. [1] https://centos.pkgs.org/7/centos-x86_64/atk-2.28.1-2.el7.x86_64.rpm.html Change-Id: Id7084366d2359deb60948b8969c1d3dcc68ddb47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130328 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/configure.ac b/configure.ac index af1da0103177..b22d8e17c6da 100644 --- a/configure.ac +++ b/configure.ac @@ -11639,7 +11639,7 @@ if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = add_warning 'Non-system cairo combined with gtk3 is assumed to cause trouble; proceed at your own risk.' fi : ${with_system_cairo:=yes} -PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.20 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo) +PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.20 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 atk >= 2.28.1 cairo) GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" FilterLibs "${GTK3_LIBS}" diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index 53ac1e79df98..1c3d7f5843de 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -267,24 +267,11 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) ATK_ROLE_UNKNOWN, // TREE_ITEM - registered below ATK_ROLE_TREE_TABLE, ATK_ROLE_SCROLL_PANE, // COMMENT - mapped to atk_role_scroll_pane -ATK_ROLE_UNKNOWN// COMMENT_END - mapped to atk_role_unknown -#if defined(ATK_CHECK_VERSION) -//older ver that doesn't define ATK_CHECK_VERSION doesn't have the following -, ATK_ROLE_DOCUMENT_PRESENTATION -, ATK_ROLE_DOCUMENT_SPREADSHEET -, ATK_ROLE_DOCUMENT_TEXT -#if ATK_CHECK_VERSION(2,15,2) -, ATK_ROLE_STATIC -#else -, ATK_ROLE_LABEL -#endif -#else -//older version should fallback to DOCUMENT_FRAME role -, ATK_ROLE_DOCUMENT_FRAME -, ATK_ROLE_DOCUMENT_FRAME -, ATK_ROLE_DOCUMENT_FRAME -, ATK_ROLE_LABEL -#endif +ATK_ROLE_UNKNOWN,// COMMENT_END - mapped to atk_role_unknown +ATK_ROLE_DOCUMENT_PRESENTATION, +ATK_ROLE_DOCUMENT_SPREADSHEET, +ATK_ROLE_DOCUMENT_TEXT, +ATK_ROLE_STATIC }; static bool initialized = false;
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atkwrapper.cxx | 72 --- 1 file changed, 16 insertions(+), 56 deletions(-) New commits: commit b910044514cfdeff2967eab248d03b2e9c5ca863 Author: Michael Weghorn AuthorDate: Mon Feb 21 16:18:45 2022 +0100 Commit: Michael Weghorn CommitDate: Tue Feb 22 10:19:12 2022 +0100 gtk3 a11y: Just use ATK constants for roles The ATK role used here that was added to ATK latest is ATK_ROLE_FOOTNOTE, which was added in ATK 2.26. With a minimum ATK version of ATK 2.28.1 (s.a. Change-Id: Id7084366d2359deb60948b8969c1d3dcc68ddb47 "gtk3 a11y: Require atk >= 2.28.1, drop code for < 2.15.2"), all constants can simply be used as is, so drop the special handling that was there for older ATK versions which involved calling 'atk_role_register' that was deprecated in ATK 2.12 [1]: > Deprecated since: > Since 2.12. If your application/toolkit doesn’t find a suitable > role for a specific object defined at AtkRole, please submit a > bug in order to add a new role to the specification. [1] https://docs.gtk.org/atk/type_func.Role.register.html Change-Id: I93579e84576feb1bcae8cecf2dc8b264e8be3153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130329 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index 1c3d7f5843de..2d65859ddd12 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -166,20 +166,6 @@ AtkStateType mapAtkState( sal_Int16 nState ) return type; } -static AtkRole getRoleForName( const gchar * name ) -{ -AtkRole ret = atk_role_for_name( name ); -if( ATK_ROLE_INVALID == ret ) -{ -// this should only happen in old ATK versions -SAL_WNODEPRECATED_DECLARATIONS_PUSH -ret = atk_role_register( name ); -SAL_WNODEPRECATED_DECLARATIONS_POP -} - -return ret; -} - static AtkRole mapToAtkRole( sal_Int16 nRole ) { AtkRole role = ATK_ROLE_UNKNOWN; @@ -198,21 +184,21 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) ATK_ROLE_DESKTOP_FRAME, // ? pane ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_DIALOG, -ATK_ROLE_UNKNOWN, // DOCUMENT - registered below -ATK_ROLE_UNKNOWN, // EMBEDDED_OBJECT - registered below -ATK_ROLE_UNKNOWN, // END_NOTE - registered below +ATK_ROLE_DOCUMENT_FRAME, // DOCUMENT +ATK_ROLE_EMBEDDED,// EMBEDDED_OBJECT +ATK_ROLE_FOOTNOTE,// END_NOTE ATK_ROLE_FILE_CHOOSER, ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_FOOTER, -ATK_ROLE_UNKNOWN, // FOOTNOTE - registered below +ATK_ROLE_FOOTNOTE, ATK_ROLE_FRAME, ATK_ROLE_GLASS_PANE, ATK_ROLE_IMAGE, // GRAPHIC -ATK_ROLE_UNKNOWN, // GROUP_BOX - registered below +ATK_ROLE_GROUPING,// GROUP_BOX ATK_ROLE_HEADER, ATK_ROLE_HEADING, -ATK_ROLE_TEXT,// HYPER_LINK - registered below +ATK_ROLE_LINK,// HYPER_LINK ATK_ROLE_ICON, ATK_ROLE_INTERNAL_FRAME, ATK_ROLE_LABEL, @@ -255,18 +241,18 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) ATK_ROLE_WINDOW, ATK_ROLE_PUSH_BUTTON, // BUTTON_DROPDOWN ATK_ROLE_PUSH_BUTTON, // BUTTON_MENU -ATK_ROLE_UNKNOWN, // CAPTION - registered below -ATK_ROLE_UNKNOWN, // CHART - registered below -ATK_ROLE_UNKNOWN, // EDIT_BAR - registered below -ATK_ROLE_UNKNOWN, // FORM - registered below -ATK_ROLE_UNKNOWN, // IMAGE_MAP - registered below -ATK_ROLE_UNKNOWN, // NOTE - registered below -ATK_ROLE_UNKNOWN, // PAGE - registered below +ATK_ROLE_CAPTION, +ATK_ROLE_CHART, +ATK_ROLE_EDITBAR, +ATK_ROLE_FORM, +ATK_ROLE_IMAGE_MAP, +ATK_ROLE_COMMENT, // NOTE +ATK_ROLE_PAGE, ATK_ROLE_RULER, -ATK_ROLE_UNKNOWN, // SECTION - registered below -ATK_ROLE_UNKNOWN, // TREE_ITEM - registered below +ATK_ROLE_SECTION, +ATK_ROLE_TREE_ITEM, ATK_ROLE_TREE_TABLE, -ATK_ROLE_SCROLL_PANE, // COMMENT - mapped to atk_role_scroll_pane +ATK_ROLE_COMMENT, ATK_ROLE_UNKNOWN,// COMMENT_END - mapped to atk_role_unknown ATK_ROLE_DOCUMENT_PRESENTATION, ATK_ROLE_DOCUMENT_SPREADSHEET, @@ -274,32 +260,6 @@ static AtkRole mapToAtkRole( sal_Int16 nRole ) ATK_ROLE_STATIC }; -static bool initialized = false; - -if( ! initialized ) -{ -// the accessible roles below were added to ATK in later versions, -// with role_for_name we will know if they exist in runtime. -roleMap[accessibility::AccessibleRole::EDIT_
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atkwrapper.cxx | 277 +-- 1 file changed, 180 insertions(+), 97 deletions(-) New commits: commit 2ab735df698972bff159f52975a1ed5cd4df128e Author: Michael Weghorn AuthorDate: Mon Feb 21 16:51:03 2022 +0100 Commit: Michael Weghorn CommitDate: Tue Feb 22 10:19:27 2022 +0100 gtk3 a11y: Make a11y role mapping more explicit Use switch-case instead of an array that uses the numerical value of the accessibility::AccessibleRole as an index. Change-Id: Id7fbc31c058d0db716d2b60a4a7eb7e7e954af95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130330 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atkwrapper.cxx b/vcl/unx/gtk3/a11y/atkwrapper.cxx index 2d65859ddd12..d23f384e26fc 100644 --- a/vcl/unx/gtk3/a11y/atkwrapper.cxx +++ b/vcl/unx/gtk3/a11y/atkwrapper.cxx @@ -168,103 +168,186 @@ AtkStateType mapAtkState( sal_Int16 nState ) static AtkRole mapToAtkRole( sal_Int16 nRole ) { -AtkRole role = ATK_ROLE_UNKNOWN; - -static AtkRole roleMap[] = { -ATK_ROLE_UNKNOWN, -ATK_ROLE_ALERT, -ATK_ROLE_COLUMN_HEADER, -ATK_ROLE_CANVAS, -ATK_ROLE_CHECK_BOX, -ATK_ROLE_CHECK_MENU_ITEM, -ATK_ROLE_COLOR_CHOOSER, -ATK_ROLE_COMBO_BOX, -ATK_ROLE_DATE_EDITOR, -ATK_ROLE_DESKTOP_ICON, -ATK_ROLE_DESKTOP_FRAME, // ? pane -ATK_ROLE_DIRECTORY_PANE, -ATK_ROLE_DIALOG, -ATK_ROLE_DOCUMENT_FRAME, // DOCUMENT -ATK_ROLE_EMBEDDED,// EMBEDDED_OBJECT -ATK_ROLE_FOOTNOTE,// END_NOTE -ATK_ROLE_FILE_CHOOSER, -ATK_ROLE_FILLER, -ATK_ROLE_FONT_CHOOSER, -ATK_ROLE_FOOTER, -ATK_ROLE_FOOTNOTE, -ATK_ROLE_FRAME, -ATK_ROLE_GLASS_PANE, -ATK_ROLE_IMAGE, // GRAPHIC -ATK_ROLE_GROUPING,// GROUP_BOX -ATK_ROLE_HEADER, -ATK_ROLE_HEADING, -ATK_ROLE_LINK,// HYPER_LINK -ATK_ROLE_ICON, -ATK_ROLE_INTERNAL_FRAME, -ATK_ROLE_LABEL, -ATK_ROLE_LAYERED_PANE, -ATK_ROLE_LIST, -ATK_ROLE_LIST_ITEM, -ATK_ROLE_MENU, -ATK_ROLE_MENU_BAR, -ATK_ROLE_MENU_ITEM, -ATK_ROLE_OPTION_PANE, -ATK_ROLE_PAGE_TAB, -ATK_ROLE_PAGE_TAB_LIST, -ATK_ROLE_PANEL, -ATK_ROLE_PARAGRAPH, -ATK_ROLE_PASSWORD_TEXT, -ATK_ROLE_POPUP_MENU, -ATK_ROLE_PUSH_BUTTON, -ATK_ROLE_PROGRESS_BAR, -ATK_ROLE_RADIO_BUTTON, -ATK_ROLE_RADIO_MENU_ITEM, -ATK_ROLE_ROW_HEADER, -ATK_ROLE_ROOT_PANE, -ATK_ROLE_SCROLL_BAR, -ATK_ROLE_SCROLL_PANE, -ATK_ROLE_PANEL, // SHAPE -ATK_ROLE_SEPARATOR, -ATK_ROLE_SLIDER, -ATK_ROLE_SPIN_BUTTON, // SPIN_BOX ? -ATK_ROLE_SPLIT_PANE, -ATK_ROLE_STATUSBAR, -ATK_ROLE_TABLE, -ATK_ROLE_TABLE_CELL, -ATK_ROLE_TEXT, -ATK_ROLE_PANEL, // TEXT_FRAME -ATK_ROLE_TOGGLE_BUTTON, -ATK_ROLE_TOOL_BAR, -ATK_ROLE_TOOL_TIP, -ATK_ROLE_TREE, -ATK_ROLE_VIEWPORT, -ATK_ROLE_WINDOW, -ATK_ROLE_PUSH_BUTTON, // BUTTON_DROPDOWN -ATK_ROLE_PUSH_BUTTON, // BUTTON_MENU -ATK_ROLE_CAPTION, -ATK_ROLE_CHART, -ATK_ROLE_EDITBAR, -ATK_ROLE_FORM, -ATK_ROLE_IMAGE_MAP, -ATK_ROLE_COMMENT, // NOTE -ATK_ROLE_PAGE, -ATK_ROLE_RULER, -ATK_ROLE_SECTION, -ATK_ROLE_TREE_ITEM, -ATK_ROLE_TREE_TABLE, -ATK_ROLE_COMMENT, -ATK_ROLE_UNKNOWN,// COMMENT_END - mapped to atk_role_unknown -ATK_ROLE_DOCUMENT_PRESENTATION, -ATK_ROLE_DOCUMENT_SPREADSHEET, -ATK_ROLE_DOCUMENT_TEXT, -ATK_ROLE_STATIC -}; - -static const sal_Int32 nMapSize = SAL_N_ELEMENTS(roleMap); -if( 0 <= nRole && nMapSize > nRole ) -role = roleMap[nRole]; - -return role; +switch (nRole) +{ +case accessibility::AccessibleRole::UNKNOWN: +return ATK_ROLE_UNKNOWN; +case accessibility::AccessibleRole::ALERT: +return ATK_ROLE_ALERT; +case accessibility::AccessibleRole::COLUMN_HEADER: +return ATK_ROLE_COLUMN_HEADER; +case accessibility::AccessibleRole::CANVAS: +return ATK_ROLE_CANVAS; +case accessibility::AccessibleRole::CHECK_BOX: +return ATK_ROLE_CHECK_BOX; +case accessibility::AccessibleRole::CHECK_MENU_ITEM: +return ATK_ROLE_CHECK_MENU_ITEM; +case accessibility::AccessibleRole::COLOR_CHOOSER: +return ATK_ROLE_COLOR_CHOOSER; +case accessibility::AccessibleRole::COMBO_BOX: +return ATK_ROLE_COMBO_BOX; +case accessibility::AccessibleRole::DATE_EDITOR: +return ATK_ROLE_DATE_EDITOR; +case acc
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3-1' - configure.ac
configure.ac |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit d6b54eea5524bd9ef87444c8959836dcb8f492e4 Author: Michael Weghorn AuthorDate: Wed Feb 16 13:38:47 2022 +0100 Commit: Thorsten Behrens CommitDate: Tue Feb 22 15:16:59 2022 +0100 configure.ac: Update kf5 include/lib check to work with KF5 >= 5.91 The 'kcoreaddons_version.h' header was moved to the 'KCoreAddons' subdirectory in kcoreaddons commit commit d971ba9bb27a3e8f18a116692fdf98c1729ac244 Author: Ahmad Samir Date: Sat Jan 15 14:14:13 2022 +0200 Install kcoreaddons_version.h in /usr/include/KF5/KCoreAddons/ Instead of /usr/include/KF5/kcoreaddons_version.h. For more details see: https://invent.kde.org/frameworks/kservice/-/merge_requests/79 GIT_SILENT Adapt the KF5 check to check for the 'KFileWidget' header and the 'libKF5KIOFileWidgets.so' library instead. This is more exact anyway, since we require KIOFileWidgets, and the previous check didn't ensure that. (So in case only KF5CoreAddons but not KIOFileWidgets was installed, configure would previously pass, but the build fail.) [1] https://invent.kde.org/frameworks/kcoreaddons/-/commit/d971ba9bb27a3e8f18a116692fdf98c1729ac244 Change-Id: I7ecf7f29dce85e1a6e6b0d4f2519fa37ab04ca84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129996 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 5fd5e42bf28a7910321c6b6d76257e7386839fbc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130007 Reviewed-by: Michael Stahl (cherry picked from commit a1d08b478a4f55c5e8fc08eb3cf963c2a8107221) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130106 Reviewed-by: Xisco Fauli Reviewed-by: Adolfo Jayme Barrientos Reviewed-by: Thorsten Behrens Tested-by: Thorsten Behrens diff --git a/configure.ac b/configure.ac index b5bdff1bdadc..69b575fde049 100644 --- a/configure.ac +++ b/configure.ac @@ -13077,8 +13077,8 @@ then kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel" fi -kf5_test_include="KF5/kcoreaddons_version.h" -kf5_test_library="libKF5CoreAddons.so" +kf5_test_include="KF5/KIOFileWidgets/KFileWidget" +kf5_test_library="libKF5KIOFileWidgets.so" kf5_libdirs="$qt5_libdir $kf5_libdirs" dnl kf5 KDE4 support compatibility installed
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atkimage.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 63bc309c7af04496c68346b0eee0c138943300ff Author: Michael Weghorn AuthorDate: Tue Feb 22 08:47:04 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 06:24:52 2022 +0100 gtk3 a11y: Replace deprecated atk_component_get_position in atkimage 'atk_component_get_position' is deprecated since ATK 2.12 and 'atk_component_get_extents' should be used instead, which also returns the width and the height (that we don't need here). [1] https://docs.gtk.org/atk/method.Component.get_position.html Change-Id: I8c49cc6942406051bca1fcdfa4ca0bfc8d326911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130333 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atkimage.cxx b/vcl/unx/gtk3/a11y/atkimage.cxx index 477c71cc99ba..da4965b86828 100644 --- a/vcl/unx/gtk3/a11y/atkimage.cxx +++ b/vcl/unx/gtk3/a11y/atkimage.cxx @@ -84,9 +84,9 @@ image_get_image_position( AtkImage *image, *x = *y = -1; if( ATK_IS_COMPONENT( image ) ) { -SAL_WNODEPRECATED_DECLARATIONS_PUSH -atk_component_get_position( ATK_COMPONENT( image ), x, y, coord_type ); -SAL_WNODEPRECATED_DECLARATIONS_POP +gint nWidth = -1; +gint nHeight = -1; +atk_component_get_extents(ATK_COMPONENT(image), x, y, &nWidth, &nHeight, coord_type); } else g_warning( "FIXME: no image position information" );
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atktext.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit e70b054d4945dd9bda0e869e5bc0aa19432a9802 Author: Michael Weghorn AuthorDate: Tue Feb 22 09:18:56 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 06:25:23 2022 +0100 gtk3 a11y: Replace deprecated atk_component_get_position in atktext Change-Id: I06689dd0ff2f47c06879bdc3c61ce5b5db90a120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130334 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atktext.cxx b/vcl/unx/gtk3/a11y/atktext.cxx index 713b03325518..8fc773224768 100644 --- a/vcl/unx/gtk3/a11y/atktext.cxx +++ b/vcl/unx/gtk3/a11y/atktext.cxx @@ -669,9 +669,9 @@ text_wrapper_get_character_extents( AtkText *text, if( coords == ATK_XY_SCREEN ) { g_return_if_fail( ATK_IS_COMPONENT( text ) ); -SAL_WNODEPRECATED_DECLARATIONS_PUSH -atk_component_get_position( ATK_COMPONENT( text ), &origin_x, &origin_y, coords); -SAL_WNODEPRECATED_DECLARATIONS_POP +gint nWidth = -1; +gint nHeight = -1; +atk_component_get_extents(ATK_COMPONENT(text), &origin_x, &origin_y, &nWidth, &nHeight, coords); } *x = aRect.X + origin_x; @@ -720,9 +720,9 @@ text_wrapper_get_offset_at_point (AtkText *text, if( coords == ATK_XY_SCREEN ) { g_return_val_if_fail( ATK_IS_COMPONENT( text ), -1 ); -SAL_WNODEPRECATED_DECLARATIONS_PUSH -atk_component_get_position( ATK_COMPONENT( text ), &origin_x, &origin_y, coords); -SAL_WNODEPRECATED_DECLARATIONS_POP +gint nWidth = -1; +gint nHeight = -1; +atk_component_get_extents(ATK_COMPONENT(text), &origin_x, &origin_y, &nWidth, &nHeight, coords); } return pText->getIndexAtPoint( awt::Point(x - origin_x, y - origin_y) );
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/a11y/atklistener.cxx | 27 ++- vcl/unx/gtk3/a11y/atktext.cxx | 18 -- 2 files changed, 10 insertions(+), 35 deletions(-) New commits: commit 4162feb37109d4e9da44933831e10b5732721c72 Author: Michael Weghorn AuthorDate: Tue Feb 22 13:39:56 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 06:26:32 2022 +0100 gtk3 a11y: Migrate from deprecated "text-changed" ATK signal The "text-changed" ATK signal (which has a detail of "insert" or "delete" to indicate what type of change happened) is deprecated since ATK 2.9.4 and "text-insert" or "text-remove" should be used instead [1], so do this. Those have the inserted/removed text as a third argument, so this also obsoletes the workaround to remember the deleted text under the "ooo::text_changed::delete" key for the ATK object in the "text-changed:delete" case. (See inline comments dropped in this commit for more details on how that was used, by now "appropriate API exists in atk to pass the string value directly".) Note that this only changes the signal on the ATK layer, the corresponding signal on the (underlying) AT-SPI layer is still "object::text-changed::inserted" or "object::text-changed::deleted", but other than the ATK signal of the same name, this event already has the inserted/deleted text as extra data. [2] (The conversion from the ATK signal to the AT-SPI one happens in at-spi2-atk. [3]). I used this script to check the emitted AT-SPI events: #!/usr/bin/python3 import pyatspi def listener(e): try: if e.host_application.name != 'soffice': return if e.source.role != pyatspi.role.ROLE_PARAGRAPH: return except: return print(e) pyatspi.Registry.registerEventListener(listener, "object:text-changed") pyatspi.Registry.start() Pasting the Chinese sample text from tdf#147285 into an empty Writer document, removing the third character and typing "a" instead resulted in the expected output: > object:text-changed:insert(0, 12, 维基百科,自由的百科全书) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] > object:text-changed:delete(2, 1, 百) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] > object:text-changed:insert(2, 1, a) > source: [paragraph | ] > host_application: [application | soffice] > sender: [application | soffice] Given this test worked, drop the old > // TESTME: and remove this comment: comment as well, and also drop the > // TODO: when GNOME starts to send "update" kind of events, change > // we need to re-think this implementation as well comment. From what I can see this is still the way to handle events using ATK (i.e. for Gtk 3 at least, Gtk 4 has a new a11y implementation [4], but that will have to be looked at separately anyway). [1] https://docs.gtk.org/atk/signal.Text.text-changed.html [2] https://accessibility.linuxfoundation.org/a11yspecs/atspi/adoc/atspi-events.html [3] https://gitlab.gnome.org/GNOME/at-spi2-atk/-/blob/0af3f73b/atk-adaptor/event.c#L962 [4] https://blog.gtk.org/2020/10/21/accessibility-in-gtk-4/ Change-Id: Ibcae27ecfccf41a909e06d01ce681e4b7b97eb25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130352 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/a11y/atklistener.cxx b/vcl/unx/gtk3/a11y/atklistener.cxx index 2ef96be4616e..6d81a9a60531 100644 --- a/vcl/unx/gtk3/a11y/atklistener.cxx +++ b/vcl/unx/gtk3/a11y/atklistener.cxx @@ -566,34 +566,27 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven } case accessibility::AccessibleEventId::TEXT_CHANGED: { -// TESTME: and remove this comment: // cf. comphelper/source/misc/accessibletexthelper.cxx (implInitTextChangedEvent) accessibility::TextSegment aDeletedText; accessibility::TextSegment aInsertedText; -// TODO: when GNOME starts to send "update" kind of events, change -// we need to re-think this implementation as well if( aEvent.OldValue >>= aDeletedText ) { -/* Remember the text segment here to be able to return removed text in get_text(). - * This is clearly a hack to be used until appropriate API exists in atk to pass - * the string value directly or we find a compelling reason to start caching the - * UTF-8 converted strings in the atk
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) New commits: commit fe9206b474464dd092da1d5c1ee788fe1c9b0765 Author: Michael Weghorn AuthorDate: Tue Feb 22 16:36:33 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 06:27:22 2022 +0100 qt a11y: Better handle TEXT_CHANGED event Trigger the corresponding Qt accessibility events for deleted and inserted text rather than sending a QAccessible::TextColumnChanged event (which looks like a rather arbitrary choice...). Qt also has a 'QAccessibleTextUpdateEvent' class that could be used to send a combined event, but since we get the relevant data separately in the LO event, using the latter wouldn't make things easier. And at least for the AT-SPI case on Linux, Qt sends separate AT-SPI events via D-Bus anyway. [1] Unfortunately, qt5/qt6 VCL a11y is not yet functional enough to e.g. test that the correct AT-SPI events are actually received when using the the script mentioned in Change-Id: Ibcae27ecfccf41a909e06d01ce681e4b7b97eb25 (gtk3 a11y: Migrate from deprecated "text-changed" ATK signal). [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp#n964 Change-Id: Ia9282382b6d5fd6bffd536dcda2989a6da901e90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130356 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 5a8e84144210..08b97b69c347 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -18,10 +18,12 @@ */ #include +#include #include #include +#include #include @@ -96,6 +98,24 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::AttributeChanged)); return; +case AccessibleEventId::TEXT_CHANGED: +{ +TextSegment aDeletedText; +TextSegment aInsertedText; +if (aEvent.OldValue >>= aDeletedText) +{ +QAccessible::updateAccessibility( +new QAccessibleTextRemoveEvent(pQAccessibleInterface, aDeletedText.SegmentStart, + toQString(aDeletedText.SegmentText))); +} +if (aEvent.NewValue >>= aInsertedText) +{ +QAccessible::updateAccessibility(new QAccessibleTextInsertEvent( +pQAccessibleInterface, aInsertedText.SegmentStart, +toQString(aInsertedText.SegmentText))); +} +return; +} case AccessibleEventId::TABLE_CAPTION_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::TableCaptionChanged)); @@ -140,7 +160,6 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::SectionChanged)); return; -case AccessibleEventId::TEXT_CHANGED: case AccessibleEventId::COLUMN_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::TextColumnChanged));
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit ab925e1d8d927f3b26cbe2d60e5aa35e1c6f1076 Author: Michael Weghorn AuthorDate: Mon Feb 21 15:14:17 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 06:28:03 2022 +0100 qt a11y: Handle VALUE_CHANGED event Change-Id: I34d813ced29a591b0a6652eeb1271a978980bba5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130359 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 08b97b69c347..3febce8a587e 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -172,9 +172,19 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::ForegroundChanged)); return; +case AccessibleEventId::VALUE_CHANGED: +{ +QAccessibleValueInterface* pValueInterface = pQAccessibleInterface->valueInterface(); +if (pValueInterface) +{ +const QVariant aValue = pValueInterface->currentValue(); +QAccessible::updateAccessibility( +new QAccessibleValueChangeEvent(pQAccessibleInterface, aValue)); +} +return; +} case AccessibleEventId::ROLE_CHANGED: case AccessibleEventId::INVALIDATE_ALL_CHILDREN: -case AccessibleEventId::VALUE_CHANGED: case AccessibleEventId::CONTENT_FLOWS_FROM_RELATION_CHANGED: case AccessibleEventId::CONTENT_FLOWS_TO_RELATION_CHANGED: case AccessibleEventId::CONTROLLED_BY_RELATION_CHANGED:
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 6ec960fe0be916fa20829e0b29fcb12d64008414 Author: Michael Weghorn AuthorDate: Tue Feb 22 17:10:09 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Feb 23 07:15:29 2022 +0100 qt a11y: Handle HYPERTEXT_CHANGED event Change-Id: Ib4e6f06a5cdac1ac47eb3d273ca103fb5081550e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130361 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 3febce8a587e..29aba6ef3b0d 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -82,6 +82,10 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible new QAccessibleEvent(pQAccessibleInterface, event)); return; } +case AccessibleEventId::HYPERTEXT_CHANGED: +QAccessible::updateAccessibility( +new QAccessibleEvent(pQAccessibleInterface, QAccessible::HypertextChanged)); +return; case AccessibleEventId::SELECTION_CHANGED: QAccessible::updateAccessibility( new QAccessibleEvent(pQAccessibleInterface, QAccessible::Selection)); @@ -193,7 +197,6 @@ void QtAccessibleEventListener::notifyEvent(const css::accessibility::Accessible case AccessibleEventId::LABELED_BY_RELATION_CHANGED: case AccessibleEventId::MEMBER_OF_RELATION_CHANGED: case AccessibleEventId::SUB_WINDOW_OF_RELATION_CHANGED: -case AccessibleEventId::HYPERTEXT_CHANGED: case AccessibleEventId::TABLE_MODEL_CHANGED: case AccessibleEventId::LISTBOX_ENTRY_EXPANDED: case AccessibleEventId::LISTBOX_ENTRY_COLLAPSED:
[Libreoffice-commits] core.git: accessibility/source
accessibility/source/extended/AccessibleGridControlTable.cxx | 12 --- 1 file changed, 1 insertion(+), 11 deletions(-) New commits: commit dc4c55c51d52340c84e21da92d61d3488a253cd3 Author: Michael Weghorn AuthorDate: Wed Feb 23 14:08:11 2022 +0100 Commit: Michael Weghorn CommitDate: Thu Feb 24 07:21:12 2022 +0100 a11y: Simplify AccessibleGridControlTable::getAccessibleCellAt Call 'AccessibleGridControlTable::getAccessibleChild' with the calculated child index instead of duplicating the handling to retrieve/create the proper accessible object. Change-Id: I8135f379f304d0e8ac61806eba9b3bd6c644f3a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130443 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index 8938ba83a122..da634269b049 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -181,18 +181,8 @@ Reference< XAccessible > SAL_CALL AccessibleGridControlTable::getAccessibleCellA ensureIsAlive(); ensureIsValidAddress( nRow, nColumn ); -sal_Int32 nCount = getAccessibleChildCount(); sal_Int32 nChildIndex = nRow*m_aTable.GetColumnCount() + nColumn; -if(m_aCellVector.empty() || m_aCellVector.size() != static_cast(nCount)) -{ -m_aCellVector.resize(nCount); -} -if(!m_aCellVector[nChildIndex].is()) -{ -rtl::Reference pCell = new AccessibleGridControlTableCell(this, m_aTable, nRow, nColumn); -m_aCellVector[nChildIndex] = pCell; -} -return m_aCellVector[nChildIndex]; +return getAccessibleChild(nChildIndex); } sal_Bool SAL_CALL AccessibleGridControlTable::isAccessibleSelected(
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/service/AccObjectWinManager.cxx |4 1 file changed, 4 deletions(-) New commits: commit 470ed0ff78a8b07d5aa02e0bba97bfa479860cf3 Author: Michael Weghorn AuthorDate: Mon Feb 28 08:23:05 2022 + Commit: Michael Weghorn CommitDate: Mon Feb 28 17:42:18 2022 +0100 wina11y: Drop useless #ifdef block `ACC_DEBUG` isn't defined anywhere and the `pFile` variable/member used inside of the `ifedf`ed block doesn't exist either. Change-Id: I0d04ca71dbc9a731a6673fad9b69c1229c472d16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130696 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 341d108e1bff..0f37eeb2628f 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -79,10 +79,6 @@ AccObjectWinManager::~AccObjectWinManager() HwndXAcc.clear(); XResIdAccList.clear(); XHWNDDocList.clear(); -#ifdef ACC_DEBUG - -fclose( pFile ); -#endif }
[Libreoffice-commits] core.git: winaccessibility/inc winaccessibility/source
winaccessibility/inc/AccContainerEventListener.hxx|4 winaccessibility/inc/AccDescendantManagerEventListener.hxx|4 winaccessibility/inc/AccObjectManagerAgent.hxx|3 winaccessibility/inc/AccObjectWinManager.hxx |3 winaccessibility/inc/unomsaaevent.hxx | 128 +++--- winaccessibility/source/service/AccComponentEventListener.cxx | 28 +- winaccessibility/source/service/AccContainerEventListener.cxx | 66 ++--- winaccessibility/source/service/AccDescendantManagerEventListener.cxx | 26 +- winaccessibility/source/service/AccDialogEventListener.cxx|4 winaccessibility/source/service/AccEventListener.cxx | 12 winaccessibility/source/service/AccFrameEventListener.cxx |4 winaccessibility/source/service/AccListEventListener.cxx |4 winaccessibility/source/service/AccMenuEventListener.cxx |6 winaccessibility/source/service/AccObjectManagerAgent.cxx |6 winaccessibility/source/service/AccObjectWinManager.cxx | 84 +++--- winaccessibility/source/service/AccParagraphEventListener.cxx |4 winaccessibility/source/service/AccTableEventListener.cxx | 23 - winaccessibility/source/service/AccTopWindowListener.cxx |6 winaccessibility/source/service/AccTreeEventListener.cxx |2 winaccessibility/source/service/AccWindowEventListener.cxx|4 20 files changed, 190 insertions(+), 231 deletions(-) New commits: commit 6723203528739430974d5c1dd14a26f8d4efcf0a Author: Michael Weghorn AuthorDate: Mon Feb 28 10:57:30 2022 + Commit: Michael Weghorn CommitDate: Mon Feb 28 17:42:47 2022 +0100 wina11y: Convert unomsaaevent.hxx constants to enum class UnoMSAAEvent Also drop the previous comments for the constants that add little value and are partially outdated. See the actual implementation to see how values are mapped to send out actual MSAA events, e.g. the previous comment // CARET_CHANGED --> EVENT_OBJECT_LOCATIONCHANGED was no longer correct by now, since that is by now mapped to `IA2_EVENT_TEXT_CARET_MOVED` in `AccObjectWinManager::NotifyAccEvent`. Change-Id: I38111ccb60c06f73ce53b18a6ca32e13dbd629b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130697 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/inc/AccContainerEventListener.hxx b/winaccessibility/inc/AccContainerEventListener.hxx index f0b87c3d4042..c880374fbb3d 100644 --- a/winaccessibility/inc/AccContainerEventListener.hxx +++ b/winaccessibility/inc/AccContainerEventListener.hxx @@ -19,6 +19,8 @@ #pragma once +enum class UnoMSAAEvent; + #include #include "AccEventListener.hxx" #include @@ -73,7 +75,7 @@ public: // update all children's state void UpdateAllChildrenState( css::accessibility::XAccessible* pXAccessible); -bool NotifyChildEvent(short nWinEvent, const css::uno::Any &Value); +bool NotifyChildEvent(UnoMSAAEvent eWinEvent, const css::uno::Any& Value); virtual void HandleSelectionChangedAddEvent( const css::uno::Any &oldValue, const css::uno::Any &newValue); diff --git a/winaccessibility/inc/AccDescendantManagerEventListener.hxx b/winaccessibility/inc/AccDescendantManagerEventListener.hxx index 73cda0f4eb46..669143a036f6 100644 --- a/winaccessibility/inc/AccDescendantManagerEventListener.hxx +++ b/winaccessibility/inc/AccDescendantManagerEventListener.hxx @@ -19,6 +19,8 @@ #pragma once +enum class UnoMSAAEvent; + #include #include #include "AccComponentEventListener.hxx" @@ -54,7 +56,7 @@ public: virtual void HandleChildChangedNoFocusEvent( css::uno::Any oldValue, css::uno::Any newValue); -bool NotifyChildEvent(short nWinEvent,const css::uno::Any &Value); +bool NotifyChildEvent(UnoMSAAEvent eWinEvent, const css::uno::Any& Value); virtual void HandleSelectionChangedAddEvent( const css::uno::Any &oldValue, const css::uno::Any &newValue); diff --git a/winaccessibility/inc/AccObjectManagerAgent.hxx b/winaccessibility/inc/AccObjectManagerAgent.hxx index a0f3daec579b..f0f0ca06a66a 100644 --- a/winaccessibility/inc/AccObjectManagerAgent.hxx +++ b/winaccessibility/inc/AccObjectManagerAgent.hxx @@ -30,6 +30,7 @@ struct IMAccessible; struct IAccessible; class AccObjectWinManager; +enum class UnoMSAAEvent; / AccObjectManagerAgent is used for managing AccObjects, which encapsulates @@ -56,7 +57,7 @@ public: virtual void DeleteAccObj( css::accessibility::XAccessible* pXAcc ); virtual IMAccessible* GetIMAccByXAcc(css::accessibility::XAccessible* pXAcc); -bool NotifyAccEvent(short pEvent = 0, css::ac
[Libreoffice-commits] core.git: 2 commits - winaccessibility/inc winaccessibility/source
winaccessibility/inc/AccObjectManagerAgent.hxx|2 winaccessibility/inc/AccObjectWinManager.hxx |2 winaccessibility/source/service/AccComponentEventListener.cxx |4 winaccessibility/source/service/AccObjectManagerAgent.cxx |4 winaccessibility/source/service/AccObjectWinManager.cxx | 207 -- 5 files changed, 109 insertions(+), 110 deletions(-) New commits: commit 3cde1fe16965d2b976c6c1210e81f17ae352b79f Author: Michael Weghorn AuthorDate: Mon Feb 28 11:43:13 2022 + Commit: Michael Weghorn CommitDate: Mon Feb 28 17:43:19 2022 +0100 wina11y: Unify how AccessibleRole is referred to here Using using namespace com::sun::star::accessibility::AccessibleRole; and then case /*AccessibleRole::*/DIALOG looks a bit odd. Drop the `using` directive and consistently use `AccessibleRole::` across this source file when referring to `AccessibleRole`s. Change-Id: If4b295548468067c65afcd1a216d29cad9e0c213 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130699 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index d24154769b05..13b6bd640bf2 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -46,7 +46,6 @@ using namespace com::sun::star::accessibility; -using namespace com::sun::star::accessibility::AccessibleRole; using namespace com::sun::star::accessibility::AccessibleStateType; using namespace com::sun::star::uno; @@ -530,10 +529,10 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc ) assert(i != 0); (void) i; DeleteFromHwndXAcc(pXAcc); -if( accObj.GetRole() == DOCUMENT || -accObj.GetRole() == DOCUMENT_PRESENTATION || -accObj.GetRole() == DOCUMENT_SPREADSHEET || -accObj.GetRole() == DOCUMENT_TEXT ) +if (accObj.GetRole() == AccessibleRole::DOCUMENT || +accObj.GetRole() == AccessibleRole::DOCUMENT_PRESENTATION || +accObj.GetRole() == AccessibleRole::DOCUMENT_SPREADSHEET || +accObj.GetRole() == AccessibleRole::DOCUMENT_TEXT) { XHWNDDocList.erase(accObj.GetParentHWND()); } @@ -695,10 +694,10 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX pObj.SetParentHWND( pWnd ); //for file name support -if( pObj.GetRole() == DOCUMENT || -pObj.GetRole() == DOCUMENT_PRESENTATION || -pObj.GetRole() == DOCUMENT_SPREADSHEET || -pObj.GetRole() == DOCUMENT_TEXT ) +if (pObj.GetRole() == AccessibleRole::DOCUMENT || +pObj.GetRole() == AccessibleRole::DOCUMENT_PRESENTATION || +pObj.GetRole() == AccessibleRole::DOCUMENT_SPREADSHEET || +pObj.GetRole() == AccessibleRole::DOCUMENT_TEXT) { XHWNDToDocumentHash::iterator aIter = XHWNDDocList.find(pWnd); if ( aIter != XHWNDDocList.end() ) @@ -765,94 +764,94 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) { switch( xContext->getAccessibleRole() ) { -case /*AccessibleRole::*/DIALOG: +case AccessibleRole::DIALOG: pRet = new AccDialogEventListener(pXAcc,pAgent); break; -case /*AccessibleRole::*/FRAME: +case AccessibleRole::FRAME: pRet = new AccFrameEventListener(pXAcc,pAgent); break; -case /*AccessibleRole::*/WINDOW: +case AccessibleRole::WINDOW: pRet = new AccWindowEventListener(pXAcc,pAgent); break; -case /*AccessibleRole::*/ROOT_PANE: +case AccessibleRole::ROOT_PANE: pRet = new AccFrameEventListener(pXAcc,pAgent); break; //Container -case /*AccessibleRole::*/CANVAS: -case /*AccessibleRole::*/COMBO_BOX: -case /*AccessibleRole::*/DOCUMENT: -case /*AccessibleRole::*/DOCUMENT_PRESENTATION: -case /*AccessibleRole::*/DOCUMENT_SPREADSHEET: -case /*AccessibleRole::*/DOCUMENT_TEXT: -case /*AccessibleRole::*/END_NOTE: -case /*AccessibleRole::*/FILLER: -case /*AccessibleRole::*/FOOTNOTE: -case /*AccessibleRole::*/FOOTER: -case /*AccessibleRole::*/HEADER: -case /*AccessibleRole::*/LAYERED_PANE: -case /*AccessibleRole::*/MENU_BAR: -case /*AccessibleRole::*/POPUP_MENU: -case /*AccessibleRole::*/OPTION_PANE: -case /*AccessibleRole::*/PAGE_TAB: -case /*AccessibleRole::*/PAGE_TAB_LIST: -case /*AccessibleRole::*/PANEL: -case /*AccessibleRole::*/SCROLL_PANE: -case /*AccessibleRole::*/SPLIT_PANE: -case /*AccessibleRole::*/STATUS_BAR: -case /*AccessibleRole::*/TABLE_CELL: -case /*AccessibleRole::*/TOOL_BAR: -
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/service/AccObjectWinManager.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 7dd7bd7d9ff03fe2038943f5460a95163bec5e04 Author: Michael Weghorn AuthorDate: Mon Feb 28 11:54:09 2022 + Commit: Michael Weghorn CommitDate: Mon Feb 28 17:43:37 2022 +0100 wina11y: Drop another 'using' directive This is similar to Change-Id: If4b295548468067c65afcd1a216d29cad9e0c213 ("wina11y: Unify how AccessibleRole is referred to here"), just for `AccessibleStateType`. Change-Id: I5e99fad42dab87e0e303e5a08c610f6af77641ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130700 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 13b6bd640bf2..5c1f021d422a 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -46,7 +46,6 @@ using namespace com::sun::star::accessibility; -using namespace com::sun::star::accessibility::AccessibleStateType; using namespace com::sun::star::uno; /** @@ -1062,7 +1061,7 @@ bool AccObjectWinManager::IsStateManageDescendant(XAccessible* pAccessible) int count = pStates.getLength(); for( int iIndex = 0;iIndex < count;iIndex++ ) { -if(pStates[iIndex] == /*AccessibleStateType::*/MANAGES_DESCENDANTS) +if (pStates[iIndex] == AccessibleStateType::MANAGES_DESCENDANTS) return true; } }
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/service/AccObject.cxx | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) New commits: commit df80ed941621da16459c16eae04f73300a606c9b Author: Michael Weghorn AuthorDate: Tue Mar 1 10:05:41 2022 + Commit: Michael Weghorn CommitDate: Tue Mar 1 15:51:27 2022 +0100 wina11y: Use range-based for Change-Id: Icf2a4cb3a4baf0c7aaeb627d05ba355f238b4d04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130756 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 87556090941f..d2862577ffb2 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -432,14 +432,8 @@ OUString AccObject::GetMAccessibleValueFromAny(Any pAny) Sequence< OUString > val; if (pAny >>= val) { - -int count = val.getLength(); - -for( int iIndex = 0;iIndex < count;iIndex++ ) -{ -strValue += val[iIndex]; -} - +for (const OUString& rElem : val) +strValue += rElem; } } else if(pAny.getValueType() == cppu::UnoType::get()) @@ -1052,19 +1046,12 @@ void AccObject::GetExpandedState( sal_Bool* isExpandable, sal_Bool* isExpanded) return; } -Sequence pStates = pRState->getStates(); -int count = pStates.getLength(); - -for( int iIndex = 0;iIndex < count;iIndex++ ) +for (sal_Int16 nState : pRState->getStates()) { -if( EXPANDED == pStates[iIndex] ) -{ +if (nState == EXPANDED) *isExpanded = true; -} -else if( EXPANDABLE == pStates[iIndex] ) -{ +else if (nState == EXPANDABLE) *isExpandable = true; -} } }
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/UAccCOM/AccEditableText.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 774364243b5541328aa633d7ae535fa4ae716105 Author: Michael Weghorn AuthorDate: Tue Mar 1 10:16:20 2022 + Commit: Michael Weghorn CommitDate: Tue Mar 1 15:51:43 2022 +0100 wina11y: Use 'std::vector::empty()' instead of 'std::vector::size() == 0' Change-Id: Icc365bad285d99abc2a1c9f26997e28701823262 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130757 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index a953eacf1334..1e0343b9fcb5 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -397,11 +397,11 @@ void CAccEditableText::get_AnyFromOLECHAR(std::u16string_view ouName, const OUSt // Dump into Sequence. -int iSeqLen = (vecTabStop.size() == 0) ? 1 : vecTabStop.size(); +int iSeqLen = vecTabStop.empty() ? 1 : vecTabStop.size(); Sequence< css::style::TabStop > seqTabStop(iSeqLen); auto pseqTabStop = seqTabStop.getArray(); -if(vecTabStop.size() != 0) +if (!vecTabStop.empty()) { // Dump every element. for(int i = 0; i < iSeqLen; i ++)
[Libreoffice-commits] core.git: 2 commits - winaccessibility/source
winaccessibility/source/UAccCOM/MAccessible.cxx | 28 ++-- winaccessibility/source/service/AccObjectWinManager.cxx |6 +-- 2 files changed, 13 insertions(+), 21 deletions(-) New commits: commit a427a46db0fa453acabe10389e106441031b317e Author: Michael Weghorn AuthorDate: Tue Mar 1 10:32:34 2022 + Commit: Michael Weghorn CommitDate: Tue Mar 1 15:52:18 2022 +0100 wina11y: Use range-based for Change-Id: Ie03126205d45ad2fcae14af53ab7a499f3c445f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130759 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index c405e6799d2b..bcde1ccf46a4 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -1057,11 +1057,9 @@ bool AccObjectWinManager::IsStateManageDescendant(XAccessible* pAccessible) if( !pRState.is() ) return false; -Sequence pStates = pRState->getStates(); -int count = pStates.getLength(); -for( int iIndex = 0;iIndex < count;iIndex++ ) +for (sal_Int16 nState : pRState->getStates()) { -if (pStates[iIndex] == AccessibleStateType::MANAGES_DESCENDANTS) +if (nState == AccessibleStateType::MANAGES_DESCENDANTS) return true; } } commit 45ae2fb7a7de4da4c3d6c7c359aaf92ccf0688a2 Author: Michael Weghorn AuthorDate: Tue Mar 1 10:27:11 2022 + Commit: Michael Weghorn CommitDate: Tue Mar 1 15:52:04 2022 +0100 wina11y: Use more range-based for And use const reference to css::style::TabStop instead of creating a copy. Change-Id: I4092cbefcfbdaa6a6697974b7f40242e26cc6aad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130758 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index a24536c8f36f..56542b10028f 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2712,43 +2712,37 @@ OUString CMAccessible::get_StringFromAny(Any const & pAny) OUStringBuffer pString; -int count = val.getLength(); +for (const OUString& rElem : val) +pString.append(rElem); -for( int iIndex = 0;iIndex < count;iIndex++ ) -{ -pString.append(val[iIndex]); -} return pString.makeStringAndClear(); } else if (pAny.getValueType() == cppu::UnoType>::get()) { Sequence < css::style::TabStop > val; pAny >>= val; -int count = val.getLength(); OUStringBuffer buf; -for( int iIndex = 0;iIndex < count;iIndex++ ) +for (const css::style::TabStop& rSingleVal : val) { -css::style::TabStop sigleVal = val[iIndex]; - buf.append("Position="); -buf.append(sigleVal.Position); +buf.append(rSingleVal.Position); buf.append(",TabAlign="); -buf.append(sal_Int32(sigleVal.Alignment)); +buf.append(sal_Int32(rSingleVal.Alignment)); buf.append(","); buf.append("DecimalChar="); -if(sigleVal.DecimalChar==';' || sigleVal.DecimalChar == ':' || sigleVal.DecimalChar == ',' || -sigleVal.DecimalChar == '=' || sigleVal.DecimalChar == '\\') +if (rSingleVal.DecimalChar==';' || rSingleVal.DecimalChar == ':' || rSingleVal.DecimalChar == ',' || +rSingleVal.DecimalChar == '=' || rSingleVal.DecimalChar == '\\') buf.append('\\'); -buf.append(sigleVal.DecimalChar); +buf.append(rSingleVal.DecimalChar); buf.append(","); buf.append("FillChar="); -if(sigleVal.FillChar==';' || sigleVal.FillChar == ':' || sigleVal.FillChar == ',' || -sigleVal.FillChar == '=' || sigleVal.FillChar == '\\') +if (rSingleVal.FillChar==';' || rSingleVal.FillChar == ':' || rSingleVal.FillChar == ',' || +rSingleVal.FillChar == '=' || rSingleVal.FillChar == '\\') buf.append('\\'); -buf.append(sigleVal.FillChar); +buf.append(rSingleVal.FillChar); buf.append(","); } return buf.makeStringAndClear();
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/UAccCOM/MAccessible.cxx | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit c4c1a6e6bfc42dddfa7a7ded826dca37c1d35dce Author: Michael Weghorn AuthorDate: Wed Mar 2 11:06:53 2022 + Commit: Michael Weghorn CommitDate: Wed Mar 2 20:39:52 2022 +0100 wina11y: Simplify this loop a bit Use a range-based for loop, `OUString::isEmpty` instead of checking the length and combine the two conditions into one. Change-Id: Iddc75369b1600f2f540f7ec4a6f8ed0b8462fd93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130841 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 56542b10028f..3f0253fbed19 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2808,14 +2808,11 @@ OUString CMAccessible::get_String4Numbering(const Any& pAny, sal_Int16 numbering Any aAny = pXIndex->getByIndex(numberingLevel); Sequence< css::beans::PropertyValue > aProps; aAny >>= aProps; -const css::beans::PropertyValue* pPropArray = aProps.getConstArray(); -sal_Int32 nCount = aProps.getLength(); OUStringBuffer buf("Numbering:NumberingLevel="); buf.append(sal_Int32(numberingLevel)); buf.append(','); -for( sal_Int32 i=0; i
[Libreoffice-commits] core.git: accessibility/source
accessibility/source/extended/AccessibleGridControlHeader.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 5189fd943a522b8158002d6c34a897a9034b8819 Author: Michael Weghorn AuthorDate: Thu Mar 3 16:30:18 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 4 08:04:31 2022 +0100 a11y: Use more conventional indentation of 4 spaces I hadn't even noticed that 5 spaces were used until the Jenkins CI build for my change adding a single line only indented by 4 spaces failed [1] due to our clang indentation plugin... [1] https://gerrit.libreoffice.org/c/core/+/130924/1#message-7a5209670085f69e53fd592ba41c2bd4b74a360a Change-Id: I859e8de4c02ff33c6a9fee957d868cf6e4ddd907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130932 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index 7c6c2df5925d..122e6ab50575 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -74,11 +74,11 @@ AccessibleGridControlHeader::getAccessibleChild( sal_Int32 nChildIndex ) sal_Int32 SAL_CALL AccessibleGridControlHeader::getAccessibleIndexInParent() { - ensureIsAlive(); - if(m_eObjType == vcl::table::TCTYPE_ROWHEADERBAR && m_aTable.HasColHeader()) - return 1; - else - return 0; +ensureIsAlive(); +if(m_eObjType == vcl::table::TCTYPE_ROWHEADERBAR && m_aTable.HasColHeader()) +return 1; +else +return 0; } // XAccessibleComponent ---
[Libreoffice-commits] core.git: 2 commits - accessibility/source
accessibility/source/extended/AccessibleGridControlHeader.cxx |2 ++ accessibility/source/extended/AccessibleGridControlTable.cxx |2 ++ 2 files changed, 4 insertions(+) New commits: commit a9c57e6ac6bc46ad78b66409a964f5b717878931 Author: Michael Weghorn AuthorDate: Thu Mar 3 11:49:01 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 4 08:05:01 2022 +0100 tdf#147742 a11y: AccessibleGridControlTable needs SolarMutex ... in `AccessibleGridControlTable::getAccessibleIndexInParent`, just like in the implementation of the other a11y UNO API methods. Change-Id: I4ab7a2626db09398c79fe53d85c9802136decbf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130925 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index da634269b049..75a17f0bcb00 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -69,6 +69,8 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 nChildIndex ) sal_Int32 SAL_CALL AccessibleGridControlTable::getAccessibleIndexInParent() { +SolarMutexGuard aSolarGuard; + ensureIsAlive(); if(m_aTable.HasRowHeader() && m_aTable.HasColHeader()) return 0; commit 1ccb6dc5bd2aa67f151d590b1aad20cecefaa28c Author: Michael Weghorn AuthorDate: Thu Mar 3 11:43:06 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 4 08:04:48 2022 +0100 tdf#147742 a11y: AccessibleGridControlHeader needs SolarMutex ... in `AccessibleGridControlHeader::getAccessibleIndexInParent`, just like in the implementation of the other a11y UNO API methods. Change-Id: Ib3bd44e73ae54bb1df05dc2714ce1f793f7222db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130924 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx b/accessibility/source/extended/AccessibleGridControlHeader.cxx index 122e6ab50575..d88b3421812d 100644 --- a/accessibility/source/extended/AccessibleGridControlHeader.cxx +++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx @@ -74,6 +74,8 @@ AccessibleGridControlHeader::getAccessibleChild( sal_Int32 nChildIndex ) sal_Int32 SAL_CALL AccessibleGridControlHeader::getAccessibleIndexInParent() { +SolarMutexGuard aSolarGuard; + ensureIsAlive(); if(m_eObjType == vcl::table::TCTYPE_ROWHEADERBAR && m_aTable.HasColHeader()) return 1;
[Libreoffice-commits] core.git: accessibility/inc accessibility/source
accessibility/inc/extended/AccessibleGridControlBase.hxx | 14 - accessibility/inc/extended/AccessibleGridControlTableCell.hxx|4 + accessibility/source/extended/AccessibleGridControlBase.cxx |3 - accessibility/source/extended/AccessibleGridControlTableCell.cxx | 28 ++ 4 files changed, 24 insertions(+), 25 deletions(-) New commits: commit 83419f869c33d550a61d260b1b3aef6a00cefc45 Author: Michael Weghorn AuthorDate: Thu Mar 3 14:49:57 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 4 08:05:16 2022 +0100 tdf#147742 a11y: AccessibleGridControl...: get accessible name on demand Base class `AccessibleGridControlBase` was retrieving an accessible name and storing it in class member 'm_aName'. For the classes representing cells, derived from `AccessibleGridControlCell`, the index is needed to get a meaningful name, so the name retrieved in the `AccessibleGridControlBase` ctor with hard-coded row/column indices of 0 was replaced again in the `AccessibleGridControlCell` ctor. Replace that logic to just retrieve the name on demand, and override 'getAccessibleName' in `AccessibleGridControlCell` using the logic used in its ctor previously. (No functional change intended here, but a somewhat similar handling for the accessible description was causing a crash when the Orca screen reader was active. This will be handled in a following commit.) Change-Id: I87eabb2ce3c99d4a622d919ab0fb8d7fb3beed6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130933 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx index 361c8d4d59f6..4075b7f7964f 100644 --- a/accessibility/inc/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -61,7 +61,7 @@ class AccessibleGridControlBase : public AccessibleGridControlImplHelper { public: -/** Constructor sets specified name and description. +/** Constructor. @param rxParent XAccessible interface of the parent object. @param rTableThe Table control. @param eObjType Type of accessible table control. */ @@ -227,10 +227,6 @@ protected: /** @throws DisposedException If the object is not alive. */ void ensureIsAlive() const; -/** Changes the name of the object (flat assignment, no notify). -@attention This method requires a locked mutex. */ -inline void implSetName( const OUString& rName ); - /** Locks all mutex's and calculates the bounding box relative to the parent window. @return The bounding box (VCL rect.) relative to the parent object. @@ -257,8 +253,6 @@ protected: ::vcl::table::AccessibleTableControlObjType m_eObjType; private: -/** Localized name. */ -OUString m_aName; /** Localized description text. */ OUString m_aDescription; ::comphelper::AccessibleEventNotifier::TClientIdm_aClientId; @@ -315,12 +309,6 @@ inline ::vcl::table::AccessibleTableControlObjType AccessibleGridControlBase::ge return m_eObjType; } -inline void AccessibleGridControlBase::implSetName( -const OUString& rName ) -{ -m_aName = rName; -} - } // namespace accessibility diff --git a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx index 77077183b54b..6e3ee3367ae8 100644 --- a/accessibility/inc/extended/AccessibleGridControlTableCell.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTableCell.hxx @@ -40,6 +40,10 @@ namespace accessibility // XAccessibleComponent virtual void SAL_CALL grabFocus() override; +public: +// XAccessibleContext +virtual OUString SAL_CALL getAccessibleName() override; + protected: AccessibleGridControlCell( const css::uno::Reference< css::accessibility::XAccessible >& _rxParent, diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index c118c70f7a32..c02d921fa1a1 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -54,7 +54,6 @@ AccessibleGridControlBase::AccessibleGridControlBase( m_xParent( rxParent ), m_aTable( rTable), m_eObjType( eObjType ), -m_aName( rTable.GetAccessibleObjectName( eObjType, 0, 0 ) ), m_aDescription( rTable.GetAccessibleObjectDescription( eObjType ) ), m_aClientId(0) { @@ -143,7 +142,7 @@ OUString SAL_CALL AccessibleGridControlBase::getAccessibleName() SolarMutexGuard g; ensureIsAlive(); -return m_aName; +return m_aTable.GetAccessibleObjectName(m_eObjType, 0, 0); } css::uno::Reference< css
[Libreoffice-commits] core.git: accessibility/inc accessibility/source
accessibility/inc/extended/AccessibleGridControlBase.hxx|2 -- accessibility/source/extended/AccessibleGridControlBase.cxx |3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) New commits: commit fbe4d77d961975bafe8ea3e419651df4d418f92b Author: Michael Weghorn AuthorDate: Thu Mar 3 15:34:06 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Mar 4 08:05:33 2022 +0100 tdf#147742 a11y: AccessibleGridControlBase: get accessible desc on demand Previously, the accessible description was retrieved in the `AccessibleGridControlBase` ctor and stored in a class member. Change that to fetch the description on demand. `TableControl::GetAccessibleObjectDescription` is used to get the description, which currently uses the row and column index of the currently active cell. When using the macro from the sample document in tdf#147742 with the Orca screen reader active, no cell was active at the point that the ctor was called, so `ROW_INVALID`/`COL_INVALID` were used, resulting in a crash later (s. backtrace in tdf#147742). If necessary, `TableControl::GetAccessibleObjectDescription` could be extended to allow passing an explicit row/column index, as is the case for `TableControl::GetAccessibleName`, then override `AccessibleGridControlBase::getAccessibleDescription` in `AccessibleGridControlCell`, similar to how it is done for the accessible name in Change-Id I87eabb2ce3c99d4a622d919ab0fb8d7fb3beed6b ("tdf#147742 a11y: AccessibleGridControl...: get accessible name on demand"). Change-Id: I58f3a2b0c83e2cdbae103811505d7d0a4f8bfc52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130934 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx index 4075b7f7964f..7da777d8dac2 100644 --- a/accessibility/inc/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -253,8 +253,6 @@ protected: ::vcl::table::AccessibleTableControlObjType m_eObjType; private: -/** Localized description text. */ -OUString m_aDescription; ::comphelper::AccessibleEventNotifier::TClientIdm_aClientId; }; diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx index c02d921fa1a1..915aeb7e373e 100644 --- a/accessibility/source/extended/AccessibleGridControlBase.cxx +++ b/accessibility/source/extended/AccessibleGridControlBase.cxx @@ -54,7 +54,6 @@ AccessibleGridControlBase::AccessibleGridControlBase( m_xParent( rxParent ), m_aTable( rTable), m_eObjType( eObjType ), -m_aDescription( rTable.GetAccessibleObjectDescription( eObjType ) ), m_aClientId(0) { } @@ -134,7 +133,7 @@ OUString SAL_CALL AccessibleGridControlBase::getAccessibleDescription() SolarMutexGuard g; ensureIsAlive(); -return m_aDescription; +return m_aTable.GetAccessibleObjectDescription(m_eObjType); } OUString SAL_CALL AccessibleGridControlBase::getAccessibleName()
[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source
accessibility/inc/extended/AccessibleGridControlBase.hxx |6 -- accessibility/inc/extended/AccessibleGridControlTable.hxx|3 + accessibility/source/extended/AccessibleGridControl.cxx | 33 --- accessibility/source/extended/AccessibleGridControlTable.cxx | 30 ++ 4 files changed, 37 insertions(+), 35 deletions(-) New commits: commit 5977d6b981dcde556450589199c06204009a4a1a Author: Michael Weghorn AuthorDate: Wed Mar 9 11:23:35 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 9 17:46:42 2022 +0100 a11y: Let AccessibleGridControlTable calculate child index Just call `AccessibleGridControlTable::getAccessibleCellAt`, which already takes care of calculating the proper child index from row and column index. Change-Id: Id463c14108158c5833231f95cf16847764f5b646 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131245 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 09d43f816359..5d4ed3bc767c 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -305,10 +305,8 @@ void AccessibleGridControl::commitTableEvent(sal_Int16 _nEventId,const Any& _rNe const sal_Int32 nCurrentCol = m_aTable.GetCurrentColumn(); css::uno::Reference< css::accessibility::XAccessible > xChild; if (nCurrentRow > -1 && nCurrentCol > -1) -{ -sal_Int32 nColumnCount = m_aTable.GetColumnCount(); -xChild = m_xTable->getAccessibleChild(nCurrentRow * nColumnCount + nCurrentCol); -} +xChild = m_xTable->getAccessibleCellAt(nCurrentRow, nCurrentCol); + m_xTable->commitEvent(_nEventId, Any(xChild),_rOldValue); } else commit 319a5b5b457c46c8a036b99d6f024517bc87be42 Author: Michael Weghorn AuthorDate: Wed Mar 9 11:07:55 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 9 17:46:28 2022 +0100 a11y: Move TABLE_MODEL_CHANGED handling to table Move the handling for the `AccessibleEventId::TABLE_MODEL_CHANGED` event of type `AccessibleTableModelChangeType::DELETE` from `AccessibleGridControl` into `AccessibleGridControlTable`. To do so, make `AccessibleGridControlBase::commitEvent` virtual and override it in `AccessibleGridControlTable`. The method already gets called from `AccessibleGridControl::commitTableEvent` where the event was handled previously. Handling the details of how cells are internally organized in a vector only in the class itself rather than in different places seems to make sense. There are currently more cases where `AccessibleGridControl` deals with the cell vector directly that will be addressed in following commits. Change-Id: I26a7737432ecb198eac00279a8242d22e3c661d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131244 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/inc/extended/AccessibleGridControlBase.hxx b/accessibility/inc/extended/AccessibleGridControlBase.hxx index 7da777d8dac2..f1b2d4b1c85f 100644 --- a/accessibility/inc/extended/AccessibleGridControlBase.hxx +++ b/accessibility/inc/extended/AccessibleGridControlBase.hxx @@ -188,10 +188,8 @@ public: inline ::vcl::table::AccessibleTableControlObjType getType() const; /** Commits an event to all listeners. */ -void commitEvent( -sal_Int16 nEventId, -const css::uno::Any& rNewValue, -const css::uno::Any& rOldValue ); +virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue); /** @return TRUE, if the object is not disposed or disposing. */ bool isAlive() const; diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx index 73c4f6a19050..bada75124257 100644 --- a/accessibility/inc/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx @@ -142,6 +142,9 @@ public: /**@return m_pCellVector*/ std::vector< rtl::Reference >& getCellVector() { return m_aCellVector;} +virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, + const css::uno::Any& rOldValue) override; + private: // internal virtual methods diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index c90cc0384b46..09d43f816359 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #include #i
[Libreoffice-commits] core.git: 2 commits - accessibility/inc accessibility/source
accessibility/inc/extended/AccessibleGridControl.hxx |3 -- accessibility/inc/extended/AccessibleGridControlTable.hxx|3 ++ accessibility/source/extended/AccessibleGridControl.cxx |9 +-- accessibility/source/extended/AccessibleGridControlTable.cxx | 14 +++ 4 files changed, 19 insertions(+), 10 deletions(-) New commits: commit 4e641d9240a981216d6724141b9b7a9e4c63c82a Author: Michael Weghorn AuthorDate: Wed Mar 9 11:51:45 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 9 17:47:10 2022 +0100 Related: tdf#147742 a11y: Dispose table cells as well When disposing `AccessibleGridControlTable` (which is done in `AccessibleGridControl::disposing`), also dispose its cells and clear the references. Without this in place, a crash sometimes occured when running the macro in the sample doc from tdf#147742 several times and clicking around in the table, with the Orca screen reader active. This was because a reference to one of the `AccessibleGridControlTableCell`s was still around after the `AccessibleGridControlTable` had already been disposed, and when trying to get its accessible name, the call to `IAccessibleTable::GetAccessibleObjectName` in `AccessibleGridControlCell::getAccessibleName` would fail because the object that the `m_aTable` reference was referring to had already been deleted. With the cell being disposed as well, the `ensureIsAlive()` check at the beginning of `AccessibleGridControlCell::getAccessibleName` will throw a `DisposedException`, that is then handled properly in the calling code. Backtrace (with master as of commit 2598c35dbac8dc4492ad1fc79925c5347e683af0): #0 0x7fffd9152ed3 in accessibility::AccessibleGridControlCell::getAccessibleName() (this=0x5bbcdb70) at /home/michi/development/git/libreoffice/accessibility/source/extended/AccessibleGridControlTableCell.cxx:79 #1 0x7fffe45e864a in wrapper_get_name(AtkObject*) (atk_obj=0x5bbcef60) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/a11y/atkwrapper.cxx:369 #2 0x7fffe3a87e5c in () at /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 #3 0x7fffe3a947de in () at /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 #4 0x7fffe3a94caf in () at /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 #5 0x775feff0 in () at /lib/x86_64-linux-gnu/libdbus-1.so.3 #6 0x775eea1c in dbus_connection_dispatch () at /lib/x86_64-linux-gnu/libdbus-1.so.3 #7 0x7fffe36d74a5 in () at /lib/x86_64-linux-gnu/libatspi.so.0 #8 0x7fffe9ab8cdb in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #9 0x7fffe9ab8f88 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #10 0x7fffe9ab903f in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #11 0x7fffe460f546 in GtkSalData::Yield(bool, bool) (this=0x5567c750, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkdata.cxx:405 #12 0x7fffe461402a in GtkInstance::DoYield(bool, bool) (this=0x5567c5d0, bWait=true, bHandleAllCurrentEvents=false) at /home/michi/development/git/libreoffice/vcl/unx/gtk3/gtkinst.cxx:427 #13 0x7fffef7ab4be in ImplYield(bool, bool) (i_bWait=true, i_bAllEvents=false) at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:474 #14 0x7fffef7ac0b0 in Application::Yield() () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:558 #15 0x7fffef7ab18e in Application::Execute() () at /home/michi/development/git/libreoffice/vcl/source/app/svapp.cxx:452 #16 0x77c309af in desktop::Desktop::Main() (this=0x7fffd780) at /home/michi/development/git/libreoffice/desktop/source/app/app.cxx:1604 #17 0x7fffef7c9d75 in ImplSVMain() () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:202 #18 0x7fffef7c9e96 in SVMain() () at /home/michi/development/git/libreoffice/vcl/source/app/svmain.cxx:234 #19 0x77c947c9 in soffice_main() () at /home/michi/development/git/libreoffice/desktop/source/app/sofficemain.cxx:98 #20 0x49f4 in sal_main () at /home/michi/development/git/libreoffice/desktop/source/app/main.c:51 #21 0x49da in main (argc=4, argv=0x7fffdaf8) at /home/michi/development/git/libreoffice/desktop/source/app/main.c:49 Change-Id: Idffa76809cbfad746f27d18191fdfc905b64ee0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131247 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx index bada75124257..602365468505 100644 --- a/a
[Libreoffice-commits] core.git: accessibility/inc accessibility/source
accessibility/inc/extended/AccessibleGridControlTable.hxx |3 --- accessibility/source/extended/AccessibleGridControl.cxx | 13 - 2 files changed, 4 insertions(+), 12 deletions(-) New commits: commit f56b932487509de1ecde46a42c40df76c6ecebcf Author: Michael Weghorn AuthorDate: Wed Mar 9 13:53:09 2022 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 9 17:47:24 2022 +0100 a11y: Leave cell vector handling to AccessibleGridControlTable Use `AccessibleGridControlTable::getAccessibleCellAt` and cast to `AccessibleGridControlTableCell*` instead of directly accessing the cell vector in `AccessibleGridControl::commitCellEvent`. `AccessibleGridControlTable::getAccessibleCellAt` just needs row and column index as parameters, and already takes care of everything else that's needed. This includes creating an accessible object for the given indices on demand. Therefore, limiting this to only already existing a11y objects, which was done to avoid crashes in commit 4fc7deb7b0528010ebf644654bf4a36594e03f8c Date: Thu Oct 3 23:16:34 2013 +0200 fix STL assert in accessibility::AccessibleGridControl::commitTableEvent is no longer needed. With this change in place, details of how cells are organized in the vector only need to be known inside of the `AccessibleGridControlTable` class itself, so drop the now unused method `AccessibleGridControlTable::getCellVector`. (This code path is e.g. used when using the macro from tdf#147742.) Change-Id: I21027f0edc2904475ad6cc5fb136316f387499dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131248 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx index 602365468505..69e3d9229694 100644 --- a/accessibility/inc/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx @@ -142,9 +142,6 @@ public: // XComponent virtual void SAL_CALL dispose() override; -/**@return m_pCellVector*/ -std::vector< rtl::Reference >& getCellVector() { return m_aCellVector;} - virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue) override; diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 81f3d121ab0f..474945817603 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -270,15 +270,10 @@ void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNew css::uno::Reference< css::accessibility::XAccessible > xAccessible = getAccessibleChild(i); if(css::uno::Reference< css::accessibility::XAccessible >(m_xTable) == xAccessible) { -std::vector< rtl::Reference >& rCells = -m_xTable->getCellVector(); -size_t nIndex = m_aTable.GetCurrentRow() * m_aTable.GetColumnCount() - + m_aTable.GetCurrentColumn(); -if (nIndex < rCells.size() && rCells[nIndex]) -{ -rtl::Reference xCell = rCells[nIndex]; -xCell->commitEvent( _nEventId, _rNewValue, _rOldValue ); -} +Reference xCell = m_xTable->getAccessibleCellAt( +m_aTable.GetCurrentRow(), m_aTable.GetCurrentColumn()); +AccessibleGridControlTableCell* pCell = static_cast(xCell.get()); +pCell->commitEvent(_nEventId, _rNewValue, _rOldValue); } } }
[Libreoffice-commits] core.git: winaccessibility/Library_uacccom.mk winaccessibility/source
winaccessibility/Library_uacccom.mk |1 + winaccessibility/source/UAccCOM/MAccessible.cxx | 19 +++ 2 files changed, 8 insertions(+), 12 deletions(-) New commits: commit 235b30bdfa76b5c0514c7dfe2a0d13ab8ecf5be2 Author: Michael Weghorn AuthorDate: Fri Sep 9 23:04:19 2022 +0100 Commit: Michael Weghorn CommitDate: Sat Sep 10 07:21:17 2022 +0200 wina11y: Report actual app/toolkit name/version The previous way of reporting "Hannover" as app name, "3.0" as version and no toolkit name and version looks rather arbitrary. Can be queried e.g. from NVDA's Python console as follows after pressing Keypad_Insert+Ctrl+Z with any LibreOffice UI element focused: >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).appName 'Hannover' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).appVersion '3.0' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).toolkitName ' ' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).toolkitVersion ' ' Report the actual app name and version. For the toolkit use "VCL" as name and the same version that LibreOffice has: >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).appName 'LibreOfficeDev' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).appVersion '7.5' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).toolkitName 'VCL' >>> focus.IAccessibleObject.QueryInterface(IA2.IAccessibleApplication).toolkitVersion '7.5' Change-Id: I3c6bdb79e6b945c0f9707bfa7bada0fb456d6e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139743 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/Library_uacccom.mk b/winaccessibility/Library_uacccom.mk index 8c3d3c1596e5..0fb07814b2f9 100644 --- a/winaccessibility/Library_uacccom.mk +++ b/winaccessibility/Library_uacccom.mk @@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,UAccCOM,\ comphelper \ cppu \ sal \ + utl \ )) $(eval $(call gb_Library_use_externals,UAccCOM,\ diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 2b11d2ed7d12..3cb544f3ba80 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -3033,7 +3034,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_appName(BSTR __RPC_FAR *name if(name == nullptr) return E_INVALIDARG; -*name = SysAllocString(OLESTR("Hannover")); +static const OUString sAppName = utl::ConfigManager::getProductName(); +*name = SysAllocString(o3tl::toW(sAppName.getStr())); return S_OK; } catch(...) { return E_FAIL; } } @@ -3045,7 +3047,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_appVersion(BSTR __RPC_FAR *v if (m_isDestroy) return S_FALSE; if(version == nullptr) return E_INVALIDARG; -*version=SysAllocString(OLESTR("3.0")); +static const OUString sVersion = utl::ConfigManager::getProductVersion(); +*version=SysAllocString(o3tl::toW(sVersion.getStr())); return S_OK; } catch(...) { return E_FAIL; } } @@ -3057,21 +3060,13 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_toolkitName(BSTR __RPC_FAR * if (m_isDestroy) return S_FALSE; if(name == nullptr) return E_INVALIDARG; -*name = SysAllocString(OLESTR(" ")); +*name = SysAllocString(OLESTR("VCL")); return S_OK; } catch(...) { return E_FAIL; } } COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_toolkitVersion(BSTR __RPC_FAR *version) { -SolarMutexGuard g; - -try { -if (m_isDestroy) return S_FALSE; -if(version == nullptr) -return E_INVALIDARG; -*version = SysAllocString(OLESTR(" ")); -return S_OK; -} catch(...) { return E_FAIL; } +return get_appVersion(version); }
[Libreoffice-commits] core.git: vcl/win
vcl/win/gdi/DWriteTextRenderer.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c9974818bdf9ab8ccf2f8db140ff6b2b3eb1c461 Author: Michael Weghorn AuthorDate: Fri Sep 9 11:56:17 2022 +0100 Commit: خالد حسني CommitDate: Sat Sep 10 07:55:11 2022 +0200 win: Explicitly cast glyph ID to 16 bit After commit ba02639c9c17d75e73fc2eff83e64c116fcdaeb2 Date: Wed Sep 7 11:00:26 2022 +0200 vcl: Make glyph IDs 32bit , my clang-cl Windows build would otherwise fail as follows: [build CXX] vcl/win/gdi/DWriteTextRenderer.cxx [build CUS] postprocess/images C:/tools/cygwin/home/michael/development/git/libreoffice/vcl/win/gdi/DWriteTextRenderer.cxx(264,39): error: non-constant-expression cannot be narrowed from type 'sal_GlyphId' (aka 'unsigned int') to 'UINT16' (aka 'unsigned short') in initializer list [-Wc++11-narrowing] UINT16 glyphIndices[] = { pGlyph->glyphId() }; ^ C:/tools/cygwin/home/michael/development/git/libreoffice/vcl/win/gdi/DWriteTextRenderer.cxx(264,39): note: insert an explicit cast to silence this issue UINT16 glyphIndices[] = { pGlyph->glyphId() }; ^ static_cast( ) 1 error generated. Change-Id: Ifa4fcdd98331378b5d9340f961e0bc4d7e842fe2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139721 Tested-by: Jenkins Reviewed-by: خالد حسني diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 835e09e7eed9..c160166a541e 100644 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -261,7 +261,7 @@ bool D2DWriteTextOutRenderer::performRender(GenericSalLayout const & rLayout, Sa const GlyphItem* pGlyph; while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart)) { -UINT16 glyphIndices[] = { pGlyph->glyphId() }; +UINT16 glyphIndices[] = { static_cast(pGlyph->glyphId()) }; FLOAT glyphAdvances[] = { static_cast(pGlyph->newWidth()) / fHScale }; DWRITE_GLYPH_OFFSET glyphOffsets[] = { { 0.0f, 0.0f }, }; D2D1_POINT_2F baseline = { static_cast(aPos.getX() - bounds.Left()) / fHScale,
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - compilerplugins/clang fpicker/source framework/source include/tools include/vcl reportdesign/source sc/source sfx2/source solenv/clang-format
compilerplugins/clang/unusedenumconstants.untouched.results |4 compilerplugins/clang/unusedenumconstants.writeonly.results |2 fpicker/source/office/RemoteFilesDialog.cxx |2 fpicker/source/office/iodlg.cxx |2 framework/source/helper/persistentwindowstate.cxx |2 include/tools/gen.hxx |8 include/vcl/WindowPosSize.hxx | 137 include/vcl/syswin.hxx |6 include/vcl/vclenum.hxx | 39 + include/vcl/weld.hxx|3 include/vcl/windowstate.hxx | 98 --- include/vcl/wrkwin.hxx |2 reportdesign/source/ui/dlg/Formula.cxx |2 reportdesign/source/ui/report/DesignView.cxx|4 reportdesign/source/ui/report/ReportController.cxx |2 sc/source/ui/condformat/condformatmgr.cxx |2 sfx2/source/appl/childwin.cxx |8 sfx2/source/dialog/basedlgs.cxx |4 sfx2/source/dialog/recfloat.cxx |9 solenv/clang-format/excludelist |1 sw/source/ui/misc/bookmark.cxx |3 sw/source/uibase/envelp/syncbtn.cxx |9 vcl/headless/svpframe.cxx | 76 +- vcl/inc/headless/svpframe.hxx |4 vcl/inc/osx/salframe.h |4 vcl/inc/qt5/QtFrame.hxx |4 vcl/inc/salframe.hxx| 12 vcl/inc/salgeom.hxx | 101 --- vcl/inc/salvtables.hxx |2 vcl/inc/salwtype.hxx| 21 vcl/inc/unx/gtk/gtkframe.hxx|6 vcl/inc/unx/salframe.h |4 vcl/inc/win/salframe.h |8 vcl/inc/window.h|4 vcl/osx/salframe.cxx| 183 +++-- vcl/osx/salframeview.mm | 34 - vcl/osx/salgdiutils.cxx |4 vcl/osx/salmenu.cxx |8 vcl/osx/salnativewidgets.cxx|4 vcl/qt5/QtFrame.cxx | 92 +- vcl/qt5/QtMainWindow.cxx|3 vcl/qt5/QtWidget.cxx|7 vcl/quartz/AquaGraphicsBackend.cxx |2 vcl/source/app/salvtables.cxx |2 vcl/source/gdi/salgdilayout.cxx |4 vcl/source/window/dockwin.cxx | 22 vcl/source/window/event.cxx |4 vcl/source/window/menu.cxx |2 vcl/source/window/printdlg.cxx |2 vcl/source/window/syswin.cxx| 337 +- vcl/source/window/window.cxx| 46 - vcl/source/window/winproc.cxx |4 vcl/source/window/wrkwin.cxx| 31 vcl/unx/generic/app/wmadaptor.cxx | 87 +- vcl/unx/generic/gdi/gdiimpl.cxx |4 vcl/unx/generic/window/salframe.cxx | 378 ++-- vcl/unx/gtk3/gtkframe.cxx | 204 +++--- vcl/unx/gtk3/gtkinst.cxx| 57 + vcl/unx/gtk3/gtksalmenu.cxx |4 vcl/win/gdi/gdiimpl.cxx |4 vcl/win/window/salframe.cxx | 145 ++-- 61 files changed, 1129 insertions(+), 1140 deletions(-) New commits: commit 1c0f44cbacb4bcefcf383586e7ccd32d47388fa4 Author: Michael Weghorn AuthorDate: Wed Sep 14 07:53:33 2022 +0200 Commit: Xisco Fauli CommitDate: Wed Sep 14 10:09:32 2022 +0200 tdf#150779 tdf#150856 Revert "VCL add vcl::WindowPosSize ... ... abstract class" for 7-4 According to the commit message, this was mostly meant to be a refactoring, but it caused issues like tdf#150856 ("Opening Forms: Form is minimized in middle of the screen with Linux/KDE") and tdf#150779 ("kf5 - Opening LO only shows left pane of start screen, no recent documents visible (LO 7.4 only)"). The issues are fixed on master,
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtMenu.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ea9de214311780119a0974e03b38fd835b5074f5 Author: Michael Weghorn AuthorDate: Wed Sep 14 10:40:18 2022 +0200 Commit: Michael Weghorn CommitDate: Wed Sep 14 14:18:46 2022 +0200 tdf#150882 qt: Report menu bar height when not hidden `QWidget::isVisible` only returns `true` if the widget is actually visible on screen. Therefore, even if the menu itself has been set to be visible in `QtMenu::ShowMenuBar`, the call to `mpQMenuBar->isVisible()` will still return `false` as long as the corresponding window the menu belongs to isn't shown on screen (yet). However, since the menu bar height may be used to calculate the position of other items (e.g. in the macro dialog) before the corresponding window gets shown, what should be relevant is whether the menu bar itself is meant to be hidden or not. Therefore, use `QWidget::isHidden` instead. Quoting the Qt doc [1] for `QWidget`'s `visible` property: > This property holds whether the widget is visible > > Calling setVisible(true) or show() sets the widget to visible status if > all its parent widgets up to the window are visible. If an ancestor is > not visible, the widget won't become visible until all its ancestors are > shown. [...] > > Calling setVisible(false) or hide() hides a widget explicitly. An > explicitly hidden widget will never become visible, even if all its > ancestors become visible, unless you show it. This makes the menu show properly in the macro dialog while still not reserving any space for the menu in the main window in case of using the "Tabbed" interface (where no "traditional" menu is present). [1] https://doc.qt.io/qt-6/qwidget.html#visible-prop Change-Id: Ifb6e22db8224013f06320d090a19d80d9e38a990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139910 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx index c1e4cb0e1a29..dd259f32f979 100644 --- a/vcl/qt5/QtMenu.cxx +++ b/vcl/qt5/QtMenu.cxx @@ -847,7 +847,7 @@ bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle& r int QtMenu::GetMenuBarHeight() const { -if (!validateQMenuBar() || !mpQMenuBar->isVisible()) +if (!validateQMenuBar() || mpQMenuBar->isHidden()) return 0; return mpQMenuBar->height() * mpFrame->devicePixelRatioF(); }
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/tabstpge.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit c317f0adb308b1ece3bfa8bdffb4d0bcb1478d30 Author: Michael Weghorn AuthorDate: Thu Sep 15 19:03:12 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Sep 16 08:23:16 2022 +0200 tdf#136928 Use dialog text color for signs in "Tabs" dialog and use an explicit matching background of dialog color Since the font color is black even in dark themes like "Adwaita-Dark", using a dark style/theme would previously result in black signs on a dark background for the Qt-based VCL plugins (qt5/kf5/qt6). Change-Id: I470011c26861221310e898c8f63fceef5e1aca3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140029 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 5a468f1dfffa..b3a1745c26f9 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -52,7 +52,11 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta Size aSize(GetOutputSizePixel()); aPoint.setX( aSize.Width() / 2 ); aPoint.setY( aSize.Height() / 2 ); -Ruler::DrawTab(rRenderContext, rRenderContext.GetSettings().GetStyleSettings().GetFontColor(), aPoint, nTabStyle); +const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); +rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); +rRenderContext.SetFillColor(rStyleSettings.GetDialogColor()); +rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); +Ruler::DrawTab(rRenderContext, rStyleSettings.GetDialogTextColor(), aPoint, nTabStyle); } SvxTabulatorTabPage::SvxTabulatorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr)
[Libreoffice-commits] core.git: vcl/qt5
vcl/qt5/QtAccessibleEventListener.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 155e8b1683f10847ff18e75287e2466220242bb1 Author: Michael Weghorn AuthorDate: Fri Sep 9 12:20:05 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Sep 16 12:03:42 2022 +0200 tdf#117173: qt a11y: Forward changes to SHOWING state While Qt doesn't have an equivalent state for the SHOWING state used in LibreOffice and in IAccessible2, it has separate `QAccessible::ObjectHide` and `QAccessible::ObjectShow` event types used to indicate that an object changed state to being (no longer) displayed, so use those. In fact, Qt's `AtspiAdaptor` handles those by mapping them to state change events for the AT-SPI "showing" state again. [1] [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=ce16eb2679f69b28d2debd1ce18a99f7279b4295#n896 Change-Id: Iae2b9ec26403d9a9887e86c4155ba64a73f19b60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139812 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/qt5/QtAccessibleEventListener.cxx b/vcl/qt5/QtAccessibleEventListener.cxx index 16a5a074b8cb..f9a4d7b1a2c1 100644 --- a/vcl/qt5/QtAccessibleEventListener.cxx +++ b/vcl/qt5/QtAccessibleEventListener.cxx @@ -132,6 +132,20 @@ void QtAccessibleEventListener::HandleStateChangedEvent( case AccessibleStateType::SELECTED: aState.selected = true; break; +case AccessibleStateType::SHOWING: +{ +// Qt does not have an equivalent for the SHOWING state, +// but has separate event types +QAccessible::Event eEventType; +sal_Int64 nNewState = 0; +if ((rEvent.NewValue >>= nNewState) && nNewState == AccessibleStateType::SHOWING) +eEventType = QAccessible::ObjectShow; +else +eEventType = QAccessible::ObjectHide; +QAccessible::updateAccessibility( +new QAccessibleEvent(pQAccessibleInterface, eEventType)); +break; +} // These don't seem to have a matching Qt equivalent case AccessibleStateType::ARMED: case AccessibleStateType::DEFUNC: @@ -141,7 +155,6 @@ void QtAccessibleEventListener::HandleStateChangedEvent( case AccessibleStateType::MANAGES_DESCENDANTS: case AccessibleStateType::OPAQUE: case AccessibleStateType::SENSITIVE: -case AccessibleStateType::SHOWING: case AccessibleStateType::STALE: case AccessibleStateType::TRANSIENT: case AccessibleStateType::VERTICAL:
[Libreoffice-commits] core.git: vcl/unx
vcl/unx/gtk3/salnativewidgets-gtk.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit b855f9d430c4dce2936e7bd1208159bc38d5b199 Author: Michael Weghorn AuthorDate: Fri Sep 16 10:30:01 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Sep 16 12:39:17 2022 +0200 tdf#137341 gtk: Set missing style text colors from theme commit 8d11b953c0a69f4f5eb5ca42dec3812a62d0cd0f Date: Sun Feb 23 21:11:05 2020 +0100 tdf#125532: White text on default/action buttons and selected tabs on macOS had introduced various new text colors to the style settings, but some were not set from the theme for gtk. Add the missing ones. Change-Id: I1bd7ce358626b3f4ff1d6f2794d5c0f19f78a668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140058 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 3bbc9365f46d..6fc1be3f8257 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2338,10 +2338,16 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) style_context_set_state(pStyle, GTK_STATE_FLAG_PRELIGHT); style_context_get_color(pStyle, &text_color); aTextColor = getColor(text_color); +aStyleSet.SetDefaultButtonTextColor(aTextColor); aStyleSet.SetDefaultButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetButtonRolloverTextColor(aTextColor); aStyleSet.SetDefaultActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetActionButtonPressedRolloverTextColor(aTextColor); +aStyleSet.SetFlatButtonTextColor(aTextColor); +aStyleSet.SetFlatButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetFlatButtonRolloverTextColor(aTextColor); aStyleSet.SetFieldRolloverTextColor(aTextColor);
[Libreoffice-commits] core.git: winaccessibility/source
winaccessibility/source/UAccCOM/MAccessible.cxx | 121 winaccessibility/source/UAccCOM/MAccessible.h |9 - 2 files changed, 130 deletions(-) New commits: commit 7dbbf8eba4a8131efe224b17a613cd09c4042dd4 Author: Michael Weghorn AuthorDate: Fri Sep 16 11:17:48 2022 +0100 Commit: Michael Weghorn CommitDate: Fri Sep 16 17:56:40 2022 +0200 wina11y: Drop unused CMAccessible helper methods Their doc says that they are for the `accSelect` implementation, but that one doesn't actually make use of them. Change-Id: I9185a905d00484fcb950a1bdb6013e07a089bb22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140069 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index 3cb544f3ba80..a1b24aa0d62e 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2068,127 +2068,6 @@ XAccessibleContext* CMAccessible::GetContextByXAcc( XAccessible* pXAcc ) return pRContext.get(); } -/** -* Return the member variable m_pXAccessibleSelection, instead of -* get XAccessibleSelection according to XAccessibleContext because if so,it will -* depend on the UNO implementation code,so when COM is created, put XAccessibleSelection -* by bridge management system -* @return XAccessibleSelection*, the selection of the current object. -*/ -Reference< XAccessibleSelection > CMAccessible::GetSelection() -{ -if (!m_xAccessible.is()) -return nullptr; -Reference const pRContext = -m_xAccessible->getAccessibleContext(); -if(pRContext.is()) -{ -Reference< XAccessibleSelection > pRSelection(pRContext,UNO_QUERY); -return pRSelection; -} -return nullptr; -} - -/** -* Select one XAccessible item, for accSelect implementation -* @parampItem, the item should be selected. -* @return S_OK if successful. -*/ -HRESULT CMAccessible::SelectChild(XAccessible* pItem) -{ - -try { -if (m_isDestroy) return S_FALSE; -XAccessibleContext* pParentContext = GetContextByXAcc(m_xAccessible.get()); -XAccessibleContext* pContext = GetContextByXAcc( pItem ); -if( pParentContext == nullptr || pContext == nullptr ) -return E_FAIL; - -Reference< XAccessibleSelection > pRSelection = GetSelection(); -if( !pRSelection.is() ) -return E_FAIL; - pRSelection->selectAccessibleChild(pContext->getAccessibleIndexInParent()); -return S_OK; - -} catch(...) { return E_FAIL; } -} - -/** -* Deselect one XAccessible item, for accSelect implementation -* @parampItem, the item should be deselected. -* @return S_OK if successful. -*/ -HRESULT CMAccessible::DeSelectChild(XAccessible* pItem) -{ - -try { -if (m_isDestroy) return S_FALSE; -XAccessibleContext* pParentContext = GetContextByXAcc(m_xAccessible.get()); -; -XAccessibleContext* pContext = GetContextByXAcc( pItem ); -if( pParentContext == nullptr || pContext == nullptr ) -return E_INVALIDARG; - -Reference< XAccessibleSelection > pRSelection = GetSelection(); -if( !pRSelection.is() ) -return E_FAIL; - pRSelection->deselectAccessibleChild(pContext->getAccessibleIndexInParent()); - -return S_OK; - -} catch(...) { return E_FAIL; } -} - -/** -* Select multiple XAccessible items,for implementation of accSelect -* @parampItem, the items should be selected. -* @paramsize, the size of the items. -* @return S_OK if successful. -*/ -HRESULT CMAccessible::SelectMultipleChidren( XAccessible** pItem,int size ) -{ - -try { -if (m_isDestroy) return S_FALSE; -// #CHECK# -if(pItem == nullptr) -{ -return E_INVALIDARG; -} -for(int index = 0;index < size;index++) -{ -SelectChild( pItem[index] ); -} -return S_OK; - -} catch(...) { return E_FAIL; } -} - -/** -* Deselect multiple XAccessible items,for implementation of accSelect -* @parampItem, the items should be selected. -* @paramsize, the size of the items. -* @return S_OK if successful. -*/ -HRESULT CMAccessible::DeSelectMultipleChildren( XAccessible** pItem,int size ) -{ - -try { -if (m_isDestroy) return S_FALSE; -// #CHECK# -if(pItem == nullptr) -{ -return E_INVALIDARG; -} -for(int index = 0;index < size;index++) -{ -DeSelectChild( pItem[index] ); -} -return S_OK; - -} catch(...) { return E_FAIL; } -} - /** * When COM is created, UNO set XAccessible pointer to it * in order to COM can operate UNO information diff --git a/winaccessibility/source/UAccCOM/MAccessible.h b/winaccessibility/source/UAccCOM/MAccessible.h index 8a239fd16340..baa13b45f2b1 10
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/unx
vcl/unx/gtk3/salnativewidgets-gtk.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 2103178720fd485651b94b7819ea33ec602c3b79 Author: Michael Weghorn AuthorDate: Fri Sep 16 10:30:01 2022 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Sep 17 05:10:19 2022 +0200 tdf#137341 gtk: Set missing style text colors from theme commit 8d11b953c0a69f4f5eb5ca42dec3812a62d0cd0f Date: Sun Feb 23 21:11:05 2020 +0100 tdf#125532: White text on default/action buttons and selected tabs on macOS had introduced various new text colors to the style settings, but some were not set from the theme for gtk. Add the missing ones. Change-Id: I1bd7ce358626b3f4ff1d6f2794d5c0f19f78a668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140058 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 8306152d5205dd35c118d06368f6c77254f87518) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139984 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 3eaffc903e16..64f6357abd79 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2337,10 +2337,16 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) style_context_set_state(pStyle, GTK_STATE_FLAG_PRELIGHT); style_context_get_color(pStyle, &text_color); aTextColor = getColor(text_color); +aStyleSet.SetDefaultButtonTextColor(aTextColor); aStyleSet.SetDefaultButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetButtonRolloverTextColor(aTextColor); aStyleSet.SetDefaultActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetActionButtonPressedRolloverTextColor(aTextColor); +aStyleSet.SetFlatButtonTextColor(aTextColor); +aStyleSet.SetFlatButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetFlatButtonRolloverTextColor(aTextColor); aStyleSet.SetFieldRolloverTextColor(aTextColor);
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - cui/source
cui/source/tabpages/tabstpge.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 67e5d8ff8d9bf029ab7480fa1f907696ca8ee2e9 Author: Michael Weghorn AuthorDate: Thu Sep 15 19:03:12 2022 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat Sep 17 10:36:21 2022 +0200 tdf#136928 Use dialog text color for signs in "Tabs" dialog and use an explicit matching background of dialog color Since the font color is black even in dark themes like "Adwaita-Dark", using a dark style/theme would previously result in black signs on a dark background for the Qt-based VCL plugins (qt5/kf5/qt6). Change-Id: I470011c26861221310e898c8f63fceef5e1aca3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140029 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 2deabc28166af2fc84e74f705b503a42e5394d54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139982 Reviewed-by: Adolfo Jayme Barrientos diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 5a468f1dfffa..b3a1745c26f9 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -52,7 +52,11 @@ void TabWin_Impl::Paint(vcl::RenderContext& rRenderContext, const ::tools::Recta Size aSize(GetOutputSizePixel()); aPoint.setX( aSize.Width() / 2 ); aPoint.setY( aSize.Height() / 2 ); -Ruler::DrawTab(rRenderContext, rRenderContext.GetSettings().GetStyleSettings().GetFontColor(), aPoint, nTabStyle); +const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); +rRenderContext.SetLineColor(rStyleSettings.GetShadowColor()); +rRenderContext.SetFillColor(rStyleSettings.GetDialogColor()); +rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize())); +Ruler::DrawTab(rRenderContext, rStyleSettings.GetDialogTextColor(), aPoint, nTabStyle); } SvxTabulatorTabPage::SvxTabulatorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rAttr)
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/unx
vcl/unx/gtk3/salnativewidgets-gtk.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit fe012a9a3ff16db3e90165cbc2fa226d925166ee Author: Michael Weghorn AuthorDate: Fri Sep 16 10:30:01 2022 +0200 Commit: Xisco Fauli CommitDate: Mon Sep 19 17:26:58 2022 +0200 tdf#137341 gtk: Set missing style text colors from theme commit 8d11b953c0a69f4f5eb5ca42dec3812a62d0cd0f Date: Sun Feb 23 21:11:05 2020 +0100 tdf#125532: White text on default/action buttons and selected tabs on macOS had introduced various new text colors to the style settings, but some were not set from the theme for gtk. Add the missing ones. Change-Id: I1bd7ce358626b3f4ff1d6f2794d5c0f19f78a668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140058 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 8306152d5205dd35c118d06368f6c77254f87518) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139984 Reviewed-by: Adolfo Jayme Barrientos (cherry picked from commit 2103178720fd485651b94b7819ea33ec602c3b79) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140156 Reviewed-by: Xisco Fauli diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 7bc455e62000..f6be2a87295d 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2337,10 +2337,16 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) style_context_set_state(pStyle, GTK_STATE_FLAG_PRELIGHT); style_context_get_color(pStyle, &text_color); aTextColor = getColor(text_color); +aStyleSet.SetDefaultButtonTextColor(aTextColor); aStyleSet.SetDefaultButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetButtonRolloverTextColor(aTextColor); aStyleSet.SetDefaultActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetDefaultActionButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetActionButtonRolloverTextColor(aTextColor); +aStyleSet.SetActionButtonPressedRolloverTextColor(aTextColor); +aStyleSet.SetFlatButtonTextColor(aTextColor); +aStyleSet.SetFlatButtonPressedRolloverTextColor(aTextColor); aStyleSet.SetFlatButtonRolloverTextColor(aTextColor); aStyleSet.SetFieldRolloverTextColor(aTextColor);
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/crsrsh.hxx |7 +++ sw/source/core/crsr/crsrsh.cxx|6 -- sw/source/uibase/docvw/edtwin.cxx | 16 3 files changed, 27 insertions(+), 2 deletions(-) New commits: commit 782e4502898924eb94c4ff7f6c33d9ef36959f02 Author: Michael Weghorn AuthorDate: Thu Sep 22 23:50:07 2022 +0200 Commit: Michael Weghorn CommitDate: Fri Sep 23 07:49:33 2022 +0200 tdf#149952 sw a11y: Don't send a11y events for internal-only cursor The fact that `SwEditWin::GetSurroundingText` etc. use an internal-only helper cursor is an implementation detail and should not result in a11y events getting sent from LibreOffice to the platform a11y layer. Therefore, introduce a flag to `SwCursorShell` that indicates whether or not sending of accessible cursor events is enabled and set that to false during the use of the helper cursors. As described in Sebastian Keller's very helpful analysis on what was happening on the gnome-shell magnifier side (s. tdf#149952 comment 11), sending those a11y events resulted in the gnome-shell magnifier jumping to the right when typing empty paragraphs: > Regarding the issue of jumping to the right, it looks > like there is a 'object:state-changed:selected' for the > paragraph when pressing enter multiple times. This causes the > magnifier to center the entire paragraph, which has the width > of the entire page according to the extents, so this will be > further to the right compared to caret. Change-Id: I514aa2dad5cfffbe5e8d4b7e9d7d383e70470b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137104 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d552cba2b503..2c1001b44c50 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -235,6 +235,10 @@ private: bool m_bSetCursorInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas bool m_bOverwriteCursor : 1;// true -> show Overwrite Cursor +// true -> send accessible events when cursor changes +// (set to false when using internal-only helper cursor) +bool m_bSendAccessibleCursorEvents : 1; + bool m_bMacroExecAllowed : 1; SwFrame* m_oldColFrame; @@ -468,6 +472,9 @@ public: bool IsOverwriteCursor() const { return m_bOverwriteCursor; } void SetOverwriteCursor( bool bFlag ) { m_bOverwriteCursor = bFlag; } +bool IsSendAccessibleCursorEvents() const { return m_bSendAccessibleCursorEvents; }; +void SetSendAccessibleCursorEvents(bool bEnable) { m_bSendAccessibleCursorEvents = bEnable; }; + // Return current frame in which the cursor is placed. SwContentFrame *GetCurrFrame( const bool bCalcFrame = true ) const; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 0ec692f47e7d..8f3840f22fcc 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1751,7 +1751,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint #if !ENABLE_WASM_STRIP_ACCESSIBILITY -if (Imp()->IsAccessible()) +if (Imp()->IsAccessible() && m_bSendAccessibleCursorEvents) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); #endif return; @@ -2025,7 +2025,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint #if !ENABLE_WASM_STRIP_ACCESSIBILITY -if (Imp()->IsAccessible()) +if (Imp()->IsAccessible() && m_bSendAccessibleCursorEvents) Imp()->InvalidateAccessibleCursorPosition( pFrame ); #endif @@ -2966,6 +2966,7 @@ SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin ) m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = m_bOverwriteCursor = false; +m_bSendAccessibleCursorEvents = true; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; m_bSVCursorVis = true; m_bSetCursorInReadOnly = true; @@ -3010,6 +3011,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin, m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = m_bOverwriteCursor = false; +m_bSendAccessibleCursorEvents = true; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; m_bSVCursorVis = true; m_bSetCursorInReadOnly = true; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index d6d828db846e..66145652c6d7 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwi
[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/inc sw/source
sw/inc/crsrsh.hxx |7 +++ sw/source/core/crsr/crsrsh.cxx|6 -- sw/source/uibase/docvw/edtwin.cxx | 16 3 files changed, 27 insertions(+), 2 deletions(-) New commits: commit 57505216b119ede97ea4bfef154e7375bb7f0d91 Author: Michael Weghorn AuthorDate: Thu Sep 22 23:50:07 2022 +0200 Commit: Caolán McNamara CommitDate: Fri Sep 23 10:17:49 2022 +0200 tdf#149952 sw a11y: Don't send a11y events for internal-only cursor The fact that `SwEditWin::GetSurroundingText` etc. use an internal-only helper cursor is an implementation detail and should not result in a11y events getting sent from LibreOffice to the platform a11y layer. Therefore, introduce a flag to `SwCursorShell` that indicates whether or not sending of accessible cursor events is enabled and set that to false during the use of the helper cursors. As described in Sebastian Keller's very helpful analysis on what was happening on the gnome-shell magnifier side (s. tdf#149952 comment 11), sending those a11y events resulted in the gnome-shell magnifier jumping to the right when typing empty paragraphs: > Regarding the issue of jumping to the right, it looks > like there is a 'object:state-changed:selected' for the > paragraph when pressing enter multiple times. This causes the > magnifier to center the entire paragraph, which has the width > of the entire page according to the extents, so this will be > further to the right compared to caret. Change-Id: I514aa2dad5cfffbe5e8d4b7e9d7d383e70470b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137104 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 782e4502898924eb94c4ff7f6c33d9ef36959f02) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140466 Reviewed-by: Caolán McNamara diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 9f79a515153a..f961d092559a 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -234,6 +234,10 @@ private: bool m_bSetCursorInReadOnly : 1;// true -> Cursor is allowed in ReadOnly-Areas bool m_bOverwriteCursor : 1;// true -> show Overwrite Cursor +// true -> send accessible events when cursor changes +// (set to false when using internal-only helper cursor) +bool m_bSendAccessibleCursorEvents : 1; + bool m_bMacroExecAllowed : 1; SwFrame* m_oldColFrame; @@ -467,6 +471,9 @@ public: bool IsOverwriteCursor() const { return m_bOverwriteCursor; } void SetOverwriteCursor( bool bFlag ) { m_bOverwriteCursor = bFlag; } +bool IsSendAccessibleCursorEvents() const { return m_bSendAccessibleCursorEvents; }; +void SetSendAccessibleCursorEvents(bool bEnable) { m_bSendAccessibleCursorEvents = bEnable; }; + // Return current frame in which the cursor is placed. SwContentFrame *GetCurrFrame( const bool bCalcFrame = true ) const; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b24920da9b2f..a2abb6a6e5e9 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1753,7 +1753,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint #if !ENABLE_WASM_STRIP_ACCESSIBILITY -if (Imp()->IsAccessible()) +if (Imp()->IsAccessible() && m_bSendAccessibleCursorEvents) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); #endif return; @@ -2027,7 +2027,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint #if !ENABLE_WASM_STRIP_ACCESSIBILITY -if (Imp()->IsAccessible()) +if (Imp()->IsAccessible() && m_bSendAccessibleCursorEvents) Imp()->InvalidateAccessibleCursorPosition( pFrame ); #endif @@ -2970,6 +2970,7 @@ SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin ) m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = m_bOverwriteCursor = false; +m_bSendAccessibleCursorEvents = true; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; m_bSVCursorVis = true; m_bSetCursorInReadOnly = true; @@ -3014,6 +3015,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin, m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = m_bOverwriteCursor = false; +m_bSendAccessibleCursorEvents = true; m_bCallChgLnk = m_bHasFocus = m_bAutoUpdateCells = true; m_bSVCursorVis = true; m_bSetCursorInReadOnly = true; diff --git a/sw/source/uiba
[Libreoffice-commits] core.git: accessibility/source
accessibility/source/helper/characterattributeshelper.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit aa0a39f2be0cf9d633c3654babc6f738d67f871f Author: Michael Weghorn AuthorDate: Fri Sep 23 20:26:52 2022 +0200 Commit: Michael Weghorn CommitDate: Sun Sep 25 14:44:03 2022 +0200 a11y: Use FontSlant for "CharPosture" The platform a11y integration code expects a `FontSlant` in the "CharPosture" `Any` (s. e.g. `get_style_value`/`FontSlant2Style` in `vcl/unx/gtk3/a11y/atktextattributes.cxx` or `QtAccessibleWidget::attributes`) and that's also what e.g. Writer sets for that attribute for text in the document, so do the same in `CharacterAttributesHelper::CharacterAttributesHelper`. After handling for "CharPosture" was added for the Qt-based VCL plugins in commit 99841da686625428b8ad2e219dd19e5fbfb145f5 Author: Michael Weghorn Date: Tue Jul 20 13:23:21 2021 +0200 qt a11y: Report font style text attribute (e.g. italic) , clicking through the a11y hierarchy of e.g. Writer's "Page Style" dialog in Accerciser's treeview of the LO a11y hierarchy would otherwise crash LO when used with the qt6 VCL plugin. With this in place, the style is reported correctly there. (Tested by temporarily setting "oblique" style using glade for the "Next style" label in the "Organizer" tab in that dialog's UI file.) Change-Id: Ibea42db067e0cdb3b85c80dbcca5939b3dfe5570 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140527 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx index 9cbeaaee8a7c..1d6120ff483c 100644 --- a/accessibility/source/helper/characterattributeshelper.cxx +++ b/accessibility/source/helper/characterattributeshelper.cxx @@ -19,6 +19,7 @@ #include #include +#include #include using namespace ::com::sun::star::uno; @@ -39,7 +40,7 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa m_aAttributeMap.emplace( OUString( "CharStrikeout" ), Any( static_cast(rFont.GetStrikeout()) ) ); m_aAttributeMap.emplace( OUString( "CharUnderline" ), Any( static_cast(rFont.GetUnderline()) ) ); m_aAttributeMap.emplace( OUString( "CharWeight" ),Any( static_cast(rFont.GetWeight()) ) ); -m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( static_cast(rFont.GetItalic()) ) ); +m_aAttributeMap.emplace( OUString( "CharPosture" ), Any( vcl::unohelper::ConvertFontSlant(rFont.GetItalic()) ) ); }
[Libreoffice-commits] core.git: 2 commits - toolkit/source winaccessibility/source
toolkit/source/awt/vclxaccessiblecomponent.cxx| 32 ++ winaccessibility/source/service/AccComponentEventListener.cxx |1 winaccessibility/source/service/AccObjectWinManager.cxx |5 + 3 files changed, 38 insertions(+) New commits: commit 995d17697d1e46f66df67ca3132369d76caea29e Author: Michael Weghorn AuthorDate: Mon Sep 19 14:45:05 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Sep 26 16:15:06 2022 +0200 tdf#117173 wina11y: Send EVENT_SYSTEM_ALERT when notification shows Together with Change-Id Ifcf9304883e2e824ea1b7998d7767e474b87c8b6 ("tdf#119788 tdf#117173 add accessibility NOTIFICATION role") and Change-Id Id62b3942dc17c3a1ed6a08d23438406e5a19c39d ("tdf#117173 a11y: Send SHOWING state change event on Window{Show,Hide}"), this makes NVDA announce the notification in the Search and Replace dialog as an alert, similar to what browsers do e.g. in the alert on empty input for the input validation example at https://www.w3.org/WAI/tutorials/forms/validation/ . Change-Id: I3263df4711f84a6dd9e178ad340b128aa074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140091 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx index ca0dec0fa311..060fb201136c 100644 --- a/winaccessibility/source/service/AccComponentEventListener.cxx +++ b/winaccessibility/source/service/AccComponentEventListener.cxx @@ -237,6 +237,7 @@ void AccComponentEventListener::FireStatePropertyChange(sal_Int64 state, bool se pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); // UNO !SHOWING == MSAA OFFSCREEN pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING ); +pAgent->NotifyAccEvent(UnoMSAAEvent::STATE_SHOWING, m_xAccessible.get()); break; case AccessibleStateType::VISIBLE: // UNO !VISIBLE == MSAA INVISIBLE diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 44dbcb98ac3a..de527270a8e0 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -198,6 +198,11 @@ bool AccObjectWinManager::NotifyAccEvent(XAccessible* pXAcc, UnoMSAAEvent eEvent UpdateAccFocus(pXAcc); NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID ); break; +case UnoMSAAEvent::STATE_SHOWING: +// send EVENT_SYSTEM_ALERT when notification gets shown +if (pRContext->getAccessibleRole() == AccessibleRole::NOTIFICATION) +NotifyWinEvent(EVENT_SYSTEM_ALERT, hAcc, OBJID_CLIENT, dChildID); +break; case UnoMSAAEvent::MENU_START: NotifyWinEvent( EVENT_SYSTEM_MENUSTART,hAcc, OBJID_CLIENT,dChildID ); break; commit c26d6cc3c4878d356328a538b5bf11e4e6a0e7dc Author: Michael Weghorn AuthorDate: Mon Sep 19 14:44:46 2022 +0200 Commit: Michael Weghorn CommitDate: Mon Sep 26 16:14:51 2022 +0200 tdf#117173 a11y: Send SHOWING state change event on Window{Show,Hide} When a `vcl::Window` becomes visible, `Window::ImplSetReallyVisible` calls the registered event listeners with a `VclEventId::WindowShow` event. Likewise, a `VclEventId::WindowHide` events is sent in `Window::ImplResetReallyVisible` when the window is no longer visible. Handle that event in `VCLXAccessibleComponent` by sending a state change event for the SHOWING state, so assistive technology gets notified about this. (Similar handling can already be found e.g. in `AccessibleTabBar::ProcessWindowEvent` or `AccessibleTabBarPageList::ProcessWindowEvent`.) While doing so in `VCLXAccessibleComponent::ProcessWindowEvent` for the object itself would generally seem like a more straightforward and conceptually nicer approach, this would have the problem that the event wouldn't get propagated to the platform-specific a11y integration layer (like winaccessibility) for the `VclEventId::WindowShow` case, since the a11y event listeners are registered and unregistered as a response to the CHILD event (at least for winaccessibility and gtk3, qt6 doesn't do that (yet?)), and if the accessible event listener is not (yet) registered, the event is simply ignored. Since the CHILD event is sent in `VCLXAccessibleComponent::ProcessChildWindowEvent` and that gets called on the parent *after* `VCLXAccessibleComponent::ProcessWindowEvent` gets called for the object that became shown/hidden (s. `Window::CallEventListeners`), also send the state change event for the SHOWING state of the child from there, so the proper order can be made sure. The reverse order
[Libreoffice-commits] core.git: vcl/inc vcl/qt5
vcl/inc/qt5/QtTransferable.hxx |2 +- vcl/qt5/QtTransferable.cxx | 25 + 2 files changed, 18 insertions(+), 9 deletions(-) New commits: commit 5b3227fac58dcbd588e2389e205679cd77842bac Author: Michael Weghorn AuthorDate: Wed Apr 6 13:51:59 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 7 06:36:35 2022 +0200 tdf#147285 qt: Prefer "text/plain;charset=utf-8" over "text/plain" If there were no data for MIME type "text/plain;charset=utf-16" in the clipboard, but "text/plain" was provided, it was previously assumed that this would be encoded in the locale's encoding, and corresponding conversion using that encoding happened to provide "text/plain;charset=utf-16" ourselves. "text/plain;charset=utf-8" data was simply ignored, but using it (if present) and preferring it over "text/plain" is more reliable (and e.g. avoids incorrect paste of Chinese characters from Firefox into Impress when using the qt5/qt6/kf5 VCL plugins on Wayland), so use it if present. Rename the "m_bConvertFromLocale" member to better fit the new meaning. (An alternative solution to adding our own handling for "text/plain;charset=utf-8" and making assumptions for the encoding of "text/plain" data would be to let Qt handle this and just call `QMimeData::text()` for the `m_bProvideUTF16FromOtherEncoding=true` case in `QtTransferable::getTransferData`. Since qtbase commit 589a01ff6b1eacf81e74a5fc4801572135214f43 ("QMimeData: Prefer UTF-8 when multiple charsets are available", contained in Qt >= 5.13), that one handles MIME type "text/plain;charset=utf-8" in addition to "text/plain".) [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=589a01ff6b1eacf81e74a5fc4801572135214f43 Change-Id: I89f33216bf6be02a347d245b2359273af2eb530a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132631 Reviewed-by: Jan-Marek Glogowski Tested-by: Jenkins diff --git a/vcl/inc/qt5/QtTransferable.hxx b/vcl/inc/qt5/QtTransferable.hxx index f2997089c037..5f1533dd5968 100644 --- a/vcl/inc/qt5/QtTransferable.hxx +++ b/vcl/inc/qt5/QtTransferable.hxx @@ -35,7 +35,7 @@ class QtTransferable : public cppu::WeakImplHelper m_aMimeTypeSeq; public: diff --git a/vcl/qt5/QtTransferable.cxx b/vcl/qt5/QtTransferable.cxx index 4f42f93a238b..ed31a54d769e 100644 --- a/vcl/qt5/QtTransferable.cxx +++ b/vcl/qt5/QtTransferable.cxx @@ -42,7 +42,7 @@ static bool lcl_textMimeInfo(const OUString& rMimeString, bool& bHaveNoCharset, QtTransferable::QtTransferable(const QMimeData* pMimeData) : m_pMimeData(pMimeData) -, m_bConvertFromLocale(false) +, m_bProvideUTF16FromOtherEncoding(false) { assert(pMimeData); } @@ -62,7 +62,7 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr QStringList aFormatList(m_pMimeData->formats()); // we might add the UTF-16 mime text variant later const int nMimeTypeSeqSize = aFormatList.size() + 1; -bool bHaveNoCharset = false, bHaveUTF16 = false; +bool bHaveNoCharset = false, bHaveUTF16 = false, bHaveUTF8 = false; css::uno::Sequence aMimeTypeSeq(nMimeTypeSeqSize); auto pMimeTypeSeq = aMimeTypeSeq.getArray(); @@ -85,6 +85,7 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr { bHaveNoCharset |= bIsNoCharset; bHaveUTF16 |= bIsUTF16; +bHaveUTF8 |= bIsUTF8; if (bIsUTF16) aFlavor.DataType = cppu::UnoType::get(); else @@ -99,8 +100,8 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr nMimeTypeCount++; } -m_bConvertFromLocale = bHaveNoCharset && !bHaveUTF16; -if (m_bConvertFromLocale) +m_bProvideUTF16FromOtherEncoding = (bHaveNoCharset || bHaveUTF8) && !bHaveUTF16; +if (m_bProvideUTF16FromOtherEncoding) { aFlavor.MimeType = "text/plain;charset=utf-16"; aFlavor.DataType = cppu::UnoType::get(); @@ -133,11 +134,19 @@ css::uno::Any SAL_CALL QtTransferable::getTransferData(const css::datatransfer:: if (rFlavor.MimeType == "text/plain;charset=utf-16") { OUString aString; -if (m_bConvertFromLocale) +if (m_bProvideUTF16FromOtherEncoding) { -QByteArray aByteData(m_pMimeData->data(QStringLiteral("text/plain"))); -aString = OUString(reinterpret_cast(aByteData.data()), aByteData.size(), - osl_getThreadTextEncoding()); +if (m_pMimeData->hasFormat("text/plain;charset=utf-8")) +{ +QByteArray aByteData(m_pMimeData->data(QStringLiteral("text/plain;charset=utf-8"))); +aString = OUString::fromUtf8(reinterpret_cast(aByteData.data())); +} +else +{ +QByteArray aByteData(m_pMimeData->data(QStringLiteral("text/plain"))); +aString = OUString(reinterpret_cast(aByteData.
[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - vcl/inc vcl/qt5
vcl/inc/qt5/QtTransferable.hxx |2 +- vcl/qt5/QtTransferable.cxx | 25 + 2 files changed, 18 insertions(+), 9 deletions(-) New commits: commit b60e4b4ba11c726cbbc45f0747d8fc4d3da0ed74 Author: Michael Weghorn AuthorDate: Wed Apr 6 13:51:59 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 7 07:21:58 2022 +0200 tdf#147285 qt: Prefer "text/plain;charset=utf-8" over "text/plain" If there were no data for MIME type "text/plain;charset=utf-16" in the clipboard, but "text/plain" was provided, it was previously assumed that this would be encoded in the locale's encoding, and corresponding conversion using that encoding happened to provide "text/plain;charset=utf-16" ourselves. "text/plain;charset=utf-8" data was simply ignored, but using it (if present) and preferring it over "text/plain" is more reliable (and e.g. avoids incorrect paste of Chinese characters from Firefox into Impress when using the qt5/qt6/kf5 VCL plugins on Wayland), so use it if present. Rename the "m_bConvertFromLocale" member to better fit the new meaning. (An alternative solution to adding our own handling for "text/plain;charset=utf-8" and making assumptions for the encoding of "text/plain" data would be to let Qt handle this and just call `QMimeData::text()` for the `m_bProvideUTF16FromOtherEncoding=true` case in `QtTransferable::getTransferData`. Since qtbase commit 589a01ff6b1eacf81e74a5fc4801572135214f43 ("QMimeData: Prefer UTF-8 when multiple charsets are available", contained in Qt >= 5.13), that one handles MIME type "text/plain;charset=utf-8" in addition to "text/plain".) [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=589a01ff6b1eacf81e74a5fc4801572135214f43 Change-Id: I89f33216bf6be02a347d245b2359273af2eb530a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132631 Reviewed-by: Jan-Marek Glogowski Tested-by: Jenkins (cherry picked from commit 5b3227fac58dcbd588e2389e205679cd77842bac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132607 Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/inc/qt5/QtTransferable.hxx b/vcl/inc/qt5/QtTransferable.hxx index f2997089c037..5f1533dd5968 100644 --- a/vcl/inc/qt5/QtTransferable.hxx +++ b/vcl/inc/qt5/QtTransferable.hxx @@ -35,7 +35,7 @@ class QtTransferable : public cppu::WeakImplHelper m_aMimeTypeSeq; public: diff --git a/vcl/qt5/QtTransferable.cxx b/vcl/qt5/QtTransferable.cxx index a2483b4b5f3a..1ab07dbb6224 100644 --- a/vcl/qt5/QtTransferable.cxx +++ b/vcl/qt5/QtTransferable.cxx @@ -42,7 +42,7 @@ static bool lcl_textMimeInfo(const OUString& rMimeString, bool& bHaveNoCharset, QtTransferable::QtTransferable(const QMimeData* pMimeData) : m_pMimeData(pMimeData) -, m_bConvertFromLocale(false) +, m_bProvideUTF16FromOtherEncoding(false) { assert(pMimeData); } @@ -62,7 +62,7 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr QStringList aFormatList(m_pMimeData->formats()); // we might add the UTF-16 mime text variant later const int nMimeTypeSeqSize = aFormatList.size() + 1; -bool bHaveNoCharset = false, bHaveUTF16 = false; +bool bHaveNoCharset = false, bHaveUTF16 = false, bHaveUTF8 = false; css::uno::Sequence aMimeTypeSeq(nMimeTypeSeqSize); auto pMimeTypeSeq = aMimeTypeSeq.getArray(); @@ -85,6 +85,7 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr { bHaveNoCharset |= bIsNoCharset; bHaveUTF16 |= bIsUTF16; +bHaveUTF8 |= bIsUTF8; if (bIsUTF16) aFlavor.DataType = cppu::UnoType::get(); else @@ -99,8 +100,8 @@ css::uno::Sequence SAL_CALL QtTransferable::getTr nMimeTypeCount++; } -m_bConvertFromLocale = bHaveNoCharset && !bHaveUTF16; -if (m_bConvertFromLocale) +m_bProvideUTF16FromOtherEncoding = (bHaveNoCharset || bHaveUTF8) && !bHaveUTF16; +if (m_bProvideUTF16FromOtherEncoding) { aFlavor.MimeType = "text/plain;charset=utf-16"; aFlavor.DataType = cppu::UnoType::get(); @@ -133,11 +134,19 @@ css::uno::Any SAL_CALL QtTransferable::getTransferData(const css::datatransfer:: if (rFlavor.MimeType == "text/plain;charset=utf-16") { OUString aString; -if (m_bConvertFromLocale) +if (m_bProvideUTF16FromOtherEncoding) { -QByteArray aByteData(m_pMimeData->data(QStringLiteral("text/plain"))); -aString = OUString(reinterpret_cast(aByteData.data()), aByteData.size(), - osl_getThreadTextEncoding()); +if (m_pMimeData->hasFormat("text/plain;charset=utf-8")) +{ +QByteArray aByteData(m_pMimeData->data(QStringLiteral("text/plain;charset=utf-8"))); +aString = OUString::fromUtf8(reinterpret_cast(aByteData.data())); +} +
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/exchangedatabases.ui | 149 +--- 1 file changed, 73 insertions(+), 76 deletions(-) New commits: commit dafa352065b31428c54e8eded382a36951f7af5c Author: Michael Weghorn AuthorDate: Thu Apr 7 17:02:47 2022 +0200 Commit: Michael Weghorn CommitDate: Thu Apr 7 19:57:21 2022 +0200 tdf#148445 sw: Resave exchangedatabases.ui with glade 3.38.2 ... in preparation of fixing the actual issue. Change-Id: Ia3e60984b06e4fda856889f5116b49aecbbfb960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132677 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/sw/uiconfig/swriter/ui/exchangedatabases.ui b/sw/uiconfig/swriter/ui/exchangedatabases.ui index e9ae801fb586..304847e25c7b 100644 --- a/sw/uiconfig/swriter/ui/exchangedatabases.ui +++ b/sw/uiconfig/swriter/ui/exchangedatabases.ui @@ -1,5 +1,5 @@ - + @@ -23,27 +23,27 @@ -False -6 +False +6 Exchange Databases -dialog +dialog -False +False vertical 12 -False -end +False +end Define True -True -True -True -True +True +True +True +True False @@ -55,8 +55,8 @@ _Close True -True -True +True +True True @@ -69,8 +69,8 @@ _Help True -True -True +True +True True @@ -84,72 +84,72 @@ False True -end +end 0 True -False +False vertical 12 True -False +False True True -0 -none +0 +none - + True -False -True -True -6 -12 -True +False 12 6 +True +True +6 +12 +True True -False +False Databases in Use -True -inuselb +True +inuselb 0 -0 -0 +0 +0 True -False +False _Available Databases -True -availablelb +True +availablelb 0 -1 -0 +1 +0 Browse... True -True -True +True +True start -True +True Opens a file open dialog to select a database file (*.odb). The selected file is added to the Available Databases list. @@ -157,48 +157,48 @@ -1 -2 +1 +2 True -False -12 -12 +False +12 +12