EasyHack: RTL_CONST macro from createFromAscii

This commit is contained in:
Kevin Hunter 2010-11-18 18:47:55 -05:00 committed by Caolán McNamara
parent 324612c06b
commit 9321d8acfe
30 changed files with 165 additions and 172 deletions

View file

@ -166,7 +166,7 @@ Sequence< OUString > SvtHelpOptions_Impl::GetPropertyNames()
// -----------------------------------------------------------------------
SvtHelpOptions_Impl::SvtHelpOptions_Impl()
: ConfigItem( OUString::createFromAscii("Office.Common/Help") )
: ConfigItem( OUString( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Help" )) )
, pList( 0 )
, bExtendedHelp( sal_False )
, bHelpTips( sal_True )
@ -279,10 +279,10 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< ::rtl::OUString>& rProperty
void SvtHelpOptions_Impl::implGetURLCounters( Sequence< ::rtl::OUString >& _rNodeNames, Sequence< Any >& _rURLs, Sequence< Any >& _rCounters )
{
// the ignore counters for the help agent URLs
const ::rtl::OUString sIgnoreListNodePath = ::rtl::OUString::createFromAscii("HelpAgent/IgnoreList");
const ::rtl::OUString sPathSeparator = ::rtl::OUString::createFromAscii("/");
const ::rtl::OUString sURLLocalPath = ::rtl::OUString::createFromAscii("/Name");
const ::rtl::OUString sCounterLocalPath = ::rtl::OUString::createFromAscii("/Counter");
const ::rtl::OUString sIgnoreListNodePath( RTL_CONSTASCII_USTRINGPARAM( "HelpAgent/IgnoreList" ));
const ::rtl::OUString sPathSeparator( RTL_CONSTASCII_USTRINGPARAM( "/" ));
const ::rtl::OUString sURLLocalPath( RTL_CONSTASCII_USTRINGPARAM( "/Name" ));
const ::rtl::OUString sCounterLocalPath( RTL_CONSTASCII_USTRINGPARAM( "/Counter" ));
// get the names of all the nodes containing ignore counters
// collect the node names we have to ask
@ -339,10 +339,10 @@ void SvtHelpOptions_Impl::implSaveURLCounters()
{
::osl::MutexGuard aGuard(aIgnoreCounterSafety);
const ::rtl::OUString sIgnoreListNodePath = ::rtl::OUString::createFromAscii("HelpAgent/IgnoreList");
const ::rtl::OUString sPathSeparator = ::rtl::OUString::createFromAscii("/");
const ::rtl::OUString sURLLocalPath = ::rtl::OUString::createFromAscii("/Name");
const ::rtl::OUString sCounterLocalPath = ::rtl::OUString::createFromAscii("/Counter");
const ::rtl::OUString sIgnoreListNodePath( RTL_CONSTASCII_USTRINGPARAM( "HelpAgent/IgnoreList" ));
const ::rtl::OUString sPathSeparator( RTL_CONSTASCII_USTRINGPARAM( "/" ));
const ::rtl::OUString sURLLocalPath( RTL_CONSTASCII_USTRINGPARAM( "/Name" ));
const ::rtl::OUString sCounterLocalPath( RTL_CONSTASCII_USTRINGPARAM( "/Counter" ));
// get the current URL/counter pairs (as they're persistent at the moment)
Sequence< ::rtl::OUString > aNodeNames;
@ -426,7 +426,7 @@ void SvtHelpOptions_Impl::implSaveURLCounters()
::rtl::OUString sNewNodeName;
Sequence< ::rtl::OUString > aNewCounterDataNodeNames(2);
Sequence< Any > aNewCounterDataValues(2);
const ::rtl::OUString sNodeNameBase = ::rtl::OUString::createFromAscii("URL");
const ::rtl::OUString sNodeNameBase( RTL_CONSTASCII_USTRINGPARAM( "URL" ));
for ( ConstMapString2IntIterator aCollectNew = aURLIgnoreCounters.begin();
aCollectNew != aURLIgnoreCounters.end();
++aCollectNew

View file

@ -65,7 +65,7 @@ ItemHolder2::ItemHolder2()
{
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
css::uno::Reference< css::lang::XComponent > xCfg(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ))),
css::uno::UNO_QUERY);
if (xCfg.is())
xCfg->addEventListener(static_cast< css::lang::XEventListener* >(this));

View file

@ -192,18 +192,18 @@ namespace svt
Reference< XResultSet > xResultSet;
Sequence< OUString > aProps(12);
aProps[0] = OUString::createFromAscii( "Title" );
aProps[1] = OUString::createFromAscii( "Size" );
aProps[2] = OUString::createFromAscii( "DateModified" );
aProps[3] = OUString::createFromAscii( "DateCreated" );
aProps[4] = OUString::createFromAscii( "IsFolder" );
aProps[5] = OUString::createFromAscii( "TargetURL" );
aProps[6] = OUString::createFromAscii( "IsHidden" );
aProps[7] = OUString::createFromAscii( "IsVolume" );
aProps[8] = OUString::createFromAscii( "IsRemote" );
aProps[9] = OUString::createFromAscii( "IsRemoveable" );
aProps[10] = OUString::createFromAscii( "IsFloppy" );
aProps[11] = OUString::createFromAscii( "IsCompactDisc" );
aProps[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ));
aProps[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ));
aProps[2] = OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ));
aProps[3] = OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ));
aProps[4] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ));
aProps[5] = OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ));
aProps[6] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsHidden" ));
aProps[7] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVolume" ));
aProps[8] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsRemote" ));
aProps[9] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsRemoveable" ));
aProps[10] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFloppy" ));
aProps[11] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsCompactDisc" ));
Reference< XCommandEnvironment > xEnvironment;
try
@ -299,8 +299,8 @@ namespace svt
::ucbhelper::Content aCnt( aTargetURL, xEnvironment );
try
{
aCnt.getPropertyValue( OUString::createFromAscii( "Size" ) ) >>= pData->maSize;
aCnt.getPropertyValue( OUString::createFromAscii( "DateModified" ) ) >>= aDT;
aCnt.getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" )) ) >>= pData->maSize;
aCnt.getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" )) ) >>= aDT;
}
catch (...) {}
}
@ -396,7 +396,7 @@ namespace svt
sal_Bool FileViewContentEnumerator::URLOnBlackList ( const ::rtl::OUString& sRealURL )
{
::rtl::OUString entryName = sRealURL.copy( sRealURL.lastIndexOf( rtl::OUString::createFromAscii("/")) +1 );
::rtl::OUString entryName = sRealURL.copy( sRealURL.lastIndexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ))) +1 );
for (int i = 0; i < m_rBlackList.getLength() ; i++)
{
@ -431,7 +431,7 @@ namespace svt
m_xDocInfo->loadFromURL( _rTargetURL );
Reference< XPropertySet > xPropSet( m_xDocInfo, UNO_QUERY );
Any aAny = xPropSet->getPropertyValue( OUString::createFromAscii( "Title" ) );
Any aAny = xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) );
OUString sTitle;
if ( ( aAny >>= sTitle ) && sTitle.getLength() > 0 )

View file

@ -885,7 +885,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
if ( aCommands.is() )
bEnableDelete
= aCommands->hasCommandByName(
OUString::createFromAscii( "delete" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )) );
else
bEnableDelete = false;
}
@ -904,7 +904,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
{
Property aProp
= aProps->getPropertyByName(
OUString::createFromAscii( "Title" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" )) );
bEnableRename
= !( aProp.Attributes & PropertyAttribute::READONLY );
}
@ -988,7 +988,7 @@ void ViewTabListBox_Impl::DeleteEntries()
if ( aCommands.is() )
canDelete
= aCommands->hasCommandByName(
OUString::createFromAscii( "delete" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )) );
else
canDelete = false;
}
@ -1048,7 +1048,7 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
try
{
OUString aPropName = OUString::createFromAscii( "Title" );
OUString aPropName( RTL_CONSTASCII_USTRINGPARAM( "Title" ));
bool canRename = true;
::ucbhelper::Content aContent( aURL, mxCmdEnv );
@ -1184,7 +1184,7 @@ sal_Bool ViewTabListBox_Impl::Kill( const OUString& rContent )
try
{
::ucbhelper::Content aCnt( rContent, mxCmdEnv );
aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) );
aCnt.executeCommand( OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )), makeAny( sal_Bool( sal_True ) ) );
}
catch( ::com::sun::star::ucb::CommandAbortedException const & )
{
@ -2285,8 +2285,8 @@ void SvtFileView_Impl::implEnumerationSuccess()
// -----------------------------------------------------------------------
void SvtFileView_Impl::ReplaceTabWithString( OUString& aValue )
{
OUString aTab = OUString::createFromAscii( "\t" );
OUString aTabString = OUString::createFromAscii( "%09" );
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
OUString aTabString( RTL_CONSTASCII_USTRINGPARAM( "%09" ));
sal_Int32 iPos;
while ( ( iPos = aValue.indexOf( aTab ) ) >= 0 )
@ -2299,8 +2299,8 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
::osl::MutexGuard aGuard( maMutex );
OUString aValue;
OUString aTab = OUString::createFromAscii( "\t" );
OUString aDateSep = OUString::createFromAscii( ", " );
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
OUString aDateSep( RTL_CONSTASCII_USTRINGPARAM( ", " ));
std::vector< SortingData_Impl* >::iterator aIt;
@ -2350,7 +2350,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
{
::osl::MutexGuard aGuard( maMutex );
OUString aTab = OUString::createFromAscii( "\t" );
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
sal_uInt32 nCount = (sal_uInt32) rList.getLength();
@ -2635,8 +2635,8 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE );
OUString aValue;
OUString aTab = OUString::createFromAscii( "\t" );
OUString aDateSep = OUString::createFromAscii( ", " );
OUString aTab( RTL_CONSTASCII_USTRINGPARAM( "\t" ));
OUString aDateSep( RTL_CONSTASCII_USTRINGPARAM( ", " ));
// title, type, size, date
aValue = pData->GetTitle();

View file

@ -897,9 +897,9 @@ void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
try
{
uno::Reference < task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY );
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
uno::Sequence < beans::PropertyValue> aProps(1);
aProps[0].Name = ::rtl::OUString::createFromAscii("InteractionHandler");
aProps[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aProps[0].Value <<= xInteractionHandler;
m_xDocProps->loadFromMedium( rURL, aProps );
pEditWin->fill( m_xDocProps, rURL );
@ -980,8 +980,8 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
aArgs[2].Name = ASCII_STR("AsTemplate"); // prevents getting an empty URL with getURL()!
uno::Reference < task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(
::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler") ), uno::UNO_QUERY );
aArgs[3].Name = ::rtl::OUString::createFromAscii("InteractionHandler");
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" )) ), uno::UNO_QUERY );
aArgs[3].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[3].Value <<= xInteractionHandler;
b = sal_False;

View file

@ -49,7 +49,7 @@ void FileControl::ImplBrowseFile( )
{
XubString aNewText;
const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" );
const ::rtl::OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ));
Reference< XMultiServiceFactory > xMSF = vcl::unohelper::GetMultiServiceFactory();
Reference < dialogs::XFilePicker > xFilePicker( xMSF->createInstance( sServiceName ), UNO_QUERY );

View file

@ -1196,7 +1196,7 @@ String SvtURLBox::GetURL()
bool bSlash = aObj.hasFinalSlash();
{
static const rtl::OUString aPropName(
rtl::OUString::createFromAscii("CasePreservingURL"));
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CasePreservingURL" )));
rtl::OUString aFileURL;

View file

@ -831,7 +831,7 @@ namespace svt
if ( mpID )
{
::rtl::OUString aIDText = ::rtl::OUString::valueOf( (sal_Int32)( _nIndex + 1 ) ) + ::rtl::OUString::createFromAscii( "." );
::rtl::OUString aIDText = ::rtl::OUString::valueOf( (sal_Int32)( _nIndex + 1 ) ) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ));
mpID->SetText( aIDText );
}
@ -929,7 +929,7 @@ namespace svt
{
// calculate widths
long nIDWidth = mpID->GetTextWidth( mpID->GetText() );
long nMaxIDWidth = mpID->GetTextWidth( ::rtl::OUString::createFromAscii( "100." ) );
long nMaxIDWidth = mpID->GetTextWidth( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "100." )) );
nIDWidth = ::std::min( nIDWidth, nMaxIDWidth );
// check how many space the description would need

View file

@ -129,19 +129,17 @@ void SvObjectServerList::FillInsertObjects()
uno::Reference< lang::XMultiServiceFactory > _globalMSFactory= comphelper::getProcessServiceFactory();
if( _globalMSFactory.is())
{
::rtl::OUString sProviderService =
::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationProvider" );
::rtl::OUString sProviderService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ));
uno::Reference< lang::XMultiServiceFactory > sProviderMSFactory(
_globalMSFactory->createInstance( sProviderService ), uno::UNO_QUERY );
if( sProviderMSFactory.is())
{
::rtl::OUString sReaderService =
::rtl::OUString::createFromAscii( "com.sun.star.configuration.ConfigurationAccess" );
::rtl::OUString sReaderService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" ));
uno::Sequence< uno::Any > aArguments( 1 );
beans::PropertyValue aPathProp;
aPathProp.Name = ::rtl::OUString::createFromAscii( "nodepath" );
aPathProp.Value <<= ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Embedding/ObjectNames");
aPathProp.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ));
aPathProp.Value <<= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Embedding/ObjectNames" ));
aArguments[0] <<= aPathProp;
uno::Reference< container::XNameAccess > xNameAccess(
@ -183,8 +181,8 @@ void SvObjectServerList::FillInsertObjects()
{
::rtl::OUString aUIName;
::rtl::OUString aClassID;
xEntry->getByName( ::rtl::OUString::createFromAscii("ObjectUIName") ) >>= aUIName;
xEntry->getByName( ::rtl::OUString::createFromAscii("ClassID") ) >>= aClassID;
xEntry->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ObjectUIName" )) ) >>= aUIName;
xEntry->getByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassID" )) ) >>= aClassID;
if ( aUIName.getLength() )
{

View file

@ -705,7 +705,7 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
// if ( !xISC.is() )
{
uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
uno::Reference< uno::XInterface > xI = xMSF->createInstance( OUString::createFromAscii( "com.sun.star.i18n.InputSequenceChecker" ) );
uno::Reference< uno::XInterface > xI = xMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.i18n.InputSequenceChecker" )) );
if ( xI.is() )
{
Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XExtendedInputSequenceChecker >*)0) );

View file

@ -151,7 +151,7 @@ Reference< XInterface > openConfig(const char* sPackage)
{
// get access to config API (not to file!)
Reference< XMultiServiceFactory > xConfigProvider( xSMGR->createInstance(
OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), UNO_QUERY);
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ))), UNO_QUERY);
if (xConfigProvider.is())
{
@ -159,16 +159,16 @@ Reference< XInterface > openConfig(const char* sPackage)
PropertyValue aParam ;
// define cfg path for open
aParam.Name = OUString::createFromAscii("nodepath");
aParam.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ));
if (TYPEPKG.equalsIgnoreAsciiCaseAscii(sPackage))
aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.Types/Types");
aParam.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.TypeDetection.Types/Types" ));
if (FILTERPKG.equalsIgnoreAsciiCaseAscii(sPackage))
aParam.Value <<= OUString::createFromAscii("/org.openoffice.TypeDetection.GraphicFilter/Filters");
aParam.Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.TypeDetection.GraphicFilter/Filters" ));
lParams[0] = makeAny(aParam);
// get access to file
xCfg = xConfigProvider->createInstanceWithArguments(
OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), lParams);
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), lParams);
}
}
catch(const RuntimeException&)

