summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/inc/svx/unoedsrc.hxx1
-rw-r--r--svx/inc/svx/unofored.hxx1
-rw-r--r--svx/inc/svx/unoforou.hxx2
-rw-r--r--svx/inc/svx/unotext.hxx2
-rw-r--r--svx/source/accessibility/AccessibleEditableTextPara.cxx87
-rw-r--r--svx/source/accessibility/AccessibleEditableTextPara.hxx11
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx2
-rw-r--r--svx/source/accessibility/AccessibleHyperlink.cxx146
-rw-r--r--svx/source/accessibility/AccessibleHyperlink.hxx82
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx4
-rwxr-xr-xsvx/source/accessibility/makefile.mk1
-rw-r--r--svx/source/inc/unoedprx.hxx7
-rw-r--r--svx/source/unoedit/unoedprx.cxx27
-rw-r--r--svx/source/unoedit/unofored.cxx5
-rw-r--r--svx/source/unoedit/unoforou.cxx5
-rw-r--r--svx/source/unoedit/unotext.cxx4
-rw-r--r--svx/xml/AccessibleEditableTextPara.xml1
17 files changed, 381 insertions, 7 deletions
diff --git a/svx/inc/svx/unoedsrc.hxx b/svx/inc/svx/unoedsrc.hxx
index 6c3025072e3c..f2018b49a8b0 100644
--- a/svx/inc/svx/unoedsrc.hxx
+++ b/svx/inc/svx/unoedsrc.hxx
@@ -174,6 +174,7 @@ public:
virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0;
virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0;
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos ) = 0;
virtual SfxItemPool* GetPool() const = 0;
diff --git a/svx/inc/svx/unofored.hxx b/svx/inc/svx/unofored.hxx
index a9c72f766a35..0c2f329a7bbc 100644
--- a/svx/inc/svx/unofored.hxx
+++ b/svx/inc/svx/unofored.hxx
@@ -66,6 +66,7 @@ public:
virtual SfxItemPool* GetPool() const;
virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
virtual BOOL IsValid() const;
virtual LanguageType GetLanguage( USHORT, USHORT ) const;
diff --git a/svx/inc/svx/unoforou.hxx b/svx/inc/svx/unoforou.hxx
index 75adcc620a47..21b447b5277f 100644
--- a/svx/inc/svx/unoforou.hxx
+++ b/svx/inc/svx/unoforou.hxx
@@ -85,6 +85,8 @@ public:
virtual SfxItemPool* GetPool() const;
virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+
virtual BOOL IsValid() const;
Outliner& GetOutliner() const { return rOutliner; }
diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx
index 46e26dbbc0a8..36a685f2f484 100644
--- a/svx/inc/svx/unotext.hxx
+++ b/svx/inc/svx/unotext.hxx
@@ -215,6 +215,8 @@ public:
virtual void QuickInsertLineBreak( const ESelection& rSel );
virtual XubString CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+
virtual sal_Bool IsValid() const;
virtual void SetNotifyHdl( const Link& );
diff --git a/svx/source/accessibility/AccessibleEditableTextPara.cxx b/svx/source/accessibility/AccessibleEditableTextPara.cxx
index 1c0ce04bb1d6..a5be07fc33b2 100644
--- a/svx/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/svx/source/accessibility/AccessibleEditableTextPara.cxx
@@ -43,6 +43,7 @@
#include <vos/mutex.hxx>
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
+#include <svx/flditem.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/awt/Point.hpp>
@@ -73,6 +74,7 @@
#include "unolingu.hxx"
#include "unopracc.hxx"
#include "AccessibleEditableTextPara.hxx"
+#include "AccessibleHyperlink.hxx"
#include <svx/dialmgr.hxx>
#include "accessibility.hrc"
@@ -528,7 +530,9 @@ namespace accessibility
{
uno::Reference< XAccessible > xPara = xParentContext->getAccessibleChild( nIndex );
if( xPara.is() )
+ {
return uno::Reference< XAccessibleText > ( xPara, uno::UNO_QUERY );
+ }
}
}
@@ -814,6 +818,11 @@ namespace accessibility
uno::Reference< XAccessibleEditableText > aAccEditText = this;
aRet <<= aAccEditText;
}
+ else if ( rType == ::getCppuType((uno::Reference< XAccessibleHypertext > *)0) )
+ {
+ uno::Reference< XAccessibleHypertext > aAccHyperText = this;
+ aRet <<= aAccHyperText;
+ }
else
{
aRet = AccessibleTextParaInterfaceBase::queryInterface(rType);
@@ -2066,6 +2075,84 @@ namespace accessibility
return aOutSequence;
}
+ // XAccessibleHypertext
+ ::sal_Int32 SAL_CALL AccessibleEditableTextPara::getHyperLinkCount( ) throw (::com::sun::star::uno::RuntimeException)
+ {
+ SvxAccessibleTextAdapter& rT = GetTextForwarder();
+ const sal_Int32 nPara = GetParagraphIndex();
+
+ USHORT nHyperLinks = 0;
+ USHORT nFields = rT.GetFieldCount( nPara );
+ for ( USHORT n = 0; n < nFields; n++ )
+ {
+ EFieldInfo aField = rT.GetFieldInfo( nPara, n );
+ if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ nHyperLinks++;
+ }
+ return nHyperLinks;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink > SAL_CALL AccessibleEditableTextPara::getHyperLink( ::sal_Int32 nLinkIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink > xRef;
+
+ SvxAccessibleTextAdapter& rT = GetTextForwarder();
+ const sal_Int32 nPara = GetParagraphIndex();
+
+ USHORT nHyperLink = 0;
+ USHORT nFields = rT.GetFieldCount( nPara );
+ for ( USHORT n = 0; n < nFields; n++ )
+ {
+ EFieldInfo aField = rT.GetFieldInfo( nPara, n );
+ if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ {
+ if ( nHyperLink == nLinkIndex )
+ {
+ USHORT nEEStart = aField.aPosition.nIndex;
+
+ // Translate EE Index to accessible index
+ USHORT nStart = rT.CalcEditEngineIndex( nPara, nEEStart );
+ USHORT nEnd = nStart + aField.aCurrentText.Len();
+ xRef = new AccessibleHyperlink( rT, new SvxFieldItem( *aField.pFieldItem ), nPara, nEEStart, nStart, nEnd, aField.aCurrentText );
+ break;
+ }
+ nHyperLink++;
+ }
+ }
+
+ return xRef;
+ }
+
+ ::sal_Int32 SAL_CALL AccessibleEditableTextPara::getHyperLinkIndex( ::sal_Int32 nCharIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException)
+ {
+ const sal_Int32 nPara = GetParagraphIndex();
+ SvxAccessibleTextAdapter& rT = GetTextForwarder();
+
+// SvxAccessibleTextIndex aIndex;
+// aIndex.SetIndex(nPara, nCharIndex, rT);
+// const USHORT nEEIndex = aIndex.GetEEIndex();
+
+ const USHORT nEEIndex = rT.CalcEditEngineIndex( nPara, nCharIndex );
+ sal_Int32 nHLIndex = 0;
+ USHORT nHyperLink = 0;
+ USHORT nFields = rT.GetFieldCount( nPara );
+ for ( USHORT n = 0; n < nFields; n++ )
+ {
+ EFieldInfo aField = rT.GetFieldInfo( nPara, n );
+ if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ {
+ if ( aField.aPosition.nIndex == nEEIndex )
+ {
+ nHLIndex = nHyperLink;
+ break;
+ }
+ nHyperLink++;
+ }
+ }
+
+ return nHLIndex;
+ }
+
// XAccessibleMultiLineText
sal_Int32 SAL_CALL AccessibleEditableTextPara::getLineNumberAtIndex( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException)
{
diff --git a/svx/source/accessibility/AccessibleEditableTextPara.hxx b/svx/source/accessibility/AccessibleEditableTextPara.hxx
index 4e297f44c3b5..daf4e6e7867c 100644
--- a/svx/source/accessibility/AccessibleEditableTextPara.hxx
+++ b/svx/source/accessibility/AccessibleEditableTextPara.hxx
@@ -34,7 +34,7 @@
#include <tools/gen.hxx>
#include <tools/string.hxx>
#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/compbase8.hxx>
+#include <cppuhelper/compbase9.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -45,6 +45,7 @@
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleHypertext.hpp>
#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
#include <comphelper/accessibletexthelper.hxx>
@@ -55,12 +56,13 @@
namespace accessibility
{
- typedef ::cppu::WeakComponentImplHelper8< ::com::sun::star::accessibility::XAccessible,
+ typedef ::cppu::WeakComponentImplHelper9< ::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleEditableText,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleTextAttributes,
+ ::com::sun::star::accessibility::XAccessibleHypertext,
::com::sun::star::accessibility::XAccessibleMultiLineText,
::com::sun::star::lang::XServiceInfo > AccessibleTextParaInterfaceBase;
@@ -164,6 +166,11 @@ namespace accessibility
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ // XAccessibleHypertext
+ virtual ::sal_Int32 SAL_CALL getHyperLinkCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleHyperlink > SAL_CALL getHyperLink( ::sal_Int32 nLinkIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getHyperLinkIndex( ::sal_Int32 nCharIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
// XAccessibleMultiLineText
virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index 8bfc618dfbd9..3ddae99f33a3 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -145,6 +145,8 @@ namespace accessibility
{
return XubString();
}
+ void FieldClicked( const SvxFieldItem&, USHORT, xub_StrLen ) {;}
+
BOOL IsValid() const { return sal_True; }
void SetNotifyHdl( const Link& ) {}
diff --git a/svx/source/accessibility/AccessibleHyperlink.cxx b/svx/source/accessibility/AccessibleHyperlink.cxx
new file mode 100644
index 000000000000..5d0e98f0b0d2
--- /dev/null
+++ b/svx/source/accessibility/AccessibleHyperlink.cxx
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_svx.hxx"
+
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <comphelper/accessiblekeybindinghelper.hxx>
+
+#include "AccessibleHyperlink.hxx"
+#include "unoedprx.hxx"
+#include <svx/flditem.hxx>
+#include <vcl/keycodes.hxx>
+
+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
+
+//------------------------------------------------------------------------
diff --git a/svx/source/accessibility/AccessibleHyperlink.hxx b/svx/source/accessibility/AccessibleHyperlink.hxx
new file mode 100644
index 000000000000..5192f4b5be0b
--- /dev/null
+++ b/svx/source/accessibility/AccessibleHyperlink.hxx
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * 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.hxx,v $
+ * $Revision: 1.22 $
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ACCESSIBLE_HYPERLINK_HXX
+#define _SVX_ACCESSIBLE_HYPERLINK_HXX
+
+#include <cppuhelper/weakref.hxx>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/accessibility/XAccessibleHyperlink.hpp>
+
+#include <tools/solar.h>
+
+class SvxFieldItem;
+class SvxAccessibleTextAdapter;
+
+namespace accessibility
+{
+
+ class AccessibleHyperlink : public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleHyperlink >
+ {
+ private:
+
+ SvxAccessibleTextAdapter& rTA;
+ SvxFieldItem* pFld;
+ USHORT nPara, nRealIdx; // EE values
+ sal_Int32 nStartIdx, nEndIdx; // translated values
+ ::rtl::OUString aDescription;
+
+ public:
+ AccessibleHyperlink( SvxAccessibleTextAdapter& r, SvxFieldItem* p, USHORT nP, USHORT nR, sal_Int32 nStt, sal_Int32 nEnd, const ::rtl::OUString& rD );
+ ~AccessibleHyperlink();
+
+ // XAccessibleAction
+ virtual sal_Int32 SAL_CALL getAccessibleActionCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL doAccessibleAction( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+
+ // XAccessibleHyperlink
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionAnchor( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getAccessibleActionObject( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getStartIndex() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getEndIndex() throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL isValid() throw (::com::sun::star::uno::RuntimeException);
+ };
+
+} // end of namespace accessibility
+
+#endif
+
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 5b632115c93c..d186de9d060d 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -52,10 +52,6 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleContext.hpp>
#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/AccessibleTextType.hpp>
-#include <com/sun/star/accessibility/XAccessibleText.hpp>
-#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
#include <unotools/accessiblestatesethelper.hxx>
diff --git a/svx/source/accessibility/makefile.mk b/svx/source/accessibility/makefile.mk
index 8b1802bf1a25..dfc25b00a3bb 100755
--- a/svx/source/accessibility/makefile.mk
+++ b/svx/source/accessibility/makefile.mk
@@ -68,6 +68,7 @@ LIB2OBJFILES= \
$(SLO)$/AccessibleTextEventQueue.obj \
$(SLO)$/AccessibleStaticTextBase.obj \
$(SLO)$/AccessibleParaManager.obj \
+ $(SLO)$/AccessibleHyperlink.obj \
$(SLO)$/AccessibleEditableTextPara.obj \
$(SLO)$/AccessibleImageBullet.obj \
$(SLO)$/ShapeTypeHandler.obj \
diff --git a/svx/source/inc/unoedprx.hxx b/svx/source/inc/unoedprx.hxx
index a260063d7525..47c75777acf8 100644
--- a/svx/source/inc/unoedprx.hxx
+++ b/svx/source/inc/unoedprx.hxx
@@ -53,7 +53,10 @@ public:
virtual void RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
virtual void GetPortions( USHORT nPara, SvUShorts& rList ) const;
- virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
+ virtual sal_Int32 CalcLogicalIndex( USHORT nPara, USHORT nEEIndex );
+ virtual USHORT CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex );
+
+ virtual USHORT GetItemState( const ESelection& rSel, USHORT nWhich ) const;
virtual USHORT GetItemState( USHORT nPara, USHORT nWhich ) const;
virtual void QuickInsertText( const String& rText, const ESelection& rSel );
@@ -64,6 +67,8 @@ public:
virtual SfxItemPool* GetPool() const;
virtual XubString CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, Color*& rpTxtColor, Color*& rpFldColor );
+ virtual void FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos );
+
virtual BOOL IsValid() const;
virtual LanguageType GetLanguage( USHORT, USHORT ) const;
diff --git a/svx/source/unoedit/unoedprx.cxx b/svx/source/unoedit/unoedprx.cxx
index e7bbcea519b8..72ce7da212da 100644
--- a/svx/source/unoedit/unoedprx.cxx
+++ b/svx/source/unoedit/unoedprx.cxx
@@ -692,6 +692,33 @@ XubString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField,
return mrTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ mrTextForwarder->FieldClicked( rField, nPara, nPos );
+}
+
+sal_Int32 SvxAccessibleTextAdapter::CalcLogicalIndex( USHORT nPara, USHORT nEEIndex )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetEEIndex(nPara, nEEIndex, *mrTextForwarder);
+ return aIndex.GetIndex();
+}
+
+USHORT SvxAccessibleTextAdapter::CalcEditEngineIndex( USHORT nPara, sal_Int32 nLogicalIndex )
+{
+ DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
+
+ SvxAccessibleTextIndex aIndex;
+ aIndex.SetIndex(nPara, nLogicalIndex, *mrTextForwarder);
+ return aIndex.GetEEIndex();
+}
+
+
+
BOOL SvxAccessibleTextAdapter::IsValid() const
{
DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder");
diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx
index 14c8fb20a768..3c853580644e 100644
--- a/svx/source/unoedit/unofored.cxx
+++ b/svx/source/unoedit/unofored.cxx
@@ -174,6 +174,11 @@ XubString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, US
return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+{
+ rEditEngine.FieldClicked( rField, nPara, nPos );
+}
+
USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSel, USHORT nWhich )
{
EECharAttribArray aAttribs;
diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx
index a98b6830b698..3a3a93e92a06 100644
--- a/svx/source/unoedit/unoforou.cxx
+++ b/svx/source/unoedit/unoforou.cxx
@@ -245,6 +245,11 @@ XubString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, USHO
return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
}
+void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& rField, USHORT nPara, xub_StrLen nPos )
+{
+ rOutliner.FieldClicked( rField, nPara, nPos );
+}
+
BOOL SvxOutlinerForwarder::IsValid() const
{
// cannot reliably query outliner state
diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx
index a4d8c36462e6..92218031fdc2 100644
--- a/svx/source/unoedit/unotext.cxx
+++ b/svx/source/unoedit/unotext.cxx
@@ -2573,6 +2573,10 @@ XubString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_uInt16, s
return XubString();
}
+void SvxDummyTextSource::FieldClicked( const SvxFieldItem&, USHORT, xub_StrLen )
+{
+}
+
sal_Bool SvxDummyTextSource::IsValid() const
{
return sal_False;
diff --git a/svx/xml/AccessibleEditableTextPara.xml b/svx/xml/AccessibleEditableTextPara.xml
index 1859980760df..affb15f4dd55 100644
--- a/svx/xml/AccessibleEditableTextPara.xml
+++ b/svx/xml/AccessibleEditableTextPara.xml
@@ -28,6 +28,7 @@ title="Link to a general description of UNO accessibility"/>
<type>com.sun.star.accessibility.XAccessibleEventBroadcaster</type>
<type>com.sun.star.accessibility.XAccessibleComponent</type>
<type>com.sun.star.accessibility.XAccessibleEditableText</type>
+<type>com.sun.star.accessibility.XAccessibleHyperext</type>
<type>com.sun.star.accessibility.XAccessibleTextAttributes</type>
<type>com.sun.star.lang.XTypeProvider</type>
<type>com.sun.star.lang.XServiceInfo</type>