diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-11 00:31:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-04-13 01:54:38 -0400 |
commit | eb878bf1659f12036e85a3b636c041976863152f (patch) | |
tree | f9ebf05700e1c39fbafa47767ce28ded6ec3511b | |
parent | ee5e495aa46bd73bcbfd77fc651cca8e7990b84a (diff) |
Get the filter provider name from SfxMedium instead.
This property is now transferred to SfxMedium. Let's get it from there.
Change-Id: Ie0a4680581500135f3b65370ea94946f02c02cb8
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 84e34e265a1c..fee8ea70413c 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)) |