From ecb9bc1488a13a5deec4cfeac86f050da3f4bc1c Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Wed, 2 May 2001 15:58:48 +0000 Subject: Math configuration and Symbol/SymbolSet/SymbolSetManager --- starmath/source/format.cxx | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'starmath/source/format.cxx') diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index f79388822b41..2f86a4819141 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -2,9 +2,9 @@ * * $RCSfile: format.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: tl $ $Date: 2000-11-02 15:07:16 $ + * last change: $Author: tl $ $Date: 2001-05-02 16:58:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -129,6 +129,13 @@ SmFormat::SmFormat() } +void SmFormat::SetFont(USHORT nIdent, const SmFace &rFont) +{ + vFont[nIdent] = rFont; + vFont[nIdent].SetTransparent( TRUE ); + vFont[nIdent].SetAlign( ALIGN_BASELINE ); +} + SmFormat & SmFormat::operator = (const SmFormat &rFormat) { SetBaseSize(rFormat.GetBaseSize()); @@ -149,6 +156,34 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat) } +BOOL SmFormat::operator == (const SmFormat &rFormat) const +{ + BOOL bRes = aBaseSize == rFormat.aBaseSize && + eHorAlign == rFormat.eHorAlign && + bIsTextmode == rFormat.bIsTextmode && + bScaleNormalBrackets == rFormat.bScaleNormalBrackets; + + USHORT i; + for (i = 0; i <= SIZ_END && bRes; ++i) + { + if (vSize[i] != rFormat.vSize[i]) + bRes = FALSE; + } + for (i = 0; i <= DIS_END && bRes; ++i) + { + if (vDist[i] != rFormat.vDist[i]) + bRes = FALSE; + } + for (i = 0; i <= FNT_END && bRes; ++i) + { + if (vFont[i] != rFormat.vFont[i]) + bRes = FALSE; + } + + return bRes; +} + + SvStream & operator << (SvStream &rStream, const SmFormat &rFormat) { //Da hier keinerlei Kompatibilit„t vorgesehen ist muessen wir leider -- cgit