sc/source/core/tool/ddelink.cxx | 4 +--- sw/source/core/fields/ddefld.cxx | 4 +--- sw/source/uibase/dochdl/swdtflvr.cxx | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-)
New commits: commit 56169b613e5830d90323c1cad31d2015a1d4cb4d Author: Gabor Kelemen <kelemen.gab...@nisz.hu> AuthorDate: Sat Dec 5 16:01:30 2020 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Dec 26 19:22:22 2020 +0100 Remove pointless macro DDE_TXT_ENCODING is just an alias since 2008 commit a190965485508c4493ee33228dae68e12cd858f9 and commit cc141699cc6b2fa38b0b0003bff27751e23ae8e4 Change-Id: I2ca32871c13bd3837f173e5f9f959f364857de52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx index e97d629a9462..2678a4823beb 100644 --- a/sc/source/core/tool/ddelink.cxx +++ b/sc/source/core/tool/ddelink.cxx @@ -37,8 +37,6 @@ #include <hints.hxx> -#define DDE_TXT_ENCODING osl_getThreadTextEncoding() - bool ScDdeLink::bIsInUpdate = false; ScDdeLink::ScDdeLink( ScDocument& rD, const OUString& rA, const OUString& rT, const OUString& rI, @@ -130,7 +128,7 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged( return SUCCESS; OUString aLinkStr; - ScByteSequenceToString::GetString( aLinkStr, rValue, DDE_TXT_ENCODING ); + ScByteSequenceToString::GetString( aLinkStr, rValue, osl_getThreadTextEncoding() ); aLinkStr = convertLineEnd(aLinkStr, LINEEND_LF); // if string ends with line end, discard: diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 817545ad2a04..9e07a8afa9bf 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -38,8 +38,6 @@ using namespace ::com::sun::star; -#define DDE_TXT_ENCODING osl_getThreadTextEncoding() - namespace { class SwIntrnlRefLink : public SwBaseLink @@ -72,7 +70,7 @@ public: { uno::Sequence< sal_Int8 > aSeq; rValue >>= aSeq; - OUString sStr( reinterpret_cast<char const *>(aSeq.getConstArray()), aSeq.getLength(), DDE_TXT_ENCODING ); + OUString sStr( reinterpret_cast<char const *>(aSeq.getConstArray()), aSeq.getLength(), osl_getThreadTextEncoding() ); // remove not needed CR-LF at the end sal_Int32 n = sStr.getLength(); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index e5312d2be203..60ca05566069 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -160,8 +160,6 @@ void collectUIInformation(const OUString& rAction, const OUString& aParameters) } -#define DDE_TXT_ENCODING osl_getThreadTextEncoding() - namespace { class SwTransferDdeLink : public ::sfx2::SvBaseLink @@ -2564,7 +2562,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData, return false; } // report useful error!! - rtl_TextEncoding eEncoding = DDE_TXT_ENCODING; + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); aApp = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding); aTopic = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding); aItem = read_zeroTerminated_uInt8s_ToOUString(*xStrm, eEncoding); @@ -4300,7 +4298,7 @@ bool SwTransferDdeLink::WriteData( SvStream& rStrm ) if( !refObj.is() || !FindDocShell() ) return false; - rtl_TextEncoding eEncoding = DDE_TXT_ENCODING; + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); const OString aAppNm(OUStringToOString( Application::GetAppName(), eEncoding)); const OString aTopic(OUStringToOString( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits