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