/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AccessibleEditableTextPara.cxx,v $ * $Revision: 1.53 $ * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_editeng.hxx" #include #include #include #include "AccessibleHyperlink.hxx" #include "editeng/unoedprx.hxx" #include #include using namespace ::com::sun::star; //------------------------------------------------------------------------ // // AccessibleHyperlink implementation // //------------------------------------------------------------------------ namespace accessibility { AccessibleHyperlink::AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD ) : rTA( r ) { pFld = p; nPara = nP; nRealIdx = nR; nStartIdx = nStt; nEndIdx = nEnd; aDescription = rD; } AccessibleHyperlink::~AccessibleHyperlink() { delete pFld; } // XAccessibleAction sal_Int32 SAL_CALL AccessibleHyperlink::getAccessibleActionCount() throw (uno::RuntimeException) { return isValid() ? 1 : 0; } sal_Bool SAL_CALL AccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { sal_Bool bRet = sal_False; if ( isValid() && ( nIndex == 0 ) ) { rTA.FieldClicked( *pFld, nPara, nRealIdx ); bRet = sal_True; } return bRet; } ::rtl::OUString SAL_CALL AccessibleHyperlink::getAccessibleActionDescription( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { ::rtl::OUString aDesc; if ( isValid() && ( nIndex == 0 ) ) aDesc = aDescription; return aDesc; } uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL AccessibleHyperlink::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > xKeyBinding; if( isValid() && ( nIndex == 0 ) ) { ::comphelper::OAccessibleKeyBindingHelper* pKeyBindingHelper = new ::comphelper::OAccessibleKeyBindingHelper(); xKeyBinding = pKeyBindingHelper; awt::KeyStroke aKeyStroke; aKeyStroke.Modifiers = 0; aKeyStroke.KeyCode = KEY_RETURN; aKeyStroke.KeyChar = 0; aKeyStroke.KeyFunc = 0; pKeyBindingHelper->AddKeyBinding( aKeyStroke ); } return xKeyBinding; } // XAccessibleHyperlink uno::Any SAL_CALL AccessibleHyperlink::getAccessibleActionAnchor( sal_Int32 /*nIndex*/ ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { return uno::Any(); } uno::Any SAL_CALL AccessibleHyperlink::getAccessibleActionObject( sal_Int32 /*nIndex*/ ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { return uno::Any(); } sal_Int32 SAL_CALL AccessibleHyperlink::getStartIndex() throw (uno::RuntimeException) { return nStartIdx; } sal_Int32 SAL_CALL AccessibleHyperlink::getEndIndex() throw (uno::RuntimeException) { return nEndIdx; } sal_Bool SAL_CALL AccessibleHyperlink::isValid( ) throw (uno::RuntimeException) { return rTA.IsValid(); } } // end of namespace accessibility //------------------------------------------------------------------------ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ v-6.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/solenv
AgeCommit message (Expand)Author
2017-07-15emfplus: create a wmf/emf/emf+ primitive based importerArmin Le Grand
2017-07-13fix BigPtrArray pretty printerNoel Grandin
2017-07-13Run Idle tasks immediatlyJan-Marek Glogowski
2017-07-13Introduce a scheduler stackJan-Marek Glogowski
2017-07-12add script to update translations for gettextCaolán McNamara
2017-07-07re-add some gdb BigPtrArray pretty printingNoel Grandin
2017-07-07Revert "use std::vector in BigPtrArray"Noel Grandin
2017-07-06LibreOffice.natvis: several new visualisersMike Kaganski
2017-07-05new loplugin unnecessaryparenNoel Grandin
2017-07-05gbuild-to-ide: add VisualStudio visualizers file to solutionMike Kaganski
2017-07-04Break solenv/bin/assemble-flatpak.sh out of dev-tools flatpak/build.shStephan Bergmann
2017-07-03loplugin:unusedfields in slideshow..svtoolsNoel Grandin
2017-07-03loplugin:casttovoidStephan Bergmann
2017-07-03Fix typosAndrea Gelmini
2017-07-02loplugin:casttovoid: solenvStephan Bergmann
2017-06-30CompilerTest_compilerplugins_clang depends on boost_headersStephan Bergmann
2017-06-29improve refcounting lopluginNoel Grandin
2017-06-29loplugin:oncevar variousNoel Grandin
2017-06-28gdb pretty-printers: fix BigPtrArrayPrinter after recent std::isationMichael Stahl
2017-06-28Try to get meaningful gdb backtraces for failed UITest core files after allStephan Bergmann
2017-06-23Sort listStephan Bergmann
2017-06-22add factory function mapping for libspelllo archivebrainbreaker
2017-06-22--enable-optimized should be orthogonal to --enable-debug/--enable-dbgutilStephan Bergmann
2017-06-22Revert "Temporary debg output to find out why tinderboxes still don't find pr...Stephan Bergmann
2017-06-22Temporary debg output to find out why tinderboxes still don't find programStephan Bergmann