[Libreoffice-commits] core.git: offapi/com sc/source sd/source svx/source sw/source vcl/osx vcl/unx winaccessibility/source
Jacobo Aragunde Pérez
jaragunde at igalia.com
Tue Feb 4 05:09:26 PST 2014
offapi/com/sun/star/accessibility/AccessibleRole.idl | 24 ++++++++++
offapi/com/sun/star/drawing/AccessibleDrawDocumentView.idl | 6 +-
offapi/com/sun/star/sheet/AccessibleSpreadsheetDocumentView.idl | 2
offapi/com/sun/star/sheet/AccessibleSpreadsheetPageView.idl | 2
offapi/com/sun/star/text/AccessibleTextDocumentPageView.idl | 2
offapi/com/sun/star/text/AccessibleTextDocumentView.idl | 2
sc/source/ui/Accessibility/AccessibleDocumentBase.cxx | 2
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 5 +-
svx/source/accessibility/AccessibleShape.cxx | 5 +-
sw/source/core/access/acccontext.cxx | 6 +-
sw/source/core/access/accdoc.cxx | 2
vcl/osx/a11yrolehelper.mm | 8 +++
vcl/unx/gtk/a11y/atkwrapper.cxx | 5 +-
winaccessibility/source/UAccCOM/MAccessible.cxx | 3 -
winaccessibility/source/service/AccObjectWinManager.cxx | 5 +-
winaccessibility/source/service/AccTopWindowListener.cxx | 5 +-
16 files changed, 67 insertions(+), 17 deletions(-)
New commits:
commit 2bb87dd6596f8e961f5618d8e7686fa12c64e2cf
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date: Mon Feb 3 19:08:31 2014 +0100
fdo#39944: Add DOCUMENT_* accessibility UNO roles
Added a set of UNO accessibility roles for specific kinds of
documents:
* DOCUMENT_PRESENTATION for Impress
* DOCUMENT_SPREADSHEET for Calc
* DOCUMENT_TEXT for Writer
The other applications still use the existing DOCUMENT role.
These roles translates directly to ATK but in the other toolkits we
keep using the same association that DOCUMENT role had.
Change-Id: Ibac47527e5effdecb28d2314cde8558cf4fb010a
Reviewed-on: https://gerrit.libreoffice.org/7847
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl b/offapi/com/sun/star/accessibility/AccessibleRole.idl
index 2baa6a9..ca3b79b 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRole.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl
@@ -705,6 +705,30 @@ constants AccessibleRole
*/
const short COMMENT_END = 82;
+ /** View of an presentation document.
+
+ <p>It's an specific variation of DOCUMENT for presentations.</p>
+
+ @since LibreOffice 4.3
+ */
+ const short DOCUMENT_PRESENTATION = 83;
+
+ /** View of an spreadsheet document.
+
+ <p>It's an specific variation of DOCUMENT for spreadsheets.</p>
+
+ @since LibreOffice 4.3
+ */
+ const short DOCUMENT_SPREADSHEET = 84;
+
+ /** View of an text document.
+
+ <p>It's an specific variation of DOCUMENT for text.</p>
+
+ @since LibreOffice 4.3
+ */
+ const short DOCUMENT_TEXT = 85;
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/drawing/AccessibleDrawDocumentView.idl b/offapi/com/sun/star/drawing/AccessibleDrawDocumentView.idl
index 1c3c3fa..9dcf863 100644
--- a/offapi/com/sun/star/drawing/AccessibleDrawDocumentView.idl
+++ b/offapi/com/sun/star/drawing/AccessibleDrawDocumentView.idl
@@ -69,8 +69,10 @@ service AccessibleDrawDocumentView
<p>You can access the following information:
<ul>
- <li>Role: The object's role is
- com::sun::star::accessibility::AccessibleRole::DOCUMENT.</li>
+ <li>Role: The object's role might be
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT or
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_PRESENTATION
+ , the former for a Draw and the latter for an Impress document.</li>
<li>Name: Its name is "AccessibleDrawDocumentView",
"AccessibleOutlineView", or "slide window".</li>
<li>Description: The description is "Draw Document", "Accessible
diff --git a/offapi/com/sun/star/sheet/AccessibleSpreadsheetDocumentView.idl b/offapi/com/sun/star/sheet/AccessibleSpreadsheetDocumentView.idl
index 77939c9..7b0d7fe 100644
--- a/offapi/com/sun/star/sheet/AccessibleSpreadsheetDocumentView.idl
+++ b/offapi/com/sun/star/sheet/AccessibleSpreadsheetDocumentView.idl
@@ -92,7 +92,7 @@ service AccessibleSpreadsheetDocumentView
</ul>
<li>The description is ???.</li>
<li>The name is Spreadsheet Document View with a unique number.</li>
- <li>The role is ::com::sun::star::accessibility::AccessibleRole::DOCUMENT</li>
+ <li>The role is ::com::sun::star::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET</li>
<li>There are no relations.</li>
<li>The following states are supported:
<ul>
diff --git a/offapi/com/sun/star/sheet/AccessibleSpreadsheetPageView.idl b/offapi/com/sun/star/sheet/AccessibleSpreadsheetPageView.idl
index 7673927..6ff4454 100644
--- a/offapi/com/sun/star/sheet/AccessibleSpreadsheetPageView.idl
+++ b/offapi/com/sun/star/sheet/AccessibleSpreadsheetPageView.idl
@@ -96,7 +96,7 @@ service AccessibleSpreadsheetPageView
<li>The description is ???.</li>
<li>The name is Spreadsheet Document Page Preview.</li>
<li>The role is
- ::com::sun::star::accessibility::AccessibleRole::DOCUMENT</li>
+ ::com::sun::star::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET</li>
<li>There are no relations.</li>
<li>The following states are supported:
<ul>
diff --git a/offapi/com/sun/star/text/AccessibleTextDocumentPageView.idl b/offapi/com/sun/star/text/AccessibleTextDocumentPageView.idl
index cfe22fe..5a6ace7 100644
--- a/offapi/com/sun/star/text/AccessibleTextDocumentPageView.idl
+++ b/offapi/com/sun/star/text/AccessibleTextDocumentPageView.idl
@@ -47,7 +47,7 @@ service AccessibleTextDocumentPageView
returns an object that supports one of the service
::com::sun::star::text::AccessiblePageView.
<li>The role is
- ::com::sun::star::accessibility::AccessibleRole::DOCUMENT.
+ ::com::sun::star::accessibility::AccessibleRole::DOCUMENT_TEXT.
<li>The name is "document view" (or the equivalent term
in application's language).
<li>The description also is "document view" (or the equivalent term
diff --git a/offapi/com/sun/star/text/AccessibleTextDocumentView.idl b/offapi/com/sun/star/text/AccessibleTextDocumentView.idl
index 4d4acf4..818b18e 100644
--- a/offapi/com/sun/star/text/AccessibleTextDocumentView.idl
+++ b/offapi/com/sun/star/text/AccessibleTextDocumentView.idl
@@ -129,7 +129,7 @@ service AccessibleTextDocumentView
but also keep the z order.
</ul>
<li>The role is
- ::com::sun::star::accessibility::AccessibleRole::DOCUMENT.
+ ::com::sun::star::accessibility::AccessibleRole::DOCUMENT_TEXT.
<li>The name is "document view" (or the equivalent term
in application's language).
<li>The description also is "document view" (or the equivalent term
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
index 12435ea..3b32481 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentBase.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star::accessibility;
ScAccessibleDocumentBase::ScAccessibleDocumentBase(
const uno::Reference<XAccessible>& rxParent)
- : ScAccessibleContextBase(rxParent, AccessibleRole::DOCUMENT)
+ : ScAccessibleContextBase(rxParent, AccessibleRole::DOCUMENT_SPREADSHEET)
{
}
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 1d5815d..ab724db 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -63,7 +63,10 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
::sd::ViewShell* pViewShell,
const uno::Reference<frame::XController>& rxController,
const uno::Reference<XAccessible>& rxParent)
- : AccessibleContextBase (rxParent, AccessibleRole::DOCUMENT),
+ : AccessibleContextBase (rxParent,
+ pViewShell->GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ?
+ AccessibleRole::DOCUMENT_PRESENTATION :
+ AccessibleRole::DOCUMENT),
mpWindow (pSdWindow),
mxController (rxController),
mxModel (NULL),
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 523b084..2eee09b 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -1511,7 +1511,10 @@ throw (uno::RuntimeException)
}
::com::sun::star::uno::Reference<XAccessibleContext> xParentContext = xParent->getAccessibleContext();
- if( xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT)//Document
+ if( xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT ||
+ xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT_PRESENTATION ||
+ xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT_SPREADSHEET ||
+ xParentContext->getAccessibleRole() == AccessibleRole::DOCUMENT_TEXT )//Document
{
Reference< XAccessibleGroupPosition > xGroupPosition( xParent,uno::UNO_QUERY );
if ( xGroupPosition.is() )
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 44af38c..a2cd3fc 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -548,7 +548,7 @@ sal_Int32 SAL_CALL SwAccessibleContext::getAccessibleChildCount( void )
CHECK_FOR_DEFUNC( XAccessibleContext )
//Notify the frame is a document
- if( nRole == AccessibleRole::DOCUMENT )
+ if( nRole == AccessibleRole::DOCUMENT_TEXT )
bIsAccDocUse = sal_True;
return bDisposing ? 0 : GetChildCount( *(GetMap()) );
@@ -563,7 +563,7 @@ uno::Reference< XAccessible> SAL_CALL
CHECK_FOR_DEFUNC( XAccessibleContext )
//Notify the frame is a document
- if( nRole == AccessibleRole::DOCUMENT )
+ if( nRole == AccessibleRole::DOCUMENT_TEXT )
bIsAccDocUse = sal_True;
const SwAccessibleChild aChild( GetChild( *(GetMap()), nIndex ) );
@@ -582,7 +582,7 @@ uno::Reference< XAccessible> SAL_CALL
::rtl::Reference < SwAccessibleContext > xChildImpl(
GetMap()->GetContextImpl( aChild.GetSwFrm(), !bDisposing ) );
//Send out accessible event when begin load.
- if( bBeginDocumentLoad && nRole == AccessibleRole::DOCUMENT )
+ if( bBeginDocumentLoad && nRole == AccessibleRole::DOCUMENT_TEXT )
{
FireStateChangedEvent( AccessibleStateType::FOCUSABLE,sal_True );
diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx
index 646bc4d..643a1fc 100644
--- a/sw/source/core/access/accdoc.cxx
+++ b/sw/source/core/access/accdoc.cxx
@@ -72,7 +72,7 @@ using lang::IndexOutOfBoundsException;
// SwAccessiblePreview
SwAccessibleDocumentBase::SwAccessibleDocumentBase ( SwAccessibleMap *_pMap ) :
- SwAccessibleContext( _pMap, AccessibleRole::DOCUMENT,
+ SwAccessibleContext( _pMap, AccessibleRole::DOCUMENT_TEXT,
_pMap->GetShell()->GetLayout() ),
mxParent( _pMap->GetShell()->GetWin()->GetAccessibleParentWindow()->GetAccessible() ),
mpChildWin( 0 )
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index 2940a4b..ae2391f 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -122,6 +122,10 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::TREE_ITEM, NSAccessibilityUnknownRole );
MAP( AccessibleRole::TREE_TABLE, NSAccessibilityUnknownRole );
+ MAP( AccessibleRole::DOCUMENT_PRESENTATION, NSAccessibilityGroupRole );
+ MAP( AccessibleRole::DOCUMENT_SPREADSHEET, NSAccessibilityGroupRole );
+ MAP( AccessibleRole::DOCUMENT_TEXT, NSAccessibilityGroupRole );
+
#undef MAP
default:
break;
@@ -249,6 +253,10 @@ using namespace ::com::sun::star::uno;
MAP( AccessibleRole::TREE_ITEM, @"" );
MAP( AccessibleRole::TREE_TABLE, @"" );
+ MAP( AccessibleRole::DOCUMENT_PRESENTATION, @"" );
+ MAP( AccessibleRole::DOCUMENT_SPREADSHEET, @"" );
+ MAP( AccessibleRole::DOCUMENT_TEXT, @"" );
+
#undef MAP
default:
break;
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index a03729e..5b5a446 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -270,7 +270,10 @@ 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
+ ATK_ROLE_UNKNOWN, // COMMENT_END - mapped to atk_role_unknown
+ ATK_ROLE_DOCUMENT_PRESENTATION,
+ ATK_ROLE_DOCUMENT_SPREADSHEET,
+ ATK_ROLE_DOCUMENT_TEXT
};
static bool initialized = false;
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 4a1e333..e5c5eb0 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1965,7 +1965,8 @@ STDMETHODIMP CMAccessible:: get_groupPosition(long __RPC_FAR *groupLevel,long __
*similarItemsInGroup = 0;
*positionInGroup = 0;
- if (Role != AccessibleRole::DOCUMENT)
+ if (Role != AccessibleRole::DOCUMENT && Role != AccessibleRole::DOCUMENT_PRESENTATION &&
+ Role != AccessibleRole::DOCUMENT_SPREADSHEET && Role != AccessibleRole::DOCUMENT_TEXT)
{
Reference< XAccessibleGroupPosition > xGroupPosition( pRContext, UNO_QUERY );
if ( xGroupPosition.is() )
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index dc87c45..32c155e 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -601,7 +601,10 @@ sal_Bool AccObjectWinManager::InsertChildrenAccObj( com::sun::star::accessibilit
short role = pRContext->getAccessibleRole();
- if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role )
+ if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_PRESENTATION == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_TEXT == role)
{
if(IsStateManageDescendant(pXAcc))
{
diff --git a/winaccessibility/source/service/AccTopWindowListener.cxx b/winaccessibility/source/service/AccTopWindowListener.cxx
index db87f23..df30a1a 100644
--- a/winaccessibility/source/service/AccTopWindowListener.cxx
+++ b/winaccessibility/source/service/AccTopWindowListener.cxx
@@ -156,7 +156,10 @@ void AccTopWindowListener::AddAllListeners(com::sun::star::accessibility::XAcces
short role = pAccessibleContext->getAccessibleRole();
- if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role )
+ if(com::sun::star::accessibility::AccessibleRole::DOCUMENT == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_PRESENTATION == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_SPREADSHEET == role ||
+ com::sun::star::accessibility::AccessibleRole::DOCUMENT_TEXT == role)
{
if(accManagerAgent.IsStateManageDescendant(pAccessible))
{
More information about the Libreoffice-commits
mailing list