CWS-TOOLING: integrate CWS mtaccfixes
This commit is contained in:
@@ -53,13 +53,12 @@ class VCLXAccessibleEdit : public VCLXAccessibleTextComponent,
|
|||||||
friend class VCLXAccessibleBox;
|
friend class VCLXAccessibleBox;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
sal_Int32 m_nSelectionStart;
|
||||||
sal_Int32 m_nCaretPosition;
|
sal_Int32 m_nCaretPosition;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~VCLXAccessibleEdit();
|
virtual ~VCLXAccessibleEdit();
|
||||||
|
|
||||||
void UpdateCaretPosition();
|
|
||||||
|
|
||||||
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
|
virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
|
||||||
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
|
virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
|
||||||
|
|
||||||
|
@@ -395,7 +395,7 @@ inline bool hasFloatingChild(Window *pWindow)
|
|||||||
else
|
else
|
||||||
xContext = new FloatingWindowAccessible( _pXWindow );
|
xContext = new FloatingWindowAccessible( _pXWindow );
|
||||||
}
|
}
|
||||||
else if ( nType == WINDOW_HELPTEXTWINDOW )
|
else if ( ( nType == WINDOW_HELPTEXTWINDOW ) || ( nType == WINDOW_FIXEDLINE ) )
|
||||||
{
|
{
|
||||||
xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleFixedText( _pXWindow );
|
xContext = (accessibility::XAccessibleContext*) new VCLXAccessibleFixedText( _pXWindow );
|
||||||
}
|
}
|
||||||
|
@@ -67,6 +67,7 @@ using namespace ::comphelper;
|
|||||||
VCLXAccessibleEdit::VCLXAccessibleEdit( VCLXWindow* pVCLWindow )
|
VCLXAccessibleEdit::VCLXAccessibleEdit( VCLXWindow* pVCLWindow )
|
||||||
:VCLXAccessibleTextComponent( pVCLWindow )
|
:VCLXAccessibleTextComponent( pVCLWindow )
|
||||||
{
|
{
|
||||||
|
m_nSelectionStart = getSelectionStart();
|
||||||
m_nCaretPosition = getCaretPosition();
|
m_nCaretPosition = getCaretPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,22 +79,6 @@ VCLXAccessibleEdit::~VCLXAccessibleEdit()
|
|||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
void VCLXAccessibleEdit::UpdateCaretPosition()
|
|
||||||
{
|
|
||||||
sal_Int32 nCaretPosition = getCaretPosition();
|
|
||||||
|
|
||||||
if ( m_nCaretPosition != nCaretPosition )
|
|
||||||
{
|
|
||||||
Any aOldValue, aNewValue;
|
|
||||||
aOldValue <<= (sal_Int32) m_nCaretPosition;
|
|
||||||
aNewValue <<= (sal_Int32) nCaretPosition;
|
|
||||||
m_nCaretPosition = nCaretPosition;
|
|
||||||
NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
|
||||||
{
|
{
|
||||||
switch ( rVclWindowEvent.GetId() )
|
switch ( rVclWindowEvent.GetId() )
|
||||||
@@ -105,11 +90,31 @@ void VCLXAccessibleEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEve
|
|||||||
break;
|
break;
|
||||||
case VCLEVENT_EDIT_SELECTIONCHANGED:
|
case VCLEVENT_EDIT_SELECTIONCHANGED:
|
||||||
{
|
{
|
||||||
|
sal_Int32 nOldCaretPosition = m_nCaretPosition;
|
||||||
|
sal_Int32 nOldSelectionStart = m_nSelectionStart;
|
||||||
|
|
||||||
|
m_nCaretPosition = getCaretPosition();
|
||||||
|
m_nSelectionStart = getSelectionStart();
|
||||||
|
|
||||||
Window* pWindow = GetWindow();
|
Window* pWindow = GetWindow();
|
||||||
if ( pWindow && pWindow->HasChildPathFocus() )
|
if ( pWindow && pWindow->HasChildPathFocus() )
|
||||||
{
|
{
|
||||||
NotifyAccessibleEvent( AccessibleEventId::TEXT_SELECTION_CHANGED, Any(), Any() );
|
if ( m_nCaretPosition != nOldCaretPosition )
|
||||||
UpdateCaretPosition();
|
{
|
||||||
|
Any aOldValue, aNewValue;
|
||||||
|
aOldValue <<= (sal_Int32) nOldCaretPosition;
|
||||||
|
aNewValue <<= (sal_Int32) m_nCaretPosition;
|
||||||
|
NotifyAccessibleEvent( AccessibleEventId::CARET_CHANGED, aOldValue, aNewValue );
|
||||||
|
}
|
||||||
|
|
||||||
|
// #i104470# VCL only has SELECTION_CHANGED, but UAA distinguishes between SELECTION_CHANGED and CARET_CHANGED
|
||||||
|
sal_Bool bHasSelection = ( m_nSelectionStart != m_nCaretPosition );
|
||||||
|
sal_Bool bHadSelection = ( nOldSelectionStart != nOldCaretPosition );
|
||||||
|
if ( ( bHasSelection != bHadSelection ) || ( bHasSelection && ( ( m_nCaretPosition != nOldCaretPosition ) || ( m_nSelectionStart != nOldSelectionStart ) ) ) )
|
||||||
|
{
|
||||||
|
NotifyAccessibleEvent( AccessibleEventId::TEXT_SELECTION_CHANGED, Any(), Any() );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -305,22 +310,13 @@ Reference< XAccessibleKeyBinding > VCLXAccessibleEdit::getAccessibleActionKeyBin
|
|||||||
|
|
||||||
sal_Int32 VCLXAccessibleEdit::getCaretPosition( ) throw (RuntimeException)
|
sal_Int32 VCLXAccessibleEdit::getCaretPosition( ) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
OExternalLockGuard aGuard( this );
|
return getSelectionEnd();
|
||||||
|
|
||||||
awt::Selection aSelection;
|
|
||||||
VCLXEdit* pVCLXEdit = static_cast< VCLXEdit* >( GetVCLXWindow() );
|
|
||||||
if ( pVCLXEdit )
|
|
||||||
aSelection = pVCLXEdit->getSelection();
|
|
||||||
|
|
||||||
return aSelection.Max;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
sal_Bool VCLXAccessibleEdit::setCaretPosition( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
sal_Bool VCLXAccessibleEdit::setCaretPosition( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException)
|
||||||
{
|
{
|
||||||
OExternalLockGuard aGuard( this );
|
|
||||||
|
|
||||||
return setSelection( nIndex, nIndex );
|
return setSelection( nIndex, nIndex );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,6 +67,7 @@ class SvxGeneralTabPage : public SfxTabPage
|
|||||||
{
|
{
|
||||||
using TabPage::DeactivatePage;
|
using TabPage::DeactivatePage;
|
||||||
private:
|
private:
|
||||||
|
FixedLine aAddrFrm;
|
||||||
FixedText aCompanyLbl;
|
FixedText aCompanyLbl;
|
||||||
SvxUserEdit aCompanyEdit;
|
SvxUserEdit aCompanyEdit;
|
||||||
FixedText aNameLbl;
|
FixedText aNameLbl;
|
||||||
@@ -97,12 +98,10 @@ private:
|
|||||||
FixedText aFaxMailLbl;
|
FixedText aFaxMailLbl;
|
||||||
SvxUserEdit aFaxEdit;
|
SvxUserEdit aFaxEdit;
|
||||||
SvxUserEdit aEmailEdit;
|
SvxUserEdit aEmailEdit;
|
||||||
FixedLine aAddrFrm;
|
|
||||||
CheckBox aUseDataCB;
|
CheckBox aUseDataCB;
|
||||||
|
|
||||||
GeneralTabPage_Impl* pImpl;
|
GeneralTabPage_Impl* pImpl;
|
||||||
|
|
||||||
|
|
||||||
#ifdef _SVX_OPTGENRL_CXX
|
#ifdef _SVX_OPTGENRL_CXX
|
||||||
DECL_LINK( ModifyHdl_Impl, Edit * );
|
DECL_LINK( ModifyHdl_Impl, Edit * );
|
||||||
|
|
||||||
|
@@ -51,13 +51,13 @@ namespace svx
|
|||||||
class DbRegistrationOptionsPage : public SfxTabPage
|
class DbRegistrationOptionsPage : public SfxTabPage
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
FixedLine aStdBox;
|
||||||
FixedText aTypeText;
|
FixedText aTypeText;
|
||||||
FixedText aPathText;
|
FixedText aPathText;
|
||||||
SvxControlFocusHelper aPathCtrl;
|
SvxControlFocusHelper aPathCtrl;
|
||||||
PushButton m_aNew;
|
PushButton m_aNew;
|
||||||
PushButton m_aEdit;
|
PushButton m_aEdit;
|
||||||
PushButton m_aDelete;
|
PushButton m_aDelete;
|
||||||
FixedLine aStdBox;
|
|
||||||
|
|
||||||
HeaderBar* pHeaderBar;
|
HeaderBar* pHeaderBar;
|
||||||
::svx::OptHeaderTabListBox* pPathBox;
|
::svx::OptHeaderTabListBox* pPathBox;
|
||||||
@@ -65,7 +65,6 @@ namespace svx
|
|||||||
ULONG m_nOldCount;
|
ULONG m_nOldCount;
|
||||||
BOOL m_bModified;
|
BOOL m_bModified;
|
||||||
|
|
||||||
|
|
||||||
#ifdef SVX_DBREGISTER_HXX
|
#ifdef SVX_DBREGISTER_HXX
|
||||||
DECL_LINK( NewHdl, void * );
|
DECL_LINK( NewHdl, void * );
|
||||||
DECL_LINK( EditHdl, void * );
|
DECL_LINK( EditHdl, void * );
|
||||||
|
@@ -68,12 +68,12 @@ class SvxPathTabPage;
|
|||||||
class SvxPathTabPage : public SfxTabPage
|
class SvxPathTabPage : public SfxTabPage
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
FixedLine aStdBox;
|
||||||
FixedText aTypeText;
|
FixedText aTypeText;
|
||||||
FixedText aPathText;
|
FixedText aPathText;
|
||||||
SvxControlFocusHelper aPathCtrl;
|
SvxControlFocusHelper aPathCtrl;
|
||||||
PushButton aStandardBtn;
|
PushButton aStandardBtn;
|
||||||
PushButton aPathBtn;
|
PushButton aPathBtn;
|
||||||
FixedLine aStdBox;
|
|
||||||
|
|
||||||
HeaderBar* pHeaderBar;
|
HeaderBar* pHeaderBar;
|
||||||
::svx::OptHeaderTabListBox* pPathBox;
|
::svx::OptHeaderTabListBox* pPathBox;
|
||||||
|
@@ -118,13 +118,13 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( Window* pParent, const Sfx
|
|||||||
|
|
||||||
SfxTabPage( pParent, CUI_RES( RID_SFXPAGE_DBREGISTER), rSet ),
|
SfxTabPage( pParent, CUI_RES( RID_SFXPAGE_DBREGISTER), rSet ),
|
||||||
|
|
||||||
|
aStdBox ( this, CUI_RES( GB_STD ) ),
|
||||||
aTypeText ( this, CUI_RES( FT_TYPE ) ),
|
aTypeText ( this, CUI_RES( FT_TYPE ) ),
|
||||||
aPathText ( this, CUI_RES( FT_PATH ) ),
|
aPathText ( this, CUI_RES( FT_PATH ) ),
|
||||||
aPathCtrl ( this, CUI_RES( LB_PATH ) ),
|
aPathCtrl ( this, CUI_RES( LB_PATH ) ),
|
||||||
m_aNew ( this, CUI_RES( BTN_NEW ) ),
|
m_aNew ( this, CUI_RES( BTN_NEW ) ),
|
||||||
m_aEdit ( this, CUI_RES( BTN_EDIT ) ),
|
m_aEdit ( this, CUI_RES( BTN_EDIT ) ),
|
||||||
m_aDelete ( this, CUI_RES( BTN_DELETE ) ),
|
m_aDelete ( this, CUI_RES( BTN_DELETE ) ),
|
||||||
aStdBox ( this, CUI_RES( GB_STD ) ),
|
|
||||||
pHeaderBar ( NULL ),
|
pHeaderBar ( NULL ),
|
||||||
pPathBox ( NULL ),
|
pPathBox ( NULL ),
|
||||||
m_pCurEntry ( NULL ),
|
m_pCurEntry ( NULL ),
|
||||||
|
@@ -94,6 +94,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
|
|||||||
|
|
||||||
SfxTabPage( pParent, CUI_RES(RID_SFXPAGE_GENERAL), rCoreSet ),
|
SfxTabPage( pParent, CUI_RES(RID_SFXPAGE_GENERAL), rCoreSet ),
|
||||||
|
|
||||||
|
aAddrFrm ( this, CUI_RES( GB_ADDRESS ) ),
|
||||||
aCompanyLbl ( this, CUI_RES( FT_COMPANY ), true ),
|
aCompanyLbl ( this, CUI_RES( FT_COMPANY ), true ),
|
||||||
aCompanyEdit ( this, CUI_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ),
|
aCompanyEdit ( this, CUI_RES( ED_COMPANY ), INDEX_NOTSET, &aCompanyLbl ),
|
||||||
aNameLbl ( this, CUI_RES( FT_NAME ), true ),
|
aNameLbl ( this, CUI_RES( FT_NAME ), true ),
|
||||||
@@ -124,9 +125,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe
|
|||||||
aFaxMailLbl ( this, CUI_RES( FT_FAXMAIL ), true ),
|
aFaxMailLbl ( this, CUI_RES( FT_FAXMAIL ), true ),
|
||||||
aFaxEdit ( this, CUI_RES( ED_FAX ), 0, &aFaxMailLbl ),
|
aFaxEdit ( this, CUI_RES( ED_FAX ), 0, &aFaxMailLbl ),
|
||||||
aEmailEdit ( this, CUI_RES( ED_EMAIL ), 1, &aFaxMailLbl ),
|
aEmailEdit ( this, CUI_RES( ED_EMAIL ), 1, &aFaxMailLbl ),
|
||||||
aAddrFrm ( this, CUI_RES( GB_ADDRESS ) ),
|
|
||||||
aUseDataCB ( this, CUI_RES( CB_USEDATA ) ),
|
aUseDataCB ( this, CUI_RES( CB_USEDATA ) ),
|
||||||
|
|
||||||
pImpl ( new GeneralTabPage_Impl )
|
pImpl ( new GeneralTabPage_Impl )
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -217,13 +217,12 @@ SvxPathTabPage::SvxPathTabPage( Window* pParent, const SfxItemSet& rSet ) :
|
|||||||
|
|
||||||
SfxTabPage( pParent, CUI_RES( RID_SFXPAGE_PATH ), rSet ),
|
SfxTabPage( pParent, CUI_RES( RID_SFXPAGE_PATH ), rSet ),
|
||||||
|
|
||||||
|
aStdBox ( this, CUI_RES( GB_STD ) ),
|
||||||
aTypeText ( this, CUI_RES( FT_TYPE ) ),
|
aTypeText ( this, CUI_RES( FT_TYPE ) ),
|
||||||
aPathText ( this, CUI_RES( FT_PATH ) ),
|
aPathText ( this, CUI_RES( FT_PATH ) ),
|
||||||
aPathCtrl ( this, CUI_RES( LB_PATH ) ),
|
aPathCtrl ( this, CUI_RES( LB_PATH ) ),
|
||||||
aStandardBtn ( this, CUI_RES( BTN_STANDARD ) ),
|
aStandardBtn ( this, CUI_RES( BTN_STANDARD ) ),
|
||||||
aPathBtn ( this, CUI_RES( BTN_PATH ) ),
|
aPathBtn ( this, CUI_RES( BTN_PATH ) ),
|
||||||
aStdBox ( this, CUI_RES( GB_STD ) ),
|
|
||||||
|
|
||||||
pHeaderBar ( NULL ),
|
pHeaderBar ( NULL ),
|
||||||
pPathBox ( NULL ),
|
pPathBox ( NULL ),
|
||||||
pImpl ( new OptPath_Impl( CUI_RES(IMG_LOCK), CUI_RES(IMG_LOCK_HC) ) ),
|
pImpl ( new OptPath_Impl( CUI_RES(IMG_LOCK), CUI_RES(IMG_LOCK_HC) ) ),
|
||||||
|
Reference in New Issue
Block a user