View file

@ -172,7 +172,7 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl )
::ucbhelper::Content aCnt( rMainUrl,
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
aCnt.executeCommand( ::rtl::OUString::createFromAscii( "delete" ),
aCnt.executeCommand( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "delete" )),
::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) );
}
catch( ::com::sun::star::ucb::CommandAbortedException& )
@ -1921,10 +1921,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
if( xMgr.is() )
{
::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > xSaxWriter( xMgr->createInstance(
::rtl::OUString::createFromAscii( "com.sun.star.xml.sax.Writer" ) ), ::com::sun::star::uno::UNO_QUERY );
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) ), ::com::sun::star::uno::UNO_QUERY );
::com::sun::star::uno::Reference< ::com::sun::star::svg::XSVGWriter > xSVGWriter( xMgr->createInstance(
::rtl::OUString::createFromAscii( "com.sun.star.svg.SVGWriter" ) ), ::com::sun::star::uno::UNO_QUERY );
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svg.SVGWriter" )) ), ::com::sun::star::uno::UNO_QUERY );
if( xSaxWriter.is() && xSVGWriter.is() )
{
@ -2033,7 +2033,7 @@ BOOL GraphicFilter::DoExportDialog( Window*, USHORT nFormat, FieldUnit )
xSMgr( ::comphelper::getProcessServiceFactory() );
uno::Reference< com::sun::star::uno::XInterface > xFilterOptionsDialog
( xSMgr->createInstance( rtl::OUString::createFromAscii( "com.sun.star.svtools.SvFilterOptionsDialog" ) ),
( xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.SvFilterOptionsDialog" )) ),
com::sun::star::uno::UNO_QUERY );
if ( xFilterOptionsDialog.is() )
{

View file

@ -41,15 +41,15 @@ using namespace ::com::sun::star;
uno::Sequence< ::rtl::OUString > SAL_CALL OHatchWindowFactory::impl_staticGetSupportedServiceNames()
{
uno::Sequence< ::rtl::OUString > aRet(2);
aRet[0] = ::rtl::OUString::createFromAscii("com.sun.star.embed.HatchWindowFactory");
aRet[1] = ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.HatchWindowFactory");
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.embed.HatchWindowFactory" ));
aRet[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.embed.HatchWindowFactory" ));
return aRet;
}
//-------------------------------------------------------------------------
::rtl::OUString SAL_CALL OHatchWindowFactory::impl_staticGetImplementationName()
{
return ::rtl::OUString::createFromAscii("com.sun.star.comp.embed.HatchWindowFactory");
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.embed.HatchWindowFactory" ));
}
//-------------------------------------------------------------------------

View file

@ -153,7 +153,7 @@ void AcceleratorExecute::init(const css::uno::Reference< css::lang::XMultiServic
// <- SAFE ------------------------------
css::uno::Reference< css::frame::XDispatchProvider > xDispatcher(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))),
css::uno::UNO_QUERY_THROW);
// SAFE -> ------------------------------
@ -390,7 +390,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SelectWord" ) );
case com::sun::star::awt::Key::SELECT_LINE:
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "" ) );
return rtl::OUString();
case com::sun::star::awt::Key::SELECT_PARAGRAPH:
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SelectText" ) );
@ -427,7 +427,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st_openGlobalConfig(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
{
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.GlobalAcceleratorConfiguration")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.GlobalAcceleratorConfiguration" ))),
css::uno::UNO_QUERY_THROW);
return xAccCfg;
}
@ -437,7 +437,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
const css::uno::Reference< css::frame::XFrame >& xFrame)
{
css::uno::Reference< css::frame::XModuleManager > xModuleDetection(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.ModuleManager")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))),
css::uno::UNO_QUERY_THROW);
::rtl::OUString sModule;
@ -451,7 +451,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ))),
css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
@ -492,7 +492,7 @@ css::uno::Reference< css::util::XURLTransformer > AcceleratorExecute::impl_ts_ge
// <- SAFE ----------------------------------
css::uno::Reference< css::util::XURLTransformer > xParser(
xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")),
xSMGR->createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))),
css::uno::UNO_QUERY_THROW);
// SAFE -> ----------------------------------

