# HG changeset patch
# User Michael Stahl <mst@openoffice.org>
# Date 1303140562 0
# Node ID 1cc59e7ad82d545407595f004c0449687946cf1f
# Parent  d0cffa3533b7fa751dd2829d1670dbd994e9b101
imported patch 9d354d05cffc.patch

diff --git a/writerfilter/inc/rtftok/RTFInputSource.hxx b/writerfilter/inc/rtftok/RTFInputSource.hxx
--- a/writerfilter/inc/rtftok/RTFInputSource.hxx
+++ b/writerfilter/inc/rtftok/RTFInputSource.hxx
@@ -33,7 +33,8 @@
 class RTFInputSource
 {
 public:
-  virtual int read(void *buffer, int maxLen) = 0;
+    virtual ~RTFInputSource() { }
+    virtual size_t read(void *const buffer, size_t const maxLen) = 0;
 };
 
 } }  /* end namespace writerfilter::rtftok */
diff --git a/writerfilter/inc/rtftok/RTFScannerHandler.hxx b/writerfilter/inc/rtftok/RTFScannerHandler.hxx
--- a/writerfilter/inc/rtftok/RTFScannerHandler.hxx
+++ b/writerfilter/inc/rtftok/RTFScannerHandler.hxx
@@ -35,16 +35,16 @@
 class RTFScannerHandler
 {
 public:
-	virtual void dest(char*token, char*value)=0;
-	virtual void ctrl(char*token, char*value)=0;
-	virtual void lbrace(void)=0;
-	virtual void rbrace(void)=0;
-	virtual void addSpaces(int count)=0;
-	virtual void addBinData(unsigned char data)=0;
-	virtual void addChar(char ch) =0;
-	virtual void addCharU(sal_Unicode ch) =0;
-	virtual void addHexChar(char* hexch) =0;
-
+    virtual ~RTFScannerHandler() { }
+    virtual void dest(char const*const token, char const*const value) = 0;
+    virtual void ctrl(char const*const token, char const*const value) = 0;
+    virtual void lbrace() = 0;
+    virtual void rbrace() = 0;
+    virtual void addSpaces(unsigned int const count) = 0;
+    virtual void addBinData(unsigned char const data) = 0;
+    virtual void addChar(char const ch) = 0;
+    virtual void addCharU(sal_Unicode const ch) = 0;
+    virtual void addHexChar(char const hexch[2]) = 0;
 };
 
 } } /* end namespace writerfilter::rtftok */
diff --git a/writerfilter/source/rtftok/RTFScanner.lex b/writerfilter/source/rtftok/RTFScanner.lex
--- a/writerfilter/source/rtftok/RTFScanner.lex
+++ b/writerfilter/source/rtftok/RTFScanner.lex
@@ -362,7 +362,7 @@
     yyextra->m_nChars += yyleng;
 }
 \\\'[A-Fa-f0-9][A-Fa-f0-9] { /* hex char */
-    yyextra->m_rHandler.addHexChar(yytext);
+    yyextra->m_rHandler.addHexChar(& yytext[2]);
     yyextra->m_nChars += yyleng;
 }
 \\\* { /* star */
