[Libreoffice-commits] .: Branch 'distro/suse/suse-3.6' - oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 10 07:10:37 PST 2012
oox/source/drawingml/theme.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 1c0af12bf1bc378e3e0c87be9840f41e89783f22
Author: Radek Doulik <rodo at novell.com>
Date: Mon Dec 10 16:07:43 2012 +0100
for lnRef idx 0 is valid index into style matrix
Change-Id: Idfcaa2539056fdd3712eda4fff1ec2b7cdb3ed30
diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx
index 46f3dbc..f862ea3 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
More information about the Libreoffice-commits
mailing list