Kaydet (Commit) 1d7eda00 authored tarafından Noel Grandin's avatar Noel Grandin

convert include/sfx2/fcontnr.hxx from String to OUString

Change-Id: I4a03dfba5b1779a061d01026640f2f6bdc154c0b
üst 5e6b2d0e
......@@ -82,23 +82,23 @@ class SFX2_DLLPUBLIC SfxFilterContainer
SfxFilterContainer_Impl *pImpl;
public:
SfxFilterContainer( const String& rName );
SfxFilterContainer( const OUString& rName );
~SfxFilterContainer();
const String GetName() const;
const OUString GetName() const;
const SfxFilter* GetAnyFilter( SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4EA( const OUString& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4Extension( const OUString& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
SAL_DLLPRIVATE static void ReadFilters_Impl( sal_Bool bUpdate=sal_False );
SAL_DLLPRIVATE static void ReadSingleFilter_Impl( const OUString& rName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xTypeCFG,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& xFilterCFG,
sal_Bool bUpdate );
SAL_DLLPRIVATE static const SfxFilter* GetDefaultFilter_Impl( const String& );
SAL_DLLPRIVATE static const SfxFilter* GetDefaultFilter_Impl( const OUString& );
};
class SfxFilterMatcher_Impl;
......@@ -113,7 +113,7 @@ public:
~SfxFilterMatcher();
SAL_DLLPRIVATE static sal_Bool IsFilterInstalled_Impl( const SfxFilter* pFilter );
DECL_DLLPRIVATE_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String* );
DECL_DLLPRIVATE_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString* );
sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
......@@ -122,10 +122,10 @@ public:
const SfxFilter* GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const;
const SfxFilter* GetFilter4ClipBoardId( sal_uInt32 nId, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4EA( const String& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4Extension( const String& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4FilterName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4UIName( const String& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4EA( const OUString& rEA, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4Extension( const OUString& rExt, SfxFilterFlags nMust = SFX_FILTER_IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilter4UIName( const OUString& rName, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetFilterForProps( const com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue >& aSeq, SfxFilterFlags nMust = 0, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const;
const SfxFilter* GetAnyFilter( SfxFilterFlags nMust=0, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED ) const;
};
......
......@@ -136,10 +136,10 @@ inline String ToUpper_Impl( const String &rStr )
class SfxFilterContainer_Impl
{
public:
String aName;
String aServiceName;
OUString aName;
OUString aServiceName;
SfxFilterContainer_Impl( const String& rName )
SfxFilterContainer_Impl( const OUString& rName )
: aName( rName )
{
aServiceName = SfxObjectShell::GetServiceNameFromFactory( rName );
......@@ -153,9 +153,9 @@ const SfxFilter* SfxFilterContainer::aMethod( ArgType aArg, SfxFilterFlags nMust
return aMatch.aMethod( aArg, nMust, nDont ); \
}
IMPL_FORWARD_LOOP( GetFilter4EA, const String&, rEA );
IMPL_FORWARD_LOOP( GetFilter4Extension, const String&, rExt );
IMPL_FORWARD_LOOP( GetFilter4FilterName, const String&, rName );
IMPL_FORWARD_LOOP( GetFilter4EA, const OUString&, rEA );
IMPL_FORWARD_LOOP( GetFilter4Extension, const OUString&, rExt );
IMPL_FORWARD_LOOP( GetFilter4FilterName, const OUString&, rName );
const SfxFilter* SfxFilterContainer::GetAnyFilter( SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
......@@ -165,7 +165,7 @@ const SfxFilter* SfxFilterContainer::GetAnyFilter( SfxFilterFlags nMust, SfxFilt
//----------------------------------------------------------------
SfxFilterContainer::SfxFilterContainer( const String& rName )
SfxFilterContainer::SfxFilterContainer( const OUString& rName )
{
pImpl = new SfxFilterContainer_Impl( rName );
}
......@@ -179,12 +179,12 @@ SfxFilterContainer::~SfxFilterContainer()
//----------------------------------------------------------------
const String SfxFilterContainer::GetName() const
const OUString SfxFilterContainer::GetName() const
{
return pImpl->aName;
}
const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName )
const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const OUString& rName )
{
// Try to find out the type of factory.
// Interpret given name as Service- and ShortName!
......@@ -683,7 +683,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4Mime( const OUString& rMediaType, S
return GetFilterForProps( aSeq, nMust, nDont );
}
const SfxFilter* SfxFilterMatcher::GetFilter4EA( const String& rType,SfxFilterFlags nMust, SfxFilterFlags nDont ) const
const SfxFilter* SfxFilterMatcher::GetFilter4EA( const OUString& rType, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
if ( m_rImpl.pList )
{
......@@ -712,7 +712,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4EA( const String& rType,SfxFilterFl
return GetFilterForProps( aSeq, nMust, nDont );
}
const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const String& rExt, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
const SfxFilter* SfxFilterMatcher::GetFilter4Extension( const OUString& rExt, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
if ( m_rImpl.pList )
{
......@@ -765,7 +765,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4ClipBoardId( sal_uInt32 nId, SfxFil
return GetFilterForProps( aSeq, nMust, nDont );
}
const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
m_rImpl.InitForIterating();
const SfxFilter* pFirstFilter=0;
......@@ -785,14 +785,14 @@ const SfxFilter* SfxFilterMatcher::GetFilter4UIName( const String& rName, SfxFil
return pFirstFilter;
}
const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const OUString& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
String aName( rName );
sal_uInt16 nIndex = aName.SearchAscii(": ");
if ( nIndex != STRING_NOTFOUND )
{
SAL_WARN( "sfx.bastyp", "Old filter name used!");
aName = rName.Copy( nIndex + 2 );
aName = rName.copy( nIndex + 2 );
}
if ( bFirstRead )
......@@ -840,7 +840,7 @@ const SfxFilter* SfxFilterMatcher::GetFilter4FilterName( const String& rName, Sf
return NULL;
}
IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String*, pString )
IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, OUString*, pString )
{
const SfxFilter* pFilter = pThis->GetFilter4Extension( *pString, SFX_FILTER_IMPORT );
if (pFilter && !pFilter->GetWildcard().Matches( String() ) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment