Kaydet (Commit) 4e0c84ae authored tarafından Noel Grandin's avatar Noel Grandin

convert sw/source/ui/fldui/*.hxx from String to OUString

Change-Id: I7c9e4fdd8f2edf1a7d9a566543571516544bb1c0
üst c9228985
...@@ -587,9 +587,9 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& ) ...@@ -587,9 +587,9 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
return sal_False; return sal_False;
} }
String SwFldFuncPage::TurnMacroString(const String &rMacro) OUString SwFldFuncPage::TurnMacroString(const OUString &rMacro)
{ {
if (rMacro.Len()) if (!rMacro.isEmpty())
{ {
// reverse content of aName // reverse content of aName
String sTmp, sBuf; String sTmp, sBuf;
...@@ -598,9 +598,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro) ...@@ -598,9 +598,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
for (sal_uInt16 i = 0; i < 4 && nPos != -1; i++) for (sal_uInt16 i = 0; i < 4 && nPos != -1; i++)
{ {
if (i == 3) if (i == 3)
sTmp = rMacro.Copy(nPos); sTmp = rMacro.copy(nPos);
else else
sTmp = rMacro.GetToken(0, '.', nPos); sTmp = rMacro.getToken(0, '.', nPos);
if( sBuf.Len() ) if( sBuf.Len() )
sTmp += '.'; sTmp += '.';
......
...@@ -77,7 +77,7 @@ class SwFldFuncPage : public SwFldPage ...@@ -77,7 +77,7 @@ class SwFldFuncPage : public SwFldPage
DECL_LINK( MacroHdl, Button * ); DECL_LINK( MacroHdl, Button * );
void UpdateSubType(); void UpdateSubType();
String TurnMacroString(const String &rMacro); OUString TurnMacroString(const OUString &rMacro);
protected: protected:
virtual sal_uInt16 GetGroup(); virtual sal_uInt16 GetGroup();
......
...@@ -127,8 +127,8 @@ void SwFldPage::EditNewField( sal_Bool bOnlyActivate ) ...@@ -127,8 +127,8 @@ void SwFldPage::EditNewField( sal_Bool bOnlyActivate )
Description: insert field Description: insert field
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const String& rPar1, sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUString& rPar1,
const String& rPar2, sal_uLong nFormatId, const OUString& rPar2, sal_uLong nFormatId,
sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage) sal_Unicode cSeparator, sal_Bool bIsAutomaticLanguage)
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
...@@ -157,13 +157,13 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str ...@@ -157,13 +157,13 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
if(bRecordDB) if(bRecordDB)
{ {
aReq.AppendItem(SfxStringItem aReq.AppendItem(SfxStringItem
(FN_INSERT_DBFIELD,rPar1.GetToken(0, DB_DELIM))); (FN_INSERT_DBFIELD,rPar1.getToken(0, DB_DELIM)));
aReq.AppendItem(SfxStringItem aReq.AppendItem(SfxStringItem
(FN_PARAM_1,rPar1.GetToken(1, DB_DELIM))); (FN_PARAM_1,rPar1.getToken(1, DB_DELIM)));
aReq.AppendItem(SfxInt32Item aReq.AppendItem(SfxInt32Item
(FN_PARAM_3,rPar1.GetToken(1, DB_DELIM).ToInt32())); (FN_PARAM_3,rPar1.getToken(1, DB_DELIM).toInt32()));
aReq.AppendItem(SfxStringItem aReq.AppendItem(SfxStringItem
(FN_PARAM_2,rPar1.GetToken(3, DB_DELIM))); (FN_PARAM_2,rPar1.getToken(3, DB_DELIM)));
} }
else else
{ {
...@@ -201,10 +201,10 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str ...@@ -201,10 +201,10 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
sal_Int32 nPos = 0; sal_Int32 nPos = 0;
SwDBData aData; SwDBData aData;
aData.sDataSource = rPar1.GetToken(0, DB_DELIM, nPos); aData.sDataSource = rPar1.getToken(0, DB_DELIM, nPos);
aData.sCommand = rPar1.GetToken(0, DB_DELIM, nPos); aData.sCommand = rPar1.getToken(0, DB_DELIM, nPos);
aData.nCommandType = rPar1.GetToken(0, DB_DELIM, nPos).ToInt32(); aData.nCommandType = rPar1.getToken(0, DB_DELIM, nPos).toInt32();
sPar1 = rPar1.Copy(nPos); sPar1 = rPar1.copy(nPos);
((SwDBNameInfField*)pTmpFld)->SetDBData(aData); ((SwDBNameInfField*)pTmpFld)->SetDBData(aData);
} }
...@@ -213,10 +213,10 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str ...@@ -213,10 +213,10 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str
case TYP_DBFLD: case TYP_DBFLD:
{ {
SwDBData aData; SwDBData aData;
aData.sDataSource = rPar1.GetToken(0, DB_DELIM); aData.sDataSource = rPar1.getToken(0, DB_DELIM);
aData.sCommand = rPar1.GetToken(1, DB_DELIM); aData.sCommand = rPar1.getToken(1, DB_DELIM);
aData.nCommandType = rPar1.GetToken(2, DB_DELIM).ToInt32(); aData.nCommandType = rPar1.getToken(2, DB_DELIM).toInt32();
String sColumn = rPar1.GetToken(3, DB_DELIM); String sColumn = rPar1.getToken(3, DB_DELIM);
SwDBFieldType* pOldTyp = (SwDBFieldType*)pTmpFld->GetTyp(); SwDBFieldType* pOldTyp = (SwDBFieldType*)pTmpFld->GetTyp();
SwDBFieldType* pTyp = (SwDBFieldType*)pSh->InsertFldType( SwDBFieldType* pTyp = (SwDBFieldType*)pSh->InsertFldType(
...@@ -303,7 +303,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2, ...@@ -303,7 +303,7 @@ void SwFldPage::SavePos( const ListBox* pLst1, const ListBox* pLst2,
if( (*ppLB) && (*ppLB)->GetEntryCount() ) if( (*ppLB) && (*ppLB)->GetEntryCount() )
m_aLstStrArr[ i ] = (*ppLB)->GetSelectEntry(); m_aLstStrArr[ i ] = (*ppLB)->GetSelectEntry();
else else
m_aLstStrArr[ i ].Erase(); m_aLstStrArr[ i ] = "";
} }
void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
...@@ -312,7 +312,7 @@ void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3) ...@@ -312,7 +312,7 @@ void SwFldPage::RestorePos(ListBox* pLst1, ListBox* pLst2, ListBox* pLst3)
ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 }; ListBox* aLBArr [ coLBCount ] = { pLst1, pLst2, pLst3 };
ListBox** ppLB = aLBArr; ListBox** ppLB = aLBArr;
for( int i = 0; i < coLBCount; ++i, ++ppLB ) for( int i = 0; i < coLBCount; ++i, ++ppLB )
if( (*ppLB) && (*ppLB)->GetEntryCount() && m_aLstStrArr[ i ].Len() && if( (*ppLB) && (*ppLB)->GetEntryCount() && !m_aLstStrArr[ i ].isEmpty() &&
LISTBOX_ENTRY_NOTFOUND != LISTBOX_ENTRY_NOTFOUND !=
( nPos = (*ppLB)->GetEntryPos(m_aLstStrArr[ i ] ) ) ) ( nPos = (*ppLB)->GetEntryPos(m_aLstStrArr[ i ] ) ) )
(*ppLB)->SelectEntryPos( nPos ); (*ppLB)->SelectEntryPos( nPos );
......
...@@ -30,12 +30,12 @@ const int coLBCount = 3; ...@@ -30,12 +30,12 @@ const int coLBCount = 3;
class SwFldPage : public SfxTabPage class SwFldPage : public SfxTabPage
{ {
String m_aLstStrArr[ coLBCount ]; OUString m_aLstStrArr[ coLBCount ];
SwFldMgr m_aMgr; SwFldMgr m_aMgr;
SwField *m_pCurFld; SwField *m_pCurFld;
SwWrtShell* m_pWrtShell; SwWrtShell* m_pWrtShell;
sal_uInt16 m_nTypeSel; sal_uInt16 m_nTypeSel;
sal_uInt16 m_nSelectionSel; sal_uInt16 m_nSelectionSel;
bool m_bFldEdit; bool m_bFldEdit;
sal_Bool m_bInsert; sal_Bool m_bInsert;
sal_Bool m_bFldDlgHtmlMode; sal_Bool m_bFldDlgHtmlMode;
...@@ -68,8 +68,8 @@ protected: ...@@ -68,8 +68,8 @@ protected:
// insert field // insert field
sal_Bool InsertFld( sal_uInt16 nTypeId, sal_Bool InsertFld( sal_uInt16 nTypeId,
sal_uInt16 nSubType, sal_uInt16 nSubType,
const String& rPar1, const OUString& rPar1,
const String& rPar2, const OUString& rPar2,
sal_uLong nFormatId, sal_uLong nFormatId,
sal_Unicode cDelim = ' ', sal_Unicode cDelim = ' ',
sal_Bool bIsAutomaticLanguage = sal_True); sal_Bool bIsAutomaticLanguage = sal_True);
......
...@@ -70,10 +70,10 @@ class SwFldVarPage : public SwFldPage ...@@ -70,10 +70,10 @@ class SwFldVarPage : public SwFldPage
sal_uInt16 m_nApplyId; sal_uInt16 m_nApplyId;
sal_uInt16 m_nDeleteId; sal_uInt16 m_nDeleteId;
String sOldValueFT; OUString sOldValueFT;
String sOldNameFT; OUString sOldNameFT;
sal_uLong nOldFormat; sal_uLong nOldFormat;
sal_Bool bInit; sal_Bool bInit;
DECL_LINK(TypeHdl, void *); DECL_LINK(TypeHdl, void *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment