summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-12-10 16:07:43 +0100
committerRadek Doulik <rodo@novell.com>2012-12-10 16:09:40 +0100
commit1c0af12bf1bc378e3e0c87be9840f41e89783f22 (patch)
tree8c68e02a143079ab18fa162c1edf4fef22d85e2f /oox
parentcee6d978a17b3f820f6c7c578a5a57785a10f8f8 (diff)
for lnRef idx 0 is valid index into style matrix
Change-Id: Idfcaa2539056fdd3712eda4fff1ec2b7cdb3ed30
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/theme.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
index 46f3dbc19fb3..f862ea32afd9 100644
--- a/oox/source/drawingml/theme.cxx
+++ b/oox/source/drawingml/theme.cxx
@@ -46,10 +46,10 @@ Theme::~Theme()
namespace {
template< typename Type >
-const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex )
+const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex, sal_Int32 nLowerLimit = 1 )
{
- return (rVector.empty() || (nIndex < 1)) ? 0 :
- rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - 1 ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get();
+ return (rVector.empty() || (nIndex < nLowerLimit)) ? 0 :
+ rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - nLowerLimit ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get();
}
} // namespace
@@ -63,7 +63,7 @@ const FillProperties* Theme::getFillStyle( sal_Int32 nIndex ) const
const LineProperties* Theme::getLineStyle( sal_Int32 nIndex ) const
{
- return lclGetStyleElement( maLineStyleList, nIndex );
+ return lclGetStyleElement( maLineStyleList, nIndex, 0 );
}
const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const