include/comphelper/accflowenum.hxx | 33 ++++++++++++++ sc/source/ui/Accessibility/AccessibleDocument.cxx | 7 +- sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 7 +- svx/source/dialog/srchdlg.cxx | 4 - sw/source/core/access/accdoc.cxx | 7 +- 5 files changed, 44 insertions(+), 14 deletions(-)
New commits: commit 42dfdd2f8b4e4f3b6857fa416600e708358c5baa Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 23 14:58:43 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Oct 23 20:35:13 2019 +0200 put together the 'magic' flow-to constants as a side note, there's no actual use of FORSPELLCHECKFLOWTO anywhere that I can see Change-Id: I90d50d7f98dede3803fec1d22d32d5d57858c1e3 Reviewed-on: https://gerrit.libreoffice.org/81394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/comphelper/accflowenum.hxx b/include/comphelper/accflowenum.hxx new file mode 100644 index 000000000000..c34b42e277cf --- /dev/null +++ b/include/comphelper/accflowenum.hxx @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_COMPHELPER_ACCFLOWENUM_HXX +#define INCLUDED_COMPHELPER_ACCFLOWENUM_HXX + +#include <sal/types.h> + +enum AccessibilityFlowTo : sal_Int32 +{ + FORSPELLCHECKFLOWTO = 1, + FORFINDREPLACEFLOWTO = 2 +}; + +#endif // INCLUDED_COMPHELPER_ACCFLOWENUM_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index ee68adf3fdb0..5ad1c1d41a31 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -52,6 +52,7 @@ #include <svx/AccessibleShapeTreeInfo.hxx> #include <svx/AccessibleShapeInfo.hxx> #include <svx/IAccessibleParent.hxx> +#include <comphelper/accflowenum.hxx> #include <comphelper/sequence.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/docfile.hxx> @@ -2287,9 +2288,7 @@ css::uno::Sequence< css::uno::Any > { SolarMutexGuard g; - const sal_Int32 SPELLCHECKFLOWTO = 1; - const sal_Int32 FINDREPLACEFLOWTO = 2; - if ( nType == SPELLCHECKFLOWTO ) + if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO) { uno::Reference< css::drawing::XShape > xShape; rAny >>= xShape; @@ -2353,7 +2352,7 @@ css::uno::Sequence< css::uno::Any > } } } - else if ( nType == FINDREPLACEFLOWTO ) + else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO) { bool bSuccess(false); rAny >>= bSuccess; diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index b84ba0c59127..800cad560d3c 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <cppuhelper/queryinterface.hxx> +#include <comphelper/accflowenum.hxx> #include <comphelper/processfactory.hxx> #include <sal/log.hxx> #include <tools/debug.hxx> @@ -741,9 +742,7 @@ css::uno::Sequence< css::uno::Any > { SolarMutexGuard g; - const sal_Int32 SPELLCHECKFLOWTO = 1; - const sal_Int32 FINDREPLACEFLOWTO = 2; - if ( nType == SPELLCHECKFLOWTO ) + if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO) { uno::Reference< css::drawing::XShape > xShape; rAny >>= xShape; @@ -785,7 +784,7 @@ css::uno::Sequence< css::uno::Any > goto Rt; } } - else if ( nType == FINDREPLACEFLOWTO ) + else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO) { sal_Int32 nChildCount = getSelectedAccessibleChildCount(); if ( nChildCount ) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index fc36f99258f5..ef831b92f2bf 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -48,6 +48,7 @@ #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/ui/XUIElement.hpp> +#include <comphelper/accflowenum.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/scopeguard.hxx> #include <svl/itempool.hxx> @@ -2304,8 +2305,7 @@ void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin) return; } - const sal_Int32 FORFINDREPLACEFLOWTO = 2; - uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), FORFINDREPLACEFLOWTO); + uno::Sequence<uno::Any> aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), AccessibilityFlowTo::FORFINDREPLACEFLOWTO); sal_Int32 nLen = aAnySeq.getLength(); if (nLen) diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index c1d542a4bd24..b9fd5f5c0988 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> +#include <comphelper/accflowenum.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <cppuhelper/typeprovider.hxx> #include <vcl/svapp.hxx> @@ -727,15 +728,13 @@ css::uno::Sequence< css::uno::Any > { SolarMutexGuard g; - const sal_Int32 FORSPELLCHECKFLOWTO = 1; - const sal_Int32 FORFINDREPLACEFLOWTO = 2; SwAccessibleMap* pAccMap = GetMap(); if ( !pAccMap ) { return uno::Sequence< uno::Any >(); } - if ( nType == FORSPELLCHECKFLOWTO ) + if ( nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO ) { uno::Reference< css::drawing::XShape > xShape; rAny >>= xShape; @@ -789,7 +788,7 @@ css::uno::Sequence< css::uno::Any > } } } - else if ( nType == FORFINDREPLACEFLOWTO ) + else if ( nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO ) { SwCursorShell* pCursorShell = GetCursorShell(); if ( pCursorShell ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits