summaryrefslogtreecommitdiff
path: root/starmath/source/dialog.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-02-03 10:13:00 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-02-04 03:17:26 +0000
commit697d445ed0c7b60e463243db89af32e2145b475b (patch)
tree5a74d57cdc97f82bc78a686dee345a229a082a72 /starmath/source/dialog.cxx
parent91a7580e03d5b47c6e2513afce85ddee45e730b6 (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/source/dialog.cxx')
-rw-r--r--starmath/source/dialog.cxx10
1 files changed, 5 insertions, 5 deletions
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);