diff options
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/rect.cxx | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index 4b26bcae42b8..66a6c27f1fdf 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -107,13 +107,12 @@ void SmRect::CopyAlignInfo(const SmRect &rRect) } -void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, - const OUString &rText, sal_uInt16 nBorder) +SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, + const OUString &rText, sal_uInt16 nBorder) + // get rectangle fitting for drawing 'rText' on OutputDevice 'rDev' + : aTopLeft(0, 0) + , aSize(rDev.GetTextWidth(rText), rDev.GetTextHeight()) { - OSL_ENSURE(aTopLeft == Point(0, 0), "Sm: Ooops..."); - - aSize = Size(rDev.GetTextWidth(rText), rDev.GetTextHeight()); - const FontMetric aFM (rDev.GetFontMetric()); bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH ); bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText); @@ -195,18 +194,6 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, } - -SmRect::SmRect(const OutputDevice &rDev, const SmFormat *pFormat, - const OUString &rText, long nEBorderWidth) -{ - OSL_ENSURE( nEBorderWidth >= 0, "BorderWidth is negative" ); - if (nEBorderWidth < 0) - nEBorderWidth = 0; - // get rectangle fitting for drawing 'rText' on OutputDevice 'rDev' - BuildRect(rDev, pFormat, rText, sal::static_int_cast<sal_uInt16>(nEBorderWidth)); -} - - SmRect::SmRect(long nWidth, long nHeight) // this constructor should never be used for anything textlike because // it will not provide useful values for baseline, AlignT and AlignB! |