[Libreoffice-commits] .: sfx2/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Jan 26 13:06:59 PST 2011
sfx2/source/appl/impldde.cxx | 57 ++---
sfx2/source/appl/impldde.hxx | 4
sfx2/source/appl/linkmgr2.cxx | 58 ++---
sfx2/source/appl/linksrc.cxx | 8
sfx2/source/appl/lnkbase2.cxx | 111 +++++-----
sfx2/source/appl/makefile.mk | 2
sfx2/source/appl/module.cxx | 19 -
sfx2/source/appl/sfxdll.cxx | 2
sfx2/source/appl/sfxpicklist.cxx | 18 -
sfx2/source/appl/workwin.cxx | 396 +++++++++++++++++++--------------------
sfx2/source/bastyp/bastyp.hrc | 14 -
sfx2/source/bastyp/fltfnc.cxx | 23 +-
sfx2/source/bastyp/frmhtml.cxx | 12 -
sfx2/source/bastyp/frmhtmlw.cxx | 2
sfx2/source/bastyp/minarray.cxx | 88 ++++----
sfx2/source/bastyp/progress.cxx | 173 +++++++----------
sfx2/source/bastyp/sfxhtml.cxx | 49 ++--
17 files changed, 509 insertions(+), 527 deletions(-)
New commits:
commit 26215eb71b3fc144ae8a43a75bbfe9346a1736f6
Author: Albert Thuswaldner <albert.thuswaldner at gmail.com>
Date: Wed Jan 26 21:06:32 2011 +0000
Translations of German comments in sfx
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index f2c9d1b..60616a8 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -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..86734c6 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& );
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 8cc84ae..c4038da 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;
@@ -509,20 +509,19 @@ void LinkManager::CancelTransfers()
// 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" )));
@@ -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..cbd000a 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();
}
@@ -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..b0aeaa4 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 Advice
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 )
@@ -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,12 +632,12 @@ 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 );
@@ -649,8 +646,8 @@ void ImplDdeItem::AdviseLoop( BOOL bOpen )
}
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..b1e6334 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
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index ef3f934..05ae3d8 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -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..7d9ea18 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -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;
@@ -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;
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index d979fdf..6675274 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()
@@ -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.
*/
{
@@ -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 ba03a47..6065f72 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -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..ac1a400 100644
--- a/sfx2/source/bastyp/frmhtml.cxx
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -68,14 +68,14 @@ static HTMLOptionEnum const aScollingTable[] =
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 like 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();
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index f7b597a..5e32c5d 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -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
}
*/
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
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list