convert sw/inc/crsrsh.hxx from String to OUString

Change-Id: Ic3e4e0372593bdc28705ebc8f8f462b062f3da3e
This commit is contained in:
Noel Grandin
2013-10-11 10:52:29 +02:00
parent d102b9ad59
commit 9eace9e083
7 changed files with 34 additions and 34 deletions

View File

@@ -118,7 +118,7 @@ struct SwContentAtPos
int nDist;
String sStr;
OUString sStr;
const SwTxtAttr* pFndTxtAttr;
SwContentAtPos( int eGetAtPos = 0xffff )
@@ -206,7 +206,7 @@ private:
sal_uInt16 m_nBasicActionCnt; ///< Actions which are parenthesized by Basic
CrsrMoveState m_eMvState; ///< Status for Crsr-Travelling - GetCrsrOfst
String m_sMarkedListId;
OUString m_sMarkedListId;
int m_nMarkedListLevel;
sal_Bool m_bHasFocus : 1; ///< Shell is "active" in a window
@@ -248,7 +248,7 @@ private:
An empty sListId denotes that no level of a list is marked.
*/
SW_DLLPRIVATE void MarkListLevel( const String& sListId,
SW_DLLPRIVATE void MarkListLevel( const OUString& sListId,
const int nLevel );
// private method(s) accessed from public inline method(s) must be exported.
@@ -579,10 +579,10 @@ public:
// get the selected text at the current cursor. it will be filled with
// fields etc.
String GetSelTxt() const;
OUString GetSelTxt() const;
// return only the text starting from the current cursor position (to the
// end of the node)
String GetText() const;
OUString GetText() const;
// Check of SPoint or Mark of current cursor are placed within a table.
inline const SwTableNode* IsCrsrInTbl( sal_Bool bIsPtInTbl = sal_True ) const;
@@ -595,13 +595,13 @@ public:
bool IsTblComplexForChart();
// get current table selection as text
String GetBoxNms() const;
OUString GetBoxNms() const;
// set Crsr to the next/previous cell
sal_Bool GoNextCell( sal_Bool bAppendLine = sal_True );
sal_Bool GoPrevCell();
// go to this box (if available and inside of table)
bool GotoTable( const String& rName );
bool GotoTable( const OUString& rName );
// select a table row, column or box (based on the current cursor)
sal_Bool SelTblRow() { return _SelTblRowOrCol( true ); }
@@ -613,7 +613,7 @@ public:
bool GotoNextNum();
bool GotoPrevNum();
bool GotoOutline( const String& rName );
bool GotoOutline( const OUString& rName );
// to the next/previous or the given OutlineNode
void GotoOutline( sal_uInt16 nIdx );
// find the "outline position" in the nodes array of the current chapter
@@ -686,7 +686,7 @@ public:
// on graphics
bool SelectNxtPrvHyperlink( bool bNext = true );
sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0,
sal_Bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0,
sal_uInt16 nSeqNo = 0 );
// get the nth character from the start or end of the current selection
@@ -751,7 +751,7 @@ public:
sal_Bool BasicActionPend() const { return m_nBasicActionCnt != mnStartAction; }
bool GotoRegion( const String& rName );
bool GotoRegion( const OUString& rName );
// show the current selection
virtual void MakeSelVisible();
@@ -833,7 +833,7 @@ public:
@return the textual description of the current selection
*/
String GetCrsrDescr() const;
OUString GetCrsrDescr() const;
SwRect GetRectOfCurrentChar();
};

View File

