summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index b9986f338e48..bdf1e853a51d 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2600,7 +2600,7 @@ sal_uInt16 XclExpXFBuffer::GetXFIndex( sal_uInt32 nXFId ) const
sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const
{
OSL_ENSURE( nXFIndex < maStyleIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
- if( nXFIndex > maStyleIndexes.size() )
+ if( nXFIndex >= maStyleIndexes.size() )
return 0; // should be caught/debugged via above assert; return "valid" index.
return maStyleIndexes[ nXFIndex ];
}
@@ -2608,7 +2608,7 @@ sal_Int32 XclExpXFBuffer::GetXmlStyleIndex( sal_uInt32 nXFIndex ) const
sal_Int32 XclExpXFBuffer::GetXmlCellIndex( sal_uInt32 nXFIndex ) const
{
OSL_ENSURE( nXFIndex < maCellIndexes.size(), "XclExpXFBuffer::GetXmlStyleIndex - invalid index!" );
- if( nXFIndex > maCellIndexes.size() )
+ if( nXFIndex >= maCellIndexes.size() )
return 0; // should be caught/debugged via above assert; return "valid" index.
return maCellIndexes[ nXFIndex ];
}