View file

@ -571,9 +571,8 @@ Graphic* EmbeddedObjectRef::GetHCGraphic() const
throw uno::RuntimeException();
datatransfer::DataFlavor aDataFlavor(
::rtl::OUString::createFromAscii(
"application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" ),
::rtl::OUString::createFromAscii( "GDIMetaFile" ),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" )),
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "GDIMetaFile" )),
::getCppuType( (const uno::Sequence< sal_Int8 >*) NULL ) );
uno::Sequence < sal_Int8 > aSeq;

View file

@ -116,7 +116,7 @@ sal_Bool SvEmbedTransferHelper::GetData( const ::com::sun::star::datatransfer::D
if ( xPers.is() )
{
uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetTemporaryStorage();
::rtl::OUString aName = ::rtl::OUString::createFromAscii("Dummy");
::rtl::OUString aName( RTL_CONSTASCII_USTRINGPARAM( "Dummy" ));
SvStream* pStream = NULL;
BOOL bDeleteStream = FALSE;
uno::Sequence < beans::PropertyValue > aEmpty;

View file

@ -38,7 +38,7 @@ void localizeWebserviceURI( ::rtl::OUString& rURI )
if ( aLang.equalsIgnoreAsciiCaseAscii( "pt" )
&& Application::GetSettings().GetUILocale().Country.equalsIgnoreAsciiCaseAscii("br") )
{
aLang = ::rtl::OUString::createFromAscii("pt-br");
aLang = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pt-br" ));
}
rURI += aLang;

View file

@ -290,8 +290,7 @@ namespace svt
s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
if ( s_hAccessibleImplementationModule != NULL )
{
const ::rtl::OUString sFactoryCreationFunc =
::rtl::OUString::createFromAscii( "getSvtAccessibilityComponentFactory" );
const ::rtl::OUString sFactoryCreationFunc( RTL_CONSTASCII_USTRINGPARAM( "getSvtAccessibilityComponentFactory" ));
s_pAccessibleFactoryFunc = (GetSvtAccessibilityComponentFactory)
osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData );

View file

@ -635,10 +635,10 @@ namespace svt
// create a content for the current folder root
Reference< XResultSet > xResultSet;
Sequence< ::rtl::OUString > aContentProperties( 4);
aContentProperties[0] = ::rtl::OUString::createFromAscii( "Title" );
aContentProperties[1] = ::rtl::OUString::createFromAscii( "DateModified" );
aContentProperties[2] = ::rtl::OUString::createFromAscii( "DateCreated" );
aContentProperties[3] = ::rtl::OUString::createFromAscii( "IsFolder" );
aContentProperties[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ));
aContentProperties[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ));
aContentProperties[2] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ));
aContentProperties[3] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ));
// get the set of sub contents in the folder
try

View file

