[Libreoffice-commits] .: comphelper/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Apr 5 09:08:54 PDT 2011


 comphelper/source/misc/mimeconfighelper.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 2d9a215455bdc59d92d98cd4bef6555112ad0992
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 5 16:57:19 2011 +0100

    createFromAscii -> RTL_CONSTASCII_USTRING

diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index 87b7612..6cfec82 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -197,7 +197,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFacto
 
     if ( !m_xFilterFactory.is() )
         m_xFilterFactory.set(
-            m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+            m_xFactory->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ),
             uno::UNO_QUERY );
 
     return m_xFilterFactory;
@@ -220,7 +220,7 @@ sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilte
             if ( aFilterAny >>= aData )
             {
                 SequenceAsHashMap aFilterHM( aData );
-                nFlags = aFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 );
+                nFlags = aFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 );
             }
         }
     } catch( uno::Exception& )
@@ -795,7 +795,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
             if ( aImpFilterAny >>= aImpData )
             {
                 SequenceAsHashMap aImpFilterHM( aImpData );
-                sal_Int32 nFlags = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ),
+                sal_Int32 nFlags = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")),
                                                                         (sal_Int32)0 );
                 
                 if ( !( nFlags & SFX_FILTER_IMPORT ) )
@@ -810,16 +810,16 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
                 }
                 else
                 {
-                    ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "DocumentService" ), ::rtl::OUString() );
-                    ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Type" ), ::rtl::OUString() );
+                    ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService")), ::rtl::OUString() );
+                    ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")), ::rtl::OUString() );
 
                     OSL_ENSURE( aDocumentServiceName.getLength() && aTypeName.getLength(), "Incomplete filter data!" );
                     if ( aDocumentServiceName.getLength() && aTypeName.getLength() )
                     {
                         uno::Sequence< beans::NamedValue > aSearchRequest( 2 );
-                        aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "Type" );
+                        aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type"));
                         aSearchRequest[0].Value <<= aTypeName;
-                        aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+                        aSearchRequest[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
                         aSearchRequest[1].Value <<= aDocumentServiceName;
                         
                         uno::Sequence< beans::PropertyValue > aExportFilterProps = SearchForFilter( 
@@ -831,7 +831,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
                         if ( aExportFilterProps.getLength() )
                         {
                             SequenceAsHashMap aExpPropsHM( aExportFilterProps );
-                            aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), ::rtl::OUString() );
+                            aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), ::rtl::OUString() );
                         }
                     }
                 }
@@ -866,7 +866,7 @@ uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter(
             if ( xFilterEnum->nextElement() >>= aProps )
             {
                 SequenceAsHashMap aPropsHM( aProps );
-                sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ),
+                sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")),
                                                                         (sal_Int32)0 );
                 if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) )
                 {


More information about the Libreoffice-commits mailing list