diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-15 16:23:45 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-18 09:59:16 +0200 |
commit | 3eeea8b5ddad1e1f3ae59822b132b128557925ae (patch) | |
tree | cffbe9d0af2ec3a287ee6681ddf29923a3ffe2fd /sw/source | |
parent | 111c843ce392b58a1dd0c675dd4ef214535d817c (diff) |
convert String vectors to OUString vectors in SW
Change-Id: I431d805f2845830da0fa66f6521c5c7d6b5b10d5
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/findattr.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/unocore/swunohelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/inc/msfilter.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/pardlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/fmtui/tmpdlg.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewsrch.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/gloslst.cxx | 4 |
16 files changed, 24 insertions, 25 deletions
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 9ebb8c0c5cb7..58a1c7eb6515 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -1129,10 +1129,10 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion, ((Ring*)pRegion)->MoveRingTo( &rCursor ); } - ::std::auto_ptr<String> pRepl( (bRegExp) ? + ::std::unique_ptr<OUString> pRepl( (bRegExp) ? ReplaceBackReferences( *pSearchOpt, pCrsr ) : 0 ); rCursor.GetDoc()->ReplaceRange( *pCrsr, - (pRepl.get()) ? *pRepl : String(pSearchOpt->replaceString), + (pRepl.get()) ? *pRepl : pSearchOpt->replaceString, bRegExp ); rCursor.SaveTblBoxCntnt( pCrsr->GetPoint() ); diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 76b44c229fab..ca89a9eb0020 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star; using namespace util; -String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ); +OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ); static OUString lcl_CleanStr(const SwTxtNode& rNd, xub_StrLen const nStart, xub_StrLen& rEnd, @@ -584,10 +584,10 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, ((Ring*)pRegion)->MoveRingTo( &rCursor ); } - ::std::auto_ptr<String> pRepl( (bRegExp) + ::std::unique_ptr<OUString> pRepl( (bRegExp) ? ReplaceBackReferences( rSearchOpt, pCrsr ) : 0 ); rCursor.GetDoc()->ReplaceRange( *pCrsr, - (pRepl.get()) ? *pRepl : String(rSearchOpt.replaceString), + (pRepl.get()) ? *pRepl : rSearchOpt.replaceString, bRegExp ); rCursor.SaveTblBoxCntnt( pCrsr->GetPoint() ); @@ -645,9 +645,9 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, sal_Bool bSearchInNot return nRet; } -String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ) +OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ) { - String *pRet = 0; + OUString *pRet = 0; if( pPam && pPam->HasMark() && SearchAlgorithms_REGEXP == rSearchOpt.algorithmType ) { @@ -663,7 +663,7 @@ String *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ) { OUString aReplaceStr( rSearchOpt.replaceString ); aSTxt.ReplaceBackReferences( aReplaceStr, rStr, aResult ); - pRet = new String( aReplaceStr ); + pRet = new OUString( aReplaceStr ); } } } diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 5eabfa60cb80..a25cf93f6692 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -185,7 +185,7 @@ sal_Bool UCB_IsDirectory( const OUString& rURL ) // get a list of files from the folder of the URL // options: pExtension = 0 -> all, else this specific extension // pDateTime != 0 -> returns also the modified date/time of - // the files in a std::vector<String*> --> + // the files in a std::vector<OUString> --> // !! objects must be deleted from the caller!! bool UCB_GetFileListOfFolder( const OUString& rURL, std::vector<OUString>& rList, diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx index c1653a8352cb..9eee98e34acf 100644 --- a/sw/source/filter/inc/msfilter.hxx +++ b/sw/source/filter/inc/msfilter.hxx @@ -406,7 +406,6 @@ namespace sw sal_uInt16 AddName( const OUString& rNm ); virtual void Write(Writer &rWrt) = 0; - // std::vector<String> GetNames(); }; /** Given a SwNoTxtNode (ole/graphic) get original size diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 55af86680adc..87d2c1d91a9c 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -400,7 +400,7 @@ private: HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&); }; -typedef ::std::pair<String, sal_uLong> aBookmarkPair; +typedef ::std::pair<OUString, sal_uLong> aBookmarkPair; typedef std::vector<aBookmarkPair> SwImplBookmarks; typedef std::vector<aBookmarkPair>::iterator SwImplBookmarksIter; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 686fdb10a786..8e3e9b5fbb48 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4217,7 +4217,7 @@ void SwWW8ImplReader::ReadDocVars() { std::vector<OUString> aDocVarStrings; std::vector<ww::bytes> aDocVarStringIds; - std::vector<String> aDocValueStrings; + std::vector<OUString> aDocValueStrings; WW8ReadSTTBF(!bVer67, *pTableStream, pWwFib->fcStwUser, pWwFib->lcbStwUser, bVer67 ? 2 : 0, eStructCharSet, aDocVarStrings, &aDocVarStringIds, &aDocValueStrings); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 0aa251963e83..99640cb164bf 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -3788,7 +3788,7 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF) /* to be optimized like this: */ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<OUString> &rArray, - std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray) + std::vector<ww::bytes>* pExtraArray, ::std::vector<OUString>* pValueArray) { if (nLen==0) // Handle Empty STTBF return; diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 712dfab99a31..3d4af07228f2 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -152,7 +152,7 @@ class WW8PLCFx_PCD; */ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<OUString> &rArray, - ::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0); + ::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<OUString>* pValueArray = 0); struct WW8FieldDesc { diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 6efd84c01d83..fa929e1bcc7a 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1567,7 +1567,7 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, bool bRelWidth2, { if( !pColumnDefaultCellStyleNames ) { - pColumnDefaultCellStyleNames = new std::vector<String>; + pColumnDefaultCellStyleNames = new std::vector<OUString>; sal_uLong nCount = aColumnWidths.size() - 1; while( nCount-- ) pColumnDefaultCellStyleNames->push_back(String()); diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx index 0ba3130843cd..79016dcc2748 100644 --- a/sw/source/filter/xml/xmltbli.hxx +++ b/sw/source/filter/xml/xmltbli.hxx @@ -62,7 +62,7 @@ class SwXMLTableContext : public XMLTextTableContext inline ColumnWidthInfo(sal_uInt16 wdth, bool isRel) : width(wdth), isRelative(isRel) {}; }; std::vector<ColumnWidthInfo> aColumnWidths; - std::vector<String> *pColumnDefaultCellStyleNames; + std::vector<OUString> *pColumnDefaultCellStyleNames; ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor > xOldCursor; diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index a964eb04544c..0ea2a0468110 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -233,13 +233,13 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) SfxStyleSheetBasePool* pPool = rView.GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_PSEUDO, SFXSTYLEBIT_ALL); const SfxStyleSheetBase* pBase = pPool->First(); - std::set<String> aNames; + std::set<OUString> aNames; while(pBase) { aNames.insert(pBase->GetName()); pBase = pPool->Next(); } - for(std::set<String>::const_iterator it = aNames.begin(); it != aNames.end(); ++it) + for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it) rBox.InsertEntry(*it); } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index d4841f1798fe..0dd867e8f1b4 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -5727,7 +5727,7 @@ void QuickHelpData::FillStrArr( SwWrtShell& rSh, const OUString& rWord ) aWordCase = CASE_SENTENCE; else { - if ( rWord == static_cast<String>( rCC.uppercase( rWord ) ) ) + if ( rWord == rCC.uppercase( rWord ) ) aWordCase = CASE_UPPER; } } diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx index 855c3f6c3e77..9ed8c830c5d7 100644 --- a/sw/source/ui/fmtui/tmpdlg.cxx +++ b/sw/source/ui/fmtui/tmpdlg.cxx @@ -417,13 +417,13 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool(); pPool->SetSearchMask(SFX_STYLE_FAMILY_PSEUDO, SFXSTYLEBIT_ALL); const SfxStyleSheetBase* pBase = pPool->First(); - std::set<String> aNames; + std::set<OUString> aNames; while(pBase) { aNames.insert(pBase->GetName()); pBase = pPool->Next(); } - for(std::set<String>::const_iterator it = aNames.begin(); it != aNames.end(); ++it) + for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it) rBox.InsertEntry(*it); } else if (nId == m_nAlignId) diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index 1d2b18df436a..811b892cf09f 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -283,7 +283,7 @@ sal_Bool SwView::InsertGraphicDlg( SfxRequest& rReq ) xCtrlAcc->enableControl( ExtendedFilePickerElementIds::CHECKBOX_LINK, sal_False); } - std::vector<String> aFormats; + std::vector<OUString> aFormats; SwDoc* pDoc = pDocShell->GetDoc(); const sal_uInt16 nArrLen = pDoc->GetFrmFmts()->size(); sal_uInt16 i; diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index f2ad595f9218..416e03cc7f7d 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -247,7 +247,7 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) m_pWrtShell->Push(); OUString aReplace( m_pSrchItem->GetReplaceString() ); SearchOptions aTmp( m_pSrchItem->GetSearchOptions() ); - String *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCrsr() ); + OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCrsr() ); if( pBackRef ) m_pSrchItem->SetReplaceString( *pBackRef ); Replace(); diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx index fec8d5404a40..a566448976db 100644 --- a/sw/source/ui/utlui/gloslst.cxx +++ b/sw/source/ui/utlui/gloslst.cxx @@ -277,7 +277,7 @@ void SwGlossaryList::Update() { for( size_t nPath = 0; nPath < rPathArr.size(); nPath++ ) { - std::vector<String> aFoundGroupNames; + std::vector<OUString> aFoundGroupNames; std::vector<OUString> aFiles; std::vector<DateTime*> aDateTimeArr; @@ -325,7 +325,7 @@ void SwGlossaryList::Update() { bool bFound = false; OUString sCompareGroup = pGroup->sName.getToken(0, GLOS_DELIM); - for(std::vector<String>::const_iterator j = aFoundGroupNames.begin(); j != aFoundGroupNames.end() && !bFound; ++j) + for(std::vector<OUString>::const_iterator j = aFoundGroupNames.begin(); j != aFoundGroupNames.end() && !bFound; ++j) bFound = (sCompareGroup == *j); if(!bFound) |