[Libreoffice-commits] core.git: 2 commits - writerfilter/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 20 08:10:07 UTC 2019
writerfilter/source/rtftok/rtfdispatchdestination.cxx | 206 +++++++-------
writerfilter/source/rtftok/rtfdispatchflag.cxx | 34 +-
writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 6
writerfilter/source/rtftok/rtfdispatchvalue.cxx | 148 +++++-----
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 260 +++++++++---------
writerfilter/source/rtftok/rtfdocumentimpl.hxx | 25 +
6 files changed, 350 insertions(+), 329 deletions(-)
New commits:
commit e2aa8f8cb3b93ec3cb14c5c9edc3bbce78c1558f
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 17 21:47:03 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 20 10:07:20 2019 +0200
writerfilter: make RTFParserState members private, part 10
Change-Id: Id4445fc8fa1d81f052fd26ea85b661e44fd83be0
Reviewed-on: https://gerrit.libreoffice.org/72563
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index bfb52e741e08..0a6a5fe1d955 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -40,9 +40,9 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
checkUnicode(/*bUnicode =*/true, /*bHex =*/true);
RTFSkipDestination aSkip(*this);
// special case \upr: ignore everything except nested \ud
- if (Destination::UPR == m_aStates.top().eDestination && RTF_UD != nKeyword)
+ if (Destination::UPR == m_aStates.top().getDestination() && RTF_UD != nKeyword)
{
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
aSkip.setParsed(false);
}
else
@@ -51,16 +51,16 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
case RTF_RTF:
break;
case RTF_FONTTBL:
- m_aStates.top().eDestination = Destination::FONTTABLE;
+ m_aStates.top().setDestination(Destination::FONTTABLE);
break;
case RTF_COLORTBL:
- m_aStates.top().eDestination = Destination::COLORTABLE;
+ m_aStates.top().setDestination(Destination::COLORTABLE);
break;
case RTF_STYLESHEET:
- m_aStates.top().eDestination = Destination::STYLESHEET;
+ m_aStates.top().setDestination(Destination::STYLESHEET);
break;
case RTF_FIELD:
- m_aStates.top().eDestination = Destination::FIELD;
+ m_aStates.top().setDestination(Destination::FIELD);
break;
case RTF_FLDINST:
{
@@ -111,75 +111,75 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
m_bFormField = true;
singleChar(cFieldStart);
- m_aStates.top().eDestination = Destination::FIELDINSTRUCTION;
+ m_aStates.top().setDestination(Destination::FIELDINSTRUCTION);
}
break;
case RTF_FLDRSLT:
- m_aStates.top().eDestination = Destination::FIELDRESULT;
+ m_aStates.top().setDestination(Destination::FIELDRESULT);
break;
case RTF_LISTTABLE:
- m_aStates.top().eDestination = Destination::LISTTABLE;
+ m_aStates.top().setDestination(Destination::LISTTABLE);
break;
case RTF_LISTPICTURE:
- m_aStates.top().eDestination = Destination::LISTPICTURE;
+ m_aStates.top().setDestination(Destination::LISTPICTURE);
m_aStates.top().setInListpicture(true);
break;
case RTF_LIST:
- m_aStates.top().eDestination = Destination::LISTENTRY;
+ m_aStates.top().setDestination(Destination::LISTENTRY);
break;
case RTF_LISTNAME:
- m_aStates.top().eDestination = Destination::LISTNAME;
+ m_aStates.top().setDestination(Destination::LISTNAME);
break;
case RTF_LFOLEVEL:
- m_aStates.top().eDestination = Destination::LFOLEVEL;
+ m_aStates.top().setDestination(Destination::LFOLEVEL);
m_aStates.top().getTableSprms().clear();
break;
case RTF_LISTOVERRIDETABLE:
- m_aStates.top().eDestination = Destination::LISTOVERRIDETABLE;
+ m_aStates.top().setDestination(Destination::LISTOVERRIDETABLE);
break;
case RTF_LISTOVERRIDE:
- m_aStates.top().eDestination = Destination::LISTOVERRIDEENTRY;
+ m_aStates.top().setDestination(Destination::LISTOVERRIDEENTRY);
break;
case RTF_LISTLEVEL:
- m_aStates.top().eDestination = Destination::LISTLEVEL;
+ m_aStates.top().setDestination(Destination::LISTLEVEL);
++m_nListLevel;
break;
case RTF_LEVELTEXT:
- m_aStates.top().eDestination = Destination::LEVELTEXT;
+ m_aStates.top().setDestination(Destination::LEVELTEXT);
break;
case RTF_LEVELNUMBERS:
- m_aStates.top().eDestination = Destination::LEVELNUMBERS;
+ m_aStates.top().setDestination(Destination::LEVELNUMBERS);
break;
case RTF_SHPPICT:
resetFrame();
- m_aStates.top().eDestination = Destination::SHPPICT;
+ m_aStates.top().setDestination(Destination::SHPPICT);
break;
case RTF_PICT:
- if (m_aStates.top().eDestination != Destination::SHAPEPROPERTYVALUE)
- m_aStates.top().eDestination = Destination::PICT; // as character
+ if (m_aStates.top().getDestination() != Destination::SHAPEPROPERTYVALUE)
+ m_aStates.top().setDestination(Destination::PICT); // as character
else
- m_aStates.top().eDestination
- = Destination::SHAPEPROPERTYVALUEPICT; // anchored inside a shape
+ m_aStates.top().setDestination(
+ Destination::SHAPEPROPERTYVALUEPICT); // anchored inside a shape
break;
case RTF_PICPROP:
- m_aStates.top().eDestination = Destination::PICPROP;
+ m_aStates.top().setDestination(Destination::PICPROP);
break;
case RTF_SP:
- m_aStates.top().eDestination = Destination::SHAPEPROPERTY;
+ m_aStates.top().setDestination(Destination::SHAPEPROPERTY);
break;
case RTF_SN:
- m_aStates.top().eDestination = Destination::SHAPEPROPERTYNAME;
+ m_aStates.top().setDestination(Destination::SHAPEPROPERTYNAME);
break;
case RTF_SV:
- m_aStates.top().eDestination = Destination::SHAPEPROPERTYVALUE;
+ m_aStates.top().setDestination(Destination::SHAPEPROPERTYVALUE);
break;
case RTF_SHP:
m_bNeedCrOrig = m_bNeedCr;
- m_aStates.top().eDestination = Destination::SHAPE;
+ m_aStates.top().setDestination(Destination::SHAPE);
m_aStates.top().setInShape(true);
break;
case RTF_SHPINST:
- m_aStates.top().eDestination = Destination::SHAPEINSTRUCTION;
+ m_aStates.top().setDestination(Destination::SHAPEINSTRUCTION);
break;
case RTF_NESTTABLEPROPS:
// do not set any properties of outer table at nested table!
@@ -188,7 +188,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
m_aNestedTableCellsSprms.clear();
m_aNestedTableCellsAttributes.clear();
m_nNestedCells = 0;
- m_aStates.top().eDestination = Destination::NESTEDTABLEPROPERTIES;
+ m_aStates.top().setDestination(Destination::NESTEDTABLEPROPERTIES);
break;
case RTF_HEADER:
case RTF_FOOTER:
@@ -251,7 +251,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
if (nId != 0)
m_nHeaderFooterPositions.push(std::make_pair(nId, nPos));
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
}
break;
case RTF_FOOTNOTE:
@@ -287,7 +287,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
}
}
m_aSuperBuffer.clear();
- m_aStates.top().eDestination = Destination::FOOTNOTE;
+ m_aStates.top().setDestination(Destination::FOOTNOTE);
Mapper().startCharacterGroup();
runProps();
if (!m_aStates.top().getCurrentBuffer())
@@ -311,30 +311,30 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
text(aCustomMark);
}
Mapper().endCharacterGroup();
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
}
break;
case RTF_BKMKSTART:
- m_aStates.top().eDestination = Destination::BOOKMARKSTART;
+ m_aStates.top().setDestination(Destination::BOOKMARKSTART);
break;
case RTF_BKMKEND:
- m_aStates.top().eDestination = Destination::BOOKMARKEND;
+ m_aStates.top().setDestination(Destination::BOOKMARKEND);
break;
case RTF_XE:
- m_aStates.top().eDestination = Destination::INDEXENTRY;
+ m_aStates.top().setDestination(Destination::INDEXENTRY);
break;
case RTF_TC:
case RTF_TCN:
- m_aStates.top().eDestination = Destination::TOCENTRY;
+ m_aStates.top().setDestination(Destination::TOCENTRY);
break;
case RTF_REVTBL:
- m_aStates.top().eDestination = Destination::REVISIONTABLE;
+ m_aStates.top().setDestination(Destination::REVISIONTABLE);
break;
case RTF_ANNOTATION:
if (!m_pSuperstream)
{
resolveSubstream(m_nGroupStartPos - 1, NS_ooxml::LN_annotation);
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
}
else
{
@@ -373,10 +373,10 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
}
if (bPictureFrame)
// Skip text on picture frames.
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
else
{
- m_aStates.top().eDestination = Destination::SHAPETEXT;
+ m_aStates.top().setDestination(Destination::SHAPETEXT);
checkFirstRun();
dispatchFlag(RTF_PARD);
m_bNeedPap = true;
@@ -396,49 +396,49 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
}
break;
case RTF_FORMFIELD:
- if (m_aStates.top().eDestination == Destination::FIELDINSTRUCTION)
- m_aStates.top().eDestination = Destination::FORMFIELD;
+ if (m_aStates.top().getDestination() == Destination::FIELDINSTRUCTION)
+ m_aStates.top().setDestination(Destination::FORMFIELD);
break;
case RTF_FFNAME:
- m_aStates.top().eDestination = Destination::FORMFIELDNAME;
+ m_aStates.top().setDestination(Destination::FORMFIELDNAME);
break;
case RTF_FFL:
- m_aStates.top().eDestination = Destination::FORMFIELDLIST;
+ m_aStates.top().setDestination(Destination::FORMFIELDLIST);
break;
case RTF_DATAFIELD:
- m_aStates.top().eDestination = Destination::DATAFIELD;
+ m_aStates.top().setDestination(Destination::DATAFIELD);
break;
case RTF_INFO:
- m_aStates.top().eDestination = Destination::INFO;
+ m_aStates.top().setDestination(Destination::INFO);
break;
case RTF_CREATIM:
- m_aStates.top().eDestination = Destination::CREATIONTIME;
+ m_aStates.top().setDestination(Destination::CREATIONTIME);
break;
case RTF_REVTIM:
- m_aStates.top().eDestination = Destination::REVISIONTIME;
+ m_aStates.top().setDestination(Destination::REVISIONTIME);
break;
case RTF_PRINTIM:
- m_aStates.top().eDestination = Destination::PRINTTIME;
+ m_aStates.top().setDestination(Destination::PRINTTIME);
break;
case RTF_AUTHOR:
- m_aStates.top().eDestination = Destination::AUTHOR;
+ m_aStates.top().setDestination(Destination::AUTHOR);
break;
case RTF_KEYWORDS:
- m_aStates.top().eDestination = Destination::KEYWORDS;
+ m_aStates.top().setDestination(Destination::KEYWORDS);
break;
case RTF_OPERATOR:
- m_aStates.top().eDestination = Destination::OPERATOR;
+ m_aStates.top().setDestination(Destination::OPERATOR);
break;
case RTF_COMPANY:
- m_aStates.top().eDestination = Destination::COMPANY;
+ m_aStates.top().setDestination(Destination::COMPANY);
break;
case RTF_COMMENT:
- m_aStates.top().eDestination = Destination::COMMENT;
+ m_aStates.top().setDestination(Destination::COMMENT);
break;
case RTF_OBJECT:
{
// beginning of an OLE Object
- m_aStates.top().eDestination = Destination::OBJECT;
+ m_aStates.top().setDestination(Destination::OBJECT);
// check if the object is in a special container (e.g. a table)
if (!m_aStates.top().getCurrentBuffer())
@@ -458,133 +458,133 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
// the object is in a table or another container.
// Use the \result (RTF_RESULT) element of the object instead,
// of the \objdata.
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
}
else
{
- m_aStates.top().eDestination = Destination::OBJDATA;
+ m_aStates.top().setDestination(Destination::OBJDATA);
}
break;
case RTF_OBJCLASS:
- m_aStates.top().eDestination = Destination::OBJCLASS;
+ m_aStates.top().setDestination(Destination::OBJCLASS);
break;
case RTF_RESULT:
- m_aStates.top().eDestination = Destination::RESULT;
+ m_aStates.top().setDestination(Destination::RESULT);
break;
case RTF_ATNDATE:
- m_aStates.top().eDestination = Destination::ANNOTATIONDATE;
+ m_aStates.top().setDestination(Destination::ANNOTATIONDATE);
break;
case RTF_ATNAUTHOR:
- m_aStates.top().eDestination = Destination::ANNOTATIONAUTHOR;
+ m_aStates.top().setDestination(Destination::ANNOTATIONAUTHOR);
break;
case RTF_ATNREF:
- m_aStates.top().eDestination = Destination::ANNOTATIONREFERENCE;
+ m_aStates.top().setDestination(Destination::ANNOTATIONREFERENCE);
break;
case RTF_FALT:
- m_aStates.top().eDestination = Destination::FALT;
+ m_aStates.top().setDestination(Destination::FALT);
break;
case RTF_FLYMAINCNT:
- m_aStates.top().eDestination = Destination::FLYMAINCONTENT;
+ m_aStates.top().setDestination(Destination::FLYMAINCONTENT);
break;
case RTF_LISTTEXT:
// Should be ignored by any reader that understands Word 97 through Word 2007 numbering.
case RTF_NONESTTABLES:
// This destination should be ignored by readers that support nested tables.
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
break;
case RTF_DO:
- m_aStates.top().eDestination = Destination::DRAWINGOBJECT;
+ m_aStates.top().setDestination(Destination::DRAWINGOBJECT);
break;
case RTF_PN:
- m_aStates.top().eDestination = Destination::PARAGRAPHNUMBERING;
+ m_aStates.top().setDestination(Destination::PARAGRAPHNUMBERING);
break;
case RTF_PNTEXT:
// This destination should be ignored by readers that support paragraph numbering.
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
break;
case RTF_PNTXTA:
- m_aStates.top().eDestination = Destination::PARAGRAPHNUMBERING_TEXTAFTER;
+ m_aStates.top().setDestination(Destination::PARAGRAPHNUMBERING_TEXTAFTER);
break;
case RTF_PNTXTB:
- m_aStates.top().eDestination = Destination::PARAGRAPHNUMBERING_TEXTBEFORE;
+ m_aStates.top().setDestination(Destination::PARAGRAPHNUMBERING_TEXTBEFORE);
break;
case RTF_TITLE:
- m_aStates.top().eDestination = Destination::TITLE;
+ m_aStates.top().setDestination(Destination::TITLE);
break;
case RTF_SUBJECT:
- m_aStates.top().eDestination = Destination::SUBJECT;
+ m_aStates.top().setDestination(Destination::SUBJECT);
break;
case RTF_DOCCOMM:
- m_aStates.top().eDestination = Destination::DOCCOMM;
+ m_aStates.top().setDestination(Destination::DOCCOMM);
break;
case RTF_ATRFSTART:
- m_aStates.top().eDestination = Destination::ANNOTATIONREFERENCESTART;
+ m_aStates.top().setDestination(Destination::ANNOTATIONREFERENCESTART);
break;
case RTF_ATRFEND:
- m_aStates.top().eDestination = Destination::ANNOTATIONREFERENCEEND;
+ m_aStates.top().setDestination(Destination::ANNOTATIONREFERENCEEND);
break;
case RTF_ATNID:
- m_aStates.top().eDestination = Destination::ATNID;
+ m_aStates.top().setDestination(Destination::ATNID);
break;
case RTF_MMATH:
case RTF_MOMATHPARA:
// Nothing to do here (just enter the destination) till RTF_MMATHPR is implemented.
break;
case RTF_MR:
- m_aStates.top().eDestination = Destination::MR;
+ m_aStates.top().setDestination(Destination::MR);
break;
case RTF_MCHR:
- m_aStates.top().eDestination = Destination::MCHR;
+ m_aStates.top().setDestination(Destination::MCHR);
break;
case RTF_MPOS:
- m_aStates.top().eDestination = Destination::MPOS;
+ m_aStates.top().setDestination(Destination::MPOS);
break;
case RTF_MVERTJC:
- m_aStates.top().eDestination = Destination::MVERTJC;
+ m_aStates.top().setDestination(Destination::MVERTJC);
break;
case RTF_MSTRIKEH:
- m_aStates.top().eDestination = Destination::MSTRIKEH;
+ m_aStates.top().setDestination(Destination::MSTRIKEH);
break;
case RTF_MDEGHIDE:
- m_aStates.top().eDestination = Destination::MDEGHIDE;
+ m_aStates.top().setDestination(Destination::MDEGHIDE);
break;
case RTF_MTYPE:
- m_aStates.top().eDestination = Destination::MTYPE;
+ m_aStates.top().setDestination(Destination::MTYPE);
break;
case RTF_MGROW:
- m_aStates.top().eDestination = Destination::MGROW;
+ m_aStates.top().setDestination(Destination::MGROW);
break;
case RTF_MHIDETOP:
case RTF_MHIDEBOT:
case RTF_MHIDELEFT:
case RTF_MHIDERIGHT:
// SmOoxmlImport::handleBorderBox will ignore these anyway, so silently ignore for now.
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
break;
case RTF_MSUBHIDE:
- m_aStates.top().eDestination = Destination::MSUBHIDE;
+ m_aStates.top().setDestination(Destination::MSUBHIDE);
break;
case RTF_MSUPHIDE:
- m_aStates.top().eDestination = Destination::MSUPHIDE;
+ m_aStates.top().setDestination(Destination::MSUPHIDE);
break;
case RTF_MBEGCHR:
- m_aStates.top().eDestination = Destination::MBEGCHR;
+ m_aStates.top().setDestination(Destination::MBEGCHR);
break;
case RTF_MSEPCHR:
- m_aStates.top().eDestination = Destination::MSEPCHR;
+ m_aStates.top().setDestination(Destination::MSEPCHR);
break;
case RTF_MENDCHR:
- m_aStates.top().eDestination = Destination::MENDCHR;
+ m_aStates.top().setDestination(Destination::MENDCHR);
break;
case RTF_UPR:
- m_aStates.top().eDestination = Destination::UPR;
+ m_aStates.top().setDestination(Destination::UPR);
break;
case RTF_UD:
// Anything inside \ud is just normal Unicode content.
- m_aStates.top().eDestination = Destination::NORMAL;
+ m_aStates.top().setDestination(Destination::NORMAL);
break;
case RTF_BACKGROUND:
- m_aStates.top().eDestination = Destination::BACKGROUND;
+ m_aStates.top().setDestination(Destination::BACKGROUND);
m_aStates.top().setInBackground(true);
break;
case RTF_SHPGRP:
@@ -609,28 +609,28 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
m_pSdrImport->pushParent(xGroupShape);
m_aStates.top().setCreatedShapeGroup(true);
}
- m_aStates.top().eDestination = Destination::SHAPEGROUP;
+ m_aStates.top().setDestination(Destination::SHAPEGROUP);
m_aStates.top().setInShapeGroup(true);
}
break;
case RTF_FTNSEP:
- m_aStates.top().eDestination = Destination::FOOTNOTESEPARATOR;
+ m_aStates.top().setDestination(Destination::FOOTNOTESEPARATOR);
m_aStates.top().getCharacterAttributes().set(
NS_ooxml::LN_CT_FtnEdn_type,
new RTFValue(NS_ooxml::LN_Value_doc_ST_FtnEdn_separator));
break;
case RTF_USERPROPS:
// Container of all user-defined properties.
- m_aStates.top().eDestination = Destination::USERPROPS;
+ m_aStates.top().setDestination(Destination::USERPROPS);
if (m_xDocumentProperties.is())
// Create a custom document properties to be able to process them later all at once.
m_xDocumentProperties = document::DocumentProperties::create(m_xContext);
break;
case RTF_PROPNAME:
- m_aStates.top().eDestination = Destination::PROPNAME;
+ m_aStates.top().setDestination(Destination::PROPNAME);
break;
case RTF_STATICVAL:
- m_aStates.top().eDestination = Destination::STATICVAL;
+ m_aStates.top().setDestination(Destination::STATICVAL);
break;
default:
{
@@ -639,14 +639,14 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
if (RTFTokenizer::lookupMathKeyword(aSymbol))
{
m_aMathBuffer.appendOpeningTag(aSymbol.GetToken());
- m_aStates.top().eDestination = aSymbol.GetDestination();
+ m_aStates.top().setDestination(aSymbol.GetDestination());
return RTFError::OK;
}
SAL_INFO("writerfilter",
"TODO handle destination '" << keywordToString(nKeyword) << "'");
// Make sure we skip destinations (even without \*) till we don't handle them
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
aSkip.setParsed(false);
}
break;
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index 6f9379b54d30..46592a24105b 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -558,7 +558,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
auto pValue = new RTFValue(aAttributes);
for (int i = 0; i < 4; i++)
m_aStates.top().getParagraphSprms().set(getParagraphBorder(i), pValue);
- m_aStates.top().nBorderState = RTFBorderState::PARAGRAPH_BOX;
+ m_aStates.top().setBorderState(RTFBorderState::PARAGRAPH_BOX);
}
break;
case RTF_LTRSECT:
@@ -598,7 +598,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
break;
case RTF_NONSHPPICT:
case RTF_MMATHPICT: // Picture group used by readers not understanding \moMath group
- m_aStates.top().eDestination = Destination::SKIP;
+ m_aStates.top().setDestination(Destination::SKIP);
break;
case RTF_CLBRDRT:
case RTF_CLBRDRL:
@@ -627,7 +627,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
}
putNestedSprm(m_aStates.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcBorders,
nParam, pValue);
- m_aStates.top().nBorderState = RTFBorderState::CELL;
+ m_aStates.top().setBorderState(RTFBorderState::CELL);
}
break;
case RTF_PGBRDRT:
@@ -657,7 +657,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
}
putNestedSprm(m_aStates.top().getSectionSprms(),
NS_ooxml::LN_EG_SectPrContents_pgBorders, nParam, pValue);
- m_aStates.top().nBorderState = RTFBorderState::PAGE;
+ m_aStates.top().setBorderState(RTFBorderState::PAGE);
}
break;
case RTF_BRDRT:
@@ -687,7 +687,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
}
putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_pBdr, nParam,
pValue);
- m_aStates.top().nBorderState = RTFBorderState::PARAGRAPH;
+ m_aStates.top().setBorderState(RTFBorderState::PARAGRAPH);
}
break;
case RTF_CHBRDR:
@@ -695,7 +695,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
RTFSprms aAttributes;
auto pValue = new RTFValue(aAttributes);
m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_bdr, pValue);
- m_aStates.top().nBorderState = RTFBorderState::CHARACTER;
+ m_aStates.top().setBorderState(RTFBorderState::CHARACTER);
}
break;
case RTF_CLMGF:
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index 5c8d2c29d401..51e07342d18c 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -98,7 +98,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
break;
case RTF_PAR:
{
- if (m_aStates.top().eDestination == Destination::FOOTNOTESEPARATOR)
+ if (m_aStates.top().getDestination() == Destination::FOOTNOTESEPARATOR)
break; // just ignore it - only thing we read in here is CHFTNSEP
checkFirstRun();
bool bNeedPap = m_bNeedPap;
@@ -121,7 +121,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
}
m_nCellxMax = 0;
}
- else if (m_aStates.top().eDestination != Destination::SHAPETEXT)
+ else if (m_aStates.top().getDestination() != Destination::SHAPETEXT)
{
RTFValue::Pointer_t pValue;
m_aStates.top().getCurrentBuffer()->push_back(Buf_t(BUFFER_PAR, pValue, nullptr));
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index bf2a550abe13..57637ce536ea 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -350,13 +350,13 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
assert(m_aStates.top().getRunType() == RTFParserState::RunType::LOCH);
nSprm = NS_ooxml::LN_CT_Fonts_ascii;
}
- if (m_aStates.top().eDestination == Destination::FONTTABLE
- || m_aStates.top().eDestination == Destination::FONTENTRY)
+ if (m_aStates.top().getDestination() == Destination::FONTTABLE
+ || m_aStates.top().getDestination() == Destination::FONTENTRY)
{
m_aFontIndexes.push_back(nParam);
m_nCurrentFontIndex = getFontIndex(nParam);
}
- else if (m_aStates.top().eDestination == Destination::LISTLEVEL)
+ else if (m_aStates.top().getDestination() == Destination::LISTLEVEL)
{
RTFSprms aFontAttributes;
aFontAttributes.set(nSprm, new RTFValue(m_aFontNames[getFontIndex(nParam)]));
@@ -433,8 +433,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
m_aStates.top().setCurrentStyleIndex(nParam);
- if (m_aStates.top().eDestination == Destination::STYLESHEET
- || m_aStates.top().eDestination == Destination::STYLEENTRY)
+ if (m_aStates.top().getDestination() == Destination::STYLESHEET
+ || m_aStates.top().getDestination() == Destination::STYLEENTRY)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_StyleType_paragraph);
@@ -446,7 +446,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
OUString aName = getStyleName(nParam);
if (!aName.isEmpty())
{
- if (m_aStates.top().eDestination == Destination::LISTLEVEL)
+ if (m_aStates.top().getDestination() == Destination::LISTLEVEL)
m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_pStyle,
new RTFValue(aName));
else
@@ -458,8 +458,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case RTF_CS:
m_aStates.top().setCurrentCharacterStyleIndex(nParam);
- if (m_aStates.top().eDestination == Destination::STYLESHEET
- || m_aStates.top().eDestination == Destination::STYLEENTRY)
+ if (m_aStates.top().getDestination() == Destination::STYLESHEET
+ || m_aStates.top().getDestination() == Destination::STYLEENTRY)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_StyleType_character);
@@ -475,8 +475,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
break;
case RTF_DS:
- if (m_aStates.top().eDestination == Destination::STYLESHEET
- || m_aStates.top().eDestination == Destination::STYLEENTRY)
+ if (m_aStates.top().getDestination() == Destination::STYLESHEET
+ || m_aStates.top().getDestination() == Destination::STYLEENTRY)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(0); // TODO no value in enum StyleType?
@@ -485,8 +485,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
break;
case RTF_TS:
- if (m_aStates.top().eDestination == Destination::STYLESHEET
- || m_aStates.top().eDestination == Destination::STYLEENTRY)
+ if (m_aStates.top().getDestination() == Destination::STYLESHEET
+ || m_aStates.top().getDestination() == Destination::STYLEENTRY)
{
m_nCurrentStyleIndex = nParam;
// FIXME the correct value would be NS_ooxml::LN_Value_ST_StyleType_table but maybe table styles mess things up in dmapper, be cautious and disable them for now
@@ -646,7 +646,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
m_aStates.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_pos, pIntValue);
auto pValue = new RTFValue(m_aStates.top().getTabAttributes());
- if (m_aStates.top().eDestination == Destination::LISTLEVEL)
+ if (m_aStates.top().getDestination() == Destination::LISTLEVEL)
putNestedSprm(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_tabs,
NS_ooxml::LN_CT_Tabs_tab, pValue);
else
@@ -664,17 +664,17 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case RTF_LISTID:
{
- if (m_aStates.top().eDestination == Destination::LISTENTRY)
+ if (m_aStates.top().getDestination() == Destination::LISTENTRY)
m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_abstractNumId,
pIntValue);
- else if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
+ else if (m_aStates.top().getDestination() == Destination::LISTOVERRIDEENTRY)
m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Num_abstractNumId, pIntValue);
m_aStates.top().setCurrentListIndex(nParam);
}
break;
case RTF_LS:
{
- if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
+ if (m_aStates.top().getDestination() == Destination::LISTOVERRIDEENTRY)
{
m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid,
pIntValue);
@@ -701,7 +701,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
// static_cast() will do the right thing.
if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_UINT16))
{
- if (m_aStates.top().eDestination == Destination::LEVELNUMBERS)
+ if (m_aStates.top().getDestination() == Destination::LEVELNUMBERS)
{
if (nParam != ';')
m_aStates.top().getLevelNumbers().push_back(sal_Int32(nParam));
@@ -848,9 +848,10 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case RTF_CELLX:
{
- int& rCurrentCellX((Destination::NESTEDTABLEPROPERTIES == m_aStates.top().eDestination)
- ? m_nNestedCurrentCellX
- : m_nTopLevelCurrentCellX);
+ int& rCurrentCellX(
+ (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().getDestination())
+ ? m_nNestedCurrentCellX
+ : m_nTopLevelCurrentCellX);
int nCellX = nParam - rCurrentCellX;
const int COL_DFLT_WIDTH
= 41; // sw/source/filter/inc/wrtswtbl.hxx, minimal possible width of cells.
@@ -872,7 +873,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
auto pXValue = new RTFValue(nCellX);
m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, pXValue,
RTFOverwrite::NO_APPEND);
- if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().eDestination)
+ if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().getDestination())
{
m_nNestedCells++;
// Push cell properties.
@@ -935,7 +936,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
putNestedAttribute(m_aStates.top().getTableRowSprms(), NS_ooxml::LN_CT_TblPrBase_tblInd,
NS_ooxml::LN_CT_TblWidth_w, new RTFValue(nParam));
- auto const aDestination = m_aStates.top().eDestination;
+ auto const aDestination = m_aStates.top().getDestination();
int& rCurrentTRLeft((Destination::NESTEDTABLEPROPERTIES == aDestination)
? m_nNestedTRLeft
: m_nTopLevelTRLeft);
@@ -1507,7 +1508,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case RTF_FI:
{
- if (m_aStates.top().eDestination == Destination::LISTLEVEL)
+ if (m_aStates.top().getDestination() == Destination::LISTLEVEL)
{
if (m_aStates.top().getLevelNumbersValid())
putNestedAttribute(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_ind,
@@ -1522,7 +1523,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
case RTF_LI:
{
- if (m_aStates.top().eDestination == Destination::LISTLEVEL)
+ if (m_aStates.top().getDestination() == Destination::LISTLEVEL)
{
if (m_aStates.top().getLevelNumbersValid())
putNestedAttribute(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_ind,
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index dfb4338c711e..9a49087e5a2f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -155,7 +155,7 @@ RTFSprms& getLastAttributes(RTFSprms& rSprms, Id nId)
void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pValue)
{
RTFSprms* pAttributes = nullptr;
- if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH_BOX)
+ if (aStates.top().getBorderState() == RTFBorderState::PARAGRAPH_BOX)
for (int i = 0; i < 4; i++)
{
RTFValue::Pointer_t p = aStates.top().getParagraphSprms().find(getParagraphBorder(i));
@@ -165,7 +165,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
rAttributes.set(nId, pValue);
}
}
- else if (aStates.top().nBorderState == RTFBorderState::CHARACTER)
+ else if (aStates.top().getBorderState() == RTFBorderState::CHARACTER)
{
RTFValue::Pointer_t pPointer
= aStates.top().getCharacterSprms().find(NS_ooxml::LN_EG_RPrBase_bdr);
@@ -176,13 +176,13 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
}
}
// Attributes of the last border type
- else if (aStates.top().nBorderState == RTFBorderState::PARAGRAPH)
+ else if (aStates.top().getBorderState() == RTFBorderState::PARAGRAPH)
pAttributes
= &getLastAttributes(aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_pBdr);
- else if (aStates.top().nBorderState == RTFBorderState::CELL)
+ else if (aStates.top().getBorderState() == RTFBorderState::CELL)
pAttributes = &getLastAttributes(aStates.top().getTableCellSprms(),
NS_ooxml::LN_CT_TcPrBase_tcBorders);
- else if (aStates.top().nBorderState == RTFBorderState::PAGE)
+ else if (aStates.top().getBorderState() == RTFBorderState::PAGE)
pAttributes = &getLastAttributes(aStates.top().getSectionSprms(),
NS_ooxml::LN_EG_SectPrContents_pgBorders);
if (pAttributes)
@@ -802,7 +802,7 @@ bool RTFDocumentImpl::isStyleSheetImport()
{
if (m_aStates.empty())
return false;
- Destination eDestination = m_aStates.top().eDestination;
+ Destination eDestination = m_aStates.top().getDestination();
return eDestination == Destination::STYLESHEET || eDestination == Destination::STYLEENTRY;
}
@@ -1243,14 +1243,15 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
Strm().SeekRel(-1);
if (m_aStates.top().nInternalState == RTFInternalState::HEX
- && m_aStates.top().eDestination != Destination::LEVELNUMBERS)
+ && m_aStates.top().getDestination() != Destination::LEVELNUMBERS)
{
if (!bSkipped)
{
// note: apparently \'0d\'0a is interpreted as 2 breaks, not 1
- if ((ch == '\r' || ch == '\n') && m_aStates.top().eDestination != Destination::DOCCOMM
- && m_aStates.top().eDestination != Destination::LEVELNUMBERS
- && m_aStates.top().eDestination != Destination::LEVELTEXT)
+ if ((ch == '\r' || ch == '\n')
+ && m_aStates.top().getDestination() != Destination::DOCCOMM
+ && m_aStates.top().getDestination() != Destination::LEVELNUMBERS
+ && m_aStates.top().getDestination() != Destination::LEVELTEXT)
{
checkUnicode(/*bUnicode =*/false, /*bHex =*/true);
dispatchSymbol(RTF_PAR);
@@ -1263,10 +1264,10 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
return RTFError::OK;
}
- if (m_aStates.top().eDestination == Destination::SKIP)
+ if (m_aStates.top().getDestination() == Destination::SKIP)
return RTFError::OK;
OString aStr = aBuf.makeStringAndClear();
- if (m_aStates.top().eDestination == Destination::LEVELNUMBERS)
+ if (m_aStates.top().getDestination() == Destination::LEVELNUMBERS)
{
if (aStr.toChar() != ';')
m_aStates.top().getLevelNumbers().push_back(sal_Int32(ch));
@@ -1276,7 +1277,7 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
OUString aOUStr(OStringToOUString(aStr, m_aStates.top().getCurrentEncoding()));
SAL_INFO("writerfilter.rtf", "RTFDocumentImpl::resolveChars: collected '" << aOUStr << "'");
- if (m_aStates.top().eDestination == Destination::COLORTABLE)
+ if (m_aStates.top().getDestination() == Destination::COLORTABLE)
{
// we hit a ';' at the end of each color entry
m_aColorTable.push_back(m_aStates.top().getCurrentColor().GetColor());
@@ -1317,7 +1318,7 @@ void RTFDocumentImpl::singleChar(sal_uInt8 nValue, bool bRunProps)
void RTFDocumentImpl::text(OUString& rString)
{
- if (rString.getLength() == 1 && m_aStates.top().eDestination != Destination::DOCCOMM)
+ if (rString.getLength() == 1 && m_aStates.top().getDestination() != Destination::DOCCOMM)
{
// No cheating! Tokenizer ignores bare \r and \n, their hex \'0d / \'0a form doesn't count, either.
sal_Unicode ch = rString[0];
@@ -1326,7 +1327,7 @@ void RTFDocumentImpl::text(OUString& rString)
}
bool bRet = true;
- switch (m_aStates.top().eDestination)
+ switch (m_aStates.top().getDestination())
{
// Note: in fonttbl there may or may not be groups; in stylesheet
// and revtbl groups are mandatory
@@ -1349,7 +1350,7 @@ void RTFDocumentImpl::text(OUString& rString)
// always clear, necessary in case of group-less fonttable
OUString const aName
= m_aStates.top().getCurrentDestinationText()->makeStringAndClear();
- switch (m_aStates.top().eDestination)
+ switch (m_aStates.top().getDestination())
{
case Destination::FONTTABLE:
case Destination::FONTENTRY:
@@ -1489,7 +1490,7 @@ void RTFDocumentImpl::text(OUString& rString)
checkNeedPap();
// Don't return earlier, a bookmark start has to be in a paragraph group.
- if (m_aStates.top().eDestination == Destination::BOOKMARKSTART)
+ if (m_aStates.top().getDestination() == Destination::BOOKMARKSTART)
{
m_aStates.top().appendDestinationText(rString);
return;
@@ -1497,7 +1498,7 @@ void RTFDocumentImpl::text(OUString& rString)
RTFBuffer_t* pCurrentBuffer = m_aStates.top().getCurrentBuffer();
- if (!pCurrentBuffer && m_aStates.top().eDestination != Destination::FOOTNOTE)
+ if (!pCurrentBuffer && m_aStates.top().getDestination() != Destination::FOOTNOTE)
Mapper().startCharacterGroup();
else if (pCurrentBuffer)
{
@@ -1505,9 +1506,9 @@ void RTFDocumentImpl::text(OUString& rString)
pCurrentBuffer->push_back(Buf_t(BUFFER_STARTRUN, pValue, nullptr));
}
- if (m_aStates.top().eDestination == Destination::NORMAL
- || m_aStates.top().eDestination == Destination::FIELDRESULT
- || m_aStates.top().eDestination == Destination::SHAPETEXT)
+ if (m_aStates.top().getDestination() == Destination::NORMAL
+ || m_aStates.top().getDestination() == Destination::FIELDRESULT
+ || m_aStates.top().getDestination() == Destination::SHAPETEXT)
runProps();
if (!pCurrentBuffer)
@@ -1520,7 +1521,7 @@ void RTFDocumentImpl::text(OUString& rString)
m_bNeedCr = true;
- if (!pCurrentBuffer && m_aStates.top().eDestination != Destination::FOOTNOTE)
+ if (!pCurrentBuffer && m_aStates.top().getDestination() != Destination::FOOTNOTE)
Mapper().endCharacterGroup();
else if (pCurrentBuffer)
{
@@ -1736,7 +1737,7 @@ void RTFDocumentImpl::resetTableRowProperties()
m_aStates.top().getTableRowSprms().set(NS_ooxml::LN_CT_TblGridBase_gridCol, new RTFValue(-1),
RTFOverwrite::NO_APPEND);
m_aStates.top().getTableRowAttributes() = m_aDefaultState.getTableRowAttributes();
- if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().eDestination)
+ if (Destination::NESTEDTABLEPROPERTIES == m_aStates.top().getDestination())
{
m_nNestedTRLeft = 0;
m_nNestedCurrentCellX = 0;
@@ -1950,7 +1951,7 @@ RTFError RTFDocumentImpl::pushState()
// fdo#85812 group resets run type of _current_ and new state (but not RTL)
m_aStates.top().setRunType(RTFParserState::RunType::LOCH);
- if (m_aStates.top().eDestination == Destination::MR)
+ if (m_aStates.top().getDestination() == Destination::MR)
lcl_DestinationToMath(m_aStates.top().getCurrentDestinationText(), m_aMathBuffer,
m_bMathNor);
m_aStates.push(m_aStates.top());
@@ -1959,17 +1960,17 @@ RTFError RTFDocumentImpl::pushState()
m_pTokenizer->pushGroup();
- switch (m_aStates.top().eDestination)
+ switch (m_aStates.top().getDestination())
{
case Destination::FONTTABLE:
// this is a "faked" destination for the font entry
m_aStates.top().setCurrentDestinationText(&m_aStates.top().getDestinationText());
- m_aStates.top().eDestination = Destination::FONTENTRY;
+ m_aStates.top().setDestination(Destination::FONTENTRY);
break;
case Destination::STYLESHEET:
// this is a "faked" destination for the style sheet entry
m_aStates.top().setCurrentDestinationText(&m_aStates.top().getDestinationText());
- m_aStates.top().eDestination = Destination::STYLEENTRY;
+ m_aStates.top().setDestination(Destination::STYLEENTRY);
{
// the *default* is \s0 i.e. paragraph style default
// this will be overwritten by \sN \csN \dsN \tsN
@@ -1983,7 +1984,7 @@ RTFError RTFDocumentImpl::pushState()
case Destination::FORMFIELD:
case Destination::FIELDINSTRUCTION:
case Destination::PICT:
- m_aStates.top().eDestination = Destination::NORMAL;
+ m_aStates.top().setDestination(Destination::NORMAL);
break;
case Destination::MNUM:
case Destination::MDEN:
@@ -1994,12 +1995,12 @@ RTFError RTFDocumentImpl::pushState()
case Destination::MSUP:
case Destination::MDEG:
case Destination::MOMATH:
- m_aStates.top().eDestination = Destination::MR;
+ m_aStates.top().setDestination(Destination::MR);
break;
case Destination::REVISIONTABLE:
// this is a "faked" destination for the revision table entry
m_aStates.top().setCurrentDestinationText(&m_aStates.top().getDestinationText());
- m_aStates.top().eDestination = Destination::REVISIONENTRY;
+ m_aStates.top().setDestination(Destination::REVISIONENTRY);
break;
default:
break;
@@ -2151,7 +2152,7 @@ RTFError RTFDocumentImpl::popState()
}
}
- switch (aState.eDestination)
+ switch (aState.getDestination())
{
case Destination::FONTTABLE:
{
@@ -2283,7 +2284,7 @@ RTFError RTFDocumentImpl::popState()
if (m_aStates.size() > 1)
// Current destination is levelnumbers and parent destination is levelnumbers as well.
bNestedLevelNumbers
- = m_aStates[m_aStates.size() - 2].eDestination == Destination::LEVELNUMBERS;
+ = m_aStates[m_aStates.size() - 2].getDestination() == Destination::LEVELNUMBERS;
if (!bNestedLevelNumbers && aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_lvlText))
{
RTFSprms& rAttributes
@@ -2346,7 +2347,8 @@ RTFError RTFDocumentImpl::popState()
case Destination::PICPROP:
case Destination::SHAPEINSTRUCTION:
if (m_aStates.size() > 1
- && m_aStates[m_aStates.size() - 2].eDestination == Destination::SHAPEINSTRUCTION)
+ && m_aStates[m_aStates.size() - 2].getDestination()
+ == Destination::SHAPEINSTRUCTION)
{
// Do not resolve shape if shape instruction destination is inside other shape instruction
}
@@ -2355,8 +2357,9 @@ RTFError RTFDocumentImpl::popState()
{
// Don't trigger a shape import in case we're only leaving the \shpinst of the groupshape itself.
RTFSdrImport::ShapeOrPict eType
- = (aState.eDestination == Destination::SHAPEINSTRUCTION) ? RTFSdrImport::SHAPE
- : RTFSdrImport::PICT;
+ = (aState.getDestination() == Destination::SHAPEINSTRUCTION)
+ ? RTFSdrImport::SHAPE
+ : RTFSdrImport::PICT;
if (!m_aStates.top().getCurrentBuffer() || eType != RTFSdrImport::SHAPE)
m_pSdrImport->resolve(m_aStates.top().getShape(), true, eType);
else
@@ -2430,7 +2433,7 @@ RTFError RTFDocumentImpl::popState()
break; // not for nested group
OUString str(m_aStates.top().getCurrentDestinationText()->makeStringAndClear());
// dmapper expects this as a field, so let's fake something...
- OUString const field((Destination::INDEXENTRY == aState.eDestination)
+ OUString const field((Destination::INDEXENTRY == aState.getDestination())
? OUStringLiteral("XE")
: OUStringLiteral("TC"));
str = field + " \"" + str.replaceAll("\"", "\\\"") + "\"";
@@ -2595,8 +2598,8 @@ RTFError RTFDocumentImpl::popState()
if (&m_aStates.top().getDestinationText()
!= m_aStates.top().getCurrentDestinationText())
break; // not for nested group
- OUString aName = aState.eDestination == Destination::OPERATOR ? OUString("Operator")
- : OUString("Company");
+ OUString aName = aState.getDestination() == Destination::OPERATOR ? OUString("Operator")
+ : OUString("Company");
uno::Any aValue
= uno::makeAny(m_aStates.top().getCurrentDestinationText()->makeStringAndClear());
if (m_xDocumentProperties.is())
@@ -2707,7 +2710,7 @@ RTFError RTFDocumentImpl::popState()
OUString aStr = m_aStates.top().getCurrentDestinationText()->makeStringAndClear();
auto pValue = new RTFValue(aStr.toInt32());
RTFSprms aAttributes;
- if (aState.eDestination == Destination::ANNOTATIONREFERENCESTART)
+ if (aState.getDestination() == Destination::ANNOTATIONREFERENCESTART)
aAttributes.set(NS_ooxml::LN_EG_RangeMarkupElements_commentRangeStart, pValue);
else
aAttributes.set(NS_ooxml::LN_EG_RangeMarkupElements_commentRangeEnd, pValue);
@@ -2878,7 +2881,7 @@ RTFError RTFDocumentImpl::popState()
case Destination::MGROW:
{
sal_Int32 nMathToken = 0;
- switch (aState.eDestination)
+ switch (aState.getDestination())
{
case Destination::MCHR:
nMathToken = M_TOKEN(chr);
@@ -3172,7 +3175,7 @@ RTFError RTFDocumentImpl::popState()
m_pTokenizer->popGroup();
// list table
- switch (aState.eDestination)
+ switch (aState.getDestination())
{
case Destination::LISTENTRY:
{
@@ -3295,7 +3298,7 @@ RTFError RTFDocumentImpl::popState()
aState.getTableAttributes().set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue);
auto pValue = new RTFValue(aState.getTableAttributes(), aState.getTableSprms());
- if (m_aStates.top().eDestination != Destination::LFOLEVEL)
+ if (m_aStates.top().getDestination() != Destination::LFOLEVEL)
m_aStates.top().getListLevelEntries().set(NS_ooxml::LN_CT_AbstractNum_lvl,
pValue, RTFOverwrite::NO_APPEND);
else
@@ -3317,7 +3320,7 @@ RTFError RTFDocumentImpl::popState()
case Destination::LISTOVERRIDEENTRY:
if (!m_aStates.empty())
{
- if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
+ if (m_aStates.top().getDestination() == Destination::LISTOVERRIDEENTRY)
{
// copy properties upwards so upper popState() inserts it
m_aStates.top().getTableAttributes() = aState.getTableAttributes();
@@ -3344,8 +3347,8 @@ RTFError RTFDocumentImpl::popState()
if (!m_aStates.empty())
{
m_aStates.top().getTableSprms() = aState.getTableSprms();
- if (m_aStates.top().eDestination == Destination::LEVELNUMBERS
- || m_aStates.top().eDestination == Destination::LISTLEVEL)
+ if (m_aStates.top().getDestination() == Destination::LEVELNUMBERS
+ || m_aStates.top().getDestination() == Destination::LISTLEVEL)
// Parent state is level number or list level, current state is
// level numbers: mark parent as invalid as well if necessary.
m_aStates.top().setLevelNumbersValid(aState.getLevelNumbersValid());
@@ -3353,14 +3356,14 @@ RTFError RTFDocumentImpl::popState()
break;
case Destination::FIELDINSTRUCTION:
if (!m_aStates.empty())
- m_aStates.top().eFieldStatus = RTFFieldStatus::INSTRUCTION;
+ m_aStates.top().setFieldStatus(RTFFieldStatus::INSTRUCTION);
break;
case Destination::FIELDRESULT:
if (!m_aStates.empty())
- m_aStates.top().eFieldStatus = RTFFieldStatus::RESULT;
+ m_aStates.top().setFieldStatus(RTFFieldStatus::RESULT);
break;
case Destination::FIELD:
- if (aState.eFieldStatus == RTFFieldStatus::INSTRUCTION)
+ if (aState.getFieldStatus() == RTFFieldStatus::INSTRUCTION)
singleChar(cFieldEnd);
break;
case Destination::SHAPEPROPERTYVALUEPICT:
@@ -3386,7 +3389,8 @@ RTFError RTFDocumentImpl::popState()
}
break;
case Destination::SHAPEINSTRUCTION:
- if (!m_aStates.empty() && m_aStates.top().eDestination == Destination::SHAPEINSTRUCTION)
+ if (!m_aStates.empty()
+ && m_aStates.top().getDestination() == Destination::SHAPEINSTRUCTION)
{
// Shape instruction inside other shape instruction: just copy new shape settings:
// it will be resolved on end of topmost shape instruction destination
@@ -3402,8 +3406,8 @@ RTFError RTFDocumentImpl::popState()
if (!m_aStates.empty())
{
m_aStates.top().getFrame() = aState.getFrame();
- if (aState.eDestination == Destination::SHPPICT
- && m_aStates.top().eDestination == Destination::LISTPICTURE)
+ if (aState.getDestination() == Destination::SHPPICT
+ && m_aStates.top().getDestination() == Destination::LISTPICTURE)
{
RTFSprms aAttributes;
aAttributes.set(NS_ooxml::LN_CT_NumPicBullet_numPicBulletId,
@@ -3421,7 +3425,7 @@ RTFError RTFDocumentImpl::popState()
if (!m_aStates.empty())
{
// If we're leaving the shapetext group (it may have nested ones) and this is a shape, not an old drawingobject.
- if (m_aStates.top().eDestination != Destination::SHAPETEXT
+ if (m_aStates.top().getDestination() != Destination::SHAPETEXT
&& !m_aStates.top().getDrawingObject().getHadShapeText())
{
m_aStates.top().setHadShapeText(true);
@@ -3447,12 +3451,12 @@ RTFError RTFDocumentImpl::popState()
}
break;
case Destination::PROPNAME:
- if (m_aStates.top().eDestination == Destination::USERPROPS)
+ if (m_aStates.top().getDestination() == Destination::USERPROPS)
m_aStates.top().setPropName(aState.getPropName());
break;
default:
{
- if (!m_aStates.empty() && m_aStates.top().eDestination == Destination::PICT)
+ if (!m_aStates.empty() && m_aStates.top().getDestination() == Destination::PICT)
m_aStates.top().getPicture() = aState.getPicture();
}
break;
@@ -3511,11 +3515,11 @@ void RTFDocumentImpl::setInternalState(RTFInternalState nInternalState)
m_aStates.top().nInternalState = nInternalState;
}
-Destination RTFDocumentImpl::getDestination() { return m_aStates.top().eDestination; }
+Destination RTFDocumentImpl::getDestination() { return m_aStates.top().getDestination(); }
void RTFDocumentImpl::setDestination(Destination eDestination)
{
- m_aStates.top().eDestination = eDestination;
+ m_aStates.top().setDestination(eDestination);
}
// this is a questionably named method that is used only in a very special
@@ -3540,7 +3544,7 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
if (bHex && !m_aHexBuffer.isEmpty())
{
rtl_TextEncoding nEncoding = m_aStates.top().getCurrentEncoding();
- if (m_aStates.top().eDestination == Destination::FONTENTRY
+ if (m_aStates.top().getDestination() == Destination::FONTENTRY
&& m_aStates.top().getCurrentEncoding() == RTL_TEXTENCODING_SYMBOL)
nEncoding = RTL_TEXTENCODING_MS_1252;
OUString aString = OStringToOUString(m_aHexBuffer.makeStringAndClear(), nEncoding);
@@ -3551,9 +3555,9 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl)
: m_pDocumentImpl(pDocumentImpl)
, nInternalState(RTFInternalState::NORMAL)
- , eDestination(Destination::NORMAL)
- , eFieldStatus(RTFFieldStatus::NONE)
- , nBorderState(RTFBorderState::NONE)
+ , m_eDestination(Destination::NORMAL)
+ , m_eFieldStatus(RTFFieldStatus::NONE)
+ , m_nBorderState(RTFBorderState::NONE)
, m_nCurrentEncoding(rtl_getTextEncodingFromWindowsCharset(0))
, m_nUc(1)
, m_nCharsToSkip(0)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 7e404a765d79..bcbbbdf34227 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -515,14 +515,20 @@ public:
RTFSprms& getCharacterSprms() { return m_aCharacterSprms; }
RTFSprms& getTableAttributes() { return m_aTableAttributes; }
RTFSprms& getTableSprms() { return m_aTableSprms; }
+ void setBorderState(RTFBorderState nBorderState) { m_nBorderState = nBorderState; }
+ RTFBorderState getBorderState() const { return m_nBorderState; }
+ void setFieldStatus(RTFFieldStatus eFieldStatus) { m_eFieldStatus = eFieldStatus; }
+ RTFFieldStatus getFieldStatus() const { return m_eFieldStatus; }
+ void setDestination(Destination eDestination) { m_eDestination = eDestination; }
+ Destination getDestination() const { return m_eDestination; }
RTFDocumentImpl* m_pDocumentImpl;
RTFInternalState nInternalState;
- Destination eDestination;
- RTFFieldStatus eFieldStatus;
- RTFBorderState nBorderState;
private:
+ Destination m_eDestination;
+ RTFFieldStatus m_eFieldStatus;
+ RTFBorderState m_nBorderState;
// font table, stylesheet table
RTFSprms m_aTableSprms;
RTFSprms m_aTableAttributes;
commit 7fc54a819cf558b2c9cbeaaf3213d400c5f11a19
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri May 17 21:46:03 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon May 20 10:07:08 2019 +0200
writerfilter: make RTFParserState members private, part 9
Change-Id: Ia9f2508b3e9d5087cb4cfe0724b90b220d3a3550
Reviewed-on: https://gerrit.libreoffice.org/72562
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index 74f7d5a9454d..bfb52e741e08 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -132,7 +132,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
break;
case RTF_LFOLEVEL:
m_aStates.top().eDestination = Destination::LFOLEVEL;
- m_aStates.top().aTableSprms.clear();
+ m_aStates.top().getTableSprms().clear();
break;
case RTF_LISTOVERRIDETABLE:
m_aStates.top().eDestination = Destination::LISTOVERRIDETABLE;
@@ -304,7 +304,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
if (bCustomMark)
{
m_aStates.top().getCharacterAttributes().clear();
- m_aStates.top().aCharacterSprms.clear();
+ m_aStates.top().getCharacterSprms().clear();
auto pValue = new RTFValue(1);
m_aStates.top().getCharacterAttributes().set(
NS_ooxml::LN_CT_FtnEdnRef_customMarkFollows, pValue);
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index 199f3068283b..6f9379b54d30 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -469,7 +469,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
break;
case RTF_PLAIN:
{
- m_aStates.top().aCharacterSprms = getDefaultState().aCharacterSprms;
+ m_aStates.top().getCharacterSprms() = getDefaultState().getCharacterSprms();
m_aStates.top().setCurrentEncoding(getEncoding(getFontIndex(m_nDefaultFontIndex)));
m_aStates.top().getCharacterAttributes() = getDefaultState().getCharacterAttributes();
m_aStates.top().setCurrentCharacterStyleIndex(-1);
@@ -694,7 +694,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
{
RTFSprms aAttributes;
auto pValue = new RTFValue(aAttributes);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_bdr, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_bdr, pValue);
m_aStates.top().nBorderState = RTFBorderState::CHARACTER;
}
break;
@@ -789,13 +789,13 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates.top().setCurrentBuffer(&m_aSuperBuffer);
auto pValue = new RTFValue("superscript");
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue);
}
break;
case RTF_SUB:
{
auto pValue = new RTFValue("subscript");
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_vertAlign, pValue);
}
break;
case RTF_NOSUPERSUB:
@@ -805,7 +805,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
replayBuffer(m_aSuperBuffer, nullptr, nullptr);
m_aStates.top().setCurrentBuffer(nullptr);
}
- m_aStates.top().aCharacterSprms.erase(NS_ooxml::LN_EG_RPrBase_vertAlign);
+ m_aStates.top().getCharacterSprms().erase(NS_ooxml::LN_EG_RPrBase_vertAlign);
}
break;
case RTF_LINEPPAGE:
@@ -1080,19 +1080,20 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_PNLVLBODY:
{
auto pValue = new RTFValue(2);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_AbstractNum_nsid, pValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid, pValue);
}
break;
case RTF_PNDEC:
{
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_decimal);
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_numFmt, pValue);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_numFmt, pValue);
}
break;
case RTF_PNLVLBLT:
{
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_AbstractNum_nsid, new RTFValue(1));
- m_aStates.top().aTableSprms.set(
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid,
+ new RTFValue(1));
+ m_aStates.top().getTableSprms().set(
NS_ooxml::LN_CT_Lvl_numFmt,
new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_bullet));
}
@@ -1152,7 +1153,8 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_mirrorMargins, new RTFValue(1));
break;
case RTF_SAUTOUPD:
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_autoRedefine, new RTFValue(1));
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Style_autoRedefine,
+ new RTFValue(1));
break;
case RTF_WIDOWCTRL:
m_aSettingsTableSprms.set(NS_ooxml::LN_CT_Settings_widowControl, new RTFValue(1));
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
index 989bf48829a9..5c8d2c29d401 100644
--- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx
@@ -186,7 +186,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
m_aStates.top().getParagraphSprms());
bufferProperties(m_aTableBufferStack.back(), pPValue, nullptr);
auto pCValue = new RTFValue(m_aStates.top().getCharacterAttributes(),
- m_aStates.top().aCharacterSprms);
+ m_aStates.top().getCharacterSprms());
bufferProperties(m_aTableBufferStack.back(), pCValue, nullptr);
}
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index f15a505931a1..bf2a550abe13 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -156,7 +156,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
if (nSprm > 0)
{
- m_aStates.top().aTableSprms.set(nSprm, pIntValue);
+ m_aStates.top().getTableSprms().set(nSprm, pIntValue);
return RTFError::OK;
}
// Trivial character sprms.
@@ -183,7 +183,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
if (nSprm > 0)
{
- m_aStates.top().aCharacterSprms.set(nSprm, pIntValue);
+ m_aStates.top().getCharacterSprms().set(nSprm, pIntValue);
return RTFError::OK;
}
// Trivial character attributes.
@@ -216,7 +216,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
LanguageTag aTag((LanguageType(static_cast<sal_uInt16>(nParam))));
auto pValue = new RTFValue(aTag.getBcp47());
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_lang, nSprm,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_EG_RPrBase_lang, nSprm,
pValue);
// Language is a character property, but we should store it at a paragraph level as well for fields.
if (nKeyword == RTF_LANG && m_bNeedPap)
@@ -362,16 +362,16 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
aFontAttributes.set(nSprm, new RTFValue(m_aFontNames[getFontIndex(nParam)]));
RTFSprms aRunPropsSprms;
aRunPropsSprms.set(NS_ooxml::LN_EG_RPrBase_rFonts, new RTFValue(aFontAttributes));
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_rPr,
- new RTFValue(RTFSprms(), aRunPropsSprms),
- RTFOverwrite::NO_APPEND);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_rPr,
+ new RTFValue(RTFSprms(), aRunPropsSprms),
+ RTFOverwrite::NO_APPEND);
}
else
{
m_nCurrentFontIndex = getFontIndex(nParam);
auto pValue = new RTFValue(getFontName(m_nCurrentFontIndex));
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
- nSprm, pValue);
+ putNestedAttribute(m_aStates.top().getCharacterSprms(),
+ NS_ooxml::LN_EG_RPrBase_rFonts, nSprm, pValue);
if (nKeyword == RTF_F)
m_aStates.top().setCurrentEncoding(getEncoding(m_nCurrentFontIndex));
}
@@ -425,8 +425,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
RTFSprms aAttributes;
auto pValue = new RTFValue(sal_uInt32(getColorTable(nParam)));
aAttributes.set(NS_ooxml::LN_CT_Color_val, pValue);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_color,
- new RTFValue(aAttributes));
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_color,
+ new RTFValue(aAttributes));
}
break;
case RTF_S:
@@ -438,8 +438,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_StyleType_paragraph);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type,
- pValue); // paragraph style
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
+ pValue); // paragraph style
}
else
{
@@ -447,8 +447,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
if (!aName.isEmpty())
{
if (m_aStates.top().eDestination == Destination::LISTLEVEL)
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_pStyle,
- new RTFValue(aName));
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_pStyle,
+ new RTFValue(aName));
else
m_aStates.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle,
new RTFValue(aName));
@@ -463,15 +463,15 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_StyleType_character);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type,
- pValue); // character style
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
+ pValue); // character style
}
else
{
OUString aName = getStyleName(nParam);
if (!aName.isEmpty())
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_rStyle,
- new RTFValue(aName));
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_rStyle,
+ new RTFValue(aName));
}
break;
case RTF_DS:
@@ -480,8 +480,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
m_nCurrentStyleIndex = nParam;
auto pValue = new RTFValue(0); // TODO no value in enum StyleType?
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type,
- pValue); // section style
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
+ pValue); // section style
}
break;
case RTF_TS:
@@ -491,8 +491,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_nCurrentStyleIndex = nParam;
// FIXME the correct value would be NS_ooxml::LN_Value_ST_StyleType_table but maybe table styles mess things up in dmapper, be cautious and disable them for now
auto pValue = new RTFValue(0);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type,
- pValue); // table style
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type,
+ pValue); // table style
}
break;
case RTF_DEFF:
@@ -503,7 +503,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
LanguageTag aTag((LanguageType(static_cast<sal_uInt16>(nParam))));
auto pValue = new RTFValue(aTag.getBcp47());
- putNestedAttribute(m_aStates.top().aCharacterSprms,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(),
(nKeyword == RTF_DEFLANG ? NS_ooxml::LN_EG_RPrBase_lang
: NS_ooxml::LN_CT_Language_bidi),
nSprm, pValue);
@@ -512,7 +512,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_CHCBPAT:
{
auto pValue = new RTFValue(sal_uInt32(nParam ? getColorTable(nParam) : COL_AUTO));
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_shd,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_EG_RPrBase_shd,
NS_ooxml::LN_CT_Shd_fill, pValue);
}
break;
@@ -535,20 +535,20 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_ULC:
{
auto pValue = new RTFValue(sal_uInt32(getColorTable(nParam)));
- m_aStates.top().aCharacterSprms.set(0x6877, pValue);
+ m_aStates.top().getCharacterSprms().set(0x6877, pValue);
}
break;
case RTF_HIGHLIGHT:
{
auto pValue = new RTFValue(sal_uInt32(nParam ? getColorTable(nParam) : COL_AUTO));
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_highlight, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_highlight, pValue);
}
break;
case RTF_UP:
case RTF_DN:
{
auto pValue = new RTFValue(nParam * (nKeyword == RTF_UP ? 1 : -1));
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_position, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_position, pValue);
}
break;
case RTF_HORZVERT:
@@ -566,7 +566,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
// Convert quarter-points to twentieths of a point
auto pValue = new RTFValue(nParam * 5);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_spacing, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_spacing, pValue);
}
break;
case RTF_TWOINONE:
@@ -647,7 +647,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aStates.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_pos, pIntValue);
auto pValue = new RTFValue(m_aStates.top().getTabAttributes());
if (m_aStates.top().eDestination == Destination::LISTLEVEL)
- putNestedSprm(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_tabs,
+ putNestedSprm(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_tabs,
NS_ooxml::LN_CT_Tabs_tab, pValue);
else
putNestedSprm(m_aStates.top().getParagraphSprms(), NS_ooxml::LN_CT_PPrBase_tabs,
@@ -665,10 +665,10 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_LISTID:
{
if (m_aStates.top().eDestination == Destination::LISTENTRY)
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_AbstractNum_abstractNumId,
- pIntValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_abstractNumId,
+ pIntValue);
else if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Num_abstractNumId, pIntValue);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Num_abstractNumId, pIntValue);
m_aStates.top().setCurrentListIndex(nParam);
}
break;
@@ -676,7 +676,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
{
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_AbstractNum_nsid, pIntValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid,
+ pIntValue);
m_aStates.top().setCurrentListOverrideIndex(nParam);
}
else
@@ -729,7 +730,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
}
if (!sValue.isEmpty())
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_suff, new RTFValue(sValue));
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_suff, new RTFValue(sValue));
}
break;
case RTF_FPRQ:
@@ -751,8 +752,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
RTFSprms aAttributes;
aAttributes.set(NS_ooxml::LN_CT_Pitch_val, new RTFValue(nValue));
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Font_pitch,
- new RTFValue(aAttributes));
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Font_pitch,
+ new RTFValue(aAttributes));
}
}
break;
@@ -811,7 +812,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
auto pValue = new RTFValue(nValue);
RTFValue::Pointer_t pTight
- = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_EG_WrapType_wrapTight);
+ = m_aStates.top().getCharacterSprms().find(NS_ooxml::LN_EG_WrapType_wrapTight);
if (pTight)
pTight->getAttributes().set(NS_ooxml::LN_CT_WrapTight_wrapText, pValue);
else
@@ -831,13 +832,13 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
break;
case 3:
m_aStates.top().getShape().setWrap(text::WrapTextMode_THROUGH);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_WrapType_wrapNone,
- new RTFValue());
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_WrapType_wrapNone,
+ new RTFValue());
break;
case 4:
m_aStates.top().getShape().setWrap(text::WrapTextMode_PARALLEL);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_WrapType_wrapTight,
- new RTFValue());
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_WrapType_wrapTight,
+ new RTFValue());
break;
case 5:
m_aStates.top().getShape().setWrap(text::WrapTextMode_THROUGH);
@@ -1065,7 +1066,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_REVAUTHDEL:
{
auto pValue = new RTFValue(m_aAuthors[nParam]);
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_trackchange,
NS_ooxml::LN_CT_TrackChange_author, pValue);
}
break;
@@ -1075,7 +1076,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
OUString aStr(
OStringToOUString(DTTM22OString(nParam), m_aStates.top().getCurrentEncoding()));
auto pValue = new RTFValue(aStr);
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_trackchange,
NS_ooxml::LN_CT_TrackChange_date, pValue);
}
break;
@@ -1239,14 +1240,14 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
m_aStates.top().getDrawingObject().setBottom(convertTwipToMm100(nParam));
break;
case RTF_PNSTART:
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_start, pIntValue);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_start, pIntValue);
break;
case RTF_PNF:
{
auto pValue = new RTFValue(m_aFontNames[getFontIndex(nParam)]);
RTFSprms aAttributes;
aAttributes.set(NS_ooxml::LN_CT_Fonts_ascii, pValue);
- putNestedSprm(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_Lvl_rPr,
+ putNestedSprm(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_Lvl_rPr,
NS_ooxml::LN_EG_RPrBase_rFonts, new RTFValue(aAttributes));
}
break;
@@ -1509,7 +1510,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
if (m_aStates.top().eDestination == Destination::LISTLEVEL)
{
if (m_aStates.top().getLevelNumbersValid())
- putNestedAttribute(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_ind,
+ putNestedAttribute(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_ind,
NS_ooxml::LN_CT_Ind_firstLine, pIntValue);
else
m_aInvalidListLevelFirstIndents[m_nListLevel] = nParam;
@@ -1524,7 +1525,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
if (m_aStates.top().eDestination == Destination::LISTLEVEL)
{
if (m_aStates.top().getLevelNumbersValid())
- putNestedAttribute(m_aStates.top().aTableSprms, NS_ooxml::LN_CT_PPrBase_ind,
+ putNestedAttribute(m_aStates.top().getTableSprms(), NS_ooxml::LN_CT_PPrBase_ind,
NS_ooxml::LN_CT_Ind_left, pIntValue);
}
else
@@ -1620,8 +1621,8 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
}
if (nId > 0)
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_effect,
- new RTFValue(nId));
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_effect,
+ new RTFValue(nId));
break;
}
case RTF_VIEWBKSP:
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 1908fb010adc..dfb4338c711e 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -168,7 +168,7 @@ void putBorderProperty(RTFStack& aStates, Id nId, const RTFValue::Pointer_t& pVa
else if (aStates.top().nBorderState == RTFBorderState::CHARACTER)
{
RTFValue::Pointer_t pPointer
- = aStates.top().aCharacterSprms.find(NS_ooxml::LN_EG_RPrBase_bdr);
+ = aStates.top().getCharacterSprms().find(NS_ooxml::LN_EG_RPrBase_bdr);
if (pPointer)
{
RTFSprms& rAttributes = pPointer->getAttributes();
@@ -394,13 +394,13 @@ void RTFDocumentImpl::checkFirstRun()
// set the requested default font, if there are none
RTFValue::Pointer_t pFont
- = getNestedAttribute(m_aDefaultState.aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
- NS_ooxml::LN_CT_Fonts_ascii);
+ = getNestedAttribute(m_aDefaultState.getCharacterSprms(),
+ NS_ooxml::LN_EG_RPrBase_rFonts, NS_ooxml::LN_CT_Fonts_ascii);
RTFValue::Pointer_t pCurrentFont
- = getNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
- NS_ooxml::LN_CT_Fonts_ascii);
+ = getNestedAttribute(m_aStates.top().getCharacterSprms(),
+ NS_ooxml::LN_EG_RPrBase_rFonts, NS_ooxml::LN_CT_Fonts_ascii);
if (pFont && !pCurrentFont)
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_EG_RPrBase_rFonts,
NS_ooxml::LN_CT_Fonts_ascii, pFont);
}
}
@@ -592,25 +592,25 @@ void RTFDocumentImpl::runProps()
if (!m_aStates.top().getCurrentBuffer())
{
Reference<Properties>::Pointer_t const pProperties = getProperties(
- m_aStates.top().getCharacterAttributes(), m_aStates.top().aCharacterSprms,
+ m_aStates.top().getCharacterAttributes(), m_aStates.top().getCharacterSprms(),
NS_ooxml::LN_Value_ST_StyleType_character);
Mapper().props(pProperties);
}
else
{
auto pValue = new RTFValue(m_aStates.top().getCharacterAttributes(),
- m_aStates.top().aCharacterSprms);
+ m_aStates.top().getCharacterSprms());
bufferProperties(*m_aStates.top().getCurrentBuffer(), pValue, nullptr);
}
// Delete the sprm, so the trackchange range will be started only once.
// OTOH set a boolean flag, so we'll know we need to end the range later.
RTFValue::Pointer_t pTrackchange
- = m_aStates.top().aCharacterSprms.find(NS_ooxml::LN_trackchange);
+ = m_aStates.top().getCharacterSprms().find(NS_ooxml::LN_trackchange);
if (pTrackchange)
{
m_aStates.top().setStartedTrackchange(true);
- m_aStates.top().aCharacterSprms.erase(NS_ooxml::LN_trackchange);
+ m_aStates.top().getCharacterSprms().erase(NS_ooxml::LN_trackchange);
}
}
@@ -1081,7 +1081,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
aAnchorWrapAttributes.set(rCharacterAttribute.first, rCharacterAttribute.second);
}
sal_Int32 nWrap = -1;
- for (auto& rCharacterSprm : m_aStates.top().aCharacterSprms)
+ for (auto& rCharacterSprm : m_aStates.top().getCharacterSprms())
{
if (rCharacterSprm.first == NS_ooxml::LN_EG_WrapType_wrapNone
|| rCharacterSprm.first == NS_ooxml::LN_EG_WrapType_wrapTight)
@@ -1360,12 +1360,12 @@ void RTFDocumentImpl::text(OUString& rString)
m_aFontEncodings[m_nCurrentFontIndex] = m_nCurrentEncoding;
m_nCurrentEncoding = -1;
}
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Font_name,
- new RTFValue(aName));
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Font_name,
+ new RTFValue(aName));
writerfilter::Reference<Properties>::Pointer_t const pProp(
- new RTFReferenceProperties(m_aStates.top().aTableAttributes,
- m_aStates.top().aTableSprms));
+ new RTFReferenceProperties(m_aStates.top().getTableAttributes(),
+ m_aStates.top().getTableSprms()));
//See fdo#47347 initial invalid font entry properties are inserted first,
//so when we attempt to insert the correct ones, there's already an
@@ -1382,16 +1382,16 @@ void RTFDocumentImpl::text(OUString& rString)
case Destination::STYLEENTRY:
{
RTFValue::Pointer_t pType
- = m_aStates.top().aTableAttributes.find(NS_ooxml::LN_CT_Style_type);
+ = m_aStates.top().getTableAttributes().find(NS_ooxml::LN_CT_Style_type);
if (pType)
{
// Word strips whitespace around style names.
m_aStyleNames[m_nCurrentStyleIndex] = aName.trim();
m_aStyleTypes[m_nCurrentStyleIndex] = pType->getInt();
auto pValue = new RTFValue(aName.trim());
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_styleId,
- pValue);
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_name, pValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_styleId,
+ pValue);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Style_name, pValue);
writerfilter::Reference<Properties>::Pointer_t const pProp(
createStyleProperties());
@@ -1839,7 +1839,7 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
if (nSprm >= 0)
{
auto pValue = new RTFValue((!bParam || nParam != 0) ? nSprm : 0);
- m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_em, pValue);
+ m_aStates.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_em, pValue);
return RTFError::OK;
}
@@ -1889,7 +1889,7 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
}
if (nSprm >= 0)
{
- m_aStates.top().aCharacterSprms.set(nSprm, pBoolValue);
+ m_aStates.top().getCharacterSprms().set(nSprm, pBoolValue);
return RTFError::OK;
}
@@ -1903,7 +1903,7 @@ RTFError RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int n
case RTF_REVISED:
{
auto pValue = new RTFValue(nKeyword == RTF_DELETED ? oox::XML_del : oox::XML_ins);
- putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange,
+ putNestedAttribute(m_aStates.top().getCharacterSprms(), NS_ooxml::LN_trackchange,
NS_ooxml::LN_token, pValue);
}
break;
@@ -1975,7 +1975,7 @@ RTFError RTFDocumentImpl::pushState()
// this will be overwritten by \sN \csN \dsN \tsN
m_nCurrentStyleIndex = 0;
auto pValue = new RTFValue(NS_ooxml::LN_Value_ST_StyleType_paragraph);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type, pValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_Style_type, pValue);
}
break;
case Destination::FIELDRESULT:
@@ -2016,7 +2016,8 @@ RTFError RTFDocumentImpl::pushState()
writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::createStyleProperties()
{
int nBasedOn = 0;
- RTFValue::Pointer_t pBasedOn = m_aStates.top().aTableSprms.find(NS_ooxml::LN_CT_Style_basedOn);
+ RTFValue::Pointer_t pBasedOn
+ = m_aStates.top().getTableSprms().find(NS_ooxml::LN_CT_Style_basedOn);
if (pBasedOn)
nBasedOn = pBasedOn->getInt();
if (nBasedOn == 0)
@@ -2037,15 +2038,15 @@ writerfilter::Reference<Properties>::Pointer_t RTFDocumentImpl::createStylePrope
RTFValue::Pointer_t pParaProps = new RTFValue(m_aStates.top().getParagraphAttributes(),
m_aStates.top().getParagraphSprms());
- RTFValue::Pointer_t pCharProps
- = new RTFValue(m_aStates.top().getCharacterAttributes(), m_aStates.top().aCharacterSprms);
+ RTFValue::Pointer_t pCharProps = new RTFValue(m_aStates.top().getCharacterAttributes(),
+ m_aStates.top().getCharacterSprms());
// resetSprms will clean up this modification
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_pPr, pParaProps);
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Style_rPr, pCharProps);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Style_pPr, pParaProps);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Style_rPr, pCharProps);
- writerfilter::Reference<Properties>::Pointer_t const pProps(
- new RTFReferenceProperties(m_aStates.top().aTableAttributes, m_aStates.top().aTableSprms));
+ writerfilter::Reference<Properties>::Pointer_t const pProps(new RTFReferenceProperties(
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list