diff options
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r-- | sc/source/filter/oox/numberformatsbuffer.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 4baa33ee8ff3..d512e3eea095 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -1904,7 +1904,11 @@ NumberFormat::NumberFormat( const WorkbookHelper& rHelper ) : void NumberFormat::setFormatCode( const OUString& rFmtCode ) { - maModel.maFmtCode = rFmtCode; + // especiall for a fraction code '\ ?/?' is passed to us in xml, the '\' is not + // an escape character but merely should be telling the formatter to display the next + // char in the format ( afaics it does that anyhow ) + + maModel.maFmtCode = rFmtCode.replaceAll("\\", ""); } void NumberFormat::setFormatCode( const Locale& rLocale, const sal_Char* pcFmtCode ) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 57158ca6e6c7..feaae93d44a5 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2545,11 +2545,6 @@ void Dxf::importNumFmt( const AttributeList& rAttribs ) // import has already taken place ) sal_Int32 nNumFmtId = getStyles().nextFreeNumFmtId(); OUString aFmtCode = rAttribs.getXString( XML_formatCode, OUString() ); - // we might need to do this generally for format codes, - // specifically for a fraction code '\ ?/?' is passed to us in xml, the '\' is not - // an escape character but merely should be telling the formatter to display the next - // char in the format ( afaics it does that anyhow ) - aFmtCode = aFmtCode.replaceAll("\\", ""); mxNumFmt = getStyles().createNumFmt( nNumFmtId, aFmtCode ); } |