@@ -385,16 +385,16 @@ sal_Bool SwCrsrShell::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMo
return bRet;
}
void SwCrsrShell::MarkListLevel( const String& sListId,
void SwCrsrShell::MarkListLevel( const OUString& sListId,
const int nListLevel )
{
if ( sListId != m_sMarkedListId ||
nListLevel != m_nMarkedListLevel)
{
if ( m_sMarkedListId.Len() > 0 )
if ( !m_sMarkedListId.isEmpty() )
mpDoc->MarkListLevel( m_sMarkedListId, m_nMarkedListLevel, false );
if ( sListId.Len() > 0 )
if ( !sListId.isEmpty() )
{
mpDoc->MarkListLevel( sListId, nListLevel, true );
}
@@ -2154,9 +2154,9 @@ void SwCrsrShell::CallChgLnk()
}
/// get selected text of a node at current cursor
String SwCrsrShell::GetSelTxt() const
OUString SwCrsrShell::GetSelTxt() const
{
String aTxt;
OUString aTxt;
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
@@ -2172,9 +2172,9 @@ String SwCrsrShell::GetSelTxt() const
}
/// get text only from current cursor position (until end of node)
String SwCrsrShell::GetText() const
OUString SwCrsrShell::GetText() const
{
String aTxt;
OUString aTxt;
if( m_pCurCrsr->GetPoint()->nNode.GetIndex() ==
m_pCurCrsr->GetMark()->nNode.GetIndex() )
{
@@ -3177,12 +3177,12 @@ void SwCrsrShell::ClearUpCrsrs()
TblCrsrToCursor();
}
String SwCrsrShell::GetCrsrDescr() const
OUString SwCrsrShell::GetCrsrDescr() const
{
String aResult;
OUString aResult;
if (IsMultiSelection())
aResult += String(SW_RES(STR_MULTISEL));
aResult += SW_RES(STR_MULTISEL);
else
aResult = GetDoc()->GetPaMDescr(*GetCrsr());

View File

@@ -798,7 +798,7 @@ void SwCrsrShell::GotoOutline( sal_uInt16 nIdx )
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
}
bool SwCrsrShell::GotoOutline( const String& rName )
bool SwCrsrShell::GotoOutline( const OUString& rName )
{
SwCursor* pCrsr = getShellCrsr( true );
@@ -956,7 +956,7 @@ sal_Bool SwCrsrShell::MakeOutlineSel( sal_uInt16 nSttPos, sal_uInt16 nEndPos,
}
/// jump to reference marker
sal_Bool SwCrsrShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType,
sal_Bool SwCrsrShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType,
sal_uInt16 nSeqNo )
{
SET_CURR_SHELL( this );
@@ -1487,8 +1487,8 @@ sal_Bool SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if (!sAttrs.isEmpty())
{
if( rCntntAtPos.sStr.Len() )
rCntntAtPos.sStr += '\n';
if( !rCntntAtPos.sStr.isEmpty() )
rCntntAtPos.sStr += "\n";
rCntntAtPos.sStr += "Attr: " + sAttrs;
}
}

View File

@@ -255,7 +255,7 @@ bool SwCursor::GotoRegion( const OUString& rName )
return bRet;
}
bool SwCrsrShell::GotoRegion( const String& rName )
bool SwCrsrShell::GotoRegion( const OUString& rName )
{
SwCallLink aLk( *this ); // watch Crsr-Moves;call Link if needed
bool bRet = !m_pTblCrsr && m_pCurCrsr->GotoRegion( rName );

View File

@@ -704,9 +704,9 @@ bool SwCrsrShell::IsTblComplexForChart()
return bRet;
}
String SwCrsrShell::GetBoxNms() const
OUString SwCrsrShell::GetBoxNms() const
{
String sNm;
OUString sNm;
const SwPosition* pPos;
SwFrm* pFrm;
@@ -727,7 +727,7 @@ String SwCrsrShell::GetBoxNms() const
return sNm;
sNm = ((SwCellFrm*)pFrm)->GetTabBox()->GetName();
sNm += ':';
sNm += ":";
pPos = m_pTblCrsr->End();
}
else
@@ -753,7 +753,7 @@ String SwCrsrShell::GetBoxNms() const
return sNm;
}
bool SwCrsrShell::GotoTable( const String& rName )
bool SwCrsrShell::GotoTable( const OUString& rName )
{
SwCallLink aLk( *this ); // watch Crsr-Moves
bool bRet = !m_pTblCrsr && m_pCurCrsr->GotoTable( rName );

View File

@@ -462,7 +462,7 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig
//we may end up inside of a paragraph if the left margin is not at DEFAULT_LEFT_DISTANCE
rShell.MovePara(GetfnParaCurr(), GetfnParaStart());
}
bool bSplitNode = rShell.GetText().Len() > 0;
bool bSplitNode = !rShell.GetText().isEmpty();
sal_Int32 nMoves = rConfigItem.GetGreetingMoves();
if( !bExample && 0 != nMoves )
{

View File

@@ -702,11 +702,11 @@ IMPL_LINK( SwView, ScrollHdl, SwScrollbar *, pScrollbar )
OUString sPageStr( GetPageStr( nPhNum, nVirtNum, sDisplay ));
SwContentAtPos aCnt( SwContentAtPos::SW_OUTLINE );
m_pWrtShell->GetContentAtPos( aPos, aCnt );
if( aCnt.sStr.Len() )
if( !aCnt.sStr.isEmpty() )
{
sPageStr += OUString(" - ");
sal_Int32 nChunkLen = std::min<sal_Int32>(aCnt.sStr.Len(), 80);
OUString sChunk = aCnt.sStr.Copy(0, nChunkLen);
sal_Int32 nChunkLen = std::min<sal_Int32>(aCnt.sStr.getLength(), 80);
OUString sChunk = aCnt.sStr.copy(0, nChunkLen);
sPageStr = sChunk + sPageStr;
sPageStr = sPageStr.replace('\t', ' ');
sPageStr = sPageStr.replace(0x0a, ' ');