sw/inc/dbmgr.hxx                      |    6 ++----
 sw/inc/swabstdlg.hxx                  |    3 ++-
 sw/source/ui/dialog/swdlgfact.cxx     |    2 +-
 sw/source/ui/dialog/swdlgfact.hxx     |    2 +-
 sw/source/ui/envelp/mailmrge.cxx      |    4 ++--
 sw/source/uibase/inc/mailmrge.hxx     |    4 ++--
 sw/source/uibase/uno/unomailmerge.cxx |    2 +-
 7 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit ecbb535ac9304a208583d08a760ef709065806b4
Author: Eilidh McAdam <eil...@lanedo.com>
Date:   Wed Sep 3 21:30:52 2014 +0100

    Use enum type DBManagerOptions for merge type constants
    
    Change-Id: I64367939e25d71451ac23f5766c8dc0a16d79c9e

diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 4eb8721..6d9d7fe 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -75,11 +75,9 @@ class SwMailMergeConfigItem;
 enum DBManagerOptions
 {
     DBMGR_MERGE,             ///< Data records in fields.
-    DBMGR_INSERT,            ///< Data records in text.
     DBMGR_MERGE_MAILMERGE,   ///< Print mail merge.
     DBMGR_MERGE_MAILING,     ///< Send mail merge as email.
     DBMGR_MERGE_MAILFILES,   ///< Save mail merg as files.
-    DBMGR_MERGE_DOCUMENTS,   ///< Print merged documents.
     DBMGR_MERGE_SINGLE_FILE  ///< Save merge as single file.
 };
 
@@ -132,7 +130,7 @@ typedef boost::ptr_vector<SwDSParam> SwDSParamArr;
 
 struct SwMergeDescriptor
 {
-    sal_uInt16                                              nMergeType;
+    DBManagerOptions                                    nMergeType;
     SwWrtShell&                                         rSh;
     const ::svx::ODataAccessDescriptor&                 rDescriptor;
     OUString                                            sSaveToFilter; ///< 
export filter to save resulting files
@@ -158,7 +156,7 @@ struct SwMergeDescriptor
 
     ::com::sun::star::uno::Sequence<  ::com::sun::star::beans::PropertyValue > 
 aPrintOptions;
 
-    SwMergeDescriptor( sal_uInt16 nType, SwWrtShell& rShell, 
::svx::ODataAccessDescriptor& rDesc ) :
+    SwMergeDescriptor( DBManagerOptions nType, SwWrtShell& rShell, 
::svx::ODataAccessDescriptor& rDesc ) :
         nMergeType(nType),
         rSh(rShell),
         rDescriptor(rDesc),
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 1acbf8d..237aa54 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -35,6 +35,7 @@
 #include <com/sun/star/container/XNamed.hpp>
 #include "itabenum.hxx"
 #include <boost/optional.hpp>
+#include "dbmgr.hxx"
 
 class SfxViewFrame;
 class SfxBindings;
@@ -140,7 +141,7 @@ public:
 class AbstractMailMergeDlg : public VclAbstractDialog
 {
 public:
-    virtual sal_uInt16  GetMergeType() = 0;
+    virtual DBManagerOptions GetMergeType() = 0;
     virtual const 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;
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index dca5f039..70f3f93 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -477,7 +477,7 @@ bool AbstractJavaEditDialog_Impl::IsUpdate() const
     return pDlg->IsUpdate();
 }
 
-sal_uInt16 AbstractMailMergeDlg_Impl::GetMergeType()
+DBManagerOptions AbstractMailMergeDlg_Impl::GetMergeType()
 {
     return pDlg->GetMergeType();
 }
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 21db21e..634ea37 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -282,7 +282,7 @@ class SwMailMergeDlg;
 class AbstractMailMergeDlg_Impl : public AbstractMailMergeDlg
 {
     DECL_ABSTDLG_BASE(AbstractMailMergeDlg_Impl,SwMailMergeDlg)
-    virtual sal_uInt16  GetMergeType() SAL_OVERRIDE ;
+    virtual DBManagerOptions GetMergeType() SAL_OVERRIDE ;
     virtual const OUString& GetSaveFilter() const SAL_OVERRIDE;
     virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any 
> GetSelection() const SAL_OVERRIDE ;
     virtual ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XResultSet> GetResultSet() const SAL_OVERRIDE;
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index f385dab..4ab290b 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -498,8 +498,8 @@ bool SwMailMergeDlg::ExecQryShell()
         nMergeType = DBMGR_MERGE_MAILMERGE;
     else
     {
-        nMergeType = static_cast< sal_uInt16 >( 
m_pSaveSingleDocRB->IsChecked() ?
-                    DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES );
+        nMergeType = m_pSaveSingleDocRB->IsChecked() ?
+            DBMGR_MERGE_SINGLE_FILE : DBMGR_MERGE_MAILFILES;
         SfxMedium* pMedium = rSh.GetView().GetDocShell()->GetMedium();
         INetURLObject aAbs;
         if( pMedium )
diff --git a/sw/source/uibase/inc/mailmrge.hxx 
b/sw/source/uibase/inc/mailmrge.hxx
index 7262893..3b2fa00 100644
--- a/sw/source/uibase/inc/mailmrge.hxx
+++ b/sw/source/uibase/inc/mailmrge.hxx
@@ -97,7 +97,7 @@ class SwMailMergeDlg : public SvxStandardDialog
     SwWrtShell&     rSh;
     SwModuleOptions* pModOpt;
 
-    sal_uInt16          nMergeType;
+    DBManagerOptions nMergeType;
     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >       
m_aSelection;
     ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > 
m_xFrame;
 
@@ -123,7 +123,7 @@ public:
         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >* 
pSelection = 0);
     virtual ~SwMailMergeDlg();
 
-    inline sal_uInt16   GetMergeType() { return nMergeType; }
+    inline DBManagerOptions GetMergeType() { return nMergeType; }
 
     bool IsSaveIndividualDocs() const { return 
m_pSaveIndividualRB->IsChecked(); }
     bool IsGenerateFromDataBase() const { return 
m_pGenerateFromDataBaseCB->IsChecked(); }
diff --git a/sw/source/uibase/uno/unomailmerge.cxx 
b/sw/source/uibase/uno/unomailmerge.cxx
index 695bc18..9787a01 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -658,7 +658,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
     // aDescriptor[ svx::daColumnObject ]    not used
     aDescriptor[ svx::daSelection ]          <<= aCurSelection;
 
-    sal_uInt16 nMergeType;
+    DBManagerOptions nMergeType;
     switch (nCurOutputType)
     {
         case MailMergeType::PRINTER : nMergeType = DBMGR_MERGE_MAILMERGE; 
break;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to