This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new 29b78537aa Proposed fix for Issue 60217 (#155)
29b78537aa is described below

commit 29b78537aa58ecc61c685770092853b3b1bb981f
Author: Peter <legi...@users.noreply.github.com>
AuthorDate: Tue Sep 27 23:12:39 2022 +0200

    Proposed fix for Issue 60217 (#155)
    
    A dot is only added if both Variables rDBData.sDataSource and sCommand 
contain something. Otherwise the dot is not added
    
    Co-authored-by: Matthias Seidel <msei...@apache.org>
    (cherry picked from commit b0300d3f06359ce6369a816bca32e2f34a230253)
---
 main/sw/source/ui/fldui/changedb.cxx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/main/sw/source/ui/fldui/changedb.cxx 
b/main/sw/source/ui/fldui/changedb.cxx
index df8795ecc7..48eb663a8f 100644
--- a/main/sw/source/ui/fldui/changedb.cxx
+++ b/main/sw/source/ui/fldui/changedb.cxx
@@ -327,14 +327,16 @@ IMPL_LINK( SwChangeDBDlg, TreeSelectHdl, SvTreeListBox *, 
EMPTYARG )
 }
 
 /*--------------------------------------------------------------------
-       Beschreibung: Datenbankname fuer Anzeige wandeln
+       Description: transform databasename for screen
  --------------------------------------------------------------------*/
 
 void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
 {
-       String sTmp(rDBData.sDataSource);
        String sName;
-       sTmp += '.';
+       String sTmp(rDBData.sDataSource);
+       if (!rDBData.sDataSource.isEmpty() && !rDBData.sCommand.isEmpty()) {
+               sTmp += '.';
+       }
        sTmp += (String)rDBData.sCommand;
 
        for (sal_uInt16 i = 0; i < sTmp.Len(); i++)

Reply via email to