diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 52b286dd50a9..82ed552dcbca 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1254,6 +1254,37 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt WriteBooleanElement_Impl(); bAnyContent = true; } + else if (eType == XML_BOOLEAN_STYLE) + { + // <number:boolean-style> may contain only <number:boolean> and + // <number:text> elements. + sal_uInt16 nPos = 0; + bool bEnd = false; + while (!bEnd) + { + const short nElemType = rFormat.GetNumForType( nPart, nPos ); + switch (nElemType) + { + case 0: + bEnd = true; // end of format reached + if (bHasText && sTextContent.isEmpty()) + bHasText = false; // don't write trailing empty text + break; + case NF_SYMBOLTYPE_STRING: + { + const OUString* pElemStr = rFormat.GetNumForString( nPart, nPos ); + if (pElemStr) + AddToTextElement_Impl( *pElemStr ); + } + break; + case NF_KEY_BOOLEAN: + WriteBooleanElement_Impl(); + bAnyContent = true; + break; + } + ++nPos; + } + } else { // first loop to collect attributes |