Kaydet (Commit) 42922c40 authored tarafından Miklos Vajna's avatar Miklos Vajna

RTFDocumentImpl::popState: use switch here

Change-Id: If03ae8a5b44f477471ddc33063af552b3f2cfc31
üst 982d71f3
...@@ -3230,17 +3230,21 @@ int RTFDocumentImpl::popState() ...@@ -3230,17 +3230,21 @@ int RTFDocumentImpl::popState()
bool bPopFrame = false; bool bPopFrame = false;
RTFParserState aState(m_aStates.top()); RTFParserState aState(m_aStates.top());
if (m_aStates.top().nDestinationState == DESTINATION_FONTTABLE) switch (m_aStates.top().nDestinationState)
{
case DESTINATION_FONTTABLE:
{ {
writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(m_aFontTableEntries)); writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(m_aFontTableEntries));
Mapper().table(NS_rtf::LN_FONTTABLE, pTable); Mapper().table(NS_rtf::LN_FONTTABLE, pTable);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_STYLESHEET) break;
case DESTINATION_STYLESHEET:
{ {
writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(m_aStyleTableEntries)); writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(m_aStyleTableEntries));
Mapper().table(NS_rtf::LN_STYLESHEET, pTable); Mapper().table(NS_rtf::LN_STYLESHEET, pTable);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_LISTOVERRIDETABLE) break;
case DESTINATION_LISTOVERRIDETABLE:
{ {
RTFSprms aListTableAttributes; RTFSprms aListTableAttributes;
writerfilter::Reference<Properties>::Pointer_t const pProp(new RTFReferenceProperties(aListTableAttributes, m_aListTableSprms)); writerfilter::Reference<Properties>::Pointer_t const pProp(new RTFReferenceProperties(aListTableAttributes, m_aListTableSprms));
...@@ -3249,14 +3253,12 @@ int RTFDocumentImpl::popState() ...@@ -3249,14 +3253,12 @@ int RTFDocumentImpl::popState()
writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(aListTableEntries)); writerfilter::Reference<Table>::Pointer_t const pTable(new RTFReferenceTable(aListTableEntries));
Mapper().table(NS_rtf::LN_LISTTABLE, pTable); Mapper().table(NS_rtf::LN_LISTTABLE, pTable);
} }
else if (aState.nDestinationState == DESTINATION_LISTENTRY) break;
{ case DESTINATION_LISTENTRY:
for (RTFSprms::Iterator_t i = aState.aListLevelEntries.begin(); i != aState.aListLevelEntries.end(); ++i) for (RTFSprms::Iterator_t i = aState.aListLevelEntries.begin(); i != aState.aListLevelEntries.end(); ++i)
aState.aTableSprms.set(i->first, i->second, false); aState.aTableSprms.set(i->first, i->second, false);
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_FIELDINSTRUCTION) case DESTINATION_FIELDINSTRUCTION:
{
if (m_aFormfieldAttributes.size() || m_aFormfieldSprms.size())
{ {
RTFValue::Pointer_t pValue(new RTFValue(m_aFormfieldAttributes, m_aFormfieldSprms)); RTFValue::Pointer_t pValue(new RTFValue(m_aFormfieldAttributes, m_aFormfieldSprms));
RTFSprms aFFAttributes; RTFSprms aFFAttributes;
...@@ -3269,15 +3271,14 @@ int RTFDocumentImpl::popState() ...@@ -3269,15 +3271,14 @@ int RTFDocumentImpl::popState()
} }
if (!m_bEq) if (!m_bEq)
singleChar(0x14); singleChar(0x14);
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_FIELDRESULT) case DESTINATION_FIELDRESULT:
{
if (!m_bEq) if (!m_bEq)
singleChar(0x15); singleChar(0x15);
else else
m_bEq = false; m_bEq = false;
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_LEVELTEXT) case DESTINATION_LEVELTEXT:
{ {
OUString aStr = m_aStates.top().aDestinationText.makeStringAndClear(); OUString aStr = m_aStates.top().aDestinationText.makeStringAndClear();
...@@ -3291,7 +3292,8 @@ int RTFDocumentImpl::popState() ...@@ -3291,7 +3292,8 @@ int RTFDocumentImpl::popState()
RTFValue::Pointer_t pValue(new RTFValue(aValue, true)); RTFValue::Pointer_t pValue(new RTFValue(aValue, true));
aState.aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue); aState.aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_LEVELNUMBERS) break;
case DESTINATION_LEVELNUMBERS:
{ {
RTFSprms& rAttributes = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText)->getAttributes(); RTFSprms& rAttributes = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText)->getAttributes();
RTFValue::Pointer_t pValue = rAttributes.find(NS_ooxml::LN_CT_LevelText_val); RTFValue::Pointer_t pValue = rAttributes.find(NS_ooxml::LN_CT_LevelText_val);
...@@ -3313,9 +3315,10 @@ int RTFDocumentImpl::popState() ...@@ -3313,9 +3315,10 @@ int RTFDocumentImpl::popState()
} }
pValue->setString(aBuf.makeStringAndClear()); pValue->setString(aBuf.makeStringAndClear());
} }
else if (m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYNAME break;
|| m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYVALUE case DESTINATION_SHAPEPROPERTYNAME:
|| m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTY) case DESTINATION_SHAPEPROPERTYVALUE:
case DESTINATION_SHAPEPROPERTY:
{ {
aShape = m_aStates.top().aShape; aShape = m_aStates.top().aShape;
aPicture = m_aStates.top().aPicture; aPicture = m_aStates.top().aPicture;
...@@ -3326,42 +3329,47 @@ int RTFDocumentImpl::popState() ...@@ -3326,42 +3329,47 @@ int RTFDocumentImpl::popState()
aShape.aProperties.back().second = m_aStates.top().aDestinationText.makeStringAndClear(); aShape.aProperties.back().second = m_aStates.top().aDestinationText.makeStringAndClear();
bPopShapeProperties = true; bPopShapeProperties = true;
} }
else if (m_aStates.top().nDestinationState == DESTINATION_PICPROP break;
|| m_aStates.top().nDestinationState == DESTINATION_SHAPEINSTRUCTION) case DESTINATION_PICPROP:
{ case DESTINATION_SHAPEINSTRUCTION:
if (!m_bObject) if (!m_bObject)
m_pSdrImport->resolve(m_aStates.top().aShape); m_pSdrImport->resolve(m_aStates.top().aShape);
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_BOOKMARKSTART) case DESTINATION_BOOKMARKSTART:
{ {
OUString aStr = m_aStates.top().aDestinationText.makeStringAndClear(); OUString aStr = m_aStates.top().aDestinationText.makeStringAndClear();
int nPos = m_aBookmarks.size(); int nPos = m_aBookmarks.size();
m_aBookmarks[aStr] = nPos; m_aBookmarks[aStr] = nPos;
Mapper().props(lcl_getBookmarkProperties(nPos, aStr)); Mapper().props(lcl_getBookmarkProperties(nPos, aStr));
} }
else if (m_aStates.top().nDestinationState == DESTINATION_BOOKMARKEND) break;
case DESTINATION_BOOKMARKEND:
Mapper().props(lcl_getBookmarkProperties(m_aBookmarks[m_aStates.top().aDestinationText.makeStringAndClear()])); Mapper().props(lcl_getBookmarkProperties(m_aBookmarks[m_aStates.top().aDestinationText.makeStringAndClear()]));
else if (m_aStates.top().nDestinationState == DESTINATION_PICT) break;
case DESTINATION_PICT:
resolvePict(true); resolvePict(true);
else if (m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYVALUEPICT) break;
{ case DESTINATION_SHAPEPROPERTYVALUEPICT:
bPopPictureProperties = true; bPopPictureProperties = true;
aPicture = m_aStates.top().aPicture; aPicture = m_aStates.top().aPicture;
aDestinationText = m_aStates.top().aDestinationText; aDestinationText = m_aStates.top().aDestinationText;
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_SHAPETEXT) case DESTINATION_SHAPETEXT:
m_pCurrentBuffer = 0; // Just disable buffering, don't empty it yet. m_pCurrentBuffer = 0; // Just disable buffering, don't empty it yet.
else if (m_aStates.top().nDestinationState == DESTINATION_FORMFIELDNAME) break;
case DESTINATION_FORMFIELDNAME:
{ {
RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aDestinationText.makeStringAndClear())); RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aDestinationText.makeStringAndClear()));
m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFData_name, pValue); m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFData_name, pValue);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_FORMFIELDLIST) break;
case DESTINATION_FORMFIELDLIST:
{ {
RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aDestinationText.makeStringAndClear())); RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aDestinationText.makeStringAndClear()));
m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_listEntry, pValue); m_aFormfieldSprms.set(NS_ooxml::LN_CT_FFDDList_listEntry, pValue);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_DATAFIELD && m_bFormField) break;
case DESTINATION_DATAFIELD:
{ {
OString aStr = OUStringToOString(m_aStates.top().aDestinationText.makeStringAndClear(), m_aStates.top().nCurrentEncoding); OString aStr = OUStringToOString(m_aStates.top().aDestinationText.makeStringAndClear(), m_aStates.top().nCurrentEncoding);
// decode hex dump // decode hex dump
...@@ -3407,26 +3415,45 @@ int RTFDocumentImpl::popState() ...@@ -3407,26 +3415,45 @@ int RTFDocumentImpl::popState()
m_bFormField = false; m_bFormField = false;
} }
else if (m_aStates.top().nDestinationState == DESTINATION_CREATIONTIME && m_xDocumentProperties.is()) break;
case DESTINATION_CREATIONTIME:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setCreationDate(lcl_getDateTime(m_aStates)); m_xDocumentProperties->setCreationDate(lcl_getDateTime(m_aStates));
else if (m_aStates.top().nDestinationState == DESTINATION_REVISIONTIME && m_xDocumentProperties.is()) break;
case DESTINATION_REVISIONTIME:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setModificationDate(lcl_getDateTime(m_aStates)); m_xDocumentProperties->setModificationDate(lcl_getDateTime(m_aStates));
else if (m_aStates.top().nDestinationState == DESTINATION_PRINTTIME && m_xDocumentProperties.is()) break;
case DESTINATION_PRINTTIME:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setPrintDate(lcl_getDateTime(m_aStates)); m_xDocumentProperties->setPrintDate(lcl_getDateTime(m_aStates));
else if (m_aStates.top().nDestinationState == DESTINATION_AUTHOR && m_xDocumentProperties.is()) break;
case DESTINATION_AUTHOR:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setAuthor(m_aStates.top().aDestinationText.makeStringAndClear()); m_xDocumentProperties->setAuthor(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_KEYWORDS && m_xDocumentProperties.is()) break;
case DESTINATION_KEYWORDS:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setKeywords(comphelper::string::convertCommaSeparated(m_aStates.top().aDestinationText.makeStringAndClear())); m_xDocumentProperties->setKeywords(comphelper::string::convertCommaSeparated(m_aStates.top().aDestinationText.makeStringAndClear()));
else if (m_aStates.top().nDestinationState == DESTINATION_COMMENT && m_xDocumentProperties.is()) break;
case DESTINATION_COMMENT:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setGenerator(m_aStates.top().aDestinationText.makeStringAndClear()); m_xDocumentProperties->setGenerator(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_TITLE && m_xDocumentProperties.is()) break;
case DESTINATION_TITLE:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setTitle(m_aStates.top().aDestinationText.makeStringAndClear()); m_xDocumentProperties->setTitle(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_SUBJECT && m_xDocumentProperties.is()) break;
case DESTINATION_SUBJECT:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setSubject(m_aStates.top().aDestinationText.makeStringAndClear()); m_xDocumentProperties->setSubject(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_DOCCOMM && m_xDocumentProperties.is()) break;
case DESTINATION_DOCCOMM:
if (m_xDocumentProperties.is())
m_xDocumentProperties->setDescription(m_aStates.top().aDestinationText.makeStringAndClear()); m_xDocumentProperties->setDescription(m_aStates.top().aDestinationText.makeStringAndClear());
else if (m_aStates.top().nDestinationState == DESTINATION_OPERATOR break;
|| m_aStates.top().nDestinationState == DESTINATION_COMPANY) case DESTINATION_OPERATOR:
case DESTINATION_COMPANY:
{ {
OUString aName = m_aStates.top().nDestinationState == DESTINATION_OPERATOR ? OUString("Operator") : OUString("Company"); OUString aName = m_aStates.top().nDestinationState == DESTINATION_OPERATOR ? OUString("Operator") : OUString("Company");
if (m_xDocumentProperties.is()) if (m_xDocumentProperties.is())
...@@ -3436,7 +3463,8 @@ int RTFDocumentImpl::popState() ...@@ -3436,7 +3463,8 @@ int RTFDocumentImpl::popState()
uno::makeAny(m_aStates.top().aDestinationText.makeStringAndClear())); uno::makeAny(m_aStates.top().aDestinationText.makeStringAndClear()));
} }
} }
else if (m_aStates.top().nDestinationState == DESTINATION_OBJDATA) break;
case DESTINATION_OBJDATA:
{ {
m_pObjectData.reset(new SvMemoryStream()); m_pObjectData.reset(new SvMemoryStream());
int b = 0, count = 2; int b = 0, count = 2;
...@@ -3489,7 +3517,8 @@ int RTFDocumentImpl::popState() ...@@ -3489,7 +3517,8 @@ int RTFDocumentImpl::popState()
RTFValue::Pointer_t pValue(new RTFValue(aOLEAttributes)); RTFValue::Pointer_t pValue(new RTFValue(aOLEAttributes));
m_aObjectSprms.set(NS_ooxml::LN_OLEObject_OLEObject, pValue); m_aObjectSprms.set(NS_ooxml::LN_OLEObject_OLEObject, pValue);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_OBJECT) break;
case DESTINATION_OBJECT:
{ {
RTFSprms aObjAttributes; RTFSprms aObjAttributes;
RTFSprms aObjSprms; RTFSprms aObjSprms;
...@@ -3508,7 +3537,8 @@ int RTFDocumentImpl::popState() ...@@ -3508,7 +3537,8 @@ int RTFDocumentImpl::popState()
m_aObjectSprms.clear(); m_aObjectSprms.clear();
m_bObject = false; m_bObject = false;
} }
else if (m_aStates.top().nDestinationState == DESTINATION_ANNOTATIONDATE) break;
case DESTINATION_ANNOTATIONDATE:
{ {
OUString aStr(OStringToOUString(lcl_DTTM22OString(m_aStates.top().aDestinationText.makeStringAndClear().toInt32()), OUString aStr(OStringToOUString(lcl_DTTM22OString(m_aStates.top().aDestinationText.makeStringAndClear().toInt32()),
m_aStates.top().nCurrentEncoding)); m_aStates.top().nCurrentEncoding));
...@@ -3518,11 +3548,14 @@ int RTFDocumentImpl::popState() ...@@ -3518,11 +3548,14 @@ int RTFDocumentImpl::popState()
writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(aAnnAttributes)); writerfilter::Reference<Properties>::Pointer_t const pProperties(new RTFReferenceProperties(aAnnAttributes));
Mapper().props(pProperties); Mapper().props(pProperties);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_ANNOTATIONAUTHOR) break;
case DESTINATION_ANNOTATIONAUTHOR:
m_aAuthor = m_aStates.top().aDestinationText.makeStringAndClear(); m_aAuthor = m_aStates.top().aDestinationText.makeStringAndClear();
else if (m_aStates.top().nDestinationState == DESTINATION_ATNID) break;
case DESTINATION_ATNID:
m_aAuthorInitials = m_aStates.top().aDestinationText.makeStringAndClear(); m_aAuthorInitials = m_aStates.top().aDestinationText.makeStringAndClear();
else if (m_aStates.top().nDestinationState == DESTINATION_FALT) break;
case DESTINATION_FALT:
{ {
OUString aStr(m_aStates.top().aDestinationText.makeStringAndClear()); OUString aStr(m_aStates.top().aDestinationText.makeStringAndClear());
RTFValue::Pointer_t pValue(new RTFValue(aStr)); RTFValue::Pointer_t pValue(new RTFValue(aStr));
...@@ -3530,10 +3563,13 @@ int RTFDocumentImpl::popState() ...@@ -3530,10 +3563,13 @@ int RTFDocumentImpl::popState()
aSprms = m_aStates.top().aTableSprms; aSprms = m_aStates.top().aTableSprms;
bFaltEnd = true; bFaltEnd = true;
} }
else if (m_aStates.top().nDestinationState == DESTINATION_FLYMAINCONTENT break;
|| m_aStates.top().nDestinationState == DESTINATION_SHPPICT) case DESTINATION_FLYMAINCONTENT:
case DESTINATION_SHPPICT:
bPopFrame = true; bPopFrame = true;
else if (m_aStates.top().nDestinationState == DESTINATION_DRAWINGOBJECT && m_aStates.top().aDrawingObject.xShape.is()) break;
case DESTINATION_DRAWINGOBJECT:
if (m_aStates.top().aDrawingObject.xShape.is())
{ {
RTFDrawingObject& rDrawing = m_aStates.top().aDrawingObject; RTFDrawingObject& rDrawing = m_aStates.top().aDrawingObject;
uno::Reference<drawing::XShape> xShape(rDrawing.xShape); uno::Reference<drawing::XShape> xShape(rDrawing.xShape);
...@@ -3552,13 +3588,16 @@ int RTFDocumentImpl::popState() ...@@ -3552,13 +3588,16 @@ int RTFDocumentImpl::popState()
Mapper().startShape(xShape); Mapper().startShape(xShape);
Mapper().endShape(); Mapper().endShape();
} }
else if (m_aStates.top().nDestinationState == DESTINATION_SHAPE && m_aStates.top().aFrame.inFrame()) break;
case DESTINATION_SHAPE:
if (m_aStates.top().aFrame.inFrame())
{ {
m_aStates.top().resetFrame(); m_aStates.top().resetFrame();
parBreak(); parBreak();
m_bNeedPap = true; m_bNeedPap = true;
} }
else if (m_aStates.top().nDestinationState == DESTINATION_MOMATH) break;
case DESTINATION_MOMATH:
{ {
m_aMathBuffer.appendClosingTag(M_TOKEN(oMath)); m_aMathBuffer.appendClosingTag(M_TOKEN(oMath));
...@@ -3576,31 +3615,24 @@ int RTFDocumentImpl::popState() ...@@ -3576,31 +3615,24 @@ int RTFDocumentImpl::popState()
Mapper().props(pProperties); Mapper().props(pProperties);
m_aMathBuffer = oox::formulaimport::XmlStreamBuilder(); m_aMathBuffer = oox::formulaimport::XmlStreamBuilder();
} }
else if (m_aStates.top().nDestinationState == DESTINATION_MR) break;
{ case DESTINATION_MR:
m_aMathBuffer.appendOpeningTag(M_TOKEN(r)); m_aMathBuffer.appendOpeningTag(M_TOKEN(r));
m_aMathBuffer.appendOpeningTag(M_TOKEN(t)); m_aMathBuffer.appendOpeningTag(M_TOKEN(t));
m_aMathBuffer.appendCharacters(m_aStates.top().aDestinationText.makeStringAndClear()); m_aMathBuffer.appendCharacters(m_aStates.top().aDestinationText.makeStringAndClear());
m_aMathBuffer.appendClosingTag(M_TOKEN(t)); m_aMathBuffer.appendClosingTag(M_TOKEN(t));
m_aMathBuffer.appendClosingTag(M_TOKEN(r)); m_aMathBuffer.appendClosingTag(M_TOKEN(r));
} break;
else if (m_aStates.top().nDestinationState == DESTINATION_MF) case DESTINATION_MF: m_aMathBuffer.appendClosingTag(M_TOKEN(f)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(f)); case DESTINATION_MFPR: m_aMathBuffer.appendClosingTag(M_TOKEN(fPr)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MFPR) case DESTINATION_MCTRLPR: m_aMathBuffer.appendClosingTag(M_TOKEN(ctrlPr)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(fPr)); case DESTINATION_MNUM: m_aMathBuffer.appendClosingTag(M_TOKEN(num)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MCTRLPR) case DESTINATION_MDEN: m_aMathBuffer.appendClosingTag(M_TOKEN(den)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(ctrlPr)); case DESTINATION_MACC: m_aMathBuffer.appendClosingTag(M_TOKEN(acc)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MNUM) case DESTINATION_MACCPR: m_aMathBuffer.appendClosingTag(M_TOKEN(accPr)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(num)); case DESTINATION_MCHR:
else if (m_aStates.top().nDestinationState == DESTINATION_MDEN) case DESTINATION_MBEGCHR:
m_aMathBuffer.appendClosingTag(M_TOKEN(den)); case DESTINATION_MENDCHR:
else if (m_aStates.top().nDestinationState == DESTINATION_MACC)
m_aMathBuffer.appendClosingTag(M_TOKEN(acc));
else if (m_aStates.top().nDestinationState == DESTINATION_MACCPR)
m_aMathBuffer.appendClosingTag(M_TOKEN(accPr));
else if (m_aStates.top().nDestinationState == DESTINATION_MCHR ||
m_aStates.top().nDestinationState == DESTINATION_MBEGCHR ||
m_aStates.top().nDestinationState == DESTINATION_MENDCHR)
{ {
oox::formulaimport::XmlStream::AttributeList aAttribs; oox::formulaimport::XmlStream::AttributeList aAttribs;
aAttribs[M_TOKEN(val)] = m_aStates.top().aDestinationText.makeStringAndClear(); aAttribs[M_TOKEN(val)] = m_aStates.top().aDestinationText.makeStringAndClear();
...@@ -3615,28 +3647,20 @@ int RTFDocumentImpl::popState() ...@@ -3615,28 +3647,20 @@ int RTFDocumentImpl::popState()
m_aMathBuffer.appendOpeningTag(nToken, aAttribs); m_aMathBuffer.appendOpeningTag(nToken, aAttribs);
m_aMathBuffer.appendClosingTag(nToken); m_aMathBuffer.appendClosingTag(nToken);
} }
else if (m_aStates.top().nDestinationState == DESTINATION_ME) break;
m_aMathBuffer.appendClosingTag(M_TOKEN(e)); case DESTINATION_ME: m_aMathBuffer.appendClosingTag(M_TOKEN(e)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MBAR) case DESTINATION_MBAR: m_aMathBuffer.appendClosingTag(M_TOKEN(bar)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(bar)); case DESTINATION_MBARPR: m_aMathBuffer.appendClosingTag(M_TOKEN(barPr)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MBARPR) case DESTINATION_MD: m_aMathBuffer.appendClosingTag(M_TOKEN(d)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(barPr)); case DESTINATION_MDPR: m_aMathBuffer.appendClosingTag(M_TOKEN(dPr)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MD) case DESTINATION_MFUNC: m_aMathBuffer.appendClosingTag(M_TOKEN(func)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(d)); case DESTINATION_MFUNCPR: m_aMathBuffer.appendClosingTag(M_TOKEN(funcPr)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MDPR) case DESTINATION_MFNAME: m_aMathBuffer.appendClosingTag(M_TOKEN(fName)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(dPr)); case DESTINATION_MLIMLOW: m_aMathBuffer.appendClosingTag(M_TOKEN(limLow)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MFUNC) case DESTINATION_MLIMLOWPR: m_aMathBuffer.appendClosingTag(M_TOKEN(limLowPr)); break;
m_aMathBuffer.appendClosingTag(M_TOKEN(func)); case DESTINATION_MLIM: m_aMathBuffer.appendClosingTag(M_TOKEN(lim)); break;
else if (m_aStates.top().nDestinationState == DESTINATION_MFUNCPR) default: break;
m_aMathBuffer.appendClosingTag(M_TOKEN(funcPr)); }
else if (m_aStates.top().nDestinationState == DESTINATION_MFNAME)
m_aMathBuffer.appendClosingTag(M_TOKEN(fName));
else if (m_aStates.top().nDestinationState == DESTINATION_MLIMLOW)
m_aMathBuffer.appendClosingTag(M_TOKEN(limLow));
else if (m_aStates.top().nDestinationState == DESTINATION_MLIMLOWPR)
m_aMathBuffer.appendClosingTag(M_TOKEN(limLowPr));
else if (m_aStates.top().nDestinationState == DESTINATION_MLIM)
m_aMathBuffer.appendClosingTag(M_TOKEN(lim));
// See if we need to end a track change // See if we need to end a track change
RTFValue::Pointer_t pTrackchange = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_trackchange); RTFValue::Pointer_t pTrackchange = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_trackchange);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment