diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-06-07 17:09:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-06-07 17:12:49 +0200 |
commit | 288a606ae780c9f0b7a0241b31ea644addd37fd8 (patch) | |
tree | 0dee4a60d5b8daa1b7b8bc8b320c56c1e7051144 /writerfilter | |
parent | efb6d8211d3ddb1b42c51400c7cadd57a0dfca4f (diff) |
RTFDocumentImpl::checkUnicode: make this a bit more readable
by not using default parameter values.
Change-Id: I82c84e3563cba60682d297eb1b1d8a139160d579
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 20 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 921f30eb746c..345912df76b6 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -320,7 +320,7 @@ bool RTFDocumentImpl::isSubstream() const void RTFDocumentImpl::finishSubstream() { - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); // At the end of a footnote stream, we need to emit a run break when importing from Word. // We can't do so unconditionally, as Writer already writes a \par at the end of the footnote. if (m_bNeedCr) @@ -881,7 +881,7 @@ int RTFDocumentImpl::resolveChars(char ch) } if (m_aStates.top().nInternalState != INTERNAL_HEX) - checkUnicode(false, true); + checkUnicode(/*bUnicode =*/ false, /*bHex =*/ true); OStringBuffer aBuf; @@ -895,7 +895,7 @@ int RTFDocumentImpl::resolveChars(char ch) { if (!bUnicodeChecked) { - checkUnicode(true, false); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ false); bUnicodeChecked = true; } aBuf.append(ch); @@ -1214,7 +1214,7 @@ void RTFDocumentImpl::replayBuffer(RTFBuffer_t& rBuffer) int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) { - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); setNeedSect(); RTFSkipDestination aSkip(*this); switch (nKeyword) @@ -1690,7 +1690,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) { if (nKeyword != RTF_HEXCHAR) - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); setNeedSect(); RTFSkipDestination aSkip(*this); @@ -1968,7 +1968,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) { - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); setNeedSect(); RTFSkipDestination aSkip(*this); int nParam = -1; @@ -2677,7 +2677,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) { - checkUnicode(nKeyword != RTF_U, true); + checkUnicode(/*bUnicode =*/ nKeyword != RTF_U, /*bHex =*/ true); setNeedSect(); RTFSkipDestination aSkip(*this); int nSprm = 0; @@ -3579,7 +3579,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam) { - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); setNeedSect(); RTFSkipDestination aSkip(*this); int nSprm = -1; @@ -3680,7 +3680,7 @@ int RTFDocumentImpl::pushState() { //SAL_INFO("writerfilter", OSL_THIS_FUNC << " before push: " << m_pTokenizer->getGroup()); - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); m_nGroupStartPos = Strm().Tell(); if (m_aStates.empty()) @@ -3779,7 +3779,7 @@ int RTFDocumentImpl::popState() //SAL_INFO("writerfilter", OSL_THIS_FUNC << " before pop: m_pTokenizer->getGroup() " << m_pTokenizer->getGroup() << // ", dest state: " << m_aStates.top().nDestinationState); - checkUnicode(); + checkUnicode(/*bUnicode =*/ true, /*bHex =*/ true); RTFParserState aState(m_aStates.top()); m_bWasInFrame = aState.aFrame.inFrame(); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 76752d7e42bf..0ba51b6bfadf 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -490,7 +490,7 @@ namespace writerfilter { void sectBreak(bool bFinal); void replayBuffer(RTFBuffer_t& rBuffer); /// If we have some unicode or hex characters to send. - void checkUnicode(bool bUnicode = true, bool bHex = true); + void checkUnicode(bool bUnicode, bool bHex); /// If we need a final section break at the end of the document. void setNeedSect(bool bNeedSect = true); |