summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-08 13:50:33 +0200
committerNoel Grandin <noel@peralex.com>2013-10-10 09:18:59 +0200
commit066f564990398399b58e083efb260eac93121920 (patch)
tree17710d42eca9dcc27f4a906e3f6bc2793b59f431 /sw
parent6ada84236a211d77ec064b0bfdd8570cb10216e3 (diff)
convert sw/source/ui/inc/view.hxx from String to OUString
Change-Id: Id0f752b5c652e24b0a011c6fe69cba81c1e64b47
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/inc/view.hxx24
-rw-r--r--sw/source/ui/uiview/view.cxx10
-rw-r--r--sw/source/ui/uiview/view1.cxx4
-rw-r--r--sw/source/ui/uiview/view2.cxx24
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx10
-rw-r--r--sw/source/ui/uiview/viewling.cxx2
6 files changed, 37 insertions, 37 deletions
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index 93885d741b2c..d6f9d9a365b3 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -176,8 +176,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
SvxHtmlOptions m_aHTMLOpt;
Timer m_aTimer; // for delayed ChgLnks during an action
- String m_aPageStr; // status view, current page
- String m_sSwViewData,
+ OUString m_aPageStr; // status view, current page
+ OUString m_sSwViewData,
//and the new cursor position if the user double click in the PagePreView
m_sNewCrsrPos;
// to support keyboard the number of the page to go to can be set too
@@ -229,13 +229,13 @@ class SW_DLLPUBLIC SwView: public SfxViewShell
static const int m_nMASTERENUMCOMMANDS = 6;
- String m_aCurrShapeEnumCommand[ m_nMASTERENUMCOMMANDS ];
+ OUString m_aCurrShapeEnumCommand[ m_nMASTERENUMCOMMANDS ];
sal_uInt16 m_nPageCnt;
// current draw mode
sal_uInt16 m_nDrawSfxId;
- String m_sDrawCustom; //some drawing types are marked with strings!
+ OUString m_sDrawCustom; //some drawing types are marked with strings!
sal_uInt16 m_nFormSfxId;
sal_uInt16 m_nLastPasteDestination;
@@ -424,7 +424,7 @@ public:
// (this code has special handling for "in word" character)
void InsertThesaurusSynonym( const OUString &rSynonmText, const OUString &rLookUpText, bool bValidSelection );
bool IsValidSelectionForThesaurus() const;
- String GetThesaurusLookUpText( bool bSelection ) const;
+ OUString GetThesaurusLookUpText( bool bSelection ) const;
// immediately switch shell -> for GetSelectionObject
void StopShellTimer();
@@ -560,7 +560,7 @@ public:
inline void FlipDrawSelMode() { m_bDrawSelMode = !m_bDrawSelMode; }
void NoRotate(); // turn off rotate mode
sal_Bool EnterDrawTextMode(const Point& aDocPos);
- void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom.Erase();}
+ void LeaveDrawCreate() { m_nDrawSfxId = m_nFormSfxId = USHRT_MAX; m_sDrawCustom = "";}
sal_Bool IsDrawMode() { return (m_nDrawSfxId != USHRT_MAX || m_nFormSfxId != USHRT_MAX); }
bool IsFormMode() const;
bool IsBezierEditMode();
@@ -584,9 +584,9 @@ public:
void InsertCaption(const InsCaptionOpt *pOpt);
// Async call by Core
- void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
+ void UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr);
- String GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr);
+ OUString GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr);
// hand over Shell
SfxShell *GetCurShell() { return m_pShell; }
@@ -608,10 +608,10 @@ public:
sal_Bool IsCrsrAtTop() const { return m_bTopCrsr; }
sal_Bool IsCrsrAtCenter() const { return m_bCenterCrsr; }
- bool JumpToSwMark( const String& rMark );
+ bool JumpToSwMark( const OUString& rMark );
- long InsertDoc( sal_uInt16 nSlotId, const String& rFileName,
- const String& rFilterName, sal_Int16 nVersion = 0 );
+ long InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName,
+ const OUString& rFilterName, sal_Int16 nVersion = 0 );
void ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem );
long InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVersion );
@@ -647,7 +647,7 @@ public:
void StateFormatPaintbrush(SfxItemSet &);
//public fuer D&D
- int InsertGraphic( const String &rPath, const String &rFilter,
+ int InsertGraphic( const OUString &rPath, const OUString &rFilter,
sal_Bool bLink = sal_True, GraphicFilter *pFlt = 0,
Graphic* pPreviewGrf = 0,
sal_Bool bRule = sal_False );
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 129c1d783eab..f194b48b5183 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -790,7 +790,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
m_sNewCrsrPos = ((SwPagePreView*)pExistingSh)->GetNewCrsrPos();
m_nNewPage = ((SwPagePreView*)pExistingSh)->GetNewPage();
m_bOldShellWasPagePreView = sal_True;
- m_bIsPreviewDoubleClick = m_sNewCrsrPos.Len() > 0 || m_nNewPage != USHRT_MAX;
+ m_bIsPreviewDoubleClick = !m_sNewCrsrPos.isEmpty() || m_nNewPage != USHRT_MAX;
}
else if( pExistingSh->IsA( TYPE( SwSrcView ) ) )
bOldShellWasSrcView = sal_True;
@@ -1212,10 +1212,10 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )
}
//apply information from print preview - if available
- if( m_sNewCrsrPos.Len() )
+ if( !m_sNewCrsrPos.isEmpty() )
{
- long nXTmp = m_sNewCrsrPos.GetToken( 0, ';' ).ToInt32(),
- nYTmp = m_sNewCrsrPos.GetToken( 1, ';' ).ToInt32();
+ long nXTmp = m_sNewCrsrPos.getToken( 0, ';' ).toInt32(),
+ nYTmp = m_sNewCrsrPos.getToken( 1, ';' ).toInt32();
Point aCrsrPos2( nXTmp, nYTmp );
bSelectObj = m_pWrtShell->IsObjSelectable( aCrsrPos2 );
@@ -1226,7 +1226,7 @@ void SwView::ReadUserData( const OUString &rUserData, bool bBrowse )
m_pWrtShell->EnterSelFrmMode( &aCrsrPos2 );
}
m_pWrtShell->MakeSelVisible();
- m_sNewCrsrPos.Erase();
+ m_sNewCrsrPos = "";
}
else if(USHRT_MAX != m_nNewPage)
{
diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx
index 35edaf869c4f..b7eb3654678d 100644
--- a/sw/source/ui/uiview/view1.cxx
+++ b/sw/source/ui/uiview/view1.cxx
@@ -75,10 +75,10 @@ void SwView::Activate(sal_Bool bMDIActivate)
{
m_pWrtShell->ShGetFcs(sal_False); // Selections visible
- if( m_sSwViewData.Len() )
+ if( !m_sSwViewData.isEmpty() )
{
ReadUserData(m_sSwViewData, false);
- m_sSwViewData.Erase();
+ m_sSwViewData = "";
}
AttrChangedNotify(m_pWrtShell);
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 85188f4586bf..77f863711e1e 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -179,27 +179,27 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhi
}
/* Create string for showing of page in statusbar */
-String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
- const String& rDisplay )
+OUString SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
+ const OUString& rDisplay )
{
- String aStr( m_aPageStr );
- if( rDisplay.Len() )
+ OUString aStr( m_aPageStr );
+ if( !rDisplay.isEmpty() )
aStr += rDisplay;
else
aStr += OUString::number(nLogPg);
if( nLogPg && nLogPg != nPg )
{
- aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" "));
+ aStr += " ";
aStr += OUString::number(nPg);
}
- aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM(" / "));
+ aStr += " / ";
aStr += OUString::number( GetWrtShell().GetPageCnt() );
return aStr;
}
-int SwView::InsertGraphic( const String &rPath, const String &rFilter,
+int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
sal_Bool bLink, GraphicFilter *pFilter,
Graphic* pPreviewGrf, sal_Bool bRule )
{
@@ -1206,7 +1206,7 @@ void SwView::Execute(SfxRequest &rReq)
}
/// invalidate page numbering field
-void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const String& rPgStr)
+void SwView::UpdatePageNums(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUString& rPgStr)
{
String sTemp(GetPageStr( nPhyNum, nVirtNum, rPgStr ));
const SfxStringItem aTmp( FN_STAT_PAGE, sTemp );
@@ -1839,10 +1839,10 @@ void SwView::EditLinkDlg()
}
}
-bool SwView::JumpToSwMark( const String& rMark )
+bool SwView::JumpToSwMark( const OUString& rMark )
{
bool bRet = false;
- if( rMark.Len() )
+ if( !rMark.isEmpty() )
{
// place bookmark at top-center
sal_Bool bSaveCC = IsCrsrAtCenter();
@@ -2022,12 +2022,12 @@ void SwView::ExecuteInsertDoc( SfxRequest& rRequest, const SfxPoolItem* pItem )
}
}
-long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const String& rFilterName, sal_Int16 nVersion )
+long SwView::InsertDoc( sal_uInt16 nSlotId, const OUString& rFileName, const OUString& rFilterName, sal_Int16 nVersion )
{
SfxMedium* pMed = 0;
SwDocShell* pDocSh = GetDocShell();
- if( rFileName.Len() )
+ if( !rFileName.isEmpty() )
{
SfxObjectFactory& rFact = pDocSh->GetFactory();
const SfxFilter* pFilter = rFact.GetFilterContainer()->GetFilter4FilterName( rFilterName );
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 6cd9188ed6e7..3fc492defb20 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -262,7 +262,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_SELECT:
pFuncPtr = new DrawSelection(m_pWrtShell, m_pEditWin, this);
m_nDrawSfxId = m_nFormSfxId = SID_OBJECT_SELECT;
- m_sDrawCustom.Erase();
+ m_sDrawCustom = "";
break;
case SID_DRAW_LINE:
@@ -275,7 +275,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CAPTION_VERTICAL:
pFuncPtr = new ConstRectangle(m_pWrtShell, m_pEditWin, this);
m_nDrawSfxId = nSlotId;
- m_sDrawCustom.Erase();
+ m_sDrawCustom = "";
break;
case SID_DRAW_POLYGON_NOFILL:
@@ -283,7 +283,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_FREELINE_NOFILL:
pFuncPtr = new ConstPolygon(m_pWrtShell, m_pEditWin, this);
m_nDrawSfxId = nSlotId;
- m_sDrawCustom.Erase();
+ m_sDrawCustom = "";
break;
case SID_DRAW_ARC:
@@ -291,7 +291,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_DRAW_CIRCLECUT:
pFuncPtr = new ConstArc(m_pWrtShell, m_pEditWin, this);
m_nDrawSfxId = nSlotId;
- m_sDrawCustom.Erase();
+ m_sDrawCustom = "";
break;
case SID_FM_CREATE_CONTROL:
@@ -630,7 +630,7 @@ void SwView::SetDrawFuncPtr(SwDrawBase* pFuncPtr)
void SwView::SetSelDrawSlot()
{
m_nDrawSfxId = SID_OBJECT_SELECT;
- m_sDrawCustom.Erase();
+ m_sDrawCustom = "";
}
bool SwView::AreOnlyFormsSelected() const
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index 1620eb96e114..2f8c19dbdea6 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -492,7 +492,7 @@ bool SwView::IsValidSelectionForThesaurus() const
return !bMultiSel && (!bSelection || m_pWrtShell->IsSelOnePara() );
}
-String SwView::GetThesaurusLookUpText( bool bSelection ) const
+OUString SwView::GetThesaurusLookUpText( bool bSelection ) const
{
return bSelection ? m_pWrtShell->GetSelTxt() : m_pWrtShell->GetCurWord();
}