summaryrefslogtreecommitdiff
path: root/sw/inc/dbmgr.hxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-11 06:43:06 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-11 06:38:15 +0000
commite94d5233dd7939c54eb52fff456e817cecdf0a4c (patch)
tree24acd3465e88b1a2a26246272a41236edfbe9b21 /sw/inc/dbmgr.hxx
parentfb827f2a342602f7e62dbdebb638326193315eb6 (diff)
work on sane lifecylce for SfxFilter
all SfxFilter instances should now be hold inside of a std::shared_ptr. This fixes a number of huge memory leaks in the test framework and removes one huge source of memory issue in sfx2. SfxMedium contains a pointer to the SfxFilter but does not own. Therefore it is required that any SfxFilter belonging to a SfxMedium lives longer. However this seems to work mostly by hoping that all SfxFilter instances are stored in a global array. As we have seen with the tests this is not true (there are also some cases inside of sd that seem to not follow that pattern as well). Change-Id: I12fd04a504cc4efc0a94967abd91c6fe2c6a8ce8 Reviewed-on: https://gerrit.libreoffice.org/23140 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sw/inc/dbmgr.hxx')
-rw-r--r--sw/inc/dbmgr.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 7c58b8a20e57..fff831adb8a6 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -245,7 +245,7 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE bool CreateNewTemp(OUString &sPath, const OUString &sAddress,
std::unique_ptr< utl::TempFile > &aTempFile,
- const SwMergeDescriptor& rMergeDescriptor, const SfxFilter* pStoreToFilter);
+ const SwMergeDescriptor& rMergeDescriptor, std::shared_ptr<const SfxFilter> pStoreToFilter);
SAL_DLLPRIVATE bool CreateTargetDocShell(sal_Int32 nMaxDumpDocs, bool bMergeShell, vcl::Window *pSourceWindow,
@@ -261,7 +261,7 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE void UpdateExpFields(SwWrtShell& rWorkShell, SfxObjectShellLock xWorkDocSh);
- SAL_DLLPRIVATE void CreateStoreToFilter(const SfxFilter *&pStoreToFilter, const OUString *&pStoreToFilterOptions,
+ SAL_DLLPRIVATE void CreateStoreToFilter(std::shared_ptr<const SfxFilter>& pStoreToFilter, const OUString *&pStoreToFilterOptions,
SwDocShell *pSourceDocSh, bool bEMail, const SwMergeDescriptor &rMergeDescriptor);
SAL_DLLPRIVATE void MergeSingleFiles(SwDoc *pWorkDoc, SwWrtShell &rWorkShell, SwWrtShell *pTargetShell, SwDoc *pTargetDoc,
@@ -282,7 +282,7 @@ friend class SwConnectionDisposedListener_Impl;
SAL_DLLPRIVATE bool SavePrintDoc(SfxObjectShellRef xTargetDocShell, SwView *pTargetView,
const SwMergeDescriptor &rMergeDescriptor,
std::unique_ptr< utl::TempFile > &aTempFile,
- const SfxFilter *&pStoreToFilter, const OUString *&pStoreToFilterOptions,
+ std::shared_ptr<const SfxFilter>& pStoreToFilter, const OUString *&pStoreToFilterOptions,
const bool bMergeShell, bool bCreateSingleFile, const bool bPrinter);
SAL_DLLPRIVATE void SetPrinterOptions(const SwMergeDescriptor &rMergeDescriptor,