[Libreoffice-commits] core.git: Branch 'feature/orcus-update' - sfx2/source
Kohei Yoshida
kohei.yoshida at gmail.com
Wed Apr 10 21:28:47 PDT 2013
sfx2/source/doc/sfxbasemodel.cxx | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
New commits:
commit ff58b45466307de627d7732fb08ff8d2b0968d8c
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Apr 11 00:31:02 2013 -0400
Get the filter provider name from SfxMedium instead.
This property is now transferred to SfxMedium. Let's get it from there.
Change-Id: Ie0a4680581500135f3b65370ea94946f02c02cb8
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 84e34e2..fee8ea7 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1814,18 +1814,13 @@ void SAL_CALL SfxBaseModel::initNew()
namespace {
-OUString getFilterProvider(const Sequence<beans::PropertyValue>& rArgs)
+OUString getFilterProvider( SfxMedium& rMedium )
{
- OUString aStr;
- for (sal_Int32 i = 0, n = rArgs.getLength(); i < n; ++i)
- {
- if (rArgs[i].Name == "FilterProvider")
- {
- rArgs[i].Value >>= aStr;
- return aStr;
- }
- }
- return aStr;
+ const SfxFilter* pFilter = rMedium.GetFilter();
+ if (!pFilter)
+ return OUString();
+
+ return pFilter->GetProviderName();
}
}
@@ -1853,7 +1848,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA
SfxMedium* pMedium = new SfxMedium( seqArguments );
sal_uInt32 nError = ERRCODE_NONE;
- OUString aFilterProvider = getFilterProvider(seqArguments);
+ OUString aFilterProvider = getFilterProvider(*pMedium);
if (!aFilterProvider.isEmpty())
{
if (!m_pData->m_pObjectShell->DoLoadExternal(pMedium))
More information about the Libreoffice-commits
mailing list