diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-08 13:36:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-10 09:18:59 +0200 |
commit | 6ada84236a211d77ec064b0bfdd8570cb10216e3 (patch) | |
tree | 327f1bf8852458e7d1be6ab721f2eb8cbb478999 | |
parent | convert sc/source/ui/inc/zoomctrl.hxx from String to OUString (diff) | |
download | core-6ada84236a211d77ec064b0bfdd8570cb10216e3.tar.gz core-6ada84236a211d77ec064b0bfdd8570cb10216e3.zip |
convert sw/source/ui/inc/w*.hxx from String to OUString
and remove a couple of dead method definitions
Change-Id: Iaab20bd367e0387a1aafa656aee3bd78705cd64b
-rw-r--r-- | sw/source/ui/dbui/dbmgr.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/inc/workctrl.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/wrtsh.hxx | 44 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewsrch.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/move.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/select.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/wrtsh1.cxx | 38 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/wrtundo.cxx | 4 |
10 files changed, 55 insertions, 59 deletions
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 44ac4fe5c6ae..cb73c2b5ce10 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -906,7 +906,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, SwView* pTargetView = 0; std::auto_ptr< utl::TempFile > aTempFile; - String sModifiedStartingPageDesc; + OUString sModifiedStartingPageDesc; String sStartingPageDesc; sal_uInt16 nStartingPageNo = 0; bool bPageStylesWithHeaderFooter = false; @@ -2717,7 +2717,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig, //save the settings of the first rSourceShell.SttEndDoc(sal_True); sal_uInt16 nStartingPageNo = rSourceShell.GetVirtPageNum(); - String sModifiedStartingPageDesc; + OUString sModifiedStartingPageDesc; String sStartingPageDesc = sModifiedStartingPageDesc = rSourceShell.GetPageDesc( rSourceShell.GetCurPageDesc()).GetName(); diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx index dcba5914ae5c..532f479b9cd2 100644 --- a/sw/source/ui/inc/workctrl.hxx +++ b/sw/source/ui/inc/workctrl.hxx @@ -165,7 +165,7 @@ public: SwScrollNaviPopup( sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, Window *pParent ); ~SwScrollNaviPopup(); - static String GetQuickHelpText(sal_Bool bNext); + static OUString GetQuickHelpText(sal_Bool bNext); virtual SfxPopupWindow* Clone() const; void GrabFocus(){aToolBox.GrabFocus();} diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index d9d446a8f299..3c6f7a373821 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -287,17 +287,17 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); // edit void Insert(SwField &, SwPaM *pCommentRange = NULL); - void Insert(const String &); + void Insert(const OUString &); // graphic - void Insert( const String &rPath, const String &rFilter, + void Insert( const OUString &rPath, const OUString &rFilter, const Graphic &, SwFlyFrmAttrMgr * = 0, sal_Bool bRule = sal_False ); - void InsertByWord( const String & ); - void InsertPageBreak(const String *pPageDesc = 0, sal_uInt16 nPgNum = 0 ); + void InsertByWord( const OUString & ); + void InsertPageBreak(const OUString *pPageDesc = 0, sal_uInt16 nPgNum = 0 ); void InsertLineBreak(); void InsertColumnBreak(); - void InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True ); + void InsertFootnote(const OUString &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True ); void SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True ); bool CanInsert(); @@ -341,15 +341,15 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); GETSTYLE_CREATESOME, // if on PoolId create mapt GETSTYLE_CREATEANY }; // return standard if applicable - SwTxtFmtColl* GetParaStyle(const String &rCollName, + SwTxtFmtColl* GetParaStyle(const OUString &rCollName, GetStyle eCreate = GETSTYLE_NOCREATE); - SwCharFmt* GetCharStyle(const String &rFmtName, + SwCharFmt* GetCharStyle(const OUString &rFmtName, GetStyle eCreate = GETSTYLE_NOCREATE); SwFrmFmt* GetTblStyle(const OUString &rFmtName); - void SetPageStyle(const String &rCollName); + void SetPageStyle(const OUString &rCollName); - String GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const; + OUString GetCurPageStyle( const sal_Bool bCalcFrm = sal_True ) const; // change current style using the attributes in effect void QuickUpdateStyle(); @@ -357,8 +357,8 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); enum DoType { UNDO, REDO, REPEAT }; void Do( DoType eDoType, sal_uInt16 nCnt = 1 ); - String GetDoString( DoType eDoType ) const; - String GetRepeatString() const; + OUString GetDoString( DoType eDoType ) const; + OUString GetRepeatString() const; sal_uInt16 GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const; // search and replace @@ -368,10 +368,10 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); FindRanges eFlags = FND_IN_BODY, int bReplace = sal_False ); - sal_uLong SearchTempl (const String &rTempl, + sal_uLong SearchTempl (const OUString &rTempl, SwDocPositions eStart, SwDocPositions eEnde, FindRanges eFlags = FND_IN_BODY, - const String* pReplTempl = 0 ); + const OUString* pReplTempl = 0 ); sal_uLong SearchAttr (const SfxItemSet& rFindSet, sal_Bool bNoColls, @@ -452,24 +452,24 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)(); bool TryRemoveIndent(); // #i23725# - String GetSelDescr() const; + OUString GetSelDescr() const; SwNavigationMgr& GetNavigationMgr(); void addCurrentPosition(); - sal_Bool GotoFly( const String& rName, FlyCntType eType = FLYCNTTYPE_ALL, + sal_Bool GotoFly( const OUString& rName, FlyCntType eType = FLYCNTTYPE_ALL, sal_Bool bSelFrame = sal_True ); bool GotoINetAttr( const SwTxtINetFmt& rAttr ); void GotoOutline( sal_uInt16 nIdx ); - bool GotoOutline( const String& rName ); - bool GotoRegion( const String& rName ); - sal_Bool GotoRefMark( const String& rRefMark, sal_uInt16 nSubType = 0, + bool GotoOutline( const OUString& rName ); + bool GotoRegion( const OUString& rName ); + sal_Bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, sal_uInt16 nSeqNo = 0 ); sal_Bool GotoNextTOXBase( const OUString* pName = 0); - bool GotoTable( const String& rName ); + bool GotoTable( const OUString& rName ); sal_Bool GotoFld( const SwFmtFld& rFld ); const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False); - void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning); + void ChangeHeaderOrFooter(const OUString& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning); virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ); private: @@ -477,10 +477,6 @@ private: SW_DLLPRIVATE void OpenMark(); SW_DLLPRIVATE void CloseMark( bool bOkFlag ); - SW_DLLPRIVATE String GetWrdDelim(); - SW_DLLPRIVATE String GetSDelim(); - SW_DLLPRIVATE String GetBothDelim(); - struct ModeStack { ModeStack *pNext; diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index 0c92c2846db0..948d5c776a36 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -589,7 +589,7 @@ void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) } -String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext) +OUString SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext) { sal_uInt16 nResId = STR_IMGBTN_START; nResId += SwView::GetMoveType() - NID_START; diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index af18041f63ea..c76969afcb30 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -522,7 +522,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case FN_INSERT_BREAK_DLG: { sal_uInt16 nKind=0, nPageNumber=0; - String aTemplateName; + OUString aTemplateName; if ( pItem ) { nKind = ((SfxInt16Item*)pItem)->GetValue(); @@ -564,7 +564,7 @@ void SwTextShell::Execute(SfxRequest &rReq) case 3 : { rWrtSh.StartAllAction(); - if( aTemplateName.Len() ) + if( !aTemplateName.isEmpty() ) rWrtSh.InsertPageBreak( &aTemplateName, nPageNumber ); else rWrtSh.InsertPageBreak(); diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 69230859b121..0c7e4f5f15b5 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -754,7 +754,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) else if( m_pSrchItem->GetPattern() ) { // Searching (and replacing) templates - const String sRplStr( m_pSrchItem->GetReplaceString() ); + const OUString sRplStr( m_pSrchItem->GetReplaceString() ); nFound = m_pWrtShell->SearchTempl( m_pSrchItem->GetSearchString(), rOptions.eStart, rOptions.eEnd, diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx index 1c7f03bf254b..72f26a2b3c9c 100644 --- a/sw/source/ui/wrtsh/move.cxx +++ b/sw/source/ui/wrtsh/move.cxx @@ -597,7 +597,7 @@ sal_Bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, sal_Bool bS return bRet; } -sal_Bool SwWrtShell::GotoFly( const String& rName, FlyCntType eType, sal_Bool bSelFrame ) +sal_Bool SwWrtShell::GotoFly( const OUString& rName, FlyCntType eType, sal_Bool bSelFrame ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwFEShell::GotoFly(rName, eType, bSelFrame); @@ -621,7 +621,7 @@ void SwWrtShell::GotoOutline( sal_uInt16 nIdx ) SwCrsrShell::GotoOutline (nIdx); } -bool SwWrtShell::GotoOutline( const String& rName ) +bool SwWrtShell::GotoOutline( const OUString& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoOutline (rName); @@ -630,7 +630,7 @@ bool SwWrtShell::GotoOutline( const String& rName ) return bRet; } -bool SwWrtShell::GotoRegion( const String& rName ) +bool SwWrtShell::GotoRegion( const OUString& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoRegion (rName); @@ -639,7 +639,7 @@ bool SwWrtShell::GotoRegion( const String& rName ) return bRet; } -sal_Bool SwWrtShell::GotoRefMark( const String& rRefMark, sal_uInt16 nSubType, +sal_Bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { SwPosition aPos = *GetCrsr()->GetPoint(); @@ -658,7 +658,7 @@ sal_Bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) return bRet; } -bool SwWrtShell::GotoTable( const String& rName ) +bool SwWrtShell::GotoTable( const OUString& rName ) { SwPosition aPos = *GetCrsr()->GetPoint(); bool bRet = SwCrsrShell::GotoTable(rName); diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx index 1e9262f990fb..0603e8af59bd 100644 --- a/sw/source/ui/wrtsh/select.cxx +++ b/sw/source/ui/wrtsh/select.cxx @@ -209,9 +209,9 @@ sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, sal_Bool b // Description: search for templates -sal_uLong SwWrtShell::SearchTempl( const String &rTempl, +sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl, SwDocPositions eStt, SwDocPositions eEnd, - FindRanges eFlags, const String* pReplTempl ) + FindRanges eFlags, const OUString* pReplTempl ) { // no enhancement of existing selections if(!(eFlags & FND_IN_SEL)) diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index 6d36ed11f3cd..29f9a01c0f9f 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -167,27 +167,27 @@ sal_Bool SwWrtShell::IsEndWrd() // Insert string -void SwWrtShell::InsertByWord( const String & rStr) +void SwWrtShell::InsertByWord( const OUString & rStr) { - if( rStr.Len() ) + if( !rStr.isEmpty() ) { sal_Bool bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 ); xub_StrLen nPos = 0, nStt = 0; - for( ; nPos < rStr.Len(); nPos++ ) + for( ; nPos < rStr.getLength(); nPos++ ) { sal_Bool bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos ); if( bTmpDelim != bDelim ) { - Insert( rStr.Copy( nStt, nPos - nStt )); + Insert( rStr.copy( nStt, nPos - nStt )); nStt = nPos; } } if( nStt != nPos ) - Insert( rStr.Copy( nStt, nPos - nStt )); + Insert( rStr.copy( nStt, nPos - nStt )); } } -void SwWrtShell::Insert( const String &rStr ) +void SwWrtShell::Insert( const OUString &rStr ) { ResetCursorStack(); if( !CanInsert() ) @@ -236,7 +236,7 @@ void SwWrtShell::Insert( const String &rStr ) // Maximum height limit not possible, because the maximum height // of the current frame can not be obtained. -void SwWrtShell::Insert( const String &rPath, const String &rFilter, +void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter, const Graphic &rGrf, SwFlyFrmAttrMgr *pFrmMgr, sal_Bool bRule ) { @@ -824,7 +824,7 @@ void SwWrtShell::ConnectObj( svt::EmbeddedObjectRef& xObj, const SwRect &rPrt, // Insert hard page break; // Selections will be overwritten -void SwWrtShell::InsertPageBreak(const String *pPageDesc, sal_uInt16 nPgNum ) +void SwWrtShell::InsertPageBreak(const OUString *pPageDesc, sal_uInt16 nPgNum ) { ResetCursorStack(); if( CanInsert() ) @@ -901,7 +901,7 @@ void SwWrtShell::InsertColumnBreak() // Insert footnote // rStr - optional footnote mark -void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool bEdit ) +void SwWrtShell::InsertFootnote(const OUString &rStr, sal_Bool bEndNote, sal_Bool bEdit ) { ResetCursorStack(); if( CanInsert() ) @@ -915,7 +915,7 @@ void SwWrtShell::InsertFootnote(const String &rStr, sal_Bool bEndNote, sal_Bool } SwPosition aPos = *GetCrsr()->GetPoint(); SwFmtFtn aFootNote( bEndNote ); - if(rStr.Len()) + if(!rStr.isEmpty()) aFootNote.SetNumStr( rStr ); SetAttr(aFootNote); @@ -1423,7 +1423,7 @@ SelectionType SwWrtShell::GetSelectionType() const // text collection with this name exists, or // this is a default template. -SwTxtFmtColl *SwWrtShell::GetParaStyle(const String &rCollName, GetStyle eCreate ) +SwTxtFmtColl *SwWrtShell::GetParaStyle(const OUString &rCollName, GetStyle eCreate ) { SwTxtFmtColl* pColl = FindTxtFmtCollByName( rCollName ); if( !pColl && GETSTYLE_NOCREATE != eCreate ) @@ -1440,7 +1440,7 @@ SwTxtFmtColl *SwWrtShell::GetParaStyle(const String &rCollName, GetStyle eCreate // character template with this name exists, or // this is a default template or template is automatic. -SwCharFmt *SwWrtShell::GetCharStyle(const String &rFmtName, GetStyle eCreate ) +SwCharFmt *SwWrtShell::GetCharStyle(const OUString &rFmtName, GetStyle eCreate ) { SwCharFmt* pFmt = FindCharFmtByName( rFmtName ); if( !pFmt && GETSTYLE_NOCREATE != eCreate ) @@ -1478,7 +1478,7 @@ void SwWrtShell::addCurrentPosition() { // Applying templates -void SwWrtShell::SetPageStyle(const String &rCollName) +void SwWrtShell::SetPageStyle(const OUString &rCollName) { if( !SwCrsrShell::HasSelection() && !IsSelFrmMode() && !IsObjSelected() ) { @@ -1490,7 +1490,7 @@ void SwWrtShell::SetPageStyle(const String &rCollName) // Access templates -String SwWrtShell::GetCurPageStyle( const sal_Bool bCalcFrm ) const +OUString SwWrtShell::GetCurPageStyle( const sal_Bool bCalcFrm ) const { return GetPageDesc(GetCurPageDesc( bCalcFrm )).GetName(); } @@ -1656,9 +1656,9 @@ void SwWrtShell::ChgDBData(const SwDBData& aDBData) GetView().NotifyDBChanged(); } -String SwWrtShell::GetSelDescr() const +OUString SwWrtShell::GetSelDescr() const { - String aResult; + OUString aResult; int nSelType = GetSelectionType(); switch (nSelType) @@ -1705,7 +1705,7 @@ void SwWrtShell::SetReadonlyOption(sal_Bool bSet) // given all styles are changed void SwWrtShell::ChangeHeaderOrFooter( - const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning) + const OUString& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning) { addCurrentPosition(); StartAllAction(); @@ -1718,7 +1718,7 @@ void SwWrtShell::ChangeHeaderOrFooter( int bChgd = sal_False; SwPageDesc aDesc( GetPageDesc( nFrom )); String sTmp(aDesc.GetName()); - if( !rStyleName.Len() || rStyleName == sTmp ) + if( rStyleName.isEmpty() || rStyleName == sTmp ) { if( bShowWarning && !bOn && GetActiveView() && GetActiveView() == &GetView() && ( (bHeader && aDesc.GetMaster().GetHeader().IsActive()) || @@ -1764,7 +1764,7 @@ void SwWrtShell::ChangeHeaderOrFooter( if ( !IsHeaderFooterEdit() ) ToggleHeaderFooterEdit(); bCrsrSet = SetCrsrInHdFt( - !rStyleName.Len() ? (sal_uInt16)0xFFFF : nFrom, + rStyleName.isEmpty() ? (sal_uInt16)0xFFFF : nFrom, bHeader ); } } diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx index e117b03c3b8b..734de3b051f9 100644 --- a/sw/source/ui/wrtsh/wrtundo.cxx +++ b/sw/source/ui/wrtsh/wrtundo.cxx @@ -94,7 +94,7 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt ) CallChgLnk(); } -String SwWrtShell::GetDoString( DoType eDoType ) const +OUString SwWrtShell::GetDoString( DoType eDoType ) const { OUString aUndoStr; sal_uInt16 nResStr = STR_UNDO; @@ -139,7 +139,7 @@ sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) } -String SwWrtShell::GetRepeatString() const +OUString SwWrtShell::GetRepeatString() const { OUString str; GetRepeatInfo(& str); |