diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-13 10:45:42 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-13 10:46:03 +0200 |
commit | 7b87ccf916547b4d59d0e892519600a2bf53b867 (patch) | |
tree | 9d9692be1bde7db9490dd3ef1c974a7bb39a5d46 /writerfilter | |
parent | b3a7f6d51bd437ddb93ec45b38b27f27b42343eb (diff) |
drop unnecessary RTFDocumentImpl::isEmpty
Change-Id: I657266697c30be0760971528adb1abf07f03ea23
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtftokenizer.cxx | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index adfb18c63e46..2d66ed37b2d4 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3902,11 +3902,6 @@ int RTFDocumentImpl::getGroup() const return m_nGroup; } -bool RTFDocumentImpl::isEmpty() const -{ - return m_aStates.empty(); -} - void RTFDocumentImpl::setDestinationText(OUString& rString) { m_aStates.top().aDestinationText.setLength(0); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index c05a0f51ad53..0759a4c30b90 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -424,8 +424,7 @@ namespace writerfilter { void seek(sal_uInt32 nPos); uno::Reference<lang::XMultiServiceFactory> getModelFactory(); RTFParserState& getState(); - /// If the stack of states is empty. - bool isEmpty() const; + /// Number of states on the stack. int getGroup() const; void setDestinationText(rtl::OUString& rString); /// Resolve a picture: If not inline, then anchored. diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index e596aae2b615..abe8cff110db 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -95,7 +95,7 @@ int RTFTokenizer::resolveParse() if (m_rImport.getGroup() < 0) return ERROR_GROUP_UNDER; - if (!m_rImport.isEmpty() && m_rImport.getState().nInternalState == INTERNAL_BIN) + if (m_rImport.getGroup() > 0 && m_rImport.getState().nInternalState == INTERNAL_BIN) { ret = m_rImport.resolveChars(ch); if (ret) @@ -130,7 +130,7 @@ int RTFTokenizer::resolveParse() case 0x0a: break; // ignore these default: - if (m_rImport.isEmpty()) + if (m_rImport.getGroup() == 0) return ERROR_CHAR_OVER; if (m_rImport.getState().nInternalState == INTERNAL_NORMAL) { |