summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-04 23:58:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-09 12:16:56 +0100
commit104261010aa5ccbb7df4a82a3a3cafcfb0591fa7 (patch)
treeb8db79d2707ff5925ad01dba8a41bd8ab6d66847 /cui
parent1a1e953ee33c213dc8b88dd96a69ca9fc5e42d50 (diff)
some UniString->rtl::OUString
Change-Id: Ie69b30094da25df23a36baca2c7723d6a41f48c3
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hldocntp.cxx4
-rw-r--r--cui/source/dialogs/hyphen.cxx4
-rw-r--r--cui/source/dialogs/insdlg.cxx8
-rw-r--r--cui/source/dialogs/multipat.cxx4
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optjava.cxx32
-rw-r--r--cui/source/tabpages/autocdlg.cxx5
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx4
-rw-r--r--cui/source/tabpages/tabstpge.cxx6
11 files changed, 38 insertions, 35 deletions
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 99c473b8ef5e..e38fc0f51d40 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -350,10 +350,10 @@ void SvxHyperlinkNewDocTp::DoApply ()
SfxStringItem aReferer( SID_REFERER, rtl::OUString("private:user") );
SfxStringItem aFrame( SID_TARGETNAME, rtl::OUString("_blank") );
- String aStrFlags ( sal_Unicode('S') );
+ rtl::OUString aStrFlags('S');
if ( maRbtEditLater.IsChecked() )
{
- aStrFlags += sal_Unicode('H');
+ aStrFlags += rtl::OUString('H');
}
SfxStringItem aFlags (SID_OPTIONS, aStrFlags);
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 064231c5f086..6d93cdec7201 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -326,8 +326,8 @@ String SvxHyphenWordDialog_Impl::EraseUnusableHyphens_Impl(
// 1) remove all not usable hyphenation positions from the end of the string
nPos = nIdx == STRING_NOTFOUND ? 0 : nIdx + 1;
nPos1 = nPos; //save for later use in 2) below
- const String aTmp( sal_Unicode( HYPH_POS_CHAR ) );
- const String aEmpty;
+ const rtl::OUString aTmp( sal_Unicode( HYPH_POS_CHAR ) );
+ const rtl::OUString aEmpty;
while (nPos != STRING_NOTFOUND)
nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 );
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index d7ccde69cfcf..f731ef39b429 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -312,7 +312,7 @@ short SvInsertOleDlg::Execute()
// object couldn't be created from file
// global Resource from svtools (former so3 resource)
String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) );
- aErr.SearchAndReplace( String( '%' ), aFileName );
+ aErr.SearchAndReplace( rtl::OUString( '%' ), aFileName );
ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute();
}
else
@@ -320,7 +320,7 @@ short SvInsertOleDlg::Execute()
// object couldn't be created
// global Resource from svtools (former so3 resource)
String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE ) );
- aErr.SearchAndReplace( String( '%' ), aServerName );
+ aErr.SearchAndReplace( rtl::OUString( '%' ), aServerName );
ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute();
}
}
@@ -373,7 +373,7 @@ short SvInsertOleDlg::Execute()
// object couldn't be created from file
// global Resource from svtools (former so3 resource)
String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_FROM_FILE ) );
- aErr.SearchAndReplace( String( '%' ), aFileName );
+ aErr.SearchAndReplace( rtl::OUString( '%' ), aFileName );
ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute();
}
}
@@ -529,7 +529,7 @@ short SvInsertPlugInDialog::Execute()
// PlugIn couldn't be created
// global Resource from svtools (former so3 resource)
String aErr( impl_getSvtResString( STR_ERROR_OBJNOCREATE_PLUGIN ) );
- aErr.SearchAndReplace( String( '%' ), aURL );
+ aErr.SearchAndReplace( rtl::OUString('%'), aURL );
ErrorBox( this, WB_3DLOOK | WB_OK, aErr ).Execute();
}
}
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 5ab52fd32170..92ce9f4115d3 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -105,7 +105,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl)
sal_uLong nPos = aRadioLB.GetEntryPos( sInsPath, 1 );
if ( 0xffffffff == nPos ) //See svtools/source/contnr/svtabbx.cxx SvTabListBox::GetEntryPos
{
- String sNewEntry( '\t' );
+ rtl::OUString sNewEntry( '\t' );
sNewEntry += sInsPath;
SvLBoxEntry* pEntry = aRadioLB.InsertEntry( sNewEntry );
String* pData = new String( aURL );
@@ -293,7 +293,7 @@ void SvxMultiPathDialog::SetPath( const String& rPath )
if ( pImpl->bIsRadioButtonMode )
{
- String sEntry( '\t' );
+ rtl::OUString sEntry( '\t' );
sEntry += (bIsSystemPath ? sSystemPath : sPath);
SvLBoxEntry* pEntry = aRadioLB.InsertEntry( sEntry );
String* pURL = new String( sPath );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index a8ab0d1d25d4..859e83a88552 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -596,7 +596,7 @@ IMPL_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit *, pEdit )
rtl::OUString aValue = pEdit->GetText();
if ( !comphelper::string::isdigitAsciiString(aValue) || (long)aValue.toInt32() > USHRT_MAX )
- pEdit->SetText( '0' );
+ pEdit->SetText( rtl::OUString('0') );
return 0;
}
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 52b5c4b3fa62..f1238d8a401a 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -133,14 +133,15 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( Window* pParent, const SfxItemSet& rSet
};
m_aJavaList.SvxSimpleTable::SetTabs( aStaticTabs );
- String sHeader( '\t' );
- sHeader += String( CUI_RES( STR_HEADER_VENDOR ) );
- sHeader += '\t';
- sHeader += String( CUI_RES( STR_HEADER_VERSION ) );
- sHeader += '\t';
- sHeader += String( CUI_RES( STR_HEADER_FEATURES ) );
- sHeader += '\t';
- m_aJavaList.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT );
+ rtl::OUStringBuffer sHeader;
+ sHeader.append('\t');
+ sHeader.append(CUI_RESSTR(STR_HEADER_VENDOR));
+ sHeader.append('\t');
+ sHeader.append(CUI_RESSTR(STR_HEADER_VERSION));
+ sHeader.append('\t');
+ sHeader.append(CUI_RESSTR(STR_HEADER_FEATURES));
+ sHeader.append('\t');
+ m_aJavaList.InsertHeaderEntry( sHeader.makeStringAndClear(), HEADERBAR_APPEND, HIB_LEFT );
m_aJavaList.SetHelpId( HID_OPTIONS_JAVA_LIST );
@@ -476,14 +477,15 @@ void SvxJavaOptionsPage::LoadJREs()
void SvxJavaOptionsPage::AddJRE( JavaInfo* _pInfo )
{
- String sEntry( '\t' );
- sEntry += String( ::rtl::OUString( _pInfo->sVendor ) );
- sEntry += '\t';
- sEntry += String( ::rtl::OUString( _pInfo->sVersion ) );
- sEntry += '\t';
+ rtl::OUStringBuffer sEntry;
+ sEntry.append('\t');
+ sEntry.append(_pInfo->sVendor);
+ sEntry.append('\t');
+ sEntry.append(_pInfo->sVersion);
+ sEntry.append('\t');
if ( ( _pInfo->nFeatures & JFW_FEATURE_ACCESSBRIDGE ) == JFW_FEATURE_ACCESSBRIDGE )
- sEntry += m_sAccessibilityText;
- SvLBoxEntry* pEntry = m_aJavaList.InsertEntry( sEntry );
+ sEntry.append(m_sAccessibilityText);
+ SvLBoxEntry* pEntry = m_aJavaList.InsertEntry(sEntry.makeStringAndClear());
INetURLObject aLocObj( ::rtl::OUString( _pInfo->sLocation ) );
String* pLocation = new String( aLocObj.getFSysPath( INetURLObject::FSYS_DETECT ) );
pEntry->SetUserData( pLocation );
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 2643aa44be48..21721156b606 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <sfx2/module.hxx>
#include <sfx2/request.hxx>
@@ -597,11 +598,11 @@ sal_Bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet& )
pOpt->bChgEnumNum = bCheck;
bModified |= aBulletFont != pOpt->aBulletFont;
pOpt->aBulletFont = aBulletFont;
- bModified |= String(pOpt->cBullet) != sBulletChar;
+ bModified |= !comphelper::string::equals(sBulletChar, pOpt->cBullet);
pOpt->cBullet = sBulletChar.GetChar(0);
bModified |= aByInputBulletFont != pOpt->aByInputBulletFont;
- bModified |= String(pOpt->cByInputBullet) != sByInputBulletChar;
+ bModified |= !comphelper::string::equals(sByInputBulletChar, pOpt->cByInputBullet);
pOpt->aByInputBulletFont = aByInputBulletFont;
pOpt->cByInputBullet = sByInputBulletChar.GetChar(0);
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 7e82b1cfdd1d..87044935b294 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -701,7 +701,7 @@ void SvxBackgroundTabPage::FillUserData()
*/
{
- SetUserData( String( aBtnPreview.IsChecked() ? sal_Unicode('1') : sal_Unicode('0') ) );
+ SetUserData( aBtnPreview.IsChecked() ? rtl::OUString('1') : rtl::OUString('0') );
}
//------------------------------------------------------------------------
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 98b00b6a95c9..55b1180fcae7 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3576,7 +3576,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart )
if ( !bFound )
{
- nEntryPos = pBox->InsertEntry( String( cBracket ) );
+ nEntryPos = pBox->InsertEntry( rtl::OUString(cBracket) );
pBox->SelectEntryPos( nEntryPos );
}
}
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index e909c1706886..6008b63d72f3 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2311,7 +2311,7 @@ sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
aBulletColor.Invert();
aFont.SetColor(aBulletColor);
pVDev->SetFont( aFont );
- String aText(sal_Unicode(rFmt.GetBulletChar()));
+ rtl::OUString aText(rFmt.GetBulletChar());
long nY = nYStart;
nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
pVDev->DrawText( Point(nXStart, nY), aText );
@@ -2463,7 +2463,7 @@ void SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
{
pVDev->SetFont(aStdFont);
- String aText(' ');
+ rtl::OUString aText(' ');
pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
}
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index ecb0461cdf7c..58784d8afceb 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -463,7 +463,7 @@ void SvxTabulatorTabPage::SetFillAndTabType_Impl()
pTypeBtn = &aDezTab;
aDezChar.Enable();
aDezCharLabel.Enable();
- aDezChar.SetText( String( (sal_Unicode)aAktTab.GetDecimal() ) );
+ aDezChar.SetText( rtl::OUString( (sal_Unicode)aAktTab.GetDecimal() ) );
}
else if ( aAktTab.GetAdjustment() == SVX_TAB_ADJUST_CENTER )
pTypeBtn = &aCenterTab;
@@ -486,7 +486,7 @@ void SvxTabulatorTabPage::SetFillAndTabType_Impl()
{
pFillBtn = &aFillSpecial;
aFillChar.Enable();
- aFillChar.SetText( String( (sal_Unicode)aAktTab.GetFill() ) );
+ aFillChar.SetText( rtl::OUString( (sal_Unicode)aAktTab.GetFill() ) );
}
pFillBtn->Check();
}
@@ -628,7 +628,7 @@ IMPL_LINK( SvxTabulatorTabPage, TabTypeCheckHdl_Impl, RadioButton *, pBox )
eAdj = SVX_TAB_ADJUST_DECIMAL;
aDezChar.Enable();
aDezCharLabel.Enable();
- aDezChar.SetText( String( (sal_Unicode)aAktTab.GetDecimal() ) );
+ aDezChar.SetText( rtl::OUString( (sal_Unicode)aAktTab.GetDecimal() ) );
}
aAktTab.GetAdjustment() = eAdj;