@ -155,20 +155,20 @@ const ::rtl::OUString aQuotedParamChars = ::rtl::OUString( RTL_CONSTASCII_USTRIN
static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescriptor& rObjDesc )
{
const ::rtl::OUString aChar( ::rtl::OUString::createFromAscii( "\"" ) );
const ::rtl::OUString aChar( RTL_CONSTASCII_USTRINGPARAM( "\"" ));
const ::rtl::OUString aClassName( rObjDesc.maClassName.GetHexName() );
::rtl::OUString aParams;
if( aClassName.getLength() )
{
aParams += ::rtl::OUString::createFromAscii( ";classname=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";classname=\"" ));
aParams += aClassName;
aParams += aChar;
}
if( rObjDesc.maTypeName.Len() )
{
aParams += ::rtl::OUString::createFromAscii( ";typename=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";typename=\"" ));
aParams += rObjDesc.maTypeName;
aParams += aChar;
}
@ -188,28 +188,28 @@ static ::rtl::OUString ImplGetParameterString( const TransferableObjectDescripto
pToAccept[nChar] = sal_True;
}
aParams += ::rtl::OUString::createFromAscii( ";displayname=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";displayname=\"" ));
aParams += ::rtl::Uri::encode( rObjDesc.maDisplayName, pToAccept, rtl_UriEncodeIgnoreEscapes, RTL_TEXTENCODING_UTF8 );
aParams += aChar;
}
aParams += ::rtl::OUString::createFromAscii( ";viewaspect=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";viewaspect=\"" ));
aParams += ::rtl::OUString::valueOf( static_cast< sal_Int32 >( rObjDesc.mnViewAspect ) );
aParams += aChar;
aParams += ::rtl::OUString::createFromAscii( ";width=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";width=\"" ));
aParams += ::rtl::OUString::valueOf( rObjDesc.maSize.Width() );
aParams += aChar;
aParams += ::rtl::OUString::createFromAscii( ";height=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";height=\"" ));
aParams += ::rtl::OUString::valueOf( rObjDesc.maSize.Height() );
aParams += aChar;
aParams += ::rtl::OUString::createFromAscii( ";posx=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";posx=\"" ));
aParams += ::rtl::OUString::valueOf( rObjDesc.maDragStartPos.X() );
aParams += aChar;
aParams += ::rtl::OUString::createFromAscii( ";posy=\"" );
aParams += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";posy=\"" ));
aParams += ::rtl::OUString::valueOf( rObjDesc.maDragStartPos.X() );
aParams += aChar;
@ -227,8 +227,7 @@ static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, cons
{
if( xFact.is() )
{
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString::createFromAscii(
"com.sun.star.datatransfer.MimeContentTypeFactory" ) ),
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
UNO_QUERY );
}
@ -238,14 +237,14 @@ static void ImplSetParameterString( TransferableObjectDescriptor& rObjDesc, cons
if( xMimeType.is() )
{
const ::rtl::OUString aClassNameString( ::rtl::OUString::createFromAscii( "classname" ) );
const ::rtl::OUString aTypeNameString( ::rtl::OUString::createFromAscii( "typename" ) );
const ::rtl::OUString aDisplayNameString( ::rtl::OUString::createFromAscii( "displayname" ) );
const ::rtl::OUString aViewAspectString( ::rtl::OUString::createFromAscii( "viewaspect" ) );
const ::rtl::OUString aWidthString( ::rtl::OUString::createFromAscii( "width" ) );
const ::rtl::OUString aHeightString( ::rtl::OUString::createFromAscii( "height" ) );
const ::rtl::OUString aPosXString( ::rtl::OUString::createFromAscii( "posx" ) );
const ::rtl::OUString aPosYString( ::rtl::OUString::createFromAscii( "posy" ) );
const ::rtl::OUString aClassNameString(RTL_CONSTASCII_USTRINGPARAM( "classname" ));
const ::rtl::OUString aTypeNameString(RTL_CONSTASCII_USTRINGPARAM( "typename" ));
const ::rtl::OUString aDisplayNameString(RTL_CONSTASCII_USTRINGPARAM( "displayname" ));
const ::rtl::OUString aViewAspectString(RTL_CONSTASCII_USTRINGPARAM( "viewaspect" ));
const ::rtl::OUString aWidthString(RTL_CONSTASCII_USTRINGPARAM( "width" ));
const ::rtl::OUString aHeightString(RTL_CONSTASCII_USTRINGPARAM( "height" ));
const ::rtl::OUString aPosXString(RTL_CONSTASCII_USTRINGPARAM( "posx" ));
const ::rtl::OUString aPosYString(RTL_CONSTASCII_USTRINGPARAM( "posy" ));
if( xMimeType->hasParameter( aClassNameString ) )
{
@ -540,7 +539,7 @@ void SAL_CALL TransferableHelper::lostOwnership( const Reference< XClipboard >&,
if( xFact.is() )
{
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
if( xDesktop.is() )
xDesktop->removeTerminateListener( mxTerminateListener );
@ -1090,7 +1089,7 @@ void TransferableHelper::CopyToClipboard( Window *pWindow ) const
if( xFact.is() )
{
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
if( xDesktop.is() )
xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
@ -1127,7 +1126,7 @@ void TransferableHelper::CopyToSelection( Window *pWindow ) const
if( xFact.is() )
{
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ), UNO_QUERY );
if( xDesktop.is() )
xDesktop->addTerminateListener( pThis->mxTerminateListener = new TerminateListener( *pThis ) );
@ -1416,11 +1415,10 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
Reference< XMimeContentTypeFactory > xMimeFact;
DataFlavorEx aFlavorEx;
const ::rtl::OUString aCharsetStr( ::rtl::OUString::createFromAscii( "charset" ) );
const ::rtl::OUString aCharsetStr(RTL_CONSTASCII_USTRINGPARAM( "charset" ));
if( xFact.is() )
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString::createFromAscii(
"com.sun.star.datatransfer.MimeContentTypeFactory" ) ),
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
UNO_QUERY );
for( sal_Int32 i = 0; i < rDataFlavorSeq.getLength(); i++ )
@ -1468,35 +1466,35 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor
aFlavorEx.mnSotId = SOT_FORMATSTR_ID_HTML_NO_COMMENT;
rDataFlavorExVector.push_back( aFlavorEx );
}
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "text/plain" ) ) )
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) ) )
{
// add, if it is a UTF-8 byte buffer
if( xMimeType->hasParameter( aCharsetStr ) )
{
const ::rtl::OUString aCharset( xMimeType->getParameterValue( aCharsetStr ) );
if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "unicode" ) ) ||
xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "utf-16" ) ) )
if( xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unicode" )) ) ||
xMimeType->getParameterValue( aCharsetStr ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "utf-16" )) ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_STRING;
}
}
}
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "text/rtf" ) ) )
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/rtf" )) ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = FORMAT_RTF;
}
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "text/html" ) ) )
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/html" )) ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_HTML;
}
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "text/uri-list" ) ) )
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/uri-list" )) ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMAT_FILE_LIST;
}
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "application/x-openoffice-objectdescriptor-xml" ) ) )
else if( xMimeType.is() && xMimeType->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice-objectdescriptor-xml" )) ) )
{
rDataFlavorExVector[ rDataFlavorExVector.size() - 1 ].mnSotId = SOT_FORMATSTR_ID_OBJECTDESCRIPTOR;
}
@ -2145,7 +2143,7 @@ sal_Bool TransferableDataHelper::GetFileList(
if( GetSotStorageStream( aFlavor, xStm ) )
{
if( aFlavor.MimeType.indexOf( ::rtl::OUString::createFromAscii( "text/uri-list" ) ) > -1 )
if( aFlavor.MimeType.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/uri-list" )) ) > -1 )
{
ByteString aByteString;
@ -2363,8 +2361,7 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer::
try
{
if( xFact.is() )
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString::createFromAscii(
"com.sun.star.datatransfer.MimeContentTypeFactory" ) ),
xMimeFact = Reference< XMimeContentTypeFactory >( xFact->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.datatransfer.MimeContentTypeFactory" )) ),
UNO_QUERY );
if( xMimeFact.is() )
@ -2376,22 +2373,22 @@ sal_Bool TransferableDataHelper::IsEqual( const ::com::sun::star::datatransfer::
{
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( xRequestType2->getFullMediaType() ) )
{
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "text/plain" ) ) )
if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/plain" )) ) )
{
// special handling for text/plain media types
const ::rtl::OUString aCharsetString( ::rtl::OUString::createFromAscii( "charset" ) );
const ::rtl::OUString aCharsetString(( RTL_CONSTASCII_USTRINGPARAM( "charset" ));
if( !xRequestType2->hasParameter( aCharsetString ) ||
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "utf-16" ) ) ||
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "unicode" ) ) )
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "utf-16" )) ) ||
xRequestType2->getParameterValue( aCharsetString ).equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unicode" )) ) )
{
bRet = sal_True;
}
}
else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString::createFromAscii( "application/x-openoffice" ) ) )
else if( xRequestType1->getFullMediaType().equalsIgnoreAsciiCase( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/x-openoffice" )) ) )
{
// special handling for application/x-openoffice media types
const ::rtl::OUString aFormatString( ::rtl::OUString::createFromAscii( "windows_formatname" ) );
const ::rtl::OUString aFormatString(RTL_CONSTASCII_USTRINGPARAM( "windows_formatname" ));
if( xRequestType1->hasParameter( aFormatString ) &&
xRequestType2->hasParameter( aFormatString ) &&

View file

@ -386,7 +386,7 @@ namespace svt
}
Sequence< NamedValue > aJobResponse( 1 );
aJobResponse[0].Name = OUString::createFromAscii( "Deactivate" );
aJobResponse[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Deactivate" ));
aJobResponse[0].Value <<= bDeactivateJob;
aReturn <<= aJobResponse;
}
@ -402,7 +402,7 @@ namespace svt
{
// create the Desktop component which can load components
Reference< XSystemShellExecute > xSystemShell(
m_xORB->createInstance( OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" ) ),
m_xORB->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" )) ),
UNO_QUERY
);
OSL_ENSURE( xSystemShell.is(), "OProductRegistration::doOnlineRegistration: invalid SystemExecute component!" );
@ -470,7 +470,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
Reference< XRegistryKey > xNewKey;
xNewKey = xRegistryKey->createKey(
OUString::createFromAscii( "/" PRODREG_IMPLNAME "/UNO/SERVICES" ));
OUString( RTL_CONSTASCII_USTRINGPARAM( "/" PRODREG_IMPLNAME "/UNO/SERVICES" )));
xNewKey->createKey(
OUString::createFromAscii( PRODREG_SERVNAME ));

View file

@ -383,7 +383,7 @@ namespace svt { namespace table
::com::sun::star::uno::Any TableControl::GetCellContent( sal_Int32 _nRowPos, sal_Int32 _nColPos) const
{
::com::sun::star::uno::Any cellContent(::com::sun::star::uno::Any(::rtl::OUString::createFromAscii("")));
::com::sun::star::uno::Any cellContent(::com::sun::star::uno::Any(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("")) ));
std::vector<std::vector< ::com::sun::star::uno::Any > >& aTableContent = GetModel()->getCellContent();
if(&aTableContent)
cellContent = aTableContent[_nRowPos][_nColPos];

View file

@ -242,7 +242,7 @@ namespace svt { namespace table
virtual std::vector<rtl::OUString>& getRowHeaderName()
{
aRowHeaderNames.clear();
aRowHeaderNames.push_back(rtl::OUString::createFromAscii(""));
aRowHeaderNames.push_back( rtl::OUString() );
return aRowHeaderNames;
}
private:
@ -1952,7 +1952,7 @@ namespace svt { namespace table
}
else
{
aTooltipText+= ::rtl::OUString::createFromAscii("\n");
aTooltipText+= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ));
::com::sun::star::uno::Any content = m_pModel->getCellContent()[current][cols[i]];
aTooltipText += convertToString(content);
}
@ -1966,7 +1966,7 @@ namespace svt { namespace table
aTooltipText = text[i];
else
{
aTooltipText+= ::rtl::OUString::createFromAscii("\n");
aTooltipText+= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ));
aTooltipText+= text[i];
}
}
@ -1988,7 +1988,7 @@ namespace svt { namespace table
}
else
{
aTooltipText+= ::rtl::OUString::createFromAscii("\n");
aTooltipText+= ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ));
aTooltipText+= text[i];
if(nCols > i)
{

View file

@ -139,7 +139,7 @@ namespace svt
//-------------------------------------------------------------------------
::rtl::OUString OAddressBookSourceDialogUno::getImplementationName_Static() throw(RuntimeException)
{
return ::rtl::OUString::createFromAscii("com.sun.star.comp.svtools.OAddressBookSourceDialogUno");
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.OAddressBookSourceDialogUno" ));
}
//-------------------------------------------------------------------------
@ -152,7 +152,7 @@ namespace svt
::comphelper::StringSequence OAddressBookSourceDialogUno::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.ui.AddressBookSourceDialog");
aSupported.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" ));
return aSupported;
}

View file

@ -113,14 +113,14 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
uno::Sequence< ::rtl::OUString > aServices;
xNewKey = xRegistryKey->createKey (
OUString::createFromAscii( "/com.sun.star.comp.svtools.OAddressBookSourceDialogUno/UNO/SERVICES" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "/com.sun.star.comp.svtools.OAddressBookSourceDialogUno/UNO/SERVICES" )) );
xNewKey->createKey(
OUString::createFromAscii( "com.sun.star.ui.AddressBookSourceDialog" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" )) );
xNewKey = xRegistryKey->createKey (
OUString::createFromAscii( "/com.sun.star.svtools.SvFilterOptionsDialog/UNO/SERVICES" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "/com.sun.star.svtools.SvFilterOptionsDialog/UNO/SERVICES" )) );
xNewKey->createKey (
OUString::createFromAscii( "com.sun.star.ui.dialogs.FilterOptionsDialog" ) );
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilterOptionsDialog" )) );
// GraphicProvider
xNewKey = reinterpret_cast< registry::XRegistryKey * >( _pRegistryKey )->createKey(
@ -163,7 +163,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
{
Sequence< OUString > aServiceNames(1);
aServiceNames.getArray()[0] =
OUString::createFromAscii( "com.sun.star.ui.AddressBookSourceDialog" );
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" ));
xFactory = ::cppu::createSingleFactory (
reinterpret_cast< XMultiServiceFactory* >( _pServiceManager ),
@ -176,7 +176,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
{
Sequence< OUString > aServiceNames(1);
aServiceNames.getArray()[0] =
OUString::createFromAscii( "com.sun.star.ui.dialogs.FilterOptionsDialog" );
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilterOptionsDialog" ));
xFactory = ::cppu::createSingleFactory (
reinterpret_cast< XMultiServiceFactory* >( _pServiceManager ),

View file

@ -287,7 +287,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
else
if((unsigned int)rawRowData.getLength()!=(unsigned)m_pTableModel->getColumnCount())
throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel);
throw GridInvalidDataException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The column count doesn't match with the length of row data" )), m_xDataModel);
for ( int k = 0; k < rawRowData.getLength(); k++)
{
@ -304,7 +304,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
}
else
throw GridInvalidDataException(rtl::OUString::createFromAscii("The data model isn't set!"), m_xDataModel);
throw GridInvalidDataException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The data model isn't set!" )), m_xDataModel);
sal_Int32 fontHeight = pTable->PixelToLogic( Size( 0, pTable->GetTextHeight()+3 ), MAP_APPFONT ).Height();
if(m_xDataModel->getRowHeight() == 0)
{
@ -353,7 +353,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
}
}
else
throw GridInvalidModelException(rtl::OUString::createFromAscii("The column model isn't set!"), m_xColumnModel);
throw GridInvalidModelException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The column model isn't set!" )), m_xColumnModel);
break;
}
@ -458,7 +458,7 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD
}
else if((unsigned int)rawRowData.getLength()!=(unsigned)colCount)
throw GridInvalidDataException(rtl::OUString::createFromAscii("The column count doesn't match with the length of row data"), m_xDataModel);
throw GridInvalidDataException(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The column count doesn't match with the length of row data" )), m_xDataModel);
for ( int k = 0; k < rawRowData.getLength(); k++)
newRow.push_back(rawRowData[k]);
@ -534,47 +534,47 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid:
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize"))
if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnResize" )))
{
bool resizable = m_pTableModel->getColumnModel()[Event.index]->isResizable();
Event.newValue>>=resizable;
m_pTableModel->getColumnModel()[Event.index]->setResizable(resizable);
}
else if(Event.valueName == rtl::OUString::createFromAscii("ColWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColWidth" )))
{
sal_Int32 colWidth = m_pTableModel->getColumnModel()[Event.index]->getWidth();
Event.newValue>>=colWidth;
m_pTableModel->getColumnModel()[Event.index]->setWidth(colWidth);
}
else if(Event.valueName == rtl::OUString::createFromAscii("MaxWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxWidth" )))
{
sal_Int32 maxWidth = m_pTableModel->getColumnModel()[Event.index]->getMaxWidth();
Event.newValue>>=maxWidth;
m_pTableModel->getColumnModel()[Event.index]->setMaxWidth(maxWidth);
}
else if(Event.valueName == rtl::OUString::createFromAscii("MinWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MinWidth" )))
{
sal_Int32 minWidth = m_pTableModel->getColumnModel()[Event.index]->getMinWidth();
Event.newValue>>=minWidth;
m_pTableModel->getColumnModel()[Event.index]->setMinWidth(minWidth);
}
else if(Event.valueName == rtl::OUString::createFromAscii("PrefWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrefWidth" )))
{
sal_Int32 prefWidth = m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth();
Event.newValue>>=prefWidth;
m_pTableModel->getColumnModel()[Event.index]->setPreferredWidth(prefWidth);
}
else if(Event.valueName == rtl::OUString::createFromAscii("HAlign"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HAlign" )))
{
::com::sun::star::style::HorizontalAlignment hAlign = m_pTableModel->getColumnModel()[Event.index]->getHorizontalAlign();
Event.newValue>>=hAlign;
m_pTableModel->getColumnModel()[Event.index]->setHorizontalAlign(hAlign);
}
else if(Event.valueName == rtl::OUString::createFromAscii("UpdateWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UpdateWidth" )))
{
if(m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth() != 0)
m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("PrefWidth"), m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth());
m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString::createFromAscii("ColWidth"), m_pTableModel->getColumnModel()[Event.index]->getWidth());
m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrefWidth" )), m_pTableModel->getColumnModel()[Event.index]->getPreferredWidth());
m_xColumnModel->getColumn(Event.index)->updateColumn(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColWidth" )), m_pTableModel->getColumnModel()[Event.index]->getWidth());
}
pTable->Invalidate();
}
@ -583,21 +583,21 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G
SolarMutexGuard aGuard;
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("RowHeight"))
if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeight" )))
{
sal_Int32 rowHeight = m_pTableModel->getRowHeight();
Event.newValue>>=rowHeight;
m_pTableModel->setRowHeight(rowHeight);
pTable->Invalidate();
}
else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaderWidth"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaderWidth" )))
{
sal_Int32 rowHeaderWidth = m_pTableModel->getRowHeaderWidth();
Event.newValue>>=rowHeaderWidth;
m_pTableModel->setRowHeaderWidth(rowHeaderWidth);
pTable->Invalidate();
}
else if(Event.valueName == rtl::OUString::createFromAscii("RowHeaders"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeaders" )))
{
Sequence< rtl::OUString > headers(0);
Event.newValue>>=headers;
@ -605,7 +605,7 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G
m_pTableModel->setRowHeaderName(headerNames);
pTable->Invalidate();
}
else if(Event.valueName == rtl::OUString::createFromAscii("CellUpdated"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellUpdated" )))
{
std::vector< std::vector< Any > >& rowContent = m_pTableModel->getCellContent();
sal_Int32 col(0);
@ -613,7 +613,7 @@ void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::G
rowContent[Event.index][col] = Event.newValue;
pTable->InvalidateDataWindow(Event.index, Event.index, false);
}
else if(Event.valueName == rtl::OUString::createFromAscii("RowUpdated"))
else if(Event.valueName == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowUpdated" )))
{
std::vector<std::vector< Any > >& rowContent = m_pTableModel->getCellContent();
Sequence< sal_Int32 > cols(0);

View file

@ -1463,25 +1463,25 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE
xRoadmapItem = evt.Source;
sal_Int32 nID = 0;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY );
::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "ID" ));
::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" )));
aValue >>= nID;
::com::sun::star::uno::Any rVal = evt.NewValue;
evt.NewValue >>= rVal;
::rtl::OUString sPropertyName = evt.PropertyName;
if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "Enabled" ) ) )
if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" )) ) )
{
sal_Bool bEnable = false;
evt.NewValue >>= bEnable;
pField->EnableRoadmapItem( (RoadmapTypes::ItemId)nID , bEnable );
}
else if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "Label" ) ) )
else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" )) ) )
{
::rtl::OUString sLabel;
evt.NewValue >>= sLabel;
pField->ChangeRoadmapItemLabel( (RoadmapTypes::ItemId)nID , sLabel );
}
else if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "ID" ) ) )
else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" )) ) )
{
sal_Int32 nNewID = 0;
evt.NewValue >>= nNewID;
@ -1512,11 +1512,11 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY );
if ( xPropertySet.is() )
{
::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "Label" ));
::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" )));
aValue >>= aCurRMItemData.Label;
aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "ID" ));
aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" )));
aValue >>= aCurRMItemData.n_ID;
aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "Enabled" ));
aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" )));
aValue >>= aCurRMItemData.b_Enabled;
}
return aCurRMItemData;;

