summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-12-02 13:54:13 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-12-03 11:13:26 +0100
commit2c29bb06b76097d6cf745b87a481bda450bc0178 (patch)
tree7a19e00520b053d7e762404cd91c9a3a4b77dcd7 /sw
parentc972a97ab7c7e36f2190d1b89e3e49f9d23c7846 (diff)
fdo#31190: Use the same method to getthe DBData than the mail merge
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/uiview/view2.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 172192f631..da75a14be8 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -2339,7 +2339,17 @@ void SwView::GenerateFormLetter(BOOL bUseCurrentDocument)
SwDBData aData;
SwWrtShell &rSh = GetWrtShell();
- aData = rSh.GetDBData();
+
+ SvStringsDtor aDBNameList(5, 1);
+ SvStringsDtor aAllDBNames(5, 5);
+ rSh.GetAllUsedDB( aDBNameList, &aAllDBNames );
+ if ( aDBNameList.Count( ) )
+ {
+ String sDBName = *aDBNameList[0];
+ aData.sDataSource = sDBName.GetToken(0, DB_DELIM);
+ aData.sCommand = sDBName.GetToken(1, DB_DELIM);
+ aData.nCommandType = sDBName.GetToken(2, DB_DELIM ).ToInt32();
+ }
rSh.EnterStdMode(); // Wechsel in Textshell erzwingen; ist fuer
// das Mischen von DB-Feldern notwendig.
AttrChangedNotify( &rSh );