summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-05 10:07:15 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-10-05 10:08:39 +0200
commitcf5593ae02ec8fabf47662f84bee7913a74d1e7e (patch)
treeecb91238a5af4f28588424dadc40b59940cbd98e /cui
parentb29ecc914b78216ea9a355c431ca4748eb056b06 (diff)
cui: kill C2U and UNISTRING macros
Change-Id: I69d883e623f7fffd37c05b85a6655009da9c23a8
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optasian.cxx14
-rw-r--r--cui/source/options/optgdlg.cxx26
-rw-r--r--cui/source/options/optinet2.cxx6
-rw-r--r--cui/source/options/optlingu.cxx59
-rw-r--r--cui/source/options/optsave.cxx24
-rw-r--r--cui/source/options/optupdt.cxx42
-rw-r--r--cui/source/options/treeopt.cxx90
7 files changed, 121 insertions, 140 deletions
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 9c3df99dc5fd..229af974baf2 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -44,8 +44,6 @@ using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
using rtl::OUString;
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
-
const sal_Char cIsKernAsianPunctuation[] = "IsKernAsianPunctuation";
const sal_Char cCharacterCompressionType[] = "CharacterCompressionType";
@@ -171,7 +169,7 @@ sal_Bool SvxAsianLayoutPage::FillItemSet( SfxItemSet& )
if(aCharKerningRB.IsChecked() != aCharKerningRB.GetSavedValue())
{
pImpl->aConfig.SetKerningWesternTextOnly(aCharKerningRB.IsChecked());
- OUString sPunct(C2U(cIsKernAsianPunctuation));
+ OUString sPunct(cIsKernAsianPunctuation);
if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sPunct))
{
Any aVal;
@@ -187,7 +185,7 @@ sal_Bool SvxAsianLayoutPage::FillItemSet( SfxItemSet& )
sal_Int16 nSet = aNoCompressionRB.IsChecked() ? 0 :
aPunctCompressionRB.IsChecked() ? 1 : 2;
pImpl->aConfig.SetCharDistanceCompression(nSet);
- OUString sCompress(C2U(cCharacterCompressionType));
+ OUString sCompress(cCharacterCompressionType);
if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sCompress))
{
Any aVal;
@@ -233,11 +231,11 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& )
if(xFact.is())
{
pImpl->xPrSet = Reference<XPropertySet>(
- xFact->createInstance(C2U("com.sun.star.document.Settings")), UNO_QUERY);
+ xFact->createInstance("com.sun.star.document.Settings"), UNO_QUERY);
}
if( pImpl->xPrSet.is() )
pImpl->xPrSetInfo = pImpl->xPrSet->getPropertySetInfo();
- OUString sForbidden(C2U("ForbiddenCharacters"));
+ OUString sForbidden("ForbiddenCharacters");
sal_Bool bKernWesternText = pImpl->aConfig.IsKerningWesternTextOnly();
sal_Int16 nCompress = pImpl->aConfig.GetCharDistanceCompression();
if(pImpl->xPrSetInfo.is())
@@ -247,13 +245,13 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& )
Any aForbidden = pImpl->xPrSet->getPropertyValue(sForbidden);
aForbidden >>= pImpl->xForbidden;
}
- OUString sCompress(C2U(cCharacterCompressionType));
+ OUString sCompress(cCharacterCompressionType);
if(pImpl->xPrSetInfo->hasPropertyByName(sCompress))
{
Any aVal = pImpl->xPrSet->getPropertyValue(sCompress);
aVal >>= nCompress;
}
- OUString sPunct(C2U(cIsKernAsianPunctuation));
+ OUString sPunct(cIsKernAsianPunctuation);
if(pImpl->xPrSetInfo->hasPropertyByName(sPunct))
{
Any aVal = pImpl->xPrSet->getPropertyValue(sPunct);
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 84bcad0a711f..5484fd832fa4 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -98,8 +98,6 @@ using namespace ::utl;
using ::rtl::OString;
using ::rtl::OUString;
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
// class OfaMiscTabPage --------------------------------------------------
int OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ )
@@ -1496,7 +1494,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
sNewLang = aLocale.Language;
if ( !aLocale.Country.isEmpty() )
{
- sNewLang += C2U("-");
+ sNewLang += "-";
sNewLang += aLocale.Country;
}
}
@@ -1549,7 +1547,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
Any aValue;
Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
- OUString aPropName( C2U("DefaultLocale") );
+ OUString aPropName( "DefaultLocale" );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
if (xLinguProp.is())
xLinguProp->setPropertyValue( aPropName, aValue );
@@ -1569,7 +1567,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
Any aValue;
Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
- OUString aPropName( C2U("DefaultLocale_CJK") );
+ OUString aPropName( "DefaultLocale_CJK" );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
if (xLinguProp.is())
xLinguProp->setPropertyValue( aPropName, aValue );
@@ -1589,7 +1587,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
Any aValue;
Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false );
aValue <<= aLocale;
- OUString aPropName( C2U("DefaultLocale_CTL") );
+ OUString aPropName( "DefaultLocale_CTL" );
pLangConfig->aLinguConfig.SetProperty( aPropName, aValue );
if (xLinguProp.is())
xLinguProp->setPropertyValue( aPropName, aValue );
@@ -1713,18 +1711,18 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
Any aCTLLang;
try
{
- aWestLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale"));
+ aWestLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale");
Locale aLocale;
aWestLang >>= aLocale;
eCurLang = MsLangId::convertLocaleToLanguage( aLocale );
- aCJKLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CJK"));
+ aCJKLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CJK");
aLocale = Locale();
aCJKLang >>= aLocale;
eCurLangCJK = MsLangId::convertLocaleToLanguage( aLocale );
- aCTLLang = pLangConfig->aLinguConfig.GetProperty(C2U("DefaultLocale_CTL"));
+ aCTLLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CTL");
aLocale = Locale();
aCTLLang >>= aLocale;
eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale );
@@ -1779,7 +1777,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
aComplexLanguageLB.SaveValue();
aCurrentDocCB.SaveValue();
- sal_Bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( C2U("DefaultLocale") );
+ sal_Bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale" );
aWesternLanguageFT.Enable( bEnable );
aWesternLanguageLB.Enable( bEnable );
@@ -1788,11 +1786,11 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet )
// #i15812# controls for CJK/CTL already enabled/disabled from LocaleSettingHdl
#if 0
- bEnable = ( !pLangConfig->aLinguConfig.IsReadOnly( C2U("DefaultLocale_CJK") ) && aAsianSupportCB.IsChecked() );
+ bEnable = ( !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale_CJK" ) && aAsianSupportCB.IsChecked() );
aAsianLanguageFT.Enable( bEnable );
aAsianLanguageLB.Enable( bEnable );
- bEnable = ( !pLangConfig->aLinguConfig.IsReadOnly( C2U("DefaultLocale_CTL") ) && aCTLSupportCB.IsChecked() );
+ bEnable = ( !pLangConfig->aLinguConfig.IsReadOnly( "DefaultLocale_CTL" ) && aCTLSupportCB.IsChecked() );
aComplexLanguageFT.Enable( bEnable );
aComplexLanguageLB.Enable( bEnable );
#endif
@@ -1814,7 +1812,7 @@ IMPL_LINK( OfaLanguagesTabPage, SupportHdl, CheckBox*, pBox )
sal_Bool bCheck = pBox->IsChecked();
if ( &aAsianSupportCB == pBox )
{
- sal_Bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly( C2U("DefaultLocale_CJK"));
+ sal_Bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CJK");
bCheck = ( bCheck && !bReadonly );
aAsianLanguageFT.Enable( bCheck );
aAsianLanguageLB.Enable( bCheck );
@@ -1824,7 +1822,7 @@ IMPL_LINK( OfaLanguagesTabPage, SupportHdl, CheckBox*, pBox )
}
else if ( &aCTLSupportCB == pBox )
{
- sal_Bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly( C2U("DefaultLocale_CTL"));
+ sal_Bool bReadonly = pLangConfig->aLinguConfig.IsReadOnly("DefaultLocale_CTL");
bCheck = ( bCheck && !bReadonly );
aComplexLanguageFT.Enable( bCheck );
aComplexLanguageLB.Enable( bCheck );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index a4588f35e5f8..240cb876684a 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -97,8 +97,6 @@ using ::rtl::OUString;
// static ----------------------------------------------------------------
-#define C2U(cChar) OUString::createFromAscii(cChar)
-
#include <sal/config.h>
// -----------------------------------------------------------------------
@@ -1251,7 +1249,7 @@ public:
/* -------------------------------------------------------------------------*/
MailerProgramCfg_Impl::MailerProgramCfg_Impl() :
- utl::ConfigItem(C2U("Office.Common/ExternalMailer")),
+ utl::ConfigItem("Office.Common/ExternalMailer"),
bROProgram(sal_False)
{
const Sequence< OUString > aNames = GetPropertyNames();
@@ -1288,7 +1286,7 @@ const Sequence<OUString> MailerProgramCfg_Impl::GetPropertyNames()
{
Sequence<OUString> aRet(1);
OUString* pRet = aRet.getArray();
- pRet[0] = C2U("Program");
+ pRet[0] = "Program";
return aRet;
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index bfbf28634f09..3ea970e72d3b 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -78,7 +78,6 @@ using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::beans;
namespace css = com::sun::star;
-#define C2U(cChar) OUString::createFromAscii(cChar)
#define CBCOL_FIRST 0
#define CBCOL_SECOND 1
#define CBCOL_BOTH 2
@@ -733,7 +732,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
{
xMSF = ::comphelper::getProcessServiceFactory();
uno::Reference < XInterface > xI = xMSF->createInstance(
- C2U( "com.sun.star.linguistic2.LinguServiceManager" ) );
+ "com.sun.star.linguistic2.LinguServiceManager" );
xLinguSrvcMgr = uno::Reference<XLinguServiceManager>(xI, UNO_QUERY);
DBG_ASSERT(xLinguSrvcMgr.is(), "No linguistic service available!");
if(xLinguSrvcMgr.is())
@@ -746,7 +745,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
//read spell checker
Sequence< OUString > aSpellNames = xLinguSrvcMgr->getAvailableServices(
- C2U(cSpell), Locale() );
+ cSpell, Locale() );
const OUString* pSpellNames = aSpellNames.getConstArray();
sal_Int32 nIdx;
@@ -772,7 +771,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
//read grammar checker
Sequence< OUString > aGrammarNames = xLinguSrvcMgr->getAvailableServices(
- C2U(cGrammar), Locale() );
+ cGrammar, Locale() );
const OUString* pGrammarNames = aGrammarNames.getConstArray();
for(nIdx = 0; nIdx < aGrammarNames.getLength(); nIdx++)
{
@@ -796,7 +795,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
//read hyphenator
Sequence< OUString > aHyphNames = xLinguSrvcMgr->getAvailableServices(
- C2U(cHyph), Locale() );
+ cHyph, Locale() );
const OUString* pHyphNames = aHyphNames.getConstArray();
for(nIdx = 0; nIdx < aHyphNames.getLength(); nIdx++)
{
@@ -820,7 +819,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
//read thesauri
Sequence< OUString > aThesNames = xLinguSrvcMgr->getAvailableServices(
- C2U(cThes), Locale() );
+ cThes, Locale() );
const OUString* pThesNames = aThesNames.getConstArray();
for(nIdx = 0; nIdx < aThesNames.getLength(); nIdx++)
{
@@ -848,22 +847,22 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
{
sal_Int16 nLang = SvxLocaleToLanguage( pAllLocales[nLocale] );
- aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cSpell), pAllLocales[nLocale]);
+ aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cSpell, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
if (aCfgSvcs.getLength())
aCfgSpellTable[ nLang ] = aCfgSvcs;
- aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cGrammar), pAllLocales[nLocale]);
+ aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cGrammar, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
if (aCfgSvcs.getLength())
aCfgGrammarTable[ nLang ] = aCfgSvcs;
- aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cHyph), pAllLocales[nLocale]);
+ aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cHyph, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
if (aCfgSvcs.getLength())
aCfgHyphTable[ nLang ] = aCfgSvcs;
- aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(C2U(cThes), pAllLocales[nLocale]);
+ aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cThes, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
if (aCfgSvcs.getLength())
aCfgThesTable[ nLang ] = aCfgSvcs;
@@ -1231,7 +1230,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
uno::Reference< XLinguServiceManager > xMgr( pLinguData->GetManager() );
Locale aLocale( SvxCreateLocale(nLang) );
if (xMgr.is())
- xMgr->setConfiguredServices( C2U(cSpell), aLocale, aImplNames );
+ xMgr->setConfiguredServices( cSpell, aLocale, aImplNames );
}
// update grammar checker configuration entries
@@ -1243,7 +1242,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
uno::Reference< XLinguServiceManager > xMgr( pLinguData->GetManager() );
Locale aLocale( SvxCreateLocale(nLang) );
if (xMgr.is())
- xMgr->setConfiguredServices( C2U(cGrammar), aLocale, aImplNames );
+ xMgr->setConfiguredServices( cGrammar, aLocale, aImplNames );
}
// update hyphenator configuration entries
@@ -1255,7 +1254,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
uno::Reference< XLinguServiceManager > xMgr( pLinguData->GetManager() );
Locale aLocale( SvxCreateLocale(nLang) );
if (xMgr.is())
- xMgr->setConfiguredServices( C2U(cHyph), aLocale, aImplNames );
+ xMgr->setConfiguredServices( cHyph, aLocale, aImplNames );
}
// update thesaurus configuration entries
@@ -1267,7 +1266,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
uno::Reference< XLinguServiceManager > xMgr( pLinguData->GetManager() );
Locale aLocale( SvxCreateLocale(nLang) );
if (xMgr.is())
- xMgr->setConfiguredServices( C2U(cThes), aLocale, aImplNames );
+ xMgr->setConfiguredServices( cThes, aLocale, aImplNames );
}
}
@@ -1487,7 +1486,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
sal_uLong nUserData = 0;
pEntry = CreateEntry( sSpellAuto, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_SPELL_AUTO) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_SPELL_AUTO ) >>= bVal;
const SfxPoolItem* pItem = GetItem( rSet, SID_AUTOSPELL_CHECK );
if (pItem)
bVal = ((SfxBoolItem *) pItem)->GetValue();
@@ -1497,42 +1496,42 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sGrammarAuto, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_GRAMMAR_AUTO) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bVal;
nUserData = OptionsUserData( EID_GRAMMAR_AUTO, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sCapitalWords, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_SPELL_UPPER_CASE) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_SPELL_UPPER_CASE ) >>= bVal;
nUserData = OptionsUserData( EID_CAPITAL_WORDS, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sWordsWithDigits, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_SPELL_WITH_DIGITS) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_SPELL_WITH_DIGITS ) >>= bVal;
nUserData = OptionsUserData( EID_WORDS_WITH_DIGITS, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sCapitalization, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_SPELL_CAPITALIZATION) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_SPELL_CAPITALIZATION ) >>= bVal;
nUserData = OptionsUserData( EID_CAPITALIZATION, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sSpellSpecial, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_SPELL_SPECIAL) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_SPELL_SPECIAL ) >>= bVal;
nUserData = OptionsUserData( EID_SPELL_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sNumMinWordlen, CBCOL_SECOND );
- aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_WORD_LENGTH) ) >>= nVal;
+ aLngCfg.GetProperty( UPN_HYPH_MIN_WORD_LENGTH ) >>= nVal;
nUserData = OptionsUserData( EID_NUM_MIN_WORDLEN, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
@@ -1543,7 +1542,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
pHyp = &( (const SfxHyphenRegionItem &) rSet.Get( nWhich ) );
pEntry = CreateEntry( sNumPreBreak, CBCOL_SECOND );
- aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_LEADING) ) >>= nVal;
+ aLngCfg.GetProperty( UPN_HYPH_MIN_LEADING ) >>= nVal;
if (pHyp)
nVal = (sal_Int16) pHyp->GetMinLead();
nUserData = OptionsUserData( EID_NUM_PRE_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData();
@@ -1551,7 +1550,7 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
pModel->Insert( pEntry );
pEntry = CreateEntry( sNumPostBreak, CBCOL_SECOND );
- aLngCfg.GetProperty( C2U(UPN_HYPH_MIN_TRAILING) ) >>= nVal;
+ aLngCfg.GetProperty( UPN_HYPH_MIN_TRAILING ) >>= nVal;
if (pHyp)
nVal = (sal_Int16) pHyp->GetMinTrail();
nUserData = OptionsUserData( EID_NUM_POST_BREAK, sal_True, (sal_uInt16)nVal, sal_False, sal_False).GetUserData();
@@ -1559,14 +1558,14 @@ void SvxLinguTabPage::Reset( const SfxItemSet& rSet )
pModel->Insert( pEntry );
pEntry = CreateEntry( sHyphAuto, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_HYPH_AUTO) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_HYPH_AUTO ) >>= bVal;
nUserData = OptionsUserData( EID_HYPH_AUTO, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
lcl_SetCheckButton( pEntry, bVal );
pEntry = CreateEntry( sHyphSpecial, CBCOL_FIRST );
- aLngCfg.GetProperty( C2U(UPN_IS_HYPH_SPECIAL) ) >>= bVal;
+ aLngCfg.GetProperty( UPN_IS_HYPH_SPECIAL ) >>= bVal;
nUserData = OptionsUserData( EID_HYPH_SPECIAL, sal_False, 0, sal_True, bVal).GetUserData();
pEntry->SetUserData( (void *)nUserData );
pModel->Insert( pEntry );
@@ -2009,7 +2008,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData)
if (xAvail.is())
{
aAvailLang = lcl_LocaleSeqToLangSeq(
- xAvail->getAvailableLocales( C2U(cSpell) ) );
+ xAvail->getAvailableLocales( cSpell ) );
}
const Sequence< Locale >& rLoc = rLinguData.GetAllSupportedLocales();
const Locale* pLocales = rLoc.getConstArray();
@@ -2125,10 +2124,10 @@ OUString lcl_GetServiceName(sal_uInt8 nType)
{
switch(nType)
{
- case TYPE_SPELL : return C2U(cSpell);
- case TYPE_GRAMMAR : return C2U(cGrammar);
- case TYPE_HYPH : return C2U(cHyph);
- case TYPE_THES : return C2U(cThes);
+ case TYPE_SPELL : return OUString(cSpell);
+ case TYPE_GRAMMAR : return OUString(cGrammar);
+ case TYPE_HYPH : return OUString(cHyph);
+ case TYPE_THES : return OUString(cThes);
}
return OUString();
}
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 68f5312b8ed4..f8a5b0192db9 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -52,9 +52,7 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
using namespace com::sun::star::container;
using namespace comphelper;
-using rtl::OUString;
-#define C2U(cChar) OUString::createFromAscii(cChar)
#define C2S(cChar) String( RTL_CONSTASCII_USTRINGPARAM(cChar) )
#define CFG_PAGE_AND_GROUP C2S("General"), C2S("LoadSave")
// !! you have to update these index, if you changed the list of the child windows !!
@@ -415,7 +413,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
{
Reference< XMultiServiceFactory > xMSF = comphelper::getProcessServiceFactory();
pImpl->xFact = Reference<XNameContainer>(
- xMSF->createInstance(C2U("com.sun.star.document.FilterFactory")), UNO_QUERY);
+ xMSF->createInstance("com.sun.star.document.FilterFactory"), UNO_QUERY);
DBG_ASSERT(pImpl->xFact.is(), "service com.sun.star.document.FilterFactory unavailable");
Reference< XContainerQuery > xQuery(pImpl->xFact, UNO_QUERY);
@@ -425,21 +423,21 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
{
long nData = (long) aDocTypeLB.GetEntryData(n);
OUString sCommand;
- sCommand = C2U("matchByDocumentService=%1:iflags=");
+ sCommand = "matchByDocumentService=%1:iflags=";
sCommand += String::CreateFromInt32(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT);
- sCommand += C2U(":eflags=");
+ sCommand += ":eflags=";
sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG);
- sCommand += C2U(":default_first");
+ sCommand += ":default_first";
String sReplace;
switch(nData)
{
- case APP_WRITER : sReplace = C2U("com.sun.star.text.TextDocument"); break;
- case APP_WRITER_WEB : sReplace = C2U("com.sun.star.text.WebDocument"); break;
- case APP_WRITER_GLOBAL : sReplace = C2U("com.sun.star.text.GlobalDocument"); break;
- case APP_CALC : sReplace = C2U("com.sun.star.sheet.SpreadsheetDocument");break;
- case APP_IMPRESS : sReplace = C2U("com.sun.star.presentation.PresentationDocument");break;
- case APP_DRAW : sReplace = C2U("com.sun.star.drawing.DrawingDocument");break;
- case APP_MATH : sReplace = C2U("com.sun.star.formula.FormulaProperties");break;
+ case APP_WRITER : sReplace = "com.sun.star.text.TextDocument"; break;
+ case APP_WRITER_WEB : sReplace = "com.sun.star.text.WebDocument"; break;
+ case APP_WRITER_GLOBAL : sReplace = "com.sun.star.text.GlobalDocument"; break;
+ case APP_CALC : sReplace = "com.sun.star.sheet.SpreadsheetDocument";break;
+ case APP_IMPRESS : sReplace = "com.sun.star.presentation.PresentationDocument";break;
+ case APP_DRAW : sReplace = "com.sun.star.drawing.DrawingDocument";break;
+ case APP_MATH : sReplace = "com.sun.star.formula.FormulaProperties";break;
default: OSL_FAIL("illegal user data");
}
String sTmp(sCommand);
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 6450e5cb47bd..0e81360bc4f5 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -46,10 +46,6 @@ namespace lang = ::com::sun::star::lang;
namespace uno = ::com::sun::star::uno;
namespace util = ::com::sun::star::util;
-// define ----------------------------------------------------------------
-
-#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
// class SvxOnlineUpdateTabPage --------------------------------------------------
SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage( Window* pParent, const SfxItemSet& rSet ) :
@@ -77,11 +73,11 @@ SvxOnlineUpdateTabPage::SvxOnlineUpdateTabPage( Window* pParent, const SfxItemSe
uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
m_xUpdateAccess = uno::Reference < container::XNameReplace >(
- xFactory->createInstance( UNISTRING( "com.sun.star.setup.UpdateCheckConfig" ) ),
+ xFactory->createInstance( "com.sun.star.setup.UpdateCheckConfig" ),
uno::UNO_QUERY_THROW );
sal_Bool bDownloadSupported = sal_False;
- m_xUpdateAccess->getByName( UNISTRING( "DownloadSupported") ) >>= bDownloadSupported;
+ m_xUpdateAccess->getByName( "DownloadSupported" ) >>= bDownloadSupported;
WinBits nStyle = m_aDestPath.GetStyle();
nStyle |= WB_PATHELLIPSIS;
@@ -114,7 +110,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
rtl::OUString aText;
sal_Int64 lastChecked = 0;
- m_xUpdateAccess->getByName( UNISTRING( "LastCheck") ) >>= lastChecked;
+ m_xUpdateAccess->getByName("LastCheck") >>= lastChecked;
if( lastChecked == 0 ) // never checked
{
@@ -155,11 +151,11 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText()
delete pNumberFormatter;
aText = m_aLastCheckedTemplate;
- sal_Int32 nIndex = aText.indexOf( UNISTRING( "%DATE%" ) );
+ sal_Int32 nIndex = aText.indexOf( "%DATE%" );
if ( nIndex != -1 )
aText = aText.replaceAt( nIndex, 6, aDateStr );
- nIndex = aText.indexOf( UNISTRING( "%TIME%" ) );
+ nIndex = aText.indexOf( "%TIME%" );
if ( nIndex != -1 )
aText = aText.replaceAt( nIndex, 6, aTimeStr );
}
@@ -188,7 +184,7 @@ sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& )
if( m_aAutoCheckCheckBox.GetSavedValue() != m_aAutoCheckCheckBox.IsChecked() )
{
bValue = (sal_True == m_aAutoCheckCheckBox.IsChecked());
- m_xUpdateAccess->replaceByName( UNISTRING("AutoCheckEnabled"), uno::makeAny( bValue ) );
+ m_xUpdateAccess->replaceByName( "AutoCheckEnabled", uno::makeAny( bValue ) );
bModified = sal_True;
}
@@ -211,24 +207,24 @@ sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& )
if( nValue > 0 )
{
- m_xUpdateAccess->replaceByName( UNISTRING("CheckInterval"), uno::makeAny( nValue ) );
+ m_xUpdateAccess->replaceByName( "CheckInterval", uno::makeAny( nValue ) );
bModified = sal_True;
}
if( m_aAutoDownloadCheckBox.GetSavedValue() != m_aAutoDownloadCheckBox.IsChecked() )
{
bValue = (sal_True == m_aAutoDownloadCheckBox.IsChecked());
- m_xUpdateAccess->replaceByName( UNISTRING("AutoDownloadEnabled"), uno::makeAny( bValue ) );
+ m_xUpdateAccess->replaceByName( "AutoDownloadEnabled", uno::makeAny( bValue ) );
bModified = sal_True;
}
rtl::OUString sValue, aURL;
- m_xUpdateAccess->getByName( UNISTRING("DownloadDestination") ) >>= sValue;
+ m_xUpdateAccess->getByName( "DownloadDestination" ) >>= sValue;
if( ( osl::FileBase::E_None == osl::FileBase::getFileURLFromSystemPath(m_aDestPath.GetText(), aURL) ) &&
( ! aURL.equals( sValue ) ) )
{
- m_xUpdateAccess->replaceByName( UNISTRING("DownloadDestination"), uno::makeAny( aURL ) );
+ m_xUpdateAccess->replaceByName( "DownloadDestination", uno::makeAny( aURL ) );
bModified = sal_True;
}
@@ -244,7 +240,7 @@ sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& )
void SvxOnlineUpdateTabPage::Reset( const SfxItemSet& )
{
sal_Bool bValue = sal_Bool();
- m_xUpdateAccess->getByName( UNISTRING("AutoCheckEnabled") ) >>= bValue;
+ m_xUpdateAccess->getByName( "AutoCheckEnabled" ) >>= bValue;
m_aAutoCheckCheckBox.Check(bValue);
m_aEveryDayButton.Enable(bValue);
@@ -252,7 +248,7 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet& )
m_aEveryMonthButton.Enable(bValue);
sal_Int64 nValue = 0;
- m_xUpdateAccess->getByName( UNISTRING("CheckInterval") ) >>= nValue;
+ m_xUpdateAccess->getByName( "CheckInterval" ) >>= nValue;
if( nValue == 86400 )
m_aEveryDayButton.Check();
@@ -266,14 +262,14 @@ void SvxOnlineUpdateTabPage::Reset( const SfxItemSet& )
m_aEveryWeekButton.SaveValue();
m_aEveryMonthButton.SaveValue();
- m_xUpdateAccess->getByName( UNISTRING("AutoDownloadEnabled") ) >>= bValue;
+ m_xUpdateAccess->getByName( "AutoDownloadEnabled" ) >>= bValue;
m_aAutoDownloadCheckBox.Check(bValue);
m_aDestPathLabel.Enable(sal_True);
m_aDestPath.Enable(sal_True);
m_aChangePathButton.Enable(sal_True);
rtl::OUString sValue, aPath;
- m_xUpdateAccess->getByName( UNISTRING("DownloadDestination") ) >>= sValue;
+ m_xUpdateAccess->getByName( "DownloadDestination" ) >>= sValue;
if( osl::FileBase::E_None == osl::FileBase::getSystemPathFromFileURL(sValue, aPath) )
m_aDestPath.SetText(aPath);
@@ -339,19 +335,19 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl)
comphelper::getProcessComponentContext() ) );
beans::NamedValue aProperty;
- aProperty.Name = UNISTRING( "nodepath" );
- aProperty.Value = uno::makeAny( UNISTRING("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") );
+ aProperty.Name = "nodepath";
+ aProperty.Value = uno::makeAny( OUString("org.openoffice.Office.Addons/AddonUI/OfficeHelp/UpdateCheckJob") );
uno::Sequence< uno::Any > aArgumentList( 1 );
aArgumentList[0] = uno::makeAny( aProperty );
uno::Reference< container::XNameAccess > xNameAccess(
xConfigProvider->createInstanceWithArguments(
- UNISTRING("com.sun.star.configuration.ConfigurationAccess"), aArgumentList ),
+ "com.sun.star.configuration.ConfigurationAccess", aArgumentList ),
uno::UNO_QUERY_THROW );
util::URL aURL;
- xNameAccess->getByName(UNISTRING("URL")) >>= aURL.Complete;
+ xNameAccess->getByName("URL") >>= aURL.Complete;
uno::Reference < util::XURLTransformer > xTransformer(
util::URLTransformer::create( comphelper::getProcessComponentContext() ) );
@@ -359,7 +355,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, CheckNowHdl_Impl)
xTransformer->parseStrict(aURL);
uno::Reference < frame::XDesktop > xDesktop(
- xFactory->createInstance( UNISTRING( "com.sun.star.frame.Desktop" ) ),
+ xFactory->createInstance( "com.sun.star.frame.Desktop" ),
uno::UNO_QUERY_THROW );
uno::Reference< frame::XDispatchProvider > xDispatchProvider(
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index d17ca4b3241a..0403d1a31199 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -109,12 +109,6 @@ using namespace ::com::sun::star::linguistic2;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
-#ifdef C2U
- #error "Who define C2U before! I use it to create const ascii strings ..."
-#else
- #define C2U(cChar) rtl::OUString( cChar )
-#endif
-
#define EXPAND_PROTOCOL "vnd.sun.star.expand:"
LastPageSaver* OfaTreeOptionsDialog::pLastPageSaver = NULL;
@@ -203,19 +197,19 @@ static String getGroupName( const rtl::OUString& rModule, bool bForced )
if ( !pPageRes )
pPageRes = new OfaPageResource;
- if ( rModule == C2U("Writer") )
+ if ( rModule == "Writer" )
sGroupName = pPageRes->GetTextArray().GetString(0);
- else if ( rModule == C2U("WriterWeb") )
+ else if ( rModule == "WriterWeb" )
sGroupName = pPageRes->GetHTMLArray().GetString(0);
- else if ( rModule == C2U("Calc") )
+ else if ( rModule == "Calc" )
sGroupName = pPageRes->GetCalcArray().GetString(0);
- else if ( rModule == C2U("Impress") )
+ else if ( rModule == "Impress" )
sGroupName = pPageRes->GetImpressArray().GetString(0);
- else if ( rModule == C2U("Draw") )
+ else if ( rModule == "Draw" )
sGroupName = pPageRes->GetDrawArray().GetString(0);
- else if ( rModule == C2U("Math") )
+ else if ( rModule == "Math" )
sGroupName = pPageRes->GetStarMathArray().GetString(0);
- else if ( rModule == C2U("Base") )
+ else if ( rModule == "Base" )
sGroupName = pPageRes->GetDatasourcesArray().GetString(0);
}
return sGroupName;
@@ -264,11 +258,11 @@ public:
};
MailMergeCfg_Impl::MailMergeCfg_Impl() :
- utl::ConfigItem(C2U("Office.Writer/MailMergeWizard")),
+ utl::ConfigItem("Office.Writer/MailMergeWizard"),
bIsEmailSupported(sal_False)
{
Sequence<rtl::OUString> aNames(1);
- aNames.getArray()[0] = C2U("EMailSupported");
+ aNames.getArray()[0] = "EMailSupported";
const Sequence< Any > aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
if(aValues.getLength() && pValues[0].hasValue())
@@ -1083,7 +1077,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
m_xContainerWinProvider = Reference < awt::XContainerWindowProvider >(
xFactory->createInstance(
- C2U("com.sun.star.awt.ContainerWindowProvider") ), UNO_QUERY );
+ "com.sun.star.awt.ContainerWindowProvider" ), UNO_QUERY );
DBG_ASSERT( m_xContainerWinProvider.is(), "service com.sun.star.awt.ContainerWindowProvider could not be loaded" );
}
@@ -1520,7 +1514,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_GENERAL_OPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rGeneralArray = aDlgResource.GetGeneralArray();
- setGroupName( C2U("ProductName"), rGeneralArray.GetString(0) );
+ setGroupName( "ProductName", rGeneralArray.GetString(0) );
nGroup = AddGroup( rGeneralArray.GetString(0), 0, 0, SID_GENERAL_OPTIONS );
sal_uInt16 nEnd = static_cast< sal_uInt16 >( rGeneralArray.Count() );
String sPageTitle;
@@ -1535,7 +1529,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
// Disable Online Update page if service not installed
if( RID_SVXPAGE_ONLINEUPDATE == nPageId )
{
- const ::rtl::OUString sService = C2U("com.sun.star.setup.UpdateCheck");
+ const ::rtl::OUString sService = "com.sun.star.setup.UpdateCheck";
try
{
@@ -1558,7 +1552,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_FILTER_DLG, aOptionsDlgOpt ) )
{
ResStringArray& rFilterArray = aDlgResource.GetFilterArray();
- setGroupName( C2U("LoadSave"), rFilterArray.GetString(0) );
+ setGroupName( "LoadSave", rFilterArray.GetString(0) );
nGroup = AddGroup( rFilterArray.GetString(0), 0, 0, SID_FILTER_DLG );
for ( i = 1; i < rFilterArray.Count(); ++i )
{
@@ -1573,7 +1567,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_LANGUAGE_OPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rLangArray = aDlgResource.GetLangArray();
- setGroupName( C2U("LanguageSettings"), rLangArray.GetString(0) );
+ setGroupName( "LanguageSettings", rLangArray.GetString(0) );
nGroup = AddGroup( rLangArray.GetString(0), 0, 0, SID_LANGUAGE_OPTIONS );
for ( i = 1; i < rLangArray.Count(); ++i )
{
@@ -1606,9 +1600,9 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) )
{
if ( aFactory == "com.sun.star.text.WebDocument" )
- setGroupName( C2U("WriterWeb"), rTextArray.GetString(0) );
+ setGroupName( "WriterWeb", rTextArray.GetString(0) );
else
- setGroupName( C2U("Writer"), rTextArray.GetString(0) );
+ setGroupName( "Writer", rTextArray.GetString(0) );
nGroup = AddGroup(rTextArray.GetString(0), pSwMod, pSwMod, SID_SW_EDITOPTIONS );
for ( i = 1; i < rTextArray.Count(); ++i )
{
@@ -1652,7 +1646,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
ResStringArray& rCalcArray = aDlgResource.GetCalcArray();
SfxModule* pScMod = ( *( SfxModule** ) GetAppData( SHL_CALC ) );
- setGroupName( C2U("Calc"), rCalcArray.GetString(0) );
+ setGroupName( "Calc", rCalcArray.GetString(0) );
nGroup = AddGroup( rCalcArray.GetString( 0 ), pScMod, pScMod, SID_SC_EDITOPTIONS );
const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rCalcArray.Count() );
for ( i = 1; i < nCount; ++i )
@@ -1678,7 +1672,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SD_EDITOPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rImpressArray = aDlgResource.GetImpressArray();
- setGroupName( C2U("Impress"), rImpressArray.GetString(0) );
+ setGroupName( "Impress", rImpressArray.GetString(0) );
nGroup = AddGroup( rImpressArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_EDITOPTIONS );
const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled();
const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rImpressArray.Count() );
@@ -1702,7 +1696,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SD_GRAPHIC_OPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rDrawArray = aDlgResource.GetDrawArray();
- setGroupName( C2U("Draw"), rDrawArray.GetString(0) );
+ setGroupName( "Draw", rDrawArray.GetString(0) );
nGroup = AddGroup( rDrawArray.GetString( 0 ), pSdMod, pSdMod, SID_SD_GRAPHIC_OPTIONS );
const sal_Bool bCTL = aLanguageOptions.IsCTLFontEnabled();
const sal_uInt16 nCount = static_cast< const sal_uInt16 >( rDrawArray.Count() );
@@ -1727,7 +1721,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
ResStringArray& rStarMathArray = aDlgResource.GetStarMathArray();
SfxModule* pSmMod = (*(SfxModule**) GetAppData(SHL_SM));
- setGroupName( C2U("Math"), rStarMathArray.GetString(0) );
+ setGroupName( "Math", rStarMathArray.GetString(0) );
nGroup = AddGroup(rStarMathArray.GetString(0), pSmMod, pSmMod, SID_SM_EDITOPTIONS );
for ( i = 1; i < rStarMathArray.Count(); ++i )
{
@@ -1747,7 +1741,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
) )
{
ResStringArray& rDSArray = aDlgResource.GetDatasourcesArray();
- setGroupName( C2U("Base"), rDSArray.GetString(0) );
+ setGroupName( "Base", rDSArray.GetString(0) );
nGroup = AddGroup( rDSArray.GetString(0), 0, NULL, SID_SB_STARBASEOPTIONS );
for ( i = 1; i < rDSArray.Count(); ++i )
{
@@ -1761,7 +1755,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_SCH_EDITOPTIONS, aOptionsDlgOpt ) )
{
ResStringArray& rChartArray = aDlgResource.GetChartArray();
- setGroupName( C2U("Charts"), rChartArray.GetString(0) );
+ setGroupName( "Charts", rChartArray.GetString(0) );
nGroup = AddGroup( rChartArray.GetString(0), 0, 0, SID_SCH_EDITOPTIONS );
for ( i = 1; i < rChartArray.Count(); ++i )
{
@@ -1775,7 +1769,7 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
if ( !lcl_isOptionHidden( SID_INET_DLG, aOptionsDlgOpt ) )
{
ResStringArray& rInetArray = aDlgResource.GetInetArray();
- setGroupName( C2U("Internet"), rInetArray.GetString(0) );
+ setGroupName( "Internet", rInetArray.GetString(0) );
nGroup = AddGroup(rInetArray.GetString(0), 0, 0, SID_INET_DLG );
for ( i = 1; i < rInetArray.Count(); ++i )
@@ -1937,7 +1931,7 @@ rtl::OUString OfaTreeOptionsDialog::GetModuleIdentifier(
if ( !xCurrentFrame.is() )
{
Reference < XDesktop > xDesktop( xMFac->createInstance(
- C2U("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ "com.sun.star.frame.Desktop" ), UNO_QUERY );
if ( xDesktop.is() )
xCurrentFrame = xDesktop->getCurrentFrame();
}
@@ -1983,7 +1977,7 @@ Module* OfaTreeOptionsDialog::LoadModule(
{
// load the nodes of this module
Reference< XNameAccess > xNodeAccess;
- xModAccess->getByName( C2U("Nodes") ) >>= xNodeAccess;
+ xModAccess->getByName( "Nodes" ) >>= xNodeAccess;
if ( xNodeAccess.is() )
{
Sequence< rtl::OUString > xTemp = xNodeAccess->getElementNames();
@@ -1994,7 +1988,7 @@ Module* OfaTreeOptionsDialog::LoadModule(
xNodeAccess->getByName( xTemp[x] ) >>= xAccess;
if ( xAccess.is() )
{
- xAccess->getByName( C2U("Index") ) >>= nIndex;
+ xAccess->getByName( "Index" ) >>= nIndex;
if ( nIndex < 0 )
// append nodes with index < 0
pModule->m_aNodeList.push_back(
@@ -2046,11 +2040,11 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
sal_Int32 nGroupIndex = 0;
sNodeId = seqNames[i];
- xNodeAccess->getByName( C2U("Label") ) >>= sLabel;
- xNodeAccess->getByName( C2U("OptionsPage") ) >>= sPageURL;
- xNodeAccess->getByName( C2U("AllModules") ) >>= bAllModules;
- xNodeAccess->getByName( C2U("GroupId") ) >>= sGroupId;
- xNodeAccess->getByName( C2U("GroupIndex") ) >>= nGroupIndex;
+ xNodeAccess->getByName( "Label" ) >>= sLabel;
+ xNodeAccess->getByName( "OptionsPage" ) >>= sPageURL;
+ xNodeAccess->getByName( "AllModules" ) >>= bAllModules;
+ xNodeAccess->getByName( "GroupId" ) >>= sGroupId;
+ xNodeAccess->getByName( "GroupIndex" ) >>= nGroupIndex;
if ( sLabel.isEmpty() )
sLabel = sGroupName;
@@ -2067,7 +2061,7 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
}
Reference< XNameAccess > xLeavesSet;
- xNodeAccess->getByName( C2U( "Leaves" ) ) >>= xLeavesSet;
+ xNodeAccess->getByName( "Leaves" ) >>= xLeavesSet;
if ( xLeavesSet.is() )
{
Sequence< rtl::OUString > seqLeaves = xLeavesSet->getElementNames();
@@ -2081,12 +2075,12 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
rtl::OUString sId, sLeafLabel, sEventHdl, sLeafURL, sLeafGrpId;
sal_Int32 nLeafGrpIdx = 0;
- xLeaveAccess->getByName( C2U("Id") ) >>= sId;
- xLeaveAccess->getByName( C2U("Label") ) >>= sLeafLabel;
- xLeaveAccess->getByName( C2U("OptionsPage") ) >>= sLeafURL;
- xLeaveAccess->getByName( C2U("EventHandlerService") ) >>= sEventHdl;
- xLeaveAccess->getByName( C2U("GroupId") ) >>= sLeafGrpId;
- xLeaveAccess->getByName( C2U("GroupIndex") ) >>= nLeafGrpIdx;
+ xLeaveAccess->getByName( "Id" ) >>= sId;
+ xLeaveAccess->getByName( "Label" ) >>= sLeafLabel;
+ xLeaveAccess->getByName( "OptionsPage" ) >>= sLeafURL;
+ xLeaveAccess->getByName( "EventHandlerService" ) >>= sEventHdl;
+ xLeaveAccess->getByName( "GroupId" ) >>= sLeafGrpId;
+ xLeaveAccess->getByName( "GroupIndex" ) >>= nLeafGrpIdx;
if ( rExtensionId.isEmpty() || sId == rExtensionId )
{
@@ -2340,7 +2334,7 @@ sal_Bool ExtensionsTabPage::DispatchAction( const rtl::OUString& rAction )
{
try
{
- bRet = m_xEventHdl->callHandlerMethod( m_xPage, makeAny( rAction ), C2U("external_event") );
+ bRet = m_xEventHdl->callHandlerMethod( m_xPage, makeAny( rAction ), "external_event" );
}
catch ( Exception& )
{
@@ -2367,7 +2361,7 @@ void ExtensionsTabPage::ActivatePage()
m_xPage->setPosSize( aPos.X() + 1, aPos.Y() + 1,
aSize.Width() - 2, aSize.Height() - 2, awt::PosSize::POSSIZE );
if ( !m_sEventHdl.isEmpty() )
- DispatchAction( C2U("initialize") );
+ DispatchAction( "initialize" );
}
}
@@ -2392,7 +2386,7 @@ void ExtensionsTabPage::DeactivatePage()
void ExtensionsTabPage::ResetPage()
{
- DispatchAction( C2U("back") );
+ DispatchAction( "back" );
ActivatePage();
}
@@ -2400,7 +2394,7 @@ void ExtensionsTabPage::ResetPage()
void ExtensionsTabPage::SavePage()
{
- DispatchAction( C2U("ok") );
+ DispatchAction( "ok" );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */