[Libreoffice-commits] core.git: 2 commits - include/svl include/toolkit svl/source toolkit/source
Steve Yin
steve_y at apache.org
Tue Nov 26 03:42:22 PST 2013
include/svl/smplhint.hxx | 6 +--
include/toolkit/awt/vclxwindows.hxx | 4 ++
svl/source/notify/smplhint.cxx | 10 ------
toolkit/source/awt/vclxaccessiblecomponent.cxx | 39 ++++++++++++++++++++++++-
toolkit/source/awt/vclxwindows.cxx | 22 ++++++++++++++
5 files changed, 67 insertions(+), 14 deletions(-)
New commits:
commit 968a76817340cafaeb239b71164974e3c0c43f04
Author: Steve Yin <steve_y at apache.org>
Date: Tue Nov 26 10:51:41 2013 +0000
Integrate branch of IAccessible2
Change-Id: I95b681a7aa171c321a876e6a38392e30583d7a5b
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index 74b6482..641383d 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -961,6 +961,8 @@ public:
class TOOLKIT_DLLPUBLIC VCLXDateField : public ::com::sun::star::awt::XDateField,
public VCLXFormattedSpinField
{
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
public:
VCLXDateField();
~VCLXDateField();
@@ -1007,6 +1009,8 @@ public:
class VCLXTimeField : public ::com::sun::star::awt::XTimeField,
public VCLXFormattedSpinField
{
+protected:
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext();
public:
VCLXTimeField();
~VCLXTimeField();
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index e1be4c1..c087b14 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -31,6 +31,7 @@
#include <vcl/dialog.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/window.hxx>
+#include <vcl/edit.hxx>
#include <tools/debug.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <unotools/accessiblerelationsethelper.hxx>
@@ -436,13 +437,46 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel
if ( pWindow->GetStyle() & WB_SIZEABLE )
rStateSet.AddState( accessibility::AccessibleStateType::RESIZABLE );
-
+ // 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 );
if( pWindow->IsDialog() )
{
Dialog *pDlg = static_cast< Dialog* >( pWindow );
if( pDlg->IsInExecute() )
rStateSet.AddState( accessibility::AccessibleStateType::MODAL );
}
+ //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 );
+ }
}
else
{
@@ -767,6 +801,9 @@ sal_Int32 SAL_CALL VCLXAccessibleComponent::getForeground( ) throw (uno::Runtim
else
aFont = pWindow->GetFont();
nColor = aFont.GetColor().GetColor();
+ // COL_AUTO is not very meaningful for AT
+ if ( nColor == (sal_Int32)COL_AUTO)
+ nColor = pWindow->GetTextColor().GetColor();
}
}
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 84e0f66..e7a2e84 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -4798,6 +4798,17 @@ VCLXDateField::~VCLXDateField()
{
}
+//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 );
+}
+
// ::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)
{
@@ -5135,6 +5146,17 @@ VCLXTimeField::~VCLXTimeField()
{
}
+//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 );
+}
+
// ::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)
{
commit 22029c7e17b4cb48acb058d47ec9c3b6b8b6b294
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Nov 26 09:00:15 2013 +0000
Resolves: #i123753# WaE: fix unoedhlp.hxx declaration of 'nId'...
shadowing a member of SimpleHint
Happy new times: Now even simple compiler warning fixes need their own issue.
(cherry picked from commit 5cd09cc74da93da4c91c665822b6ab9a0d704a7a)
Conflicts:
svl/inc/svl/smplhint.hxx
svl/source/notify/smplhint.cxx
Change-Id: I445126425a22778cf7aaf33d3a34977903e59f84
diff --git a/include/svl/smplhint.hxx b/include/svl/smplhint.hxx
index 8488837..32e749e 100644
--- a/include/svl/smplhint.hxx
+++ b/include/svl/smplhint.hxx
@@ -60,11 +60,11 @@
class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
{
private:
- sal_uLong nId;
+ sal_uLong mnId;
public:
TYPEINFO();
- SfxSimpleHint( sal_uLong nId );
- sal_uLong GetId() const { return nId; }
+ SfxSimpleHint( sal_uLong nId ) { mnId = nId; }
+ sal_uLong GetId() const { return mnId; }
};
//--------------------------------------------------------------------
diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx
index a30e900..b851734 100644
--- a/svl/source/notify/smplhint.cxx
+++ b/svl/source/notify/smplhint.cxx
@@ -17,18 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svl/smplhint.hxx>
-
TYPEINIT1(SfxSimpleHint, SfxHint);
-// creates a SimpleHint with the type nId
-
-SfxSimpleHint::SfxSimpleHint( sal_uLong nIdP )
-{
- nId = nIdP;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list