summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/basedlgs.hxx4
-rw-r--r--include/sfx2/childwin.hxx8
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx35
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx41
-rw-r--r--sd/source/ui/dlg/copydlg.cxx16
-rw-r--r--sfx2/source/appl/childwin.cxx45
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rw-r--r--sfx2/source/dialog/dockwin.cxx60
-rw-r--r--sfx2/source/doc/new.cxx14
-rw-r--r--sw/source/ui/dialog/ascfldlg.cxx26
-rw-r--r--sw/source/ui/inc/redlndlg.hxx2
-rw-r--r--sw/source/ui/misc/redlndlg.cxx10
12 files changed, 130 insertions, 135 deletions
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index 11854d21c31b..c4c939bda5d5 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -55,7 +55,7 @@ SFX2_DLLPUBLIC inline void reverseUniqueHelpIdHack(Window &rWindow)
class SFX2_DLLPUBLIC SfxModalDialog: public ModalDialog
{
sal_uInt32 nUniqId;
- String aExtraData;
+ OUString aExtraData;
const SfxItemSet* pInputSet;
SfxItemSet* pOutputSet;
@@ -72,7 +72,7 @@ protected:
SfxModalDialog(Window *pParent, const OString& rID, const OUString& rUIXMLDescription);
SfxModalDialog(Window* pParent, sal_uInt32 nUniqueId, WinBits nWinStyle = WB_STDMODAL );
- String& GetExtraData() { return aExtraData; }
+ OUString& GetExtraData() { return aExtraData; }
sal_uInt32 GetUniqId() const { return nUniqId; }
void SetUniqId(sal_uInt32 nSettingsId) { nUniqId = nSettingsId; }
SfxItemSet* GetItemSet() { return pOutputSet; }
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index d0c5e50fce1f..236f4bd52582 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -50,12 +50,12 @@ class SfxChildWindowContext;
// ChildWindow Configuration
struct SfxChildWinInfo
{
- sal_Bool bVisible;
+ sal_Bool bVisible;
Point aPos;
Size aSize;
- sal_uInt16 nFlags;
- String aExtraString;
- OString aWinState;
+ sal_uInt16 nFlags;
+ OUString aExtraString;
+ OString aWinState;
SfxChildWinInfo()
{
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index bb5cb9a77ef0..933a9ef30357 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -1054,28 +1054,27 @@ IMPL_LINK_NOARG(ScFunctionDockWin, TimerHdl)
void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
{
- String aStr;
+ OUString aStr;
if(pInfo!=NULL)
{
- if ( pInfo->aExtraString.Len() )
+ if ( !pInfo->aExtraString.isEmpty() )
{
- xub_StrLen nPos = pInfo->aExtraString.Search(
- OUString("ScFuncList:"));
+ sal_Int32 nPos = pInfo->aExtraString.indexOf( "ScFuncList:" );
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
- if ( nPos != STRING_NOTFOUND )
+ if ( nPos != -1 )
{
- xub_StrLen n1 = pInfo->aExtraString.Search('(', nPos);
- if ( n1 != STRING_NOTFOUND )
+ sal_Int32 n1 = pInfo->aExtraString.indexOf('(', nPos);
+ if ( n1 != -1 )
{
- xub_StrLen n2 = pInfo->aExtraString.Search(')', n1);
- if ( n2 != STRING_NOTFOUND )
+ sal_Int32 n2 = pInfo->aExtraString.indexOf(')', n1);
+ if ( n2 != -1 )
{
// Alignment-String herausschneiden
- aStr = pInfo->aExtraString.Copy(nPos, n2 - nPos + 1);
- pInfo->aExtraString.Erase(nPos, n2 - nPos + 1);
- aStr.Erase(0, n1-nPos+1);
+ aStr = pInfo->aExtraString.copy(nPos, n2 - nPos + 1);
+ pInfo->aExtraString = pInfo->aExtraString.replaceAt(nPos, n2 - nPos + 1, "");
+ aStr = aStr.copy( n1-nPos+1 );
}
}
}
@@ -1083,13 +1082,13 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo)
}
SfxDockingWindow::Initialize(pInfo);
- if ( aStr.Len())
+ if ( !aStr.isEmpty())
{
- aSplitterInitPos=aPrivatSplit.GetPosPixel();
- aSplitterInitPos.Y()=(sal_uInt16) aStr.ToInt32();
- xub_StrLen n1 = aStr.Search(';');
- aStr.Erase(0, n1+1);
- sal_uInt16 nSelPos=sal::static_int_cast<sal_uInt16>( aStr.ToInt32() );
+ aSplitterInitPos = aPrivatSplit.GetPosPixel();
+ aSplitterInitPos.Y() = (sal_uInt16) aStr.toInt32();
+ sal_Int32 n1 = aStr.indexOf(';');
+ aStr = aStr.copy( n1+1 );
+ sal_uInt16 nSelPos = sal::static_int_cast<sal_uInt16>( aStr.toInt32() );
aCatBox.SelectEntryPos(nSelPos);
SelHdl(&aCatBox);
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index 360882eaf338..d3b1069763a7 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1787,28 +1787,27 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl)
void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
{
- String aStr;
+ OUString aStr;
if(pInfo!=NULL)
{
- if ( pInfo->aExtraString.Len() )
+ if ( !pInfo->aExtraString.isEmpty() )
{
- xub_StrLen nPos = pInfo->aExtraString.Search(
- OUString("AcceptChgDat:"));
+ sal_Int32 nPos = pInfo->aExtraString.indexOf("AcceptChgDat:");
// Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
// er nicht vorhanden ist, liegt eine "altere Version vor
- if ( nPos != STRING_NOTFOUND )
+ if ( nPos != -1 )
{
- xub_StrLen n1 = pInfo->aExtraString.Search('(', nPos);
- if ( n1 != STRING_NOTFOUND )
+ sal_Int32 n1 = pInfo->aExtraString.indexOf('(', nPos);
+ if ( n1 != -1 )
{
- xub_StrLen n2 = pInfo->aExtraString.Search(')', n1);
- if ( n2 != STRING_NOTFOUND )
+ sal_Int32 n2 = pInfo->aExtraString.indexOf(')', n1);
+ if ( n2 != -1 )
{
// Alignment-String herausschneiden
- aStr = pInfo->aExtraString.Copy(nPos, n2 - nPos + 1);
- pInfo->aExtraString.Erase(nPos, n2 - nPos + 1);
- aStr.Erase(0, n1-nPos+1);
+ aStr = pInfo->aExtraString.copy(nPos, n2 - nPos + 1);
+ pInfo->aExtraString = pInfo->aExtraString.replaceAt(nPos, n2 - nPos + 1, "");
+ aStr = aStr.copy( n1-nPos+1 );
}
}
}
@@ -1816,15 +1815,15 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
}
SfxModelessDialog::Initialize(pInfo);
- if ( aStr.Len())
+ if ( !aStr.isEmpty())
{
- sal_uInt16 nCount=(sal_uInt16)aStr.ToInt32();
+ sal_uInt16 nCount=(sal_uInt16)aStr.toInt32();
for(sal_uInt16 i=0;i<nCount;i++)
{
- xub_StrLen n1 = aStr.Search(';');
- aStr.Erase(0, n1+1);
- pTheView->SetTab(i,(sal_uInt16)aStr.ToInt32(),MAP_PIXEL);
+ sal_Int32 n1 = aStr.indexOf(';');
+ aStr = aStr.copy( n1+1 );
+ pTheView->SetTab(i, (sal_uInt16)aStr.toInt32(), MAP_PIXEL);
}
}
}
@@ -1834,18 +1833,18 @@ void ScAcceptChgDlg::Initialize(SfxChildWinInfo *pInfo)
void ScAcceptChgDlg::FillInfo(SfxChildWinInfo& rInfo) const
{
SfxModelessDialog::FillInfo(rInfo);
- rInfo.aExtraString.AppendAscii(RTL_CONSTASCII_STRINGPARAM( "AcceptChgDat:(" ));
+ rInfo.aExtraString += "AcceptChgDat:(";
sal_uInt16 nCount=pTheView->TabCount();
rInfo.aExtraString += OUString::number(nCount);
- rInfo.aExtraString += ';';
+ rInfo.aExtraString += ";";
for(sal_uInt16 i=0;i<nCount;i++)
{
rInfo.aExtraString += OUString::number(pTheView->GetTab(i));
- rInfo.aExtraString += ';';
+ rInfo.aExtraString += ";";
}
- rInfo.aExtraString += ')';
+ rInfo.aExtraString += ")";
}
void ScAcceptChgDlg::InitFilter()
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 14c64aa8e60b..40145feaf3d3 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -87,28 +87,28 @@ CopyDlg::CopyDlg(::Window* pWindow, const SfxItemSet& rInAttrs,
CopyDlg::~CopyDlg()
{
- String& rStr = GetExtraData();
+ OUString& rStr = GetExtraData();
rStr = OUString::number(m_pNumFldCopies->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString(TOKEN);
rStr += OUString::number(m_pMtrFldMoveX->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number(m_pMtrFldMoveY->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number(m_pMtrFldAngle->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number(m_pMtrFldWidth->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number(m_pMtrFldHeight->GetValue());
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number( m_pLbStartColor->GetSelectEntryColor().GetColor() );
- rStr.Append( TOKEN );
+ rStr += OUString( TOKEN );
rStr += OUString::number( m_pLbEndColor->GetSelectEntryColor().GetColor() );
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 9740cad2b9ba..793c7dc81085 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -282,7 +282,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
aWinData.append('V').append(static_cast<sal_Int32>(nVersion)).
append(',').append(rInfo.bVisible ? 'V' : 'H').append(',').
append(static_cast<sal_Int32>(rInfo.nFlags));
- if ( rInfo.aExtraString.Len() )
+ if ( !rInfo.aExtraString.isEmpty() )
{
aWinData.append(',');
aWinData.append(rInfo.aExtraString);
@@ -566,50 +566,47 @@ sal_Bool SfxChildWinInfo::GetExtraData_Impl
) const
{
// invalid?
- if ( !aExtraString.Len() )
+ if ( aExtraString.isEmpty() )
return sal_False;
- String aStr;
- sal_uInt16 nPos = aExtraString.SearchAscii("AL:");
- if ( nPos == STRING_NOTFOUND )
+ OUString aStr;
+ sal_Int32 nPos = aExtraString.indexOf("AL:");
+ if ( nPos == -1 )
return sal_False;
// Try to read the alignment string "ALIGN :(...)", but if
// it is not present, then use an older version
- if ( nPos != STRING_NOTFOUND )
+ sal_Int32 n1 = aExtraString.indexOf('(', nPos);
+ if ( n1 != -1 )
{
- sal_uInt16 n1 = aExtraString.Search('(', nPos);
- if ( n1 != STRING_NOTFOUND )
+ sal_Int32 n2 = aExtraString.indexOf(')', n1);
+ if ( n2 != -1 )
{
- sal_uInt16 n2 = aExtraString.Search(')', n1);
- if ( n2 != STRING_NOTFOUND )
- {
- // Cut out Alignment string
- aStr = aExtraString.Copy(nPos, n2 - nPos + 1);
- aStr.Erase(nPos, n1-nPos+1);
- }
+ // Cut out Alignment string
+ aStr = aExtraString.copy(nPos, n2 - nPos + 1);
+ aStr = aStr.replaceAt(nPos, n1-nPos+1, "");
}
}
// First extract the Alignment
- if ( !aStr.Len() )
+ if ( aStr.isEmpty() )
return sal_False;
if ( pAlign )
- *pAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
+ *pAlign = (SfxChildAlignment) (sal_uInt16) aStr.toInt32();
// then the LastAlignment
- nPos = aStr.Search(',');
- if ( nPos == STRING_NOTFOUND )
+ nPos = aStr.indexOf(',');
+ if ( nPos == -1 )
return sal_False;
- aStr.Erase(0, nPos+1);
+ aStr = aStr.copy(nPos+1);
if ( pLastAlign )
- *pLastAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
+ *pLastAlign = (SfxChildAlignment) (sal_uInt16) aStr.toInt32();
// Then the splitting information
- nPos = aStr.Search(',');
- if ( nPos == STRING_NOTFOUND )
+ nPos = aStr.indexOf(',');
+ if ( nPos == -1 )
// No docking in a Splitwindow
return sal_True;
- aStr.Erase(0, nPos+1);
+ aStr = aStr.copy(nPos+1);
Point aChildPos;
Size aChildSize;
if ( GetPosSizeFromString( aStr, aChildPos, aChildSize ) )
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 4f52052bc6c1..0f54b058dd74 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -101,8 +101,8 @@ void SfxModalDialog::SetDialogData_Impl()
SvtViewOptions aDlgOpt( E_DIALOG, OUString::number( nUniqId ) );
aDlgOpt.SetWindowState(OStringToOUString(
GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US));
- if ( aExtraData.Len() )
- aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aExtraData ) ) );
+ if ( !aExtraData.isEmpty() )
+ aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( aExtraData ) );
}
// -----------------------------------------------------------------------
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index abfb482c2f85..e321ea38faa9 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -981,38 +981,38 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
}
sal_Bool bVertHorzRead( sal_False );
- if ( pInfo->aExtraString.Len() )
+ if ( !pInfo->aExtraString.isEmpty() )
{
// get information about alignment, split size and position in SplitWindow
- String aStr;
- sal_uInt16 nPos = pInfo->aExtraString.SearchAscii("AL:");
- if ( nPos != STRING_NOTFOUND )
+ OUString aStr;
+ sal_Int32 nPos = pInfo->aExtraString.indexOf("AL:");
+ if ( nPos != -1 )
{
// alignment information
- sal_uInt16 n1 = pInfo->aExtraString.Search('(', nPos);
- if ( n1 != STRING_NOTFOUND )
+ sal_Int32 n1 = pInfo->aExtraString.indexOf('(', nPos);
+ if ( n1 != -1 )
{
- sal_uInt16 n2 = pInfo->aExtraString.Search(')', n1);
- if ( n2 != STRING_NOTFOUND )
+ sal_Int32 n2 = pInfo->aExtraString.indexOf(')', n1);
+ if ( n2 != -1 )
{
// extract alignment information from extrastring
- aStr = pInfo->aExtraString.Copy(nPos, n2 - nPos + 1);
- pInfo->aExtraString.Erase(nPos, n2 - nPos + 1);
- aStr.Erase(nPos, n1-nPos+1);
+ aStr = pInfo->aExtraString.copy(nPos, n2 - nPos + 1);
+ pInfo->aExtraString = pInfo->aExtraString.replaceAt(nPos, n2 - nPos + 1, "");
+ aStr = aStr.replaceAt(nPos, n1-nPos+1, "");
}
}
}
- if ( aStr.Len() )
+ if ( !aStr.isEmpty() )
{
// accept window state only if alignment is also set
pImp->aWinState = pInfo->aWinState;
// check for valid alignment
- SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
+ SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.toInt32();
if ( pImp->bDockingPrevented )
// docking prevented, ignore old configuration and take alignment from default
- aStr.Erase();
+ aStr = "";
else
SetAlignment( eLocalAlignment );
@@ -1021,23 +1021,23 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
OSL_FAIL("Invalid Alignment!");
SetAlignment( eAlign );
- aStr.Erase();
+ aStr = "";
}
// get last alignment (for toggeling)
- nPos = aStr.Search(',');
- if ( nPos != STRING_NOTFOUND )
+ nPos = aStr.indexOf(',');
+ if ( nPos != -1 )
{
- aStr.Erase(0, nPos+1);
- pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.ToInt32() );
+ aStr = aStr.copy(nPos+1);
+ pImp->SetLastAlignment( (SfxChildAlignment) (sal_uInt16) aStr.toInt32() );
}
- nPos = aStr.Search(',');
- if ( nPos != STRING_NOTFOUND )
+ nPos = aStr.indexOf(',');
+ if ( nPos != -1 )
{
// get split size and position in SplitWindow
Point aPos;
- aStr.Erase(0, nPos+1);
+ aStr = aStr.copy(nPos+1);
if ( GetPosSizeFromString( aStr, aPos, pImp->aSplitSize ) )
{
pImp->nLine = pImp->nDockLine = (sal_uInt16) aPos.X();
@@ -1200,26 +1200,26 @@ void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
rInfo.aWinState = pImp->aWinState;
rInfo.aExtraString = "AL:(";
rInfo.aExtraString += OUString::number((sal_uInt16) GetAlignment());
- rInfo.aExtraString += ',';
+ rInfo.aExtraString += ",";
rInfo.aExtraString += OUString::number ((sal_uInt16) pImp->GetLastAlignment());
if ( pImp->bSplitable )
{
Point aPos(pImp->nLine, pImp->nPos);
- rInfo.aExtraString += ',';
+ rInfo.aExtraString += ",";
rInfo.aExtraString += OUString::number( aPos.X() );
- rInfo.aExtraString += '/';
+ rInfo.aExtraString += "/";
rInfo.aExtraString += OUString::number( aPos.Y() );
- rInfo.aExtraString += '/';
+ rInfo.aExtraString += "/";
rInfo.aExtraString += OUString::number( pImp->nHorizontalSize );
- rInfo.aExtraString += '/';
+ rInfo.aExtraString += "/";
rInfo.aExtraString += OUString::number( pImp->nVerticalSize );
- rInfo.aExtraString += ',';
+ rInfo.aExtraString += ",";
rInfo.aExtraString += OUString::number( pImp->aSplitSize.Width() );
- rInfo.aExtraString += ';';
+ rInfo.aExtraString += ";";
rInfo.aExtraString += OUString::number( pImp->aSplitSize.Height() );
}
- rInfo.aExtraString += ')';
+ rInfo.aExtraString += ")";
}
//-------------------------------------------------------------------------
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index ab6002d1a120..76f5ad11382f 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -523,12 +523,12 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
}
}
- String &rExtra = pAntiImplP->GetExtraData();
+ OUString &rExtra = pAntiImplP->GetExtraData();
sal_Int32 nTokCount = comphelper::string::getTokenCount(rExtra, '|');
if( nTokCount > 0 && nFlags )
- MORE_BTN(SetState(comphelper::string::equals(rExtra.GetToken( 0, '|'), 'Y')));
+ MORE_BTN(SetState(comphelper::string::equals(rExtra.getToken( 0, '|'), 'Y')));
if( nTokCount > 1 && nFlags )
- aPreviewBtn.Check(comphelper::string::equals(rExtra.GetToken( 1 ,'|'), 'Y'));
+ aPreviewBtn.Check(comphelper::string::equals(rExtra.getToken( 1 ,'|'), 'Y'));
aTemplateLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, TemplateSelect));
aTemplateLb.SetDoubleClickHdl(LINK(this, SfxNewFileDialog_Impl, DoubleClick));
@@ -558,10 +558,10 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
{
- String &rExtra = pAntiImpl->GetExtraData();
- rExtra = MORE_BTN(GetState()) ? 'Y' : 'N';
- rExtra += '|';
- rExtra += aPreviewBtn.IsChecked() ? 'Y' : 'N';
+ OUString &rExtra = pAntiImpl->GetExtraData();
+ rExtra = MORE_BTN(GetState()) ? "Y" : "N";
+ rExtra += "|";
+ rExtra += aPreviewBtn.IsChecked() ? "Y" : "N";
delete pMoreBt;
}
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index d6ca744acfe8..8929bb968906 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -71,16 +71,16 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh,
const OUString sFindNm = OUString::createFromAscii(
pStream ? sDialogImpExtraData
: sDialogExpExtraData);
- sal_uInt16 nEnd, nStt = GetExtraData().Search( sFindNm );
- if( STRING_NOTFOUND != nStt )
+ sal_Int32 nEnd, nStt = GetExtraData().indexOf( sFindNm );
+ if( -1 != nStt )
{
nStt += nDialogExtraDataLen;
- nEnd = GetExtraData().Search( cDialogExtraDataClose, nStt );
- if( STRING_NOTFOUND != nEnd )
+ nEnd = GetExtraData().indexOf( cDialogExtraDataClose, nStt );
+ if( -1 != nEnd )
{
- aOpt.ReadUserData( GetExtraData().Copy( nStt, nEnd - nStt ));
+ aOpt.ReadUserData( GetExtraData().copy( nStt, nEnd - nStt ));
nStt -= nDialogExtraDataLen;
- GetExtraData().Erase( nStt, nEnd - nStt + 1 );
+ GetExtraData() = GetExtraData().replaceAt( nStt, nEnd - nStt + 1, "" );
}
}
}
@@ -266,19 +266,19 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions )
const OUString sFindNm = OUString::createFromAscii(
m_pFontLB->IsVisible() ? sDialogImpExtraData
: sDialogExpExtraData);
- sal_uInt16 nEnd, nStt = GetExtraData().Search( sFindNm );
- if( STRING_NOTFOUND != nStt )
+ sal_Int32 nEnd, nStt = GetExtraData().indexOf( sFindNm );
+ if( -1 != nStt )
{
// called twice, so remove "old" settings
- nEnd = GetExtraData().Search( cDialogExtraDataClose,
+ nEnd = GetExtraData().indexOf( cDialogExtraDataClose,
nStt + nDialogExtraDataLen );
- if( STRING_NOTFOUND != nEnd )
- GetExtraData().Erase( nStt, nEnd - nStt + 1 );
+ if( -1 != nEnd )
+ GetExtraData() = GetExtraData().replaceAt( nStt, nEnd - nStt + 1, "" );
}
- String sTmp(GetExtraData());
+ OUString sTmp(GetExtraData());
sTmp += sFindNm;
sTmp += sData;
- sTmp += cDialogExtraDataClose;
+ sTmp += OUString(cDialogExtraDataClose);
GetExtraData() = sTmp;
}
}
diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index f7e14079a13f..41671a60b0c2 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -127,7 +127,7 @@ public:
void CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept );
void Initialize(const String &rExtraData);
- void FillInfo(String &rExtraData) const;
+ void FillInfo(OUString &rExtraData) const;
virtual void Activate();
};
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index c5c556d8039e..870ca9ace524 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -1196,20 +1196,20 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData)
}
}
-void SwRedlineAcceptDlg::FillInfo(String &rExtraData) const
+void SwRedlineAcceptDlg::FillInfo(OUString &rExtraData) const
{
- rExtraData.AppendAscii("AcceptChgDat:(");
+ rExtraData += "AcceptChgDat:(";
sal_uInt16 nCount = pTable->TabCount();
rExtraData += OUString::number(nCount);
- rExtraData += ';';
+ rExtraData += ";";
for(sal_uInt16 i = 0; i < nCount; i++)
{
rExtraData += OUString::number( pTable->GetTab(i) );
- rExtraData += ';';
+ rExtraData += ";";
}
- rExtraData += ')';
+ rExtraData += ")";
}