summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-09 22:56:23 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-09-09 23:08:43 +0200
commite2723d00b77dc1044e2ba599ba93517af34e1ea5 (patch)
tree771b006f4192112e312655c1e030218d15f3e04e /oox
parent2ce8b2c37aaebacdce250d6758d93ce7f9a992f0 (diff)
Better place to initialize mnThemedIdx
To make 'if (rBackgroundFillStyle.mnThemedIdx != 0)' actually work as intended. Avoids invalid call to pTheme->getFillStyle() which is not supposed to return 0 here. Change-Id: I323e2628cba64167240e8f0b945e6693b47b8e77
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/table/tablebackgroundstylecontext.cxx1
-rw-r--r--oox/source/drawingml/table/tablecell.cxx9
2 files changed, 2 insertions, 8 deletions
diff --git a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
index 4e4cf3cd1091..a91da191476a 100644
--- a/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
+++ b/oox/source/drawingml/table/tablebackgroundstylecontext.cxx
@@ -34,7 +34,6 @@ TableBackgroundStyleContext::TableBackgroundStyleContext( ContextHandler2Helper&
: ContextHandler2( rParent )
, mrTableStyle( rTableStyle )
{
- mrTableStyle.getBackgroundFillStyleRef().mnThemedIdx = 0;
}
TableBackgroundStyleContext::~TableBackgroundStyleContext()
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index dfca83305924..817caba51882 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -362,13 +362,8 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo
{
if (const Theme* pTheme = rFilterBase.getCurrentTheme())
{
- FillProperties const*const pStyle(
- pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx));
- if (pStyle)
- {
- aBgColor = pStyle->getBestSolidColor();
- nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
- }
+ aBgColor = pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx)->getBestSolidColor();
+ nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
}
}
if (aBgColor.isUsed())