LibreOffice Module sw (master)  1
Classes | Namespaces | Macros | Enumerations | Functions
dbmgr.cxx File Reference
#include <sal/config.h>
#include <cassert>
#include <cstdarg>
#include <unotxdoc.hxx>
#include <sfx2/app.hxx>
#include <sfx2/printer.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/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <vcl/errinf.hxx>
#include <sfx2/fcontnr.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <dbconfig.hxx>
#include <pagedesc.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/urihelper.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <vcl/oldprintadaptor.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 <initui.hxx>
#include <swundo.hxx>
#include <flddat.hxx>
#include <modcfg.hxx>
#include <shellio.hxx>
#include <dbui.hxx>
#include <dbmgr.hxx>
#include <doc.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentLinksAdministration.hxx>
#include <IDocumentContentOperations.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentUndoRedo.hxx>
#include <swwait.hxx>
#include <swunohelper.hxx>
#include <dbui.hrc>
#include <globals.hrc>
#include <strings.hrc>
#include <mmconfigitem.hxx>
#include <sfx2/request.hxx>
#include <hintids.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 <editeng/langitem.hxx>
#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 <pam.hxx>
#include <swcrsr.hxx>
#include <swevent.hxx>
#include <osl/file.hxx>
#include <sal/log.hxx>
#include <swabstdlg.hxx>
#include <fmthdft.hxx>
#include <vector>
#include <unomid.h>
#include <section.hxx>
#include <rootfrm.hxx>
#include <fmtpdsc.hxx>
#include <ndtxt.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 <officecfg/Office/Common.hxx>
Include dependency graph for dbmgr.cxx:

Go to the source code of this file.

Classes

class  SwDBManager::ConnectionDisposedListener_Impl
 
class  SwDataSourceRemovedListener
 Listens to removed data sources, and if it's one that's embedded into this document, triggers embedding removal. More...
 
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 {
  SwDBNextRecord::NEXT,
  SwDBNextRecord::FIRST
}
 
enum  WorkingDocType {
  WorkingDocType::SOURCE,
  WorkingDocType::TARGET,
  WorkingDocType::COPY
}
 

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 157 of file dbmgr.cxx.

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

#define DB_SEP_RETURN   2

Definition at line 156 of file dbmgr.cxx.

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

#define DB_SEP_SPACE   0

Definition at line 154 of file dbmgr.cxx.

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

#define DB_SEP_TAB   1

Definition at line 155 of file dbmgr.cxx.

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

Enumeration Type Documentation

enum SwDBNextRecord
strong
Enumerator
NEXT 
FIRST 

Definition at line 172 of file dbmgr.cxx.

enum WorkingDocType
strong
Enumerator
SOURCE 
TARGET 
COPY 

Definition at line 175 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 611 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 410 of file dbmgr.cxx.

References lcl_GetColumnCnt(), and SwDSParam::xResultSet.

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

Definition at line 182 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 924 of file dbmgr.cxx.

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