You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by st...@apache.org on 2013/01/06 10:36:31 UTC
svn commit: r1429484 - in /openoffice/branches/ia2/main/toolkit:
inc/toolkit/awt/vclxwindows.hxx source/awt/vclxaccessiblecomponent.cxx
source/awt/vclxtoolkit.cxx source/awt/vclxwindows.cxx
Author: steve_y
Date: Sun Jan 6 09:36:31 2013
New Revision: 1429484
URL: http://svn.apache.org/viewvc?rev=1429484&view=rev
Log:
IA2 migration for toolkit module
Modified:
openoffice/branches/ia2/main/toolkit/inc/toolkit/awt/vclxwindows.hxx
openoffice/branches/ia2/main/toolkit/source/awt/vclxaccessiblecomponent.cxx
openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx
openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx
Modified: openoffice/branches/ia2/main/toolkit/inc/toolkit/awt/vclxwindows.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/inc/toolkit/awt/vclxwindows.hxx?rev=1429484&r1=1429483&r2=1429484&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/inc/toolkit/awt/vclxwindows.hxx (original)
+++ openoffice/branches/ia2/main/toolkit/inc/toolkit/awt/vclxwindows.hxx Sun Jan 6 09:36:31 2013
@@ -876,6 +876,10 @@ public:
class TOOLKIT_DLLPUBLIC VCLXDateField : public ::com::sun::star::awt::XDateField,
public VCLXFormattedSpinField
{
+//IAccessibility2 Impplementaton 2009-----
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
public:
VCLXDateField();
~VCLXDateField();
@@ -922,6 +926,10 @@ public:
class VCLXTimeField : public ::com::sun::star::awt::XTimeField,
public VCLXFormattedSpinField
{
+//IAccessibility2 Impplementaton 2009-----
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
+//-----IAccessibility2 Impplementaton 2009
public:
VCLXTimeField();
~VCLXTimeField();
Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxaccessiblecomponent.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxaccessiblecomponent.cxx?rev=1429484&r1=1429483&r2=1429484&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxaccessiblecomponent.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxaccessiblecomponent.cxx Sun Jan 6 09:36:31 2013
@@ -37,6 +37,10 @@
#include <toolkit/awt/vclxfont.hxx>
#include <vcl/dialog.hxx>
#include <vcl/window.hxx>
+//IAccessibility2 Implementation 2009-----
+//Solution:Need methods in Edit.
+#include <vcl/edit.hxx>
+//-----IAccessibility2 Implementation 2009
#include <tools/debug.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
@@ -441,7 +445,9 @@ void VCLXAccessibleComponent::FillAccess
Window* pWindow = GetWindow();
if ( pWindow )
{
+//IAccessibility2 Implementation 2009-----
Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+//-----IAccessibility2 Implementation 2009
if ( pLabeledBy && pLabeledBy != pWindow )
{
uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
@@ -456,6 +462,20 @@ void VCLXAccessibleComponent::FillAccess
aSequence[0] = pLabelFor->GetAccessible();
rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABEL_FOR, aSequence ) );
}
+//IAccessibility2 Implementation 2009-----
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ uno::Sequence< uno::Reference< uno::XInterface > > aFlowToSequence = pWindow->GetAccFlowToSequence();
+ if( aFlowToSequence.getLength() > 0 )
+ {
+ rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aFlowToSequence ) );
+ }
+//-----IAccessibility2 Implementation 2009
}
}
@@ -504,13 +524,50 @@ void VCLXAccessibleComponent::FillAccess
if ( pWindow->GetStyle() & WB_SIZEABLE )
rStateSet.AddState( accessibility::AccessibleStateType::RESIZABLE );
-
+//IAccessibility2 Implementation 2009-----
+ // 6. frame doesn't have MOVABLE state
+ // 10. for password text, where is the sensitive state?
+ if( ( getAccessibleRole() == accessibility::AccessibleRole::FRAME ||getAccessibleRole() == accessibility::AccessibleRole::DIALOG )&& pWindow->GetStyle() & WB_MOVEABLE )
+ rStateSet.AddState( accessibility::AccessibleStateType::MOVEABLE );
+//-----IAccessibility2 Implementation 2009
if( pWindow->IsDialog() )
{
Dialog *pDlg = static_cast< Dialog* >( pWindow );
if( pDlg->IsInExecute() )
rStateSet.AddState( accessibility::AccessibleStateType::MODAL );
}
+//IAccessibility2 Implementation 2009-----
+ //Solution:If a combobox or list's edit child isn't read-only,EDITABLE state
+ // should be set.
+ if( pWindow && pWindow->GetType() == WINDOW_COMBOBOX )
+ {
+ if( !( pWindow->GetStyle() & WB_READONLY) ||
+ !((Edit*)pWindow)->IsReadOnly() )
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ }
+
+ Window* pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
+
+ while( pWindow && pChild )
+ {
+ Window* pWinTemp = pChild->GetWindow( WINDOW_FIRSTCHILD );
+ if( pWinTemp && pWinTemp->GetType() == WINDOW_EDIT )
+ {
+ if( !( pWinTemp->GetStyle() & WB_READONLY) ||
+ !((Edit*)pWinTemp)->IsReadOnly() )
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ break;
+ }
+ if( pChild->GetType() == WINDOW_EDIT )
+ {
+ if( !( pChild->GetStyle() & WB_READONLY) ||
+ !((Edit*)pChild)->IsReadOnly())
+ rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
+ break;
+ }
+ pChild = pChild->GetWindow( WINDOW_NEXT );
+ }
+//-----IAccessibility2 Implementation 2009
}
else
{
@@ -846,6 +903,10 @@ sal_Int32 SAL_CALL VCLXAccessibleCompone
else
aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor();
+//IAccessibility2 Implementation 2009-----
+ if ( nColor == COL_AUTO)
+ nColor = pWindow->GetTextColor().GetColor();
+//-----IAccessibility2 Implementation 2009
}
}
Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx?rev=1429484&r1=1429483&r2=1429484&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxtoolkit.cxx Sun Jan 6 09:36:31 2013
@@ -595,6 +595,11 @@ void SAL_CALL VCLXToolkit::disposing()
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > VCLXToolkit::createWindow( const ::com::sun::star::awt::WindowDescriptor& rDescriptor ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
+//IAccessibility2 Implementation 2009-----
+#ifdef WNT
+ CEnableAccessInterface e;
+#endif
+//-----IAccessibility2 Implementation 2009
return ImplCreateWindow( rDescriptor, WinBits(0) );
}
Modified: openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx?rev=1429484&r1=1429483&r2=1429484&view=diff
==============================================================================
--- openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx (original)
+++ openoffice/branches/ia2/main/toolkit/source/awt/vclxwindows.cxx Sun Jan 6 09:36:31 2013
@@ -4505,6 +4505,19 @@ VCLXDateField::~VCLXDateField()
{
}
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXDateField::CreateAccessibleContext()
+{
+ Window* pWindow = GetWindow();
+ if ( pWindow )
+ {
+ pWindow->SetType( WINDOW_DATEFIELD );
+ }
+ return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
+
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any VCLXDateField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
{
@@ -4846,6 +4859,18 @@ VCLXTimeField::VCLXTimeField()
VCLXTimeField::~VCLXTimeField()
{
}
+//IAccessibility2 Implementation 2009-----
+//change the window type here to match the role
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > VCLXTimeField::CreateAccessibleContext()
+{
+ Window* pWindow = GetWindow();
+ if ( pWindow )
+ {
+ pWindow->SetType( WINDOW_TIMEFIELD );
+ }
+ return getAccessibleFactory().createAccessibleContext( this );
+}
+//-----IAccessibility2 Implementation 2009
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any VCLXTimeField::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)