diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-02-26 00:03:21 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-02-26 00:03:21 +0100 |
commit | 21261663205741892f780adeae119402f386ad9e (patch) | |
tree | e8441fb88f77e5a8f69cbd8da51bf45e3248ec6d | |
parent | Remove unused code (diff) | |
download | core-21261663205741892f780adeae119402f386ad9e.tar.gz core-21261663205741892f780adeae119402f386ad9e.zip |
add AddFilterNameCheckOwnFile back for WNT
-rw-r--r-- | comphelper/inc/comphelper/mimeconfighelper.hxx | 4 | ||||
-rw-r--r-- | comphelper/source/misc/mimeconfighelper.cxx | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/comphelper/inc/comphelper/mimeconfighelper.hxx b/comphelper/inc/comphelper/mimeconfighelper.hxx index 4ca3ae7b3adf..10fcfd1adbdf 100644 --- a/comphelper/inc/comphelper/mimeconfighelper.hxx +++ b/comphelper/inc/comphelper/mimeconfighelper.hxx @@ -120,6 +120,10 @@ public: ::rtl::OUString UpdateMediaDescriptorWithFilterName( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aObject ); +#ifdef WNT + sal_Bool AddFilterNameCheckOwnFile( + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr ); +#endif ::rtl::OUString GetDefaultFilterFromServiceName( const ::rtl::OUString& aServName, sal_Int32 nVersion ); diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index 168c27909a74..72ecd73ddb3c 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -705,6 +705,24 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu return UpdateMediaDescriptorWithFilterName( aMediaDescr, sal_True ); } +#ifdef WNT +sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( + uno::Sequence< beans::PropertyValue >& aMediaDescr ) +{ + sal_Bool bResult = sal_False; + + ::rtl::OUString aFilterName = UpdateMediaDescriptorWithFilterName( aMediaDescr, sal_False ); + if ( !aFilterName.isEmpty() ) + { + sal_Int32 nFlags = GetFilterFlags( aFilterName ); + // check the OWN flag + bResult = ( nFlags & SFX_FILTER_OWN ); + } + + return bResult; +} +#endif + //----------------------------------------------------------- ::rtl::OUString MimeConfigurationHelper::GetDefaultFilterFromServiceName( const ::rtl::OUString& aServiceName, sal_Int32 nVersion ) { |