summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-02-03 12:57:40 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2015-02-03 13:26:59 +0000
commitafd743141f7a7dd05914d0872c9afe079f16fe0c (patch)
treecca843df7747fb78aa461c83ae4ad31d2a22cb2f
parent3e8c54916e10e046b55931d70eaa1a9473d608c1 (diff)
tdf#77241: sw: fix creation of field data source string
SwChangeDBDlg::UpdateFlds() depends on undefined behaviour in constructing sTemp, because the call to GetDBName initializes local variables that are already used in other sub-expressions of the statement. (regression from 8a7a9992906ba59d575ca9e4441b3e84fea5fae0) Change-Id: Ibf8c0091da672e133d7a35bc61c059eaf65a3bc2 Reviewed-on: https://gerrit.libreoffice.org/14302 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
-rw-r--r--sw/source/ui/fldui/changedb.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 9e917d445ff6..2299b4df0f77 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -192,7 +192,8 @@ void SwChangeDBDlg::UpdateFlds()
OUString sTableName;
OUString sColumnName;
sal_Bool bIsTable = sal_False;
- const OUString sTemp = m_pAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable)
+ const OUString DBName(m_pAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable));
+ const OUString sTemp = DBName
+ OUString(DB_DELIM)
+ sTableName
+ OUString(DB_DELIM)