summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-12-11 17:58:12 +0100
committerRadek Doulik <rodo@novell.com>2012-12-11 18:05:09 +0100
commit2b4455b03c8bed08bb0a6463794197c912d9f78a (patch)
treef07f0bc5bd7e3f33cb0a7d2097c21def566a74d3 /oox
parent66866497b8ca632500a565ccc0e5c23c4acbe748 (diff)
Revert "for lnRef idx 0 is valid index into style matrix"
This reverts commit 1c0af12bf1bc378e3e0c87be9840f41e89783f22. turned out that the standard is most probably missing explanation and that the valid zero index means no line stroke
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 f862ea32afd9..46f3dbc19fb3 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, sal_Int32 nLowerLimit = 1 )
+const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex )
{
- return (rVector.empty() || (nIndex < nLowerLimit)) ? 0 :
- rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - nLowerLimit ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get();
+ return (rVector.empty() || (nIndex < 1)) ? 0 :
+ rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - 1 ), 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, 0 );
+ return lclGetStyleElement( maLineStyleList, nIndex );
}
const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const