summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-19 08:57:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-19 10:38:18 +0100
commitec1a6ef42e1100edf3a855a292787136d7477f35 (patch)
tree2df89244f7d7d462a60e8981d40f103b0c18934f /sw/source/ui
parentb7bdc730188bbe183897a50dd17092f92df3b31a (diff)
convert field function page to .ui
Change-Id: Ied4353f4997e330f65b8dffb58bbdc791196427e
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx21
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx426
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx55
-rw-r--r--sw/source/ui/fldui/fldfunc.src243
-rw-r--r--sw/source/ui/fldui/fldtdlg.hrc31
-rw-r--r--sw/source/ui/inc/actctrl.hxx5
-rw-r--r--sw/source/ui/utlui/condedit.cxx3
7 files changed, 256 insertions, 528 deletions
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index faef4e9bf922..01b57a093297 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -93,6 +93,11 @@ void NoSpaceEdit::Modify()
GetModifyHdl().Call(this);
}
+ReturnActionEdit::ReturnActionEdit(Window* pParent, const ResId& rResId)
+ : Edit(pParent, rResId)
+{
+}
+
ReturnActionEdit::~ReturnActionEdit()
{
}
@@ -111,16 +116,22 @@ void ReturnActionEdit::KeyInput( const KeyEvent& rEvt)
Edit::KeyInput(rEvt);
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent, VclBuilder::stringmap &)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTableNameEdit(Window *pParent, VclBuilder::stringmap &rMap)
{
- TableNameEdit* pTableNameEdit = new TableNameEdit(pParent);
- pTableNameEdit->SetWidthInChars(25);
- return pTableNameEdit;
+ VclBuilder::ensureDefaultWidthChars(rMap);
+ return new TableNameEdit(pParent);
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent, VclBuilder::stringmap &)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNoSpaceEdit(Window *pParent, VclBuilder::stringmap &rMap)
{
+ VclBuilder::ensureDefaultWidthChars(rMap);
return new NoSpaceEdit(pParent);
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeReturnActionEdit(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ VclBuilder::ensureDefaultWidthChars(rMap);
+ return new ReturnActionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 4bf01b39bb20..713ad42c05d6 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -39,46 +39,47 @@
using namespace ::com::sun::star;
-SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet ) :
- SwFldPage( pParent, SW_RES( TP_FLD_FUNC ), rCoreSet ),
-
- aTypeFT (this, SW_RES(FT_FUNCTYPE)),
- aTypeLB (this, SW_RES(LB_FUNCTYPE)),
- aSelectionLB(this, SW_RES(LB_FUNCSELECTION)),
- aFormatFT (this, SW_RES(FT_FUNCFORMAT)),
- aFormatLB (this, SW_RES(LB_FUNCFORMAT)),
- aNameFT (this, SW_RES(FT_FUNCNAME)),
- aNameED (this, SW_RES(ED_FUNCNAME)),
- aValueFT (this, SW_RES(FT_FUNCVALUE)),
- aValueED (this, SW_RES(ED_FUNCVALUE)),
- aCond1FT (this, SW_RES(FT_FUNCCOND1)),
- aCond1ED (this, SW_RES(ED_FUNCCOND1)),
- aCond2FT (this, SW_RES(FT_FUNCCOND2)),
- aCond2ED (this, SW_RES(ED_FUNCCOND2)),
- aMacroBT (this, SW_RES(BT_FUNCMACRO)),
- aListItemFT( this, SW_RES( FT_LISTITEM )),
- aListItemED( this, SW_RES( ED_LISTITEM )),
- aListAddPB( this, SW_RES( PB_LISTADD )),
- aListItemsFT( this, SW_RES( FT_LISTITEMS )),
- aListItemsLB( this, SW_RES( LB_LISTITEMS )),
- aListRemovePB( this, SW_RES( PB_LISTREMOVE )),
- aListUpPB( this, SW_RES( PB_LISTUP )),
- aListDownPB( this, SW_RES( PB_LISTDOWN )),
- aListNameFT( this, SW_RES( FT_LISTNAME )),
- aListNameED( this, SW_RES( ED_LISTNAME )),
- bDropDownLBChanged(false)
+SwFldFuncPage::SwFldFuncPage(Window* pParent, const SfxItemSet& rCoreSet)
+ : SwFldPage(pParent, "FldFuncPage",
+ "modules/swriter/ui/fldfuncpage.ui", rCoreSet)
+ , bDropDownLBChanged(false)
{
- FreeResource();
-
- aNameED.SetPosPixel(Point(aNameED.GetPosPixel().X(), aFormatLB.GetPosPixel().Y()));
-
- aNameED.SetModifyHdl(LINK(this, SwFldFuncPage, ModifyHdl));
-
- sOldValueFT = aValueFT.GetText();
- sOldNameFT = aNameFT.GetText();
-
- aCond1ED.ShowBrackets(false);
- aCond2ED.ShowBrackets(false);
+ get(m_pTypeLB, "type");
+ get(m_pFormat, "formatframe");
+ get(m_pSelectionLB, "select");
+ get(m_pFormatLB, "format");
+ get(m_pNameFT, "nameft");
+ get(m_pNameED, "name");
+ get(m_pValueGroup, "valuegroup");
+ get(m_pValueFT, "valueft");
+ get(m_pValueED, "value");
+ get(m_pCond1FT, "cond1ft");
+ get(m_pCond1ED, "cond1");
+ get(m_pCond2FT, "cond2ft");
+ get(m_pCond2ED, "cond2");
+ get(m_pMacroBT, "macro");
+
+ get(m_pListGroup, "listgroup");
+ get(m_pListItemFT, "itemft");
+ get(m_pListItemED, "item");
+ get(m_pListAddPB, "add");
+ get(m_pListItemsFT, "listitemft");
+ get(m_pListItemsLB, "listitems");
+ m_pListItemsLB->SetDropDownLineCount(5);
+ m_pListItemsLB->set_width_request(m_pListItemED->GetOptimalSize().Width());
+ get(m_pListRemovePB, "remove");
+ get(m_pListUpPB, "up");
+ get(m_pListDownPB, "down");
+ get(m_pListNameFT, "listnameft");
+ get(m_pListNameED, "listname");
+
+ m_pNameED->SetModifyHdl(LINK(this, SwFldFuncPage, ModifyHdl));
+
+ m_sOldValueFT = m_pValueFT->GetText();
+ m_sOldNameFT = m_pNameFT->GetText();
+
+ m_pCond1ED->ShowBrackets(false);
+ m_pCond2ED->ShowBrackets(false);
}
@@ -88,11 +89,11 @@ SwFldFuncPage::~SwFldFuncPage()
void SwFldFuncPage::Reset(const SfxItemSet& )
{
- SavePos(&aTypeLB);
+ SavePos(m_pTypeLB);
Init(); // general initialisation
- aTypeLB.SetUpdateMode(sal_False);
- aTypeLB.Clear();
+ m_pTypeLB->SetUpdateMode(sal_False);
+ m_pTypeLB->Clear();
sal_uInt16 nPos, nTypeId;
@@ -105,15 +106,15 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
for(short i = rRg.nStart; i < rRg.nEnd; ++i)
{
nTypeId = GetFldMgr().GetTypeId(i);
- nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(i));
- aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
+ nPos = m_pTypeLB->InsertEntry(GetFldMgr().GetTypeStr(i));
+ m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
}
}
else
{
nTypeId = GetCurField()->GetTypeId();
- nPos = aTypeLB.InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
- aTypeLB.SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
+ nPos = m_pTypeLB->InsertEntry(GetFldMgr().GetTypeStr(GetFldMgr().GetPos(nTypeId)));
+ m_pTypeLB->SetEntryData(nPos, reinterpret_cast<void*>(nTypeId));
if (nTypeId == TYP_MACROFLD)
{
@@ -123,23 +124,23 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
// select old Pos
- RestorePos(&aTypeLB);
-
- aTypeLB.SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl));
- aTypeLB.SetSelectHdl (LINK(this, SwFldFuncPage, TypeHdl));
- aSelectionLB.SetSelectHdl (LINK(this, SwFldFuncPage, SelectHdl));
- aSelectionLB.SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertMacroHdl));
- aFormatLB.SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl));
- aMacroBT.SetClickHdl (LINK(this, SwFldFuncPage, MacroHdl));
+ RestorePos(m_pTypeLB);
+
+ m_pTypeLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl));
+ m_pTypeLB->SetSelectHdl (LINK(this, SwFldFuncPage, TypeHdl));
+ m_pSelectionLB->SetSelectHdl (LINK(this, SwFldFuncPage, SelectHdl));
+ m_pSelectionLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertMacroHdl));
+ m_pFormatLB->SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl));
+ m_pMacroBT->SetClickHdl (LINK(this, SwFldFuncPage, MacroHdl));
Link aListModifyLk( LINK(this, SwFldFuncPage, ListModifyHdl));
- aListAddPB.SetClickHdl(aListModifyLk);
- aListRemovePB.SetClickHdl(aListModifyLk);
- aListUpPB.SetClickHdl(aListModifyLk);
- aListDownPB.SetClickHdl(aListModifyLk);
- aListItemED.SetReturnActionLink(aListModifyLk);
+ m_pListAddPB->SetClickHdl(aListModifyLk);
+ m_pListRemovePB->SetClickHdl(aListModifyLk);
+ m_pListUpPB->SetClickHdl(aListModifyLk);
+ m_pListDownPB->SetClickHdl(aListModifyLk);
+ m_pListItemED->SetReturnActionLink(aListModifyLk);
Link aListEnableLk = LINK(this, SwFldFuncPage, ListEnableHdl);
- aListItemED.SetModifyHdl(aListEnableLk);
- aListItemsLB.SetSelectHdl(aListEnableLk);
+ m_pListItemED->SetModifyHdl(aListEnableLk);
+ m_pListItemsLB->SetSelectHdl(aListEnableLk);
if( !IsRefresh() )
{
@@ -150,10 +151,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.ToInt32());
if(nVal != USHRT_MAX)
{
- for(sal_uInt16 i = 0; i < aTypeLB.GetEntryCount(); i++)
- if(nVal == (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(i))
+ for(sal_uInt16 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
+ if(nVal == (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(i))
{
- aTypeLB.SelectEntryPos(i);
+ m_pTypeLB->SelectEntryPos(i);
break;
}
}
@@ -161,14 +162,14 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
}
TypeHdl(0);
- aTypeLB.SetUpdateMode(sal_True);
+ m_pTypeLB->SetUpdateMode(sal_True);
if (IsFldEdit())
{
- aNameED.SaveValue();
- aValueED.SaveValue();
- aCond1ED.SaveValue();
- aCond2ED.SaveValue();
+ m_pNameED->SaveValue();
+ m_pValueED->SaveValue();
+ m_pCond1ED->SaveValue();
+ m_pCond2ED->SaveValue();
nOldFormat = GetCurField()->GetFormat();
}
}
@@ -179,39 +180,39 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
const sal_uInt16 nOld = GetTypeSel();
// current ListBoxPos
- SetTypeSel(aTypeLB.GetSelectEntryPos());
+ SetTypeSel(m_pTypeLB->GetSelectEntryPos());
if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND)
{
SetTypeSel(0);
- aTypeLB.SelectEntryPos(0);
+ m_pTypeLB->SelectEntryPos(0);
}
if (nOld != GetTypeSel())
{
- sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
// fill Selection-Listbox
UpdateSubType();
// fill Format-Listbox
- aFormatLB.Clear();
+ m_pFormatLB->Clear();
sal_uInt16 nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode());
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = aFormatLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- aFormatLB.SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) );
+ sal_uInt16 nPos = m_pFormatLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ m_pFormatLB->SetEntryData( nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId( nTypeId, i )) );
}
if (nSize)
{
if (IsFldEdit() && nTypeId == TYP_JUMPEDITFLD)
- aFormatLB.SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
+ m_pFormatLB->SelectEntry(SW_RESSTR(FMT_MARK_BEGIN + (sal_uInt16)GetCurField()->GetFormat()));
- if (!aFormatLB.GetSelectEntryCount())
- aFormatLB.SelectEntryPos(0);
+ if (!m_pFormatLB->GetSelectEntryCount())
+ m_pFormatLB->SelectEntryPos(0);
}
sal_Bool bValue = sal_False, bName = sal_False, bMacro = sal_False, bInsert = sal_True;
@@ -221,28 +222,18 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
sal_Bool bDropDown = TYP_DROPDOWN == nTypeId;
sal_Bool bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
- aCond1FT.Show(!bDropDown && bCondTxtFld);
- aCond1ED.Show(!bDropDown && bCondTxtFld);
- aCond2FT.Show(!bDropDown && bCondTxtFld);
- aCond2ED.Show(!bDropDown && bCondTxtFld);
- aValueFT.Show(!bDropDown && !bCondTxtFld);
- aValueED.Show(!bDropDown && !bCondTxtFld);
- aMacroBT.Show(!bDropDown);
- aNameED.Show(!bDropDown);
- aNameFT.Show(!bDropDown);
-
- aListItemFT.Show(bDropDown);
- aListItemED.Show(bDropDown);
- aListAddPB.Show(bDropDown);
- aListItemsFT.Show(bDropDown);
- aListItemsLB.Show(bDropDown);
- aListRemovePB.Show(bDropDown);
- aListUpPB.Show(bDropDown);
- aListDownPB.Show(bDropDown);
- aListNameFT.Show(bDropDown);
- aListNameED.Show(bDropDown);
-
- aNameED.SetDropEnable(false);
+ m_pCond1FT->Show(!bDropDown && bCondTxtFld);
+ m_pCond1ED->Show(!bDropDown && bCondTxtFld);
+ m_pCond2FT->Show(!bDropDown && bCondTxtFld);
+ m_pCond2ED->Show(!bDropDown && bCondTxtFld);
+ m_pValueGroup->Show(!bDropDown && !bCondTxtFld);
+ m_pMacroBT->Show(!bDropDown);
+ m_pNameED->Show(!bDropDown);
+ m_pNameFT->Show(!bDropDown);
+
+ m_pListGroup->Show(bDropDown);
+
+ m_pNameED->SetDropEnable(false);
if (IsFldEdit())
{
@@ -251,32 +242,32 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
const SwDropDownField* pDrop = (const SwDropDownField*)GetCurField();
uno::Sequence<OUString> aItems = pDrop->GetItemSequence();
const OUString* pArray = aItems.getConstArray();
- aListItemsLB.Clear();
+ m_pListItemsLB->Clear();
for(sal_Int32 i = 0; i < aItems.getLength(); i++)
- aListItemsLB.InsertEntry(pArray[i]);
- aListItemsLB.SelectEntry(pDrop->GetSelectedItem());
- aListNameED.SetText(pDrop->GetPar2());
- aListNameED.SaveValue();
+ m_pListItemsLB->InsertEntry(pArray[i]);
+ m_pListItemsLB->SelectEntry(pDrop->GetSelectedItem());
+ m_pListNameED->SetText(pDrop->GetPar2());
+ m_pListNameED->SaveValue();
bDropDownLBChanged = false;
}
else
{
- aNameED.SetText(GetCurField()->GetPar1());
- aValueED.SetText(GetCurField()->GetPar2());
+ m_pNameED->SetText(GetCurField()->GetPar1());
+ m_pValueED->SetText(GetCurField()->GetPar2());
}
}
else
{
- aNameED.SetText(aEmptyStr);
- aValueED.SetText(aEmptyStr);
+ m_pNameED->SetText(aEmptyStr);
+ m_pValueED->SetText(aEmptyStr);
}
if(bDropDown)
ListEnableHdl(0);
- if( aNameFT.GetText() != OUString(sOldNameFT) )
- aNameFT.SetText(sOldNameFT);
- if (aValueFT.GetText() != OUString(sOldValueFT))
- aValueFT.SetText(sOldValueFT);
+ if( m_pNameFT->GetText() != OUString(m_sOldNameFT) )
+ m_pNameFT->SetText(m_sOldNameFT);
+ if (m_pValueFT->GetText() != OUString(m_sOldValueFT))
+ m_pValueFT->SetText(m_sOldValueFT);
switch (nTypeId)
{
@@ -287,75 +278,75 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
else
bInsert = sal_False;
- aNameFT.SetText(SW_RESSTR(STR_MACNAME));
- aValueFT.SetText(SW_RESSTR(STR_PROMPT));
- aNameED.SetText(GetFldMgr().GetMacroName());
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameFT->SetText(SW_RESSTR(STR_MACNAME));
+ m_pValueFT->SetText(SW_RESSTR(STR_PROMPT));
+ m_pNameED->SetText(GetFldMgr().GetMacroName());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
break;
case TYP_HIDDENPARAFLD:
- aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(true);
+ m_pNameFT->SetText(SW_RESSTR(STR_COND));
+ m_pNameED->SetDropEnable(true);
bName = sal_True;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
break;
case TYP_HIDDENTXTFLD:
{
- aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(true);
- aValueFT.SetText(SW_RESSTR(STR_INSTEXT));
+ m_pNameFT->SetText(SW_RESSTR(STR_COND));
+ m_pNameED->SetDropEnable(true);
+ m_pValueFT->SetText(SW_RESSTR(STR_INSTEXT));
SwWrtShell* pSh = GetActiveWrtShell();
if (!IsFldEdit() && pSh )
- aValueED.SetText(pSh->GetSelTxt());
+ m_pValueED->SetText(pSh->GetSelTxt());
bName = bValue = sal_True;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
}
break;
case TYP_CONDTXTFLD:
- aNameFT.SetText(SW_RESSTR(STR_COND));
- aNameED.SetDropEnable(true);
+ m_pNameFT->SetText(SW_RESSTR(STR_COND));
+ m_pNameED->SetDropEnable(true);
if (IsFldEdit())
{
- aCond1ED.SetText(GetCurField()->GetPar2().getToken(0, '|'));
- aCond2ED.SetText(GetCurField()->GetPar2().getToken(1, '|'));
+ m_pCond1ED->SetText(GetCurField()->GetPar2().getToken(0, '|'));
+ m_pCond2ED->SetText(GetCurField()->GetPar2().getToken(1, '|'));
}
bName = bValue = sal_True;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
break;
case TYP_JUMPEDITFLD:
- aNameFT.SetText(SW_RESSTR(STR_JUMPEDITFLD));
- aValueFT.SetText(SW_RESSTR(STR_PROMPT));
+ m_pNameFT->SetText(SW_RESSTR(STR_JUMPEDITFLD));
+ m_pValueFT->SetText(SW_RESSTR(STR_PROMPT));
bName = bValue = sal_True;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
break;
case TYP_INPUTFLD:
- aValueFT.SetText(SW_RESSTR(STR_PROMPT));
+ m_pValueFT->SetText(SW_RESSTR(STR_PROMPT));
bValue = sal_True;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
break;
case TYP_COMBINED_CHARS:
{
- aNameFT.SetText(SW_RESSTR(STR_COMBCHRS_FT));
- aNameED.SetDropEnable(true);
+ m_pNameFT->SetText(SW_RESSTR(STR_COMBCHRS_FT));
+ m_pNameED->SetDropEnable(true);
bName = sal_True;
- const sal_Int32 nLen = aNameED.GetText().getLength();
+ const sal_Int32 nLen = m_pNameED->GetText().getLength();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
bInsert = sal_False;
- aNameED.SetAccessibleName(aNameFT.GetText());
- aValueED.SetAccessibleName(aValueFT.GetText());
+ m_pNameED->SetAccessibleName(m_pNameFT->GetText());
+ m_pValueED->SetAccessibleName(m_pValueFT->GetText());
}
break;
case TYP_DROPDOWN :
@@ -364,17 +355,13 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
break;
}
- aFormatLB.Show();
- aFormatFT.Show();
- aSelectionLB.Hide();
+ m_pSelectionLB->Hide();
- aFormatLB.Enable(bFormat);
- aFormatFT.Enable(bFormat);
- aNameFT.Enable(bName);
- aNameED.Enable(bName);
- aValueFT.Enable(bValue);
- aValueED.Enable(bValue);
- aMacroBT.Enable(bMacro);
+ m_pFormat->Enable(bFormat);
+ m_pNameFT->Enable(bName);
+ m_pNameED->Enable(bName);
+ m_pValueGroup->Enable(bValue);
+ m_pMacroBT->Enable(bMacro);
EnableInsert( bInsert );
}
@@ -384,10 +371,10 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
IMPL_LINK_NOARG(SwFldFuncPage, SelectHdl)
{
- sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
if( TYP_MACROFLD == nTypeId )
- aNameED.SetText( aSelectionLB.GetSelectEntry() );
+ m_pNameED->SetText( m_pSelectionLB->GetSelectEntry() );
return 0;
}
@@ -402,47 +389,47 @@ IMPL_LINK_NOARG(SwFldFuncPage, InsertMacroHdl)
IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
{
- aListItemsLB.SetUpdateMode(sal_False);
- if(pControl == &aListAddPB ||
- (pControl == &aListItemED && aListAddPB.IsEnabled()))
+ m_pListItemsLB->SetUpdateMode(sal_False);
+ if(pControl == m_pListAddPB ||
+ (pControl == m_pListItemED && m_pListAddPB->IsEnabled()))
{
- String sEntry(aListItemED.GetText());
- aListItemsLB.InsertEntry(sEntry);
- aListItemsLB.SelectEntry(sEntry);
+ String sEntry(m_pListItemED->GetText());
+ m_pListItemsLB->InsertEntry(sEntry);
+ m_pListItemsLB->SelectEntry(sEntry);
}
- else if(aListItemsLB.GetSelectEntryCount())
+ else if(m_pListItemsLB->GetSelectEntryCount())
{
- sal_uInt16 nSelPos = aListItemsLB.GetSelectEntryPos();
- if(pControl == &aListRemovePB)
+ sal_uInt16 nSelPos = m_pListItemsLB->GetSelectEntryPos();
+ if(pControl == m_pListRemovePB)
{
- aListItemsLB.RemoveEntry(nSelPos);
- aListItemsLB.SelectEntryPos(nSelPos ? nSelPos - 1 : 0);
+ m_pListItemsLB->RemoveEntry(nSelPos);
+ m_pListItemsLB->SelectEntryPos(nSelPos ? nSelPos - 1 : 0);
}
- else if(pControl == &aListUpPB)
+ else if(pControl == m_pListUpPB)
{
if(nSelPos)
{
- String sEntry = aListItemsLB.GetSelectEntry();
- aListItemsLB.RemoveEntry(nSelPos);
+ String sEntry = m_pListItemsLB->GetSelectEntry();
+ m_pListItemsLB->RemoveEntry(nSelPos);
nSelPos--;
- aListItemsLB.InsertEntry(sEntry, nSelPos);
- aListItemsLB.SelectEntryPos(nSelPos);
+ m_pListItemsLB->InsertEntry(sEntry, nSelPos);
+ m_pListItemsLB->SelectEntryPos(nSelPos);
}
}
- else if(pControl == &aListDownPB)
+ else if(pControl == m_pListDownPB)
{
- if(nSelPos < aListItemsLB.GetEntryCount() - 1)
+ if(nSelPos < m_pListItemsLB->GetEntryCount() - 1)
{
- String sEntry = aListItemsLB.GetSelectEntry();
- aListItemsLB.RemoveEntry(nSelPos);
+ String sEntry = m_pListItemsLB->GetSelectEntry();
+ m_pListItemsLB->RemoveEntry(nSelPos);
nSelPos++;
- aListItemsLB.InsertEntry(sEntry, nSelPos);
- aListItemsLB.SelectEntryPos(nSelPos);
+ m_pListItemsLB->InsertEntry(sEntry, nSelPos);
+ m_pListItemsLB->SelectEntryPos(nSelPos);
}
}
}
bDropDownLBChanged = true;
- aListItemsLB.SetUpdateMode(sal_True);
+ m_pListItemsLB->SetUpdateMode(sal_True);
ListEnableHdl(0);
return 0;
}
@@ -450,13 +437,13 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl)
{
//enable "Add" button when text is in the Edit that's not already member of the box
- aListAddPB.Enable(!aListItemED.GetText().isEmpty() &&
- LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText()));
- sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
- aListRemovePB.Enable(bEnableButtons);
- aListUpPB.Enable(bEnableButtons && (aListItemsLB.GetSelectEntryPos() > 0));
- aListDownPB.Enable(bEnableButtons &&
- (aListItemsLB.GetSelectEntryPos() < (aListItemsLB.GetEntryCount() - 1)));
+ m_pListAddPB->Enable(!m_pListItemED->GetText().isEmpty() &&
+ LISTBOX_ENTRY_NOTFOUND == m_pListItemsLB->GetEntryPos(m_pListItemED->GetText()));
+ sal_Bool bEnableButtons = m_pListItemsLB->GetSelectEntryCount() > 0;
+ m_pListRemovePB->Enable(bEnableButtons);
+ m_pListUpPB->Enable(bEnableButtons && (m_pListItemsLB->GetSelectEntryPos() > 0));
+ m_pListDownPB->Enable(bEnableButtons &&
+ (m_pListItemsLB->GetSelectEntryPos() < (m_pListItemsLB->GetEntryCount() - 1)));
return 0;
}
@@ -466,11 +453,11 @@ IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl)
--------------------------------------------------------------------*/
void SwFldFuncPage::UpdateSubType()
{
- sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
// fill Selction-Listbox
- aSelectionLB.SetUpdateMode(sal_False);
- aSelectionLB.Clear();
+ m_pSelectionLB->SetUpdateMode(sal_False);
+ m_pSelectionLB->Clear();
std::vector<OUString> aLst;
GetFldMgr().GetSubTypes(nTypeId, aLst);
@@ -478,17 +465,17 @@ void SwFldFuncPage::UpdateSubType()
for(size_t i = 0; i < nCount; ++i)
{
- size_t nPos = aSelectionLB.InsertEntry(aLst[i]);
- aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
+ size_t nPos = m_pSelectionLB->InsertEntry(aLst[i]);
+ m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(i));
}
sal_Bool bEnable = nCount != 0;
- aSelectionLB.Enable( bEnable );
+ m_pSelectionLB->Enable( bEnable );
if (bEnable)
{
- aSelectionLB.SelectEntryPos(0);
+ m_pSelectionLB->SelectEntryPos(0);
}
if (nTypeId == TYP_MACROFLD)
@@ -497,14 +484,13 @@ void SwFldFuncPage::UpdateSubType()
if (bHasMacro)
{
- aNameED.SetText(GetFldMgr().GetMacroName());
- aValueFT.Enable();
- aValueED.Enable();
+ m_pNameED->SetText(GetFldMgr().GetMacroName());
+ m_pValueGroup->Enable();
}
EnableInsert(bHasMacro);
}
- aSelectionLB.SetUpdateMode(sal_True);
+ m_pSelectionLB->SetUpdateMode(sal_True);
}
/*--------------------------------------------------------------------
@@ -515,7 +501,7 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
Window* pDefModalDlgParent = Application::GetDefDialogParent();
Application::SetDefDialogParent( pBtn );
- String sMacro(TurnMacroString(aNameED.GetText()));
+ String sMacro(TurnMacroString(m_pNameED->GetText()));
while (sMacro.SearchAndReplace('.', ';') != STRING_NOTFOUND) ;
if (GetFldMgr().ChooseMacro(sMacro))
@@ -528,26 +514,26 @@ IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
{
- sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
sal_uInt16 nSubType = 0;
- sal_uLong nFormat = aFormatLB.GetSelectEntryPos();
+ sal_uLong nFormat = m_pFormatLB->GetSelectEntryPos();
if(nFormat == LISTBOX_ENTRY_NOTFOUND)
nFormat = 0;
else
- nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
+ nFormat = (sal_uLong)m_pFormatLB->GetEntryData((sal_uInt16)nFormat);
- String aVal(aValueED.GetText());
- String aName(aNameED.GetText());
+ String aVal(m_pValueED->GetText());
+ String aName(m_pNameED->GetText());
switch(nTypeId)
{
case TYP_INPUTFLD:
nSubType = INP_TXT;
// to prevent removal of CR/LF restore old content
- if(!aNameED.IsModified() && IsFldEdit())
+ if(!m_pNameED->IsModified() && IsFldEdit())
aName = GetCurField()->GetPar1();
break;
@@ -558,18 +544,18 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
break;
case TYP_CONDTXTFLD:
- aVal = aCond1ED.GetText();
+ aVal = m_pCond1ED->GetText();
aVal += '|';
- aVal += aCond2ED.GetText();
+ aVal += m_pCond2ED->GetText();
break;
case TYP_DROPDOWN :
{
- aName = aListNameED.GetText();
- for(sal_uInt16 i = 0; i < aListItemsLB.GetEntryCount(); i++)
+ aName = m_pListNameED->GetText();
+ for(sal_uInt16 i = 0; i < m_pListItemsLB->GetEntryCount(); i++)
{
if(i)
aVal += DB_DELIM;
- aVal += aListItemsLB.GetEntry(i);
+ aVal += m_pListItemsLB->GetEntry(i);
}
}
break;
@@ -578,11 +564,11 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
}
if (!IsFldEdit() ||
- aNameED.GetSavedValue() != aNameED.GetText() ||
- aValueED.GetSavedValue() != aValueED.GetText() ||
- aCond1ED.GetSavedValue() != aCond1ED.GetText() ||
- aCond2ED.GetSavedValue() != aCond2ED.GetText() ||
- aListNameED.GetSavedValue() != aListNameED.GetText() ||
+ m_pNameED->GetSavedValue() != m_pNameED->GetText() ||
+ m_pValueED->GetSavedValue() != m_pValueED->GetText() ||
+ m_pCond1ED->GetSavedValue() != m_pCond1ED->GetText() ||
+ m_pCond2ED->GetSavedValue() != m_pCond2ED->GetText() ||
+ m_pListNameED->GetSavedValue() != m_pListNameED->GetText() ||
bDropDownLBChanged ||
nOldFormat != nFormat)
{
@@ -634,22 +620,22 @@ void SwFldFuncPage::FillUserData()
{
String sData(OUString(USER_DATA_VERSION));
sData += ';';
- sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos();
+ sal_uInt16 nTypeSel = m_pTypeLB->GetSelectEntryPos();
if( LISTBOX_ENTRY_NOTFOUND == nTypeSel )
nTypeSel = USHRT_MAX;
else
- nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(aTypeLB.GetEntryData( nTypeSel )));
+ nTypeSel = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(m_pTypeLB->GetEntryData( nTypeSel )));
sData += OUString::number( nTypeSel );
SetUserData(sData);
}
IMPL_LINK_NOARG(SwFldFuncPage, ModifyHdl)
{
- String aName(aNameED.GetText());
+ String aName(m_pNameED->GetText());
const sal_uInt16 nLen = aName.Len();
sal_Bool bEnable = sal_True;
- sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
+ sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel());
if( TYP_COMBINED_CHARS == nTypeId &&
(!nLen || nLen > MAX_COMBINED_CHARACTERS ))
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 3800ace2b900..f7404046655b 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -32,35 +32,36 @@
class SwFldFuncPage : public SwFldPage
{
- FixedText aTypeFT;
- ListBox aTypeLB;
- ListBox aSelectionLB;
- FixedText aFormatFT;
- ListBox aFormatLB;
- FixedText aNameFT;
- ConditionEdit aNameED;
- FixedText aValueFT;
- Edit aValueED;
- FixedText aCond1FT;
- ConditionEdit aCond1ED;
- FixedText aCond2FT;
- ConditionEdit aCond2ED;
- PushButton aMacroBT;
+ ListBox* m_pTypeLB;
+ ListBox* m_pSelectionLB;
+ VclContainer* m_pFormat;
+ ListBox* m_pFormatLB;
+ FixedText* m_pNameFT;
+ ConditionEdit* m_pNameED;
+ VclContainer* m_pValueGroup;
+ FixedText* m_pValueFT;
+ Edit* m_pValueED;
+ FixedText* m_pCond1FT;
+ ConditionEdit* m_pCond1ED;
+ FixedText* m_pCond2FT;
+ ConditionEdit* m_pCond2ED;
+ PushButton* m_pMacroBT;
//controls of "Input list"
- FixedText aListItemFT;
- ReturnActionEdit aListItemED;
- PushButton aListAddPB;
- FixedText aListItemsFT;
- ListBox aListItemsLB;
- PushButton aListRemovePB;
- PushButton aListUpPB;
- PushButton aListDownPB;
- FixedText aListNameFT;
- Edit aListNameED;
-
- String sOldValueFT;
- String sOldNameFT;
+ VclContainer* m_pListGroup;
+ FixedText* m_pListItemFT;
+ ReturnActionEdit* m_pListItemED;
+ PushButton* m_pListAddPB;
+ FixedText* m_pListItemsFT;
+ ListBox* m_pListItemsLB;
+ PushButton* m_pListRemovePB;
+ PushButton* m_pListUpPB;
+ PushButton* m_pListDownPB;
+ FixedText* m_pListNameFT;
+ Edit* m_pListNameED;
+
+ OUString m_sOldValueFT;
+ OUString m_sOldNameFT;
sal_uLong nOldFormat;
bool bDropDownLBChanged;
diff --git a/sw/source/ui/fldui/fldfunc.src b/sw/source/ui/fldui/fldfunc.src
deleted file mode 100644
index ec0f1f38cea2..000000000000
--- a/sw/source/ui/fldui/fldfunc.src
+++ /dev/null
@@ -1,243 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "globals.hrc"
-#include "fldtdlg.hrc"
-#include "helpid.h"
-TabPage TP_FLD_FUNC
-{
- HelpID = HID_FLD_FUNC ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedText FT_FUNCTYPE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 76 , 8 ) ;
- Text [ en-US ] = "~Type" ;
- Left = TRUE ;
- };
- ListBox LB_FUNCTYPE
- {
- HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCTYPE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 14 ) ;
- Size = MAP_APPFONT ( 76 , 165 ) ;
- TabStop = TRUE ;
- Sort = FALSE ;
- AutoHScroll = TRUE ;
- };
- FixedText FT_FUNCSELECTION
- {
- Pos = MAP_APPFONT ( 88 , 3 ) ;
- Size = MAP_APPFONT ( 76 , 8 ) ;
- Text [ en-US ] = "S~elect" ;
- Hide = TRUE ;
- Left = TRUE ;
- };
- ListBox LB_FUNCSELECTION
- {
- HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCSELECTION";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 88 , 14 ) ;
- Size = MAP_APPFONT ( 76 , 165 ) ;
- TabStop = TRUE ;
- Hide = TRUE ;
- Sort = TRUE ;
- AutoHScroll = TRUE ;
- };
- FixedText FT_FUNCFORMAT
- {
- Pos = MAP_APPFONT ( 88 , 3 ) ;
- Size = MAP_APPFONT ( 76 , 8 ) ;
- Left = TRUE ;
- Text [ en-US ] = "F~ormat" ;
- };
- ListBox LB_FUNCFORMAT
- {
- HelpID = "sw:ListBox:TP_FLD_FUNC:LB_FUNCFORMAT";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 88 , 14 ) ;
- Size = MAP_APPFONT ( 76 , 165 ) ;
- TabStop = TRUE ;
- };
- FixedText FT_FUNCNAME
- {
- Pos = MAP_APPFONT ( 170 , 3 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Left = TRUE ;
- Text [ en-US ] = "Na~me" ;
- };
- Edit ED_FUNCNAME
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCNAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 14 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- };
- FixedText FT_FUNCVALUE
- {
- Pos = MAP_APPFONT ( 170 , 30 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Text [ en-US ] = "~Value" ;
- Left = TRUE ;
- };
- Edit ED_FUNCVALUE
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCVALUE";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 41 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- };
- FixedText FT_FUNCCOND1
- {
- Pos = MAP_APPFONT ( 170 , 30 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Left = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Then" ;
- };
- Edit ED_FUNCCOND1
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND1";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 41 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Hide = TRUE ;
- };
- FixedText FT_FUNCCOND2
- {
- Pos = MAP_APPFONT ( 170 , 57 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Left = TRUE ;
- Hide = TRUE ;
- Text [ en-US ] = "Else" ;
- };
- Edit ED_FUNCCOND2
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_FUNCCOND2";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 68 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Hide = TRUE ;
- };
- PushButton BT_FUNCMACRO
- {
- HelpID = "sw:PushButton:TP_FLD_FUNC:BT_FUNCMACRO";
- Pos = MAP_APPFONT ( 204 , 165 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Macro..." ;
- Disable = TRUE ;
- TabStop = TRUE ;
- };
- FixedText FT_LISTITEM
- {
- Pos = MAP_APPFONT ( 170 , 3 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Ite~m" ;
- };
- Edit ED_LISTITEM
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTITEM";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 14 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Hide = TRUE;
- };
- PushButton PB_LISTADD
- {
- HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTADD";
- Pos = MAP_APPFONT ( 170 , 29 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Hide = TRUE;
- Text [ en-US ] = "~Add" ;
- };
- FixedText FT_LISTITEMS
- {
- Pos = MAP_APPFONT ( 170 , 46 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Items on ~list" ;
- };
- ListBox LB_LISTITEMS
- {
- HelpID = "sw:ListBox:TP_FLD_FUNC:LB_LISTITEMS";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 57 ) ;
- Size = MAP_APPFONT ( 83 , 44 ) ;
- TabStop = TRUE ;
- Sort = FALSE ;
- AutoHScroll = TRUE ;
- };
- PushButton PB_LISTREMOVE
- {
- HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTREMOVE";
- Pos = MAP_APPFONT ( 203 , 104 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Hide = TRUE;
- Text [ en-US ] = "~Remove" ;
- };
- PushButton PB_LISTUP
- {
- HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTUP";
- Pos = MAP_APPFONT ( 203 , 121 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Move ~Up" ;
- };
- PushButton PB_LISTDOWN
- {
- HelpID = "sw:PushButton:TP_FLD_FUNC:PB_LISTDOWN";
- Pos = MAP_APPFONT ( 203 , 138 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Move Do~wn" ;
- };
- FixedText FT_LISTNAME
- {
- Pos = MAP_APPFONT ( 170 , 156 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Hide = TRUE;
- Text [ en-US ] = "Na~me" ;
- };
- Edit ED_LISTNAME
- {
- HelpID = "sw:Edit:TP_FLD_FUNC:ED_LISTNAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 167 ) ;
- Size = MAP_APPFONT ( 84 , 12 ) ;
- TabStop = TRUE ;
- Left = TRUE ;
- Hide = TRUE;
- };
- Text [ en-US ] = "Functions" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc
index 55586ff7bd23..7bf0a054f497 100644
--- a/sw/source/ui/fldui/fldtdlg.hrc
+++ b/sw/source/ui/fldui/fldtdlg.hrc
@@ -86,37 +86,8 @@
#define BMP_DOKROOT_CLOSED (RC_TP_DOC_START + 16)
#define RC_TP_DOC_END (RC_TP_DOC_START + 17)
-// Function-TabPage:
-#define RC_TP_FUNC_START (RC_TP_DOC_END)
-#define FT_FUNCTYPE (RC_TP_FUNC_START + 1)
-#define LB_FUNCTYPE (RC_TP_FUNC_START + 2)
-#define LB_FUNCSELECTION (RC_TP_FUNC_START + 3)
-#define FT_FUNCSELECTION (RC_TP_FUNC_START + 4)
-#define FT_FUNCFORMAT (RC_TP_FUNC_START + 5)
-#define LB_FUNCFORMAT (RC_TP_FUNC_START + 6)
-#define FT_FUNCNAME (RC_TP_FUNC_START + 7)
-#define ED_FUNCNAME (RC_TP_FUNC_START + 8)
-#define FT_FUNCVALUE (RC_TP_FUNC_START + 9)
-#define ED_FUNCVALUE (RC_TP_FUNC_START + 10)
-#define FT_FUNCCOND1 (RC_TP_FUNC_START + 11)
-#define ED_FUNCCOND1 (RC_TP_FUNC_START + 12)
-#define FT_FUNCCOND2 (RC_TP_FUNC_START + 13)
-#define ED_FUNCCOND2 (RC_TP_FUNC_START + 14)
-#define BT_FUNCMACRO (RC_TP_FUNC_START + 15)
-#define RC_TP_FUNC_END (RC_TP_FUNC_START + 16)
-#define FT_LISTITEM (RC_TP_FUNC_START + 17)
-#define ED_LISTITEM (RC_TP_FUNC_START + 18)
-#define PB_LISTADD (RC_TP_FUNC_START + 19)
-#define FT_LISTITEMS (RC_TP_FUNC_START + 20)
-#define LB_LISTITEMS (RC_TP_FUNC_START + 21)
-#define PB_LISTREMOVE (RC_TP_FUNC_START + 22)
-#define PB_LISTUP (RC_TP_FUNC_START + 23)
-#define PB_LISTDOWN (RC_TP_FUNC_START + 24)
-#define FT_LISTNAME (RC_TP_FUNC_START + 25)
-#define ED_LISTNAME (RC_TP_FUNC_START + 26)
-
// Reference-TabPage:
-#define RC_TP_REF_START (RC_TP_FUNC_END)
+#define RC_TP_REF_START (RC_TP_DOC_END)
#define FT_REFTYPE (RC_TP_REF_START + 1)
#define LB_REFTYPE (RC_TP_REF_START + 2)
#define FT_REFSELECTION (RC_TP_REF_START + 3)
diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx
index 383934f99115..a357a7baefcb 100644
--- a/sw/source/ui/inc/actctrl.hxx
+++ b/sw/source/ui/inc/actctrl.hxx
@@ -78,8 +78,9 @@ class SW_DLLPUBLIC ReturnActionEdit : public Edit
{
Link aReturnActionLink;
public:
- ReturnActionEdit( Window* pParent, const ResId& rResId)
- : Edit(pParent, rResId){}
+ ReturnActionEdit(Window* pParent, const ResId& rResId);
+ ReturnActionEdit(Window* pParent, WinBits nStyle)
+ : Edit(pParent, nStyle){}
~ReturnActionEdit();
virtual void KeyInput( const KeyEvent& );
diff --git a/sw/source/ui/utlui/condedit.cxx b/sw/source/ui/utlui/condedit.cxx
index 94dca83b61c9..dc088bbaa2d6 100644
--- a/sw/source/ui/utlui/condedit.cxx
+++ b/sw/source/ui/utlui/condedit.cxx
@@ -43,8 +43,9 @@ ConditionEdit::ConditionEdit(Window* pParent, WinBits nStyle)
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeConditionEdit(Window *pParent, VclBuilder::stringmap &)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeConditionEdit(Window *pParent, VclBuilder::stringmap &rMap)
{
+ VclBuilder::ensureDefaultWidthChars(rMap);
return new ConditionEdit(pParent, WB_LEFT|WB_VCENTER|WB_BORDER|WB_3DLOOK);
}