summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-05-17 21:48:03 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-05-20 10:07:41 +0200
commit9c7fac47aacb0877c7d212217089a680400c1377 (patch)
treecbe37ebac015547ca5c0f2ce5fb8e435e92d358d /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parente2aa8f8cb3b93ec3cb14c5c9edc3bbce78c1558f (diff)
writerfilter: make RTFParserState members private, final part
Change-Id: I14e5bb0df50647801bf6c322132a76037185cada Reviewed-on: https://gerrit.libreoffice.org/72564 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9a49087e5a2f..c2c139744ccb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1168,7 +1168,7 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
RTFError RTFDocumentImpl::resolveChars(char ch)
{
- if (m_aStates.top().nInternalState == RTFInternalState::BIN)
+ if (m_aStates.top().getInternalState() == RTFInternalState::BIN)
{
m_pBinaryData.reset(new SvMemoryStream());
m_pBinaryData->WriteChar(ch);
@@ -1177,7 +1177,7 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
Strm().ReadChar(ch);
m_pBinaryData->WriteChar(ch);
}
- m_aStates.top().nInternalState = RTFInternalState::NORMAL;
+ m_aStates.top().setInternalState(RTFInternalState::NORMAL);
return RTFError::OK;
}
@@ -1187,10 +1187,11 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
bool bSkipped = false;
while (!Strm().eof()
- && (m_aStates.top().nInternalState == RTFInternalState::HEX
+ && (m_aStates.top().getInternalState() == RTFInternalState::HEX
|| (ch != '{' && ch != '}' && ch != '\\')))
{
- if (m_aStates.top().nInternalState == RTFInternalState::HEX || (ch != 0x0d && ch != 0x0a))
+ if (m_aStates.top().getInternalState() == RTFInternalState::HEX
+ || (ch != 0x0d && ch != 0x0a))
{
if (m_aStates.top().getCharsToSkip() == 0)
{
@@ -1209,7 +1210,7 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
}
// read a single char if we're in hex mode
- if (m_aStates.top().nInternalState == RTFInternalState::HEX)
+ if (m_aStates.top().getInternalState() == RTFInternalState::HEX)
break;
if (RTL_TEXTENCODING_MS_932 == m_aStates.top().getCurrentEncoding())
@@ -1239,10 +1240,10 @@ RTFError RTFDocumentImpl::resolveChars(char ch)
Strm().ReadChar(ch);
}
- if (m_aStates.top().nInternalState != RTFInternalState::HEX && !Strm().eof())
+ if (m_aStates.top().getInternalState() != RTFInternalState::HEX && !Strm().eof())
Strm().SeekRel(-1);
- if (m_aStates.top().nInternalState == RTFInternalState::HEX
+ if (m_aStates.top().getInternalState() == RTFInternalState::HEX
&& m_aStates.top().getDestination() != Destination::LEVELNUMBERS)
{
if (!bSkipped)
@@ -3508,11 +3509,11 @@ RTFError RTFDocumentImpl::handleEmbeddedObject()
bool RTFDocumentImpl::isInBackground() { return m_aStates.top().getInBackground(); }
-RTFInternalState RTFDocumentImpl::getInternalState() { return m_aStates.top().nInternalState; }
+RTFInternalState RTFDocumentImpl::getInternalState() { return m_aStates.top().getInternalState(); }
void RTFDocumentImpl::setInternalState(RTFInternalState nInternalState)
{
- m_aStates.top().nInternalState = nInternalState;
+ m_aStates.top().setInternalState(nInternalState);
}
Destination RTFDocumentImpl::getDestination() { return m_aStates.top().getDestination(); }
@@ -3554,7 +3555,7 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl)
: m_pDocumentImpl(pDocumentImpl)
- , nInternalState(RTFInternalState::NORMAL)
+ , m_nInternalState(RTFInternalState::NORMAL)
, m_eDestination(Destination::NORMAL)
, m_eFieldStatus(RTFFieldStatus::NONE)
, m_nBorderState(RTFBorderState::NONE)
@@ -3602,7 +3603,7 @@ RTFShape::RTFShape() = default;
RTFDrawingObject::RTFDrawingObject() = default;
RTFFrame::RTFFrame(RTFParserState* pParserState)
- : m_pDocumentImpl(pParserState->m_pDocumentImpl)
+ : m_pDocumentImpl(pParserState->getDocumentImpl())
, m_nX(0)
, m_nY(0)
, m_nW(0)