You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ja...@apache.org on 2013/11/19 23:39:57 UTC
svn commit: r1543609 [17/32] - in /openoffice/branches/l10n40/main: ./
accessibility/inc/accessibility/extended/
accessibility/inc/accessibility/helper/
accessibility/inc/accessibility/standard/ accessibility/source/extended/
accessibility/source/helpe...
Modified: openoffice/branches/l10n40/main/svx/source/accessibility/svxrectctaccessiblecontext.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/accessibility/svxrectctaccessiblecontext.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/accessibility/svxrectctaccessiblecontext.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/accessibility/svxrectctaccessiblecontext.cxx Tue Nov 19 22:39:40 2013
@@ -46,7 +46,14 @@
#include <svx/dlgctrl.hxx>
#include <svx/dialmgr.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
-
+//IAccessibility2 Implementation 2009-----
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLERELATIONTYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
+#endif
+#ifndef _UTL_ACCESSIBLERELATIONSETHELPER_HXX_
+#include <unotools/accessiblerelationsethelper.hxx>
+#endif
+//-----IAccessibility2 Implementation 2009
using namespace ::cppu;
using namespace ::osl;
@@ -54,6 +61,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
+//IAccessibility2 Implementation 2009-----
+using namespace ::com::sun::star::lang;
+//-----IAccessibility2 Implementation 2009
#define MAX_NUM_OF_CHILDS 9
#define NOCHILDSELECTED -1
@@ -354,13 +364,19 @@ sal_Int32 SAL_CALL SvxRectCtlAccessibleC
sal_Int16 SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRole( void ) throw( RuntimeException )
{
+//IAccessibility2 Implementation 2009-----
+ //return AccessibleRole::GROUP_BOX;
return AccessibleRole::PANEL;
+//-----IAccessibility2 Implementation 2009
}
::rtl::OUString SAL_CALL SvxRectCtlAccessibleContext::getAccessibleDescription( void ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
- return msDescription;
+ //IAccessibility2 Implementation 2009-----
+ //return msDescription;
+ return msDescription +::rtl::OUString::createFromAscii(" Please use arrow key to selection.");
+ //-----IAccessibility2 Implementation 2009
}
::rtl::OUString SAL_CALL SvxRectCtlAccessibleContext::getAccessibleName( void ) throw( RuntimeException )
@@ -374,9 +390,40 @@ sal_Int16 SAL_CALL SvxRectCtlAccessibleC
*/
Reference< XAccessibleRelationSet > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleRelationSet( void ) throw( RuntimeException )
{
- return Reference< XAccessibleRelationSet >();
+//IAccessibility2 Implementation 2009-----
+ //return Reference< XAccessibleRelationSet >();
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ Window* pWindow = mpRepr;
+ if ( pWindow )
+ {
+ // Window *pLabeledBy = pWindow->GetAccRelationLabeledBy();
+ Window *pLabeledBy = pWindow->GetAccessibleRelationLabeledBy();
+ if ( pLabeledBy && pLabeledBy != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pLabeledBy->GetAccessible();
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::LABELED_BY, aSequence ) );
+ }
+ Window* pMemberOf = pWindow->GetAccessibleRelationMemberOf();
+ if ( pMemberOf && pMemberOf != pWindow )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = pMemberOf->GetAccessible();
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+ }
+ }
+ return xSet;
+ //-----IAccessibility2 Implementation 2009
+}
+//IAccessibility2 Implementation 2009-----
+//Solution:Add the event handling method
+void SvxRectCtlAccessibleContext::FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew)
+{
+ const Reference< XInterface > xSource( *this );
+ CommitChange( AccessibleEventObject( xSource, nEventId, rNew,rOld ) );
}
-
+//-----IAccessibility2 Implementation 2009
Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -384,8 +431,10 @@ Reference< XAccessibleStateSet > SAL_CAL
if( IsAlive() )
{
- // pStateSetHelper->AddState( AccessibleStateType::ENABLED );
+//IAccessibility2 Implementation 2009-----
+ pStateSetHelper->AddState( AccessibleStateType::ENABLED );
// pStateSetHelper->AddState( AccessibleStateType::SENSITIVE );
+//-----IAccessibility2 Implementation 2009
pStateSetHelper->AddState( AccessibleStateType::FOCUSABLE );
if( mpRepr->HasFocus() )
pStateSetHelper->AddState( AccessibleStateType::FOCUSED );
@@ -634,8 +683,38 @@ void SvxRectCtlAccessibleContext::checkC
// in our case only for the first (0) _selected_ child this is a valid request
throw lang::IndexOutOfBoundsException();
}
-
-void SvxRectCtlAccessibleContext::selectChild( long nNew )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtlAccessibleContext::FireChildFocus( RECT_POINT eButton )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ long nNew = PointToIndex( eButton, mbAngleMode );
+ long nNumOfChilds = getAccessibleChildCount();
+ if( nNew < nNumOfChilds )
+ {
+ // select new child
+ SvxRectCtlChildAccessibleContext* pChild;
+ mnSelectedChild = nNew;
+ if( nNew != NOCHILDSELECTED )
+ {
+ pChild = mpChilds[ nNew ];
+ if( pChild )
+ {
+ pChild->FireFocusEvent();
+ }
+ }
+ else
+ {
+ const Reference< XInterface > xSource( *this );
+ Any aOld;
+ Any aNew;
+ aNew <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+ }
+ }
+ else
+ mnSelectedChild = NOCHILDSELECTED;
+}
+void SvxRectCtlAccessibleContext::selectChild( long nNew, sal_Bool bFireFocus )
{
::osl::MutexGuard aGuard( m_aMutex );
if( nNew != mnSelectedChild )
@@ -648,7 +727,7 @@ void SvxRectCtlAccessibleContext::select
{ // deselect old selected child if one is selected
pChild = mpChilds[ mnSelectedChild ];
if( pChild )
- pChild->setStateChecked( sal_False );
+ pChild->setStateChecked( sal_False, bFireFocus );
}
// select new child
@@ -658,7 +737,7 @@ void SvxRectCtlAccessibleContext::select
{
pChild = mpChilds[ nNew ];
if( pChild )
- pChild->setStateChecked( sal_True );
+ pChild->setStateChecked( sal_True, bFireFocus );
}
}
else
@@ -666,12 +745,12 @@ void SvxRectCtlAccessibleContext::select
}
}
-void SvxRectCtlAccessibleContext::selectChild( RECT_POINT eButton )
+void SvxRectCtlAccessibleContext::selectChild( RECT_POINT eButton , sal_Bool bFireFocus)
{
// no guard -> is done in next selectChild
- selectChild( PointToIndex( eButton, mbAngleMode ) );
+ selectChild( PointToIndex( eButton, mbAngleMode ) , bFireFocus);
}
-
+// ------ IAccessibility2 implementation 2009.
void SvxRectCtlAccessibleContext::setName( const ::rtl::OUString& rName )
{
Any aPreVal, aPostVal;
@@ -976,7 +1055,20 @@ sal_Int16 SAL_CALL SvxRectCtlChildAccess
*/
Reference<XAccessibleRelationSet> SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleRelationSet( void ) throw( RuntimeException )
{
- return Reference< XAccessibleRelationSet >();
+ //return Reference< XAccessibleRelationSet >();
+ //IAccessibility2 Implementation 2009-----
+ utl::AccessibleRelationSetHelper* pRelationSetHelper = new utl::AccessibleRelationSetHelper;
+ uno::Reference< accessibility::XAccessibleRelationSet > xSet = pRelationSetHelper;
+ if( mxParent.is() )
+ {
+ uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
+ aSequence[0] = mxParent;
+ pRelationSetHelper->AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) );
+
+ }
+
+ return xSet;
+ //-----IAccessibility2 Implementation 2009
}
Reference< XAccessibleStateSet > SAL_CALL SvxRectCtlChildAccessibleContext::getAccessibleStateSet( void ) throw( RuntimeException )
@@ -1085,6 +1177,59 @@ Any SAL_CALL SvxRectCtlChildAccessibleCo
return aRet;
}
+//IAccessibility2 Implementation 2009-----
+// -----------------------------------------------------------------------------
+// XAccessibleAction
+// -----------------------------------------------------------------------------
+
+sal_Int32 SvxRectCtlChildAccessibleContext::getAccessibleActionCount( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ return 1;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool SvxRectCtlChildAccessibleContext::doAccessibleAction ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+
+ Reference<XAccessibleSelection> xSelection( mxParent, UNO_QUERY);
+
+ xSelection->selectAccessibleChild(mnIndexInParent);
+
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------------
+
+::rtl::OUString SvxRectCtlChildAccessibleContext::getAccessibleActionDescription ( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+ return ::rtl::OUString::createFromAscii("select");
+}
+
+// -----------------------------------------------------------------------------
+
+Reference< XAccessibleKeyBinding > SvxRectCtlChildAccessibleContext::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( maMutex );
+
+ if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
+ throw IndexOutOfBoundsException();
+
+ return Reference< XAccessibleKeyBinding >();
+}
+
+//-----IAccessibility2 Implementation 2009
+
//===== XServiceInfo ========================================================
::rtl::OUString SAL_CALL SvxRectCtlChildAccessibleContext::getImplementationName( void ) throw( RuntimeException )
@@ -1181,8 +1326,8 @@ Rectangle SvxRectCtlChildAccessibleConte
return *mpBoundingBox;
}
-
-void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked, sal_Bool bFireFocus )
{
if( mbIsChecked != bChecked )
{
@@ -1193,10 +1338,24 @@ void SvxRectCtlChildAccessibleContext::s
Any aOld;
Any aNew;
Any& rMod = bChecked? aNew : aOld;
-
+ if( bFireFocus )
+ {
+ //Solution: Send the STATE_CHANGED(Focused) event to accessible
+ rMod <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+ }
rMod <<= AccessibleStateType::CHECKED;
CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
}
}
+void SvxRectCtlChildAccessibleContext::FireFocusEvent()
+{
+ const Reference< XInterface > xSource( *this );
+ Any aOld;
+ Any aNew;
+ aNew <<= AccessibleStateType::FOCUSED;
+ CommitChange( AccessibleEventObject( xSource, AccessibleEventId::STATE_CHANGED, aNew, aOld ) );
+}
+// ------ IAccessibility2 implementation 2009.
Modified: openoffice/branches/l10n40/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx Tue Nov 19 22:39:40 2013
@@ -19,15 +19,19 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include "svx/EnhancedCustomShapeTypeNames.hxx"
#include <osl/mutex.hxx>
#include <hash_map>
-#include "rtl/string.hxx"
+struct TCheck
+{
+ bool operator()( const char* s1, const char* s2 ) const
+ {
+ return strcmp( s1, s2 ) == 0;
+ }
+};
typedef std::hash_map< const char*, MSO_SPT, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap;
static TypeNameHashMap* pHashMap = NULL;
static ::osl::Mutex& getHashMapMutex()
@@ -310,3 +314,250 @@ rtl::OUString EnhancedCustomShapeTypeNam
? rtl::OUString::createFromAscii( pNameTypeTableArray[ eShapeType ].pS )
: rtl::OUString();
}
+//IAccessibility2 Implementation 2009-----
+typedef std::hash_map< const char*, const char*, std::hash<const char*>, TCheck> TypeACCNameHashMap;
+static TypeACCNameHashMap* pACCHashMap = NULL;
+struct ACCNameTypeTable
+{
+ const char* pS;
+ const char* pE;
+};
+static const ACCNameTypeTable pACCNameTypeTableArray[] =
+{
+ { "non-primitive", "Non Primitive Shape" },
+ { "rectangle", "Rectangle" },
+ { "round-rectangle", "Rounded Rectangle" },
+ { "ellipse", "Ellipse" },
+ { "diamond", "Diamond" },
+ { "isosceles-triangle", "Triangle" },
+ { "right-triangle", "Right Triangle" },
+ { "parallelogram", "Parallelogram" },
+ { "trapezoid", "Trapezoid" },
+ { "hexagon", "Hexagon" },
+ { "octagon", "Octagon" },
+ { "cross", "Cross" },
+ { "star5", "5-Point Star" },
+ { "right-arrow", "Right Arrow" },
+ //{ "mso-spt14", mso_sptThickArrow },
+ { "pentagon-right", "Pentagon" },
+ { "cube", "Cube" },
+ { "mso-spt21", "Doorplate" },
+ /*{ "mso-spt17", mso_sptBalloon },
+ { "mso-spt18", mso_sptSeal },
+ { "mso-spt19", mso_sptArc },
+ { "mso-spt20", mso_sptLine },
+ { "mso-spt21", mso_sptPlaque },
+ { "can", mso_sptCan },*/
+ { "ring", "Ring" },
+ /*{ "mso-spt24", mso_sptTextSimple },
+ { "mso-spt25", mso_sptTextOctagon },
+ { "mso-spt26", mso_sptTextHexagon },
+ { "mso-spt27", mso_sptTextCurve },
+ { "mso-spt28", mso_sptTextWave },
+ { "mso-spt29", mso_sptTextRing },
+ { "mso-spt30", mso_sptTextOnCurve },
+ { "mso-spt31", mso_sptTextOnRing },
+ { "mso-spt32", mso_sptStraightConnector1 },
+ { "mso-spt33", mso_sptBentConnector2 },
+ { "mso-spt34", mso_sptBentConnector3 },
+ { "mso-spt35", mso_sptBentConnector4 },
+ { "mso-spt36", mso_sptBentConnector5 },
+ { "mso-spt37", mso_sptCurvedConnector2 },
+ { "mso-spt38", mso_sptCurvedConnector3 },
+ { "mso-spt39", mso_sptCurvedConnector4 },
+ { "mso-spt40", mso_sptCurvedConnector5 },
+ { "mso-spt41", mso_sptCallout1 },
+ { "mso-spt42", mso_sptCallout2 },
+ { "mso-spt43", mso_sptCallout3 },
+ { "mso-spt44", mso_sptAccentCallout1 },
+ { "mso-spt45", mso_sptAccentCallout2 },
+ { "mso-spt46", mso_sptAccentCallout3 },*/
+ { "line-callout-1", "Line Callout 1" },
+ { "line-callout-2", "Line Callout 2" },
+ /*{ "mso-spt49", mso_sptBorderCallout3 },
+ { "mso-spt50", mso_sptAccentBorderCallout1 },
+ { "mso-spt51", mso_sptAccentBorderCallout2 },
+ { "mso-spt52", mso_sptAccentBorderCallout3 },
+ { "mso-spt53", mso_sptRibbon },
+ { "mso-spt54", mso_sptRibbon2 },*/
+ { "chevron", "Chevron" },
+ { "pentagon", "Regular Pentagon" },
+ { "forbidden", "'No' Symbol" },
+ { "star8", "8-Point Star" },
+ /*{ "mso-spt59", mso_sptSeal16 },
+ { "mso-spt60", mso_sptSeal32 },*/
+ { "rectangular-callout", "Rectangular Callout" },
+ { "round-rectangular-callout", "Rounded Rectangular Callout" },
+ { "round-callout", "Round Callout" },
+ //{ "mso-spt64", mso_sptWave },
+ { "paper", "Folded Corner" },
+ { "left-arrow", "Left Arrow" },
+ { "down-arrow", "Down Arrow" },
+ { "up-arrow", "Up Arrow" },
+ { "left-right-arrow", "Left and Right Arrow" },
+ { "up-down-arrow", "Up and Down Arrow" },
+ //{ "mso-spt71", mso_sptIrregularSeal1 },
+ { "bang", "Explosion" },
+ { "lightning", "Lighting Bolt" },
+ { "heart", "Heart" },
+ //{ "mso-spt75", mso_sptPictureFrame },
+ { "quad-arrow", "4-Way Arrow" },
+ { "left-arrow-callout", "Left Arrow Callout" },
+ { "right-arrow-callout", "Right Arrow Callout" },
+ { "up-arrow-callout", "Up Arrow Callout" },
+ { "down-arrow-callout", "Down Arrow Callout" },
+ { "left-right-arrow-callout", "Left and Right Arrow Callout" },
+ { "up-down-arrow-callout", "Up and Down Arrow Callout" },
+ { "quad-arrow-callout", "4-Way Arrow Callout" },
+ { "quad-bevel", "Square Bevel" },
+ { "left-bracket", "Left Bracket" },
+ { "right-bracket", "Right Bracket" },
+ { "left-brace", "Left Brace" },
+ { "right-brace", "Right Brace" },
+ { "mso-spt89", "Up and Left Arrow" },
+ //{ "mso-spt90", mso_sptBentUpArrow },
+ //{ "mso-spt91", mso_sptBentArrow },
+ { "star24", "24-Point Star" },
+ { "striped-right-arrow", "Striped Right Arrow" },
+ { "notched-right-arrow", "Notched Right Arrow" },
+ { "block-arc", "Block Arc" },
+ { "smiley", "Smile Face" },
+ { "vertical-scroll", "Vertical Scroll" },
+ { "horizontal-scroll", "Horizontal Scroll" },
+ { "circular-arrow", "Circular Arrow" },
+ { "mso-spt100", "Notched Circular Arrow" },
+ /*
+ { "mso-spt101", mso_sptUturnArrow },
+ { "mso-spt102", mso_sptCurvedRightArrow },
+ { "mso-spt103", mso_sptCurvedLeftArrow },
+ { "mso-spt104", mso_sptCurvedUpArrow },
+ { "mso-spt105", mso_sptCurvedDownArrow },*/
+ { "cloud-callout", "Cloud Callout" },
+ /*{ "mso-spt107", mso_sptEllipseRibbon },
+ { "mso-spt108", mso_sptEllipseRibbon2 },*/
+ { "flowchart-process", "Flowchart:Process" },
+ { "flowchart-decision", "Flowchart:Decision" },
+ { "flowchart-data", "Flowchart:Data" },
+ { "flowchart-predefined-process", "Flowchart:Predefined Process" },
+ { "flowchart-internal-storage", "Flowchart:Internal Storage" },
+ { "flowchart-document", "Flowchart:Document" },
+ { "flowchart-multidocument", "Flowchart:Multidocument" },
+ { "flowchart-terminator", "Flowchart:Terminator" },
+ { "flowchart-preparation", "Flowchart:Preparation" },
+ { "flowchart-manual-input", "Flowchart:Manual Input" },
+ { "flowchart-manual-operation", "Flowchart:Manual Operation" },
+ { "flowchart-connector", "Flowchart:Connector" },
+ { "flowchart-card", "Flowchart:Card" },
+ { "flowchart-punched-tape", "Flowchart:Punched Tape" },
+ { "flowchart-summing-junction", "Flowchart:Summing Junction" },
+ { "flowchart-or", "Flowchart:Or" },
+ { "flowchart-collate", "Flowchart:Collate" },
+ { "flowchart-sort", "Flowchart:Sort" },
+ { "flowchart-extract", "Flowchart:Extract" },
+ { "flowchart-merge", "Flowchart:Merge" },
+ //{ "mso-spt129", mso_sptFlowChartOfflineStorage },
+ { "flowchart-stored-data", "Flowchart:Stored Data" },
+ { "flowchart-sequential-access", "drawingbar.fc.25=Flowchart:Sequential Access" },
+ { "flowchart-magnetic-disk", "Flowchart:Magnetic Disk" },
+ { "flowchart-direct-access-storage", "Flowchart:Direct Access Storage" },
+ { "flowchart-display", "Flowchart:Display" },
+ { "flowchart-delay", "Flowchart:Delay" },
+ /*{ "fontwork-plain-text", mso_sptTextPlainText },
+ { "fontwork-stop", mso_sptTextStop },
+ { "fontwork-triangle-up", mso_sptTextTriangle },
+ { "fontwork-triangle-down", mso_sptTextTriangleInverted },
+ { "fontwork-chevron-up", mso_sptTextChevron },
+ { "fontwork-chevron-down", mso_sptTextChevronInverted },
+ { "mso-spt142", mso_sptTextRingInside },
+ { "mso-spt143", mso_sptTextRingOutside },
+ { "fontwork-arch-up-curve", mso_sptTextArchUpCurve },
+ { "fontwork-arch-down-curve", mso_sptTextArchDownCurve },
+ { "fontwork-circle-curve", mso_sptTextCircleCurve },
+ { "fontwork-open-circle-curve", mso_sptTextButtonCurve },
+ { "fontwork-arch-up-pour", mso_sptTextArchUpPour },
+ { "fontwork-arch-down-pour", mso_sptTextArchDownPour },
+ { "fontwork-circle-pour", mso_sptTextCirclePour },
+ { "fontwork-open-circle-pour", mso_sptTextButtonPour },
+ { "fontwork-curve-up", mso_sptTextCurveUp },
+ { "fontwork-curve-down", mso_sptTextCurveDown },
+ { "fontwork-fade-up-and-right", mso_sptTextCascadeUp },
+ { "fontwork-fade-up-and-left", mso_sptTextCascadeDown },
+ { "fontwork-wave", mso_sptTextWave1 },
+ { "mso-spt157", mso_sptTextWave2 },
+ { "mso-spt158", mso_sptTextWave3 },
+ { "mso-spt159", mso_sptTextWave4 },
+ { "fontwork-inflate", mso_sptTextInflate },
+ { "mso-spt161", mso_sptTextDeflate },
+ { "mso-spt162", mso_sptTextInflateBottom },
+ { "mso-spt163", mso_sptTextDeflateBottom },
+ { "mso-spt164", mso_sptTextInflateTop },
+ { "mso-spt165", mso_sptTextDeflateTop },
+ { "mso-spt166", mso_sptTextDeflateInflate },
+ { "mso-spt167", mso_sptTextDeflateInflateDeflate },
+ { "fontwork-fade-right", mso_sptTextFadeRight },
+ { "fontwork-fade-left", mso_sptTextFadeLeft },
+ { "fontwork-fade-up", mso_sptTextFadeUp },
+ { "fontwork-fade-down", mso_sptTextFadeDown },
+ { "fontwork-slant-up", mso_sptTextSlantUp },
+ { "fontwork-slant-down", mso_sptTextSlantDown },
+ { "mso-spt174", mso_sptTextCanUp },
+ { "mso-spt175", mso_sptTextCanDown },*/
+ { "flowchart-alternate-process", "Flowchart:Alternate Process " },
+ { "flowchart-off-page-connector", "Flowchart:Off-page Connector" },
+ /*{ "mso-spt178", mso_sptCallout90 },
+ { "mso-spt179", mso_sptAccentCallout90 },
+ { "mso-spt180", mso_sptBorderCallout90 },*/
+ { "line-callout-3", "Line Callout 3" },
+ //{ "mso-spt182", mso_sptLeftRightUpArrow },
+ { "sun", "Sun" },
+ { "moon", "Moon" },
+ { "bracket-pair", "Double Bracket" },
+ { "brace-pair", "Double Brace" },
+ { "star4", "4-Point Star" },
+ /*{ "mso-spt188", mso_sptDoubleWave },
+ { "mso-spt189", mso_sptActionButtonBlank },
+ { "mso-spt190", mso_sptActionButtonHome },
+ { "mso-spt191", mso_sptActionButtonHelp },
+ { "mso-spt192", mso_sptActionButtonInformation },
+ { "mso-spt193", mso_sptActionButtonForwardNext },
+ { "mso-spt194", mso_sptActionButtonBackPrevious },
+ { "mso-spt195", mso_sptActionButtonEnd },
+ { "mso-spt196", mso_sptActionButtonBeginning },
+ { "mso-spt197", mso_sptActionButtonReturn },
+ { "mso-spt198", mso_sptActionButtonDocument },
+ { "mso-spt199", mso_sptActionButtonSound },
+ { "mso-spt200", mso_sptActionButtonMovie },
+ { "mso-spt201", mso_sptHostControl },
+ { "mso-spt202", mso_sptTextBox },*/
+ { "frame", "Frame" },
+ { "col-60da8460", "Octagon Bevel" },
+ { "col-502ad400", "Diamond Bevel" }
+};
+rtl::OUString EnhancedCustomShapeTypeNames::GetAccName( const rtl::OUString& rShapeType )
+{
+ if ( !pACCHashMap )
+ { // init hash map
+ ::osl::MutexGuard aGuard( getHashMapMutex() );
+ if ( !pACCHashMap )
+ {
+ TypeACCNameHashMap* pH = new TypeACCNameHashMap;
+ const ACCNameTypeTable* pPtr = pACCNameTypeTableArray;
+ const ACCNameTypeTable* pEnd = pPtr + ( sizeof( pACCNameTypeTableArray ) / sizeof( ACCNameTypeTable ) );
+ for ( ; pPtr < pEnd; pPtr++ )
+ (*pH)[ pPtr->pS ] = pPtr->pE;
+ pACCHashMap = pH;
+ }
+ }
+ rtl::OUString sRetValue;
+ int i, nLen = rShapeType.getLength();
+ char* pBuf = new char[ nLen + 1 ];
+ for ( i = 0; i < nLen; i++ )
+ pBuf[ i ] = (char)rShapeType[ i ];
+ pBuf[ i ] = 0;
+ TypeACCNameHashMap::iterator aHashIter( pACCHashMap->find( pBuf ) );
+ delete[] pBuf;
+ if ( aHashIter != pACCHashMap->end() )
+ sRetValue = rtl::OUString::createFromAscii( (*aHashIter).second );
+ return sRetValue;
+}
+//-----IAccessibility2 Implementation 2009
Modified: openoffice/branches/l10n40/main/svx/source/dialog/_bmpmask.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/_bmpmask.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/_bmpmask.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/_bmpmask.cxx Tue Nov 19 22:39:40 2013
@@ -137,6 +137,9 @@ void MaskSet::Select()
void MaskSet::GetFocus()
{
+ //IAccessibility2 Implementation 2009-----
+ ValueSet::GetFocus();
+ //-----IAccessibility2 Implementation 2009
SelectItem( 1 );
pSvxBmpMask->onSelect( this );
}
@@ -327,10 +330,13 @@ IMPL_LINK( MaskData, CbxTransHdl, CheckB
IMPL_LINK( MaskData, FocusLbHdl, ColorLB*, pLb )
{
- pMask->pQSet1->SelectItem( pLb == &( pMask->aLbColor1 ) ? 1 : 0 );
- pMask->pQSet2->SelectItem( pLb == &( pMask->aLbColor2 ) ? 1 : 0 );
- pMask->pQSet3->SelectItem( pLb == &( pMask->aLbColor3 ) ? 1 : 0 );
- pMask->pQSet4->SelectItem( pLb == &( pMask->aLbColor4 ) ? 1 : 0 );
+ //IAccessibility2 Implementation 2009-----
+ // MT: bFireFox as API parameter is ugly, find better solution????
+ pMask->pQSet1->SelectItem( pLb == &( pMask->aLbColor1 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet2->SelectItem( pLb == &( pMask->aLbColor2 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet3->SelectItem( pLb == &( pMask->aLbColor3 ) ? 1 : 0 /* , false */ );
+ pMask->pQSet4->SelectItem( pLb == &( pMask->aLbColor4 ) ? 1 : 0 /* , false */ );
+ //-----IAccessibility2 Implementation 2009
return 0;
}
@@ -477,35 +483,57 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBi
pQSet1->SetColCount( 1 );
pQSet1->SetLineCount( 1 );
// pQSet1->SetExtraSpacing( 1 );
- pQSet1->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
+ String sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
+ String sColorPaletteN;
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ //pQSet1->InsertItem( 1, aPipetteColor );
+ pQSet1->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //IAccessibility2 Implementation 2009-----
pQSet1->SelectItem( 1 );
pQSet2->SetStyle( pQSet2->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet2->SetColCount( 1 );
pQSet2->SetLineCount( 1 );
// pQSet2->SetExtraSpacing( 1 );
- pQSet2->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ //pQSet2->InsertItem( 1, aPipetteColor );
+ pQSet2->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //-----IAccessibility2 Implementation 2009
pQSet2->SelectItem( 0 );
pQSet3->SetStyle( pQSet3->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet3->SetColCount( 1 );
pQSet3->SetLineCount( 1 );
// pQSet3->SetExtraSpacing( 1 );
- pQSet3->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ pQSet3->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //pQSet3->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
pQSet3->SelectItem( 0 );
pQSet4->SetStyle( pQSet4->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
pQSet4->SetColCount( 1 );
pQSet4->SetLineCount( 1 );
// pQSet4->SetExtraSpacing( 1 );
- pQSet4->InsertItem( 1, aPipetteColor );
+ //IAccessibility2 Implementation 2009-----
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ pQSet4->InsertItem( 1, aPipetteColor, sColorPaletteN);
+ //pQSet4->InsertItem( 1, aPipetteColor );
+ //-----IAccessibility2 Implementation 2009
pQSet4->SelectItem( 0 );
pQSet1->Show();
pQSet2->Show();
pQSet3->Show();
pQSet4->Show();
-
+ //IAccessibility2 Implementation 2009-----
aCbx1.SetAccessibleRelationMemberOf( &aGrpQ );
pQSet1->SetAccessibleRelationMemberOf( &aGrpQ );
aSp1.SetAccessibleRelationMemberOf( &aGrpQ );
@@ -541,6 +569,7 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBi
aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans );
aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ );
aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ );
+ //-----IAccessibility2 Implementation 2009
}
//-------------------------------------------------------------------------
@@ -1271,4 +1300,51 @@ void SvxBmpMask::SetAccessibleNames (voi
sSourceColorN = sSourceColor;
sSourceColorN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
aCbx4.SetAccessibleName (sSourceColorN);
+ //IAccessibility2 Implementation 2009-----
+ // set the accessible name for valueset
+ String sColorPalette (BMP_RESID( RID_SVXDLG_BMPMASK_STR_PALETTE));
+ String sColorPaletteN;
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ pQSet1->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ pQSet2->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ pQSet3->SetText (sColorPaletteN);
+ sColorPaletteN = sColorPalette;
+ sColorPaletteN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ pQSet4->SetText (sColorPaletteN);
+ // set the accessible for replace with spin boxes.
+ String sTolerance(BMP_RESID( RID_SVXDLG_BMPMASK_STR_TOLERANCE));
+ String sToleranceN;
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aSp1.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aSp2.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aSp3.SetAccessibleName (sToleranceN);
+ sToleranceN = sTolerance;
+ sToleranceN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ aSp4.SetAccessibleName (sToleranceN);
+ // set the accessible for replace with combo boxes.
+ String sReplaceWith(BMP_RESID( RID_SVXDLG_BMPMASK_STR_REPLACEWITH));
+ String sReplaceWithN;
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 1"));
+ aLbColor1.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 2"));
+ aLbColor2.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 3"));
+ aLbColor3.SetAccessibleName (sReplaceWithN);
+ sReplaceWithN = sReplaceWith;
+ sReplaceWithN.AppendAscii (RTL_CONSTASCII_STRINGPARAM (" 4"));
+ aLbColor4.SetAccessibleName (sReplaceWithN);
+ //-----IAccessibility2 Implementation 2009
}
Modified: openoffice/branches/l10n40/main/svx/source/dialog/charmap.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/charmap.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/charmap.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/charmap.cxx Tue Nov 19 22:39:40 2013
@@ -136,7 +136,8 @@ void SvxShowCharSet::MouseButtonDown( co
CaptureMouse();
int nIndex = PixelToMapIndex( rMEvt.GetPosPixel() );
- SelectIndex( nIndex );
+ // Fire the focus event
+ SelectIndex( nIndex , sal_True);
}
if ( !(rMEvt.GetClicks() % 2) )
@@ -177,7 +178,8 @@ void SvxShowCharSet::MouseMove( const Mo
aPos.Y() = aSize.Height()-5;
int nIndex = PixelToMapIndex( aPos );
- SelectIndex( nIndex );
+ // Fire the focus event.
+ SelectIndex( nIndex , sal_True );
}
}
@@ -585,12 +587,18 @@ void SvxShowCharSet::SelectIndex( int nN
if( m_pAccessible )
{
::svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex);
- m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
+ // Don't fire the focus event.
+ if ( bFocus )
+ m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
+ else
+ m_pAccessible->fireEvent( AccessibleEventId::ACTIVE_DESCENDANT_CHANGED_NOFOCUS, Any(), makeAny(pItem->GetAccessible()) ); // this call asures that m_pItem is set
OSL_ENSURE(pItem->m_pItem,"No accessible created!");
Any aOldAny, aNewAny;
aNewAny <<= AccessibleStateType::FOCUSED;
- pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
+ // Don't fire the focus event.
+ if ( bFocus )
+ pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
aNewAny <<= AccessibleStateType::SELECTED;
pItem->m_pItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny );
Modified: openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.cxx Tue Nov 19 22:39:40 2013
@@ -1345,6 +1345,29 @@ void SvxTPFilter::Disable( bool bChild)
Enable( false, bChild );
}
+//IAccessibility2 Implementation 2009-----
+void SvxTPFilter::SetAccessibleRelationMemberOf( Window* pWin )
+{
+ aCbDate.SetAccessibleRelationMemberOf(pWin);
+ aLbDate.SetAccessibleRelationMemberOf(pWin);
+ aDfDate.SetAccessibleRelationMemberOf(pWin);
+ aTfDate.SetAccessibleRelationMemberOf(pWin);
+ aIbClock.SetAccessibleRelationMemberOf(pWin);
+ aFtDate2.SetAccessibleRelationMemberOf(pWin);
+ aDfDate2.SetAccessibleRelationMemberOf(pWin);
+ aTfDate2.SetAccessibleRelationMemberOf(pWin);
+ aIbClock2.SetAccessibleRelationMemberOf(pWin);
+ aCbAuthor.SetAccessibleRelationMemberOf(pWin);
+ aLbAuthor.SetAccessibleRelationMemberOf(pWin);
+ aCbRange.SetAccessibleRelationMemberOf(pWin);
+ aEdRange.SetAccessibleRelationMemberOf(pWin);
+ aBtnRange.SetAccessibleRelationMemberOf(pWin);
+ aLbAction.SetAccessibleRelationMemberOf(pWin);
+ aCbComment.SetAccessibleRelationMemberOf(pWin);
+ aEdComment.SetAccessibleRelationMemberOf(pWin);
+}
+//-----IAccessibility2 Implementation 2009
+
IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
{
Modified: openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.src
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.src?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.src (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/ctredlin.src Tue Nov 19 22:39:40 2013
@@ -277,6 +277,10 @@ TabPage SID_REDLIN_FILTER_PAGE
{
Text [ en-US ] = "End Time" ;
};
+ String STR_TREE
+ {
+ Text [ en-US ] = "Changes" ;
+ };
/*-----IAccessibility2 Implementation 2009*/
};
TabPage SID_REDLIN_VIEW_PAGE
@@ -354,10 +358,6 @@ TabPage SID_REDLIN_VIEW_PAGE
{
Text [ en-US ] = "Comment" ;
};
- String STR_TREE
- {
- Text [ en-US ] = "Changes" ;
- };
};
Modified: openoffice/branches/l10n40/main/svx/source/dialog/dlgctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/dlgctrl.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/dlgctrl.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/dlgctrl.cxx Tue Nov 19 22:39:40 2013
@@ -37,6 +37,18 @@
#include <vcl/region.hxx>
#include <vcl/gradient.hxx>
#include <vcl/hatch.hxx>
+// IAccessibility2 implementation 2009. ------
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTOBJECT_HPP_
+#include <com/sun/star/accessibility/AccessibleEventObject.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLEEVENTID_HPP_
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HPP_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+#include "svxpixelctlaccessiblecontext.hxx"
+// ------ IAccessibility2 implementation 2009.
#include <svtools/colorcfg.hxx>
#include <svxrectctaccessiblecontext.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
@@ -563,6 +575,15 @@ Point SvxRectCtl::SetActualRPWithoutInva
void SvxRectCtl::GetFocus()
{
SetFocusRect();
+ // IAccessibility2 implementation 2009. ------
+ //Solution: Send the accessible focused event
+ Control::GetFocus();
+ // Send accessibility event.
+ if(pAccContext)
+ {
+ pAccContext->FireChildFocus(GetActualRP());
+ }
+ // ------ IAccessibility2 implementation 2009.
}
@@ -656,9 +677,10 @@ RECT_POINT SvxRectCtl::GetActualRP() con
|* Gibt den aktuell ausgewaehlten RECT_POINT zur�ck
|*
\************************************************************************/
-
-void SvxRectCtl::SetActualRP( RECT_POINT eNewRP )
+// IAccessibility2 implementation 2009. ------
+void SvxRectCtl::SetActualRP( RECT_POINT eNewRP /* MT: , sal_Bool bFireFocus */ )
{
+ // MT: bFireFox as API parameter is ugly...
Point aPtLast( SetActualRPWithoutInvalidate( eNewRP ) );
Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ), aPtLast + Point( nRadius, nRadius ) ) );
@@ -666,9 +688,9 @@ void SvxRectCtl::SetActualRP( RECT_POINT
// notify accessibility object about change
if( pAccContext )
- pAccContext->selectChild( eNewRP );
+ pAccContext->selectChild( eNewRP /* MT, bFireFocus */ );
}
-
+// ------ IAccessibility2 implementation 2009.
void SvxRectCtl::SetState( CTL_STATE nState )
{
m_nState = nState;
@@ -863,11 +885,74 @@ void SvxAngleCtl::Paint( const Rectangle
|* Control zum Editieren von Bitmaps
|*
\************************************************************************/
+// IAccessibility2 implementation 2009. ------
+
+::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SvxPixelCtl::CreateAccessible()
+{
+ if(!m_xAccess.is())
+ {
+ m_xAccess = m_pAccess = new SvxPixelCtlAccessible(*this);
+ }
+ return m_xAccess;
+}
+
+//Logic Pixel
+long SvxPixelCtl::PointToIndex(const Point &aPt) const
+{
+ sal_uInt16 nX, nY;
+
+ nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+
+ return nX + nY * nLines ;
+}
+Point SvxPixelCtl::IndexToPoint(long nIndex) const
+{
+ DBG_ASSERT(nIndex >= 0 && nIndex < nSquares ," Check Index");
+
+ sal_uInt16 nXIndex = nIndex % nLines ;
+ sal_uInt16 nYIndex = sal_uInt16(nIndex / nLines) ;
+
+ Point aPtTl;
+ aPtTl.Y() = aRectSize.Height() * nYIndex / nLines + 1;
+ aPtTl.X() = aRectSize.Width() * nXIndex / nLines + 1;
+
+ return aPtTl;
+}
+long SvxPixelCtl::GetFoucsPosIndex() const
+{
+ return aFocusPosition.getX() + aFocusPosition.getY() * nLines ;
+}
+long SvxPixelCtl::ShowPosition( const Point &pt)
+{
+ Point aPt = PixelToLogic( pt );
+
+ sal_uInt16 nX, nY;
+ nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+
+ ChangePixel( nX + nY * nLines );
+
+ //Solution:Set new focus position and repaint
+ //Invalidate( Rectangle( aPtTl, aPtBr ) );
+ aFocusPosition.setX(nX);
+ aFocusPosition.setY(nY);
+ Invalidate(Rectangle(Point(0,0),aRectSize));
+
+ if( WINDOW_TABPAGE == GetParent()->GetType() )
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+
+ return GetFoucsPosIndex();
+}
+// ------ IAccessibility2 implementation 2009.
SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumber ) :
Control ( pParent, rResId ),
nLines ( nNumber ),
bPaintable ( sal_True )
+ // IAccessibility2 implementation 2009. ------
+ //Solution:Initialize it's value to Point(0,0)
+ ,aFocusPosition(0,0)
{
// SetMapMode( MAP_100TH_MM );
aRectSize = GetOutputSize();
@@ -879,6 +964,8 @@ SvxPixelCtl::SvxPixelCtl( Window* pParen
nSquares = nLines * nLines;
pPixel = new sal_uInt16[ nSquares ];
rtl_zeroMemory(pPixel, nSquares * sizeof(sal_uInt16));
+ // IAccessibility2 implementation 2009. ------
+ m_pAccess=NULL;
}
/*************************************************************************
@@ -914,24 +1001,37 @@ void SvxPixelCtl::ChangePixel( sal_uInt1
void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
{
- Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
- Point aPtTl, aPtBr;
- sal_uInt16 nX, nY;
+ // IAccessibility2 implementation 2009. ------
+ //Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
+ //Point aPtTl, aPtBr;
+ //sal_uInt16 nX, nY;
- nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
- nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
+ //nX = (sal_uInt16) ( aPt.X() * nLines / aRectSize.Width() );
+ //nY = (sal_uInt16) ( aPt.Y() * nLines / aRectSize.Height() );
- ChangePixel( nX + nY * nLines );
+ //ChangePixel( nX + nY * nLines );
- aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
- aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
- aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
- aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
+ //aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
+ //aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
+ //aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
+ //aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
- Invalidate( Rectangle( aPtTl, aPtBr ) );
+ //Invalidate( Rectangle( aPtTl, aPtBr ) );
- if( WINDOW_TABPAGE == GetParent()->GetType() )
- ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+ //if( WINDOW_TABPAGE == GetParent()->GetType() )
+ // ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+ //Solution:Grab focus when click in window
+ if( !HasFocus() )
+ {
+ GrabFocus();
+ }
+ long nIndex = ShowPosition(rMEvt.GetPosPixel());
+
+ if(m_pAccess)
+ {
+ m_pAccess->NotifyChild(nIndex,sal_True,sal_True);
+ }
+ // ------ IAccessibility2 implementation 2009.
}
/*************************************************************************
@@ -982,6 +1082,13 @@ void SvxPixelCtl::Paint( const Rectangle
DrawRect( Rectangle( aPtTl, aPtBr ) );
}
}
+ // IAccessibility2 implementation 2009. ------
+ //Solution:Draw visual focus when has focus
+ if( HasFocus() )
+ {
+ ShowFocus(implCalFocusRect(aFocusPosition));
+ }
+ // ------ IAccessibility2 implementation 2009.
} // bPaintable
else
{
@@ -991,6 +1098,130 @@ void SvxPixelCtl::Paint( const Rectangle
DrawLine( Point( 0, aRectSize.Height() ), Point( aRectSize.Width(), 0 ) );
}
}
+// IAccessibility2 implementation 2009. ------
+//Solution:Caculate visual focus rectangle via focus position
+Rectangle SvxPixelCtl::implCalFocusRect( const Point& aPosition )
+{
+ long nLeft,nTop,nRight,nBottom;
+ long i,j;
+ i = aPosition.Y();
+ j = aPosition.X();
+ nLeft = aRectSize.Width() * j / nLines + 1;
+ nRight = aRectSize.Width() * (j + 1) / nLines - 1;
+ nTop = aRectSize.Height() * i / nLines + 1;
+ nBottom = aRectSize.Height() * (i + 1) / nLines - 1;
+ return Rectangle(nLeft,nTop,nRight,nBottom);
+}
+
+//Solution:Keyboard fucntion
+void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
+{
+ KeyCode aKeyCode = rKEvt.GetKeyCode();
+ sal_uInt16 nCode = aKeyCode.GetCode();
+ sal_Bool bIsMod = aKeyCode.IsShift() || aKeyCode.IsMod1() || aKeyCode.IsMod2();
+
+ if( !bIsMod )
+ {
+ Point pRepaintPoint( aRectSize.Width() *( aFocusPosition.getX() - 1)/ nLines - 1,
+ aRectSize.Height() *( aFocusPosition.getY() - 1)/ nLines -1
+ );
+ Size mRepaintSize( aRectSize.Width() *3/ nLines + 2,aRectSize.Height() *3/ nLines + 2);
+ Rectangle mRepaintRect( pRepaintPoint, mRepaintSize );
+ sal_Bool bFocusPosChanged=sal_False;
+ switch(nCode)
+ {
+ case KEY_LEFT:
+ if((aFocusPosition.getX() >= 1))
+ {
+ aFocusPosition.setX( aFocusPosition.getX() - 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_RIGHT:
+ if( aFocusPosition.getX() < (nLines - 1) )
+ {
+ aFocusPosition.setX( aFocusPosition.getX() + 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_UP:
+ if((aFocusPosition.getY() >= 1))
+ {
+ aFocusPosition.setY( aFocusPosition.getY() - 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_DOWN:
+ if( aFocusPosition.getY() < ( nLines - 1 ) )
+ {
+ aFocusPosition.setY( aFocusPosition.getY() + 1 );
+ Invalidate(mRepaintRect);
+ bFocusPosChanged=sal_True;
+ }
+ break;
+ case KEY_SPACE:
+ ChangePixel( sal_uInt16(aFocusPosition.getX() + aFocusPosition.getY() * nLines) );
+ Invalidate( implCalFocusRect(aFocusPosition) );
+ break;
+ default:
+ Control::KeyInput( rKEvt );
+ return;
+ }
+ if(m_xAccess.is())
+ {
+ long nIndex = GetFoucsPosIndex();
+ switch(nCode)
+ {
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_UP:
+ case KEY_DOWN:
+ if (bFocusPosChanged)
+ {
+ m_pAccess->NotifyChild(nIndex,sal_False,sal_False);
+ }
+ break;
+ case KEY_SPACE:
+ m_pAccess->NotifyChild(nIndex,sal_False,sal_True);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ Control::KeyInput( rKEvt );
+ }
+}
+
+//Draw focus when get focus
+void SvxPixelCtl::GetFocus()
+{
+ Invalidate(implCalFocusRect(aFocusPosition));
+
+ if(m_pAccess)
+ {
+ m_pAccess->NotifyChild(GetFoucsPosIndex(),sal_True,sal_False);
+ }
+
+ Control::GetFocus();
+}
+
+//Hide focus when lose focus
+void SvxPixelCtl::LoseFocus()
+{
+ HideFocus();
+ if (m_pAccess)
+ {
+ m_pAccess->LoseFocus();
+ }
+ Control::LoseFocus();
+}
+// ------ IAccessibility2 implementation 2009.
/*************************************************************************
|*
Modified: openoffice/branches/l10n40/main/svx/source/dialog/frmsel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/frmsel.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/frmsel.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/frmsel.cxx Tue Nov 19 22:39:40 2013
@@ -30,6 +30,12 @@
#include "frmselimpl.hxx"
#include "AccessibleFrameSelector.hxx"
#include <svx/dialmgr.hxx>
+//IAccessibility2 Implementation 2009-----
+#include <com/sun/star/accessibility/AccessibleEventId.hpp>
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_ACCESSIBLESTATETYPE_HDL_
+#include <com/sun/star/accessibility/AccessibleStateType.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
@@ -43,8 +49,11 @@
namespace svx {
using ::com::sun::star::uno::Reference;
+//IAccessibility2 Implementation 2009-----
+using ::com::sun::star::uno::Any;
using ::com::sun::star::accessibility::XAccessible;
-
+using namespace ::com::sun::star::accessibility;
+//-----IAccessibility2 Implementation 2009
// ============================================================================
// global functions from framebordertype.hxx
@@ -696,10 +705,24 @@ void FrameSelectorImpl::DoInvalidate( bo
void FrameSelectorImpl::SetBorderState( FrameBorder& rBorder, FrameBorderState eState )
{
DBG_ASSERT( rBorder.IsEnabled(), "svx::FrameSelectorImpl::SetBorderState - access to disabled border" );
+ //IAccessibility2 Implementation 2009-----
+ Any aOld;
+ Any aNew;
+ Any& rMod = eState == FRAMESTATE_SHOW ? aNew : aOld;
+ rMod <<= AccessibleStateType::CHECKED;
+ Reference< XAccessible > xRet;
+ size_t nVecIdx = static_cast< size_t >( rBorder.GetType() );
+ if( GetBorder(rBorder.GetType()).IsEnabled() && (1 <= nVecIdx) && (nVecIdx <= maChildVec.size()) )
+ xRet = mxChildVec[ --nVecIdx ];
+ a11y::AccFrameSelector* pFrameSelector = static_cast<a11y::AccFrameSelector*>(xRet.get());
+
if( eState == FRAMESTATE_SHOW )
SetBorderCoreStyle( rBorder, &maCurrStyle );
else
rBorder.SetState( eState );
+ if (pFrameSelector)
+ pFrameSelector->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOld, aNew );
+ //-----IAccessibility2 Implementation 2009
DoInvalidate( true );
}
@@ -914,9 +937,23 @@ bool FrameSelector::IsBorderSelected( Fr
return mxImpl->GetBorder( eBorder ).IsSelected();
}
-void FrameSelector::SelectBorder( FrameBorderType eBorder, bool bSelect )
+void FrameSelector::SelectBorder( FrameBorderType eBorder, bool bSelect /*, bool bFocus */ )
{
mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), bSelect );
+ //IAccessibility2 Implementation 2009-----
+ // MT: bFireFox as API parameter is ugly...
+ // if (bFocus)
+ {
+ Reference< XAccessible > xRet = GetChildAccessible(eBorder);
+ a11y::AccFrameSelector* pFrameSelector = static_cast<a11y::AccFrameSelector*>(xRet.get());
+ if (pFrameSelector)
+ {
+ Any aOldValue, aNewValue;
+ aNewValue <<= AccessibleStateType::FOCUSED;
+ pFrameSelector->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue );
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
}
bool FrameSelector::IsAnyBorderSelected() const
@@ -1063,7 +1100,10 @@ void FrameSelector::MouseButtonDown( con
if( !(*aIt)->IsSelected() )
{
bNewSelected = true;
- mxImpl->SelectBorder( **aIt, true );
+ //IAccessibility2 Implementation 2009-----
+ //mxImpl->SelectBorder( **aIt, true );
+ SelectBorder((**aIt).GetType(), true);
+ //-----IAccessibility2 Implementation 2009
}
}
else
@@ -1160,6 +1200,31 @@ void FrameSelector::GetFocus()
mxImpl->DoInvalidate( false );
if( mxImpl->mxAccess.is() )
mxImpl->mpAccess->NotifyFocusListeners( sal_True );
+ //IAccessibility2 Implementation 2009-----
+ if (IsAnyBorderSelected())
+ {
+ FrameBorderType borderType = FRAMEBORDER_NONE;
+ if (mxImpl->maLeft.IsSelected())
+ borderType = FRAMEBORDER_LEFT;
+ else if (mxImpl->maRight.IsSelected())
+ borderType = FRAMEBORDER_RIGHT;
+ else if (mxImpl->maTop.IsSelected())
+ borderType = FRAMEBORDER_TOP;
+ else if (mxImpl->maBottom.IsSelected())
+ borderType = FRAMEBORDER_BOTTOM;
+ else if (mxImpl->maHor.IsSelected())
+ borderType = FRAMEBORDER_HOR;
+ else if (mxImpl->maVer.IsSelected())
+ borderType = FRAMEBORDER_VER;
+ else if (mxImpl->maTLBR.IsSelected())
+ borderType = FRAMEBORDER_TLBR;
+ else if (mxImpl->maBLTR.IsSelected())
+ borderType = FRAMEBORDER_BLTR;
+ SelectBorder(borderType);
+ }
+ for( SelFrameBorderIter aIt( mxImpl->maEnabBorders ); aIt.Is(); ++aIt )
+ mxImpl->SetBorderState( **aIt, FRAMESTATE_SHOW );
+ //-----IAccessibility2 Implementation 2009
Control::GetFocus();
}
Modified: openoffice/branches/l10n40/main/svx/source/dialog/srchdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/dialog/srchdlg.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/dialog/srchdlg.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/dialog/srchdlg.cxx Tue Nov 19 22:39:40 2013
@@ -70,6 +70,14 @@
#include <tools/resary.hxx>
#include <svx/svxdlg.hxx> //CHINA001
+//IAccessibility2 Impplementaton 2009-----
+#ifndef _ACCESSIBLESVXFINDREPLACEDIALOG_HXX_
+#include <svx/AccessibleSvxFindReplaceDialog.hxx>
+#endif
+using namespace com::sun::star::uno;
+using namespace com::sun::star::accessibility;
+//-----IAccessibility2 Impplementaton 2009
+
#include <sfx2/layout-pre.hxx>
using namespace com::sun::star::i18n;
@@ -293,6 +301,8 @@ void SearchAttrItemList::Remove( sal_uIn
#undef INI_LIST
#define INI_LIST() \
+ mpDocWin (NULL), \
+ mbSuccess (sal_False), \
aSearchText ( this, SVX_RES( FT_SEARCH ) ), \
aSearchLB ( this, SVX_RES( ED_SEARCH ) ), \
aSearchTmplLB ( this, SVX_RES( LB_SEARCH ) ), \
@@ -2506,6 +2516,23 @@ void SvxSearchDialog::SaveToModule_Impl(
rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SFX_CALLMODE_SLOT, ppArgs );
}
+//IAccessible2 Implementation 2009-----
+::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
+ SvxSearchDialog::GetComponentInterface( sal_Bool bCreate )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer
+ (Window::GetComponentInterface(false));
+ if ( !xPeer.is() && bCreate )
+ {
+ ::com::sun::star::awt::XWindowPeer* mxPeer = new VCLXSvxFindReplaceDialog(this);
+ SetComponentInterface(mxPeer);
+ return mxPeer;
+ }
+ else
+ return xPeer;
+}
+//-----IAccessible2 Implementation 2009
+
// class SvxSearchDialogWrapper ------------------------------------------
SFX_IMPL_CHILDWINDOW(SvxSearchDialogWrapper, SID_SEARCH_DLG);
Modified: openoffice/branches/l10n40/main/svx/source/inc/AccessibleFrameSelector.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/inc/AccessibleFrameSelector.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/inc/AccessibleFrameSelector.hxx (original)
+++ openoffice/branches/l10n40/main/svx/source/inc/AccessibleFrameSelector.hxx Tue Nov 19 22:39:40 2013
@@ -108,16 +108,13 @@ public:
void Invalidate();
void NotifyFocusListeners(sal_Bool bGetFocus);
+ void NotifyAccessibleEvent( const sal_Int16 _nEventId, const ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Any& _rNewValue );
protected:
DECL_LINK( WindowEventListener, VclSimpleEvent* );
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
- void NotifyAccessibleEvent( const sal_Int16 _nEventId,
- const ::com::sun::star::uno::Any& _rOldValue,
- const ::com::sun::star::uno::Any& _rNewValue );
-
private:
void IsValid() throw (::com::sun::star::uno::RuntimeException);
Modified: openoffice/branches/l10n40/main/svx/source/inc/svxrectctaccessiblecontext.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/inc/svxrectctaccessiblecontext.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/inc/svxrectctaccessiblecontext.hxx (original)
+++ openoffice/branches/l10n40/main/svx/source/inc/svxrectctaccessiblecontext.hxx Tue Nov 19 22:39:40 2013
@@ -43,9 +43,14 @@
#include <vos/mutex.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/compbase6.hxx>
-//#ifndef _CPPUHELPER_COMPBASE7_HXX_
-//#include <cppuhelper/compbase7.hxx>
-//#endif
+//IAccessibility2 Implementation 2009-----
+#ifndef _CPPUHELPER_COMPBASE7_HXX_
+#include <cppuhelper/compbase7.hxx>
+#endif
+#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#endif
+//-----IAccessibility2 Implementation 2009
#include <comphelper/broadcasthelper.hxx>
#include <cppuhelper/implbase6.hxx>
#include <comphelper/servicehelper.hxx>
@@ -250,7 +255,10 @@ protected:
@param nIndexOfChild
Index of the new child which should be selected.
*/
- void selectChild( long nIndexOfChild );
+ // IAccessibility2 implementation 2009. ------
+ //void selectChild( long nIndexOfChild );
+ void selectChild( long nIndexOfChild, sal_Bool bFireFocus = sal_True);
+ // ------ IAccessibility2 implementation 2009.
public:
/** Selects a new child by point.
@@ -261,8 +269,13 @@ public:
@param eButton
Button which belongs to the child which should be selected.
*/
- void selectChild( RECT_POINT ePoint );
-
+ //void selectChild( RECT_POINT ePoint );
+ // IAccessibility2 implementation 2009. ------
+ void selectChild( RECT_POINT ePoint, sal_Bool bFireFocus = sal_True );
+ void FireChildFocus( RECT_POINT eButton );
+ //Solution: Add the event handling method
+ void FireAccessibleEvent (short nEventId, const ::com::sun::star::uno::Any& rOld, const ::com::sun::star::uno::Any& rNew);
+ // ------ IAccessibility2 implementation 2009.
/// Sets the name
void setName( const ::rtl::OUString& rName );
@@ -332,15 +345,17 @@ inline sal_Bool SvxRectCtlAccessibleCont
return rBHelper.bDisposed || rBHelper.bInDispose;
}
-
-typedef ::cppu::WeakAggComponentImplHelper6<
+//IAccessibility2 Implementation 2009-----
+typedef ::cppu::WeakAggComponentImplHelper7<
::com::sun::star::accessibility::XAccessible,
::com::sun::star::accessibility::XAccessibleComponent,
::com::sun::star::accessibility::XAccessibleContext,
::com::sun::star::accessibility::XAccessibleEventBroadcaster,
::com::sun::star::accessibility::XAccessibleValue,
+ ::com::sun::star::accessibility::XAccessibleAction,
::com::sun::star::lang::XServiceInfo >
SvxRectCtlChildAccessibleContext_Base;
+//-----IAccessibility2 Implementation 2009
class SvxRectCtlChildAccessibleContext : public SvxRectCtlChildAccessibleContext_Base
@@ -472,6 +487,13 @@ public:
virtual ::com::sun::star::uno::Any SAL_CALL
getMinimumValue() throw( ::com::sun::star::uno::RuntimeException );
+//IAccessibility2 Implementation 2009-----
+ // 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);
+//-----IAccessibility2 Implementation 2009
//===== XServiceInfo ====================================================
virtual ::rtl::OUString SAL_CALL
@@ -492,8 +514,11 @@ public:
//===== internal ==========================================================
/// Sets the checked status
- void setStateChecked( sal_Bool bChecked );
-
+ //void setStateChecked( sal_Bool bChecked );
+ // IAccessibility2 implementation 2009. ------
+ void setStateChecked( sal_Bool bChecked, sal_Bool bFireFocus = sal_True);
+ void FireFocusEvent();
+ // ------ IAccessibility2 implementation 2009.
protected:
virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
Modified: openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontact.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontact.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontact.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontact.cxx Tue Nov 19 22:39:40 2013
@@ -313,33 +313,40 @@ namespace sdr
}
}
- drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
- {
- // get the view-independent Primitive from the viewContact
- drawinglayer::primitive2d::Primitive2DSequence xRetval(GetViewContact().getViewIndependentPrimitive2DSequence());
-
- if(xRetval.hasElements())
- {
- // handle GluePoint
- if(!GetObjectContact().isOutputToPrinter() && GetObjectContact().AreGluePointsVisible())
- {
- const drawinglayer::primitive2d::Primitive2DSequence xGlue(GetViewContact().createGluePointPrimitive2DSequence());
+ drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
+ {
+ // get the view-independent Primitive from the viewContact
+ drawinglayer::primitive2d::Primitive2DSequence xRetval(GetViewContact().getViewIndependentPrimitive2DSequence());
+
+ if(xRetval.hasElements())
+ {
+ // handle GluePoint
+ if(!GetObjectContact().isOutputToPrinter() && GetObjectContact().AreGluePointsVisible())
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence xGlue(GetViewContact().createGluePointPrimitive2DSequence());
- if(xGlue.hasElements())
- {
+ if(xGlue.hasElements())
+ {
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xRetval, xGlue);
- }
- }
+ }
+ }
+
+ // handle ghosted
+ if(isPrimitiveGhosted(rDisplayInfo))
+ {
+ const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const basegfx::BColorModifierSharedPtr aBColorModifier(
+ new basegfx::BColorModifier_interpolate(
+ aRGBWhite,
+ 0.5));
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
+ xRetval,
+ aBColorModifier));
- // handle ghosted
- if(isPrimitiveGhosted(rDisplayInfo))
- {
- const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
- const basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, basegfx::BCOLORMODIFYMODE_INTERPOLATE);
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- }
- }
+ }
+ }
return xRetval;
}
Modified: openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3d.cxx Tue Nov 19 22:39:40 2013
@@ -50,23 +50,30 @@ namespace sdr
{
}
- drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const
- {
- // get the view-independent Primitive from the viewContact
- const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const ViewContactOfE3d& >(GetViewContact()));
- drawinglayer::primitive3d::Primitive3DSequence xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DSequence());
+ drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const
+ {
+ // get the view-independent Primitive from the viewContact
+ const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const ViewContactOfE3d& >(GetViewContact()));
+ drawinglayer::primitive3d::Primitive3DSequence xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DSequence());
+
+ // handle ghosted
+ if(isPrimitiveGhosted(rDisplayInfo))
+ {
+ const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const ::basegfx::BColorModifierSharedPtr aBColorModifier(
+ new basegfx::BColorModifier_interpolate(
+ aRGBWhite,
+ 0.5));
+ const drawinglayer::primitive3d::Primitive3DReference xReference(
+ new drawinglayer::primitive3d::ModifiedColorPrimitive3D(
+ xRetval,
+ aBColorModifier));
- // handle ghosted
- if(isPrimitiveGhosted(rDisplayInfo))
- {
- const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
- const ::basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, ::basegfx::BCOLORMODIFYMODE_INTERPOLATE);
- const drawinglayer::primitive3d::Primitive3DReference xReference(new drawinglayer::primitive3d::ModifiedColorPrimitive3D(xRetval, aBColorModifier));
xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1);
- }
+ }
- return xRetval;
- }
+ return xRetval;
+ }
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfE3d::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
Modified: openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx Tue Nov 19 22:39:40 2013
@@ -110,16 +110,22 @@ namespace sdr
}
}
- // handle ghosted
- if(isPrimitiveGhosted(rDisplayInfo))
- {
- const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
- const ::basegfx::BColorModifier aBColorModifier(aRGBWhite, 0.5, ::basegfx::BCOLORMODIFYMODE_INTERPOLATE);
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ModifiedColorPrimitive2D(xRetval, aBColorModifier));
+ // handle ghosted
+ if(isPrimitiveGhosted(rDisplayInfo))
+ {
+ const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0);
+ const ::basegfx::BColorModifierSharedPtr aBColorModifier(
+ new basegfx::BColorModifier_interpolate(
+ aRGBWhite,
+ 0.5));
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::ModifiedColorPrimitive2D(
+ xRetval,
+ aBColorModifier));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- }
- }
+ }
+ }
if(bIsActiveVC)
{
Modified: openoffice/branches/l10n40/main/svx/source/sidebar/nbdtmg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/sidebar/nbdtmg.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/sidebar/nbdtmg.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/sidebar/nbdtmg.cxx Tue Nov 19 22:39:40 2013
@@ -301,7 +301,7 @@ void NBOTypeMgrBase::StoreMapUnit_impl()
{
eCoreUnit = pSet->GetPool()->GetMetric(pSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
} else {
- //Sym3_2508 sd use different sid for numbering rule
+ //sd use different sid for numbering rule
eState = pSet->GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem);
if(eState == SFX_ITEM_SET)
{
Modified: openoffice/branches/l10n40/main/svx/source/svdraw/svdoashp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/svdraw/svdoashp.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/svdraw/svdoashp.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/svdraw/svdoashp.cxx Tue Nov 19 22:39:40 2013
@@ -3538,4 +3538,21 @@ void SdrObjCustomShape::InvalidateRender
mpLastShadowGeometry = 0L;
}
+//IAccessibility2 Implementation 2009-----
+::rtl::OUString SdrObjCustomShape::GetCustomShapeName()
+{
+ rtl::OUString sShapeName;
+ rtl::OUString aEngine( ( (SdrCustomShapeEngineItem&)( *this ).GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE ) ).GetValue() );
+ if ( !aEngine.getLength() || aEngine.equalsAscii( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) )
+ {
+ rtl::OUString sShapeType;
+ const rtl::OUString sType( RTL_CONSTASCII_USTRINGPARAM ( "Type" ) );
+ SdrCustomShapeGeometryItem& rGeometryItem( (SdrCustomShapeGeometryItem&)( *this ).GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
+ if ( pAny && ( *pAny >>= sShapeType ) )
+ sShapeName = EnhancedCustomShapeTypeNames::GetAccName( sShapeType );
+ }
+ return sShapeName;
+}
+//-----IAccessibility2 Implementation 2009
// eof
Modified: openoffice/branches/l10n40/main/svx/source/svdraw/svdobj.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/svdraw/svdobj.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/svdraw/svdobj.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/svdraw/svdobj.cxx Tue Nov 19 22:39:40 2013
@@ -3185,6 +3185,12 @@ bool SdrObject::HasText() const
return false;
}
+//IAccessibility2 Implementation 2009-----
+const SdrObject* SdrObject::GetCaptionObj() const
+{
+ return pCaptionObj;
+}
+//-----IAccessibility2 Implementation 2009
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// @@@@ @@@@@ @@@@@@ @@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@@ @@ @@
Modified: openoffice/branches/l10n40/main/svx/source/svdraw/svdoole2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/svdraw/svdoole2.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/svdraw/svdoole2.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/svdraw/svdoole2.cxx Tue Nov 19 22:39:40 2013
@@ -844,7 +844,19 @@ void SdrOle2Obj::Init()
}
// -----------------------------------------------------------------------------
+//IAccessibility2 Implementation 2009-----
+String SdrOle2Obj::GetStyleString()
+{
+ String strStyle;
+ if( xObjRef.is() && xObjRef.IsChart() )
+ {
+ strStyle = xObjRef.GetChartType();
+ }
+ return strStyle;
+}
+// -----------------------------------------------------------------------------
+//-----IAccessibility2 Implementation 2009
SdrOle2Obj::~SdrOle2Obj()
{
DBG_DTOR( SdrOle2Obj,NULL);
Modified: openoffice/branches/l10n40/main/svx/source/table/accessiblecell.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/table/accessiblecell.cxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/table/accessiblecell.cxx (original)
+++ openoffice/branches/l10n40/main/svx/source/table/accessiblecell.cxx Tue Nov 19 22:39:40 2013
@@ -60,6 +60,8 @@ AccessibleCell::AccessibleCell( const ::
, mpText( NULL )
, mxCell( rCell )
{
+ //Init the pAccTable var
+ pAccTable = dynamic_cast <AccessibleTableShape *> (rxParent.get());
}
// --------------------------------------------------------------------
@@ -242,7 +244,41 @@ Reference<XAccessibleStateSet> SAL_CALL
else
pStateSet->RemoveState (AccessibleStateType::FOCUSED);
}
-
+ // Set the invisible state for merged cell
+ if (mxCell.is() && mxCell->isMerged())
+ pStateSet->RemoveState(AccessibleStateType::VISIBLE);
+ else
+ pStateSet->AddState(AccessibleStateType::VISIBLE);
+
+
+ //IAccessibility2 Implementation 2009-----
+ //Solution:Just when the parent table is not read-only,set states EDITABLE,RESIZABLE,MOVEABLE
+ ::com::sun::star::uno::Reference<XAccessible> xTempAcc = getAccessibleParent();
+ if( xTempAcc.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleContext>
+ xTempAccContext = xTempAcc->getAccessibleContext();
+ if( xTempAccContext.is() )
+ {
+ ::com::sun::star::uno::Reference<XAccessibleStateSet> rState =
+ xTempAccContext->getAccessibleStateSet();
+ if( rState.is() ) {
+ com::sun::star::uno::Sequence<short> pStates = rState->getStates();
+ int count = pStates.getLength();
+ for( int iIndex = 0;iIndex < count;iIndex++ )
+ {
+ if( pStates[iIndex] == AccessibleStateType::EDITABLE )
+ {
+ pStateSet->AddState (AccessibleStateType::EDITABLE);
+ pStateSet->AddState (AccessibleStateType::RESIZABLE);
+ pStateSet->AddState (AccessibleStateType::MOVEABLE);
+ break;
+ }
+ }
+ }
+ }
+ }
+ //-----IAccessibility2 Implementation 2009
// Create a copy of the state set that may be modified by the
// caller without affecting the current state set.
xStateSet = Reference<XAccessibleStateSet>(new ::utl::AccessibleStateSetHelper (*pStateSet));
@@ -566,6 +602,75 @@ sal_Int32 SAL_CALL AccessibleCell::getAc
return mnIndexInParent;
}
+//IAccessibility2 Implementation 2009-----
+sdr::table::CellRef AccessibleCell::getCellRef()
+{
+ return mxCell;
+}
+::rtl::OUString AccessibleCell::getCellName( sal_Int32 nCol, sal_Int32 nRow )
+{
+ rtl::OUStringBuffer aBuf;
+
+ if (nCol < 26*26)
+ {
+ if (nCol < 26)
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol)));
+ else
+ {
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) / 26) - 1));
+ aBuf.append( static_cast<sal_Unicode>( 'A' +
+ (static_cast<sal_uInt16>(nCol) % 26)));
+ }
+ }
+ else
+ {
+ String aStr;
+ while (nCol >= 26)
+ {
+ sal_Int32 nC = nCol % 26;
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nC));
+ nCol = nCol - nC;
+ nCol = nCol / 26 - 1;
+ }
+ aStr += static_cast<sal_Unicode>( 'A' +
+ static_cast<sal_uInt16>(nCol));
+ aStr.Reverse();
+ aBuf.append( aStr);
+ }
+ aBuf.append( OUString::valueOf(nRow+1) );
+ return aBuf.makeStringAndClear();
+}
+::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
+{
+ ThrowIfDisposed ();
+ ::vos::OGuard aSolarGuard (::Application::GetSolarMutex());
+
+ if( pAccTable )
+ try
+ {
+ sal_Int32 nRow = 0, nCol = 0;
+ pAccTable->getColumnAndRow(mnIndexInParent, nCol, nRow);
+ return getCellName( nCol, nRow );
+ }
+ catch( Exception& )
+ {
+ }
+
+ return AccessibleCellBase::getAccessibleName();
+}
+void AccessibleCell::UpdateChildren()
+{
+ if (mpText)
+ mpText->UpdateChildren();
+}
+//-----IAccessibility2 Implementation 2009
+
+/* MT: Above getAccessibleName was introduced with IA2 CWS, while below was introduce in 3.3 meanwhile. Check which one is correct
+If this is correct, we also don't need sdr::table::CellRef getCellRef(), UpdateChildren(), getCellName( sal_Int32 nCol, sal_Int32 nRow ) above
+
::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException)
{
ThrowIfDisposed ();
@@ -576,5 +681,6 @@ sal_Int32 SAL_CALL AccessibleCell::getAc
return AccessibleCellBase::getAccessibleName();
}
+*/
} // end of namespace accessibility
Modified: openoffice/branches/l10n40/main/svx/source/table/accessiblecell.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/l10n40/main/svx/source/table/accessiblecell.hxx?rev=1543609&r1=1543608&r2=1543609&view=diff
==============================================================================
--- openoffice/branches/l10n40/main/svx/source/table/accessiblecell.hxx (original)
+++ openoffice/branches/l10n40/main/svx/source/table/accessiblecell.hxx Tue Nov 19 22:39:40 2013
@@ -43,6 +43,8 @@
#include <boost/noncopyable.hpp>
+#include <svx/AccessibleTableShape.hxx>
+
class SdrObject;
@@ -80,6 +82,9 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL getAccessibleStateSet(void) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(void) throw(::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException);
+ sdr::table::CellRef getCellRef();
+ void UpdateChildren();
+ ::rtl::OUString getCellName( sal_Int32 nCol, sal_Int32 nRow );
// XAccessibleComponent
virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint) throw (::com::sun::star::uno::RuntimeException);
@@ -119,6 +124,8 @@ public:
*/
inline void setIndexInParent(sal_Int32 _nIndex) { mnIndexInParent = _nIndex; }
+ //Get the parent table
+ AccessibleTableShape* GetParentTable() { return pAccTable; }
protected:
/// Bundle of information passed to all shapes in a document tree.
AccessibleShapeTreeInfo maShapeTreeInfo;
@@ -134,6 +141,8 @@ protected:
/// This method is called from the component helper base class while disposing.
virtual void SAL_CALL disposing (void);
+ AccessibleTableShape *pAccTable;
+
private:
explicit AccessibleCell(void); // not implemented
explicit AccessibleCell(const AccessibleCell&); // not implemented