diff options
author | abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa> | 2013-06-15 12:43:29 +0200 |
---|---|---|
committer | abdulmajeed ahmed <aalabdulrazzaq@kacst.edu.sa> | 2013-06-15 12:53:07 +0200 |
commit | 36de708ce421b31beaaddb1048d444de91b2e5e9 (patch) | |
tree | 3ec60b54f937fdc7849c2892a1ae7b144bdec23b /oox | |
parent | 0c0a9c3abbda78e116b6b4920dbdefb06f278261 (diff) |
fix fdo#63053 ampersand in document title causes corrupt docx
FILESAVE, FILEOPEN: ampersand in document title causes corrupt docx when saving; truncates title when loading
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/docprop/docprophandler.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 9a06b815f890..8a59187f4928 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -450,7 +450,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const OUString& sValue ) if( sValue.isEmpty() ) return; pDoc->startElement( nXmlElement, FSEND ); - pDoc->write( sValue ); + pDoc->writeEscaped( sValue ); pDoc->endElement( nXmlElement ); } diff --git a/oox/source/docprop/docprophandler.cxx b/oox/source/docprop/docprophandler.cxx index 08cfda0b3ce4..50d5d4c363a4 100644 --- a/oox/source/docprop/docprophandler.cxx +++ b/oox/source/docprop/docprophandler.cxx @@ -453,11 +453,11 @@ void SAL_CALL OOXMLDocPropHandler::characters( const OUString& aChars ) break; case DC_TOKEN( subject ): - m_xDocProp->setSubject( aChars ); + m_xDocProp->setSubject( m_xDocProp->getSubject() + aChars ); break; case DC_TOKEN( title ): - m_xDocProp->setTitle( aChars ); + m_xDocProp->setTitle( m_xDocProp->getTitle() + aChars ); break; default: |