Kaydet (Commit) cba0dad4 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

calc input line: Fix crash with accessibility enabled.

Change-Id: I4508ec866b7e8436e1a8117ac6496ed0f1537abf
üst a4242df3
...@@ -118,7 +118,7 @@ ScTextWndBase::ScTextWndBase( Window* pParent, WinBits nStyle ) ...@@ -118,7 +118,7 @@ ScTextWndBase::ScTextWndBase( Window* pParent, WinBits nStyle )
{ {
if ( IsNativeControlSupported( CTRL_EDITBOX, PART_ENTIRE_CONTROL ) ) if ( IsNativeControlSupported( CTRL_EDITBOX, PART_ENTIRE_CONTROL ) )
{ {
SetType( WINDOW_EDIT ); SetType( WINDOW_CALCINPUTLINE );
SetBorderStyle( WINDOW_BORDER_NWF ); SetBorderStyle( WINDOW_BORDER_NWF );
} }
} }
......
...@@ -118,7 +118,8 @@ typedef sal_uInt16 WindowType; ...@@ -118,7 +118,8 @@ typedef sal_uInt16 WindowType;
#define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x4f) #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x4f)
#define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x50) #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x50)
#define WINDOW_RULER (WINDOW_FIRST + 0x51) #define WINDOW_RULER (WINDOW_FIRST + 0x51)
#define WINDOW_LAST (WINDOW_RULER) #define WINDOW_CALCINPUTLINE (WINDOW_FIRST + 0x52)
#define WINDOW_LAST (WINDOW_CALCINPUTLINE)
// --------------- // ---------------
......
...@@ -1138,6 +1138,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei ...@@ -1138,6 +1138,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
case WINDOW_LONGCURRENCYFIELD: case WINDOW_LONGCURRENCYFIELD:
case WINDOW_NUMERICFIELD: case WINDOW_NUMERICFIELD:
case WINDOW_SPINFIELD: case WINDOW_SPINFIELD:
case WINDOW_CALCINPUTLINE:
mbNWFBorder = true; mbNWFBorder = true;
aCtrlType = (pCtrl->GetStyle() & WB_SPIN) ? CTRL_SPINBOX : CTRL_EDITBOX; aCtrlType = (pCtrl->GetStyle() & WB_SPIN) ? CTRL_SPINBOX : CTRL_EDITBOX;
break; break;
...@@ -1271,6 +1272,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* ...@@ -1271,6 +1272,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice*
case WINDOW_LONGCURRENCYFIELD: case WINDOW_LONGCURRENCYFIELD:
case WINDOW_NUMERICFIELD: case WINDOW_NUMERICFIELD:
case WINDOW_SPINFIELD: case WINDOW_SPINFIELD:
case WINDOW_CALCINPUTLINE:
if( pCtrl->GetStyle() & WB_SPIN ) if( pCtrl->GetStyle() & WB_SPIN )
aCtrlType = CTRL_SPINBOX; aCtrlType = CTRL_SPINBOX;
else else
......
...@@ -8734,6 +8734,7 @@ sal_uInt16 Window::GetAccessibleRole() const ...@@ -8734,6 +8734,7 @@ sal_uInt16 Window::GetAccessibleRole() const
case WINDOW_METRICFIELD: case WINDOW_METRICFIELD:
case WINDOW_CURRENCYFIELD: case WINDOW_CURRENCYFIELD:
case WINDOW_LONGCURRENCYFIELD: case WINDOW_LONGCURRENCYFIELD:
case WINDOW_CALCINPUTLINE:
case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break; case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
case WINDOW_PATTERNBOX: case WINDOW_PATTERNBOX:
...@@ -8837,6 +8838,7 @@ String Window::GetAccessibleName() const ...@@ -8837,6 +8838,7 @@ String Window::GetAccessibleName() const
case WINDOW_METRICFIELD: case WINDOW_METRICFIELD:
case WINDOW_CURRENCYFIELD: case WINDOW_CURRENCYFIELD:
case WINDOW_LONGCURRENCYFIELD: case WINDOW_LONGCURRENCYFIELD:
case WINDOW_CALCINPUTLINE:
case WINDOW_EDIT: case WINDOW_EDIT:
case WINDOW_DATEBOX: case WINDOW_DATEBOX:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment