diff options
-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 ) { |