sc/source/core/tool/ddelink.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7e60f5dd6422b1409204f97e4704d7163ada73c2
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Dec 29 17:53:42 2022 +0000
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Dec 30 08:58:45 2022 +0000

    tdf#152717: ScDdeLink::DataChanged may get OUString directly
    
    ... after commit 94df17f58fe6269452b7252b712a89978c444bec
    (tdf#151429: don't convert OUStrings to system encoding, 2022-10-08)
    
    Change-Id: Ie9d6eb2a4465a576eefe0840a30636e898fa9028
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144810
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 37723413115baafdc7d13ad26d11aa5f917c2036)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144812
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 95591dddb461..775c71808488 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -130,7 +130,8 @@ sfx2::SvBaseLink::UpdateResult ScDdeLink::DataChanged(
         return SUCCESS;
 
     OUString aLinkStr;
-    ScByteSequenceToString::GetString( aLinkStr, rValue, 
osl_getThreadTextEncoding() );
+    if (!(rValue >>= aLinkStr))
+        ScByteSequenceToString::GetString( aLinkStr, rValue, 
osl_getThreadTextEncoding() );
     aLinkStr = convertLineEnd(aLinkStr, LINEEND_LF);
 
     //  if string ends with line end, discard:

Reply via email to