[Libreoffice-commits] .: sfx2/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Jan 26 13:04:53 PST 2011
sfx2/source/control/bindings.cxx | 366 ++++++++--------
sfx2/source/control/ctrlitem.cxx | 160 +++----
sfx2/source/control/dispatch.cxx | 849 +++++++++++++++++++--------------------
sfx2/source/control/macrconf.cxx | 76 +--
sfx2/source/control/macro.cxx | 311 ++++++--------
sfx2/source/control/makefile.mk | 2
sfx2/source/control/minfitem.cxx | 4
sfx2/source/control/msgpool.cxx | 42 -
sfx2/source/control/objface.cxx | 80 +--
9 files changed, 910 insertions(+), 980 deletions(-)
New commits:
commit e608f78b4e0e136abe6dabf72616078db1eae4c6
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date: Wed Jan 26 21:04:40 2011 +0000
Translations of German comments in sfx
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 8cd3098..ae4ce08 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -50,7 +50,7 @@
#include <comphelper/processfactory.hxx>
#include <svtools/itemdel.hxx>
-// wg. nInReschedule
+//Includes below due to nInReschedule
#include "appdata.hxx"
#include <sfx2/bindings.hxx>
#include <sfx2/msg.hxx>
@@ -149,33 +149,33 @@ public:
SfxWorkWindow* pWorkWin;
SfxBindings* pSubBindings;
SfxBindings* pSuperBindings;
- SfxStateCacheArr_Impl* pCaches; // je ein cache fuer jede gebundene
- sal_uInt16 nCachedFunc1; // index der zuletzt gerufenen
- sal_uInt16 nCachedFunc2; // index der vorletzt gerufenen
- sal_uInt16 nMsgPos; // Message-Position, ab der zu aktualisieren ist
- SfxPopupAction ePopupAction; // in DeleteFloatinWindow() abgefragt
- sal_Bool bContextChanged;
- sal_Bool bMsgDirty; // wurde ein MessageServer invalidiert?
- sal_Bool bAllMsgDirty; // wurden die MessageServer invalidiert?
- sal_Bool bAllDirty; // nach InvalidateAll
- sal_Bool bCtrlReleased; // waehrend EnterRegistrations
- AutoTimer aTimer; // fuer volatile Slots
- sal_Bool bInUpdate; // fuer Assertions
- sal_Bool bInNextJob; // fuer Assertions
- sal_Bool bFirstRound; // Erste Runde im Update
- sal_uInt16 nFirstShell; // Shell, die in erster Runde bevorzugt wird
- sal_uInt16 nOwnRegLevel; // z"ahlt die echten Locks, ohne die der SuperBindings
- InvalidateSlotMap m_aInvalidateSlots; // store slots which are invalidated while in update
+ SfxStateCacheArr_Impl* pCaches; // One chache for each binding
+ sal_uInt16 nCachedFunc1; // index for the last one called
+ sal_uInt16 nCachedFunc2; // index for the second last called
+ sal_uInt16 nMsgPos; // Message-Position relative the one to be updated
+ SfxPopupAction ePopupAction; // Checked in DeleteFloatinWindow()
+ sal_Bool bContextChanged;
+ sal_Bool bMsgDirty; // Has a MessageServer been invalidated?
+ sal_Bool bAllMsgDirty; // Has a MessageServer been invalidated?
+ sal_Bool bAllDirty; // After InvalidateAll
+ sal_Bool bCtrlReleased; // while EnterRegistrations
+ AutoTimer aTimer; // for volatile Slots
+ sal_Bool bInUpdate; // for Assertions
+ sal_Bool bInNextJob; // for Assertions
+ sal_Bool bFirstRound; // First round in Update
+ sal_uInt16 nFirstShell; // Shell, the first round is prefered
+ sal_uInt16 nOwnRegLevel; // Counts the real Locks, exept those of the Super Bindings
+ InvalidateSlotMap m_aInvalidateSlots; // store slots which are invalidated while in update
};
//--------------------------------------------------------------------
struct SfxFoundCache_Impl
{
- sal_uInt16 nSlotId; // die Slot-Id
- sal_uInt16 nWhichId; // falls verf"ugbar die Which-Id, sonst nSlotId
- const SfxSlot* pSlot; // Pointer auf den <Master-Slot>
- SfxStateCache* pCache; // Pointer auf den StatusCache, ggf. 0
+ sal_uInt16 nSlotId; // the Slot-Id
+ sal_uInt16 nWhichId; // If available: Which-Id, else: nSlotId
+ const SfxSlot* pSlot; // Pointer to <Master-Slot>
+ SfxStateCache* pCache; // Pointer to StatusCache, if possible NULL
SfxFoundCache_Impl():
nSlotId(0),
@@ -215,7 +215,7 @@ SV_IMPL_OP_PTRARR_SORT(SfxFoundCacheArr_Impl, SfxFoundCache_Impl*);
SfxBindings::SfxBindings()
: pImp(new SfxBindings_Impl),
pDispatcher(0),
- nRegLevel(1) // geht erst auf 0, wenn Dispatcher gesetzt
+ nRegLevel(1) // first becomes 0, when the Dispatcher is set
{
pImp->nMsgPos = 0;
pImp->bAllMsgDirty = sal_True;
@@ -245,21 +245,20 @@ SfxBindings::SfxBindings()
SfxBindings::~SfxBindings()
-/* [Beschreibung]
+/* [Description]
- Destruktor der Klasse SfxBindings. Die eine, f"ur jede <SfxApplication>
- existierende Instanz wird von der <SfxApplication> nach Ausf"urhung
- von <SfxApplication::Exit()> automatisch zerst"ort.
+ Destructor of the SfxBindings class. The one, for each <SfxApplication>
+ existing Instance is automaticaölly destroyed by the <SfxApplication>
+ after the execution of <SfxApplication::Exit()>.
- Noch existierende <SfxControllerItem> Instanzen, die bei dieser
- SfxBindings Instanz angemeldet sind, werden im Destruktor
- automatisch zerst"ort. Dies sind i.d.R. Floating-Toolboxen, Value-Sets
- etc. Arrays von SfxControllerItems d"urfen zu diesem Zeitpunkt nicht
- mehr exisitieren.
+ The still existing <SfxControllerItem> instances, which are registered
+ by the SfxBindings instance, are automatically destroyed in the Destructor.
+ These are usually the Floating-Toolboxen, Value-Sets
+ etc. Arrays of SfxControllerItems may at this time no longer exist.
*/
{
- // Die SubBindings sollen ja nicht gelocked werden !
+ // The SubBindings should not be locked!
pImp->pSubBindings = NULL;
ENTERREGISTRATIONS();
@@ -267,7 +266,7 @@ SfxBindings::~SfxBindings()
pImp->aTimer.Stop();
DeleteControllers_Impl();
- // Caches selbst l"oschen
+ // Delete Caches
sal_uInt16 nCount = pImp->pCaches->Count();
for ( sal_uInt16 nCache = 0; nCache < nCount; ++nCache )
delete pImp->pCaches->GetObject(nCache);
@@ -282,19 +281,19 @@ SfxBindings::~SfxBindings()
void SfxBindings::DeleteControllers_Impl()
{
- // in der ersten Runde den SfxPopupWindows l"oschen
+ // in the first round delete SfxPopupWindows
sal_uInt16 nCount = pImp->pCaches->Count();
sal_uInt16 nCache;
for ( nCache = 0; nCache < nCount; ++nCache )
{
- // merken wo man ist
+ // Remember were you are
SfxStateCache *pCache = pImp->pCaches->GetObject(nCache);
sal_uInt16 nSlotId = pCache->GetId();
- // SfxPopupWindow l"oschen lassen
+ // Delete SfxPopupWindow
pCache->DeleteFloatingWindows();
- // da der Cache verkleinert worden sein kann, wiederaufsetzen
+ // Re-align, because the cache may have been reduced
sal_uInt16 nNewCount = pImp->pCaches->Count();
if ( nNewCount < nCount )
{
@@ -306,13 +305,13 @@ void SfxBindings::DeleteControllers_Impl()
}
}
- // alle Caches l"oschen
+ // Delete all Caches
for ( nCache = pImp->pCaches->Count(); nCache > 0; --nCache )
{
- // Cache via ::com::sun::star::sdbcx::Index besorgen
+ // Get Cache via ::com::sun::star::sdbcx::Index
SfxStateCache *pCache = pImp->pCaches->GetObject(nCache-1);
- // alle Controller in dem Cache unbinden
+ // unbind all controllers in the cache
SfxControllerItem *pNext;
for ( SfxControllerItem *pCtrl = pCache->GetItemLink();
pCtrl; pCtrl = pNext )
@@ -324,7 +323,7 @@ void SfxBindings::DeleteControllers_Impl()
if ( pCache->GetInternalController() )
pCache->GetInternalController()->UnBind();
- // Cache l"oschen
+ // Delete Cache
if( nCache-1 < pImp->pCaches->Count() )
delete (*pImp->pCaches)[nCache-1];
pImp->pCaches->Remove(nCache-1, 1);
@@ -339,7 +338,7 @@ void SfxBindings::DeleteControllers_Impl()
pCtrl->ReleaseBindings();
}
- DBG_ASSERT( !pImp->pUnoCtrlArr->Count(), "UnoControllerItems nicht entfernt!" );
+ DBG_ASSERT( !pImp->pUnoCtrlArr->Count(), "Do not remove UnoControllerItems!" );
DELETEZ( pImp->pUnoCtrlArr );
}
}
@@ -356,7 +355,7 @@ SfxPopupAction SfxBindings::GetPopupAction_Impl() const
void SfxBindings::HidePopups( bool bHide )
{
- // SfxPopupWindows hiden
+ // Hide SfxPopupWindows
HidePopupCtrls_Impl( bHide );
SfxBindings *pSub = pImp->pSubBindings;
while ( pSub )
@@ -365,7 +364,7 @@ void SfxBindings::HidePopups( bool bHide )
pSub = pSub->pImp->pSubBindings;
}
- // SfxChildWindows hiden
+ // Hide SfxChildWindows
DBG_ASSERT( pDispatcher, "HidePopups not allowed without dispatcher" );
if ( pImp->pWorkWin )
pImp->pWorkWin->HidePopups_Impl( bHide, sal_True );
@@ -375,12 +374,12 @@ void SfxBindings::HidePopupCtrls_Impl( bool bHide )
{
if ( bHide )
{
- // SfxPopupWindows hiden
+ // Hide SfxPopupWindows
pImp->ePopupAction = SFX_POPUP_HIDE;
}
else
{
- // SfxPopupWindows showen
+ // Show SfxPopupWindows
pImp->ePopupAction = SFX_POPUP_SHOW;
}
@@ -393,7 +392,7 @@ void SfxBindings::HidePopupCtrls_Impl( bool bHide )
void SfxBindings::Update_Impl
(
- SfxStateCache* pCache // der upzudatende SfxStatusCache
+ SfxStateCache* pCache // The up to date SfxStatusCache
)
{
if( pCache->GetDispatch().is() && pCache->GetItemLink() )
@@ -407,7 +406,7 @@ void SfxBindings::Update_Impl
return;
DBG_PROFSTART(SfxBindingsUpdate_Impl);
- // alle mit derselben Statusmethode zusammensammeln, die dirty sind
+ // gather together all with the same status method which are dirty
SfxDispatcher &rDispat = *pDispatcher;
const SfxSlot *pRealSlot = 0;
const SfxSlotServer* pMsgServer = 0;
@@ -416,10 +415,10 @@ void SfxBindings::Update_Impl
sal_Bool bUpdated = sal_False;
if ( pSet )
{
- // Status erfragen
+ // Query Status
if ( rDispat._FillState( *pMsgServer, *pSet, pRealSlot ) )
{
- // Status posten
+ // Post Status
const SfxInterface *pInterface =
rDispat.GetShell(pMsgServer->GetShellLevel())->GetInterface();
for ( sal_uInt16 nPos = 0; nPos < aFound.Count(); ++nPos )
@@ -440,8 +439,9 @@ void SfxBindings::Update_Impl
if ( !bUpdated && pCache )
{
- // Wenn pCache == NULL und kein SlotServer ( z.B. weil Dispatcher gelockt! ),
- // darf nat"urlich kein Update versucht werden
+ // When pCache == NULL and no SlotServer
+ // (for example due to locked Dispatcher! ),
+ // obviously do not try to update
SfxFoundCache_Impl aFoundCache(
pCache->GetId(), 0,
pRealSlot, pCache );
@@ -475,13 +475,13 @@ void SfxBindings::AddSlotToInvalidateSlotsMap_Impl( USHORT nId )
void SfxBindings::Update
(
- sal_uInt16 nId // die gebundene und upzudatende Slot-Id
+ sal_uInt16 nId // the bound and up-to-date Slot-Id
)
{
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
-//!!TLX: Fuehrte zu Vorlagenkatalogstillstand
+//!!TLX: leads to Template Gallery freeze
// if ( nRegLevel )
// return;
@@ -512,7 +512,7 @@ void SfxBindings::Update
if ( bInternalUpdate )
{
- // Status erfragen
+ // Query Status
const SfxSlotServer* pMsgServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
if ( !pCache->IsControllerDirty() &&
( !pMsgServer ||
@@ -570,10 +570,10 @@ void SfxBindings::Update()
void SfxBindings::SetState
(
- const SfxItemSet& rSet // zu setzende Status-Werte
+ const SfxItemSet& rSet // status values to be set
)
{
- // wenn gelockt, dann nur invalidieren
+ // when locked then only invalidate
if ( nRegLevel )
{
SfxItemIter aIter(rSet);
@@ -584,12 +584,12 @@ void SfxBindings::SetState
}
else
{
- // Status d"urfen nur angenommen werden, wenn alle Slot-Pointer gesetzt sind
+ // Status may be accepted only if all slot-pointers are set
if ( pImp->bMsgDirty )
UpdateSlotServer_Impl();
- // "uber das ItemSet iterieren, falls Slot gebunden, updaten
- //! Bug: WhichIter verwenden und ggf. VoidItems hochschicken
+ // Iterate over the itemset, update if the slot bound
+ //! Bug: Use WhichIter and possibly send VoidItems up
SfxItemIter aIter(rSet);
for ( const SfxPoolItem *pItem = aIter.FirstItem();
pItem;
@@ -599,12 +599,12 @@ void SfxBindings::SetState
GetStateCache( rSet.GetPool()->GetSlotId(pItem->Which()) );
if ( pCache )
{
- // Status updaten
+ // Update status
if ( !pCache->IsControllerDirty() )
pCache->Invalidate(sal_False);
pCache->SetState( SFX_ITEM_AVAILABLE, pItem );
- //! nicht implementiert: Updates von EnumSlots via MasterSlots
+ //! Not implemented: Updates from EnumSlots via master slots
}
}
}
@@ -614,7 +614,7 @@ void SfxBindings::SetState
void SfxBindings::SetState
(
- const SfxPoolItem& rItem // zu setzender Status-Wert
+ const SfxPoolItem& rItem // Status value to be set
)
{
if ( nRegLevel )
@@ -623,22 +623,22 @@ void SfxBindings::SetState
}
else
{
- // Status d"urfen nur angenommen werden, wenn alle Slot-Pointer gesetzt sind
+ // Status may be accepted only if all slot-pointers are set
if ( pImp->bMsgDirty )
UpdateSlotServer_Impl();
- // falls der Slot gebunden ist, updaten
+ //update if the slot bound
DBG_ASSERT( SfxItemPool::IsSlot( rItem.Which() ),
"cannot set items with which-id" );
SfxStateCache* pCache = GetStateCache( rItem.Which() );
if ( pCache )
{
- // Status updaten
+ // Update Status
if ( !pCache->IsControllerDirty() )
pCache->Invalidate(sal_False);
pCache->SetState( SFX_ITEM_AVAILABLE, &rItem );
- //! nicht implementiert: Updates von EnumSlots via MasterSlots
+ //! Not implemented: Updates from EnumSlots via master slots
}
}
}
@@ -656,13 +656,11 @@ SfxStateCache* SfxBindings::GetAnyStateCache_Impl( sal_uInt16 nId )
SfxStateCache* SfxBindings::GetStateCache
(
- sal_uInt16 nId /* Slot-Id, deren SfxStatusCache gefunden
- werden soll */,
- sal_uInt16* pPos /* 0 bzw. Position, ab der die Bindings
- bin"ar durchsucht werden sollen. Liefert
- die Position zur"uck, an der nId gefunden
- wurde, bzw. an der es einfef"ugt werden
- w"urde. */
+ sal_uInt16 nId, /* Slot-Id, which SfxStatusCache is to be found */
+ sal_uInt16* pPos /* NULL for instance the position from which the
+ bindings are to be searched binary. Returns the
+ position back for where the nId was found,
+ or where it was inserted. */
)
{
DBG_MEMTEST();
@@ -685,11 +683,8 @@ SfxStateCache* SfxBindings::GetStateCache
void SfxBindings::InvalidateAll
(
- sal_Bool bWithMsg /* sal_True
- Slot-Server als ung"ultig markieren
-
- sal_False
- Slot-Server bleiben g"ultig */
+ sal_Bool bWithMsg /* sal_True Mark Slot Server as invalid
+ sal_False Slot Server remains valid */
)
{
DBG_PROFSTART(SfxBindingsInvalidateAll);
@@ -700,7 +695,7 @@ void SfxBindings::InvalidateAll
if ( pImp->pSubBindings )
pImp->pSubBindings->InvalidateAll( bWithMsg );
- // ist schon alles dirty gesetzt oder downing => nicht zu tun
+ // everything is already set dirty or downing => nothing to do
if ( !pDispatcher ||
( pImp->bAllDirty && ( !bWithMsg || pImp->bAllMsgDirty ) ) ||
SFX_APP()->IsDowning() )
@@ -739,8 +734,8 @@ void SfxBindings::InvalidateAll
void SfxBindings::Invalidate
(
- const sal_uInt16* pIds /* numerisch sortiertes 0-terminiertes Array
- von Slot-Ids (einzel, nicht als Paare!) */
+ const sal_uInt16* pIds /* numerically sorted NULL-terminated array of
+ slot IDs (individual, not as a couple!) */
)
{
DBG_PROFSTART(SfxBindingsInvalidateAll);
@@ -762,27 +757,27 @@ void SfxBindings::Invalidate
if ( pImp->pSubBindings )
pImp->pSubBindings->Invalidate( pIds );
- // ist schon alles dirty gesetzt oder downing => nicht zu tun
+ // everything is already set dirty or downing => nothing to do
if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
return;
- // in immer kleiner werdenden Berichen bin"ar suchen
+ // Search binary in always smaller areas
for ( sal_uInt16 n = GetSlotPos(*pIds);
*pIds && n < pImp->pCaches->Count();
n = GetSlotPos(*pIds, n) )
{
- // falls SID "uberhaupt gebunden ist, den Cache invalidieren
+ // If SID is ever bound, then invalidate the cache
SfxStateCache *pCache = pImp->pCaches->GetObject(n);
if ( pCache->GetId() == *pIds )
pCache->Invalidate(sal_False);
- // n"achste SID
+ // Next SID
if ( !*++pIds )
break;
DBG_ASSERT( *pIds > *(pIds-1), "pIds unsorted" );
}
- // falls nicht gelockt, Update-Timer starten
+ // if not enticed to start update timer
pImp->nMsgPos = 0;
if ( !nRegLevel )
{
@@ -800,17 +795,15 @@ void SfxBindings::Invalidate
void SfxBindings::InvalidateShell
(
- const SfxShell& rSh /* Die <SfxShell>, deren Slot-Ids
- invalidiert werden sollen. */,
-
- sal_Bool bDeep /* sal_True
- auch die, von der SfxShell
- ererbten Slot-Ids werden invalidert
-
- sal_False
- die ererbten und nicht "uberladenen
- Slot-Ids werden invalidiert */
- //! MI: z. Zt. immer bDeep
+ const SfxShell& rSh, /* <SfxShell>, which Slot-Ids should be
+ invalidated */
+ sal_Bool bDeep /* sal_True
+ also inherited slot IDs of SfxShell are invalidert
+
+ sal_False
+ the inherited and not overloaded Slot-Ids were
+ invalidiert */
+ //! MI: for now alwayds bDeep
)
{
DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
@@ -832,11 +825,11 @@ void SfxBindings::InvalidateShell
( pImp->bAllDirty && pImp->bAllMsgDirty ) ||
SFX_APP()->IsDowning() )
{
- // Wenn sowieso demn"achst alle Server geholt werden
+ // if the next one is anyway, then all the servers are collected
return;
}
- // Level finden
+ // Find Level
sal_uInt16 nLevel = pDispatcher->GetShellLevel(rSh);
if ( nLevel != USHRT_MAX )
{
@@ -866,7 +859,7 @@ void SfxBindings::InvalidateShell
void SfxBindings::Invalidate
(
- sal_uInt16 nId // zu invalidierende Slot-Id
+ sal_uInt16 nId // Status value to be set
)
{
DBG_MEMTEST();
@@ -904,9 +897,9 @@ void SfxBindings::Invalidate
void SfxBindings::Invalidate
(
- sal_uInt16 nId, // zu invalidierende Slot-Id
- sal_Bool bWithItem, // StateCache clearen ?
- sal_Bool bWithMsg // SlotServer neu holen ?
+ sal_uInt16 nId, // Status value to be set
+ sal_Bool bWithItem, // Clear StateCache?
+ sal_Bool bWithMsg // Get new SlotServer?
)
{
DBG_MEMTEST();
@@ -995,7 +988,7 @@ sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
while ( !bFound && nLow <= nHigh )
{
nMid = (nLow + nHigh) >> 1;
- DBG_ASSERT( nMid < pImp->pCaches->Count(), "bsearch ist buggy" );
+ DBG_ASSERT( nMid < pImp->pCaches->Count(), "bsearch is buggy" );
int nDiff = (int) nId - (int) ( ((*pImp->pCaches)[nMid])->GetId() );
if ( nDiff < 0)
{ if ( nMid == 0 )
@@ -1271,7 +1264,8 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
if ( SFX_KIND_ENUM == pSlot->GetKind() )
{
- // bei Enum-Slots muss der Master mit dem Wert des Enums executet werden
+ // for Enum-Slots, the Master has to be excecuted with the value
+ // of the enums Wert
const SfxSlot *pRealSlot = pShell->GetInterface()->GetRealSlot(pSlot);
const sal_uInt16 nSlotId = pRealSlot->GetSlotId();
aReq.SetSlot( nSlotId );
@@ -1280,12 +1274,12 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
}
else if ( SFX_KIND_ATTR == pSlot->GetKind() )
{
- // bei Attr-Slots muss der Which-Wert gemapped werden
+ // Which value has to be mapped for Attribute slots
const sal_uInt16 nSlotId = pSlot->GetSlotId();
aReq.SetSlot( nSlotId );
if ( pSlot->IsMode(SFX_SLOT_TOGGLE) )
{
- // an togglebare-Attribs (Bools) wird der Wert angeheangt
+ // The value is attached to a toggleable attribute (Bools)
sal_uInt16 nWhich = pSlot->GetWhich(rPool);
SfxItemSet aSet(rPool, nWhich, nWhich, 0);
SfxStateFunc aFunc = pSlot->GetStateFnc();
@@ -1305,7 +1299,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
{
if ( pOldItem->ISA(SfxBoolItem) )
{
- // wir koennen Bools toggeln
+ // we can toggle Bools
sal_Bool bOldValue = ((const SfxBoolItem *)pOldItem)->GetValue();
SfxBoolItem *pNewItem = (SfxBoolItem*) (pOldItem->Clone());
pNewItem->SetValue( !bOldValue );
@@ -1315,7 +1309,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
else if ( pOldItem->ISA(SfxEnumItemInterface) &&
((SfxEnumItemInterface *)pOldItem)->HasBoolValue())
{
- // und Enums mit Bool-Interface
+ // and Enums with Bool-Interface
SfxEnumItemInterface *pNewItem =
(SfxEnumItemInterface*) (pOldItem->Clone());
pNewItem->SetBoolValue(!((SfxEnumItemInterface *)pOldItem)->GetBoolValue());
@@ -1328,21 +1322,21 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
}
else if ( SFX_ITEM_DONTCARE == eState )
{
- // ein Status-Item per Factory erzeugen
+ // Create one Status-Item for each Factory
SfxPoolItem *pNewItem = pSlot->GetType()->CreateItem();
DBG_ASSERT( pNewItem, "Toggle an Slot ohne ItemFactory" );
pNewItem->SetWhich( nWhich );
if ( pNewItem->ISA(SfxBoolItem) )
{
- // wir koennen Bools toggeln
+ // we can toggle Bools
((SfxBoolItem*)pNewItem)->SetValue( sal_True );
aReq.AppendItem( *pNewItem );
}
else if ( pNewItem->ISA(SfxEnumItemInterface) &&
((SfxEnumItemInterface *)pNewItem)->HasBoolValue())
{
- // und Enums mit Bool-Interface
+ // and Enums with Bool-Interface
((SfxEnumItemInterface*)pNewItem)->SetBoolValue(sal_True);
aReq.AppendItem( *pNewItem );
}
@@ -1370,7 +1364,7 @@ void SfxBindings::UpdateSlotServer_Impl()
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
- // synchronisieren
+ // synchronize
pDispatcher->Flush();
// pDispatcher->Update_Impl();
@@ -1409,9 +1403,9 @@ int __cdecl CmpUS_Impl(const void *p1, const void *p2)
int CmpUS_Impl(const void *p1, const void *p2)
#endif
-/* [Beschreibung]
+/* [Description]
- Interne Vergleichsfunktion fuer qsort.
+ Internal Comparison function for qsort.
*/
{
@@ -1422,10 +1416,10 @@ int CmpUS_Impl(const void *p1, const void *p2)
SfxItemSet* SfxBindings::CreateSet_Impl
(
- SfxStateCache*& pCache, // in: Status-Cache von nId
- const SfxSlot*& pRealSlot, // out: RealSlot zu nId
- const SfxSlotServer** pMsgServer, // out: Slot-Server zu nId
- SfxFoundCacheArr_Impl& rFound // out: Liste der Caches der Siblings
+ SfxStateCache*& pCache, // in: Status-Cache from nId
+ const SfxSlot*& pRealSlot, // out: RealSlot to nId
+ const SfxSlotServer** pMsgServer, // out: Slot-Server to nId
+ SfxFoundCacheArr_Impl& rFound // out: List of Caches for Siblings
)
{
DBG_MEMTEST();
@@ -1443,30 +1437,30 @@ SfxItemSet* SfxBindings::CreateSet_Impl
sal_uInt16 nShellLevel = pMsgSvr->GetShellLevel();
SfxShell *pShell = pDispatcher->GetShell( nShellLevel );
- if ( !pShell ) // seltener GPF beim Browsen durch Update aus Inet-Notify
+ if ( !pShell ) // rare GPF when browsing through update from Inet-Notify
return 0;
SfxItemPool &rPool = pShell->GetPool();
- // hole die Status-Methode, von der pCache bedient wird
+ // get the status method, which is served by the pCache
SfxStateFunc pFnc = 0;
const SfxInterface *pInterface = pShell->GetInterface();
if ( SFX_KIND_ENUM == pMsgSvr->GetSlot()->GetKind() )
{
pRealSlot = pInterface->GetRealSlot(pMsgSvr->GetSlot());
pCache = GetStateCache( pRealSlot->GetSlotId() );
-// DBG_ASSERT( pCache, "Kein Slotcache fuer den Masterslot gefunden!" );
+// DBG_ASSERT( pCache, "No slot cache found for the master slot!" );
}
else
pRealSlot = pMsgSvr->GetSlot();
//
- // Achtung: pCache darf auch NULL sein !!!
+ // Note: pCache can be NULL!
//
pFnc = pRealSlot->GetStateFnc();
- // der RealSlot ist immer drin
+ // the RealSlot is always on
const SfxFoundCache_Impl *pFound = new SfxFoundCache_Impl(
pRealSlot->GetSlotId(), pRealSlot->GetWhich(rPool), pRealSlot, pCache );
rFound.Insert( pFound );
@@ -1475,24 +1469,23 @@ SfxItemSet* SfxBindings::CreateSet_Impl
if ( !SfxMacroConfig::IsMacroSlot( nSlot ) && !(nSlot >= SID_VERB_START && nSlot <= SID_VERB_END) )
{
pInterface = pInterface->GetRealInterfaceForSlot( pRealSlot );
- DBG_ASSERT (pInterface,"Slot in angegebener Shell nicht gefunden!");
+ DBG_ASSERT (pInterface,"Slot in the given shell is not found");
}
- // Durchsuche die Bindings nach den von derselben Funktion bedienten Slots.
- // Daf"ur kommen nur Slots in Frage, die es im gefundenen Interface gibt.
+ // Search through the bindings for slots served by the same function. This , // will only affect slots which are present in the found interface.
- // Die Position des Statecaches im StateCache-Array
+ // The position of the Statecaches in StateCache-Array
sal_uInt16 nCachePos = pImp->nMsgPos;
const SfxSlot *pSibling = pRealSlot->GetNextSlot();
- // Die Slots eines Interfaces sind im Kreis verkettet
+ // the Slots odf a interfaces ar linked in a circle
while ( pSibling > pRealSlot )
{
SfxStateFunc pSiblingFnc=0;
SfxStateCache *pSiblingCache =
GetStateCache( pSibling->GetSlotId(), &nCachePos );
- // Ist der Slot "uberhaupt gecached ?
+ // Is the slot cached ?
if ( pSiblingCache )
{
const SfxSlotServer *pServ = pSiblingCache->GetSlotServer(*pDispatcher, pImp->xProv);
@@ -1500,34 +1493,34 @@ SfxItemSet* SfxBindings::CreateSet_Impl
pSiblingFnc = pServ->GetSlot()->GetStateFnc();
}
- // Mu\s der Slot "uberhaupt upgedatet werden ?
+ // Does the slot have to be updated at all?
bool bInsert = pSiblingCache && pSiblingCache->IsControllerDirty();
- // Bugfix #26161#: Es reicht nicht, nach der selben Shell zu fragen !!
+ // Bugfix #26161#: It is not enough to ask for the same shell!!
bool bSameMethod = pSiblingCache && pFnc == pSiblingFnc;
- // Wenn der Slot ein nicht-dirty MasterSlot ist, dann ist vielleicht
- // einer seiner Slaves dirty ? Dann wird der Masterslot doch eingef"ugt.
+ // If the slot is a non-dirty master slot, then maybe one of his slaves
+ // is dirty? Then the master slot is still inserted.
if ( !bInsert && bSameMethod && pSibling->GetLinkedSlot() )
{
- // auch Slave-Slots auf Binding pru"fen
+ // Also check slave slots for Binding
const SfxSlot* pFirstSlave = pSibling->GetLinkedSlot();
for ( const SfxSlot *pSlaveSlot = pFirstSlave;
!bInsert;
pSlaveSlot = pSlaveSlot->GetNextSlot())
{
- // Die Slaves zeigen auf ihren Master
+ // the slaves points to its master
DBG_ASSERT(pSlaveSlot->GetLinkedSlot() == pSibling,
- "Falsche Master/Slave-Beziehung!");
+ "Wrong Master/Slave relationship!");
sal_uInt16 nCurMsgPos = pImp->nMsgPos;
const SfxStateCache *pSlaveCache =
GetStateCache( pSlaveSlot->GetSlotId(), &nCurMsgPos );
- // Ist der Slave-Slot gecached und dirty ?
+ // Is the slave slot chached and dirty ?
bInsert = pSlaveCache && pSlaveCache->IsControllerDirty();
- // Slaves sind untereinander im Kreis verkettet
+ // Slaves are chained together in a circle
if (pSlaveSlot->GetNextSlot() == pFirstSlave)
break;
}
@@ -1545,20 +1538,20 @@ SfxItemSet* SfxBindings::CreateSet_Impl
pSibling = pSibling->GetNextSlot();
}
- // aus den Ranges ein Set erzeugen
+ // Create a Set from the ranges
sal_uInt16 *pRanges = new sal_uInt16[rFound.Count() * 2 + 1];
int j = 0;
USHORT i = 0;
while ( i < rFound.Count() )
{
pRanges[j++] = rFound[i]->nWhichId;
- // aufeinanderfolgende Zahlen
+ // consecutive numbers
for ( ; i < rFound.Count()-1; ++i )
if ( rFound[i]->nWhichId+1 != rFound[i+1]->nWhichId )
break;
pRanges[j++] = rFound[i++]->nWhichId;
}
- pRanges[j] = 0; // terminierende NULL
+ pRanges[j] = 0; // terminating NULL
SfxItemSet *pSet = new SfxItemSet(rPool, pRanges);
delete [] pRanges;
DBG_PROFSTOP(SfxBindingsCreateSet);
@@ -1569,7 +1562,7 @@ SfxItemSet* SfxBindings::CreateSet_Impl
void SfxBindings::UpdateControllers_Impl
(
- const SfxInterface* pIF, // das diese Id momentan bedienende Interface
+ const SfxInterface* pIF, // Id of the current serving Interface
const SfxFoundCache_Impl* pFound, // Cache, Slot, Which etc.
const SfxPoolItem* pItem, // item to send to controller
SfxItemState eState // state of item
@@ -1583,18 +1576,18 @@ void SfxBindings::UpdateControllers_Impl
const SfxSlot* pSlot = pFound->pSlot;
DBG_ASSERT( !pCache || !pSlot || pCache->GetId() == pSlot->GetSlotId(), "SID mismatch" );
- // insofern gebunden, die Controller f"uer den Slot selbst updaten
+ // bound until now, the Controller to update the Slot.
if ( pCache && pCache->IsControllerDirty() )
{
if ( SFX_ITEM_DONTCARE == eState )
{
- // uneindeuting
+ // ambiguous
pCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 );
}
else if ( SFX_ITEM_DEFAULT == eState &&
pFound->nWhichId > SFX_WHICH_MAX )
{
- // kein Status oder Default aber ohne Pool
+ // no Status or Default but without Pool
SfxVoidItem aVoid(0);
pCache->SetState( SFX_ITEM_UNKNOWN, &aVoid );
}
@@ -1606,8 +1599,8 @@ void SfxBindings::UpdateControllers_Impl
DBG_PROFSTOP(SfxBindingsUpdateCtrl1);
- // insofern vorhanden und gebunden, die Controller f"uer Slave-Slots
- // (Enum-Werte) des Slots updaten
+ // Update the slots for so far available and bound Controllers for
+ // Slave-Slots (Enum-value)
DBG_PROFSTART(SfxBindingsUpdateCtrl2);
DBG_ASSERT( !pSlot || 0 == pSlot->GetLinkedSlot() || !pItem ||
pItem->ISA(SfxEnumItemInterface),
@@ -1615,7 +1608,7 @@ void SfxBindings::UpdateControllers_Impl
const SfxSlot *pFirstSlave = pSlot ? pSlot->GetLinkedSlot() : 0;
if ( pIF && pFirstSlave)
{
- // Items auf EnumItem casten
+ // Items cast on EnumItem
const SfxEnumItemInterface *pEnumItem =
PTR_CAST(SfxEnumItemInterface,pItem);
if ( eState == SFX_ITEM_AVAILABLE && !pEnumItem )
@@ -1623,14 +1616,14 @@ void SfxBindings::UpdateControllers_Impl
else
eState = SfxControllerItem::GetItemState( pEnumItem );
- // "uber alle Slaves-Slots iterieren
+ // Iterate over all Slaves-Slots
for ( const SfxSlot *pSlave = pFirstSlave; pSlave; pSlave = pSlave->GetNextSlot() )
{
- DBG_ASSERT(pSlave, "Falsche SlaveSlot-Verkettung!");
+ DBG_ASSERT(pSlave, "Wrong SlaveSlot binding!");
DBG_ASSERT(SFX_KIND_ENUM == pSlave->GetKind(),"non enum slaves aren't allowed");
DBG_ASSERT(pSlave->GetMasterSlotId() == pSlot->GetSlotId(),"falscher MasterSlot!");
- // ist die Funktion gebunden?
+ // Binding exist for function ?
SfxStateCache *pEnumCache = GetStateCache( pSlave->GetSlotId() );
if ( pEnumCache )
{
@@ -1655,14 +1648,14 @@ void SfxBindings::UpdateControllers_Impl
}
else if ( SFX_ITEM_AVAILABLE == eState )
{
- // enum-Wert ermitteln
+ // Determine enum value
sal_uInt16 nValue = pEnumItem->GetEnumValue();
SfxBoolItem aBool( pFound->nWhichId, pSlave->GetValue() == nValue );
pEnumCache->SetState(SFX_ITEM_AVAILABLE, &aBool);
}
else
{
- // uneindeuting
+ // ambiguous
pEnumCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 );
}
}
@@ -1681,8 +1674,8 @@ void SfxBindings::UpdateControllers_Impl
IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
{
#ifdef DBG_UTIL
- // on Windows very often C++ Exceptions (GPF etc.) are caught by MSVCRT or another MS library
- // try to get them here
+ // on Windows very often C++ Exceptions (GPF etc.) are caught by MSVCRT
+ // or another MS library try to get them here
try
{
#endif
@@ -1720,7 +1713,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
return sal_True;
}
- // gfs. alle Server aktualisieren / geschieht in eigener Zeitscheibe
+ // if possible Update all server / happens in its own time slice
if ( pImp->bMsgDirty )
{
UpdateSlotServer_Impl();
@@ -1743,7 +1736,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
// iterate through the bound functions
sal_Bool bJobDone = sal_False;
while ( !bJobDone )
- {
+ {
SfxStateCache* pCache = (*pImp->pCaches)[pImp->nMsgPos];
DBG_ASSERT( pCache, "invalid SfxStateCache-position in job queue" );
sal_Bool bWasDirty = pCache->IsControllerDirty();
@@ -1753,8 +1746,6 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
sal_Bool bSkip = sal_False;
if ( pImp->bFirstRound )
{
- // Falls beim Update eine Shell vorgezogen werden soll,
- // kommt in einer ersten Update-Runde nur diese dran
const SfxSlotServer *pMsgServer =
pCache->GetSlotServer(*pDispatcher, pImp->xProv);
if ( pMsgServer &&
@@ -1778,8 +1769,9 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
bJobDone = pImp->nMsgPos >= nCount;
if ( bJobDone && pImp->bFirstRound )
{
- // Update der bevorzugten Shell ist gelaufen, nun d"urfen
- // auch die anderen
+
+ // Update of the preferred shell has been done, now may
+ // also the others shells be updated
bJobDone = sal_False;
pImp->bFirstRound = sal_False;
pImp->nMsgPos = 0;
@@ -1814,7 +1806,7 @@ IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
else
pImp->aTimer.Stop();
- // Update-Runde ist beendet
+ // Update round is finished
pImp->bInNextJob = sal_False;
Broadcast(SfxSimpleHint(SFX_HINT_UPDATEDONE));
DBG_PROFSTOP(SfxBindingsNextJob_Impl);
@@ -1858,15 +1850,15 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
DbgTrace( aMsg.GetBuffer() );
#endif
- // Wenn Bindings gelockt werden, auch SubBindings locken
+ // When bindings are locked, also lock sub bindings.
if ( pImp->pSubBindings )
{
pImp->pSubBindings->ENTERREGISTRATIONS();
- // Dieses EnterRegistrations ist f"ur die SubBindings kein "echtes"
+ // These EnterRegistrations are not "real" for the SubBindings
pImp->pSubBindings->pImp->nOwnRegLevel--;
- // Bindings synchronisieren
+ // Synchronize Bindings
pImp->pSubBindings->nRegLevel = nRegLevel + pImp->pSubBindings->pImp->nOwnRegLevel + 1;
}
@@ -1882,7 +1874,7 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
pImp->nCachedFunc1 = 0;
pImp->nCachedFunc2 = 0;
- // merken, ob ganze Caches verschwunden sind
+ // Mark if the all of the Caches have dissapered.
pImp->bCtrlReleased = sal_False;
}
@@ -1899,14 +1891,14 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
DBG_ASSERT( nRegLevel, "Leave without Enter" );
DBG_ASSERT( nLevel == USHRT_MAX || nLevel == nRegLevel, "wrong Leave" );
- // Nur wenn die SubBindings noch von den SuperBindings gelockt sind, diesen Lock entfernen
- // ( d.h. wenn es mehr Locks als "echte" Locks dort gibt )
+ // Only when the SubBindings are still locked by the Superbindings,
+ // remove this lock (i.e. if there are more locks than "real" ones)
if ( pImp->pSubBindings && pImp->pSubBindings->nRegLevel > pImp->pSubBindings->pImp->nOwnRegLevel )
{
- // Bindings synchronisieren
+ // Synchronize Bindings
pImp->pSubBindings->nRegLevel = nRegLevel + pImp->pSubBindings->pImp->nOwnRegLevel;
- // Dieses LeaveRegistrations ist f"ur die SubBindings kein "echtes"
+ // This LeaveRegistrations is not "real" for SubBindings
pImp->pSubBindings->pImp->nOwnRegLevel++;
pImp->pSubBindings->LEAVEREGISTRATIONS();
}
@@ -1929,25 +1921,25 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
#ifndef slow
SfxViewFrame* pFrame = pDispatcher->GetFrame();
- // ggf unbenutzte Caches entfernen bzw. PlugInInfo aufbereiten
+ // If possible remove unused Caches, for example prepare PlugInInfo
if ( pImp->bCtrlReleased )
{
for ( sal_uInt16 nCache = pImp->pCaches->Count(); nCache > 0; --nCache )
{
- // Cache via ::com::sun::star::sdbcx::Index besorgen
+ // Get Cache via ::com::sun::star::sdbcx::Index
SfxStateCache *pCache = pImp->pCaches->GetObject(nCache-1);
- // kein Controller mehr interessiert
+ // No interested Controller present
if ( pCache->GetItemLink() == 0 && !pCache->GetInternalController() )
{
- // Cache entfernen. Safety: first remove and then delete
+ // Remove Cache. Safety: first remove and then delete
SfxStateCache* pSfxStateCache = (*pImp->pCaches)[nCache-1];
pImp->pCaches->Remove(nCache-1, 1);
delete pSfxStateCache;
}
else
{
- // neue Controller mit den alten Items benachrichtigen
+ // new controller to notify the old items
//!pCache->SetCachedState();
}
}
@@ -1994,7 +1986,7 @@ const SfxSlot* SfxBindings::GetSlot(sal_uInt16 nSlotId)
DBG_MEMTEST();
DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
- // syncronisieren
+ // synchronizing
pDispatcher->Flush();
if ( pImp->bMsgDirty )
UpdateSlotServer_Impl();
@@ -2038,7 +2030,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
{
if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat )
{
- DBG_ERROR( "SubBindings vor Aktivieren schon gesetzt!" );
+ DBG_ERROR( "SubBindings already set before activating!" );
pImp->pSubBindings->ENTERREGISTRATIONS();
}
LEAVEREGISTRATIONS();
@@ -2048,7 +2040,7 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
ENTERREGISTRATIONS();
if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat )
{
- DBG_ERROR( "SubBindings im Deaktivieren immer noch gesetzt!" );
+ DBG_ERROR( "SubBindings still set even when deactivating!" );
pImp->pSubBindings->LEAVEREGISTRATIONS();
}
}
@@ -2086,10 +2078,10 @@ void SfxBindings::StartUpdate_Impl( sal_Bool bComplete )
pImp->pSubBindings->StartUpdate_Impl( bComplete );
if ( !bComplete )
- // Update darf unterbrochen werden
+ // Update may be interrupted
NextJob_Impl(&pImp->aTimer);
else
- // alle Slots am St"uck updaten
+ // Update all slots in a row
NextJob_Impl(0);
}
@@ -2190,14 +2182,14 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
}
}
- // Dann am Dispatcher testen; da die von dort zur"uckgegebenen Items immer
- // DELETE_ON_IDLE sind, mu\s eine Kopie davon gezogen werden, um einen
- // Eigent"umer"ubergang zu erm"oglichen
+ // Then test at the dispatcher to check if the returned items from
+ // there are always DELETE_ON_IDLE, a copy of it has to be made in
+ // order to allow for transition of ownership.
const SfxPoolItem *pItem = NULL;
SfxItemState eState = pDispatcher->QueryState( nSlot, pItem );
if ( eState == SFX_ITEM_SET )
{
- DBG_ASSERT( pItem, "SFX_ITEM_SET aber kein Item!" );
+ DBG_ASSERT( pItem, "SFX_ITEM_SET but no item!" );
if ( pItem )
rpState = pItem->Clone();
}
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index 34de0d9..e5965d3 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -46,11 +46,11 @@ DBG_NAME(SfxControllerItem);
void SfxControllerItem::CheckConfigure_Impl( ULONG nType )
{
- // echter Slot? (also kein Separator etc.)
+ // Real Slot? (i.e. no Separator etc.)
if ( !nId )
return;
- // ist die Id "uberhaupt in 'nType' konfigurierbar?
+ // is the ID configurable at all in 'nType'?
const SfxSlot *pSlot = SFX_SLOTPOOL().GetSlot(nId);
DBG_ASSERTWARNING( pSlot, "SfxControllerItem: binding not existing slot" );
if ( pSlot && !pSlot->IsMode(nType) )
@@ -64,7 +64,6 @@ void SfxControllerItem::CheckConfigure_Impl( ULONG nType )
#endif
//--------------------------------------------------------------------
-
// returns the next registered SfxControllerItem with the same id
SfxControllerItem* SfxControllerItem::GetItemLink()
@@ -75,7 +74,6 @@ SfxControllerItem* SfxControllerItem::GetItemLink()
}
//--------------------------------------------------------------------
-
// returns TRUE if this binding is really bound to a function
BOOL SfxControllerItem::IsBound() const
@@ -86,23 +84,21 @@ BOOL SfxControllerItem::IsBound() const
}
//--------------------------------------------------------------------
-
// returns the associated function-id or 0 if none
// USHORT SfxControllerItem::GetId() const;
//====================================================================
-
// registeres with the id at the bindings
void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings || pBindinx, "Keine Bindings");
+ DBG_ASSERT(pBindings || pBindinx, "No Bindings");
if ( IsBound() ) {
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
pBindings->Release(*this);
}
@@ -118,10 +114,10 @@ void SfxControllerItem::BindInternal_Impl( USHORT nNewId, SfxBindings *pBindinx
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings || pBindinx, "Keine Bindings");
+ DBG_ASSERT(pBindings || pBindinx, "No Bindings");
if ( IsBound() ) {
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
pBindings->Release(*this);
}
@@ -138,14 +134,14 @@ void SfxControllerItem::BindInternal_Impl( USHORT nNewId, SfxBindings *pBindinx
void SfxControllerItem::UnBind()
-/* [Beschreibung]
-
- "ost die Verbindung dieses SfxControllerItems mit der SfxBindings-Instanz,
- an der es zur Zeit gebunden ist. Ab diesem Zeitpunkt erh"alt es keine
- Statusbenachrichtigungen (<SfxControllerItem::StateChented()>) mehr.
+/* [Description]
+ Unbinds the connection of this SfxControllerItems with the SfxBindings
+ instance with which it to time is bound. From this time on it does not
+ receive any status notifications (<SfxControllerItem::StateChented()>)
+ anymore.
- [Querverweise]
+ [Cross-reference]
<SfxControllerItem::ReBind()>
<SfxControllerItem::ClearCache()>
@@ -153,7 +149,7 @@ void SfxControllerItem::UnBind()
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
DBG_ASSERT( IsBound(), "unbindings unbound SfxControllerItem" );
pBindings->Release(*this);
@@ -164,14 +160,13 @@ void SfxControllerItem::UnBind()
void SfxControllerItem::ReBind()
-/* [Beschreibung]
-
- Binded dieses SfxControllerItem wieder an die SfxBindings-Instanz,
- an der es zuletzt gebunden war. Ab diesem Zeitpunkt erh"alt es wieder
- Statusbenachrichtigungen (<SfxControllerItem::StateChented()>).
+/* [Description]
+ Binds this SfxControllerItem with the SfxBindings instance again,
+ with which it was last bound. From this time on it does receive status
+ notifications (<SfxControllerItem::StateChented()>) again.
- [Querverweise]
+ [Cross-reference]
<SfxControllerItem::UnBind()>
<SfxControllerItem::ClearCache()>
@@ -180,7 +175,7 @@ void SfxControllerItem::ReBind()
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
DBG_ASSERT( !IsBound(), "bindings rebound SfxControllerItem" );
pBindings->Register(*this);
@@ -190,11 +185,11 @@ DBG_CHKTHIS(SfxControllerItem, 0);
void SfxControllerItem::UpdateSlot()
-/* [Beschreibung]
+/* [Description]
- Holt den Status 'hart' neu.
+ Get the Status again.
- [Querverweise]
+ [Cross-reference]
<SfxControllerItem::ClearCache()>
*/
@@ -211,24 +206,20 @@ void SfxControllerItem::UpdateSlot()
void SfxControllerItem::ClearCache()
-/* [Beschreibung]
-
- "oscht den Status-Cache f"ur dieses SfxControllerItem. D.h. beim
- n"achsten Status-Update wird das <SfxPoolItem> auf jeden Fall geschickt,
- auch wenn zuvor dasselbe geschickt wurde. Dies wird ben"otigt, wenn
- ein Controller umgeschaltet werden kann und sich diesen Status
- selbst merkt.
+/* [Description]
+ Clears the cache status for this SfxControllerItem. That is by the next
+ status update is the <SfxPoolItem> sent in any case, even if the same was
+ sent before. This is needed if a controller can be switched on and note
+ that status themselves.
- [Beispiel]
+ [Example]
- Der Kombi-Controller f"ur das Einstellen des Fl"achentyps und der
- konkreten Auspr"agung (Farbe blau oder Schraffur X) kann im Typ
- umgestellt werden, wird jedoch dann bei der n"achsten Selektion
- wieder benachrichtigt, auch wenn es dieselben Daten sind.
+ The combined controller for adjusting the surface type and the concrete
+ expression (blue color, or hatching X) can be changed in type, but is then
+ notified of the next selection again, even if it the same data.
-
- [Querverweise]
+ [Cross-reference]
<SfxControllerItem::UnBind()>
<SfxControllerItem::ReBind()>
@@ -238,13 +229,12 @@ void SfxControllerItem::ClearCache()
{
DBG_MEMTEST();
DBG_CHKTHIS(SfxControllerItem, 0);
- DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT(pBindings, "No Bindings");
pBindings->ClearCache_Impl( GetId() );
}
//--------------------------------------------------------------------
-
// replaces the successor in the list of bindings of the same id
SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLink )
@@ -257,7 +247,6 @@ SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLin
}
//--------------------------------------------------------------------
-
// changes the id of unbound functions (e.g. for sub-menu-ids)
void SfxControllerItem::SetId( USHORT nItemId )
@@ -270,7 +259,7 @@ void SfxControllerItem::SetId( USHORT nItemId )
//--------------------------------------------------------------------
-// creates a atomic item for a controller without registration
+// creates a atomic item for a controller without registration.
SfxControllerItem::SfxControllerItem():
nId(0),
@@ -282,7 +271,6 @@ SfxControllerItem::SfxControllerItem():
}
//--------------------------------------------------------------------
-
// creates a representation of the function nId and registeres it
SfxControllerItem::SfxControllerItem( USHORT nID, SfxBindings &rBindings ):
@@ -296,7 +284,6 @@ SfxControllerItem::SfxControllerItem( USHORT nID, SfxBindings &rBindings ):
}
//--------------------------------------------------------------------
-
// unregisteres the item in the bindings
SfxControllerItem::~SfxControllerItem()
@@ -311,27 +298,29 @@ SfxControllerItem::~SfxControllerItem()
void SfxControllerItem::StateChanged
(
- USHORT , // <SID> des ausl"osenden Slot
- SfxItemState , // <SfxItemState> von 'pState'
- const SfxPoolItem* // Slot-Status, ggf. 0 oder IsInvalidItem()
+ USHORT, // <SID> of the triggering slot
+ SfxItemState, // <SfxItemState> of 'pState'
+ const SfxPoolItem* // Slot-Status, NULL or IsInvalidItem()
)
-/* [Beschreibung]
+/* [Description]
- Diese virtuelle Methode wird vom SFx gerufen, um <SfxControllerItem>s
- dar"uber zu benachrichtigen, da\s sich der Status des Slots 'nSID'
- ge"andert hat. Der neue Wert sowie der von diesem Wert ermittelte
- Status wird als 'pState' bzw. 'eState' mitgegeben.
+ This virtual method is called by the SFx to inform the <SfxControllerItem>s
+ is about that state of the slots 'NSID' has changed. The new value and the
+ value determined by this status is given as 'pState' or 'eState'.
- Der Status eines Slots kann sich "andern, wenn z.B. das MDI-Fenster
- gewechselt wird oder der Slot explizit mit <SfxBindings::Invalidate()>
- invalidiert wurde.
+ The status of a slot may change, for example when the MDI window is
+ switched or when the slot was invalidated explicitly with
+ <SfxBindings::Invalidate()>.
Achtung! Die Methode wird nicht gerufen, wenn der Slot ung"ultig wurde,
danach jedoch wieder denselben Wert angenommen hat.
- Diese Basisklasse braucht nicht gerufen zu werden, weitere Zwischenstufen
- jedoch (z.B. <SfxToolboxControl>) sollten gerufen werden.
+ Beware! The method is not called when the slot is invalid, however
+ has again assumed the same value.
+
+ This base class need not be called, further interim steps however
+ (eg <SfxToolboxControl> ) should be called.
*/
{
@@ -351,9 +340,9 @@ void SfxControllerItem::DeleteFloatingWindow()
void SfxStatusForwarder::StateChanged
(
- USHORT nSID, // <SID> des ausl"osenden Slot
- SfxItemState eState, // <SfxItemState> von 'pState'
- const SfxPoolItem* pState // Slot-Status, ggf. 0 oder IsInvalidItem()
+ USHORT nSID, // <SID> of the triggering slot
+ SfxItemState eState, // <SfxItemState> of 'pState'
+ const SfxPoolItem* pState // Slot-Status, NULL or IsInvalidItem()
)
{
@@ -374,37 +363,35 @@ SfxStatusForwarder::SfxStatusForwarder(
SfxItemState SfxControllerItem::GetItemState
(
- const SfxPoolItem* pState /* Pointer auf das <SfxPoolItem>, dessen
- Status erfragt werden soll. */
+ const SfxPoolItem* pState /* Pointer to <SfxPoolItem>, which
+ Status should be queried. */
)
-/* [Beschreibung]
+/* [Description]
- Statische Methode zum Ermitteln des Status des SfxPoolItem-Pointers,
- in der Methode <SfxControllerItem::StateChanged(const SfxPoolItem*)>
- zu verwenden.
+ Static method to determine the status of the SfxPoolItem-Pointers, to be
+ used in the method <SfxControllerItem::StateChanged(const SfxPoolItem*)>
- [R"uckgabewert]
+ [Return value]
- SfxItemState SFX_ITEM_UNKNOWN
- Enabled, aber keine weitere Statusinformation
- verf"ugbar. Typisch f"ur <Slot>s, die allenfalls
- zeitweise disabled sind, aber ihre Darstellung sonst
- nicht "andern.
+ SfxItemState SFX_ITEM_UNKNOWN
+ Enabled, but no further status information available.
+ Typical for <Slot>s, which anyway are sometimes
+ disabled, but otherwise do not change their appearance.
SFX_ITEM_DISABLED
- Disabled und keine weiter Statusinformation
- verf"ugbar. Alle anderen ggf. angezeigten Werte sollten
- auf den Default zur"uckgesetzt werden.
+ Disabled and no further status information available.
+ All other values that may appear should be reset to
+ default.
SFX_ITEM_DONTCARE
- Enabled aber es waren nur uneindeutige Werte
- verf"ugbar (also keine, die abgefragt werden k"onnen).
+ Enabled but there were only ambiguous values available
+ (i.e. non that can be queried).
SFX_ITEM_AVAILABLE
- Enabled und mit verf"ugbarem Wert, der von 'pState'
- erfragbar ist. Der Typ ist dabei im gesamten
- Programm eindeutig und durch den Slot festgelegt.
+ Enabled and with available values, which are queried
+ by 'pState'. The Type is thus clearly defined in the
+ entire Program and specified through the Slot.
*/
{
@@ -421,10 +408,10 @@ SfxItemState SfxControllerItem::GetItemState
SfxMapUnit SfxControllerItem::GetCoreMetric() const
-/* [Beschreibung]
+/* [Description]
- Holt vom zust"andigen Pool die Ma\seinheit ab, in der das Status-Item
- vorliegt.
+ Gets the measurement unit from the competent pool, in which the Status
+ item exist.
*/
{
@@ -462,5 +449,4 @@ SfxMapUnit SfxControllerItem::GetCoreMetric() const
#pragma optimize("g",off)
#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 0ef73d9..6e7b7b8 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -41,7 +41,7 @@
#include <svtools/ttprops.hxx>
#include <stdio.h>
#include <stdarg.h>
-#include <stdlib.h> // wg. bsearch
+#include <stdlib.h> // due to bsearch
#define _SVSTDARR_ULONGS
#include <svl/svstdarr.hxx>
@@ -49,7 +49,7 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-// wg. nAutoPageID
+// due to nAutoPageID
#include "appdata.hxx"
#include "sfxhelp.hxx"
#include <sfx2/dispatch.hxx>
@@ -93,10 +93,10 @@ DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 );
struct SfxToDo_Impl
{
- SfxShell* pCluster;
- bool bPush;
- bool bDelete;
- bool bUntil;
+ SfxShell* pCluster;
+ bool bPush;
+ bool bDelete;
+ bool bUntil;
SfxToDo_Impl()
: pCluster(0)
@@ -121,10 +121,10 @@ IMPL_OBJSTACK(SfxToDoStack_Impl, SfxToDo_Impl);
struct SfxObjectBars_Impl
{
- sal_uInt32 nResId; // Resource - und ConfigId der Toolbox
- sal_uInt16 nMode; // spezielle Sichtbarkeitsflags
- String aName;
- SfxInterface* pIFace;
+ sal_uInt32 nResId; // Resource - and ConfigId of the Toolbox
+ sal_uInt16 nMode; // special visibility flags
+ String aName;
+ SfxInterface* pIFace;
SfxObjectBars_Impl() :
nResId( 0 )
@@ -135,42 +135,43 @@ struct SfxObjectBars_Impl
struct SfxDispatcher_Impl
{
- SfxRequestPtrArray aReqArr;
- const SfxSlotServer* pCachedServ1; // zuletzt gerufene Message
- const SfxSlotServer* pCachedServ2; // vorletzt gerufene Message
- SfxShellStack_Impl aStack; // aktive Funktionalitaet
- Timer aTimer; // fuers flushen
- SfxToDoStack_Impl aToDoStack; // nicht abgearb. Push/Pop
- SfxViewFrame* pFrame; // 0 oder zugeh"or. Frame
- SfxDispatcher* pParent; // z.B. AppDispatcher, ggf. 0
- SfxHintPosterRef xPoster; // asynchrones Execute
- sal_Bool bFlushing; // sal_True waehrend Flush //?
- sal_Bool bUpdated; // Update_Impl gelaufen
- sal_Bool bLocked; // kein Execute
- sal_Bool bInvalidateOnUnlock;// da fragte jemand
- sal_Bool bActive; // nicht verwechseln mit gesetzt!
- sal_Bool* pInCallAliveFlag; // dem Stack den Dtor anzeigen
- SfxObjectBars_Impl aObjBars[SFX_OBJECTBAR_MAX];
- SfxObjectBars_Impl aFixedObjBars[SFX_OBJECTBAR_MAX];
- SvULongs aChildWins;
- sal_uInt16 nActionLevel; // in EnterAction
- sal_uInt32 nEventId; // EventId UserEvent
- sal_Bool bUILocked; // Update abgeklemmt (!zappeln)
- sal_Bool bNoUI; // UI nur vom Parent Dispatcher
- sal_Bool bReadOnly; // Dokument ist ReadOnly
- sal_Bool bQuiet; // nur parent dispatcher verwenden
- sal_Bool bModal; // nur Slots vom Parent-Dispatcher
-
- sal_Bool bFilterEnabling; // sal_True=filter enabled slots, 2==ReadOnlyDoc uebersteuert
- sal_uInt16 nFilterCount; // Anzahl der SIDs in pFilterSIDs
- const sal_uInt16* pFilterSIDs; // sortiertes Array von SIDs
- sal_uInt16 nStandardMode; // ExecuteMode f. PlugInDispatcher
- SvUShorts* pDisableList;
- sal_uInt32 nDisableFlags;
+ SfxRequestPtrArray aReqArr;
+ const SfxSlotServer* pCachedServ1; // last called message
+ const SfxSlotServer* pCachedServ2; // penultimate called Message
+ SfxShellStack_Impl aStack; // active functionality
+ Timer aTimer; // for Flush
+ SfxToDoStack_Impl aToDoStack; // not processed Push/Pop
+ SfxViewFrame* pFrame; // NULL or associated Frame
+ SfxDispatcher* pParent; // AppDispatcher, NULL if possible
+ SfxHintPosterRef xPoster; // Execute asynchronous
+ sal_Bool bFlushing; // sal_True during Flush //?
+ sal_Bool bUpdated; // Update_Impl has run
+ sal_Bool bLocked; // No Execute
+ sal_Bool bInvalidateOnUnlock; // because someone asked
+ sal_Bool bActive; // not to be confused with set!
+ sal_Bool* pInCallAliveFlag; // view the Destructor Stack
+ SfxObjectBars_Impl aObjBars[SFX_OBJECTBAR_MAX];
+ SfxObjectBars_Impl aFixedObjBars[SFX_OBJECTBAR_MAX];
+ SvULongs aChildWins;
+ sal_uInt16 nActionLevel; // in EnterAction
+ sal_uInt32 nEventId; // EventId UserEvent
+ sal_Bool bUILocked; // Update disconnected (no flicker)
+ sal_Bool bNoUI; // UI only from Parent Dispatcher
+ sal_Bool bReadOnly; // Document is ReadOnly
+ sal_Bool bQuiet; // Only use parent dispatcher
+ sal_Bool bModal; // Only slots from parent dispatcher
+
+ sal_Bool bFilterEnabling; // sal_True=filter enabled slots,
+ // 2==ReadOnlyDoc overturned
+ sal_uInt16 nFilterCount; // Number of SIDs in pFilterSIDs
+ const sal_uInt16* pFilterSIDs; // sorted Array of SIDs
+ sal_uInt16 nStandardMode; // ExecuteMode from PlugInDispatcher
+ SvUShorts* pDisableList;
+ sal_uInt32 nDisableFlags;
};
-#define NO_OBJECTBAR 0
-#define OWN_OBJECTBAR 1
+#define NO_OBJECTBAR 0
+#define OWN_OBJECTBAR 1
#define OTHER_OBJECTBAR 2
//------------------------------------------------------------------
@@ -180,18 +181,17 @@ struct SfxDispatcher_Impl
//====================================================================
sal_Bool SfxDispatcher::IsLocked( sal_uInt16 ) const
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann festgestellt werden, ob der SfxDispatcher
- gesperrt oder freigegeben ist. Ein gesperrter SfxDispatcher
- f"uhrt keine <SfxRequest>s mehr aus und liefert keine
- Status-Informationen mehr. Er verh"alt sich so als w"aren alle
- Slots disabled.
+ With this method it can be determined whether the SfxDispatcher is
+ locked or unlocked. A locked SfxDispatcher does not perform <SfxRequest>s
+ and no longer provides any status information. It behaves as if all the
+ slots are disabled.
- Der Dispatcher gilt auch als gesperrt, wenn alle Dispatcher
- gelockt sind (<SfxApplication::LockDispatcher()>) oder der zugeh"orige
- Top-Frame im modal-mode ist und der angegebene Slot Frame-spezifisch
- (also nicht von der Application) bedient wird.
+ The dispatcher is also marked as blocked, if all Dispatcher are locked
+ (<SfxApplication::LockDispatcher()>) or the associated top frame is in the
+ modal-mode and if the specified slot are handled as frame-specific
+ (ie, not served by the application).
*/
{
@@ -201,19 +201,15 @@ sal_Bool SfxDispatcher::IsLocked( sal_uInt16 ) const
//--------------------------------------------------------------------
sal_Bool SfxDispatcher::IsAppDispatcher() const
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode l"a\st sich festellen, ob der SfxDispacher der
- Applikations-Dispatcher ist.
+ With this method it can be determined if the SfxDispacher is the
+ applications dispatcher.
+ [Return value]
- [R"uckgabewert]
-
- sal_Bool sal_True
- Es ist der Applikations-Dispatcher.
-
- sal_False
- Es ist ein Dispatcher eines SfxViewFrame.
+ sal_Bool sal_True it is the application dispatcher.
+ sal_Fals it is a SfxViewFrame dispatcher.
*/
{
@@ -223,21 +219,21 @@ sal_Bool SfxDispatcher::IsAppDispatcher() const
//--------------------------------------------------------------------
int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, sal_Bool bRecord )
-/* [Beschreibung]
+/* [Description]
- Hilfsfunktion zum pr"ufen, ob ein Slot executed werden darf und
- der Execution selbst.
+ Helper function to check whether a slot can be executed and
+ check the execution itself
*/
{
SFX_STACK(SfxDispatcher::Call_Impl);
- // darf der Slot gerufen werden (i.S.v. enabled)
+ // The slot may be called (meaning enabled)
if ( rSlot.IsMode(SFX_SLOT_FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) )
{
if ( GetFrame() )
{
- // ggf. Recording anwerfen
+ // Recording may start
com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
GetFrame()->GetFrame().GetFrameInterface(),
com::sun::star::uno::UNO_QUERY);
@@ -259,14 +255,13 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
rReq.Record_Impl( rShell, rSlot, xRecorder, GetFrame() );
}
}
-
- // Alles holen, was gebraucht wird, da der Slot den Execute evtl. nicht
- // "uberlebt, falls es ein 'Pseudoslot' f"ur Macros oder Verben ist
+ // Get all that is needed, because the slot may not have survived the
+ // Execute if it is a 'pseudo slot' for macros or verbs.
sal_Bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE);
- // API-Call-Klammerung und Document-Lock w"ahrend des Calls
+ // API-call parentheses and document-lock during the calls
{
- // 'this' mu\s im Dtor bescheid sagen
+ // 'this' must respond in the Destructor
sal_Bool bThisDispatcherAlive = sal_True;
sal_Bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag;
pImp->pInCallAliveFlag = &bThisDispatcherAlive;
@@ -280,14 +275,14 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
SfxExecFunc pFunc = rSlot.GetExecFnc();
rShell.CallExec( pFunc, rReq );
- // falls 'this' noch lebt
+ // If 'this' is still alive
if ( bThisDispatcherAlive )
pImp->pInCallAliveFlag = pOldInCallAliveFlag;
else
{
if ( pOldInCallAliveFlag )
{
- // auch verschachtelte Stack-Frames sch"utzen
+ // also protect nested stack frames
*pOldInCallAliveFlag = sal_False;
}
@@ -300,14 +295,14 @@ int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest
{
SfxBindings *pBindings = GetBindings();
- // bei AutoUpdate sofort updaten; "Pseudoslots" d"urfen nicht
- // Autoupdate sein!
+ // When AutoUpdate update immediately; "Pseudoslots" must not be
+ // Autoupdate!
if ( bAutoUpdate && pBindings )
{
const SfxSlot* pSlave = rSlot.GetLinkedSlot();
if (pSlave)
{
- // bei Enum-Slots irgendeinen gebundenen Slave-Slot nehmen
+ // When enum slots take any bound slave slot
while (!pBindings->IsBound(pSlave->GetSlotId()) && pSlave != &rSlot )
pSlave = pSlave->GetLinkedSlot();
pBindings->Invalidate(pSlave->GetSlotId());
@@ -378,11 +373,10 @@ SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent )
SfxDispatcher::SfxDispatcher( SfxViewFrame *pViewFrame )
-/* [Beschreibung]
+/* [Description]
- Der Konstruktor der Klasse SfxDispatcher legt einen leeren Stack
- von <SfxShell>-Pointern an. Er ist initial nicht gelockt und gilt als
- geflusht.
+ The constructor of the SfxDispatcher class places a stack of empty
+ <SfxShell> pointers. It is not initially locked and is considered flushed.
*/
{
@@ -402,11 +396,11 @@ SfxDispatcher::SfxDispatcher( SfxViewFrame *pViewFrame )
//====================================================================
SfxDispatcher::~SfxDispatcher()
-/* [Beschreibung]
+/* [Description]
- Der Destruktor der Klasse SfxDispatcher darf nicht gerufen werden,
- wenn die SfxDispatcher-Instanz aktiv ist. Es d"urfen sich allerdings
- noch <SfxShell>-Pointer auf dem Stack befinden.
+ The destructor of the SfxDispatcher class should not be called when the
+ SfxDispatcher instance is active. It may, however, still be a <SfxShell>
+ pointer on the stack.
*/
{
@@ -417,27 +411,26 @@ SfxDispatcher::~SfxDispatcher()
DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" );
#endif
- // Damit in LeaveRegistrations kein Timer per Reschedule in PlugComm
- // zuschlaegt
+ // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations
pImp->aTimer.Stop();
pImp->xPoster->SetEventHdl( Link() );
- // die Stack-Varialblem in Call_Impl benachrichtigen
+ // Notify the stack varialbles in Call_Impl
if ( pImp->pInCallAliveFlag )
*pImp->pInCallAliveFlag = sal_False;
- // Bindings und App besorgen
+ // Get bindings and application
SfxApplication *pSfxApp = SFX_APP();
SfxBindings* pBindings = GetBindings();
-// if (pImp->nEventId)
-// pSfxApp->RemoveEventHdl(pImp->nEventId);
+// if (pImp->nEventId)
+// pSfxApp->RemoveEventHdl(pImp->nEventId);
- // wenn noch nicht flushed, die Bindings wiederbeleben
+ // When not flushed, revive the bindings
if ( pBindings && !pSfxApp->IsDowning() && !bFlushed )
pBindings->DLEAVEREGISTRATIONS();
- // ggf. bei den Bindings abmelden
+ // may unregister the bindings
while ( pBindings )
{
if ( pBindings->GetDispatcher_Impl() == this)
@@ -451,27 +444,27 @@ SfxDispatcher::~SfxDispatcher()
//====================================================================
void SfxDispatcher::Pop
(
- SfxShell& rShell, /* Die vom Stack zu nehmende SfxShell-Instanz. */
-
- sal_uInt16 nMode /* SFX_SHELL_POP_UNTIL
- Es werden auch alle "uber 'rShell' liegenenden
- SfxShell's vom Stack genommen.
-
- SFX_SHELL_POP_DELETE
- Alle tats"achlich vom Stack genommenen
- SfxShells werden gel"oscht.
-
- SFX_SHELL_PUSH (InPlace use only)
- Die Shell wird gepusht. */
+ SfxShell& rShell, /* the stack to take the SfxShell instance. */
+
+ sal_uInt16 nMode /* SFX_SHELL_POP_UNTIL
+ Also all 'rShell' of SfxShells are taken from the
+ stack.
+
+ SFX_SHELL_POP_DELETE
+ All SfxShells actually taken from the stack
+ will be deleted.
+
+ SFX_SHELL_PUSH (InPlace use only)
+ The Shell is pushed. */
)
-/* [Beschreibung]
-
- Mit dieser Methode wird eine oder mehrere <SfxShell> vom SfxDispatcher
- gepoppt. Die SfxShell wird zun"achst zum poppen vermerkt und
- es wird ein Timer aufgesetzt. Erst bei Ablauf des Timers wird
- tats"achlich gepoppt (<SfxDispatcher::Flush()>) und die <SfxBindings>
- werden invalidiert. W"ahrend der Timer l"auft gleichen sich
- entgegengesetzte Push und Pop Befehle mit derselben SfxShell aus.
+/* [Description]
+
+ With this method, one or more <SfxShell> are poped from the SfxDispatcher.
+ The SfxShell is marked for popping and a timer is set up. Only when the
+ timer has reached the end, the pop is actually performed
+ ( <SfxDispatcher::Flush()> ) and the <SfxBindings> is invalidated.
+ While the timer is running the opposing push and pop commands on one
+ SfxShell cancel each other out.
*/
{
@@ -479,8 +472,8 @@ void SfxDispatcher::Pop
DBG_ASSERT( rShell.GetInterface(),
"pushing SfxShell without previous RegisterInterface()" );
DBG_ASSERT( pImp->nActionLevel == 0, "Push or Pop within Action" );
-// DBG_ASSERT( SFX_APP()->IsInAsynchronCall_Impl(),
-// "Dispatcher Push/Pop in synchron-call-stack" );
+// DBG_ASSERT( SFX_APP()->IsInAsynchronCall_Impl(),
+// "Dispatcher Push/Pop in synchron-call-stack" );
bool bDelete = (nMode & SFX_SHELL_POP_DELETE) == SFX_SHELL_POP_DELETE;
bool bUntil = (nMode & SFX_SHELL_POP_UNTIL) == SFX_SHELL_POP_UNTIL;
@@ -501,10 +494,10 @@ void SfxDispatcher::Pop
DbgTrace( aMsg.GetBuffer() );
#endif
- // gleiche Shell wie on-Top des ToDo-Stacks?
+ // same shell as on top of the to-do stack?
if ( pImp->aToDoStack.Count() && pImp->aToDoStack.Top().pCluster == &rShell )
{
- // inverse Actions heben sich auf
+ // cancel inverse actions
if ( pImp->aToDoStack.Top().bPush != bPush )
pImp->aToDoStack.Pop();
else
@@ -515,7 +508,7 @@ void SfxDispatcher::Pop
}
else
{
- // ::com::sun::star::chaos::Action merken
+ // Remember ::com::sun::star::chaos::Action
pImp->aToDoStack.Push( SfxToDo_Impl(bPush, bDelete, bUntil, rShell) );
if ( bFlushed )
{
@@ -523,7 +516,7 @@ void SfxDispatcher::Pop
bFlushed = sal_False;
pImp->bUpdated = sal_False;
- // Bindings schlafen legen
+ // Put bindings to sleep
SfxBindings* pBindings = GetBindings();
if ( pBindings )
pBindings->DENTERREGISTRATIONS();
@@ -533,29 +526,28 @@ void SfxDispatcher::Pop
if ( !pSfxApp->IsDowning() && pImp->aToDoStack.Count() )
{
//! if (SFX_APP()->AnyInput(INPUT_KEYBOARD | INPUT_MOUSE) )
- //! AnyInput haut nicht hin; hier muss noch ein Kriterium gefunden
- //! werden. Solange wieder immer mit Timer.
-
+ //! AnyInput does not work, here a criterion has yet to found.
+ //! As long as time after time with a timer.
if (sal_True)
{
- // Kein sofortiges Update gewuenscht
+ // No immediate update is requested
pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT);
pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
pImp->aTimer.Start();
}
else
{
- // Schnellstmoegliches Update (sollte Normalfall sein)
+ // Upgrade as quickly as possible(should be the normal case)
pImp->aTimer.Stop();
GetpApp()->PostUserEvent(pImp->nEventId, (void*)0);
}
}
else
{
- // doch nichts zu tun
+ // but to do nothing
pImp->aTimer.Stop();
- // ggf. Bindings wieder aufwecken
+ // Bindings may wake up again
if ( !pImp->aToDoStack.Count() )
{
SfxBindings* pBindings = GetBindings();
@@ -569,13 +561,13 @@ void SfxDispatcher::Pop
IMPL_LINK_INLINE_START( SfxDispatcher, EventHdl_Impl, void *, pvoid )
-/* [Beschreibung]
+/* [Description]
- Dieser Handler wird nach <SfxDispatcher::Invalidate()> oder Bewegungen
- auf dem Stack (<SfxDispatcher::Push()> und <SfxDispatcher::Pop()) gerufen.
+ This handler is called after <SfxDispatcher::Invalidate()> or after
+ changes on the stack (<SfxDispatcher::Push()> and <SfxDispatcher::Pop())
- Er flusht den Stack, falls er dirty ist, f"uhrt also die ausstehenden
- Push und Pop Befehle tats"achlich aus.
+ It flushes the Stack, if it is dirty, thus it actually excecutes the
+ pending Push and Pop commands.
*/
{
@@ -594,14 +586,14 @@ IMPL_LINK_INLINE_END( SfxDispatcher, EventHdl_Impl, void *, pvoid )
//--------------------------------------------------------------------
sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, sal_Bool bDeep )
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann gepr"uft werden, ob sich die <SfxShell> rShell
- auf dem Stack befindet, wenn er geflusht w"are. Dabei wird der
- SfxDispatcher jedoch nicht tats"achlich geflusht.
+ With this method it can be tested whether the <SfxShell> rShell is on the
+ stack, when it was flushed. This way the SfxDispatcher is not actually
+ flushed.
- Diese Methode ist u.a. dazu gedacht, Assertions zu erm"oglichen, ohne
- als Seiteneffekt den SfxDispathcer flushen zu m"ussen.
+ This method is intended among other things to make assertions possible
+ without the side effect of having to flush the SfxDispathcer.
*/
{
@@ -638,21 +630,19 @@ sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, sal_Bool bDee
//--------------------------------------------------------------------
sal_uInt16 SfxDispatcher::GetShellLevel( const SfxShell& rShell )
-/* [Beschreibung]
+/* [Description]
- Ermittelt die Position einer SfxShell im Stack des Dispatchers.
- Dazu wird dieser ggf. zuvor geflusht.
+ Determines the position of a given SfxShell in the stack of the dispatcher.
+ If possible this is flushed before.
+ [Return value]
- [Rueckgabewert]
-
- sal_uInt16 == USRT_MAX
- Die SfxShell befindet sich nicht auf
- diesem SfxDispatcher.
+ sal_uInt16 == USRT_MAX
+ The SfxShell is not on this SfxDispatcher.
< USHRT_MAX
- Position der SfxShell auf dem Dispatcher
- von oben mit 0 beginnend gez"ahlt.
+ Position of the SfxShell on the Dispatcher
+ from the top count stating with 0.
*/
{
@@ -677,14 +667,14 @@ sal_uInt16 SfxDispatcher::GetShellLevel( const SfxShell& rShell )
//--------------------------------------------------------------------
SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const
-/* [Beschreibung]
+/* [Description]
- Liefert einen Pointer auf die <SfxShell>, welche sich an der Position
- nIdx (von oben, letzt-gepushte liegt bei 0) auf dem Stack befindet.
+ Returns a pointer to the <SfxShell> which is at the position nIdx
+ (from the top, last pushed is 0) on the stack.
- Dabei wird der SfxDispatcher nicht geflusht.
+ Thus the SfxDispatcher is not flushed.
- Ist der Stack nicht tief genug, wird ein 0-Pointer zur"uckgegeben.
+ Is the stack not deep enough a NULL-Pointer is returned.
*/
{
@@ -694,22 +684,22 @@ SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const
if ( nIdx < nShellCount )
return pImp->aStack.Top(nIdx);
else if ( pImp->pParent )
- return pImp->pParent->GetShell( nIdx - nShellCount );
+ return pImp->pParent->GetShell( nIdx - nShellCount );
return 0;
}
//--------------------------------------------------------------------
SfxBindings* SfxDispatcher::GetBindings() const
-/* [Beschreibung]
+/* [Description]
- Diese Methode liefert einen Pointer auf die <SfxBindings> Instanz
- zur"uck, an die der SfxDispatcher gerade gebunden ist. Ein SfxDispatcher
- ist nur dann an SfxBindings gebunden, wenn er <UI-aktiv> ist. Ist
- er nicht UI-aktiv, wird ein 0-Pointer zur"uckgegeben.
+ This method returns a pointer to the <SfxBinding> Instance on which the
+ SfxDispatcher is curretly bound. A SfxDispatcher is only bound to
+ the SfxBindings when it is <UI-aktiv>. If it is not UI-active,
+ a NULL-pointer is returned.
- Der zur"uckgegebene Pointer ist nur im <unmittelbaren Kontext> des
- Methodenaufrufs g"ultig.
+ The returned pointer is only valid in the immediate context of the method
+ call.
*/
{
@@ -722,11 +712,11 @@ SfxBindings* SfxDispatcher::GetBindings() const
//--------------------------------------------------------------------
SfxViewFrame* SfxDispatcher::GetFrame() const
-/* [Beschreibung]
+/* [Description]
- Liefert einen Pointer auf die <SfxViewFrame> Instanz, der dieser
- SfxDispatcher geh"ort. Falls es sich um den Applikations-Dispatcher
- handelt, wird ein 0-Pointer zur"uckgegeben.
+ Returns a pointer to the <SfxViewFrame> instance, which belongs to
+ this SfxDispatcher. If it is about the application dispatcher,
+ a NULL-pointer is returned.
*/
{
@@ -737,18 +727,18 @@ SfxViewFrame* SfxDispatcher::GetFrame() const
//--------------------------------------------------------------------
void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
-/* [Beschreibung]
+/* [Description]
- Diese Methode steuert das Aktivieren eines Dispatchers.
+ This method controls the activation of a dispatcher.
- Da der Applikations-Dispatcher immer aktiv ist, entweder als
- Unterdispatcher des <SfxViewFrame>-Dispatchers oder selbst, wird
- er nie als ganzes Aktiviert, sondern nur seine einzelnen <SfxShell>s
- bei <SfxDispatcher::Push(SfxShell&)>.
+ Since the application dispatcher is always active, either as a sub
+ dispatcher of the <SfxViewFrame> dispatcher or as itself, it is never
+ activated as a whole, instead only its individual <SfxShell>s at
+ <SfxDispatcher::Push(SfxShell&)>.
- Beim Aktivieren eines SfxDispatchers wird an allen auf seinem
- Stack befindlichen SfxShells, beginnend mit der untersten, der Handler
- <SfxShell::Activate(sal_Bool)> gerufen.
+ When activating a SfxDispatcher all of the SfxShells located on its stack
+ are called with the handler <SfxShell::Activate(sal_Bool)>, starting with
+ the lowest.
*/
{
@@ -760,7 +750,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
ByteString sTemp("Activate Dispatcher ");
sTemp += ByteString::CreateFromInt64( (sal_uIntPtr) this );
DBG_TRACE(sTemp.GetBuffer());
- DBG_ASSERT( !pImp->bActive, "Activate-Fehler" );
+ DBG_ASSERT( !pImp->bActive, "Activation error" );
#endif
pImp->bActive = sal_True;
pImp->bUpdated = sal_False;
@@ -803,14 +793,14 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
{
if (sal_True)
{
- // Kein sofortiges Update gewuenscht
+ // No immediate update is requested
pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT);
pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
pImp->aTimer.Start();
}
else
{
- // Schnellstmoegliches Update (sollte Normalfall sein)
+ // Upgrade as quickly as possible(should be the normal case)
pImp->aTimer.Stop();
GetpApp()->PostUserEvent(pImp->nEventId, (void*)0);
}
@@ -826,18 +816,18 @@ void SfxDispatcher::DoParentActivate_Impl()
//--------------------------------------------------------------------
void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
-/* [Beschreibung]
+/* [Description]
- Diese Methode steuert das Deaktivieren eines Dispatchers.
+ This method controls the deactivation of a dispatcher.
- Da der Applikations-Dispatcher immer aktiv ist, entweder als
- Unterdispatcher des <SfxViewFrame>-Dispatchers oder selbst, wird
- er nie als ganzes Deaktiviert, sondern nur seine einzelnen <SfxShell>s
- bei <SfxDispatcher::Pop(SfxShell&)>.
+ Since the application dispatcher is always active, either as a sub
+ dispatcher of the <SfxViewFrame> dispatcher or as itself, it is never
+ deactivated as a whole, instead only its individual <SfxShell>s at
+ <SfxDispatcher::Pop(SfxShell&)>.
- Beim Deaktivieren eines SfxDispatchers wird an allen auf seinem
- Stack befindlichen SfxShells, beginnend mit der obersten, der Handler
- <SfxShell::Deactivate(sal_Bool)> gerufen.
+ When deactivating a SfxDispatcher all of the SfxShells located on its stack
+ are called with the handler <SfxShell::Deactivate(sal_Bool)>, starting with
+ the lowest.
*/
{
@@ -849,7 +839,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( bMDI )
{
DBG_TRACE(ByteString("Deactivate Dispatcher ").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer());
- DBG_ASSERT( pImp->bActive, "Deactivate-Fehler" );
+ DBG_ASSERT( pImp->bActive, "Deactivate error" );
pImp->bActive = sal_False;
if ( pImp->pFrame && !(pImp->pFrame->GetObjectShell()->IsInPlaceActive() ) )
@@ -916,30 +906,28 @@ void SfxDispatcher::DoParentDeactivate_Impl()
//--------------------------------------------------------------------
int SfxDispatcher::GetShellAndSlot_Impl
(
- sal_uInt16 nSlot, // die zu suchende Slot-Id
- SfxShell** ppShell, // die SfxShell, welche nSlot z.Zt. bedient
- const SfxSlot** ppSlot, // der SfxSlot, welcher nSlot z.Zt. bedient
- sal_Bool bOwnShellsOnly,
- sal_Bool bModal, // trotz ModalMode
- sal_Bool bRealSlot
+ sal_uInt16 nSlot, // the searchable Slot-Id
+ SfxShell** ppShell, // the SfxShell, which are currently handled
+ // the nSlot
+ const SfxSlot** ppSlot, // the SfxSlot, which are currently handled
+ // the nSlot
+ sal_Bool bOwnShellsOnly,
+ sal_Bool bModal, // ModalMode
+ sal_Bool bRealSlot
)
-/* [Beschreibung]
-
- Diese Methode sucht im SfxDispatcher nach der <SfxShell>, von der
- die Slot-Id nSlot zur Zeit bedient wird. Dazu wird der Dispatcher
- zuvor geflusht.
+/* [Description]
+ This method searches in SfxDispatcher after <SfxShell> , from the Slot Id
+ nSlot currently being handled. For this, the dispatcher is first flushed.
- [R"uckgabewert]
+ [Return value]
- int sal_True
- Die SfxShell wurde gefunden, ppShell und ppSlot
- sind g"ultig.
+ int sal_True
+ The SfxShell was found, ppShell and ppSlot are valid.
- sal_True
- Die SfxShell wurde nicht gefunden, ppShell und ppSlot
- sind ung"ultig.
+ sal_False
+ The SfxShell was not found, ppShell and ppSlot are invalid.
*/
{
@@ -999,16 +987,17 @@ struct Executer : public SfxHint
//--------------------------------------------------------------------
void SfxDispatcher::_Execute
(
- SfxShell& rShell, // zu rufende <SfxShell>
- const SfxSlot& rSlot, // zu rufender <SfxSlot>
- SfxRequest& rReq, // auszuf"uhrende Funktion (Id und optional Parameter)
- SfxCallMode eCallMode // synchron, asynchron oder wie beim Slot angegeben
+ SfxShell& rShell, // to the calling <SfxShell>
+ const SfxSlot& rSlot, // to the calling <SfxSlot>
+ SfxRequest& rReq, // function to be performed
+ // (Id and optional parameters)
+ SfxCallMode eCallMode // Synchronously, asynchronously or as shown in
+ // the slot
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode f"uhrt einen Request "uber einen gecachten <Slot-Server>
- aus.
+ This method performs a request for a cached <Slot-Server>.
*/
{
@@ -1053,14 +1042,14 @@ void SfxDispatcher::_Execute
//--------------------------------------------------------------------
void MappedPut_Impl( SfxAllItemSet &rSet, const SfxPoolItem &rItem )
-/* [Beschreibung]
+/* [Description]
- Hilfsfunktion zum putten von rItem unter der im Pool des Item-Sets
- rSet geltenden Which-Id.
+ Helper function to put from rItem below the Which-ID in the pool of the
+ Item Sets rSet.
*/
{
- // mit ggf. gemappter Which-Id putten
+ // Put with mapped Which-Id if possible
const SfxItemPool *pPool = rSet.GetPool();
sal_uInt16 nWhich = rItem.Which();
#ifdef TF_POOLABLE
@@ -1084,7 +1073,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs
if ( !nMode )
nMode = pImp->nStandardMode;
- // via Bindings/Interceptor? (dann ist der Returnwert nicht exakt)
+ // through Bindings/Interceptor? (then the return value is not exact)
sal_Bool bViaBindings = SFX_USE_BINDINGS == ( nMode & SFX_USE_BINDINGS );
nMode &= ~sal_uInt16(SFX_USE_BINDINGS);
if ( bViaBindings && GetBindings() )
@@ -1092,7 +1081,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs
? EXECUTE_POSSIBLE
: EXECUTE_NO;
- // sonst via Dispatcher
+ // otherwise through the Dispatcher
if ( IsLocked(nSlot) )
return 0;
SfxShell *pShell = 0;
@@ -1101,7 +1090,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, sal_False ) )
{
- // Ausf"uhrbarkeit vorher testen
+ // Feasibility test before
if ( pSlot->IsMode( SFX_SLOT_FASTCALL ) ||
pShell->CanExecuteSlot_Impl( *pSlot ) )
nRet = EXECUTE_POSSIBLE;
@@ -1138,7 +1127,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet& r
/*
// at the moment not implemented
- // via Bindings/Interceptor? (dann ist der Returnwert nicht exakt)
+ // through Bindings/Interceptor? (then the return value is not exact)
sal_Bool bViaBindings = SFX_USE_BINDINGS == ( nMode & SFX_USE_BINDINGS );
nMode &= ~sal_uInt16(SFX_USE_BINDINGS);
if ( bViaBindings && GetBindings() )
@@ -1146,7 +1135,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet& r
? EXECUTE_POSSIBLE
: EXECUTE_NO;
*/
- // sonst via Dispatcher
+ // otherwise through the Dispatcher
if ( IsLocked(nSlot) )
return 0;
SfxShell *pShell = 0;
@@ -1155,7 +1144,7 @@ sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, const SfxItemSet& r
const SfxSlot *pSlot = 0;
if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, sal_False ) )
{
- // Ausf"uhrbarkeit vorher testen
+ // Feasibility test before
if ( pSlot->IsMode( SFX_SLOT_FASTCALL ) ||
pShell->CanExecuteSlot_Impl( *pSlot ) )
nRet = EXECUTE_POSSIBLE;
@@ -1183,7 +1172,7 @@ sal_uInt16 SfxDispatcher::GetSlotId( const String& rCommand )
const SfxSlot* SfxDispatcher::GetSlot( const String& rCommand )
{
- // Anzahl der Shells auf den verkettenten Dispatchern z"ahlen
+ // Count the number of Shells on the linked Dispatcher
Flush();
sal_uInt16 nTotCount = pImp->aStack.Count();
if ( pImp->pParent )
@@ -1315,27 +1304,26 @@ const SfxPoolItem* SfxDispatcher::Execute(
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute
(
- sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
- SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
- const SfxPoolItem **pArgs, // 0-terminiertes C-Array von Parametern
+ sal_uInt16 nSlot, // the Id of the executing function
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON
+ // or ..._SLOT
+ const SfxPoolItem **pArgs, // Zero teminated C-Array of Parameters
sal_uInt16 nModi,
- const SfxPoolItem **pInternalArgs // 0-terminiertes C-Array von Parametern
+ const SfxPoolItem **pInternalArgs // Zero terminated C-Array of Parameters
)
-/* [Beschreibung]
+/* [Description]
- Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+ Method to excecute a <SfxSlot>s over the Slot-Id.
+ [Return value]
- [R"uckgabewert]
+ const SfxPoolItem* Pointer to the SfxPoolItem valid to the next run
+ though the Message-Loop, which contains the return
+ value.
- const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
- der Message-Loop g"ultiges SfxPoolItem,
- welches den R"uckgabewert enth"alt.
-
- Oder ein 0-Pointer, wenn die Funktion nicht
- ausgef"uhrt wurde (z.B. Abbruch durch den
- Benutzer).
+ Or a NULL-Pointer, when the function was not
+ executed (for example canceled by the user).
*/
{
@@ -1375,25 +1363,23 @@ const SfxPoolItem* SfxDispatcher::Execute
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute
(
- sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
- SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
- const SfxItemSet &rArgs // <SfxItemSet> mit Parametern
+ sal_uInt16 nSlot, // the Id of the executing function
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or ..._SLOT
+ const SfxItemSet &rArgs // <SfxItemSet> with the parameters
)
-/* [Beschreibung]
-
- Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+/* [Description]
+ Method to excecute a <SfxSlot>s over the Slot-Id.
- [R"uckgabewert]
+ [Return value]
- const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
- der Message-Loop g"ultiges SfxPoolItem,
- welches den R"uckgabewert enth"alt.
+ const SfxPoolItem* Pointer to the SfxPoolItem valid to the next run
+ though the Message-Loop, which contains the return
+ value.
- Oder ein 0-Pointer, wenn die Funktion nicht
- ausgef"uhrt wurde (z.B. Abbruch durch den
- Benutzer).
+ Or a NULL-Pointer, when the function was not
+ executed (for example canceled by the user).
*/
{
@@ -1434,26 +1420,25 @@ const SfxPoolItem* SfxDispatcher::Execute
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::_Execute
(
- sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
- SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
- va_list pVarArgs, // Parameterliste ab 2. Parameter
- const SfxPoolItem* pArg1 // erster Parameter
+ sal_uInt16 nSlot, // the Id of the executing function
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or
+ //..._SLOT
+ va_list pVarArgs, // Parameter list from the 2nd parameter
+ const SfxPoolItem* pArg1 // First parameter
)
-/* [Beschreibung]
-
- Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+/* [Description]
+ Method to excecute a <SfxSlot>s over the Slot-Id.
- [R"uckgabewert]
+ [Return value]
- const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
- der Message-Loop g"ultiges SfxPoolItem,
- welches den R"uckgabewert enth"alt.
+ const SfxPoolItem* Pointer to the SfxPoolItem valid to the next run
+ though the Message-Loop, which contains the return
+ value.
- Oder ein 0-Pointer, wenn die Funktion nicht
- ausgef"uhrt wurde (z.B. Abbruch durch den
- Benutzer).
+ Or a NULL-Pointer, when the function was not
+ executed (for example canceled by the user).
*/
{
@@ -1482,35 +1467,32 @@ const SfxPoolItem* SfxDispatcher::_Execute
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::Execute
(
- sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
- SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
- const SfxPoolItem* pArg1, // erster Parameter
- ... // 0-terminiertes Liste Parametern
+ sal_uInt16 nSlot, // the Id of the executing function
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON or
+ // ..._SLOT
+ const SfxPoolItem* pArg1, // First parameter
+ ... // Zero terminated list of parameters
)
-/* [Beschreibung]
-
- Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
-
+/* [Description]
- [Anmerkung]
+ Method to excecute a <SfxSlot>s over the Slot-Id.
- Die Parameter werden kopiert, k"onnen daher als Adresse von
- Stack-Objekten "ubergeben werden.
+ [Note]
+ The parameters are copied, can therefore be passed on as the address
+ of stack objects.
- [R"uckgabewert]
+ [Return value]
- const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
- der Message-Loop g"ultiges SfxPoolItem,
- welches den R"uckgabewert enth"alt.
+ const SfxPoolItem* Pointer to the SfxPoolItem valid to the next run
+ though the Message-Loop, which contains the return
+ value.
- Oder ein 0-Pointer, wenn die Funktion nicht
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list