summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-07 16:52:06 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-08 12:02:36 +0000
commite73b23562911c15e9996eea70d3aff4983a2018c (patch)
tree2982c0dfc0d121d9be5192acca84eb49289e4670 /sw/source/ui
parent68f7b7a37309f577da1b868ee012246449133c01 (diff)
tidy up WW8FormulaControl, with knock on results elsewhere
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/config/optload.cxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx8
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx2
-rw-r--r--sw/source/ui/fldui/flddinf.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx4
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx6
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx4
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx8
-rw-r--r--sw/source/ui/fldui/javaedit.cxx6
-rw-r--r--sw/source/ui/frmdlg/cption.cxx7
-rw-r--r--sw/source/ui/inc/fldmgr.hxx2
-rw-r--r--sw/source/ui/inc/javaedit.hxx8
-rw-r--r--sw/source/ui/shells/textfld.cxx2
-rw-r--r--sw/source/ui/utlui/content.cxx4
16 files changed, 38 insertions, 35 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index bd08de0df9a3..780f1f081228 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -433,12 +433,14 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet )
nCount = pMgr->GetFldTypeCount();
SwFieldType* pFldType;
for ( i = nCount; i; )
- if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() ==
- aCategoryBox.GetText() )
+ {
+ pFldType = pMgr->GetFldType(USHRT_MAX, --i);
+ if (pFldType->GetName().equals(aCategoryBox.GetText()))
{
nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
break;
}
+ }
::FillCharStyleListBox( aCharStyleLB, pSh->GetView().GetDocShell(), sal_True, sal_True );
}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c309595b97ce..1e019e37d018 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -286,7 +286,7 @@ sal_Bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos)
}
sal_Bool lcl_GetColumnCnt(SwDSParam* pParam,
- const String& rColumnName, long nLanguage, String& rResult, double* pNumber)
+ const String& rColumnName, long nLanguage, rtl::OUString& rResult, double* pNumber)
{
uno::Reference< XColumnsSupplier > xColsSupp( pParam->xResultSet, UNO_QUERY );
uno::Reference<XNameAccess> xCols;
@@ -1757,7 +1757,7 @@ sal_Bool SwNewDBMgr::IsDataSourceOpen(const String& rDataSource,
sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId,
long nLanguage,
- String& rResult, double* pNumber)
+ rtl::OUString& rResult, double* pNumber)
{
sal_Bool bRet = sal_False;
SwDSParam* pFound = 0;
@@ -1822,11 +1822,11 @@ sal_Bool SwNewDBMgr::GetColumnCnt(const String& rSourceName, const String& rTabl
// reads the column data at the current position
sal_Bool SwNewDBMgr::GetMergeColumnCnt(const String& rColumnName, sal_uInt16 nLanguage,
- String &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
+ rtl::OUString &rResult, double *pNumber, sal_uInt32 * /*pFormat*/)
{
if(!pImpl->pMergeData || !pImpl->pMergeData->xResultSet.is() || pImpl->pMergeData->bAfterSelection )
{
- rResult.Erase();
+ rResult = rtl::OUString();
return sal_False;
}
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index 1acb9a3016c9..fa2dc9b82cf3 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -106,7 +106,7 @@ void sw::DropDownFieldDialog::Apply()
{
if(pDropField)
{
- String sSelect = aListItemsLB.GetSelectEntry();
+ rtl::OUString sSelect = aListItemsLB.GetSelectEntry();
if(pDropField->GetPar1() != sSelect)
{
rSh.StartAllAction();
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index d119fffb3591..e9be1807596d 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -139,7 +139,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
nSelEntryData = static_cast< sal_uInt16 >(sVal.ToInt32());
}
- std::vector<String> aLst;
+ std::vector<rtl::OUString> aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
for(size_t i = 0; i < aLst.size(); ++i)
{
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 2bce604a1ae0..461ea9d9fc1d 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -215,7 +215,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
if (nTypeId != USHRT_MAX)
{
- std::vector<String> aLst;
+ std::vector<rtl::OUString> aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
if (nTypeId != TYP_AUTHORFLD)
@@ -347,7 +347,7 @@ IMPL_LINK_NOARG(SwFldDokPage, TypeHdl)
if(SVX_NUM_CHAR_SPECIAL != nTmp)
{
- sal_Int32 nOff = GetCurField()->GetPar2().ToInt32();
+ sal_Int32 nOff = GetCurField()->GetPar2().toInt32();
if( TYP_NEXTPAGEFLD == nTypeId && 1 != nOff )
aValueED.SetText(
String::CreateFromInt32(nOff - 1) );
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 03572c2cad30..9914d1626428 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -338,8 +338,8 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
aNameED.SetDropEnable(sal_True);
if (IsFldEdit())
{
- aCond1ED.SetText(GetCurField()->GetPar2().GetToken(0, '|'));
- aCond2ED.SetText(GetCurField()->GetPar2().GetToken(1, '|'));
+ aCond1ED.SetText(GetCurField()->GetPar2().getToken(0, '|'));
+ aCond2ED.SetText(GetCurField()->GetPar2().getToken(1, '|'));
}
bName = bValue = sal_True;
@@ -500,7 +500,7 @@ void SwFldFuncPage::UpdateSubType()
aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
- std::vector<String> aLst;
+ std::vector<rtl::OUString> aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
size_t nCount = aLst.size();
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 2ebd2cecd0dc..2981723555d5 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -498,7 +498,7 @@ sal_uInt16 SwFldMgr::GetPos(sal_uInt16 nTypeId)
Description: localise subtypes of a field
--------------------------------------------------------------------*/
-sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<String>& rToFill)
+sal_Bool SwFldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<rtl::OUString>& rToFill)
{
sal_Bool bRet = sal_False;
SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell();
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index e3332d088ae3..b4764f2c051f 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -629,7 +629,7 @@ void SwFldRefPage::UpdateSubType()
}
else
{
- std::vector<String> aLst;
+ std::vector<rtl::OUString> aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
for(size_t i = 0; i < aLst.size(); ++i)
aSelectionLB.InsertEntry(aLst[i]);
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index c0170edddb1e..b73c8dbb9810 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -602,7 +602,7 @@ void SwFldVarPage::UpdateSubType()
aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
- std::vector<String> aList;
+ std::vector<rtl::OUString> aList;
GetFldMgr().GetSubTypes(nTypeId, aList);
size_t nCount = aList.size();
size_t nPos;
@@ -632,7 +632,7 @@ void SwFldVarPage::UpdateSubType()
break;
case TYP_GETFLD:
- if (aList[i] == ((SwFormulaField*)GetCurField())->GetFormula())
+ if (aList[i].equals(((const SwFormulaField*)GetCurField())->GetFormula()))
bInsert = sal_True;
break;
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index 94de28a1a639..8661c7ca0911 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -155,7 +155,7 @@ void SwFldInputDlg::StateChanged( StateChangedType nType )
void SwFldInputDlg::Apply()
{
- String aTmp(comphelper::string::remove(aEditED.GetText(), '\r'));
+ rtl::OUString aTmp(comphelper::string::remove(aEditED.GetText(), '\r'));
rSh.StartAllAction();
sal_Bool bModified = sal_False;
@@ -163,21 +163,21 @@ void SwFldInputDlg::Apply()
{
if(pUsrType)
{
- if( aTmp != pUsrType->GetContent() )
+ if( !aTmp.equals(pUsrType->GetContent()) )
{
pUsrType->SetContent(aTmp);
pUsrType->UpdateFlds();
bModified = sal_True;
}
}
- else if( aTmp != pInpFld->GetPar1() )
+ else if( !aTmp.equals(pInpFld->GetPar1()) )
{
pInpFld->SetPar1(aTmp);
rSh.SwEditShell::UpdateFlds(*pInpFld);
bModified = sal_True;
}
}
- else if( aTmp != pSetFld->GetPar2() )
+ else if( !aTmp.equals(pSetFld->GetPar2()) )
{
pSetFld->SetPar2(aTmp);
rSh.SwEditShell::UpdateFlds(*pSetFld);
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index b7af46e91c1d..60d957a50c1e 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -232,7 +232,7 @@ void SwJavaEditDialog::SetFld()
if( bIsUrl )
{
aText = aUrlED.GetText();
- if(aText.Len())
+ if (!aText.isEmpty())
{
SfxMedium* pMedium = pSh->GetView().GetDocShell()->GetMedium();
INetURLObject aAbs;
@@ -246,8 +246,8 @@ void SwJavaEditDialog::SetFld()
else
aText = aEditED.GetText();
- if( !aType.Len() )
- aType = String::CreateFromAscii("JavaScript");
+ if( aType.isEmpty() )
+ aType = "JavaScript";
}
sal_Bool SwJavaEditDialog::IsUpdate()
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 0d7d23b2219a..4b386c43beca 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -233,13 +233,14 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
nCount = pMgr->GetFldTypeCount();
SwFieldType* pFldType;
for ( i = nCount; i; )
- if( ( pFldType = pMgr->GetFldType(USHRT_MAX, --i))->GetName() ==
- aCategoryBox.GetText() )
+ {
+ pFldType = pMgr->GetFldType(USHRT_MAX, --i);
+ if( pFldType->GetName().equals(aCategoryBox.GetText()) )
{
nSelFmt = (sal_uInt16)((SwSetExpFieldType*)pFldType)->GetSeqFormat();
break;
}
-
+ }
nCount = pMgr->GetFormatCount(TYP_SEQFLD, sal_False);
for ( i = 0; i < nCount; ++i )
diff --git a/sw/source/ui/inc/fldmgr.hxx b/sw/source/ui/inc/fldmgr.hxx
index 0ed199082087..eabe9eb63fc0 100644
--- a/sw/source/ui/inc/fldmgr.hxx
+++ b/sw/source/ui/inc/fldmgr.hxx
@@ -202,7 +202,7 @@ public:
static sal_uInt16 GetPos(sal_uInt16 nTypeId);
// subtypes to a type
- sal_Bool GetSubTypes(sal_uInt16 nId, std::vector<String>& rToFill);
+ sal_Bool GetSubTypes(sal_uInt16 nId, std::vector<rtl::OUString>& rToFill);
// format to a type
sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, sal_Bool bIsText, sal_Bool bHtmlMode = sal_False) const;
diff --git a/sw/source/ui/inc/javaedit.hxx b/sw/source/ui/inc/javaedit.hxx
index ad795216c6f9..57d8b9ae3692 100644
--- a/sw/source/ui/inc/javaedit.hxx
+++ b/sw/source/ui/inc/javaedit.hxx
@@ -66,8 +66,8 @@ private:
ImageButton aNextBtn;
HelpButton aHelpBtn;
- String aText;
- String aType;
+ rtl::OUString aText;
+ rtl::OUString aType;
sal_Bool bNew;
sal_Bool bIsUrl;
@@ -97,9 +97,9 @@ public:
SwJavaEditDialog(Window* pParent, SwWrtShell* pWrtSh);
~SwJavaEditDialog();
- String GetText() { return aText; }
+ rtl::OUString GetText() { return aText; }
- String GetType() { return aType; }
+ rtl::OUString GetType() { return aType; }
sal_Bool IsUrl() { return bIsUrl; }
sal_Bool IsNew() { return bNew; }
diff --git a/sw/source/ui/shells/textfld.cxx b/sw/source/ui/shells/textfld.cxx
index 984a77b9b308..b6d674d2e98c 100644
--- a/sw/source/ui/shells/textfld.cxx
+++ b/sw/source/ui/shells/textfld.cxx
@@ -496,7 +496,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
case FN_JAVAEDIT:
{
- String aType, aText;
+ rtl::OUString aType, aText;
sal_Bool bIsUrl=sal_False;
sal_Bool bNew=sal_False, bUpdate=sal_False;
SwFldMgr* pMgr = new SwFldMgr;
diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 441ce46a5436..cde36a8df209 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -658,10 +658,10 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
break;
case CONTENT_TYPE_REFERENCE:
{
- std::vector<String> aRefMarks;
+ std::vector<rtl::OUString> aRefMarks;
nMemberCount = pWrtShell->GetRefMarks( &aRefMarks );
- for(std::vector<String>::const_iterator i = aRefMarks.begin(); i != aRefMarks.end(); ++i)
+ for(std::vector<rtl::OUString>::const_iterator i = aRefMarks.begin(); i != aRefMarks.end(); ++i)
{
//Referenzen nach Alphabet sortiert
SwContent* pCnt = new SwContent(this, *i, 0);