diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-10-04 10:13:24 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-11-25 16:27:06 +0100 |
commit | bbf246e40c7814bfc4038d456d388d1f90048287 (patch) | |
tree | c2c1d4cced69abc186de3f5ecf95eefe956af3f8 /sw/inc/dbmgr.hxx | |
parent | 660159a68acd54a8f213920457c1aeed79cffea5 (diff) |
tdf#102010 Never overwrite MM files via UNO
Fixes the regression introduced by
commit e637b6743a506ef74c93ccbe15ab6642f3baa34f
This commit removed the crazy bSubjectIsFilename handling,
where I didn't understood the case of bSubjectIsFilename
and a user supplied prefix.
Mail merge to files never overwrites an existing document,
but there is the special case, when a user selects a target
filename in the MM dialog for single file MM.
Should be fixed by a successive commmit, reverting this and
removing an existing file before starting the MM job.
Change-Id: Idda487023e6984de9c1e701fc088a6b7f92e9847
Diffstat (limited to 'sw/inc/dbmgr.hxx')
-rw-r--r-- | sw/inc/dbmgr.hxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 6078b2782d21..b124106e5e9f 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -162,7 +162,23 @@ struct SwMergeDescriptor * @defgroup file Mail merge as File settings * @addtogroup file * @{ */ - OUString sPath; + + /** + * Basename incl. the path for the generated files. + * + * The final filename will be created by concating a number to prevent + * overwriting an existing file and the extension based on the filter + * settings. + */ + OUString sPrefix; + /** + * Use the sPrefix as the target filename also overwriting an existing + * target file. + * + * Just used for the internal mail merge dialogs as mail merge never + * overwrites existing files (see SwDBManager::ExecuteFormLetter). + */ + bool bPrefixIsFilename; /** @} */ /** @@ -205,6 +221,7 @@ struct SwMergeDescriptor rSh(rShell), rDescriptor(rDesc), bCreateSingleFile( false ), + bPrefixIsFilename( false ), bSendAsHTML( true ), bSendAsAttachment( false ), pMailMergeConfigItem( nullptr ) |