Translated German comments
Change-Id: Ia21618d8475f02cb0fe9c55ae70d2598435087c5 Reviewed-on: https://gerrit.libreoffice.org/7951 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
committed by
Caolán McNamara
parent
6551fe2d93
commit
82d05f63fe
@@ -24,16 +24,14 @@
|
|||||||
|*
|
|*
|
||||||
|* CalcSpline()
|
|* CalcSpline()
|
||||||
|*
|
|*
|
||||||
|* Beschreibung Berechnet die Koeffizienten eines parametrischen
|
|* Description Calculates the coefficients of parametrised
|
||||||
|* nat<EFBFBD>rlichen oder periodischen kubischen
|
|* natural or periodic cubic polynom-splines.
|
||||||
|* Polynomsplines. Die Eckpunkte des <20>bergebenen
|
|* The corner points of the polygon passed are used
|
||||||
|* Polygons werden als St<53>tzstellen angenommen.
|
|* as support points. n returns the number of partial polynoms.
|
||||||
|* n liefert die Anzahl der Teilpolynome.
|
|* This function returns TRUE if no error occured.
|
||||||
|* Ist die Berechnung fehlerfrei verlaufen, so
|
|* Only in this case memory for the coefficient array
|
||||||
|* liefert die Funktion true. Nur in diesem Fall
|
|* has been allocated, which can be freed by the caller
|
||||||
|* ist Speicher f<>r die Koeffizientenarrays
|
|* using a delete.
|
||||||
|* allokiert, der dann sp<73>ter vom Aufrufer mittels
|
|
||||||
|* delete freizugeben ist.
|
|
||||||
|*
|
|*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
@@ -43,17 +41,17 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
|
|||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
|*
|
|*
|
||||||
|* Poly2Spline()
|
|* Spline2Poly()
|
||||||
|*
|
|*
|
||||||
|* Beschreibung Konvertiert einen parametrichen kubischen
|
|* Description converts a parametrised cubic spline (natural
|
||||||
|* Polynomspline Spline (nat<61>rlich oder periodisch)
|
|* or periodic) to an approximate polygon.
|
||||||
|* in ein angen<65>hertes Polygon.
|
|* The function returns false, if an error occured
|
||||||
|* Die Funktion liefert false, wenn ein Fehler bei
|
|* during the calculation of the coefficients or
|
||||||
|* der Koeffizientenberechnung aufgetreten ist oder
|
|* the polygon became too large (>PolyMax=16380).
|
||||||
|* das Polygon zu gro?wird (>PolyMax=16380). Im 1.
|
|* In the first case the polygon has 0, in the
|
||||||
|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
|
|* second case PolyMax points.
|
||||||
|* Um Koordinaten<65>berl<72>ufe zu vermeiden werden diese
|
|* To prevent coordinate overflows we limit
|
||||||
|* auf +/-32000 begrenzt.
|
|* them to +/-32000.
|
||||||
|*
|
|*
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly);
|
bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly);
|
||||||
|
@@ -38,7 +38,7 @@ extern SgfFontLst* pSgfFonts;
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Einschraenkungen: Schatten nur grau, 2D und mit fixem Abstand.
|
// Limitations: only grey shadows, 2D and with fixed distance.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -50,66 +50,66 @@ extern SgfFontLst* pSgfFonts;
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
// AbsBase.Pas
|
// AbsBase.Pas
|
||||||
|
|
||||||
// vvv Sonderzeichen im TextBuffer vvv
|
// vvv special characters in text buffer vvv
|
||||||
#define TextEnd 0 /* ^@ Ende der Zeichenkette */
|
#define TextEnd 0 /* ^@ end of character sequence */
|
||||||
#define HardSpace 6 /* ^F Hartspace (wird nicht umbrochen) ,' ' */
|
#define HardSpace 6 /* ^F non-breaking space,' ' */
|
||||||
#define SoftTrennK 11 /* ^K Zeichen fuer k-c-Austausch bei Trennung, 'k' */
|
#define SoftTrennK 11 /* ^K character for k-c-switch for separation, 'k' */
|
||||||
#define AbsatzEnd 13 /* ^M Neuer Absatz =CR */
|
#define AbsatzEnd 13 /* ^M new paragraph=CR */
|
||||||
#define HardTrenn 16 /* ^P Hartes Trennzeichen (wird nicht umbrochen), '-' */
|
#define HardTrenn 16 /* ^P hard separator (not wrapped), '-' */
|
||||||
#define SoftTrennAdd 19 /* ^S Zusatz-Zeichen Trennung von z.b."Schiff-fahrt" */
|
#define SoftTrennAdd 19 /* ^S extra-character, separates e.g. "schiff-fahrt" */
|
||||||
#define Escape 27 /* ^[ Escapesequenz einleiten */
|
#define Escape 27 /* ^[ start of escape sequence */
|
||||||
#define SoftTrenn 31 /* ^_ Weiches Trennzeichen, '-' nur Zeilenende */
|
#define SoftTrenn 31 /* ^_ soft separator, '-' only end of line */
|
||||||
#define MaxEscValLen 8
|
#define MaxEscValLen 8
|
||||||
#define MaxEscLen (MaxEscValLen+3)
|
#define MaxEscLen (MaxEscValLen+3)
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
// Escapesequenzen: [Esc]<Ident><Value>[Esc] also mind. 4 Char
|
// Escape sequences: [Esc]<Ident><Value>[Esc] at least 4 characters
|
||||||
// Max. Laenge von Value soll sein: 8 Char (7+Vorzeichen). Demnach max. Laenge
|
// Max length of value should be: 8 chars (7+sign). Therefore max. length
|
||||||
// einer Escapesequenz: 11 Char.
|
// of a escape sequence: 11 chars.
|
||||||
// Identifer:
|
// Identifer:
|
||||||
|
|
||||||
#define EscFont 'F' /* FontID, z.B. 92500 fuer CG Times */
|
#define EscFont 'F' /* fontID, e.g. 92500 for CG Times */
|
||||||
#define EscGrad 'G' /* Schriftgrad 1..255 fuer <<Pt-127<<Pt */
|
#define EscGrad 'G' /* font angle 1..255 for <<Pt-127<<Pt */
|
||||||
#define EscBreit 'B' /* Breite 1..255% des Schriftgrades */
|
#define EscBreit 'B' /* width 1..255% of the font angle */
|
||||||
#define EscKaptS 'K' /* Kapitaelchengroesse 1..255% des Schriftgrades */
|
#define EscKaptS 'K' /* uppercase size 1..255% of the text angle */
|
||||||
#define EscLFeed 'L' /* Zeilenabstand 1..32767% vom max. Schriftgrad der Zeile */
|
#define EscLFeed 'L' /* character spacing 1..32767% of max. text angle of the line*/
|
||||||
// oder 1..32767 fuer 1..16383<<Pt absolut (Wenn Bit 15=1)
|
// or 1..32767 for 1..16383<<Pt absolute (if bit 15=1)
|
||||||
#define EscSlant 'S' /* Kursiv(Winkel) 1..8999 fuer 0.01deg..89.99deg */
|
#define EscSlant 'S' /* italic (angle) 1..8999 for 0.01deg..89.99deg */
|
||||||
#define EscVPos 'V' /* Zeichen Vertikal-Position 1..255 fuer <<Pt..127<<Pt */
|
#define EscVPos 'V' /* character vercial position 1..255 for <<Pt..127<<Pt */
|
||||||
#define EscZAbst 'Z' /* Zeichenabstand -128..127% */
|
#define EscZAbst 'Z' /* character spacing -128..127% */
|
||||||
#define EscHJust 'A' /* H-Justify Absatz: Links, Zentr, Rechts, Block, Austreibend, Gesperrt (0..5)*/
|
#define EscHJust 'A' /* H-justify paragraph: left, cent, right, block, aligned, fixed (0..5)*/
|
||||||
|
|
||||||
#define EscFarbe 'C' /* Farbe 0..7 */
|
#define EscFarbe 'C' /* colour 0..7 */
|
||||||
#define EscBFarb 'U' /* BackFarbe 0..7 */
|
#define EscBFarb 'U' /* background colour 0..7 */
|
||||||
#define EscInts 'I' /* Farbintensitaet 0..100% */
|
#define EscInts 'I' /* colour intensity 0..100% */
|
||||||
#define EscMustr 'M' /* Muster 0..? inkl. Transp... */
|
#define EscMustr 'M' /* pattern 0..? incl. transp... */
|
||||||
#define EscMFarb 'O' /* Musterfarbe 0..7 */
|
#define EscMFarb 'O' /* pattern colour 0..7 */
|
||||||
#define EscMBFrb 'P' /* 2. Musterfarbe 0..7 */
|
#define EscMBFrb 'P' /* 2nd pattern colour 0..7 */
|
||||||
#define EscMInts 'W' /* Musterintensitaet 0..7 */
|
#define EscMInts 'W' /* pattern intensity 0..7 */
|
||||||
|
|
||||||
#define EscSMstr 'E' /* Schattenmuster 0..? inkl. Transp... */
|
#define EscSMstr 'E' /* shadow pattern 0..? inkl. Transp... */
|
||||||
#define EscSFarb 'R' /* Schattenfarbe 0..7 */
|
#define EscSFarb 'R' /* shadow colour 0..7 */
|
||||||
#define EscSBFrb 'T' /* 2. Schattenfarbe 0..7 */
|
#define EscSBFrb 'T' /* 2nd shadow colour 0..7 */
|
||||||
#define EscSInts 'Q' /* Schattenintensitaet 0..7 */
|
#define EscSInts 'Q' /* shadow intensity 0..7 */
|
||||||
|
|
||||||
#define EscSXDst 'X' /* Schattenversatz X 0..100% */
|
#define EscSXDst 'X' /* shadow offset X 0..100% */
|
||||||
#define EscSYDst 'Y' /* Schattenversatz Y 0..100% */
|
#define EscSYDst 'Y' /* shadow offset Y 0..100% */
|
||||||
#define EscSDist 'D' /* Schattenversatz X-Y 0..100% */
|
#define EscSDist 'D' /* shadow offset X-Y 0..100% */
|
||||||
|
|
||||||
#define EscBold 'f' /* Fett */
|
#define EscBold 'f' /* bold */
|
||||||
#define EscLSlnt 'l' /* LKursiv */
|
#define EscLSlnt 'l' /* L italic */
|
||||||
#define EscRSlnt 'r' /* RKursiv */
|
#define EscRSlnt 'r' /* R italic */
|
||||||
#define EscUndln 'u' /* Unterstrichen */
|
#define EscUndln 'u' /* underlined */
|
||||||
#define EscDbUnd 'p' /* doppelt Unterstrichen */
|
#define EscDbUnd 'p' /* double underlined */
|
||||||
#define EscKaptF 'k' /* Kapitaelchenflag */
|
#define EscKaptF 'k' /* uppercase flag */
|
||||||
#define EscStrik 'd' /* Durchgestrichen */
|
#define EscStrik 'd' /* strikethrough */
|
||||||
#define EscDbStk 'e' /* doppelt Durchgestrichen */
|
#define EscDbStk 'e' /* double strikethrough */
|
||||||
#define EscSupSc 'h' /* Hochgestellt */
|
#define EscSupSc 'h' /* superscript */
|
||||||
#define EscSubSc 't' /* Tiefgestellt */
|
#define EscSubSc 't' /* subscript */
|
||||||
#define Esc2DShd 's' /* 2D-Schatten */
|
#define Esc2DShd 's' /* 2D-shadow */
|
||||||
#define Esc3DShd 'j' /* 3D-Schatten */
|
#define Esc3DShd 'j' /* 3D-shadow */
|
||||||
#define Esc4DShd 'i' /* 4D-Schatten */
|
#define Esc4DShd 'i' /* 4D-shadow */
|
||||||
#define EscEbShd 'b' /* Embossed */
|
#define EscEbShd 'b' /* embossed */
|
||||||
|
|
||||||
// AllEscIdent =[EscFont, EscGrad, EscBreit,EscKaptS,EscLFeed,EscSlant,EscVPos, EscZAbst,EscHJust,
|
// AllEscIdent =[EscFont, EscGrad, EscBreit,EscKaptS,EscLFeed,EscSlant,EscVPos, EscZAbst,EscHJust,
|
||||||
// EscFarbe,EscBFarb,EscInts, EscMustr,EscMFarb,EscMBFrb,EscMInts,
|
// EscFarbe,EscBFarb,EscInts, EscMustr,EscMFarb,EscMBFrb,EscMInts,
|
||||||
@@ -117,19 +117,19 @@ extern SgfFontLst* pSgfFonts;
|
|||||||
// EscBold, EscLSlnt,EscRSlnt,EscUndln,EscDbUnd,EscKaptF,EscStrik,EscDbStk,
|
// EscBold, EscLSlnt,EscRSlnt,EscUndln,EscDbUnd,EscKaptF,EscStrik,EscDbStk,
|
||||||
// EscSupSc,EscSubSc,Esc2DShd,Esc3DShd,Esc4DShd];
|
// EscSupSc,EscSubSc,Esc2DShd,Esc3DShd,Esc4DShd];
|
||||||
// Justify muss spaetestens am Anfang des Absatzes stehen
|
// Justify muss spaetestens am Anfang des Absatzes stehen
|
||||||
#define EscSet '\x1e' /* Flag setzen */
|
#define EscSet '\x1e' /* set flag */
|
||||||
#define EscReset '\x1f' /* Flag loeschen */
|
#define EscReset '\x1f' /* reset flag */
|
||||||
#define EscDeflt '\x11' /* Flag auf default setzen */
|
#define EscDeflt '\x11' /* set flag to default */
|
||||||
#define EscToggl '\x1d' /* Flag Toggeln */
|
#define EscToggl '\x1d' /* toggle flag */
|
||||||
#define EscNoFlg 0
|
#define EscNoFlg 0
|
||||||
#define EscNoVal -2147483647 /* -MaxLongInt */
|
#define EscNoVal -2147483647 /* -MaxLongInt */
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#define NoTrenn 0xFFFF /* Wert fuer Parameter 'Rest' von GetTextChar(), wenn auf keinen Fall getrennt werden soll */
|
#define NoTrenn 0xFFFF /* parameter value for 'Rest' of GetTextChar(), if separation should not occur */
|
||||||
#define DoTrenn 0xFFFE /* Wert fuer Parameter 'Rest' von GetTextChar(), wenn getrennt werden soll */
|
#define DoTrenn 0xFFFE /* parameter value for 'Rest' of GetTextChar(), if separtion should occur */
|
||||||
|
|
||||||
#define MaxLineChars 1024
|
#define MaxLineChars 1024
|
||||||
|
|
||||||
#define ChrXPosArrSize (MaxLineChars+1+1) /* 2k - Beginnt mit 0 im gegensatz zu StarDraw */
|
#define ChrXPosArrSize (MaxLineChars+1+1) /* 2k - start with 0 opposite to StarDraw */
|
||||||
#define CharLineSize (MaxLineChars+1+1)
|
#define CharLineSize (MaxLineChars+1+1)
|
||||||
|
|
||||||
#define MinChar 32
|
#define MinChar 32
|
||||||
@@ -138,9 +138,9 @@ extern SgfFontLst* pSgfFonts;
|
|||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#define CharTopToBase 100 /* wegen Apostrophe und Umlaute mehr als 75% */
|
#define CharTopToBase 100 /* due to quotes more as 75% */
|
||||||
#define CharTopToBtm 120 /* Zeilenhoehe ist groesser als Schriftgrad */
|
#define CharTopToBtm 120 /* line height larger as text angle */
|
||||||
// bei Avanti-Bold 'ue' eigentlich sogar 130%
|
// for Avanti-Bold 'ue' actually even 130%
|
||||||
|
|
||||||
// end of AbsBase.Pas
|
// end of AbsBase.Pas
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -154,29 +154,29 @@ extern SgfFontLst* pSgfFonts;
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
// DefBase.Pas
|
// DefBase.Pas
|
||||||
|
|
||||||
#define TextBoldBit 0x0001 /* Fett */
|
#define TextBoldBit 0x0001 /* bold */
|
||||||
#define TextRSlnBit 0x0002 /* Kursiv */
|
#define TextRSlnBit 0x0002 /* italic */
|
||||||
#define TextUndlBit 0x0004 /* Unterstrichen */
|
#define TextUndlBit 0x0004 /* underline */
|
||||||
#define TextStrkBit 0x0008 /* Durchgesteichen */
|
#define TextStrkBit 0x0008 /* strikethrough */
|
||||||
#define TextSupSBit 0x0010 /* Hocgestellt */
|
#define TextSupSBit 0x0010 /* superscript */
|
||||||
#define TextSubSBit 0x0020 /* Tiefgestellt */
|
#define TextSubSBit 0x0020 /* subscript */
|
||||||
#define TextKaptBit 0x0040 /* Kapitaelchen */
|
#define TextKaptBit 0x0040 /* capital */
|
||||||
#define TextLSlnBit 0x0080 /* Linkskursiv */
|
#define TextLSlnBit 0x0080 /* left italic */
|
||||||
#define TextDbUnBit 0x0100 /* Doppelt unterstrichen */
|
#define TextDbUnBit 0x0100 /* double underline */
|
||||||
#define TextDbStBit 0x0200 /* Doppelt durchgestrichen */
|
#define TextDbStBit 0x0200 /* double strikethrough */
|
||||||
#define TextSh2DBit 0x0400 /* 2D-Schatten 2.0 */
|
#define TextSh2DBit 0x0400 /* 2D-shadow 2.0 */
|
||||||
#define TextSh3DBit 0x0800 /* 3D-Schatten 2.0 */
|
#define TextSh3DBit 0x0800 /* 3D-shadow 2.0 */
|
||||||
#define TextSh4DBit 0x1000 /* 4D-Schatten 2.0 */
|
#define TextSh4DBit 0x1000 /* 4D-shadow 2.0 */
|
||||||
#define TextShEbBit 0x2000 /* Embossed-Schatten 2.0 */
|
#define TextShEbBit 0x2000 /* embossed-shadow 2.0 */
|
||||||
|
|
||||||
#define THJustLeft 0x00
|
#define THJustLeft 0x00
|
||||||
#define THJustCenter 0x01
|
#define THJustCenter 0x01
|
||||||
#define THJustRight 0x02
|
#define THJustRight 0x02
|
||||||
#define THJustBlock 0x03
|
#define THJustBlock 0x03
|
||||||
#define THJustDrvOut 0x04 /* Austreibend Formatiert */
|
#define THJustDrvOut 0x04 /* Justified formated */
|
||||||
#define THJustLocked 0x05 /* A l s S p e r r s c h r i f t */
|
#define THJustLocked 0x05 /* J u s t l o c k e d */
|
||||||
|
|
||||||
#define MaxCharSlant 4200 /* Maximal 42deg kursiv ! */
|
#define MaxCharSlant 4200 /* maximum 42deg italic ! */
|
||||||
|
|
||||||
// end of DefBase.Pas
|
// end of DefBase.Pas
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -210,8 +210,8 @@ short hPoint2Sgf(short a)
|
|||||||
// ======================================================================
|
// ======================================================================
|
||||||
// Function GetTopToBaseLine() Function GetBaseLineToBtm()
|
// Function GetTopToBaseLine() Function GetBaseLineToBtm()
|
||||||
//
|
//
|
||||||
// Abstand von Zeilenoberkante bis BaseLine bzw. von BaseLine bis
|
// Calculate distance from ascender of line to baseline or from baseline to
|
||||||
// Unterkante berechnen. Alles in SGF-Units.
|
// descender. All in SGF-units.
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
|
sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
|
||||||
@@ -224,20 +224,19 @@ sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
|
|||||||
// ======================================================================
|
// ======================================================================
|
||||||
// Function GetTextChar() Function GetTextCharConv()
|
// Function GetTextChar() Function GetTextCharConv()
|
||||||
//
|
//
|
||||||
// Liest ein Zeichen aus dem Textbuffer, wertet dabei eventuell
|
// Reads a character from textbuffer, in doing so escape sequences
|
||||||
// auftretende Escapesequenzen aus und setzt dementsprechend den
|
// are evaluated and accordingly the input/output parameter AktAtr is set.
|
||||||
// Ein-/Ausgabeparameter AktAtr. Index wird entsprechend erhoeht.
|
// Index is incremented accordingly.
|
||||||
// Der Parameter Rest muss immer die Anzahl der Zeichen beinhalten,
|
// Parameter Rest should always contain the number of characters,
|
||||||
// den angeforderten Zeichen in der aktuellen Zeile noch folgen.
|
// the number of remaining characters in that line.
|
||||||
// Ansonsten funktioniert die Silbentrennung nicht richtig. Gibt man
|
// Otherwise the hyphenation does not work. If the constand NoTrenn
|
||||||
// stattdessen die Konstante NoTrenn an, wird in keinem Fall
|
// is used instaed, no hyphenation is done. To the contrary then
|
||||||
// getrennt, die Konstante DoTrenn bewirkt dagegen, dass ueberall dort
|
// constant DoTrenn triggers hyphenation where a soft-break is present.
|
||||||
// getrennt wird, wo ein SoftTrenner vorkommt.
|
|
||||||
//
|
//
|
||||||
// SoftTrenner werden immer in ein Minuszeichen konvertiert.
|
// Soft separators are converted to a minus sign.
|
||||||
// GetTextCharConv() konvertiert zusaetzlich HardSpace und AbsatzEnde
|
// On top GetTextCharConv() converts HardSpace and AbsatzEnde
|
||||||
// in Spaces sowie HardTrenner in Minuszeichen. TextEnde wird immer
|
// in spaces, including HardTrenner in minus signs. TextEnde is
|
||||||
// als Char(0) geliefert.
|
// always returned as Char(0).
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
|
|
||||||
|
|
||||||
@@ -262,9 +261,9 @@ long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal)
|
|||||||
long r=0;
|
long r=0;
|
||||||
|
|
||||||
if (FlgVal==EscDeflt) {
|
if (FlgVal==EscDeflt) {
|
||||||
r=Def; // zurueck auf Default
|
r=Def; // return to default
|
||||||
} else {
|
} else {
|
||||||
if (NumVal!=EscNoVal) r=NumVal; // Hart setzen
|
if (NumVal!=EscNoVal) r=NumVal; // set non-breaking
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Min!=0 || Max!=0) {
|
if (Min!=0 || Max!=0) {
|
||||||
@@ -328,10 +327,10 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
|
|||||||
Ende=(c!=Escape);
|
Ende=(c!=Escape);
|
||||||
if (!Ende) {
|
if (!Ende) {
|
||||||
c=TBuf[Index]; Index++;
|
c=TBuf[Index]; Index++;
|
||||||
Ident=c; // Identifer merken
|
Ident=c; // remember identifier
|
||||||
FlgVal=EscNoFlg;
|
FlgVal=EscNoFlg;
|
||||||
NumVal=EscNoVal;
|
NumVal=EscNoVal;
|
||||||
c=TBuf[Index]; Index++; // Hier faengt der Wert an
|
c=TBuf[Index]; Index++; // value starts here
|
||||||
if (c==EscSet || c==EscReset || c==EscDeflt || c==EscToggl) FlgVal=c; else {
|
if (c==EscSet || c==EscReset || c==EscDeflt || c==EscToggl) FlgVal=c; else {
|
||||||
if (c=='-') Sgn=-1; else Sgn=1;
|
if (c=='-') Sgn=-1; else Sgn=1;
|
||||||
if (c=='+' || c=='-') { c=TBuf[Index]; Index++; }
|
if (c=='+' || c=='-') { c=TBuf[Index]; Index++; }
|
||||||
@@ -389,7 +388,7 @@ UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
|
|||||||
case Esc4DShd: ChgSchnittBit(TextSh4DBit,TextSh2DBit,TextSh3DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
|
case Esc4DShd: ChgSchnittBit(TextSh4DBit,TextSh2DBit,TextSh3DBit,TextShEbBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
|
||||||
case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
|
case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
|
||||||
} //endcase
|
} //endcase
|
||||||
if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen }
|
if (TBuf[Index]==Escape) Index++; // read 2nd escape }
|
||||||
}
|
}
|
||||||
} while (!Ende && !ScanEsc);
|
} while (!Ende && !ScanEsc);
|
||||||
if (!Ende) c=Escape;
|
if (!Ende) c=Escape;
|
||||||
@@ -409,9 +408,9 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
|
|||||||
if (Rest==0 || Rest==DoTrenn ||
|
if (Rest==0 || Rest==DoTrenn ||
|
||||||
nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-';
|
nc==' ' || nc==AbsatzEnd || nc==TextEnd) c='-';
|
||||||
else {
|
else {
|
||||||
c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // den Trenner ueberspringen
|
c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // skip separator
|
||||||
if (c0==SoftTrennAdd) {
|
if (c0==SoftTrennAdd) {
|
||||||
if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // und hier noch 'nen Buchstaben ueberspringen
|
if (c>=32) c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc); // skip another letter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -423,13 +422,12 @@ UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
// HardSpace und HardTrenn muessen explizit konvertiert werden ! }
|
// HardSpace and HardTrenn should be converted explicitely ! }
|
||||||
// if AktAtr.Schnitt and TextKaptBit =TextKaptBit then c:=UpCase(c);(explizit) }
|
// if AktAtr.Schnitt and TextKaptBit =TextKaptBit then c:=UpCase(c);(explizit) }
|
||||||
|
|
||||||
// Bei der Trennmethode SoftTrennAdd wird davon ausgegangen, dass der zu }
|
// The separationmethod SoftTrennAdd assumes, the separating consonant }
|
||||||
// trennende Konsonant bereits 3x mal im TextBuf vorhanden ist, z.b.: }
|
// is 3x present in TextBuf, e.g.: "schiff-fahrt". }
|
||||||
// "Schiff-fahrt". Wenn nicht getrennt, dann wird "-f" entfernt. }
|
// If not separated then, "-f" is removed. }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
|
UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
|
||||||
@@ -453,7 +451,7 @@ UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
|
|||||||
// ======================================================================
|
// ======================================================================
|
||||||
// Function GetLineFeed()
|
// Function GetLineFeed()
|
||||||
//
|
//
|
||||||
// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt.
|
// Required line spacing in SGF-Units. ChrVPos is taken into account.
|
||||||
// ======================================================================
|
// ======================================================================
|
||||||
sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr,
|
sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr,
|
||||||
sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad)
|
sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad)
|
||||||
@@ -488,7 +486,7 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT
|
|||||||
if (!AbsEnd && c!=' ') r=i;
|
if (!AbsEnd && c!=' ') r=i;
|
||||||
}
|
}
|
||||||
MaxGrad=hPoint2Sgf(MaxGrad);
|
MaxGrad=hPoint2Sgf(MaxGrad);
|
||||||
if (MaxLF100<=4000) { // sonst Overflowgefahr
|
if (MaxLF100<=4000) { // otherwise overflow could occur
|
||||||
LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100);
|
LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100);
|
||||||
} else {
|
} else {
|
||||||
LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100));
|
LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100));
|
||||||
@@ -509,19 +507,19 @@ sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextT
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
// iFont.Pas
|
// iFont.Pas
|
||||||
|
|
||||||
#define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */
|
#define SuperSubFact 60 /* superscript/subscript: 60% of text angle */
|
||||||
#define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */
|
#define DefaultSpace 40 /* Default: space is 40% of text angle */
|
||||||
|
|
||||||
sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_uInt16 Dreh,
|
sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_uInt16 Dreh,
|
||||||
sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
|
sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
|
||||||
{
|
{
|
||||||
SgfFontOne* pSgfFont; // Font aus dem IniFile
|
SgfFontOne* pSgfFont; // Font from the IniFile
|
||||||
Font aFont;
|
Font aFont;
|
||||||
Color aColor;
|
Color aColor;
|
||||||
sal_uLong Grad;
|
sal_uLong Grad;
|
||||||
sal_uLong Brei;
|
sal_uLong Brei;
|
||||||
OUString FNam;
|
OUString FNam;
|
||||||
sal_uInt16 StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad
|
sal_uInt16 StdBrei=50; // average line width in in % of text angle
|
||||||
bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
|
bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
|
||||||
|
|
||||||
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
|
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
|
||||||
@@ -536,33 +534,33 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u
|
|||||||
aFont.SetName(FNam);
|
aFont.SetName(FNam);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Falls nich im Inifile, sind hier einige Fonts hart kodiert
|
{ // if not in Inifile, some fonts are hard coded here
|
||||||
aFont.SetPitch(PITCH_VARIABLE);
|
aFont.SetPitch(PITCH_VARIABLE);
|
||||||
switch (Atr.GetFont()) {
|
switch (Atr.GetFont()) {
|
||||||
case 92500: case 92501: case 92504: case 92505:
|
case 92500: case 92501: case 92504: case 92505:
|
||||||
{
|
{
|
||||||
#if defined(WNT)
|
#if defined(WNT)
|
||||||
FNam = "Times New Roman"; // CG Times ist unter Windows Times New Roman
|
FNam = "Times New Roman"; // CG Times is Times New Roman in Windows
|
||||||
#else
|
#else
|
||||||
FNam = "Times"; // ansonsten ist das einfach Times
|
FNam = "Times"; // otherwise just Times
|
||||||
#endif
|
#endif
|
||||||
StdBrei=40;
|
StdBrei=40;
|
||||||
aFont.SetFamily(FAMILY_ROMAN);
|
aFont.SetFamily(FAMILY_ROMAN);
|
||||||
} break;
|
} break;
|
||||||
case 94021: case 94022: case 94023: case 94024: {
|
case 94021: case 94022: case 94023: case 94024: {
|
||||||
#if defined(WNT)
|
#if defined(WNT)
|
||||||
FNam = "Arial"; // Univers ist unter Windows Arial
|
FNam = "Arial"; // Univers is Arial in Windows
|
||||||
#else
|
#else
|
||||||
FNam = "Helvetica"; // und ansonsten Helvetica
|
FNam = "Helvetica"; // otherwise Helvetica
|
||||||
#endif
|
#endif
|
||||||
aFont.SetFamily(FAMILY_SWISS);
|
aFont.SetFamily(FAMILY_SWISS);
|
||||||
StdBrei=47;
|
StdBrei=47;
|
||||||
} break;
|
} break;
|
||||||
case 93950: case 93951: case 93952: case 93953: {
|
case 93950: case 93951: case 93952: case 93953: {
|
||||||
#if defined(WNT)
|
#if defined(WNT)
|
||||||
FNam = "Courier New"; // Der Vector-Courierfont unter Windows heisst Courier New
|
FNam = "Courier New"; // The vector-Courierfont is called Courier New in Windows
|
||||||
#else
|
#else
|
||||||
FNam = "Courier"; // ansonsten ist und bleibt Courier immer Courier
|
FNam = "Courier"; // otherwise Courier remains Courier
|
||||||
#endif
|
#endif
|
||||||
aFont.SetFamily(FAMILY_ROMAN);
|
aFont.SetFamily(FAMILY_ROMAN);
|
||||||
aFont.SetPitch(PITCH_FIXED);
|
aFont.SetPitch(PITCH_FIXED);
|
||||||
@@ -689,16 +687,16 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
|
|||||||
sal_uInt16& nChars, sal_uInt16 Rest,
|
sal_uInt16& nChars, sal_uInt16 Rest,
|
||||||
short* Line, UCHAR* cLine)
|
short* Line, UCHAR* cLine)
|
||||||
{
|
{
|
||||||
sal_uInt16 KernDist=0; // Wert fuer Kerning
|
sal_uInt16 KernDist=0; // value for kerning
|
||||||
sal_uInt16 ChrWidth;
|
sal_uInt16 ChrWidth;
|
||||||
UCHAR c;
|
UCHAR c;
|
||||||
bool AbsEnd;
|
bool AbsEnd;
|
||||||
|
|
||||||
c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
|
c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,false); // tries to separate, if Rest contains appropriate value
|
||||||
|
|
||||||
AbsEnd=(c==AbsatzEnd || c==TextEnd);
|
AbsEnd=(c==AbsatzEnd || c==TextEnd);
|
||||||
if (!AbsEnd) {
|
if (!AbsEnd) {
|
||||||
R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ...
|
R.OutCh=ConvertTextChar(c); // from HardTrenn to '-', ...
|
||||||
R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh);
|
R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh);
|
||||||
if (R.Kapt) R.OutCh=Upcase(R.OutCh);
|
if (R.Kapt) R.OutCh=Upcase(R.OutCh);
|
||||||
SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1);
|
SetTextContext(rOut,R.Attrib,R.Kapt,0,1,1,1,1);
|
||||||
@@ -706,7 +704,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
|
|||||||
UCHAR c1 = (R.Kapt)?Upcase(c):c;
|
UCHAR c1 = (R.Kapt)?Upcase(c):c;
|
||||||
ChrWidth=GetCharWidth(rOut,c1);
|
ChrWidth=GetCharWidth(rOut,c1);
|
||||||
|
|
||||||
if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ?
|
if (R.Attrib.ZAbst!=100) { // special line distance ?
|
||||||
sal_uLong Temp;
|
sal_uLong Temp;
|
||||||
Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100;
|
Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100;
|
||||||
ChrWidth=sal_uInt16(Temp);
|
ChrWidth=sal_uInt16(Temp);
|
||||||
@@ -715,7 +713,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
|
|||||||
if (R.ChrXP>32000) R.ChrXP=32000;
|
if (R.ChrXP>32000) R.ChrXP=32000;
|
||||||
Line[nChars]=R.ChrXP-KernDist;
|
Line[nChars]=R.ChrXP-KernDist;
|
||||||
cLine[nChars]=c;
|
cLine[nChars]=c;
|
||||||
R.ChrXP+=ChrWidth-KernDist; // Position fuer den naechsten Character
|
R.ChrXP+=ChrWidth-KernDist; // position of next character
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@@ -729,11 +727,11 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
VirtualDevice vOut;
|
VirtualDevice vOut;
|
||||||
UCHAR c,c0;
|
UCHAR c,c0;
|
||||||
UCHAR ct;
|
UCHAR ct;
|
||||||
bool First; // erster Char ?
|
bool First; // first char ?
|
||||||
sal_uInt8 Just = 0; // Absatzformatierung
|
sal_uInt8 Just = 0; // paragraph format
|
||||||
bool Border; // Rand der Box erreicht ?
|
bool Border; // border of box reached ?
|
||||||
bool Border0;
|
bool Border0;
|
||||||
bool AbsEnd; // Ende des Absatzes erreicht ?
|
bool AbsEnd; // end of paragraph reached ?
|
||||||
ProcChrSta* R=new ProcChrSta;
|
ProcChrSta* R=new ProcChrSta;
|
||||||
ProcChrSta* R0=new ProcChrSta;
|
ProcChrSta* R0=new ProcChrSta;
|
||||||
ProcChrSta* WErec=new ProcChrSta;
|
ProcChrSta* WErec=new ProcChrSta;
|
||||||
@@ -743,11 +741,11 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
ProcChrSta* TRrec=new ProcChrSta;
|
ProcChrSta* TRrec=new ProcChrSta;
|
||||||
sal_uInt16 TRnChar;
|
sal_uInt16 TRnChar;
|
||||||
|
|
||||||
sal_uInt16 WordEndCnt; // Justieren und Trennen
|
sal_uInt16 WordEndCnt; // justify and separate
|
||||||
bool WordEnd;
|
bool WordEnd;
|
||||||
bool Trenn;
|
bool Trenn;
|
||||||
|
|
||||||
short BoxRest; // zum Quetschen und formatieren
|
short BoxRest; // to crush and format
|
||||||
sal_uInt16 i,j,k,h;
|
sal_uInt16 i,j,k,h;
|
||||||
sal_uInt16 re,li;
|
sal_uInt16 re,li;
|
||||||
|
|
||||||
@@ -760,14 +758,14 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
Border=false; First=true;
|
Border=false; First=true;
|
||||||
WordEndCnt=0;
|
WordEndCnt=0;
|
||||||
|
|
||||||
do { // mal schauen, wieviele Worte so in die Zeile passen
|
do { // check how many words to on that line
|
||||||
if (Border) c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,DoTrenn,Line,cLine);
|
if (Border) c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,DoTrenn,Line,cLine);
|
||||||
else c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
|
else c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
|
||||||
AbsEnd=(c==AbsatzEnd || c==TextEnd);
|
AbsEnd=(c==AbsatzEnd || c==TextEnd);
|
||||||
//if not AbsEnd then
|
//if not AbsEnd then
|
||||||
{
|
{
|
||||||
if (First) {
|
if (First) {
|
||||||
Just=R->Attrib.Justify & 0x0F; // Absatzformat steht wenn, dann am Anfang
|
Just=R->Attrib.Justify & 0x0F; // paragraph format remains, then at start
|
||||||
}
|
}
|
||||||
Border=R->ChrXP>UmbWdt;
|
Border=R->ChrXP>UmbWdt;
|
||||||
WordEnd=(AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0);
|
WordEnd=(AbsEnd || (c==' ')) && (c0!=' ') && (c0!=0);
|
||||||
@@ -789,13 +787,13 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
AbsEnd=AbsEnd || (nChars>=MaxLineChars);
|
AbsEnd=AbsEnd || (nChars>=MaxLineChars);
|
||||||
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
|
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
|
||||||
|
|
||||||
if (Border) { // Trennen und Quetschen
|
if (Border) { // separate and crush
|
||||||
(*WErec0)=(*WErec); WEnChar0=WEnChar;
|
(*WErec0)=(*WErec); WEnChar0=WEnChar;
|
||||||
AbsEnd=false; c0=0;
|
AbsEnd=false; c0=0;
|
||||||
(*R)=(*WErec); nChars=WEnChar;
|
(*R)=(*WErec); nChars=WEnChar;
|
||||||
(*TRrec)=(*R); TRnChar=nChars;
|
(*TRrec)=(*R); TRnChar=nChars;
|
||||||
Border0=false; Border=false;
|
Border0=false; Border=false;
|
||||||
do { // erst mal gucken wieviele Silben noch reinpassen
|
do { // first check how many syllables fit
|
||||||
ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine);
|
ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine);
|
||||||
c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
|
c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
|
||||||
AbsEnd=(ct==AbsatzEnd) || (ct==TextEnd) || (nChars>=MaxLineChars);
|
AbsEnd=(ct==AbsatzEnd) || (ct==TextEnd) || (nChars>=MaxLineChars);
|
||||||
@@ -807,20 +805,20 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
WordEndCnt++;
|
WordEndCnt++;
|
||||||
(*WErec)=(*R0);
|
(*WErec)=(*R0);
|
||||||
if (AbsEnd) WEnChar=nChars; else WEnChar=nChars-1;
|
if (AbsEnd) WEnChar=nChars; else WEnChar=nChars-1;
|
||||||
(*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen
|
(*TRrec)=(*R); TRnChar=nChars; // to continue searching
|
||||||
}
|
}
|
||||||
if (Trenn && (!Border || (WordEndCnt==0))) {
|
if (Trenn && (!Border || (WordEndCnt==0))) {
|
||||||
WordEndCnt++; // merken, dass man hier trennen kann
|
WordEndCnt++; // remember we can separate here
|
||||||
(*WErec)=(*TRrec);
|
(*WErec)=(*TRrec);
|
||||||
WEnChar=TRnChar;
|
WEnChar=TRnChar;
|
||||||
(*TRrec)=(*R); TRnChar=nChars; // zum weitersuchen
|
(*TRrec)=(*R); TRnChar=nChars; // continue searching
|
||||||
}
|
}
|
||||||
(*R0)=(*R); c0=c;
|
(*R0)=(*R); c0=c;
|
||||||
Border0=Border;
|
Border0=Border;
|
||||||
Border=R->ChrXP>UmbWdt;
|
Border=R->ChrXP>UmbWdt;
|
||||||
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
|
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
|
||||||
|
|
||||||
while (WErec0->Index<WErec->Index) { // damit Line[] auch garantiert stimmt }
|
while (WErec0->Index<WErec->Index) { // to assure Line[] matches }
|
||||||
c=ProcessChar(vOut,TBuf,*WErec0,Atr0,WEnChar0,WEnChar-WEnChar0-1,Line,cLine);
|
c=ProcessChar(vOut,TBuf,*WErec0,Atr0,WEnChar0,WEnChar-WEnChar0-1,Line,cLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,9 +826,9 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
|
|
||||||
if (UmbWdt>=R->ChrXP) {
|
if (UmbWdt>=R->ChrXP) {
|
||||||
BoxRest=UmbWdt-R->ChrXP;
|
BoxRest=UmbWdt-R->ChrXP;
|
||||||
} else { // Zusammenquetschen
|
} else { // crush together
|
||||||
BoxRest=R->ChrXP-UmbWdt; // um soviel muss gequetscht werden
|
BoxRest=R->ChrXP-UmbWdt; // so much should be crushed
|
||||||
for (i=2;i<=nChars;i++) { // 1. CharPosition bleibt !
|
for (i=2;i<=nChars;i++) { // first character position remains!
|
||||||
Line[i]-=(i-1)*(BoxRest) /(nChars-1);
|
Line[i]-=(i-1)*(BoxRest) /(nChars-1);
|
||||||
}
|
}
|
||||||
R->ChrXP=UmbWdt;
|
R->ChrXP=UmbWdt;
|
||||||
@@ -839,7 +837,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!AbsEnd) {
|
if (!AbsEnd) {
|
||||||
do { // Leerzeichen weglesen
|
do { // read empty characters
|
||||||
(*WErec)=(*R);
|
(*WErec)=(*R);
|
||||||
c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false);
|
c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false);
|
||||||
nChars++;
|
nChars++;
|
||||||
@@ -852,12 +850,12 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AbsEnd && nChars<MaxLineChars) { // Ausrichten, statt Blocksatz aber linksbuendig
|
if (AbsEnd && nChars<MaxLineChars) { // align, left aligned instead of block
|
||||||
if (Just==3) Just=0;
|
if (Just==3) Just=0;
|
||||||
nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird
|
nChars++; Line[nChars]=R->ChrXP; // to assure AbsatzEnde is read
|
||||||
Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein
|
Line[nChars+1]=R->ChrXP; // as the width of CR or #0 is very small
|
||||||
if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) {
|
if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) {
|
||||||
c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); // Kleine Korrektur. Notig, wenn nur 1 Wort in
|
c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,false); // small correction needed, if 1st word read
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -865,16 +863,16 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
if (TextFit) Just=THJustLeft;
|
if (TextFit) Just=THJustLeft;
|
||||||
|
|
||||||
switch (Just) {
|
switch (Just) {
|
||||||
case THJustLeft: break; // Links
|
case THJustLeft: break; // left
|
||||||
case THJustCenter: {
|
case THJustCenter: {
|
||||||
BoxRest=BoxRest /2; // Mitte
|
BoxRest=BoxRest /2; // middel
|
||||||
for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
|
for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
|
||||||
} break;
|
} break;
|
||||||
case THJustRight: { // Rechts
|
case THJustRight: { // right
|
||||||
for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
|
for (i=1;i<=nChars;i++) Line[i]=Line[i]+BoxRest;
|
||||||
} break;
|
} break;
|
||||||
case THJustDrvOut:
|
case THJustDrvOut:
|
||||||
case THJustBlock: { // Block und Austreibend
|
case THJustBlock: { // block and justified
|
||||||
re=nChars;
|
re=nChars;
|
||||||
if (Just==THJustDrvOut) re--;
|
if (Just==THJustDrvOut) re--;
|
||||||
while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
|
while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
|
||||||
@@ -882,40 +880,40 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType&
|
|||||||
while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
|
while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
|
||||||
if (Just==THJustDrvOut) BoxRest=AdjWdt-Line[re+1];
|
if (Just==THJustDrvOut) BoxRest=AdjWdt-Line[re+1];
|
||||||
|
|
||||||
j=0; // Anzahl der Spaces ermitteln
|
j=0; // get number of spaces
|
||||||
for (i=li;i<=re;i++) {
|
for (i=li;i<=re;i++) {
|
||||||
if (cLine[i]==' ') {
|
if (cLine[i]==' ') {
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j==0) { // nur 1 Wort ? -> Strecken !
|
if (j==0) { // only one word ? -> strech !
|
||||||
for (i=li+1;i<=re;i++) { // von links nach rechts
|
for (i=li+1;i<=re;i++) { // from left to right
|
||||||
Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
|
Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
k=0; h=0;
|
k=0; h=0;
|
||||||
for (i=li;i<=re;i++) { // j Spaces aufbohren !
|
for (i=li;i<=re;i++) { // j drill spaces !
|
||||||
if (cLine[i]==' ') { // Space gefunden !
|
if (cLine[i]==' ') { // space found !
|
||||||
k++;
|
k++;
|
||||||
h=MulDiv(k,BoxRest,j);
|
h=MulDiv(k,BoxRest,j);
|
||||||
}
|
}
|
||||||
Line[i]=Line[i]+h;
|
Line[i]=Line[i]+h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen
|
for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // adapt the rest
|
||||||
Line[nChars+1]=AdjWdt;
|
Line[nChars+1]=AdjWdt;
|
||||||
} break;
|
} break;
|
||||||
case THJustLocked: { //Gesperrt
|
case THJustLocked: { // locked out
|
||||||
re=nChars-1;
|
re=nChars-1;
|
||||||
while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
|
while (re>=1 && (cLine[re]==' ' || cLine[re]==TextEnd || cLine[re]==AbsatzEnd)) re--;
|
||||||
li=1;
|
li=1;
|
||||||
while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
|
while (li<=re && (cLine[li]==' ' || cLine[li]==TextEnd || cLine[li]==AbsatzEnd)) li++;
|
||||||
BoxRest=AdjWdt-Line[re+1];
|
BoxRest=AdjWdt-Line[re+1];
|
||||||
for (i=li+1;i<=re;i++) { // Strecken von links nach rechts
|
for (i=li+1;i<=re;i++) { // strech from left to right
|
||||||
Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
|
Line[i]=Line[i]+MulDiv(i-li,BoxRest,re-li+1-1);
|
||||||
}
|
}
|
||||||
for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // und den Rest anpassen
|
for (i=re+1;i<=nChars;i++) Line[i]=Line[i]+BoxRest; // adapt the rest
|
||||||
Line[nChars+1]=AdjWdt;
|
Line[nChars+1]=AdjWdt;
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
@@ -958,13 +956,13 @@ void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, sal_uIn
|
|||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
void TextType::Draw(OutputDevice& rOut)
|
void TextType::Draw(OutputDevice& rOut)
|
||||||
{
|
{
|
||||||
if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !!
|
if ((Flags & TextOutlBit)!=0) return; // source text for Outliner !!
|
||||||
|
|
||||||
ObjTextType T1,T2;
|
ObjTextType T1,T2;
|
||||||
sal_uInt16 Index1;
|
sal_uInt16 Index1;
|
||||||
sal_uInt16 Index2;
|
sal_uInt16 Index2;
|
||||||
UCHAR c = TextEnd;
|
UCHAR c = TextEnd;
|
||||||
sal_uInt16 l; // Anzahl der Zeichen in der Zeile
|
sal_uInt16 l; // number of characters on the line
|
||||||
sal_uInt16 i;
|
sal_uInt16 i;
|
||||||
short yPos0;
|
short yPos0;
|
||||||
short xPos;
|
short xPos;
|
||||||
@@ -980,20 +978,20 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
sal_uInt16 lc;
|
sal_uInt16 lc;
|
||||||
bool TextFit;
|
bool TextFit;
|
||||||
short* xLine;
|
short* xLine;
|
||||||
UCHAR* cLine; // Buffer fuer FormatLine
|
UCHAR* cLine; // Buffer for FormatLine
|
||||||
sal_uInt16 FitXMul;
|
sal_uInt16 FitXMul;
|
||||||
sal_uInt16 FitXDiv;
|
sal_uInt16 FitXDiv;
|
||||||
sal_uInt16 FitYMul;
|
sal_uInt16 FitYMul;
|
||||||
sal_uInt16 FitYDiv;
|
sal_uInt16 FitYDiv;
|
||||||
bool Fehler;
|
bool Fehler;
|
||||||
UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben
|
UCHAR* Buf=Buffer; // pointer to the letters
|
||||||
|
|
||||||
pSgfFonts->ReadList();
|
pSgfFonts->ReadList();
|
||||||
xLine=new short[ChrXPosArrSize];
|
xLine=new short[ChrXPosArrSize];
|
||||||
cLine=new UCHAR[CharLineSize];
|
cLine=new UCHAR[CharLineSize];
|
||||||
|
|
||||||
TextFit=(Flags & TextFitBits)!=0;
|
TextFit=(Flags & TextFitBits)!=0;
|
||||||
bool LineFit=((Flags & TextFitZBit)!=0); // FitSize.x=0? oder Flags -> jede Zeile stretchen
|
bool LineFit=((Flags & TextFitZBit)!=0); // FitSize.x=0? or flags -> strech each line
|
||||||
if (TextFit && FitSize.x==0) LineFit=true;
|
if (TextFit && FitSize.x==0) LineFit=true;
|
||||||
|
|
||||||
if (DrehWink==0) {
|
if (DrehWink==0) {
|
||||||
@@ -1007,8 +1005,8 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
T1=T; Index1=0; yPos=0; xPos=0;
|
T1=T; Index1=0; yPos=0; xPos=0;
|
||||||
if (TextFit) {
|
if (TextFit) {
|
||||||
ySize=Pos2.y-Pos1.y;
|
ySize=Pos2.y-Pos1.y;
|
||||||
xSize=32000 /2; // Umbruch
|
xSize=32000 /2; // break
|
||||||
xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz
|
xSAdj=Pos2.x-Pos1.x; // to align for center/block
|
||||||
//if (xSize<=0) { xSize=32000 /2; LineFit=true; }
|
//if (xSize<=0) { xSize=32000 /2; LineFit=true; }
|
||||||
FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
|
FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
|
||||||
FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
|
FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
|
||||||
@@ -1039,7 +1037,7 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
LF=MulDiv(LF,FitYMul,FitYDiv);
|
LF=MulDiv(LF,FitYMul,FitYDiv);
|
||||||
MaxGrad=MulDiv(MaxGrad,FitYMul,FitYDiv);
|
MaxGrad=MulDiv(MaxGrad,FitYMul,FitYDiv);
|
||||||
} else {
|
} else {
|
||||||
FitXDiv=1; // 0 gibts nicht
|
FitXDiv=1; // 0 does not exist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yPos0=yPos;
|
yPos0=yPos;
|
||||||
@@ -1051,7 +1049,7 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
i=1;
|
i=1;
|
||||||
while (i<=l) {
|
while (i<=l) {
|
||||||
c=GetTextCharConv(Buf,Index2,T,T2,l-i,false);
|
c=GetTextCharConv(Buf,Index2,T,T2,l-i,false);
|
||||||
long xp1,yp1; // wegen Overflowgefahr
|
long xp1,yp1; // due to overflow danger
|
||||||
PointType Pos;
|
PointType Pos;
|
||||||
xp1=long(Pos1.x)+xPos+long(xLine[i]);
|
xp1=long(Pos1.x)+xPos+long(xLine[i]);
|
||||||
yp1=long(Pos1.y)+yPos;
|
yp1=long(Pos1.y)+yPos;
|
||||||
@@ -1065,7 +1063,7 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
i++;
|
i++;
|
||||||
} // while i<=l
|
} // while i<=l
|
||||||
yPos=yPos0+LF;
|
yPos=yPos0+LF;
|
||||||
T1=T2; Index1=Index2; // Fuer die naechste Zeile
|
T1=T2; Index1=Index2; // for next line
|
||||||
} // if ObjMin.y+yPos<=Obj_Max.y
|
} // if ObjMin.y+yPos<=Obj_Max.y
|
||||||
} // if !Fehler
|
} // if !Fehler
|
||||||
} while (c!=TextEnd && !Ende && !Fehler);
|
} while (c!=TextEnd && !Ende && !Fehler);
|
||||||
@@ -1078,22 +1076,6 @@ void TextType::Draw(OutputDevice& rOut)
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// nicht mehr benoetigt, da der Pointer nun extra gefuehrt wird
|
|
||||||
// (DEC Alpha hat naemlich 64Bit-Pointer!)
|
|
||||||
//UCHAR* TextType::GetBufPtr()
|
|
||||||
//{
|
|
||||||
// sal_uLong Temp;
|
|
||||||
// Temp=sal_uLong(BufLo)+0x00010000*sal_uLong(BufHi);
|
|
||||||
// return (UCHAR*)Temp;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//void TextType::SetBufPtr(UCHAR* Ptr)
|
|
||||||
//{
|
|
||||||
// sal_uLong Temp=(sal_uLong)Ptr;
|
|
||||||
// BufLo=sal_uInt16(Temp & 0x0000FFFF);
|
|
||||||
// BufHi=sal_uInt16((Temp & 0xFFFF0000)>>16);
|
|
||||||
//}
|
|
||||||
|
|
||||||
sal_uInt32 ObjTextType::GetFont()
|
sal_uInt32 ObjTextType::GetFont()
|
||||||
{
|
{
|
||||||
return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi);
|
return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi);
|
||||||
@@ -1127,21 +1109,21 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc )
|
|||||||
{
|
{
|
||||||
if ( Dsc.getLength() < 4 || ( Dsc[0] != '(' ) )
|
if ( Dsc.getLength() < 4 || ( Dsc[0] != '(' ) )
|
||||||
return;
|
return;
|
||||||
sal_Int32 i=1; // Erster Buchstabe des IF-Fontnamen. Davor ist eine '('
|
sal_Int32 i=1; // first letter of IF fontname. In front is a '('
|
||||||
while ( i < Dsc.getLength() && ( Dsc[i] !=')' ) )
|
while ( i < Dsc.getLength() && ( Dsc[i] !=')' ) )
|
||||||
i++;
|
i++;
|
||||||
Dsc = Dsc.copy(i+1); // IF-Fontname loeschen inkl. ()
|
Dsc = Dsc.copy(i+1); // delete IF fontname incl. ()
|
||||||
|
|
||||||
if ( Dsc.getLength() < 2 || ( Dsc[Dsc.getLength() - 1] !=')' ) )
|
if ( Dsc.getLength() < 2 || ( Dsc[Dsc.getLength() - 1] !=')' ) )
|
||||||
return;
|
return;
|
||||||
i = Dsc.getLength()-2; // hier ist die ')' des SV-Fontnames
|
i = Dsc.getLength()-2; // here is the ')' of the SV fontname
|
||||||
sal_Int32 j=0;
|
sal_Int32 j=0;
|
||||||
while ( i > 0 && ( Dsc[i] != '(' ) )
|
while ( i > 0 && ( Dsc[i] != '(' ) )
|
||||||
{
|
{
|
||||||
i--;
|
i--;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
SVFName = OStringToOUString(Dsc.copy(i+1,j), RTL_TEXTENCODING_IBM_437); // SV-Fontname rausholen
|
SVFName = OStringToOUString(Dsc.copy(i+1,j), RTL_TEXTENCODING_IBM_437); // retrieve SV fontname
|
||||||
Dsc = OStringBuffer(Dsc).remove(i,j).makeStringAndClear();
|
Dsc = OStringBuffer(Dsc).remove(i,j).makeStringAndClear();
|
||||||
|
|
||||||
IFID = (sal_uInt32)rID.toInt32();
|
IFID = (sal_uInt32)rID.toInt32();
|
||||||
@@ -1229,9 +1211,9 @@ void SgfFontLst::ReadList()
|
|||||||
Dsc = aCfg.ReadKey( i );
|
Dsc = aCfg.ReadKey( i );
|
||||||
if (comphelper::string::isdigitAsciiString(FID))
|
if (comphelper::string::isdigitAsciiString(FID))
|
||||||
{
|
{
|
||||||
P=new SgfFontOne; // neuer Eintrag
|
P=new SgfFontOne; // new entry
|
||||||
if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // einklinken
|
if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // link it
|
||||||
P->ReadOne(FID,Dsc); // und Zeile interpretieren
|
P->ReadOne(FID,Dsc); // interpret line
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -160,7 +160,7 @@ static float GetSwapFloat( SvStream& rSt )
|
|||||||
{
|
{
|
||||||
float fTmp;
|
float fTmp;
|
||||||
sal_Int8* pPtr = (sal_Int8*)&fTmp;
|
sal_Int8* pPtr = (sal_Int8*)&fTmp;
|
||||||
rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // Little Endian <-> Big Endian switch
|
rSt >> pPtr[3] >> pPtr[2] >> pPtr[1] >> pPtr[0]; // little endian <-> big endian switch
|
||||||
return fTmp;
|
return fTmp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -89,7 +89,7 @@
|
|||||||
#define R2_MERGEPEN 15
|
#define R2_MERGEPEN 15
|
||||||
#define R2_WHITE 16
|
#define R2_WHITE 16
|
||||||
|
|
||||||
/* Mapping Modes */
|
/* Mapping modes */
|
||||||
#define MM_TEXT 1
|
#define MM_TEXT 1
|
||||||
#define MM_LOMETRIC 2
|
#define MM_LOMETRIC 2
|
||||||
#define MM_HIMETRIC 3
|
#define MM_HIMETRIC 3
|
||||||
@@ -100,12 +100,12 @@
|
|||||||
#define MM_ANISOTROPIC 8
|
#define MM_ANISOTROPIC 8
|
||||||
|
|
||||||
|
|
||||||
/* Graphics Modes */
|
/* Graphics modes */
|
||||||
#define GM_COMPATIBLE 1
|
#define GM_COMPATIBLE 1
|
||||||
#define GM_ADVANCED 2
|
#define GM_ADVANCED 2
|
||||||
#define GM_LAST 2
|
#define GM_LAST 2
|
||||||
|
|
||||||
/* StretchBlt() Modes */
|
/* StretchBlt() modes */
|
||||||
#define BLACKONWHITE 1
|
#define BLACKONWHITE 1
|
||||||
#define WHITEONBLACK 2
|
#define WHITEONBLACK 2
|
||||||
#define COLORONCOLOR 3
|
#define COLORONCOLOR 3
|
||||||
@@ -613,8 +613,8 @@ class WinMtfOutput
|
|||||||
XForm maXForm;
|
XForm maXForm;
|
||||||
sal_Int32 mnDevOrgX, mnDevOrgY;
|
sal_Int32 mnDevOrgX, mnDevOrgY;
|
||||||
sal_Int32 mnDevWidth, mnDevHeight;
|
sal_Int32 mnDevWidth, mnDevHeight;
|
||||||
sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin
|
sal_Int32 mnWinOrgX, mnWinOrgY; // aktuel window origin
|
||||||
sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent
|
sal_Int32 mnWinExtX, mnWinExtY; // aktuel window extend
|
||||||
sal_Bool mbIsMapWinSet;
|
sal_Bool mbIsMapWinSet;
|
||||||
sal_Bool mbIsMapDevSet;
|
sal_Bool mbIsMapDevSet;
|
||||||
|
|
||||||
@@ -764,7 +764,7 @@ class WinMtf
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
WinMtfOutput* pOut;
|
WinMtfOutput* pOut;
|
||||||
SvStream* pWMF; // Die einzulesende WMF/EMF-Datei
|
SvStream* pWMF; // the WMF/EMF file to be read
|
||||||
|
|
||||||
sal_uInt32 nStartPos, nEndPos;
|
sal_uInt32 nStartPos, nEndPos;
|
||||||
BSaveStructList_impl aBmpSaveList;
|
BSaveStructList_impl aBmpSaveList;
|
||||||
@@ -773,7 +773,7 @@ protected:
|
|||||||
|
|
||||||
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
|
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
|
||||||
|
|
||||||
// Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist.
|
// assures aSampledBrush is the actual brush of the GDIMetaFile
|
||||||
|
|
||||||
Color ReadColor();
|
Color ReadColor();
|
||||||
void Callback( sal_uInt16 nPercent );
|
void Callback( sal_uInt16 nPercent );
|
||||||
@@ -796,7 +796,7 @@ class EnhWMFReader : public WinMtf
|
|||||||
|
|
||||||
|
|
||||||
sal_Bool ReadHeader();
|
sal_Bool ReadHeader();
|
||||||
// Liesst und konvertiert ein Rechteck
|
// reads and converts the rectangle
|
||||||
Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
|
Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -849,15 +849,15 @@ private:
|
|||||||
|
|
||||||
WMF_EXTERNALHEADER* pExternalHeader;
|
WMF_EXTERNALHEADER* pExternalHeader;
|
||||||
|
|
||||||
// Liesst den Kopf der WMF-Datei
|
// reads header of the WMF-Datei
|
||||||
sal_Bool ReadHeader();
|
sal_Bool ReadHeader();
|
||||||
|
|
||||||
// Liesst die Parameter des Rocords mit der Funktionsnummer nFunction.
|
// reads parameters of the record with the functionnumber nFunction.
|
||||||
void ReadRecordParams( sal_uInt16 nFunction );
|
void ReadRecordParams( sal_uInt16 nFunction );
|
||||||
|
|
||||||
Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y)
|
Point ReadPoint(); // reads and converts a point (first X then Y)
|
||||||
Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X)
|
Point ReadYX(); // reads and converts a point (first Y then X)
|
||||||
Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck
|
Rectangle ReadRectangle(); // reads and converts a rectangle
|
||||||
Size ReadYXExt();
|
Size ReadYXExt();
|
||||||
sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
|
sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
|
||||||
|
|
||||||
@@ -876,7 +876,7 @@ public:
|
|||||||
|
|
||||||
~WMFReader();
|
~WMFReader();
|
||||||
|
|
||||||
// Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile
|
// read WMF file from stream and fill the GDIMetaFile
|
||||||
void ReadWMF();
|
void ReadWMF();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -483,7 +483,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
|
|||||||
pOut->SetTextLayoutMode( nTextLayoutMode );
|
pOut->SetTextLayoutMode( nTextLayoutMode );
|
||||||
DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" );
|
DBG_ASSERT( ( nOptions & ( ETO_PDY | ETO_GLYPH_INDEX ) ) == 0, "SJ: ETO_PDY || ETO_GLYPH_INDEX in WMF" );
|
||||||
|
|
||||||
// Nur wenn der Text auch Zeichen enthaelt, macht die Ausgabe Sinn
|
// output only makes sense if the text contains characters
|
||||||
if( nLen )
|
if( nLen )
|
||||||
{
|
{
|
||||||
nOriginalTextLen = nLen;
|
nOriginalTextLen = nLen;
|
||||||
@@ -1096,7 +1096,7 @@ sal_Bool WMFReader::ReadHeader()
|
|||||||
sal_Size nStrmPos = pWMF->Tell();
|
sal_Size nStrmPos = pWMF->Tell();
|
||||||
|
|
||||||
sal_uInt32 nPlaceableMetaKey(0);
|
sal_uInt32 nPlaceableMetaKey(0);
|
||||||
// Einlesen des METAFILEHEADER, falls vorhanden
|
// if available read the METAFILEHEADER
|
||||||
*pWMF >> nPlaceableMetaKey;
|
*pWMF >> nPlaceableMetaKey;
|
||||||
if (!pWMF->good())
|
if (!pWMF->good())
|
||||||
return false;
|
return false;
|
||||||
@@ -1161,9 +1161,9 @@ sal_Bool WMFReader::ReadHeader()
|
|||||||
}
|
}
|
||||||
pOut->SetDevExt( aDevExt );
|
pOut->SetDevExt( aDevExt );
|
||||||
|
|
||||||
// Einlesen des METAHEADER
|
// read the METAHEADER
|
||||||
sal_uInt32 nMetaKey(0);
|
sal_uInt32 nMetaKey(0);
|
||||||
*pWMF >> nMetaKey; // Typ und Headergroesse
|
*pWMF >> nMetaKey; // type and headersize
|
||||||
if (!pWMF->good())
|
if (!pWMF->good())
|
||||||
return false;
|
return false;
|
||||||
if (nMetaKey != 0x00090001)
|
if (nMetaKey != 0x00090001)
|
||||||
@@ -1177,10 +1177,10 @@ sal_Bool WMFReader::ReadHeader()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pWMF->SeekRel( 2 ); // Version (von Windows)
|
pWMF->SeekRel( 2 ); // Version (of Windows)
|
||||||
pWMF->SeekRel( 4 ); // Size (der Datei in Words)
|
pWMF->SeekRel( 4 ); // Size (of file in words)
|
||||||
pWMF->SeekRel( 2 ); // NoObjects (Maximale Anzahl der gleichzeitigen Objekte)
|
pWMF->SeekRel( 2 ); // NoObjects (maximum number of simultaneous objects)
|
||||||
pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words)
|
pWMF->SeekRel( 4 ); // MaxRecord (size of largets record in words)
|
||||||
pWMF->SeekRel( 2 ); // NoParameters (Unused
|
pWMF->SeekRel( 2 ); // NoParameters (Unused
|
||||||
|
|
||||||
return pWMF->good();
|
return pWMF->good();
|
||||||
|
@@ -130,7 +130,7 @@
|
|||||||
|
|
||||||
#define PRIVATE_ESCAPE_UNICODE 2
|
#define PRIVATE_ESCAPE_UNICODE 2
|
||||||
|
|
||||||
//========================== Methoden von WMFWriter ==========================
|
//========================== methods of WMFWriter ==========================
|
||||||
|
|
||||||
void WMFWriter::MayCallback()
|
void WMFWriter::MayCallback()
|
||||||
{
|
{
|
||||||
@@ -138,9 +138,9 @@ void WMFWriter::MayCallback()
|
|||||||
{
|
{
|
||||||
sal_uLong nPercent;
|
sal_uLong nPercent;
|
||||||
|
|
||||||
// Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen
|
// we simply assume that 16386 actions match to a bitmap
|
||||||
// (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast
|
// (normally a metafile either contains only actions or some bitmaps and
|
||||||
// keine Actions enthalten. Dann ist das Verhaeltnis ziemlich unwichtig)
|
// almost no actions. In which case the ratio is less important)
|
||||||
|
|
||||||
nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions)
|
nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions)
|
||||||
*100
|
*100
|
||||||
@@ -772,25 +772,25 @@ void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
|
|||||||
|
|
||||||
WriteRecordHeader(0x00000000,W_META_STRETCHDIB);
|
WriteRecordHeader(0x00000000,W_META_STRETCHDIB);
|
||||||
|
|
||||||
// Die Reihenfolge im Metafile soll jetzt sein:
|
// The sequence in the metafile should be:
|
||||||
// einige Parameter (laenge 22), dann die Bitmap ohne FILEHEADER.
|
// some parameters (length 22), then the bitmap without FILEHEADER.
|
||||||
// Da aber *pWMF << rBitmap einen FILEHEADER der Laenge 14
|
// As *pWMF << rBitmap generates a FILEHEADER of size 14,
|
||||||
// erzeugt, schreiben wir zuerst die Bitmap an die richtige Position
|
// we first write the bitmap at the right position
|
||||||
// Und ueberschreiben hinterher den FILEHEADER mit den Parametern.
|
// and overwrite later the FILEHEADER with the parameters.
|
||||||
nPosAnf=pWMF->Tell(); // Position merken, wo Parameter hin sollen
|
nPosAnf=pWMF->Tell(); // remember position, where parameters should be stored
|
||||||
pWMF->WriteInt32( (sal_Int32)0 ).WriteInt32( (sal_Int32)0 ); // 8 bytes auffuellen (diese 8 bytes +
|
pWMF->WriteInt32( (sal_Int32)0 ).WriteInt32( (sal_Int32)0 ); // replenish 8 bytes (these 8 bytes +
|
||||||
// 14 bytes ueberfluessigen FILEHEADER
|
// 14 bytes superfluous FILEHEADER
|
||||||
// = 22 bytes Parameter)
|
// = 22 bytes parameter)
|
||||||
|
|
||||||
// write bitmap
|
// write bitmap
|
||||||
WriteDIB(rBitmap, *pWMF, false, true);
|
WriteDIB(rBitmap, *pWMF, false, true);
|
||||||
|
|
||||||
|
|
||||||
// Parameter schreiben:
|
// write the parameters:
|
||||||
nPosEnd=pWMF->Tell();
|
nPosEnd=pWMF->Tell();
|
||||||
pWMF->Seek(nPosAnf);
|
pWMF->Seek(nPosAnf);
|
||||||
|
|
||||||
// Raster-Op bestimmen, falls nichts uebergeben wurde
|
// determine raster-op, if nothing was passed
|
||||||
if( !nROP )
|
if( !nROP )
|
||||||
{
|
{
|
||||||
switch( eSrcRasterOp )
|
switch( eSrcRasterOp )
|
||||||
@@ -1676,13 +1676,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable )
|
|||||||
}
|
}
|
||||||
|
|
||||||
nMetafileHeaderPos=pWMF->Tell();
|
nMetafileHeaderPos=pWMF->Tell();
|
||||||
pWMF->WriteUInt16( (sal_uInt16)0x0001 ) // Typ: Datei
|
pWMF->WriteUInt16( (sal_uInt16)0x0001 ) // type: file
|
||||||
.WriteUInt16( (sal_uInt16)0x0009 ) // Headerlaenge in Worten
|
.WriteUInt16( (sal_uInt16)0x0009 ) // header length in words
|
||||||
.WriteUInt16( (sal_uInt16)0x0300 ) // Version als BCD-Zahl
|
.WriteUInt16( (sal_uInt16)0x0300 ) // Version as BCD number
|
||||||
.WriteUInt32( (sal_uInt32) 0x00000000 ) // Dateilaenge (ohne 1. Header), wird spaeter durch UpdateHeader() berichtigt
|
.WriteUInt32( (sal_uInt32) 0x00000000 ) // file length (without 1st header), is later corrected by UpdateHeader()
|
||||||
.WriteUInt16( (sal_uInt16)MAXOBJECTHANDLES ) // Maximalezahl der gleichzeitigen Objekte
|
.WriteUInt16( (sal_uInt16)MAXOBJECTHANDLES ) // maxmimum number of simultaneous objects
|
||||||
.WriteUInt32( (sal_uInt32) 0x00000000 ) // Maximale Record-laenge, wird spaeter durch UpdateHeader() berichtigt
|
.WriteUInt32( (sal_uInt32) 0x00000000 ) // maximum record length, is later corrected by UpdateHeader()
|
||||||
.WriteUInt16( (sal_uInt16)0x0000 ); // Reserved
|
.WriteUInt16( (sal_uInt16)0x0000 ); // reserved
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
@@ -1692,18 +1692,18 @@ void WMFWriter::UpdateHeader()
|
|||||||
sal_uLong nPos;
|
sal_uLong nPos;
|
||||||
sal_uInt32 nFileSize;
|
sal_uInt32 nFileSize;
|
||||||
|
|
||||||
nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei
|
nPos=pWMF->Tell(); // endposition = total size of file
|
||||||
nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen
|
nFileSize=nPos-nMetafileHeaderPos; // subtract size of 1st header
|
||||||
if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden
|
if ((nFileSize&1)!=0) { // if needed round to words
|
||||||
pWMF->WriteUChar( (sal_uInt8)0 );
|
pWMF->WriteUChar( (sal_uInt8)0 );
|
||||||
nPos++;
|
nPos++;
|
||||||
nFileSize++;
|
nFileSize++;
|
||||||
}
|
}
|
||||||
nFileSize>>=1; // In Anzahl Worte umrechnen
|
nFileSize>>=1; // convert to number of words
|
||||||
pWMF->Seek(nMetafileHeaderPos+6); // Zum Dateigroessen-Eintrag im zweiten Header
|
pWMF->Seek(nMetafileHeaderPos+6); // to filesize entry in second header
|
||||||
pWMF->WriteUInt32( nFileSize ); // Dateigroesse berichtigen
|
pWMF->WriteUInt32( nFileSize ); // rectify file size
|
||||||
pWMF->SeekRel(2); // Zum Max-Record-Laenge-Eintrag im zweiten Header
|
pWMF->SeekRel(2); // to max-recond-length-entry in second header
|
||||||
pWMF->WriteUInt32( nMaxRecordSize ); // und berichtigen
|
pWMF->WriteUInt32( nMaxRecordSize ); // and rectify
|
||||||
pWMF->Seek(nPos);
|
pWMF->Seek(nPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ private:
|
|||||||
|
|
||||||
bool bStatus;
|
bool bStatus;
|
||||||
|
|
||||||
sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
|
sal_uLong nLastPercent; // with which number pCallback was called last time.
|
||||||
FilterConfigItem* pFilterConfigItem;
|
FilterConfigItem* pFilterConfigItem;
|
||||||
|
|
||||||
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
|
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
|
||||||
@@ -74,10 +74,10 @@ private:
|
|||||||
sal_uInt16 nTargetDivisor;
|
sal_uInt16 nTargetDivisor;
|
||||||
|
|
||||||
sal_uLong nMetafileHeaderPos;
|
sal_uLong nMetafileHeaderPos;
|
||||||
sal_uInt32 nMaxRecordSize; // in Worten
|
sal_uInt32 nMaxRecordSize; // in words
|
||||||
sal_uLong nActRecordPos;
|
sal_uLong nActRecordPos;
|
||||||
|
|
||||||
// Aktuelle Attribute im Quell-Metafile:
|
// actual attribute in source metafile:
|
||||||
Color aSrcLineColor;
|
Color aSrcLineColor;
|
||||||
Color aSrcFillColor;
|
Color aSrcFillColor;
|
||||||
Color aSrcTextColor;
|
Color aSrcTextColor;
|
||||||
@@ -92,7 +92,7 @@ private:
|
|||||||
|
|
||||||
sal_uInt32 eSrcHorTextAlign;
|
sal_uInt32 eSrcHorTextAlign;
|
||||||
|
|
||||||
// Aktuelle Attribute im Ziel-Metafile:
|
// actual attribute in destination metafile:
|
||||||
Color aDstLineColor;
|
Color aDstLineColor;
|
||||||
Color aDstFillColor;
|
Color aDstFillColor;
|
||||||
Color aDstTextColor;
|
Color aDstTextColor;
|
||||||
@@ -103,31 +103,31 @@ private:
|
|||||||
|
|
||||||
sal_uInt32 eDstHorTextAlign;
|
sal_uInt32 eDstHorTextAlign;
|
||||||
|
|
||||||
bool bDstIsClipping; // ???: derzeit unberuecksichtigt
|
bool bDstIsClipping; // ???: not taken into account at the moment
|
||||||
Region aDstClipRegion; // ???: derzeit unberuecksichtigt
|
Region aDstClipRegion; // ???: not taken into account at the moment
|
||||||
bool bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind
|
bool bHandleAllocated[MAXOBJECTHANDLES]; // which handles have been assigned
|
||||||
sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
|
sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // which handles are owned by
|
||||||
// Selected-Objects besitzen
|
// Selected-Objects
|
||||||
// 0xffff = keines:
|
// 0xFFFF = none:
|
||||||
|
|
||||||
// Damit nicht bei jeder Operation alle Attribute verglichen werden muessen:
|
// to prevent we have to compare all attributes at each operation:
|
||||||
|
|
||||||
sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
|
sal_uLong nNumberOfActions; // number of actions in the GDIMetafile
|
||||||
sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
|
sal_uLong nNumberOfBitmaps; // number of bitmaps
|
||||||
sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
|
sal_uLong nWrittenActions; // number of processed actions while writing the directory
|
||||||
sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
|
sal_uLong nWrittenBitmaps; // number of bitmaps written
|
||||||
sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
|
sal_uLong nActBitmapPercent; // percentage of next bitmap written.
|
||||||
|
|
||||||
bool bEmbedEMF; // optionally embedd EMF data into WMF
|
bool bEmbedEMF; // optionally embedd EMF data into WMF
|
||||||
|
|
||||||
void MayCallback();
|
void MayCallback();
|
||||||
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
|
// this functions calculates percentage using the above 5 parameters
|
||||||
// und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
|
// and triggers a callback if needed. Puts bStatus to FALSE if the
|
||||||
// moechte.
|
// users wants to abort.
|
||||||
|
|
||||||
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
|
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
|
||||||
// Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen
|
// Counts bitmaps and actions (nNumberOfActions and nNumberOfBitmaps should
|
||||||
// zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist)
|
// be initialised to 0 at start, as this method is recursive)
|
||||||
|
|
||||||
void WritePointXY(const Point & rPoint);
|
void WritePointXY(const Point & rPoint);
|
||||||
void WritePointYX(const Point & rPoint);
|
void WritePointYX(const Point & rPoint);
|
||||||
@@ -138,13 +138,13 @@ private:
|
|||||||
void WriteColor(const Color & rColor);
|
void WriteColor(const Color & rColor);
|
||||||
|
|
||||||
void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType);
|
void WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType);
|
||||||
// nSizeWords ist die Groesse des gesammten Records in Anzahl Worte.
|
// nSizeWords is the size of the all records in number of words.
|
||||||
// Wenn nSizeWords unbekannt ist, dann 0 einsetzen (siehe UpdateRecordHeader()).
|
// If nSizeWords is unknown, then use 0 (see UpdateRecordHeader())
|
||||||
|
|
||||||
void UpdateRecordHeader();
|
void UpdateRecordHeader();
|
||||||
// berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn
|
// returns the size of the record after writing the parameters, if
|
||||||
// nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war.
|
// nSizeWords was unknown upon calling WriteRecordHeader(..)
|
||||||
// fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade.
|
// if needed it inserts a BYTE 0 to make number of bytes even
|
||||||
|
|
||||||
void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
|
void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
|
||||||
void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
|
void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
|
||||||
|
Reference in New Issue
Block a user