summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-20 22:25:40 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-05-20 22:26:31 +0200
commitf6442313dc0aea603d3d5adca39614428a4bc854 (patch)
tree81a8a8d3dd615b70ecf3b0914e1fd54341503fea
parent4f8af4aeacb34e3a99f49aeec66c3ada07d8a027 (diff)
more on correct import of data bars from Excel2010
http://msdn.microsoft.com/en-us/library/documentformat.openxml.office2010.excel.databar.aspx Change-Id: I6d76cd888b723718e5a2beedfb5223fb6c0d0ba2
-rw-r--r--oox/source/token/tokens.txt1
-rw-r--r--sc/source/filter/oox/extlstcontext.cxx17
2 files changed, 10 insertions, 8 deletions
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 4c84cb0cc2be..5bbaa625f665 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -3423,6 +3423,7 @@ ndxf
neCell
negativeInteger
negativeFillColor
+negativeBarColorSameAsPositive
neq
never
new
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx
index 4b7a79f576ba..02113ea61432 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -67,14 +67,15 @@ void ExtCfRuleContext::importDataBar( const AttributeList& rAttribs )
ScDataBarFormatData* pDataBar = static_cast<ScDataBarFormatData*>(mpTarget);
pDataBar->mbGradient = rAttribs.getBool( XML_gradient, true );
- if(rAttribs.hasAttribute(XML_axisPosition))
- {
- rtl::OUString aAxisPosition = rAttribs.getString( XML_axisPosition, rtl::OUString() );
- if( aAxisPosition == "none" )
- {
- pDataBar->mbSameDirection = true;
- }
- }
+ rtl::OUString aAxisPosition = rAttribs.getString( XML_axisPosition, "automatic" );
+ if( aAxisPosition == "none" )
+ pDataBar->mbSameDirection = true;
+ else if( aAxisPosition == "middle" )
+ pDataBar->mbSameDirection = false;
+ else
+ pDataBar->mbSameDirection = false;
+
+ pDataBar->mbNeg = !rAttribs.getBool( XML_negativeBarColorSameAsPositive, false );
}
namespace {