summaryrefslogtreecommitdiff
path: root/include/filter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-03-23 14:53:44 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-23 15:46:25 +0100
commit679a3b9314d56cad05b5ff2a2c2fa3d320f719bb (patch)
tree97a949dd4f9ba96b461bb34c4ab1aee16a3871d2 /include/filter
parent1ed1753be26325edf3660c9b9cbd76dc0e9d36ce (diff)
msfilter: extract copy&pasted RTF code from sw and writerfilter
Both the hexdump and the OLE1 reader can be shared. Change-Id: I97d72a8deeb9c79fc8e8c4a73c613213badfa744 Reviewed-on: https://gerrit.libreoffice.org/51783 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/filter')
-rw-r--r--include/filter/msfilter/rtfutil.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/filter/msfilter/rtfutil.hxx b/include/filter/msfilter/rtfutil.hxx
index 599161670521..48351d382786 100644
--- a/include/filter/msfilter/rtfutil.hxx
+++ b/include/filter/msfilter/rtfutil.hxx
@@ -20,6 +20,8 @@
// RTF values are often multiplied by 2^16
#define RTF_MULTIPLIER 65536
+class SvStream;
+
namespace msfilter
{
namespace rtfutil
@@ -52,6 +54,18 @@ MSFILTER_DLLPUBLIC OString OutString(const OUString& rStr, rtl_TextEncoding eDes
*/
MSFILTER_DLLPUBLIC OString OutStringUpr(const sal_Char* pToken, const OUString& rStr,
rtl_TextEncoding eDestEnc);
+
+/**
+ * Get the numeric value of a single character, representing a hex value.
+ *
+ * @return -1 on failure
+ */
+MSFILTER_DLLPUBLIC int AsHex(char ch);
+
+/**
+ * Extract OLE2 data from an \objdata hex dump.
+ */
+MSFILTER_DLLPUBLIC bool ExtractOLE2FromObjdata(const OString& rObjdata, SvStream& rOle2);
}
}