summaryrefslogtreecommitdiff
path: root/starmath/source/format.cxx
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2001-05-02 15:58:48 +0000
committerThomas Lange <tl@openoffice.org>2001-05-02 15:58:48 +0000
commitecb9bc1488a13a5deec4cfeac86f050da3f4bc1c (patch)
tree73c944e8a07c8c2c420fb53cd9bae393bf27cfba /starmath/source/format.cxx
parente6eedc6fd472bbc8daccda88b1ce82f5aadb411b (diff)
Math configuration and Symbol/SymbolSet/SymbolSetManager
Diffstat (limited to 'starmath/source/format.cxx')
-rw-r--r--starmath/source/format.cxx39
1 files changed, 37 insertions, 2 deletions
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 Kompatibilitt vorgesehen ist muessen wir leider