summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-12 23:17:31 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2014-09-16 08:35:13 +0000
commit4851cde7b98226b0f82ae2b191c290173e9b06c6 (patch)
tree68d0597a0bb5b3e7760e928faadafc065acb6f74 /sw/inc
parent7dc81077cf1cfe5175f0437092f13b389c8017ab (diff)
fdo#70346 MM: add mail merge data to condition dict
Currently section hide conditions are just evaluated based on document field data. This adds the current mail merge dataset to the condition dictionary, so this can be used in the condition evaluation. The dataset values are named from their columns and added initially, therefore DB fields with identical names will overwrite the values in the dictionary! Change-Id: I82a5f9f6962628a76c836e8e2a7c9e264fdc16e0 Reviewed-on: https://gerrit.libreoffice.org/10978 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/dbfld.hxx3
-rw-r--r--sw/inc/dbmgr.hxx7
2 files changed, 8 insertions, 2 deletions
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 8677265eda08..d9d92f0494a5 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -109,6 +109,9 @@ public:
inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); }
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const SAL_OVERRIDE;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) SAL_OVERRIDE;
+
+ static bool FormatValue( SvNumberFormatter* pDocFormatter, OUString &aString, sal_uInt32 nFmt,
+ double &aNumber, sal_Int32 nColumnType, SwDBField *pField = NULL );
};
inline void SwDBField::SetExpansion(const OUString& rStr)
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 6d9d7fe52562..29fa03b8b2fe 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -29,6 +29,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
+
namespace com{namespace sun{namespace star{
namespace sdbc{
class XConnection;
@@ -71,6 +72,7 @@ class SvNumberFormatter;
class SwDbtoolsClient;
class SwXMailMerge;
class SwMailMergeConfigItem;
+class SwCalc;
enum DBManagerOptions
{
@@ -264,7 +266,6 @@ public:
const OUString& rColNm );
inline bool IsInMerge() const { return bInMerge; }
- void EndMerge();
void ExecuteFormLetter(SwWrtShell& rSh,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties,
@@ -297,7 +298,9 @@ public:
void CloseAll(bool bIncludingMerge = true);
bool GetMergeColumnCnt(const OUString& rColumnName, sal_uInt16 nLanguage,
- OUString &rResult, double *pNumber, sal_uInt32 *pFormat);
+ OUString &rResult, double *pNumber, sal_uInt32 *pFormat);
+ bool FillCalcWithMergeData(SvNumberFormatter *pDocFormatter,
+ sal_uInt16 nLanguage, bool asString, SwCalc &aCalc);
bool ToNextMergeRecord();
bool ToNextRecord(const OUString& rDataSource, const OUString& rTableOrQuery, sal_Int32 nCommandType = -1);