diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-01 12:13:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-01 12:30:26 +0200 |
commit | 54bf49a2be3a7bc370c7043011c6080918224ffa (patch) | |
tree | e79c8f97bf0335e273879529e1741c89df8e99fe /sw/source/ui/dbui/addresslistdialog.cxx | |
parent | b499739c438d58c29125cb2777f019c84394786d (diff) |
SwDBManager: embed data source definition if possible
In the past SwDBManager (used by the MM wizard) created a smaller .odb
file in the home directory by default in case the data source was
something external (.ods file, etc).
If the document is saved already (and experimental mode is enabled, as
this is still a work in progress), then stop saving these small .odb
files to the home directory, instead embed the data source definition
into the currently active .odt file.
Previously created such separate .odb files are still fully supported,
of course.
Change-Id: I7c1776e5ed57cdde05c0adfc5f7d1dc485363f03
Diffstat (limited to 'sw/source/ui/dbui/addresslistdialog.cxx')
-rw-r--r-- | sw/source/ui/dbui/addresslistdialog.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 9f989d054776..16a55a717ef7 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -56,6 +56,7 @@ #include <unotools/pathoptions.hxx> #include <svl/urihelper.hxx> #include <dbui.hrc> +#include <view.hxx> #include <helpid.h> #include <unomid.h> @@ -345,7 +346,14 @@ IMPL_LINK_NOARG(SwAddressListDialog, FilterHdl_Impl) IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl) { - const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(); + SwMailMergeWizard* pWizard = 0; + if (GetParent() && GetParent()->GetParent()) + pWizard = dynamic_cast<SwMailMergeWizard*>(GetParent()->GetParent()); + SwView* pView = 0; + if (pWizard) + pView = pWizard->GetSwView(); + + const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : 0); if(!sNewSource.isEmpty()) { SvTreeListEntry* pNewSource = m_pListLB->InsertEntry(sNewSource); |