[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 28 21:21:56 UTC 2019
sfx2/source/doc/docinsert.cxx | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 0c4736a3e6b6e641579f517cf134ce2fd89fe132
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 28 19:46:26 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 28 22:21:05 2019 +0100
Resolves: tdf#129082 insert sheet from file fails
since...
tdf#127958 crash adding 2 or more files into writer master document
commit 8f6f9e4217d03d874fb1ce391730a1c893ab6844
Date: Mon Oct 7 09:40:41 2019 +0200
used the SfxItemSet copy ctor to make a copy of the itemset, but the orig
itemset was a SfxAllItemSet not a SfxItemSet.
an SfxAllItemSet allows all items to be added but a plain SfxItemSet only
allows items in certain ranges to be inserted. Upshot is that later on the
filename property cannot be set in the itemset, so file can't be opened.
since...
tdf#128898 import text from file with text-decode failed
commit cc4dbe473b0b68dbe120065c1d6a64a087f41ba2
Date: Wed Nov 27 11:47:57 2019 +0200
tdf#128898 import text from file with text-decode failed
these are std::shared_ptr so we can return to passing in the original
SfxAllItemSet again to fix the problem
Change-Id: I63a4230a96f9dae7726d854297ebb2b51df4868d
Reviewed-on: https://gerrit.libreoffice.org/84024
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index ec25e6a39fd5..7b7fa8516e95 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -105,12 +105,9 @@ std::unique_ptr<SfxMedium> DocumentInserter::CreateMedium(char const*const pFall
if (!m_nError && m_xItemSet && !m_pURLList.empty())
{
DBG_ASSERT( m_pURLList.size() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
- std::unique_ptr<SfxItemSet> xItemSet;
- if (m_xItemSet)
- xItemSet = std::make_unique<SfxItemSet>(*m_xItemSet);
pMedium.reset(new SfxMedium(
m_pURLList[0], SFX_STREAM_READONLY,
- SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), std::move(xItemSet) ));
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_xItemSet ));
pMedium->UseInteractionHandler( true );
std::unique_ptr<SfxFilterMatcher> pMatcher;
if ( !m_sDocFactory.isEmpty() )
@@ -145,12 +142,9 @@ SfxMediumList DocumentInserter::CreateMediumList()
{
for (auto const& url : m_pURLList)
{
- std::unique_ptr<SfxItemSet> xItemSet;
- if (m_xItemSet)
- xItemSet = std::make_unique<SfxItemSet>(*m_xItemSet);
std::unique_ptr<SfxMedium> pMedium(new SfxMedium(
url, SFX_STREAM_READONLY,
- SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), std::move(xItemSet) ));
+ SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_xItemSet ));
pMedium->UseInteractionHandler( true );
More information about the Libreoffice-commits
mailing list