Part 2
/Albert
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index f2c9d1b..fb5c539 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -54,12 +54,12 @@
#include <svl/svdde.hxx>
#include <sot/formats.hxx>
-#define DDELINK_COLD 0
-#define DDELINK_HOT 1
+#define DDELINK_COLD 0
+#define DDELINK_HOT 1
-#define DDELINK_ERROR_APP 1
-#define DDELINK_ERROR_DATA 2
-#define DDELINK_ERROR_LINK 3
+#define DDELINK_ERROR_APP 1
+#define DDELINK_ERROR_DATA 2
+#define DDELINK_ERROR_LINK 3
using namespace ::com::sun::star::uno;
@@ -152,7 +152,7 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
if( !pConnection )
return FALSE;
- if( pConnection->GetError() ) // dann versuchen wir es nochmal
+ if( pConnection->GetError() ) // then we try once more
{
String sServer( pConnection->GetServiceName() );
String sTopic( pConnection->GetTopicName() );
@@ -163,13 +163,13 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
nError = DDELINK_ERROR_APP;
}
- if( bWaitForData ) // wir sind rekursiv drin, wieder raus
+ if( bWaitForData ) // we are in an rekursive loop, get out again
return FALSE;
- // Verriegeln gegen Reentrance
+ // Lock against Reentrance
bWaitForData = TRUE;
- // falls gedruckt werden soll, warten wir bis die Daten vorhanden sind
+ // if you want to print, we'll wait until the data is available
if( bSynchron )
{
DdeRequest aReq( *pConnection, sItem, 5000 );
@@ -189,8 +189,8 @@ BOOL SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
}
else
{
- // ansonsten wird es asynchron ausgefuehrt
-// if( !pLink || !pLink->IsBusy() )
+ // otherwise it will be executed asynchronously
+// if( !pLink || !pLink->IsBusy() )
{
if( pRequest )
delete pRequest;
@@ -216,9 +216,9 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
static BOOL bInWinExec = FALSE;
#endif
USHORT nLinkType = pSvLink->GetUpdateMode();
- if( pConnection ) // Verbindung steht ja schon
+ if( pConnection ) // Connection is already made
{
- // tja, dann nur noch als Abhaengig eintragen
+ // well, then just add it as dependent
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
LINKUPDATE_ONCALL == nLinkType
@@ -243,6 +243,8 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
{
// kann man denn das System-Topic ansprechen ?
// dann ist der Server oben, kennt nur nicht das Topic!
+ // Is it possible to address the system-Topic?
+ // then the server is up, it just does not know the topic!
if( sTopic.EqualsIgnoreCaseAscii( "SYSTEM" ) )
{
BOOL bSysTopic;
@@ -256,12 +258,12 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
nError = DDELINK_ERROR_DATA;
return FALSE;
}
- // ansonsten unter Win/WinNT die Applikation direkt starten
+ // otherwise in Win/WinNT, start the Application directly
}
#if defined(WIN) || defined(WNT)
- // Server nicht da, starten und nochmal versuchen
+ // Server not up, try once more to start it.
if( !bInWinExec )
{
ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US );
@@ -292,7 +294,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
}
}
else
-#endif // WIN / WNT
+#endif // WIN / WNT
{
nError = DDELINK_ERROR_APP;
}
@@ -300,7 +302,7 @@ BOOL SvDDEObject::Connect( SvBaseLink * pSvLink )
if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() )
{
- // Hot Link einrichten, Daten kommen irgendwann spaeter
+ // Setting up Hot Link, Data will be available at some point later on
pLink = new DdeHotLink( *pConnection, sItem );
pLink->SetDataHdl( LINK( this, SvDDEObject, ImplGetDDEData ) );
pLink->SetDoneHdl( LINK( this, SvDDEObject, ImplDoneDDEData ) );
@@ -353,22 +355,22 @@ BOOL SvDDEObject::ImplHasOtherFormat( DdeTransaction& rReq )
nFmt = FORMAT_GDIMETAFILE;
break;
- // sonst noch irgendwas ??
+ // something else?
}
if( nFmt )
- rReq.SetFormat( nFmt ); // damit nochmal versuchen
+ rReq.SetFormat( nFmt ); // try it once more
return 0 != nFmt;
}
BOOL SvDDEObject::IsPending() const
-/* [Beschreibung]
-
- Die Methode stellt fest, ob aus einem DDE-Object die Daten gelesen
- werden kann.
- Zurueckgegeben wird:
- ERRCODE_NONE wenn sie komplett gelesen wurde
- ERRCODE_SO_PENDING wenn sie noch nicht komplett gelesen wurde
- ERRCODE_SO_FALSE sonst
+/* [Description]
+
+ The method determines whether the data-object can be read from a DDE.
+
+ Returned is the following:
+ ERRCODE_NONE if it has been completely read
+ ERRCODE_SO_PENDING if it has not been completely read
+ ERRCODE_SO_FALSE otherwise
*/
{
return bWaitForData;
@@ -398,8 +400,8 @@ IMPL_LINK( SvDDEObject, ImplGetDDEData, DdeData*, pData )
Sequence< sal_Int8 > aSeq( (const sal_Int8*)p, nLen );
if( pGetData )
{
- *pGetData <<= aSeq; // Daten kopieren
- pGetData = 0; // und den Pointer bei mir zuruecksetzen
+ *pGetData <<= aSeq; // Copy Data
+ pGetData = 0; // reset the pointer here
}
else
{
@@ -422,9 +424,9 @@ IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
{
DdeTransaction* pReq = 0;
if( !pLink || ( pLink && pLink->IsBusy() ))
- pReq = pRequest; // dann kann nur der fertig sein
+ pReq = pRequest; // only the one that is ready
else if( pRequest && pRequest->IsBusy() )
- pReq = pLink; // dann kann nur der fertig sein
+ pReq = pLink; // only the one that is ready
if( pReq )
{
@@ -434,13 +436,12 @@ IMPL_LINK( SvDDEObject, ImplDoneDDEData, void*, pData )
}
else if( pReq == pRequest )
{
- // das wars dann
bWaitForData = FALSE;
}
}
}
else
- // das warten ist beendet
+ // End waiting
bWaitForData = FALSE;
return 0;
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index ca7c3ad..2603504 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -49,8 +49,8 @@ class SvDDEObject : public SvLinkSource
DdeRequest* pRequest;
::com::sun::star::uno::Any * pGetData;
- BYTE bWaitForData : 1; // wird auf Daten gewartet?
- BYTE nError : 7; // Error Code fuer den
Dialog
+ BYTE bWaitForData : 1; // waiting for data?
+ BYTE nError : 7; // Error code for dialogue
BOOL ImplHasOtherFormat( DdeTransaction& );
@@ -63,15 +63,15 @@ protected:
public:
SvDDEObject();
- virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
+ virtual BOOL GetData( ::com::sun::star::uno::Any & rData /*out param*/,
const String & aMimeType,
BOOL bSynchron = FALSE );
- virtual BOOL Connect( SvBaseLink * );
+ virtual BOOL Connect( SvBaseLink * );
virtual void Edit( Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link& rEndEditHdl );
- virtual BOOL IsPending() const;
- virtual BOOL IsDataComplete() const;
+ virtual BOOL IsPending() const;
+ virtual BOOL IsDataComplete() const;
};
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 8cc84ae..8868ca7 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -122,12 +122,12 @@ void LinkManager::CloseCachedComps()
/************************************************************************
|* LinkManager::Remove()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void LinkManager::Remove( SvBaseLink *pLink )
{
- // keine Links doppelt einfuegen
+ // No duplicate links inserted
int bFound = FALSE;
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
@@ -140,7 +140,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
bFound = TRUE;
}
- // falls noch leere rum stehen sollten, weg damit
+ // Remove emty ones if they exist
if( !(*ppRef)->Is() )
{
delete *ppRef;
@@ -177,7 +177,7 @@ void LinkManager::Remove( USHORT nPos, USHORT nCnt )
BOOL LinkManager::Insert( SvBaseLink* pLink )
{
- // keine Links doppelt einfuegen
+ // No duplicate links inserted
for( USHORT n = 0; n < aLinkTbl.Count(); ++n )
{
SvBaseLinkRef* pTmp = aLinkTbl[ n ];
@@ -200,7 +200,7 @@ BOOL LinkManager::InsertLink( SvBaseLink * pLink,
USHORT nUpdateMode,
const String* pName )
{
- // unbedingt zuerst
+ // This First
pLink->SetObjType( nObjType );
if( pName )
pLink->SetName( *pName );
@@ -239,7 +239,7 @@ BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
}
-// erfrage die Strings fuer den Dialog
+// Obtain the string for the dialog
BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
@@ -312,8 +312,8 @@ void LinkManager::UpdateAllLinks(
SvStringsDtor aApps, aTopics, aItems;
String sApp, sTopic, sItem;
- // erstmal eine Kopie vom Array machen, damit sich updatende Links in
- // Links in ... nicht dazwischen funken!!
+ // First make a copy of the array in order to update links
+ // links in ... no contact between them!
SvPtrarr aTmpArr( 255, 50 );
USHORT n;
for( n = 0; n < aLinkTbl.Count(); ++n )
@@ -331,7 +331,7 @@ void LinkManager::UpdateAllLinks(
{
SvBaseLink* pLink = (SvBaseLink*)aTmpArr[ n ];
- // suche erstmal im Array nach dem Eintrag
+ // search first in the array after the entry
USHORT nFndPos = USHRT_MAX;
for( USHORT i = 0; i < aLinkTbl.Count(); ++i )
if( pLink == *aLinkTbl[ i ] )
@@ -341,9 +341,9 @@ void LinkManager::UpdateAllLinks(
}
if( USHRT_MAX == nFndPos )
- continue; // war noch nicht vorhanden!
+ continue; // was not available!
- // Graphic-Links noch nicht updaten
+ // Graphic-Links not to update jet
if( !pLink->IsVisible() ||
( !bUpdateGrfLinks && OBJECT_CLIENT_GRF == pLink->GetObjType() ))
continue;
@@ -352,8 +352,8 @@ void LinkManager::UpdateAllLinks(
{
int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId(
STR_QUERY_UPDATE_LINKS ) ).Execute();
if( RET_YES != nRet )
- return ; // es soll nichts geupdatet werden
- bAskUpdate = FALSE; // einmal reicht
+ return ; // nothing should be updated
+ bAskUpdate = FALSE; // once is enough
}
pLink->Update();
@@ -364,7 +364,7 @@ void LinkManager::UpdateAllLinks(
/************************************************************************
|* SvBaseLink::CreateObject()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
@@ -386,7 +386,7 @@ SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
BOOL LinkManager::InsertServer( SvLinkSource* pObj )
{
- // keine doppelt einfuegen
+ // no duplicate inserts
if( !pObj || USHRT_MAX != aServerTbl.GetPos( pObj ) )
return FALSE;
@@ -493,8 +493,8 @@ BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
return FALSE;
}
-// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
-// (ist zur Zeit nur fuer die FileLinks interressant!)
+// A transfer is aborted, so cancel all download media
+// (for now this is only of interest for the file links!)
void LinkManager::CancelTransfers()
{
SvFileObject* pFileObj;
@@ -505,27 +505,26 @@ void LinkManager::CancelTransfers()
if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
-// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
-// CastAndAddRef(
pLnk->GetObj() )) )
+// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef(
pLnk->GetObj() )) )
pFileObj->CancelTransfers();
}
-
- // um Status Informationen aus dem FileObject an den BaseLink zu
- // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
- // dann die entsprechenden Informationen als String.
- // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
- // - das braucht Informationen ueber Load/Abort/Error
+ // For the purpose of sending Status information from the file object to
+ // the base link, there exist a dedicated ClipBoardId. The SvData-object
+ // gets the appropriate information as a string
+ // For now this is required for file object in conjunction with JavaScript
+ // - needs information about Load/Abort/Error
ULONG LinkManager::RegisterStatusInfoId()
{
static ULONG nFormat = 0;
if( !nFormat )
{
-// wie sieht die neue Schnittstelle aus?
-// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
+// what is the new interface?
+// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
nFormat = SotExchange::RegisterFormatName(
String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
- "StatusInfo vom SvxInternalLink" )));
+ "StatusInfo from SvxInternalLink" )));
}
return nFormat;
}
@@ -594,9 +593,8 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
LinkManager* pLinkMgr = pLink->GetLinkManager();
if (pLinkMgr && pLinkMgr->GetDisplayNames(pLink, 0, &sTopic, &sItem) && sTopic.Len())
{
- // erstmal nur ueber die DocumentShells laufen und die mit dem
- // Namen heraussuchen:
-
+ // first only loop over the DocumentShells the shells and find those
+ // with the name:
com::sun::star::lang::Locale aLocale;
MsLangId::convertLanguageToLocale( LANGUAGE_SYSTEM, aLocale );
CharClass aCC( aLocale );
@@ -635,7 +633,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
aCC.toLower( sTmp );
- if( sTmp == sNmURL ) // die wollen wir haben
+ if( sTmp == sNmURL ) // we want these
{
pFndShell = pShell;
break;
@@ -675,7 +673,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
}
else
{
- // dann versuche die Datei zu laden:
+ // then try to download the file:
INetURLObject aURL( sTopic );
INetProtocol eOld = aURL.GetProtocol();
aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index dddd468..f0bb951 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -61,7 +61,7 @@ SvLinkSourceTimer::SvLinkSourceTimer( SvLinkSource * pOwn )
void SvLinkSourceTimer::Timeout()
{
- // sicher gegen zerstoeren im Handler
+ // Secure against beeing destroyed in Handler
SvLinkSourceRef aAdv( pOwner );
pOwner->SendDataChanged();
}
@@ -80,10 +80,10 @@ static void StartTimer( SvLinkSourceTimer ** ppTimer, SvLinkSource * pOwner,
struct SvLinkSource_Entry_Impl
{
- SvBaseLinkRef xSink;
- String aDataMimeType;
- USHORT nAdviseModes;
- BOOL bIsDataSink;
+ SvBaseLinkRef xSink;
+ String aDataMimeType;
+ USHORT nAdviseModes;
+ BOOL bIsDataSink;
SvLinkSource_Entry_Impl( SvBaseLink* pLink, const String& rMimeType,
USHORT nAdvMode )
@@ -166,9 +166,9 @@ SvLinkSource_Entry_Impl* SvLinkSource_EntryIter_Impl::Next()
struct SvLinkSource_Impl
{
SvLinkSource_Array_Impl aArr;
- String aDataMimeType;
- SvLinkSourceTimer * pTimer;
- ULONG nTimeout;
+ String aDataMimeType;
+ SvLinkSourceTimer * pTimer;
+ ULONG nTimeout;
com::sun::star::uno::Reference<com::sun::star::io::XInputStream>
m_xInputStreamToLoadFrom;
sal_Bool m_bIsReadOnly;
@@ -275,7 +275,7 @@ void SvLinkSource::SendDataChanged()
void SvLinkSource::NotifyDataChanged()
{
if( pImpl->nTimeout )
- StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // Timeout neu
+ StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
else
{
SvLinkSource_EntryIter_Impl aIter( pImpl->aArr );
@@ -314,10 +314,10 @@ void SvLinkSource::DataChanged( const String & rMimeType,
const ::com::sun::star::uno::Any & rVal )
{
if( pImpl->nTimeout && !rVal.hasValue() )
- { // nur wenn keine Daten mitgegeben wurden
+ { // only when no data was included
// fire all data to the sink, independent of the requested format
pImpl->aDataMimeType = rMimeType;
- StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // Timeout neu
+ StartTimer( &pImpl->pTimer, this, pImpl->nTimeout ); // New timeout
}
else
{
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 7c51a05..c96ac88 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -73,16 +73,16 @@ struct BaseLink_Impl
{ delete m_pFileDlg; }
};
-// nur fuer die interne Verwaltung
+// only for internal management
struct ImplBaseLinkData
{
struct tClientType
{
- // gilt fuer alle Links
- ULONG nCntntType; // Update Format
- // nicht Ole-Links
- BOOL bIntrnlLnk; // ist es ein interner Link
- USHORT nUpdateMode;// UpdateMode
+ // applies for all links
+ ULONG nCntntType; // Update Format
+ // Not Ole-Links
+ BOOL bIntrnlLnk; // It is an internal link
+ USHORT nUpdateMode; // UpdateMode
};
struct tDDEType
@@ -108,7 +108,7 @@ class ImplDdeItem : public DdeGetPutItem
{
SvBaseLink* pLink;
DdeData aData;
- Sequence< sal_Int8 > aSeq; // Datacontainer for DdeData !!!
+ Sequence< sal_Int8 > aSeq; // Datacontainer for DdeData !!!
BOOL bIsValidData : 1;
BOOL bIsInDTOR : 1;
public:
@@ -133,9 +133,9 @@ public:
/************************************************************************
-|* SvBaseLink::SvBaseLink()
+|* SvBaseLink::SvBaseLink()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
SvBaseLink::SvBaseLink()
@@ -148,9 +148,9 @@ SvBaseLink::SvBaseLink()
}
/************************************************************************
-|* SvBaseLink::SvBaseLink()
+|* SvBaseLink::SvBaseLink()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType )
@@ -161,16 +161,16 @@ SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType )
bVisible = bSynchron = bUseCache = TRUE;
bWasLastEditOK = FALSE;
- // falls es ein Ole-Link wird,
+ // It it going to be a Ole-Link,
pImplData->ClientType.nUpdateMode = nUpdateMode;
pImplData->ClientType.nCntntType = nContentType;
pImplData->ClientType.bIntrnlLnk = FALSE;
}
/************************************************************************
-|* SvBaseLink::SvBaseLink()
+|* SvBaseLink::SvBaseLink()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSource* pObj )
@@ -183,7 +183,7 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSourc
if( !pObj )
{
- DBG_ASSERT( pObj, "Wo ist mein zu linkendes Object" );
+ DBG_ASSERT( pObj, "Where is my left-most object" );
return;
}
@@ -193,15 +193,14 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType,
SvLinkSourc
DdeTopic* pTopic = FindTopic( aLinkName, &nItemStt );
if( pTopic )
{
- // dann haben wir alles zusammen
- // MM hat gefummelt ???
- // MM_TODO wie kriege ich den Namen
+ // then we have it all together
+ // MM_TODO how do I get the name
String aStr = aLinkName; // xLinkName->GetDisplayName();
aStr = aStr.Copy( nItemStt );
pImplData->DDEType.pItem = new ImplDdeItem( *this, aStr );
pTopic->InsertItem( pImplData->DDEType.pItem );
- // dann koennen wir uns auch das Advise merken
+ // store the Advise
xObj = pObj;
}
}
@@ -210,9 +209,9 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSourc
}
/************************************************************************
-|* SvBaseLink::~SvBaseLink()
+|* SvBaseLink::~SvBaseLink()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
SvBaseLink::~SvBaseLink()
@@ -244,9 +243,9 @@ IMPL_LINK( SvBaseLink, EndEditHdl, String*, _pNewName )
}
/************************************************************************
-|* SvBaseLink::SetObjType()
+|* SvBaseLink::SetObjType()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void SvBaseLink::SetObjType( USHORT nObjTypeP )
@@ -258,9 +257,9 @@ void SvBaseLink::SetObjType( USHORT nObjTypeP )
}
/************************************************************************
-|* SvBaseLink::SetName()
+|* SvBaseLink::SetName()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void SvBaseLink::SetName( const String & rNm )
@@ -269,9 +268,9 @@ void SvBaseLink::SetName( const String & rNm )
}
/************************************************************************
-|* SvBaseLink::GetName()
+|* SvBaseLink::GetName()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
String SvBaseLink::GetName() const
@@ -280,9 +279,9 @@ String SvBaseLink::GetName() const
}
/************************************************************************
-|* SvBaseLink::SetObj()
+|* SvBaseLink::SetObj()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void SvBaseLink::SetObj( SvLinkSource * pObj )
@@ -295,9 +294,9 @@ void SvBaseLink::SetObj( SvLinkSource * pObj )
}
/************************************************************************
-|* SvBaseLink::SetLinkSourceName()
+|* SvBaseLink::SetLinkSourceName()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void SvBaseLink::SetLinkSourceName( const String & rLnkNm )
@@ -305,21 +304,21 @@ void SvBaseLink::SetLinkSourceName( const String & rLnkNm )
if( aLinkName == rLnkNm )
return;
- AddNextRef(); // sollte ueberfluessig sein
- // Alte Verbindung weg
+ AddNextRef(); // should be superfluous
+ // remove old connection
Disconnect();
aLinkName = rLnkNm;
- // Neu verbinden
+ // New Connection
_GetRealObject();
- ReleaseRef(); // sollte ueberfluessig sein
+ ReleaseRef(); // should be superfluous
}
/************************************************************************
-|* SvBaseLink::GetLinkSourceName()
+|* SvBaseLink::GetLinkSourceName()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
String SvBaseLink::GetLinkSourceName() const
@@ -329,9 +328,9 @@ String SvBaseLink::GetLinkSourceName() const
/************************************************************************
-|* SvBaseLink::SetUpdateMode()
+|* SvBaseLink::SetUpdateMode()
|*
-|* Beschreibung
+|* Description
*************************************************************************/
void SvBaseLink::SetUpdateMode( USHORT nMode )
@@ -379,7 +378,7 @@ BOOL SvBaseLink::Update()
{
DataChanged( sMimeType, aData );
//JP 13.07.00: Bug 76817 - for manual Updates there is no
- // need to hold the ServerObject
+ // need to hold the ServerObject
if( OBJECT_CLIENT_DDE == nObjType &&
LINKUPDATE_ONCALL == GetUpdateMode() && xObj.Is() )
xObj->RemoveAllDataAdvise( this );
@@ -387,11 +386,11 @@ BOOL SvBaseLink::Update()
}
if( xObj.Is() )
{
- // sollten wir asynschron sein?
+ // should be asynschron?
if( xObj->IsPending() )
return TRUE;
- // dann brauchen wir das Object auch nicht mehr
+ // we do not need the object anymore
AddNextRef();
Disconnect();
ReleaseRef();
@@ -421,14 +420,14 @@ void SvBaseLink::_GetRealObject( BOOL bConnect)
{
String sServer;
if( pImpl->m_pLinkMgr->GetDisplayNames( this, &sServer ) &&
- sServer == GetpApp()->GetAppName() ) // interner Link !!!
+ sServer == GetpApp()->GetAppName() ) // internal Link !!!
{
- // damit der Internal - Link erzeugt werden kann !!!
+ // so that the Internal link can be created!
nObjType = OBJECT_INTERN;
xObj = pImpl->m_pLinkMgr->CreateObj( this );
pImplData->ClientType.bIntrnlLnk = TRUE;
- nObjType = OBJECT_CLIENT_DDE; // damit wir wissen was es mal war !!
+ nObjType = OBJECT_CLIENT_DDE; // so we know what it once was!
}
else
{
@@ -448,7 +447,7 @@ ULONG SvBaseLink::GetContentType() const
if( OBJECT_CLIENT_SO & nObjType )
return pImplData->ClientType.nCntntType;
- return 0; // alle Formate ?
+ return 0; // all Formats ?
}
@@ -578,7 +577,6 @@ bool SvBaseLink::ExecuteEdit( const String& _rNewName )
void SvBaseLink::Closed()
{
if( xObj.Is() )
- // beim Advise Abmelden
xObj->RemoveAllDataAdvise( this );
}
@@ -593,8 +591,7 @@ FileDialogHelper* SvBaseLink::GetFileDialog( sal_uInt32 nFlags, const String& rF
ImplDdeItem::~ImplDdeItem()
{
bIsInDTOR = TRUE;
- // damit im Disconnect nicht jemand auf die Idee kommt, den Pointer zu
- // loeschen!!
+ // So that no-one gets the idea to delete the pointer when Disconnecting!
SvBaseLinkRef aRef( pLink );
aRef->Disconnect();
}
@@ -603,7 +600,7 @@ DdeData* ImplDdeItem::Get( ULONG nFormat )
{
if( pLink->GetObj() )
{
- // ist das noch gueltig?
+ // is it still valid?
if( bIsValidData && nFormat == aData.GetFormat() )
return &aData;
@@ -635,22 +632,22 @@ BOOL ImplDdeItem::Put( const DdeData* )
void ImplDdeItem::AdviseLoop( BOOL bOpen )
{
- // Verbindung wird geschlossen, also Link abmelden
+ // Connection is closed, so also unsubscribe link
if( pLink->GetObj() )
{
if( bOpen )
{
- // es wird wieder eine Verbindung hergestellt
+ // A connection is re-established
if( OBJECT_DDE_EXTERN == pLink->GetObjType() )
{
- pLink->GetObj()->AddDataAdvise( pLink, String::CreateFromAscii(
"text/plain;charset=utf-16" ), ADVISEMODE_NODATA );
+ pLink->GetObj()->AddDataAdvise( pLink, String::CreateFromAscii(
"text/plain;charset=utf-16" ), ADVISEMODE_NODATA );
pLink->GetObj()->AddConnectAdvise( pLink );
}
}
else
{
- // damit im Disconnect nicht jemand auf die Idee kommt,
- // den Pointer zu loeschen!!
+ // So that no-one gets the idea to delete the pointer
+ // when Disconnecting!
SvBaseLinkRef aRef( pLink );
aRef->Disconnect();
}
@@ -672,7 +669,7 @@ static DdeTopic* FindTopic( const String & rLinkName, USHORT* pItemStt )
pService = rSvc.Next() )
if( pService->GetName() == sService )
{
- // dann suchen wir uns das Topic
+ // then we search for the Topic
String sTopic( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) );
if( pItemStt )
*pItemStt = nTokenPos;
@@ -686,10 +683,10 @@ static DdeTopic* FindTopic( const String & rLinkName, USHORT* pItemStt )
if( pTopic->GetName() == sTopic )
return pTopic;
- // Topic nicht gefunden ?
- // dann versuchen wir ihn mal anzulegen
+ // Topic not found?
+ // then we try once to create it
if( i || !pService->MakeTopic( sTopic ) )
- break; // hat nicht geklappt, also raus
+ break; // did not work, exiting
}
break;
}
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index a583102..cd5dd9c 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/makefile.mk
@@ -37,7 +37,7 @@ LIBTARGET=NO
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
-# w.g. compilerbugs
+# due to compilerbugs
.IF "$(GUI)"=="WNT"
.IF "$(COM)"!="GCC"
CFLAGS+=-Od
@@ -93,7 +93,7 @@ SFX_OBJECTS = \
$(SLO)$/appuno.obj \
$(SLO)$/appbaslib.obj \
$(SLO)$/childwin.obj \
- $(SLO)$/fileobj.obj \
+ $(SLO)$/fileobj.obj \
$(SLO)$/helpdispatch.obj \
$(SLO)$/helpinterceptor.obj \
$(SLO)$/imagemgr.obj\
@@ -104,7 +104,7 @@ SFX_OBJECTS = \
$(SLO)$/lnkbase2.obj \
$(SLO)$/module.obj \
$(SLO)$/newhelp.obj \
- $(SLO)$/opengrf.obj \
+ $(SLO)$/opengrf.obj \
$(SLO)$/sfxdll.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/sfxpicklist.obj \
@@ -139,21 +139,21 @@ SLOFILES += $(SLO)$/shutdowniconOs2.obj
.ENDIF
EXCEPTIONSFILES=\
- $(SLO)$/imagemgr.obj \
+ $(SLO)$/imagemgr.obj \
$(SLO)$/appopen.obj \
- $(SLO)$/appmain.obj \
- $(SLO)$/appmisc.obj \
- $(SLO)$/appinit.obj \
- $(SLO)$/appcfg.obj \
- $(SLO)$/fileobj.obj \
- $(SLO)$/helpinterceptor.obj \
- $(SLO)$/newhelp.obj \
- $(SLO)$/opengrf.obj \
- $(SLO)$/sfxhelp.obj \
- $(SLO)$/shutdownicon.obj \
+ $(SLO)$/appmain.obj \
+ $(SLO)$/appmisc.obj \
+ $(SLO)$/appinit.obj \
+ $(SLO)$/appcfg.obj \
+ $(SLO)$/fileobj.obj \
+ $(SLO)$/helpinterceptor.obj \
+ $(SLO)$/newhelp.obj \
+ $(SLO)$/opengrf.obj \
+ $(SLO)$/sfxhelp.obj \
+ $(SLO)$/shutdownicon.obj \
$(SLO)$/shutdowniconw32.obj \
- $(SLO)$/sfxpicklist.obj \
- $(SLO)$/helpdispatch.obj \
+ $(SLO)$/sfxpicklist.obj \
+ $(SLO)$/helpdispatch.obj \
$(SLO)$/xpackcreator.obj
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index ef3f934..a96b903 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -59,11 +59,11 @@ class SfxModule_Impl
{
public:
- SfxSlotPool* pSlotPool;
- SfxTbxCtrlFactArr_Impl* pTbxCtrlFac;
- SfxStbCtrlFactArr_Impl* pStbCtrlFac;
- SfxMenuCtrlFactArr_Impl* pMenuCtrlFac;
- SfxChildWinFactArr_Impl* pFactArr;
+ SfxSlotPool* pSlotPool;
+ SfxTbxCtrlFactArr_Impl* pTbxCtrlFac;
+ SfxStbCtrlFactArr_Impl* pStbCtrlFac;
+ SfxMenuCtrlFactArr_Impl* pMenuCtrlFac;
+ SfxChildWinFactArr_Impl* pFactArr;
ImageList* pImgListSmall;
ImageList* pImgListBig;
@@ -167,7 +167,8 @@ SfxModule::~SfxModule()
{
if ( SFX_APP()->Get_Impl() )
{
- // Das Modul wird noch vor dem DeInitialize zerst"ort, also auis dem Array entfernen
+ // The module will be destroyed before the Deinitialize,
+ // so remove from the array
SfxModuleArr_Impl& rArr = GetModules_Impl();
for( USHORT nPos = rArr.Count(); nPos--; )
{
@@ -196,7 +197,7 @@ SfxSlotPool* SfxModule::GetSlotPool() const
void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
{
- DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+ DBG_ASSERT( pImpl, "No real Modul!" );
if (!pImpl->pFactArr)
pImpl->pFactArr = new SfxChildWinFactArr_Impl;
@@ -206,7 +207,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId)
{
pImpl->pFactArr->Remove( nFactory );
- DBG_ERROR("ChildWindow mehrfach registriert!");
+ DBG_ERROR("ChildWindow registered multiple times!");
return;
}
}
@@ -220,7 +221,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
void SfxModule::RegisterChildWindowContext( USHORT nId,
SfxChildWinContextFactory *pFact)
{
- DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+ DBG_ASSERT( pImpl, "No real Modul!" );
USHORT nCount = pImpl->pFactArr->Count();
for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
@@ -235,7 +236,7 @@ void SfxModule::RegisterChildWindowContext( USHORT nId,
}
}
- DBG_ERROR( "Kein ChildWindow fuer diesen Context!" );
+ DBG_ERROR( "No ChildWindow for this Context!" );
}
//-------------------------------------------------------------------------
@@ -252,7 +253,7 @@ void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("TbxController-Registering is not clearly defined!");
}
}
#endif
@@ -274,7 +275,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("StbController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("TbxController-Registering is not clearly defined!");
}
}
#endif
@@ -296,7 +297,7 @@ void SfxModule::RegisterMenuControl( SfxMenuCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("MenuController-Registering is not clearly defined!");
}
}
#endif
@@ -337,7 +338,7 @@ ImageList* SfxModule::GetImageList_Impl( BOOL bBig )
return pImpl->GetImageList( pResMgr, bBig );
}
-SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
+SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
{
return NULL;
}
diff --git a/sfx2/source/appl/sfxdll.cxx b/sfx2/source/appl/sfxdll.cxx
index 653995d..0064118 100644
--- a/sfx2/source/appl/sfxdll.cxx
+++ b/sfx2/source/appl/sfxdll.cxx
@@ -32,7 +32,7 @@
#ifdef WIN
#include <svwin.h>
-// Statische DLL-Verwaltungs-Variablen
+// Static DLL Administrative variables
static HINSTANCE hDLLInst = 0;
//==========================================================================
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 2181285..6dacef9 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -68,8 +68,8 @@ using namespace ::com::sun::star::util;
// ----------------------------------------------------------------------------
-osl::Mutex* SfxPickList::pMutex = 0;
-SfxPickList* SfxPickList::pUniqueInstance = 0;
+osl::Mutex* SfxPickList::pMutex = 0;
+SfxPickList* SfxPickList::pUniqueInstance = 0;
// ----------------------------------------------------------------------------
@@ -89,7 +89,7 @@ class StringLength : public ::cppu::WeakImplHelper1< XStringWidth >
// ----------------------------------------------------------------------------
-osl::Mutex* SfxPickList::GetOrCreateMutex()
+osl::Mutex* SfxPickList::GetOrCreateMutex()
{
if ( !pMutex )
{
@@ -116,9 +116,9 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const St
aPickEntry += String::CreateFromInt32( nNo + 1 );
aPickEntry += DEFINE_CONST_UNICODE(": ");
- INetURLObject aURL( aURLString );
- rtl::OUString aTipHelpText;
- rtl::OUString aAccessibleName( aPickEntry );
+ INetURLObject aURL( aURLString );
+ rtl::OUString aTipHelpText;
+ rtl::OUString aAccessibleName( aPickEntry );
if ( aURL.GetProtocol() == INET_PROT_FILE )
{
@@ -126,10 +126,10 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const
St
// path and abbreviate it with a special function:
String aFileSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
-// ::utl::LocalFileHelper::ConvertURLToPhysicalName( aURLString, aPhysicalName );
+// ::utl::LocalFileHelper::ConvertURLToPhysicalName( aURLString, aPhysicalName );
- ::rtl::OUString aSystemPath( aFileSystemPath );
- ::rtl::OUString aCompactedSystemPath;
+ ::rtl::OUString aSystemPath( aFileSystemPath );
+ ::rtl::OUString aCompactedSystemPath;
aTipHelpText = aSystemPath;
aAccessibleName += aSystemPath;
@@ -148,7 +148,7 @@ void SfxPickList::CreatePicklistMenuTitle( Menu* pMenu, USHORT nItemId, const St
else
{
// Use INetURLObject to abbreviate all other URLs
- String aShortURL;
+ String aShortURL;
aShortURL = aURL.getAbbreviated( m_xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
aPickEntry += aShortURL;
aTipHelpText = aURLString;
@@ -169,7 +169,7 @@ void SfxPickList::RemovePickListEntries()
m_aPicklistVector.clear();
}
-SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
+SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
{
OSL_ASSERT( m_aPicklistVector.size() > nIndex );
@@ -179,7 +179,7 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
return 0;
}
-SfxPickList* SfxPickList::GetOrCreate( const sal_uInt32 nMenuSize )
+SfxPickList* SfxPickList::GetOrCreate( const sal_uInt32 nMenuSize )
{
if ( !pUniqueInstance )
{
@@ -220,17 +220,17 @@ void SfxPickList::CreatePickListEntries()
{
RemovePickListEntries();
- // Einlesen der Pickliste
+ // Reading the pick list
Sequence< Sequence< PropertyValue > > seqPicklist = SvtHistoryOptions().GetList( ePICKLIST );
- sal_uInt32 nCount = seqPicklist.getLength();
- sal_uInt32 nEntries = ::std::min( m_nAllowedMenuSize, nCount );
+ sal_uInt32 nCount = seqPicklist.getLength();
+ sal_uInt32 nEntries = ::std::min( m_nAllowedMenuSize, nCount );
for( sal_uInt32 nItem=0; nItem < nEntries; ++nItem )
{
Sequence< PropertyValue > seqPropertySet = seqPicklist[ nItem ];
- INetURLObject aURL;
+ INetURLObject aURL;
::rtl::OUString sURL;
::rtl::OUString sFilter;
::rtl::OUString sTitle;
@@ -267,7 +267,7 @@ void SfxPickList::CreatePickListEntries()
void SfxPickList::CreateMenuEntries( Menu* pMenu )
{
- static sal_Bool bPickListMenuInitializing = sal_False;
+ static sal_Bool bPickListMenuInitializing = sal_False;
::osl::MutexGuard aGuard( GetOrCreateMutex() );
@@ -357,7 +357,7 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( rHint.IsA( TYPE( SfxEventHint )))
{
SfxEventHint* pEventHint = PTR_CAST(SfxEventHint,&rHint);
- // nur ObjectShell-bezogene Events mit Medium interessieren
+ // only ObjectShell-related events with media interest
SfxObjectShell* pDocSh = pEventHint->GetObjShell();
if( !pDocSh )
return;
@@ -393,12 +393,12 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( !pMed )
return;
- // unbenannt-Docs und embedded-Docs nicht in History
+ // Unnamed Documents and embedded-Documents not in History
if ( !pDocSh->HasName() ||
SFX_CREATE_MODE_STANDARD != pDocSh->GetCreateMode() )
return;
- // Hilfe nicht in History
+ // Help not in History
INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() :
::rtl::OUString( pMed->GetOrigURL() ) );
if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP )
return;
@@ -424,12 +424,12 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( !pMed )
return;
- // unbenannt-Docs und embedded-Docs nicht in Pickliste
+ // Unnamed Documents and embedded-Documents not im Pickliste
if ( !pDocSh->HasName() ||
SFX_CREATE_MODE_STANDARD != pDocSh->GetCreateMode() )
return;
- // Hilfe nicht in History
+ // Help not in History
INetURLObject aURL( pDocSh->IsDocShared() ? pDocSh->GetSharedFileURL() :
::rtl::OUString( pMed->GetOrigURL() ) );
if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_HELP )
return;
@@ -450,8 +450,8 @@ void SfxPickList::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( !SfxViewFrame::GetFirst( pDocSh, TRUE ) )
return;
- ::rtl::OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST);
- ::rtl::OUString aFilter;
+ ::rtl::OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST);
+ ::rtl::OUString aFilter;
const SfxFilter* pFilter = pMed->GetOrigFilter();
if ( pFilter )
aFilter = pFilter->GetFilterName();
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 47839f8..d18ffed 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -102,7 +102,7 @@ void SAL_CALL SfxNotificationListener_Impl::disposing( const EventObject& ) thro
{
}
-SFX_IMPL_XSERVICEINFO( ShutdownIcon, "com.sun.star.office.Quickstart",
"com.sun.star.comp.desktop.QuickstartWrapper" ) \
+SFX_IMPL_XSERVICEINFO( ShutdownIcon, "com.sun.star.office.Quickstart",
"com.sun.star.comp.desktop.QuickstartWrapper" ) \
SFX_IMPL_ONEINSTANCEFACTORY( ShutdownIcon );
bool ShutdownIcon::bModalMode = false;
@@ -113,8 +113,8 @@ extern "C" {
static void disabled_initSystray() { }
static void disabled_deInitSystray() { }
}
-#define DOSTRING( x ) #x
-#define STRING( x ) DOSTRING( x )
+#define DOSTRING( x ) #x
+#define STRING( x ) DOSTRING( x )
bool ShutdownIcon::LoadModule( osl::Module **pModule,
oslGenericFunction *pInit,
@@ -416,7 +416,7 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR
{
DBG_ASSERT( pThis->m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" );
- // use ctor for filling up filters automatically! #89169#
+ // use constructor for filling up filters automatically! #89169#
if ( ERRCODE_NONE == pThis->m_pFileDlg->GetError() )
{
Reference< XFilePicker > xPicker = pThis->m_pFileDlg->GetFilePicker();
@@ -637,7 +637,7 @@ void ShutdownIcon::init() throw( ::com::sun::star::uno::Exception )
::SolarMutexGuard aSolarGuard;
ResMgr *pResMgr = SfxResId::GetResMgr();
- ::osl::ResettableMutexGuard aGuard( m_aMutex );
+ ::osl::ResettableMutexGuard aGuard( m_aMutex );
m_pResMgr = pResMgr;
aGuard.clear();
Reference < XDesktop > xDesktop( m_xServiceManager->createInstance(
@@ -669,7 +669,7 @@ void SAL_CALL ShutdownIcon::disposing( const ::com::sun::star::lang::EventObject
void SAL_CALL ShutdownIcon::queryTermination( const ::com::sun::star::lang::EventObject& )
throw(::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException)
{
- ::osl::ClearableMutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard aGuard( m_aMutex );
if ( m_bVeto )
throw ::com::sun::star::frame::TerminationVetoException();
@@ -689,7 +689,7 @@ throw(::com::sun::star::uno::RuntimeException)
void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence<
::com::sun::star::uno::Any>& aArguments )
throw( ::com::sun::star::uno::Exception )
{
- ::osl::ResettableMutexGuard aGuard( m_aMutex );
+ ::osl::ResettableMutexGuard aGuard( m_aMutex );
// third argument only sets veto, everything else will be ignored!
if (aArguments.getLength() > 2)
@@ -723,7 +723,7 @@ void SAL_CALL ShutdownIcon::initialize( const ::com::sun::star::uno::Sequence< :
// above win32 starts the quickstart thread, but we have
// quickstart running only when -quickstart is specified
// on command line (next boot).
- // so if -quickstart was not specified, we cannot issue
+ // so if -quickstart was not specified, we cannot issue
// quickstart veto on shutdown.
if (bQuickstart)
{
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 3d877e5..bcff16c 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -80,39 +80,39 @@ using namespace ::osl;
#define ID_QUICKSTART 1
#define IDM_EXIT 2
#if defined(USE_APP_SHORTCUTS)
-# define IDM_OPEN 3
-# define IDM_WRITER 4
-# define IDM_CALC 5
-# define IDM_IMPRESS 6
-# define IDM_DRAW 7
+# define IDM_OPEN 3
+# define IDM_WRITER 4
+# define IDM_CALC 5
+# define IDM_IMPRESS 6
+# define IDM_DRAW 7
# define IDM_BASE 8
# define IDM_TEMPLATE 9
-# define IDM_MATH 12
+# define IDM_MATH 12
#endif
#define IDM_INSTALL 10
#define IDM_UNINSTALL 11
-#define ICON_SO_DEFAULT 1
-#define ICON_TEXT_DOCUMENT 2
-#define ICON_TEXT_TEMPLATE 3
-#define ICON_SPREADSHEET_DOCUMENT 4
-#define ICON_SPREADSHEET_TEMPLATE 5
-#define ICON_DRAWING_DOCUMENT 6
-#define ICON_DRAWING_TEMPLATE 7
-#define ICON_PRESENTATION_DOCUMENT 8
-#define ICON_PRESENTATION_TEMPLATE 9
-#define ICON_PRESENTATION_COMPRESSED 10
-#define ICON_GLOBAL_DOCUMENT 11
-#define ICON_HTML_DOCUMENT 12
-#define ICON_CHART_DOCUMENT 13
-#define ICON_DATABASE_DOCUMENT 14
-#define ICON_MATH_DOCUMENT 15
-#define ICON_TEMPLATE 16
-#define ICON_MACROLIBRARY 17
-#define ICON_CONFIGURATION 18
-#define ICON_OPEN 5 // See index of open folder
icon in shell32.dll
-#define ICON_SETUP 500
+#define ICON_SO_DEFAULT 1
+#define ICON_TEXT_DOCUMENT 2
+#define ICON_TEXT_TEMPLATE 3
+#define ICON_SPREADSHEET_DOCUMENT 4
+#define ICON_SPREADSHEET_TEMPLATE 5
+#define ICON_DRAWING_DOCUMENT 6
+#define ICON_DRAWING_TEMPLATE 7
+#define ICON_PRESENTATION_DOCUMENT 8
+#define ICON_PRESENTATION_TEMPLATE 9
+#define ICON_PRESENTATION_COMPRESSED 10
+#define ICON_GLOBAL_DOCUMENT 11
+#define ICON_HTML_DOCUMENT 12
+#define ICON_CHART_DOCUMENT 13
+#define ICON_DATABASE_DOCUMENT 14
+#define ICON_MATH_DOCUMENT 15
+#define ICON_TEMPLATE 16
+#define ICON_MACROLIBRARY 17
+#define ICON_CONFIGURATION 18
+#define ICON_OPEN 5 // See index of open folder
icon in shell32.dll
+#define ICON_SETUP 500
#define SFX_TASKBAR_NOTIFICATION WM_USER+1
@@ -204,7 +204,7 @@ static void addMenuItem( HMENU hMenu, UINT id, UINT iconId, const OUString& text
static HMENU createSystrayMenu( )
{
- SvtModuleOptions aModuleOptions;
+ SvtModuleOptions aModuleOptions;
HMENU hMenu = CreatePopupMenu();
int pos=0;
@@ -246,7 +246,7 @@ static HMENU createSystrayMenu( )
{ SvtModuleOptions::E_SIMPRESS, IDM_IMPRESS,ICON_PRESENTATION_DOCUMENT,
IMPRESS_WIZARD_URL },
{ SvtModuleOptions::E_SDRAW, IDM_DRAW, ICON_DRAWING_DOCUMENT, DRAW_URL },
{ SvtModuleOptions::E_SDATABASE, IDM_BASE, ICON_DATABASE_DOCUMENT, BASE_URL },
- { SvtModuleOptions::E_SMATH, IDM_MATH, ICON_MATH_DOCUMENT, MATH_URL },
+ { SvtModuleOptions::E_SMATH, IDM_MATH, ICON_MATH_DOCUMENT, MATH_URL },
};
OUString aEmpty;
@@ -577,20 +577,20 @@ LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
lP
DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ )
{
aListenerWindow = CreateWindowExA(0,
- QUICKSTART_CLASSNAME, // registered class name
- QUICKSTART_WINDOWNAME, // window name
- 0, // window style
- CW_USEDEFAULT, // horizontal position of window
- CW_USEDEFAULT, // vertical position of window
- CW_USEDEFAULT, // window width
- CW_USEDEFAULT, // window height
- (HWND) NULL, // handle to parent or owner window
- NULL, // menu handle or child identifier
- (HINSTANCE) GetModuleHandle( NULL ), // handle to application instance
- NULL // window-creation data
+ QUICKSTART_CLASSNAME, // registered class name
+ QUICKSTART_WINDOWNAME, // window name
+ 0, // window style
+ CW_USEDEFAULT, // horizontal position of window
+ CW_USEDEFAULT, // vertical position of window
+ CW_USEDEFAULT, // window width
+ CW_USEDEFAULT, // window height
+ (HWND) NULL, // handle to parent or owner window
+ NULL, // menu handle or child identifier
+ (HINSTANCE) GetModuleHandle( NULL ), // handle to application instance
+ NULL // window-creation data
);
- MSG msg;
+ MSG msg;
while ( GetMessage( &msg, NULL, 0, 0 ) )
{
@@ -608,52 +608,52 @@ void win32_init_sys_tray()
if ( ShutdownIcon::IsQuickstarterInstalled() )
{
WNDCLASSEXA listenerClass;
- listenerClass.cbSize = sizeof(WNDCLASSEX);
- listenerClass.style = 0;
- listenerClass.lpfnWndProc = listenerWndProc;
- listenerClass.cbClsExtra = 0;
- listenerClass.cbWndExtra = 0;
- listenerClass.hInstance = (HINSTANCE) GetModuleHandle( NULL );
- listenerClass.hIcon = NULL;
- listenerClass.hCursor = NULL;
- listenerClass.hbrBackground = NULL;
- listenerClass.lpszMenuName = NULL;
- listenerClass.lpszClassName = QUICKSTART_CLASSNAME;
- listenerClass.hIconSm = NULL;
+ listenerClass.cbSize = sizeof(WNDCLASSEX);
+ listenerClass.style = 0;
+ listenerClass.lpfnWndProc = listenerWndProc;
+ listenerClass.cbClsExtra = 0;
+ listenerClass.cbWndExtra = 0;
+ listenerClass.hInstance = (HINSTANCE) GetModuleHandle( NULL );
+ listenerClass.hIcon = NULL;
+ listenerClass.hCursor = NULL;
+ listenerClass.hbrBackground = NULL;
+ listenerClass.lpszMenuName = NULL;
+ listenerClass.lpszClassName = QUICKSTART_CLASSNAME;
+ listenerClass.hIconSm = NULL;
RegisterClassExA(&listenerClass);
WNDCLASSEXA executerClass;
- executerClass.cbSize = sizeof(WNDCLASSEX);
- executerClass.style = 0;
- executerClass.lpfnWndProc = executerWndProc;
- executerClass.cbClsExtra = 0;
- executerClass.cbWndExtra = 0;
- executerClass.hInstance = (HINSTANCE) GetModuleHandle( NULL );
- executerClass.hIcon = NULL;
- executerClass.hCursor = NULL;
- executerClass.hbrBackground = NULL;
- executerClass.lpszMenuName = NULL;
- executerClass.lpszClassName = EXECUTER_WINDOWCLASS;
- executerClass.hIconSm = NULL;
+ executerClass.cbSize = sizeof(WNDCLASSEX);
+ executerClass.style = 0;
+ executerClass.lpfnWndProc = executerWndProc;
+ executerClass.cbClsExtra = 0;
+ executerClass.cbWndExtra = 0;
+ executerClass.hInstance = (HINSTANCE) GetModuleHandle( NULL );
+ executerClass.hIcon = NULL;
+ executerClass.hCursor = NULL;
+ executerClass.hbrBackground = NULL;
+ executerClass.lpszMenuName = NULL;
+ executerClass.lpszClassName = EXECUTER_WINDOWCLASS;
+ executerClass.hIconSm = NULL;
RegisterClassExA( &executerClass );
aExecuterWindow = CreateWindowExA(0,
- EXECUTER_WINDOWCLASS, // registered class name
- EXECUTER_WINDOWNAME, // window name
- 0, // window style
- CW_USEDEFAULT, // horizontal position of window
- CW_USEDEFAULT, // vertical position of window
- CW_USEDEFAULT, // window width
- CW_USEDEFAULT, // window height
- (HWND) NULL, // handle to parent or owner window
- NULL, // menu handle or child identifier
- (HINSTANCE) GetModuleHandle( NULL ), // handle to application instance
- NULL // window-creation data
+ EXECUTER_WINDOWCLASS, // registered class name
+ EXECUTER_WINDOWNAME, // window name
+ 0, // window style
+ CW_USEDEFAULT, // horizontal position of window
+ CW_USEDEFAULT, // vertical position of window
+ CW_USEDEFAULT, // window width
+ CW_USEDEFAULT, // window height
+ (HWND) NULL, // handle to parent or owner window
+ NULL, // menu handle or child identifier
+ (HINSTANCE) GetModuleHandle( NULL ), // handle to application instance
+ NULL // window-creation data
);
- DWORD dwThreadId;
+ DWORD dwThreadId;
CreateThread( NULL, 0, SystrayThread, NULL, 0, &dwThreadId );
}
}
@@ -715,8 +715,8 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis)
HFONT hfntOld;
HBRUSH hbrOld;
int x, y;
- BOOL fSelected = lpdis->itemState & ODS_SELECTED;
- BOOL fDisabled = lpdis->itemState & (ODS_DISABLED | ODS_GRAYED);
+ BOOL fSelected = lpdis->itemState & ODS_SELECTED;
+ BOOL fDisabled = lpdis->itemState & (ODS_DISABLED | ODS_GRAYED);
// Set the appropriate foreground and background colors.
@@ -788,7 +788,7 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis)
hfntOld = (HFONT) SelectObject(lpdis->hDC, (HFONT) CreateFontIndirect( &ncm.lfMenuFont ));
- SIZE size;
+ SIZE size;
GetTextExtentPointW( lpdis->hDC, reinterpret_cast<LPCWSTR>(pMyItem->text.getStr()),
pMyItem->text.getLength(), &size );
DrawStateW( lpdis->hDC, (HBRUSH)NULL, (DRAWSTATEPROC)NULL, (LPARAM)pMyItem->text.getStr(),
(WPARAM)0, aRect.left, aRect.top + (height - size.cy)/2, 0, 0, DST_TEXT | (fDisabled && !fSelected
? DSS_DISABLED : DSS_NORMAL) );
@@ -806,7 +806,7 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis)
void _SHFree( void *pv )
{
- IMalloc *pMalloc;
+ IMalloc *pMalloc;
if( NOERROR == SHGetMalloc(&pMalloc) )
{
pMalloc->Free( pv );
@@ -820,9 +820,9 @@ void _SHFree( void *pv )
static OUString _SHGetSpecialFolder( int nFolderID )
{
- LPITEMIDLIST pidl;
- HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl );
- OUString aFolder;
+ LPITEMIDLIST pidl;
+ HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl );
+ OUString aFolder;
if( hHdl == NOERROR )
{
@@ -845,14 +845,14 @@ OUString ShutdownIcon::GetAutostartFolderNameW32()
static HRESULT WINAPI SHCoCreateInstance( LPVOID lpszReserved, REFCLSID clsid, LPUNKNOWN
pUnkUnknown, REFIID iid, LPVOID *ppv )
{
- HRESULT hResult = E_NOTIMPL;
- HMODULE hModShell = GetModuleHandle( "SHELL32" );
+ HRESULT hResult = E_NOTIMPL;
+ HMODULE hModShell = GetModuleHandle( "SHELL32" );
if ( hModShell != NULL )
{
- typedef HRESULT (WINAPI *SHCoCreateInstance_PROC)( LPVOID lpszReserved, REFCLSID
clsid, LPUNKNOWN pUnkUnknwon, REFIID iid, LPVOID *ppv );
+ typedef HRESULT (WINAPI *SHCoCreateInstance_PROC)( LPVOID lpszReserved, REFCLSID clsid,
LPUNKNOWN pUnkUnknwon, REFIID iid, LPVOID *ppv );
- SHCoCreateInstance_PROC lpfnSHCoCreateInstance =
(SHCoCreateInstance_PROC)GetProcAddress( hModShell, MAKEINTRESOURCE(102) );
+ SHCoCreateInstance_PROC lpfnSHCoCreateInstance = (SHCoCreateInstance_PROC)GetProcAddress(
hModShell, MAKEINTRESOURCE(102) );
if ( lpfnSHCoCreateInstance )
hResult = lpfnSHCoCreateInstance( lpszReserved, clsid, pUnkUnknown, iid, ppv );
@@ -900,10 +900,10 @@ BOOL CreateShortcut( const OUString& rAbsObject, const OUString&
rAbsObjectPath,
static bool FileExistsW( LPCWSTR lpPath )
{
- bool bExists = false;
- WIN32_FIND_DATAW aFindData;
+ bool bExists = false;
+ WIN32_FIND_DATAW aFindData;
- HANDLE hFind = FindFirstFileW( lpPath, &aFindData );
+ HANDLE hFind = FindFirstFileW( lpPath, &aFindData );
if ( INVALID_HANDLE_VALUE != hFind )
{
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index d979fdf..fb63792 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -146,11 +146,11 @@ DBG_NAME(SfxWorkWindow)
//SV_IMPL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl );
//====================================================================
-// Sortiert die Children nach ihrem Alignment
-// Reihenfolge entspricht der im enum SfxChildAlignment (->CHILDWIN.HXX).
+// Sort the Children according their alignment
+// The order corresponds to the enum SfxChildAlignment (->CHILDWIN.HXX).
//
-// Hilfe, um die "Anderungen am Alignment kompatibal zu machen!
+// Help to make changes to the alignment compatible!
SFX_IMPL_XINTERFACE_3( LayoutManagerListener, OWeakObject,
::com::sun::star::frame::XLayoutManagerListener, ::com::sun::star::lang::XEventListener,
::com::sun::star::lang::XComponent )
@@ -524,7 +524,7 @@ void SfxWorkWindow::Sort_Impl()
{
USHORT k;
for (k=0; k<aSortedList.Count(); k++)
-// if ( (*pChilds)[aSortedList[k]]->eAlign > pCli->eAlign )
+// if ( (*pChilds)[aSortedList[k]]->eAlign > pCli->eAlign )
if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) >
ChildAlignValue(pCli->eAlign))
break;
@@ -537,7 +537,7 @@ void SfxWorkWindow::Sort_Impl()
//====================================================================
-// ctor f"ur workwin eines Frames
+// constructor for workwin of a Frame
SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm, SfxFrame* pMaster )
: SfxWorkWindow(
@@ -555,11 +555,11 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm,
SfxFra
bInternalDockingAllowed = sal_True;
}
- // Die ben"otigten SplitWindows (je eins f"ur jede Seite) werden erzeugt
+ // The required split windows (one for each side) can be created
for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- // Die SplitWindows sind direkte ChildWindows des WorkWindows und enthalten
- // die angedockten Fenster.
+ // The SplitWindows excludes direct ChildWindows of the WorkWindows
+ // and receives the docked window.
SfxChildAlignment eAlign =
( n == SFX_SPLITWINDOWS_LEFT ? SFX_ALIGN_LEFT :
@@ -576,7 +576,7 @@ SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm, SfxFra
}
//====================================================================
-// ctor der Basisklasse
+// Constructor of the base class
SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pParentWorkwin ) :
pParent( pParentWorkwin ),
@@ -606,8 +606,8 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pPar
pChildWins = new SfxChildWindows_Impl;
pChilds = new SfxChildList_Impl;
- // F"ur die ObjectBars wird ein fester Platz in der ChildList reserviert,
- // damit sie immer in einer definierten Reihenfolge kommen.
+ // For the ObjectBars a integral place in the Childlist is reserved,
+ // so that they always come in a defined order.
SfxChild_Impl* pChild=0;
for (USHORT n=0; n < SFX_OBJECTBAR_MAX; ++n)
pChilds->Insert(0,pChild);
@@ -622,13 +622,13 @@ SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow*
pPar
}
//====================================================================
-// dtor
+// Destructor
SfxWorkWindow::~SfxWorkWindow()
{
DBG_DTOR(SfxWorkWindow, 0);
- // SplitWindows l"oschen
+ // Delete SplitWindows
for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -637,7 +637,7 @@ SfxWorkWindow::~SfxWorkWindow()
delete p;
}
- // Hilfsstruktur f"ur Child-Windows l"oschen
+ // Delete help structure for Child-Windows
DBG_ASSERT( pChilds->Count() == 0, "dangling childs" );
delete pChilds;
delete pChildWins;
@@ -702,17 +702,17 @@ void SfxWorkWindow::SaveStatus_Impl()
}
//--------------------------------------------------------------------
-// Hilfsmethode zum Freigeben der Childlisten. Wenn danach nicht der dtor
-// aufgerufen wird, sondern weiter gearbeitet wird, mu\s wie im ctor von
-// SfxWorkWindow noch Platz f"ur die Objectbars und SplitWindows reserviert
-// werden.
+// Helper method to release the child lists. Should the destructor not be
+// called after this, instead work continues, then space for the object bars
+// and split windows has to be reserved in the same way as in the constructor
+// of SfxWorkWindow.
void SfxWorkWindow::DeleteControllers_Impl()
{
DBG_CHKTHIS(SfxWorkWindow, 0);
- // SplitWindows locken (d.h. Resize-Reaktion an den
- // DockingWindows unterdr"ucken)
+ // Lock SplitWindows (which means supressing the Resize-Reaction of the
+ // DockingWindows)
USHORT n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
@@ -721,7 +721,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
p->Lock();
}
- // Child-Windows l"oschen
+ // Delete Child-Windows
for ( n=0; n<pChildWins->Count(); )
{
SfxChildWin_Impl* pCW = (*pChildWins)[n];
@@ -737,10 +737,10 @@ void SfxWorkWindow::DeleteControllers_Impl()
*/
pChild->Hide();
- // Wenn das ChildWindow ein direktes Childfenster ist und nicht
- // in einem SplitWindow liegt, am WorkWindow abmelden.
- // Nach TH ist eine Abmeldung am Splitwindow nicht erforderlich,
- // wenn dieses auch gleich mit zerst"ort wird (s.u.).
+ // If the child window is a direct child window and not in a
+ // SplitWindow, cancel it at the workwindow.
+ // After TH a cancellation on the SplitWindow is not necessary
+ // since this window is also destroyed (see below).
if (pCW->pCli)
ReleaseChild_Impl(*pChild->GetWindow());
pCW->pWin = 0;
@@ -780,21 +780,22 @@ void SfxWorkWindow::DeleteControllers_Impl()
{
xLayoutManager->reset();
- // StatusBar l"oschen
+ // Delete StatusBar
ResetStatusBar_Impl();
- // ObjectBars l"oschen( zuletzt, damit pChilds nicht tote Pointer enh"alt )
+ // Delete ObjectBars (this is done last, so that pChilds does not
+ // receive dead Pointers)
for ( USHORT i = 0; i < aObjBarList.size(); i++ )
{
- // Nicht jede Position mu\s belegt sein
+ // Not every position must be occupied
USHORT nId = aObjBarList[i].nId;
if ( nId )
aObjBarList[i].nId = 0;
}
}
- // ObjectBars werden alle auf einmal released, da sie einen
- // festen zusammenh"angenden Bereich im Array pChilds belegen
+ // ObjectBars are all released at once, since they occupy a
+ // fixed contiguous area in the array pChild
pChilds->Remove(0, SFX_OBJECTBAR_MAX);
bSorted = FALSE;
@@ -802,7 +803,7 @@ void SfxWorkWindow::DeleteControllers_Impl()
}
//====================================================================
-// Virtuelle Methode zum Anordnen der Childfenster.
+// Virtual method for placing the child window.
void SfxWorkWindow::ArrangeChilds_Impl( BOOL /*bForce*/)
{
@@ -832,16 +833,14 @@ void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( BOOL bForce )
if ( IsVisible_Impl() )
aBorder = Arrange_Impl();
}
-
- // Wenn das aktuelle Dokument der Applikation einen IPClient enth"alt, mu\s
- // dem dazugeh"origen Objekt durch SetTopToolFramePixel der zur Verf"ugung
- // stehende Platz zugeteilt werden. Das Objekt zeigt dann seine UITools an
- // und setzt den App-Border(->SfxInPlaceEnv_Impl::ArrangeChilds_Impl()).
- // Anderenfalls wird hier direkt der AppBorder gesetzt, um evtl. den Border
- // zu "uberschreiben, den bisher ein Objekt aus einem anderen Dokument
- // gesetzt hatte.
- // Das Objekt setzt, wenn es seine UI-Tools wegnimmt, den SetAppBorder nicht,
- // damit kein ObjectBar-Zappeln entsteht.
+ // If the current application document contains a IPClient, then the
+ // object through SetTopToolFramePixel has to be assigned the available
+ // space. The object will then point to its UITools and sets the app border
+ // (-> SfxInPlaceEnv_Impl:: ArrangeChilds_Impl ()). Otherwise the
+ // app border is set here directly to possibly overwrite the Border that
+ // was set by an object from another document. The object does not set
+ // the SetAppBorder when it removes its UI tools so that no-dithering
+ // ObjectBar arises.
// (->SfxInPlaceEnv_Impl::ArrangeChilds_Impl())
pMasterFrame->SetToolSpaceBorderPixel_Impl( aBorder );
@@ -853,13 +852,12 @@ void SfxFrameWorkWin_Impl::ArrangeChilds_Impl( BOOL bForce )
SvBorder SfxWorkWindow::Arrange_Impl()
-/* [Beschreibung]
-
- Diese Methode ordnet alle sichtbaren ChildFenster so an, da\s die angedockten
- Fenster nach der Sorierreihenfolge von au\sen nach innen aneinander
- gesetzt werden. Wenn ein an sich sichtbares Fenster nicht mehr in die
- noch freie ClientArea pa\st, wird es auf "nicht sichtbar" gesetzt.
+/* [Description]
+ This method organizes all visible child windows so that the docked window
+ sorted in order from the outside to the inside are placed after one
+ another. If a visible window does not fit anymore into the free
+ ClientArea, it is set to "not visible".
*/
{
DBG_CHKTHIS(SfxWorkWindow, 0);
@@ -884,10 +882,10 @@ SvBorder SfxWorkWindow::Arrange_Impl()
if ( !pCli->pWin )
continue;
- // Zun"achst nehmen wir an, da\s das Fenster Platz hat
+ // First, we assume that there is room for the window.
pCli->nVisible |= CHILD_FITS_IN;
- // Nicht sichtbare Fenster "uberspringen
+ // Skip invisiable windows
if (pCli->nVisible != CHILD_VISIBLE)
continue;
@@ -1004,7 +1002,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
}
//--------------------------------------------------------------------
-// Close-Handler: die Konfiguration der ChildWindows wird gespeichert.
+// Close-Handler: The Configuration of the ChildWindows is saved.
//
void SfxWorkWindow::Close_Impl()
@@ -1067,7 +1065,7 @@ void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
SfxChildAlignment eAlign )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
-// DBG_ASSERT( pChilds, "aligning unregistered child" );
+// DBG_ASSERT( pChilds, "aligning unregistered child" );
DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
SfxChild_Impl *pChild = FindChild_Impl(rWindow);
@@ -1090,7 +1088,7 @@ void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
-// DBG_ASSERT( pChilds, "releasing unregistered child" );
+// DBG_ASSERT( pChilds, "releasing unregistered child" );
SfxChild_Impl *pChild = 0;
USHORT nPos;
@@ -1291,11 +1289,10 @@ void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, sal_uInt32 nResId,
bool SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
-/* [Beschreibung]
+/* [Description]
- Stellt fest, ob an der betreffenden Position "uberhaupt eine
- Objektleiste zur Verf"ugung stehen w"urde. Ist unabh"agig davon,
- ob diese tats"achlich ein- oder ausgeschaltet ist.
+ Determines if a object list is available at the position in question.
+ This is independent for the fact whether it is actually turned on or off.
*/
{
@@ -1353,7 +1350,7 @@ void SfxFrameWorkWin_Impl::UpdateObjectBars_Impl()
SfxWorkWindow::UpdateObjectBars_Impl();
-// if ( pTask->IsActive() )
+// if ( pTask->IsActive() )
{
pWork = pParent;
while ( pWork )
@@ -1440,8 +1437,8 @@ sal_Bool SfxWorkWindow::IsPluginMode( SfxObjectShell* pObjShell )
void SfxWorkWindow::UpdateObjectBars_Impl()
{
- // SplitWindows locken (d.h. Resize-Reaktion an den
- // DockingWindows unterdr"ucken)
+ // Lock SplitWindows (which means supressing the Resize-Reaction of the
+ // DockingWindows)
USHORT n;
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
@@ -1450,7 +1447,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
p->Lock();
}
- // was man so "ofters braucht, merkt man sich (spart Code und Laufzeit)
+ // you realize what is needed often (saves Code and execution time)
SFX_APP();
Reference< com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
@@ -1475,21 +1472,21 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
bPluginMode = IsPluginMode( pFrame->GetObjectShell() );
}
- // "uber alle Toolboxen iterieren
+ // Iterate over all Toolboxes
xLayoutManager->lock();
for ( n = 0; n < aObjBarList.size(); ++n )
{
USHORT nId = aObjBarList[n].nId;
sal_Bool bDestroy = aObjBarList[n].bDestroy;
- // die Modi bestimmen, f"ur die die ToolBox gilt
+ // Determine the vaild mode for the ToolBox
USHORT nTbxMode = aObjBarList[n].nMode;
bool bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
( nTbxMode & SFX_VISIBILITY_FULLSCREEN );
nTbxMode &= ~SFX_VISIBILITY_FULLSCREEN;
nTbxMode &= ~SFX_VISIBILITY_VIEWER;
- // wird in diesem Kontext eine ToolBox gefordert?
+ // Is a ToolBox required in this context ?
bool bModesMatching = ( nUpdateMode && ( nTbxMode & nUpdateMode) == nUpdateMode );
if ( bDestroy )
{
@@ -1513,7 +1510,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
}
else if ( nId != 0 )
{
- // ggf. Toolbox an dieser Position l"oschen
+ // Delete the Toolbox at this Position if possible
rtl::OUString aTbxId( m_aTbxTypeName );
aTbxId += GetResourceURLFromResId( aObjBarList[n].nId );
xLayoutManager->destroyElement( aTbxId );
@@ -1527,7 +1524,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl()
UpdateChildWindows_Impl();
- // SplitWindows wieder ent-locken
+ // Unlock the SplitWindows again
for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
SfxSplitWindow *p = pSplit[n];
@@ -1548,16 +1545,16 @@ bool SfxWorkWindow::AllowChildWindowCreation_Impl( const SfxChildWin_Impl&
i_rCW
void SfxWorkWindow::UpdateChildWindows_Impl()
{
- // alle vorhandenen oder in den Kontext gekommenen ChildWindows
- for ( USHORT n=0; n<pChildWins->Count(); n++ )
+ // any current or in the context available Childwindows
+ for ( USHORT n=0; n<pChildWins->Count(); n++ )
{
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChildWin = pCW->pWin;
BOOL bCreate = FALSE;
if ( pCW->nId && !pCW->bDisabled && (pCW->aInfo.nFlags & SFX_CHILDWIN_ALWAYSAVAILABLE ||
IsVisible_Impl( pCW->nVisibility ) ) )
{
- // Im Kontext ist ein geeignetes ChildWindow erlaubt;
- // ist es auch eingeschaltet ?
+ // In the context is an appropriate ChildWindow allowed;
+ // it is also turned on?
if ( pChildWin == NULL && pCW->bCreate )
{
// Internal docking is only used for embedding into another
@@ -1571,7 +1568,7 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
}
else if ( !IsDockingAllowed() || bIsFullScreen ) // || !bInternalDocking )
{
- // im PresentationMode oder FullScreen nur FloatingWindows
+ // In Presentation mode or FullScreen only FloatingWindows
SfxChildAlignment eAlign;
if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
bCreate = ( eAlign == SFX_ALIGN_NOALIGNMENT );
@@ -1582,8 +1579,8 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
if ( bCreate )
bCreate = AllowChildWindowCreation_Impl( *pCW );
- // Momentan kein Fenster da, aber es ist eingeschaltet; Fenster
- // und ggf. Context erzeugen
+ // Currently, no window here, but it is enabled; windows
+ // Create window and if possible theContext
if ( bCreate )
CreateChildWin_Impl( pCW, FALSE );
@@ -1595,23 +1592,23 @@ void SfxWorkWindow::UpdateChildWindows_Impl()
}
else if ( pChildWin )
{
- // Fenster existiert schon; soll es auch sichtbar sein ?
+ // Window already exists, it should also be visible?
if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) &&
bAllChildsVisible )
{
- // Updatemode ist kompatibel; auf jeden Fall wieder einschalten
+ // Update Mode is compatible; definitely enable it
bCreate = AllowChildWindowCreation_Impl( *pCW );
if ( bCreate )
{
if ( pCW->pCli )
{
- // Fenster ist direktes Child
+ // The window is a direct Child
if ( bAllChildsVisible && ( (IsDockingAllowed() &&
bInternalDockingAllowed) || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
pCW->pCli->nVisible |= CHILD_NOT_HIDDEN;
}
else
{
if ( pCW->bCreate && IsDockingAllowed() && bInternalDockingAllowed )
- // Fenster liegt in einem SplitWindow
+ // The window ia within a SplitWindow
((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl();
}
@@ -1651,16 +1648,18 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL
bSetFocus )
if ( bSetFocus )
bSetFocus = pChildWin->WantsFocus();
pChildWin->SetWorkWindow_Impl( this );
- // Zumindest der ExtraString wird beim Auswerten ver"andert, also neu holen
+
+ // At least the extra string is changed during the evaluation,
+ // also get it anewed
SfxChildWinInfo aInfo = pChildWin->GetInfo();
pCW->aInfo.aExtraString = aInfo.aExtraString;
pCW->aInfo.bVisible = aInfo.bVisible;
pCW->aInfo.nFlags |= aInfo.nFlags;
- // Nein !! Sonst kann man keine Fenster defaultmaessig ausschalten ( Partwindow! )
-// pCW->aInfo.bVisible = TRUE;
+ // No! Otherwise, you could have disable any window stored (Partwindow!)
+// pCW->aInfo.bVisible = TRUE;
- // Erzeugung war erfolgreich
+ // The creation was successful
GetBindings().Invalidate(pCW->nId);
USHORT nPos = pChildWin->GetPosition();
@@ -1668,9 +1667,9 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL
bSetFocus )
{
DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
if ((*pChilds)[TbxMatch(nPos)])// &&
-// pChildWin->GetAlignment() ==
(*pChilds)[nPos]->eAlign )
+// pChildWin->GetAlignment() == (*pChilds)[nPos]->eAlign )
{
- // ChildWindow ersetzt ObjectBar
+ // ChildWindow replaces ObjectBar
(*pChilds)[TbxMatch(nPos)]->nVisible ^= CHILD_NOT_HIDDEN;
}
}
@@ -1682,9 +1681,8 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL
bSetFocus )
if ( pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ||
pChildWin->GetWindow()->GetParent() == pWorkWin)
{
- // Das Fenster ist entweder nicht angedockt oder au\serhalb
- // eines SplitWindows angedockt und mu\s daher explizit als
- // Child registriert werden
+ // The window is not docked or docked outside of one split windows
+ // and must therefore be registered explicitly as a Child
pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()), pChildWin->GetAlignment(),
pChildWin->CanGetFocus());
pCW->pCli->nVisible = CHILD_VISIBLE;
if ( pChildWin->GetAlignment() != SFX_ALIGN_NOALIGNMENT && bIsFullScreen )
@@ -1693,17 +1691,15 @@ void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW, BOOL
bSetFocus )
}
else
{
- // Ein angedocktes Fenster, dessen Parent nicht das WorkWindow ist,
- // mu\s in einem SplitWindow liegen und daher nicht explizit
- // registriert werden.
- // Das passiert aber schon bei der Initialisierung des
- // SfxDockingWindows!
+ // A docked window which parent is not a WorkingWindow, must lie
+ // in a SplitWindow and thus not be explicitly registered.
+ // This happens already in the initialization of SfxDockingWindows!
}
if ( pCW->nInterfaceId != pChildWin->GetContextId() )
pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() );
- // Information in der INI-Datei sichern
+ // Save the information in the INI file
SaveStatus_Impl(pChildWin, pCW->aInfo);
}
}
@@ -1713,24 +1709,24 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
USHORT nId = pCW->nSaveId;
SfxChildWindow *pChildWin = pCW->pWin;
- // vorhandenes Fenster geht aus dem Kontext und wird daher entfernt
+ // existing window goes out of the context and is therefore removed
USHORT nPos = pChildWin->GetPosition();
if (nPos != CHILDWIN_NOPOS)
{
/*
- // ChildWindow "uberlagert einen ObjectBar
+ // ChildWindow overloads a ObjectBar
DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
if ((*pChilds)[TbxMatch(nPos)] &&
(aObjBars[nPos].nMode & nUpdateMode) ) //&&
-// pChildWin->GetAlignment() ==
(*pChilds)[nPos]->eAlign )
+// pChildWin->GetAlignment() ==
(*pChilds)[nPos]->eAlign )
{
- // ObjectBar war "uberlagert; jetzt wieder anzeigen
+ // ObjectBar was overloaded; now display it again
(*pChilds)[TbxMatch(nPos)]->nVisible ^= CHILD_NOT_HIDDEN;
}
*/
}
- // Information in der INI-Datei sichern
+ // Save the information in the INI file
USHORT nFlags = pCW->aInfo.nFlags;
pCW->aInfo = pChildWin->GetInfo();
pCW->aInfo.nFlags |= nFlags;
@@ -1740,15 +1736,15 @@ void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
if ( pCW->pCli )
{
- // ChildWindow ist ein direktes ChildWindow und mu\s sich daher
- // beim WorkWindow abmelden
+ // Child window is a direct child window and must therefore unregister
+ // itself from the WorkWindow
pCW->pCli = 0;
ReleaseChild_Impl(*pChildWin->GetWindow());
}
else
{
- // ChildWindow liegt in einem SplitWindow und meldet sich
- // selbst im dtor dort ab
+ // ChildWindow is within a SplitWindow and unregister itself in
+ // the destructor.
}
pWorkWin->GetSystemWindow()->GetTaskPaneList()->RemoveWindow( pChildWin->GetWindow() );
@@ -1790,7 +1786,8 @@ void SfxWorkWindow::SetTempStatusBar_Impl( BOOL bSet )
aStatBar.bTemp = bSet;
if ( !bOn || bReset || (!bSet && aStatBar.nId ) )
{
- // Nur was tun, wenn die Temp-Einstellung wirklich was bewirkt
+ // Just do something if the temp settings really are causing
+ // anything
UpdateStatusBar_Impl();
ArrangeChilds_Impl();
ShowChilds_Impl();
@@ -1809,21 +1806,20 @@ void SfxWorkWindow::UpdateStatusBar_Impl()
Any aValue = xPropSet->getPropertyValue( m_aLayoutManagerPropName );
aValue >>= xLayoutManager;
- // keine Statusleiste, wenn keine Id gew"unscht oder bei FullScreenView
- // oder wenn ausgeschaltet
+ // No status bar, if no ID is required or when in FullScreenView or
+ // if disabled
if ( aStatBar.nId && IsDockingAllowed() && bInternalDockingAllowed && bShowStatusBar &&
( (aStatBar.bOn && !bIsFullScreen) || aStatBar.bTemp ) )
{
- // Id hat sich ge"andert, also passenden Statusbarmanager erzeugen,
- // dieser "ubernimmt die aktuelle Statusleiste;
+ // Id has changed, thus create a suitable Statusbarmanager, this takes
+ // over the current status bar;
if ( xLayoutManager.is() )
xLayoutManager->requestElement( m_aStatusBarResName );
}
else
{
- // Aktuelle StatusBar vernichten
- // Der Manager erzeugt die Statusleiste nur, er zerst"ort sie
- // nicht !
+ // Destroy the current StatusBar
+ // The Manager only creates the Status bar, does not destroy it.
if ( xLayoutManager.is() )
xLayoutManager->destroyElement( m_aStatusBarResName );
}
@@ -1989,14 +1985,14 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
if ( nPos == USHRT_MAX )
return;
-// SfxChild_Impl *pChild = (*pChilds)[nPos];
+// SfxChild_Impl *pChild = (*pChilds)[nPos];
Rectangle aOuterRect( GetTopRect_Impl() );
aOuterRect.SetPos( pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() ));
Rectangle aInnerRect( aOuterRect );
BOOL bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
- // Das gerade betroffene Fenster wird bei der Berechnung des
- // inneren Rechtecks mit eingeschlossen!
+ // The current affected window is included in the calculation of
+ // the inner rectangle!
for ( USHORT m=0; m<aSortedList.Count(); ++m )
{
USHORT i=aSortedList[m];
@@ -2007,93 +2003,93 @@ void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
switch ( pCli->eAlign )
{
case SFX_ALIGN_TOP:
- // Objekt-Toolboxen kommen immer zuletzt
+ // Objekt-Toolboxes come always last
//if ( bTbx || i <= nPos)
aInnerRect.Top() += pCli->aSize.Height();
break;
case SFX_ALIGN_TOOLBOXTOP:
- // Toolbox geht nur vor, wenn nicht h"ohere Position
+ // Toolbox has priority, if no higher Position
if ( bTbx && i <= nPos)
aInnerRect.Top() += pCli->aSize.Height();
break;
case SFX_ALIGN_HIGHESTTOP:
- // Geht immer vor
+ // Always performed first
aInnerRect.Top() += pCli->aSize.Height();
break;
case SFX_ALIGN_LOWESTTOP:
- // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ // Is only counted if it is the current window
if ( i == nPos )
aInnerRect.Top() += pCli->aSize.Height();
break;
case SFX_ALIGN_BOTTOM:
- // Objekt-Toolboxen kommen immer zuletzt
+ // Objekt-Toolboxes come always last
//if ( bTbx || i <= nPos)
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
case SFX_ALIGN_TOOLBOXBOTTOM:
- // Toolbox geht nur vor, wenn nicht h"ohere Position
+ // Toolbox has priority, if no higher Position
if ( bTbx && i <= nPos)
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
case SFX_ALIGN_LOWESTBOTTOM:
- // Geht immer vor
+ // Always performed first
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
case SFX_ALIGN_HIGHESTBOTTOM:
- // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ // Is only counted if it is the current window
if ( i == nPos )
aInnerRect.Bottom() -= pCli->aSize.Height();
break;
case SFX_ALIGN_LEFT:
- // Toolboxen kommen immer zuletzt
+ // Toolboxes come always last
//if (bTbx || i <= nPos)
aInnerRect.Left() += pCli->aSize.Width();
break;
case SFX_ALIGN_TOOLBOXLEFT:
- // Toolboxen kommen immer zuletzt
+ // Toolboxes come always last
if (bTbx && i <= nPos)
aInnerRect.Left() += pCli->aSize.Width();
break;
case SFX_ALIGN_FIRSTLEFT:
- // Geht immer vor
+ // Always performed first
aInnerRect.Left() += pCli->aSize.Width();
break;
case SFX_ALIGN_LASTLEFT:
- // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ // Is only counted if it is the current window
if (i == nPos)
aInnerRect.Left() += pCli->aSize.Width();
case SFX_ALIGN_RIGHT:
- // Toolboxen kommen immer zuletzt
+ // Toolboxes come always last
//if (bTbx || i <= nPos)
aInnerRect.Right() -= pCli->aSize.Width();
break;
case SFX_ALIGN_TOOLBOXRIGHT:
- // Toolboxen kommen immer zuletzt
+ // Toolboxes come always last
if (bTbx && i <= nPos)
aInnerRect.Right() -= pCli->aSize.Width();
break;
case SFX_ALIGN_FIRSTRIGHT:
- // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ // Is only counted if it is the current window
if (i == nPos)
aInnerRect.Right() -= pCli->aSize.Width();
break;
case SFX_ALIGN_LASTRIGHT:
- // Geht immer vor
+ // Always performed first
aInnerRect.Right() -= pCli->aSize.Width();
break;
@@ -2165,14 +2161,14 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL
bEnabled, U
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
- // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
- // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ // Get the top parent, child windows are alwas registered at the
+ // task of the WorkWindow for example the frame or on AppWorkWindow
while ( pWork && pWork->pParent )
pWork = pWork->pParent;
if ( pWork )
{
- // Dem Parent schon bekannt ?
+ // The Parent already known?
USHORT nCount = pWork->pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
@@ -2184,7 +2180,7 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL
bEnabled, U
if ( !pCW )
{
- // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ // If no Parent or the Parent us still unknown, then search here
USHORT nCount = pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
@@ -2196,8 +2192,8 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL
bEnabled, U
if ( !pCW )
{
- // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
- // mir eintragen
+ // If new, then initialize, add this here depending on the flag or
+ // the Parent
pCW = new SfxChildWin_Impl( lId );
pCW->nId = nId;
InitializeChild_Impl( pCW );
@@ -2216,7 +2212,7 @@ void SfxWorkWindow::SetChildWindowVisible_Impl( sal_uInt32 lId, BOOL
bEnabled, U
}
//--------------------------------------------------------------------
-// Der An/Aus-Status eines ChildWindows wird umgeschaltet.
+// The on/of-Status of a ChildWindows is switched
void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
{
@@ -2228,7 +2224,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
if ( n<nCount )
{
- // Das Fenster ist schon bekannt
+ // The Window is aleady known
SfxChildWin_Impl *pCW = (*pChildWins)[n];
SfxChildWindow *pChild = pCW->pWin;
@@ -2255,7 +2251,7 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
}
else
{
- // Fenster soll ausgeschaltet werdem
+ // The Window should be switched off
pChild->SetVisible_Impl( FALSE );
RemoveChildWin_Impl( pCW );
}
@@ -2318,11 +2314,11 @@ void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId, BOOL bSetFocus)
if ( n < nCount )
{
- DBG_ERROR("ChildWindow ist nicht im Kontext!");
+ DBG_ERROR("The ChildWindow is not in context!");
}
else
{
- DBG_ERROR("ChildWindow ist nicht registriert!");
+ DBG_ERROR("The ChildWindow is not registered!");
}
#endif
}
@@ -2355,14 +2351,14 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
- // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
- // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ // Get the top parent, child windows are alwas registered at the
+ // task of the WorkWindow for example the frame or on AppWorkWindow
while ( pWork && pWork->pParent )
pWork = pWork->pParent;
if ( pWork )
{
- // Dem Parent schon bekannt ?
+ // The Parent already known?
USHORT nCount = pWork->pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
@@ -2374,7 +2370,7 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( !pCW )
{
- // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ // If no Parent or the Parent us still unknown, then search here
USHORT nCount = pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
@@ -2386,8 +2382,8 @@ BOOL SfxWorkWindow::IsFloating( USHORT nId )
if ( !pCW )
{
- // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
- // mir eintragen
+ // If new, then initialize, add this here depending on the flag or
+ // the Parent
pCW = new SfxChildWin_Impl( nId );
pCW->bEnable = FALSE;
pCW->nId = 0;
@@ -2439,14 +2435,14 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL
bSetFocus)
SfxChildWin_Impl *pCW=NULL;
SfxWorkWindow *pWork = pParent;
- // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
- // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ // Get the top parent, child windows are alwas registered at the
+ // task of the WorkWindow for example the frame or on AppWorkWindow
while ( pWork && pWork->pParent )
pWork = pWork->pParent;
if ( pWork )
{
- // Dem Parent schon bekannt ?
+ // The Parent already known?
USHORT nCount = pWork->pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pWork->pChildWins)[n]->nSaveId == nId)
@@ -2458,7 +2454,7 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( !pCW )
{
- // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ // If no Parent or the Parent us still unknown, then search here
USHORT nCount = pChildWins->Count();
for (USHORT n=0; n<nCount; n++)
if ((*pChildWins)[n]->nSaveId == nId)
@@ -2471,8 +2467,8 @@ void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn, BOOL bSetFocus)
if ( !pCW )
{
- // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
- // mir eintragen
+ // If new, then initialize, add this here depending on the flag or
+ // the Parent
pCW = new SfxChildWin_Impl( nId );
InitializeChild_Impl( pCW );
if ( !pWork || pCW->aInfo.nFlags & SFX_CHILDWIN_TASK )
@@ -2563,11 +2559,11 @@ void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible, BOOL
bSetFoc
if ( n<nCount )
{
- DBG_ERROR("ChildWindow ist nicht im Kontext!");
+ DBG_ERROR("The ChildWindow is not in context!");
}
else
{
- DBG_ERROR("ChildWindow ist nicht registriert!");
+ DBG_ERROR("The ChildWindow is not registered");
}
#endif
}
@@ -2593,8 +2589,8 @@ SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(USHORT nId)
void SfxWorkWindow::ResetChildWindows_Impl()
{
-// if ( pParent )
-// pParent->ResetChildWindows_Impl();
+// if ( pParent )
+// pParent->ResetChildWindows_Impl();
for ( USHORT n = 0; n < pChildWins->Count(); ++n )
{
@@ -2604,9 +2600,8 @@ void SfxWorkWindow::ResetChildWindows_Impl()
}
//------------------------------------------------------------------------
-// Virtuelle Methode, die die Gr"o\se der Fl"ache (client area) des parent
-// windows liefert, in der Child-Fenster angeordnet werden k"onnen.
-// in der ClientArea des parent findet.
+// Virtual method that returns the size of the area (client area) of the
+// parent windows, in which the ChildWindow can be fitted.
Rectangle SfxWorkWindow::GetTopRect_Impl()
{
@@ -2614,9 +2609,8 @@ Rectangle SfxWorkWindow::GetTopRect_Impl()
}
//------------------------------------------------------------------------
-// Virtuelle Methode, die die Gr"o\se der Fl"ache (client area) des parent
-// windows liefert, in der Child-Fenster angeordnet werden k"onnen.
-// in der ClientArea des parent findet.
+// Virtual method that returns the size of the area (client area) of the
+// parent windows, in which the ChildWindow can be fitted.
Rectangle SfxFrameWorkWin_Impl::GetTopRect_Impl()
{
@@ -2624,8 +2618,8 @@ Rectangle SfxFrameWorkWin_Impl::GetTopRect_Impl()
}
//------------------------------------------------------------------------
-// Virtuelle Methode, um herauszufinden, ob ein Child-Fenster noch Platz
-// in der ClientArea des parent findet.
+// Virtual method to find out if there is room for a ChildWindow in the
+// client area of the parent.
BOOL SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
{
@@ -2639,7 +2633,7 @@ BOOL SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
void SfxWorkWindow::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInfo &rInfo)
{
- // Den Status vom Presentation mode wollen wir nicht sichern
+ // The Status of the Presentation mode is not saved
if ( IsDockingAllowed() && bInternalDockingAllowed )
pChild->SaveStatus(rInfo);
}
@@ -2802,11 +2796,10 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
Rectangle aArea( aUpperClientArea );
for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- // Es werden entweder Dummyfenster oder Fenster im AutoShow-Modus
- // ( nicht gepinned, FadeIn ) behandelt.
- // Nur das "ubergebene Fenster darf unsichtbar sein, denn vielleicht
- // soll daf"ur gerade die Gr"o\se berechnet werden, bevor es angezeigt
- // wird.
+ // Either dummy window or window in the auto-show-mode are processed
+ // (not pinned, FadeIn).
+ // Only the abandoned window may be invisible, because perhaps its
+ // size is just beeing calculated before it is displayed.
SfxSplitWindow* pSplitWin = pSplit[n];
BOOL bDummyWindow = !pSplitWin->IsFadeIn();
Window *pDummy = pSplitWin->GetSplitWindow();
@@ -2814,7 +2807,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
if ( (pSplitWin->IsPinned() && !bDummyWindow) || (!pWin->IsVisible() && pActSplitWin !=
pSplitWin) )
continue;
- // Breite und Position des Dummy-Fensters als Ausgangspunkt
+ // Width and position of the dummy window as a starting point
Size aSize = pDummy->GetSizePixel();
Point aPos = pDummy->GetPosPixel();
@@ -2822,13 +2815,13 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
{
case ( 0 ) :
{
- // Linkes SplitWindow
- // Breite vom Fenster selbst holen, wenn nicht das DummyWindow
+ // Left SplitWindow
+ // Get the width of the Window yourself, if no DummyWindow
if ( !bDummyWindow )
aSize.Width() = pSplitWin->GetSizePixel().Width();
- // Wenn links ein Window sichtbar ist, beginnt der freie
- // Bereich rechts davon bzw. bei der Client area
+ // If a Window is visable to the left, then the free region
+ // starts to the right from it, for example at the Client area
long nLeft = aPos.X() + aSize.Width();
if ( nLeft > aArea.Left() )
aArea.Left() = nLeft;
@@ -2836,26 +2829,26 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
case ( 1 ) :
{
- // Rechtes SplitWindow
- // Position um Differenz der Breiten korrigieren
+ // Right SplitWindow
+ // Position to correct the difference of the widths
aPos.X() += aSize.Width();
- // Breite vom Fenster selbst holen, wenn nicht das DummyWindow
+ // Get the width of the Window yourself, if no DummyWindow
if ( !bDummyWindow )
aSize.Width() = pSplitWin->GetSizePixel().Width();
aPos.X() -= aSize.Width();
- // Wenn links schon ein Fenster aufgeklappt ist, darf
- // das rechte nicht dar"uber gehen
+ // If already a window is opened at the left side, then the
+ // right is not allowed to overlap this one.
if ( aPos.X() < aArea.Left() )
{
aPos.X() = aArea.Left();
aSize.Width() = aArea.GetWidth();
}
- // Wenn rechts ein Window sichtbar ist, endet der freie
- // Bereich links davon bzw. bei der Client area
+ // If a Window is visable to the right, then the free region
+ // starts to the left from it, for example at the Client area
long nRight = aPos.X();
if ( nRight < aArea.Right() )
aArea.Right() = nRight;
@@ -2863,18 +2856,19 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
case ( 2 ) :
{
- // Oberes SplitWindow
- // H"ohe vom Fenster selbst holen, wenn nicht das DummyWindow
+ // Top SplitWindow
+ // Get the height of the Window yourself, if no DummyWindow
if ( !bDummyWindow )
aSize.Height() = pSplitWin->GetSizePixel().Height();
- // Breite anpassen, je nachdem ob links oder rechts
- // schon ein Fenster aufgeklappt ist
+
+ // Adjust width with regard to if a Window is already open
+ // to the left or right
aPos.X() = aArea.Left();
aSize.Width() = aArea.GetWidth();
- // Wenn oben ein Window sichtbar ist, beginnt der freie
- // Bereich darunter bzw. bei der Client Area
+ // If a Window is visable at the top, then the free region
+ // starts beneath it, for example at the Client area
long nTop = aPos.Y() + aSize.Height();
if ( nTop > aArea.Top() )
aArea.Top() = nTop;
@@ -2882,23 +2876,23 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
case ( 3 ) :
{
- // Das untere SplitWindow
- // Position um Differenz der H"ohen korrigieren
+ // The bottom SplitWindow
+ // Position to correct the difference of the heights
aPos.Y() += aSize.Height();
- // H"ohe vom Fenster selbst holen, wenn nicht das DummmyWindow
+ // Get the height of the Window yourself, if no DummyWindow
if ( !bDummyWindow )
aSize.Height() = pSplitWin->GetSizePixel().Height();
aPos.Y() -= aSize.Height();
- // Breite anpassen, je nachdem ob links oder rechts
- // schon ein Fenster aufgeklappt ist
+ // Adjust width with regard to if a Window is already open
+ // to the left or right.
aPos.X() = aArea.Left();
aSize.Width() = aArea.GetWidth();
- // Wenn oben schon ein Fenster aufgeklappt ist, darf
- // das untere nicht dar"uber gehen
+ // If already a window is opened at the top, then the
+ // bottom one is not allowed to overlap this one.
if ( aPos.Y() < aArea.Top() )
{
aPos.Y() = aArea.Top();
@@ -2910,11 +2904,11 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
}
if ( !bDummyWindow )
- // Das FadeIn-Window ist ein Float, dessen Koordinaten in
- // Screenkoordinaten gesetzt werden
+ // the FadeIn-Window is a Floating window, which coordinates are
+ // set in Screen coordinates.
pSplitWin->SetPosSizePixel( pWorkWin->OutputToScreenPixel(aPos), aSize );
else
- // Das angedockte DummyWindow
+ // the docked DummyWindow
pDummy->SetPosSizePixel( aPos, aSize );
}
}
@@ -2990,14 +2984,14 @@ void SfxWorkWindow::SetActiveChild_Impl( Window *pChild )
pActiveChild = pChild;
}
-Window* SfxWorkWindow::GetActiveChild_Impl()
+Window* SfxWorkWindow::GetActiveChild_Impl()
{
return pActiveChild;
}
BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
{
- // Alle Kinder gem"a\s Liste sortieren
+ // Sort all children under list
SvUShorts aList;
for ( USHORT i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
{
@@ -3027,7 +3021,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
SfxChild_Impl *pAct=NULL;
if ( pActiveChild )
{
- // Das aktive Fenster suchen
+ // Look for the active window
for ( n=0; n<aList.Count(); n++ )
{
SfxChild_Impl* pCli = (*pChilds)[aList[n]];
@@ -3047,7 +3041,7 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
{
for ( USHORT i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
{
- // Eventuell ist pAct ein Splitwindow
+ // Maybe the pNext is a Splitwindow
SfxSplitWindow *p = pSplit[i];
if ( pAct->pWin == p )
{
@@ -3057,8 +3051,8 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
}
}
- // pAct ist ein direktes ChildWindow
- // mit dem Nachfolger bzw. Vorg"anger des aktiven Fensters weitermachen
+ // pAct is a direct ChildWindow
+ // continue with the successor or predecessor of the active window
if ( bForward )
n = n+1;
else
@@ -3076,11 +3070,11 @@ BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
SfxChild_Impl* pNext = pCli;
for ( USHORT i=0; n<SFX_SPLITWINDOWS_MAX; n++ )
{
- // Eventuell ist pNext ein Splitwindow
+ // Maybe the pNext is a Splitwindow
SfxSplitWindow *p = pSplit[i];
if ( pNext->pWin == p )
{
- // Das erste/letzte Fenster dort aktivieren
+ // Activate the first/last window
p->SetActiveWindow_Impl( NULL );
pNext = NULL;
if( p->ActivateNextChild_Impl( bForward ) )
diff --git a/sfx2/source/bastyp/bastyp.hrc b/sfx2/source/bastyp/bastyp.hrc
index 36e3047..decf21c 100644
--- a/sfx2/source/bastyp/bastyp.hrc
+++ b/sfx2/source/bastyp/bastyp.hrc
@@ -27,12 +27,12 @@
#include <sfx2/sfx.hrc>
-//fuer das Mapping Fehlercode -> ResId
+//for the mapping error code -> ResId
-#define RC_BASTYP RID_SFX_BASTYP_START
-#define STR_FILTER_NOT_INSTALLED (RC_BASTYP + 9)
-#define STR_FILTER_CONSULT_SERVICE (RC_BASTYP + 10)
-#define STR_MEMEXCEPTION (RC_BASTYP + 28)
-#define MSG_MEM_WARN (RC_BASTYP + 29)
-#define STR_HTML_GENERATOR (RC_BASTYP + 30)
+#define RC_BASTYP RID_SFX_BASTYP_START
+#define STR_FILTER_NOT_INSTALLED (RC_BASTYP + 9)
+#define STR_FILTER_CONSULT_SERVICE (RC_BASTYP + 10)
+#define STR_MEMEXCEPTION (RC_BASTYP + 28)
+#define MSG_MEM_WARN (RC_BASTYP + 29)
+#define STR_HTML_GENERATOR (RC_BASTYP + 30)
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index b083ef6..2285a8e 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -142,8 +142,8 @@ inline String ToUpper_Impl( const String &rStr )
class SfxFilterContainer_Impl
{
public:
- String aName;
- String aServiceName;
+ String aName;
+ String aServiceName;
SfxFilterContainer_Impl( const String& rName )
: aName( rName )
@@ -218,7 +218,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName
const SfxFilter* pFilter = aMatcher.GetFilter4FilterName(sDefaultFilter);
if (
- (pFilter
) &&
+ (pFilter
) &&
(pFilter->GetServiceName().CompareIgnoreCaseToAscii( sServiceName ) != COMPARE_EQUAL)
)
{
@@ -256,11 +256,11 @@ static SfxFilterMatcherArr_Impl* pImplArr = 0;
class SfxFilterMatcher_Impl
{
public:
- ::rtl::OUString aName;
- SfxFilterList_Impl* pList; // is created on demand
+ ::rtl::OUString aName;
+ SfxFilterList_Impl* pList; // is created on demand
- void InitForIterating() const;
- void Update();
+ void InitForIterating() const;
+ void Update();
SfxFilterMatcher_Impl()
: pList(0)
{}
@@ -390,18 +390,18 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
//----------------------------------------------------------------
-#define CHECKERROR()
\
-if( nErr == 1 || nErr == USHRT_MAX || nErr == ULONG_MAX ) \
-{
\
+#define CHECKERROR()
\
+if( nErr == 1 || nErr == USHRT_MAX || nErr == ULONG_MAX ) \
+{
\
ByteString aText = "Fehler in FilterDetection: Returnwert ";\
- aText += ByteString::CreateFromInt32(nErr); \
- if( pFilter )
\
- {
\
- aText += ' ';
\
+ aText += ByteString::CreateFromInt32(nErr); \
+ if( pFilter )
\
+ {
\
+ aText += ' ';
\
aText += ByteString(U2S(pFilter->GetFilterName())); \
- }
\
- DBG_ERROR( aText.GetBuffer() ); \
- nErr = ERRCODE_ABORT;
\
+ }
\
+ DBG_ERROR( aText.GetBuffer() ); \
+ nErr = ERRCODE_ABORT;
\
}
//----------------------------------------------------------------
@@ -486,7 +486,7 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
{
if ( pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL )
{
- // Hier k"onnte noch eine Nachinstallation angeboten werden
+ // Here could a re-installation be offered
String aText( SfxResId( STR_FILTER_NOT_INSTALLED ) );
aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
QueryBox aQuery( NULL, WB_YES_NO | WB_DEF_YES, aText );
@@ -494,11 +494,11 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
if ( nRet == RET_YES )
{
#ifdef DBG_UTIL
- // Setup starten
- InfoBox( NULL, DEFINE_CONST_UNICODE("Hier soll jetzt das Setup starten!") ).Execute();
+ // Start Setup
+ InfoBox( NULL, DEFINE_CONST_UNICODE("Here should the Setup now be starting!")
).Execute();
#endif
- // Installation mu\s hier noch mitteilen, ob es geklappt hat, dann kann das
- // Filterflag gel"oscht werden
+ // Installation must still give feedback if it worked or not,
+ // then the Filterflag be deleted
}
return ( !(pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL) );
@@ -516,9 +516,9 @@ sal_Bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter )
sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**ppFilter, sal_Bool
/*bPlugIn*/, sal_Bool bAPI ) const
-/* [Beschreibung]
+/* [Description]
- Hier wird noch die Filterauswahlbox hochgezogen. Sonst GuessFilter
+ Here the Filter selection box is pulled up. Otherwise GuessFilter
*/
{
@@ -557,17 +557,18 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const
SfxFilter**
{
const SfxFilter* pInstallFilter = NULL;
- // Jetzt auch Filter testen, die nicht installiert sind ( ErrCode ist irrelevant )
+ // Now test the filter which are not installed (ErrCode is irrelevant)
GuessFilter( rMedium, &pInstallFilter, SFX_FILTER_IMPORT, SFX_FILTER_CONSULTSERVICE );
if ( pInstallFilter )
{
if ( IsFilterInstalled_Impl( pInstallFilter ) )
- // Eventuell wurde der Filter nachinstalliert
+ // Maybe the filter was installed was installed afterwards.
pFilter = pInstallFilter;
}
else
{
- // Jetzt auch Filter testen, die erst von Star bezogen werden m"ussen ( ErrCode ist
irrelevant )
+ // Now test the filter, which first must be obtained by Star
+ // (ErrCode is irrelevant)
GuessFilter( rMedium, &pInstallFilter, SFX_FILTER_IMPORT, 0 );
if ( pInstallFilter )
IsFilterInstalled_Impl( pInstallFilter );
@@ -835,7 +836,7 @@ SfxFilterMatcherIter::SfxFilterMatcherIter(
: nOrMask( nOrMaskP ), nAndMask( nAndMaskP ),
nCurrent(0), pMatch( pMatchP->pImpl)
{
- if( nOrMask == 0xffff ) //Wg. Fehlbuild auf s
+ if( nOrMask == 0xffff ) //Due to falty build on s
nOrMask = 0;
pMatch->InitForIterating();
}
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
index 791298a..aa72c06 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -52,30 +52,30 @@
#define SFX_HTMLFRMSIZE_PERCENT 0x0002
static sal_Char const sHTML_SC_yes[] = "YES";
-static sal_Char const sHTML_SC_no[] = "NO";
+static sal_Char const sHTML_SC_no[] = "NO";
static sal_Char const sHTML_SC_auto[] = "AUTO";
#define HTML_O_READONLY "READONLY"
-#define HTML_O_EDIT "EDIT"
+#define HTML_O_EDIT "EDIT"
static HTMLOptionEnum const aScollingTable[] =
{
- { sHTML_SC_yes, ScrollingYes },
- { sHTML_SC_no, ScrollingNo },
- { sHTML_SC_auto, ScrollingAuto },
- { 0, 0 }
+ { sHTML_SC_yes, ScrollingYes },
+ { sHTML_SC_no, ScrollingNo },
+ { sHTML_SC_auto, ScrollingAuto },
+ { 0, 0 }
};
void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HTMLOptions
*pOptions, const String& rBaseURL )
{
- // die Optionen holen und setzen
+ // Get and set the options
Size aMargin( pFrame->GetMargin() );
- // MIB 15.7.97: Netscape scheint marginwidth auf 0 zu setzen, sobald
- // marginheight gesetzt wird und umgekehrt. Machen wir jetzt wegen
- // bug #41665# auch so.
- // Netscape l"a\st aber ein direktes Setzen auf 0 nicht zu, IE4.0 schon.
- // Den Bug machen wir nicht mit!
+ // MIB 07/15/1997: Netscape seems to set marginwidth to 0 as soon as
+ // marginheight is set, and vice versa. Due to bug #41665# let us also
+ // do öike that for now. Netscape does however not aallow for a direct
+ // seting to 0, while IE4.0 does
+ // We will not mimic that bug !
BOOL bMarginWidth = FALSE, bMarginHeight = FALSE;
USHORT nArrLen = pOptions->Count();
@@ -103,8 +103,8 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
case HTML_O_MARGINWIDTH:
aMargin.Width() = pOption->GetNumber();
-// if( aMargin.Width() < 1 )
-// aMargin.Width() = 1;
+// if( aMargin.Width() < 1 )
+// aMargin.Width() = 1;
if( !bMarginHeight )
aMargin.Height() = 0;
bMarginWidth = TRUE;
@@ -112,8 +112,8 @@ void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame, const HT
case HTML_O_MARGINHEIGHT:
aMargin.Height() = pOption->GetNumber();
-// if( aMargin.Height() < 1 )
-// aMargin.Height() = 1;
+// if( aMargin.Height() < 1 )
+// aMargin.Height() = 1;
if( !bMarginWidth )
aMargin.Width() = 0;
bMarginHeight = TRUE;
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index f7b597a..bcc40bc 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -69,11 +69,11 @@ static sal_Char const sHTML_MIME_text_html[] = "text/html; charset=";
/* not used anymore?
static HTMLOutEvent aFrameSetEventTable[] =
{
- { sHTML_O_SDonload, sHTML_O_onload, SFX_EVENT_OPENDOC },
- { sHTML_O_SDonunload, sHTML_O_onunload, SFX_EVENT_PREPARECLOSEDOC },
- { sHTML_O_SDonfocus, sHTML_O_onfocus, SFX_EVENT_ACTIVATEDOC },
- { sHTML_O_SDonblur, sHTML_O_onblur, SFX_EVENT_DEACTIVATEDOC },
- { 0, 0, 0
}
+ { sHTML_O_SDonload, sHTML_O_onload, SFX_EVENT_OPENDOC },
+ { sHTML_O_SDonunload, sHTML_O_onunload, SFX_EVENT_PREPARECLOSEDOC },
+ { sHTML_O_SDonfocus, sHTML_O_onfocus, SFX_EVENT_ACTIVATEDOC },
+ { sHTML_O_SDonblur, sHTML_O_onblur, SFX_EVENT_DEACTIVATEDOC },
+ { 0, 0, 0
}
};
*/
@@ -88,7 +88,7 @@ void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
const String& rName,
const String& rContent, BOOL bHTTPEquiv,
rtl_TextEncoding eDestEnc,
- String *pNonConvertableChars )
+ String *pNonConvertableChars )
{
rStrm << sNewLine;
if( pIndent )
@@ -96,7 +96,7 @@ void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
ByteString sOut( '<' );
(((sOut += OOO_STRING_SVTOOLS_HTML_meta) += ' ')
- += (bHTTPEquiv ? OOO_STRING_SVTOOLS_HTML_O_httpequiv : OOO_STRING_SVTOOLS_HTML_O_name))
+= "=\"";
+ += (bHTTPEquiv ? OOO_STRING_SVTOOLS_HTML_O_httpequiv : OOO_STRING_SVTOOLS_HTML_O_name)) +=
"=\"";
rStrm << sOut.GetBuffer();
HTMLOutFuncs::Out_String( rStrm, rName, eDestEnc, pNonConvertableChars );
@@ -111,7 +111,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
const uno::Reference<document::XDocumentProperties> & i_xDocProps,
const sal_Char *pIndent,
rtl_TextEncoding eDestEnc,
- String *pNonConvertableChars )
+ String *pNonConvertableChars )
{
const sal_Char *pCharSet =
rtl_getBestMimeCharsetFromTextEncoding( eDestEnc );
@@ -277,7 +277,7 @@ void SfxFrameHTMLWriter::OutHeader( rtl_TextEncoding eDestEnc )
Strm() << sNewLine;
HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_head, FALSE ) << sNewLine;
-//! OutScript(); // Hier fehlen noch die Scripten im Header
+//! OutScript(); // Hear the scripts in the Header are still missing
}
*/
@@ -371,7 +371,7 @@ String SfxFrameHTMLWriter::CreateURL( SfxFrame* pFrame )
if( !aRet.Len() && pShell )
{
aRet = pShell->GetMedium()->GetName();
-//!(dv) CntAnchor::ToPresentationURL( aRet );
+//!(dv) CntAnchor::ToPresentationURL( aRet );
}
return aRet;
diff --git a/sfx2/source/bastyp/minarray.cxx b/sfx2/source/bastyp/minarray.cxx
index 54daf35..7ed7c52 100644
--- a/sfx2/source/bastyp/minarray.cxx
+++ b/sfx2/source/bastyp/minarray.cxx
@@ -101,7 +101,7 @@ void SfxPtrArr::Append( void* aElem )
{
DBG_MEMTEST();
DBG_ASSERT( sal::static_int_cast< unsigned >(nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array
too large" );
- // musz das Array umkopiert werden?
+ // Does the Array need to be copied?
if ( nUnused == 0 )
{
USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
@@ -116,7 +116,7 @@ void SfxPtrArr::Append( void* aElem )
pData = pNewData;
}
- // jetzt hinten in den freien Raum schreiben
+ // now write at the back in the open space
pData[nUsed] = aElem;
++nUsed;
--nUnused;
@@ -127,14 +127,14 @@ void SfxPtrArr::Append( void* aElem )
USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
{
DBG_MEMTEST();
- // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ // Adjust nLen, thus to avoid deleting beyond the end
nLen = Min( (USHORT)(nUsed-nPos), nLen );
- // einfache Aufgaben erfordern einfache Loesungen!
+ // simple problems require simple solutions!
if ( nLen == 0 )
return 0;
- // bleibt vielleicht keiner uebrig
+ // Maybe no one will remain
if ( (nUsed-nLen) == 0 )
{
delete [] pData;
@@ -144,10 +144,10 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // feststellen, ob das Array dadurch physikalisch schrumpft...
+ // Determine whether the array has physically shrunk...
if ( (nUnused+nLen) >= nGrow )
{
- // auf die naechste Grow-Grenze aufgerundet verkleinern
+ // reduce (rounded up) to the next Grow-border
USHORT nNewUsed = nUsed-nLen;
USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
@@ -168,7 +168,7 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // in allen anderen Faellen nur zusammenschieben
+ // in all other cases, only push together
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(void*) );
nUsed = nUsed - nLen;
@@ -181,11 +181,11 @@ USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
BOOL SfxPtrArr::Remove( void* aElem )
{
DBG_MEMTEST();
- // einfache Aufgaben ...
+ // simple tasks ...
if ( nUsed == 0 )
return FALSE;
- // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ // backwards, since most of the last is first removed
void* *pIter = pData + nUsed - 1;
for ( USHORT n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
@@ -201,11 +201,11 @@ BOOL SfxPtrArr::Remove( void* aElem )
BOOL SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
{
DBG_MEMTEST();
- // einfache Aufgaben ...
+ // simple tasks ...
if ( nUsed == 0 )
return FALSE;
- // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ // backwards, since most of the last is first removed
void* *pIter = pData + nUsed - 1;
for ( USHORT n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aOldElem )
@@ -240,10 +240,10 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
{
DBG_MEMTEST();
DBG_ASSERT( sal::static_int_cast< unsigned >(nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array
too large" );
- // musz das Array umkopiert werden?
+ // Does the Array have o be copied?
if ( nUnused == 0 )
{
- // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ // increase (rounded up ) to the next Grow-border
USHORT nNewSize = nUsed+nGrow;
void** pNewData = new void*[nNewSize];
@@ -257,11 +257,11 @@ void SfxPtrArr::Insert( USHORT nPos, void* rElem )
pData = pNewData;
}
- // jetzt den hinteren Teil verschieben
+ // Now move the rear part
if ( nPos < nUsed )
memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(void*) );
- // jetzt in den freien Raum schreiben
+ // Now write into the free space.
memmove( pData+nPos, &rElem, sizeof(void*) );
nUsed += 1;
nUnused -= 1;
@@ -336,7 +336,7 @@ ByteArr& ByteArr::operator=( const ByteArr& rOrig )
void ByteArr::Append( char aElem )
{
DBG_MEMTEST();
- // musz das Array umkopiert werden?
+ // Does the Array have o be copied?
if ( nUnused == 0 )
{
USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
@@ -351,7 +351,7 @@ void ByteArr::Append( char aElem )
pData = pNewData;
}
- // jetzt hinten in den freien Raum schreiben
+ // now write at the back in the open space
pData[nUsed] = aElem;
++nUsed;
--nUnused;
@@ -362,14 +362,14 @@ void ByteArr::Append( char aElem )
USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
{
DBG_MEMTEST();
- // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ // Adjust nLen, thus to avoid deleting beyond the end
nLen = Min( (USHORT)(nUsed-nPos), nLen );
- // einfache Aufgaben erfordern einfache Loesungen!
+ // simple problems require simple solutions!
if ( nLen == 0 )
return 0;
- // bleibt vielleicht keiner uebrig
+ // Maybe no one will remain
if ( (nUsed-nLen) == 0 )
{
delete [] pData;
@@ -379,10 +379,10 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // feststellen, ob das Array dadurch physikalisch schrumpft...
+ // Determine whether the array has physically shrunk...
if ( (nUnused+nLen) >= nGrow )
{
- // auf die naechste Grow-Grenze aufgerundet verkleinern
+ // reduce (rounded up) to the next Grow-border
USHORT nNewUsed = nUsed-nLen;
USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
@@ -403,7 +403,7 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // in allen anderen Faellen nur zusammenschieben
+ // in all other cases, only push together
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(char) );
nUsed = nUsed - nLen;
@@ -416,11 +416,11 @@ USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
BOOL ByteArr::Remove( char aElem )
{
DBG_MEMTEST();
- // einfache Aufgaben ...
+ // simple tasks ...
if ( nUsed == 0 )
return FALSE;
- // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ // backwards, since most of the last is first removed
char *pIter = pData + nUsed - 1;
for ( USHORT n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
@@ -454,10 +454,10 @@ BOOL ByteArr::Contains( const char rItem ) const
void ByteArr::Insert( USHORT nPos, char rElem )
{
DBG_MEMTEST();
- // musz das Array umkopiert werden?
+ // Does the Array need to be copied?
if ( nUnused == 0 )
{
- // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ // increase (rounded up) to the next Grow-border
USHORT nNewSize = nUsed+nGrow;
char* pNewData = new char[nNewSize];
@@ -471,11 +471,11 @@ void ByteArr::Insert( USHORT nPos, char rElem )
pData = pNewData;
}
- // jetzt den hinteren Teil verschieben
+ // Now move the rear part
if ( nPos < nUsed )
memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(char) );
- // jetzt in den freien Raum schreiben
+ // now write at the back in the open space
memmove( pData+nPos, &rElem, sizeof(char) );
nUsed += 1;
nUnused -= 1;
@@ -568,7 +568,7 @@ WordArr& WordArr::operator=( const WordArr& rOrig )
void WordArr::Append( short aElem )
{
DBG_MEMTEST();
- // musz das Array umkopiert werden?
+ // Does the Array need to be copied?
if ( nUnused == 0 )
{
USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
@@ -583,7 +583,7 @@ void WordArr::Append( short aElem )
pData = pNewData;
}
- // jetzt hinten in den freien Raum schreiben
+ // now write at the back in the open space
pData[nUsed] = aElem;
++nUsed;
--nUnused;
@@ -594,14 +594,14 @@ void WordArr::Append( short aElem )
USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
{
DBG_MEMTEST();
- // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ // Adjust nLen, thus to avoid deleting beyond the end
nLen = Min( (USHORT)(nUsed-nPos), nLen );
- // einfache Aufgaben erfordern einfache Loesungen!
+ // simple problems require simple solutions!
if ( nLen == 0 )
return 0;
- // bleibt vielleicht keiner uebrig
+ // Maybe no one will remain
if ( (nUsed-nLen) == 0 )
{
delete [] pData;
@@ -611,10 +611,10 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // feststellen, ob das Array dadurch physikalisch schrumpft...
+ // Determine whether the array has physically shrunk...
if ( (nUnused+nLen) >= nGrow )
{
- // auf die naechste Grow-Grenze aufgerundet verkleinern
+ // reduce (rounded up) to the next Grow-border
USHORT nNewUsed = nUsed-nLen;
USHORT nNewSize = ((nNewUsed+nGrow-1)/nGrow) * nGrow;
DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
@@ -635,7 +635,7 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
return nLen;
}
- // in allen anderen Faellen nur zusammenschieben
+ // in all other cases, only push together
if ( nUsed-nPos-nLen > 0 )
memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(short) );
nUsed = nUsed - nLen;
@@ -648,11 +648,11 @@ USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
BOOL WordArr::Remove( short aElem )
{
DBG_MEMTEST();
- // einfache Aufgaben ...
+ // simple tasks ...
if ( nUsed == 0 )
return FALSE;
- // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ // backwards, since most of the last is first removed
short *pIter = pData + nUsed - 1;
for ( USHORT n = 0; n < nUsed; ++n, --pIter )
if ( *pIter == aElem )
@@ -686,10 +686,10 @@ BOOL WordArr::Contains( const short rItem ) const
void WordArr::Insert( USHORT nPos, short rElem )
{
DBG_MEMTEST();
- // musz das Array umkopiert werden?
+ // Does the Array need to be copied?
if ( nUnused == 0 )
{
- // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ // increase (rounded up) to the next Grow-border
USHORT nNewSize = nUsed+nGrow;
short* pNewData = new short[nNewSize];
@@ -703,11 +703,11 @@ void WordArr::Insert( USHORT nPos, short rElem )
pData = pNewData;
}
- // jetzt den hinteren Teil verschieben
+ // Now move the rear part
if ( nPos < nUsed )
memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(short) );
- // jetzt in den freien Raum schreiben
+ // now write at the back in the open space
memmove( pData+nPos, &rElem, sizeof(short) );
nUsed += 1;
nUnused -= 1;
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index d4c7f14..976d0fe 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -38,7 +38,7 @@
#include <svl/eitem.hxx>
#include <tools/time.hxx>
-// wg. nRescheduleLocks
+// includes below due to nRescheduleLocks
#include "appdata.hxx"
#include <sfx2/request.hxx>
#include <sfx2/frame.hxx>
@@ -80,18 +80,18 @@ struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
String aText, aStateText;
- ULONG nMax;
- clock_t nCreate;
- clock_t nNextReschedule;
- BOOL bLocked, bAllDocs;
- BOOL bWaitMode;
- BOOL bAllowRescheduling;
- BOOL bRunning;
+ ULONG nMax;
+ clock_t nCreate;
+ clock_t nNextReschedule;
+ BOOL bLocked, bAllDocs;
+ BOOL bWaitMode;
+ BOOL bAllowRescheduling;
+ BOOL bRunning;
BOOL bIsStatusText;
SfxProgress* pActiveProgress;
- SfxObjectShellRef xObjSh;
- SfxWorkWindow* pWorkWin;
+ SfxObjectShellRef xObjSh;
+ SfxWorkWindow* pWorkWin;
SfxViewFrame* pView;
SfxProgress_Impl( const String& );
@@ -101,11 +101,11 @@ struct SfxProgress_Impl
//========================================================================
-#define TIMEOUT_PROGRESS 5L /* 10th s */
-#define MAXPERCENT_PROGRESS 33
+#define TIMEOUT_PROGRESS 5L /* 10th s */
+#define MAXPERCENT_PROGRESS 33
-#define TIMEOUT_RESCHEDULE 10L /* 10th s */
-#define MAXPERCENT_RESCHEDULE 50
+#define TIMEOUT_RESCHEDULE 10L /* 10th s */
+#define MAXPERCENT_RESCHEDULE 50
#define Progress
#include "sfxslots.hxx"
@@ -149,31 +149,30 @@ SfxProgress_Impl::SfxProgress_Impl( const String &/*rTitle*/ )
SfxProgress::SfxProgress
(
- SfxObjectShell* pObjSh, /* SfxObjectShell, an der die Aktion ausgef"uhrt
- wird. Kann NULL sein, dann wird die Applikation
- verwendet */
+ SfxObjectShell* pObjSh, /* The action is performed on the
+ SfxObjectShell which can be NULL.
+ When it is then the application will be
+ used */
- const String& rText, /* Text, der in der Statuszeile vor den Statusmonitor
- erscheint */
+ const String& rText, /* Text, which appears before the Statusmonitor
+ in the status line */
- ULONG nRange, /* Maximalwert des Bereiches */
+ ULONG nRange, /* Max value for range */
- BOOL bAll /* alle Dokumente oder nur das Dokument des ViewFrames
- disablen (FALSE) */
- ,BOOL bWait /* initial den Wait-Pointer aktivieren (TRUE) */
+ BOOL bAll /* Disable all documents or only the document of the ViewFram */
+ ,BOOL bWait /* Aktivate the wait-Pointer initially (TRUE) */
)
-/* [Beschreibung]
+/* [Description]
- Der Konstruktor der Klasse SfxProgress schaltet den als Parameter
- "ubergebenen SfxObjectShell und SfxViewFrames, welche dieses Dokument
- anzeigen in einen Progress-Mode. D.h. solange eine dieser SfxViewFrame
- Instanzen aktiv ist, ist der dazugeh"orige SfxDispatcher und das
- dazugeh"orige Window disabled. In der Statuszeile wird ein Balken zur
- Fortschritts-Anzeige angezeigt.
+ The constructor of the class SfxProgress switches the SfxObjectShell
+ passed as parameter and SfxViewFrames which display this document in
+ a progress mode. Ie as long as one of those SfxViewFrame instances is
+ active the associated SfxDispatcher and associated Window is disabled.
+ A progress-bar will be displayed in the status bar,
*/
-: pImp( new SfxProgress_Impl( rText ) ),
+: pImp( new SfxProgress_Impl( rText ) ),
nVal(0),
bSuspended(TRUE)
{
@@ -206,11 +205,10 @@ SfxProgress::SfxProgress
SfxProgress::~SfxProgress()
-/* [Beschreibung]
+/* [Description]
- Der Destruktor der Klasse SfxProgress restauriert den alten Zustand;
- die Dokumente werden wieder freigeschaltet und die Statuszeile zeigt
- wieder Items an.
+ The destructor of the class SfxProgress restores the old status,
+ the documents are released again and the status bar shows the items again.
*/
{
@@ -227,9 +225,9 @@ SfxProgress::~SfxProgress()
void SfxProgress::Stop()
-/* [Beschreibung]
+/* [Description]
- Vorzeitiges Beenden des <SfxProgress>.
+ Early Exit of <SfxProgress>.
*/
{
@@ -258,13 +256,12 @@ void SfxProgress::Stop()
void SfxProgress::SetText
(
- const String& /* neuer Text */
+ const String& /* new Text */
)
-/* [Beschreibung]
+/* [Description]
- "Andert den Text, der links neben dem Fortschritts-Balken
- angezeigt wird.
+ Changes the text that appears to the left next to progress bar.
*/
{
@@ -306,7 +303,7 @@ IMPL_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus*, pStatus )
// -----------------------------------------------------------------------
-// muss in AppDaten
+// Required in App data
static ULONG nLastTime = 0;
long TimeOut_Impl( void*, void* pArgV )
@@ -326,9 +323,9 @@ long TimeOut_Impl( void*, void* pArgV )
BOOL SfxProgress::SetStateText
(
- ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
- const String& rNewVal, /* Status als Text */
- ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten
*/
+ ULONG nNewVal, /* New value for the progress-bar */
+ const String& rNewVal, /* Status as Text */
+ ULONG nNewRange /* new maximum value, 0 for retaining the old */
)
{
@@ -340,37 +337,32 @@ BOOL SfxProgress::SetStateText
BOOL SfxProgress::SetState
(
- ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
+ ULONG nNewVal, /* new value for the progress bar */
- ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
+ ULONG nNewRange /* new maximum value, 0 for retaining the old */
)
-/* [Beschreibung]
+/* [Description]
- Setzen des aktuellen Status; nach einem zeitlichen Versatz
- wird Reschedule aufgerufen.
+ Setting the current status, after a time delay Reschedule is called.
+ [Return value]
- [R"uckgabewert]
-
- BOOL TRUE
- Fortfahren mit der Aktion
-
- FALSE
- Abbrechen der Aktion
+ BOOL TRUE Proceed with the action
+ FALSE Cancel action
*/
{
- // wurde via Stop-Button angehalten?
-// if ( pImp->IsCancelled() )
-// return FALSE;
+ // Was stoped by Stop-Button?
+// if ( pImp->IsCancelled() )
+// return FALSE;
if( pImp->pActiveProgress ) return TRUE;
- // neuen Wert "ubernehmen
+ // transfer new value
BOOL bOver=FALSE;
nVal = nNewVal;
- // neuer Range?
+ // new Range?
if ( nNewRange && nNewRange != pImp->nMax )
{
DBG( DbgOutf( "SfxProgress: range changed from %lu to %lu",
@@ -442,11 +434,12 @@ BOOL SfxProgress::SetState
void SfxProgress::Resume()
-/* [Beschreibung]
+/* [Description]
- Nimmt die Anzeige des Status nach einer Unterbrechung wieder auf.
+ Resumed the status of the display after an interrupt.
- [Querverweise]
+ [Cross-reference]
+
<SfxProgress::Suspend()>
*/
@@ -487,11 +480,12 @@ void SfxProgress::Resume()
void SfxProgress::Suspend()
-/* [Beschreibung]
+/* [Description]
- Unterbricht die Anzeige des Status
+ Interrupts the status of the display
- [Querverweise]
+ [Cross-reference]
+
<SfxProgress::Resume()>
*/
@@ -529,8 +523,8 @@ void SfxProgress::Suspend()
void SfxProgress::Lock()
{
if( pImp->pActiveProgress ) return;
- // kein Reschedule bei Embedded-Objekten,
- // da wir gegen das OLE Protokoll wehrlos sind
+ // No Reschedule for Embedded-Objects,
+ // because we are defenseless against the OLE protocol
if ( !pImp->xObjSh.Is() )
{
for ( SfxObjectShell *pDocSh = SfxObjectShell::GetFirst();
@@ -580,10 +574,9 @@ void SfxProgress::UnLock()
void SfxProgress::Reschedule()
-/* [Beschreibung]
-
- Reschedule von au"sen rufbar
+/* [Description]
+ Reschedule, callable from the outside
*/
{
@@ -607,17 +600,14 @@ void SfxProgress::Reschedule()
void SfxProgress::SetWaitMode
(
- BOOL bWait /* TRUE
- Wartecursor wird verwendet
+ BOOL bWait /* TRUE Wait-cursor is used
- FALSE
- Es wird kein Wartecursor verwendet */
+ FALSE Wait-cursor not used */
)
-/* [Beschreibung]
-
- Wartecursor-Modus umschalten.
+/* [Description]
+ Switch Wait-mode.
*/
{
@@ -655,10 +645,9 @@ void SfxProgress::SetWaitMode
BOOL SfxProgress::GetWaitMode() const
-/* [Beschreibung]
-
- Wartecursor-Modus abfragen.
+/* [Description]
+ Get Wait-cursor mode.
*/
{
@@ -669,36 +658,34 @@ BOOL SfxProgress::GetWaitMode() const
SfxProgress* SfxProgress::GetActiveProgress
(
- SfxObjectShell* pDocSh /* <SfxObjectShell>, die nach einem laufenden
- <SfxProgress> gefragt werden soll, oder
- 0, wenn ein f"ur die gesamte Applikation
- laufender SfxProgress erfragt werden soll.
- Der Pointer braucht nur zum Zeitpunkt des
- Aufrufs g"ultig zu sein. */
+ SfxObjectShell* pDocSh /* the <SfxObjectShell>, which should be
+ queried after a current <SfxProgress>,
+ or 0 if an current SfxProgress for the
+ entire application should be obtained.
+ The pointer only needs at the time of
+ the call to be valid.
+ */
)
-/* [Beschreibung]
-
- Mit dieser Methode kann erfragt werden, ob und welcher <SfxProgress>-
- f"ur eine bestimmte Instanz von SfxObjectShell oder gar die gesamte
- Applikation zur Zeit aktiv ist. Dies kann z.B. zum Abfangen von
- Time-Out-Events etc. verwendet werden.
-
- Anstelle eines Pointer auf den SfxProgress der SfxObjectShell wird
- ggf. der auf den SfxProgress der Applikation geliefert, mit der
- Abfrage 'SfxProgress::GetActiveProgress(pMyDocSh)' wird also
- insofern vorhanden der SfxProgress von 'pMyDocSh' geliefert,
- sonst der SfxProgress der Applikation bzw. ein 0-Pointer.
+/* [Description]
+ This method is used to check whether and which <SfxProgress> is currently
+ active for a specific instance of SfxObjectShell or even an entire
+ application. This can for example be used to check for Time-Out-Events, etc.
- [Anmerkung]
+ Instead of a pointer to the SfxProgress the SfxObjectShell may be
+ pointed at the SfxProgress of the application, with the query
+ 'SfxProgress:: GetActiveProgress (pMyDocSh)' thus the current
+ SfxProgress of 'pMyDocSh' is delivered, otherwise the SfxProgress of
+ the application or a 0-pointer.
- "auft kein SfxProgress an der Applikation und ebenfalls keiner an
- der angegebenen SfxObjectShell, dann wird immer 0 zur"uckgeliefert,
- auch wenn an einer anderen SfxObjectShell ein SfxProgress l"uft.
+ [Note]
+ If no SfxProgress is running in the application and also not at the
+ specified SfxObjectShell, then this method will always return 0,
+ even if one SfxProgress runs on another SfxObjectShell.
- [Querverweise]
+ [Cross-reference]
<SfxApplication::GetProgress()const>
<SfxObjectShell::GetProgress()const>
@@ -736,14 +723,13 @@ void SfxProgress::LeaveLock()
bool SfxProgress::StatusBarManagerGone_Impl
(
- SfxStatusBarManager * // dieser <SfxStatusBarManager> wird zerst"ort
+ SfxStatusBarManager * // This <SfxStatusBarManager> will be destroyed
)
-/* [Beschreibung]
+/* [Description]
- Interne Methode zum Benachrichtigen des SfxProgress, da\s der angegebene
- SfxStatusBarManger zerst"ort wird. Damit der Progress ihn loslassen
- kann.
+ Internal method for notifying the SfxProgress that the specified
+ SfxStatusBarManger will be destroyed so that the Progress can let go of it.
*/
{
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index c0d97a0..4125716 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -65,13 +65,13 @@ sal_Char sHTML_MIME_experimental[] = "x-";
// <INPUT TYPE=xxx>
static HTMLOptionEnum const aAreaShapeOptEnums[] =
{
- { OOO_STRING_SVTOOLS_HTML_SH_rect, IMAP_OBJ_RECTANGLE },
- { OOO_STRING_SVTOOLS_HTML_SH_rectangle, IMAP_OBJ_RECTANGLE },
- { OOO_STRING_SVTOOLS_HTML_SH_circ, IMAP_OBJ_CIRCLE },
- { OOO_STRING_SVTOOLS_HTML_SH_circle, IMAP_OBJ_CIRCLE },
- { OOO_STRING_SVTOOLS_HTML_SH_poly, IMAP_OBJ_POLYGON },
- { OOO_STRING_SVTOOLS_HTML_SH_polygon, IMAP_OBJ_POLYGON },
- { 0, 0 }
+ { OOO_STRING_SVTOOLS_HTML_SH_rect, IMAP_OBJ_RECTANGLE },
+ { OOO_STRING_SVTOOLS_HTML_SH_rectangle, IMAP_OBJ_RECTANGLE },
+ { OOO_STRING_SVTOOLS_HTML_SH_circ, IMAP_OBJ_CIRCLE },
+ { OOO_STRING_SVTOOLS_HTML_SH_circle, IMAP_OBJ_CIRCLE },
+ { OOO_STRING_SVTOOLS_HTML_SH_poly, IMAP_OBJ_POLYGON },
+ { OOO_STRING_SVTOOLS_HTML_SH_polygon, IMAP_OBJ_POLYGON },
+ { 0, 0 }
};
SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
@@ -86,7 +86,7 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
"SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" );
// Altough the real default encoding is ISO8859-1, we use MS-1252
- // als default encoding.
+ // as default encoding.
SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) );
// If the file starts with a BOM, switch to UCS2.
@@ -95,15 +95,15 @@ SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bIsNewDoc,
SfxHTMLParser::~SfxHTMLParser()
{
- DBG_ASSERT( !pDLMedium, "Da ist ein File-Download stehengeblieben" );
+ DBG_ASSERT( !pDLMedium, "Here is a File Download that has got stuck" );
delete pDLMedium;
}
BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
const HTMLOptions * pOptions)
{
- DBG_ASSERT( pImageMap, "ParseMapOptions: keine Image-Map" );
- DBG_ASSERT( pOptions, "ParseMapOptions: keine Optionen" );
+ DBG_ASSERT( pImageMap, "ParseMapOptions: No Image-Map" );
+ DBG_ASSERT( pOptions, "ParseMapOptions: No Options" );
String aName;
@@ -129,8 +129,8 @@ BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap, const String& rBaseUR
USHORT nEventMouseOver,
USHORT nEventMouseOut )
{
- DBG_ASSERT( pImageMap, "ParseAreaOptions: keine Image-Map" );
- DBG_ASSERT( pOptions, "ParseAreaOptions: keine Optionen" );
+ DBG_ASSERT( pImageMap, "ParseAreaOptions: no Image-Map" );
+ DBG_ASSERT( pOptions, "ParseAreaOptions: no Options" );
USHORT nShape = IMAP_OBJ_RECTANGLE;
SvULongs aCoords;
@@ -247,41 +247,42 @@ IMAPOBJ_SETEVENT:
void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
SfxObjectShell *pSh )
{
- DBG_ASSERT( !pDLMedium, "StartFileDwonload bei aktivem Download" );
+ DBG_ASSERT( !pDLMedium, "StartFileDownload when active Download" );
if( pDLMedium )
return;
pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, FALSE );
if( pSh )
{
- // Medium registrieren, damit abgebrochen werden kann
+ // Register the medium, so that it can be stopped.
pSh->RegisterTransfer( *pDLMedium );
- // Target-Frame uebertragen, damit auch javascript:-URLs
- // "geladen" werden koennen.
+ // Transfer Target-Frame, so that also the javascript:-URLs
+ // can be "loaded".
//const SfxMedium *pShMedium = pSh->GetMedium();
//if( pShMedium )
- // pDLMedium->SetLoadTargetFrame( pShMedium->GetLoadTargetFrame() );
+ // pDLMedium->SetLoadTargetFrame( pShMedium->GetLoadTargetFrame() );
}
- // Download anstossen (Achtung: Kann auch synchron sein).
+ // Push Download (Note: Can also be synchronous).
if ( TRUE /*pMedium->GetDoneLink() == Link()*/ )
pDLMedium->DownLoad();
else
{
- // Downloading-Flag auf TRUE setzen. Es werden dann auch
- // Data-Available-Links, wenn wir in den Pending-Staus gelangen.
+ // Set Downloading-Flag to TRUE. When we get into the Pending-status
+ // we will then also have Data-Available-Links.
SetDownloadingFile( TRUE );
pDLMedium->DownLoad( STATIC_LINK( this, SfxHTMLParser, FileDownloadDone ) );
- // Wenn das Dowsnloading-Flag noch gesetzt ist erfolgt der Download
- // asynchron. Wir gehen dann in den Pedning-Staus und warten dort.
- // Solange sind alle Aufrufe des Data-Avaialble-Link gesperrt.
+ // If the Downloading-Flag is still set downloading will be done
+ // asynchronously. We will go into Pedning-status and wait there.
+ // As long as we are there all calls to the Data-Link Avaialble are
+ // locked.
if( IsDownloadingFile() )
{
- // Den aktuellen Zustand einfrieren und in den Pending-Status gehen.
- // Wenn der Download beendet oder abgebrochen wurde, wird ueber
- // NewDataRead ein Continue mit dem uebergeben Token angesteossen.
+ // Unfreeze the current state and go into the Pending-Status.
+ // When the download is completed or aborted, a Continue with
+ // the transfer token will be pushed by passedNewDataRead.
SaveState( nToken );
eState = SVPAR_PENDING;
}
@@ -305,7 +306,7 @@ BOOL SfxHTMLParser::FinishFileDownload( String& rStr )
DBG_ASSERT( pStream, "Kein In-Stream vom Medium erhalten" );
SvMemoryStream aStream;
- if( pStream ) // HACK wegen #65563#
+ if( pStream ) // HACK due to bug #65563#
aStream << *pStream;
aStream.Seek( STREAM_SEEK_TO_END );
@@ -341,11 +342,11 @@ BOOL SfxHTMLParser::FinishFileDownload( String& rStr )
IMPL_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void*, EMPTYARG )
{
- // Der Download ist jetzt abgeschlossen. Ausserdem muss/darf der
- // Data-Available-Link wieder durchgelassen werden.
+ // The Download is now completed. also the Data-Available-Link
+ // must or are allowed to be passed through.
pThis->SetDownloadingFile( FALSE );
- // ... und einmal aufrufen, damit weitergelesen wird.
+ // ... and call once, thus will continue reading.
pThis->CallAsyncCallLink();
return 0;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 8cd3098..ad67360 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..4a111a5 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 4adc4e4..2019ecd 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;
@@ -1141,7 +1130,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() )
@@ -1149,7 +1138,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;
@@ -1158,7 +1147,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;
@@ -1188,7 +1177,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 )
@@ -1248,7 +1237,7 @@ SfxExecuteItem::SfxExecuteItem( const SfxExecuteItem& rArg )
//--------------------------------------------------------------------
SfxExecuteItem::SfxExecuteItem(
sal_uInt16 nWhichId, sal_uInt16 nSlotP, SfxCallMode eModeP,
- const SfxPoolItem* pArg1, ... ) :
+ const SfxPoolItem* pArg1, ... ) :
SfxPoolItem( nWhichId ), nSlot( nSlotP ), eCall( eModeP ), nModifier( 0 )
{
va_list pVarArgs;
@@ -1282,7 +1271,7 @@ const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem )
}
//--------------------------------------------------------------------
-const SfxPoolItem* SfxDispatcher::Execute(
+const SfxPoolItem* SfxDispatcher::Execute(
USHORT nSlot,
SfxCallMode nCall,
SfxItemSet* pArgs,
@@ -1320,27 +1309,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).
*/
{
@@ -1380,25 +1368,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).
*/
{
@@ -1439,26 +1425,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).
*/
{
@@ -1487,35 +1472,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
- 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).
-
- [Beispiel]
+ [Example]
pDispatcher->Execute( SID_OPENDOCUMENT, SFX_CALLMODE_SYNCHRON,
&SfxStringItem( SID_FILE_NAME, "\\tmp\\temp.sdd" ),
@@ -1554,9 +1536,9 @@ const SfxPoolItem* SfxDispatcher::Execute
IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
-/* [Beschreibung]
+/* [Description]
- Hilfsmethode zum Empfangen der asynchron auszuf"uhrenden <SfxRequest>s.
+ Helper method to receive the asynchronously executed <SfxRequest>s.
*/
{
@@ -1564,7 +1546,7 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
DBG_ASSERT( !pImp->bFlushing, "recursive call to dispatcher" );
SFX_STACK(SfxDispatcher::PostMsgHandler);
- // ist auch der Pool noch nicht gestorben?
+ // Has also the Pool not yet died?
// SfxRequest* pReq = pExec->pRequest;
if ( !pReq->IsCancelled() )
{
@@ -1582,11 +1564,11 @@ IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
DBG( SfxApplication *pSfxApp = SFX_APP() );
DBG( pSfxApp->EnterAsynchronCall_Impl() );
- // Wenn pSlot ein "Pseudoslot" f"ur Macros oder Verben ist, kann
- // er im Call_Impl zerst"ort werden, also nicht mehr benutzen!
+ // When the pSlot is a "Pseudoslot" for macros or Verbs, it can
+ // be destroyed in the Call_Impl, thus do not use it anymore!
pReq->SetSynchronCall( sal_False );
- Call_Impl( *pSh, *pSlot, *pReq, pReq->AllowsRecording() ); //! woher bRecord?
-// Call_Impl( *pShell, *pExec->pSlot, *pReq, sal_True ); //! woher bRecord?
+ Call_Impl( *pSh, *pSlot, *pReq, pReq->AllowsRecording() ); //! why bRecord?
+// Call_Impl( *pShell, *pExec->pSlot, *pReq, sal_True ); //! why bRecord?
DBG( pSfxApp->LeaveAsynchronCall_Impl() );
}
@@ -1824,7 +1806,7 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool
bIsMDIApp,
if ( bReadOnlyShell && !( nPos & SFX_VISIBILITY_READONLYDOC ) )
continue;
- // check wether toolbar needs activation of a special feature
+ // check weather toolbar needs activation of a special feature
sal_uInt32 nFeature = pIFace->GetObjectBarFeature(nNo);
if ( nFeature && !pShell->HasUIFeature( nFeature ) )
continue;
@@ -1951,9 +1933,9 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool
bIsMDIApp,
//--------------------------------------------------------------------
void SfxDispatcher::FlushImpl()
-/* [Beschreibung]
+/* [Description]
- Hilfsmethode zum Ausf"uhren der ausstehenden Push- und Pop-Befehle.
+ Helper method to execute the outstanding push and pop commands.
*/
{
@@ -1974,8 +1956,8 @@ void SfxDispatcher::FlushImpl()
if ( pImp->pParent )
pImp->pParent->Flush();
-// if ( pImp->bQuiet )
-// return;
+// if ( pImp->bQuiet )
+// return;
pImp->bFlushing = !pImp->bFlushing;
if ( !pImp->bFlushing )
@@ -1993,7 +1975,7 @@ void SfxDispatcher::FlushImpl()
SfxApplication *pSfxApp = SFX_APP();
- // in der 1. Runde den echten Stack 'um'bauen
+ // Re-build the true stack in the first round
SfxToDoStack_Impl aToDoCopy;
sal_Bool bModify = sal_False;
short nToDo;
@@ -2004,18 +1986,18 @@ void SfxDispatcher::FlushImpl()
SfxToDo_Impl aToDo( pImp->aToDoStack.Top(nToDo) );
if ( aToDo.bPush )
{
- // tats"aechlich pushen
+ // Actually push
DBG_ASSERT( !pImp->aStack.Contains( aToDo.pCluster ),
"pushed SfxShell already on stack" );
pImp->aStack.Push( aToDo.pCluster );
aToDo.pCluster->SetDisableFlags( pImp->nDisableFlags );
- // die bewegte Shell merken
+ // Mark the moved shell
aToDoCopy.Push( aToDo );
}
else
{
- // tats"aechlich poppen
+ // Actually pop
SfxShell* pPopped = 0;
bool bFound = false;
do
@@ -2025,7 +2007,7 @@ void SfxDispatcher::FlushImpl()
pPopped->SetDisableFlags( 0 );
bFound = pPopped == aToDo.pCluster;
- // die bewegte Shell merken
+ // Mark the moved Shell
aToDoCopy.Push( SfxToDo_Impl( sal_False, aToDo.bDelete, sal_False, *pPopped) );
}
while ( aToDo.bUntil && !bFound );
@@ -2036,7 +2018,7 @@ void SfxDispatcher::FlushImpl()
pImp->aToDoStack.Clear();
}
- // ggf. Bindings invalidieren
+ // Invalidate bindings, if possible
if ( !pSfxApp->IsDowning() )
{
if ( bModify )
@@ -2049,11 +2031,11 @@ void SfxDispatcher::FlushImpl()
}
pImp->bFlushing = sal_False;
- pImp->bUpdated = sal_False; // nicht nur bei bModify, falls Doc/Template-Config
+ pImp->bUpdated = sal_False; // not only when bModify, if Doc/Template-Config
bFlushed = sal_True;
DBG_TRACE("Successfully flushed dispatcher!");
- // in der 2. Runde die Shells aktivieren und ggf. l"oschen
+ // Activate the Shells and possible delete them in the 2nd round
for ( nToDo = aToDoCopy.Count()-1; nToDo >= 0; --nToDo )
{
SfxToDo_Impl aToDo( aToDoCopy.Top(nToDo) );
@@ -2075,9 +2057,10 @@ void SfxDispatcher::FlushImpl()
if( bAwakeBindings )
aToDoCopy.Clear();
- // Wenn bei Activate/Deactivate/Delete weitere Stackbewegungen erfolgt sind :
+ // If more changes have occured on the stach when
+ // Activate/Deactivate/Delete:
if (!bFlushed)
- // falls jemand Push/Pop gerufen hat, wurde auch EnterReg gerufen!
+ // If Push/Pop hs been called by someone, theb also EnterReg was called!
FlushImpl();
if( bAwakeBindings && GetBindings() )
@@ -2097,52 +2080,51 @@ void SfxDispatcher::FlushImpl()
void SfxDispatcher::SetSlotFilter
(
HACK(hier muss mal ein enum rein)
- sal_Bool bEnable, /* sal_True:
- nur angegebene Slots enablen,
- alle anderen disablen
+ sal_Bool bEnable, /* sal_True:
+ only enable specified slots,
+ disable all other
sal_False:
- die angegebenen Slots disablen,
- alle anderen zun"achst enablen
- */
- sal_uInt16 nCount, // Anzahl der SIDs im folgenden Array
- const sal_uInt16* pSIDs // sortiertes Array von 'nCount' SIDs
+ disable specified slots,
+ first enable all other
+ */
+ sal_uInt16 nCount, // Number of SIDs in the following Array
+ const sal_uInt16* pSIDs // sorted Array of 'nCount' SIDs
)
-/* [Beschreibung]
-
- Mit dieser Methode wird ein Filter gesetzt, mit dem gezielt Slots
- enabled bzw. disabled werden k"onnen. Das "ubergebene Array mu\s
- bis zum Dtor bzw. n"achsten <SetSlotFilter()> erhalten bleiben, es
- wird nicht vom Dispatcher gel"oscht, es kann daher static sein.
+/* [Description]
- In ReadOnly-Dokumenten kann man mit 'bEnable==2' quasi das ReadOnlyDoc
- Flag von Slots "ubersteuern, dieser werden also wieder gefunden. Auf
- andere Slots hat das dann keine Auswirkung.
+ With this method a filter set, the target slots can be enabled or disabled.
+ The passed array must be retained until the destructor or the next
+ <SetSlotFilter()>, it is not deleted from the dispatcher, so it can thus be
+ static.
+ In read-only documents the quasi ReadOnlyDoc Flag of slots can be
+ overturned by the use of 'bEnable == 2', so this will be displayed again.
+ On the other slots it has no effect.
- [Beispiel]
+ [Example]
- gezieltes disablen der Slots 1, 2 und 3:
+ Targeted disabling of Slots 1, 2 and 3:
static sal_uInt16 const pSIDs[] = { 1, 2, 3 };
pDisp->SetSlotFilter( sal_False, sizeof(pSIDs)/sizeof(sal_uInt16), pSIDs );
- nur die Slots 5, 6 und 7 zulassen:
+ only permit Slots 5, 6 and 7:
static sal_uInt16 const pSIDs[] = { 5, 6, 7 };
pDisp->SetSlotFilter( sal_True, sizeof(pSIDs)/sizeof(sal_uInt16), pSIDs );
- Filter ausschalten:
+ Turn-off Filter:
pDisp->SetSlotFilter();
*/
{
#ifdef DBG_UTIL
- // Array "uberpr"ufen
+ // Check Array
for ( sal_uInt16 n = 1; n < nCount; ++n )
- DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sortet" );
+ DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sorted" );
#endif
if ( pImp->pFilterSIDs )
@@ -2176,59 +2158,59 @@ SfxCompareSIDs_Impl( const void* pSmaller, const void* pBigger )
//--------------------------------------------------------------------
sal_Bool SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const
-/* [Beschreibung]
+/* [Description]
- Sucht 'nSID' in dem mit <SetSlotFilter()> gesetzten Filter und
- liefert sal_True, falls die SID erlaubt ist, bzw. sal_False, falls sie
- durch den Filter disabled ist.
+ Searches for 'nSID' in the Filter set by <SetSlotFilter()> and
+ returns sal_True, if the SIDis allowed, or sal_False, if it is
+ disabled by the Filter.
- [R"uckgabewert]
- sal_Bool 0 => disabled
- 1 => enabled
- 2 => enabled even if ReadOnlyDoc
+ [Return value]
+ sal_Bool 0 => disabled
+ 1 => enabled
+ 2 => enabled even if ReadOnlyDoc
*/
{
- // kein Filter?
+ // no filter?
if ( 0 == pImp->nFilterCount )
- // => alle SIDs erlaubt
+ // => all SIDs allowed
return sal_True;
- // suchen
+ // search
sal_Bool bFound = 0 != bsearch( &nSID, pImp->pFilterSIDs, pImp->nFilterCount,
sizeof(sal_uInt16), SfxCompareSIDs_Impl );
// even if ReadOnlyDoc
if ( 2 == pImp->bFilterEnabling )
return bFound ? 2 : 1;
- // sonst je nach Negativ/Positiv Filter
+ // Otherwise after Negative/Positive Filter
return pImp->bFilterEnabling ? bFound : !bFound;
}
//--------------------------------------------------------------------
sal_Bool SfxDispatcher::_TryIntercept_Impl
(
- sal_uInt16 nSlot, // zu suchende Slot-Id
- SfxSlotServer& rServer, // zu f"uellende <SfxSlotServer>-Instanz
- sal_Bool bSelf
+ sal_uInt16 nSlot, // Slot-Id to search for
+ SfxSlotServer& rServer, // <SfxSlotServer>-Instance to fill
+ sal_Bool bSelf
)
{
- // Eventuell geh"ort der parent auch zu einer Komponente
+ // Maybe the parent is also belongs to a component
SfxDispatcher *pParent = pImp->pParent;
sal_uInt16 nLevels = pImp->aStack.Count();
while ( pParent && pParent->pImp->pFrame )
{
if ( pParent->pImp->pFrame->GetFrame().HasComponent() )
{
- // Components d"urfen intercepten
+ // Components may be intercepted
if ( pParent->_TryIntercept_Impl( nSlot, rServer, sal_True ) )
{
- // Die eigenen Shells zum Shelllevel hinzuz"ahlen
+ // The own shells are added to the Shell Level
rServer.SetShellLevel( rServer.GetShellLevel() + nLevels );
return sal_True;
}
else
- // Keine weitere Interception
+ // No further Interception
break;
}
else
@@ -2239,7 +2221,7 @@ sal_Bool SfxDispatcher::_TryIntercept_Impl
if ( bSelf )
{
- // Die ComponentViewShell befragen
+ // Query the ComponentViewShell
Flush();
SfxShell *pObjShell = GetShell(0);
SfxInterface *pIFace = pObjShell->GetInterface();
@@ -2263,36 +2245,35 @@ sal_Bool SfxDispatcher::_TryIntercept_Impl
sal_Bool SfxDispatcher::_FindServer
(
- sal_uInt16 nSlot, // zu suchende Slot-Id
- SfxSlotServer& rServer, // zu f"uellnde <SfxSlotServer>-Instanz
- sal_Bool bModal // trotz ModalMode
+ sal_uInt16 nSlot, // Slot-Id to search for
+ SfxSlotServer& rServer, // <SfxSlotServer>-Instance to fill
+ sal_Bool bModal // Dispite ModalMode
)
-/* [Beschreibung]
+/* [Description]
- Diese Hilfsmethode sucht den <Slot-Server>, der nSlot zur Zeit bedient.
- Als Ergebnis wird rServer entsprechend gef"ullt.
+ This helper method searches for the <Slot-Server> which currently serves
+ the nSlot. As the result, rServe is filled accordingly.
- Falls bekannt, kann das SfxInterface mitgegeben werden, von welchem
- nSlot momentan bedient wird.
+ If known the SfxInterface which is currently served by nSlot can be
+ passed along.
- Vor der Suche nach nSlot wird der SfxDispatcher geflusht.
+ The SfxDispatcher is flushed while searching for nSlot.
+ [Return value]
- [R"uckgabewert]
- sal_Bool sal_True
- Der Slot wurde gefunden, rServer ist g"ultig.
+ sal_Bool sal_True
+ The Slot was found, rServer is valid.
sal_False
- Der Slot wird momentan nicht bedient, rServer
- ist ung"ultig.
+ The Slot is currently not served, rServer is invalid.
*/
{
SFX_STACK(SfxDispatcher::_FindServer);
- // Dispatcher gelockt? (SID_HELP_PI trotzdem durchlassen)
+ // Dispatcher locked? (nevertheless let SID_HELP_PI through)
SfxApplication *pSfxApp = SFX_APP();
if ( IsLocked(nSlot) )
{
@@ -2300,7 +2281,7 @@ sal_Bool SfxDispatcher::_FindServer
return sal_False;
}
- // Anzahl der Shells auf den verkettenten Dispatchern z"ahlen
+ // Count the number of Shells in the linked dispatchers.
Flush();
sal_uInt16 nTotCount = pImp->aStack.Count();
if ( pImp->pParent )
@@ -2313,7 +2294,7 @@ sal_Bool SfxDispatcher::_FindServer
}
}
- // Makro-Slot?
+ // Macro-Slot?
if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
{
const SfxMacroInfo* pInfo = pSfxApp->GetMacroConfig()->GetMacroInfo(nSlot);
@@ -2351,7 +2332,7 @@ sal_Bool SfxDispatcher::_FindServer
}
}
- // SID gegen gesetzten Filter pr"ufen
+ // SID check against set filter
sal_uInt16 nSlotEnableMode=0;
if ( pImp->pFrame )
{
@@ -2360,7 +2341,7 @@ sal_Bool SfxDispatcher::_FindServer
return sal_False;
}
- // im Quiet-Mode nur Parent-Dispatcher
+ // In Quiet-Mode only Parent-Dispatcher
if ( pImp->bQuiet )
{
if ( pImp->pParent )
@@ -2375,10 +2356,11 @@ sal_Bool SfxDispatcher::_FindServer
}
sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly );
-// ( pImp->pFrame && pImp->pFrame->GetObjectShell() );
-// pImp->pFrame->GetObjectShell()->IsLoading() );
+// ( pImp->pFrame && pImp->pFrame->GetObjectShell() );
+// pImp->pFrame->GetObjectShell()->IsLoading() );
- // durch alle Shells der verketteten Dispatchern von oben nach unten suchen
+ // search through all the shells of the chained dispatchers
+ // from top to bottom
#ifdef DBG_UTILx
String aStack( "Stack:" );
#endif
@@ -2397,26 +2379,26 @@ sal_Bool SfxDispatcher::_FindServer
if ( pSlot )
{
- // Slot geh"ort zum Container?
+ // Slot belongs to Container?
bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
- // Shell geh"ort zum Server?
- // AppDispatcher oder IPFrame-Dispatcher
+ // Shell belongs to Server?
+ // AppDispatcher or IPFrame-Dispatcher
bool bIsServerShell = !pImp->pFrame || bIsInPlace;
- // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
- // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
+ // Of course ShellServer-Slots are also executable even when it is
+ // excecuted on a container dispatcher without a IPClient.
if ( !bIsServerShell )
{
SfxViewShell *pViewSh = pImp->pFrame->GetViewShell();
bIsServerShell = !pViewSh || !pViewSh->GetUIActiveClient();
}
- // Shell geh"ort zum Container?
- // AppDispatcher oder kein IPFrameDispatcher
+ // Shell belongs to Container?
+ // AppDispatcher or no IPFrameDispatcher
bool bIsContainerShell = !pImp->pFrame || !bIsInPlace;
- // Shell und Slot passen zusammen
+ // Shell and Slot match
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
( !bIsContainerSlot && bIsServerShell ) ) )
pSlot = 0;
@@ -2470,7 +2452,7 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
}
if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
- // Makro-Slot?
+ // Macro-Slot?
return sal_True;
else if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
{
@@ -2485,7 +2467,7 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
}
}
- // SID gegen gesetzten Filter pr"ufen
+ // SID check against set filter
sal_uInt16 nSlotEnableMode=0;
if ( pImp->pFrame )
{
@@ -2494,13 +2476,13 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
return sal_False;
}
- // im Quiet-Mode nur Parent-Dispatcher
+ // In Quiet-Mode only Parent-Dispatcher
if ( pImp->bQuiet )
return sal_False;
sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly );
-// ( pImp->pFrame && pImp->pFrame->GetObjectShell());
-// pImp->pFrame->GetObjectShell()->IsLoading() );
+// ( pImp->pFrame && pImp->pFrame->GetObjectShell());
+// pImp->pFrame->GetObjectShell()->IsLoading() );
for ( sal_uInt16 i=0 ; i < nTotCount; ++i )
{
@@ -2515,27 +2497,27 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
if ( pSlot )
{
- // Slot geh"ort zum Container?
+ // Slot belongs to Container?
bool bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
bool bIsInPlace = pImp->pFrame && pImp->pFrame->GetObjectShell()->IsInPlaceActive();
- // Shell geh"ort zum Server?
- // AppDispatcher oder IPFrame-Dispatcher
+ // Shell belongs to Server?
+ // AppDispatcher or IPFrame-Dispatcher
bool bIsServerShell = !pImp->pFrame || bIsInPlace;
- // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
- // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
+ // Of course ShellServer-Slots are also executable even when it is
+ // excecuted on a container dispatcher without a IPClient
if ( !bIsServerShell )
{
SfxViewShell *pViewSh = pImp->pFrame->GetViewShell();
bIsServerShell = !pViewSh || !pViewSh->GetUIActiveClient();
}
- // Shell geh"ort zum Container?
- // AppDispatcher oder kein IPFrameDispatcher
+ // Shell belongs to Container?
+ // AppDispatcher or no IPFrameDispatcher
bool bIsContainerShell = !pImp->pFrame || !bIsInPlace;
- // Shell und Slot passen zusammen
+ // Shell and Slot match
if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
( !bIsContainerSlot && bIsServerShell ) ) )
pSlot = 0;
@@ -2551,23 +2533,21 @@ sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
return sal_False;
}
-
-
//--------------------------------------------------------------------
sal_Bool SfxDispatcher::_FillState
(
- const SfxSlotServer& rSvr, // abzufragende <Slot-Server>
- SfxItemSet& rState, // zu f"ullendes <SfxItemSet>
- const SfxSlot* pRealSlot // ggf. der tats"achliche Slot
+ const SfxSlotServer& rSvr, // <Slot-Server> to query
+ SfxItemSet& rState, // <SfxItemSet> to be filled
+ const SfxSlot* pRealSlot // The actual Slot if possible
)
-/* [Beschreibung]
+/* [Description]
- Hilfsmethode zum Abfragen des Status des <Slot-Server>s rSvr.
- In rState m"ussen die gew"unschten Slots-Ids (teilweise in Which-Ids
- des betreffenden Pools umgewandelt) vorhanden sein.
+ Helper method to obtain the status of the <Slot-Server>s rSvr.
+ The required slots IDs (partly converted to Which-IDs of the pool)
+ must be present in rstate.
- Der SfxDispatcher wird vor der Abfrage geflusht.
+ The SfxDispatcher is flushed before the query.
*/
{
@@ -2590,9 +2570,9 @@ sal_Bool SfxDispatcher::_FillState
return FALSE;
// Flush();
- // Objekt ermitteln und Message an diesem Objekt aufrufen
+ // Determine the object and call the Message of this object
SfxShell *pSh = GetShell(rSvr.GetShellLevel());
- DBG_ASSERT(pSh, "ObjektShell nicht gefunden");
+ DBG_ASSERT(pSh, "ObjektShell not found");
SfxStateFunc pFunc;
@@ -2603,7 +2583,7 @@ sal_Bool SfxDispatcher::_FillState
pSh->CallState( pFunc, rState );
#ifdef DBG_UTIL
- // pr"ufen, ob IDL (SlotMap) und aktuelle Items "ubereinstimmen
+ // To examine the conformity of IDL (SlotMap) and current Items
if ( DbgIsAssertWarning() && rState.Count() )
{
SfxInterface *pIF = pSh->GetInterface();
@@ -2638,10 +2618,9 @@ sal_Bool SfxDispatcher::_FillState
//--------------------------------------------------------------------
const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr )
-/* [Beschreibung]
+/* [Description]
- Diese Methode f"uhrt einen Request "uber einen gecachten <Slot-Server>
- aus.
+ This method performs a request for a cached <Slot-Server>.
*/
{
@@ -2658,7 +2637,7 @@ const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr )
SFX_APP()->GetMacroConfig()->RegisterSlotId( nSlot );
if ( pSlot->IsMode(SFX_SLOT_ASYNCHRON) )
- //! ignoriert rSvr
+ //! ignore rSvr
{
SfxShell *pShell = GetShell( rSvr.GetShellLevel() );
SfxDispatcher *pDispat = this;
@@ -2681,10 +2660,10 @@ const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr )
}
else
{
- // Objekt ermitteln und Message an diesem Objekt aufrufen
+ // Determine the object and call the Message of this object
SfxShell *pSh = GetShell(rSvr.GetShellLevel());
SfxRequest aReq( pSlot->GetSlotId(), SFX_CALLMODE_RECORD, pSh->GetPool() );
- if ( Call_Impl( *pSh, *pSlot, aReq, sal_True ) ) // von Bindings immer recorden
+ if ( Call_Impl( *pSh, *pSlot, aReq, sal_True ) ) // Bindings always recording
return aReq.GetReturnValue();
}
}
@@ -2789,12 +2768,11 @@ void SfxDispatcher::ExecutePopup( const ResId &rId, Window *pWin, const
Point *p
//--------------------------------------------------------------------
void SfxDispatcher::Lock( sal_Bool bLock )
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode kann der SfxDispatcher gesperrt und freigegeben
- werden. 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 the SfxDispatcher can be locked and released. A locked
+ SfxDispatcher does not perform <SfxRequest>s and does no longer provide
+ status information. It behaves as if all the slots were disabled.
*/
{
@@ -2825,10 +2803,10 @@ sal_uInt32 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const
//--------------------------------------------------------------------
void SfxDispatcher::ResetObjectBars_Impl()
-/* [Beschreibung]
+/* [Description]
- Mit dieser Methode werden alle Objectbar-Anforderungen, die dieser
- Dispatcher an das AppWindow hat, beseitigt.
+ With this method all Objectbar requirements which this Dispatcher
+ imposes on the AppWindow are eliminated.
*/
{
for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
@@ -2848,7 +2826,7 @@ void SfxDispatcher::DebugOutput_Impl() const
if (bFlushed)
DBG_TRACE("Flushed");
if (pImp->bUpdated)
- DBG_TRACE("Updated");
+ DBG_TRACE("updated");
for ( sal_uInt16 nShell = pImp->aStack.Count(); nShell > 0; --nShell )
{
@@ -2873,8 +2851,8 @@ void SfxDispatcher::LockUI_Impl( sal_Bool bLock )
//-------------------------------------------------------------------------
void SfxDispatcher::HideUI( sal_Bool bHide )
{
-// if ( !bHide && pImp->bReadOnly )
-// bHide = sal_True;
+// if ( !bHide && pImp->bReadOnly )
+// bHide = sal_True;
sal_Bool bWasHidden = pImp->bNoUI;
pImp->bNoUI = bHide;
if ( pImp->pFrame )
@@ -2905,7 +2883,7 @@ void SfxDispatcher::HideUI( sal_Bool bHide )
void SfxDispatcher::SetReadOnly_Impl( sal_Bool bOn )
{
pImp->bReadOnly = bOn;
-// pImp->bNoUI = bOn;
+// pImp->bNoUI = bOn;
}
sal_Bool SfxDispatcher::GetReadOnly_Impl() const
@@ -2916,10 +2894,10 @@ sal_Bool SfxDispatcher::GetReadOnly_Impl() const
//-------------------------------------------------------------------------
void SfxDispatcher::SetQuietMode_Impl( sal_Bool bOn )
-/* [Beschreibung]
+/* [Description]
- Bei 'bOn' stellt sich dieser Dispatcher quasi tot und leitet alles
- an den Parent-Dispatcher weiter.
+ With 'bOn' the Dispatcher is quasi dead and transfers everything to the
+ Parent-Dispatcher.
*/
{
@@ -2932,9 +2910,9 @@ void SfxDispatcher::SetQuietMode_Impl( sal_Bool bOn )
//-------------------------------------------------------------------------
void SfxDispatcher::SetModalMode_Impl( sal_Bool bOn )
-/* [Beschreibung]
+/* [Description]
- Bei 'bOn' werden nur noch Slots des Parent-Dispatchers gefunden.
+ With 'Bon' only slots of the parent dispatcher are found.
*/
{
@@ -3013,8 +2991,8 @@ sal_Bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const
return sal_True;
}
-// Ein dirty trick, um an die Methoden der private base class von
-// SfxShellStack_Impl heranzukommen
+// A dirty trick, to get hold of the methods of the private base class
+// SfxShellStack_Impl
class StackAccess_Impl : public SfxShellStack_Implarr_
{};
@@ -3022,7 +3000,7 @@ void SfxDispatcher::InsertShell_Impl( SfxShell& rShell, sal_uInt16 nPos )
{
Flush();
- // Der cast geht, weil SfxShellStack_Impl keine eigenen member hat
+ // The cast is because SfxShellStack_Impl member has non of its own
((StackAccess_Impl*) (&pImp->aStack))->Insert( nPos, &rShell );
rShell.SetDisableFlags( pImp->nDisableFlags );
rShell.DoActivate_Impl(pImp->pFrame, sal_True);
@@ -3040,7 +3018,7 @@ void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell )
{
Flush();
- // Der cast geht, weil SfxShellStack_Impl keine eigenen member hat
+ // The cast is because SfxShellStack_Impl member has non of its own
StackAccess_Impl& rStack = *((StackAccess_Impl*) (&pImp->aStack));
sal_uInt16 nCount = rStack.Count();
for ( sal_uInt16 n=0; n<nCount; ++n )
@@ -3068,16 +3046,17 @@ sal_Bool SfxDispatcher::IsAllowed
sal_uInt16 nSlot
) const
/*
- [Beschreibung]
- Die Methode prueft, ob der Zugriff auf diese Schnittstelle erlaubt ist.
- */
+ [Description]
+
+ The method checks whether the access is allowed on this interface.
+ */
{
if ( !pImp->pDisableList )
{
return sal_True;
}
- // BinSearch in der DisableListe
+ // BinSearch in the disable list
SvUShorts& rList = *pImp->pDisableList;
sal_uInt16 nCount = rList.Count();
sal_uInt16 nLow = 0, nMid = 0, nHigh;
@@ -3087,7 +3066,7 @@ sal_Bool SfxDispatcher::IsAllowed
while ( !bFound && nLow <= nHigh )
{
nMid = (nLow + nHigh) >> 1;
- DBG_ASSERT( nMid < nCount, "bsearch ist buggy" );
+ DBG_ASSERT( nMid < nCount, "bsearch is buggy" );
int nDiff = (int) nSlot - (int) rList[nMid];
if ( nDiff < 0)
@@ -3107,7 +3086,7 @@ sal_Bool SfxDispatcher::IsAllowed
}
#ifdef _DEBUG
- // Slot in der Liste gefunden ?
+ // Slot found in the List?
sal_uInt16 nPos = bFound ? nMid : nLow;
DBG_ASSERT( nPos <= nCount, "" );
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
index ad08518..2bb4d93 100644
--- a/sfx2/source/control/macrconf.cxx
+++ b/sfx2/source/control/macrconf.cxx
@@ -86,8 +86,8 @@ void SfxMacroConfig::Release_Impl()
struct SfxMacroConfig_Impl
{
SfxMacroInfoArr_Impl aArr;
- sal_uInt32 nEventId;
- sal_Bool bWaitingForCallback;
+ sal_uInt32 nEventId;
+ sal_Bool bWaitingForCallback;
SfxMacroConfig_Impl()
: nEventId( 0 )
@@ -179,7 +179,7 @@ SfxMacroInfo::SfxMacroInfo( const String& rURL ) :
if ( aTmp.GetTokenCount('/') > 3 )
{
// 'macro:///lib.mod.proc(args)' => Macro via App-BASIC-Mgr
- // 'macro://[docname|.]/lib.mod.proc(args)' => Macro via zugehoerigen Doc-BASIC-Mgr
+ // 'macro://[docname|.]/lib.mod.proc(args)' => Macro via included Doc-BASIC-Mgr
if ( aTmp.CompareToAscii("///", 3 ) != COMPARE_EQUAL )
bAppBasic = FALSE;
aTmp = rURL.GetToken( 3, '/' );
@@ -226,7 +226,7 @@ SfxMacroInfo::SfxMacroInfo(bool _bAppBasic, const String& rLibName,
//==========================================================================
SfxMacroInfo::SfxMacroInfo(bool _bAppBasic, const String& rQualifiedName )
-: pHelpText(0),
+: pHelpText(0),
nRefCnt(0),
bAppBasic(_bAppBasic),
nSlotId(0),
@@ -266,7 +266,7 @@ SfxMacroInfo::~SfxMacroInfo()
sal_Bool SfxMacroInfo::operator==(const SfxMacroInfo& rOther) const
{
if ( GetQualifiedName() == rOther.GetQualifiedName() &&
- bAppBasic == rOther.bAppBasic )
+ bAppBasic == rOther.bAppBasic )
return sal_True;
else
return sal_False;
@@ -299,14 +299,16 @@ String SfxMacroInfo::GetQualifiedName() const
aMacroName += '.';
}
- // Wg. ::com::sun::star::script::JavaScript kein Zerlegen des Strings mehr
+ // due to ::com::sun::star::script::JavaScript
+ // no more disassembly of the string
aMacroName += aMethodName;
return aMacroName;
}
String SfxMacroInfo::GetFullQualifiedName() const
{
- // Liefert nur Unsinn, wenn f"ur ein ::com::sun::star::script::JavaScript aufgerufen !
+ // Returns only nonsense, when called for a
+ // ::com::sun::star::script::JavaScript !
String aRet;
if ( bAppBasic )
aRet = SFX_APP()->GetName();
@@ -321,7 +323,7 @@ String SfxMacroInfo::GetURL() const
return aMethodName;
// 'macro:///lib.mod.proc(args)' => Macro via App-BASIC-Mgr
- // 'macro://[docname|.]/lib.mod.proc(args)' => Macro via zugehoerigen Doc-BASIC-Mgr
+ // 'macro://[docname|.]/lib.mod.proc(args)' => Macro via included Doc-BASIC-Mgr
// 'macro://obj.method(args)' => Object via App-BASIC-Mgr
String aURL( String::CreateFromAscii("macro://") );
if ( !bAppBasic )
@@ -436,17 +438,18 @@ SFX_EXEC_STUB( SfxApplication, MacroExec_Impl )
sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
{
- sal_uInt16 nCount = pImp->aArr.Count(); // Macro suchen
+ sal_uInt16 nCount = pImp->aArr.Count(); // Search for Macro
sal_uInt16 i;
for (i=0; i<nCount; i++)
if ((*(pImp->aArr)[i]) == (*pInfo))
break;
if (i == nCount)
- { // Macro noch unbekannt
+ {
+ // Macro still unknown
nCount = aIdArray.Count();
sal_uInt16 n;
- for (n=0; n<nCount; n++) // freie SlotId suchen
+ for (n=0; n<nCount; n++) // Seearch for free SlotId
if (aIdArray[n] > SID_MACRO_START + n)
break;
@@ -479,7 +482,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
else
pNewSlot->pNextSlot = pNewSlot;
- // Macro uebernehmen
+ // Take over Macro
SfxMacroInfoPtr pNewInfo = new SfxMacroInfo(*pInfo);
pNewInfo->nSlotId = SID_MACRO_START + n;
pImp->aArr.Insert(pNewInfo,n);
@@ -500,7 +503,7 @@ sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
{
- DBG_ASSERT( IsMacroSlot( nId ), "SlotId ist kein Macro!");
+ DBG_ASSERT( IsMacroSlot( nId ), "SlotId is no Macro!");
sal_uInt16 nCount = pImp->aArr.Count();
for (sal_uInt16 i=0; i<nCount; i++)
@@ -511,23 +514,23 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
pInfo->nRefCnt--;
if (pInfo->nRefCnt == 0)
{
- // Slot wird nicht mehr referenziert, also holen
+ // Slot is no longer referenced, so get
SfxSlot *pSlot = pInfo->pSlot;
- // Slot aus der Verkettung rausnehmen
+ // Take out Slot from the concatenation
while (pSlot->pNextSlot != pInfo->pSlot)
pSlot = (SfxSlot*) pSlot->pNextSlot;
pSlot->pNextSlot = pInfo->pSlot->pNextSlot;
- // Slot selbst kurz schlie\sen
+ // Slot close itself briefly
pSlot = pInfo->pSlot;
pSlot->pNextSlot = pSlot;
- // MacroInfo aus Array entfernen, damit sie kein Unheil
- // anrichten kann
+ // Remove Macro info from array so that it can not cause
+ // any harm
pImp->aArr.Remove(i);
- // SlotId wieder freigeben
+ // Release SlotId again
sal_uInt16 nIdCount = aIdArray.Count();
for (sal_uInt16 n=0; n<nIdCount; n++)
{
@@ -538,9 +541,9 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
}
}
- // Sofern nicht die Applikation heruntergefahren wird, mu\s
- // der Slot asynchron gel"oscht werden, falls er in seinem
- // eigenen Execute abgeschossen wird!
+ // Unless the application is not shut down, then
+ // the Slot has to be deleted asynchronously if cancelled in
+ // its own Execute!
if ( !SFX_APP()->Get_Impl()->bInQuit )
pImp->nEventId = Application::PostUserEvent( LINK(this, SfxMacroConfig,
EventHdl_Impl), pInfo );
else
@@ -550,14 +553,14 @@ void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
}
}
- DBG_ERROR("Macro-SlotId nicht gefunden!");
+ DBG_ERROR("Macro-SlotId is not found!");
}
//==========================================================================
void SfxMacroConfig::RegisterSlotId(sal_uInt16 nId)
{
- DBG_ASSERT( IsMacroSlot( nId ), "SlotId ist kein Macro!");
+ DBG_ASSERT( IsMacroSlot( nId ), "SlotId is no Macro!");
sal_uInt16 nCount = pImp->aArr.Count();
for (sal_uInt16 i=0; i<nCount; i++)
@@ -569,7 +572,7 @@ void SfxMacroConfig::RegisterSlotId(sal_uInt16 nId)
}
}
- DBG_ERROR("Macro-SlotId nicht gefunden!");
+ DBG_ERROR("Macro-SlotId is not found!");
}
//==========================================================================
@@ -608,7 +611,7 @@ sal_Bool SfxMacroConfig::ExecuteMacro( sal_uInt16 nId, const String& rArgs ) con
SvxMacro aMacro( pInfo->GetQualifiedName(), pInfo->GetBasicName(), STARBASIC );
sal_Bool bRet = ExecuteMacro( pSh, &aMacro, rArgs );
- // Release, da im Dispatcher-Execute ein Register gemacht wurde
+ // Release, because a register was created in the dispatcher Execute
((SfxMacroConfig*)this)->ReleaseSlotId( nId );
return bRet;
}
@@ -617,11 +620,11 @@ sal_Bool SfxMacroConfig::ExecuteMacro( SfxObjectShell *pSh, const SvxMacro*
pMac
{
SfxApplication *pApp = SFX_APP();
- // Name des Macros oder Scripts bzw. ScriptCode
+ // Name of the Macros or Scripts (ScriptCode)
String aCode( pMacro->GetMacName() );
ErrCode nErr = ERRCODE_NONE;
- // Ist es ein Basic-Macro ?
+ // Is it a Basic-Macro ?
ScriptType eSType = pMacro->GetScriptType();
sal_Bool bIsBasic = eSType == STARBASIC;
sal_Bool bIsStarScript = ( eSType == EXTENDED_STYPE && pMacro->GetLibName().SearchAscii(
"StarScript" ) != STRING_NOTFOUND );
@@ -633,10 +636,10 @@ sal_Bool SfxMacroConfig::ExecuteMacro( SfxObjectShell *pSh, const SvxMacro*
pMac
BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
if( bIsBasic )
{
- // BasicManager von Document?
+ // BasicManager of the Document?
BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
- // Da leider der Name zwischendurch h"aufig gewechselt hat ...
+ // As the name has unfortunately been changed often ...
if( SFX_APP()->GetName() == pMacro->GetLibName() ||
pMacro->GetLibName().EqualsAscii("StarDesktop") )
pMgr = pAppMgr;
@@ -676,16 +679,16 @@ sal_Bool SfxMacroConfig::CheckMacro( SfxObjectShell *pSh, const SvxMacro*
pMacro
{
SfxApplication *pApp = SFX_APP();
- // Name des Macros oder Scripts bzw. ScriptCode
+ // Name of Macros or Scripts (ScriptCode)
String aCode( pMacro->GetMacName() );
ErrCode nErr = ERRCODE_NONE;
- // BasicManager von Document oder Application
+ // BasicManager of Document or Application
pApp->EnterBasicCall();
BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
- // Da leider der Name zwischendurch h"aufig gewechselt hat ...
+ // As the name has unfortunately been changed often ...
if( SFX_APP()->GetName() == pMacro->GetLibName() ||
pMacro->GetLibName().EqualsAscii("StarDesktop") )
pMgr = pAppMgr;
@@ -706,14 +709,15 @@ sal_Bool SfxMacroConfig::CheckMacro( sal_uInt16 nId ) const
if ( !pInfo )
return sal_False;
- // Basic nur initialisieren, wenn default nicht ::com::sun::star::script::JavaScript; dann mu\s
- // in IsBasic() sowieso das Basic angelegt werden
+ // only initialize Basic, when default is not
+ // ::com::sun::star::script::JavaScript; then the Basic has to be created
+ // anyway in IsBasic()
SfxObjectShell* pSh = SfxObjectShell::Current();
SfxApplication *pApp = SFX_APP();
pApp->EnterBasicCall();
- // BasicManager von Document oder Application
+ // BasicManager of Document or Application
BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
index 33eba4d..03efe61 100644
--- a/sfx2/source/control/macro.cxx
+++ b/sfx2/source/control/macro.cxx
@@ -46,89 +46,91 @@ SV_IMPL_PTRARR( SfxStatements_Impl, SfxMacroStatement* );
struct SfxMacro_Impl
-/* [Beschreibung]
+/* [Description]
- Implementations-Struktur der Klasse <SfxMacro>.
+ Implementation structure for the <SfxMacro> class.
*/
{
- SfxMacroMode eMode; /* Zweck der <SfxMacro>-Instanz,
- Bedeutung siehe enum <SfxMacroMode> */
- SfxStatements_Impl aList; /* Liste von aufgezeichneten Statements */
+ SfxMacroMode eMode; /* purpose of the <SfxMacro> instance,
+ for meaning see enum <SfxMacroMode> */
+ SfxStatements_Impl aList; /* List of recorded Statements */
};
//====================================================================
SfxMacroStatement::SfxMacroStatement
(
- const SfxShell& /*rShell*/, // <SfxShell>, die den Request ausf"uhrte
- const String& /*rTarget*/, // Name des Zielobjektes vor der Ausf"urhung
- BOOL /*bAbsolute*/, // obsolet
- const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ const SfxShell& /*rShell*/, // <SfxShell> which excexutes the Request
+ const String& /*rTarget*/, // Name of the target object for the
+ // excecution
+ BOOL /*bAbsolute*/, // obsolete
+ const SfxSlot& rSlot, // the <SfxSlot>, which can read the
+ // statement
+ BOOL bRequestDone, // Was the Request really excecuted
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
-/* [Beschreibung]
+/* [Description]
Dieser Konstruktor der Klasse SfxMacroStatement erzeugt ein Statement,
bei dem ein Objekt angesprochen wird, welches durch 'rShell' angegeben
ist. Dabei erfolgt die Addressierung je nach 'bAbsolute' absolut,
also z.B. als '[mydoc.sdc]' oder relativ, also z.B. 'ActiveDocument'.
- Je nach Art der Subklasse von 'rShell' ergeben sich folgende
- Ausdr"ucke:
+ This constructor of the SfxMacroStatement class generate a statement in
+ which an object is brought up, which is given by 'rShell'. Thus It is
+ addressing the ever after 'bAbsolute' absolute, for example, as '[mydoc.sdc]', or relative,
that is 'active document'.
- | absolut relativ
+ Depending on the subclass of 'rShell', the following terms:
+
+ | absolute relative
-----------------------------------------------------------------------
- SfxApplication' | 'StarCalc' 'Application'
+ SfxApplication' | 'StarCalc' 'Application'
SfxViewFrame' | '[mydoc.sdc:1]' 'ActiveWindow'
SfxViewShell' | '[mydoc.sdc:1]' 'AvtiveWindow'
SfxObjectShell' | '[mydoc.sdc]' 'ActiveDocument'
- sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
+ sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
Dabei sind 'StarCalc' stellvertretend fuer den Namen der Applikation
- (Application::GetAppName()const). In der absoluten Fassung k"onnte
+ (Application::GetAppName()const). In der absoluten Fassung könnte
die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")')
angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der
Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&,
const SfxSlot&,BOOL,SfxArguments*)> verwendet werden.
- F"ur das so bezeichnete Objekt wird dann je nach Typ des Slots
- eine Zuweisung an eines seiner Properties oder der Aufruf einer seiner
- Methoden ausgedr"uckt.
-
+ For the so-called object is then, depending on the type of slots,
+ expressed as an assignment to one of its properties or calling its methods.
- [Beispiele]
+ [Example]
- absolut:
+ absolute:
SCalc3.OpenDocument( "\docs\mydoc.sdd", "StarDraw Presentation", 0, 0 )
[mydoc.sdd].Activate()
[mydoc.sdd:1].SwitchToView( 2 )
[mydoc.sdc:1:1].CellSelection( "A5-D8" ).LineColor = 192357
- relativ:
+ relative:
ActiveWindow.LineColor = 192357
-
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const String&)>
*/
-: nSlotId( rSlot.GetSlotId() ),
+: nSlotId( rSlot.GetSlotId() ),
aArgs( rArgs ),
bDone( bRequestDone ),
pDummy( 0 )
{
- // Workaround Recording nicht exportierter Slots (#25386#)
+ // Workaround Recording non exported Slots (#25386#)
if ( !rSlot.pName )
return;
aStatement = DEFINE_CONST_UNICODE("Selection");
- // an diesen Objekt-Ausdruck den Methoden-/Property-Namen und Parameter
+ // to these object expression of the Method-/Property-Name and parameters
GenerateNameAndArgs_Impl( SfxRequest::GetRecordingMacro(), rSlot, bRequestDone, aArgs);
}
@@ -136,22 +138,22 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const String& rTarget, // Objekt, was beim Playing angesprochen wird
- const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
- BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ const String& rTarget, // The Object which is addressed while playing
+ const SfxSlot& rSlot, // The <SfxSlot>, which can playback the statement
+ BOOL bRequestDone, // was the Request actually performed
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rArgs
)
-/* [Beschreibung]
+/* [Description]
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&)>
<SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
*/
-: nSlotId( rSlot.GetSlotId() ),
+: nSlotId( rSlot.GetSlotId() ),
aArgs( rArgs ),
bDone( bRequestDone ),
pDummy( 0 )
@@ -165,25 +167,24 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const String& rStatement // manuell erzeugte(s) Statement(s)
+ const String& rStatement // manually generated statement(s)
)
-/* [Beschreibung]
-
- Dieser Konstruktor erzeugt eine SfxMacroStatement-Instanz, deren
- Aufbau vollst"andig vom Applikationsentwickler bestimmt wird. Da der
- angegebene String auch mehrere mit CR/LF getrennte Statements
- enthalten darf, ist damit ein weitgehender Eingriff in das Aufzeichnen
- von BASIC-Makros m"oglich, um Spezialf"alle zu behandeln.
+/* [Description]
+ This constructor creates a SfxMacroStatement instance, its structure is
+ determined completely by the application developer. Because the specified
+ string may contain several statements separated with CR/LF, which enables
+ a extensive in the recording of BASIC-macros, in order to handle special
+ cases.
- [Querverweise]
+ [Cross-reference]
<SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
<SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
*/
-: nSlotId( 0 ),
+: nSlotId( 0 ),
aStatement( rStatement ),
bDone( TRUE ),
pDummy( 0 )
@@ -194,15 +195,15 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::SfxMacroStatement
(
- const SfxMacroStatement& rOrig // Original, von dem kopiert wird
+ const SfxMacroStatement& rOrig // Original, from which it will be copied
)
-/* [Beschreibung]
+/* [Description]
- Copy-Konstruktor der SfxMacroStatement-Klasse.
+ Copy constructor of the sSfxMacroStatement class.
*/
-: nSlotId( rOrig.nSlotId ),
+: nSlotId( rOrig.nSlotId ),
aStatement( rOrig.aStatement ),
bDone( rOrig.bDone ),
pDummy( 0 )
@@ -214,10 +215,10 @@ SfxMacroStatement::SfxMacroStatement
SfxMacroStatement::~SfxMacroStatement()
-/* [Beschreibung]
+/* [Description]
- Destruktor der Klasse SfxMacroStatement. Gibt die Liste der
- aktuellen Parameter frei.
+ Destructor of the SfxMacroStatement class. Frees the list of the
+ current parameters.
*/
{
@@ -227,18 +228,17 @@ SfxMacroStatement::~SfxMacroStatement()
void SfxMacroStatement::GenerateNameAndArgs_Impl
(
- SfxMacro* /*pMacro*/, // darin wird aufgezeichnet
- const SfxSlot& rSlot, // der Slot, der das Statement abspielen kann
- BOOL bRequestDone, // TRUE=wurde ausgef"uhrt, FALSE=abgebrochen
+ SfxMacro* /*pMacro*/, // in this is recorded
+ const SfxSlot& rSlot, // the slot, which can playback the statement
+ BOOL bRequestDone, // TRUE=was executed, FALSE=cancelled
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& /*rArgs*/
)
-/* [Beschreibung]
+/* [Description]
- Interne Hilfsmethode zum generieren des Funktions-/Property-Names
- sowie der Parameter. Diese Methode wird nur verwendet, wenn der
- Anwendungsprogrammierer keinen eigenen Source an den <SfxRequest>
- geh"angt hat.
+ Internal utility method for generating the functions-/property-names as
+ well as the parameter. This method is only used if the application
+ programmer has not attached his own source to the <SfxRequest>.
*/
{
@@ -246,18 +246,18 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
&& rSlot.pName[0] != '.' )
aStatement += '.';
- // der Name des Slots ist der Name der Methode / des Properties
+ // The name of the slots is the name of the method or properties
aStatement += String::CreateFromAscii(rSlot.pName);
if ( rSlot.IsMode(SFX_SLOT_METHOD) )
aStatement += DEFINE_CONST_UNICODE("( ");
else
aStatement += DEFINE_CONST_UNICODE(" = ");
- // alle zusammengesuchten Parameter rausschreiben
+ // Print all required Parameters
if ( aArgs.getLength() )
for ( USHORT nArg = 0; nArg < aArgs.getLength(); ++nArg )
{
- // den Parameter textuell darstellen
+ // represent the parameters textually
String aArg;
::com::sun::star::uno::Any& rValue = aArgs[nArg].Value;
::com::sun::star::uno::Type pType = rValue.getValueType();
@@ -284,7 +284,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
::rtl::OUString sTemp;
rValue >>= sTemp;
- // Anf"uhrungszeichen werden verdoppelt
+ // Quotation marks are doubled
XubString aRecordable( sTemp );
USHORT nPos = 0;
while ( TRUE )
@@ -295,12 +295,12 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
nPos += 2;
}
- // nicht druckbare Zeichen werden als chr$(...) geschrieben
+ // non-printable characters are written as chr $(...)
bool bPrevReplaced = false;
for ( USHORT n = 0; n < aRecordable.Len(); ++n )
{
sal_Unicode cChar = aRecordable.GetChar(n);
- if ( !( cChar>=32 && cChar!=127 ) ) // ALS ERSATZ FUER String::IsPrintable()!
+ if ( !( cChar>=32 && cChar!=127 ) ) // As replacement for
String::IsPrintable()!
{
XubString aReplacement( DEFINE_CONST_UNICODE("+chr$(") );
aReplacement += cChar;
@@ -325,7 +325,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
else
bPrevReplaced = false;
- // Argument in Anf"uhrungszeichen
+ // Argument in quotation marks
aArg = '"';
aArg += aRecordable;
aArg += '"';
@@ -337,12 +337,12 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
pType == ::getVoidCppuType(), "Unknown Type in recorder!" );
}
- // den Parameter anh"angen
+ // Attach the parameter
aStatement += aArg;
aStatement += DEFINE_CONST_UNICODE(", ");
}
- // Statement beeden
+ // End statement
if ( aArgs.getLength() )
aStatement.Erase( aStatement.Len() - 2, 1 );
else
@@ -351,7 +351,7 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
aStatement += ')';
if ( !bRequestDone )
- // nicht als "Done()" gekennzeichnete Statements auskommentieren
+ // not comment out the "Done ()" marked statements
aStatement.InsertAscii( "rem ", 0 );
}
@@ -359,29 +359,28 @@ void SfxMacroStatement::GenerateNameAndArgs_Impl
SfxMacro::SfxMacro
(
- SfxMacroMode eMode // Zweck der Instanz, siehe <SfxMacroMode>
+ SfxMacroMode eMode // Purpose of the instance, see <SfxMacroMode>
)
-/* [Beschreibung]
+/* [Description]
- Konstruktor der Klasse SfxMacro. Instanzen dieser Klasse werden im
- SFx zu zwei Zwecken ben"otigt:
+ Constructor of the SfxMacro class. Instances of this class are required
+ for two purposes in SFx:
- 1. zum Aufzeichnen von Makros
- In diesem Fall wird der Konstruktor mit SFX_MACRO_RECORDINGABSOLUTE
- oder SFX_MACRO_RECORDINGRELATIVE aufgerufen. Es sollte sich um eine
- Instanz einer abgeleiteten Klasse handeln, um in der Ableitung
- die Information dar"uber unterzubringen, wo das Makro gespeichert
- werden soll. Ein solches Makro solle sich dann in seinem Destruktor
- an der vom Benutzer gew"ahlten Stelle speichern.
+ 1. for recording macros
+ In this cas is th constructor called with SFX_MACRO_RECORDINGABSOLUTE or
+ SFX_MACRO_RECORDINGRELATIVE. Should be an instance of a derived class,
+ in order to acommodate the derivation of information, where the macro
+ should be saved. Such a macro should, in its destructor, be saved at the
+ location specified by the user.
- 2. zum Zuordnen von exisitierenden Makros
- In diesem Fall wird der Konstruktor mit SFX_MACRO_EXISTING aufgerufen.
- Eine solche Instanz wird z.B. ben"otigt, wenn Makros auf Events
- oder <SfxControllerItem>s konfiguriert werden sollen.
+ 2. Assignment of exisiting macros
+ In this case the constructor is called with SFX_MACRO_EXISTING.
+ Such a instance is for example needed when macros are to be configured for
+ events or <SfxControllerItem>s.
*/
-: pImp( new SfxMacro_Impl )
+: pImp( new SfxMacro_Impl )
{
pImp->eMode = eMode;
@@ -391,15 +390,13 @@ SfxMacro::SfxMacro
SfxMacro::~SfxMacro()
-/* [Beschreibung]
+/* [Description]
- Virtueller Destruktor der Klasse SfxMacro. Dieser sollte in den
- abgeleiteten Klassen "uberladen werden, um in den Modi
- SFX_MACRO_RECORDINGABSOLUTE und SFX_MACRO_RECORDINGRELATIVE den
- aufgezeichneten Source abzuspeichern.
+ Virtual Destructor of the SfxMacro class. This should be overloaded in
+ the derived classes to save the recorded source in the mode
+ SFX_MACRO_RECORDINGABSOLUTE and SFX_MACRO_RECORDINGRELATIVE.
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::GenerateSource()const>
*/
@@ -416,13 +413,12 @@ SfxMacro::~SfxMacro()
SfxMacroMode SfxMacro::GetMode() const
-/* [Beschreibung]
-
- Liefert den Modus, der besagt zu welchem Zweck das SfxMacro konstruiert
- wurde.
+/* [Description]
+ Returns the mode, which indicates for what purpose this SfxMacro was
+ constructed.
- [Querverweise]
+ [Cross-reference]
enum <SfxMacroMode>
*/
@@ -435,21 +431,20 @@ SfxMacroMode SfxMacro::GetMode() const
void SfxMacro::Record
(
- SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+ SfxMacroStatement* pStatement // the recordning <SfxMacroStatement>
)
-/* [Beschreibung]
-
- Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
- Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
- des SfxMacro "uber.
+/* [Description]
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wirde.
+ This method features the parameters passed on as a Statement. The
+ instance to which the pointer points is transfered to the ownership
+ of SfxMacro.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Replace(SfxMacroStatement*)>
<SfxMacro::Remove()>
@@ -465,35 +460,30 @@ void SfxMacro::Record
void SfxMacro::Replace
(
- SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+ SfxMacroStatement* pStatement // the recording <SfxMacroStatement>
)
-/* [Beschreibung]
+/* [Description]
- Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
- Dabei wird das jeweils zuletzt aufgezeichnete Statement "uberschrieben.
- Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
- des SfxMacro "uber.
+ This method records the statement passed on as a parameter. This will
+ overwrite the last recorded statement. The instance to which the passed
+ pointer points is transfered to the ownership of the SfxMacro.
- Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
- anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
- das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
- Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
- Statement 'InsertString("Hallo")' ersetzt werden.
+ With this method it is possible to combine statements. For example, instead
+ of calling the 'CursorLeft()' five times could be summarized as
+ 'CursorLeft (5)'. Or rather than building a word letter by letter, this
+ could be done by a single statement 'InsertString("Hello")'.
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
- ist.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
+ [Note]
- [Anmerkung]
+ This method is typically called from the execute methods of
+ <SfxSlot>s created by the application developers.
- Diese Methode wird typischerweise aus den Execute-Methoden der
- <SfxSlot>s von den Applikationsentwicklern gerufen.
-
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Remove()>
@@ -511,30 +501,26 @@ void SfxMacro::Replace
void SfxMacro::Remove()
-/* [Beschreibung]
-
- Diese Methode l"oscht das zuletzt aufgezeichnete <SfxMacroStatement>
- und entfernt es aus dem Macro.
+/* [Description]
- Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
- anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
- das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
- Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
- Statement 'InsertString("Hallo")' ersetzt werden.
+ This method deletes the last recorded <SfxMacroStatement> and removes
+ it from the macro.
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
- ist.
+ With this method it is possible to combine statements. For example, instead
+ of calling the 'CursorLeft()' five times could be summarized as
+ 'CursorLeft (5)'. Or rather than building a word letter by letter, this
+ could be done by a single statement 'InsertString("Hello")'.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
- [Anmerkung]
+ [Note]
- Diese Methode wird typischerweise aus den Execute-Methoden der
- <SfxSlot>s von den Applikationsentwicklern gerufen.
+ This method is typically called from the the Execute methods of <SfxSlot>s
+ by the application developer.
-
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Replace(SfxMacroStatement*)>
<SfxMacro::Record(SfxMacroStatement*)>
@@ -551,19 +537,17 @@ void SfxMacro::Remove()
const SfxMacroStatement* SfxMacro::GetLastStatement() const
-/* [Beschreibung]
-
- Mit dieser Methode kann auf das jeweils zuletzt aufgezeichnete Statement
- lesend zugegriffen werden. Zusammen mit der Methode
- <SfxMacro::Replace(SfxMacroStatement*)> ergibt sich dadurch die
- M"oglichkeit, Statements zusammenzufassen.
+/* [Description]
- Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
- welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
- konstruiert wurde.
+ This method enables read access to the last recorded statement.
+ Together with the method <SfxMacro::Replace(SfxMacroStatement*)> this opens
+ for the possibility to summarize statements.
+ The call is only valid if it is about a SfxMacro, which was constructed
+ with SFX_MACRO_RECORDINGRELATIVE or SFX_MACRO_RECORDINGABSOLUTE and is
+ available as an already recorded statement.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Replace(SfxMacroStatement*)>
@@ -580,15 +564,14 @@ const SfxMacroStatement* SfxMacro::GetLastStatement() const
String SfxMacro::GenerateSource() const
-/* [Beschreibung]
-
- Diese Funktion generiert aus den, seit dem Konstruieren der Instanz
- bis zum Zeitpunkt des Aufrufs dieser Methode aufgezeichneten
- <SfxMacroStatement>s einen BASIC-Sourcecode, der die Statements,
- jedoch nicht den Header ('Sub X') und den Footer ('End Sub') enth"alt.
+/* [Description]
+ This function generates BASIC source code that contains the statements, but
+ does not contain the header ('Sub X') and Footer ('End Sub') from recorded
+ <SfxMacroStatement> since the construction of the instance until the time
+ of calling this method.
- [Querverweise]
+ [Cross-reference]
<SfxMacro::Record(SfxMacroStatement*)>
<SfxMacro::Repeat(SfxMacroStatement*)>
diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk
index 8679758..4dc271c 100644
--- a/sfx2/source/control/makefile.mk
+++ b/sfx2/source/control/makefile.mk
@@ -36,7 +36,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/util$/makefile.pmk
-# w.g. compilerbugs
+# due to compilerbugs
.IF "$(GUI)"=="WNT"
.IF "$(COM)"!="GCC"
CFLAGS+=-Od
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index 5075a0b..d607dc7 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -40,7 +40,7 @@ TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
// -----------------------------------------------------------------------
SfxMacroInfoItem::SfxMacroInfoItem(
- USHORT nWhichId, // Slot-ID
+ USHORT nWhichId, // Slot-ID
const BasicManager* pMgr,
const String &rLibName,
const String &rModuleName,
@@ -57,7 +57,7 @@ SfxMacroInfoItem::SfxMacroInfoItem(
// -----------------------------------------------------------------------
-// copy ctor
+// copy constructor
SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem& rCopy):
SfxPoolItem(rCopy),
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index a18341e..4240e3c 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -31,7 +31,7 @@
#include <tools/stream.hxx>
#include <rsc/rscsfx.hxx>
-// wg. pSlotPool
+// due to pSlotPool
#include "appdata.hxx"
#include <sfx2/msgpool.hxx>
#include <sfx2/minarray.hxx>
@@ -98,7 +98,6 @@ SfxSlotPool::~SfxSlotPool()
}
//====================================================================
-
// registers the availability of the Interface of functions
void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
@@ -110,8 +109,8 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
_pInterfaces = new SfxInterfaceArr_Impl;
_pInterfaces->Append(&rInterface);
- // bei einem (einzelnen) Null-Slot abbrechen (aus syntaktischen Gr"unden
- // enthalten interfaces immer mindestens einen Slot)
+ // Stop at a (single) Null-slot (for syntactic reasons the interfaces
+ // always contain at least one slot)
if ( rInterface.Count() == 1 && !rInterface[0]->nSlotId )
return;
@@ -122,7 +121,7 @@ void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
if ( _pParentPool )
{
- // Die Groups im parent Slotpool sind auch hier bekannt
+ // The Groups in parent Slotpool are also known here
SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups;
for ( USHORT n=0; n<rGroups.Count(); n++ )
_pGroups->Append( rGroups[n] );
@@ -162,7 +161,6 @@ TypeId SfxSlotPool::GetSlotType( USHORT nId ) const
}
//====================================================================
-
// unregisters the availability of the Interface of functions
void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface )
@@ -182,7 +180,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
- // Zun"achst die eigenen Interfaces absuchen
+ // First, search their own interfaces
for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
{
const SfxSlot *pDef = _pInterfaces->GetObject(nInterf)->GetSlot(nId);
@@ -190,7 +188,7 @@ const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
return pDef;
}
- // Dann beim eventuell vorhandenen parent versuchen
+ // Then try any of the possible existing parent
return _pParentPool ? _pParentPool->GetSlot( nId ) : 0;
}
@@ -209,15 +207,14 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
_nCurGroup = nNo;
if ( _pParentPool )
{
- // Meistens stimmt die Reihenfolge der Ids "uberein
+ // In most cases, the order of the IDs agree
USHORT nParentCount = _pParentPool->_pGroups->Count();
if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] )
_pParentPool->_nCurGroup = nNo;
else
{
- // Ansonsten mu\s gesucht werden
- // Wenn die Gruppe im parent pool nicht gefunden wird, wird
- // _nCurGroup au\serhalb des g"ultigen Bereiches gesetzt
+ // Otherwise search. If the group is not found in the parent
+ // pool, _nCurGroup is set outside the valid range
USHORT i;
for ( i=1; i<nParentCount; i++ )
if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] )
@@ -230,7 +227,7 @@ String SfxSlotPool::SeekGroup( USHORT nNo )
aResId.SetRT(RSC_STRING);
if ( !aResId.GetResMgr()->IsAvailable(aResId) )
{
- DBG_ERROR( "GroupId-Name nicht im SFX definiert!" );
+ DBG_ERROR( "GroupId-Name not defined in SFX!" );
return String();
}
@@ -258,18 +255,18 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
- // Die Numerierung der interfaces startet beim parent pool
+ // The numbering starts at the interfaces of the parent pool
USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
- // sind wir am Ende des Parent-Pools angekommen?
+ // have reached the end of the Parent-Pools?
if ( nStartInterface < nFirstInterface &&
_pParentPool->_nCurGroup >= _pParentPool->_pGroups->Count() )
nStartInterface = nFirstInterface;
- // liegt das Interface noch im Parent-Pool?
+ // Is the Interface still in the Parent-Pool?
if ( nStartInterface < nFirstInterface )
{
- DBG_ASSERT( _pParentPool, "Kein parent pool!" );
+ DBG_ASSERT( _pParentPool, "No parent pool!" );
_nCurInterface = nStartInterface;
return _pParentPool->SeekSlot( nStartInterface );
}
@@ -295,7 +292,6 @@ const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
}
//--------------------------------------------------------------------
-
// skips to the next func in the current group
const SfxSlot* SfxSlotPool::NextSlot()
@@ -303,7 +299,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
DBG_MEMTEST();
DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
- // Die Numerierung der interfaces startet beim parent pool
+ // The numbering starts at the interfaces of the parent pool
USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() )
@@ -311,13 +307,13 @@ const SfxSlot* SfxSlotPool::NextSlot()
if ( _nCurInterface < nFirstInterface )
{
- DBG_ASSERT( _pParentPool, "Kein parent pool!" );
+ DBG_ASSERT( _pParentPool, "No parent pool!" );
const SfxSlot *pSlot = _pParentPool->NextSlot();
_nCurInterface = _pParentPool->_nCurInterface;
if ( pSlot )
return pSlot;
if ( _nCurInterface == nFirstInterface )
- // parent pool ist fertig
+ // parent pool is ready
return SeekSlot( nFirstInterface );
}
@@ -340,9 +336,7 @@ const SfxSlot* SfxSlotPool::NextSlot()
//--------------------------------------------------------------------
-
-// SlotName erfragen, gfs. mit HilfeText
-
+// Query SlotName with help text
//--------------------------------------------------------------------
SfxInterface* SfxSlotPool::FirstInterface()
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 9aa0ebe..16a6f48 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -68,12 +68,12 @@ SfxCompareSlots_Impl( const void* pSmaller, const void* pBigger )
struct SfxObjectUI_Impl
{
- USHORT nPos;
- ResId aResId;
- BOOL bVisible;
- BOOL bContext;
+ USHORT nPos;
+ ResId aResId;
+ BOOL bVisible;
+ BOOL bContext;
String* pName;
- sal_uInt32 nFeature;
+ sal_uInt32 nFeature;
SfxObjectUI_Impl(USHORT n, const ResId& rResId, BOOL bVis, sal_uInt32 nFeat) :
nPos(n),
@@ -96,12 +96,12 @@ DECL_PTRARRAY(SfxObjectUIArr_Impl, SfxObjectUI_Impl*, 2, 2)
struct SfxInterface_Impl
{
- SfxObjectUIArr_Impl* pObjectBars; // registered ObjectBars
- SfxObjectUIArr_Impl* pChildWindows; // registered ChildWindows
- ResId aPopupRes; // registered PopupMenu
- ResId aStatBarRes; // registered StatusBar
- SfxModule* pModule;
- BOOL bRegistered;
+ SfxObjectUIArr_Impl* pObjectBars; // registered ObjectBars
+ SfxObjectUIArr_Impl* pChildWindows; // registered ChildWindows
+ ResId aPopupRes; // registered PopupMenu
+ ResId aStatBarRes; // registered StatusBar
+ SfxModule* pModule;
+ BOOL bRegistered;
SfxInterface_Impl() :
aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()),
@@ -130,7 +130,7 @@ static SfxObjectUI_Impl* CreateObjectBarUI_Impl( USHORT nPos, const ResId& rResI
//====================================================================
//====================================================================
-// ctor, registeres a new unit
+// constuctor, registeres a new unit
SfxInterface::SfxInterface( const char *pClassName,
const ResId& rNameResId,
@@ -182,9 +182,9 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
pIter->GetSlotId() != (pIter+1)->GetSlotId(),
"doppelte SID" );
- // jeder Master verweist auf seinen ersten Slave (ENUM), alle
- // Slaves auf ihren Master.
- // Slaves verweisen im Ring auf die anderen mit gleichem Master
+ // every master refers to his first slave (ENUM),
+ // all slaves refer to their master.
+ // Slaves refer in a circle to the other slaves with the same master
if ( pIter->GetKind() == SFX_KIND_ENUM )
{
pIter->pLinkedSlot = GetSlot( pIter->nMasterSlotId );
@@ -209,7 +209,8 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
}
else if ( 0 == pIter->GetNextSlot() )
{
- // Slots verweisen im Ring auf den n"achten mit derselben Statusmethode
+ // Slots refering in circle to the next with the same
+ // Status method.
SfxSlot *pLastSlot = pIter;
for ( USHORT n = nIter; n < Count(); ++n )
{
@@ -232,7 +233,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
{
if ( pNext->GetSlotId() <= pIter->GetSlotId() )
- DBG_ERROR ("Falsche Reihenfolge!");
+ DBG_ERROR ("Wrong order!");
if ( pIter->GetKind() == SFX_KIND_ENUM )
{
@@ -243,7 +244,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
{
if ( pSlave->pLinkedSlot != pMasterSlot )
{
- ByteString aStr("Falsche Master/Slave-Verkettung : ");
+ ByteString aStr("Wrong Master/Slave- link: ");
aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
@@ -252,7 +253,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
if ( pSlave->nMasterSlotId != pMasterSlot->GetSlotId() )
{
- ByteString aStr("Falsche Master/Slave-Ids : ");
+ ByteString aStr("Wrong Master/Slave-Ids: ");
aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
@@ -269,7 +270,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
{
if ( pIter->pLinkedSlot->GetKind() != SFX_KIND_ENUM )
{
- ByteString aStr("Slave ist kein enum : ");
+ ByteString aStr("Slave is no enum: ");
aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pIter->pLinkedSlot->GetSlotId());
@@ -283,7 +284,7 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
pCurSlot = pCurSlot->pNextSlot;
if ( pCurSlot->GetStateFnc() != pIter->GetStateFnc() )
{
- ByteString aStr("Verkettete Slots mit verschiedenen StateMethods : ");
+ ByteString aStr("Linked Slots with different State Methods : ");
aStr += ByteString::CreateFromInt32(pCurSlot->GetSlotId());
aStr += " , ";
aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
@@ -299,11 +300,8 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
#endif
}
-
//--------------------------------------------------------------------
-
-
SfxInterface::~SfxInterface()
{
SfxModule *pMod = pImpData->pModule;
@@ -323,7 +321,6 @@ SfxInterface::~SfxInterface()
// searches for the specified func
-
const SfxSlot* SfxInterface::GetSlot( USHORT nFuncId ) const
{
DBG_MEMTEST();
@@ -359,7 +356,6 @@ const SfxSlot* SfxInterface::GetSlot( const String& rCommand ) const
//--------------------------------------------------------------------
-
const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
{
DBG_MEMTEST();
@@ -370,7 +366,7 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
{
if(pGenoType)
return pGenoType->GetRealSlot(pSlot);
- DBG_ERROR("fremder Slot");
+ DBG_ERROR("unknown Slot");
return 0;
}
@@ -379,7 +375,6 @@ const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
//--------------------------------------------------------------------
-
const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const
{
DBG_MEMTEST();
@@ -400,7 +395,6 @@ const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const
//--------------------------------------------------------------------
-
void SfxInterface::RegisterPopupMenu( const ResId& rResId )
{
DBG_CHKTHIS(SfxInterface, 0);
@@ -453,10 +447,10 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
- // Gibt es Toolbars in der Superklasse ?
+ // Are there toolbars in the super class?
USHORT nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetObjectBarResId( nNo );
else
nNo = nNo - nBaseCount;
@@ -464,7 +458,7 @@ const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
#ifdef DBG_UTIL
USHORT nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->aResId;
}
@@ -477,10 +471,10 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
- // Gibt es Toolbars in der Superklasse ?
+ // Are there toolbars in the super class?
USHORT nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetObjectBarPos( nNo );
else
nNo = nNo - nBaseCount;
@@ -488,7 +482,7 @@ USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
#ifdef DBG_UTIL
USHORT nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nPos;
}
@@ -527,10 +521,10 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
{
if ( pGenoType )
{
- // Gibt es ChildWindows in der Superklasse ?
+ // Are there ChildWindows in der Superklasse?
USHORT nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetChildWindowId( nNo );
else
nNo = nNo - nBaseCount;
@@ -538,7 +532,7 @@ sal_uInt32 SfxInterface::GetChildWindowId (USHORT nNo) const
#ifdef DBG_UTIL
USHORT nCWCount = pImpData->pChildWindows->Count();
- DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" );
+ DBG_ASSERT( nNo<nCWCount,"ChildWindow is unknown!" );
#endif
sal_uInt32 nRet = (*pImpData->pChildWindows)[nNo]->aResId.GetId();
if ( (*pImpData->pChildWindows)[nNo]->bContext )
@@ -550,10 +544,10 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
{
if ( pGenoType )
{
- // Gibt es ChildWindows in der Superklasse ?
+ // Are there ChildWindows in der Superklasse?
USHORT nBaseCount = pGenoType->GetChildWindowCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetChildWindowFeature( nNo );
else
nNo = nNo - nBaseCount;
@@ -561,7 +555,7 @@ sal_uInt32 SfxInterface::GetChildWindowFeature (USHORT nNo) const
#ifdef DBG_UTIL
USHORT nCWCount = pImpData->pChildWindows->Count();
- DBG_ASSERT( nNo<nCWCount,"ChildWindow ist unbekannt!" );
+ DBG_ASSERT( nNo<nCWCount,"ChildWindow is unknown!" );
#endif
return (*pImpData->pChildWindows)[nNo]->nFeature;
}
@@ -599,10 +593,10 @@ const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
- // Gibt es Toolbars in der Superklasse ?
+ // Are there toolbars in the super class?
USHORT nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetObjectBarName( nNo );
else
nNo = nNo - nBaseCount;
@@ -610,7 +604,7 @@ const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
#ifdef DBG_UTIL
USHORT nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->pName;
}
@@ -620,10 +614,10 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
- // Gibt es Toolbars in der Superklasse ?
+ // Are there toolbars in the super class?
USHORT nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->GetObjectBarFeature( nNo );
else
nNo = nNo - nBaseCount;
@@ -631,7 +625,7 @@ sal_uInt32 SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
#ifdef DBG_UTIL
USHORT nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->nFeature;
}
@@ -641,10 +635,10 @@ BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
if ( bGenoType )
{
- // Gibt es Toolbars in der Superklasse ?
+ // Are there toolbars in the super class?
USHORT nBaseCount = pGenoType->GetObjectBarCount();
if ( nNo < nBaseCount )
- // Die der Superklasse kommen zuerst
+ // The Super class comes first
return pGenoType->IsObjectBarVisible( nNo );
else
nNo = nNo - nBaseCount;
@@ -652,7 +646,7 @@ BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
#ifdef DBG_UTIL
USHORT nObjBarCount = pImpData->pObjectBars->Count();
- DBG_ASSERT( nNo<nObjBarCount,"Objectbar ist unbekannt!" );
+ DBG_ASSERT( nNo<nObjBarCount,"Objectbar is unknown!" );
#endif
return (*pImpData->pObjectBars)[nNo]->bVisible;
}
@@ -662,17 +656,17 @@ const SfxInterface* SfxInterface::GetRealInterfaceForSlot( const SfxSlot
*pRealS
DBG_ASSERT( pImpData->bRegistered, "Interface not registered!" );
const SfxInterface* pInterface = this;
- // Der Slot k"onnte auch aus dem Interface einer Shell-Basisklasse stammen
+ // The slot could also originate from the interface of a shell base class.
do
{
const SfxSlot *pLastSlot = (*pInterface)[pInterface->Count()-1];
const SfxSlot *pFirstSlot = (*pInterface)[0];
- // Ist pInterface der Owner von pRealSlot ?
+ // Is pInterface the Owner of pRealSlot ?
if ( pFirstSlot <= pRealSlot && pRealSlot <= pLastSlot )
break;
- // Sonst Interface der Superklasse probieren
+ // Otherwise try the Interface of Super class
pInterface = pInterface->pGenoType;
}
while ( pInterface );
@@ -680,6 +674,4 @@ const SfxInterface* SfxInterface::GetRealInterfaceForSlot( const SfxSlot *pRealS
return pInterface;
}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Context
- [Libreoffice] [Patch] Translation of German comments in sfx2/ (part 2/4) · Albert Thuswaldner
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.