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

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

Change-Id: Ia0cea486e77e449f86cf21013dd193523868261f
üst b2a196a8
......@@ -38,22 +38,22 @@ public:
sal_uInt16 nOrdinal, const sal_Char* asciiViewName );
SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
sal_uInt16 GetOrdinal() const { return nOrd; }
sal_uInt16 GetOrdinal() const { return nOrd; }
/// returns a legacy view name. This is "view" with an appended ordinal/ID.
String GetLegacyViewName() const;
OUString GetLegacyViewName() const;
/** returns a API-compatible view name.
For details on which view names are specified, see the XModel2.getAvailableViewControllerNames
documentation.
*/
String GetAPIViewName() const;
OUString GetAPIViewName() const;
private:
SfxViewCtor fnCreate;
SfxViewCtor fnCreate;
sal_uInt16 nOrd;
const String m_sViewName;
const OUString m_sViewName;
};
#endif
......
......@@ -149,7 +149,7 @@ void SfxObjectFactory::RegisterViewFactory
const String sViewName( rFactory.GetAPIViewName() );
for ( SfxViewFactoryArr_Impl::const_iterator it = pImpl->aViewFactoryArr.begin(); it != pImpl->aViewFactoryArr.end(); ++it )
{
if ( !(*it)->GetAPIViewName().Equals( sViewName ) )
if ( (*it)->GetAPIViewName() != sViewName )
continue;
OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
"SfxObjectFactory::RegisterViewFactory: duplicate view name '"));
......
......@@ -31,7 +31,7 @@ SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame *pFrame, SfxViewShell
return (*fnCreate)(pFrame, pOldSh);
}
String SfxViewFactory::GetLegacyViewName() const
OUString SfxViewFactory::GetLegacyViewName() const
{
OUStringBuffer aViewName;
aViewName.appendAscii(RTL_CONSTASCII_STRINGPARAM("view"));
......@@ -39,9 +39,9 @@ String SfxViewFactory::GetLegacyViewName() const
return aViewName.makeStringAndClear();
}
String SfxViewFactory::GetAPIViewName() const
OUString SfxViewFactory::GetAPIViewName() const
{
if ( m_sViewName.Len() > 0 )
if ( !m_sViewName.isEmpty() )
return m_sViewName;
if ( GetOrdinal() == 0 )
......
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