Kaydet (Commit) e4f82812 authored tarafından Luc Castermans's avatar Luc Castermans Kaydeden (comit) Miklos Vajna

Translated German comments (in 20 yr old code...)

Change-Id: Ie25a734bee8e2cfe3a8fb0a6471ab9988e9c915a
Reviewed-on: https://gerrit.libreoffice.org/7528Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 14242287
...@@ -85,27 +85,23 @@ ...@@ -85,27 +85,23 @@
//////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////
// //
// Einschraenkungen: // Restrictions:
//
// - 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
//
//
// //
// - 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; 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) void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
{ {
...@@ -179,7 +175,8 @@ void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk) ...@@ -179,7 +175,8 @@ void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk)
} }
SvStream& operator>>(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; sal_uLong nPos;
nPos=rInp.Tell(); nPos=rInp.Tell();
rInp.Read((char*)&rObjk.Last,ObjkSize); rInp.Read((char*)&rObjk.Last,ObjkSize);
...@@ -188,11 +185,11 @@ SvStream& operator>>(SvStream& rInp, ObjkType& rObjk) ...@@ -188,11 +185,11 @@ SvStream& operator>>(SvStream& rInp, ObjkType& rObjk)
#endif #endif
#ifdef InArbeit #ifdef InArbeit
sal_uLong nPos1=rInp.Tell(); 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 #endif
rInp.Seek(nPos); rInp.Seek(nPos);
#ifdef InArbeit #ifdef InArbeit
if (rInp.Tell() != nPos) InfoBox( NULL, "seekg funkt nich" ).Execute(); if (rInp.Tell() != nPos) InfoBox( NULL, "seekg is not working" ).Execute();
#endif #endif
return rInp; return rInp;
} }
...@@ -447,7 +444,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr ...@@ -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)); rOut.DrawRect(Rectangle(i0,y1,x2,y2));
} break; } break;
case 0x18: case 0x38: { // Kreis case 0x18: case 0x38: { // circle
Region ClipMerk=rOut.GetClipRegion(); Region ClipMerk=rOut.GetClipRegion();
double a; double a;
...@@ -473,7 +470,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr ...@@ -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); 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.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
rOut.SetClipRegion(ClipMerk); 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 ...@@ -481,7 +478,7 @@ void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAr
void RectType::Draw(OutputDevice& rOut) 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); SetArea(F,rOut);
if (DrehWink==0) { if (DrehWink==0) {
if ((F.FBFarbe & 0x38)==0 || Radius!=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 ...@@ -580,7 +577,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
} else { } else {
b0=Int1; b0=Int1;
switch (F.FBFarbe & 0x38) { switch (F.FBFarbe & 0x38) {
case 0x08: { // vertikal case 0x08: { // vertical
Region ClipMerk=rOut.GetClipRegion(); Region ClipMerk=rOut.GetClipRegion();
i0=y1; i0=y1;
i=y1; i=y1;
...@@ -619,7 +616,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr ...@@ -619,7 +616,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr
rOut.SetClipRegion(ClipMerk); rOut.SetClipRegion(ClipMerk);
} break; } break;
case 0x18: case 0x38: { // Kreis case 0x18: case 0x38: { // circle
sal_Int16 MaxR; sal_Int16 MaxR;
if (rx<1) rx=1; if (rx<1) rx=1;
...@@ -641,7 +638,7 @@ void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAr ...@@ -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); 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.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
} break; // Kreis } break; // circle
} }
} }
} }
...@@ -651,7 +648,7 @@ void CircType::Draw(OutputDevice& rOut) ...@@ -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); 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); SetArea(F,rOut);
if ((Flags & 0x03)==CircFull) { if ((Flags & 0x03)==CircFull) {
if ((F.FBFarbe & 0x38)==0) { if ((F.FBFarbe & 0x38)==0) {
...@@ -781,7 +778,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ...@@ -781,7 +778,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
TextType aText; TextType aText;
rInp>>aText; rInp>>aText;
if (!rInp.GetError()) { 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); rInp.Read((char* )aText.Buffer,aText.BufSize);
if (!rInp.GetError()) aText.Draw(rOut); if (!rInp.GetError()) aText.Draw(rOut);
delete[] aText.Buffer; delete[] aText.Buffer;
...@@ -824,13 +821,13 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ...@@ -824,13 +821,13 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
GrupType aGrup; GrupType aGrup;
rInp>>aGrup; rInp>>aGrup;
if (!rInp.GetError()) { if (!rInp.GetError()) {
rInp.Seek(rInp.Tell()+aGrup.Last); // Obj-Anhaengsel rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix
if(aGrup.GetSubPtr()!=0L) nGrpCnt++;// DrawObjkList(rInp,rOut ); if(aGrup.GetSubPtr()!=0L) nGrpCnt++; // DrawObjkList(rInp,rOut );
} }
} break; } break;
default: { default: {
aObjk.Draw(rOut); // Objektbezeichnung auf 2. Screen aObjk.Draw(rOut); // object name on 2. Screen
ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt ObjkOverSeek(rInp,aObjk); // to next object
} }
} }
} // if rInp } // if rInp
...@@ -840,7 +837,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ...@@ -840,7 +837,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
else nGrpCnt--; else nGrpCnt--;
} }
} else { } else {
bEnde=true; // Lesefehler bEnde=true; // read error
} }
} while (!bEnde); } while (!bEnde);
} }
...@@ -859,10 +856,10 @@ void SkipObjkList(SvStream& rInp) ...@@ -859,10 +856,10 @@ void SkipObjkList(SvStream& rInp)
if(aObjk.Art==ObjGrup) { if(aObjk.Art==ObjGrup) {
GrupType aGrup; GrupType aGrup;
rInp>>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); if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp);
} else { } else {
ObjkOverSeek(rInp,aObjk); // zum naechsten Objekt ObjkOverSeek(rInp,aObjk); // to next object
} }
} while (aObjk.Next!=0L && !rInp.GetError()); } while (aObjk.Next!=0L && !rInp.GetError());
} }
...@@ -883,15 +880,15 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) ...@@ -883,15 +880,15 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
sal_uInt16 Num; sal_uInt16 Num;
pOutDev=&aOutDev; pOutDev=&aOutDev;
DtHdOverSeek(rInp); // DataHeader weglesen DtHdOverSeek(rInp); // read dataheader
nStdPos=rInp.Tell(); nStdPos=rInp.Tell();
do { // Standardseiten weglesen do { // read standard page
rInp>>aPage; rInp>>aPage;
if (aPage.nList!=0) SkipObjkList(rInp); if (aPage.nList!=0) SkipObjkList(rInp);
} while (aPage.Next!=0L && !rInp.GetError()); } while (aPage.Next!=0L && !rInp.GetError());
// ShowMsg("Zeichnungseite(n)\n"); // ShowMsg("Drawingpage(n)\n");
nZchPos=rInp.Tell(); nZchPos=rInp.Tell();
rInp>>aPage; rInp>>aPage;
...@@ -899,7 +896,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) ...@@ -899,7 +896,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
Num=aPage.StdPg; Num=aPage.StdPg;
if (Num!=0) { if (Num!=0) {
rInp.Seek(nStdPos); 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; rInp>>aPage;
if (aPage.nList!=0) SkipObjkList(rInp); if (aPage.nList!=0) SkipObjkList(rInp);
Num--; Num--;
...@@ -930,16 +927,16 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) ...@@ -930,16 +927,16 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
*************************************************************************/ *************************************************************************/
bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) 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; if (sizeof(ObjTextType)!=ObjTextTypeSize) return false;
#endif #endif
sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0. sal_uLong nFileStart; // offset of SgfHeaders. In general 0.
SgfHeader aHead; SgfHeader aHead;
SgfEntry aEntr; SgfEntry aEntr;
sal_uLong nNext; sal_uLong nNext;
bool bRdFlag=false; // Grafikentry gelesen ? bool bRdFlag=false; // graphic entry read ?
bool bRet=false; // Returncode bool bRet=false; // return value
aIniPath.Append(OUString("sgf.ini")); aIniPath.Append(OUString("sgf.ini"));
...@@ -959,7 +956,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath ) ...@@ -959,7 +956,7 @@ bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
} }
} // while(nNext) } // while(nNext)
if (bRdFlag) { if (bRdFlag) {
if (!rInp.GetError()) bRet=true; // Scheinbar Ok if (!rInp.GetError()) bRet=true; // seems ok
} }
} }
delete pSgfFonts; delete pSgfFonts;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment