Kaydet (Commit) c7e44cda authored tarafından Martin Kepplinger's avatar Martin Kepplinger

Translate german comments

This translates more german code comments in writer/sw/source/ui/fldui to
english.

This is contributed under the terms of the MPL 1.1 / GPLv3+ / LGPLv3+ triple
license.
üst 5c34b059
...@@ -94,9 +94,9 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : ...@@ -94,9 +94,9 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
GetOKButton()->SetClickHdl(LINK(this, SwFldEditDlg, OKHdl)); GetOKButton()->SetClickHdl(LINK(this, SwFldEditDlg, OKHdl));
// Buttons selbst positionieren, da sie sonst bei unterschiedlichen // position buttons ourselves because otherwise when font sizes are
// Fontgroessen im Wald stehen, und da PB im SingleTabDlg feste Pixelgroessen // varying, they are in the woods, and because PB uses fixed pixel sizes
// fuer seine Buttons und die Dialogbreite verwendet. // for its buttons and dialog width in SingleTabDlg.
aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y())); aPrevBT.SetPosPixel(Point(GetOKButton()->GetPosPixel().X(), aPrevBT.GetPosPixel().Y()));
USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3); USHORT nWidth = static_cast< USHORT >(GetOKButton()->GetOutputSize().Width() / 2 - 3);
Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height()))); Size aNewSize(LogicToPixel(Size(nWidth, GetOKButton()->GetOutputSize().Height())));
...@@ -121,7 +121,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) : ...@@ -121,7 +121,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) :
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Controlls initialisieren Description: initialise controls
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
void SwFldEditDlg::Init() void SwFldEditDlg::Init()
{ {
...@@ -136,7 +136,7 @@ void SwFldEditDlg::Init() ...@@ -136,7 +136,7 @@ void SwFldEditDlg::Init()
if(!pCurFld) if(!pCurFld)
return; return;
// Traveling nur bei mehr als einem Feld // Traveling only when more than one field
pSh->StartAction(); pSh->StartAction();
pSh->CreateCrsr(); pSh->CreateCrsr();
...@@ -162,7 +162,7 @@ void SwFldEditDlg::Init() ...@@ -162,7 +162,7 @@ void SwFldEditDlg::Init()
SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup) SfxTabPage* SwFldEditDlg::CreatePage(USHORT nGroup)
{ {
// TabPage erzeugen // create TabPage
SfxTabPage* pTabPage = 0; SfxTabPage* pTabPage = 0;
USHORT nHelpId = 0; USHORT nHelpId = 0;
...@@ -240,7 +240,7 @@ void SwFldEditDlg::InsertHdl() ...@@ -240,7 +240,7 @@ void SwFldEditDlg::InsertHdl()
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Aendern des Feldes anstossen Description: kick off changing of the field
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG ) IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG )
{ {
...@@ -260,12 +260,12 @@ IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG ) ...@@ -260,12 +260,12 @@ IMPL_LINK( SwFldEditDlg, OKHdl, Button *, EMPTYARG )
short SwFldEditDlg::Execute() short SwFldEditDlg::Execute()
{ {
// Ohne TabPage kein Dialog // without TabPage no dialog
return GetTabPage() ? Dialog::Execute() : RET_CANCEL; return GetTabPage() ? Dialog::Execute() : RET_CANCEL;
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Traveling zwishen Feldern gleichen Typs Description: Traveling between fields of the same type
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton )
{ {
......
...@@ -107,7 +107,7 @@ SwFldFuncPage::~SwFldFuncPage() ...@@ -107,7 +107,7 @@ SwFldFuncPage::~SwFldFuncPage()
void SwFldFuncPage::Reset(const SfxItemSet& ) void SwFldFuncPage::Reset(const SfxItemSet& )
{ {
SavePos(&aTypeLB); SavePos(&aTypeLB);
Init(); // Allgemeine initialisierung Init(); // general initialisation
aTypeLB.SetUpdateMode(FALSE); aTypeLB.SetUpdateMode(FALSE);
aTypeLB.Clear(); aTypeLB.Clear();
...@@ -116,10 +116,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) ...@@ -116,10 +116,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
if (!IsFldEdit()) if (!IsFldEdit())
{ {
// TypeListBox initialisieren // initialise TypeListBox
const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup());
// Typ-Listbox fuellen // fill Typ-Listbox
for(short i = rRg.nStart; i < rRg.nEnd; ++i) for(short i = rRg.nStart; i < rRg.nEnd; ++i)
{ {
nTypeId = GetFldMgr().GetTypeId(i); nTypeId = GetFldMgr().GetTypeId(i);
...@@ -140,7 +140,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) ...@@ -140,7 +140,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
} }
} }
// alte Pos selektieren // select old Pos
RestorePos(&aTypeLB); RestorePos(&aTypeLB);
aTypeLB.SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl)); aTypeLB.SetDoubleClickHdl (LINK(this, SwFldFuncPage, InsertHdl));
...@@ -193,10 +193,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) ...@@ -193,10 +193,10 @@ void SwFldFuncPage::Reset(const SfxItemSet& )
IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{ {
// Alte ListBoxPos sichern // save old ListBoxPos
const USHORT nOld = GetTypeSel(); const USHORT nOld = GetTypeSel();
// Aktuelle ListBoxPos // current ListBoxPos
SetTypeSel(aTypeLB.GetSelectEntryPos()); SetTypeSel(aTypeLB.GetSelectEntryPos());
if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND) if(GetTypeSel() == LISTBOX_ENTRY_NOTFOUND)
...@@ -209,10 +209,10 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) ...@@ -209,10 +209,10 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
{ {
USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen // fill Selection-Listbox
UpdateSubType(); UpdateSubType();
// Format-Listbox fuellen // fill Format-Listbox
aFormatLB.Clear(); aFormatLB.Clear();
USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode()); USHORT nSize = GetFldMgr().GetFormatCount(nTypeId, FALSE, IsFldDlgHtmlMode());
...@@ -236,7 +236,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG ) ...@@ -236,7 +236,7 @@ IMPL_LINK( SwFldFuncPage, TypeHdl, ListBox *, EMPTYARG )
BOOL bShowSelection = FALSE; BOOL bShowSelection = FALSE;
BOOL bFormat = nSize != 0; BOOL bFormat = nSize != 0;
// fuer Conditional Text zwei Controls // two controls for conditional text
BOOL bDropDown = TYP_DROPDOWN == nTypeId; BOOL bDropDown = TYP_DROPDOWN == nTypeId;
BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId; BOOL bCondTxtFld = TYP_CONDTXTFLD == nTypeId;
...@@ -478,13 +478,13 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG) ...@@ -478,13 +478,13 @@ IMPL_LINK( SwFldFuncPage, ListEnableHdl, void*, EMPTYARG)
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Typen in der SelectionBox erneuern Description: renew types in SelectionBox
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
void SwFldFuncPage::UpdateSubType() void SwFldFuncPage::UpdateSubType()
{ {
USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel()); USHORT nTypeId = (USHORT)(ULONG)aTypeLB.GetEntryData(GetTypeSel());
// Auswahl-Listbox fuellen // fill Selction-Listbox
aSelectionLB.SetUpdateMode(FALSE); aSelectionLB.SetUpdateMode(FALSE);
aSelectionLB.Clear(); aSelectionLB.Clear();
...@@ -525,7 +525,7 @@ void SwFldFuncPage::UpdateSubType() ...@@ -525,7 +525,7 @@ void SwFldFuncPage::UpdateSubType()
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: MacroBrowser aufrufen, Listbox mit Macros fuellen Description: call MacroBrowser, fill Listbox with Macros
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn ) IMPL_LINK( SwFldFuncPage, MacroHdl, Button *, pBtn )
{ {
...@@ -606,7 +606,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& ) ...@@ -606,7 +606,7 @@ BOOL SwFldFuncPage::FillItemSet(SfxItemSet& )
InsertFld( nTypeId, nSubType, aName, aVal, nFormat ); InsertFld( nTypeId, nSubType, aName, aVal, nFormat );
} }
ModifyHdl(); // Insert ggf enablen/disablen ModifyHdl(); // enable/disable Insert if applicable
return FALSE; return FALSE;
} }
...@@ -615,7 +615,7 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro) ...@@ -615,7 +615,7 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro)
{ {
if (rMacro.Len()) if (rMacro.Len())
{ {
// Inhalt von aName umdrehen // reverse content of aName
String sTmp, sBuf; String sTmp, sBuf;
USHORT nPos = 0; USHORT nPos = 0;
......
...@@ -82,7 +82,7 @@ class SwFldFuncPage : public SwFldPage ...@@ -82,7 +82,7 @@ class SwFldFuncPage : public SwFldPage
DECL_LINK( ListModifyHdl, Control*); DECL_LINK( ListModifyHdl, Control*);
DECL_LINK( ListEnableHdl, void*); DECL_LINK( ListEnableHdl, void*);
// Macro auswhlen // select Macro
DECL_LINK( MacroHdl, Button * ); DECL_LINK( MacroHdl, Button * );
void UpdateSubType(); void UpdateSubType();
......
...@@ -60,9 +60,9 @@ ...@@ -60,9 +60,9 @@
#include <svl/zformat.hxx> #include <svl/zformat.hxx>
#include <vcl/mnemonic.hxx> #include <vcl/mnemonic.hxx>
#include <view.hxx> #include <view.hxx>
#include <wrtsh.hxx> // Actives Fenster #include <wrtsh.hxx> // active window
#include <doc.hxx> // Actives Fenster #include <doc.hxx> // active window
#include <docsh.hxx> // Actives Fenster #include <docsh.hxx> // active window
#include <swmodule.hxx> #include <swmodule.hxx>
#include <charatr.hxx> #include <charatr.hxx>
#include <fmtinfmt.hxx> #include <fmtinfmt.hxx>
...@@ -97,7 +97,7 @@ using namespace ::com::sun::star; ...@@ -97,7 +97,7 @@ using namespace ::com::sun::star;
using namespace nsSwDocInfoSubType; using namespace nsSwDocInfoSubType;
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Gruppen der Felder Description: groups of fields
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
enum enum
{ {
...@@ -126,15 +126,15 @@ enum ...@@ -126,15 +126,15 @@ enum
GRP_WEB_DOC_END = GRP_WEB_DOC_BEGIN + 9, GRP_WEB_DOC_END = GRP_WEB_DOC_BEGIN + 9,
GRP_WEB_FKT_BEGIN = GRP_WEB_DOC_END + 2, GRP_WEB_FKT_BEGIN = GRP_WEB_DOC_END + 2,
GRP_WEB_FKT_END = GRP_WEB_FKT_BEGIN + 0, // Die Gruppe ist leer! GRP_WEB_FKT_END = GRP_WEB_FKT_BEGIN + 0, // the group is empty!
GRP_WEB_REF_BEGIN = GRP_WEB_FKT_END + 6, // Die Gruppe ist leer! GRP_WEB_REF_BEGIN = GRP_WEB_FKT_END + 6, // the group is empty!
GRP_WEB_REF_END = GRP_WEB_REF_BEGIN + 0, GRP_WEB_REF_END = GRP_WEB_REF_BEGIN + 0,
GRP_WEB_REG_BEGIN = GRP_WEB_REF_END + 2, GRP_WEB_REG_BEGIN = GRP_WEB_REF_END + 2,
GRP_WEB_REG_END = GRP_WEB_REG_BEGIN + 1, GRP_WEB_REG_END = GRP_WEB_REG_BEGIN + 1,
GRP_WEB_DB_BEGIN = GRP_WEB_REG_END, // Die Gruppe ist leer! GRP_WEB_DB_BEGIN = GRP_WEB_REG_END, // the group is empty!
GRP_WEB_DB_END = GRP_WEB_DB_BEGIN + 0, GRP_WEB_DB_END = GRP_WEB_DB_BEGIN + 0,
GRP_WEB_VAR_BEGIN = GRP_WEB_DB_END + 5, GRP_WEB_VAR_BEGIN = GRP_WEB_DB_END + 5,
...@@ -142,35 +142,31 @@ enum ...@@ -142,35 +142,31 @@ enum
}; };
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Formate in der richtigen Reihenfolge Description: formats in the correct order
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
static const USHORT aSetFmt[] = static const USHORT aSetFmt[] =
{ {
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_??? // at first the order has to match the ResourceIds for FMT_SETVAR_???
// uebereinstimmen
0, 0,
0 0
}; };
static const USHORT aGetFmt[] = static const USHORT aGetFmt[] =
{ {
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_GETVAR_??? // at first the order has to match the ResourceIds for FMT_GETVAR_???
// uebereinstimmen
0 0
}; };
static const USHORT aUsrFmt[] = static const USHORT aUsrFmt[] =
{ {
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_SETVAR_??? // at first the order has to match the ResourceIds for FMT_SETVAR_???
// uebereinstimmen
0, 0,
nsSwExtendedSubType::SUB_CMD nsSwExtendedSubType::SUB_CMD
}; };
static const USHORT aDBFmt[] = static const USHORT aDBFmt[] =
{ {
// die Reihenfolge muss zu Beginn mit den ResourceIds fuer FMT_DBFLD_??? // at first the order has to match the ResourceIds for FMT_DBFLD_???
// uebereinstimmen
nsSwExtendedSubType::SUB_OWN_FMT nsSwExtendedSubType::SUB_OWN_FMT
}; };
...@@ -179,7 +175,7 @@ static const USHORT VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(USHORT); ...@@ -179,7 +175,7 @@ static const USHORT VF_USR_COUNT = sizeof(aUsrFmt) / sizeof(USHORT);
static const USHORT VF_DB_COUNT = sizeof(aDBFmt) / sizeof(USHORT); static const USHORT VF_DB_COUNT = sizeof(aDBFmt) / sizeof(USHORT);
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Feldtypen und Subtypes Description: field types and subtypes
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
struct SwFldPack struct SwFldPack
{ {
...@@ -193,7 +189,7 @@ struct SwFldPack ...@@ -193,7 +189,7 @@ struct SwFldPack
}; };
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Strings und Formate Description: strings and formats
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
static const SwFldPack aSwFlds[] = static const SwFldPack aSwFlds[] =
{ {
...@@ -249,7 +245,7 @@ static const SwFldPack aSwFlds[] = ...@@ -249,7 +245,7 @@ static const SwFldPack aSwFlds[] =
}; };
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Zugriff auf die Shell Description: access to the shell
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
static SwWrtShell* lcl_GetShell() static SwWrtShell* lcl_GetShell()
...@@ -264,8 +260,7 @@ static SwWrtShell* lcl_GetShell() ...@@ -264,8 +260,7 @@ static SwWrtShell* lcl_GetShell()
inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); } inline USHORT GetPackCount() { return sizeof(aSwFlds) / sizeof(SwFldPack); }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: FieldManager regelt das Einfuegen und Updaten Description: FieldManager controls inserting and updating of fields
von Feldern
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
SwFldMgr::SwFldMgr(SwWrtShell* pSh ) : SwFldMgr::SwFldMgr(SwWrtShell* pSh ) :
...@@ -274,7 +269,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) : ...@@ -274,7 +269,7 @@ SwFldMgr::SwFldMgr(SwWrtShell* pSh ) :
pWrtShell(pSh), pWrtShell(pSh),
bEvalExp(TRUE) bEvalExp(TRUE)
{ {
// aktuelles Feld ermitteln falls vorhanden // determine current field if existing
GetCurFld(); GetCurFld();
} }
...@@ -284,7 +279,7 @@ SwFldMgr::~SwFldMgr() ...@@ -284,7 +279,7 @@ SwFldMgr::~SwFldMgr()
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: RefMark ueber Namen organisieren Description: organise RefMark by names
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
BOOL SwFldMgr::CanInsertRefMark( const String& rStr ) BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
...@@ -296,7 +291,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr ) ...@@ -296,7 +291,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
{ {
USHORT nCnt = pSh->GetCrsrCnt(); USHORT nCnt = pSh->GetCrsrCnt();
// der letzte Crsr muss keine aufgespannte Selektion // the last Crsr doesn't have to be a spanned selection
if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() ) if( 1 < nCnt && !pSh->SwCrsrShell::HasSelection() )
--nCnt; --nCnt;
...@@ -306,7 +301,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr ) ...@@ -306,7 +301,7 @@ BOOL SwFldMgr::CanInsertRefMark( const String& rStr )
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Zugriff ueber ResIds Description: access over ResIds
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName ) void SwFldMgr::RemoveFldType(USHORT nResId, const String& rName )
...@@ -342,7 +337,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const ...@@ -342,7 +337,7 @@ SwFieldType* SwFldMgr::GetFldType(USHORT nResId, const String& rName) const
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Aktuelles Feld ermitteln Description: determine current field
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
SwField* SwFldMgr::GetCurFld() SwField* SwFldMgr::GetCurFld()
{ {
...@@ -352,8 +347,7 @@ SwField* SwFldMgr::GetCurFld() ...@@ -352,8 +347,7 @@ SwField* SwFldMgr::GetCurFld()
else else
pCurFld = NULL; pCurFld = NULL;
// Strings und Format initialisieren // initialise strings and format
//
aCurPar1.Erase(); aCurPar1.Erase();
aCurPar2.Erase(); aCurPar2.Erase();
sCurFrame.Erase(); sCurFrame.Erase();
...@@ -362,9 +356,8 @@ SwField* SwFldMgr::GetCurFld() ...@@ -362,9 +356,8 @@ SwField* SwFldMgr::GetCurFld()
if(!pCurFld) if(!pCurFld)
return 0; return 0;
// Aktuelle Werte aufbereiten Parameter 1 und Parameter 2 // preprocess current values; determine parameter 1 and parameter 2
// als auch das Format ermitteln // as well as the format
//
const USHORT nTypeId = pCurFld->GetTypeId(); const USHORT nTypeId = pCurFld->GetTypeId();
nCurFmt = pCurFld->GetFormat(); nCurFmt = pCurFld->GetFormat();
...@@ -385,7 +378,7 @@ SwField* SwFldMgr::GetCurFld() ...@@ -385,7 +378,7 @@ SwField* SwFldMgr::GetCurFld()
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Gruppen-Bereich liefern Description: provide group range
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -417,7 +410,7 @@ static SwFldGroupRgn const aWebRanges[] = ...@@ -417,7 +410,7 @@ static SwFldGroupRgn const aWebRanges[] =
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: GroupId bestimmen Description: determine GroupId
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
...@@ -447,8 +440,8 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const ...@@ -447,8 +440,8 @@ USHORT SwFldMgr::GetGroup(BOOL bHtmlMode, USHORT nTypeId, USHORT nSubType) const
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Namen zur TypeId ermitteln Description: determine names to TypeId
ZUGRIFF ueber TYP_.... ACCESS over TYP_....
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -465,7 +458,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos) ...@@ -465,7 +458,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos)
USHORT nFldWh = aSwFlds[ nPos ].nTypeId; USHORT nFldWh = aSwFlds[ nPos ].nTypeId;
// Sonderbehandlung fuer Datum/Zeit Felder (ohne var/fix) // special treatment for date/time fields (without var/fix)
if( TYP_DATEFLD == nFldWh ) if( TYP_DATEFLD == nFldWh )
{ {
static String g_aDate( SW_RES( STR_DATEFLD ) ); static String g_aDate( SW_RES( STR_DATEFLD ) );
...@@ -481,7 +474,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos) ...@@ -481,7 +474,7 @@ const String& SwFldMgr::GetTypeStr(USHORT nPos)
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Pos in der Liste bestimmen Description: determine Pos in the list
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -503,7 +496,7 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId) ...@@ -503,7 +496,7 @@ USHORT SwFldMgr::GetPos(USHORT nTypeId)
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Subtypen eines Feldes lokalisieren Description: localise subtypes of a field
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
...@@ -520,7 +513,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ...@@ -520,7 +513,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
case TYP_SETREFFLD: case TYP_SETREFFLD:
case TYP_GETREFFLD: case TYP_GETREFFLD:
{ {
// Referenzen sind keine Felder // references are no fields
pSh->GetRefMarks( &rToFill ); pSh->GetRefMarks( &rToFill );
break; break;
} }
...@@ -531,7 +524,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ...@@ -531,7 +524,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
case TYP_INPUTFLD: case TYP_INPUTFLD:
{ String* pNew = new SW_RESSTR(aSwFlds[nPos].nSubTypeStart); { String* pNew = new SW_RESSTR(aSwFlds[nPos].nSubTypeStart);
rToFill.Insert(pNew, rToFill.Count()); rToFill.Insert(pNew, rToFill.Count());
// Weiter bei generischen Typen // move on at generic types
} }
case TYP_DDEFLD: case TYP_DDEFLD:
case TYP_SEQFLD: case TYP_SEQFLD:
...@@ -579,7 +572,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ...@@ -579,7 +572,7 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
default: default:
{ {
// statische SubTypes // static SubTypes
if(nPos != USHRT_MAX) if(nPos != USHRT_MAX)
{ {
USHORT nCount; USHORT nCount;
...@@ -612,8 +605,8 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill) ...@@ -612,8 +605,8 @@ BOOL SwFldMgr::GetSubTypes(USHORT nTypeId, SvStringsDtor& rToFill)
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Format ermitteln Description: determine format
ZUGRIFF ueber TYP_.... ACCESS over TYP_....
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -634,7 +627,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co ...@@ -634,7 +627,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
return 2; return 2;
if (nTypeId == TYP_FILENAMEFLD) if (nTypeId == TYP_FILENAMEFLD)
nEnd -= 2; // Kein Bereich oder Vorlage nEnd -= 2; // no range or template
switch(nStart) switch(nStart)
{ {
...@@ -670,7 +663,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co ...@@ -670,7 +663,7 @@ USHORT SwFldMgr::GetFormatCount(USHORT nTypeId, BOOL bIsText, BOOL bHtmlMode) co
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: FormatString zu einem Typ ermitteln Description: determine FormatString to a type
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -689,7 +682,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const ...@@ -689,7 +682,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
nStart = aSwFlds[nPos].nFmtBegin; nStart = aSwFlds[nPos].nFmtBegin;
if (TYP_AUTHORFLD == nTypeId|| TYP_FILENAMEFLD == nTypeId) if (TYP_AUTHORFLD == nTypeId|| TYP_FILENAMEFLD == nTypeId)
nFormatId &= ~FF_FIXED; // Fixed-Flag ausmaskieren nFormatId &= ~FF_FIXED; // mask out Fixed-Flag
if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd) if((nStart + nFormatId) < aSwFlds[nPos].nFmtEnd)
aRet = SW_RESSTR((USHORT)(nStart + nFormatId)); aRet = SW_RESSTR((USHORT)(nStart + nFormatId));
...@@ -721,7 +714,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const ...@@ -721,7 +714,7 @@ String SwFldMgr::GetFormatStr(USHORT nTypeId, ULONG nFormatId) const
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: FormatId aus Pseudo-ID ermitteln Description: determine FormatId from Pseudo-ID
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
...@@ -801,7 +794,7 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const ...@@ -801,7 +794,7 @@ USHORT SwFldMgr::GetFormatId(USHORT nTypeId, ULONG nFormatId) const
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Traveling Description: Traveling
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -822,7 +815,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp ) ...@@ -822,7 +815,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
if (pTyp && pTyp->Which() == RES_DBFLD) if (pTyp && pTyp->Which() == RES_DBFLD)
{ {
// Fuer Feldbefehl-bearbeiten (alle DB-Felder anspringen) // for fieldcommand-edit (hop to all DB fields)
return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD ); return pSh->MoveFldType( 0, bNext, USHRT_MAX, RES_DBFLD );
} }
...@@ -830,7 +823,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp ) ...@@ -830,7 +823,7 @@ BOOL SwFldMgr::GoNextPrev( BOOL bNext, SwFieldType* pTyp )
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Feldtypen einfuegen Description: insert field types
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -843,7 +836,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType) ...@@ -843,7 +836,7 @@ void SwFldMgr::InsertFldType(SwFieldType& rType)
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Aktuelle TypeId ermitteln Description: determine current TypeId
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -853,7 +846,7 @@ USHORT SwFldMgr::GetCurTypeId() const ...@@ -853,7 +846,7 @@ USHORT SwFldMgr::GetCurTypeId() const
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Ueber String Feld einfuegen oder Update Description: Over string insert field or update
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -874,7 +867,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -874,7 +867,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
return FALSE; return FALSE;
switch(rData.nTypeId) switch(rData.nTypeId)
{ // ACHTUNG dieses Feld wird ueber einen gesonderten Dialog eingefuegt { // ATTENTION this field is inserted by a seperate dialog
case TYP_POSTITFLD: case TYP_POSTITFLD:
{ {
SwPostItFieldType* pType = (SwPostItFieldType*)pCurShell->GetFldType(0, RES_POSTITFLD); SwPostItFieldType* pType = (SwPostItFieldType*)pCurShell->GetFldType(0, RES_POSTITFLD);
...@@ -1029,8 +1022,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1029,8 +1022,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
} }
case TYP_DDEFLD: case TYP_DDEFLD:
{ {
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
// Namen haben! Wird hier noch nicht beachtet. // That's not yet considered here.
String sCmd( rData.sPar2 ); String sCmd( rData.sPar2 );
USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator ); USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
...@@ -1104,7 +1097,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1104,7 +1097,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = new SwDBField(pTyp); pFld = new SwDBField(pTyp);
pFld->SetSubType(nSubType); pFld->SetSubType(nSubType);
if( !(nSubType & nsSwExtendedSubType::SUB_OWN_FMT) ) // Datenbankformat ermitteln if( !(nSubType & nsSwExtendedSubType::SUB_OWN_FMT) ) // determinee database format
{ {
Reference< XDataSource> xSource; Reference< XDataSource> xSource;
rData.aDBDataSource >>= xSource; rData.aDBDataSource >>= xSource;
...@@ -1136,7 +1129,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1136,7 +1129,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
String sPar1; String sPar1;
SwDBData aDBData; SwDBData aDBData;
// DBName aus rData.sPar1 extrahieren. Format: DBName.TableName.CommandType.ExpStrg // excract DBName from rData.sPar1. Format: DBName.TableName.CommandType.ExpStrg
if ((nTablePos = rData.sPar1.Search(DB_DELIM)) != STRING_NOTFOUND) if ((nTablePos = rData.sPar1.Search(DB_DELIM)) != STRING_NOTFOUND)
aDBData.sDataSource = rData.sPar1.Copy(0, nTablePos++); aDBData.sDataSource = rData.sPar1.Copy(0, nTablePos++);
if ((nCmdTypePos = rData.sPar1.Search(DB_DELIM, nTablePos)) != STRING_NOTFOUND) if ((nCmdTypePos = rData.sPar1.Search(DB_DELIM, nTablePos)) != STRING_NOTFOUND)
...@@ -1200,7 +1193,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1200,7 +1193,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwUserFieldType* pTyp = SwUserFieldType* pTyp =
(SwUserFieldType*)pCurShell->GetFldType(RES_USERFLD, rData.sPar1); (SwUserFieldType*)pCurShell->GetFldType(RES_USERFLD, rData.sPar1);
// nur wenn vorhanden // only if existing
if(!pTyp) if(!pTyp)
{ {
pTyp = (SwUserFieldType*)pCurShell->InsertFldType( pTyp = (SwUserFieldType*)pCurShell->InsertFldType(
...@@ -1221,13 +1214,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1221,13 +1214,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
SwSetExpFieldType* pTyp = (SwSetExpFieldType*) SwSetExpFieldType* pTyp = (SwSetExpFieldType*)
pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1); pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1);
// kein Experssion Type mit dem Namen vorhanden -> anlegen // no Experssion Type with this name existing -> create
if(pTyp) if(pTyp)
{ {
SwSetExpField* pExpFld = SwSetExpField* pExpFld =
new SwSetExpField(pTyp, aEmptyStr, nFormatId); new SwSetExpField(pTyp, aEmptyStr, nFormatId);
// Typ vom SwSetExpFieldType nicht veraendern: // Don't change type of SwSetExpFieldType:
USHORT nOldSubType = pExpFld->GetSubType(); USHORT nOldSubType = pExpFld->GetSubType();
pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00)); pExpFld->SetSubType(nOldSubType | (nSubType & 0xff00));
...@@ -1249,14 +1242,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1249,14 +1242,13 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
pFld = pInpFld; pFld = pInpFld;
} }
// Dialog starten // start dialog
//
pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent); pCurShell->StartInputFldDlg(pFld, FALSE, rData.pParent);
break; break;
} }
case TYP_SETFLD: case TYP_SETFLD:
{ {
if (!rData.sPar2.Len()) // Leere Variablen sind nicht erlaubt if (!rData.sPar2.Len()) // empty variables are not allowed
return FALSE; return FALSE;
SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType( SwSetExpFieldType* pTyp = (SwSetExpFieldType*)pCurShell->InsertFldType(
...@@ -1289,7 +1281,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1289,7 +1281,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
} }
case TYP_GETFLD: case TYP_GETFLD:
{ {
// gibt es ein entprechendes SetField // is there a corresponding SetField
SwSetExpFieldType* pSetTyp = (SwSetExpFieldType*) SwSetExpFieldType* pSetTyp = (SwSetExpFieldType*)
pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1); pCurShell->GetFldType(RES_SETEXPFLD, rData.sPar1);
...@@ -1384,7 +1376,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1384,7 +1376,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
USHORT nLang = GetCurrLanguage(); USHORT nLang = GetCurrLanguage();
pFld->SetLanguage(nLang); pFld->SetLanguage(nLang);
// Einfuegen // insert
pCurShell->StartAllAction(); pCurShell->StartAllAction();
pCurShell->Insert(*pFld); pCurShell->Insert(*pFld);
...@@ -1403,7 +1395,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1403,7 +1395,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
else if( TYP_GETREFFLD == rData.nTypeId ) else if( TYP_GETREFFLD == rData.nTypeId )
pFld->GetTyp()->Modify( 0, 0 ); pFld->GetTyp()->Modify( 0, 0 );
// temporaeres Feld loeschen // delete temporary field
delete pFld; delete pFld;
pCurShell->EndAllAction(); pCurShell->EndAllAction();
...@@ -1411,7 +1403,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData ) ...@@ -1411,7 +1403,7 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: Felder Update Description: fields update
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
...@@ -1420,7 +1412,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, ...@@ -1420,7 +1412,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
const String& rPar2, const String& rPar2,
SwField * _pTmpFld) // #111840# SwField * _pTmpFld) // #111840#
{ {
// Format aendern // change format
OSL_ENSURE(pCurFld, "no field at CursorPos"); OSL_ENSURE(pCurFld, "no field at CursorPos");
bool bDelete = false; bool bDelete = false;
...@@ -1454,8 +1446,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, ...@@ -1454,8 +1446,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
{ {
case TYP_DDEFLD: case TYP_DDEFLD:
{ {
//JP 28.08.95: DDE-Topics/-Items koennen Blanks in ihren //JP 28.08.95: DDE-Topics/-Items can have blanks in their names!
// Namen haben! Wird hier noch nicht beachtet. // That's not yet considered here!
USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator ); USHORT nTmpPos = sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos ); sPar2.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
break; break;
...@@ -1559,8 +1551,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, ...@@ -1559,8 +1551,8 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
break; break;
} }
// Format setzen // set format
// Format wegen NumberFormatter vor SetPar2 einstellen! // setup format before SetPar2 because of NumberFormatter!
pTmpFld->ChangeFormat(nFormat); pTmpFld->ChangeFormat(nFormat);
if(bSetPar1) if(bSetPar1)
...@@ -1568,7 +1560,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, ...@@ -1568,7 +1560,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
if( bSetPar2 ) if( bSetPar2 )
pTmpFld->SetPar2( sPar2 ); pTmpFld->SetPar2( sPar2 );
// Update anschmeissen // kick off update
if(nTypeId == TYP_DDEFLD || if(nTypeId == TYP_DDEFLD ||
nTypeId == TYP_USERFLD || nTypeId == TYP_USERFLD ||
nTypeId == TYP_USRINPFLD) nTypeId == TYP_USRINPFLD)
...@@ -1589,7 +1581,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat, ...@@ -1589,7 +1581,7 @@ void SwFldMgr::UpdateCurFld(ULONG nFormat,
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
Beschreibung: ExpressionFields explizit evaluieren Description: explicitly evaluate ExpressionFields
--------------------------------------------------------------------*/ --------------------------------------------------------------------*/
void SwFldMgr::EvalExpFlds(SwWrtShell* pSh) void SwFldMgr::EvalExpFlds(SwWrtShell* pSh)
{ {
...@@ -1661,7 +1653,7 @@ void SwFieldType::_GetFldName() ...@@ -1661,7 +1653,7 @@ void SwFieldType::_GetFldName()
STR_DROPDOWN STR_DROPDOWN
}; };
// Infos fuer Felder einfuegen // insert infos for fields
SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 ); SwFieldType::pFldNames = new SvStringsDtor( (BYTE)coFldCnt, 2 );
for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx ) for( USHORT nIdx = 0; nIdx < coFldCnt; ++nIdx )
{ {
......
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