From 28311e11c8611f5e9f19a3052810257d3cae998a Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 27 Mar 2016 15:24:46 +0200 Subject: drop unneeded function --- src/lib/SW602GraphicListener.cpp | 39 ----------------------------------- src/lib/SW602GraphicListener.h | 6 ------ src/lib/SW602Listener.h | 6 ------ src/lib/SW602SpreadsheetListener.cpp | 40 ------------------------------------ src/lib/SW602SpreadsheetListener.h | 6 ------ src/lib/SW602TextListener.cpp | 33 ----------------------------- src/lib/SW602TextListener.h | 6 ------ 7 files changed, 136 deletions(-) diff --git a/src/lib/SW602GraphicListener.cpp b/src/lib/SW602GraphicListener.cpp index 3d61661..a8f4320 100644 --- a/src/lib/SW602GraphicListener.cpp +++ b/src/lib/SW602GraphicListener.cpp @@ -215,45 +215,6 @@ void SW602GraphicListener::insertCharacter(unsigned char c) SW602GraphicListener::insertUnicode((uint32_t) unicode); } -int SW602GraphicListener::insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos) -{ - if (!m_ps->isInTextZone()) - { - SW602_DEBUG_MSG(("SW602GraphicListener::insertCharacter: called outside a text zone\n")); - return 0; - } - long debPos=input.tell(); - int unicode = c; -#if 0 - int fId = m_ps->m_font.id(); - int unicode = endPos==debPos ? - m_parserState.m_fontConverter->unicode(fId, c) : - m_parserState.m_fontConverter->unicode(fId, c, input); -#endif - - long pos=input.tell(); - if (endPos > 0 && pos > endPos) - { - SW602_DEBUG_MSG(("SW602GraphicListener::insertCharacter: problem reading a character\n")); - pos = debPos; - input.seek(pos, librevenge::RVNG_SEEK_SET); - // unicode = m_parserState.m_fontConverter->unicode(fId, c); - } - if (unicode == -1) - { - if (c < 0x20) - { - SW602_DEBUG_MSG(("SW602GraphicListener::insertCharacter: Find odd char %x\n", (unsigned int)c)); - } - else - SW602GraphicListener::insertChar((uint8_t) c); - } - else - SW602GraphicListener::insertUnicode((uint32_t) unicode); - - return int(pos-debPos); -} - void SW602GraphicListener::insertUnicode(uint32_t val) { if (!m_ps->isInTextZone()) diff --git a/src/lib/SW602GraphicListener.h b/src/lib/SW602GraphicListener.h index 95b3939..b3c4013 100644 --- a/src/lib/SW602GraphicListener.h +++ b/src/lib/SW602GraphicListener.h @@ -113,12 +113,6 @@ public: /** insert a character using the font converter to find the utf8 character */ void insertCharacter(unsigned char c); - /** insert a character using the font converter to find the utf8 - character and if needed, input to read extra character. - - \return the number of extra character read - */ - int insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos=-1); /** adds an unicode character. * By convention if \a character=0xfffd(undef), no character is added */ void insertUnicode(uint32_t character); diff --git a/src/lib/SW602Listener.h b/src/lib/SW602Listener.h index 083e2bd..71811b5 100644 --- a/src/lib/SW602Listener.h +++ b/src/lib/SW602Listener.h @@ -80,12 +80,6 @@ public: /** insert a character using the font converter to find the utf8 character */ virtual void insertCharacter(unsigned char c)=0; - /** insert a character using the font converter to find the utf8 - character and if needed, input to read extra character. - - \return the number of extra character read - */ - virtual int insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos=-1)=0; /** adds an unicode character. * By convention if \a character=0xfffd(undef), no character is added */ virtual void insertUnicode(uint32_t character)=0; diff --git a/src/lib/SW602SpreadsheetListener.cpp b/src/lib/SW602SpreadsheetListener.cpp index 6f0125d..e2a598a 100644 --- a/src/lib/SW602SpreadsheetListener.cpp +++ b/src/lib/SW602SpreadsheetListener.cpp @@ -256,46 +256,6 @@ void SW602SpreadsheetListener::insertCharacter(unsigned char c) SW602SpreadsheetListener::insertUnicode((uint32_t) unicode); } -int SW602SpreadsheetListener::insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos) -{ - if (!m_ps->canWriteText()) - { - SW602_DEBUG_MSG(("SW602SpreadsheetListener::insertCharacter: called outside a text zone\n")); - return 0; - } - long debPos=input.tell(); - // int fId = m_ps->m_font.id(); -#if 0 - int unicode = endPos==debPos ? - m_parserState.m_fontConverter->unicode(fId, c) : - m_parserState.m_fontConverter->unicode(fId, c, input); -#endif - int unicode = c; - - long pos=input.tell(); - if (endPos > 0 && pos > endPos) - { - SW602_DEBUG_MSG(("SW602SpreadsheetListener::insertCharacter: problem reading a character\n")); - pos = debPos; - input.seek(pos, librevenge::RVNG_SEEK_SET); - // unicode = m_parserState.m_fontConverter->unicode(fId, c); - unicode = c; - } - if (unicode == -1) - { - if (c < 0x20) - { - SW602_DEBUG_MSG(("SW602SpreadsheetListener::insertCharacter: Find odd char %x\n", (unsigned int)c)); - } - else - SW602SpreadsheetListener::insertChar((uint8_t) c); - } - else - SW602SpreadsheetListener::insertUnicode((uint32_t) unicode); - - return int(pos-debPos); -} - void SW602SpreadsheetListener::insertUnicode(uint32_t val) { if (!m_ps->canWriteText()) diff --git a/src/lib/SW602SpreadsheetListener.h b/src/lib/SW602SpreadsheetListener.h index a1b243d..b559a26 100644 --- a/src/lib/SW602SpreadsheetListener.h +++ b/src/lib/SW602SpreadsheetListener.h @@ -128,12 +128,6 @@ public: /** insert a character using the font converter to find the utf8 character */ void insertCharacter(unsigned char c); - /** insert a character using the font converter to find the utf8 - character and if needed, input to read extra character. - - \return the number of extra character read - */ - int insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos=-1); /** adds an unicode character. * By convention if \a character=0xfffd(undef), no character is added */ void insertUnicode(uint32_t character); diff --git a/src/lib/SW602TextListener.cpp b/src/lib/SW602TextListener.cpp index b2eab3a..73066b9 100644 --- a/src/lib/SW602TextListener.cpp +++ b/src/lib/SW602TextListener.cpp @@ -221,39 +221,6 @@ void SW602TextListener::insertCharacter(unsigned char c) SW602TextListener::insertUnicode((uint32_t) unicode); } -int SW602TextListener::insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos) -{ - long debPos=input.tell(); - // int fId = m_ps->m_font.id(); - // int unicode = endPos==debPos ? - // m_parserState.m_fontConverter->unicode(fId, c) : - // m_parserState.m_fontConverter->unicode(fId, c, input); - int unicode = c; - - long pos=input.tell(); - if (endPos > 0 && pos > endPos) - { - SW602_DEBUG_MSG(("SW602TextListener::insertCharacter: problem reading a character\n")); - pos = debPos; - input.seek(pos, librevenge::RVNG_SEEK_SET); - // unicode = m_parserState.m_fontConverter->unicode(fId, c); - unicode = c; - } - if (unicode == -1) - { - if (c < 0x20) - { - SW602_DEBUG_MSG(("SW602TextListener::insertCharacter: Find odd char %x\n", (unsigned int)c)); - } - else - SW602TextListener::insertChar((uint8_t) c); - } - else - SW602TextListener::insertUnicode((uint32_t) unicode); - - return int(pos-debPos); -} - void SW602TextListener::insertUnicode(uint32_t val) { // undef character, we skip it diff --git a/src/lib/SW602TextListener.h b/src/lib/SW602TextListener.h index 7dd8adc..8f00ab5 100644 --- a/src/lib/SW602TextListener.h +++ b/src/lib/SW602TextListener.h @@ -103,12 +103,6 @@ public: /** insert a character using the font converter to find the utf8 character */ void insertCharacter(unsigned char c); - /** insert a character using the font converter to find the utf8 - character and if needed, input to read extra character. - - \return the number of extra character read - */ - int insertCharacter(unsigned char c, librevenge::RVNGInputStream &input, long endPos=-1); /** adds an unicode character. * By convention if \a character=0xfffd(undef), no character is added */ void insertUnicode(uint32_t character); -- cgit v1.2.3