diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-08 14:59:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-10 09:19:00 +0200 |
commit | 3b5a0ea9bbbcee299cc0a20482671e0a13d8567c (patch) | |
tree | 1a2ea37290de6bb46c9fec6c7ba12b10ed9ecce3 /sw | |
parent | convert sw/source/ui/inc/t*.hxx from String to OUString (diff) | |
download | core-3b5a0ea9bbbcee299cc0a20482671e0a13d8567c.tar.gz core-3b5a0ea9bbbcee299cc0a20482671e0a13d8567c.zip |
convert sw/source/ui/inc/sw*.hxx from String to OUString
Change-Id: I75ee55f9a8e2b7036621adbee40b92f29029f366
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/cctrl/swlbox.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dochdl/swdtflvr.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/swcont.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/swdtflvr.hxx | 2 | ||||
-rw-r--r-- | sw/source/ui/inc/swlbox.hxx | 6 | ||||
-rw-r--r-- | sw/source/ui/inc/swuicnttab.hxx | 20 | ||||
-rw-r--r-- | sw/source/ui/inc/swuiidxmrk.hxx | 12 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 30 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 26 | ||||
-rw-r--r-- | sw/source/ui/utlui/content.cxx | 8 |
10 files changed, 57 insertions, 57 deletions
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx index 9860138bbbe3..54d37b3514ad 100644 --- a/sw/source/ui/cctrl/swlbox.cxx +++ b/sw/source/ui/cctrl/swlbox.cxx @@ -31,7 +31,7 @@ SwBoxEntry::SwBoxEntry() : { } -SwBoxEntry::SwBoxEntry(const String& aNam, sal_uInt16 nIdx) : +SwBoxEntry::SwBoxEntry(const OUString& aNam, sal_uInt16 nIdx) : bModified(sal_False), bNew(sal_False), aName(aNam), diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index fbb6d49c095f..4522a2afb8d4 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -1016,7 +1016,7 @@ int SwTransferable::CalculateAndCopy() } int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, - const String& rStr ) + const OUString& rStr ) { if(!pWrtShell) return 0; diff --git a/sw/source/ui/inc/swcont.hxx b/sw/source/ui/inc/swcont.hxx index a5daaba4012d..1f689e3e5e99 100644 --- a/sw/source/ui/inc/swcont.hxx +++ b/sw/source/ui/inc/swcont.hxx @@ -70,15 +70,15 @@ class SwTypeNumber class SwContent : public SwTypeNumber { const SwContentType* pParent; - String sContentName; + OUString sContentName; long nYPosition; sal_Bool bInvisible; public: - SwContent(const SwContentType* pCnt, const String& rName, long nYPos ); + SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos ); virtual sal_Bool IsProtect() const; const SwContentType* GetParent() const {return pParent;} - const String& GetName() const {return sContentName;} + const OUString& GetName() const {return sContentName;} int operator==(const SwContent& /*rCont*/) const { // they're never equal, otherwise they'd fall out of the array diff --git a/sw/source/ui/inc/swdtflvr.hxx b/sw/source/ui/inc/swdtflvr.hxx index dbc78b081017..7e4e68c3b77e 100644 --- a/sw/source/ui/inc/swdtflvr.hxx +++ b/sw/source/ui/inc/swdtflvr.hxx @@ -163,7 +163,7 @@ public: int Copy( sal_Bool bIsCut = sal_False ); int PrepareForCopy( sal_Bool bIsCut = sal_False ); int CalculateAndCopy(); // special for Calculator - int CopyGlossary( SwTextBlocks& rGlossary, const String& rStr ); + int CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr ); // remove the DDE-Link format promise void RemoveDDELinkFormat( const Window& rWin ); diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx index 1b8a02f4e12d..0ae0b7400934 100644 --- a/sw/source/ui/inc/swlbox.hxx +++ b/sw/source/ui/inc/swlbox.hxx @@ -39,15 +39,15 @@ class SW_DLLPUBLIC SwBoxEntry sal_Bool bModified : 1; sal_Bool bNew : 1; - String aName; + OUString aName; sal_uInt16 nId; public: - SwBoxEntry(const String& aName, sal_uInt16 nId=0); + SwBoxEntry(const OUString& aName, sal_uInt16 nId=0); SwBoxEntry(const SwBoxEntry& rOrg); SwBoxEntry(); - const String& GetName() const { return aName;} + const OUString& GetName() const { return aName;} }; /*-------------------------------------------------------------------- diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx index 4c9c9c2ada5e..46753d73af97 100644 --- a/sw/source/ui/inc/swuicnttab.hxx +++ b/sw/source/ui/inc/swuicnttab.hxx @@ -122,7 +122,7 @@ public: void CreateOrUpdateExample( TOXTypes nTOXIndex, sal_uInt16 nPage = 0, sal_uInt16 nCurLevel = USHRT_MAX); - static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName); + static sal_Bool IsNoNum(SwWrtShell& rSh, const OUString& rName); }; class IndexEntryResource; @@ -192,11 +192,11 @@ class SwTOXSelectTabPage : public SfxTabPage IndexEntryResource* pIndexRes; - String aStyleArr[MAXLEVEL]; - String sAutoMarkURL; - String sAutoMarkType; - String sAddStyleUser; - String sAddStyleContent; + OUString aStyleArr[MAXLEVEL]; + OUString sAutoMarkURL; + OUString sAutoMarkType; + OUString sAddStyleUser; + OUString sAddStyleContent; const IndexEntrySupplierWrapper* pIndexEntryWrapper; @@ -271,7 +271,7 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer void SetActiveControl(Control* pSet); - Control* InsertItem(const String& rText, const SwFormToken& aToken); + Control* InsertItem(const OUString& rText, const SwFormToken& aToken); void AdjustPositions(); void AdjustScrolling(); void MoveControls(long nOffset); @@ -289,7 +289,7 @@ public: void SetInvalid() {bValid = sal_False;} - String GetPattern() const; + OUString GetPattern() const; void SetButtonSelectedHdl(const Link& rLink) { aButtonSelectedHdl = rLink;} @@ -299,7 +299,7 @@ public: Control* GetActiveControl() { return pActiveCtrl;} - void InsertAtSelection(const String& rText, const SwFormToken& aToken); + void InsertAtSelection(const OUString& rText, const SwFormToken& aToken); void RemoveControl(SwTOXButton* pDel, sal_Bool bInternalCall = sal_False); sal_Bool Contains(FormTokenType) const; @@ -437,7 +437,7 @@ public: const SfxItemSet& rAttrSet); void SetWrtShell(SwWrtShell& rSh); - String GetLevelHelp(sal_uInt16 nLevel) const; + OUString GetLevelHelp(sal_uInt16 nLevel) const; void PreTokenButtonRemoved(const SwFormToken& rToken); }; diff --git a/sw/source/ui/inc/swuiidxmrk.hxx b/sw/source/ui/inc/swuiidxmrk.hxx index f09254e2db94..33e310589985 100644 --- a/sw/source/ui/inc/swuiidxmrk.hxx +++ b/sw/source/ui/inc/swuiidxmrk.hxx @@ -88,7 +88,7 @@ class SwIndexMarkPane PushButton* m_pPrevBT; PushButton* m_pNextBT; - String aOrgStr; + OUString aOrgStr; sal_Bool bDel; sal_Bool bNewMark; sal_Bool bSelected; @@ -126,7 +126,7 @@ class SwIndexMarkPane //it needs to be called ones if this dialog is opened to create a new entry (in InitControls), //or otherwise it has to be called for each changed TOXMark (in UpdateDialog) void UpdateLanguageDependenciesForPhoneticReading(); - String GetDefaultPhoneticReading( const String& rText ); + OUString GetDefaultPhoneticReading( const OUString& rText ); void UpdateKeyBoxes(); @@ -147,7 +147,7 @@ public: ~SwIndexMarkPane(); void ReInitDlg(SwWrtShell& rWrtShell, SwTOXMark* pCurTOXMark = 0); - sal_Bool IsTOXType(const String& rName) + sal_Bool IsTOXType(const OUString& rName) {return LISTBOX_ENTRY_NOTFOUND != m_pTypeDCB->GetEntryPos(rName);} }; @@ -202,10 +202,10 @@ class SwAuthorMarkPane SwWrtShell* pSh; - String m_sColumnTitles[AUTH_FIELD_END]; - String m_sFields[AUTH_FIELD_END]; + OUString m_sColumnTitles[AUTH_FIELD_END]; + OUString m_sFields[AUTH_FIELD_END]; - String m_sCreatedEntry[AUTH_FIELD_END]; + OUString m_sCreatedEntry[AUTH_FIELD_END]; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xBibAccess; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index e8939f0aab71..d83c5a05e13b 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -545,7 +545,7 @@ IMPL_LINK_NOARG( SwMultiTOXTabDialog, ShowPreviewHdl ) return 0; } -sal_Bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const String& rName) +sal_Bool SwMultiTOXTabDialog::IsNoNum(SwWrtShell& rSh, const OUString& rName) { SwTxtFmtColl* pColl = rSh.GetParaStyle(rName); if(pColl && ! pColl->IsAssignedToListLevelOfOutlineStyle()) @@ -661,19 +661,19 @@ class SwAddStylesDlg_Impl : public SfxModalDialog PushButton* m_pLeftPB; PushButton* m_pRightPB; - String* pStyleArr; + OUString* pStyleArr; DECL_LINK(OkHdl, void *); DECL_LINK(LeftRightHdl, PushButton*); DECL_LINK(HeaderDragHdl, void *); public: - SwAddStylesDlg_Impl(Window* pParent, SwWrtShell& rWrtSh, String rStringArr[]); + SwAddStylesDlg_Impl(Window* pParent, SwWrtShell& rWrtSh, OUString rStringArr[]); ~SwAddStylesDlg_Impl(); }; SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, - SwWrtShell& rWrtSh, String rStringArr[]) + SwWrtShell& rWrtSh, OUString rStringArr[]) : SfxModalDialog(pParent, "AssignStylesDialog", "modules/swriter/ui/assignstylesdialog.ui") , pStyleArr(rStringArr) @@ -749,7 +749,7 @@ SwAddStylesDlg_Impl::~SwAddStylesDlg_Impl() IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl) { for(sal_uInt16 i = 0; i < MAXLEVEL; i++) - pStyleArr[i].Erase(); + pStyleArr[i] = ""; SvTreeListEntry* pEntry = m_pHeaderTree->First(); while(pEntry) @@ -758,8 +758,8 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl) if(nLevel != USHRT_MAX) { String sName(m_pHeaderTree->GetEntryText(pEntry)); - if(pStyleArr[nLevel].Len()) - pStyleArr[nLevel] += TOX_STYLE_DELIMITER; + if(!pStyleArr[nLevel].isEmpty()) + pStyleArr[nLevel] += OUString(TOX_STYLE_DELIMITER); pStyleArr[nLevel] += sName; } pEntry = m_pHeaderTree->Next(pEntry); @@ -1237,7 +1237,7 @@ void SwTOXSelectTabPage::Reset( const SfxItemSet& ) INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS, RTL_TEXTENCODING_UTF8 ); - m_pFromFileCB->Check( 0 != sAutoMarkURL.Len() ); + m_pFromFileCB->Check( !sAutoMarkURL.isEmpty() ); m_pCaptionSequenceLB->Clear(); sal_uInt16 i, nCount = rSh.GetFldTypeCount(RES_SETEXPFLD); @@ -1455,7 +1455,7 @@ IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton) IMPL_LINK(SwTOXSelectTabPage, MenuEnableHdl, Menu*, pMenu) { - pMenu->EnableItem("edit", sAutoMarkURL.Len() > 0); + pMenu->EnableItem("edit", !sAutoMarkURL.isEmpty()); return 0; } @@ -1476,7 +1476,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu) { sAutoMarkURL = lcl_CreateAutoMarkFileDlg( sAutoMarkURL, sAutoMarkType, false); - if( !sAutoMarkURL.Len() ) + if( sAutoMarkURL.isEmpty() ) return 0; } @@ -2549,7 +2549,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh) RES_POOLCHR_IDX_MAIN_ENTRY, aEmptyStr )); } -String SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const +OUString SwTOXEntryTabPage::GetLevelHelp(sal_uInt16 nLevel) const { OUString sRet; SwMultiTOXTabDialog* pTOXDlg = (SwMultiTOXTabDialog*)GetTabDialog(); @@ -2736,7 +2736,7 @@ void SwTokenWindow::SetActiveControl(Control* pSet) } } -Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rToken) +Control* SwTokenWindow::InsertItem(const OUString& rText, const SwFormToken& rToken) { Control* pRet = 0; Size aControlSize(m_pCtrlParentWin->GetSizePixel()); @@ -2798,7 +2798,7 @@ Control* SwTokenWindow::InsertItem(const String& rText, const SwFormToken& rT return pRet; } -void SwTokenWindow::InsertAtSelection(const String& rText, const SwFormToken& rToken) +void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken& rToken) { OSL_ENSURE(pActiveCtrl, "no active control!"); @@ -3212,9 +3212,9 @@ IMPL_LINK(SwTokenWindow, ScrollHdl, ImageButton*, pBtn ) return 0; } -String SwTokenWindow::GetPattern() const +OUString SwTokenWindow::GetPattern() const { - String sRet; + OUString sRet; for (ctrl_const_iterator it = aControlList.begin(); it != aControlList.end(); ++it) { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index d31609aa2ba1..da8f89523b99 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -279,7 +279,7 @@ void SwIndexMarkPane::InitControls() m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); - m_pApplyToAllCB->Enable(0 != aOrgStr.Len() && + m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() && 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY ))); SearchTypeHdl(m_pApplyToAllCB); } @@ -342,7 +342,7 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading() } -String SwIndexMarkPane::GetDefaultPhoneticReading( const String& rText ) +OUString SwIndexMarkPane::GetDefaultPhoneticReading( const OUString& rText ) { if( !bIsPhoneticReadingEnabled ) return aEmptyStr; @@ -371,7 +371,7 @@ void SwIndexMarkPane::Activate() m_pApplyToAllCB->Show(); m_pSearchCaseSensitiveCB->Show(); m_pSearchCaseWordOnlyCB->Show(); - m_pApplyToAllCB->Enable(0 != aOrgStr.Len() && + m_pApplyToAllCB->Enable(!aOrgStr.isEmpty() && 0 == (nFrmType & ( FRMTYPE_HEADER | FRMTYPE_FOOTER | FRMTYPE_FLY_ANY ))); SearchTypeHdl(m_pApplyToAllCB); } @@ -1046,7 +1046,7 @@ class SwCreateAuthEntryDlg_Impl : public ModalDialog public: SwCreateAuthEntryDlg_Impl(Window* pParent, - const String pFields[], + const OUString pFields[], SwWrtShell& rSh, sal_Bool bNewEntry, bool bCreate); @@ -1234,8 +1234,8 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, InsertHdl) if(pSh) { bool bDifferent = false; - OSL_ENSURE(m_sFields[AUTH_FIELD_IDENTIFIER].Len() , "No Id is set!"); - OSL_ENSURE(m_sFields[AUTH_FIELD_AUTHORITY_TYPE].Len() , "No authority type is set!"); + OSL_ENSURE(!m_sFields[AUTH_FIELD_IDENTIFIER].isEmpty() , "No Id is set!"); + OSL_ENSURE(!m_sFields[AUTH_FIELD_AUTHORITY_TYPE].isEmpty() , "No authority type is set!"); //check if the entry already exists with different content const SwAuthorityFieldType* pFType = (const SwAuthorityFieldType*) pSh->GetFldType(RES_AUTHORITY, aEmptyStr); @@ -1288,7 +1288,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) bool bCreate = pButton == m_pCreateEntryPB; String sOldId = m_sCreatedEntry[0]; for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++) - m_sCreatedEntry[i] = bCreate ? aEmptyStr : m_sFields[i]; + m_sCreatedEntry[i] = bCreate ? OUString() : m_sFields[i]; SwCreateAuthEntryDlg_Impl aDlg(pButton, bCreate ? m_sCreatedEntry : m_sFields, *pSh, bNewEntry, bCreate); @@ -1382,7 +1382,7 @@ IMPL_LINK(SwAuthorMarkPane, ChangeSourceHdl, RadioButton*, pButton) for(size_t n = 0; n < aIds.size(); ++n) m_pEntryLB->InsertEntry(aIds[n]); } - if(m_sCreatedEntry[AUTH_FIELD_IDENTIFIER].Len()) + if(!m_sCreatedEntry[AUTH_FIELD_IDENTIFIER].isEmpty()) m_pEntryLB->InsertEntry(m_sCreatedEntry[AUTH_FIELD_IDENTIFIER]); } m_pEntryLB->SelectEntryPos(0); @@ -1435,7 +1435,7 @@ void SwAuthorMarkPane::InitControls() { ChangeSourceHdl(m_pFromComponentRB->IsChecked() ? m_pFromComponentRB : m_pFromDocContentRB); m_pCreateEntryPB->Enable(!m_pFromComponentRB->IsChecked()); - if(!m_pFromComponentRB->IsChecked() && m_sCreatedEntry[0].Len()) + if(!m_pFromComponentRB->IsChecked() && !m_sCreatedEntry[0].isEmpty()) for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++) m_sFields[i] = m_sCreatedEntry[i]; } @@ -1462,7 +1462,7 @@ void SwAuthorMarkPane::Activate() } SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, - const String pFields[], + const OUString pFields[], SwWrtShell& rSh, sal_Bool bNewEntry, bool bCreate) @@ -1499,9 +1499,9 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, pTypeListBox = new ListBox(bLeft ? pLeft : pRight, WB_DROPDOWN|WB_BORDER|WB_VCENTER); for(sal_uInt16 j = 0; j < AUTH_TYPE_END; j++) pTypeListBox->InsertEntry(SW_RESSTR(STR_AUTH_TYPE_START + j)); - if(pFields[aCurInfo.nToxField].Len()) + if(!pFields[aCurInfo.nToxField].isEmpty()) { - sal_uInt16 nIndexPos = static_cast< sal_uInt16 >(pFields[aCurInfo.nToxField].ToInt32()); + sal_uInt16 nIndexPos = static_cast< sal_uInt16 >(pFields[aCurInfo.nToxField].toInt32()); pTypeListBox->SelectEntryPos(nIndexPos); } pTypeListBox->set_grid_left_attach(1); @@ -1550,7 +1550,7 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, if(AUTH_FIELD_IDENTIFIER == aCurInfo.nToxField) { pEdits[nIndex]->SetModifyHdl(LINK(this, SwCreateAuthEntryDlg_Impl, ShortNameHdl)); - m_bNameAllowed = pFields[nIndex].Len() > 0; + m_bNameAllowed = !pFields[nIndex].isEmpty(); if(!bCreate) { pFixedTexts[nIndex]->Enable(sal_False); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index bc9bb6004f88..5ab946ec4076 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -141,7 +141,7 @@ namespace // Content, contains names and reference at the content type. -SwContent::SwContent(const SwContentType* pCnt, const String& rName, long nYPos) : +SwContent::SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos) : SwTypeNumber(CTYPE_CNT), pParent(pCnt), sContentName(rName), @@ -1776,7 +1776,7 @@ bool SwContentTree::HasContentChanged() pEntry->SetUserData((void*)pCnt); String sEntryText = GetEntryText(pEntry); if( sEntryText != pCnt->GetName() && - !(sEntryText == sSpace && !pCnt->GetName().Len())) + !(sEntryText == sSpace && pCnt->GetName().isEmpty())) bRepaint = true; } } @@ -1845,7 +1845,7 @@ bool SwContentTree::HasContentChanged() pEntry->SetUserData((void*)pCnt); String sEntryText = GetEntryText(pEntry); if( sEntryText != pCnt->GetName() && - !(sEntryText == sSpace && !pCnt->GetName().Len())) + !(sEntryText == sSpace && pCnt->GetName().isEmpty())) bRepaint = true; } } @@ -1876,7 +1876,7 @@ bool SwContentTree::HasContentChanged() pChild->SetUserData((void*)pCnt); String sEntryText = GetEntryText(pChild); if( sEntryText != pCnt->GetName() && - !(sEntryText == sSpace && !pCnt->GetName().Len())) + !(sEntryText == sSpace && pCnt->GetName().isEmpty())) bRemoveChildren = sal_True; pChild = Next(pChild); } |