Kaydet (Commit) 568c45f3 authored tarafından Noel Grandin's avatar Noel Grandin

convert sc/source/ui/inc/c*.hxx from String to OUString

Change-Id: I364aeba561a0f6688924fddc55634f83fe5045f6
üst b476614e
......@@ -52,7 +52,7 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(Window* pParent, ScDocument
SetSelectionMode(MULTIPLE_SELECTION);
}
String ScCondFormatManagerWindow::createEntryString(const ScConditionalFormat& rFormat)
OUString ScCondFormatManagerWindow::createEntryString(const ScConditionalFormat& rFormat)
{
ScRangeList aRange = rFormat.GetRange();
String aStr;
......
......@@ -501,10 +501,10 @@ void ScCsvGrid::SetTypeNames( const StringVec& rTypeNames )
::std::for_each( maColStates.begin(), maColStates.end(), Func_SetType( CSV_TYPE_DEFAULT ) );
}
const String& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const
const OUString& ScCsvGrid::GetColumnTypeName( sal_uInt32 nColIndex ) const
{
sal_uInt32 nTypeIx = static_cast< sal_uInt32 >( GetColumnType( nColIndex ) );
return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : EMPTY_STRING;
return (nTypeIx < maTypeNames.size()) ? maTypeNames[ nTypeIx ] : EMPTY_OUSTRING;
}
static sal_uInt8 lcl_GetExtColumnType( sal_Int32 nIntType )
......@@ -804,15 +804,15 @@ void ScCsvGrid::ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine )
InvalidateGfx();
}
const String& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const
const OUString& ScCsvGrid::GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const
{
if( nLine < GetFirstVisLine() ) return EMPTY_STRING;
if( nLine < GetFirstVisLine() ) return EMPTY_OUSTRING;
sal_uInt32 nLineIx = nLine - GetFirstVisLine();
if( nLineIx >= maTexts.size() ) return EMPTY_STRING;
if( nLineIx >= maTexts.size() ) return EMPTY_OUSTRING;
const StringVec& rStrVec = maTexts[ nLineIx ];
if( nColIndex >= rStrVec.size() ) return EMPTY_STRING;
if( nColIndex >= rStrVec.size() ) return EMPTY_OUSTRING;
return rStrVec[ nColIndex ];
}
......@@ -1061,7 +1061,7 @@ void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColInde
rOutDev.DrawLine( Point( nX2, 0 ), Point( nX2, nHdrHt ) );
}
void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText )
void ScCsvGrid::ImplDrawCellText( const Point& rPos, const OUString& rText )
{
String aPlainText( rText );
aPlainText.SearchAndReplaceAll( '\t', ' ' );
......@@ -1085,8 +1085,8 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText )
}
}
xub_StrLen nCharIx = 0;
while( (nCharIx = rText.Search( '\t', nCharIx )) != STRING_NOTFOUND )
sal_Int32 nCharIx = 0;
while( (nCharIx = rText.indexOf( '\t', nCharIx )) != -1 )
{
sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx;
sal_Int32 nX2 = nX1 + GetCharWidth() - 2;
......@@ -1099,7 +1099,7 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const String& rText )
++nCharIx;
}
nCharIx = 0;
while( (nCharIx = rText.Search( '\n', nCharIx )) != STRING_NOTFOUND )
while( (nCharIx = rText.indexOf( '\n', nCharIx )) != -1 )
{
sal_Int32 nX1 = rPos.X() + GetCharWidth() * nCharIx;
sal_Int32 nX2 = nX1 + GetCharWidth() - 2;
......@@ -1158,7 +1158,7 @@ void ScCsvGrid::ImplDrawColumnBackgr( sal_uInt32 nColIndex )
for( size_t nLine = 0; nLine < nLineCount; ++nLine )
{
StringVec& rStrVec = maTexts[ nLine ];
if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].Len() > nStrPos) )
if( (nColIndex < rStrVec.size()) && (rStrVec[ nColIndex ].getLength() > nStrPos) )
{
String aText( rStrVec[ nColIndex ], nStrPos, nStrLen );
ImplDrawCellText( Point( nStrX, GetY( GetFirstVisLine() + nLine ) ), aText );
......
......@@ -190,7 +190,7 @@ void ScCsvTableBox::MakePosVisible( sal_Int32 nPos )
// cell contents --------------------------------------------------------------
void ScCsvTableBox::SetUniStrings(
const OUString* pTextLines, const String& rSepChars,
const OUString* pTextLines, const OUString& rSepChars,
sal_Unicode cTextSep, bool bMergeSep )
{
// assuming that pTextLines is a string array with size CSV_PREVIEW_LINES
......
......@@ -54,8 +54,8 @@ private:
void GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats );
void ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
const OUString& _rFile, const OUString& _rFilter, const OUString& _rOptions,
const OUString& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
void ExecuteDataPilotDialog();
void ExecuteXMLSourceDialog();
......
......@@ -25,7 +25,7 @@ class ScCondFormatManagerWindow : public SvTabListBox
{
private:
void Init();
String createEntryString(const ScConditionalFormat& rFormat);
OUString createEntryString(const ScConditionalFormat& rFormat);
HeaderBar maHeaderBar;
ScDocument* mpDoc;
......
......@@ -148,10 +148,10 @@ private:
CancelButton maBtnCancel;
HelpButton maBtnHelp;
String maStrTitleConflict;
String maStrTitleAuthor;
String maStrTitleDate;
String maStrUnknownUser;
OUString maStrTitleConflict;
OUString maStrTitleAuthor;
OUString maStrTitleDate;
OUString maStrUnknownUser;
ScViewData* mpViewData;
ScDocument* mpOwnDoc;
......@@ -165,8 +165,8 @@ private:
bool mbInSelectHdl;
bool mbInDeselectHdl;
String GetConflictString( const ScConflictsListEntry& rConflictEntry );
String GetActionString( const ScChangeAction* pAction, ScDocument* pDoc );
OUString GetConflictString( const ScConflictsListEntry& rConflictEntry );
OUString GetActionString( const ScChangeAction* pAction, ScDocument* pDoc );
void HandleListBoxSelection( bool bSelectHandle );
void SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction );
......
......@@ -76,7 +76,7 @@ private:
PushButton* pBtnAdd;
PushButton* pBtnRemove;
String aStrUndefined;
OUString aStrUndefined;
ScConsolidateParam theConsData;
ScViewData* pViewData;
......
......@@ -51,7 +51,7 @@ class ScContentTree : public SvTreeListBox
sal_uInt16 nRootType; // set as Root
OUString aManualDoc; // Switched in Navigator (Title)
sal_Bool bHiddenDoc; // Hidden active?
String aHiddenName; // URL to load
OUString aHiddenName; // URL to load
OUString aHiddenTitle; // for display
ScDocument* pHiddenDocument; // temporary
......@@ -64,7 +64,7 @@ class ScContentTree : public SvTreeListBox
void InitRoot(sal_uInt16 nType);
void ClearType(sal_uInt16 nType);
void ClearAll();
void InsertContent( sal_uInt16 nType, const String& rValue );
void InsertContent( sal_uInt16 nType, const OUString& rValue );
void GetDrawNames( sal_uInt16 nType );
void GetTableNames();
......@@ -133,9 +133,9 @@ public:
void ActiveDocChanged();
void ResetManualDoc();
void SetManualDoc(const String& rName);
sal_Bool LoadFile(const String& rUrl);
void SelectDoc(const String& rName);
void SetManualDoc(const OUString& rName);
sal_Bool LoadFile(const OUString& rUrl);
void SelectDoc(const OUString& rName);
const OUString& GetHiddenTitle() const { return aHiddenTitle; }
......
......@@ -32,8 +32,8 @@ class ScColOrRowDlg : public ModalDialog
{
public:
ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
const OUString& rStrTitle,
const OUString& rStrLabel,
sal_Bool bColDefault = sal_True );
~ScColOrRowDlg();
......
......@@ -249,7 +249,7 @@ inline void ScCsvCmd::Set( ScCsvCmdType eType, sal_Int32 nParam1, sal_Int32 nPar
class SC_DLLPUBLIC ScCsvControl : public Control
{
protected:
typedef ::std::vector< String > StringVec;
typedef ::std::vector< OUString > StringVec;
typedef ::std::vector< StringVec > StringVecVec;
typedef ::com::sun::star::uno::Reference<
......
......@@ -211,7 +211,7 @@ public:
/** Sets new UI data type names. */
void SetTypeNames( const StringVec& rTypeNames );
/** Returns the UI type name of the specified column. */
const String& GetColumnTypeName( sal_uInt32 nColIndex ) const;
const OUString& GetColumnTypeName( sal_uInt32 nColIndex ) const;
/** Fills the options object with column data for separators mode. */
void FillColumnDataSep( ScAsciiOptions& rOptions ) const;
......@@ -274,7 +274,7 @@ public:
void ImplSetTextLineFix( sal_Int32 nLine, const OUString& rTextLine );
/** Returns the text of the specified cell. */
const String& GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const;
const OUString& GetCellText( sal_uInt32 nColIndex, sal_Int32 nLine ) const;
// event handling ---------------------------------------------------------
protected:
......@@ -313,7 +313,7 @@ private:
SC_DLLPRIVATE void ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColIndex, Color aFillColor );
/** Draws the text at the specified position to maBackgrDev. */
SC_DLLPRIVATE void ImplDrawCellText( const Point& rPos, const String& rText );
SC_DLLPRIVATE void ImplDrawCellText( const Point& rPos, const OUString& rText );
/** Draws the "first imported line" separator to maBackgrDev (or erases, if bSet is false). */
SC_DLLPRIVATE void ImplDrawFirstLineSep( bool bSet );
/** Draws the column with index nColIndex to maBackgrDev. */
......
......@@ -99,7 +99,7 @@ private:
public:
/** Fills all cells of all lines with the passed texts (Unicode strings). */
void SetUniStrings(
const OUString* pTextLines, const String& rSepChars,
const OUString* pTextLines, const OUString& rSepChars,
sal_Unicode cTextSep, bool bMergeSep );
// column settings --------------------------------------------------------
......
......@@ -462,7 +462,7 @@ ScConflictsDlg::~ScConflictsDlg()
{
}
String ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry )
OUString ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictEntry )
{
OUString aString;
if ( mpOwnTrack )
......@@ -477,7 +477,7 @@ String ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflictE
return aString;
}
String ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocument* pDoc )
OUString ScConflictsDlg::GetActionString( const ScChangeAction* pAction, ScDocument* pDoc )
{
String aString;
......
......@@ -32,8 +32,8 @@
//==================================================================
ScColOrRowDlg::ScColOrRowDlg( Window* pParent,
const String& rStrTitle,
const String& rStrLabel,
const OUString& rStrTitle,
const OUString& rStrLabel,
sal_Bool bColDefault )
: ModalDialog ( pParent, ScResId( RID_SCDLG_COLORROW ) ),
......
......@@ -183,7 +183,7 @@ void ScContentTree::ClearType(sal_uInt16 nType)
}
}
void ScContentTree::InsertContent( sal_uInt16 nType, const String& rValue )
void ScContentTree::InsertContent( sal_uInt16 nType, const OUString& rValue )
{
if (nType >= SC_CONTENT_COUNT)
{
......@@ -1260,7 +1260,7 @@ IMPL_STATIC_LINK(ScContentTree, ExecDragHdl, void*, EMPTYARG)
return 0;
}
sal_Bool ScContentTree::LoadFile( const String& rUrl )
sal_Bool ScContentTree::LoadFile( const OUString& rUrl )
{
String aDocName = rUrl;
xub_StrLen nPos = aDocName.Search('#');
......@@ -1367,7 +1367,7 @@ void ScContentTree::ActiveDocChanged()
pParentWindow->GetDocNames( &aCurrent ); // selektieren
}
void ScContentTree::SetManualDoc(const String& rName)
void ScContentTree::SetManualDoc(const OUString& rName)
{
aManualDoc = rName;
if (!bHiddenDoc)
......@@ -1377,7 +1377,7 @@ void ScContentTree::SetManualDoc(const String& rName)
}
}
void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Listbox angezeigt
void ScContentTree::SelectDoc(const OUString& rName) // rName wie im Menue/Listbox angezeigt
{
if ( rName == pParentWindow->aStrActiveWin )
{
......@@ -1388,13 +1388,13 @@ void ScContentTree::SelectDoc(const String& rName) // rName wie im Menue/Li
// "aktiv" oder "inaktiv" weglassen
String aRealName = rName;
xub_StrLen nLen = rName.Len();
xub_StrLen nLen = rName.getLength();
xub_StrLen nActiveStart = nLen - pParentWindow->aStrActive.getLength();
if ( rName.Copy( nActiveStart ) == pParentWindow->aStrActive )
aRealName = rName.Copy( 0, nActiveStart );
if ( rName.copy( nActiveStart ) == pParentWindow->aStrActive )
aRealName = rName.copy( 0, nActiveStart );
xub_StrLen nNotActiveStart = nLen - pParentWindow->aStrNotActive.getLength();
if ( rName.Copy( nNotActiveStart ) == pParentWindow->aStrNotActive )
aRealName = rName.Copy( 0, nNotActiveStart );
if ( rName.copy( nNotActiveStart ) == pParentWindow->aStrNotActive )
aRealName = rName.copy( 0, nNotActiveStart );
bool bLoaded = false;
......
......@@ -2437,10 +2437,10 @@ void ScCellShell::ExecuteRotateTrans( SfxRequest& rReq )
}
void ScCellShell::ExecuteExternalSource(
const String& _rFile, const String& _rFilter, const String& _rOptions,
const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest )
const OUString& _rFile, const OUString& _rFilter, const OUString& _rOptions,
const OUString& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest )
{
if ( _rFile.Len() && _rSource.Len() ) // filter may be empty
if ( !_rFile.isEmpty() && !_rSource.isEmpty() ) // filter may be empty
{
ScRange aLinkRange;
sal_Bool bMove = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment