[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Feb 8 18:36:07 UTC 2019


 sw/source/core/graphic/ndgrf.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit ea3045b28943e78673a669e9e1a310d374951675
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 3 19:42:22 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Fri Feb 8 19:35:36 2019 +0100

    Initialize some OUString with proper value
    
    Change-Id: I2f5676e9973d476aa709f9dfb4a903b09edaafeb
    Reviewed-on: https://gerrit.libreoffice.org/67336
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 867e533533e3..8045a4158135 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -569,10 +569,11 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName )
         if( rFltName == "DDE" )
         {
             sal_Int32 nTmp = 0;
-            OUString sApp, sTopic, sItem;
-            sApp = rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp );
-            sTopic = rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp );
-            sItem = rGrfName.copy( nTmp );
+            // Cannot use getToken as argument in function call:
+            // evaluation order is undefined!
+            const OUString sApp{ rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp ) };
+            const OUString sTopic{ rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp ) };
+            const OUString sItem{ rGrfName.copy( nTmp ) };
             rIDLA.GetLinkManager().InsertDDELink( refLink.get(),
                                             sApp, sTopic, sItem );
         }


More information about the Libreoffice-commits mailing list