summaryrefslogtreecommitdiff
path: root/sw/inc/iodetect.hxx
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2022-01-09 18:44:11 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2022-01-31 13:51:20 +0100
commitddf9b2e23768a33041a3efe20840f1e11abff434 (patch)
treefe5fd13181b368f733d21ee90f84bd717992e45a /sw/inc/iodetect.hxx
parent45c15e1112e03b8b211ed0968ed1b16d5ed4ddfe (diff)
tdf#106899 - Import concordance file using appropriate charset
At the beginning of the import process for the various index entries, try to determine the correct character set for the tox concordance file. Change-Id: I3f48325a80ed08c2c06c295a24b2fc29ce1adf99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128194 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129206
Diffstat (limited to 'sw/inc/iodetect.hxx')
-rw-r--r--sw/inc/iodetect.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 9069b01ffda0..ce24e0800134 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -28,6 +28,8 @@
#include <tools/solar.h>
#include "swdllapi.h"
+#define DETECT_ENCODING_BUFFER_SIZE 4096
+
#define FILTER_RTF "RTF" ///< RTF filter
#define sRtfWH "WH_RTF"
#define FILTER_TEXT u"TEXT" ///< text filter with default codeset
@@ -105,6 +107,8 @@ public:
static bool IsValidStgFilter( SotStorage& , const SfxFilter& );
static bool IsValidStgFilter( const css::uno::Reference < css::embed::XStorage >& rStg, const SfxFilter& rFilter);
+ // tdf#106899 - wrapper around IsDetectableText to retrieve the text encoding for a given stream
+ static rtl_TextEncoding GetTextEncoding(SvStream&);
static bool IsDetectableText( const char* pBuf, sal_uLong &rLen,
rtl_TextEncoding *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool *pBom);