summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style/xmlnumfi.cxx')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx47
1 files changed, 0 insertions, 47 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 5483632252af..f428ab90a494 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2064,53 +2064,6 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
}
}
-void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex, const rtl::OUString& rFormat, const LocaleDataWrapper& rData )
-{
- rtl::OUString rCondition = aMyConditions[nIndex].sCondition;
- OUString sValue(RTL_CONSTASCII_USTRINGPARAM("value()")); //! define constant
- sal_Int32 nValLen = sValue.getLength();
-
- if ( rCondition.copy( 0, nValLen ) == sValue )
- {
- //! test for valid conditions
- //! test for default conditions
-
- OUString sRealCond = rCondition.copy( nValLen, rCondition.getLength() - nValLen );
- sal_Bool bDefaultCond = sal_False;
-
- //! collect all conditions first and adjust default to >=0, >0 or <0 depending on count
- //! allow blanks in conditions
- sal_Bool bFirstCond = ( aConditions.getLength() == 0 );
- if ( bFirstCond && aMyConditions.size() == 1 && sRealCond.compareToAscii( ">=0" ) == 0 )
- bDefaultCond = sal_True;
-
- if ( nType == XML_TOK_STYLES_TEXT_STYLE && nIndex == 2 )
- {
- // The third condition in a number format with a text part can only be
- // "all other numbers", the condition string must be empty.
- bDefaultCond = sal_True;
- }
-
- if (!bDefaultCond)
- {
- sal_Int32 nPos = sRealCond.indexOf( '.' );
- if ( nPos >= 0 )
- { // #i8026# #103991# localize decimal separator
- const String& rDecSep = rData.getNumDecimalSep();
- if ( rDecSep.Len() > 1 || rDecSep.GetChar(0) != '.' )
- sRealCond = sRealCond.replaceAt( nPos, 1, rDecSep );
- }
- aConditions.append( (sal_Unicode) '[' );
- aConditions.append( sRealCond );
- aConditions.append( (sal_Unicode) ']' );
- }
-
- aConditions.append( rFormat );
-
- aConditions.append( (sal_Unicode) ';' );
- }
-}
-
void SvXMLNumFormatContext::AddCondition( const rtl::OUString& rCondition, const rtl::OUString& rApplyName )
{
MyCondition aCondition;