sc/source/filter/oox/numberformatsbuffer.cxx | 6 +++++- sc/source/filter/oox/stylesbuffer.cxx | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-)
New commits: commit 7ac7283911c0c1a3c04f4053ae96383705b3a2d7 Author: Noel Power <noel.po...@suse.com> Date: Thu May 30 16:12:20 2013 +0100 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 (cherry picked from commit 78775f1ad9b3f394896179898db984e139d5b5cc) diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index ecf6f07..166dbd0 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -1909,7 +1909,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 4f2bf02..74943fd 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2512,11 +2512,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 ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits