[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sw/inc sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Aug 4 15:44:14 PDT 2011


 sw/inc/swabstdlg.hxx              |    5 +++++
 sw/source/ui/dbui/dbmgr.cxx       |    8 +++++++-
 sw/source/ui/dialog/swdlgfact.cxx |   18 ++++++++++++++++++
 sw/source/ui/dialog/swdlgfact.hxx |    5 ++++-
 sw/source/ui/inc/mailmrge.hxx     |    6 ++++++
 5 files changed, 40 insertions(+), 2 deletions(-)

New commits:
commit 81974ceb030b7209af1a55557e697c8acb339b7c
Author: os <os at openoffice.org>
Date:   Tue Mar 15 14:20:47 2011 +0100

    Resolves: fdo#32899 backport fix

diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 4d84284..85e94e3 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -163,6 +163,11 @@ public:
     virtual const ::rtl::OUString& GetSaveFilter() const = 0;
     virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const = 0;
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const = 0;
+    virtual bool IsSaveIndividualDocs() const = 0;
+    virtual bool IsGenerateFromDataBase() const = 0;
+    virtual String GetColumnName() const = 0;
+    virtual String GetPath() const = 0;
+
 };
 class AbstractMailMergeCreateFromDlg : public VclAbstractDialog  //add for SwMailMergeCreateFromDlg
 {
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 60b6661..ed2ced4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2487,7 +2487,13 @@ void SwNewDBMgr::ExecuteFormLetter(	SwWrtShell& rSh,
 
                     SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), pView->GetWrtShell(), aDescriptor );
                     aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter(); 
-                    aMergeDesc.bCreateSingleFile= true;
+                    aMergeDesc.bCreateSingleFile = !pImpl->pMergeDialog->IsSaveIndividualDocs();
+                    if( !aMergeDesc.bCreateSingleFile && pImpl->pMergeDialog->IsGenerateFromDataBase() )
+                    {
+                        aMergeDesc.sAddressFromColumn = pImpl->pMergeDialog->GetColumnName();
+                        aMergeDesc.sSubject = pImpl->pMergeDialog->GetPath();
+                    }
+
                     MergeNew(aMergeDesc);
 
                     pWorkDoc->SetNewDBMgr( pWorkDBMgr );
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 96cd7ea..80a8f3e 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -494,7 +494,25 @@ uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() cons
 {
     return pDlg->GetResultSet();
 }
+bool AbstractMailMergeDlg_Impl::IsSaveIndividualDocs() const
+{
+    return pDlg->IsSaveIndividualDocs();
+}
+bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const
+{
+    return pDlg->IsGenerateFromDataBase();
+}
+String AbstractMailMergeDlg_Impl::GetColumnName() const
+{
+    return pDlg->GetColumnName();
+}
+String AbstractMailMergeDlg_Impl::GetPath() const
+{
+    return pDlg->GetPath();
+}
 
+// AbstractMailMergeDlg_Impl end
+// AbstractMailMergeCreateFromDlg_Impl begin
 sal_Bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
 {
     return pDlg->IsThisDocument();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 1f18e01..e654529 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -332,6 +332,10 @@ class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
     virtual const ::rtl::OUString& GetSaveFilter() const; 
     virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const ;
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;
+    virtual bool IsSaveIndividualDocs() const;
+    virtual bool IsGenerateFromDataBase() const;
+    virtual String GetColumnName() const;
+    virtual String GetPath() const;
 };
 //for SwMailMergeDlg end
 //for SwMailMergeCreateFromDlg begin
@@ -584,4 +588,4 @@ struct SwDialogsResMgr
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/mailmrge.hxx b/sw/source/ui/inc/mailmrge.hxx
index b566ecf..b018a79 100644
--- a/sw/source/ui/inc/mailmrge.hxx
+++ b/sw/source/ui/inc/mailmrge.hxx
@@ -147,6 +147,12 @@ public:
     ~SwMailMergeDlg();
 
     inline sal_uInt16	GetMergeType() { return nMergeType; }
+
+    bool IsSaveIndividualDocs() const { return aSaveIndividualRB.IsChecked(); }
+    bool IsGenerateFromDataBase() const { return aGenerateFromDataBaseCB.IsChecked(); }
+    String GetColumnName() const { return aColumnLB.GetSelectEntry();}
+    String GetPath() const { return aPathED.GetText();}
+
     const ::rtl::OUString& GetSaveFilter() const {return m_sSaveFilter;} 
     inline const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > GetSelection() const { return m_aSelection; }
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> GetResultSet() const;


More information about the Libreoffice-commits mailing list