summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-15 20:56:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-16 13:24:05 +0000
commite1aff9edc8ffa4a9fbced86247abd2d2313578ed (patch)
tree771db7c7e7271266219c7c756d8c7871d323997b
parent2d19e9bb07ccff3134f855812dddfda5c07b1fe4 (diff)
add RTL_CONSTASCII_STRINGPARAM to appendAscii on string literals
-rw-r--r--sfx2/source/appl/appserv.cxx3
-rw-r--r--sfx2/source/appl/sfxpicklist.cxx6
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx14
-rw-r--r--sfx2/source/dialog/taskpane.cxx10
-rw-r--r--sfx2/source/doc/docfac.cxx4
-rw-r--r--sfx2/source/doc/objuno.cxx14
-rw-r--r--sfx2/source/view/viewfac.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx10
-rw-r--r--sfx2/source/view/viewsh.cxx4
9 files changed, 33 insertions, 34 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index d0b0ba7d23f6..2d7baf781e96 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -950,8 +950,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( xSystemShell.is() && sTemplRepoURL.getLength() > 0 )
{
::rtl::OUStringBuffer aURLBuf( sTemplRepoURL );
- aURLBuf.appendAscii( "?" );
- aURLBuf.appendAscii( "lang=" );
+ aURLBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM("?lang="));
// read locale from configuration
::rtl::OUString sLocale = getConfigurationStringValue(
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index d80a80cc6ec9..0c8f49981ac7 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -94,10 +94,10 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, cons
aPickEntry.append(::rtl::OUString::valueOf(static_cast<sal_Int32>(nNo + 1)));
}
else if ( nNo == 9 )
- aPickEntry.appendAscii("1~0");
+ aPickEntry.appendAscii(RTL_CONSTASCII_STRINGPARAM("1~0"));
else
aPickEntry.append(::rtl::OUString::valueOf(static_cast<sal_Int32>(nNo + 1)));
- aPickEntry.appendAscii(": ");
+ aPickEntry.appendAscii(RTL_CONSTASCII_STRINGPARAM(": "));
INetURLObject aURL( aURLString );
rtl::OUString aTipHelpText;
@@ -123,7 +123,7 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, sal_uInt16 nItemId, cons
if ( aPickEntry.getLength() > 50 )
{
aPickEntry.setLength( 47 );
- aPickEntry.appendAscii("...");
+ aPickEntry.appendAscii(RTL_CONSTASCII_STRINGPARAM("..."));
}
}
else
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 56b0868a2be4..e298de18c479 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1741,13 +1741,13 @@ void FileDialogHelper_Impl::addFilters( sal_Int64 nFlags,
// create the list of filters
::rtl::OUStringBuffer sQuery(256);
- sQuery.appendAscii("getSortedFilterList()");
- sQuery.appendAscii(":module=" );
- sQuery.append (rFactory ); // use long name here !
- sQuery.appendAscii(":iflags=" );
- sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nMustFlags));
- sQuery.appendAscii(":eflags=" );
- sQuery.append (::rtl::OUString::valueOf((sal_Int32)m_nDontFlags));
+ sQuery.appendAscii(RTL_CONSTASCII_STRINGPARAM("getSortedFilterList()"));
+ sQuery.appendAscii(RTL_CONSTASCII_STRINGPARAM(":module="));
+ sQuery.append(rFactory); // use long name here !
+ sQuery.appendAscii(RTL_CONSTASCII_STRINGPARAM(":iflags="));
+ sQuery.append(::rtl::OUString::valueOf((sal_Int32)m_nMustFlags));
+ sQuery.appendAscii(RTL_CONSTASCII_STRINGPARAM(":eflags="));
+ sQuery.append(::rtl::OUString::valueOf((sal_Int32)m_nDontFlags));
uno::Reference< XEnumeration > xResult;
try
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 3204dc6e1dfe..1babbf949068 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -115,13 +115,13 @@ namespace sfx2
const ::rtl::OUString sWindowStateRef( aModuleProps.getOrDefault( "ooSetupFactoryWindowStateConfigRef", ::rtl::OUString() ) );
- aPathComposer.appendAscii( "org.openoffice.Office.UI." );
+ aPathComposer.appendAscii(RTL_CONSTASCII_STRINGPARAM(
+ "org.openoffice.Office.UI."));
aPathComposer.append( sWindowStateRef );
- aPathComposer.appendAscii( "/UIElements/States" );
+ aPathComposer.appendAscii(RTL_CONSTASCII_STRINGPARAM("/UIElements/States"));
if ( i_rResourceURL.getLength() )
{
- aPathComposer.appendAscii( "/" );
- aPathComposer.append( i_rResourceURL );
+ aPathComposer.append('/').append( i_rResourceURL );
}
}
catch( const Exception& )
@@ -181,7 +181,7 @@ namespace sfx2
if ( sImageURL.compareToAscii( pCommandImagePrefix, nCommandImagePrefixLen ) == 0 )
{
::rtl::OUStringBuffer aCommandName;
- aCommandName.appendAscii( ".uno:" );
+ aCommandName.appendAscii(RTL_CONSTASCII_STRINGPARAM(".uno:"));
aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) );
const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() );
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 76f166a3638d..a2c2a4fa419f 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -390,8 +390,8 @@ const SvGlobalName& SfxObjectFactory::GetClassId() const
String SfxObjectFactory::GetFactoryURL() const
{
::rtl::OUStringBuffer aURLComposer;
- aURLComposer.appendAscii( "private:factory/" );
- aURLComposer.appendAscii( GetShortName() );
+ aURLComposer.appendAscii(RTL_CONSTASCII_STRINGPARAM("private:factory/"));
+ aURLComposer.appendAscii(GetShortName());
return aURLComposer.makeStringAndClear();
}
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index cd14844a73d7..b3d2263e86f6 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -673,11 +673,11 @@ void SAL_CALL SfxDocumentInfoObject::addProperty(const ::rtl::OUString&
if ( bFixProp )
{
::rtl::OUStringBuffer sMsg(256);
- sMsg.appendAscii("The property \"" );
- sMsg.append (sName );
- sMsg.appendAscii("\" " );
+ sMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM("The property \""));
+ sMsg.append(sName);
+ sMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM("\" "));
if ( bFixProp )
- sMsg.appendAscii(" already exists as a fix property. Please have a look into the IDL documentation of the DocumentInfo service.");
+ sMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(" already exists as a fix property. Please have a look into the IDL documentation of the DocumentInfo service."));
throw ::com::sun::star::beans::PropertyExistException(
sMsg.makeStringAndClear(),
@@ -699,9 +699,9 @@ void SAL_CALL SfxDocumentInfoObject::removeProperty(const ::rtl::OUString& sName
if ( bFixProp )
{
::rtl::OUStringBuffer sMsg(256);
- sMsg.appendAscii("The property \"" );
- sMsg.append (sName );
- sMsg.appendAscii("\" cant be removed. Its a fix property of the DocumentInfo service.");
+ sMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM("The property \""));
+ sMsg.append(sName);
+ sMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM("\" cant be removed. Its a fix property of the DocumentInfo service."));
throw ::com::sun::star::beans::NotRemoveableException(
sMsg.makeStringAndClear(),
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index 1514c574c644..08e7a38c4ff5 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -47,7 +47,7 @@ SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame *pFrame, SfxViewShell
String SfxViewFactory::GetLegacyViewName() const
{
::rtl::OUStringBuffer aViewName;
- aViewName.appendAscii( "view" );
+ aViewName.appendAscii(RTL_CONSTASCII_STRINGPARAM("view"));
aViewName.append( sal_Int32( GetOrdinal() ) );
return aViewName.makeStringAndClear();
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index aef93fc49630..004ace427af7 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2787,11 +2787,11 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const ::rtl::OUString& sMacro )
}
// append new method
- sRoutine.appendAscii("\nsub " );
- sRoutine.append (sMacroName );
- sRoutine.appendAscii("\n" );
- sRoutine.append (sMacro );
- sRoutine.appendAscii("\nend sub\n");
+ sRoutine.appendAscii(RTL_CONSTASCII_STRINGPARAM("\nsub "));
+ sRoutine.append(sMacroName);
+ sRoutine.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n"));
+ sRoutine.append(sMacro);
+ sRoutine.appendAscii(RTL_CONSTASCII_STRINGPARAM("\nend sub\n"));
// create the modul inside the library and insert the macro routine
aTemp <<= sRoutine.makeStringAndClear();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 6db33995432d..6d04e4ca114d 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -873,9 +873,9 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
aBuffer.append( RetrieveLabelFromCommand(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )),
xFrame ));
- aBuffer.appendAscii( " (" );
+ aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
aBuffer.append( aPrinterName );
- aBuffer.appendAscii( ")" );
+ aBuffer.append(')');
rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) );
}