diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-19 18:31:54 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-02 19:01:52 +0200 |
commit | f14eb4245eee81a8a1aa0b8da5ced39da098f474 (patch) | |
tree | ed0f9c73b49d749932fc1893a604b9551d72a716 /sfx2 | |
parent | c29e8559a21c1bb78e42682391a1594c820bf3f8 (diff) |
fdo#78742: SfxFilterMatcher: respect requested document service if set
sfx2::DocumentInserter::CreateMediumList() creates a SfxFilterMatcher
that should match Writer filters only, but actually Calc filters may be
returned; check that the document service matches.
(regression from 3da8f3680556e0163f660a0a159930337c8c32ff)
Change-Id: I6208d38c1110355105aa5d1ffa1b57142193a4d7
(cherry picked from commit 805fd1ca343d6295b8114a24cc29bdac332f266d)
Reviewed-on: https://gerrit.libreoffice.org/9404
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 65974d01b0f7..69c873a74598 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -482,7 +482,9 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c // Type detection returned a suitable filter for this. Use it. pFilter = SfxFilter::GetFilterByName(aFilterName); - if (!pFilter) + // fdo#78742 respect requested document service if set + if (!pFilter || (!m_rImpl.aName.isEmpty() + && m_rImpl.aName != pFilter->GetServiceName())) { // detect filter by given type // In case of this matcher is bound to a particular document type: |