tdf#106899 - Remove header definition of buffer size
Change-Id: Ia7e3cc32c067afa0f376e52e0eb5cdc83ca2e4b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129082
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 7deb65f..1441815 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -28,8 +28,6 @@
#include <tools/solar.h>
#include "swdllapi.h"
#define DETECT_ENCODING_BUFFER_SIZE 4096
inline constexpr OUStringLiteral FILTER_RTF = u"RTF"; ///< RTF filter
inline constexpr OUStringLiteral sRtfWH = u"WH_RTF";
inline constexpr OUStringLiteral FILTER_TEXT = u"TEXT"; ///< text filter with default codeset
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 44f0a49..9e80ade 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -242,8 +242,8 @@ std::shared_ptr<const SfxFilter> SwIoSystem::GetFileFilter(const OUString& rFile
rtl_TextEncoding SwIoSystem::GetTextEncoding(SvStream& rStrm)
{
sal_Size nLen, nOrig;
char aBuf[DETECT_ENCODING_BUFFER_SIZE];
nOrig = nLen = rStrm.ReadBytes(aBuf, DETECT_ENCODING_BUFFER_SIZE);
char aBuf[4096];
nOrig = nLen = rStrm.ReadBytes(aBuf, sizeof(aBuf));
rtl_TextEncoding eCharSet;
const bool bRet = SwIoSystem::IsDetectableText(aBuf, nLen, &eCharSet, nullptr, nullptr, nullptr);