LibreOffice Module sw (master)  1
Classes | Namespaces | Macros | Enumerations | Functions
dbmgr.cxx File Reference
#include <sal/config.h>
#include <cassert>
#include <unotxdoc.hxx>
#include <sfx2/app.hxx>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/VndSunStarPkgUrlReferenceFactory.hpp>
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdb/TextConnectionSettings.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
#include <com/sun/star/sdb/XCompletedExecution.hpp>
#include <com/sun/star/container/XChild.hpp>
#include <com/sun/star/text/MailMergeEvent.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <vcl/errinf.hxx>
#include <vcl/print.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <dbconfig.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/zforlist.hxx>
#include <svl/stritem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/progress.hxx>
#include <sfx2/dispatch.hxx>
#include <cmdid.h>
#include <swmodule.hxx>
#include <view.hxx>
#include <docsh.hxx>
#include <edtwin.hxx>
#include <wrtsh.hxx>
#include <fldbas.hxx>
#include <dbui.hxx>
#include <dbmgr.hxx>
#include <doc.hxx>
#include <IDocumentLinksAdministration.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentUndoRedo.hxx>
#include <swwait.hxx>
#include <swunohelper.hxx>
#include <strings.hrc>
#include <mmconfigitem.hxx>
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/XColumn.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/mail/MailAttachment.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
#include <mailmergehelper.hxx>
#include <maildispatcher.hxx>
#include <svtools/htmlcfg.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <svl/numuno.hxx>
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <unotools/charclass.hxx>
#include <tools/diagnose_ex.h>
#include <unomailmerge.hxx>
#include <sfx2/event.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <osl/mutex.hxx>
#include <rtl/textenc.h>
#include <rtl/tencinfo.h>
#include <cppuhelper/implbase.hxx>
#include <ndindex.hxx>
#include <swevent.hxx>
#include <sal/log.hxx>
#include <swabstdlg.hxx>
#include <vector>
#include <section.hxx>
#include <rootfrm.hxx>
#include <calc.hxx>
#include <dbfld.hxx>
#include <IDocumentState.hxx>
#include <imaildsplistener.hxx>
#include <iodetect.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <memory>
#include <comphelper/propertysequence.hxx>
Include dependency graph for dbmgr.cxx:

Go to the source code of this file.

Classes

class  SwDBManager::ConnectionDisposedListener_Impl
 
struct  SwDBManager::SwDBManager_Impl
 
class  SwDBManager::MailDispatcherListener_Impl
 

Namespaces

 sw
 Dialog to specify the properties of date form field.
 

Macros

#define DB_SEP_SPACE   0
 
#define DB_SEP_TAB   1
 
#define DB_SEP_RETURN   2
 
#define DB_SEP_NEWLINE   3
 

Enumerations

enum  SwDBNextRecord
 
enum  WorkingDocType
 

Functions

static bool lcl_ToNextRecord (SwDSParam *pParam, const SwDBNextRecord action=SwDBNextRecord::NEXT)
 
static SfxObjectShelllcl_CreateWorkingDocument (const WorkingDocType aType, const SwWrtShell &rSourceWrtShell, const vcl::Window *pSourceWindow, SwDBManager **const ppDBManager, SwView **const pView, SwWrtShell **const pWrtShell, SwDoc **const pDoc)
 
static bool lcl_getCountFromResultSet (sal_Int32 &rCount, const SwDSParam *pParam)
 
static void lcl_InitNumberFormatter (SwDSParam &rParam, uno::Reference< sdbc::XDataSource > const &xSource)
 
static bool lcl_MoveAbsolute (SwDSParam *pParam, long nAbsPos)
 
static void lcl_GetColumnCnt (SwDSParam *pParam, const uno::Reference< beans::XPropertySet > &rColumnProps, LanguageType nLanguage, OUString &rResult, double *pNumber)
 
static bool lcl_GetColumnCnt (SwDSParam *pParam, const OUString &rColumnName, LanguageType nLanguage, OUString &rResult, double *pNumber)
 
static OUString lcl_FindColumn (const OUString &sFormatStr, sal_uInt16 &nUsedPos, sal_uInt8 &nSeparator)
 
static void lcl_RemoveSectionLinks (SwWrtShell &rWorkShell)
 
static void lcl_SaveDebugDoc (SfxObjectShell *xTargetDocShell, const char *name, int no=0)
 
static bool lcl_SaveDoc (const INetURLObject *pFileURL, const std::shared_ptr< const SfxFilter > &pStoreToFilter, const OUString *pStoreToFilterOptions, const uno::Sequence< beans::PropertyValue > *pSaveToFilterData, const bool bIsPDFexport, SfxObjectShell *xObjectShell, SwWrtShell &rWorkShell, OUString *const decodedURL=nullptr)
 
