[Libreoffice-commits] .: 2 commits - filter/inc filter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Aug 18 21:09:36 PDT 2012
filter/inc/filter/msfilter/escherex.hxx | 32 +-
filter/inc/filter/msfilter/svdfppt.hxx | 22 +-
filter/source/graphicfilter/egif/egif.cxx | 36 +--
filter/source/graphicfilter/egif/giflzwc.cxx | 8
filter/source/graphicfilter/eos2met/eos2met.cxx | 151 ++++++--------
filter/source/graphicfilter/epict/epict.cxx | 182 ++++++++--------
filter/source/graphicfilter/eppm/eppm.cxx | 4
filter/source/graphicfilter/idxf/dxfreprd.cxx | 12 -
filter/source/graphicfilter/idxf/dxfreprd.hxx | 20 -
filter/source/graphicfilter/idxf/dxfvec.cxx | 2
filter/source/graphicfilter/idxf/dxfvec.hxx | 4
filter/source/graphicfilter/ios2met/ios2met.cxx | 50 ++--
filter/source/graphicfilter/ipcd/ipcd.cxx | 66 +++---
filter/source/graphicfilter/ipsd/ipsd.cxx | 12 -
filter/source/graphicfilter/itiff/ccidecom.cxx | 73 +++---
filter/source/graphicfilter/itiff/itiff.cxx | 82 +++----
filter/source/msfilter/escherex.cxx | 44 ++--
filter/source/msfilter/eschesdo.cxx | 6
filter/source/msfilter/msdffimp.cxx | 258 +++++++++++-------------
filter/source/msfilter/svdfppt.cxx | 77 +++----
20 files changed, 567 insertions(+), 574 deletions(-)
New commits:
commit 7f0ff09dc3847da402810597b7f514c7eff53c3b
Author: Alexander Wilms <alexander.wilms at zoho.com>
Date: Fri Aug 10 22:48:02 2012 +0200
Fixed typos and translated comments
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index ef0caea..ec79336 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -217,7 +217,7 @@ enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT };
struct OSPalette {
OSPalette * pSucc;
- sal_uInt32 * p0RGB; // Darf auch NULL sein!
+ sal_uInt32 * p0RGB; // May be NULL!
sal_uInt16 nSize;
};
@@ -344,10 +344,10 @@ private:
LineInfo aLineInfo;
- OSArea * pAreaStack; // Areas, die in Arbeit sind
+ OSArea * pAreaStack; // Areas that are being worked on
- OSPath * pPathStack; // Paths, die in Arbeit sind
- OSPath * pPathList; // Vollendete Paths
+ OSPath * pPathStack; // Paths that are being worked on
+ OSPath * pPathList; // finished Paths
OSFont * pFontList;
@@ -413,11 +413,11 @@ public:
~OS2METReader();
void ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile );
- // Liesst aus dem Stream eine OS2MET-Datei und fuellt das GDIMetaFile
+ // Reads from the stream a OS2MET file und and fills up the GDIMetaFile
};
-//=================== Methoda of OS2METReader ==============================
+//=================== Methods of OS2METReader ==============================
sal_Bool OS2METReader::Callback(sal_uInt16 /*nPercent*/)
{
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index d0acce6..2066a15 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -118,7 +118,7 @@ sal_Bool PSDReader::ReadPSD(Graphic & rGraphic )
m_rPSD.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- // Kopf einlesen:
+ // read header:
if ( ImplReadHeader() == sal_False )
return sal_False;
@@ -143,7 +143,7 @@ sal_Bool PSDReader::ReadPSD(Graphic & rGraphic )
mpWriteAcc->SetPaletteColor( i, Color( mpPalette[ i ], mpPalette[ i + 256 ], mpPalette[ i + 512 ] ) );
}
}
- // read Bitmap-Daten
+ // read bitmap data
if ( mbStatus && ImplReadBody() )
{
if ( mbTransparent )
@@ -363,7 +363,7 @@ sal_Bool PSDReader::ImplReadBody()
}
if ( nRunCount & 0x80 ) // a run length packet
{
- if ( nBitCount == -1 ) // bits left in nDat ?
+ if ( nBitCount == -1 ) // bits left in nDat?
{
m_rPSD >> nDat;
nDat ^= 0xff;
@@ -725,7 +725,7 @@ sal_Bool PSDReader::ImplReadBody()
return sal_True;
}
-//================== GraphicImport - die exportierte Funktion ================
+//================== GraphicImport - the exported function ================
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Bool)
commit 3e60168d7d579a5e4e6d62b5eba5fb39d0b601a0
Author: Alexander Wilms <alexander.wilms at zoho.com>
Date: Fri Aug 10 22:32:01 2012 +0200
Translated some comments in filter
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index 329d379..a5b7352 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -49,7 +49,7 @@
#include "filter/msfilter/msfilterdllapi.h"
/*Record Name FBT-Value Instance Contents Wrd Exl PPt Ver*/
-// In der Mickysoft-Doku heissen die msofbt... statt ESCHER_...
+// In the Microsoft documentation the naming scheme is msofbt... instead of ESCHER_...
#define ESCHER_DggContainer 0xF000 /* per-document data X X X */
#define ESCHER_Dgg 0xF006 /* an FDGG and several FIDCLs X X X 0 */
#define ESCHER_CLSID 0xF016 /* the CLSID of the application that put the data on the clipboard C C C 0 */
@@ -1042,7 +1042,7 @@ class EscherBlibEntry
protected:
sal_uInt32 mnIdentifier[ 4 ];
- sal_uInt32 mnPictureOffset; // offset auf die grafik im PictureStreams
+ sal_uInt32 mnPictureOffset; // offset to the graphic im PictureStreams
sal_uInt32 mnSize; // size of real graphic
sal_uInt32 mnRefCount; // !! reference count
@@ -1594,12 +1594,12 @@ public:
class ImplEscherExSdr.
*/
inline SvStream* QueryPictureStream() { return mxGlobal->QueryPictureStream(); }
-
- /// Fuegt in den EscherStream interne Daten ein, dieser Vorgang
- /// darf und muss nur einmal ausgefuehrt werden.
- /// Wenn pPicStreamMergeBSE angegeben ist, werden die BLIPs
- /// aus diesem Stream in die MsofbtBSE Records des EscherStream
- /// gemerged, wie es fuer Excel (und Word?) benoetigt wird.
+
+ /// Inserts internal data into the EscherStream, this process
+ /// may and has to be executed only once
+ /// If pPicStreamMergeBSE is known, the BLIPs from this stream are being
+ /// merged into the MsofbtBSE Records of the EscherStream like it's
+ /// required for Excel (and maybe Word?)
virtual void Flush( SvStream* pPicStreamMergeBSE = NULL );
/** Inserts the passed number of bytes at the current position of the
@@ -1622,22 +1622,22 @@ public:
*/
void InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom );
- void InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet
+ void InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistantTable
void ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset );
sal_uInt32 GetPersistOffset( sal_uInt32 nKey );
sal_Bool SeekToPersistOffset( sal_uInt32 nKey );
- virtual sal_Bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
- // aktuelle StreamPosition aendert
+ virtual sal_Bool InsertAtPersistOffset( sal_uInt32 nKey, sal_uInt32 nValue ); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the
+ // current StreamPosition changes
SvStream& GetStream() const { return *mpOutStrm; }
sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }
- virtual sal_Bool SeekBehindRecHeader( sal_uInt16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen
+ virtual sal_Bool SeekBehindRecHeader( sal_uInt16 nRecType ); // the stream has to be in front of a valid Record Headeror Atom
- // features beim erzeugen folgender Container:
+ // features during the creation of the following Containers:
//
- // ESCHER_DggContainer: ein EscherDgg Atom wird automatisch erzeugt und verwaltet
- // ESCHER_DgContainer: ein EscherDg Atom wird automatisch erzeugt und verwaltet
+ // ESCHER_DggContainer: a EscherDgg Atom is automatically being created and managed
+ // ESCHER_DgContainer: a EscherDg Atom is automatically being created and managed
// ESCHER_SpgrContainer:
// ESCHER_SpContainer:
@@ -1657,7 +1657,7 @@ public:
virtual sal_Bool SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
virtual void LeaveGroup();
- // ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!)
+ // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!)
virtual void AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlagIds, sal_uInt32 nShapeID = 0 );
virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index dba6d37..18b8574 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -179,14 +179,14 @@ const sal_uInt32 PPTInventor = sal_uInt32('P') * 0x00000001
struct MSFILTER_DLLPUBLIC PptDocumentAtom
{
- Size aSlidesPageSize; // Seitengroesse der Slides in 576DPI
- Size aNotesPageSize; // Seitengroesse der Notes in 576DPI
+ Size aSlidesPageSize; // page size of the slides in 576DPI
+ Size aNotesPageSize; // page size of the notes in 576DPI
// RatioAtom erstmal weggelassen
- sal_uInt32 nNotesMasterPersist; // 0=nicht vorhanden
- sal_uInt32 nHandoutMasterPersist; // 0=nicht vorhanden
- sal_uInt16 n1stPageNumber; // Seitennummer des ersten Slides
- PptPageFormat eSlidesPageFormat; // Seitenformat der Slides
- sal_Bool bEmbeddedTrueType : 1; // TrueType direkt im File?
+ sal_uInt32 nNotesMasterPersist; // 0=non-existent
+ sal_uInt32 nHandoutMasterPersist; // 0=non-existent
+ sal_uInt16 n1stPageNumber; // page number of the first slide
+ PptPageFormat eSlidesPageFormat; // page format of the slides
+ sal_Bool bEmbeddedTrueType : 1; // TrueType direcly within the File?
sal_Bool bTitlePlaceholdersOmitted : 1;
sal_Bool bRightToLeft : 1;
sal_Bool bShowComments : 1;
@@ -292,7 +292,7 @@ struct PptUserEditAtom
sal_uInt32 nOffsetLastEdit; // File offset of prev PptUserEditAtom
sal_uInt32 nOffsetPersistDirectory; // Offset to PersistPtrs for this file version.
sal_uInt32 nDocumentRef;
- sal_uInt32 nMaxPersistWritten; // Gesamtanzahl der Persisteintraege bis hierher.
+ sal_uInt32 nMaxPersistWritten; // total number of Persist entries up to this point
sal_Int16 eLastViewType; // enum view type
public:
@@ -340,9 +340,9 @@ struct PptSlidePersistEntry
void* pDummy2;
PptPageKind ePageKind; //
- sal_Bool bNotesMaster : 1; // fuer NotesMaster
- sal_Bool bHandoutMaster : 1; // fuer HandoutMaster
- sal_Bool bStarDrawFiller : 1; // speziell fuer StarDraw
+ sal_Bool bNotesMaster : 1; // for NotesMaster
+ sal_Bool bHandoutMaster : 1; // for HandoutMaster
+ sal_Bool bStarDrawFiller : 1; // special for StarDraw
public:
PptSlidePersistEntry();
~PptSlidePersistEntry();
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index fa4044e..0891d8b 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -310,21 +310,21 @@ void GIFWriter::WriteGlobalHeader( const Size& rSize )
{
if( bStatus )
{
- // 256 Farben
+ // 256 colors
const sal_uInt16 nWidth = (sal_uInt16) rSize.Width();
const sal_uInt16 nHeight = (sal_uInt16) rSize.Height();
const sal_uInt8 cFlags = 128 | ( 7 << 4 );
- // Werte rausschreiben
+ // write values
m_rGIF << nWidth;
m_rGIF << nHeight;
m_rGIF << cFlags;
m_rGIF << (sal_uInt8) 0x00;
m_rGIF << (sal_uInt8) 0x00;
-
- // Dummy-Palette mit zwei Eintraegen (Schwarz/Weiss) schreiben;
- // dieses nur wegen Photoshop-Bug, da die keine Bilder ohne
- // globale Farbpalette lesen koennen
+
+ // write dummy palette with two entries (black/white);
+ // we do this only because of a bug in Photoshop, since those can't
+ // read pictures without a global color palette
m_rGIF << (sal_uInt16) 0;
m_rGIF << (sal_uInt16) 255;
m_rGIF << (sal_uInt16) 65535;
@@ -341,14 +341,14 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
DBG_ASSERT( rAnimation.Count() > 0, "Animation has no bitmaps!" );
sal_uInt16 nLoopCount = (sal_uInt16) rAnimation.GetLoopCount();
-
- // falls nur ein Durchlauf stattfinden soll,
- // wird keine LoopExtension geschrieben;
- // Default ist dann immer ein Durchlauf
+
+ // if only one run should take place
+ // the LoopExtension won't be written
+ // The default in this case is a single run
if( nLoopCount != 1 )
{
- // Netscape interpretiert den LoopCount
- // als reine Anzahl der _Wiederholungen_
+ // Netscape interprets the LoopCount
+ // as the sole number of _repetitions_
if( nLoopCount )
nLoopCount--;
@@ -371,7 +371,7 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
void GIFWriter::WriteLogSizeExtension( const Size& rSize100 )
{
- // PrefSize in 100th-mm als ApplicationExtension schreiben
+ // writer PrefSize in 100th-mm as ApplicationExtension
if( rSize100.Width() && rSize100.Height() )
{
m_rGIF << (sal_uInt8) 0x21;
@@ -395,11 +395,11 @@ void GIFWriter::WriteImageExtension( long nTimer, Disposal eDisposal )
const sal_uInt16 nDelay = (sal_uInt16) nTimer;
sal_uInt8 cFlags = 0;
- // Transparent-Flag setzen
+ // set Transparency-Flag
if( bTransparent )
cFlags |= 1;
- // Disposal-Wert setzen
+ // set Disposal-value
if( eDisposal == DISPOSE_BACK )
cFlags |= ( 2 << 2 );
else if( eDisposal == DISPOSE_PREVIOUS )
@@ -430,11 +430,11 @@ void GIFWriter::WriteLocalHeader()
const sal_uInt16 nHeight = (sal_uInt16) m_pAcc->Height();
sal_uInt8 cFlags = (sal_uInt8) ( m_pAcc->GetBitCount() - 1 );
- // Interlaced-Flag setzen
+ // set Interlaced-Flag
if( nInterlaced )
cFlags |= 0x40;
- // Flag fuer lokale Farbpalette setzen
+ // set Flag for the local color palette
cFlags |= 0x80;
// alles rausschreiben
@@ -468,7 +468,7 @@ void GIFWriter::WritePalette()
m_rGIF << rColor.GetBlue();
}
- // Rest mit 0 auffuellen
+ // fill up the rest with 0
if( nCount < nMaxCount )
m_rGIF.SeekRel( ( nMaxCount - nCount ) * 3 );
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
index 43a0b20..4c7ca0b 100644
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ b/filter/source/graphicfilter/egif/giflzwc.cxx
@@ -115,10 +115,10 @@ void GIFImageDataOutputStream::FlushBlockBuf()
struct GIFLZWCTreeNode
{
- GIFLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat
- GIFLZWCTreeNode* pFirstChild; // erster Sohn
- sal_uInt16 nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn
- sal_uInt16 nValue; // Der Pixelwert
+ GIFLZWCTreeNode* pBrother; // next node which has the same father
+ GIFLZWCTreeNode* pFirstChild; // first
+ sal_uInt16 nCode; // the code for the string of pixel values which comes about
+ sal_uInt16 nValue; // the pixel value
};
// --------------------
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 64ba6ed..08280a6 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -47,7 +47,7 @@
#include <svl/solar.hrc>
-// -----------------------------Feld-Typen-------------------------------
+// -----------------------------Field Types-------------------------------
#define BegDocumnMagic 0xA8A8 /* Begin Document */
#define EndDocumnMagic 0xA8A9 /* End Document */
@@ -134,19 +134,19 @@ class METWriter
private:
sal_Bool bStatus;
- sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_uLong nLastPercent; // with which number pCallback has been called the last time
SvStream* pMET;
Rectangle aPictureRect;
MapMode aPictureMapMode;
MapMode aTargetMapMode;
- sal_uLong nActualFieldStartPos; // Anfangs-Position des aktuellen 'Field'
- sal_uLong nNumberOfDataFields; // Anzahl der angefangenen 'Graphcis Data Fields'
+ sal_uLong nActualFieldStartPos; // start position of the current 'Field'
+ sal_uLong nNumberOfDataFields; // number of commenced 'Graphcis Data Fields'
Color aGDILineColor;
Color aGDIFillColor;
RasterOp eGDIRasterOp;
Font aGDIFont;
- MapMode aGDIMapMode; // derzeit unbenutzt!
- Rectangle aGDIClipRect; // derzeit unbenutzt!
+ MapMode aGDIMapMode; // currently ununsed!
+ Rectangle aGDIClipRect; // currently ununsed!
METGDIStackMember* pGDIStack;
Color aMETColor;
Color aMETBackgroundColor;
@@ -156,14 +156,14 @@ private:
Size aMETChrCellSize;
short nMETChrAngle;
sal_uInt8 nMETChrSet;
- METChrSet* pChrSetList; // Liste der Character-Sets
- sal_uInt8 nNextChrSetId; // die erste unbenutzte ChrSet-Id
- sal_uLong nActBitmapId; // Field-Id der naechsten Bitmap
- sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
- sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
- sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
- sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ METChrSet* pChrSetList; // list of Character-Sets
+ sal_uInt8 nNextChrSetId; // the first unused ChrSet-Id
+ sal_uLong nActBitmapId; // Field-Id of the next Bitmap
+ sal_uLong nNumberOfActions; // number of Actions in the GDIMetafile
+ sal_uLong nNumberOfBitmaps; // number of Bitmaps
+ sal_uLong nWrittenActions; // number of already processed actions during the writing of the orders
+ sal_uLong nWrittenBitmaps; // number of already written Bitmaps
+ sal_uLong nActBitmapPercent; // percentage of the next bitmap that's already written
::std::auto_ptr< VirtualDevice > apDummyVDev;
OutputDevice* pCompDev;
@@ -171,13 +171,12 @@ private:
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
void MayCallback();
- // Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
- // moechte.
+ // calculates a percentage based on the 5 parameters above and then does a
+ // Callback as the case may be. Sets bStatus to sal_False if the user wants to cancel
void CountActionsAndBitmaps(const GDIMetaFile * pMTF);
- // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen
- // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist)
+ // Counts the bitmaps and actions (nNumberOfActions and nNumberOfBitmaps have to
+ // be set to 0 at the beginning, since this method is recursive)
void WriteBigEndianShort(sal_uInt16 nWord);
void WriteBigEndianLong(sal_uLong nLong);
@@ -264,7 +263,7 @@ public:
};
-//========================== Methoden von METWriter ==========================
+//========================== Methods of METWriter ==========================
void METWriter::MayCallback()
{
@@ -508,11 +507,11 @@ void METWriter::WriteColorAttributeTable(sal_uLong nFieldId, BitmapPalette* pPal
if (bStatus==sal_False) return;
- //--- Das Feld 'Begin Color Attribute Table':
+ //--- The Field 'Begin Color Attribute Table':
WriteFieldIntroducer(16,BegColAtrMagic,0,0);
WriteFieldId(nFieldId);
- //--- Das Feld 'Color Attribute Table':
+ //--- The Field 'Color Attribute Table':
WriteFieldIntroducer(0,BlkColAtrMagic,0,0);
*pMET << nBasePartFlags << (sal_uInt8)0x00 << nBasePartLCTID; // 'Base Part'
if (pPalette!=NULL)
@@ -522,11 +521,11 @@ void METWriter::WriteColorAttributeTable(sal_uLong nFieldId, BitmapPalette* pPal
{
nNumI=pPalette->GetEntryCount()-nIndex;
if (nNumI>81) nNumI=81;
- *pMET << (sal_uInt8)(11+nNumI*3); // Laenge des Parameters
+ *pMET << (sal_uInt8)(11+nNumI*3); // length of the parameter
*pMET << (sal_uInt8)1 << (sal_uInt8)0 << (sal_uInt8)1; // typ: element list, Reserved, Format: RGB
- *pMET << (sal_uInt8)0; WriteBigEndianShort(nIndex); // Start-Index (3 Bytes)
- *pMET << (sal_uInt8)8 << (sal_uInt8)8 << (sal_uInt8)8; // Bits je Komponente R,G,B
- *pMET << (sal_uInt8)3; // Anzahl Bytes je Eintrag
+ *pMET << (sal_uInt8)0; WriteBigEndianShort(nIndex); // start-Index (3 Bytes)
+ *pMET << (sal_uInt8)8 << (sal_uInt8)8 << (sal_uInt8)8; // Bits per component R,G,B
+ *pMET << (sal_uInt8)3; // number of bytes per entry
for (i=0; i<nNumI; i++)
{
const BitmapColor& rCol = (*pPalette)[ nIndex ];
@@ -546,7 +545,7 @@ void METWriter::WriteColorAttributeTable(sal_uLong nFieldId, BitmapPalette* pPal
}
UpdateFieldSize();
- //--- Das Feld 'End Color Attribute Table':
+ //--- The Field 'End Color Attribute Table':
WriteFieldIntroducer(16,EndColAtrMagic,0,0);
WriteFieldId(nFieldId);
@@ -570,14 +569,14 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
nActColMapId=((nActBitmapId>>24)&0x000000ff) | ((nActBitmapId>> 8)&0x0000ff00) |
((nActBitmapId<< 8)&0x00ff0000) | ((nActBitmapId<<24)&0xff000000);
- //--- Das Feld 'Begin Image Object':
+ //--- The Field 'Begin Image Object':
WriteFieldIntroducer(16,BegImgObjMagic,0,0);
WriteFieldId(nActBitmapId);
- // Windows-BMP-Datei erzeugen:
+ // generate Windows-BMP file
aTemp << rBitmap;
- // Header der Windows-BMP-Datei einlesen:
+ // read header of the Windows-BMP file:
aTemp.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN);
aTemp.Seek(18);
aTemp >> nWidth >> nHeight;
@@ -590,7 +589,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
nNumColors=1<<nBitsPerPixel;
nBytesPerLine=((nWidth*nBitsPerPixel+0x0000001f) & 0xffffffe0 ) >> 3;
- // ggf. Farbpalette einlesen und in die MET-Datei schreiben:
+ // read color palette as the case may be and write it to the MET file:
if (nBitsPerPixel<=8)
{
BitmapPalette aPal( (sal_uInt16) nNumColors );
@@ -602,34 +601,34 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
aPal[ (sal_uInt16) i ] = BitmapColor( nr, ng, nb );
}
- //--- Das Feld 'Begin Resource Group':
+ //--- The Field 'Begin Resource Group':
WriteFieldIntroducer(16,BegResGrpMagic,0,0);
WriteFieldId(nActColMapId);
- //--- Farbtabelle schreiben:
+ //--- writer color table:
WriteColorAttributeTable(nActColMapId,&aPal,0,1);
- //--- Das Feld 'End Resource Group':
+ //--- The Field 'End Resource Group':
WriteFieldIntroducer(16,EndResGrpMagic,0,0);
WriteFieldId(nActColMapId);
- //--- Das Feld 'Begin Object Environment Group':
+ //--- The Field 'Begin Object Environment Group':
WriteFieldIntroducer(16,BegObjEnvMagic,0,0);
WriteFieldId(nActBitmapId);
- //--- Das Feld 'Map Color Attribute Table':
+ //--- The Field 'Map Color Attribute Table':
WriteFieldIntroducer(26,MapColAtrMagic,0,0);
WriteBigEndianShort(0x0012);
*pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
WriteFieldId(nActColMapId);
*pMET << (sal_uInt8)0x04 << (sal_uInt8)0x24 << (sal_uInt8)0x07 << (sal_uInt8)0x01;
- //--- Das Feld 'End Object Environment Group':
+ //--- The Field 'End Object Environment Group':
WriteFieldIntroducer(16,EndObjEnvMagic,0,0);
WriteFieldId(nActBitmapId);
}
- //--- Das Feld 'Image Data Descriptor':
+ //--- The Field 'Image Data Descriptor':
WriteFieldIntroducer(17,DscImgObjMagic,0,0);
*pMET << (sal_uInt8)0x01; // Unit of measure: tens of centimeters
WriteBigEndianShort((sal_uInt16)nResX);
@@ -637,7 +636,7 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
WriteBigEndianShort((sal_uInt16)nWidth);
WriteBigEndianShort((sal_uInt16)nHeight);
- //--- Das erste Feld 'Image Picture Data':
+ //--- The first Field 'Image Picture Data':
WriteFieldIntroducer(0,DatImgObjMagic,0,0);
// Begin Segment:
@@ -673,13 +672,13 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
ny=0;
while (ny<nHeight) {
- // Abschliessen des vorherigen Feldes 'Image Picture Data':
+ // finalize the previous field 'Image Picture Data':
UpdateFieldSize();
- // Und ein neues Feld 'Image Picture Data' anfangen:
+ // and start a new field 'Image Picture Data':
WriteFieldIntroducer(0,DatImgObjMagic,0,0);
- // Einige Scanlines lesen und schreiben:
+ // read and write several Scanlines:
nLines=nHeight-ny;
if (nLines*nBytesPerLine>30000) nLines=30000/nBytesPerLine;
if (nLines<1) nLines=1;
@@ -708,17 +707,17 @@ void METWriter::WriteImageObject(const Bitmap & rBitmap)
// End Segment:
*pMET << (sal_uInt8)0x71 << (sal_uInt8)0x00;
- // Abschliessen des letzten Feldes 'Image Picture Data':
+ // finalize the last field 'Image Picture Data':
UpdateFieldSize();
- //--- Das Feld 'End Image Object':
+ //--- The Field 'End Image Object':
WriteFieldIntroducer(16,EndImgObjMagic,0,0);
WriteFieldId(nActBitmapId);
- // Ids erhoehen:
+ // increase Ids:
nActBitmapId++;
- // Bitmaps zaehlen:
+ // count Bitmaps:
nWrittenBitmaps++;
nActBitmapPercent=0;
@@ -829,7 +828,7 @@ void METWriter::WriteDataDescriptor(const GDIMetaFile *)
WriteFieldIntroducer(0,DscGrfObjMagic,0,0);
//------------------------------------------------------------------------------
- // Im Folgenden die OS2-Orginal-Dokumentation und die Implementation dazu (uff)
+ // The following is the OS2 original documentation and the associated implementation
//------------------------------------------------------------------------------
// Parameters (all required and in this order)
@@ -2359,17 +2358,17 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
{
sal_uLong i, nId;
- //--- Das Feld 'Begin Object Environment Group':
+ //--- The Field 'Begin Object Environment Group':
WriteFieldIntroducer(16,BegObjEnvMagic,0,0);
WriteFieldId(7);
- //--- Das Feld 'Map Color Attribute Table':
+ //--- The Field 'Map Color Attribute Table':
WriteFieldIntroducer(22,MapColAtrMagic,0,0);
WriteBigEndianShort(0x000e);
*pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
WriteFieldId(4);
- //--- Das erste Feld 'Map Coded Font':
+ //--- The first Field 'Map Coded Font':
WriteFieldIntroducer(32,MapCodFntMagic,0,0);
WriteBigEndianShort(0x0018);
*pMET << (sal_uInt8)0x0c << (sal_uInt8)0x02 << (sal_uInt8)0x84 << (sal_uInt8)0x00;
@@ -2383,7 +2382,7 @@ void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF)
CreateChrSets(pMTF);
WriteChrSets();
- //--- Die Felder 'Map Data Resource':
+ //--- The Fields 'Map Data Resource':
nId=nActBitmapId;
for (i=0; i<nNumberOfBitmaps; i++)
{
@@ -2413,49 +2412,49 @@ void METWriter::WriteGraphicsObject(const GDIMetaFile * pMTF)
WriteFieldIntroducer(16,BegGrfObjMagic,0,0);
WriteFieldId(7);
- // Map Color Attribute Table, Fonts und anderes:
+ // Map Color Attribute Table, Fonts and other stuff:
WriteObjectEnvironmentGroup(pMTF);
- //--- Das Feld 'Graphics Data Descriptor':
+ //--- The Field 'Graphics Data Descriptor':
WriteDataDescriptor(pMTF);
- // Zaehler fuer Data Fields initialisieren:
+ // initialise the counter for Data Fields:
nNumberOfDataFields=0;
- // Und Position des ersten Data Fields merken:
+ // and remember the position of the first Data Field:
nDataFieldsStartPos=pMET->Tell();
- //--- Anfang des ersten Feldes 'Graphics Data'
+ //--- start of the first Field 'Graphics Data'
WriteFieldIntroducer(0,DatGrfObjMagic,0,0);
nNumberOfDataFields++;
- // Nun schreiben wir zunaechst den Kopf des Segments:
+ // now at first we write the head of the segment:
*pMET << (sal_uInt8)0x70 << (sal_uInt8)0x0e << (sal_uInt32)0;
*pMET << (sal_uInt8)0x70 << (sal_uInt8)0x10; // Flags
- *pMET << (sal_uInt16)0; // Lo-Wort der Laenge der Segementdaten (Big Endian)
+ *pMET << (sal_uInt16)0; // Lo-Word of the length of the segment data (Big Endian)
*pMET << (sal_uInt32)0; // Reserved
- *pMET << (sal_uInt16)0; // Hi-Wort der Laenge der Segementdaten (Big Endian) (Ohh Ohh OS2)
- // Anmerkung: die richtige Daten-Laenge schreiben wir weiter unten nochmal
+ *pMET << (sal_uInt16)0; // Hi-Word of the length of the segment (Big Endian) (Ohh Ohh OS2)
+ // Annotation: we're writing the correct data length again below
- // Jetzt werden alle Orders rausgeschrieben:
+ // now all orders are being written out:
// (wobei die Sache ggf. in mehrere 'Graphics Data Fields' aufgeteilt
// wird, per Methode WillWriteOrder(..))
WriteOrders(pMTF);
- //--- Das letzte Feld 'Graphic Data' beenden:
+ //--- terminate the last Field 'Graphic Data':
UpdateFieldSize();
- //--- Und schliesslich die Segmentgroesse richtigstellen:
+ //--- and finally correct the segment size:
nPos=pMET->Tell();
nSegmentSize=nPos-nDataFieldsStartPos;
- nSegmentSize-=nNumberOfDataFields*8; // Structured Field Introducers zaehlen nicht mit
- pMET->Seek(nDataFieldsStartPos+16); // Zum Lo-Wort der Segmentgroesse seeken
+ nSegmentSize-=nNumberOfDataFields*8; // Structured Field Introducers are not counted
+ pMET->Seek(nDataFieldsStartPos+16); // seek to the Lo-Word of the segment size
WriteBigEndianShort((sal_uInt16)(nSegmentSize&0x0000ffff)); // Und schreiben
- pMET->Seek(nDataFieldsStartPos+22); // Zum Hi-Wort der Segmentgroesse seeken
- WriteBigEndianShort((sal_uInt16)(nSegmentSize>>16)); // Und schreiben
- pMET->Seek(nPos); // Zurueck zur Tagesordnung
+ pMET->Seek(nDataFieldsStartPos+22); // seek to the Hi-Word of the segment size
+ WriteBigEndianShort((sal_uInt16)(nSegmentSize>>16)); // and writing it
+ pMET->Seek(nPos); // back to business as usual
- //--- Das Feld 'End Graphic Objects':
+ //--- The Field 'End Graphic Objects':
WriteFieldIntroducer(16,EndGrfObjMagic,0,0);
WriteFieldId(7);
@@ -2469,18 +2468,18 @@ void METWriter::WriteResourceGroup(const GDIMetaFile * pMTF)
if( bStatus==sal_False )
return;
- //--- Das Feld 'Begin Resource Group':
+ //--- The Field 'Begin Resource Group':
WriteFieldIntroducer(16,BegResGrpMagic,0,0);
WriteFieldId(2);
- //--- Der Inhalt:
+ //--- The Content:
WriteColorAttributeTable();
nActBitmapId=0x77777700;
WriteImageObjects(pMTF);
nActBitmapId=0x77777700;
WriteGraphicsObject(pMTF);
- //--- Das Feld 'End Resource Group':
+ //--- The Field 'End Resource Group':
WriteFieldIntroducer(16,EndResGrpMagic,0,0);
WriteFieldId(2);
@@ -2494,7 +2493,7 @@ void METWriter::WriteDocument(const GDIMetaFile * pMTF)
if( bStatus==sal_False )
return;
- //--- Das Feld 'Begin Document':
+ //--- The Field 'Begin Document':
WriteFieldIntroducer(0,BegDocumnMagic,0,0);
WriteFieldId(1);
*pMET << (sal_uInt8)0x00 << (sal_uInt8)0x00;
@@ -2503,10 +2502,10 @@ void METWriter::WriteDocument(const GDIMetaFile * pMTF)
*pMET << (sal_uInt8)0x03 << (sal_uInt8)0x65 << (sal_uInt8)0x00;
UpdateFieldSize();
- //--- Der Inhalt:
+ //--- The Content:
WriteResourceGroup(pMTF);
- //--- Das Feld 'End Document':
+ //--- The Field 'End Document':
WriteFieldIntroducer(16,EndDocumnMagic,0,0);
WriteFieldId(1);
@@ -2584,7 +2583,7 @@ sal_Bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream,
return bStatus;
}
-//================== GraphicExport - die exportierte Funktion ================
+//================== GraphicExport - the exported Function ================
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool )
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 7646ed2..3ca6863 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -77,12 +77,12 @@ class PictWriter {
private:
sal_Bool bStatus;
- sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_uLong nLastPercent; // with wich number pCallback has been called the last time
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
SvStream * pPict;
- // Aktuelle Attribute im Quell-Metafile:
+ // current attributes in the source-metafile:
Color aLineColor;
Color aFillColor;
RasterOp eSrcRasterOp;
@@ -92,7 +92,7 @@ private:
Rectangle aClipRect;
PictWriterAttrStackMember * pAttrStack;
- // Aktuelle Attribute im Ziel-Metafile, und ob sie gueltig sind
+ // current attributes in the target-metafile and whether they are valid
sal_Bool bDstBkPatVisible; sal_Bool bDstBkPatValid;
sal_uInt8 nDstTxFace; sal_Bool bDstTxFaceValid;
RasterOp eDstTxMode; sal_Bool bDstTxModeValid;
@@ -107,23 +107,23 @@ private:
Point aDstTextPosition; sal_Bool bDstTextPositionValid;
String aDstFontName; sal_uInt16 nDstFontNameId; sal_Bool bDstFontNameValid;
- sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
- sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
- sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes
- sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ sal_uLong nNumberOfActions; // number of actions in the GDIMetafile
+ sal_uLong nNumberOfBitmaps; // number of bitmaps
+ sal_uLong nWrittenActions; // number of already processed actions during writing the Opcodes
+ sal_uLong nWrittenBitmaps; // number of already written Bitmaps
+ sal_uLong nActBitmapPercent; // what percentage of the next bitmap is already written
void MayCallback();
- // Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
- // moechte.
+ // calculates a percentage on the basis of the 5 parameters above
+ // and then does a Callback should the situation arise. Sets bStatus to sal_False
+ // if the user wants to cancel
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
- // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen
- // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist)
+ // counts the bitmaps and actions (nNumberOfActions and nNumberOfBitmaps
+ // have to be set to 0 at the beginning, since this method is recursive)
Polygon PolyPolygonToPolygon(const PolyPolygon & rPoly);
- // Macht aus einem PolyPolygon ein halbwegs vernuenftiges Polygon
+ // generates a relatively sane polygon on the basis of a PolyPolygon
Rectangle MapRectangle( const Rectangle& rRect );
void WritePoint(const Point & rPoint);
@@ -184,7 +184,7 @@ public:
};
-//========================== Methoden von PictWriter ==========================
+//========================== Methods of PictWriter ==========================
void PictWriter::MayCallback()
@@ -248,11 +248,13 @@ Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly)
for (np=1; np<nCount; np++) {
aPoly2=rPolyPoly.GetObject(np);
- //-----------------Folgendes verschmilzt aPoly1 und aPoly2 zu aPoly1-----------------
+ //-----------------The following code merges aPoly1 and aPoly2 to aPoly1-----------------
nSize1=aPoly1.GetSize();
nSize2=aPoly2.GetSize();
+ // At first we look for a point in aPoly1 (referenced by nBestIdx1) and a
+ // point in aPoly2 (referenced by nBestid2), which
// Zunaechst werden ein Punkt in aPoly1 (referenziert durch nBestIdx1) und ein
// Punkt in aPoly2 (referenziert durch nBestIdx2) gesucht, die moeglichst dicht
// beieinander liegen. Da dies mit quadratischem Aufwand einher geht, und somit
@@ -279,9 +281,8 @@ Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly)
if (nCountdownTests<=0) break;
}
- // Nun werden aPoly1 und aPoly2 zu einem Polygon aPoly3 (spaeter aPoly1) zusammengefuegt.
- // Die beiden Polygone werden verbunden durch zwei zusaetzliche Kanten zwischen den oben
- // gefundenen Punkten.
+ // Now aPoly1 and aPoly2 are being merged to a polygon aPoly3 (later aPoly1)
+ // Both polygons are being connected by two additional edges between the points found above
aPoly3.Clear();
aPoly3.SetSize(nSize1+nSize2+2);
i3=0;
@@ -898,7 +899,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
SetAttrForPaint();
- // temopraere Windows-BMP-Datei erzeugen:
+ // generating a temporary Windows-BMP-File:
nActBitmapPercent=30;
MayCallback();
@@ -916,15 +917,14 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nWidth = pAcc->Width();
nHeight = pAcc->Height();
- // Wenn 24-Bit, dann den Opcode 'DirectBitsRect' erzeugen:
+ // If 24-Bit, then create the Opcode 'DirectBitsRect':
if ( nBitsPerPixel == 24 )
{
-
- // Anzahl Bytes einer (ungepackten) Zeile in Quelle und Ziel berechnen:
+:Anzahl Bytes einer (ungepackten) Zeile in Quelle und Ziel berechnen:
nSrcRowBytes =( ( 3 * nWidth ) + 0x0003 ) & 0xfffc;
nDstRowBytes = nWidth * 4;
- // Opcode und BaseAddr (?) schreiben:
+ // writing Opcode and BaseAddr (?):
*pPict << (sal_uInt16)0x009a << (sal_uInt32)0x000000ff;
// Normalerweise wollen wir den Packing-Type 4 (Run length encoding
@@ -938,12 +938,12 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
else
nPackType = 4;
- // PixMap-Struktur schreiben:
- *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
- << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle
- << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle
- << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle
- << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle
+ // writing PixMap-Structure:
+ *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes per row and the fact that it's a 'PixMap'
+ << (sal_uInt16)0x0000 // Y1-position of the bitmap in the source
+ << (sal_uInt16)0x0000 // X1-position of the bitmap in the source
+ << (sal_uInt16)nHeight // Y2-position of the bitmap in the source
+ << (sal_uInt16)nWidth // X2-position of the bitmap in the source
<< (sal_uInt16)0x0000 // Version
<< (sal_uInt16)nPackType // Packing type
<< (sal_uInt32) 0x00000000 // Packing size (?)
@@ -951,48 +951,48 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
<< (sal_uInt32) 0x00480000 // V-Res
<< (sal_uInt16)0x0010 // Pixel type (?)
<< (sal_uInt16)0x0020 // Pixel size: 32 bit
- << (sal_uInt16)0x0004 // CmpCount: 4 Komponenten
- << (sal_uInt16)0x0008 // CmpSize: 8 Bits
+ << (sal_uInt16)0x0004 // CmpCount: 4 components
+ << (sal_uInt16)0x0008 // CmpSize: 8 bits
<< (sal_uInt32) 0x00000000 // PlaneBytes (?)
<< (sal_uInt32) 0x00000000 // (?)
<< (sal_uInt32) 0x00000000; // (?)
// Source-Rectangle schreiben:
- *pPict << (sal_uInt16)0x0000 // Y1-Position auf der Bitmap
- << (sal_uInt16)0x0000 // X1-Position auf der Bitmap
- << (sal_uInt16)nHeight // Y2-Position auf der Bitmap
- << (sal_uInt16)nWidth; // X2-Position auf der Bitmap
+ *pPict << (sal_uInt16)0x0000 // Y1-position on the bitmap
+ << (sal_uInt16)0x0000 // X1-position on the bitmap
+ << (sal_uInt16)nHeight // Y2-position on the bitmap
+ << (sal_uInt16)nWidth; // X2-position on the bitmap
- // Destination-Rectangle schreiben:
+ // writing the Destination-Rectangle:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
- // Transfer mode schreiben:
+ // writing the Transfer mode:
*pPict << (sal_uInt16)0x0000; // (?)
- // Position der Map-Daten in Ziel merken:
+ // remember position of the Map-data in the target:
nDstMapPos=pPict->Tell();
- if ( nPackType == 1 ) // bei 24 bits nWidth == 1 !!
- { // nicht packen
+ if ( nPackType == 1 ) // when 24 bits nWidth == 1 !!
+ { // don't pack
for ( ny = 0; ny < nHeight; ny++ )
{
*pPict << (sal_uInt8)0;
*pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetRed();
*pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetGreen();
*pPict << (sal_uInt8)pAcc->GetPixel( ny, 0 ).GetBlue();
- // Prozente zaehlen, Callback, Fehler pruefen:
- nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus)
+ // count percentages, Callback, check errors:
+ nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% already added up to the writing of the Win-BMP file)
MayCallback();
}
}
- else // packen ( PackType == 4 )
+ else // packing ( PackType == 4 )
{
// Speicher fuer Zeilen-Zwischen-Datenstruktur allozieren:
for ( nc = 0; nc < 4; nc++ )
pComp[ nc ] = new sal_uInt8[ nWidth ];
- // Schleife ueber Zeilen:
+ // loop trough rows:
for ( ny = 0; ny < nHeight; ny++ )
{
// Zeil ny der Quelle in die Zwischen-Datenstrktur einlesen:
@@ -1005,25 +1005,25 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
pComp[ 0 ][ nx ] = 0;
}
- // Anfang der Zeile im Ziel merken:
+ // remember start of the row in the target:
nDstRowPos = pPict->Tell();
- // ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt):
+ // ByteCount (that's the size of the packed row) is at first 0 (will be corrected later):
if ( nDstRowBytes > 250 )
*pPict << (sal_uInt16)0;
else
*pPict << (sal_uInt8)0;
- // Schleife ueber Componenten:
+ // loop trough components:
for ( nc = 0; nc < 4; nc++ )
{
- // Schleife ueber x:
+ // loop through x:
nx = 0;
while ( nx < nWidth )
{
- // Die Position von 3 gleichen Bytes suchen und in nEqu3 merken.
- // wenn nicht gefunden, dann nEqu3=nWidth setzten.
- // Wenn doch gefunden, dann in nEquData den Wert der Bytes merken.
+ // look up the position of 3 equal bytes and seve it in nEqu3
+ // if it's not found, set nEqu3=nWidth
+ // if it's found save the value of the bytes in nEquData
nEqu3 = nx;
for (;;)
{
@@ -1057,23 +1057,23 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
// Jetzt einen Komprimierungs-Record erzeugen (falls oben mindestens 3
// gleiche Bytes gefunden):
if ( nx < nWidth )
- { // Hinweis: es gilt nx==nEqu3 (hoffentlich)
- nCount=3; // Drei Bytes sind gleich, wie weiter oben herausgefunden.
- // Pruefen, ob es weitere gleiche Bytes gibts (dabei Max.-Record-Groesse beachten):
+ { // Hint: Then one has nx==nEqu3 (hopefully)
+ nCount=3; // Three bytes are equal, as we found out above
+ // Check, whether there are further equal bytes (and pay attention to Max.-Record-Size):
while ( nx + nCount < nWidth && nCount < 128 )
{
if ( nEquData != pComp[ nc ][ nx + nCount ] )
break;
nCount++;
}
- // nCount gleiche Bytes komprimiert schreiben:
+ // nCount write equal Bytes compressed:
nFlagCounterByte = (sal_uInt8)( 1 - (long)nCount );
*pPict << nFlagCounterByte << nEquData;
nx += nCount;
}
}
}
- // ByteCount berichtigen:
+ // correct ByteCount:
nPos = pPict->Tell();
pPict->Seek( nDstRowPos );
if ( nDstRowBytes > 250 )
@@ -1082,17 +1082,17 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
*pPict << ( (sal_uInt8)( nPos - nDstRowPos - 1 ) );
pPict->Seek( nPos );
- // Prozente zaehlen, Callback, Fehler pruefen:
+ // count percentages, Callback, check errors:
nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus)
MayCallback();
}
- // Aufraeumen:
+ // clean up:
for ( nc = 0; nc < 4; nc++ )
delete pComp[ nc ];
}
}
else
- { // nicht 24-Bit also Opcode 'PackBitsRect' erzeugen:
+ { // don't generate 24-bit i.e. Opcode 'PackBitsRect':
// Bei 1-Bit-Bildern ignorieren manche Import-Filter die Palette und nehmen statt
// dessen die Vorder- und Hintergrundfarbe:
@@ -1111,7 +1111,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
nDstRowBytes = ( nWidth * nBitsPerPixel + 7 ) >> 3;
nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc;
- // Opcode schreiben:
+ // writing Opcode:
*pPict << (sal_uInt16)0x0098;
// Normalerweise wollen wir den Packing-Type 0 (default Packing) erzeugen.
@@ -1124,12 +1124,12 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
else
nPackType = 0;
- // PixMap-Struktur schreiben:
- *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist
- << (sal_uInt16)0x0000 // Y1-Position der Bitmap in der Quelle
- << (sal_uInt16)0x0000 // X1-Position der Bitmap in der Quelle
- << (sal_uInt16)nHeight // Y2-Position der Bitmap in der Quelle
- << (sal_uInt16)nWidth // X2-Position der Bitmap in der Quelle
+ // write PixMap-Structure:
+ *pPict << (sal_uInt16)(nDstRowBytes|0x8000) // Bytes per row and the fact that it's a 'PixMap'
+ << (sal_uInt16)0x0000 // Y1-position of the bitmap in the source
+ << (sal_uInt16)0x0000 // X1-position of the bitmap in the source
+ << (sal_uInt16)nHeight // Y2-position of the bitmap in the source
+ << (sal_uInt16)nWidth // X2-position of the bitmap in the source
<< (sal_uInt16)0x0000 // Version
<< (sal_uInt16)nPackType // Packing type
<< (sal_uInt32) 0x00000000 // Packing size (?)
@@ -1137,13 +1137,13 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
<< (sal_uInt32) 0x00480000 // V-Res
<< (sal_uInt16)0x0000 // Pixel type (?)
<< (sal_uInt16)nBitsPerPixel // Pixel size
- << (sal_uInt16)0x0001 // CmpCount: 1 Komponente
+ << (sal_uInt16)0x0001 // CmpCount: 1 component
<< (sal_uInt16)nBitsPerPixel // CmpSize
<< (sal_uInt32) 0x00000000 // PlaneBytes (?)
<< (sal_uInt32) 0x00000000 // (?)
<< (sal_uInt32) 0x00000000; // (?)
- // Palette lesen und schreiben:
+ // writing and reading the palette:
nColTabSize = pAcc->GetPaletteEntryCount();
*pPict << (sal_uInt32)0 << (sal_uInt16)0x8000 << (sal_uInt16)( nColTabSize - 1 );
@@ -1155,23 +1155,23 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
*pPict << (sal_uInt16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue;
}
- // Source-Rectangle schreiben:
+ // writing Source-Rectangle:
*pPict << (sal_uInt16)0 << (sal_uInt16)0 << (sal_uInt16)nHeight << (sal_uInt16)nWidth;
- // Destination-Rectangle schreiben:
+ // writing Destination-Rectangle:
WritePoint( rPoint );
WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) );
- // Transfer mode schreiben:
+ // writing Transfer mode:
*pPict << (sal_uInt16)0; // (?)
- // Speicher fuer eine Zeile allozieren:
+ // allocate memory for a row:
pPix = new sal_uInt8[ nSrcRowBytes ];
// Position der Map-Daten in Ziel merken:
nDstMapPos=pPict->Tell();
- // Schleife ueber Zeilen:
+ // loop trough rows:
for ( ny = 0; ny < nHeight; ny++ )
{
@@ -1198,13 +1198,13 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
}
if ( nPackType == 1 )
- { // nicht packen
+ { // don't pack
pPict->Write( pPix, nDstRowBytes );
}
else
- { // Packen (nPackType==0)
+ { // Ppacking (nPackType==0)
- // Anfang der Zeile im Ziel merken:
+ // remeber start of the row in the target:
nDstRowPos = pPict->Tell();
// ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt):
@@ -1213,7 +1213,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
else
*pPict << (sal_uInt8)0;
- // Schleife ueber Bytes der Zeile:
+ // loop trough bytes of the row:
nx=0;
while ( nx < nDstRowBytes && bStatus )
{
@@ -1268,7 +1268,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
}
}
- // ByteCount berichtigen:
+ // correct ByteCount:
nPos = pPict->Tell();
pPict->Seek( nDstRowPos );
if ( nDstRowBytes > 250 )
@@ -1278,21 +1278,21 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
pPict->Seek( nPos );
}
- // Prozente zaehlen, Callback, Fehler pruefen:
+ // count percentages, Callback, check errors:
nActBitmapPercent =( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus)
MayCallback();
if ( pPict->GetError() )
bStatus = sal_False;
}
- // Aufraeumen:
+ // cleaning up:
delete[] pPix;
}
- // Map-Daten muessen gerade Anzahl von Bytes sein:
+ // Map-Data has to be an even number of bytes:
if ( ( ( pPict->Tell() - nDstMapPos ) & 1 ) != 0 )
*pPict << (sal_uInt8)0;
- // Bitmaps zaehlen:
+ // counting Bitmaps:
nWrittenBitmaps++;
nActBitmapPercent = 0;
if ( pAcc )
@@ -2183,13 +2183,13 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
Point aPoint;
Rectangle aRect( aPoint, aSize );
- // 512 Bytes "Muell" am Anfang:
+ // 512 Bytes "trash" at the beginning:
for (i=0;i<128;i++) *pPict << (sal_uInt32)0;
- // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell:
- *pPict << (sal_uInt16)0; // wird spaeter durch UpdateHeader() berichtigt
+ // Lo-16-Bits of the file size without the 512 bytes trash:
+ *pPict << (sal_uInt16)0; // gets corrected later on by UpdateHeader()
- // Das Bounding-Rectangle (y1,x1,y2,x2 !):
+ // The Bounding-Rectangle (y1,x1,y2,x2 !):
WriteRectangle( aRect );
// Version 2:
@@ -2204,8 +2204,8 @@ void PictWriter::WriteHeader(const GDIMetaFile & rMTF)
WriteRectangle( aRect );
*pPict << (sal_uInt32)0x00000000; // Reserved
- // viele Import-Filter verlangen die Angabe eines
- // Clipping-Bereichs am Anfang
+ // many import filters demand the declaration
+ // of a clipping area at the beginning
WriteOpcode_ClipRect( aRect );
}
@@ -2215,7 +2215,7 @@ void PictWriter::UpdateHeader()
{
sal_uLong nPos;
- // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell berichtigen:
+ // correct the Lo-16-Bits of the file size without the 512 bytes trash:
nPos=pPict->Tell();
pPict->Seek(512);
*pPict << (sal_uInt16)((nPos-512)&0x0000ffff);
@@ -2296,7 +2296,7 @@ sal_Bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStrea
return bStatus;
}
-//================== GraphicExport - die exportierte Funktion ================
+//================== GraphicExport - the exported Function ================
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, sal_Bool)
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index e65343a..0b114e6 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -62,7 +62,7 @@ public:
sal_Bool WritePPM( const Graphic& rGraphic, FilterConfigItem* pFilterConfigItem );
};
-//=================== Methoden von PPMWriter ==============================
+//=================== Methods of PPMWriter ==============================
PPMWriter::PPMWriter(SvStream &rStrm)
: m_rOStm(rStrm)
@@ -217,7 +217,7 @@ void PPMWriter::ImplWriteBody()
}
// ------------------------------------------------------------------------
-// eine Dezimalzahl im ASCII format wird in den Stream geschrieben
+// a decimal number in ASCII format is being written into the stream
void PPMWriter::ImplWriteNumber(sal_Int32 nNumber)
{
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index 074ce32..7a2c93a 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -59,20 +59,20 @@ DXFPalette::DXFPalette()
pGreen=new sal_uInt8[256];
pBlue =new sal_uInt8[256];
- // Farben 0 - 9 (normale Farben)
- SetColor(0, 0x00, 0x00, 0x00); // eigentlich nie benutzt
+ // colors 0 - 9 (normal colors)
+ SetColor(0, 0x00, 0x00, 0x00); // actually never being used
SetColor(1, 0xff, 0x00, 0x00);
SetColor(2, 0xff, 0xff, 0x00);
SetColor(3, 0x00, 0xff, 0x00);
SetColor(4, 0x00, 0xff, 0xff);
SetColor(5, 0x00, 0x00, 0xff);
SetColor(6, 0xff, 0x00, 0xff);
- SetColor(7, 0x0f, 0x0f, 0x0f); // eigentlich weiss ???
+ SetColor(7, 0x0f, 0x0f, 0x0f); // actually white???
SetColor(8, 0x80, 0x80, 0x80);
SetColor(9, 0xc0, 0xc0, 0xc0);
- // Farben 10 - 249
- // (Universal-Palette: 24 Farbtoene * 5 Helligkeiten * 2 Saettigungen )
+ // colors 10 - 249
+ // (Universal-Palette: 24 hues * 5 lightnesses * 2 saturations )
i=10;
for (nHue=0; nHue<24; nHue++) {
for (nVal=5; nVal>=1; nVal--) {
@@ -100,7 +100,7 @@ DXFPalette::DXFPalette()
}
}
- // Farben 250 - 255 (Grautoenne)
+ // Farben 250 - 255 (shades of gray)
for (i=0; i<6; i++) {
nV=(sal_uInt8)(i*38+65);
SetColor((sal_uInt8)(250+i),nV,nV,nV);
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx
index 2b804c9..32db3c2 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx
@@ -25,10 +25,10 @@
//----------------------------------------------------------------------------
-//--------------------Nebensachen---------------------------------------------
+//--------------------Other stuff---------------------------------------------
//----------------------------------------------------------------------------
-//-------------------Eine 3D-Min/Max-Box--------------------------------------
+//-------------------A 3D-Min/Max-Box-----------------------------------------
class DXFBoundingBox {
public:
@@ -45,7 +45,7 @@ public:
};
-//-------------------Die (konstante) Palette fuer DXF-------------------------
+//-------------------The (constant) palette for DXF-------------------------
class DXFPalette {
@@ -67,7 +67,7 @@ private:
//----------------------------------------------------------------------------
-//-----------------DXF Datei lesen und repraesentieren------------------------
+//-----------------read and represent DXF file--------------------------------
//----------------------------------------------------------------------------
class DXFRepresentation {
@@ -75,20 +75,20 @@ class DXFRepresentation {
public:
DXFPalette aPalette;
- // Die immer gleiche DXF-Farb-Palette
+ // The always equal DXF color palette
DXFBoundingBox aBoundingBox;
- // Ist gleich den AutoCAD-Variablen EXTMIN, EXTMAX sofern in DXF-Datei
- // vorhanden, anderenfalls wird die BoundingBox berechnet (in Read()).
+ // is equal to the AutoCAD variables EXTMIN, EXTMAX if those exist
+ // within the DXF file. Otherwise the BoundingBox gets calculated (in Read())
DXFTables aTables;
- // Die Tabellen der DXF-Datei
+ // the tables of the DXF file
DXFBlocks aBlocks;
- // Die Bloecke der DXF-Datei
+ // the blocks of the DXF file
DXFEntities aEntities;
- // Die Entities (aus der Entities-Section) der DXF-Datei
+ // the entities (from the Entities-Section) of the DXF file
rtl_TextEncoding mEnc; // $DWGCODEPAGE
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index 9c8c110..e8ae4af 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -83,7 +83,7 @@ DXFTransform::DXFTransform(double fScaleX, double fScaleY, double fScaleZ,
DXFTransform::DXFTransform(const DXFVector & rExtrusion) :
aMX(), aMY(), aMZ(), aMP(0.0, 0.0, 0.0)
{
- // 'Arbitrary Axis Algorithm' (siehe DXF-Doku von Autodesk)
+ // 'Arbitrary Axis Algorithm' (cf. DXF documentation by Autodesk)
if ( fabs(rExtrusion.fx) < 1.0/64.0 && fabs(rExtrusion.fy) < 1.0/64.0) {
aMX = DXFVector(0.0, 1.0, 0.0) * rExtrusion;
}
diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx
index 1f1b34a..41cfcc0 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.hxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.hxx
@@ -63,7 +63,7 @@ class DXFVector {
public:
- double fx,fy,fz; // public ! - Warum nicht ?
+ double fx,fy,fz; // public ! - why not?
inline DXFVector(double fX=0.0, double fY=0.0, double fZ=0.0);
inline DXFVector(const DXFVector & rV);
@@ -84,7 +84,7 @@ public:
DXFVector & operator *= (double fs);
DXFVector operator * (double fs) const;
- // Laenge:
+ // length:
double Abs() const;
// Vektor gleicher Richtung und der Laenge 1:
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index c5f2402..ef0caea 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -258,8 +258,8 @@ struct OSBitmap {
sal_uLong nID;
Bitmap aBitmap;
- // Waehrend des Lesens der Bitmap benoetigt:
- SvStream * pBMP; // Zeiger auf temporaere Windows-BMP-Datei oder NULL
+ // required during reading of the bitmap:
+ SvStream * pBMP; // pointer to temporary Windows-BMP file or NULL
sal_uInt32 nWidth, nHeight;
sal_uInt16 nBitsPerPixel;
sal_uLong nMapPos;
@@ -269,7 +269,7 @@ struct OSBitmap {
struct OSAttr {
OSAttr * pSucc;
sal_uInt16 nPushOrder;
- sal_uInt8 nIvAttrA, nIvAttrP; // Spezialvariablen fuer den Order "GOrdPIvAtr"
+ sal_uInt8 nIvAttrA, nIvAttrP; // special variables for the Order "GOrdPIvAtr"
Color aLinCol;
Color aLinBgCol;
@@ -330,14 +330,14 @@ private:
long ErrorCode;
SvStream * pOS2MET; // Die einzulesende OS2MET-Datei
- VirtualDevice * pVirDev; // Hier werden die Drawing-Methoden aufgerufen.
+ VirtualDevice * pVirDev; // here the drawing methods are being called
// Dabei findet ein Recording in das GDIMetaFile
// statt.
sal_uLong nOrigPos; // Anfaengliche Position in pOS2MET
sal_uInt16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pOS2MET
Rectangle aBoundingRect; // Boundingrectangle wie in Datei angegeben
Rectangle aCalcBndRect; // selbst ermitteltes Boundingrectangle
- MapMode aGlobMapMode; // Aufloesung des Bildes
+ MapMode aGlobMapMode; // resolution of the picture
sal_Bool bCoord32;
OSPalette * pPaletteStack;
@@ -373,8 +373,8 @@ private:
void SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol);
sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex);
- // Holt Farbe aus der Palette, oder, wenn nicht vorhanden,
- // interpretiert nIndex als direkten RGB-Wert.
+ // gets color from palette, or, if it doesn't exist,
+ // interprets nIndex as immediate RGB value.
Color GetPaletteColor(sal_uInt32 nIndex);
@@ -417,7 +417,7 @@ public:
};
-//=================== Methoden von OS2METReader ==============================
+//=================== Methoda of OS2METReader ==============================
sal_Bool OS2METReader::Callback(sal_uInt16 /*nPercent*/)
{
@@ -1039,7 +1039,7 @@ void OS2METReader::ReadArc(sal_Bool bGivenPos)
cy=( q*q*((x3*x3-x1*x1)*(x2-x1)+(x2*x2-x1*x1)*(x1-x3)) +
p*p*((y3*y3-y1*y1)*(x2-x1)+(y2*y2-y1*y1)*(x1-x3)) ) / ncy;
cx=( q*q*(x2*x2-x1*x1)+p*p*(y2*y2-y1*y1)+cy*2*p*p*(y1-y2) ) / ncx;
- // Nun brauchen wir noch den Radius in x und y Richtung:
+ // now we still need the radius in x and y direction:
r=sqrt(q*q*(x1-cx)*(x1-cx)+p*p*(y1-cy)*(y1-cy));
rx=r/q; ry=r/p;
// Jetzt stellt sich "nur noch" die Frage, wie Start- und Endpunkt
@@ -2148,7 +2148,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
{
- OSBitmap * p=pBitmapList; if (p==NULL) return; // Nanu ?
+ OSBitmap * p=pBitmapList; if (p==NULL) return;
switch (nDataID) {
@@ -2190,12 +2190,12 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
ErrorCode=3;
return;
}
- // Schreibe (Windows-)BITMAPINFOHEADER:
+ // write (Windows-)BITMAPINFOHEADER:
*(p->pBMP) << ((sal_uInt32)40) << p->nWidth << p->nHeight;
*(p->pBMP) << ((sal_uInt16)1) << p->nBitsPerPixel;
*(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0);
*(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0);
- // Schreibe Farbtabelle:
+ // write color table:
if (p->nBitsPerPixel<=8) {
sal_uInt16 i, nColTabSize=1<<(p->nBitsPerPixel);
for (i=0; i<nColTabSize; i++) *(p->pBMP) << GetPalette0RGB(i);
@@ -2361,7 +2361,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
pB->pSucc=pBitmapList; pBitmapList=pB;
pB->pBMP=NULL; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0;
pB->nMapPos=0;
- // ID der Bitmap ermitteln:
+ // determine ID of the bitmap:
sal_uInt8 i,nbyte,nbyte2;
pB->nID=0;
for (i=0; i<4; i++) {
@@ -2392,7 +2392,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
ErrorCode=6;
}
delete pBitmapList->pBMP; pBitmapList->pBMP=NULL;
- // Palette vom Stack killen:
+ // kill palette from stack:
OSPalette * pP=pPaletteStack;
if (pP!=NULL) {
pPaletteStack=pP->pSucc;
@@ -2453,14 +2453,14 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
nMaxPos=pOS2MET->Tell();
pOS2MET->Seek(0);
- // "Segmentheader":
+ // "Segment header":
*pOS2MET >> nbyte;
- if (nbyte==0x70) { // Header vorhanden
- pOS2MET->SeekRel(15); // brauchen wir aber nicht
+ if (nbyte==0x70) { // header exists
+ pOS2MET->SeekRel(15); // but we don't need it
}
- else pOS2MET->SeekRel(-1); // Kein Header, Byte zurueck
+ else pOS2MET->SeekRel(-1); // no header, go back one byte
- // Schleife ueber Order:
+ // loop through Order:
while (pOS2MET->Tell()<nMaxPos && pOS2MET->GetError()==0) {
*pOS2MET >> nbyte; nOrderID=((sal_uInt16)nbyte) & 0x00ff;
if (nOrderID==0x00fe) {
@@ -2483,7 +2483,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
nPos=pOS2MET->Tell();
ReadOrder(nOrderID, nOrderLen);
if (nPos+nOrderLen < pOS2MET->Tell()) {
- OOODEBUG("Order kuerzer als er denkt! OrderID:",nOrderID);
+ OOODEBUG("Order shorter than he assumes! OrderID:",nOrderID);
OOODEBUG("...und zwar bei Position (Parameteranfang):",nPos);
}
else if (nPos+nOrderLen != pOS2MET->Tell()) {
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 3a0388e..211ad60 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -37,13 +37,13 @@
//============================ PCDReader ==================================
-// Diese Aufloesungen sind in einer PCD-Datei enthalten:
+// these resolutions are contained in a PCD file:
enum PCDResolution {
PCDRES_BASE16, // 192 x 128
PCDRES_BASE4, // 384 x 256
PCDRES_BASE, // 768 x 512
- // Die folgenden sind komprimiert und koennen
- // von uns NICHT gelesen werden:
+ // the following ones are compressed
+ // and CANNOT be read by us
PCDRES_4BASE, // 1536 x 1024
PCDRES_16BASE // 3072 x 3072
};
@@ -59,29 +59,29 @@ private:
SvStream &m_rPCD;
BitmapWriteAccess* mpAcc;
- sal_uInt8 nOrientation; // Ausrichtung des Bildes in der PCD-Datei:
- // 0 - Turmspitze zeigt nach oben
- // 1 - Turmspitze zeigt nach rechts
- // 2 - Turmspitze zeigt nach unten
- // 3 - Turmspitze zeigt nach links
+ sal_uInt8 nOrientation; // orientation of the picture withinthe PCD file:
+ // 0 - spire point up
+ // 1 - spire points to the right
+ // 2 - spire points down
+ // 3 - spire points to the left
- PCDResolution eResolution; // Welche Aufloesung wir haben wollen
+ PCDResolution eResolution; // which resolution we want
- sal_uLong nWidth; // Breite des PCD-Bildes
- sal_uLong nHeight; // Hoehe des PCD-Bildes
- sal_uLong nImagePos; // Position des Bildes in der PCD-Datei
+ sal_uLong nWidth; // width of the PCD picture
+ sal_uLong nHeight; // heigth of the PCD picture
+ sal_uLong nImagePos; // position of the picture within the PCD file
- // Temporare BLue-Green-Red-Bitmap
+ // temporary lLue-Green-Red-Bitmap
sal_uLong nBMPWidth;
sal_uLong nBMPHeight;
void MayCallback(sal_uLong nPercent);
void CheckPCDImagePacFile();
- // Prueft, ob es eine Photo-CD-Datei mit 'Image Pac' ist.
+ // checks whether it's a Photo-CD file with 'Image Pac'
void ReadOrientation();
- // Liest die Ausrichtung und setzt nOrientation
+ // reads the orientation and sets nOrientation
void ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent);
@@ -96,7 +96,7 @@ public:
sal_Bool ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem );
};
-//=================== Methoden von PCDReader ==============================
+//=================== Methods of PCDReader ==============================
sal_Bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
{
@@ -107,13 +107,13 @@ sal_Bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
MayCallback( 0 );
- // Ist es eine PCD-Datei mit Bild ? ( setzt bStatus == sal_False, wenn nicht ):
+ // is it a PCD file with a picture? ( sets bStatus == sal_False, if that's not the case):
CheckPCDImagePacFile();
- // Orientierung des Bildes einlesen:
+ // read orientation of the picture:
ReadOrientation();
- // Welche Aufloesung wollen wir ?:
+ // which resolution do we want?:
eResolution = PCDRES_BASE;
if ( pConfigItem )
{
@@ -123,7 +123,7 @@ sal_Bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
else if ( nResolution == 0 )
eResolution = PCDRES_BASE16;
}
- // Groesse und Position (Position in PCD-Datei) des Bildes bestimmen:
+ // determine size and position (position within the PCD file) of the picture:
switch (eResolution)
{
case PCDRES_BASE16 :
@@ -208,11 +208,11 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
sal_uLong nx,ny,nW2,nH2,nYPair,ndy,nXPair;
long nL,nCb,nCr,nRed,nGreen,nBlue;
sal_uInt8 * pt;
- sal_uInt8 * pL0; // Luminanz fuer jeden Pixel der 1. Zeile des aktuellen Zeilen-Paars
- sal_uInt8 * pL1; // Luminanz fuer jeden Pixel der 2. Zeile des aktuellen Zeilen-Paars
- sal_uInt8 * pCb; // Blau-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
- sal_uInt8 * pCr; // Rot-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars
- sal_uInt8 * pL0N, * pL1N, * pCbN, * pCrN; // wie oben, nur fuer das naechste Zeilen-Paar
+ sal_uInt8 * pL0; // luminance for each pixel of the 1st row of the current pair of rows
+ sal_uInt8 * pL1; // luminance for each pixel of the 2nd row of the current pair of rows
+ sal_uInt8 * pCb; // blue chrominance for each 2x2 pixel of the current pair of rows
+ sal_uInt8 * pCr; // red chrominance fuer je 2x2 pixel of the current pair of rows
+ sal_uInt8 * pL0N, * pL1N, * pCbN, * pCrN; // like above, but for the next pair of rows
if ( bStatus == sal_False )
return;
@@ -246,7 +246,7 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
m_rPCD.Seek( nImagePos );
- // naechstes Zeilen-Paar := erstes Zeile-Paar:
+ // next pair of rows := first pair of rows:
m_rPCD.Read( pL0N, nWidth );
m_rPCD.Read( pL1N, nWidth );
m_rPCD.Read( pCbN, nW2 );
@@ -256,13 +256,13 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
for ( nYPair = 0; nYPair < nH2; nYPair++ )
{
- // aktuelles Zeilen-Paar := naechstes Zeilen-Paar
+ // current pair of rows := next pair of rows:
pt=pL0; pL0=pL0N; pL0N=pt;
pt=pL1; pL1=pL1N; pL1N=pt;
pt=pCb; pCb=pCbN; pCbN=pt;
pt=pCr; pCr=pCrN; pCrN=pt;
- // naechstes Zeilen-Paar holen:
+ // get the next pair of rows:
if ( nYPair < nH2 - 1 )
{
m_rPCD.Read( pL0N, nWidth );
@@ -281,15 +281,15 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
}
}
- // Schleife uber die beiden Zeilen des Zeilen-Paars:
+ // loop trough both rows of the pair of rows:
for ( ndy = 0; ndy < 2; ndy++ )
{
ny = ( nYPair << 1 ) + ndy;
- // Schleife ueber X:
+ // loop trough X:
for ( nx = 0; nx < nWidth; nx++ )
{
- // nL,nCb,nCr fuer den Pixel nx,ny holen/berechenen:
+ // get/calculate nL,nCb,nCr for the pixel nx,ny:
nXPair = nx >> 1;
if ( ndy == 0 )
{
@@ -340,7 +340,7 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
if ( nBlue > 255 )
nBlue = 255;
- // Farbwert in pBMPMap eintragen:
+ // register color value in pBMPMap:
if ( nOrientation < 2 )
{
if ( nOrientation == 0 )
@@ -374,7 +374,7 @@ void PCDReader::ReadImage(sal_uLong nMinPercent, sal_uLong nMaxPercent)
rtl_freeMemory((void*)pCrN);
}
-//================== GraphicImport - die exportierte Funktion ================
+//================== GraphicImport - the exported Function ================
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI
GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem, sal_Bool)
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 0d3a8b0..d0acce6 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -87,7 +87,7 @@ public:
sal_Bool ReadPSD(Graphic & rGraphic);
};
-//=================== Methoden von PSDReader ==============================
+//=================== Methods of PSDReader ==============================
PSDReader::PSDReader(SvStream &rStream)
: m_rPSD(rStream)
@@ -143,7 +143,7 @@ sal_Bool PSDReader::ReadPSD(Graphic & rGraphic )
mpWriteAcc->SetPaletteColor( i, Color( mpPalette[ i ], mpPalette[ i + 256 ], mpPalette[ i + 512 ] ) );
}
}
- // Bitmap-Daten einlesen
+ // read Bitmap-Daten
if ( mbStatus && ImplReadBody() )
{
if ( mbTransparent )
@@ -253,7 +253,7 @@ sal_Bool PSDReader::ImplReadHeader()
}
break;
- case PSD_DUOTONE : // we'll handle the doutone color like a normal grayscale picture
+ case PSD_DUOTONE : // we'll handle the duotone color like a normal grayscale picture
m_rPSD.SeekRel( nColorLength );
nColorLength = 0;
case PSD_GRAYSCALE :
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index c55ebe4..80880da 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -29,7 +29,7 @@
#include "ccidecom.hxx"
-//=============================== Huffman-Tabellen ========================
+//=============================== Huffman tables ========================
//---------------------------- White-Run ------------------------------
@@ -316,18 +316,15 @@ const CCIHuffmanTableEntry CCIUncompTable[CCIUncompTableSize]={
};
-//================== Sicherheitskopie der Huffman-Tabellen ================
-// Um sicher zugehen, dass die Huffman-Tabellen keine Fehler enthalten,
-// wurden sie zweimal von unterschiedlichen Quellen eingegeben (Uff) und
-// verglichen.
-// Da sich aber im Laufe der Pflege des Source-Codes mal ein Fehler
-// einschleichen koennte (z.B. versehentlicher druck einer Taste im Editor)
-// werden die Tablellen hier weiterhin zweimal aufgefuehrt und zur Laufzeit
-// verglichen. (Wenn der Vergleich fehlschlaegt, liefert CCIDecompressor
-// immer einen Fehler). Das Ganze mag etwas wahnsinnig erscheinen, aber ein Fehler
-// in den Tabellen waere sonst sehr sehr schwer zu erkennen, zumal es
-// unwahrscheinlich ist, dass eine oder mehere Beispieldateien alle Codes
-// durchlaufen.
+//================== backup of the Huffman tables ============================
+// To make sure that the Huffman tables do not contain errors they were entered
+// from two different sources (Phew) and compared.
+// Since an error could creep in to the source code while maintaining it
+// (e.g. an accidentaly key press in the editor) the tables are listed twice
+// and are compared during runtime. (If the comparison fails CCIDcompressor
+// throws an error) The whole thing may appear insane, but an error within the
+// tables would otherwise be really hard to discover and it's very unlikely that
+// one or more sample files run through all codes.
const CCIHuffmanTableEntry CCIWhiteTableSave[CCIWhiteTableSize]={
{ 0, 0x0035, 8 },
@@ -638,7 +635,7 @@ sal_Bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTa
sal_uInt8 * pSrc,* pDst;
sal_Bool b2D;
- if ( nEOLCount >= 5 ) // RTC( Return To Controller )
+ if ( nEOLCount >= 5 ) // RTC (Return To Controller)
return sal_True;
if ( bStatus == sal_False )
@@ -672,10 +669,10 @@ sal_Bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTa
}
}
- if ( nEOLCount >= 5 ) // RTC( Return To Controller )
+ if ( nEOLCount >= 5 ) // RTC (Return To Controller)
return sal_True;
- // ggf. eine weisse vorherige Zeile herstellen fuer 2D:
+ // should the situation arise, generate a white previous line for 2D:
if ( nOptions & CCI_OPTION_2D )
{
if ( pLastLine == NULL || nLastLineSize != ( ( nTargetBits + 7 ) >> 3 ) )
@@ -692,7 +689,7 @@ sal_Bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTa
if ( nOptions & CCI_OPTION_BYTEALIGNROW )
nInputBitsBufSize &= 0xfff8;
- // Ist es eine 2D-Zeile ?:
+ // is it a 2D row?
if ( nOptions & CCI_OPTION_2D )
{
if ( nOptions & CCI_OPTION_EOL )
@@ -703,13 +700,13 @@ sal_Bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTa
else
b2D = sal_False;
- // Zeile einlesen:
+ // read scanline:
if ( b2D )
Read2DScanlineData( pTarget, (sal_uInt16)nTargetBits );
else
Read1DScanlineData( pTarget, (sal_uInt16)nTargetBits );
- // Wenn wir im 2D-Modus sind, muessen wir uns die Zeile merken:
+ // if we're in 2D mode we have to remember the line:
if ( nOptions & CCI_OPTION_2D && bStatus == sal_True )
{
pSrc = pTarget;
@@ -775,7 +772,7 @@ sal_Bool CCIDecompressor::ReadEOL( sal_uInt32 /*nMaxFillBits*/ )
// oder es gibt tatsaechlich gemeine Export-Filter, die immer ein Align machen.
// Ausserdem wurden Dateien gefunden, in denen mehr als die maximal 7 noetigen
// Fuellbits vor dem EOL-Code stehen. Daher akzeptieren wir nun grundsaetzlich
- // bis zu 32-Bloedsinn-Bits vor dem EOL-Code:
+ // bis zu 32-nonsense-Bits vor dem EOL-Code:
// und ich habe eine Datei gefunden in der bis zu ??? Bloedsinn Bits stehen, zudem ist dort die Bit Reihenfolge verdreht (SJ);
sal_uInt32 nMaxPos = pIStream->Tell();
@@ -814,7 +811,7 @@ sal_Bool CCIDecompressor::Read2DTag()
{
sal_uInt8 nByte;
- // Ein Bit einlesen und sal_True liefern, wenn es 0 ist, sonst sal_False
+ // read abit and return sal_True if it's 0, otherwise return sal_False
if (nInputBitsBufSize==0) {
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
@@ -832,7 +829,7 @@ sal_uInt8 CCIDecompressor::ReadBlackOrWhite()
{
sal_uInt8 nByte;
- // Ein Bit einlesen und 0x00 liefern, wenn es 0 ist, sonst 0xff
+ // read a bit and deliver 0x00 if it's 0, otherwise 0xff
if (nInputBitsBufSize==0) {
*pIStream >> nByte;
if ( nOptions & CCI_OPTION_INVERSEBITORDER )
@@ -849,7 +846,7 @@ sal_uInt8 CCIDecompressor::ReadBlackOrWhite()
sal_uInt16 CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
sal_uInt16 nMaxCodeBits)
{
- // Einen Huffman-Code einlesen und dekodieren:
+ // read a Huffman code and decode it:
while (nInputBitsBufSize<nMaxCodeBits)
{
sal_uInt8 nByte(0);
@@ -899,9 +896,9 @@ sal_uInt16 CCIDecompressor::CountBits(const sal_uInt8 * pData, sal_uInt16 nDataS
sal_uInt16 nPos,nLo;
sal_uInt8 nData;
- // Hier wird die Anzahl der zusammenhaengenden Bits gezaehlt, die
- // ab Position nBitPos in pTarget alle die Farbe nBlackOrWhite
- // (0xff oder 0x00) haben.
+ // here the number of bits belonging together is being counted
+ // which all have the color nBlackOrWhite (0xff oder 0x00)
+ // from the position nBitPos on
nPos=nBitPos;
for (;;) {
@@ -926,16 +923,16 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
{
sal_uInt16 nCode,nCodeBits,nDataBits,nTgtFreeByteBits;
sal_uInt8 nByte;
- sal_uInt8 nBlackOrWhite; // ist 0xff fuer Black oder 0x00 fuer White
+ sal_uInt8 nBlackOrWhite; // is 0xff for black or 0x00 for white
sal_Bool bTerminatingCode;
- // Der erste Code ist immer eine "White-Code":
+ // the first code is always a "white-code":
nBlackOrWhite=0x00;
- // Anzahl der Bits, die im Byte *pTarget noch nicht geschrieben sind:
+ // number of bits that aren't written in the byte *pTarget yet:
nTgtFreeByteBits=8;
- // Schleife ueber Codes aus dem Eingabe-Stream:
+ // loop through codes from the input stream:
do {
// die naechsten 13 Bits nach nCode holen, aber noch nicht
@@ -949,7 +946,7 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
}
nCode=(sal_uInt16)((nInputBitsBuf>>(nInputBitsBufSize-13))&0x1fff);
- // Anzahl der DatenBits und Anzahl der CodeBits ermitteln:
+ // determine the number of DataBits CodeBits:
if (nBlackOrWhite) {
nCodeBits=pBlackLookUp[nCode].nCodeBits;
nDataBits=pBlackLookUp[nCode].nValue;
@@ -958,7 +955,7 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
nCodeBits=pWhiteLookUp[nCode].nCodeBits;
nDataBits=pWhiteLookUp[nCode].nValue;
}
- // Ist es ein Ungueltiger Code ?
+ // is that an invalid code?
if ( nDataBits == 9999 )
{
return;
@@ -968,20 +965,20 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
return; // das koennen sich jetzt um FuellBits handeln
}
nEOLCount = 0;
- // Zuviele Daten ?
+ // too much data?
if (nDataBits>nTargetBits) {
// Ja, koennte ein Folge-Fehler durch ungueltigen Code sein,
// daher irdenwie weitermachen:
nDataBits=nTargetBits;
}
- // Ist es ein 'Terminating-Code' ?
+ // is that a 'Terminating-Code'?
if (nDataBits<64) bTerminatingCode=sal_True; else bTerminatingCode=sal_False;
- // Die gelesenen Bits aus dem Eingabe-Buffer entfernen:
+ // remove the read bits from the input buffer:
nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
- // Die Anzahl Daten-Bits in die Scanline schreiben:
+ // write the number of data bits into the scanline:
if (nDataBits>0) {
nTargetBits = nTargetBits - nDataBits;
if (nBlackOrWhite==0x00) *pTarget &= 0xff << nTgtFreeByteBits;
@@ -1008,7 +1005,7 @@ void CCIDecompressor::Read1DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
}
}
- // ggf. Umschaltung Black <-> White:
+ // should the situation arise, switch Black <-> White:
if (bTerminatingCode==sal_True) nBlackOrWhite=~nBlackOrWhite;
} while (nTargetBits>0 || bTerminatingCode==sal_False);
@@ -1095,7 +1092,7 @@ void CCIDecompressor::Read2DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
nBitPos = nBitPos + nRun2;
}
- else { // Es ist einer der Modi CCI2DMODE_VERT_...
+ else { // it's one of the modes CCI2DMODE_VERT_...
if (nBitPos==0 && nBlackOrWhite==0x00 && CountBits(pLastLine,nTargetBits,0,0xff)!=0) nRun=0;
else {
nRun=CountBits(pLastLine,nTargetBits,nBitPos,~nBlackOrWhite);
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index bcfc757..76b1156 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -53,60 +53,60 @@ class TIFFReader
private:
- sal_Bool bStatus; // Ob bisher kein Fehler auftrat
+ sal_Bool bStatus; // Whether until now no error occurred
Animation aAnimation;
sal_uLong nLastPercent;
- SvStream* pTIFF; // Die einzulesende TIFF-Datei
+ SvStream* pTIFF; // the TIFF file that should be read
Bitmap aBitmap;
BitmapWriteAccess* pAcc;
sal_uInt16 nDstBitsPerPixel;
AlphaMask* pAlphaMask;
BitmapWriteAccess* pMaskAcc;
- sal_uLong nOrigPos; // Anfaengliche Position in pTIFF
- sal_uInt16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pTIFF
+ sal_uLong nOrigPos; // start position in pTIFF
+ sal_uInt16 nOrigNumberFormat; // number format of pTIFF at the beginning
sal_uInt16 nDataType;
// Daten, die aus dem TIFF-Tags entnommen werden:
- sal_Bool bByteSwap; // sal_True wenn bits 0..7 -> 7..0 invertiert werden sollen ( FILLORDER = 2 );
- sal_uInt8 nByte1; // 'I', wenn Format LittleEndian
+ sal_Bool bByteSwap; // sal_True if bits 0..7 -> 7..0 should get converted ( FILLORDER = 2 );
+ sal_uInt8 nByte1; // 'I', if the format is LittleEndian
sal_uLong nNewSubFile; //
sal_uLong nSubFile; //
- sal_uLong nImageWidth; // Bildbreite in Pixel
- sal_uLong nImageLength; // Bildhoehe in Pixel
- sal_uLong nBitsPerSample; // Bits pro Pixel pro Ebene
- sal_uLong nCompression; // Art der Kompriemierung
+ sal_uLong nImageWidth; // picture width in pixels
+ sal_uLong nImageLength; // picture heigth in pixels
+ sal_uLong nBitsPerSample; // bits per pixel per layer
+ sal_uLong nCompression; // kind of compression
sal_uLong nPhotometricInterpretation; //
sal_uLong nThresholding; //
sal_uLong nCellWidth; //
sal_uLong nCellLength; //
sal_uLong nFillOrder; //
sal_uLong* pStripOffsets; // Feld von Offsets zu den Bitmap-Daten-"Strips"
- sal_uLong nNumStripOffsets; // Groesse obigen Feldes
+ sal_uLong nNumStripOffsets; // size of the field above
sal_uLong nOrientation; //
- sal_uLong nSamplesPerPixel; // Anzahl der Ebenen
- sal_uLong nRowsPerStrip; // Wenn nicht komprimiert: Zahl der Zeilen pro Strip
- sal_uLong* pStripByteCounts; // Wenn komprimiert (bestimmte Art): Groesse der Strips
- sal_uLong nNumStripByteCounts; // Anzahl der Eintraege in obiges Feld
+ sal_uLong nSamplesPerPixel; // number of layers
+ sal_uLong nRowsPerStrip; // if it's not compressed: number of rows per Strip
+ sal_uLong* pStripByteCounts; // if compressed (in a certain way): size of the strips
+ sal_uLong nNumStripByteCounts; // number of entries in the field above
sal_uLong nMinSampleValue; //
sal_uLong nMaxSampleValue; //
- double fXResolution; // X-Aufloesung oder 0.0
- double fYResolution; // Y-Aufloesung oder 0.0
+ double fXResolution; // X-resolution or 0.0
+ double fYResolution; // Y-resolution or 0.0
sal_uLong nPlanarConfiguration; //
sal_uLong nGroup3Options; //
sal_uLong nGroup4Options; //
- sal_uLong nResolutionUnit; // Einheit von fX/YResolution: 1=unbekannt, 2(default)=Zoll, 3=cm
+ sal_uLong nResolutionUnit; // unit of fX/YResolution: 1=unknown, 2(default)=inch, 3=cm
sal_uLong nPredictor; //
- sal_uLong* pColorMap; // Farb-Palette
- sal_uLong nNumColors; // Anzahl Farben in der Farbpalette
+ sal_uLong* pColorMap; // color palette
+ sal_uLong nNumColors; // number of colors within the color palette
- sal_uLong nPlanes; // Anzahl der Ebenen in der Tiff-Datei
- sal_uLong nStripsPerPlane; // Anzahl der Strips pro Ebene
+ sal_uLong nPlanes; // number of layers within the Tiff file
+ sal_uLong nStripsPerPlane; // number of Strips per layer
sal_uLong nBytesPerRow; // Bytes pro Zeile pro Ebene in der Tiff-Datei ( unkomprimiert )
- sal_uInt8* pMap[ 4 ]; // Temporaere Scanline
+ sal_uInt8* pMap[ 4 ]; // temporary Scanline
void MayCallback( sal_uLong nPercent );
@@ -128,7 +128,7 @@ private:
// Erzeugt die Bitmap aus der temporaeren Bitmap pMap
// und loescht dabei pMap teilweise
sal_Bool ConvertScanline( sal_uLong nY );
- // Konvertiert eine Scanline in das Windows-BMP-Format
+ // converts a Scanline to the Windows-BMP format
bool HasAlphaChannel() const;
public:
@@ -147,7 +147,7 @@ public:
sal_Bool ReadTIFF( SvStream & rTIFF, Graphic & rGraphic );
};
-//=================== Methoden von TIFFReader ==============================
+//=================== Methods of TIFFReader ==============================
void TIFFReader::MayCallback( sal_uLong /*nPercent*/ )
{
@@ -746,7 +746,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
{
sal_uInt8* pt = pMap[ 0 ];
- // sind die Werte als Differenz abgelegt?
+ // are the values being saved as difference?
if ( 2 == nPredictor )
{
sal_uInt8 nLRed = 0;
@@ -838,7 +838,7 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
for( nx = 0; nx < nImageWidth; nx++ )
{
- // sind die Werte als Differenz abgelegt?
+ // are the values being saved as difference?
if( 2 == nPredictor )
{
for( ns = 0; ns < 4; ns++ )
@@ -1140,10 +1140,10 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
MayCallback( 0 );
- // Kopf einlesen:
+ // read header:
ReadHeader();
- // Ersten IFD einlesen:
+ // read first IFD:
*pTIFF >> nFirstIfd;
if( !nFirstIfd || pTIFF->GetError() )
@@ -1167,7 +1167,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
*pTIFF >> nNumTags;
- // Schleife ueber Tags:
+ // loop through tags:
for( i = 0; i < nNumTags; i++ )
{
*pTIFF >> nTagType >> nDataType >> nDataLen >> nOffset;
@@ -1195,26 +1195,26 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nSubFile = 0;
nImageWidth = 0;
nImageLength = 0;
- nBitsPerSample = 1; // Defaultwert laut Doku
+ nBitsPerSample = 1; // default value according to the documentation
nCompression = 1;
nPhotometricInterpretation = 0;
- nThresholding = 1; // Defaultwert laut Doku
+ nThresholding = 1; // default value according to the documentation
nCellWidth = 1;
nCellLength = 1;
- nFillOrder = 1; // Defaultwert laut Doku
+ nFillOrder = 1; // default value according to the documentation
nNumStripOffsets = 0;
nOrientation = 1;
- nSamplesPerPixel = 1; // Defaultwert laut Doku
- nRowsPerStrip = 0xffffffff; // Defaultwert laut Doku
+ nSamplesPerPixel = 1; // default value according to the documentation
+ nRowsPerStrip = 0xffffffff; // default value according to the documentation
nNumStripByteCounts = 0;
- nMinSampleValue = 0; // Defaultwert laut Doku
+ nMinSampleValue = 0; // default value according to the documentation
nMaxSampleValue = 0;
fXResolution = 0.0;
fYResolution = 0.0;
nPlanarConfiguration = 1;
- nGroup3Options = 0; // Defaultwert laut Doku
- nGroup4Options = 0; // Defaultwert laut Doku
- nResolutionUnit = 2; // Defaultwert laut Doku
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list