vcl/source/filter/sgvmain.cxx | 97 ++++++-------- vcl/source/filter/sgvmain.hxx | 289 ++++++++++++++++++++---------------------- 2 files changed, 191 insertions(+), 195 deletions(-)
New commits: commit e4f82812bb623ec98e6580c5fadaa9a8af64ac89 Author: Luc Castermans <luc.casterm...@gmail.com> Date: Sun Jan 19 15:04:16 2014 +0100 Translated German comments (in 20 yr old code...) Change-Id: Ie25a734bee8e2cfe3a8fb0a6471ab9988e9c915a Reviewed-on: https://gerrit.libreoffice.org/7528 Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Tested-by: Miklos Vajna <vmik...@collabora.co.uk> diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index bc3cc48..c176675 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -85,27 +85,23 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// // -// Einschraenkungen: -// -// - Flaechenmuster werden den unter StarView verfuegbaren Mustern angenaehert. -// - Linienenden werden unter StarView immer rund dargestellt und gehen ueber -// den Endpunkt der Linie hinaus. -// - Linienmuster werden den unter StarView verfuegbaren Mustern angenaehert. -// Transparent/Opak wird zur Zeit noch nicht beruecksichtigt. -// - Keine gedrehten Ellipsen -// -// +// Restrictions: // +// - area patterns are matched to the available ones in Starview. +// - line ends are always rounded in StarView and continue past the end of line. +// - line patterns are matched to the available ones in Starview. +// transparency/opacity is not taken into account +// - no rotated ellipses // //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// -// Fuer Fontuebersetzung /////////////////////////////////////////////////////////////////////////// +// for font translation /////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// SgfFontLst* pSgfFonts = 0; //////////////////////////////////////////////////////////////////////////////////////////////////// -// Fuer Kreisunterarten, Text und gedrehte Rechtecke /////////////////////////////////////////////// +// for circle kinds, text and rotated rectangles /////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs) { @@ -179,7 +175,8 @@ void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk) } SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) -{ // Die Fileposition im Stream bleibt unveraendert! +{ + // fileposition in stream is not changed! sal_uLong nPos; nPos=rInp.Tell(); rInp.Read((char*)&rObjk.Last,ObjkSize); @@ -188,11 +185,11 @@ SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) #endif #ifdef InArbeit sal_uLong nPos1=rInp.Tell(); - if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute(); + if(nPos == nPos1) InfoBox( NULL, "tellg is not working" ).Execute(); #endif rInp.Seek(nPos); #ifdef InArbeit - if (rInp.Tell() != nPos) InfoBox( NULL, "seekg funkt nich" ).Execute(); + if (rInp.Tell() != nPos) InfoBox( NULL, "seekg is not working" ).Execute(); #endif return rInp; } @@ -317,23 +314,23 @@ Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts) sal_uInt8 nInt2=100-nInts; switch(nFrb1 & 0x07) { case 0: r1=0xFF; g1=0xFF; b1=0xFF; break; - case 1: r1=0xFF; g1=0xFF; break; + case 1: r1=0xFF; g1=0xFF; break; case 2: g1=0xFF; b1=0xFF; break; - case 3: g1=0xFF; break; + case 3: g1=0xFF; break; case 4: r1=0xFF; b1=0xFF; break; - case 5: r1=0xFF; break; + case 5: r1=0xFF; break; case 6: b1=0xFF; break; - case 7: break; + case 7: break; } switch(nFrb2 & 0x07) { case 0: r2=0xFF; g2=0xFF; b2=0xFF; break; - case 1: r2=0xFF; g2=0xFF; break; + case 1: r2=0xFF; g2=0xFF; break; case 2: g2=0xFF; b2=0xFF; break; - case 3: g2=0xFF; break; + case 3: g2=0xFF; break; case 4: r2=0xFF; b2=0xFF; break; - case 5: r2=0xFF; break; + case 5: r2=0xFF; break; case 6: b2=0xFF; break; - case 7: break; + case 7: break; } r1=(sal_uInt16)((sal_uInt32)r1*nInts/100+(sal_uInt32)r2*nInt2/100); g1=(sal_uInt16)((sal_uInt32)g1*nInts/100+(sal_uInt32)g2*nInt2/100); @@ -447,7 +444,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr rOut.DrawRect(Rectangle(i0,y1,x2,y2)); } break; - case 0x18: case 0x38: { // Kreis + case 0x18: case 0x38: { // circle Region ClipMerk=rOut.GetClipRegion(); double a; @@ -473,7 +470,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); rOut.SetClipRegion(ClipMerk); - } break; // Kreis + } break; // circle } } } @@ -481,7 +478,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr void RectType::Draw(OutputDevice& rOut) { - if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus + if (L.LMuster!=0) L.LMuster=1; // no line separator here, only on or off SetArea(F,rOut); if (DrehWink==0) { if ((F.FBFarbe & 0x38)==0 || Radius!=0) { @@ -580,7 +577,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr } else { b0=Int1; switch (F.FBFarbe & 0x38) { - case 0x08: { // vertikal + case 0x08: { // vertical Region ClipMerk=rOut.GetClipRegion(); i0=y1; i=y1; @@ -619,7 +616,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr rOut.SetClipRegion(ClipMerk); } break; - case 0x18: case 0x38: { // Kreis + case 0x18: case 0x38: { // circle sal_Int16 MaxR; if (rx<1) rx=1; @@ -641,7 +638,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr } SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut); rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0)); - } break; // Kreis + } break; // circle } } } @@ -651,7 +648,7 @@ void CircType::Draw(OutputDevice& rOut) { Rectangle aRect(Center.x-Radius.x,Center.y-Radius.y,Center.x+Radius.x,Center.y+Radius.y); - if (L.LMuster!=0) L.LMuster=1; // keine Linienmuster hier, nur an oder aus + if (L.LMuster!=0) L.LMuster=1; // no line pattern here, only on or off SetArea(F,rOut); if ((Flags & 0x03)==CircFull) { if ((F.FBFarbe & 0x38)==0) { @@ -781,7 +778,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) TextType aText; rInp>>aText; if (!rInp.GetError()) { - aText.Buffer=new UCHAR[aText.BufSize+1]; // Ein mehr fuer LookAhead bei CK-Trennung + aText.Buffer=new UCHAR[aText.BufSize+1]; // add one for LookAhead at CK-separation rInp.Read((char* )aText.Buffer,aText.BufSize); if (!rInp.GetError()) aText.Draw(rOut); delete[] aText.Buffer; @@ -824,13 +821,13 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) GrupType aGrup; rInp>>aGrup; if (!rInp.GetError()) { - rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel - if(aGrup.GetSubPtr()!=0L) nGrpCnt++;// DrawObjkList(rInp,rOut ); + rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix + if(aGrup.GetSubPtr()!=0L) nGrpCnt++; // DrawObjkList(rInp,rOut ); } } break; default: { - aObjk.Draw(rOut); // Objektbezeichnung auf 2. Screen - ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt + aObjk.Draw(rOut); // object name on 2. Screen + ObjkOverSeek(rInp,aObjk); // to next object } } } // if rInp @@ -840,7 +837,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) else nGrpCnt--; } } else { - bEnde=true; // Lesefehler + bEnde=true; // read error } } while (!bEnde); } @@ -859,10 +856,10 @@ void SkipObjkList(SvStream& rInp) if(aObjk.Art==ObjGrup) { GrupType aGrup; rInp>>aGrup; - rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel + rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp); } else { - ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt + ObjkOverSeek(rInp,aObjk); // to next object } } while (aObjk.Next!=0L && !rInp.GetError()); } @@ -883,15 +880,15 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) sal_uInt16 Num; pOutDev=&aOutDev; - DtHdOverSeek(rInp); // DataHeader weglesen + DtHdOverSeek(rInp); // read dataheader nStdPos=rInp.Tell(); - do { // Standardseiten weglesen + do { // read standard page rInp>>aPage; if (aPage.nList!=0) SkipObjkList(rInp); } while (aPage.Next!=0L && !rInp.GetError()); -// ShowMsg("Zeichnungseite(n)\n"); +// ShowMsg("Drawingpage(n)\n"); nZchPos=rInp.Tell(); rInp>>aPage; @@ -899,7 +896,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) Num=aPage.StdPg; if (Num!=0) { rInp.Seek(nStdPos); - while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // Standardseite suchen + while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // search standard page rInp>>aPage; if (aPage.nList!=0) SkipObjkList(rInp); Num--; @@ -930,16 +927,16 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) *************************************************************************/ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) { -#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment! +#if OSL_DEBUG_LEVEL > 1 // check record size. New compiler possibly aligns different! if (sizeof(ObjTextType)!=ObjTextTypeSize) return false; #endif - sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. - SgfHeader aHead; - SgfEntry aEntr; - sal_uLong nNext; - bool bRdFlag=false; // Grafikentry gelesen ? - bool bRet=false; // Returncode + sal_uLong nFileStart; // offset of SgfHeaders. In general 0. + SgfHeader aHead; + SgfEntry aEntr; + sal_uLong nNext; + bool bRdFlag=false; // graphic entry read ? + bool bRet=false; // return value aIniPath.Append(OUString("sgf.ini")); @@ -959,7 +956,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) } } // while(nNext) if (bRdFlag) { - if (!rInp.GetError()) bRet=true; // Scheinbar Ok + if (!rInp.GetError()) bRet=true; // seems ok } } delete pSgfFonts; diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index 04791e9..8dbc595 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -42,30 +42,30 @@ public: }; struct Seitenformat { - PointType Size; // 0.00mm...819.175mm (Papiergr"u"ue) - sal_Int16 RandL; // links Rand auf - sal_Int16 RandR; // rechts dem Papier - sal_Int16 RandO; // oben Rand auf - sal_Int16 RandU; // unten dem Papier - sal_uInt8 PColor; // Future Use - sal_uInt8 PIntens; // erst recht Future use + PointType Size; // 0.00mm...819.175mm (papersize) + sal_Int16 RandL; // left border on + sal_Int16 RandR; // right paper + sal_Int16 RandO; // upper border on + sal_Int16 RandU; // lower paper + sal_uInt8 PColor; // future use + sal_uInt8 PIntens; // future use }; #define PageSize 146 class PageType { public: - sal_uInt32 Next; // N"uchste Seite - sal_uInt32 nList; // Objektdaten, erster Record - sal_uInt32 ListEnd; // Objektdaten, letzter Record - Seitenformat Paper; // Papierdaten - sal_Bool BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT) - sal_uInt8 StdPg; // welche Standardseite einblenden ? - PointType U; // Nullpunkt - sal_Int16 HlpLnH[20]; // Hilfslinien + sal_uInt32 Next; // next page + sal_uInt32 nList; // objectdata, first record + sal_uInt32 ListEnd; // objectdata, last record + Seitenformat Paper; // data of paper + sal_Bool BorderClip; // clip objects at border (cheat due to alignment in NT) + sal_uInt8 StdPg; // insert which standardpage ? + PointType U; // origin + sal_Int16 HlpLnH[20]; // guides sal_Int16 HlpLnV[20]; - sal_uInt8 LnAnzH; - sal_uInt8 LnAnzV; - UCHAR PgName[32]; // Seitenname + sal_uInt8 LnAnzH; + sal_uInt8 LnAnzV; + UCHAR PgName[32]; // page name friend SvStream& operator>>(SvStream& rIStream, PageType& rPage); }; @@ -73,70 +73,70 @@ enum ObjArtType {ObjStrk,ObjRect,ObjPoly,ObjCirc,ObjSpln, ObjText,ObjGrup,ObjBmap,ObjVirt,ObjTxtX,ObjMaxi}; struct ObjLineType { - sal_uInt8 LFarbe; // [Index] - sal_uInt8 LBFarbe; // [Index] - sal_uInt8 LIntens; // [%] - sal_uInt8 LMuster; // [Index] inkl. Transparenz - sal_Int16 LMSize; // [Koeffizient/100] - sal_Int16 LDicke; // Strichst"urke + sal_uInt8 LFarbe; // [Index] + sal_uInt8 LBFarbe; // [Index] + sal_uInt8 LIntens; // [%] + sal_uInt8 LMuster; // [Index] including transparency + sal_Int16 LMSize; // [coefficient/100] + sal_Int16 LDicke; // line thickness }; struct ObjAreaType { - sal_uInt8 FFarbe; // [Index] - sal_uInt8 FBFarbe; // [Index] - sal_uInt8 FIntens; // [%] + sal_uInt8 FFarbe; // [Index] + sal_uInt8 FBFarbe; // [Index] + sal_uInt8 FIntens; // [%] // Despite the "Dummy" in the name, and not being used anywhere in // the code, these two fields are *essential*. These structs are // 1:1 mappings of actual on-disk/wire file format structures... // So don't clean the "unused dummy" fields away. (Actually it // might well be that many other fields around here are never used // in our code either.) - sal_uInt8 FDummy1; // - sal_Int16 FDummy2; // - sal_uInt16 FMuster; // [Index] inkl. Invers, Transparenz + sal_uInt8 FDummy1; // + sal_Int16 FDummy2; // + sal_uInt16 FMuster; // [Index] incl. Invers, transparency }; #define ObjTextTypeSize 64 class ObjTextType { public: - ObjLineType L; // Text-Outline (future) - ObjAreaType F; // Text innen - sal_uInt16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType. - sal_uInt16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schlu"u sein - sal_uInt16 Breite; // 1..65535% bitte nicht mehr als 500% - sal_uInt8 Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo) - sal_uInt8 Kapit; // 1..255% - sal_uInt16 Schnitt; // 8 Flags - sal_uInt16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile - sal_uInt16 Slant; // Kursivwinkel 0.00..89.99"u default 15.00"u doppelt Breit angesehen) - sal_uInt8 ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als - signed char ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63"u) - ObjLineType ShdL; // Schatten-Outline (neu 2.0) - ObjAreaType ShdF; // Schatten-innen (neu 2.0) - PointType ShdVers; // Schattenversatz Max.300.00% - sal_Bool ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad - sal_Bool NoSpc; // True-> kein Zwischenraum (f"ur BackArea) - ObjAreaType BackF; // Hintergrundfl"uche + ObjLineType L; // text outline (future) + ObjAreaType F; // inner text + sal_uInt16 FontLo,FontHi; // e.g. 92500 (CG Times), split due to DWordAllign in TextType. + sal_uInt16 Grad; // 0.5..32767.5 pt - we should stop at 1000 pt + sal_uInt16 Breite; // 1..65535% please not more as 500% + sal_uInt8 Justify; // 2 bit vertical (Hi), 3 bit horizontal (Lo) + sal_uInt8 Kapit; // 1..255% + sal_uInt16 Schnitt; // 8 flags + sal_uInt16 LnFeed; // 1..32767% of max font size of the line + sal_uInt16 Slant; // slant angle 0.00..89.99deg default 15.00deg viewed double width) + sal_uInt8 ZAbst; // character spacing 0..255% (0=on the line; 100=normal; 200=Zeichen wird als + signed char ChrVPos; // vertical position of char. Default 0=on baseline, 10=5Pt below (-64..63") + ObjLineType ShdL; // shadow outline (new 2.0) + ObjAreaType ShdF; // shadow inside (new 2.0) + PointType ShdVers; // shadow offset max. 300.00% + sal_Bool ShdAbs; // True-> shadow offset is absolute instead of relative to font size + sal_Bool NoSpc; // True-> no space (for background area) + ObjAreaType BackF; // background area sal_uInt32 GetFont(); void SetFont(sal_uInt32 FontID); }; -class Obj0Type { // SuperClass f"ur Apple-VMT +class Obj0Type { // SuperClass for Apple-VMT public: virtual void Draw(OutputDevice& rOut); virtual ~Obj0Type() {} }; -#define ObjkSize 20 /* eigentlich 21. Wg. Allignment ist Flags jedoch verschoben worden*/ -class ObjkType: public Obj0Type { // Grundkomponenten aller Stardraw-Objekte +#define ObjkSize 20 /* should be 21. due to allignment we shifted the flag */ +class ObjkType: public Obj0Type { // basic componenents of all Stardraw objects public: sal_uInt32 Last; sal_uInt32 Next; - sal_uInt16 MemSize; // in Bytes - PointType ObjMin; // XY-Minimum des Objekts - PointType ObjMax; // XY-Maximum des Objekts - sal_uInt8 Art; - sal_uInt8 Layer; + sal_uInt16 MemSize; // in bytes + PointType ObjMin; // XY minimum of the object + PointType ObjMax; // XY maximum of the object + sal_uInt8 Art; + sal_uInt8 Layer; friend SvStream& operator>>(SvStream& rIStream, ObjkType& rObjk); friend sal_Bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); virtual void Draw(OutputDevice& rOut); @@ -145,11 +145,11 @@ public: #define StrkSize 38 class StrkType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 LEnden; // Linienenden - ObjLineType L; - PointType Pos1; // Anfangspunkt - PointType Pos2; // Endpunkt + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 LEnden; // line ends + ObjLineType L; + PointType Pos1; // start point + PointType Pos2; // end point friend SvStream& operator>>(SvStream& rIStream, StrkType& rStrk); virtual void Draw(OutputDevice& rOut); }; @@ -157,13 +157,13 @@ public: #define RectSize 52 class RectType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 Reserve; - ObjLineType L; - ObjAreaType F; - PointType Pos1; // LO-Ecke = Bezugspunkt - PointType Pos2; // R-Ecke - sal_Int16 Radius; // Eckenradius + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 Reserve; + ObjLineType L; + ObjAreaType F; + PointType Pos1; // lower left corner = reference point + PointType Pos2; // right corner + sal_Int16 Radius; // radius of corner sal_uInt16 DrehWink; // 315...<45 sal_uInt16 Slant; // >270...<90 friend SvStream& operator>>(SvStream& rIStream, RectType& rRect); @@ -171,81 +171,81 @@ public: }; #define PolySize 44 -class PolyType: public ObjkType { // identisch mit Spline ! +class PolyType: public ObjkType { // identical to spline ! public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 LEnden; // nur f"ur Polyline - ObjLineType L; - ObjAreaType F; // nicht f"ur Polyline + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 LEnden; // only for polyline + ObjLineType L; + ObjAreaType F; // not for polyline sal_uInt8 nPoints; sal_uInt8 Reserve; - sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw) - PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!)) + sal_uInt32 SD_EckP; // pointer to corner point (StarDraw) + PointType* EckP; // pointer to corner points (StarView (is not read from disk!)) friend SvStream& operator>>(SvStream& rIStream, PolyType& rPoly); virtual void Draw(OutputDevice& rOut); }; -#define PolyClosBit 0x01 // Unterarten von Poly: 0: PolyLine 1: Polygon +#define PolyClosBit 0x01 // kinds of Poly: 0: polyLine 1: polygon #define SplnSize 44 -class SplnType: public ObjkType { // identisch mit Poly ! +class SplnType: public ObjkType { // identical to Poly ! public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 LEnden; // nur f"ur nSpline + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 LEnden; // only for nSpline ObjLineType L; - ObjAreaType F; // nicht f"ur nSpline + ObjAreaType F; // not for nSpline sal_uInt8 nPoints; sal_uInt8 Reserve; - sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw) - PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!)) + sal_uInt32 SD_EckP; // pointer to corner points (StarDraw) + PointType* EckP; // pointer to corner points (StarView (is not read from disk!)) friend SvStream& operator>>(SvStream& rIStream, SplnType& rSpln); virtual void Draw(OutputDevice& rOut); }; -// Unterarten von Spline: siehe Poly +// kinds of Spline: see Poly #define CircSize 52 class CircType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 LEnden; // nur Bogen (Kr & El) - ObjLineType L; - ObjAreaType F; // nicht f"ur Bogen (Kr & El) - PointType Center; // Mittelpunkt - PointType Radius; // Radius - sal_uInt16 DrehWink; // nur Ellipse - sal_uInt16 StartWink; // "u nicht f"ur Vollkreis - sal_uInt16 RelWink; // "u und Vollellipse + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 LEnden; // only arcs (circle & ellips) + ObjLineType L; + ObjAreaType F; // not for arcs (circly & ellips) + PointType Center; // center + PointType Radius; // radius + sal_uInt16 DrehWink; // only ellipses + sal_uInt16 StartWink; // and not for full circles + sal_uInt16 RelWink; // and full ellipses friend SvStream& operator>>(SvStream& rIStream, CircType& rCirc); virtual void Draw(OutputDevice& rOut); }; -#define CircFull 0x00 /* Unterarten von Kreis: 0: Kreis */ -#define CircSect 0x01 /* 1: Kreissektor */ -#define CircAbsn 0x02 /* 2: Kreisabschnitt */ -#define CircArc 0x03 /* 3: Kreisbogen */ +#define CircFull 0x00 /* kinds of circle: 0: full circle */ +#define CircSect 0x01 /* 1: circle sector */ +#define CircAbsn 0x02 /* 2: circle segment */ +#define CircArc 0x03 /* 3: circle arc */ #define TextSize 116 class TextType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 Reserve; // f"ur Word Allign - ObjTextType T; // 64 Bytes << DWord-Allign bei FontID erforderlich - PointType Pos1; // Bezugspunkt (ObenLinks) - PointType Pos2; // (untenRechts) - sal_Int16 TopOfs; // Von Oberkante bis Textbegin (future f"ur vJustify) - sal_uInt16 DrehWink; // 0...<360 - sal_uInt16 BoxSlant; // >270...<90 (nur Box) - sal_uInt16 BufSize; // Gr"u"ue von Buf f"ur Load, Save, Copy und so - sal_uInt16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich - sal_uInt16 ExtLo,ExtHi;// (Ptr) Text "uber mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich - PointType FitSize; // Ursprungsgr"u"ue f"ur Fit2Size - sal_Int16 FitBreit; // Breite zum formatieren bei Fit2Size - UCHAR* Buffer; // Diese Variable wird nicht durch Lesen von Disk gef"ullt, sondern explizit! + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 Reserve; // for Word Allign + ObjTextType T; // 64 bytes << DWord-Allign needed for FontID + PointType Pos1; // reference point (upper left) + PointType Pos2; // (lower right) + sal_Int16 TopOfs; // from upper side to start of text (future for vJustify) + sal_uInt16 DrehWink; // 0...<360 + sal_uInt16 BoxSlant; // >270...<90 (only Box) + sal_uInt16 BufSize; // size of buffer for Load, Save, Copy etc. + sal_uInt16 BufLo,BufHi; // (UCHAR*) pointer to Textbuffer << ShortArr, otherwise DWord-Allign needed + sal_uInt16 ExtLo,ExtHi; // (Ptr) text over more frames << ShortArr, otherwise DWord-Allign needed + PointType FitSize; // size of origin for Fit2Size + sal_Int16 FitBreit; // width to format for Fit2Size + UCHAR* Buffer; // this variable is not set by reading from disk, but explicit! friend SvStream& operator>>(SvStream& rIStream, TextType& rText); virtual void Draw(OutputDevice& rOut); }; -#define TextOutlBit 0x01 /* 1=Sourcecode f"ur Outliner (wird von DrawObjekt() ignoriert) */ -#define TextFitSBit 0x02 /* Bit1: 1=Text-FitToSize, auch Outliner (2.0) */ -#define TextFitZBit 0x08 /* Bit3: 1=Fit2Size Zeilenweise (2.0) */ -#define TextDrftBit 0x04 /* Bit2: 1=DraftDraw (2.0) */ +#define TextOutlBit 0x01 /* 1=Sourcecode for outliner (ignored byDrawObjekt()) */ +#define TextFitSBit 0x02 /* Bit1: 1=Text-Fit2Size, also outliner (2.0) */ +#define TextDrftBit 0x04 /* Bit2: 1=DraftDraw (2.0) */ +#define TextFitZBit 0x08 /* Bit3: 1=Fit2Size line by line (2.0) */ #define TextFitBits (TextFitSBit | TextFitZBit) enum GrafStat {NoGraf,Pic,Pcx,Hpgl,Img,Msp,Tiff,Dxf,Lot,Usr,Sgf}; @@ -253,23 +253,22 @@ enum GrafStat {NoGraf,Pic,Pcx,Hpgl,Img,Msp,Tiff,Dxf,Lot,Usr,Sgf}; #define BmapSize 132 class BmapType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - sal_uInt8 Reserve; - ObjAreaType F; // Farbe und Muster der 1-Plane Bitmap + sal_uInt8 Flags; // (cheat due to alignment in NT) + sal_uInt8 Reserve; + ObjAreaType F; // colour and pattern of first plane bitmap PointType Pos1; PointType Pos2; - sal_uInt16 DrehWink; // 315...<45 (Future) - sal_uInt16 Slant; // >270...<90 (Future) - UCHAR Filename[80]; // Pfad - PointType PixSize; // Gr"u"ue in Pixel (0 bei Vektor) - GrafStat Format; // siehe GpmDef.Pas - sal_uInt8 nPlanes; // Anzahl der Bitplanes (0 bei Vektor) - sal_Bool RawOut; // als Raw ausgeben ? - sal_Bool InvOut; // invertiert ausgeben ? - sal_Bool LightOut; // aufhellen? (SD20) - sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(f"ur Fix in DrawBmp) - - INetURLObject aFltPath; // F"ur GraphicFilter + sal_uInt16 DrehWink; // 315...<45 (future) + sal_uInt16 Slant; // >270...<90 (future) + UCHAR Filename[80]; // path + PointType PixSize; // size in Pixel (0 for vector) + GrafStat Format; // see: GpmDef.Pas + sal_uInt8 nPlanes; // number of bitplanes (0 for vector) + sal_Bool RawOut; // output as raw ? + sal_Bool InvOut; // output inverted ? + sal_Bool LightOut; // brighten? (SD20) + sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef (to fix DrawBmp) + INetURLObject aFltPath; // for GraphicFilter friend SvStream& operator>>(SvStream& rIStream, BmapType& rBmap); virtual void Draw(OutputDevice& rOut); void SetPaths( const INetURLObject rFltPath ); @@ -278,13 +277,13 @@ public: #define GrupSize 48 class GrupType: public ObjkType { public: - sal_uInt8 Flags; // (Schummel f"ur Allignment unter NT) - UCHAR Name[13]; // Name der Gruppe - sal_uInt16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich - sal_uInt16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich - sal_uInt16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur - sal_uInt32 ChartPtr; // Diagrammstruktur - sal_uInt32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist. + sal_uInt8 Flags; // (cheat due to alignment in NT) + UCHAR Name[13]; // name of group + sal_uInt16 SbLo,SbHi; // (Ptr) group list << ShortArr, as otherwise DWord alignment needed + sal_uInt16 UpLo,UpHi; // (Ptr) parent list << ShortArr, as otherwise DWord alignment needed + sal_uInt16 ChartSize; // required amount of memory for structure of diagram structure + sal_uInt32 ChartPtr; // diagram structure + sal_uInt32 GetSubPtr(); // only to check if Sublist is empty friend SvStream& operator>>(SvStream& rIStream, GrupType& rGrup); }; @@ -298,7 +297,7 @@ sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div); class SgfFontOne { public: - SgfFontOne* Next; // Zeiger f"ur Listenverkettung + SgfFontOne* Next; // pointer to list sal_uInt32 IFID; sal_Bool Bold; sal_Bool Ital; @@ -307,19 +306,19 @@ public: sal_Bool Fixd; FontFamily SVFamil; rtl_TextEncoding SVChSet; - OUString SVFName; // z.B. "Times New Roman" = 15 Chars - sal_uInt16 SVWidth; // Durchschnittliche Zeichenbreite in % - SgfFontOne(); + OUString SVFName; // e.g. "Times New Roman" = 15 chars + sal_uInt16 SVWidth; // average character width in % + SgfFontOne(); void ReadOne(const OString& rID, OString& rDsc); }; class SgfFontLst { public: - OUString FNam; // vollst"undiger Filename des Inifiles - SgfFontOne* pList; // Listenanfang - SgfFontOne* Last; // Listenende - sal_uInt32 LastID; // f"ur schnelleren Zugriff bei Wiederholungen - SgfFontOne* LastLn; // f"ur schnelleren Zugriff bei Wiederholungen + OUString FNam; // complete filename of the Ini-file + SgfFontOne* pList; // start of list + SgfFontOne* Last; // end of list + sal_uInt32 LastID; // for faster access during repeats + SgfFontOne* LastLn; // for faster access during repeats bool Tried; SgfFontLst(); ~SgfFontLst(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits