summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/XMLStylesExportHelper.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-01-31 17:36:45 +0000
committerKurt Zenker <kz@openoffice.org>2006-01-31 17:36:45 +0000
commit73be6e6876418a98c299e6a38b0302e0abddcf2e (patch)
tree76dd3d640edec85d0a2008455549471f81da5e71 /sc/source/filter/xml/XMLStylesExportHelper.cxx
parent3e9f7cf8d86895f11800a2f39fe44a594e9cd92f (diff)
INTEGRATION: CWS dr44 (1.44.86); FILE MERGED
2006/01/06 19:03:59 nn 1.44.86.1: #123981# set last column/row for detective operations, assert valid last row
Diffstat (limited to 'sc/source/filter/xml/XMLStylesExportHelper.cxx')
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 37635c3b7883..f92e2179e9ca 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: XMLStylesExportHelper.cxx,v $
*
- * $Revision: 1.44 $
+ * $Revision: 1.45 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 19:56:53 $
+ * last change: $Author: kz $ $Date: 2006-01-31 18:36:45 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1156,6 +1156,13 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const rtl::OUString& rStrin
rtl::OUString* ScColumnRowStylesBase::GetStyleNameByIndex(const sal_Int32 nIndex)
{
+ if ( nIndex < 0 || nIndex >= aStyleNames.size() )
+ {
+ // #123981# should no longer happen, use first style then
+ DBG_ERRORFILE("GetStyleNameByIndex: invalid index");
+ return aStyleNames[0];
+ }
+
return aStyleNames[nIndex];
}