summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-27 11:47:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-28 08:30:09 +0100
commitcc4dbe473b0b68dbe120065c1d6a64a087f41ba2 (patch)
tree4a79023e31188c96819beaedb8f48bc52b7e1d28 /include
parent2bf687bebb30defe576ddb20c1c9680979ed3086 (diff)
tdf#128898 import text from file with text-decode failed
regression from commit 8f6f9e4217d03d874fb1ce391730a1c893ab6844 tdf#127958 crash adding 2 or more files into writer master document just make SfxMedium use shared_ptr, rather than the sometimes yes, sometimes no, ownership. Change-Id: I77559e9f766d84aca0f9dc0bd1b856c69f0f62f1 Reviewed-on: https://gerrit.libreoffice.org/83930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/docfile.hxx27
-rw-r--r--include/sfx2/docinsert.hxx2
2 files changed, 8 insertions, 21 deletions
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index ab2ea96aba28..2019b5738c01 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -69,35 +69,22 @@ class SFX2_DLLPUBLIC SfxMedium final : public SvRefBase
public:
SfxMedium();
- /**
- * @param pSet Takes ownership
- */
SfxMedium( const OUString &rName,
StreamMode nOpenMode,
std::shared_ptr<const SfxFilter> pFilter = nullptr,
- std::unique_ptr<SfxItemSet> pSet = nullptr );
- /**
- * @param pSet Takes ownership
- */
+ const std::shared_ptr<SfxItemSet>& pSet = nullptr );
SfxMedium( const OUString &rName,
const OUString &rReferer,
StreamMode nOpenMode,
std::shared_ptr<const SfxFilter> pFilter = nullptr,
- std::unique_ptr<SfxItemSet> pSet = nullptr );
-
- /**
- * @param pSet does NOT take ownership
- */
+ const std::shared_ptr<SfxItemSet>& pSet = nullptr );
SfxMedium( const css::uno::Reference< css::embed::XStorage >& xStorage,
- const OUString& rBaseURL,
- const SfxItemSet* pSet=nullptr );
- /**
- * @param pSet does NOT take ownership
- */
+ const OUString& rBaseURL,
+ const std::shared_ptr<SfxItemSet>& pSet = nullptr );
SfxMedium( const css::uno::Reference< css::embed::XStorage >& xStorage,
- const OUString& rBaseURL,
- const OUString& rTypeName,
- const SfxItemSet* pSet=nullptr );
+ const OUString& rBaseURL,
+ const OUString& rTypeName,
+ const std::shared_ptr<SfxItemSet>& pSet = nullptr );
SfxMedium( const css::uno::Sequence< css::beans::PropertyValue >& aArgs );
virtual ~SfxMedium() override;
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index 0148b854fed2..ae819299079c 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -50,7 +50,7 @@ private:
std::unique_ptr<sfx2::FileDialogHelper>
m_pFileDlg;
- std::unique_ptr<SfxItemSet> m_xItemSet;
+ std::shared_ptr<SfxItemSet> m_xItemSet;
std::vector<OUString> m_pURLList;
DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper*, void);