summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-05-30 16:12:20 +0100
committerNoel Power <noel.power@suse.com>2013-06-04 15:29:45 +0100
commit78775f1ad9b3f394896179898db984e139d5b5cc (patch)
tree0afb352651b19c83bd3df040a8e613b89045689f /sc/source/filter
parent16ca5428349c37d2ecb05dd85ac0e81b7da61ccd (diff)
bnc#821795 eat stray backslashes, in ooxml num format they don't escape
the '\' char in the number format isn't an escape character but rather an indicator that the next character should be displayed. Change-Id: Id2ae2fcfe5f195d2b85c2933c12d2d4443bb4dd8
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/oox/numberformatsbuffer.cxx6
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx5
2 files changed, 5 insertions, 6 deletions
diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx
index 8f7935d1d597..5b3a98c90c1b 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 cead31d9dc5c..62f4bc89b2f1 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2548,11 +2548,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 );
}