summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
authorJulien Nabet <serval@ilapharm.com>2010-11-23 22:10:46 +0100
committerDavid Tardon <dtardon@redhat.com>2010-11-24 07:24:35 +0100
commit95e7e542438384975a95e7309e23a07a0986fcc7 (patch)
treea47e9b075025a469e9839e6498b17ea7b92e4c86 /cui/source/customize
parentc6e0eee73c1be7f3cb7d33f568246db9d40d7ed5 (diff)
RTL patch for cui
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/cfg.cxx62
-rw-r--r--cui/source/customize/eventdlg.cxx6
-rw-r--r--cui/source/customize/selector.cxx20
3 files changed, 44 insertions, 44 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 005d7a82f8cd..b624ce2bc337 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -213,7 +213,7 @@ OUString replaceSaveInName(
const OUString& rSaveInName )
{
OUString name;
- OUString placeholder = OUString::createFromAscii( "%SAVE IN SELECTION%" );
+ OUString placeholder(RTL_CONSTASCII_USTRINGPARAM( "%SAVE IN SELECTION%" ));
sal_Int32 pos = rMessage.indexOf( placeholder );
@@ -253,10 +253,10 @@ generateCustomName(
{
// find and replace the %n placeholder in the prefix string
OUString name;
- OUString placeholder = OUString::createFromAscii( "%n" );
+ OUString placeholder(RTL_CONSTASCII_USTRINGPARAM( "%n" ));
sal_Int32 pos = prefix.indexOf(
- OUString::createFromAscii( "%n" ) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "%n" )) );
if ( pos != -1 )
{
@@ -419,29 +419,29 @@ OUString GetModuleName( const OUString& aModuleId )
{
if ( aModuleId.equalsAscii( "com.sun.star.text.TextDocument" ) ||
aModuleId.equalsAscii( "com.sun.star.text.GlobalDocument" ) )
- return OUString::createFromAscii("Writer");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer"));
else if ( aModuleId.equalsAscii( "com.sun.star.text.WebDocument" ) )
- return OUString::createFromAscii("Writer/Web");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Writer/Web"));
else if ( aModuleId.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) )
- return OUString::createFromAscii("Draw");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Draw"));
else if ( aModuleId.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) )
- return OUString::createFromAscii("Impress");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Impress"));
else if ( aModuleId.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) )
- return OUString::createFromAscii("Calc");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Calc"));
else if ( aModuleId.equalsAscii( "com.sun.star.script.BasicIDE" ) )
- return OUString::createFromAscii("Basic");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Basic"));
else if ( aModuleId.equalsAscii( "com.sun.star.formula.FormulaProperties" ) )
- return OUString::createFromAscii("Math");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Math"));
else if ( aModuleId.equalsAscii( "com.sun.star.sdb.RelationDesign" ) )
- return OUString::createFromAscii("Relation Design");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Relation Design"));
else if ( aModuleId.equalsAscii( "com.sun.star.sdb.QueryDesign" ) )
- return OUString::createFromAscii("Query Design");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Query Design"));
else if ( aModuleId.equalsAscii( "com.sun.star.sdb.TableDesign" ) )
- return OUString::createFromAscii("Table Design");
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Table Design"));
else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DataSourceBrowser" ) )
- return OUString::createFromAscii("Data Source Browser" );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Data Source Browser" ));
else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DatabaseDocument" ) )
- return OUString::createFromAscii("Database" );
+ return OUString(RTL_CONSTASCII_USTRINGPARAM("Database" ));
return ::rtl::OUString();
}
@@ -924,7 +924,7 @@ SaveInData::SaveInData(
::comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
xProps->getPropertyValue(
- OUString::createFromAscii( "DefaultContext" ))
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )))
>>= m_xComponentContext;
m_aSeparatorSeq.realloc( 1 );
@@ -1704,7 +1704,7 @@ void SvxConfigPage::Reset( const SfxItemSet& )
OUString aModuleName = GetUIModuleName( aModuleId, xModuleManager );
OUString title = aTopLevelSeparator.GetText();
- OUString aSearchString = OUString::createFromAscii( "%MODULENAME" );
+ OUString aSearchString(RTL_CONSTASCII_USTRINGPARAM( "%MODULENAME" ));
sal_Int32 index = title.indexOf( aSearchString );
if ( index != -1 )
@@ -1742,7 +1742,7 @@ void SvxConfigPage::Reset( const SfxItemSet& )
OUString label;
utl::ConfigManager::GetDirectConfigProperty(
utl::ConfigManager::PRODUCTNAME ) >>= label;
- label += OUString::createFromAscii( " " );
+ label += OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
label += aModuleName;
nPos = aSaveInListBox.InsertEntry( label );
@@ -3111,7 +3111,7 @@ SvxConfigEntry::GetHelpText()
{
if ( aHelpText.getLength() == 0 )
{
- OUString helpid = OUString::createFromAscii( "helpid:" );
+ OUString helpid(RTL_CONSTASCII_USTRINGPARAM( "helpid:" ));
if ( aHelpURL.indexOf( helpid ) != -1 )
{
aHelpURL = aHelpURL.copy( helpid.getLength() );
@@ -3349,7 +3349,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(
// default toolbar to select is standardbar unless a different one
// has been passed in
m_aURLToSelect = OUString::createFromAscii( ITEM_TOOLBAR_URL );
- m_aURLToSelect += OUString::createFromAscii( "standardbar" );
+ m_aURLToSelect += OUString(RTL_CONSTASCII_USTRINGPARAM( "standardbar" ));
const SfxPoolItem* pItem =
rSet.GetItem( rSet.GetPool()->GetWhich( SID_CONFIG ) );
@@ -3900,7 +3900,7 @@ void SvxToolbarConfigPage::Init()
// in future select the default toolbar: Standard
m_aURLToSelect = OUString::createFromAscii( ITEM_TOOLBAR_URL );
- m_aURLToSelect += OUString::createFromAscii( "standardbar" );
+ m_aURLToSelect += OUString(RTL_CONSTASCII_USTRINGPARAM( "standardbar" ));
}
aTopLevelListBox.SelectEntryPos(nPos, TRUE);
@@ -4005,7 +4005,7 @@ void ToolbarSaveInData::SetSystemStyle(
const OUString& rResourceURL,
sal_Int32 nStyle )
{
- if ( rResourceURL.indexOf( OUString::createFromAscii( "private" ) ) == 0 &&
+ if ( rResourceURL.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM( "private" )) ) == 0 &&
m_xPersistentWindowState.is() &&
m_xPersistentWindowState->hasByName( rResourceURL ) )
{
@@ -4044,7 +4044,7 @@ sal_Int32 ToolbarSaveInData::GetSystemStyle( const OUString& rResourceURL )
{
sal_Int32 result = 0;
- if ( rResourceURL.indexOf( OUString::createFromAscii( "private" ) ) == 0 &&
+ if ( rResourceURL.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM( "private" )) ) == 0 &&
m_xPersistentWindowState.is() &&
m_xPersistentWindowState->hasByName( rResourceURL ) )
{
@@ -4078,7 +4078,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL )
{
OUString result;
- if ( rResourceURL.indexOf( OUString::createFromAscii( "private" ) ) == 0 &&
+ if ( rResourceURL.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM( "private" )) ) == 0 &&
m_xPersistentWindowState.is() &&
m_xPersistentWindowState->hasByName( rResourceURL ) )
{
@@ -4104,7 +4104,7 @@ OUString ToolbarSaveInData::GetSystemUIName( const OUString& rResourceURL )
}
}
- if ( rResourceURL.indexOf( OUString::createFromAscii( ".uno" ) ) == 0 &&
+ if ( rResourceURL.indexOf( OUString(RTL_CONSTASCII_USTRINGPARAM( ".uno" )) ) == 0 &&
m_xCommandToLabelMap.is() &&
m_xCommandToLabelMap->hasByName( rResourceURL ) )
{
@@ -5628,7 +5628,7 @@ bool SvxIconSelectorDialog::ReplaceGraphicItem(
uno::Reference< beans::XPropertySet > props =
m_xGraphProvider->queryGraphicDescriptor( aMediaProps );
uno::Any a = props->getPropertyValue(
- OUString::createFromAscii("SizePixel") );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SizePixel")) );
a >>= aSize;
if (0 == aSize.Width || 0 == aSize.Height)
return FALSE;
@@ -5772,9 +5772,9 @@ void SvxIconSelectorDialog::ImportGraphics(
if ( rejectedCount != 0 )
{
- OUString message =OUString::createFromAscii("");
- OUString newLine = OUString::createFromAscii("\n");
- rtl::OUString fPath = OUString::createFromAscii("");
+ OUString message;
+ OUString newLine(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ OUString fPath;
if (rejectedCount > 1)
fPath = rPaths[0].copy(8) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ) );
for ( sal_Int32 i = 0; i < rejectedCount; i++ )
@@ -5808,7 +5808,7 @@ bool SvxIconSelectorDialog::ImportGraphic( const OUString& aURL )
m_xGraphProvider->queryGraphicDescriptor( aMediaProps );
uno::Any a = props->getPropertyValue(
- OUString::createFromAscii("SizePixel") );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("SizePixel")) );
xGraphic = m_xGraphProvider->queryGraphic( aMediaProps );
if ( xGraphic.is() )
@@ -5899,7 +5899,7 @@ rtl::OUString SvxIconReplacementDialog :: ReplaceIconName( const OUString& rMess
{
rtl::OUString name;
rtl::OUString message = String( CUI_RES( RID_SVXSTR_REPLACE_ICON_WARNING ) );
- rtl::OUString placeholder = OUString::createFromAscii( "%ICONNAME" );
+ rtl::OUString placeholder(RTL_CONSTASCII_USTRINGPARAM( "%ICONNAME" ));
sal_Int32 pos = message.indexOf( placeholder );
if ( pos != -1 )
{
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index dc8a8a00b648..85c2d44a6a64 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -97,8 +97,8 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet,
xSupplier = uno::Reference< document::XEventsSupplier > (
::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii(
- "com.sun.star.frame.GlobalEventBroadcaster" ) ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.frame.GlobalEventBroadcaster" )) ),
uno::UNO_QUERY );
USHORT nPos(0);
@@ -202,7 +202,7 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox )
uno::Reference< frame::XFramesSupplier > xFramesSupplier(
::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) ),
uno::UNO_QUERY );
uno::Reference< frame::XFrame > xFrame =
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 4954c4685c43..b3fd2e69dc95 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -476,8 +476,8 @@ void SvxConfigGroupListBox_Impl::Init()
Reference< ::com::sun::star::frame::XModuleManager >
xModuleManager( xMCF->createInstanceWithContext(
- OUString::createFromAscii(
- "com.sun.star.frame.ModuleManager" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.frame.ModuleManager" )),
xContext ),
UNO_QUERY );
@@ -489,8 +489,8 @@ void SvxConfigGroupListBox_Impl::Init()
Reference< container::XNameAccess > xNameAccess(
xMCF->createInstanceWithContext(
- OUString::createFromAscii(
- "com.sun.star.frame.UICommandDescription" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.frame.UICommandDescription" )),
xContext ),
UNO_QUERY );
@@ -501,8 +501,8 @@ void SvxConfigGroupListBox_Impl::Init()
Reference< container::XNameAccess > xAllCategories(
xMCF->createInstanceWithContext(
- OUString::createFromAscii(
- "com.sun.star.ui.UICategoryDescription" ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ui.UICategoryDescription" )),
xContext ),
UNO_QUERY );
@@ -584,7 +584,7 @@ void SvxConfigGroupListBox_Impl::Init()
::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
xCtx.set( _xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName(
- OUString::createFromAscii( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")) ), UNO_QUERY_THROW );
rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
}
catch( const Exception& )
@@ -641,7 +641,7 @@ Image SvxConfigGroupListBox_Impl::GetImage(
xModuleManager(
xCtx->getServiceManager()
->createInstanceWithContext(
- OUString::createFromAscii("com.sun.star.frame.ModuleManager"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")),
xCtx ),
UNO_QUERY_THROW );
Reference<container::XNameAccess> xModuleConfig(
@@ -653,7 +653,7 @@ Image SvxConfigGroupListBox_Impl::GetImage(
Any aAny = xModuleConfig->getByName(appModule);
if( sal_True != ( aAny >>= moduleDescr ) )
{
- throw RuntimeException(OUString::createFromAscii("SFTreeListBox::Init: failed to get PropertyValue"), Reference< XInterface >());
+ throw RuntimeException(OUString(RTL_CONSTASCII_USTRINGPARAM("SFTreeListBox::Init: failed to get PropertyValue")), Reference< XInterface >());
}
beans::PropertyValue const * pmoduleDescr =
moduleDescr.getConstArray();
@@ -697,7 +697,7 @@ SvxConfigGroupListBox_Impl::getDocumentModel(
xCtx->getServiceManager();
Reference< frame::XDesktop > desktop (
mcf->createInstanceWithContext(
- OUString::createFromAscii("com.sun.star.frame.Desktop"), xCtx ),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), xCtx ),
UNO_QUERY );
Reference< container::XEnumerationAccess > componentsAccess =