summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-04-24 13:00:02 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-04-24 13:00:02 +0000
commit63033e227a598785c960cdd947b7d5b54d0eebd4 (patch)
tree6b41ad04087c9a9db6b5ea236aa1a9714c5232a5 /starmath
parente8cffbd4c551afc5f4cd24df83d2b8a2e3a1b5cb (diff)
INTEGRATION: CWS tl50 (1.40.92); FILE MERGED
2008/03/11 15:11:29 tl 1.40.92.3: #i72559# font size problem when changing default fixed 2008/03/11 15:09:58 tl 1.40.92.2: #i72559# font size problem when changing default fixed 2008/03/06 14:57:59 tl 1.40.92.1: #i83374# changed handling of ':' character; now not displayed italic by default anymore
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/node.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 90ef139a410e..fa5a27920cc2 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: node.cxx,v $
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
* This file is part of OpenOffice.org.
*
@@ -2367,6 +2367,11 @@ void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
if (IsBold( GetFont() ))
Attributes() |= ATTR_BOLD;
+ // special handling for ':' where it is a token on it's own and is likely
+ // to be used for mathematical notations. (E.g. a:b = 2:3)
+ // In that case it should not be displayed in italic.
+ if (GetToken().aText.Len() == 1 && GetToken().aText.GetChar(0) == ':')
+ Attributes() &= ~ATTR_ITALIC;
};
@@ -2675,6 +2680,10 @@ void SmMathSymbolNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocSh
{
SmNode::Prepare(rFormat, rDocShell);
+ GetFont() = rFormat.GetFont(GetFontDesc());
+ // use same font size as is used for variables
+ GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetSize() );
+
DBG_ASSERT(GetFont().GetCharSet() == RTL_TEXTENCODING_SYMBOL ||
GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE,
"incorrect charset for character from StarMath/StarSymbol font");