Kaydet (Commit) c5d47afc authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Noel Grandin

Translate German comments, fix some ws

Change-Id: Ida67ce193ad032e2a1855e4380626f805514c2f2
Reviewed-on: https://gerrit.libreoffice.org/11103Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 32ce5ae1
......@@ -128,11 +128,11 @@ long ScGlobal::nLastColWidthExtra = STD_EXTRA_WIDTH;
static sal_uInt16 nPPTZoom = 0; // ScreenZoom used to determine nScreenPPTX/Y
class SfxViewShell;
SfxViewShell* pScActiveViewShell = NULL; //! als Member !!!!!
sal_uInt16 nScClickMouseModifier = 0; //! dito
sal_uInt16 nScFillModeMouseModifier = 0; //! dito
SfxViewShell* pScActiveViewShell = NULL; //FIXME: Make this a member
sal_uInt16 nScClickMouseModifier = 0; //FIXME: This too
sal_uInt16 nScFillModeMouseModifier = 0; //FIXME: And this
// statische Funktionen
// Static functions
bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs,
......@@ -144,16 +144,15 @@ bool ScGlobal::HasAttrChanged( const SfxItemSet& rNewAttrs,
if ( eNewState == eOldState )
{
// beide Items gesetzt
// PoolItems, d.h. Pointer-Vergleich zulaessig
// Both Items set
// PoolItems, meaning comparing pointers is valid
if ( SFX_ITEM_SET == eOldState )
bInvalidate = (&rNewAttrs.Get( nWhich ) != &rOldAttrs.Get( nWhich ));
}
else
{
// ein Default-Item dabei
// PoolItems, d.h. Item-Vergleich noetig
// Contains a Default Item
// PoolItems, meaning Item comparison necessary
const SfxPoolItem& rOldItem = ( SFX_ITEM_SET == eOldState )
? rOldAttrs.Get( nWhich )
: rOldAttrs.GetPool()->GetDefaultItem( nWhich );
......@@ -197,9 +196,8 @@ bool ScGlobal::CheckWidthInvalidate( bool& bNumFormatChanged,
const SfxItemSet& rNewAttrs,
const SfxItemSet& rOldAttrs )
{
// Ueberpruefen, ob Attributaenderungen in rNewAttrs gegnueber
// rOldAttrs die Textbreite an einer Zelle ungueltig machen
// Check whether attribute changes in rNewAttrs compared to rOldAttrs render
// the text width at a cell invalid
bNumFormatChanged =
HasAttrChanged( rNewAttrs, rOldAttrs, ATTR_VALUE_FORMAT );
return ( bNumFormatChanged
......@@ -241,7 +239,7 @@ const SvxSearchItem& ScGlobal::GetSearchItem()
void ScGlobal::SetSearchItem( const SvxSearchItem& rNew )
{
// Hier waere ein Zuweisungsoperator ganz nett:
// FIXME: An assignement operator would be nice here
delete pSearchItem;
pSearchItem = (SvxSearchItem*)rNew.Clone();
......@@ -290,8 +288,7 @@ ScUnoAddInCollection* ScGlobal::GetAddInCollection()
ScUserList* ScGlobal::GetUserList()
{
// Hack: Cfg-Item an der App ggF. laden
// Hack: Load Cfg item at the App
global_InitAppOptions();
if (!pUserList)
......@@ -499,13 +496,13 @@ void ScGlobal::Init()
{
pEmptyOUString = new OUString;
// Die Default-Sprache fuer Zahlenformate (ScGlobal::eLnge)
// muss immer LANGUAGE_SYSTEM sein
//! Dann kann auch die Variable raus
// The default language for number formats (ScGlobal::eLnge) must
// always be LANGUAGE_SYSTEM
// FIXME: So remove this variable?
eLnge = LANGUAGE_SYSTEM;
//! Wenn Sortierung etc. von der Sprache der installierten Offfice-Version
//! abhaengen sollen, hier "Application::GetSettings().GetUILanguage()"
// FIXME: If the sort-order etc. should depend the installed Office version
// use Application::GetSettings().GetUILanguage() here
pSysLocale = new SvtSysLocale;
pCharClass = pSysLocale->GetCharClassPtr();
pLocaleData = pSysLocale->GetLocaleDataPtr();
......@@ -524,7 +521,7 @@ void ScGlobal::Init()
// arguments are to be merged in, which in turn need strings of function
// names from the compiler.
ScParameterClassification::Init();
srand( (unsigned) time( NULL ) ); // Random Seed Init fuer Interpreter
srand( (unsigned) time( NULL ) ); // Random Seed Init for Interpreter
::comphelper::rng::seed( time( NULL ) ); // seed for libc rand() replacement
InitAddIns();
......@@ -532,7 +529,7 @@ void ScGlobal::Init()
pStrClipDocName = new OUString( ScResId( SCSTR_NONAME ) );
*pStrClipDocName += "1";
// ScDocumentPool::InitVersionMaps() ist schon vorher gerufen worden
// ScDocumentPool::InitVersionMaps() has been called earlier already
}
void ScGlobal::UpdatePPT( OutputDevice* pDev )
......@@ -583,7 +580,7 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
VirtualDevice aVirtWindow( *pDefaultDev );
aVirtWindow.SetMapMode(MAP_PIXEL);
Font aDefFont;
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // font color doesn't matter here
pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // Font color doesn't matter here
aVirtWindow.SetFont(aDefFont);
sal_uInt16 nTest = static_cast<sal_uInt16>(
aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()), MAP_TWIP).Height());
......@@ -602,7 +599,7 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool)
void ScGlobal::Clear()
{
// asyncs _vor_ ExitExternalFunc zerstoeren!
// Destroy asyncs _before_ ExitExternalFunc!
for( ScAddInAsyncs::iterator it = theAddInAsyncTbl.begin(); it != theAddInAsyncTbl.end(); ++it )
{
delete *it;
......@@ -620,11 +617,11 @@ void ScGlobal::Clear()
delete[] ppRscString;
ppRscString = NULL;
DELETEZ(pStarCalcFunctionList); // vor ResMgr zerstoeren!
DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr!
DELETEZ(pStarCalcFunctionMgr);
ScParameterClassification::Exit();
ScCompiler::DeInit();
ScInterpreter::GlobalExit(); // statischen Stack loeschen
ScInterpreter::GlobalExit(); // Delete static Stack
DELETEZ(pEmptyBrushItem);
DELETEZ(pButtonBrushItem);
......@@ -724,7 +721,6 @@ ScFunctionMgr* ScGlobal::GetStarCalcFunctionMgr()
void ScGlobal::ResetFunctionList()
{
// FunctionMgr has pointers into FunctionList, must also be updated
DELETEZ( pStarCalcFunctionMgr );
DELETEZ( pStarCalcFunctionList );
}
......@@ -845,12 +841,12 @@ const sal_Unicode* ScGlobal::FindUnquoted( const sal_Unicode* pString, sal_Unico
bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
const EditTextObject* pObj2 )
{
if ( pObj1 == pObj2 ) // both empty or the same object
if ( pObj1 == pObj2 ) // Both empty or the same object
return true;
if ( pObj1 && pObj2 )
{
// first test for equal text content
// First test for equal text content
sal_Int32 nParCount = pObj1->GetParagraphCount();
if ( nParCount != pObj2->GetParagraphCount() )
return false;
......@@ -873,22 +869,22 @@ bool ScGlobal::EETextObjEqual( const EditTextObject* pObj1,
void ScGlobal::OpenURL( const OUString& rURL, const OUString& rTarget )
{
// OpenURL wird immer ueber irgendwelche Umwege durch Mausklicks im GridWindow
// aufgerufen, darum stimmen pScActiveViewShell und nScClickMouseModifier.
//SvtSecurityOptions to access Libreoffice global security parameters
// OpenURL is always called in the GridWindow by mouse clicks in some way or another.
// That's why pScActiveViewShell and nScClickMouseModifier are correct.
// SvtSecurityOptions to access Libreoffice global security parameters
SvtSecurityOptions aSecOpt;
bool bCtrlClickHappened = (nScClickMouseModifier & KEY_MOD1);
bool bCtrlClickSecOption = aSecOpt.IsOptionSet( SvtSecurityOptions::E_CTRLCLICK_HYPERLINK );
if( bCtrlClickHappened && !( bCtrlClickSecOption ) )
{
//return since ctrl+click happened when the
//ctrl+click security option was disabled, link should not open
// return since ctrl+click happened when the
// ctrl+click security option was disabled, link should not open
return;
}
else if( !( bCtrlClickHappened ) && bCtrlClickSecOption )
{
//ctrl+click did not happen; only click happened maybe with some
//other key combo. and security option is set, so return
// ctrl+click did not happen; only click happened maybe with some
// other key combo. and security option is set, so return
return;
}
SfxStringItem aUrl( SID_FILE_NAME, rURL );
......@@ -910,8 +906,7 @@ void ScGlobal::OpenURL( const OUString& rURL, const OUString& rTarget )
SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, false );
SfxBoolItem aBrowsing( SID_BROWSE, true );
// kein SID_SILENT mehr
// No SID_SILENT anymore
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
pViewFrm->GetDispatcher()->Execute( SID_OPENDOC,
......@@ -933,14 +928,12 @@ sal_uInt8 ScGlobal::GetDefaultScriptType()
// Script type of office language is used then (same as GetEditDefaultLanguage,
// to get consistent behavior of text in simple cells and EditEngine,
// also same as GetAppLanguage() in Writer)
return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() );
}
LanguageType ScGlobal::GetEditDefaultLanguage()
{
// used for EditEngine::SetDefaultLanguage
// Used for EditEngine::SetDefaultLanguage
return Application::GetSettings().GetLanguageTag().getLanguageType();
}
......@@ -1043,7 +1036,7 @@ void ScGlobal::AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter )
const SvNumberformat* pHardFormat = rFormatter.GetEntry(
((const SfxUInt32Item*)pHardItem)->GetValue() );
sal_uLong nParentFmt = 0; // pool default
sal_uLong nParentFmt = 0; // Pool default
const SfxItemSet* pParent = rSet.GetParent();
if ( pParent )
nParentFmt = ((const SfxUInt32Item&)pParent->Get( ATTR_VALUE_FORMAT )).GetValue();
......
......@@ -163,7 +163,7 @@ void ScOutlineArray::FindEntry(
if (nMaxLevel > nDepth)
nMaxLevel = nDepth;
for (size_t nLevel = 0; nLevel < nMaxLevel; ++nLevel) //! rueckwaerts suchen ?
for (size_t nLevel = 0; nLevel < nMaxLevel; ++nLevel) //TODO: Search backwards?
{
ScOutlineCollection* pCollect = &aCollections[nLevel];
ScOutlineCollection::iterator it = pCollect->begin(), itEnd = pCollect->end();
......@@ -172,7 +172,7 @@ void ScOutlineArray::FindEntry(
ScOutlineEntry* pEntry = it->second;
if (pEntry->GetStart() <= nSearchPos && pEntry->GetEnd() >= nSearchPos)
{
rFindLevel = nLevel + 1; // naechster Level (zum Einfuegen)
rFindLevel = nLevel + 1; // Next Level (for insertion)
rFindIndex = std::distance(pCollect->begin(), it);
}
}
......@@ -189,7 +189,7 @@ bool ScOutlineArray::Insert(
bool bCont;
sal_uInt16 nFindMax;
FindEntry( nStartCol, nStartLevel, nStartIndex ); // nLevel = neuer Level (alter+1) !!!
FindEntry( nStartCol, nStartLevel, nStartIndex ); // nLevel = new Level (old+1)
FindEntry( nEndCol, nEndLevel, nEndIndex );
nFindMax = std::max(nStartLevel,nEndLevel);
do
......@@ -230,8 +230,7 @@ bool ScOutlineArray::Insert(
size_t nLevel = nStartLevel;
// untere verschieben
// Move the ones underneath
bool bNeedSize = false;
if (nDepth > 0)
{
......@@ -247,7 +246,7 @@ bool ScOutlineArray::Insert(
{
if (nMoveLevel >= SC_OL_MAXDEPTH - 1)
{
rSizeChanged = false; // kein Platz
rSizeChanged = false; // No more room
return false;
}
aCollections[nMoveLevel+1].insert(new ScOutlineEntry(*pEntry));
......@@ -305,7 +304,7 @@ bool ScOutlineArray::FindTouchedLevel(
if ( ( nBlockStart>=nStart && nBlockStart<=nEnd ) ||
( nBlockEnd >=nStart && nBlockEnd <=nEnd ) )
{
rFindLevel = nLevel; // wirklicher Level
rFindLevel = nLevel; // Actual Level
bFound = true;
}
}
......@@ -329,10 +328,10 @@ void ScOutlineArray::RemoveSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nLev
SCCOLROW nEnd = pEntry->GetEnd();
if (nStart >= nStartPos && nEnd <= nEndPos)
{
// Overlaps.
// Overlaps
RemoveSub( nStart, nEnd, nLevel+1 );
// Re-calc iterator positions after the tree gets invalidated.
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
rColl.erase(it);
it = rColl.begin();
......@@ -356,7 +355,7 @@ void ScOutlineArray::RemoveSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nLev
{
RemoveSub( nStart, nEnd, nLevel+1 );
// Re-calc iterator positions after the tree gets invalidated.
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
rColl.erase(it);
it = rColl.begin();
......@@ -372,7 +371,7 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
{
if (nStartLevel==0)
{
OSL_FAIL("PromoteSub mit Level 0");
OSL_FAIL("PromoteSub with Level 0");
return;
}
......@@ -389,7 +388,7 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
{
aCollections[nLevel-1].insert(new ScOutlineEntry(*pEntry));
// Re-calc iterator positions after the tree gets invalidated.
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
rColl.erase(it);
it = rColl.begin();
......@@ -412,7 +411,7 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
{
aCollections[nLevel-1].insert(new ScOutlineEntry(*pEntry));
// Re-calc iterator positions after the tree gets invalidated.
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
rColl.erase(it);
it = rColl.begin();
......@@ -425,7 +424,10 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
}
}
bool ScOutlineArray::DecDepth() // nDepth auf leere Levels anpassen
/**
* Adapt nDepth for empty Levels
*/
bool ScOutlineArray::DecDepth()
{
bool bChanged = false;
bool bCont;
......@@ -462,7 +464,7 @@ bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, bool& rSi
SCCOLROW nEnd = pEntry->GetEnd();
if (nBlockStart <= nEnd && nBlockEnd >= nStart)
{
// Overlaps.
// Overlaps
pCollect->erase(it);
PromoteSub( nStart, nEnd, nLevel+1 );
itEnd = pCollect->end();
......@@ -473,7 +475,7 @@ bool ScOutlineArray::Remove( SCCOLROW nBlockStart, SCCOLROW nBlockEnd, bool& rSi
++it;
}
if (bAny) // Depth anpassen
if (bAny) // Adapt Depth
if (DecDepth())
rSizeChanged = true;
......@@ -538,7 +540,7 @@ bool ScOutlineArray::GetEntryIndex(size_t nLevel, SCCOLROW nPos, size_t& rnIndex
if (nLevel >= nDepth)
return false;
// found entry contains passed position
// Found entry contains passed position
const ScOutlineCollection& rColl = aCollections[nLevel];
ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
for (; it != itEnd; ++it)
......@@ -559,7 +561,7 @@ bool ScOutlineArray::GetEntryIndexInRange(
if (nLevel >= nDepth)
return false;
// found entry will be completely inside of passed range
// Found entry will be completely inside of passed range
const ScOutlineCollection& rColl = aCollections[nLevel];
ScOutlineCollection::const_iterator it = rColl.begin(), itEnd = rColl.end();
for (; it != itEnd; ++it)
......@@ -603,7 +605,7 @@ void ScOutlineArray::SetVisibleBelow(
}
if (bSkipHidden)
nSubLevel = nDepth; // Abbruch
nSubLevel = nDepth; // Bail out
}
}
......@@ -667,8 +669,8 @@ void ScOutlineArray::InsertSpace(SCCOLROW nStartPos, SCSIZE nSize)
else
{
SCCOLROW nEnd = pEntry->GetEnd();
// immer erweitern, wenn innerhalb der Gruppe eingefuegt
// beim Einfuegen am Ende nur, wenn die Gruppe nicht ausgeblendet ist
// Always expand if inserted within the group
// When inserting at the end, only if the group is not hidden
if ( nEnd >= nStartPos || ( nEnd+1 >= nStartPos && !pEntry->IsHidden() ) )
{
SCSIZE nEntrySize = pEntry->GetSize();
......@@ -682,8 +684,8 @@ void ScOutlineArray::InsertSpace(SCCOLROW nStartPos, SCSIZE nSize)
bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize)
{
SCCOLROW nEndPos = nStartPos + nSize - 1;
bool bNeedSave = false; // Original fuer Undo benoetigt?
bool bChanged = false; // fuer Test auf Level
bool bNeedSave = false; // Do we need the original one for Undo?
bool bChanged = false; // For Level test
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
......@@ -695,21 +697,21 @@ bool ScOutlineArray::DeleteSpace(SCCOLROW nStartPos, SCSIZE nSize)
if ( nEntryEnd >= nStartPos )
{
if ( nEntryStart > nEndPos ) // rechts
if ( nEntryStart > nEndPos ) // Right
pEntry->Move(-(static_cast<SCsCOLROW>(nSize)));
else if ( nEntryStart < nStartPos && nEntryEnd >= nEndPos ) // aussen
else if ( nEntryStart < nStartPos && nEntryEnd >= nEndPos ) // Outside
pEntry->SetSize( nEntrySize-nSize );
else
{
bNeedSave = true;
if ( nEntryStart >= nStartPos && nEntryEnd <= nEndPos ) // innen
if ( nEntryStart >= nStartPos && nEntryEnd <= nEndPos ) // Inside
{
aIter.DeleteLast();
bChanged = true;
}
else if ( nEntryStart >= nStartPos ) // rechts ueber
else if ( nEntryStart >= nStartPos ) // Top right
pEntry->SetPosSize( nStartPos, static_cast<SCSIZE>(nEntryEnd-nEndPos) );
else // links ueber
else // Top left
pEntry->SetSize( static_cast<SCSIZE>(nStartPos-nEntryStart) );
}
}
......@@ -806,7 +808,7 @@ bool ScOutlineTable::DeleteRow( SCROW nStartRow, SCSIZE nSize )
ScSubOutlineIterator::ScSubOutlineIterator( ScOutlineArray* pOutlineArray ) :
pArray( pOutlineArray ),
nStart( 0 ),
nEnd( SCCOLROW_MAX ), // alle durchgehen
nEnd( SCCOLROW_MAX ), // Iterate over all of them
nSubLevel( 0 ),
nSubEntry( 0 )
{
......@@ -851,13 +853,13 @@ ScOutlineEntry* ScSubOutlineIterator::GetNext()
}
else
{
// Go to the next sub-level.
// Go to the next sub-level
nSubEntry = 0;
++nSubLevel;
}
}
while (!bFound);
return pEntry; // nSubLevel gueltig, wenn pEntry != 0
return pEntry; // nSubLevel valid, if pEntry != 0
}
size_t ScSubOutlineIterator::LastEntry() const
......
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