summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx16
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx15
-rw-r--r--cui/source/dialogs/cuihyperdlg.cxx2
-rw-r--r--cui/source/dialogs/iconcdlg.cxx8
-rw-r--r--cui/source/dialogs/insdlg.cxx84
-rw-r--r--cui/source/dialogs/scriptdlg.cxx248
-rw-r--r--cui/source/dialogs/thesdlg.cxx5
-rw-r--r--cui/source/inc/scriptdlg.hxx2
-rw-r--r--cui/source/options/cfgchart.cxx35
-rw-r--r--cui/source/options/cfgchart.hxx4
-rw-r--r--cui/source/options/connpooloptions.cxx4
-rw-r--r--cui/source/options/dbregister.cxx5
-rw-r--r--cui/source/options/fontsubs.cxx12
-rw-r--r--cui/source/options/optcolor.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx54
-rw-r--r--cui/source/options/optinet2.cxx18
-rw-r--r--cui/source/options/optpath.cxx3
-rw-r--r--cui/source/options/optsave.cxx15
-rw-r--r--cui/source/options/treeopt.cxx4
19 files changed, 252 insertions, 284 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 9d0fc46d0ab0..500f412bd5df 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -78,7 +78,7 @@ void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor )
}
// some initial record texts
- m_ftRecord.SetText( String::CreateFromInt32( _rxCursor->getRow() ) );
+ m_ftRecord.SetText( OUString::number(_rxCursor->getRow()) );
m_pbClose.SetHelpText(String());
}
@@ -474,7 +474,7 @@ IMPL_LINK(FmSearchDialog, OnCheckBoxToggled, CheckBox*, pBox)
// direction -> pass on and reset the checkbox-text for StartOver
else if (pBox == &m_cbBackwards)
{
- m_cbStartOver.SetText( String( CUI_RES( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) );
+ m_cbStartOver.SetText( OUString( CUI_RES( bChecked ? RID_STR_FROM_BOTTOM : RID_STR_FROM_TOP ) ) );
m_pSearchEngine->SetDirection(!bChecked);
}
// similarity-search or regular expression
@@ -590,7 +590,7 @@ void FmSearchDialog::InitContext(sal_Int16 nContext)
m_pSearchEngine->SwitchToContext(fmscContext.xCursor, fmscContext.strUsedFields, fmscContext.arrFields,
m_rbAllFields.IsChecked() ? -1 : 0);
- m_ftRecord.SetText(String::CreateFromInt32(fmscContext.xCursor->getRow()));
+ m_ftRecord.SetText(OUString::number(fmscContext.xCursor->getRow()));
}
//------------------------------------------------------------------------
@@ -626,7 +626,7 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable)
}
// the search button has two functions -> adjust its text accordingly
- String sButtonText( bEnable ? m_sSearch : m_sCancel );
+ OUString sButtonText( bEnable ? m_sSearch : m_sCancel );
m_pbSearchAgain.SetText( sButtonText );
if (m_pSearchEngine->GetSearchMode() != SM_BRUTE)
@@ -760,12 +760,12 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress)
case FmSearchProgress::STATE_PROGRESS:
if (pProgress->bOverflow)
{
- String sHint( CUI_RES( m_cbBackwards.IsChecked() ? RID_STR_OVERFLOW_BACKWARD : RID_STR_OVERFLOW_FORWARD ) );
+ OUString sHint( CUI_RES( m_cbBackwards.IsChecked() ? RID_STR_OVERFLOW_BACKWARD : RID_STR_OVERFLOW_FORWARD ) );
m_ftHint.SetText( sHint );
m_ftHint.Invalidate();
}
- m_ftRecord.SetText(String::CreateFromInt32(1 + pProgress->nCurrentRecord));
+ m_ftRecord.SetText(OUString::number(1 + pProgress->nCurrentRecord));
m_ftRecord.Invalidate();
break;
@@ -773,7 +773,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress)
m_ftHint.SetText(CUI_RESSTR(RID_STR_SEARCH_COUNTING));
m_ftHint.Invalidate();
- m_ftRecord.SetText(String::CreateFromInt32(pProgress->nCurrentRecord));
+ m_ftRecord.SetText(OUString::number(pProgress->nCurrentRecord));
m_ftRecord.Invalidate();
break;
@@ -804,7 +804,7 @@ IMPL_LINK(FmSearchDialog, OnSearchProgress, FmSearchProgress*, pProgress)
break;
}
- m_ftRecord.SetText(String::CreateFromInt32(1 + pProgress->nCurrentRecord));
+ m_ftRecord.SetText(OUString::number(1 + pProgress->nCurrentRecord));
return 0L;
}
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index d443b5e2c3b1..a683467eef6f 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -669,10 +669,10 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
pData = _pData;
GalleryTheme* pThm = pData->pTheme;
- String aOutStr( String::CreateFromInt32( pThm->GetObjectCount() ) );
+ OUString aOutStr( OUString::number(pThm->GetObjectCount()) );
String aObjStr( CUI_RES( RID_SVXSTR_GALLERYPROPS_OBJECT ) );
- String aAccess;
- String aType( SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) );
+ OUString aAccess;
+ OUString aType( SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) );
sal_Bool bReadOnly = pThm->IsReadOnly();
aEdtMSName.SetHelpId( HID_GALLERY_EDIT_MSNAME );
@@ -685,7 +685,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
aEdtMSName.Enable();
if( pThm->IsReadOnly() )
- aType += String( CUI_RES( RID_SVXSTR_GALLERY_READONLY ) );
+ aType += CUI_RES( RID_SVXSTR_GALLERY_READONLY );
aFtMSShowType.SetText( aType );
aFtMSShowPath.SetText( pThm->GetSdgURL().GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) );
@@ -696,8 +696,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
else
aObjStr = aObjStr.GetToken( 1 );
- aOutStr += ' ';
- aOutStr += aObjStr;
+ aOutStr += " " + aObjStr;
aFtMSShowContent.SetText( aOutStr );
@@ -706,9 +705,7 @@ void TPGalleryThemeGeneral::SetXChgData( ExchangeData* _pData )
const LocaleDataWrapper& aLocaleData = aSysLocale.GetLocaleData();
// ChangeDate/Time
- aAccess = aLocaleData.getDate( pData->aThemeChangeDate );
- aAccess += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
- aAccess += aLocaleData.getTime( pData->aThemeChangeTime );
+ aAccess = aLocaleData.getDate( pData->aThemeChangeDate ) + ", " + aLocaleData.getTime( pData->aThemeChangeTime );
aFtMSShowChangeDate.SetText( aAccess );
// set image
diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 3f3a3407884b..2911204fbbb2 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -144,7 +144,7 @@ SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
SvxHpLinkDlg::~SvxHpLinkDlg ()
{
// delete config item, so the base class (IconChoiceDialog) can not load it on the next start
- SvtViewOptions aViewOpt( E_TABDIALOG, String::CreateFromInt32( SID_HYPERLINK_DIALOG ) );
+ SvtViewOptions aViewOpt( E_TABDIALOG, OUString::number(SID_HYPERLINK_DIALOG) );
aViewOpt.Delete();
delete mpItemSet;
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 522ae5013763..8c6feb08d268 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -253,7 +253,7 @@ IconChoiceDialog ::~IconChoiceDialog ()
{
// save configuration at INI-Manager
// and remove pages
- SvtViewOptions aTabDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
+ SvtViewOptions aTabDlgOpt( E_TABDIALOG, OUString::number(nResId) );
aTabDlgOpt.SetWindowState(::rtl::OStringToOUString(GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)), RTL_TEXTENCODING_ASCII_US));
aTabDlgOpt.SetPageID( mnCurrentPageId );
@@ -267,7 +267,7 @@ IconChoiceDialog ::~IconChoiceDialog ()
String aPageData(pData->pPage->GetUserData());
if ( aPageData.Len() )
{
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pData->nId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number(pData->nId) );
SetViewOptUserItem( aTabPageOpt, aPageData );
}
@@ -736,7 +736,7 @@ void IconChoiceDialog::ActivatePageImpl ()
else
pData->pPage = (pData->fnCreatePage)( this, *CreateInputItemSet( mnCurrentPageId ) );
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pData->nId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number(pData->nId) );
pData->pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) );
SetPosSizePages ( pData->nId );
@@ -998,7 +998,7 @@ void IconChoiceDialog::Start_Impl()
nActPage = mnCurrentPageId;
// configuration existing?
- SvtViewOptions aTabDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
+ SvtViewOptions aTabDlgOpt( E_TABDIALOG, OUString::number(nResId) );
if ( aTabDlgOpt.Exists() )
{
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 54495d50e50a..a0be598a5f43 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -65,7 +65,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::ui::dialogs;
-using ::rtl::OUString;
static String impl_getSvtResString( sal_uInt32 nId )
@@ -86,7 +85,7 @@ sal_Bool InsertObjectDialog_Impl::IsCreateNew() const
return sal_False;
}
-uno::Reference< io::XInputStream > InsertObjectDialog_Impl::GetIconIfIconified( ::rtl::OUString* /*pGraphicMediaType*/ )
+uno::Reference< io::XInputStream > InsertObjectDialog_Impl::GetIconIfIconified( OUString* /*pGraphicMediaType*/ )
{
return uno::Reference< io::XInputStream >();
}
@@ -116,7 +115,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl)
Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
- Reference< XFilePicker > xFilePicker( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ) ), UNO_QUERY );
+ Reference< XFilePicker > xFilePicker( xFactory->createInstance( "com.sun.star.ui.dialogs.FilePicker" ), UNO_QUERY );
DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" );
Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
@@ -132,7 +131,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl)
{
xFilterMgr->appendFilter(
OUString(),
- OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) )
+ OUString( "*.*" )
);
}
catch( IllegalArgumentException& )
@@ -222,7 +221,7 @@ short SvInsertOleDlg::Execute()
rBox.InsertEntry( (*m_pServers)[i].GetHumanName() );
rBox.SetUpdateMode( sal_True );
SelectDefault();
- ::rtl::OUString aName;
+ OUString aName;
DBG_ASSERT( m_xStorage.is(), "No storage!");
if ( m_xStorage.is() && ( nRet = Dialog::Execute() ) == RET_OK )
@@ -243,7 +242,7 @@ short SvInsertOleDlg::Execute()
{
uno::Reference < embed::XInsertObjectDialog > xDialogCreator(
::comphelper::getProcessServiceFactory()->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.MSOLEObjectSystemCreator")) ),
+ "com.sun.star.embed.MSOLEObjectSystemCreator" ),
uno::UNO_QUERY );
if ( xDialogCreator.is() )
@@ -319,14 +318,14 @@ short SvInsertOleDlg::Execute()
{
// create MediaDescriptor for file to create object from
uno::Sequence < beans::PropertyValue > aMedium( 2 );
- aMedium[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) );
- aMedium[0].Value <<= ::rtl::OUString( aFileName );
+ aMedium[0].Name = "URL";
+ aMedium[0].Value <<= OUString( aFileName );
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< task::XInteractionHandler2 > xInteraction(
task::InteractionHandler::createWithParent(xContext, 0) );
- aMedium[1].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ) );
+ aMedium[1].Name = "InteractionHandler";
aMedium[1].Value <<= xInteraction;
// create object from media descriptor
@@ -351,7 +350,7 @@ short SvInsertOleDlg::Execute()
return nRet;
}
-uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( ::rtl::OUString* pGraphicMediaType )
+uno::Reference< io::XInputStream > SvInsertOleDlg::GetIconIfIconified( OUString* pGraphicMediaType )
{
if ( m_aIconMetaFile.getLength() )
{
@@ -373,7 +372,7 @@ IMPL_LINK_NOARG(SvInsertPlugInDialog, BrowseHdl)
Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
if( xFactory.is() )
{
- Reference< XFilePicker > xFilePicker( xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ) ), UNO_QUERY );
+ Reference< XFilePicker > xFilePicker( xFactory->createInstance( "com.sun.star.ui.dialogs.FilePicker" ), UNO_QUERY );
DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" );
Reference< XInitialization > xInit( xFilePicker, UNO_QUERY );
@@ -466,7 +465,7 @@ short SvInsertPlugInDialog::Execute()
if ( !aURL.Len() || m_pURL->SetSmartURL( aURL ) )
{
// create a plugin object
- ::rtl::OUString aName;
+ OUString aName;
SvGlobalName aClassId( SO3_PLUGIN_CLASSID );
m_xObj = aCnt.CreateEmbeddedObject( aClassId.GetByteSequence(), aName );
}
@@ -480,11 +479,11 @@ short SvInsertPlugInDialog::Execute()
uno::Reference < beans::XPropertySet > xSet( m_xObj->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL") ),
- makeAny( ::rtl::OUString( m_pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) );
+ xSet->setPropertyValue( "PluginURL",
+ makeAny( OUString( m_pURL->GetMainURL( INetURLObject::NO_DECODE ) ) ) );
uno::Sequence< beans::PropertyValue > aCommandSequence;
Plugin_ImplFillCommandSequence( m_aCommands, aCommandSequence );
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginCommands") ), makeAny( aCommandSequence ) );
+ xSet->setPropertyValue( "PluginCommands", makeAny( aCommandSequence ) );
}
}
else
@@ -559,51 +558,51 @@ short SfxInsertFloatingFrameDialog::Execute()
if ( m_xObj->getCurrentState() == embed::EmbedStates::LOADED )
m_xObj->changeState( embed::EmbedStates::RUNNING );
xSet = uno::Reference < beans::XPropertySet >( m_xObj->getComponent(), uno::UNO_QUERY );
- ::rtl::OUString aStr;
- uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL") ) );
+ OUString aStr;
+ uno::Any aAny = xSet->getPropertyValue( "FrameURL" );
if ( aAny >>= aStr )
m_pEDURL->SetText( aStr );
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName") ) );
+ aAny = xSet->getPropertyValue( "FrameName" );
if ( aAny >>= aStr )
m_pEDName->SetText( aStr );
sal_Int32 nSize = SIZE_NOT_SET;
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth") ) );
+ aAny = xSet->getPropertyValue( "FrameMarginWidth" );
aAny >>= nSize;
if ( nSize == SIZE_NOT_SET )
{
m_pCBMarginWidthDefault->Check( sal_True );
- m_pNMMarginWidth->SetText( String::CreateFromInt32( DEFAULT_MARGIN_WIDTH ) );
+ m_pNMMarginWidth->SetText( OUString::number(DEFAULT_MARGIN_WIDTH) );
m_pFTMarginWidth->Enable( sal_False );
m_pNMMarginWidth->Enable( sal_False );
}
else
- m_pNMMarginWidth->SetText( String::CreateFromInt32( nSize ) );
+ m_pNMMarginWidth->SetText( OUString::number( nSize ) );
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight") ) );
+ aAny = xSet->getPropertyValue( "FrameMarginHeight" );
aAny >>= nSize;
if ( nSize == SIZE_NOT_SET )
{
m_pCBMarginHeightDefault->Check( sal_True );
- m_pNMMarginHeight->SetText( String::CreateFromInt32( DEFAULT_MARGIN_HEIGHT ) );
+ m_pNMMarginHeight->SetText( OUString::number(DEFAULT_MARGIN_HEIGHT) );
m_pFTMarginHeight->Enable( sal_False );
m_pNMMarginHeight->Enable( sal_False );
}
else
- m_pNMMarginHeight->SetText( String::CreateFromInt32( nSize ) );
+ m_pNMMarginHeight->SetText( OUString::number( nSize ) );
sal_Bool bScrollOn = sal_False;
sal_Bool bScrollOff = sal_False;
sal_Bool bScrollAuto = sal_False;
sal_Bool bSet = sal_False;
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll") ) );
+ aAny = xSet->getPropertyValue( "FrameIsAutoScroll" );
aAny >>= bSet;
if ( !bSet )
{
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode") ) );
+ aAny = xSet->getPropertyValue( "FrameIsScrollingMode" );
aAny >>= bSet;
bScrollOn = bSet;
bScrollOff = !bSet;
@@ -616,11 +615,11 @@ short SfxInsertFloatingFrameDialog::Execute()
m_pRBScrollingAuto->Check( bScrollAuto );
bSet = sal_False;
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoBorder") ) );
+ aAny = xSet->getPropertyValue( "FrameIsAutoBorder" );
aAny >>= bSet;
if ( !bSet )
{
- aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder") ) );
+ aAny = xSet->getPropertyValue( "FrameIsBorder" );
aAny >>= bSet;
m_pRBFrameBorderOn->Check( bSet );
m_pRBFrameBorderOff->Check( !bSet );
@@ -642,7 +641,7 @@ short SfxInsertFloatingFrameDialog::Execute()
if ( bOK && ( nRet = Dialog::Execute() ) == RET_OK )
{
- ::rtl::OUString aURL;
+ OUString aURL;
if ( !m_pEDURL->GetText().isEmpty() )
{
// URL can be a valid and absolute URL or a system file name
@@ -655,7 +654,7 @@ short SfxInsertFloatingFrameDialog::Execute()
if ( !m_xObj.is() && !aURL.isEmpty() )
{
// create the object
- ::rtl::OUString aName;
+ OUString aName;
SvGlobalName aClassId( SO3_IFRAME_CLASSID );
m_xObj = aCnt.CreateEmbeddedObject( aClassId.GetByteSequence(), aName );
if ( m_xObj->getCurrentState() == embed::EmbedStates::LOADED )
@@ -671,7 +670,7 @@ short SfxInsertFloatingFrameDialog::Execute()
if ( bIPActive )
m_xObj->changeState( embed::EmbedStates::RUNNING );
- ::rtl::OUString aName = m_pEDName->GetText();
+ OUString aName = m_pEDName->GetText();
ScrollingMode eScroll = ScrollingNo;
if ( m_pRBScrollingOn->IsChecked() )
eScroll = ScrollingYes;
@@ -694,24 +693,19 @@ short SfxInsertFloatingFrameDialog::Execute()
else
lMarginHeight = SIZE_NOT_SET;
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL") ), makeAny( aURL ) );
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName") ), makeAny( aName ) );
+ xSet->setPropertyValue( "FrameURL", makeAny( aURL ) );
+ xSet->setPropertyValue( "FrameName", makeAny( aName ) );
if ( eScroll == ScrollingAuto )
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll") ),
- makeAny( sal_True ) );
+ xSet->setPropertyValue( "FrameIsAutoScroll", makeAny( sal_True ) );
else
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsScrollingMode") ),
- makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) );
+ xSet->setPropertyValue( "FrameIsScrollingMode", makeAny( (sal_Bool) ( eScroll == ScrollingYes) ) );
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsBorder") ),
- makeAny( bHasBorder ) );
+ xSet->setPropertyValue( "FrameIsBorder", makeAny( bHasBorder ) );
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth") ),
- makeAny( sal_Int32( lMarginWidth ) ) );
+ xSet->setPropertyValue( "FrameMarginWidth", makeAny( sal_Int32( lMarginWidth ) ) );
- xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight") ),
- makeAny( sal_Int32( lMarginHeight ) ) );
+ xSet->setPropertyValue( "FrameMarginHeight", makeAny( sal_Int32( lMarginHeight ) ) );
if ( bIPActive )
m_xObj->changeState( embed::EmbedStates::INPLACE_ACTIVE );
@@ -733,7 +727,7 @@ IMPL_STATIC_LINK( SfxInsertFloatingFrameDialog, CheckHdl, CheckBox*, pCB )
if ( pCB == pThis->m_pCBMarginWidthDefault )
{
if ( pCB->IsChecked() )
- pThis->m_pNMMarginWidth->SetText( String::CreateFromInt32( DEFAULT_MARGIN_WIDTH ) );
+ pThis->m_pNMMarginWidth->SetText( OUString::number(DEFAULT_MARGIN_WIDTH) );
pThis->m_pFTMarginWidth->Enable( !pCB->IsChecked() );
pThis->m_pNMMarginWidth->Enable( !pCB->IsChecked() );
}
@@ -741,7 +735,7 @@ IMPL_STATIC_LINK( SfxInsertFloatingFrameDialog, CheckHdl, CheckBox*, pCB )
if ( pCB == pThis->m_pCBMarginHeightDefault )
{
if ( pCB->IsChecked() )
- pThis->m_pNMMarginHeight->SetText( String::CreateFromInt32( DEFAULT_MARGIN_HEIGHT ) );
+ pThis->m_pNMMarginHeight->SetText( OUString::number(DEFAULT_MARGIN_HEIGHT) );
pThis->m_pFTMarginHeight->Enable( !pCB->IsChecked() );
pThis->m_pNMMarginHeight->Enable( !pCB->IsChecked() );
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 959f3a1379c0..33a17f60ef22 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -151,7 +151,7 @@ void SFTreeListBox::deleteAllTree()
}
}
-void SFTreeListBox::Init( const ::rtl::OUString& language )
+void SFTreeListBox::Init( const OUString& language )
{
SetUpdateMode( sal_False );
@@ -163,10 +163,10 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
Sequence< Reference< browse::XBrowseNode > > children;
- ::rtl::OUString userStr( RTL_CONSTASCII_USTRINGPARAM("user") );
- ::rtl::OUString shareStr( RTL_CONSTASCII_USTRINGPARAM("share") );
+ OUString userStr("user");
+ OUString shareStr("share");
- ::rtl::OUString singleton( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.script.browse.theBrowseNodeFactory" ) );
+ OUString singleton("/singletons/com.sun.star.script.browse.theBrowseNodeFactory");
try
{
@@ -184,7 +184,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
catch( Exception& e )
{
OSL_TRACE("Exception getting root browse node from factory: %s",
- ::rtl::OUStringToOString(
+ OUStringToOString(
e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
// TODO exception handling
}
@@ -193,8 +193,8 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
for ( sal_Int32 n = 0; n < children.getLength(); n++ )
{
bool app = false;
- ::rtl::OUString uiName = children[ n ]->getName();
- ::rtl::OUString factoryURL;
+ OUString uiName = children[ n ]->getName();
+ OUString factoryURL;
if ( uiName.equals( userStr ) || uiName.equals( shareStr ) )
{
app = true;
@@ -218,7 +218,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
// get the long name of the document:
Sequence<beans::PropertyValue> moduleDescr;
try{
- ::rtl::OUString appModule = xModuleManager->identify( xDocumentModel );
+ OUString appModule = xModuleManager->identify( xDocumentModel );
xModuleManager->getByName(appModule) >>= moduleDescr;
} catch(const uno::Exception&)
{}
@@ -236,7 +236,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
}
}
- ::rtl::OUString lang( language );
+ OUString lang( language );
Reference< browse::XBrowseNode > langEntries =
getLangNodeFromRootNode( children[ n ], lang );
@@ -250,7 +250,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language )
}
Reference< XInterface >
-SFTreeListBox::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OUString& docName )
+SFTreeListBox::getDocumentModel( Reference< XComponentContext >& xCtx, OUString& docName )
{
Reference< XInterface > xModel;
Reference< frame::XDesktop2 > desktop = frame::Desktop::create(xCtx);
@@ -265,7 +265,7 @@ SFTreeListBox::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OU
components->nextElement(), UNO_QUERY );
if ( model.is() )
{
- ::rtl::OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle( model );
+ OUString sTdocUrl = ::comphelper::DocumentInfo::getDocumentTitle( model );
if( sTdocUrl.equals( docName ) )
{
xModel = model;
@@ -277,7 +277,7 @@ SFTreeListBox::getDocumentModel( Reference< XComponentContext >& xCtx, ::rtl::OU
}
Reference< browse::XBrowseNode >
-SFTreeListBox::getLangNodeFromRootNode( Reference< browse::XBrowseNode >& rootNode, ::rtl::OUString& language )
+SFTreeListBox::getLangNodeFromRootNode( Reference< browse::XBrowseNode >& rootNode, OUString& language )
{
Reference< browse::XBrowseNode > langNode;
@@ -321,7 +321,7 @@ void SFTreeListBox:: RequestSubEntries( SvTreeListEntry* pRootEntry, Reference<
for ( sal_Int32 n = 0; n < children.getLength(); n++ )
{
- ::rtl::OUString name( children[ n ]->getName() );
+ OUString name( children[ n ]->getName() );
if ( children[ n ]->getType() != browse::BrowseNodeTypes::SCRIPT)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -353,7 +353,7 @@ void SFTreeListBox::ExpandAllTrees()
SAL_WNODEPRECATED_DECLARATIONS_PUSH
SvTreeListEntry * SFTreeListBox::insertEntry(
String const & rText, sal_uInt16 nBitmap, SvTreeListEntry * pParent,
- bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, ::rtl::OUString factoryURL )
+ bool bChildrenOnDemand, std::auto_ptr< SFEntry > aUserData, OUString factoryURL )
{
SvTreeListEntry * p;
if( nBitmap == RID_CUIIMG_DOC && !factoryURL.isEmpty() )
@@ -488,7 +488,7 @@ CuiInputDialog::~CuiInputDialog()
// ----------------------------------------------------------------------------
// ScriptOrgDialog ------------------------------------------------------------
// ----------------------------------------------------------------------------
-SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString language )
+SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, OUString language )
: SfxModalDialog(pParent, "ScriptOrganizerDialog", "cui/ui/scriptorganizer.ui")
, m_sLanguage(language)
, m_delErrStr(CUI_RESSTR(RID_SVXSTR_DELFAILED))
@@ -511,7 +511,7 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, ::rtl::OUString languag
// must be a neater way to deal with the strings than as above
// append the language to the dialog title
String winTitle( GetText() );
- winTitle.SearchAndReplace( rtl::OUString( "%MACROLANG" ), m_sLanguage );
+ winTitle.SearchAndReplace( OUString( "%MACROLANG" ), m_sLanguage );
SetText( winTitle );
m_pScriptsBox->SetSelectHdl( LINK( this, SvxScriptOrgDialog, ScriptSelectHdl ) );
@@ -589,7 +589,7 @@ void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node )
return;
}
- ::rtl::OUString sName("Editable") ;
+ OUString sName("Editable") ;
if ( getBoolProperty( xProps, sName ) )
{
@@ -600,7 +600,7 @@ void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node )
m_pEditButton->Disable();
}
- sName = rtl::OUString("Deletable") ;
+ sName = OUString("Deletable") ;
if ( getBoolProperty( xProps, sName ) )
{
@@ -611,7 +611,7 @@ void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node )
m_pDelButton->Disable();
}
- sName = rtl::OUString("Creatable") ;
+ sName = OUString("Creatable") ;
if ( getBoolProperty( xProps, sName ) )
{
@@ -622,7 +622,7 @@ void SvxScriptOrgDialog::CheckButtons( Reference< browse::XBrowseNode >& node )
m_pCreateButton->Disable();
}
- sName = rtl::OUString("Renamable") ;
+ sName = OUString("Renamable") ;
if ( getBoolProperty( xProps, sName ) )
{
@@ -708,7 +708,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton )
if ( pButton == m_pRunButton )
{
- ::rtl::OUString tmpString;
+ OUString tmpString;
Reference< beans::XPropertySet > xProp( node, UNO_QUERY );
Reference< provider::XScriptProvider > mspNode;
if( !xProp.is() )
@@ -739,7 +739,7 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton )
mspNode.set( mspUserData->GetNode() , UNO_QUERY );
pParent = m_pScriptsBox->GetParent( pParent );
}
- xProp->getPropertyValue( rtl::OUString("URI" ) ) >>= tmpString;
+ xProp->getPropertyValue( OUString("URI" ) ) >>= tmpString;
const String scriptURL( tmpString );
if ( mspNode.is() )
@@ -792,11 +792,11 @@ IMPL_LINK( SvxScriptOrgDialog, ButtonHdl, Button *, pButton )
try
{
// ISSUE need code to run script here
- xInv->invoke( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Editable" ) ), args, outIndex, outArgs );
+ xInv->invoke( "Editable", args, outIndex, outArgs );
}
catch( Exception& e )
{
- OSL_TRACE("Caught exception trying to invoke %s", ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
+ OSL_TRACE("Caught exception trying to invoke %s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -858,16 +858,16 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
if ( xInv.is() )
{
- ::rtl::OUString aNewName;
- ::rtl::OUString aNewStdName;
+ OUString aNewName;
+ OUString aNewStdName;
sal_uInt16 nMode = INPUTMODE_NEWLIB;
if( m_pScriptsBox->GetModel()->GetDepth( pEntry ) == 0 )
{
- aNewStdName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Library") ) ;
+ aNewStdName = "Library" ;
}
else
{
- aNewStdName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Macro") ) ;
+ aNewStdName = "Macro" ;
nMode = INPUTMODE_NEWMACRO;
}
//do we need L10N for this? ie somethng like:
@@ -881,8 +881,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
{
if( node->hasChildNodes() == sal_False )
{
- aNewName = aNewStdName;
- aNewName += String::CreateFromInt32( i );
+ aNewName = aNewStdName + OUString::number(i);
bValid = sal_True;
}
else
@@ -895,15 +894,14 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
// ignore, will continue on with empty sequence
}
- ::rtl::OUString extn;
+ OUString extn;
while ( !bValid )
{
- aNewName = aNewStdName;
- aNewName += String::CreateFromInt32( i );
+ aNewName = aNewStdName + OUString::number(i);
sal_Bool bFound = sal_False;
if(childNodes.getLength() > 0 )
{
- ::rtl::OUString nodeName = childNodes[0]->getName();
+ OUString nodeName = childNodes[0]->getName();
sal_Int32 extnPos = nodeName.lastIndexOf( '.' );
if(extnPos>0)
extn = nodeName.copy(extnPos);
@@ -935,7 +933,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
{
if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() )
{
- ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName();
+ OUString aUserSuppliedName = xNewDlg->GetObjectName();
bValid = sal_True;
for( sal_Int32 index = 0; index < childNodes.getLength(); index++ )
{
@@ -973,7 +971,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
try
{
Any aResult;
- aResult = xInv->invoke( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Creatable") ), args, outIndex, outArgs );
+ aResult = xInv->invoke( "Creatable", args, outIndex, outArgs );
Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
aChildNode = newNode;
@@ -981,7 +979,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
catch( Exception& e )
{
OSL_TRACE("Caught exception trying to Create %s",
- ::rtl::OUStringToOString(
+ OUStringToOString(
e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -991,7 +989,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
SvTreeListEntry* pNewEntry = NULL;
- ::rtl::OUString name( aChildName );
+ OUString name( aChildName );
Reference<XModel> xDocumentModel = getModel( pEntry );
// ISSUE do we need to remove all entries for parent
@@ -1032,7 +1030,7 @@ void SvxScriptOrgDialog::createEntry( SvTreeListEntry* pEntry )
else
{
//ISSUE L10N & message from exception?
- String aError( m_createErrStr );
+ OUString aError( m_createErrStr );
ErrorBox aErrorBox( static_cast<Window*>(this), WB_OK | RET_OK, aError );
aErrorBox.SetText( m_createErrTitleStr );
aErrorBox.Execute();
@@ -1048,9 +1046,9 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
if ( xInv.is() )
{
- ::rtl::OUString aNewName = node->getName();
+ OUString aNewName = node->getName();
sal_Int32 extnPos = aNewName.lastIndexOf( '.' );
- ::rtl::OUString extn;
+ OUString extn;
if(extnPos>0)
{
extn = aNewName.copy(extnPos);
@@ -1068,7 +1066,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
{
if ( xNewDlg->Execute() && xNewDlg->GetObjectName().Len() )
{
- ::rtl::OUString aUserSuppliedName = xNewDlg->GetObjectName();
+ OUString aUserSuppliedName = xNewDlg->GetObjectName();
bValid = sal_True;
if( bValid )
aNewName = aUserSuppliedName;
@@ -1088,7 +1086,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
try
{
Any aResult;
- aResult = xInv->invoke( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Renamable") ), args, outIndex, outArgs );
+ aResult = xInv->invoke( "Renamable", args, outIndex, outArgs );
Reference< browse::XBrowseNode > newNode( aResult, UNO_QUERY );
aChildNode = newNode;
@@ -1096,7 +1094,7 @@ void SvxScriptOrgDialog::renameEntry( SvTreeListEntry* pEntry )
catch( Exception& e )
{
OSL_TRACE("Caught exception trying to Rename %s",
- ::rtl::OUStringToOString(
+ OUStringToOString(
e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -1121,8 +1119,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
sal_Bool result = sal_False;
Reference< browse::XBrowseNode > node = getBrowseNode( pEntry );
// ISSUE L10N string & can we centre list?
- String aQuery( m_delQueryStr );
- aQuery.Append( getListOfChildren( node, 0 ) );
+ OUString aQuery = m_delQueryStr + getListOfChildren( node, 0 );
QueryBox aQueryBox( static_cast<Window*>(this), WB_YES_NO | WB_DEF_YES, aQuery );
aQueryBox.SetText( m_delQueryTitleStr );
if ( aQueryBox.Execute() == RET_NO )
@@ -1139,13 +1136,13 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
try
{
Any aResult;
- aResult = xInv->invoke( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Deletable") ), args, outIndex, outArgs );
+ aResult = xInv->invoke( "Deletable", args, outIndex, outArgs );
aResult >>= result; // or do we just assume true if no exception ?
}
catch( Exception& e )
{
OSL_TRACE("Caught exception trying to delete %s",
- ::rtl::OUStringToOString(
+ OUStringToOString(
e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer );
}
}
@@ -1166,7 +1163,7 @@ void SvxScriptOrgDialog::deleteEntry( SvTreeListEntry* pEntry )
}
sal_Bool SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >& xProps,
- ::rtl::OUString& propName )
+ OUString& propName )
{
sal_Bool result = false;
try
@@ -1182,15 +1179,14 @@ sal_Bool SvxScriptOrgDialog::getBoolProperty( Reference< beans::XPropertySet >&
return result;
}
-String SvxScriptOrgDialog::getListOfChildren( Reference< browse::XBrowseNode > node, int depth )
+OUString SvxScriptOrgDialog::getListOfChildren( Reference< browse::XBrowseNode > node, int depth )
{
- String result;
- result.Append( rtl::OUString( "\n" ) );
+ OUString result = "\n";
for( int i=0;i<=depth;i++ )
{
- result.Append( rtl::OUString( "\t" ) );
+ result += "\t";
}
- result.Append( String( node->getName() ) );
+ result += node->getName();
try
{
@@ -1200,7 +1196,7 @@ String SvxScriptOrgDialog::getListOfChildren( Reference< browse::XBrowseNode > n
= node->getChildNodes();
for ( sal_Int32 n = 0; n < children.getLength(); n++ )
{
- result.Append( getListOfChildren( children[ n ] , depth+1 ) );
+ result += getListOfChildren( children[ n ] , depth+1 );
}
}
}
@@ -1216,18 +1212,18 @@ Selection_hash SvxScriptOrgDialog::m_lastSelection;
void SvxScriptOrgDialog::StoreCurrentSelection()
{
- String aDescription;
+ OUString aDescription;
if ( m_pScriptsBox->IsSelected( m_pScriptsBox->GetHdlEntry() ) )
{
SvTreeListEntry* pEntry = m_pScriptsBox->GetHdlEntry();
while( pEntry )
{
- aDescription.Insert( m_pScriptsBox->GetEntryText( pEntry ), 0 );
+ aDescription = m_pScriptsBox->GetEntryText( pEntry ) + aDescription;
pEntry = m_pScriptsBox->GetParent( pEntry );
if ( pEntry )
- aDescription.Insert( ';', 0 );
+ aDescription = ";" + aDescription;
}
- ::rtl::OUString sDesc( aDescription );
+ OUString sDesc( aDescription );
m_lastSelection[ m_sLanguage ] = sDesc;
}
}
@@ -1259,10 +1255,10 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
m_pScriptsBox->SetCurEntry( pEntry );
}
-::rtl::OUString ReplaceString(
- const ::rtl::OUString& source,
- const ::rtl::OUString& token,
- const ::rtl::OUString& value )
+OUString ReplaceString(
+ const OUString& source,
+ const OUString& token,
+ const OUString& value )
{
sal_Int32 pos = source.indexOf( token );
@@ -1276,53 +1272,50 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
}
}
-::rtl::OUString FormatErrorString(
- const ::rtl::OUString& unformatted,
- const ::rtl::OUString& language,
- const ::rtl::OUString& script,
- const ::rtl::OUString& line,
- const ::rtl::OUString& type,
- const ::rtl::OUString& message )
+OUString FormatErrorString(
+ const OUString& unformatted,
+ const OUString& language,
+ const OUString& script,
+ const OUString& line,
+ const OUString& type,
+ const OUString& message )
{
- ::rtl::OUString result = unformatted.copy( 0 );
+ OUString result = unformatted.copy( 0 );
- result = ReplaceString(
- result, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%LANGUAGENAME") ), language );
- result = ReplaceString(
- result, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%SCRIPTNAME") ), script );
- result = ReplaceString(
- result, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%LINENUMBER") ), line );
+ result = ReplaceString(result, "%LANGUAGENAME", language );
+ result = ReplaceString(result, "%SCRIPTNAME", script );
+ result = ReplaceString(result, "%LINENUMBER", line );
if ( !type.isEmpty() )
{
- result += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n\n") );
- result += ::rtl::OUString(String(CUI_RES(RID_SVXSTR_ERROR_TYPE_LABEL)));
- result += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ") );
- result += type;
+ result += "\n\n" +
+ OUString(CUI_RES(RID_SVXSTR_ERROR_TYPE_LABEL)) +
+ " " +
+ type;
}
if ( !message.isEmpty() )
{
- result += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n\n") );
- result += ::rtl::OUString(String(CUI_RES(RID_SVXSTR_ERROR_MESSAGE_LABEL)));
- result += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ") );
- result += message;
+ result += "\n\n" +
+ OUString(CUI_RES(RID_SVXSTR_ERROR_MESSAGE_LABEL)) +
+ " " +
+ message;
}
return result;
}
-::rtl::OUString GetErrorMessage(
+OUString GetErrorMessage(
const provider::ScriptErrorRaisedException& eScriptError )
{
- ::rtl::OUString unformatted = String( CUI_RES( RID_SVXSTR_ERROR_AT_LINE ) );
+ OUString unformatted = CUI_RES( RID_SVXSTR_ERROR_AT_LINE );
- ::rtl::OUString unknown( RTL_CONSTASCII_USTRINGPARAM("UNKNOWN") );
- ::rtl::OUString language = unknown;
- ::rtl::OUString script = unknown;
- ::rtl::OUString line = unknown;
- ::rtl::OUString type = ::rtl::OUString();
- ::rtl::OUString message = eScriptError.Message;
+ OUString unknown("UNKNOWN");
+ OUString language = unknown;
+ OUString script = unknown;
+ OUString line = unknown;
+ OUString type = OUString();
+ OUString message = eScriptError.Message;
if ( !eScriptError.language.isEmpty() )
{
@@ -1340,32 +1333,29 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
}
if ( eScriptError.lineNum != -1 )
{
- line = ::rtl::OUString::valueOf( eScriptError.lineNum );
- unformatted = String(
- CUI_RES( RID_SVXSTR_ERROR_AT_LINE ) );
+ line = OUString::valueOf( eScriptError.lineNum );
+ unformatted = CUI_RES( RID_SVXSTR_ERROR_AT_LINE );
}
else
{
- unformatted = String(
- CUI_RES( RID_SVXSTR_ERROR_RUNNING ) );
+ unformatted = CUI_RES( RID_SVXSTR_ERROR_RUNNING );
}
return FormatErrorString(
unformatted, language, script, line, type, message );
}
-::rtl::OUString GetErrorMessage(
+OUString GetErrorMessage(
const provider::ScriptExceptionRaisedException& eScriptException )
{
- ::rtl::OUString unformatted =
- String( CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE ) );
+ OUString unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE );
- ::rtl::OUString unknown( RTL_CONSTASCII_USTRINGPARAM("UNKNOWN") );
- ::rtl::OUString language = unknown;
- ::rtl::OUString script = unknown;
- ::rtl::OUString line = unknown;
- ::rtl::OUString type = unknown;
- ::rtl::OUString message = eScriptException.Message;
+ OUString unknown("UNKNOWN");
+ OUString language = unknown;
+ OUString script = unknown;
+ OUString line = unknown;
+ OUString type = unknown;
+ OUString message = eScriptException.Message;
if ( !eScriptException.language.isEmpty() )
{
@@ -1383,14 +1373,12 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
if ( eScriptException.lineNum != -1 )
{
- line = ::rtl::OUString::valueOf( eScriptException.lineNum );
- unformatted = String(
- CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE ) );
+ line = OUString::valueOf( eScriptException.lineNum );
+ unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_AT_LINE );
}
else
{
- unformatted = String(
- CUI_RES( RID_SVXSTR_EXCEPTION_RUNNING ) );
+ unformatted = CUI_RES( RID_SVXSTR_EXCEPTION_RUNNING );
}
if ( !eScriptException.exceptionType.isEmpty() )
@@ -1402,17 +1390,16 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
unformatted, language, script, line, type, message );
}
-::rtl::OUString GetErrorMessage(
+OUString GetErrorMessage(
const provider::ScriptFrameworkErrorException& sError )
{
- ::rtl::OUString unformatted = String(
- CUI_RES( RID_SVXSTR_FRAMEWORK_ERROR_RUNNING ) );
+ OUString unformatted = CUI_RES( RID_SVXSTR_FRAMEWORK_ERROR_RUNNING );
- ::rtl::OUString language( RTL_CONSTASCII_USTRINGPARAM("UNKNOWN") );
+ OUString language("UNKNOWN");
- ::rtl::OUString script( RTL_CONSTASCII_USTRINGPARAM("UNKNOWN") );
+ OUString script("UNKNOWN");
- ::rtl::OUString message;
+ OUString message;
if ( !sError.scriptName.isEmpty() )
{
@@ -1424,10 +1411,9 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
}
if ( sError.errorType == provider::ScriptFrameworkErrorType::NOTSUPPORTED )
{
- message = String(
+ message = OUString(
CUI_RES( RID_SVXSTR_ERROR_LANG_NOT_SUPPORTED ) );
- message = ReplaceString(
- message, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%LANGUAGENAME") ), language );
+ message = ReplaceString(message, "%LANGUAGENAME", language );
}
else
@@ -1435,28 +1421,28 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
message = sError.Message;
}
return FormatErrorString(
- unformatted, language, script, ::rtl::OUString(), ::rtl::OUString(), message );
+ unformatted, language, script, OUString(), OUString(), message );
}
-::rtl::OUString GetErrorMessage( const RuntimeException& re )
+OUString GetErrorMessage( const RuntimeException& re )
{
Type t = ::getCppuType( &re );
- ::rtl::OUString message = t.getTypeName();
+ OUString message = t.getTypeName();
message += re.Message;
return message;
}
-::rtl::OUString GetErrorMessage( const Exception& e )
+OUString GetErrorMessage( const Exception& e )
{
Type t = ::getCppuType( &e );
- ::rtl::OUString message = t.getTypeName();
+ OUString message = t.getTypeName();
message += e.Message;
return message;
}
-::rtl::OUString GetErrorMessage( const com::sun::star::uno::Any& aException )
+OUString GetErrorMessage( const com::sun::star::uno::Any& aException )
{
if ( aException.getValueType() ==
::getCppuType( (const reflection::InvocationTargetException* ) NULL ) )
@@ -1525,14 +1511,14 @@ short SvxScriptErrorDialog::Execute()
// SvxScriptErrorDialog may be deleted before ShowDialog is called
Application::PostUserEvent(
LINK( this, SvxScriptErrorDialog, ShowDialog ),
- new rtl::OUString( m_sMessage ) );
+ new OUString( m_sMessage ) );
return 0;
}
-IMPL_LINK( SvxScriptErrorDialog, ShowDialog, ::rtl::OUString*, pMessage )
+IMPL_LINK( SvxScriptErrorDialog, ShowDialog, OUString*, pMessage )
{
- ::rtl::OUString message;
+ OUString message;
if ( pMessage && !pMessage->isEmpty() )
{
@@ -1540,7 +1526,7 @@ IMPL_LINK( SvxScriptErrorDialog, ShowDialog, ::rtl::OUString*, pMessage )
}
else
{
- message = String( CUI_RES( RID_SVXSTR_ERROR_TITLE ) );
+ message = OUString( CUI_RES( RID_SVXSTR_ERROR_TITLE ) );
}
MessBox* pBox = new WarningBox( NULL, WB_OK, message );
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 8480b2398aae..6e04e19076ea 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -214,11 +214,10 @@ AlternativesExtraData * ThesaurusAlternativesCtrl::GetExtraData(
SvTreeListEntry * ThesaurusAlternativesCtrl::AddEntry( sal_Int32 nVal, const String &rText, bool bIsHeader )
{
SvTreeListEntry* pEntry = new SvTreeListEntry;
- String aText;
+ OUString aText;
if (bIsHeader && nVal >= 0)
{
- aText = String::CreateFromInt32( nVal );
- aText += rtl::OUString(". ");
+ aText = OUString::number( nVal ) + ". ";
}
pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); // add empty column
aText += rText;
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index 6364dbb06428..cacf1b56c948 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -174,7 +174,7 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::script::browse::XBrowseNode >
getBrowseNode( SvTreeListEntry* pEntry );
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getModel( SvTreeListEntry* pEntry );
- String getListOfChildren( ::com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node, int depth );
+ OUString getListOfChildren( ::com::sun::star::uno::Reference< com::sun::star::script::browse::XBrowseNode > node, int depth );
void StoreCurrentSelection();
void RestorePreviousSelection();
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 4f0139974f35..0f79ebfbdd40 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -124,16 +124,16 @@ void SvxChartColorTable::useDefault()
String SvxChartColorTable::getDefaultName( size_t _nIndex )
{
- String aName;
+ OUString aName;
- if (sDefaultNamePrefix.Len() == 0)
+ if (sDefaultNamePrefix.getLength() == 0)
{
- String aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
- xub_StrLen nPos = aResName.SearchAscii( "$(ROW)" );
- if( nPos != STRING_NOTFOUND )
+ OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
+ sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
+ if( nPos != -1 )
{
- sDefaultNamePrefix = String( aResName, 0, nPos );
- sDefaultNamePostfix = String( aResName, nPos + sizeof( "$(ROW)" ) - 1, STRING_LEN );
+ sDefaultNamePrefix = aResName.copy( 0, nPos );
+ sDefaultNamePostfix = aResName.copy( nPos + sizeof( "$(ROW)" ) - 1 );
}
else
{
@@ -141,9 +141,7 @@ String SvxChartColorTable::getDefaultName( size_t _nIndex )
}
}
- aName = sDefaultNamePrefix;
- aName.Append( String::CreateFromInt32 ( _nIndex + 1 ) );
- aName.Append( sDefaultNamePostfix );
+ aName = sDefaultNamePrefix + OUString::number(_nIndex + 1) + sDefaultNamePostfix;
nNextElementNumber++;
return aName;
@@ -218,13 +216,14 @@ sal_Bool SvxChartOptions::RetrieveOptions()
Color aCol;
// create strings for entry names
- String aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
- String aPrefix, aPostfix, aName;
- xub_StrLen nPos = aResName.SearchAscii( "$(ROW)" );
- if( nPos != STRING_NOTFOUND )
+ OUString aResName( CUI_RES( RID_SVXSTR_DIAGRAM_ROW ) );
+ OUString aPrefix, aPostfix, aName;
+ sal_Int32 nPos = aResName.indexOf( "$(ROW)" );
+ if( nPos != -1 )
{
- aPrefix = String( aResName, 0, nPos );
- aPostfix = String( aResName, nPos + sizeof( "$(ROW)" ) - 1, STRING_LEN );
+ aPrefix = aResName.copy( 0, nPos );
+ sal_Int32 idx = nPos + sizeof( "$(ROW)" ) - 1;
+ aPostfix = aResName.copy( idx, aResName.getLength()-idx );
}
else
aPrefix = aResName;
@@ -234,9 +233,7 @@ sal_Bool SvxChartOptions::RetrieveOptions()
{
aCol.SetColor( (static_cast< ColorData >(aColorSeq[ i ] )));
- aName = aPrefix;
- aName.Append( String::CreateFromInt32( i + 1 ));
- aName.Append( aPostfix );
+ aName = aPrefix + OUString::number(i + 1) + aPostfix;
maDefColors.append( XColorEntry( aCol, aName ));
}
diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx
index d3f995ef9b01..1319702a5d46 100644
--- a/cui/source/options/cfgchart.hxx
+++ b/cui/source/options/cfgchart.hxx
@@ -36,8 +36,8 @@ class SvxChartColorTable
private:
::std::vector< XColorEntry > m_aColorEntries;
int nNextElementNumber;
- String sDefaultNamePrefix;
- String sDefaultNamePostfix;
+ OUString sDefaultNamePrefix;
+ OUString sDefaultNamePostfix;
public:
SvxChartColorTable();
diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx
index 56b094ccde7e..381a8f4fda9b 100644
--- a/cui/source/options/connpooloptions.cxx
+++ b/cui/source/options/connpooloptions.cxx
@@ -225,7 +225,7 @@ namespace offapp
break;
case 3:
if (_rPos->bEnabled)
- sReturn = String::CreateFromInt32(_rPos->nTimeoutSeconds);
+ sReturn = OUString::number(_rPos->nTimeoutSeconds);
break;
default:
OSL_FAIL("DriverListControl::implGetCellText: invalid column id!");
@@ -440,7 +440,7 @@ namespace offapp
m_aDriver.SetText(pDriverPos->sName);
m_aDriverPoolingEnabled.Check(pDriverPos->bEnabled);
- m_aTimeout.SetText(String::CreateFromInt32(pDriverPos->nTimeoutSeconds));
+ m_aTimeout.SetText(OUString::number(pDriverPos->nTimeoutSeconds));
OnEnabledDisabled(&m_aDriverPoolingEnabled);
}
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index aa500b45a96c..d6ccf4f36e04 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -266,11 +266,10 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet )
void DbRegistrationOptionsPage::FillUserData()
{
- String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) );
- aUserData += ';';
+ OUString aUserData = OUString::number( pHeaderBar->GetItemSize( ITEMID_TYPE ) ) + ";";
HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE );
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
- aUserData += (bUp ? '1' : '0');
+ aUserData += (bUp ? OUString("1") : OUString("0"));
SetUserData( aUserData );
}
// -----------------------------------------------------------------------
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 1ce2e89c4281..c15f1578af75 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -135,15 +135,15 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( Window* pParent,
sal_uInt16 nHeight;
for(nHeight = 6; nHeight <= 16; nHeight++)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 18; nHeight <= 28; nHeight+= 2)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 32; nHeight <= 48; nHeight+= 4)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 54; nHeight <= 72; nHeight+= 6)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
for(nHeight = 80; nHeight <= 96; nHeight+= 8)
- aFontHeightLB.InsertEntry(String::CreateFromInt32(nHeight));
+ aFontHeightLB.InsertEntry(OUString::number(nHeight));
}
SvTreeListEntry* SvxFontSubstTabPage::CreateEntry(String& rFont1, String& rFont2)
@@ -262,7 +262,7 @@ void SvxFontSubstTabPage::Reset( const SfxItemSet& )
else
aFontNameLB.SelectEntryPos(0);
aFontHeightLB.SelectEntry(
- String::CreateFromInt32(
+ OUString::number(
officecfg::Office::Common::Font::SourceViewFont::FontHeight::
get()));
aNonPropFontsOnlyCB.SaveValue();
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index cc217e40b0d1..632ac9eb9b82 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -1402,7 +1402,7 @@ IMPL_LINK(SvxColorOptionsTabPage, CheckNameHdl_Impl, AbstractSvxNameDialog*, pDi
void SvxColorOptionsTabPage::FillUserData()
{
- SetUserData(String::CreateFromInt32(pColorConfigCT->GetScrollPosition()));
+ SetUserData(OUString::number(pColorConfigCT->GetScrollPosition()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9bbfab856e90..cca9402c5ded 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -407,19 +407,19 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureHdl, NumericField*, pEd )
{
(void)pEd;
- String aOutput( aStrDateInfo );
- String aStr( aYearValueField.GetText() );
- String sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() );
- xub_StrLen nIndex = 0;
- while ((nIndex = aStr.Search( sSep, nIndex)) != STRING_NOTFOUND)
- aStr.Erase( nIndex, sSep.Len());
- long nNum = aStr.ToInt32();
- if ( aStr.Len() != 4 || nNum < aYearValueField.GetMin() || nNum > aYearValueField.GetMax() )
- aOutput.AppendAscii("????");
+ OUString aOutput( aStrDateInfo );
+ OUString aStr( aYearValueField.GetText() );
+ OUString sSep( SvtSysLocale().GetLocaleData().getNumThousandSep() );
+ sal_Int32 nIndex = 0;
+ while ((nIndex = aStr.indexOf( sSep, nIndex)) != -1)
+ aStr = aStr.replaceAt( nIndex, sSep.getLength(), "");
+ sal_Int32 nNum = aStr.toInt32();
+ if ( aStr.getLength() != 4 || nNum < aYearValueField.GetMin() || nNum > aYearValueField.GetMax() )
+ aOutput += "????";
else
{
nNum += 99;
- aOutput += String::CreateFromInt32( nNum );
+ aOutput += OUString::number( nNum );
}
aToYearFT.SetText( aOutput );
return 0;
@@ -430,7 +430,7 @@ IMPL_LINK( OfaMiscTabPage, TwoFigureHdl, NumericField*, pEd )
IMPL_LINK( OfaMiscTabPage, TwoFigureConfigHdl, NumericField*, pEd )
{
sal_Int64 nNum = aYearValueField.GetValue();
- rtl::OUString aOutput(rtl::OUString::valueOf(nNum));
+ rtl::OUString aOutput(rtl::OUString::number(nNum));
aYearValueField.SetText(aOutput);
aYearValueField.SetSelection( Selection( 0, aOutput.getLength() ) );
TwoFigureHdl( pEd );
@@ -1185,11 +1185,11 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
// initialize user interface language selection
SvtLanguageTable* pLanguageTable = new SvtLanguageTable;
- const String aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
+ const OUString aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) );
- String aUILang(aStr);
- aUILang += rtl::OUString(" - ");
- aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true );
+ OUString aUILang = aStr +
+ " - " +
+ pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true );
aUserInterfaceLB.InsertEntry(aUILang);
aUserInterfaceLB.SetEntryData(0, 0);
@@ -1214,7 +1214,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
if (aLang != LANGUAGE_DONTKNOW)
{
//sal_uInt16 p = aUserInterfaceLB.InsertLanguage(aLang);
- String aLangStr( pLanguageTable->GetString( aLang, true ) );
+ OUString aLangStr( pLanguageTable->GetString( aLang, true ) );
sal_uInt16 p = aUserInterfaceLB.InsertEntry(aLangStr);
aUserInterfaceLB.SetEntryData(p, (void*)(i+1));
}
@@ -1261,23 +1261,21 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe
const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable();
const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM );
// insert SYSTEM entry
- String aDefaultCurr(aStr);
- aDefaultCurr += rtl::OUString(" - ");
- aDefaultCurr += rCurr.GetBankSymbol();
+ OUString aDefaultCurr = aStr + " - " + rCurr.GetBankSymbol();
aCurrencyLB.InsertEntry( aDefaultCurr );
// all currencies
- String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " " ) );
+ OUString aTwoSpace( " " );
sal_uInt16 nCurrCount = rCurrTab.size();
// first entry is SYSTEM, skip it
for ( sal_uInt16 j=1; j < nCurrCount; ++j )
{
const NfCurrencyEntry* pCurr = &rCurrTab[j];
- String aStr_( pCurr->GetBankSymbol() );
- aStr_ += aTwoSpace;
- aStr_ += pCurr->GetSymbol();
- aStr_ = ApplyLreOrRleEmbedding( aStr_ );
- aStr_ += aTwoSpace;
- aStr_ += ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) );
+ OUString aStr_ = pCurr->GetBankSymbol() +
+ aTwoSpace +
+ pCurr->GetSymbol();
+ aStr_ = ApplyLreOrRleEmbedding( aStr_ ) +
+ aTwoSpace +
+ ApplyLreOrRleEmbedding( pLanguageTable->GetString( pCurr->GetLanguage() ) );
sal_uInt16 nPos = aCurrencyLB.InsertEntry( aStr_ );
aCurrencyLB.SetEntryData( nPos, (void*) pCurr );
}
@@ -1840,8 +1838,8 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox )
LocaleDataWrapper aLocaleWrapper( aLanguageTag );
// update the decimal separator key of the related CheckBox
- String sTempLabel(sDecimalSeparatorLabel);
- sTempLabel.SearchAndReplaceAscii("%1", aLocaleWrapper.getNumDecimalSep() );
+ OUString sTempLabel(sDecimalSeparatorLabel);
+ sTempLabel = sTempLabel.replaceFirst("%1", aLocaleWrapper.getNumDecimalSep() );
aDecimalSeparatorCB.SetText(sTempLabel);
// update the date acceptance patterns
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 37a4c63d0e7f..9bccdd0ddd55 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -241,7 +241,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aHttpsProxyPN) >>= aStringValue )
@@ -251,7 +251,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpsPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aFtpProxyPN) >>= aStringValue )
@@ -261,7 +261,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aFtpPortED.SetText( OUString::number( nIntValue ));
}
if( xNameAccess->getByName(aNoProxyDescPN) >>= aStringValue )
@@ -300,7 +300,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aHttpPortPN) >>= nIntValue )
{
- aHttpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aHttpsProxyPN) >>= aStringValue )
@@ -310,7 +310,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aHttpsPortPN) >>= nIntValue )
{
- aHttpsPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aHttpsPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aFtpProxyPN) >>= aStringValue )
@@ -320,7 +320,7 @@ void SvxProxyTabPage::ReadConfigDefaults_Impl()
if( xPropertyState->getPropertyDefault(aFtpPortPN) >>= nIntValue )
{
- aFtpPortED.SetText( String::CreateFromInt32( nIntValue ));
+ aFtpPortED.SetText( OUString::number( nIntValue ));
}
if( xPropertyState->getPropertyDefault(aNoProxyDescPN) >>= aStringValue )
@@ -609,11 +609,11 @@ void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
}
else // if not, nothing happens.
return;
- String aHelpText;
+ OUString aHelpText;
if( nPos <= nTop+nCount-1 ) // if find the matching entry, get its content.
aHelpText = GetEntry(nPos);
- if( aHelpText.Len() && GetTextWidth(aHelpText)<GetOutputSizePixel().Width() )
- aHelpText.Erase(); // if the entry is quite short, clear the helping tip content.
+ if( aHelpText.getLength() && GetTextWidth(aHelpText)<GetOutputSizePixel().Width() )
+ aHelpText = OUString(); // if the entry is quite short, clear the helping tip content.
aItemRect = Rectangle(Point(0,0),GetSizePixel());
aPt = Point(OutputToScreenPixel( aItemRect.TopLeft() ));
aItemRect.Left() = aPt.X();
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index 09632725f8e9..577eb297967b 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -380,8 +380,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& )
void SvxPathTabPage::FillUserData()
{
- String aUserData = String::CreateFromInt32( pHeaderBar->GetItemSize( ITEMID_TYPE ) );
- aUserData += ';';
+ String aUserData = OUString::number( pHeaderBar->GetItemSize( ITEMID_TYPE ) ) + ";";
HeaderBarItemBits nBits = pHeaderBar->GetItemBits( ITEMID_TYPE );
sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
aUserData += bUp ? '1' : '0';
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 394ece1bd0eb..14d3a193dbcd 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -423,12 +423,12 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
{
long nData = (long) aDocTypeLB.GetEntryData(n);
OUString sCommand;
- sCommand = "matchByDocumentService=%1:iflags=";
- sCommand += String::CreateFromInt32(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT);
- sCommand += ":eflags=";
- sCommand += String::CreateFromInt32(SFX_FILTER_NOTINFILEDLG);
- sCommand += ":default_first";
- String sReplace;
+ sCommand = "matchByDocumentService=%1:iflags=" +
+ OUString::number(SFX_FILTER_IMPORT|SFX_FILTER_EXPORT) +
+ ":eflags=" +
+ OUString::number(SFX_FILTER_NOTINFILEDLG) +
+ ":default_first";
+ OUString sReplace;
switch(nData)
{
case APP_WRITER : sReplace = "com.sun.star.text.TextDocument"; break;
@@ -440,8 +440,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
case APP_MATH : sReplace = "com.sun.star.formula.FormulaProperties";break;
default: OSL_FAIL("illegal user data");
}
- String sTmp(sCommand);
- sTmp.SearchAndReplaceAscii("%1", sReplace);
+ OUString sTmp = sCommand.replaceFirst("%1", sReplace);
sCommand = sTmp;
Reference< XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
SequenceAsVector< OUString > lList;
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 30cffee230f2..78646f103902 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -553,7 +553,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
String aPageData(pPageInfo->m_pPage->GetUserData());
if ( aPageData.Len() )
{
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pPageInfo->m_nPageId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
SetViewOptUserItem( aTabPageOpt, aPageData );
}
delete pPageInfo->m_pPage;
@@ -1071,7 +1071,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl()
DBG_ASSERT( pPageInfo->m_pPage, "tabpage could not created");
if ( pPageInfo->m_pPage )
{
- SvtViewOptions aTabPageOpt( E_TABPAGE, String::CreateFromInt32( pPageInfo->m_nPageId ) );
+ SvtViewOptions aTabPageOpt( E_TABPAGE, OUString::number( pPageInfo->m_nPageId) );
pPageInfo->m_pPage->SetUserData( GetViewOptUserItem( aTabPageOpt ) );
Point aPagePos( aSeparatorFL.GetPosPixel().X(), aTreeLB.GetPosPixel().Y());