summaryrefslogtreecommitdiff
path: root/sw/inc/dbmgr.hxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-01-08 09:54:11 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2016-03-24 22:40:39 +0100
commitffe0b2c3b6d153dbb0a4a7c3a788ca22ae022ae6 (patch)
treef41fe88e1d7a669bfd9415de9ba43c3110398224 /sw/inc/dbmgr.hxx
parentc103bdedfe5c6042414209c536d731bbe6138ff5 (diff)
MM: rename and constify variables
Instead of the huge comparisons (in terms of text space), this deconstructs the mail merge type into smaller uppercase variables. bCancel is renamed to m_bCancel to especially distinguish it from the bNoError local variable, as both are supposed to be handled together. Otherall this should improve the readability of the code. Change-Id: I51ab17f7cd90a9e195d09dfcf37a0d194aa9fbbd
Diffstat (limited to 'sw/inc/dbmgr.hxx')
-rw-r--r--sw/inc/dbmgr.hxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index ac3deb1d9a9b..3a46ec553175 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -142,7 +142,7 @@ typedef std::vector<std::unique_ptr<SwDSParam>> SwDSParams_t;
struct SwMergeDescriptor
{
- DBManagerOptions nMergeType;
+ const DBManagerOptions nMergeType;
SwWrtShell& rSh;
const svx::ODataAccessDescriptor& rDescriptor;
OUString sSaveToFilter; ///< export filter to save resulting files
@@ -169,7 +169,9 @@ struct SwMergeDescriptor
css::uno::Sequence< css::beans::PropertyValue > aPrintOptions;
- SwMergeDescriptor( DBManagerOptions nType, SwWrtShell& rShell, svx::ODataAccessDescriptor& rDesc ) :
+ SwMergeDescriptor( const DBManagerOptions nType,
+ SwWrtShell& rShell,
+ const svx::ODataAccessDescriptor& rDesc ) :
nMergeType(nType),
rSh(rShell),
rDescriptor(rDesc),
@@ -194,7 +196,7 @@ friend class SwConnectionDisposedListener_Impl;
OUString sEMailAddrField; ///< Mailing: Column name of email address.
OUString sSubject; ///< Mailing: Subject
- bool bCancel; ///< Mail merge canceled.
+ bool m_bCancel; ///< Mail merge canceled.
bool bInitDBFields : 1;
bool bInMerge : 1; ///< merge process active
bool bMergeSilent : 1; ///< suppress display of dialogs/boxes (used when called over API)
@@ -221,8 +223,9 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE void ImportDBEntry(SwWrtShell* pSh);
/// merge to file _and_ merge to e-Mail
- SAL_DLLPRIVATE bool MergeMailFiles(SwWrtShell* pSh,
- const SwMergeDescriptor& rMergeDescriptor, vcl::Window* pParent );
+ SAL_DLLPRIVATE bool MergeMailFiles( SwWrtShell* pSh,
+ const SwMergeDescriptor& rMergeDescriptor,
+ vcl::Window* pParent );
SwDBManager(SwDBManager const&) = delete;
SwDBManager& operator=(SwDBManager const&) = delete;