diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-03 10:13:00 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-04 03:17:26 +0000 |
commit | 697d445ed0c7b60e463243db89af32e2145b475b (patch) | |
tree | 5a74d57cdc97f82bc78a686dee345a229a082a72 /starmath | |
parent | 91a7580e03d5b47c6e2513afce85ddee45e730b6 (diff) |
vcl: take into account the font width is the average font width
I'm changing the Font class function names:
- SetSize -> SetFontSize
- GetSize -> GetFontSize
- SetHeight -> SetFontHeight
- GetHeight -> GetFontHeight
- SetWidth -> SetAverageFontWidth
- GetWidth -> GetAverageFontWidth
That's because it really makes no sense to say that there is a
single constant font width because obviously proportional fonts
don't have one - the best we can do is an average font width,
which is what folks like Microsoft sort of do already. On a fixed
font, the average is still accurate, for obvious reasons :-)
I'm also not a fan of GetSize/SetSize as I find it a might too
generic.
Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70
Reviewed-on: https://gerrit.libreoffice.org/22069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/utility.hxx | 2 | ||||
-rw-r--r-- | starmath/source/cfgitem.cxx | 2 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 10 | ||||
-rw-r--r-- | starmath/source/mathmlexport.cxx | 3 | ||||
-rw-r--r-- | starmath/source/node.cxx | 54 | ||||
-rw-r--r-- | starmath/source/rect.cxx | 8 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 2 | ||||
-rw-r--r-- | starmath/source/utility.cxx | 6 | ||||
-rw-r--r-- | starmath/source/view.cxx | 8 |
9 files changed, 47 insertions, 48 deletions
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx index 4fa044806ef7..87251495e942 100644 --- a/starmath/inc/utility.hxx +++ b/starmath/inc/utility.hxx @@ -98,7 +98,7 @@ public: void SetBorderWidth(long nWidth) { nBorderWidth = nWidth; } long GetBorderWidth() const; - long GetDefaultBorderWidth() const { return GetSize().Height() / 20 ; } + long GetDefaultBorderWidth() const { return GetFontSize().Height() / 20 ; } void FreezeBorderWidth() { nBorderWidth = GetDefaultBorderWidth(); } SmFace & operator = (const SmFace &rFace); diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 313a33be0cfc..bce39c38e457 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -892,7 +892,7 @@ void SmMathConfig::LoadFormat() } ++pVal; - aFnt.SetSize( pFormat->GetBaseSize() ); + aFnt.SetFontSize( pFormat->GetBaseSize() ); pFormat->SetFont( i, aFnt, bUseDefaultFont ); } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 9f02fda27f42..3f8a41337939 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -266,7 +266,7 @@ void SmShowFont::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRec rRenderContext.SetBackground(Wallpaper(aBackColor)); vcl::Font aFont(maFont); - aFont.SetSize(Size(0, 24 * rRenderContext.GetDPIScaleFactor())); + aFont.SetFontSize(Size(0, 24 * rRenderContext.GetDPIScaleFactor())); aFont.SetAlignment(ALIGN_TOP); rRenderContext.SetFont(aFont); rRenderContext.SetTextColor(aTextColor); @@ -362,7 +362,7 @@ SmFontDialog::SmFontDialog(vcl::Window * pParent, OutputDevice *pFntListDevice, { m_pFontBox->InsertEntry( aFontList.GetFontName(i).GetFamilyName() ); } - maFont.SetSize(Size(0, 24)); + maFont.SetFontSize(Size(0, 24)); maFont.SetWeight(WEIGHT_NORMAL); maFont.SetItalic(ITALIC_NONE); maFont.SetFamily(FAMILY_DONTKNOW); @@ -1152,7 +1152,7 @@ void SmShowSymbolSetWindow::Paint(vcl::RenderContext& rRenderContext, const Rect // taking a FontSize which is a bit smaller (compared to nLen) in order to have a buffer // (hopefully enough for left and right, too) - aFont.SetSize(Size(0, nLen - (nLen / 3))); + aFont.SetFontSize(Size(0, nLen - (nLen / 3))); rRenderContext.SetFont(aFont); // keep text color rRenderContext.SetTextColor(aTxtColor); @@ -1385,7 +1385,7 @@ void SmShowSymbol::ApplySettings(vcl::RenderContext& /*rRenderContext*/ ) void SmShowSymbol::setFontSize(vcl::Font &rFont) const { - rFont.SetSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); + rFont.SetFontSize(Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3)); } void SmShowSymbol::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rRect) @@ -1687,7 +1687,7 @@ void SmShowChar::SetSymbol( const SmSym *pSym ) void SmShowChar::SetSymbol( sal_UCS4 cChar, const vcl::Font &rFont ) { vcl::Font aFont( rFont ); - aFont.SetSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) ); + aFont.SetFontSize( Size(0, GetOutputSize().Height() - GetOutputSize().Height() / 3) ); aFont.SetAlignment(ALIGN_BASELINE); SetFont(aFont); aFont.SetTransparent(true); diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 4b06ee429d1e..b022c3a67c12 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -1307,8 +1307,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) //value specified in points. //Must fix StarMath to retain the original pt values - Fraction aTemp = Sm100th_mmToPts(pFontNode->GetFont(). - GetSize().Height()); + Fraction aTemp = Sm100th_mmToPts(pFontNode->GetFont().GetFontSize().Height()); if (pFontNode->GetSizeType() == FontSizeType::MINUS) aTemp-=aFrac; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 330b0fc4d3e3..e4936e222409 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -172,7 +172,7 @@ void SmNode::SetFontSize(const Fraction &rSize, FontSizeType nType) rSize.GetDenominator()); long nHeight = (long)aVal; - aFntSize = GetFont().GetSize(); + aFntSize = GetFont().GetFontSize(); aFntSize.Width() = 0; switch(nType) { @@ -686,7 +686,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // make distance depend on font size long nDist = +(rFormat.GetDistance(DIS_VERTICAL) - * GetFont().GetSize().Height()) / 100L; + * GetFont().GetFontSize().Height()) / 100L; if (nSize < 1) return; @@ -794,7 +794,7 @@ void SmLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) } // make distance depend on font size - long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L; + long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetFontSize().Height()) / 100L; if (!IsUseExtraSpaces()) nDist = 0; @@ -852,7 +852,7 @@ void SmUnHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) RHA_CENTER, RVA_BASELINE); // add a bit space between operator and argument // (worst case -{1 over 2} where - and over have almost no space inbetween) - long nDelta = pOper->GetFont().GetSize().Height() / 20; + long nDelta = pOper->GetFont().GetFontSize().Height() / 20; if (bIsPostfix) aPos.X() += nDelta; else @@ -926,7 +926,7 @@ void SmRootNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) nVerOffset; GetHeightVerOffset(*pBody, nHeight, nVerOffset); nHeight += rFormat.GetDistance(DIS_ROOT) - * GetFont().GetSize().Height() / 100L; + * GetFont().GetFontSize().Height() / 100L; // font specialist advised to change the width first pRootSym->AdaptToY(rDev, nHeight); @@ -1086,7 +1086,7 @@ void SmBinVerNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) pNum ->Arrange(rDev, rFormat); pDenom->Arrange(rDev, rFormat); - long nFontHeight = GetFont().GetSize().Height(), + long nFontHeight = GetFont().GetFontSize().Height(), nExtLen = nFontHeight * rFormat.GetDistance(DIS_FRACTION) / 100L, nThick = nFontHeight * rFormat.GetDistance(DIS_STROKEWIDTH) / 100L, nWidth = std::max(pNum->GetItalicWidth(), pDenom->GetItalicWidth()), @@ -1403,7 +1403,7 @@ void SmSubSupNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) SmNode *pBody = GetBody(); OSL_ENSURE(pBody, "Sm: NULL pointer"); - long nOrigHeight = pBody->GetFont().GetSize().Height(); + long nOrigHeight = pBody->GetFont().GetFontSize().Height(); pBody->Arrange(rDev, rFormat); @@ -1436,7 +1436,7 @@ void SmSubSupNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // prevent sub-/supscripts from diminishing in size // (as would be in "a_{1_{2_{3_4}}}") - if (GetFont().GetSize().Height() > rFormat.GetBaseSize().Height() / 3) + if (GetFont().GetFontSize().Height() > rFormat.GetBaseSize().Height() / 3) { sal_uInt16 nIndex = (eSubSup == CSUB || eSubSup == CSUP) ? SIZ_LIMITS : SIZ_INDEX; @@ -1614,7 +1614,7 @@ void SmBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) (GetScaleMode() == SCALE_HEIGHT || bIsScaleNormal), bIsABS = GetToken().eType == TABS; - long nFaceHeight = GetFont().GetSize().Height(); + long nFaceHeight = GetFont().GetFontSize().Height(); // determine oversize in % sal_uInt16 nPerc = 0; @@ -1644,8 +1644,8 @@ void SmBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // if wanted, scale the braces to the wanted size if (bScale) { - Size aTmpSize (pLeft->GetFont().GetSize()); - OSL_ENSURE(pRight->GetFont().GetSize() == aTmpSize, + Size aTmpSize (pLeft->GetFont().GetFontSize()); + OSL_ENSURE(pRight->GetFont().GetFontSize() == aTmpSize, "Sm : different font sizes"); aTmpSize.Width() = std::min((long) nBraceHeight * 60L / 100L, rFormat.GetBaseSize().Height() * 3L / 2L); @@ -1716,7 +1716,7 @@ void SmBracebodyNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // scale separators to required height and arrange them bool bScale = GetScaleMode() == SCALE_HEIGHT || rFormat.IsScaleNormalBrackets(); - long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetSize().Height(); + long nHeight = bScale ? aRefRect.GetHeight() : GetFont().GetFontSize().Height(); sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ? DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE; sal_uInt16 nPerc = rFormat.GetDistance(nIndex); @@ -1730,7 +1730,7 @@ void SmBracebodyNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) } // horizontal distance between argument and brackets or separators - long nDist = GetFont().GetSize().Height() + long nDist = GetFont().GetFontSize().Height() * rFormat.GetDistance(DIS_BRACKETSPACE) / 100L; SmNode *pLeft = GetSubNode(0); @@ -1784,7 +1784,7 @@ void SmVerticalBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // determine the relative position and the distances between each other RectPos eRectPos; - long nFontHeight = pBody->GetFont().GetSize().Height(); + long nFontHeight = pBody->GetFont().GetFontSize().Height(); long nDistBody = nFontHeight * rFormat.GetDistance(DIS_ORNAMENTSIZE), nDistScript = nFontHeight; if (GetToken().eType == TOVERBRACE) @@ -1834,7 +1834,7 @@ long SmOperNode::CalcSymbolHeight(const SmNode &rSymbol, const SmFormat &rFormat) const // returns the font height to be used for operator-symbol { - long nHeight = GetFont().GetSize().Height(); + long nHeight = GetFont().GetFontSize().Height(); SmTokenType eTmpType = GetToken().eType; if (eTmpType == TLIM || eTmpType == TLIMINF || eTmpType == TLIMSUP) @@ -1868,12 +1868,12 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) SmNode *pSymbol = GetSymbol(); pSymbol->SetSize(Fraction(CalcSymbolHeight(*pSymbol, rFormat), - pSymbol->GetFont().GetSize().Height())); + pSymbol->GetFont().GetFontSize().Height())); pBody->Arrange(rDev, rFormat); pOper->Arrange(rDev, rFormat); - long nOrigHeight = GetFont().GetSize().Height(), + long nOrigHeight = GetFont().GetFontSize().Height(), nDist = nOrigHeight * rFormat.GetDistance(DIS_OPERATORSPACE) / 100L; @@ -1942,7 +1942,7 @@ void SmAttributNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) default : eVerAlign = RVA_ATTRIBUT_HI; if (pBody->GetType() == NATTRIBUT) - nDist = GetFont().GetSize().Height() + nDist = GetFont().GetFontSize().Height() * rFormat.GetDistance(DIS_ORNAMENTSPACE) / 100L; } Point aPos = pAttr->AlignTo(*pBody, RectPos::Attribute, RHA_CENTER, eVerAlign); @@ -2206,7 +2206,7 @@ void SmPolyLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) aPoly.SetPoint(aPointA, 0); aPoly.SetPoint(aPointB, 1); - long nThick = GetFont().GetSize().Height() + long nThick = GetFont().GetFontSize().Height() * rFormat.GetDistance(DIS_STROKEWIDTH) / 100L; nWidth = nThick + 2 * nBorderwidth; @@ -2265,7 +2265,7 @@ void SmRectangleNode::AdaptToY(OutputDevice &/*rDev*/, sal_uLong nHeight) void SmRectangleNode::Arrange(OutputDevice &rDev, const SmFormat &/*rFormat*/) { - long nFontHeight = GetFont().GetSize().Height(); + long nFontHeight = GetFont().GetFontSize().Height(); long nWidth = aToSize.Width(), nHeight = aToSize.Height(); if (nHeight == 0) @@ -2507,7 +2507,7 @@ void SmMatrixNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) } // norm distance from which the following two are calculated - const long nNormDist = 3 * GetFont().GetSize().Height(); + const long nNormDist = 3 * GetFont().GetFontSize().Height(); // define horizontal and vertical minimal distances that separate // the elements @@ -2606,7 +2606,7 @@ SmMathSymbolNode::SmMathSymbolNode(const SmToken &rNodeToken) void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, sal_uLong nWidth) { // Since there is no function to do this, we try to approximate it: - Size aFntSize (GetFont().GetSize()); + Size aFntSize (GetFont().GetFontSize()); //! however the result is a bit better with 'nWidth' as initial font width aFntSize.Width() = nWidth; @@ -2629,7 +2629,7 @@ void SmMathSymbolNode::AdaptToX(OutputDevice &rDev, sal_uLong nWidth) void SmMathSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight) { GetFont().FreezeBorderWidth(); - Size aFntSize (GetFont().GetSize()); + Size aFntSize (GetFont().GetFontSize()); // Since we only want to scale the height, we might have // to determine the font width in order to keep it @@ -2637,7 +2637,7 @@ void SmMathSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight) { rDev.Push(PushFlags::FONT | PushFlags::MAPMODE); rDev.SetFont(GetFont()); - aFntSize.Width() = rDev.GetFontMetric().GetSize().Width(); + aFntSize.Width() = rDev.GetFontMetric().GetFontSize().Width(); rDev.Pop(); } OSL_ENSURE(aFntSize.Width() != 0, "Sm: "); @@ -2668,7 +2668,7 @@ void SmMathSymbolNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocSh GetFont() = rFormat.GetFont(GetFontDesc()); // use same font size as is used for variables - GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetSize() ); + GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetFontSize() ); OSL_ENSURE(GetFont().GetCharSet() == RTL_TEXTENCODING_SYMBOL || GetFont().GetCharSet() == RTL_TEXTENCODING_UNICODE, @@ -2866,7 +2866,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell GetFont() = rFormat.GetFont(FNT_VARIABLE); } // use same font size as is used for variables - GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetSize() ); + GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetFontSize() ); // Actually only WEIGHT_NORMAL and WEIGHT_BOLD should occur... However, the sms-file also // contains e.g. 'WEIGHT_ULTRALIGHT'. Consequently, compare here with '>' instead of '!='. @@ -3016,7 +3016,7 @@ void SmBlankNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) // make distance depend on the font height // (so that it increases when scaling (e.g. size *2 {a ~ b}) - long nDist = GetFont().GetSize().Height() / 10L, + long nDist = GetFont().GetFontSize().Height() / 10L, nSpace = nNum * nDist; // get a SmRect with Baseline and all the bells and whistles diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx index e5e0696e4c3e..c77af27c1e5b 100644 --- a/starmath/source/rect.cxx +++ b/starmath/source/rect.cxx @@ -135,7 +135,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, const FontMetric aFM (rDev.GetFontMetric()); bool bIsMath = aFM.GetFamilyName().equalsIgnoreAsciiCase( FONTNAME_MATH ); bool bAllowSmaller = bIsMath && !SmIsMathAlpha(rText); - const long nFontHeight = rDev.GetFont().GetSize().Height(); + const long nFontHeight = rDev.GetFont().GetFontSize().Height(); nBorderWidth = nBorder; bHasAlignInfo = true; @@ -185,7 +185,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat, long nDist = 0; if (pFormat) - nDist = (rDev.GetFont().GetSize().Height() + nDist = (rDev.GetFont().GetFontSize().Height() * pFormat->GetDistance(DIS_ORNAMENTSIZE)) / 100L; nHiAttrFence = aGlyphRect.TopLeft().Y() - 1 - nBorderWidth - nDist; @@ -620,14 +620,14 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev, // use scale factor when calling GetTextBoundRect to counter // negative effects from antialiasing which may otherwise result // in significant incorrect bounding rectangles for some characters. - Size aFntSize = aFnt.GetSize(); + Size aFntSize = aFnt.GetFontSize(); // Workaround to avoid HUGE font sizes and resulting problems long nScaleFactor = 1; while( aFntSize.Height() > 2000 * nScaleFactor ) nScaleFactor *= 2; - aFnt.SetSize( Size( aFntSize.Width() / nScaleFactor, aFntSize.Height() / nScaleFactor ) ); + aFnt.SetFontSize( Size( aFntSize.Width() / nScaleFactor, aFntSize.Height() / nScaleFactor ) ); pGlyphDev->SetFont(aFnt); long nTextWidth = rDev.GetTextWidth(rText); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index ecb74a617e96..a02f4e5a7379 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -458,7 +458,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* { const SmFace rOld = aFormat.GetFont((*ppEntries)->mnMemberId); - SmFace aSet( sFontName, rOld.GetSize() ); + SmFace aSet( sFontName, rOld.GetFontSize() ); aSet.SetBorderWidth( rOld.GetBorderWidth() ); aSet.SetAlignment( ALIGN_BASELINE ); aFormat.SetFont( (*ppEntries)->mnMemberId, aSet ); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 1e20743bdf24..2c306c5932f1 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -233,7 +233,7 @@ bool IsBold( const vcl::Font &rFont ) void SmFace::Impl_Init() { - SetSize( GetSize() ); + SetSize( GetFontSize() ); SetTransparent( true ); SetAlignment( ALIGN_BASELINE ); SetColor( COL_AUTO ); @@ -254,7 +254,7 @@ void SmFace::SetSize(const Size& rSize) //! bodies (eg stack{...} with many entries). //! Of course this is holds only if characters are used and not polygons. - Font::SetSize(aSize); + Font::SetFontSize(aSize); } @@ -278,7 +278,7 @@ SmFace & operator *= (SmFace &rFace, const Fraction &rFrac) // scales the width and height of 'rFace' by 'rFrac' and returns a // reference to 'rFace'. // It's main use is to make scaling fonts look easier. -{ const Size &rFaceSize = rFace.GetSize(); +{ const Size &rFaceSize = rFace.GetFontSize(); rFace.SetSize(Size(Fraction(rFaceSize.Width()) *= rFrac, Fraction(rFaceSize.Height()) *= rFrac)); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 547acf7d6f97..5dcf07dfff4c 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1149,14 +1149,14 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri aFont.SetAlignment(ALIGN_TOP); aFont.SetWeight(WEIGHT_BOLD); - aFont.SetSize(aSize650); + aFont.SetFontSize(aSize650); aFont.SetColor( Color(COL_BLACK) ); rOutDev.SetFont(aFont); Size aTitleSize (GetTextSize(rOutDev, GetDoc()->GetTitle(), aOutRect.GetWidth() - 200)); aFont.SetWeight(WEIGHT_NORMAL); - aFont.SetSize(aSize600); + aFont.SetFontSize(aSize600); rOutDev.SetFont(aFont); Size aDescSize (GetTextSize(rOutDev, GetDoc()->GetComment(), aOutRect.GetWidth() - 200)); @@ -1168,7 +1168,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri // output title aFont.SetWeight(WEIGHT_BOLD); - aFont.SetSize(aSize650); + aFont.SetFontSize(aSize650); rOutDev.SetFont(aFont); Point aPoint(aOutRect.Left() + (aOutRect.GetWidth() - aTitleSize.Width()) / 2, aOutRect.Top()); @@ -1178,7 +1178,7 @@ void SmViewShell::Impl_Print(OutputDevice &rOutDev, const SmPrintUIOptions &rPri // output description aFont.SetWeight(WEIGHT_NORMAL); - aFont.SetSize(aSize600); + aFont.SetFontSize(aSize600); rOutDev.SetFont(aFont); aPoint.X() = aOutRect.Left() + (aOutRect.GetWidth() - aDescSize.Width()) / 2; aPoint.Y() = aOutRect.Top(); |