summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/ui/chrdlg/break.cxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx6
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx30
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx8
4 files changed, 23 insertions, 23 deletions
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 032bdd69eb04..fb0cd627366d 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -163,7 +163,7 @@ SwBreakDlg::SwBreakDlg( Window *pParent, SwWrtShell &rS )
::InsertStringSorted(rPageDesc.GetName(), *m_pPageCollBox, 1 );
}
- String aFmtName;
+ OUString aFmtName;
for(i = RES_POOLPAGE_BEGIN; i < RES_POOLPAGE_END; ++i)
if(LISTBOX_ENTRY_NOTFOUND == m_pPageCollBox->GetEntryPos( aFmtName =
SwStyleNameMapper::GetUIName( i, aFmtName )))
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index fea0de728ba0..5df7743faef2 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -249,15 +249,15 @@ sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
bModified |= m_pTargetFrmLB->GetSavedValue() != m_pTargetFrmLB->GetText();
// set valid settings first
- String sEntry = m_pVisitedLB->GetSelectEntry();
+ OUString sEntry = m_pVisitedLB->GetSelectEntry();
sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetVisitedFmtId(nId);
- aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry);
+ aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyOUStr : sEntry);
sEntry = m_pNotVisitedLB->GetSelectEntry();
nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
aINetFmt.SetINetFmtId( nId );
- aINetFmt.SetINetFmt(nId == RES_POOLCHR_INET_NORMAL ? aEmptyStr : sEntry);
+ aINetFmt.SetINetFmt(nId == RES_POOLCHR_INET_NORMAL ? aEmptyOUStr : sEntry);
if( pINetItem && !pINetItem->GetMacroTable().empty() )
aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() );
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index e45f21e61b53..c3e9bc0ca303 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -64,8 +64,8 @@ static sal_uInt16 aPageRg[] = {
class SwDropCapsPict : public Control
{
SwDropCapsPage* mpPage;
- String maText;
- String maScriptText;
+ OUString maText;
+ OUString maScriptText;
Color maBackColor;
Color maTextLineColor;
sal_uInt8 mnLines;
@@ -126,7 +126,7 @@ public:
void SetText( const OUString& rT );
void SetLines( sal_uInt8 nL );
void SetDistance( sal_uInt16 nD );
- void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
+ void SetValues( const OUString& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
void DrawPrev( const Point& rPt );
};
@@ -165,7 +165,7 @@ void SwDropCapsPict::SetDistance( sal_uInt16 nD )
UpdatePaintSettings();
}
-void SwDropCapsPict::SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance )
+void SwDropCapsPict::SetValues( const OUString& rText, sal_uInt8 nLines, sal_uInt16 nDistance )
{
maText = rText;
mnLines = nLines;
@@ -187,7 +187,7 @@ void SwDropCapsPict::InitPrinter( void )
String GetDefaultString(sal_uInt16 nChars)
{
- String aStr;
+ OUString aStr;
for (sal_uInt16 i = 0; i < nChars; i++)
aStr += OUString((char) (i + 65));
return aStr;
@@ -219,7 +219,7 @@ void SwDropCapsPict::GetFirstScriptSegment(xub_StrLen &start, xub_StrLen &end, s
start = 0;
if( maScriptChanges.empty() )
{
- end = maText.Len();
+ end = maText.getLength();
scriptType = css::i18n::ScriptType::LATIN;
}
else
@@ -237,7 +237,7 @@ void SwDropCapsPict::GetFirstScriptSegment(xub_StrLen &start, xub_StrLen &end, s
/// @returns True if there was a next segment, false if not.
bool SwDropCapsPict::GetNextScriptSegment(size_t &nIdx, xub_StrLen &start, xub_StrLen &end, sal_uInt16 &scriptType)
{
- if (maScriptChanges.empty() || nIdx >= maScriptChanges.size() - 1 || end >= maText.Len())
+ if (maScriptChanges.empty() || nIdx >= maScriptChanges.size() - 1 || end >= maText.getLength())
return false;
start = maScriptChanges[nIdx++].changePos;
end = maScriptChanges[ nIdx ].changePos;
@@ -429,7 +429,7 @@ void SwDropCapsPict::CheckScript( void )
if( css::i18n::ScriptType::WEAK == nScript )
{
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
- if( nChg < maText.Len() )
+ if( nChg < maText.getLength() )
nScript = xBreak->getScriptType( maText, nChg );
else
nScript = css::i18n::ScriptType::LATIN;
@@ -440,7 +440,7 @@ void SwDropCapsPict::CheckScript( void )
nChg = (xub_StrLen)xBreak->endOfScript( maText, nChg, nScript );
maScriptChanges.push_back( _ScriptInfo(0, nScript, nChg) );
- if( nChg < maText.Len() )
+ if( nChg < maText.getLength() )
nScript = xBreak->getScriptType( maText, nChg );
else
break;
@@ -720,7 +720,7 @@ Page: SpinFields' Modify-Handler
IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
{
- String sPreview;
+ OUString sPreview;
// set text if applicable
if (pEdit == m_pDropCapsField)
@@ -741,11 +741,11 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
sPreview = rSh.GetDropTxt(nVal);
}
- String sEdit(m_pTextEdit->GetText());
+ OUString sEdit(m_pTextEdit->GetText());
- if (sEdit.Len() && sPreview.CompareTo(sEdit, sEdit.Len()) != COMPARE_EQUAL)
+ if (!sEdit.isEmpty() && !sPreview.startsWith(sEdit))
{
- sPreview = sEdit.Copy(0, sPreview.Len());
+ sPreview = sEdit.copy(0, sPreview.getLength());
bSetText = false;
}
@@ -827,10 +827,10 @@ void SwDropCapsPage::FillSet( SfxItemSet &rSet )
// Bug 24974: in designer/template catalog this doesn't make sense!!
if( !bFormat && m_pDropCapsBox->IsChecked() )
{
- String sText(m_pTextEdit->GetText());
+ OUString sText(m_pTextEdit->GetText());
if (!m_pWholeWordCB->IsChecked())
- sText.Erase( static_cast< xub_StrLen >(m_pDropCapsField->GetValue()));
+ sText = sText.copy( 0, m_pDropCapsField->GetValue());
SfxStringItem aStr(FN_PARAM_1, sText);
rSet.Put( aStr );
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 6a85de83f4ef..369f6c5fade7 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -288,17 +288,17 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
}
else
{
- String sTbEntry;
+ OUString sTbEntry;
SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
if(pE)
sTbEntry = m_pTbLinks->GetEntryText(pE);
- sTbEntry = sTbEntry.GetToken(1, '\t');
- String sStyle = m_pStyleLB->GetSelectEntry();
+ sTbEntry = sTbEntry.getToken(1, '\t');
+ OUString sStyle = m_pStyleLB->GetSelectEntry();
m_pAssignPB->Enable( sStyle != sTbEntry && m_pConditionCB->IsChecked() );
if(pBox != m_pStyleLB)
- m_pRemovePB->Enable( m_pConditionCB->IsChecked() && sTbEntry.Len() );
+ m_pRemovePB->Enable( m_pConditionCB->IsChecked() && !sTbEntry.isEmpty() );
}
return 0;
}