summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui/fldvar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/fldui/fldvar.cxx')
-rw-r--r--sw/source/ui/fldui/fldvar.cxx200
1 files changed, 61 insertions, 139 deletions
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 74256233560d..3167b3a22dd6 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,33 +39,20 @@
#include <docufld.hxx>
#include <expfld.hxx>
#include <ddefld.hxx>
-#ifndef _VIEW_HXX
#include <view.hxx>
-#endif
#include <wrtsh.hxx>
#include <doc.hxx>
#include <docary.hxx>
#include <swmodule.hxx>
-#ifndef _FLDVAR_HXX
#include <fldvar.hxx>
-#endif
#include <calc.hxx>
#include <svl/zformat.hxx>
-#ifndef _GLOBALS_HRC
#include <globals.hrc>
-#endif
-#ifndef _FLDUI_HRC
#include <fldui.hrc>
-#endif
-#ifndef _FLDTDLG_HRC
#include <fldtdlg.hrc>
-#endif
#define USER_DATA_VERSION_1 "1"
#define USER_DATA_VERSION USER_DATA_VERSION_1
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
SwFldPage ( pParent, SW_RES( TP_FLD_VAR ), rCoreSet ),
@@ -109,23 +97,15 @@ SwFldVarPage::SwFldVarPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aNumFormatLB.SetShowLanguageControl(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFldVarPage::~SwFldVarPage()
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwFldVarPage::Reset(const SfxItemSet& )
{
SavePos(&aTypeLB);
- Init(); // Allgemeine initialisierung
+ Init(); // general initialisation
aTypeLB.SetUpdateMode(sal_False);
aTypeLB.Clear();
@@ -134,7 +114,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
if (!IsFldEdit())
{
- // TypeListBox initialisieren
+ // initialise TypeListBox
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
for (short i = rRg.nStart; i < rRg.nEnd; ++i)
@@ -164,7 +144,7 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
}
- // alte Pos selektieren
+ // select old Pos
RestorePos(&aTypeLB);
aTypeLB.SetDoubleClickHdl (LINK(this, SwFldVarPage, InsertHdl));
@@ -214,16 +194,12 @@ void SwFldVarPage::Reset(const SfxItemSet& )
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
{
- // Alte ListBoxPos sichern
+ // save old ListBoxPos
const sal_uInt16 nOld = GetTypeSel();
- // Aktuelle ListBoxPos
+ // current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos());
if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND)
@@ -242,7 +218,7 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
}
aValueED.SetDropEnable(sal_False);
- UpdateSubType(); // Auswahl-Listboxen initialisieren
+ UpdateSubType(); // initialise selection-listboxes
}
bInit = sal_False;
@@ -250,10 +226,6 @@ IMPL_LINK( SwFldVarPage, TypeHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -289,7 +261,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
case TYP_USERFLD:
{
- // Benutzertyp aendern oder anlegen
+ // change or create user type
SwUserFieldType* pType = (SwUserFieldType*)
GetFldMgr().GetFldType(RES_USERFLD, nSelPos);
@@ -297,7 +269,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
if (!IsFldEdit())
{
- if (pBox || (bInit && !IsRefresh())) // Nur bei Interaktion mit Maus
+ if (pBox || (bInit && !IsRefresh())) // only when interacting via mouse
{
aNameED.SetText(pType->GetName());
@@ -308,7 +280,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
else
aValueED.SetText(pType->GetContent());
-// aValueED.SetText(pType->GetContent(aNumFormatLB.GetFormat()));
}
}
else
@@ -316,7 +287,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
else
{
- if (pBox) // Nur bei Interaktion mit Maus
+ if (pBox) // only when interacting via mouse
{
aNameED.SetText(aEmptyStr);
aValueED.SetText(aEmptyStr);
@@ -342,8 +313,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aNumFormatLB.SetEntryData(nPos, (void *)ULONG_MAX);
aNumFormatLB.SelectEntryPos(0);
}
- // gibt es ein entprechendes SetField
- if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus
+ // is there a corresponding SetField
+ if (IsFldEdit() || pBox) // only when interacting via mouse
{
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -361,18 +332,18 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
pSh->GetFldType(RES_SETEXPFLD, sName);
if (pSetTyp && pSetTyp->GetType() == nsSwGetSetExpType::GSE_STRING)
- aNumFormatLB.SelectEntryPos(0); // Textuell
+ aNumFormatLB.SelectEntryPos(0); // textual
}
}
}
}
if (IsFldEdit())
{
- // GetFormula fuehrt bei Datumsformaten zu Problemen,
- // da nur der numerische Wert ohne Formatierung returned wird.
- // Muss aber verwendet werden, da sonst bei GetPar2 nur der vom
- // Kalkulator errechnete Wert angezeigt werden wuerde
- // (statt test2 = test + 1)
+ // GetFormula leads to problems with date formats because
+ // only the numeric value without formating is returned.
+ // It must be used though because otherwise in GetPar2 only
+ // the value calculated by Kalkulator would be displayed
+ // (instead of test2 = test + 1)
aValueED.SetText(((SwSetExpField*)GetCurField())->GetFormula());
}
aValueED.SetDropEnable(sal_True);
@@ -401,7 +372,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if (!IsFldEdit())
aNameED.SetText(sName);
- // gibt es ein entprechendes SetField
+ // is there a corresponding SetField
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
@@ -412,9 +383,9 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
if(pSetTyp)
{
- if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // Textuell?
+ if (pSetTyp->GetType() & nsSwGetSetExpType::GSE_STRING) // textual?
bFormat = sal_True;
- else // Numerisch
+ else // numeric
bNumFmt = sal_True;
}
}
@@ -438,19 +409,19 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
sName = aSelectionLB.GetSelectEntry();
aNameED.SetText( sName );
- // User- oder SetField ?
+ // User- or SetField ?
sal_uInt16 nInpType = 0;
nInpType = static_cast< sal_uInt16 >(GetFldMgr().GetFldType(RES_USERFLD, sName) ? 0 : TYP_SETINPFLD);
if (nInpType) // SETEXPFLD
{
- // gibt es ein entprechendes SetField
+ // is there a corresponding SetField
SwSetExpFieldType* pSetTyp = (SwSetExpFieldType*)
GetFldMgr().GetFldType(RES_SETEXPFLD, sName);
if(pSetTyp)
{
- if (pSetTyp->GetType() == nsSwGetSetExpType::GSE_STRING) // Textuell?
+ if (pSetTyp->GetType() == nsSwGetSetExpType::GSE_STRING) // textual?
{
aNumFormatLB.Clear();
@@ -470,7 +441,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_DDEFLD:
aValueFT.SetText(SW_RESSTR(STR_DDE_CMD));
- if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus
+ if (IsFldEdit() || pBox) // only when interacting via mouse
{
if (nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -481,8 +452,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
{
aNameED.SetText(pType->GetName());
- //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
- // Namen haben! Wird hier noch nicht beachtet
+ //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
+ // That's not considered here yet
String sCmd( pType->GetCmd() );
sal_uInt16 nTmpPos = sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ' );
sCmd.SearchAndReplace( sfx2::cTokenSeperator, ' ', nTmpPos );
@@ -497,7 +468,6 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
case TYP_SEQFLD:
{
- // aNumRB.Check(sal_True);
bName = bValue = bSeparator = bChapterLevel = sal_True;
SwFieldType* pFldTyp;
@@ -517,7 +487,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText( ((SwSetExpField*)GetCurField())->
GetFormula() );
- if( IsFldEdit() || pBox ) // Nur bei Interaktion mit Maus
+ if( IsFldEdit() || pBox ) // only when interacting via mouse
aNameED.SetText( aSelectionLB.GetSelectEntry() );
if( pFldTyp )
@@ -539,12 +509,12 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
bValue = sal_False;
aValueFT.SetText( SW_RESSTR( STR_OFFSET ));
- if (IsFldEdit() || pBox) // Nur bei Interaktion mit Maus
+ if (IsFldEdit() || pBox) // only when interacting via mouse
aNameED.SetText(aEmptyStr);
if (nSelPos != 0 && nSelPos != LISTBOX_ENTRY_NOTFOUND)
{
- bValue = sal_True; // SubType OFF - kennt keinen Offset
+ bValue = sal_True; // SubType OFF - knows no Offset
if (IsFldEdit())
aValueED.SetText(String::CreateFromInt32(((SwRefPageSetField*)GetCurField())->GetOffset()));
}
@@ -587,7 +557,7 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aChapterLevelLB.Show(bChapterLevel);
aInvisibleCB.Enable(bInvisible);
- ModifyHdl(); // Anwenden/Einfuegen/Loeschen Status update
+ ModifyHdl(); // apply/insert/delete status update
aNumFormatLB.SetUpdateMode(sal_True);
aFormatLB.SetUpdateMode(sal_True);
@@ -619,9 +589,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
}
/*--------------------------------------------------------------------
- Beschreibung: Typen in der SelectionBox erneuern
+ Description: renew types in SelectionBox
--------------------------------------------------------------------*/
-
void SwFldVarPage::UpdateSubType()
{
String sOldSel;
@@ -631,7 +600,7 @@ void SwFldVarPage::UpdateSubType()
if(GetSelectionSel() != LISTBOX_ENTRY_NOTFOUND)
sOldSel = aSelectionLB.GetEntry(GetSelectionSel());
- // Auswahl-Listbox fuellen
+ // fill Selection-Listbox
aSelectionLB.SetUpdateMode(sal_False);
aSelectionLB.Clear();
@@ -684,7 +653,7 @@ void SwFldVarPage::UpdateSubType()
(!((SwRefPageSetField*)GetCurField())->IsOn() && !i))
sOldSel = *aList[i];
- // Alle Eintr?ge zur Auswahl zulassen:
+ // allow all entries for selection:
nPos = aSelectionLB.InsertEntry(*aList[i]);
aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(i));
break;
@@ -714,7 +683,7 @@ void SwFldVarPage::UpdateSubType()
if (!aSelectionLB.GetSelectEntryCount())
{
aSelectionLB.SelectEntryPos(0);
- pLB = &aSelectionLB; // Alle Controls neu initialisieren
+ pLB = &aSelectionLB; // newly initialise all controls
}
}
@@ -725,10 +694,6 @@ void SwFldVarPage::UpdateSubType()
aSelectionLB.SetUpdateMode(sal_True);
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
{
String sOldSel, sOldNumSel;
@@ -745,7 +710,7 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
nOldNumFormat = aNumFormatLB.GetFormat();
}
- // Format-Listbox fuellen
+ // fill Format-Listbox
aFormatLB.Clear();
aNumFormatLB.Clear();
sal_Bool bSpecialFmt = sal_False;
@@ -859,9 +824,8 @@ sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId)
}
/*--------------------------------------------------------------------
- Beschreibung: Modify
+ Description: Modify
--------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
{
String sValue(aValueED.GetText());
@@ -884,19 +848,19 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
nLen = sName.Len();
Selection aSel(aNameED.GetSelection());
aNameED.SetText( sName );
- aNameED.SetSelection( aSel ); // Cursorpos restaurieren
+ aNameED.SetSelection( aSel ); // restore Cursorpos
}
break;
}
- // Buttons ueberpruefen
+ // check buttons
switch (nTypeId)
{
case TYP_DDEFLD:
if( nLen )
{
- // Gibts schon einen entsprechenden Type
+ // is there already a corrensponding type
bInsert = bApply = sal_True;
SwFieldType* pType = GetFldMgr().GetFldType(RES_DDEFLD, sName);
@@ -912,7 +876,7 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
case TYP_USERFLD:
if( nLen )
{
- // Gibts schon einen entsprechenden Type
+ // is there already a corresponding type
SwFieldType* pType = GetFldMgr().GetFldType(RES_USERFLD, sName);
SwWrtShell *pSh = GetWrtShell();
@@ -922,9 +886,9 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
bDelete = !pSh->IsUsed( *pType );
pType = GetFldMgr().GetFldType(RES_SETEXPFLD, sName);
- if (!pType) // Kein Namenskonflikt mit Variablen
+ if (!pType) // no name conflict with variables
{
- // Benutzerfelder duerfen auch ohne Inhalt eingefuegt werden!
+ // user fields can also be inserted without content!
// Bug #56845
bInsert = bApply = sal_True;
}
@@ -988,10 +952,6 @@ IMPL_LINK( SwFldVarPage, ModifyHdl, Edit *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -1050,7 +1010,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
nFormat = (sal_uLong)aFormatLB.GetEntryData((sal_uInt16)nFormat);
- if (pType) // Aendern
+ if (pType) // change
{
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
@@ -1065,9 +1025,9 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
sal_uLong nFmt = nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat();
if (nFmt)
- { // Sprache auf Office-Sprache umstellen, da String im Office
- // Format vom Kalkulator erwartet wird und so in den Dlg
- // eingegeben werden sollte
+ { // Switch language to office-language because Kalkulator expects
+ // String in office format and it should be fed into dialog like
+ // that
nFmt = SwValueField::GetSystemFormat(pSh->GetNumberFormatter(), nFmt);
}
((SwUserFieldType*)pType)->SetContent(aValueED.GetText(), nFmt);
@@ -1079,8 +1039,8 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
{
- //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
- // Namen haben! Wird hier noch nicht beachtet.
+ // DDE-Topics/-Items can have blanks in their names!
+ // That's not being considered here yet.
sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
((SwDDEFieldType*)pType)->SetCmd(sValue);
@@ -1092,7 +1052,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
pSh->EndAllAction();
}
}
- else // Neu
+ else // new
{
if(nTypeId == TYP_USERFLD)
{
@@ -1109,7 +1069,7 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
aType.SetContent( sValue, nNumFormatPos == 0 ? 0 : aNumFormatLB.GetFormat() );
aSelectionLB.InsertEntry(sName);
aSelectionLB.SelectEntry(sName);
- GetFldMgr().InsertFldType( aType ); // Userfld Neu
+ GetFldMgr().InsertFldType( aType ); // Userfld new
}
}
}
@@ -1117,20 +1077,20 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
{
if (nFormat != LISTBOX_ENTRY_NOTFOUND)
{
- //JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren
- // Namen haben! Wird hier noch nicht beachtet.
+ // DDE-Topics/-Items can have blanks in their names!
+ // That's not being considered here yet.
sal_uInt16 nTmpPos = sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sValue.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
SwDDEFieldType aType(sName, sValue, (sal_uInt16)nFormat);
aSelectionLB.InsertEntry(sName);
aSelectionLB.SelectEntry(sName);
- GetFldMgr().InsertFldType(aType); // DDE-Feld Neu
+ GetFldMgr().InsertFldType(aType); // DDE-Field new
}
}
}
if (IsFldEdit())
- GetFldMgr().GetCurFld(); // FieldManager Updaten
+ GetFldMgr().GetCurFld(); // update FieldManager
UpdateSubType();
}
@@ -1140,10 +1100,6 @@ IMPL_LINK( SwFldVarPage, TBClickHdl, ToolBox *, pBox )
return sal_True;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
{
sal_Bool bEnable = aChapterLevelLB.GetSelectEntryPos() != 0;
@@ -1155,10 +1111,6 @@ IMPL_LINK( SwFldVarPage, ChapterHdl, ListBox *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
{
sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
@@ -1168,10 +1120,6 @@ IMPL_LINK( SwFldVarPage, SeparatorHdl, Edit *, EMPTYARG )
return 0;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
{
sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)aTypeLB.GetEntryData(GetTypeSel());
@@ -1202,9 +1150,9 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
if (nFormat && nFormat != ULONG_MAX && aNumFormatLB.IsAutomaticLanguage())
{
- // Sprache auf Office-Sprache umstellen, da String im Office-
- // Format vom Kalkulator erwartet wird und so in den Dlg
- // eingegeben werden sollte
+ // Switch language to office language because Kalkulator expects
+ // String in office format and it should be fed into the dialog
+ // like that
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
@@ -1265,7 +1213,6 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
}
case TYP_SEQFLD:
{
- // nSubType = nsSwGetSetExpType::GSE_SEQ; // nsSwGetSetExpType::GSE_SEQ wird im Fldmgr fest gesetzt, kann also entfallen
nSubType = aChapterLevelLB.GetSelectEntryPos();
if (nSubType == 0)
nSubType = 0x7f;
@@ -1274,7 +1221,6 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
nSubType--;
String sSeparator(aSeparatorED.GetText().GetChar(0));
cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
- //nSubType |= (sal_uInt16)(((sal_uInt8)) << 8);
}
break;
}
@@ -1303,30 +1249,17 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
return sal_False;
}
-
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SfxTabPage* SwFldVarPage::Create( Window* pParent,
const SfxItemSet& rAttrSet )
{
return ( new SwFldVarPage( pParent, rAttrSet ) );
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwFldVarPage::GetGroup()
{
return GRP_VAR;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId ) :
ListBox (pDialog, rResId),
pDlg (pDialog),
@@ -1334,40 +1267,28 @@ SelectionListBox::SelectionListBox( SwFldVarPage* pDialog, const ResId& rResId )
{
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
long SelectionListBox::PreNotify( NotifyEvent& rNEvt )
{
long nHandled = ListBox::PreNotify( rNEvt );
- //sal_Bool bAddSel = sal_False;
if ( rNEvt.GetType() == EVENT_KEYUP )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
const KeyCode aKeyCode = pKEvt->GetKeyCode();
const sal_uInt16 nModifier = aKeyCode.GetModifier();
if( aKeyCode.GetCode() == KEY_SPACE && !nModifier)
-// bAddSel = sal_True;
bCallAddSelection = sal_True;
}
if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
{
const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
- if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt oder Ctrl
- //bAddSel = sal_True;
+ if (pMEvt && (pMEvt->IsMod1() || pMEvt->IsMod2())) // Alt or Ctrl
bCallAddSelection = sal_True;
}
-// if (bAddSel)
-// pDlg->AddSelection(this);
-
return nHandled;
}
-/* -----------------12.01.99 11:14-------------------
- *
- * --------------------------------------------------*/
+
void SwFldVarPage::FillUserData()
{
String sData(String::CreateFromAscii(USER_DATA_VERSION));
@@ -1381,3 +1302,4 @@ void SwFldVarPage::FillUserData()
SetUserData(sData);
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */