diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/base/exchange.cxx | 33 | ||||
-rw-r--r-- | sot/source/base/filelist.cxx | 4 | ||||
-rw-r--r-- | sot/source/base/formats.cxx | 64 | ||||
-rw-r--r-- | sot/source/base/object.cxx | 11 | ||||
-rw-r--r-- | sot/source/sdstor/stgavl.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgcache.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 4 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.cxx | 10 | ||||
-rw-r--r-- | sot/source/sdstor/stgstrms.cxx | 14 | ||||
-rw-r--r-- | sot/source/sdstor/storinfo.cxx | 2 | ||||
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 2 |
11 files changed, 71 insertions, 77 deletions
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx index 286f4c7e49e2..f4a51bff5121 100644 --- a/sot/source/base/exchange.cxx +++ b/sot/source/base/exchange.cxx @@ -37,12 +37,11 @@ using namespace::com::sun::star::uno; using namespace::com::sun::star::datatransfer; /* - In diesen Tabellen stehen alle im Office verwendeten MimeTypes, - Format-Bezeichner und Types. - Die Tabelle ist nach den Formatstring-Ids sortiert und jede Id - ist um genau 1 groesser als ihre Vorgaenger-Id, damit die Id als - Tabellenindex benutzt werden kann. -*/ + * These tables contain all MimeTypes, format identifiers, and types used in + * the Office. The table is sorted by the format string ID, and each ID is + * exactly 1 greater than its predecessor ID, so that the ID can be used as a + * table index. + */ struct DataFlavorRepresentation { const char* pMimeType; @@ -251,12 +250,12 @@ static tDataFlavorList& InitFormats_Impl() |* |* SotExchange::RegisterFormatName() |* -|* Beschreibung CLIP.SDW +|* Description CLIP.SDW *************************************************************************/ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName ) { const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); - // teste zuerst die Standard - Name + // test the default first - name for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i ) if( rName.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pName ) ) return i; @@ -270,7 +269,7 @@ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName ) ? SotClipboardFormatId::STARCHART_50 : i ); - // dann in der dynamischen Liste + // then in the dynamic list tDataFlavorList& rL = InitFormats_Impl(); for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { @@ -292,7 +291,7 @@ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName ) SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) { const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); - // teste zuerst die Standard - Name + // test the default first - name for( SotClipboardFormatId i = SotClipboardFormatId::STRING; i <= SotClipboardFormatId::FILE_LIST; ++i ) if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) return i; @@ -301,7 +300,7 @@ SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeT if( rMimeType.equalsAscii( pFormatArray_Impl[ static_cast<int>(i) ].pMimeType ) ) return i; - // dann in der dynamischen Liste + // then in the dynamic list tDataFlavorList& rL = InitFormats_Impl(); for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { @@ -324,7 +323,7 @@ SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeT |* |* SotExchange::RegisterFormatName() |* -|* Beschreibung CLIP.SDW +|* Description CLIP.SDW *************************************************************************/ SotClipboardFormatId SotExchange::RegisterFormat( const DataFlavor& rFlavor ) { @@ -430,7 +429,7 @@ SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( const OUString& rMime ? SotClipboardFormatId::STARCHART_50 : i ); - // dann in der dynamischen Liste + // then in the dynamic list tDataFlavorList& rL = InitFormats_Impl(); for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) @@ -447,11 +446,11 @@ SotClipboardFormatId SotExchange::GetFormatIdFromMimeType( const OUString& rMime |* |* SotExchange::GetFormatName() |* -|* Beschreibung CLIP.SDW +|* Description CLIP.SDW *************************************************************************/ SotClipboardFormatId SotExchange::GetFormat( const DataFlavor& rFlavor ) { - // teste zuerst die Standard - Name + // test the default first - name const OUString& rMimeType = rFlavor.MimeType; const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get(); @@ -468,7 +467,7 @@ SotClipboardFormatId SotExchange::GetFormat( const DataFlavor& rFlavor ) ? SotClipboardFormatId::STARCHART_50 : i ); - // dann in der dynamischen Liste + // then in the dynamic list tDataFlavorList& rL = InitFormats_Impl(); for( tDataFlavorList::size_type i = 0; i < rL.size(); i++ ) { @@ -484,7 +483,7 @@ SotClipboardFormatId SotExchange::GetFormat( const DataFlavor& rFlavor ) |* |* SotExchange::GetFormatName() |* -|* Beschreibung CLIP.SDW +|* Description CLIP.SDW *************************************************************************/ OUString SotExchange::GetFormatName( SotClipboardFormatId nFormat ) { diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx index f6dd5d589ed3..07558b17f0ae 100644 --- a/sot/source/base/filelist.cxx +++ b/sot/source/base/filelist.cxx @@ -25,7 +25,7 @@ /****************************************************************************** |* -|* Stream-Operatoren +|* Stream operators |* \******************************************************************************/ @@ -65,7 +65,7 @@ SvStream& ReadFileList( SvStream& rIStm, FileList& rFileList ) /****************************************************************************** |* -|* Liste fuellen/abfragen +|* Fill in / check the list |* \******************************************************************************/ diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index b2fde5323c06..522063972782 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -51,15 +51,15 @@ struct SotAction_Impl #define FILEGRPDSC_ONLY_URL 1 /* - Fuer jedes Ziel existiert in der Tabelle genau ein SotDestinationEntry_Impl. - Dieser Eintrag enthaelt u.a. fuer jedes vom Ziel auswertbare Format eine - Default-Action. Die Default-Aktionen verweisen fuer jedes Format auf - die auszuwertende Tabelle, d.h. sie enthalten nur EXCHG_IN_ACTION_MOVE, - EXCHG_IN_ACTION_COPY oder EXCHG_IN_ACTION_LINK. Entsprechend dieser Aktion - ist dann aMoveActions, aCopyActions oder aLinkActions auszuwerten. - Die Aktionen sind nach Prioritaet sortiert, d.h. je "wichtiger" das - Format ist, desto eher erscheint es in der Liste. -*/ + * For each target there is exactly one SotDestinationEntry_Impl in the table. + * This entry contains, among other things, a default action for each format + * that can be evaluated by the target. The default actions refer to the table + * to be evaluated for each format, i.e., they contain only EXCHG_IN_ACTION_MOVE, + * EXCHG_IN_ACTION_COPY, or EXCHG_IN_ACTION_LINK. Corresponding to this action, + * aMoveActions, aCopyActions, or aLinkActions is then evaluated. The actions + * are sorted by priority, i.e., the "more important" is the format, the sooner + * it appears in the list. + */ struct SotDestinationEntry_Impl { @@ -73,19 +73,16 @@ struct SotDestinationEntry_Impl namespace { /* - Ueber diese Tabelle erfolgt die Zuordnung von Destination, vorhandenen - Datenformaten sowie gewuenschter Aktion zu einer Aktion und dem in - ihr zu benutzenden Datenformat. Die Tabelle ist nach den Exchange-Zielen - (EXCHG_DEST_*) sortiert. Innerhalb des Zieleintrages befinden sich genau - vier Tabellen fuer Default-, Move-, Copy- und Linkaktionen. Ueber - die Default-Tabelle erfolgt das Mapping zwischen Default-Aktion - (DropEvent::IsDefaultAction()) und daraus resultierender wirklicher - Aktion. Diese Tabelle enthaelt deshalb nur die Aktionen - EXCHG_IN_ACTION_COPY, EXCHG_IN_ACTION_MOVE und EXCHG_IN_ACTION_LINK, - die auf die spezielle Tabelle verweisen. Die uebrigen Tabellen - koennen beliebige Aktionen enthalten. Jede Tabelle ist nach der - Format-Prioritaet sortiert. Eintrag Null hat die hoechste Prioritaet. -*/ + * Via this table, the destination, existing data formats and the desired action + * are assigned to an action and the data format to be used in it. The table is + * sorted by the Exchange destinations (EXCHG_DEST_*). Within the goal entry are + * exactly four tables for default, move, copy and link actions. The mapping + * between default action (DropEvent::IsDefaultAction()) and the resulting real + * action is done via the default table. This table therefore contains only the + * EXCHG_IN_ACTION_COPY, EXCHG_IN_ACTION_MOVE, and EXCHG_IN_ACTION_LINK actions + * that point to the specific table. The other tables can contain any actions. + * Each table is sorted by format priority. Entry zero has the highest priority. + */ SotAction_Impl const aEmptyArr[] = { @@ -1489,7 +1486,7 @@ sal_uInt8 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorE { rFormat = SotClipboardFormatId::STRING; - //Todo: Binaere Suche einbauen + //Todo: incorporate a binary search const SotDestinationEntry_Impl* pEntry = aDestinationArray; while( static_cast<SotExchangeDest>(0xffff) != pEntry->nDestination ) { @@ -1505,24 +1502,23 @@ sal_uInt8 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorE rFormat = SotClipboardFormatId::NONE; - /* Behandlung der Default-Action nach folgender Vorgehensweise: - - - Das Ziel wird nach der Default-Action gefragt - - Unterstuetzt die Quelle diese Aktion so wird sie uebernommen - - Anderenfalls wird aus den von der Quelle zur Verfuegung gestellten - Aktionen eine ausgewaehlt, die zu einer moeglichst nicht leeren - Ergebnisaktion fuehrt. Hierbei wird in dieser Reihenfolge - vorgegangen: Copy -> Link -> Move - */ + /* Handling the default action using the following procedure: + * + * - The target is asked for the default action + * - If the source supports this action, it is taken over + * - Otherwise, from the actions made available by the source, one leading + * to a most likely non-empty result action is selected. This is done in + * the following order: Copy -> Link -> Move + */ if( nUserAction == EXCHG_IN_ACTION_DEFAULT ) { nUserAction = GetTransferableAction_Impl( rDataFlavorExVector, pEntry->aDefaultActions, rFormat, nOnlyTestFormat, pxTransferable, pActionFlags ); - // Unterstuetzt die Quelle die Aktion? + // Does the source support the action? if( !(nUserAction & nSourceOptions )) { - // Nein -> Alle Aktionen der Quelle checken + // No -> Check all actions of the source rDefaultAction = (EXCHG_IN_ACTION_COPY & nSourceOptions); if( rDefaultAction ) { diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx index 5db6665aef00..a33e16f7c281 100644 --- a/sot/source/base/object.cxx +++ b/sot/source/base/object.cxx @@ -33,13 +33,12 @@ void SotObject::OwnerLock ( bool bLock /* true, lock. false, unlock. */ ) -/* [Beschreibung] +/* [Description] - Wenn der OwnerLock auf Null dekrementiert, dann wird die Methode - DoClose gerufen. Dies geschieht unabh"angig vom Lock. bzw. RefCount. - Ist der OwnerLock-Z"ahler != Null, dann wird kein DoClose durch - <SotObject::FuzzyLock> gerufen. -*/ + * When the OwnerLock is decremented to zero, the DoClose method is called. + * This happens independently of the lock or RefCount. If the OwnerLock + * counter != zero, no DoClose is called by <SotObject::FuzzyLock>. + */ { if( bLock ) { diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx index 6f627af7e9d0..ede2b9a26fad 100644 --- a/sot/source/sdstor/stgavl.cxx +++ b/sot/source/sdstor/stgavl.cxx @@ -351,7 +351,7 @@ bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, bool bDel ) if( bDel ) delete pDel; // Rebalance the tree the hard way - // OS 22.09.95: Auf MD's Wunsch auskommentiert wg. Absturz + // OS 22.09.95: On MD's request commented out due to crash /* StgAvlNode* pNew = NULL; while( *pRoot ) { diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index bb4277556f9f..a4a42f0c6fcb 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -285,7 +285,7 @@ bool StgCache::Open( const OUString& rName, StreamMode nMode ) if( nMode & StreamMode::SHARE_DENYALL ) nMode = ( ( nMode & ~StreamMode::SHARE_DENYALL ) | StreamMode::SHARE_DENYWRITE ); SvFileStream* pFileStrm = new SvFileStream( rName, nMode ); - // SvStream "Feature" Write Open auch erfolgreich, wenns nicht klappt + // SvStream "feature" Write Open also successful if it does not work bool bAccessDenied = false; if( ( nMode & StreamMode::WRITE ) && !pFileStrm->IsWritable() ) { diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 6e85777b1daa..952fd3879683 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -45,8 +45,8 @@ // Committing means copying aEntry to aSave. Reverting means to copy aSave // to aEntry, delete newly created entries and to reactivate removed entries. -// Problem der Implementation: Keine Hierarchischen commits. Daher nur -// insgesamt transaktionsorientert oder direkt. +// Problem of implementation: No hierarchical commits. Therefore only +// overall transaction-oriented or direct. StgDirEntry::StgDirEntry( const void* pBuffer, sal_uInt32 nBufferLen, sal_uInt64 nUnderlyingStreamSize, bool * pbOk ) : StgAvlNode() { diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index a464ed1a06b9..4376210055bd 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -208,13 +208,13 @@ FatError EasyFat::Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect ) return FatError::OutOfBounds; pFree[ nCurPage ] = false; nCurPage = pFat[ nCurPage ]; - //Stream zu lang + // stream too long if( nCurPage != nExpect && nCount == 1 ) return FatError::WrongLength; - //Stream zu kurz + // stream too short if( nCurPage == nExpect && nCount != 1 && nCount != -1 ) return FatError::WrongLength; - // letzter Block bei Stream ohne Laenge + // last block for stream without length if( nCurPage == nExpect && nCount == -1 ) nCount = 1; if( nCount != -1 ) @@ -385,10 +385,10 @@ FatError StgIo::ValidateFATs() ErrorLink::get().Call( aArg ); m_bCopied = true; } -// DBG_ASSERT( nErr == FatError::Ok ,"Storage kaputt"); +// DBG_ASSERT( nErr == FatError::Ok ,"Storage broken"); return nErr; } -// OSL_FAIL("Validiere nicht (kein FileStorage)"); +// OSL_FAIL("Do not validate (no FileStorage)"); return FatError::Ok; } diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index 2fce59d6d89a..5024ce53fcaf 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -585,10 +585,10 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc return m_rIo.m_aHdr.GetFATPage( nOff ); sal_Int32 nMaxPage = m_nSize >> 2; nOff = nOff - StgHeader::GetFAT1Size(); - // Anzahl der Masterpages, durch die wir iterieren muessen + // number of master pages that we need to iterate through sal_uInt16 nMasterCount = ( m_nPageSize >> 2 ) - 1; sal_uInt16 nBlocks = nOff / nMasterCount; - // Offset in letzter Masterpage + // offset in the last master page nOff = nOff % nMasterCount; rtl::Reference< StgPage > pOldPage; @@ -609,7 +609,7 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc { for( short k = 0; k < (short)( m_nPageSize >> 2 ); k++ ) m_rIo.SetToPage( pMaster, k, STG_FREE ); - // Verkettung herstellen + // chaining if( !pOldPage.is() ) m_rIo.m_aHdr.SetFATChain( nFAT ); else @@ -618,8 +618,8 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc if( !m_rIo.SetSize( nMaxPage ) ) return STG_EOF; // mark the page as used - // Platz fuer Masterpage schaffen - if( !pnMasterAlloc ) // Selbst Platz schaffen + // make space for Masterpage + if( !pnMasterAlloc ) // create space oneself { if( !Pos2Page( nFAT << 2 ) ) return STG_EOF; @@ -665,10 +665,10 @@ bool StgFATStrm::SetPage( short nOff, sal_Int32 nNewPage ) else { nOff = nOff - StgHeader::GetFAT1Size(); - // Anzahl der Masterpages, durch die wir iterieren muessen + // number of master pages that we need to iterate through sal_uInt16 nMasterCount = ( m_nPageSize >> 2 ) - 1; sal_uInt16 nBlocks = nOff / nMasterCount; - // Offset in letzter Masterpage + // offset in the last master page nOff = nOff % nMasterCount; rtl::Reference< StgPage > pMaster; diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index f2813a238db9..d7cc729e9262 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -46,7 +46,7 @@ SotClipboardFormatId ReadClipboardFormat( SvStream & rStm ) else if( nLen == -1 ) { // Windows clipboard format - // SV und Win stimmen ueberein (bis einschl. SotClipboardFormatId::GDIMETAFILE) + // SV and Win match (up to and including SotClipboardFormatId::GDIMETAFILE) sal_uInt32 nTmp; rStm.ReadUInt32( nTmp ); nFormat = static_cast<SotClipboardFormatId>(nTmp); diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 4e4e7382137b..33721f19804d 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -151,7 +151,7 @@ sal_Int32 SAL_CALL FileStreamWrapper_Impl::readBytes(Sequence< sal_Int8 >& aData sal_uInt32 nRead = m_pSvStream->ReadBytes(static_cast<void*>(aData.getArray()), nBytesToRead); checkError(); - // Wenn gelesene Zeichen < MaxLength, Sequence anpassen + // if read characters < MaxLength, adjust sequence if ((sal_Int32)nRead < aData.getLength()) aData.realloc( nRead ); |