Kaydet (Commit) 7e24483d authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: make RTFParserState members private, part 3

Change-Id: I823122d89f674539d6aa54ffd48b406d199677d2
Reviewed-on: https://gerrit.libreoffice.org/72556
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst aebe2abe
......@@ -653,7 +653,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
}
// new destination => use new destination text
m_aStates.top().setCurrentDestinationText(&m_aStates.top().aDestinationText);
m_aStates.top().setCurrentDestinationText(&m_aStates.top().getDestinationText());
return RTFError::OK;
}
......
......@@ -471,7 +471,7 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates.top().nCurrentEncoding = getEncoding(getFontIndex(m_nDefaultFontIndex));
m_aStates.top().aCharacterAttributes = getDefaultState().aCharacterAttributes;
m_aStates.top().setCurrentCharacterStyleIndex(-1);
m_aStates.top().isRightToLeft = false;
m_aStates.top().setIsRightToLeft(false);
m_aStates.top().eRunType = RTFParserState::RunType::LOCH;
}
break;
......@@ -579,10 +579,10 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
break;
case RTF_LTRCH:
// dmapper does not support this.
m_aStates.top().isRightToLeft = false;
m_aStates.top().setIsRightToLeft(false);
break;
case RTF_RTLCH:
m_aStates.top().isRightToLeft = true;
m_aStates.top().setIsRightToLeft(true);
if (m_aDefaultState.nCurrentEncoding == RTL_TEXTENCODING_MS_1255)
m_aStates.top().nCurrentEncoding = m_aDefaultState.nCurrentEncoding;
break;
......
......@@ -164,7 +164,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case RTF_FS:
case RTF_AFS:
nSprm = (m_aStates.top().isRightToLeft
nSprm = (m_aStates.top().getIsRightToLeft()
|| m_aStates.top().eRunType == RTFParserState::RunType::HICH)
? NS_ooxml::LN_EG_RPrBase_szCs
: NS_ooxml::LN_EG_RPrBase_sz;
......@@ -191,7 +191,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case RTF_LANG:
case RTF_ALANG:
if (m_aStates.top().isRightToLeft
if (m_aStates.top().getIsRightToLeft()
|| m_aStates.top().eRunType == RTFParserState::RunType::HICH)
{
nSprm = NS_ooxml::LN_CT_Language_bidi;
......@@ -261,31 +261,31 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case RTF_YR:
{
m_aStates.top().nYear = nParam;
m_aStates.top().setYear(nParam);
nSprm = 1;
}
break;
case RTF_MO:
{
m_aStates.top().nMonth = nParam;
m_aStates.top().setMonth(nParam);
nSprm = 1;
}
break;
case RTF_DY:
{
m_aStates.top().nDay = nParam;
m_aStates.top().setDay(nParam);
nSprm = 1;
}
break;
case RTF_HR:
{
m_aStates.top().nHour = nParam;
m_aStates.top().setHour(nParam);
nSprm = 1;
}
break;
case RTF_MIN:
{
m_aStates.top().nMinute = nParam;
m_aStates.top().setMinute(nParam);
nSprm = 1;
}
break;
......@@ -336,7 +336,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case RTF_F:
case RTF_AF:
if (m_aStates.top().isRightToLeft
if (m_aStates.top().getIsRightToLeft()
|| m_aStates.top().eRunType == RTFParserState::RunType::HICH)
{
nSprm = NS_ooxml::LN_CT_Fonts_cs;
......
......@@ -456,6 +456,19 @@ public:
m_pCurrentDestinationText = pDestinationText;
}
OUStringBuffer* getCurrentDestinationText() const { return m_pCurrentDestinationText; }
OUStringBuffer& getDestinationText() { return m_aDestinationText; }
void setMinute(sal_uInt16 nMinute) { m_nMinute = nMinute; }
sal_uInt16 getMinute() const { return m_nMinute; }
void setHour(sal_uInt16 nHour) { m_nHour = nHour; }
sal_uInt16 getHour() const { return m_nHour; }
void setDay(sal_uInt16 nDay) { m_nDay = nDay; }
sal_uInt16 getDay() const { return m_nDay; }
void setMonth(sal_uInt16 nMonth) { m_nMonth = nMonth; }
sal_uInt16 getMonth() const { return m_nMonth; }
void setYear(sal_uInt16 nYear) { m_nYear = nYear; }
sal_uInt16 getYear() const { return m_nYear; }
void setIsRightToLeft(bool bIsRightToLeft) { m_bIsRightToLeft = bIsRightToLeft; }
bool getIsRightToLeft() const { return m_bIsRightToLeft; }
RTFDocumentImpl* m_pDocumentImpl;
RTFInternalState nInternalState;
......@@ -517,20 +530,20 @@ public:
DBCH
};
RunType eRunType;
private:
/// ltrch or rtlch
bool isRightToLeft;
bool m_bIsRightToLeft;
// Info group.
sal_Int16 nYear;
sal_uInt16 nMonth;
sal_uInt16 nDay;
sal_uInt16 nHour;
sal_uInt16 nMinute;
sal_Int16 m_nYear;
sal_uInt16 m_nMonth;
sal_uInt16 m_nDay;
sal_uInt16 m_nHour;
sal_uInt16 m_nMinute;
/// Text from special destinations.
OUStringBuffer aDestinationText;
private:
OUStringBuffer m_aDestinationText;
/// point to the buffer of the current destination
OUStringBuffer* m_pCurrentDestinationText;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment