summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-05-17 21:46:03 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-20 10:07:08 +0200
commit7fc54a819cf558b2c9cbeaaf3213d400c5f11a19 (patch)
tree1d56c7711e37986a6db329dc557e3ca768fa4cb3
parentwriterfilter: make RTFParserState members private, part 8 (diff)
downloadcore-7fc54a819cf558b2c9cbeaaf3213d400c5f11a19.tar.gz
core-7fc54a819cf558b2c9cbeaaf3213d400c5f11a19.zip
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@collabora.com>
-rw-r--r--writerfilter/source/rtftok/rtfdispatchdestination.cxx4
-rw-r--r--writerfilter/source/rtftok/rtfdispatchflag.cxx22
-rw-r--r--writerfilter/source/rtftok/rtfdispatchsymbol.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfdispatchvalue.cxx99
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx136
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.hxx13
6 files changed, 143 insertions, 133 deletions
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(
+ m_aStates.top().getTableAttributes(), m_aStates.top().getTableSprms()));
return pProps;
}
@@ -2106,14 +2107,14 @@ RTFReferenceTable::Entries_t RTFDocumentImpl::deduplicateStyleTable()
void RTFDocumentImpl::resetSprms()
{
- m_aStates.top().aTableSprms.clear();
- m_aStates.top().aCharacterSprms.clear();
+ m_aStates.top().getTableSprms().clear();
+ m_aStates.top().getCharacterSprms().clear();
m_aStates.top().getParagraphSprms().clear();
}
void RTFDocumentImpl::resetAttributes()
{
- m_aStates.top().aTableAttributes.clear();
+ m_aStates.top().getTableAttributes().clear();
m_aStates.top().getCharacterAttributes().clear();
m_aStates.top().getParagraphAttributes().clear();
}
@@ -2160,8 +2161,9 @@ RTFError RTFDocumentImpl::popState()
if (m_nDefaultFontIndex >= 0)
{
auto pValue = new RTFValue(m_aFontNames[getFontIndex(m_nDefaultFontIndex)]);
- putNestedAttribute(m_aDefaultState.aCharacterSprms, NS_ooxml::LN_EG_RPrBase_rFonts,
- NS_ooxml::LN_CT_Fonts_ascii, pValue);
+ putNestedAttribute(m_aDefaultState.getCharacterSprms(),
+ NS_ooxml::LN_EG_RPrBase_rFonts, NS_ooxml::LN_CT_Fonts_ascii,
+ pValue);
}
}
break;
@@ -2187,8 +2189,8 @@ RTFError RTFDocumentImpl::popState()
break;
case Destination::LISTENTRY:
for (auto& rListLevelEntry : aState.getListLevelEntries())
- aState.aTableSprms.set(rListLevelEntry.first, rListLevelEntry.second,
- RTFOverwrite::NO_APPEND);
+ aState.getTableSprms().set(rListLevelEntry.first, rListLevelEntry.second,
+ RTFOverwrite::NO_APPEND);
break;
case Destination::FIELDINSTRUCTION:
{
@@ -2272,7 +2274,7 @@ RTFError RTFDocumentImpl::popState()
else
aValue = aStr;
auto pValue = new RTFValue(aValue, true);
- aState.aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
+ aState.getTableAttributes().set(NS_ooxml::LN_CT_LevelText_val, pValue);
}
break;
case Destination::LEVELNUMBERS:
@@ -2282,10 +2284,10 @@ RTFError RTFDocumentImpl::popState()
// Current destination is levelnumbers and parent destination is levelnumbers as well.
bNestedLevelNumbers
= m_aStates[m_aStates.size() - 2].eDestination == Destination::LEVELNUMBERS;
- if (!bNestedLevelNumbers && aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText))
+ if (!bNestedLevelNumbers && aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_lvlText))
{
RTFSprms& rAttributes
- = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText)->getAttributes();
+ = aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_lvlText)->getAttributes();
RTFValue::Pointer_t pValue = rAttributes.find(NS_ooxml::LN_CT_LevelText_val);
if (pValue && aState.getLevelNumbersValid())
{
@@ -2368,7 +2370,7 @@ RTFError RTFDocumentImpl::popState()
auto pValue = new RTFValue(m_aStates.top().getShape());
// Buffer wrap type.
- 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)
@@ -2732,7 +2734,7 @@ RTFError RTFDocumentImpl::popState()
break; // not for nested group
OUString aStr(m_aStates.top().getCurrentDestinationText()->makeStringAndClear());
auto pValue = new RTFValue(aStr);
- aState.aTableSprms.set(NS_ooxml::LN_CT_Font_altName, pValue);
+ aState.getTableSprms().set(NS_ooxml::LN_CT_Font_altName, pValue);
}
break;
case Destination::DRAWINGOBJECT:
@@ -3174,7 +3176,7 @@ RTFError RTFDocumentImpl::popState()
{
case Destination::LISTENTRY:
{
- auto pValue = new RTFValue(aState.aTableAttributes, aState.aTableSprms);
+ auto pValue = new RTFValue(aState.getTableAttributes(), aState.getTableSprms());
m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_abstractNum, pValue,
RTFOverwrite::NO_APPEND);
m_aListTable[aState.getCurrentListIndex()] = pValue;
@@ -3187,19 +3189,19 @@ RTFError RTFDocumentImpl::popState()
case Destination::PARAGRAPHNUMBERING:
{
RTFValue::Pointer_t pIdValue
- = aState.aTableAttributes.find(NS_ooxml::LN_CT_AbstractNum_nsid);
+ = aState.getTableAttributes().find(NS_ooxml::LN_CT_AbstractNum_nsid);
if (pIdValue.get() && !m_aStates.empty())
{
// Abstract numbering
RTFSprms aLeveltextAttributes;
OUString aTextValue;
RTFValue::Pointer_t pTextBefore
- = aState.aTableAttributes.find(NS_ooxml::LN_CT_LevelText_val);
+ = aState.getTableAttributes().find(NS_ooxml::LN_CT_LevelText_val);
if (pTextBefore)
aTextValue += pTextBefore->getString();
aTextValue += "%1";
RTFValue::Pointer_t pTextAfter
- = aState.aTableAttributes.find(NS_ooxml::LN_CT_LevelSuffix_val);
+ = aState.getTableAttributes().find(NS_ooxml::LN_CT_LevelSuffix_val);
if (pTextAfter)
aTextValue += pTextAfter->getString();
auto pTextValue = new RTFValue(aTextValue);
@@ -3210,18 +3212,20 @@ RTFError RTFDocumentImpl::popState()
auto pIlvlValue = new RTFValue(0);
aLevelAttributes.set(NS_ooxml::LN_CT_Lvl_ilvl, pIlvlValue);
- RTFValue::Pointer_t pFmtValue = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_numFmt);
+ RTFValue::Pointer_t pFmtValue
+ = aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_numFmt);
if (pFmtValue)
aLevelSprms.set(NS_ooxml::LN_CT_Lvl_numFmt, pFmtValue);
RTFValue::Pointer_t pStartatValue
- = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_start);
+ = aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_start);
if (pStartatValue)
aLevelSprms.set(NS_ooxml::LN_CT_Lvl_start, pStartatValue);
auto pLeveltextValue = new RTFValue(aLeveltextAttributes);
aLevelSprms.set(NS_ooxml::LN_CT_Lvl_lvlText, pLeveltextValue);
- RTFValue::Pointer_t pRunProps = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_rPr);
+ RTFValue::Pointer_t pRunProps
+ = aState.getTableSprms().find(NS_ooxml::LN_CT_Lvl_rPr);
if (pRunProps)
aLevelSprms.set(NS_ooxml::LN_CT_Lvl_rPr, pRunProps);
@@ -3271,7 +3275,7 @@ RTFError RTFDocumentImpl::popState()
{
// FIXME: don't use pDestinationText, points to popped state
auto pValue = new RTFValue(aState.getDestinationText().makeStringAndClear(), true);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelSuffix_val, pValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_LevelSuffix_val, pValue);
}
break;
case Destination::PARAGRAPHNUMBERING_TEXTBEFORE:
@@ -3279,7 +3283,7 @@ RTFError RTFDocumentImpl::popState()
{
// FIXME: don't use pDestinationText, points to popped state
auto pValue = new RTFValue(aState.getDestinationText().makeStringAndClear(), true);
- m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_LevelText_val, pValue);
+ m_aStates.top().getTableAttributes().set(NS_ooxml::LN_CT_LevelText_val, pValue);
}
break;
case Destination::LISTNAME:
@@ -3288,25 +3292,25 @@ RTFError RTFDocumentImpl::popState()
if (!m_aStates.empty())
{
auto pInnerValue = new RTFValue(m_aStates.top().getListLevelNum()++);
- aState.aTableAttributes.set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue);
+ aState.getTableAttributes().set(NS_ooxml::LN_CT_Lvl_ilvl, pInnerValue);
- auto pValue = new RTFValue(aState.aTableAttributes, aState.aTableSprms);
+ auto pValue = new RTFValue(aState.getTableAttributes(), aState.getTableSprms());
if (m_aStates.top().eDestination != Destination::LFOLEVEL)
m_aStates.top().getListLevelEntries().set(NS_ooxml::LN_CT_AbstractNum_lvl,
pValue, RTFOverwrite::NO_APPEND);
else
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_NumLvl_lvl, pValue);
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_NumLvl_lvl, pValue);
}
break;
case Destination::LFOLEVEL:
if (!m_aStates.empty())
{
auto pInnerValue = new RTFValue(m_aStates.top().getListLevelNum()++);
- aState.aTableAttributes.set(NS_ooxml::LN_CT_NumLvl_ilvl, pInnerValue);
+ aState.getTableAttributes().set(NS_ooxml::LN_CT_NumLvl_ilvl, pInnerValue);
- auto pValue = new RTFValue(aState.aTableAttributes, aState.aTableSprms);
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Num_lvlOverride, pValue,
- RTFOverwrite::NO_APPEND);
+ auto pValue = new RTFValue(aState.getTableAttributes(), aState.getTableSprms());
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Num_lvlOverride, pValue,
+ RTFOverwrite::NO_APPEND);
}
break;
// list override table
@@ -3316,12 +3320,12 @@ RTFError RTFDocumentImpl::popState()
if (m_aStates.top().eDestination == Destination::LISTOVERRIDEENTRY)
{
// copy properties upwards so upper popState() inserts it
- m_aStates.top().aTableAttributes = aState.aTableAttributes;
- m_aStates.top().aTableSprms = aState.aTableSprms;
+ m_aStates.top().getTableAttributes() = aState.getTableAttributes();
+ m_aStates.top().getTableSprms() = aState.getTableSprms();
}
else
{
- auto pValue = new RTFValue(aState.aTableAttributes, aState.aTableSprms);
+ auto pValue = new RTFValue(aState.getTableAttributes(), aState.getTableSprms());
m_aListTableSprms.set(NS_ooxml::LN_CT_Numbering_num, pValue,
RTFOverwrite::NO_APPEND);
m_aListOverrideTable[aState.getCurrentListOverrideIndex()]
@@ -3332,14 +3336,14 @@ RTFError RTFDocumentImpl::popState()
case Destination::LEVELTEXT:
if (!m_aStates.empty())
{
- auto pValue = new RTFValue(aState.aTableAttributes);
- m_aStates.top().aTableSprms.set(NS_ooxml::LN_CT_Lvl_lvlText, pValue);
+ auto pValue = new RTFValue(aState.getTableAttributes());
+ m_aStates.top().getTableSprms().set(NS_ooxml::LN_CT_Lvl_lvlText, pValue);
}
break;
case Destination::LEVELNUMBERS:
if (!m_aStates.empty())
{
- m_aStates.top().aTableSprms = aState.aTableSprms;
+ m_aStates.top().getTableSprms() = aState.getTableSprms();
if (m_aStates.top().eDestination == Destination::LEVELNUMBERS
|| m_aStates.top().eDestination == Destination::LISTLEVEL)
// Parent state is level number or list level, current state is
@@ -3369,7 +3373,7 @@ RTFError RTFDocumentImpl::popState()
break;
case Destination::FALT:
if (!m_aStates.empty())
- m_aStates.top().aTableSprms = aState.aTableSprms;
+ m_aStates.top().getTableSprms() = aState.getTableSprms();
break;
case Destination::SHAPEPROPERTYNAME:
case Destination::SHAPEPROPERTYVALUE:
@@ -3388,7 +3392,7 @@ RTFError RTFDocumentImpl::popState()
// it will be resolved on end of topmost shape instruction destination
m_aStates.top().getShape() = aState.getShape();
m_aStates.top().getPicture() = aState.getPicture();
- m_aStates.top().aCharacterSprms = aState.aCharacterSprms;
+ m_aStates.top().getCharacterSprms() = aState.getCharacterSprms();
m_aStates.top().getCharacterAttributes() = aState.getCharacterAttributes();
}
break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 62c1a520b6da..7e404a765d79 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -512,19 +512,22 @@ public:
RTFSprms& getParagraphAttributes() { return m_aParagraphAttributes; }
RTFSprms& getParagraphSprms() { return m_aParagraphSprms; }
RTFSprms& getCharacterAttributes() { return m_aCharacterAttributes; }
+ RTFSprms& getCharacterSprms() { return m_aCharacterSprms; }
+ RTFSprms& getTableAttributes() { return m_aTableAttributes; }
+ RTFSprms& getTableSprms() { return m_aTableSprms; }
RTFDocumentImpl* m_pDocumentImpl;
RTFInternalState nInternalState;
Destination eDestination;
RTFFieldStatus eFieldStatus;
RTFBorderState nBorderState;
- // font table, stylesheet table
- RTFSprms aTableSprms;
- RTFSprms aTableAttributes;
- // reset by plain
- RTFSprms aCharacterSprms;
private:
+ // font table, stylesheet table
+ RTFSprms m_aTableSprms;
+ RTFSprms m_aTableAttributes;
+ // reset by plain
+ RTFSprms m_aCharacterSprms;
RTFSprms m_aCharacterAttributes;
// reset by pard
RTFSprms m_aParagraphSprms;