summaryrefslogtreecommitdiff
path: root/sw/source/ui/index
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-08 14:59:26 +0200
committerNoel Grandin <noel@peralex.com>2013-10-10 09:19:00 +0200
commit3b5a0ea9bbbcee299cc0a20482671e0a13d8567c (patch)
tree1a2ea37290de6bb46c9fec6c7ba12b10ed9ecce3 /sw/source/ui/index
parent5126dd89a2f1e8934cee8e654239e989ba1c143c (diff)
convert sw/source/ui/inc/sw*.hxx from String to OUString
Change-Id: I75ee55f9a8e2b7036621adbee40b92f29029f366
Diffstat (limited to 'sw/source/ui/index')
-rw-r--r--sw/source/ui/index/cnttab.cxx30
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx26
2 files changed, 28 insertions, 28 deletions
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);