static void lcl_PreparePrinterOptions (const uno::Sequence< beans::PropertyValue > &rInPrintOptions, uno::Sequence< beans::PropertyValue > &rOutPrintOptions)
 
static SwMailMessagelcl_CreateMailFromDoc (const SwMergeDescriptor &rMergeDescriptor, const OUString &sFileURL, const OUString &sMailRecipient, const OUString &sMailBodyMimeType, rtl_TextEncoding sMailEncoding, const OUString &sAttachmentMimeType)
 
DBConnURIType sw::GetDBunoType (const INetURLObject &rURL)
 

Macro Definition Documentation

#define DB_SEP_NEWLINE   3

Definition at line 130 of file dbmgr.cxx.

Referenced by SwDBManager::ImportDBEntry(), and lcl_FindColumn().

#define DB_SEP_RETURN   2

Definition at line 129 of file dbmgr.cxx.

Referenced by SwDBManager::ImportDBEntry(), and lcl_FindColumn().

#define DB_SEP_SPACE   0

Definition at line 127 of file dbmgr.cxx.

Referenced by SwDBManager::ImportDBEntry(), and lcl_FindColumn().

#define DB_SEP_TAB   1

Definition at line 128 of file dbmgr.cxx.

Referenced by SwDBManager::ImportDBEntry(), and lcl_FindColumn().

Enumeration Type Documentation

enum SwDBNextRecord
strong

Definition at line 147 of file dbmgr.cxx.

enum WorkingDocType
strong

Definition at line 155 of file dbmgr.cxx.

Function Documentation

static SwMailMessage* lcl_CreateMailFromDoc ( const SwMergeDescriptor rMergeDescriptor,
const OUString &  sFileURL,
const OUString &  sMailRecipient,
const OUString &  sMailBodyMimeType,
rtl_TextEncoding  sMailEncoding,
const OUString &  sAttachmentMimeType 
)
static
static SfxObjectShell * lcl_CreateWorkingDocument ( const WorkingDocType  aType,
const SwWrtShell rSourceWrtShell,
const vcl::Window pSourceWindow,
SwDBManager **const  ppDBManager,
SwView **const  pView,
SwWrtShell **const  pWrtShell,
SwDoc **const  pDoc 
)
static
static OUString lcl_FindColumn ( const OUString &  sFormatStr,
sal_uInt16 &  nUsedPos,
sal_uInt8 nSeparator 
)
static

Definition at line 598 of file dbmgr.cxx.

References DB_SEP_NEWLINE, DB_SEP_RETURN, DB_SEP_SPACE, and DB_SEP_TAB.

Referenced by SwDBManager::ImportDBEntry().

static void lcl_GetColumnCnt ( SwDSParam pParam,
const uno::Reference< beans::XPropertySet > &  rColumnProps,
LanguageType  nLanguage,
OUString &  rResult,
double *  pNumber 
)
static
static bool lcl_GetColumnCnt ( SwDSParam pParam,
const OUString &  rColumnName,
LanguageType  nLanguage,
OUString &  rResult,
double *  pNumber 
)
static

Definition at line 397 of file dbmgr.cxx.

References lcl_GetColumnCnt(), and SwDSParam::xResultSet.

static bool lcl_getCountFromResultSet ( sal_Int32 &  rCount,
const SwDSParam pParam 
)
static

Definition at line 165 of file dbmgr.cxx.

References SwDSParam::aSelection, and SwDSParam::xResultSet.

Referenced by SwDBManager::MergeMailFiles().

static void lcl_InitNumberFormatter ( SwDSParam rParam,
uno::Reference< sdbc::XDataSource > const &  xSource 
)
static
static bool lcl_MoveAbsolute ( SwDSParam pParam,
long  nAbsPos 
)
static
static void lcl_PreparePrinterOptions ( const uno::Sequence< beans::PropertyValue > &  rInPrintOptions,
uno::Sequence< beans::PropertyValue > &  rOutPrintOptions 
)
static

Definition at line 911 of file dbmgr.cxx.

References nIndex.

Referenced by SwDBManager::MergeMailFiles().

static void lcl_RemoveSectionLinks ( SwWrtShell rWorkShell)
static
static void lcl_SaveDebugDoc ( SfxObjectShell xTargetDocShell,
const char *  name,
int  no = 0 
)
static
static bool lcl_SaveDoc ( const INetURLObject pFileURL,
const std::shared_ptr< const SfxFilter > &  pStoreToFilter,
const OUString *  pStoreToFilterOptions,
const uno::Sequence< beans::PropertyValue > *  pSaveToFilterData,
const bool  bIsPDFexport,
SfxObjectShell xObjectShell,
SwWrtShell rWorkShell,
OUString *const  decodedURL = nullptr 
)
static
static bool lcl_ToNextRecord ( SwDSParam pParam,
const SwDBNextRecord  action = SwDBNextRecord::NEXT 
)
static