[Libreoffice-commits] .: comphelper/inc comphelper/source

Matus Kukan mkukan at kemper.freedesktop.org
Sat Feb 25 15:06:31 PST 2012


 comphelper/inc/comphelper/mimeconfighelper.hxx |    4 ++++
 comphelper/source/misc/mimeconfighelper.cxx    |   18 ++++++++++++++++++
 2 files changed, 22 insertions(+)

New commits:
commit 21261663205741892f780adeae119402f386ad9e
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sun Feb 26 00:03:21 2012 +0100

    add AddFilterNameCheckOwnFile back for WNT

diff --git a/comphelper/inc/comphelper/mimeconfighelper.hxx b/comphelper/inc/comphelper/mimeconfighelper.hxx
index 4ca3ae7..10fcfd1 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 168c279..72ecd73 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 )
 {


More information about the Libreoffice-commits mailing list