Kaydet (Commit) 0fb93815 authored tarafından Albert Thuswaldner's avatar Albert Thuswaldner Kaydeden (comit) Caolán McNamara

Translations of German comments in sfx

üst 998e7286
......@@ -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),
......@@ -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;
......
This diff is collapsed.
......@@ -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
......
......@@ -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),
......
......@@ -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()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment