1 Index: svtools/source/contnr/fileview.cxx
2 ===================================================================
3 --- svtools/source/contnr/fileview.cxx (revision 269278)
4 +++ svtools/source/contnr/fileview.cxx (revision 269279)
6 ::rtl::OUString sRet = SvHeaderTabListBox::GetAccessibleObjectDescription( _eType, _nPos );
7 if ( ::svt::BBTYPE_TABLECELL == _eType )
9 - sal_Int32 nRow = _nPos / GetColumnCount();
10 + sal_Int32 nRow = -1;
11 + const sal_uInt16 nColumnCount = GetColumnCount();
12 + if (nColumnCount > 0)
13 + nRow = _nPos / nColumnCount;
14 SvLBoxEntry* pEntry = GetEntry( nRow );
17 Index: svtools/source/contnr/svtabbx.cxx
18 ===================================================================
19 --- svtools/source/contnr/svtabbx.cxx (revision 269278)
20 +++ svtools/source/contnr/svtabbx.cxx (revision 269279)
21 @@ -1098,9 +1101,12 @@
24 sal_uInt16 nColumnCount = GetColumnCount();
25 - sal_Int32 nRow = _nPos / nColumnCount;
26 - sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
27 - aRetText = GetCellText( nRow, nColumn );
28 + if (nColumnCount > 0)
30 + sal_Int32 nRow = _nPos / nColumnCount;
31 + sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
32 + aRetText = GetCellText( nRow, nColumn );
37 @@ -1135,16 +1141,19 @@
38 static const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) );
40 sal_uInt16 nColumnCount = GetColumnCount();
41 - sal_Int32 nRow = _nPos / nColumnCount;
42 - sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
43 + if (nColumnCount > 0)
45 + sal_Int32 nRow = _nPos / nColumnCount;
46 + sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
48 - String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
49 - aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
50 - String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
51 - if ( sColHeader.Len() == 0 )
52 - sColHeader = String::CreateFromInt32( nColumn );
53 - aText.SearchAndReplace( sVar2, sColHeader );
55 + String aText( SvtResId( STR_SVT_ACC_DESC_TABLISTBOX ) );
56 + aText.SearchAndReplace( sVar1, String::CreateFromInt32( nRow ) );
57 + String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
58 + if ( sColHeader.Len() == 0 )
59 + sColHeader = String::CreateFromInt32( nColumn );
60 + aText.SearchAndReplace( sVar2, sColHeader );