summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-08-27 14:29:50 +0200
committerNoel Grandin <noel@peralex.com>2013-08-29 09:30:09 +0200
commitefad4ffdf3be45494e6a46b5cdb083cdc30ec9be (patch)
tree70b87ae323e9768389af1b49fe218feddf8e0ada
parent5dc5487c39880b084a97743f0101be4b375ed599 (diff)
convert include/sfx2/docfac.hxx from String to OUString
Change-Id: I324e8985b2beef25e6f44f5cfee9be274a124e34
-rw-r--r--include/sfx2/docfac.hxx14
-rw-r--r--sfx2/source/doc/docfac.cxx16
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
3 files changed, 16 insertions, 16 deletions
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index e8d15a8366cd..96034944e0a2 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -73,9 +73,9 @@ public:
const SvGlobalName& GetClassId() const;
SfxObjectShellFlags GetFlags() { return nFlags; }
const char* GetShortName() const { return pShortName; }
- String GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
- String GetFactoryName() const { return OUString::createFromAscii(pShortName); }
- String GetModuleName() const;
+ OUString GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
+ OUString GetFactoryName() const { return OUString::createFromAscii(pShortName); }
+ OUString GetModuleName() const;
SfxFilterContainer *GetFilterContainer( sal_Bool bForceLoad = sal_True) const;
// Views
@@ -84,13 +84,13 @@ public:
SfxViewFactory& GetViewFactory(sal_uInt16 i = 0) const;
/// returns the view factory whose GetAPIViewName or GetLegacyViewName delivers the requested logical name
- SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
+ SfxViewFactory* GetViewFactoryByViewName( const OUString& i_rViewName ) const;
// Filter
const SfxFilter* GetTemplateFilter() const;
- static String GetStandardTemplate( const String& rServiceName );
- static void SetStandardTemplate( const String& rServiceName, const String& rTemplateName );
- static void SetSystemTemplate( const String& rServiceName, const String& rTemplateName );
+ static OUString GetStandardTemplate( const OUString& rServiceName );
+ static void SetStandardTemplate( const OUString& rServiceName, const OUString& rTemplateName );
+ static void SetSystemTemplate( const OUString& rServiceName, const OUString& rTemplateName );
void SetDocumentServiceName( const OUString& rServiceName );
const OUString& GetDocumentServiceName() const;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 5047195d03ed..2fddca0e858b 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -194,7 +194,7 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
pImpl->pModule = pMod;
}
-void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName )
+void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OUString& rTemplateName )
{
static const int nMaxPathSize = 16000;
static OUString SERVICE_FILTER_FACTORY("com.sun.star.document.FilterFactory");
@@ -261,7 +261,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri
aBackupURL += DEF_TPL_STR;
aBackupURL += aExt;
- if ( rTemplateName.Len() != 0 )
+ if ( !rTemplateName.isEmpty() )
{
if ( xSimpleFileAccess->exists( aUserTemplateURL ) && !bChanged )
xSimpleFileAccess->copy( aUserTemplateURL, aBackupURL );
@@ -307,7 +307,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri
}
}
-void SfxObjectFactory::SetStandardTemplate( const String& rServiceName, const String& rTemplate )
+void SfxObjectFactory::SetStandardTemplate( const OUString& rServiceName, const OUString& rTemplate )
{
SvtModuleOptions::EFactory eFac = SvtModuleOptions::ClassifyFactoryByServiceName(rServiceName);
if (eFac == SvtModuleOptions::E_UNKNOWN_FACTORY)
@@ -319,13 +319,13 @@ void SfxObjectFactory::SetStandardTemplate( const String& rServiceName, const St
}
}
-String SfxObjectFactory::GetStandardTemplate( const String& rServiceName )
+OUString SfxObjectFactory::GetStandardTemplate( const OUString& rServiceName )
{
SvtModuleOptions::EFactory eFac = SvtModuleOptions::ClassifyFactoryByServiceName(rServiceName);
if (eFac == SvtModuleOptions::E_UNKNOWN_FACTORY)
eFac = SvtModuleOptions::ClassifyFactoryByShortName(rServiceName);
- String sTemplate;
+ OUString sTemplate;
if (eFac != SvtModuleOptions::E_UNKNOWN_FACTORY)
sTemplate = SvtModuleOptions().GetFactoryStandardTemplate(eFac);
@@ -368,7 +368,7 @@ const SvGlobalName& SfxObjectFactory::GetClassId() const
return pImpl->aClassName;
}
-String SfxObjectFactory::GetFactoryURL() const
+OUString SfxObjectFactory::GetFactoryURL() const
{
OUStringBuffer aURLComposer;
aURLComposer.appendAscii(RTL_CONSTASCII_STRINGPARAM("private:factory/"));
@@ -376,7 +376,7 @@ String SfxObjectFactory::GetFactoryURL() const
return aURLComposer.makeStringAndClear();
}
-String SfxObjectFactory::GetModuleName() const
+OUString SfxObjectFactory::GetModuleName() const
{
try
{
@@ -413,7 +413,7 @@ sal_uInt16 SfxObjectFactory::GetViewNo_Impl( const sal_uInt16 i_nViewId, const s
return i_nFallback;
}
-SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rViewName ) const
+SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const OUString& i_rViewName ) const
{
for ( sal_uInt16 nViewNo = 0;
nViewNo < GetViewFactoryCount();
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 9cf7714ca1ca..b083caa3ad6e 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1773,7 +1773,7 @@ static std::vector<OUString> lcl_getAllFactoryURLs ()
for( sal_Int32 i=0, nCount = aServiceNames.getLength(); i < nCount; ++i )
{
- if ( SfxObjectFactory::GetStandardTemplate( aServiceNames[i] ).Len() > 0 )
+ if ( ! SfxObjectFactory::GetStandardTemplate( aServiceNames[i] ).isEmpty() )
{
SvtModuleOptions::EFactory eFac = SvtModuleOptions::E_WRITER;
SvtModuleOptions::ClassifyFactoryByName( aServiceNames[i], eFac );