On 11/16/2010 10:37 PM, Pierre-André Jacquod wrote:
Hello,
being off for some days, here the collection of patches I produced in
between. Each patch concern the cleaning of directory, this will allow
to review / descard some parts if needed.
best regards
pjacquod
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
From 7da843dde65464842596338d8c442a246f01bc28 Mon Sep 17 00:00:00 2001
From: pjacquod <pjacquod@alumni.ethz.ch>
Date: Mon, 15 Nov 2010 23:03:42 +0100
Subject: [PATCH 02/12] RTL_CONSTASCII_USTRINGPARAM in components cui options
this time options should be cleared
---
cui/source/options/cfgchart.cxx | 4 ++--
cui/source/options/optgdlg.cxx | 14 +++++++-------
cui/source/options/optimprove.cxx | 14 +++++++-------
cui/source/options/optimprove2.cxx | 10 +++++-----
cui/source/options/optjava.cxx | 2 +-
cui/source/options/sdbcdriverenum.cxx | 2 +-
cui/source/options/treeopt.cxx | 20 ++++++++++----------
7 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index a9e916c..03b9916 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -171,11 +171,11 @@ bool SvxChartColorTable::operator==( const SvxChartColorTable & _rOther )
const
// ====================
SvxChartOptions::SvxChartOptions() :
- ::utl::ConfigItem( rtl::OUString::createFromAscii( "Office.Chart" )),
+ ::utl::ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Chart") ) ),
mbIsInitialized( FALSE )
{
maPropertyNames.realloc( 1 );
- maPropertyNames[ 0 ] = ::rtl::OUString::createFromAscii( "DefaultColor/Series" );
+ maPropertyNames[ 0 ] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultColor/Series") );
}
SvxChartOptions::~SvxChartOptions()
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 23e9d1a..15f08dc 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -136,7 +136,7 @@ namespace
if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) )
{
#ifdef ENABLE_GTK
- return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.GtkFilePicker" );
+ return
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.GtkFilePicker") );
#else
return rtl::OUString();
#endif
@@ -144,7 +144,7 @@ namespace
else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde4" ) )
{
#ifdef ENABLE_KDE4
- return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDE4FilePicker"
);
+ return
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.KDE4FilePicker") );
#else
return rtl::OUString();
#endif
@@ -152,15 +152,15 @@ namespace
else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) )
{
#ifdef ENABLE_KDE
- return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDEFilePicker" );
+ return
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.KDEFilePicker") );
#else
return rtl::OUString();
#endif
}
#if defined WNT
- return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" );
+ return
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.SystemFilePicker") );
#elif (defined MACOSX && defined QUARTZ)
- return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.AquaFilePicker" );
+ return
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.AquaFilePicker") );
#else
return rtl::OUString();
#endif
@@ -843,14 +843,14 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) :
{
::rtl::OUString aAutoStr( aIconStyleLB.GetEntry( 0 ) );
- aAutoStr += ::rtl::OUString::createFromAscii( " (" );
+ aAutoStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("(") );
ULONG nAutoStyle = aStyleSettings.GetAutoSymbolsStyle();
if ( aIconStyleItemId[nAutoStyle] )
aAutoStr += aIconStyleLB.GetEntry( aIconStyleItemId[nAutoStyle] );
aIconStyleLB.RemoveEntry( 0 );
- aIconStyleLB.InsertEntry( aAutoStr += ::rtl::OUString::createFromAscii( ")" ), 0 );
+ aIconStyleLB.InsertEntry( aAutoStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")") ),
0 );
// separate auto and other icon themes
aIconStyleLB.SetSeparatorPos( 0 );
}
diff --git a/cui/source/options/optimprove.cxx b/cui/source/options/optimprove.cxx
index 4feabdd..c463e18 100644
--- a/cui/source/options/optimprove.cxx
+++ b/cui/source/options/optimprove.cxx
@@ -173,22 +173,22 @@ IMPL_LINK( SvxImprovementDialog, HandleOK, OKButton*, EMPTYARG )
{
uno::Reference< lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
uno::Reference< com::sun::star::oooimprovement::XCoreController > core_c(
- xSMGR->createInstance(
::rtl::OUString::createFromAscii("com.sun.star.oooimprovement.CoreController")),
+ xSMGR->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.oooimprovement.CoreController") ) ),
uno::UNO_QUERY);
if(core_c.is())
{
::comphelper::ConfigurationHelper::writeDirectKey(
xSMGR,
- ::rtl::OUString::createFromAscii("/org.openoffice.Office.OOoImprovement.Settings"),
- ::rtl::OUString::createFromAscii("Participation"),
- ::rtl::OUString::createFromAscii("ShowedInvitation"),
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Participation") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShowedInvitation") ),
uno::makeAny( true ),
::comphelper::ConfigurationHelper::E_STANDARD );
::comphelper::ConfigurationHelper::writeDirectKey(
xSMGR,
- ::rtl::OUString::createFromAscii("/org.openoffice.Office.OOoImprovement.Settings"),
- ::rtl::OUString::createFromAscii("Participation"),
- ::rtl::OUString::createFromAscii("InvitationAccepted"),
+
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.OOoImprovement.Settings") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Participation") ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InvitationAccepted") ),
uno::makeAny( m_pPage->IsYesChecked() ),
::comphelper::ConfigurationHelper::E_STANDARD );
// TODO: refactor
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 707a377..a1e0fe1 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -144,11 +144,11 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
::rtl::OUString sLogFile( m_sLogPath );
sLogFile += C2S("/Current.csv");
uno::Sequence< beans::PropertyValue > aArgs(3);
- aArgs[0].Name = ::rtl::OUString::createFromAscii("FilterName");
- aArgs[0].Value = uno::makeAny(::rtl::OUString::createFromAscii("Text - txt - csv
(StarCalc)"));
- aArgs[1].Name = ::rtl::OUString::createFromAscii("FilterOptions");
- aArgs[1].Value = uno::makeAny(::rtl::OUString::createFromAscii("44,34,12,1,"));
- aArgs[2].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName") );
+ aArgs[0].Value = uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text - txt -
csv (StarCalc)") ) );
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterOptions") );
+ aArgs[1].Value = uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("44,34,12,1,") )
);
+ aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly") );
aArgs[2].Value = uno::makeAny(true);
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 293e6fe..7835498 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -304,7 +304,7 @@ IMPL_LINK( SvxJavaOptionsPage, AddHdl_Impl, PushButton *, EMPTYARG )
{
Reference < XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
xFolderPicker = Reference< XFolderPicker >(
- xMgr->createInstance( ::rtl::OUString::createFromAscii(
"com.sun.star.ui.dialogs.FolderPicker" ) ), UNO_QUERY );
+ xMgr->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FolderPicker") ) ), UNO_QUERY
);
String sWorkFolder = SvtPathOptions().GetWorkPath();
xFolderPicker->setDisplayDirectory( sWorkFolder );
diff --git a/cui/source/options/sdbcdriverenum.cxx b/cui/source/options/sdbcdriverenum.cxx
index 91075da..ef900ff 100644
--- a/cui/source/options/sdbcdriverenum.cxx
+++ b/cui/source/options/sdbcdriverenum.cxx
@@ -64,7 +64,7 @@ namespace offapp
try
{
Reference< XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory();
- Reference< XInterface > xDM =
xORB->createInstance(::rtl::OUString::createFromAscii("com.sun.star.sdbc.DriverManager"));
+ Reference< XInterface > xDM =
xORB->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.DriverManager")
) );
OSL_ENSURE(xDM.is(), "ODriverEnumerationImpl::ODriverEnumerationImpl: no access to the
SDBC driver manager!");
Reference< XEnumerationAccess > xEnumAccess(xDM, UNO_QUERY);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index fa595c7..1a28284 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1427,26 +1427,26 @@ BOOL EnableSSO( void )
::rtl::Bootstrap theBootstrap( theIniFile );
rtl::OUString theOfflineValue;
- rtl::OUString theDefaultOfflineValue = rtl::OUString::createFromAscii( "false" );
- theBootstrap.getFrom( rtl::OUString::createFromAscii( "CFG_Offline" ),
+ rtl::OUString theDefaultOfflineValue (RTL_CONSTASCII_USTRINGPARAM("false") );
+ theBootstrap.getFrom( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CFG_Offline") ),
theOfflineValue,
theDefaultOfflineValue );
rtl::OUString theServerTypeValue;
- theBootstrap.getFrom( rtl::OUString::createFromAscii( "CFG_ServerType" ),
+ theBootstrap.getFrom( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CFG_ServerType") ),
theServerTypeValue );
rtl::OUString theBackendServiceTypeValue;
- theBootstrap.getFrom( rtl::OUString::createFromAscii( "CFG_BackendService" ),
+ theBootstrap.getFrom( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CFG_BackendService") ),
theBackendServiceTypeValue );
BOOL bSSOEnabled =
( theOfflineValue == theDefaultOfflineValue &&
( theServerTypeValue.getLength() == 0 ||
- theServerTypeValue == rtl::OUString::createFromAscii( "uno" ) ) &&
+ theServerTypeValue == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno") ) ) &&
theBackendServiceTypeValue ==
- rtl::OUString::createFromAscii(
- "com.sun.star.comp.configuration.backend.LdapSingleBackend" ) );
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.comp.configuration.backend.LdapSingleBackend") ) );
if ( bSSOEnabled && GetSSOCreator() == 0 )
{
bSSOEnabled = FALSE;
@@ -1466,7 +1466,7 @@ CreateTabPage GetSSOCreator( void )
if( aModule.loadRelative(
&thisModule, theModuleName, SAL_LOADMODULE_DEFAULT ) )
{
- rtl::OUString theSymbolName( rtl::OUString::createFromAscii( "CreateSSOTabPage" ) );
+ rtl::OUString theSymbolName( RTL_CONSTASCII_USTRINGPARAM("CreateSSOTabPage" ) );
theSymbol = reinterpret_cast<CreateTabPage>(aModule.getFunctionSymbol( theSymbolName
));
}
}
@@ -1713,8 +1713,8 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet)
}
Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
Reference< XPropertySet > xProp(
- xMgr->createInstance( ::rtl::OUString::createFromAscii(
- "com.sun.star.linguistic2.LinguProperties") ),
+ xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.linguistic2.LinguProperties") ) ),
UNO_QUERY );
if ( SFX_ITEM_SET == rSet.GetItemState(SID_ATTR_HYPHENREGION, sal_False, &pItem ) )
{
--
1.7.1
Context
[Libreoffice] [PATCH 03/12] RTL_CONSTASCII_USTRINGPARAM in components - forms · 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.