diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-05 01:20:06 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-11-05 01:26:26 +0100 |
commit | 0f96fa7b59c48f5f00d5987265a7a73091472b24 (patch) | |
tree | 76e7f94532d0ad6448acab2ddb65ae1b13c2db33 /sc | |
parent | c412b2196343bdd13f4ab59314805a3b92b32071 (diff) |
implement new cond format import from odf
Change-Id: Ib1d80a25c29c1172d8d453d6f6b17ec081c8fef1
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlcondformat.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index 806cb871c524..788d5b3bb302 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -433,6 +433,38 @@ void GetConditionData(const rtl::OUString& rValue, ScConditionMode& eMode, rtl:: rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); eMode = SC_COND_DIRECT; } + else if(rValue.indexOf("top-elements") == 0) + { + const sal_Unicode* pStr = rValue.getStr(); + const sal_Unicode* pStart = pStr + 13; + const sal_Unicode* pEnd = pStr + rValue.getLength(); + rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); + eMode = SC_COND_TOP10; + } + else if(rValue.indexOf("bottom-elements") == 0) + { + const sal_Unicode* pStr = rValue.getStr(); + const sal_Unicode* pStart = pStr + 16; + const sal_Unicode* pEnd = pStr + rValue.getLength(); + rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); + eMode = SC_COND_BOTTOM10; + } + else if(rValue.indexOf("top-percent") == 0) + { + const sal_Unicode* pStr = rValue.getStr(); + const sal_Unicode* pStart = pStr + 11; + const sal_Unicode* pEnd = pStr + rValue.getLength(); + rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); + eMode = SC_COND_TOP_PERCENT; + } + else if(rValue.indexOf("bottom-percent") == 0) + { + const sal_Unicode* pStr = rValue.getStr(); + const sal_Unicode* pStart = pStr + 15; + const sal_Unicode* pEnd = pStr + rValue.getLength(); + rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); + eMode = SC_COND_BOTTOM_PERCENT; + } else if(rValue.indexOf("is-error") == 0) { eMode = SC_COND_ERROR; |