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:38 +0000
commitf8cc202803b08f00117d2b8e76a13b76cbf2d6ce (patch)
treed7d45ca5b853a441dc19a553095a01499b5e9065
parent807e29cbf992ac8bdd7ae6e974bd72ea731d274c (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/14304 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 8f073beaca27..5f94468a7edc 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)