View file

@ -66,7 +66,7 @@ int __LOADONCALLAPI main( int argc, char **argv )
oslModule aLibrary = osl_loadModule( aLib.pData, SAL_LOADMODULE_DEFAULT );
if ( aLibrary )
{
void* pFunc = osl_getSymbol( aLibrary, OUString::createFromAscii( "GetVersionInfo" ).pData );
void* pFunc = osl_getSymbol( aLibrary, OUString( RTL_CONSTASCII_USTRINGPARAM( "GetVersionInfo" )).pData );
if ( pFunc )
pInfo = (*(GetVersionInfo)pFunc)();
}

View file

@ -868,8 +868,8 @@ void __EXPORT PanelDemo::Main()
// initialize the UCB
Sequence< Any > aArgs(2);
aArgs[0] <<= rtl::OUString::createFromAscii( "Local" );
aArgs[1] <<= rtl::OUString::createFromAscii( "Office" );
aArgs[0] <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Local" ));
aArgs[1] <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Office" ));
::ucbhelper::ContentBroker::initialize( xSMgr, aArgs );
// run the application

View file

@ -348,7 +348,7 @@ int SAL_CALL main( int argc, char **argv )
*/
Reference< XInterface > xInterface =
xMultiComponentFactoryClient->createInstanceWithContext(
OUString::createFromAscii( "com.sun.star.bridge.UnoUrlResolver" ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.UnoUrlResolver" )),
xComponentContext );
Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY );
@ -369,7 +369,7 @@ int SAL_CALL main( int argc, char **argv )
// gets the server component context as property of the office component factory
Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY );
xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext;
xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ) >>= xComponentContext;
// gets the service manager from the office
Reference< XMultiComponentFactory > xMultiComponentFactoryServer(