summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xecontent.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-10 05:36:22 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-10 06:49:18 +0200
commite7ff934f128b34ce2cdf636f9117615ae5a26fb0 (patch)
treef4282592f077fe13d8568e27d90f603426e41755 /sc/source/filter/excel/xecontent.cxx
parentc20486fbffaa2d5ff20dad668c0f28b2c5f20e39 (diff)
rename autoMin and autoMax to Automatic, disable it for color scales
Change-Id: I1f92acfc5603d965b1bc84e7968da56901385eac
Diffstat (limited to 'sc/source/filter/excel/xecontent.cxx')
-rw-r--r--sc/source/filter/excel/xecontent.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index c6bffc3b8f42..c73155be6518 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -885,17 +885,18 @@ void XclExpCF::SaveXml( XclExpXmlStream& rStrm )
mxImpl->SaveXml( rStrm );
}
-XclExpCfvo::XclExpCfvo(const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rAddr):
+XclExpCfvo::XclExpCfvo(const XclExpRoot& rRoot, const ScColorScaleEntry& rEntry, const ScAddress& rAddr, bool bFirst):
XclExpRecord(),
XclExpRoot( rRoot ),
mrEntry(rEntry),
- maSrcPos(rAddr)
+ maSrcPos(rAddr),
+ mbFirst(bFirst)
{
}
namespace {
-rtl::OString getColorScaleType( const ScColorScaleEntry& rEntry )
+rtl::OString getColorScaleType( const ScColorScaleEntry& rEntry, bool bFirst )
{
switch(rEntry.GetType())
{
@@ -907,10 +908,11 @@ rtl::OString getColorScaleType( const ScColorScaleEntry& rEntry )
return "percent";
case COLORSCALE_FORMULA:
return "formula";
- case COLORSCALE_AUTOMIN:
- return "min";
- case COLORSCALE_AUTOMAX:
- return "max";
+ case COLORSCALE_AUTO:
+ if(bFirst)
+ return "min";
+ else
+ return "max";
case COLORSCALE_PERCENTILE:
return "percentile";
default:
@@ -938,7 +940,7 @@ void XclExpCfvo::SaveXml( XclExpXmlStream& rStrm )
}
rWorksheet->startElement( XML_cfvo,
- XML_type, getColorScaleType(mrEntry).getStr(),
+ XML_type, getColorScaleType(mrEntry, mbFirst).getStr(),
XML_val, aValue.getStr(),
FSEND );
@@ -1115,8 +1117,8 @@ XclExpDataBar::XclExpDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rF
const ScRange* pRange = rFormat.GetRange().front();
ScAddress aAddr = pRange->aStart;
// exact position is not important, we allow only absolute refs
- mpCfvoLowerLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpLowerLimit.get(), aAddr ) );
- mpCfvoUpperLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpUpperLimit.get(), aAddr ) );
+ mpCfvoLowerLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpLowerLimit.get(), aAddr, true ) );
+ mpCfvoUpperLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpUpperLimit.get(), aAddr, false ) );
mpCol.reset( new XclExpColScaleCol( GetRoot(), mrFormat.GetDataBarData()->maPositiveColor ) );
if(xExtLst.get())