regards
MPL/ GPLv3+ / LGPLv3+
pjacquod
From c747bbc166d3637a37638b969908f6392cb793a0 Mon Sep 17 00:00:00 2001
From: pjacquod <pjacquod@alumni.ethz.ch>
Date: Sun, 14 Nov 2010 19:55:57 +0100
Subject: [PATCH] RTL_CONSTASCII_USTRINGPARAM in components
cleaning in components/cui/source/customize
---
cui/source/customize/acccfg.cxx | 65 +++++++++++++++++++------------------
cui/source/customize/cfg.cxx | 25 +++++++-------
cui/source/customize/cfgutil.cxx | 64 ++++++++++++++++++-------------------
cui/source/customize/macropg.cxx | 10 +++---
4 files changed, 81 insertions(+), 83 deletions(-)
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 9f3274f..df7f98b 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -95,22 +95,22 @@ using namespace com::sun::star;
// definitions
//-----------------------------------------------
-static ::rtl::OUString SERVICE_STORAGEFACTORY =
::rtl::OUString::createFromAscii("com.sun.star.embed.StorageFactory" );
-static ::rtl::OUString SERVICE_UICONFIGMGR =
::rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager" );
-static ::rtl::OUString SERVICE_DESKTOP =
::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop" );
-static ::rtl::OUString SERVICE_MODULEMANAGER =
::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager" );
-static ::rtl::OUString SERVICE_GLOBALACCCFG =
::rtl::OUString::createFromAscii("com.sun.star.ui.GlobalAcceleratorConfiguration" );
-static ::rtl::OUString SERVICE_MODULEUICONFIGSUPPLIER =
::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
-static ::rtl::OUString SERVICE_UICMDDESCRIPTION =
::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription" );
+static ::rtl::OUString SERVICE_STORAGEFACTORY (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.StorageFactory"
)));
+static ::rtl::OUString SERVICE_UICONFIGMGR (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.UIConfigurationManager"
)));
+static ::rtl::OUString SERVICE_DESKTOP (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"
)));
+static ::rtl::OUString SERVICE_MODULEMANAGER (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager" )));
+static ::rtl::OUString SERVICE_GLOBALACCCFG (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.GlobalAcceleratorConfiguration"
)));
+static ::rtl::OUString SERVICE_MODULEUICONFIGSUPPLIER (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")));
+static ::rtl::OUString SERVICE_UICMDDESCRIPTION (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription"
)));
-static ::rtl::OUString MODULEPROP_SHORTNAME =
::rtl::OUString::createFromAscii("ooSetupFactoryShortName" );
-static ::rtl::OUString MODULEPROP_UINAME =
::rtl::OUString::createFromAscii("ooSetupFactoryUIName" );
-static ::rtl::OUString CMDPROP_UINAME = ::rtl::OUString::createFromAscii("Name"
);
+static ::rtl::OUString MODULEPROP_SHORTNAME (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryShortName"
)));
+static ::rtl::OUString MODULEPROP_UINAME (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryUIName"
)));
+static ::rtl::OUString CMDPROP_UINAME (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"
)));
-static ::rtl::OUString FOLDERNAME_UICONFIG =
::rtl::OUString::createFromAscii("Configurations2" );
+static ::rtl::OUString FOLDERNAME_UICONFIG (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Configurations2"
)));
-static ::rtl::OUString MEDIATYPE_PROPNAME =
::rtl::OUString::createFromAscii("MediaType" );
-static ::rtl::OUString MEDIATYPE_UICONFIG =
::rtl::OUString::createFromAscii("application/vnd.sun.xml.ui.configuration" );
+static ::rtl::OUString MEDIATYPE_PROPNAME (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"
)));
+static ::rtl::OUString MEDIATYPE_UICONFIG (
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.xml.ui.configuration"
)));
//-----------------------------------------------
static USHORT __FAR_DATA KEYCODE_ARRAY[] =
@@ -1383,7 +1383,8 @@ IMPL_LINK( SfxAcceleratorConfigPage, SaveHdl, sfx2::FileDialogHelper*,
EMPTYARG
{
try
{
- uno::Reference< container::XNameAccess > xNameAccess(
::comphelper::getProcessServiceFactory()->createInstance(
rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess(
::comphelper::getProcessServiceFactory()->createInstance(
+
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription") ) ),
uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Reference< container::XNameAccess > xUICommandLabels;
@@ -1425,75 +1426,75 @@ String SfxAcceleratorConfigPage::GetFunctionName(KeyFuncType eType) const
switch(eType)
{
case KEYFUNC_NEW :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:NewDoc") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:NewDoc") ) ) );
break;
case KEYFUNC_OPEN :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Open")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Open") ) ) );
break;
case KEYFUNC_SAVE :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Save")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Save") ) ) );
break;
case KEYFUNC_SAVEAS :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:SaveAs") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAs") ) ) );
break;
case KEYFUNC_PRINT :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Print")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Print") ) ) );
break;
case KEYFUNC_CLOSE :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Close")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Close") ) ) );
break;
case KEYFUNC_QUIT :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Quit")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Quit") ) ) );
break;
case KEYFUNC_CUT :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Cut") )
);
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Cut") ) ) );
break;
case KEYFUNC_COPY :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Copy")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Copy") ) ) );
break;
case KEYFUNC_PASTE :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Paste")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Paste") ) ) );
break;
case KEYFUNC_UNDO :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Undo")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Undo") ) ) );
break;
case KEYFUNC_REDO :
- sName.append( RetrieveLabelFromCommand( ::rtl::OUString::createFromAscii(".uno:Redo")
) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Redo") ) ) );
break;
case KEYFUNC_DELETE :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:Delete") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Delete") ) ) );
break;
case KEYFUNC_REPEAT :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:Repeat") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Repeat") ) ) );
break;
case KEYFUNC_FIND :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:Search") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Search") ) ) );
break;
case KEYFUNC_FINDBACKWARD :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:SearchBackwards") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SearchBackwards") ) ) );
break;
case KEYFUNC_PROPERTIES :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:Options") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Options") ) ) );
break;
case KEYFUNC_FRONT :
- sName.append( RetrieveLabelFromCommand(
::rtl::OUString::createFromAscii(".uno:ToFront") ) );
+ sName.append( RetrieveLabelFromCommand(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ToFront") ) ) );
break;
default:
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d515740..2533899 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -798,9 +798,9 @@ SfxTabPage *CreateSvxEventConfigPage( Window *pParent, const SfxItemSet& rSet )
sal_Bool impl_showKeyConfigTabPage( const css::uno::Reference< css::frame::XFrame >& xFrame )
{
- static ::rtl::OUString SERVICENAME_MODULEMANAGER =
::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager");
- static ::rtl::OUString SERVICENAME_DESKTOP =
::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop" );
- static ::rtl::OUString MODULEID_STARTMODULE =
::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule" );
+ static ::rtl::OUString SERVICENAME_MODULEMANAGER = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.frame.ModuleManager") );
+ static ::rtl::OUString SERVICENAME_DESKTOP = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.frame.Desktop" ) );
+ static ::rtl::OUString MODULEID_STARTMODULE = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.frame.StartModule" ) );
try
{
@@ -5324,8 +5324,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
{
m_xGraphProvider = uno::Reference< graphic::XGraphicProvider >(
xServiceManager->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.graphic.GraphicProvider" ) ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.graphic.GraphicProvider"
) ) ),
uno::UNO_QUERY );
}
@@ -5335,7 +5334,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
}
uno::Reference< beans::XPropertySet > xPropSet(
- xServiceManager->createInstance( ::rtl::OUString::createFromAscii(
"com.sun.star.util.PathSettings" ) ),
+ xServiceManager->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.util.PathSettings" ) ) ),
uno::UNO_QUERY );
uno::Any aAny = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"UserConfig" ) ) );
@@ -5363,7 +5362,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
uno::Reference< lang::XSingleServiceFactory > xStorageFactory(
xServiceManager->createInstance(
- ::rtl::OUString::createFromAscii( "com.sun.star.embed.FileSystemStorageFactory" )),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.FileSystemStorageFactory"
) ) ),
uno::UNO_QUERY );
uno::Sequence< uno::Any > aArgs( 2 );
@@ -5386,7 +5385,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
m_xImportedImageManager = uno::Reference< com::sun::star::ui::XImageManager >(
xServiceManager->createInstanceWithArguments(
- ::rtl::OUString::createFromAscii( "com.sun.star.ui.ImageManager" ), aProp ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ImageManager" ) ), aProp ),
uno::UNO_QUERY );
ImageInfo mImageInfo;
@@ -5629,7 +5628,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
uno::Reference< graphic::XGraphic > xGraphic;
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = ::rtl::OUString::createFromAscii("URL");
+ aMediaProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL") );
aMediaProps[0].Value <<= aURL;
com::sun::star::awt::Size aSize;
@@ -5708,7 +5707,7 @@ void SvxIconSelectorDialog::ImportGraphics(
uno::Sequence< OUString > URLs(1);
uno::Sequence< uno::Reference<graphic::XGraphic > > aImportGraph( 1 );
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = ::rtl::OUString::createFromAscii("URL");
+ aMediaProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL") );
uno::Reference< css::ui::XUIConfigurationPersistence >
xConfigPer( m_xImportedImageManager, uno::UNO_QUERY );
@@ -5737,7 +5736,7 @@ void SvxIconSelectorDialog::ImportGraphics(
{
::rtl::OUString aSourcePath( rPaths[0] );
if ( rPaths[0].lastIndexOf( '/' ) != rPaths[0].getLength() -1 )
- aSourcePath = rPaths[0] + ::rtl::OUString::createFromAscii( "/" );
+ aSourcePath = rPaths[0] + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ) );
for ( sal_Int32 i = 1; i < rPaths.getLength(); i++ )
{
@@ -5789,7 +5788,7 @@ void SvxIconSelectorDialog::ImportGraphics(
OUString newLine = OUString::createFromAscii("\n");
rtl::OUString fPath = OUString::createFromAscii("");
if (rejectedCount > 1)
- fPath = rPaths[0].copy(8) + ::rtl::OUString::createFromAscii( "/" );
+ fPath = rPaths[0].copy(8) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ) );
for ( sal_Int32 i = 0; i < rejectedCount; i++ )
{
message += fPath + rejected[i];
@@ -5809,7 +5808,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
++m_nNextId;
uno::Sequence< beans::PropertyValue > aMediaProps( 1 );
- aMediaProps[0].Name = ::rtl::OUString::createFromAscii("URL");
+ aMediaProps[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL") );
uno::Reference< graphic::XGraphic > xGraphic;
com::sun::star::awt::Size aSize;
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 0bb57fb..b6da039 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -81,8 +81,8 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::document;
namespace css = ::com::sun::star;
-static ::rtl::OUString SERVICE_UICATEGORYDESCRIPTION =
::rtl::OUString::createFromAscii("com.sun.star.ui.UICategoryDescription" );
-static ::rtl::OUString SERVICE_UICMDDESCRIPTION =
::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription");
+static ::rtl::OUString SERVICE_UICATEGORYDESCRIPTION =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.UICategoryDescription") );
+static ::rtl::OUString SERVICE_UICMDDESCRIPTION =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription") );
SfxStylesInfo_Impl::SfxStylesInfo_Impl()
{}
@@ -92,20 +92,20 @@ void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com:
m_xDoc = xModel;
}
-static ::rtl::OUString FAMILY_CHARACTERSTYLE = ::rtl::OUString::createFromAscii("CharacterStyles");
-static ::rtl::OUString FAMILY_PARAGRAPHSTYLE = ::rtl::OUString::createFromAscii("ParagraphStyles");
-static ::rtl::OUString FAMILY_FRAMESTYLE = ::rtl::OUString::createFromAscii("FrameStyles" );
-static ::rtl::OUString FAMILY_PAGESTYLE = ::rtl::OUString::createFromAscii("PageStyles" );
-static ::rtl::OUString FAMILY_NUMBERINGSTYLE = ::rtl::OUString::createFromAscii("NumberingStyles");
+static ::rtl::OUString FAMILY_CHARACTERSTYLE =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
+static ::rtl::OUString FAMILY_PARAGRAPHSTYLE =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
+static ::rtl::OUString FAMILY_FRAMESTYLE =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameStyles" ) );
+static ::rtl::OUString FAMILY_PAGESTYLE =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageStyles" ) );
+static ::rtl::OUString FAMILY_NUMBERINGSTYLE =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles") );
-static ::rtl::OUString CMDURL_SPART =
::rtl::OUString::createFromAscii(".uno:StyleApply?Style:string=");
-static ::rtl::OUString CMDURL_FPART2 = ::rtl::OUString::createFromAscii("&FamilyName:string=");
+static ::rtl::OUString CMDURL_SPART =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StyleApply?Style:string=") );
+static ::rtl::OUString CMDURL_FPART2 =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&FamilyName:string=") );
-static ::rtl::OUString CMDURL_STYLEPROT_ONLY =
::rtl::OUString::createFromAscii(".uno:StyleApply?");
-static ::rtl::OUString CMDURL_SPART_ONLY = ::rtl::OUString::createFromAscii("Style:string=");
-static ::rtl::OUString CMDURL_FPART_ONLY =
::rtl::OUString::createFromAscii("FamilyName:string=");
+static ::rtl::OUString CMDURL_STYLEPROT_ONLY =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:StyleApply?") );
+static ::rtl::OUString CMDURL_SPART_ONLY =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Style:string=") );
+static ::rtl::OUString CMDURL_FPART_ONLY =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FamilyName:string=") );
-static ::rtl::OUString STYLEPROP_UINAME = ::rtl::OUString::createFromAscii("DisplayName");
+static ::rtl::OUString STYLEPROP_UINAME =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName") );
::rtl::OUString SfxStylesInfo_Impl::generateCommand(const ::rtl::OUString& sFamily, const
::rtl::OUString& sStyle)
{
@@ -230,7 +230,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const ::rtl::OUString& sFamily)
{
- static ::rtl::OUString PROP_UINAME = ::rtl::OUString::createFromAscii("DisplayName");
+ static ::rtl::OUString PROP_UINAME =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DisplayName") );
css::uno::Sequence< ::rtl::OUString > lStyleNames;
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc,
css::uno::UNO_QUERY_THROW);
@@ -505,8 +505,7 @@ SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
sal_Bool tmp = false;
value = ::utl::ConfigManager::GetConfigManager().GetLocalProperty(
- ::rtl::OUString::createFromAscii(
- "Office.Scripting/ScriptDisplaySettings/ShowBasic" ) );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"Office.Scripting/ScriptDisplaySettings/ShowBasic" ) ) );
value >>= tmp;
@@ -518,8 +517,7 @@ SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
}
value = ::utl::ConfigManager::GetConfigManager().GetLocalProperty(
- ::rtl::OUString::createFromAscii(
- "Office.Scripting/ScriptDisplaySettings/ShowSF" ) );
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Scripting/ScriptDisplaySettings/ShowSF" ) ) );
value >>= tmp;
@@ -826,7 +824,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
xCtx.set( xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"DefaultContext" ))), UNO_QUERY_THROW );
Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName(
- ::rtl::OUString::createFromAscii(
"/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ) ), UNO_QUERY_THROW );
rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
}
catch( Exception& e )
@@ -866,9 +864,9 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
rootNode->getChildNodes();
BOOL bIsRootNode = FALSE;
- ::rtl::OUString user = ::rtl::OUString::createFromAscii("user");
- ::rtl::OUString share = ::rtl::OUString::createFromAscii("share");
- if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") ))
+ ::rtl::OUString user = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")
);
+ ::rtl::OUString share =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share") );
+ if (
rootNode->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root") ) ) )
{
bIsRootNode = TRUE;
}
@@ -974,8 +972,8 @@ Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > nod
Image aImage;
if ( bIsRootNode )
{
- ::rtl::OUString user = ::rtl::OUString::createFromAscii("user");
- ::rtl::OUString share = ::rtl::OUString::createFromAscii("share");
+ ::rtl::OUString user = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user") );
+ ::rtl::OUString share = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share") );
if (node->getName().equals( user ) || node->getName().equals(share ) )
{
if( bHighContrast == BMP_COLOR_NORMAL )
@@ -994,8 +992,8 @@ Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode > nod
xModuleManager(
xCtx->getServiceManager()
->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("" // xxx todo
- "com.sun.star.frame.ModuleManager"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("" // xxx todo
+ "com.sun.star.frame.ModuleManager") ),
xCtx ),
UNO_QUERY_THROW );
Reference<container::XNameAccess> xModuleConfig(
@@ -1007,7 +1005,7 @@ Image SfxConfigGroupListBox_Impl::GetImage( Reference< browse::XBrowseNode >
nod
Any aAny = xModuleConfig->getByName(appModule);
if( sal_True != ( aAny >>= moduleDescr ) )
{
- throw RuntimeException(::rtl::OUString::createFromAscii("SFTreeListBox::Init:
failed to get PropertyValue"), Reference< XInterface >());
+ throw
RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SFTreeListBox::Init: failed to get
PropertyValue") ), Reference< XInterface >());
}
beans::PropertyValue const * pmoduleDescr =
moduleDescr.getConstArray();
@@ -1072,7 +1070,7 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >&
xC
xCtx->getServiceManager();
Reference< frame::XDesktop > desktop (
mcf->createInstanceWithContext(
- ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ),
xCtx ),
UNO_QUERY );
Reference< container::XEnumerationAccess > componentsAccess =
@@ -1102,7 +1100,7 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >&
xC
// strip out the last leaf of location name
// e.g. file://dir1/dir2/Blah.sxw - > Blah.sxw
::rtl::OUString temp = location;
- sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString::createFromAscii( "/" ) );
+ sal_Int32 lastSlashIndex = temp.lastIndexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/"
) ) );
if ( ( lastSlashIndex + 1 ) < temp.getLength() )
{
@@ -1127,7 +1125,7 @@ SfxConfigGroupListBox_Impl::getDocumentModel( Reference< XComponentContext >&
xC
if (xModuleConf.is())
{
::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand));
- sUIName = lProps.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("Name"),
::rtl::OUString());
+ sUIName =
lProps.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name") ),
::rtl::OUString());
}
}
catch(const css::uno::RuntimeException& exRun)
@@ -1441,9 +1439,9 @@ void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry )
rootNode->getChildNodes();
BOOL bIsRootNode = FALSE;
- ::rtl::OUString user = ::rtl::OUString::createFromAscii("user");
- ::rtl::OUString share = ::rtl::OUString::createFromAscii("share");
- if ( rootNode->getName().equals(::rtl::OUString::createFromAscii("Root") ))
+ ::rtl::OUString user = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")
);
+ ::rtl::OUString share =
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("share" ));
+ if (
rootNode->getName().equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Root") ) ) )
{
bIsRootNode = TRUE;
}
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 4949553..ddc8cb4 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -61,9 +61,9 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
static ::rtl::OUString aVndSunStarUNO =
- ::rtl::OUString::createFromAscii( "vnd.sun.star.UNO:" );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.UNO:") );
static ::rtl::OUString aVndSunStarScript =
- ::rtl::OUString::createFromAscii( "vnd.sun.star.script:" );
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:") );
_SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet ) :
pAssignFT( NULL ),
@@ -665,7 +665,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
if( pBtn == pImpl->pDeletePB )
{
// delete pressed
- sEventType = ::rtl::OUString::createFromAscii("Script");
+ sEventType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Script") );
sEventURL = ::rtl::OUString();
if(!pThis->bAppEvents)
pThis->bDocModified = true;
@@ -683,7 +683,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
short ret = pAssignDlg->Execute();
if( ret )
{
- sEventType = ::rtl::OUString::createFromAscii("UNO");
+ sEventType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UNO"));
sEventURL = pAssignDlg->getURL();
if(!pThis->bAppEvents)
pThis->bDocModified = true;
@@ -699,7 +699,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton*
short ret = pDlg->Execute();
if ( ret )
{
- sEventType = ::rtl::OUString::createFromAscii("Script");
+ sEventType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Script"));
sEventURL = pDlg->GetScriptURL();
if(!pThis->bAppEvents)
pThis->bDocModified = true;
--
1.7.1
Context
- [Libreoffice] [PATCH] RTL_CONSTASCII_USTRINGPARAM in components - customize · Pierre-André Jacquod
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.