[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - extensions/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 20 11:54:53 UTC 2019


 extensions/source/ole/unoconversionutilities.hxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 13dbbd5f46f2c52426decb019783a3b627bc478d
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Apr 15 15:53:09 2019 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Sep 20 13:53:48 2019 +0200

    Turn an incoming VT_NULL when a STRING is wanted into an empty BSTR
    
    Might help in some cases in the customer application.
    
    Change-Id: Icdc13780d4623e9df8bc057760c1295d7d6ffd61
    (cherry picked from commit 6d54ce9155c73b6b97c437234f97f4558166b69d)
    Reviewed-on: https://gerrit.libreoffice.org/79207
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index ec8c46d80016..fc2880805d5a 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -433,6 +433,8 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANTARG* pArg, Any& rAny,
                     bFail = true;
                 break;
             case TypeClass_STRING:      // UString
+                if(var.vt == VT_NULL)
+                    var = CComBSTR("");
                 if(SUCCEEDED(hr = VariantChangeType( & var, &var, 0, VT_BSTR)))
                     variantToAny( & var, rAny);
                 else if (hr == DISP_E_TYPEMISMATCH)


More information about the Libreoffice-commits mailing list