summaryrefslogtreecommitdiff
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
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>
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
-rw-r--r--accessibility/source/helper/characterattributeshelper.cxx4
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx4
-rw-r--r--basctl/source/basicide/basides1.cxx2
-rw-r--r--basctl/source/basicide/layout.cxx4
-rw-r--r--basctl/source/dlged/dlged.cxx2
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx4
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx8
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx8
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx8
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx4
-rw-r--r--canvas/source/vcl/canvasfont.cxx4
-rw-r--r--canvas/source/vcl/impltools.cxx8
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx2
-rw-r--r--canvas/source/vcl/spritehelper.cxx2
-rw-r--r--chart2/source/view/main/3DChartObjects.cxx2
-rw-r--r--chart2/source/view/main/DummyXShape.cxx4
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx8
-rw-r--r--cppcanvas/source/mtfrenderer/textaction.cxx2
-rw-r--r--cui/source/dialogs/about.cxx6
-rw-r--r--cui/source/dialogs/cuicharmap.cxx10
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/tabpages/autocdlg.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx28
-rw-r--r--cui/source/tabpages/numpages.cxx8
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx2
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/splash/splash.cxx2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx4
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx20
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx4
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
-rw-r--r--editeng/source/editeng/editattr.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/eertfpar.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx28
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--editeng/source/items/svxfont.cxx8
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/uno/unofdesc.cxx6
-rw-r--r--extensions/source/propctrlr/fontdialog.cxx4
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx10
-rw-r--r--filter/source/flash/swfwriter2.cxx4
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx4
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx2
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx2
-rw-r--r--filter/source/pdf/pdfexport.cxx6
-rw-r--r--filter/source/svg/svgfontexport.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx16
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx4
-rw-r--r--formula/source/ui/dlg/structpg.cxx4
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx2
-rw-r--r--include/vcl/font.hxx12
-rw-r--r--include/vcl/metric.hxx2
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx2
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx4
-rw-r--r--sc/qa/unit/helper/qahelper.cxx4
-rw-r--r--sc/source/core/data/column2.cxx4
-rw-r--r--sc/source/core/data/patattr.cxx4
-rw-r--r--sc/source/filter/excel/xlstyle.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCsvControl.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx12
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx4
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx18
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx4
-rw-r--r--sc/source/ui/view/gridwin4.cxx6
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx4
-rw-r--r--sd/source/core/stlpool.cxx6
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx6
-rw-r--r--sd/source/ui/func/bulmaper.cxx2
-rw-r--r--sd/source/ui/slideshow/showwin.cxx4
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx8
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx2
-rw-r--r--sd/source/ui/view/grviewsh.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx6
-rw-r--r--sd/source/ui/view/sdview.cxx4
-rw-r--r--sfx2/source/control/recentdocsview.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--slideshow/source/engine/rehearsetimingsactivity.cxx4
-rw-r--r--starmath/inc/utility.hxx2
-rw-r--r--starmath/source/cfgitem.cxx2
-rw-r--r--starmath/source/dialog.cxx10
-rw-r--r--starmath/source/mathmlexport.cxx3
-rw-r--r--starmath/source/node.cxx54
-rw-r--r--starmath/source/rect.cxx8
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--starmath/source/utility.cxx6
-rw-r--r--starmath/source/view.cxx8
-rw-r--r--svtools/source/control/calendar.cxx4
-rw-r--r--svtools/source/control/ctrlbox.cxx8
-rw-r--r--svtools/source/control/filectrl.cxx2
-rw-r--r--svtools/source/control/ruler.cxx8
-rw-r--r--svtools/source/control/tabbar.cxx6
-rw-r--r--svtools/source/graphic/grfmgr2.cxx4
-rw-r--r--svtools/source/misc/embedhlp.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx6
-rw-r--r--svx/source/dialog/charmap.cxx4
-rw-r--r--svx/source/dialog/dialcontrol.cxx2
-rw-r--r--svx/source/dialog/fntctrl.cxx20
-rw-r--r--svx/source/dialog/pagectrl.cxx6
-rw-r--r--svx/source/dialog/rubydialog.cxx4
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx6
-rw-r--r--svx/source/dialog/swframeexample.cxx4
-rw-r--r--svx/source/fmcomp/fmgridif.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/sidebar/line/LineWidthValueSet.cxx4
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx4
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx6
-rw-r--r--svx/source/svdraw/svdfmtf.cxx4
-rw-r--r--svx/source/svdraw/svdotext.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx6
-rw-r--r--svx/source/tbxctrls/tbunocontroller.cxx2
-rw-r--r--sw/source/core/inc/swfont.hxx10
-rw-r--r--sw/source/core/layout/paintfrm.cxx4
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx26
-rw-r--r--sw/source/core/txtnode/swfont.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx4
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx12
-rw-r--r--sw/source/ui/config/optload.cxx2
-rw-r--r--sw/source/ui/config/optpage.cxx10
-rw-r--r--sw/source/ui/misc/insfnote.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx8
-rw-r--r--sw/source/ui/table/tautofmt.cxx18
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx2
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx12
-rw-r--r--sw/source/uibase/docvw/srcedtw.cxx4
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx2
-rw-r--r--sw/source/uibase/uiview/srcview.cxx4
-rw-r--r--test/source/mtfxmldump.cxx4
-rw-r--r--toolkit/source/helper/vclunohelper.cxx6
-rw-r--r--vcl/inc/impfont.hxx9
-rw-r--r--vcl/osx/salframe.cxx2
-rw-r--r--vcl/source/control/button.cxx2
-rw-r--r--vcl/source/edit/vclmedit.cxx4
-rw-r--r--vcl/source/filter/sgvtext.cxx4
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx4
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx18
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx2
-rw-r--r--vcl/source/font/font.cxx42
-rw-r--r--vcl/source/font/fontmetric.cxx2
-rw-r--r--vcl/source/gdi/graph.cxx2
-rw-r--r--vcl/source/gdi/metaact.cxx6
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx46
-rw-r--r--vcl/source/gdi/svmconverter.cxx4
-rw-r--r--vcl/source/gdi/textlayout.cxx6
-rw-r--r--vcl/source/outdev/font.cxx24
-rw-r--r--vcl/source/outdev/text.cxx6
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/paint.cxx4
-rw-r--r--vcl/source/window/printdlg.cxx4
-rw-r--r--vcl/source/window/settings.cxx34
-rw-r--r--vcl/source/window/window.cxx12
-rw-r--r--vcl/source/window/window2.cxx12
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx4
-rw-r--r--vcl/win/gdi/salfont.cxx2
-rw-r--r--vcl/win/window/salframe.cxx8
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx2
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx2
172 files changed, 541 insertions, 545 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 947396a060f3..aee0d899adfb 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1022,7 +1022,7 @@ Document::retrieveCharacterAttributes(
//character height
aAttribs[i].Name = "CharHeight";
aAttribs[i].Handle = -1;
- aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetHeight() );
+ aAttribs[i].Value = css::uno::makeAny( (sal_Int16)aFont.GetFontHeight() );
aAttribs[i].State = css::beans::PropertyState_DIRECT_VALUE;
i++;
diff --git a/accessibility/source/helper/characterattributeshelper.cxx b/accessibility/source/helper/characterattributeshelper.cxx
index 7bcfe7a37ea1..cc02ef63030e 100644
--- a/accessibility/source/helper/characterattributeshelper.cxx
+++ b/accessibility/source/helper/characterattributeshelper.cxx
@@ -34,8 +34,8 @@ CharacterAttributesHelper::CharacterAttributesHelper( const vcl::Font& rFont, sa
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontName" ), makeAny( rFont.GetFamilyName() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontPitch" ), makeAny( (sal_Int16) rFont.GetPitch() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharFontStyleName" ), makeAny( rFont.GetStyleName() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetSize().Height() ) ) );
- m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), makeAny( (sal_Int16) rFont.GetSize().Width() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharHeight" ), makeAny( (sal_Int16) rFont.GetFontSize().Height() ) ) );
+ m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharScaleWidth" ), makeAny( (sal_Int16) rFont.GetFontSize().Width() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharStrikeout" ), makeAny( (sal_Int16) rFont.GetStrikeout() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharUnderline" ), makeAny( (sal_Int16) rFont.GetUnderline() ) ) );
m_aAttributeMap.insert( AttributeMap::value_type( OUString( "CharWeight" ), makeAny( (float) rFont.GetWeight() ) ) );
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index fa22d43905b1..65896d018781 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -804,7 +804,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
vcl::Font aFont( GetEditEngine()->GetFont() );
aFont.SetAlignment( ALIGN_BOTTOM );
aFont.SetTransparent( true );
- aFont.SetSize( Size( 0, 360 ) );
+ aFont.SetFontSize( Size( 0, 360 ) );
pPrinter->SetFont( aFont );
pPrinter->SetMapMode( MAP_100TH_MM );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index bc6177c4e3d9..4821c1280f55 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2870,12 +2870,12 @@ void CodeCompleteWindow::ResizeAndPositionListBox()
pListBox->SetSizePixel( aSize );
//calculate position
- const Rectangle aVisArea( pParent->GetEditView()->GetStartDocPos(), pParent->GetOutputSizePixel() );//the visible area
+ const Rectangle aVisArea( pParent->GetEditView()->GetStartDocPos(), pParent->GetOutputSizePixel() ); //the visible area
const Point& aBottomPoint = aVisArea.BottomRight();
if( aVisArea.TopRight().getY() + aPos.getY() + aSize.getHeight() > aBottomPoint.getY() )
{//clipped at the bottom: move it up
- const long& nParentFontHeight = pParent->GetEditEngine()->GetFont().GetHeight();//parent's font (in the IDE): needed for height
+ const long& nParentFontHeight = pParent->GetEditEngine()->GetFont().GetFontHeight(); //parent's font (in the IDE): needed for height
aPos.Y() -= aSize.getHeight() + nParentFontHeight + nCursorPad;
}
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 3051308497fd..9e412f8089c3 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1187,7 +1187,7 @@ void Shell::AdjustPosSizePixel( const Point &rPos, const Size &rSize )
return;
Size aTabBarSize;
- aTabBarSize.Height() = GetViewFrame()->GetWindow().GetFont().GetHeight() + 4;
+ aTabBarSize.Height() = GetViewFrame()->GetWindow().GetFont().GetFontHeight() + 4;
aTabBarSize.Width() = rSize.Width();
Size aSz( rSize );
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index e85168e8ef10..360d5f7bd3d3 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -43,9 +43,9 @@ Layout::Layout (vcl::Window* pParent) :
SetBackground(GetSettings().GetStyleSettings().GetWindowColor());
vcl::Font aFont = GetFont();
- Size aSz = aFont.GetSize();
+ Size aSz = aFont.GetFontSize();
aSz.Height() *= 1.5;
- aFont.SetSize(aSz);
+ aFont.SetFontSize(aSz);
aFont.SetWeight(WEIGHT_BOLD);
aFont.SetColor(GetSettings().GetStyleSettings().GetWindowTextColor());
SetFont(aFont);
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 52a4875275fd..4c58e37e72f4 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1161,7 +1161,7 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor
pPrinter->SetMapMode( aMap );
vcl::Font aFont;
aFont.SetAlignment( ALIGN_BOTTOM );
- aFont.SetSize( Size( 0, 360 ));
+ aFont.SetFontSize( Size( 0, 360 ));
pPrinter->SetFont( aFont );
Size aPaperSz = pPrinter->GetOutputSize();
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 505ebd2acf01..8aca75baa26a 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -68,7 +68,7 @@ namespace cairocanvas
const bool bOldMapState( pOutDev->IsMapModeEnabled() );
pOutDev->EnableMapMode(false);
- const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize();
+ const Size aSize = pOutDev->GetFontMetric( *maFont ).GetFontSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -78,7 +78,7 @@ namespace cairocanvas
const long nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
- maFont->SetWidth( nNewWidth );
+ maFont->SetAverageFontWidth( nNewWidth );
pOutDev->EnableMapMode(bOldMapState);
}
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index f1c829da3126..03246f7b37a7 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -81,7 +81,7 @@ namespace cairocanvas
if( !::rtl::math::approxEqual(aScale.getX(), aScale.getY()) )
{
// retrieve true font width
- const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetWidth() );
+ const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetAverageFontWidth() );
const sal_Int32 nScaledFontWidth( ::basegfx::fround(nFontWidth * aScale.getX()) );
@@ -92,13 +92,13 @@ namespace cairocanvas
return false;
}
- io_rVCLFont.SetWidth( nScaledFontWidth );
+ io_rVCLFont.SetAverageFontWidth( nScaledFontWidth );
}
if( !::rtl::math::approxEqual(aScale.getY(), 1.0) )
{
- const sal_Int32 nFontHeight( io_rVCLFont.GetHeight() );
- io_rVCLFont.SetHeight( ::basegfx::fround(nFontHeight * aScale.getY()) );
+ const sal_Int32 nFontHeight( io_rVCLFont.GetFontHeight() );
+ io_rVCLFont.SetFontHeight( ::basegfx::fround(nFontHeight * aScale.getY()) );
}
io_rVCLFont.SetOrientation( static_cast< short >( ::basegfx::fround(-fmod(nRotate, 2*M_PI)*(1800.0/M_PI)) ) );
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 1e076b3f2f4d..8bb4d46cd074 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -430,8 +430,8 @@ namespace cairocanvas
continue;
vcl::Font aFont = rOutDev.GetFont();
- long nWidth = aFont.GetWidth();
- long nHeight = aFont.GetHeight();
+ long nWidth = aFont.GetAverageFontWidth();
+ long nHeight = aFont.GetFontHeight();
if (nWidth == 0)
nWidth = nHeight;
if (nWidth == 0 || nHeight == 0)
@@ -487,7 +487,7 @@ namespace cairocanvas
SAL_INFO(
"canvas.cairo",
- "Size:(" << aFont.GetWidth() << "," << aFont.GetHeight()
+ "Size:(" << aFont.GetAverageFontWidth() << "," << aFont.GetFontHeight()
<< "), Pos (" << rOutpos.X() << "," << rOutpos.Y()
<< "), G("
<< (cairo_glyphs.size() > 0 ? cairo_glyphs[0].index : -1)
@@ -507,7 +507,7 @@ namespace cairocanvas
//faux bold
if (rSysFontData.bFakeBold)
{
- double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetHeight() );
+ double bold_dx = 0.5 * sqrt( 0.7 * aFont.GetFontHeight() );
int total_steps = 1 * ((int) (bold_dx + 0.5));
// loop to draw the text for every half pixel of displacement
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index cd5f5e903668..8de5f73afeee 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -130,7 +130,7 @@ namespace dxcanvas
// adjust to stretched font
if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
{
- const Size aSize = xVirtualDevice->GetFontMetric( aFont ).GetSize();
+ const Size aSize = xVirtualDevice->GetFontMetric( aFont ).GetFontSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -139,7 +139,7 @@ namespace dxcanvas
const sal_Int32 nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
- aFont.SetWidth( nNewWidth );
+ aFont.SetAverageFontWidth( nNewWidth );
}
// set font
@@ -259,7 +259,7 @@ namespace dxcanvas
// adjust to stretched font
if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
{
- const Size aSize = xVirtualDevice->GetFontMetric( aFont ).GetSize();
+ const Size aSize = xVirtualDevice->GetFontMetric( aFont ).GetFontSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -268,7 +268,7 @@ namespace dxcanvas
const sal_Int32 nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
- aFont.SetWidth( nNewWidth );
+ aFont.SetAverageFontWidth( nNewWidth );
}
// set font
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index b14cc87e5f8a..51a7dd9c9f60 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -738,7 +738,7 @@ namespace oglcanvas
// adjust to stretched font
if(!::rtl::math::approxEqual(rFontMatrix.m00, rFontMatrix.m11))
{
- const Size aSize = pVDev->GetFontMetric( aFont ).GetSize();
+ const Size aSize = pVDev->GetFontMetric( aFont ).GetFontSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -747,7 +747,7 @@ namespace oglcanvas
const sal_Int32 nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
- aFont.SetWidth( nNewWidth );
+ aFont.SetAverageFontWidth( nNewWidth );
}
// set font
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index f65fdf2273ee..cd78c2feda9a 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -68,7 +68,7 @@ namespace vclcanvas
const bool bOldMapState( rOutDev.IsMapModeEnabled() );
rOutDev.EnableMapMode(false);
- const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize();
+ const Size aSize = rOutDev.GetFontMetric( *maFont ).GetFontSize();
const double fDividend( rFontMatrix.m10 + rFontMatrix.m11 );
double fStretch = (rFontMatrix.m00 + rFontMatrix.m01);
@@ -78,7 +78,7 @@ namespace vclcanvas
const long nNewWidth = ::basegfx::fround( aSize.Width() * fStretch );
- maFont->SetWidth( nNewWidth );
+ maFont->SetAverageFontWidth( nNewWidth );
rOutDev.EnableMapMode(bOldMapState);
}
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index be277286fafc..49afca1d78dd 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -117,7 +117,7 @@ namespace vclcanvas
if( !::rtl::math::approxEqual(aScale.getX(), aScale.getY()) )
{
// retrieve true font width
- const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetWidth() );
+ const sal_Int32 nFontWidth( rOutDev.GetFontMetric( io_rVCLFont ).GetAverageFontWidth() );
const sal_Int32 nScaledFontWidth( ::basegfx::fround(nFontWidth * aScale.getX()) );
@@ -128,13 +128,13 @@ namespace vclcanvas
return false;
}
- io_rVCLFont.SetWidth( nScaledFontWidth );
+ io_rVCLFont.SetAverageFontWidth( nScaledFontWidth );
}
if( !::rtl::math::approxEqual(aScale.getY(), 1.0) )
{
- const sal_Int32 nFontHeight( io_rVCLFont.GetHeight() );
- io_rVCLFont.SetHeight( ::basegfx::fround(nFontHeight * aScale.getY()) );
+ const sal_Int32 nFontHeight( io_rVCLFont.GetFontHeight() );
+ io_rVCLFont.SetFontHeight( ::basegfx::fround(nFontHeight * aScale.getY()) );
}
io_rVCLFont.SetOrientation( static_cast< short >( ::basegfx::fround(-fmod(nRotate, 2*M_PI)*(1800.0/M_PI)) ) );
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index c7aee1ffb867..65d1141f7203 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -103,7 +103,7 @@ namespace vclcanvas
const Point& rPos )
{
vcl::Font aVCLFont;
- aVCLFont.SetHeight( 20 );
+ aVCLFont.SetFontHeight( 20 );
aVCLFont.SetColor( Color( INFO_COLOR ) );
rOutDev.SetTextAlign(ALIGN_TOP);
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 8c6af62accfe..8dd45e0df909 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -315,7 +315,7 @@ namespace vclcanvas
// paint sprite prio
vcl::Font aVCLFont;
- aVCLFont.SetHeight( std::min(long(20),aOutputSize.Height()) );
+ aVCLFont.SetFontHeight( std::min(long(20),aOutputSize.Height()) );
aVCLFont.SetColor( COL_RED );
rTargetSurface.SetTextAlign(ALIGN_TOP);
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index 74856d55b216..737ebf4066c3 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -83,7 +83,7 @@ const TextCacheItem& TextCache::getText(OUString const & rText, bool bIs3dText)
aFont = vcl::Font("Brillante St",Size(0,0));
else
aFont = pDevice->GetFont();
- aFont.SetSize(Size(0, 96));
+ aFont.SetFontSize(Size(0, 96));
aFont.SetColor(COL_GREEN); // RGB_COLORDATA(0xf0, 0xf0, 0xf0));
pDevice->SetFont(aFont);
pDevice->Erase();
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 955ea05c4e9e..99bb50820ddb 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -767,7 +767,7 @@ struct FontAttribSetter
else if(rPropName == "CharHeight")
{
float fHeight = rProp.second.get<float>();
- mrFont.SetSize(Size(0,(fHeight*127+36)/72)); //taken from the MCW implementation
+ mrFont.SetFontSize(Size(0,(fHeight*127+36)/72)); //taken from the MCW implementation
}
else if(rPropName == "CharUnderline")
{
@@ -784,7 +784,7 @@ struct FontAttribSetter
{
float fWidth = rProp.second.get<float>();
FontWidth eFontWidth = VCLUnoHelper::ConvertFontWidth(fWidth);
- mrFont.SetWidth(eFontWidth);
+ mrFont.SetAverageFontWidth(eFontWidth);
}
}
private:
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index c07ee3497a0f..057399c52cd1 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -808,7 +808,7 @@ namespace cppcanvas
// TODO(Q3): This code smells of programming by
// coincidence (the next two if statements)
- ::Size rFontSizeLog( rFont.GetSize() );
+ ::Size rFontSizeLog( rFont.GetFontSize() );
if (rFontSizeLog.Height() == 0)
{
@@ -823,8 +823,8 @@ namespace cppcanvas
if( nFontWidthLog != 0 )
{
vcl::Font aTestFont = rFont;
- aTestFont.SetWidth( 0 );
- sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetWidth();
+ aTestFont.SetAverageFontWidth( 0 );
+ sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetAverageFontWidth();
if( nNormalWidth != nFontWidthLog )
if( nNormalWidth )
aFontMatrix.m00 = (double)nFontWidthLog / nNormalWidth;
@@ -888,7 +888,7 @@ namespace cppcanvas
{
// calculate shadow offset (similar to outdev3.cxx)
// TODO(F3): better match with outdev3.cxx
- sal_Int32 nShadowOffset = static_cast<sal_Int32>(1.5 + ((rParms.mrVDev.GetFont().GetHeight()-24.0)/24.0));
+ sal_Int32 nShadowOffset = static_cast<sal_Int32>(1.5 + ((rParms.mrVDev.GetFont().GetFontHeight()-24.0)/24.0));
if( nShadowOffset < 1 )
nShadowOffset = 1;
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index d44521e55999..14af06459391 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -1590,7 +1590,7 @@ namespace cppcanvas
VirtualDevice& rVDev )
{
const ::basegfx::B2DSize aFontSize( 0,
- rVDev.GetFont().GetHeight() / 64.0 );
+ rVDev.GetFont().GetFontHeight() / 64.0 );
const double nOutlineWidth(
(rState.mapModeTransform * aFontSize).getY() );
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 0e6ca41a67a4..f26a1761ca2a 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -162,17 +162,17 @@ void AboutDialog::StyleControls()
vcl::Font aLabelFont = rStyleSettings.GetLabelFont();
vcl::Font aLargeFont = aLabelFont;
- aLargeFont.SetSize(Size( 0, aLabelFont.GetSize().Height() * 3));
+ aLargeFont.SetFontSize(Size( 0, aLabelFont.GetFontSize().Height() * 3));
// Logo Replacement Text
m_pLogoReplacement->SetControlFont(aLargeFont);
// Description Text
- aLargeFont.SetSize(Size(0, aLabelFont.GetSize().Height() * 1.3));
+ aLargeFont.SetFontSize(Size(0, aLabelFont.GetFontSize().Height() * 1.3));
m_pDescriptionText->SetControlFont(aLargeFont);
// Version Text
- aLargeFont.SetSize(Size(0, aLabelFont.GetSize().Height() * 1.2));
+ aLargeFont.SetFontSize(Size(0, aLabelFont.GetFontSize().Height() * 1.2));
m_pVersion->SetControlFont(aLargeFont);
// If not in high-contrast mode, hard-code colors
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index b8d28a871a27..c8a5a28ada93 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -88,7 +88,7 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, bool bOne_, const SfxIte
const SfxStringItem* pFontNameItem = SfxItemSet::GetItem<SfxStringItem>(pSet, SID_FONT_NAME, false);
if ( pFontItem )
{
- vcl::Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetSize() );
+ vcl::Font aTmpFont( pFontItem->GetFamilyName(), pFontItem->GetStyleName(), GetCharFont().GetFontSize() );
aTmpFont.SetCharSet( pFontItem->GetCharSet() );
aTmpFont.SetPitch( pFontItem->GetPitch() );
SetCharFont( aTmpFont );
@@ -204,7 +204,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
bool bGotBoundary = true;
bool bShrankFont = false;
vcl::Font aOrigFont(rRenderContext.GetFont());
- Size aFontSize(aOrigFont.GetSize());
+ Size aFontSize(aOrigFont.GetFontSize());
Rectangle aBoundRect;
for (long nFontHeight = aFontSize.Height(); nFontHeight > 0; nFontHeight -= 5)
@@ -222,7 +222,7 @@ void SvxShowText::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
break;
vcl::Font aFont(aOrigFont);
aFontSize.Height() = nFontHeight;
- aFont.SetSize(aFontSize);
+ aFont.SetFontSize(aFontSize);
rRenderContext.SetFont(aFont);
mnY = (nWinHeight - GetTextHeight()) / 2;
bShrankFont = true;
@@ -276,7 +276,7 @@ void SvxShowText::SetFont( const vcl::Font& rFont )
maFont = vcl::Font(rFont);
maFont.SetWeight(WEIGHT_NORMAL);
maFont.SetAlignment(ALIGN_TOP);
- maFont.SetSize(PixelToLogic(Size(0, nWinHeight / 2)));
+ maFont.SetFontSize(PixelToLogic(Size(0, nWinHeight / 2)));
maFont.SetTransparent(true);
Control::SetFont(maFont);
@@ -288,7 +288,7 @@ void SvxShowText::SetFont( const vcl::Font& rFont )
Size SvxShowText::GetOptimalSize() const
{
const vcl::Font &rFont = GetFont();
- const Size rFontSize = rFont.GetSize();
+ const Size rFontSize = rFont.GetFontSize();
long nWinHeight = LogicToPixel(rFontSize).Height() * 2;
return Size( GetTextWidth( GetText() ) + 2 * 12, nWinHeight );
}
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 0be8100cee7d..8bd4398f5cb2 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -130,7 +130,7 @@ namespace svx
// the font for the secondary text:
vcl::Font aSmallerFont(rRenderContext.GetFont());
// heuristic: 80% of the original size
- aSmallerFont.SetHeight( (long)( 0.8 * aSmallerFont.GetHeight() ) );
+ aSmallerFont.SetFontHeight( (long)( 0.8 * aSmallerFont.GetFontHeight() ) );
// let's calculate the size of our two texts
Rectangle aPrimaryRect = rRenderContext.GetTextRect( _rRect, m_sPrimaryText, _nTextStyle );
@@ -309,7 +309,7 @@ namespace svx
Size RubyRadioButton::GetOptimalSize() const
{
vcl::Font aSmallerFont( GetFont() );
- aSmallerFont.SetHeight( static_cast<long>( 0.8 * aSmallerFont.GetHeight() ) );
+ aSmallerFont.SetFontHeight( static_cast<long>( 0.8 * aSmallerFont.GetFontHeight() ) );
Rectangle rect( Point(), Size( SAL_MAX_INT32, SAL_MAX_INT32 ) );
Size aPrimarySize = GetTextRect( rect, m_aRubyText.getPrimaryText() ).GetSize();
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index cf7af4a9cc8e..cb0932ab88a8 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -351,7 +351,7 @@ void OfaImpBrwString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::Ren
{
aFont = *pUserData->pFont;
aFont.SetColor(aOldFont.GetColor());
- aFont.SetSize(aOldFont.GetSize());
+ aFont.SetFontSize(aOldFont.GetFontSize());
}
aFont.SetWeight(WEIGHT_BOLD);
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index ba3f6204cff1..42150e41fcd2 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -484,7 +484,7 @@ namespace
sal_uInt16 _nFontWhich,
sal_uInt16 _nFontHeightWhich)
{
- Size aSize = _rFont.GetSize();
+ Size aSize = _rFont.GetFontSize();
aSize.Width() = 0;
FontMetric aFontMetrics;
OUString sFontName(_pFontNameLB->GetText());
@@ -525,7 +525,7 @@ namespace
aSize.Height() = PointToTwips( static_cast<long>(_pFontSizeLB->GetValue() / 10) );
else
aSize.Height() = 200; // default 10pt
- aFontMetrics.SetSize( aSize );
+ aFontMetrics.SetFontSize( aSize );
_rFont.SetLanguage(_pLanguageLB->GetSelectLanguage());
@@ -536,7 +536,7 @@ namespace
_rFont.SetCharSet( aFontMetrics.GetCharSet() );
_rFont.SetWeight( aFontMetrics.GetWeight() );
_rFont.SetItalic( aFontMetrics.GetItalic() );
- _rFont.SetSize( aFontMetrics.GetSize() );
+ _rFont.SetFontSize( aFontMetrics.GetFontSize() );
return aFontMetrics;
}
@@ -550,11 +550,11 @@ void SvxCharNamePage::UpdatePreview_Impl()
SvxFont& rCJKFont = GetPreviewCJKFont();
SvxFont& rCTLFont = GetPreviewCTLFont();
// Size
- Size aSize = rFont.GetSize();
+ Size aSize = rFont.GetFontSize();
aSize.Width() = 0;
- Size aCJKSize = rCJKFont.GetSize();
+ Size aCJKSize = rCJKFont.GetFontSize();
aCJKSize.Width() = 0;
- Size aCTLSize = rCTLFont.GetSize();
+ Size aCTLSize = rCTLFont.GetFontSize();
aCTLSize.Width() = 0;
// Font
const FontList* pFontList = GetFontList();
@@ -2710,9 +2710,9 @@ void SvxCharPositionPage::Initialize()
// to handle the changes of the other pages
SetExchangeSupport();
- GetPreviewFont().SetSize( Size( 0, 240 ) );
- GetPreviewCJKFont().SetSize( Size( 0, 240 ) );
- GetPreviewCTLFont().SetSize( Size( 0, 240 ) );
+ GetPreviewFont().SetFontSize( Size( 0, 240 ) );
+ GetPreviewCJKFont().SetFontSize( Size( 0, 240 ) );
+ GetPreviewCTLFont().SetFontSize( Size( 0, 240 ) );
m_pNormalPosBtn->Check();
PositionHdl_Impl( m_pNormalPosBtn );
@@ -2876,7 +2876,7 @@ IMPL_LINK_NOARG_TYPED(SvxCharPositionPage, KerningSelectHdl_Impl, ListBox&, void
{
// Condensed -> max value == 1/6 of the current font height
SvxFont& rFont = GetPreviewFont();
- long nMax = rFont.GetSize().Height() / 6;
+ long nMax = rFont.GetFontSize().Height() / 6;
m_pKerningMF->SetMax( m_pKerningMF->Normalize( nMax ), FUNIT_TWIP );
m_pKerningMF->SetLast( m_pKerningMF->GetMax( m_pKerningMF->GetUnit() ) );
}
@@ -2961,7 +2961,7 @@ void SvxCharPositionPage::ActivatePage( const SfxItemSet& rSet )
{
// Condensed -> max value == 1/6 of the current font height
SvxFont& rFont = GetPreviewFont();
- long nMax = rFont.GetSize().Height() / 6;
+ long nMax = rFont.GetFontSize().Height() / 6;
long nKern = (short)m_pKerningMF->Denormalize( LogicToLogic( static_cast<long>(m_pKerningMF->GetValue()), MAP_POINT, MAP_TWIP ) );
m_pKerningMF->SetMax( m_pKerningMF->Normalize( nKern > nMax ? nKern : nMax ), FUNIT_TWIP );
m_pKerningMF->SetLast( m_pKerningMF->GetMax( m_pKerningMF->GetUnit() ) );
@@ -3445,9 +3445,9 @@ void SvxCharTwoLinesPage::Initialize()
SvxFont& rFont = GetPreviewFont();
SvxFont& rCJKFont = GetPreviewCJKFont();
SvxFont& rCTLFont = GetPreviewCTLFont();
- rFont.SetSize( Size( 0, 220 ) );
- rCJKFont.SetSize( Size( 0, 220 ) );
- rCTLFont.SetSize( Size( 0, 220 ) );
+ rFont.SetFontSize( Size( 0, 220 ) );
+ rCJKFont.SetFontSize( Size( 0, 220 ) );
+ rCTLFont.SetFontSize( Size( 0, 220 ) );
}
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 325f93012c5b..2312f379f06d 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2413,7 +2413,7 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
// in case of a height of zero it is drawed in original height
if(!aTmpSize.Height())
aTmpSize.Height() = 1;
- aFont.SetSize(aTmpSize);
+ aFont.SetFontSize(aTmpSize);
aFont.SetTransparent(true);
Color aBulletColor = rFmt.GetBulletColor();
if(aBulletColor.GetColor() == COL_AUTO)
@@ -2494,7 +2494,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
sal_uInt16 nFontHeight = nYStep * 6 / 10;
if (bPosition)
nFontHeight = nYStep * 15 / 10;
- aStdFont.SetSize(Size( 0, nFontHeight ));
+ aStdFont.SetFontSize(Size( 0, nFontHeight ));
SvxNodeNum aNum(sal_uInt8(0));
sal_uInt16 nPreNum = pActNum->GetLevel(0).GetStart();
@@ -2553,7 +2553,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
}
else if (SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType())
{
- nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetSize()) : 0;
+ nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawBullet(pVDev.get(), rFmt, nNumberXPos, nYStart, aStdFont.GetFontSize()) : 0;
}
else
{
@@ -2676,7 +2676,7 @@ void SvxNumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectan
{
if (rFmt.IsShowSymbol())
{
- nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetSize());
+ nTextOffset = lcl_DrawBullet(pVDev.get(), rFmt, nXStart, nYStart, aStdFont.GetFontSize());
nTextOffset = nTextOffset + nXStep;
}
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 67b8d374c9b4..2fca4849d602 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -133,7 +133,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent )
m_pVisibleCell->GetBox().EnableTriState( false );
vcl::Font aTitleFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),GetDefaultFontFlags::OnlyOne);
- aTitleFont.SetSize(Size(0, 6));
+ aTitleFont.SetFontSize(Size(0, 6));
SetTitleFont(aTitleFont);
OUString aTxt(ModuleRes(STR_QUERY_SORTTEXT));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3ae825ae4966..203279cf693f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1585,7 +1585,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
nullptr, Size(1, 1), DeviceFormat::DEFAULT));
::Rectangle aRect;
vcl::Font aFont(rFontMetric);
- aFont.SetSize(Size(0, 25));
+ aFont.SetFontSize(Size(0, 25));
aDevice->SetFont(aFont);
aDevice->GetTextBoundRect(aRect, aFontName);
int nFontWidth = aRect.BottomRight().X() + 1;
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 07f9aaebb57d..9f95e0311ca8 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -662,7 +662,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& rRenderContext, const Rectang
_vdev->SetLineColor();
_vdev->DrawRect(Rectangle(pSpl->_tlx+pSpl->_barspace, pSpl->_tly+pSpl->_barspace, pSpl->_tlx+pSpl->_barspace+length, pSpl->_tly+pSpl->_barheight-pSpl->_barspace));
vcl::Font aFont;
- aFont.SetSize(Size(0, 12));
+ aFont.SetFontSize(Size(0, 12));
aFont.SetAlignment(ALIGN_BASELINE);
_vdev->SetFont(aFont);
_vdev->SetTextColor(pSpl->_cProgressTextColor);
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index ac7b01fe4451..3931d196ac1b 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -2730,7 +2730,7 @@ namespace
/** SIMPLE, DONE */
const MetaFontAction* pA = static_cast<const MetaFontAction*>(pAction);
rPropertyHolders.Current().setFont(pA->GetFont());
- Size aFontSize(pA->GetFont().GetSize());
+ Size aFontSize(pA->GetFont().GetFontSize());
if(0 == aFontSize.Height())
{
@@ -2745,7 +2745,7 @@ namespace
aFontSize = OutputDevice::LogicToLogic(
aFontSize, MAP_PIXEL, rPropertyHolders.Current().getMapUnit());
- aCorrectedFont.SetSize(aFontSize);
+ aCorrectedFont.SetFontSize(aFontSize);
rPropertyHolders.Current().setFont(aCorrectedFont);
}
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index eac624c8804c..bec31951dd37 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -415,11 +415,11 @@ namespace drawinglayer
{
const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
- if(aUnscaledFontMetric.GetWidth() > 0)
+ if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
{
const double fScaleFactor((double)nWidth / (double)nHeight);
- const sal_uInt32 nScaledWidth(basegfx::fround((double)aUnscaledFontMetric.GetWidth() * fScaleFactor));
- aRetval.SetWidth(nScaledWidth);
+ const sal_uInt32 nScaledWidth(basegfx::fround((double)aUnscaledFontMetric.GetAverageFontWidth() * fScaleFactor));
+ aRetval.SetAverageFontWidth(nScaledWidth);
}
}
#endif
@@ -453,7 +453,7 @@ namespace drawinglayer
// TODO: eKerning
// set FontHeight and init to no FontScaling
- o_rSize.setY(rFont.GetSize().getHeight() > 0 ? rFont.GetSize().getHeight() : 0);
+ o_rSize.setY(rFont.GetFontSize().getHeight() > 0 ? rFont.GetFontSize().getHeight() : 0);
o_rSize.setX(o_rSize.getY());
#ifdef WIN32
@@ -462,15 +462,15 @@ namespace drawinglayer
// needs to do extra stuff to detect the correct width (since it's
// zero and not equal the font height) and its relationship to
// the height
- if(rFont.GetSize().getWidth() > 0)
+ if(rFont.GetFontSize().getWidth() > 0)
{
vcl::Font aUnscaledFont(rFont);
- aUnscaledFont.SetWidth(0);
+ aUnscaledFont.SetAverageFontWidth(0);
const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aUnscaledFont));
- if(aUnscaledFontMetric.GetWidth() > 0)
+ if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
{
- const double fScaleFactor((double)rFont.GetSize().getWidth() / (double)aUnscaledFontMetric.GetWidth());
+ const double fScaleFactor((double)rFont.GetFontSize().getWidth() / (double)aUnscaledFontMetric.GetAverageFontWidth());
o_rSize.setX(fScaleFactor * o_rSize.getY());
}
}
@@ -479,9 +479,9 @@ namespace drawinglayer
// is easier achieved since width == height is interpreted as no
// scaling. Ergo, Width == 0 means width == height, and width != 0
// means the scaling is in the direct relation of width to height
- if(rFont.GetSize().getWidth() > 0)
+ if(rFont.GetFontSize().getWidth() > 0)
{
- o_rSize.setX((double)rFont.GetSize().getWidth());
+ o_rSize.setX((double)rFont.GetFontSize().getWidth());
}
#endif
return aRetval;
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index bd24eedcb218..a24ca8ab5503 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -911,9 +911,9 @@ namespace drawinglayer
(sal_Int32)ceil(aRangeLogic.getMaxX()), (sal_Int32)ceil(aRangeLogic.getMaxY()));
pPDFControl->Location = aRectLogic;
- Size aFontSize(pPDFControl->TextFont.GetSize());
+ Size aFontSize(pPDFControl->TextFont.GetFontSize());
aFontSize = OutputDevice::LogicToLogic(aFontSize, MapMode(MAP_POINT), mpOutputDevice->GetMapMode());
- pPDFControl->TextFont.SetSize(aFontSize);
+ pPDFControl->TextFont.SetFontSize(aFontSize);
mpPDFExtOutDevData->BeginStructureElement(vcl::PDFWriter::Form);
mpPDFExtOutDevData->CreateControl(*pPDFControl.get());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index c8e7257eff78..bfb5e46bcf7c 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -137,7 +137,7 @@ namespace drawinglayer
}
// Don't draw fonts without height
- if( aFont.GetHeight() <= 0 )
+ if( aFont.GetFontHeight() <= 0 )
return;
// handle additional font attributes
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index ff71dbf40d99..acb3dfe97777 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -163,7 +163,7 @@ EditCharAttribFontHeight::EditCharAttribFontHeight( const SvxFontHeightItem& rAt
void EditCharAttribFontHeight::SetFont( SvxFont& rFont, OutputDevice* )
{
// Property is ignored
- rFont.SetSize( Size( rFont.GetSize().Width(), static_cast<const SvxFontHeightItem*>(GetItem())->GetHeight() ) );
+ rFont.SetFontSize( Size( rFont.GetFontSize().Width(), static_cast<const SvxFontHeightItem*>(GetItem())->GetHeight() ) );
}
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 8ab16b79da7d..6f026127967d 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2047,7 +2047,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SfxItemState::SET ) )
rFont.SetFillColor( static_cast<const SvxBackgroundColorItem&>(rSet.Get( EE_CHAR_BKGCOLOR )).GetValue() );
if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SfxItemState::SET ) )
- rFont.SetSize( Size( rFont.GetSize().Width(), static_cast<const SvxFontHeightItem&>(rSet.Get( nWhich_FontHeight ) ).GetHeight() ) );
+ rFont.SetFontSize( Size( rFont.GetFontSize().Width(), static_cast<const SvxFontHeightItem&>(rSet.Get( nWhich_FontHeight ) ).GetHeight() ) );
if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SfxItemState::SET ) )
rFont.SetWeight( static_cast<const SvxWeightItem&>(rSet.Get( nWhich_Weight )).GetWeight() );
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) )
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 3d909a59ccd1..efcf60790b61 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2566,7 +2566,7 @@ void EditEngine::SetFontInfoInItemSet( SfxItemSet& rSet, const SvxFont& rFont )
{
rSet.Put( SvxLanguageItem( rFont.GetLanguage(), EE_CHAR_LANGUAGE ) );
rSet.Put( SvxFontItem( rFont.GetFamilyType(), rFont.GetFamilyName(), OUString(), rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
- rSet.Put( SvxFontHeightItem( rFont.GetSize().Height(), 100, EE_CHAR_FONTHEIGHT ) );
+ rSet.Put( SvxFontHeightItem( rFont.GetFontSize().Height(), 100, EE_CHAR_FONTHEIGHT ) );
rSet.Put( SvxCharScaleWidthItem( 100, EE_CHAR_FONTWIDTH ) );
rSet.Put( SvxShadowedItem( rFont.IsShadow(), EE_CHAR_SHADOW ) );
rSet.Put( SvxEscapementItem( rFont.GetEscapement(), rFont.GetPropr(), EE_CHAR_ESCAPEMENT ) );
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 341adca793c2..65ea358246a7 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -341,7 +341,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
nEsc *= 10; //HalPoints => Twips was embezzled in RTFITEM.CXX!
SvxFont aFont;
mpEditEngine->SeekCursor(aStartPaM.GetNode(), aStartPaM.GetIndex()+1, aFont);
- nEsc = nEsc * 100 / aFont.GetSize().Height();
+ nEsc = nEsc * 100 / aFont.GetFontSize().Height();
SvxEscapementItem aEscItem( (short) nEsc, static_cast<const SvxEscapementItem*>(pItem)->GetProportionalHeight(), EE_CHAR_ESCAPEMENT );
rSet.GetAttrSet().Put( aEscItem );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 9b1edb499e10..4426fdf0b20e 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -836,7 +836,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
ImplInitDigitMode(GetRefDevice(), aTmpFont.GetLanguage());
if ( IsFixedCellHeight() )
- nTextLineHeight = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
+ nTextLineHeight = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
else
nTextLineHeight = aTmpFont.GetPhysTxtSize( GetRefDevice(), OUString() ).Height();
// Metrics can be greater
@@ -1090,7 +1090,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
if ( ( aTmpFont.GetFixKerning() > 0 ) && ( ( nTmpPos + pPortion->GetLen() ) < pNode->Len() ) )
pPortion->GetSize().Width() += aTmpFont.GetFixKerning();
if ( IsFixedCellHeight() )
- pPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
+ pPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
}
if ( bCalcCharPositions )
{
@@ -1304,7 +1304,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
ImplInitDigitMode(pRefDev, aTmpFont.GetLanguage());
if ( IsFixedCellHeight() )
- aTextSize.Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
+ aTextSize.Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
else
aTextSize.Height() = aTmpFont.GetPhysTxtSize( pRefDev, OUString() ).Height();
pLine->SetHeight( (sal_uInt16)aTextSize.Height() );
@@ -1638,7 +1638,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
TextPortion* pDummyPortion = new TextPortion( 0 );
pDummyPortion->GetSize() = aTmpFont.GetPhysTxtSize( pRefDev, OUString() );
if ( IsFixedCellHeight() )
- pDummyPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetHeight() );
+ pDummyPortion->GetSize().Height() = ImplCalculateFontIndependentLineSpacing( aTmpFont.GetFontHeight() );
pParaPortion->GetTextPortions().Append(pDummyPortion);
FormatterFontMetric aFormatterMetrics;
RecalcFormatterFontMetrics( aFormatterMetrics, aTmpFont );
@@ -2599,9 +2599,9 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
rFont.SetFamily( rFontItem.GetFamily() );
rFont.SetPitch( rFontItem.GetPitch() );
rFont.SetCharSet( rFontItem.GetCharSet() );
- Size aSz( rFont.GetSize() );
+ Size aSz( rFont.GetFontSize() );
aSz.Height() = static_cast<const SvxFontHeightItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) ).GetHeight();
- rFont.SetSize( aSz );
+ rFont.SetFontSize( aSz );
rFont.SetWeight( static_cast<const SvxWeightItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ))).GetWeight() );
rFont.SetItalic( static_cast<const SvxPostureItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ))).GetPosture() );
rFont.SetLanguage( static_cast<const SvxLanguageItem&>(pNode->GetContentAttribs().GetItem( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ))).GetLanguage() );
@@ -2694,7 +2694,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
// Set the font as we want it to look like & reset the Propr attribute
// so that it is not counted twice.
- Size aRealSz( aMetric.GetSize() );
+ Size aRealSz( aMetric.GetFontSize() );
rFont.SetPropr( 100 );
if ( aStatus.DoStretch() )
@@ -2750,7 +2750,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo
aRealSz.Width() *= nRelWidth;
aRealSz.Width() /= 100;
}
- rFont.SetSize( aRealSz );
+ rFont.SetFontSize( aRealSz );
// Font is not restored ...
}
@@ -2827,8 +2827,8 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
if ( IsFixedCellHeight() )
{
- nAscent = sal::static_int_cast< sal_uInt16 >( rFont.GetHeight() );
- nDescent= sal::static_int_cast< sal_uInt16 >( ImplCalculateFontIndependentLineSpacing( rFont.GetHeight() ) - nAscent );
+ nAscent = sal::static_int_cast< sal_uInt16 >( rFont.GetFontHeight() );
+ nDescent= sal::static_int_cast< sal_uInt16 >( ImplCalculateFontIndependentLineSpacing( rFont.GetFontHeight() ) - nAscent );
}
else
{
@@ -2856,7 +2856,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
{
// Now in consideration of Escape/Propr
// possibly enlarge Ascent or Descent
- short nDiff = (short)(rFont.GetSize().Height()*rFont.GetEscapement()/100L);
+ short nDiff = (short)(rFont.GetFontSize().Height()*rFont.GetEscapement()/100L);
if ( rFont.GetEscapement() > 0 )
{
nAscent = (sal_uInt16) (((long)nAscent)*nPropr/100 + nDiff);
@@ -3368,7 +3368,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
// In case of high/low do it yourself:
if ( aTmpFont.GetEscapement() )
{
- long nDiff = aTmpFont.GetSize().Height() * aTmpFont.GetEscapement() / 100L;
+ long nDiff = aTmpFont.GetFontSize().Height() * aTmpFont.GetEscapement() / 100L;
if ( !IsVertical() )
aOutPos.Y() -= nDiff;
else
@@ -3498,7 +3498,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
short _nEsc = aTmpFont.GetEscapement();
if( _nEsc )
{
- long nShift = ((_nEsc*long(aTmpFont.GetSize().Height()))/ 100L);
+ long nShift = ((_nEsc*long(aTmpFont.GetFontSize().Height()))/ 100L);
if( !IsVertical() )
aRedLineTmpPos.Y() -= nShift;
else
@@ -3507,7 +3507,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
}
Color aOldColor( pOutDev->GetLineColor() );
pOutDev->SetLineColor( Color( GetColorConfig().GetColorValue( svtools::SPELL ).nColor ) );
- lcl_DrawRedLines( pOutDev, aTmpFont.GetSize().Height(), aRedLineTmpPos, (size_t)nIndex, (size_t)nIndex + rTextPortion.GetLen(), pDXArray, pPortion->GetNode()->GetWrongList(), nOrientation, aOrigin, IsVertical(), rTextPortion.IsRightToLeft() );
+ lcl_DrawRedLines( pOutDev, aTmpFont.GetFontSize().Height(), aRedLineTmpPos, (size_t)nIndex, (size_t)nIndex + rTextPortion.GetLen(), pDXArray, pPortion->GetNode()->GetWrongList(), nOrientation, aOrigin, IsVertical(), rTextPortion.IsRightToLeft() );
pOutDev->SetLineColor( aOldColor );
}
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 0ca6114b1093..3a57c5dfb709 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -967,7 +967,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
SeekCursor( pNode, nPos, aFont );
MapMode aPntMode( MAP_POINT );
long nFontHeight = GetRefDevice()->LogicToLogic(
- aFont.GetSize(), &GetRefMapMode(), &aPntMode ).Height();
+ aFont.GetFontSize(), &GetRefMapMode(), &aPntMode ).Height();
nFontHeight *=2; // Half Points
sal_uInt16 const nProp = static_cast<const SvxEscapementItem&>(rItem).GetProportionalHeight();
sal_uInt16 nProp100 = nProp*100; // For SWG-Token Prop in 100th percent.
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 8b41023f79f2..8599beab8005 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -87,7 +87,7 @@ vcl::Font SvxBulletItem::CreateFont( SvStream& rStream, sal_uInt16 nVer )
{
sal_Int32 nHeight(0), nWidth(0);
rStream.ReadInt32( nHeight ); rStream.ReadInt32( nWidth ); Size aSize( nWidth, nHeight );
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
}
bool bTemp;
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 83b21f675859..3fa6dd55cc4d 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -321,8 +321,8 @@ void SvxFont::SetPhysFont( OutputDevice *pOut ) const
else
{
Font aNewFont( *this );
- Size aSize( aNewFont.GetSize() );
- aNewFont.SetSize( Size( aSize.Width() * nPropr / 100L,
+ Size aSize( aNewFont.GetFontSize() );
+ aNewFont.SetFontSize( Size( aSize.Width() * nPropr / 100L,
aSize.Height() * nPropr / 100L ) );
if ( !rCurrentFont.IsSameInstance( aNewFont ) )
pOut->SetFont( aNewFont );
@@ -460,7 +460,7 @@ void SvxFont::QuickDrawText( OutputDevice *pOut,
if ( nEsc )
{
- long nDiff = GetSize().Height();
+ long nDiff = GetFontSize().Height();
nDiff *= nEsc;
nDiff /= 100;
@@ -518,7 +518,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
nTmpEsc = -20;
else
nTmpEsc = nEsc;
- Size aSize = ( this->GetSize() );
+ Size aSize = ( this->GetFontSize() );
aPos.Y() -= ( ( nTmpEsc * long( aSize.Height() ) ) / 100L );
}
Font aOldFont( ChgPhysFont( pOut ) );
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f741f1371d2f..0b96792963a4 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -889,12 +889,12 @@ vcl::Font Outliner::ImpCalcBulletFont( sal_Int32 nPara ) const
GetGlobalCharStretching(nStretchX, nStretchY);
sal_uInt16 nScale = pFmt->GetBulletRelSize() * nStretchY / 100;
- sal_uLong nScaledLineHeight = aStdFont.GetSize().Height();
+ sal_uLong nScaledLineHeight = aStdFont.GetFontSize().Height();
nScaledLineHeight *= nScale*10;
nScaledLineHeight /= 1000;
aBulletFont.SetAlignment( ALIGN_BOTTOM );
- aBulletFont.SetSize( Size( 0, nScaledLineHeight ) );
+ aBulletFont.SetFontSize( Size( 0, nScaledLineHeight ) );
bool bVertical = IsVertical();
aBulletFont.SetVertical( bVertical );
aBulletFont.SetOrientation( bVertical ? 2700 : 0 );
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index 59390d2034b6..cf387b1bce88 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -42,7 +42,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl:
{
rFont.SetFamilyName( rDesc.Name );
rFont.SetStyleName( rDesc.StyleName );
- rFont.SetSize( Size( rDesc.Width, rDesc.Height ) );
+ rFont.SetFontSize( Size( rDesc.Width, rDesc.Height ) );
rFont.SetFamily( (FontFamily)rDesc.Family );
rFont.SetCharSet( (rtl_TextEncoding)rDesc.CharSet );
rFont.SetPitch( (FontPitch)rDesc.Pitch );
@@ -59,8 +59,8 @@ void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDes
{
rDesc.Name = rFont.GetFamilyName();
rDesc.StyleName = rFont.GetStyleName();
- rDesc.Width = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Width());
- rDesc.Height = sal::static_int_cast< sal_Int16 >(rFont.GetSize().Height());
+ rDesc.Width = sal::static_int_cast< sal_Int16 >(rFont.GetFontSize().Width());
+ rDesc.Height = sal::static_int_cast< sal_Int16 >(rFont.GetFontSize().Height());
rDesc.Family = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyType());
rDesc.CharSet = rFont.GetCharSet();
rDesc.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch());
diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx
index f06206948d7b..21ccc921856d 100644
--- a/extensions/source/propctrlr/fontdialog.cxx
+++ b/extensions/source/propctrlr/fontdialog.cxx
@@ -494,7 +494,7 @@ namespace pcr
SfxPoolItem** pCounter = _rppDefaults; // want to modify this without affecting the out param _rppDefaults
*pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamilyType(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_FONT);
- *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT);
+ *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetFontHeight(), 100, CFID_HEIGHT);
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT);
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_POSTURE);
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE);
@@ -506,7 +506,7 @@ namespace pcr
*pCounter++ = new SvxEmphasisMarkItem(aDefaultVCLFont.GetEmphasisMark(), CFID_EMPHASIS);
*pCounter++ = new SvxFontItem(aDefaultVCLFont.GetFamilyType(), aDefaultVCLFont.GetFamilyName(), aDefaultVCLFont.GetStyleName(), aDefaultVCLFont.GetPitch(), aDefaultVCLFont.GetCharSet(), CFID_CJK_FONT);
- *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_CJK_HEIGHT);
+ *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetFontHeight(), 100, CFID_CJK_HEIGHT);
*pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_CJK_WEIGHT);
*pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_CJK_POSTURE);
*pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_CJK_LANGUAGE);
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 804819137069..e2a7375f55d1 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -931,7 +931,7 @@ void BubbleWindow::RecalcTextRects()
maTextRect.setHeight( 10 );
aTotalSize.setHeight( maTitleRect.GetHeight() +
- aBoldFont.GetHeight() * 3 / 4 +
+ aBoldFont.GetFontHeight() * 3 / 4 +
maTextRect.GetHeight() +
3 * BUBBLE_BORDER + TIP_HEIGHT );
if ( aTotalSize.Height() > maMaxTextSize.Height() )
@@ -943,7 +943,7 @@ void BubbleWindow::RecalcTextRects()
bFinished = true;
}
maTitleRect.Move( 2*BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT );
- maTextRect.Move( 2*BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT + maTitleRect.GetHeight() + aBoldFont.GetHeight() * 3 / 4 );
+ maTextRect.Move( 2*BUBBLE_BORDER, BUBBLE_BORDER + TIP_HEIGHT + maTitleRect.GetHeight() + aBoldFont.GetFontHeight() * 3 / 4 );
}
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 4c724285203b..2c98e937dc18 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -600,17 +600,17 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
double scale = 1.0;
// scale width if we have a stretched text
- if( 0 != aFont.GetSize().Width() )
+ if( 0 != aFont.GetFontSize().Width() )
{
vcl::Font aTmpFont( aFont );
- aTmpFont.SetWidth(0);
+ aTmpFont.SetAverageFontWidth(0);
mpVDev->SetFont( aTmpFont );
const FontMetric aMetric2( mpVDev->GetFontMetric() );
mpVDev->SetFont( aFont );
- const long n1 = aFont.GetSize().Width();
- const long n2 = aMetric2.GetSize().Width();
+ const long n1 = aFont.GetFontSize().Width();
+ const long n2 = aMetric2.GetFontSize().Width();
scale = (double)n1 / (double)n2;
}
@@ -618,7 +618,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
m.translate( double(aPt.X() / scale), double(aPt.Y()) );
m.scale( scale, scale );
- sal_Int16 nHeight = _Int16( map( Size( 0, aFont.GetHeight() ) ).Height() );
+ sal_Int16 nHeight = _Int16( map( Size( 0, aFont.GetFontHeight() ) ).Height() );
startTag( TAG_DEFINETEXT );
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index 6f668025db51..5c0c098b9072 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -480,8 +480,8 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
for( n = 0; n < nSize; n++ )
{
Point aPoint( rPoly[n] );
- aPoint.X() = static_cast<long>((double(aPoint.X()) * 1024.0 ) / double(aOldFont.GetHeight()));
- aPoint.Y() = static_cast<long>((double(aPoint.Y()) * 1024.0 ) / double(aOldFont.GetHeight()));
+ aPoint.X() = static_cast<long>((double(aPoint.X()) * 1024.0 ) / double(aOldFont.GetFontHeight()));
+ aPoint.Y() = static_cast<long>((double(aPoint.Y()) * 1024.0 ) / double(aOldFont.GetFontHeight()));
rPoly[n] = aPoint;
}
Writer::Impl_addPolygon( maGlyphData, rPoly, true );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index aa0f76b9bf56..16edc2e77148 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -2184,7 +2184,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
long nRotation = maFont.GetOrientation();
ImplWriteTextColor();
- Size aSize = maFont.GetSize();
+ Size aSize = maFont.GetFontSize();
if ( maLastFont != maFont )
{
@@ -2198,7 +2198,7 @@ void PSWriter::ImplSetAttrForText( const Point& rPoint )
ImplDefineFont( "Times", "Italic" );
maLastFont = maFont;
- aSize = maFont.GetSize();
+ aSize = maFont.GetFontSize();
ImplWriteDouble( aSize.Height() );
mpPS->WriteCharPtr( "sf " );
}
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 521c85a619fa..70f89e8c92b8 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -202,7 +202,7 @@ bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle,
aFont.SetColor(aColor);
aFont.SetTransparent(true);
aFont.SetFamily(FAMILY_SWISS);
- aFont.SetSize(Size(0,nHeight));
+ aFont.SetFontSize(Size(0,nHeight));
aFont.SetAlignment(ALIGN_BASELINE);
aFont.SetOrientation(nAngle);
if (aActFont!=aFont) {
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index dd17524bb1b5..05ec943ec754 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -978,7 +978,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
if (pF!=nullptr)
aFont = pF->aFont;
aFont.SetColor(aAttr.aChrCol);
- aFont.SetSize(Size(0,aAttr.aChrCellSize.Height()));
+ aFont.SetFontSize(Size(0,aAttr.aChrCellSize.Height()));
if ( aAttr.nChrAng != 0 )
aFont.SetOrientation(aAttr.nChrAng);
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 63ddfdbc2623..576aff5d2e28 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -1403,7 +1403,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
case 0x000d: // TxSize
{
pPict->ReadUInt16( nUSHORT );
- aActFont.SetSize( Size( 0, (long)nUSHORT ) );
+ aActFont.SetFontSize( Size( 0, (long)nUSHORT ) );
eActMethod=PDM_UNDEFINED;
nDataSize=2;
}
@@ -1873,7 +1873,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile )
aActFont.SetCharSet( GetTextEncoding());
aActFont.SetFamily(FAMILY_SWISS);
- aActFont.SetSize(Size(0,12));
+ aActFont.SetFontSize(Size(0,12));
aActFont.SetAlignment(ALIGN_BASELINE);
aHRes = aVRes = Fraction( 1, 1 );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index a7a6b45b8b53..f36c3c2e0874 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2153,7 +2153,7 @@ bool SdrPowerPointImport::ReadFontCollection()
aFont.SetFamilyName( pFont->aName );
aFont.SetFamily( pFont->eFamily );
aFont.SetPitch( pFont->ePitch );
- aFont.SetHeight( 100 );
+ aFont.SetFontHeight( 100 );
// following block is necessary, because our old PowerPoint export did not set the
// correct charset
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 889d09dee65d..eaa699b0edac 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1074,14 +1074,14 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
{
if (w == 0)
break;
- long nNewHeight = aFont.GetHeight() * nTextWidth / w;
- if( nNewHeight == aFont.GetHeight() )
+ long nNewHeight = aFont.GetFontHeight() * nTextWidth / w;
+ if( nNewHeight == aFont.GetFontHeight() )
{
nNewHeight--;
if( nNewHeight <= 0 )
break;
}
- aFont.SetHeight( nNewHeight );
+ aFont.SetFontHeight( nNewHeight );
pDev->SetFont( aFont );
}
long nTextHeight = pDev->GetTextHeight();
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 6251db00a54a..ebc5513cd7b3 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -195,7 +195,7 @@ void SVGFontExport::implEmbedFont( const vcl::Font& rFont )
ScopedVclPtrInstance< VirtualDevice > pVDev;
vcl::Font aFont( rFont );
- aFont.SetSize( Size( 0, nFontEM ) );
+ aFont.SetFontSize( Size( 0, nFontEM ) );
aFont.SetAlignment( ALIGN_BASELINE );
pVDev->SetMapMode( MAP_100TH_MM );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 441197a56cb7..46b69d9e15fd 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -298,7 +298,7 @@ void SVGAttributeWriter::SetFontAttr( const vcl::Font& rFont )
// Font Size
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontSize,
- OUString::number( rFont.GetHeight() ) + "px" );
+ OUString::number( rFont.GetFontHeight() ) + "px" );
// Font Style
if( rFont.GetItalic() != ITALIC_NONE )
@@ -475,9 +475,9 @@ void SVGTextWriter::implSetCurrentFont()
maCurrentFont = mpVDev->GetFont();
Size aSz;
- implMap( Size( 0, maCurrentFont.GetHeight() ), aSz );
+ implMap( Size( 0, maCurrentFont.GetFontHeight() ), aSz );
- maCurrentFont.SetHeight( aSz.Height() );
+ maCurrentFont.SetFontHeight( aSz.Height() );
}
else
{
@@ -730,12 +730,12 @@ void SVGTextWriter::addFontAttributes( bool bIsTextContainer )
if( maCurrentFont != maParentFont )
{
const OUString& rsCurFontName = maCurrentFont.GetFamilyName();
- long int nCurFontSize = maCurrentFont.GetHeight();
+ long int nCurFontSize = maCurrentFont.GetFontHeight();
FontItalic eCurFontItalic = maCurrentFont.GetItalic();
FontWeight eCurFontWeight = maCurrentFont.GetWeight();
const OUString& rsParFontName = maParentFont.GetFamilyName();
- long int nParFontSize = maParentFont.GetHeight();
+ long int nParFontSize = maParentFont.GetFontHeight();
FontItalic eParFontItalic = maParentFont.GetItalic();
FontWeight eParFontWeight = maParentFont.GetWeight();
@@ -1606,7 +1606,7 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
{
sId += ".bp";
BulletListItemInfo& aBulletListItemInfo = maBulletListItemMap[ sId ];
- aBulletListItemInfo.nFontSize = rFont.GetHeight();
+ aBulletListItemInfo.nFontSize = rFont.GetFontHeight();
aBulletListItemInfo.aColor = aTextColor;
aBulletListItemInfo.aPos = maTextPos;
aBulletListItemInfo.cBulletChar = mcBulletChar;
@@ -3592,9 +3592,9 @@ vcl::Font SVGActionWriter::ImplSetCorrectFontHeight() const
vcl::Font aFont( mpVDev->GetFont() );
Size aSz;
- ImplMap( Size( 0, aFont.GetHeight() ), aSz );
+ ImplMap( Size( 0, aFont.GetFontHeight() ), aSz );
- aFont.SetHeight( aSz.Height() );
+ aFont.SetFontHeight( aSz.Height() );
return aFont;
}
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 8eb2ae6a9343..24c5b0492214 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -440,7 +440,7 @@ namespace frm
m_pVScroll->SetVisibleSize( aViewportPlaygroundLogic.Height() );
// the default height of a text line ....
- long nFontHeight = m_pEngine->GetStandardFont(0).GetSize().Height();
+ long nFontHeight = m_pEngine->GetStandardFont(0).GetFontSize().Height();
// ... is the scroll size for the vertical scrollbar
m_pVScroll->SetLineSize( nFontHeight );
// the viewport width, minus one line, is the page scroll size
@@ -452,7 +452,7 @@ namespace frm
{
m_pHScroll->SetVisibleSize( aViewportPlaygroundLogic.Width() );
- long nFontWidth = m_pEngine->GetStandardFont(0).GetSize().Width();
+ long nFontWidth = m_pEngine->GetStandardFont(0).GetFontSize().Width();
if ( !nFontWidth )
{
m_pViewport->Push( PushFlags::FONT );
diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx
index 11d562722321..0be4acef4a66 100644
--- a/formula/source/ui/dlg/structpg.cxx
+++ b/formula/source/ui/dlg/structpg.cxx
@@ -39,9 +39,9 @@ StructListBox::StructListBox(vcl::Window* pParent, WinBits nBits ):
bActiveFlag=false;
vcl::Font aFont( GetFont() );
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
aSize.Height() -= 2;
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
SetFont( aFont );
}
diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx
index 7fb4d97720bb..38a341b0b0c9 100644
--- a/framework/source/uielement/complextoolbarcontroller.cxx
+++ b/framework/source/uielement/complextoolbarcontroller.cxx
@@ -270,7 +270,7 @@ sal_Int32 ComplexToolbarController::getFontSizePixel( const vcl::Window* pWindow
const vcl::Font& rFont = rSettings.GetAppFont();
// Calculate height of the application font used by window
- sal_Int32 nHeight = sal_Int32( rFont.GetHeight() );
+ sal_Int32 nHeight = sal_Int32( rFont.GetFontHeight() );
::Size aPixelSize = pWindow->LogicToPixel( ::Size( 0, nHeight ), MAP_APPFONT );
return aPixelSize.Height();
}
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 8742451b0891..16d8b8c7e053 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -113,12 +113,12 @@ public:
void SetTransparent( bool bTransparent );
- void SetSize( const Size& );
- const Size& GetSize() const;
- void SetHeight( long nHeight );
- long GetHeight() const;
- void SetWidth( long nWidth );
- long GetWidth() const;
+ void SetFontSize( const Size& );
+ const Size& GetFontSize() const;
+ void SetFontHeight( long nHeight );
+ long GetFontHeight() const;
+ void SetAverageFontWidth( long nWidth );
+ long GetAverageFontWidth() const;
// Prefer LanguageTag over LanguageType
void SetLanguageTag( const LanguageTag & );
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx
index a263fdadd36b..3d9677507704 100644
--- a/include/vcl/metric.hxx
+++ b/include/vcl/metric.hxx
@@ -82,7 +82,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
{
stream << "{"
<< "name=" << "\"" << rMetric.GetFamilyName() << "\""
- << ",size=(" << rMetric.GetSize().Width() << "," << rMetric.GetSize().Height() << ")"
+ << ",size=(" << rMetric.GetFontSize().Width() << "," << rMetric.GetFontSize().Height() << ")"
<< ",ascent=" << rMetric.GetAscent()
<< ",descent=" << rMetric.GetDescent()
<< ",intLeading=" << rMetric.GetInternalLeading()
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index d5477f11442c..f5b47a5fec43 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -518,7 +518,7 @@ void Condition::updateToolbar(const uno::Reference< report::XReportControlFormat
{
vcl::Font aBaseFont( Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetAppFont() );
SvxFont aFont( VCLUnoHelper::CreateFont( _xReportControlFormat->getFontDescriptor(), aBaseFont ) );
- aFont.SetHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetHeight() ), MAP_POINT, MAP_TWIP ).Height());
+ aFont.SetFontHeight( OutputDevice::LogicToLogic( Size( 0, (sal_Int32)aFont.GetFontHeight() ), MAP_POINT, MAP_TWIP ).Height());
aFont.SetEmphasisMark( static_cast< FontEmphasisMark >( _xReportControlFormat->getControlTextEmphasis() ) );
aFont.SetRelief( static_cast< FontRelief >( _xReportControlFormat->getCharRelief() ) );
aFont.SetColor( _xReportControlFormat->getCharColor() );
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 46a56bc480c5..efe32db2776a 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -239,7 +239,7 @@ namespace
aFontItem.PutValue( uno::makeAny( aControlFont ), 0 );
_rItemSet.Put(aFontItem);
- _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, (sal_Int32)aFont.GetHeight()), MAP_POINT, MAP_TWIP).Height(),100,_nFontHeight));
+ _rItemSet.Put(SvxFontHeightItem(OutputDevice::LogicToLogic(Size(0, (sal_Int32)aFont.GetFontHeight()), MAP_POINT, MAP_TWIP).Height(),100,_nFontHeight));
lang::Locale aLocale;
switch(_nWhich)
{
@@ -389,7 +389,7 @@ namespace
if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && dynamic_cast< const SvxFontHeightItem *>( pItem ) != nullptr)
{
const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem);
- aNewFont.SetHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MAP_TWIP, MAP_POINT).Height());
+ aNewFont.SetFontHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MAP_TWIP, MAP_POINT).Height());
}
if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && dynamic_cast< const SvxPostureItem *>( pItem ) != nullptr)
{
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index cd9aae6617cc..0779ad35ca36 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -191,11 +191,11 @@ void testFormats(ScBootstrapFixture* pTest, ScDocument* pDoc, sal_Int32 nFormat)
pPattern = pDoc->GetPattern(0,0,1);
vcl::Font aFont;
pPattern->GetFont(aFont,SC_AUTOCOL_RAW);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetSize().getHeight());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 10", 200l, aFont.GetFontSize().getHeight());
CPPUNIT_ASSERT_EQUAL_MESSAGE("font color should be black", COL_AUTO, aFont.GetColor().GetColor());
pPattern = pDoc->GetPattern(0,1,1);
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, aFont.GetSize().getHeight());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("font size should be 12", 240l, aFont.GetFontSize().getHeight());
pPattern = pDoc->GetPattern(0,2,1);
pPattern->GetFont(aFont, SC_AUTOCOL_RAW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("font should be italic", ITALIC_NORMAL, aFont.GetItalic());
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 01dde573414e..07bd2a647b7d 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -304,7 +304,7 @@ long ScColumn::GetNeededSize(
if ( bBreak && !rOptions.bTotalSize )
{
// limit size for line break
- long nCmp = pDev->GetFont().GetSize().Height() * SC_ROT_BREAK_FACTOR;
+ long nCmp = pDev->GetFont().GetFontSize().Height() * SC_ROT_BREAK_FACTOR;
if ( nHeight > nCmp )
nHeight = nCmp;
}
@@ -485,7 +485,7 @@ long ScColumn::GetNeededSize(
if ( bBreak && !rOptions.bTotalSize )
{
// limit size for line break
- long nCmp = aOldFont.GetSize().Height() * SC_ROT_BREAK_FACTOR;
+ long nCmp = aOldFont.GetFontSize().Height() * SC_ROT_BREAK_FACTOR;
if ( nValue > nCmp )
nValue = nCmp;
}
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index c5a886aa3406..61d88799f775 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -399,11 +399,11 @@ void ScPatternAttr::GetFont(
aDestMode.SetScaleY( aFractOne );
aEffSize = OutputDevice::LogicToLogic( aSize, aSrcMode, aDestMode );
}
- rFont.SetSize( aEffSize );
+ rFont.SetFontSize( aEffSize );
}
else /* if pOutDev != NULL */
{
- rFont.SetSize( Size( 0, (long) nFontHeight ) );
+ rFont.SetFontSize( Size( 0, (long) nFontHeight ) );
}
// determine effective font color
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index ebabba382ed0..505c50808500 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -203,7 +203,7 @@ void XclFontData::FillFromVclFont( const vcl::Font& rFont )
maColor = rFont.GetColor();
SetScUnderline( rFont.GetUnderline() );
mnEscapem = EXC_FONTESC_NONE;
- SetScHeight( rFont.GetSize().Height() );
+ SetScHeight( rFont.GetFontSize().Height() );
SetScWeight( rFont.GetWeight() );
SetScFamily( rFont.GetFamilyType() );
SetFontEncoding( rFont.GetCharSet() );
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index 439caba1b7a2..65d2b5eab4f0 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -315,7 +315,7 @@ static inline void lcl_FillProperty( PropertyValue& rVal, const OUString& rPropN
static void lcl_FillFontAttributes( Sequence< PropertyValue >& rSeq, const vcl::Font& rFont )
{
SvxFontItem aFontItem( rFont.GetFamilyType(), rFont.GetFamilyName(), rFont.GetStyleName(), rFont.GetPitch(), rFont.GetCharSet(), ATTR_FONT );
- SvxFontHeightItem aHeightItem( rFont.GetSize().Height(), 100, ATTR_FONT_HEIGHT );
+ SvxFontHeightItem aHeightItem( rFont.GetFontSize().Height(), 100, ATTR_FONT_HEIGHT );
SvxLanguageItem aLangItem( rFont.GetLanguage(), ATTR_FONT_LANGUAGE );
sal_Int32 nIndex = lcl_ExpandSequence( rSeq, 7 );
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4c4e81147d68..e61945a94842 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1384,7 +1384,7 @@ ScTextWnd::ScTextWnd(ScInputBarGroup* pParent, ScTabViewShell* pViewSh)
// always use application font, so a font with cjk chars can be installed
vcl::Font aAppFont = GetFont();
aTextFont = aAppFont;
- aTextFont.SetSize(PixelToLogic(aAppFont.GetSize(), MAP_TWIP)); // AppFont is in pixels
+ aTextFont.SetFontSize(PixelToLogic(aAppFont.GetFontSize(), MAP_TWIP)); // AppFont is in pixels
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index a167c130d933..bf1e6383abca 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -89,7 +89,7 @@ ScMenuFloatingWindow::ScMenuFloatingWindow(vcl::Window* pParent, ScDocument* pDo
sal_Int32 nScaleFactor = GetDPIScaleFactor();
const sal_uInt16 nPopupFontHeight = 12 * nScaleFactor;
maLabelFont = rStyle.GetLabelFont();
- maLabelFont.SetHeight(nPopupFontHeight);
+ maLabelFont.SetFontHeight(nPopupFontHeight);
}
ScMenuFloatingWindow::~ScMenuFloatingWindow()
@@ -361,14 +361,14 @@ void ScMenuFloatingWindow::drawMenuItem(vcl::RenderContext& rRenderContext, size
DecorationView aDecoView(&rRenderContext);
long nXOffset = 5;
- long nYOffset = (aSize.Height() - maLabelFont.GetHeight())/2;
+ long nYOffset = (aSize.Height() - maLabelFont.GetFontHeight())/2;
rRenderContext. DrawCtrlText(Point(aPos.X()+nXOffset, aPos.Y() + nYOffset), maMenuItems[nPos].maText, 0,
maMenuItems[nPos].maText.getLength(),
maMenuItems[nPos].mbEnabled ? DrawTextFlags::Mnemonic : DrawTextFlags::Disable);
if (maMenuItems[nPos].mpSubMenuWin)
{
- long nFontHeight = maLabelFont.GetHeight();
+ long nFontHeight = maLabelFont.GetFontHeight();
Point aMarkerPos = aPos;
aMarkerPos.Y() += aSize.Height() / 2 - nFontHeight / 4 + 1;
aMarkerPos.X() += aSize.Width() - nFontHeight + nFontHeight / 4;
@@ -723,8 +723,8 @@ void ScMenuFloatingWindow::getMenuItemPosSize(size_t nPos, Point& rPos, Size& rS
const sal_uInt16 nLeftMargin = 5;
const sal_uInt16 nTopMargin = 5;
- const sal_uInt16 nMenuItemHeight = static_cast<sal_uInt16>(maLabelFont.GetHeight()*1.8);
- const sal_uInt16 nSepHeight = static_cast<sal_uInt16>(maLabelFont.GetHeight()*0.8);
+ const sal_uInt16 nMenuItemHeight = static_cast<sal_uInt16>(maLabelFont.GetFontHeight()*1.8);
+ const sal_uInt16 nSepHeight = static_cast<sal_uInt16>(maLabelFont.GetFontHeight()*0.8);
Point aPos1(nLeftMargin, nTopMargin);
rPos = aPos1;
@@ -939,7 +939,7 @@ void ScCheckListMenuWindow::getSectionPosSize(
const long nSingleItemBtnAreaHeight = 32 * nScaleFactor; // height of the middle area below the list box where the single-action buttons are.
const long nBottomBtnAreaHeight = 50 * nScaleFactor; // height of the bottom area where the OK and Cancel buttons are.
const long nBtnWidth = 90 * nScaleFactor;
- const long nLabelHeight = getLabelFont().GetHeight();
+ const long nLabelHeight = getLabelFont().GetFontHeight();
const long nBtnHeight = nLabelHeight * 2;
const long nBottomMargin = 10 * nScaleFactor;
const long nMenuListMargin = 5 * nScaleFactor;
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index a2375a03a838..65d9a541217a 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -123,7 +123,7 @@ void ScDPFieldButton::draw()
vcl::Font aAttrFont;
static_cast<const ScPatternAttr&>(mpDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).
GetFont( aAttrFont, SC_AUTOCOL_BLACK, mpOutDev, &maZoomY );
- aTextFont.SetSize( aAttrFont.GetSize() );
+ aTextFont.SetFontSize( aAttrFont.GetFontSize() );
}
mpOutDev->SetFont(aTextFont);
mpOutDev->SetTextColor(mpStyle->GetButtonTextColor());
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index ce7c978e5694..ab07f6fb1ba1 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -227,7 +227,7 @@ void ScCsvGrid::InitColors()
void ScCsvGrid::InitFonts()
{
maMonoFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_ENGLISH_US, GetDefaultFontFlags::NONE );
- maMonoFont.SetSize( Size( maMonoFont.GetSize().Width(), maHeaderFont.GetSize().Height() ) );
+ maMonoFont.SetFontSize( Size( maMonoFont.GetFontSize().Width(), maHeaderFont.GetFontSize().Height() ) );
/* *** Set edit engine defaults ***
maMonoFont for Latin script, smaller default font for Asian and Complex script. */
@@ -245,7 +245,7 @@ void ScCsvGrid::InitFonts()
aDefSet.Put( aComplexItem );
// set Asian/Complex font size to height of character in Latin font
- sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetSize().Height() );
+ sal_uLong nFontHt = static_cast< sal_uLong >( maMonoFont.GetFontSize().Height() );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CJK ) );
aDefSet.Put( SvxFontHeightItem( nFontHt, 100, EE_CHAR_FONTHEIGHT_CTL ) );
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 302a48cc184d..b5b49315d078 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -116,7 +116,7 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font
if ( pCurData )
{
rFont = rCJKFont = rCTLFont = GetFont();
- Size aFontSize( rFont.GetSize().Width(), 10 * GetDPIScaleFactor() );
+ Size aFontSize( rFont.GetFontSize().Width(), 10 * GetDPIScaleFactor() );
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*> (pCurData->GetItem( nIndex, ATTR_FONT ));
const SvxWeightItem* pWeightItem = static_cast<const SvxWeightItem*> (pCurData->GetItem( nIndex, ATTR_FONT_WEIGHT ));
@@ -145,14 +145,14 @@ void ScAutoFmtPreview::MakeFonts( sal_uInt16 nIndex, vcl::Font& rFont, vcl::Font
#define SETONALLFONTS( MethodName, Value ) \
rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Value );
- SETONALLFONTS( SetUnderline, (FontLineStyle)pUnderlineItem->GetValue() )
- SETONALLFONTS( SetOverline, (FontLineStyle)pOverlineItem->GetValue() )
- SETONALLFONTS( SetStrikeout, (FontStrikeout)pCrossedOutItem->GetValue() )
- SETONALLFONTS( SetOutline, pContourItem->GetValue() )
- SETONALLFONTS( SetShadow, pShadowedItem->GetValue() )
- SETONALLFONTS( SetColor, aColor )
- SETONALLFONTS( SetSize, aFontSize )
- SETONALLFONTS( SetTransparent, true )
+ SETONALLFONTS( SetUnderline, (FontLineStyle)pUnderlineItem->GetValue() )
+ SETONALLFONTS( SetOverline, (FontLineStyle)pOverlineItem->GetValue() )
+ SETONALLFONTS( SetStrikeout, (FontStrikeout)pCrossedOutItem->GetValue() )
+ SETONALLFONTS( SetOutline, pContourItem->GetValue() )
+ SETONALLFONTS( SetShadow, pShadowedItem->GetValue() )
+ SETONALLFONTS( SetColor, aColor )
+ SETONALLFONTS( SetFontSize, aFontSize )
+ SETONALLFONTS( SetTransparent, true )
#undef SETONALLFONTS
}
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index 6040969e8de2..ec05c9168667 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -81,9 +81,9 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
Color aOldFillColor = pDev->GetFillColor();
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
aSize.Height() = nRectHeight*3/5;
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
long nTLX = aBLPos.X() + 5, nTLY = aBLPos.Y() + ( nRectHeight - nItemId )/2;
long nTRX = aBLPos.X() + nRectWidth * 7 / 9 - 15, nTRY = aBLPos.Y() + ( nRectHeight - nItemId )/2;
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 866660b63f0a..9005f8b5b672 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -109,7 +109,7 @@ static void lcl_DrawOneFrame( vcl::RenderContext* pDev, const Rectangle& rInnerP
// everything else from application font
vcl::Font aAppFont = pDev->GetSettings().GetStyleSettings().GetAppFont();
- aAppFont.SetSize( aAttrFont.GetSize() );
+ aAppFont.SetFontSize( aAttrFont.GetFontSize() );
aAppFont.SetAlignment( ALIGN_TOP );
pDev->SetFont( aAppFont );
@@ -1281,14 +1281,14 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
else
{
// find right font size for DrawText
- aFont.SetSize( Size( 0,100 ) );
+ aFont.SetFontSize( Size( 0,100 ) );
rRenderContext.SetFont( aFont );
Size aSize100(rRenderContext.GetTextWidth( aThisPageStr ), rRenderContext.GetTextHeight() );
// 40% of width or 60% of height
long nSizeX = 40 * ( aPageEnd.X() - aPageStart.X() ) / aSize100.Width();
long nSizeY = 60 * ( aPageEnd.Y() - aPageStart.Y() ) / aSize100.Height();
- aFont.SetSize( Size( 0,std::min(nSizeX,nSizeY) ) );
+ aFont.SetFontSize( Size( 0,std::min(nSizeX,nSizeY) ) );
rRenderContext.SetFont( aFont );
// centered output with DrawText
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 6cd5ed5be3c3..75d60d988a7d 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -235,9 +235,9 @@ void ScDrawStringsVars::SetShrinkScale( long nScale, SvtScriptType nScript )
aFraction *= pOutput->aZoomY;
vcl::Font aTmpFont;
pPattern->GetFont( aTmpFont, SC_AUTOCOL_RAW, pFmtDevice, &aFraction, pCondSet, nScript );
- long nNewHeight = aTmpFont.GetHeight();
+ long nNewHeight = aTmpFont.GetFontHeight();
if ( nNewHeight > 0 )
- aFont.SetHeight( nNewHeight );
+ aFont.SetFontHeight( nNewHeight );
// set font and dependent variables as in SetPattern
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index cf82bf897559..ecb50caa53cc 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -348,7 +348,7 @@ void ScTabView::DoResize( const Point& rOffset, const Size& rSize, bool bInner )
const StyleSettings& rStyleSettings = pFrameWin->GetSettings().GetStyleSettings();
- sal_Int32 nTabWidth = pFrameWin->GetFont().GetHeight() + WIDTH_MARGIN;
+ sal_Int32 nTabWidth = pFrameWin->GetFont().GetFontHeight() + WIDTH_MARGIN;
if ( aViewData.GetHSplitMode() != SC_SPLIT_NONE )
{
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 153bf96642b1..47c16c165523 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -244,7 +244,7 @@ void SdDrawDocument::CreateLayoutTemplates()
vcl::Font aBulletFont( SdStyleSheetPool::GetBulletFont() );
- aBulletFont.SetSize(Size(0,635)); // sj: (i33745) changed default from 24 to 18 pt
+ aBulletFont.SetFontSize(Size(0,635)); // sj: (i33745) changed default from 24 to 18 pt
aBulletItem.SetFont(aBulletFont);
aBulletItem.SetSymbol( 0x25CF ); // In points
@@ -1198,7 +1198,7 @@ void SdDrawDocument::SetTextDefaults() const
// BulletItem and BulletFont for Titel and Outline
SvxBulletItem aBulletItem(EE_PARA_BULLET);
vcl::Font aBulletFont( SdStyleSheetPool::GetBulletFont() );
- aBulletFont.SetSize(Size(0,846)); // 24 pt
+ aBulletFont.SetFontSize(Size(0,846)); // 24 pt
aBulletItem.SetFont(aBulletFont);
aBulletItem.SetStyle(SvxBulletStyle::BULLET);
aBulletItem.SetStart(1);
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 359d99ccc976..148cd729ac8d 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -371,7 +371,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
// #i16874# enable kerning by default but only for new documents
rTitleSet.Put( SvxAutoKernItem( true, EE_CHAR_PAIRKERNING ) );
- aBulletFont.SetSize(Size(0,1552)); // 44 pt
+ aBulletFont.SetFontSize(Size(0,1552)); // 44 pt
PutNumBulletItem( pSheet, aBulletFont );
}
@@ -420,7 +420,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
rSubtitleSet.Put(aSvxLRSpaceItem);
vcl::Font aTmpFont( GetBulletFont() );
- aTmpFont.SetSize(Size(0, 1129)); // 32 pt
+ aTmpFont.SetFontSize(Size(0, 1129)); // 32 pt
PutNumBulletItem( pSheet, aTmpFont );
}
@@ -1199,7 +1199,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
- rBulletFont.SetSize(Size(0,846)); // 24 pt
+ rBulletFont.SetFontSize(Size(0,846)); // 24 pt
aNumberFormat.SetBulletFont(&rBulletFont);
aNumRule.SetLevel( i, aNumberFormat );
}
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 63982286c944..b1ad83c474a6 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1411,7 +1411,7 @@ sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry )
vcl::Font aFont;
aFont.SetCharSet( rEntry.CharSet );
aFont.SetFamilyName( rEntry.Original );
- aFont.SetHeight( 100 );
+ aFont.SetFontHeight( 100 );
if ( !pVDev )
pVDev = VclPtr<VirtualDevice>::Create();
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index e0c42c49225a..7ecf96fc617a 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -321,7 +321,7 @@ void AnnotationWindow::InitControls()
AllSettings aSettings = mpMeta->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
vcl::Font aFont = aStyleSettings.GetFieldFont();
- aFont.SetHeight(8);
+ aFont.SetFontHeight(8);
aStyleSettings.SetFieldFont(aFont);
aSettings.SetStyleSettings(aStyleSettings);
mpMeta->SetSettings(aSettings);
@@ -386,9 +386,9 @@ void AnnotationWindow::Rescale()
if ( mpMeta )
{
vcl::Font aFont( mpMeta->GetSettings().GetStyleSettings().GetFieldFont() );
- sal_Int32 nHeight = aFont.GetHeight();
+ sal_Int32 nHeight = aFont.GetFontHeight();
nHeight = nHeight * aMode.GetScaleY().GetNumerator() / aMode.GetScaleY().GetDenominator();
- aFont.SetHeight( nHeight );
+ aFont.SetFontHeight( nHeight );
mpMeta->SetControlFont( aFont );
}
}
diff --git a/sd/source/ui/func/bulmaper.cxx b/sd/source/ui/func/bulmaper.cxx
index 96316eb88945..3f9615a22bae 100644
--- a/sd/source/ui/func/bulmaper.cxx
+++ b/sd/source/ui/func/bulmaper.cxx
@@ -72,7 +72,7 @@ void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet&
const SvxFontHeightItem& rFHItem =
static_cast<const SvxFontHeightItem&>(rSet.Get(GetWhich( (sal_uInt16)nFontHeightID )));
- aMyFont.SetSize(Size(0, rFHItem.GetHeight()));
+ aMyFont.SetFontSize(Size(0, rFHItem.GetHeight()));
const SvxWeightItem& rWItem =
static_cast<const SvxWeightItem&>(rSet.Get(GetWhich( (sal_uInt16)nWeightID )));
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index ecbebd0bb363..85be7aaca1d2 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -476,7 +476,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
vcl::Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
const vcl::Font aOldFont( GetFont() );
- aFont.SetSize( aTextSize );
+ aFont.SetFontSize( aTextSize );
aFont.SetColor( COL_WHITE );
aFont.SetCharSet( aOldFont.GetCharSet() );
aFont.SetLanguage( aOldFont.GetLanguage() );
@@ -545,7 +545,7 @@ void ShowWindow::DrawEndScene()
const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, GetMapMode() ) );
const OUString aText( SdResId( STR_PRES_SOFTEND ) );
- aFont.SetSize( aTextSize );
+ aFont.SetFontSize( aTextSize );
aFont.SetColor( COL_WHITE );
aFont.SetCharSet( aOldFont.GetCharSet() );
aFont.SetLanguage( aOldFont.GetLanguage() );
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index f669b6ad4639..1ae6f92b48c8 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -147,8 +147,8 @@ std::shared_ptr<vcl::Font> Theme::GetFont (
pFont->SetTransparent(true);
pFont->SetWeight(WEIGHT_NORMAL);
{
- const Size aSize (pFont->GetSize());
- pFont->SetSize(Size(aSize.Width()*5/3, aSize.Height()*5/3));
+ const Size aSize (pFont->GetFontSize());
+ pFont->SetFontSize(Size(aSize.Width()*5/3, aSize.Height()*5/3));
}
break;
}
@@ -157,10 +157,10 @@ std::shared_ptr<vcl::Font> Theme::GetFont (
{
// Transform the point size to pixel size.
const MapMode aFontMapMode (MAP_POINT);
- const Size aFontSize (rDevice.LogicToPixel(pFont->GetSize(), aFontMapMode));
+ const Size aFontSize (rDevice.LogicToPixel(pFont->GetFontSize(), aFontMapMode));
// Transform the font size to the logical coordinates of the device.
- pFont->SetSize(rDevice.PixelToLogic(aFontSize));
+ pFont->SetFontSize(rDevice.PixelToLogic(aFontSize));
}
return pFont;
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index fa63de954286..5c6af241911f 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -334,7 +334,7 @@ void PreviewRenderer::PaintSubstitutionText (const OUString& rSubstitutionText)
const vcl::Font& rOriginalFont (mpPreviewDevice->GetFont());
vcl::Font aFont (mpPreviewDevice->GetSettings().GetStyleSettings().GetAppFont());
sal_Int32 nHeight (mpPreviewDevice->PixelToLogic(Size(0,snSubstitutionTextSize)).Height());
- aFont.SetHeight(nHeight);
+ aFont.SetFontHeight(nHeight);
mpPreviewDevice->SetFont (aFont);
// Paint the substitution text.
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 7e635aef641b..361a538d66a2 100644
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -76,7 +76,7 @@ void GraphicViewShell::ArrangeGUIElements()
Size aSize = mpLayerTabBar->GetSizePixel();
const Size aFrameSize (GetViewFrame()->GetWindow().GetOutputSizePixel());
- aSize.Height() = GetParentWindow()->GetFont().GetHeight() + 4;
+ aSize.Height() = GetParentWindow()->GetFont().GetFontHeight() + 4;
aSize.Width() = aFrameSize.Width();
Point aPos (0, maViewSize.Height() - aSize.Height());
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index d3c04c2a77de..7834bf19d8ba 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -129,10 +129,10 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
LanguageType eLang = mrOutliner.GetDefaultLanguage();
maPageNumberFont = OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE );
- maPageNumberFont.SetHeight( 500 );
+ maPageNumberFont.SetFontHeight( 500 );
maBulletFont.SetColor( COL_AUTO );
- maBulletFont.SetHeight( 1000 );
+ maBulletFont.SetFontHeight( 1000 );
maBulletFont.SetCharSet(RTL_TEXTENCODING_MS_1252); // and replacing other values by standard
maBulletFont.SetFamilyName( "StarSymbol" );
maBulletFont.SetWeight(WEIGHT_NORMAL);
@@ -1686,7 +1686,7 @@ IMPL_LINK_TYPED(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo, v
Point aTextPos( aImagePos.X() - aOffset.Width(), pInfo->mrStartPos.Y() );
vcl::Font aNewFont( OutputDevice::GetDefaultFont( DefaultFontType::SANS_UNICODE, eLang, GetDefaultFontFlags::NONE ) );
- aNewFont.SetSize( aFontSz );
+ aNewFont.SetFontSize( aFontSz );
aNewFont.SetVertical( bVertical );
aNewFont.SetOrientation( bVertical ? 2700 : 0 );
aNewFont.SetColor( COL_AUTO );
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 98c6615c4077..482ad6135812 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -379,7 +379,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
static sal_uInt32 nTextSizeFactor(100);
// use a factor to get more linear text size calculations
- aScaledVclFont.SetHeight( 500 * nTextSizeFactor );
+ aScaledVclFont.SetFontHeight( 500 * nTextSizeFactor );
// get basic geometry and get text size
drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
@@ -404,7 +404,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected
vcl::Font aVclFont;
basegfx::B2DVector aTextSizeAttribute;
- aVclFont.SetHeight( 500 );
+ aVclFont.SetFontHeight( 500 );
const drawinglayer::attribute::FontAttribute aFontAttribute(
drawinglayer::primitive2d::getFontAttributeFromVclFont(
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 55f1c07fcbad..c0ec243c184a 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -46,7 +46,7 @@ namespace {
void SetMessageFont(vcl::RenderContext& rRenderContext)
{
vcl::Font aFont(rRenderContext.GetFont());
- aFont.SetHeight(aFont.GetHeight() * 1.3);
+ aFont.SetFontHeight(aFont.GetFontHeight() * 1.3);
rRenderContext.SetFont(aFont);
}
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 6646b6ca9960..f2c448e9feb2 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -298,7 +298,7 @@ void BackingWindow::initControls()
// setup nice colors
mpCreateLabel->SetControlForeground(maButtonsTextColor);
vcl::Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
- aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
+ aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * fMultiplier));
mpCreateLabel->SetControlFont(aFont);
mpHelpButton->SetControlForeground(maButtonsTextColor);
@@ -347,7 +347,7 @@ void BackingWindow::setupButton( PushButton* pButton )
{
// the buttons should have a bit bigger font
vcl::Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont());
- aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
+ aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * fMultiplier));
pButton->SetControlFont(aFont);
// color that fits the theme
@@ -358,7 +358,7 @@ void BackingWindow::setupButton( PushButton* pButton )
void BackingWindow::setupButton( MenuButton* pButton )
{
vcl::Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont());
- aFont.SetSize(Size(0, aFont.GetSize().Height() * fMultiplier));
+ aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * fMultiplier));
pButton->SetControlFont(aFont);
// color that fits the theme
diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx
index 1380dbaf0d31..d5c134250cc0 100644
--- a/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -152,8 +152,8 @@ RehearseTimingsActivity::RehearseTimingsActivity( const SlideShowContext& rConte
mbActive(false),
mbDrawPressed(false)
{
- maFont.SetHeight( maFont.GetHeight() * 2 );
- maFont.SetWidth( maFont.GetWidth() * 2 );
+ maFont.SetFontHeight( maFont.GetFontHeight() * 2 );
+ maFont.SetAverageFontWidth( maFont.GetAverageFontWidth() * 2 );
maFont.SetAlignment( ALIGN_BASELINE );
maFont.SetColor( COL_BLACK );
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();
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 13c14468a50a..84b217d1d095 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -301,10 +301,10 @@ DayOfWeek Calendar::ImplGetWeekStart() const
void Calendar::ImplGetWeekFont( vcl::Font& rFont ) const
{
// weeknumber is displayed in WEEKNUMBER_HEIGHT%-Fontheight
- Size aFontSize = rFont.GetSize();
+ Size aFontSize = rFont.GetFontSize();
aFontSize.Height() *= WEEKNUMBER_HEIGHT;
aFontSize.Height() /= 100;
- rFont.SetSize( aFontSize );
+ rFont.SetFontSize( aFontSize );
rFont.SetWeight( WEIGHT_NORMAL );
}
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 8bd7b594b08a..eb324504f1b3 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1089,7 +1089,7 @@ namespace
{
long nWidth = 0;
- Size aSize( rFont.GetSize() );
+ Size aSize( rFont.GetFontSize() );
//Make sure it fits in the available height
while (aSize.Height() > 0)
@@ -1103,7 +1103,7 @@ namespace
}
aSize.Height() -= EXTRAFONTSIZE;
- rFont.SetSize(aSize);
+ rFont.SetFontSize(aSize);
rDevice.SetFont(rFont);
}
@@ -1129,10 +1129,10 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
Color aTextColor = pRenderContext->GetTextColor();
vcl::Font aOldFont(pRenderContext->GetFont());
- Size aSize( aOldFont.GetSize() );
+ Size aSize( aOldFont.GetFontSize() );
aSize.Height() += EXTRAFONTSIZE;
vcl::Font aFont( rFontMetric );
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
pRenderContext->SetFont(aFont);
pRenderContext->SetTextColor(aTextColor);
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 62c6172c60ff..d5442971c73f 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -134,7 +134,7 @@ void FileControl::StateChanged( StateChangedType nType )
// Only use height of the button, as in HTML
// always Courier is used
vcl::Font aFont = GetButton().GetControlFont();
- aFont.SetSize( GetControlFont().GetSize() );
+ aFont.SetFontSize( GetControlFont().GetFontSize() );
GetButton().SetControlFont( aFont );
}
else if ( nType == StateChangedType::ControlForeground )
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 1a2d257caf58..7491da7f4427 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1052,8 +1052,8 @@ void Ruler::ApplySettings(vcl::RenderContext& rRenderContext)
vcl::Font aFont = rStyleSettings.GetToolFont();
// make the font a bit smaller than default
- Size aSize(adjustSize(aFont.GetSize().Width()), adjustSize(aFont.GetSize().Height()));
- aFont.SetSize(aSize);
+ Size aSize(adjustSize(aFont.GetFontSize().Width()), adjustSize(aFont.GetFontSize().Height()));
+ aFont.SetFontSize(aSize);
ApplyControlFont(rRenderContext, aFont);
@@ -1074,8 +1074,8 @@ void Ruler::ImplInitSettings(bool bFont, bool bForeground, bool bBackground)
{
vcl::Font aFont = rStyleSettings.GetToolFont();
// make the font a bit smaller than default
- Size aSize(adjustSize(aFont.GetSize().Width()), adjustSize(aFont.GetSize().Height()));
- aFont.SetSize(aSize);
+ Size aSize(adjustSize(aFont.GetFontSize().Width()), adjustSize(aFont.GetFontSize().Height()));
+ aFont.SetFontSize(aSize);
ApplyControlFont(*this, aFont);
}
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 307987955451..2fa74ceddc7e 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -638,9 +638,9 @@ void TabBar::ImplInitSettings( bool bFont, bool bBackground )
while (GetTextHeight() > (GetOutputSizePixel().Height() - 1))
{
vcl::Font aFont = GetFont();
- if (aFont.GetHeight() <= 6)
+ if (aFont.GetFontHeight() <= 6)
break;
- aFont.SetHeight(aFont.GetHeight() - 1);
+ aFont.SetFontHeight(aFont.GetFontHeight() - 1);
SetFont(aFont);
}
}
@@ -723,7 +723,7 @@ bool TabBar::ImplCalcWidth()
}
// Padding is dependent on font height - bigger font = bigger padding
- long nFontWidth = aFont.GetHeight();
+ long nFontWidth = aFont.GetFontHeight();
nNewWidth += nFontWidth * 2;
if (pItem->mnWidth != nNewWidth)
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 45176740e8d0..54376d43269e 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1134,10 +1134,10 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// taking care of font width default if scaling metafile.
MetaFontAction* pA = static_cast<MetaFontAction*>(pAct);
vcl::Font aFont( pA->GetFont() );
- if ( !aFont.GetWidth() )
+ if ( !aFont.GetAverageFontWidth() )
{
FontMetric aFontMetric( pOut->GetFontMetric( aFont ) );
- aFont.SetWidth( aFontMetric.GetWidth() );
+ aFont.SetAverageFontWidth( aFontMetric.GetAverageFontWidth() );
pModAct = new MetaFontAction( aFont );
}
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 62fa448254ce..af105c1836bc 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -669,7 +669,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
if( bTiny )
{
// decrease for small images
- aFnt.SetSize( Size( 0, aAppFontSz.Height() * i / 8 ) );
+ aFnt.SetFontSize( Size( 0, aAppFontSz.Height() * i / 8 ) );
pOut->SetFont( aFnt );
}
else
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index d049d7318c21..dde0b1b38c50 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -158,7 +158,7 @@ void CalculateHorizontalScalingFactor( const SdrObject* pCustomShape,
vcl::Font aFont;
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pCustomShape->GetMergedItem( EE_CHAR_FONTINFO ));
- aFont.SetHeight( pCustomShape->GetLogicRect().GetHeight() / rFWData.nMaxParagraphsPerTextArea );
+ aFont.SetFontHeight( pCustomShape->GetLogicRect().GetHeight() / rFWData.nMaxParagraphsPerTextArea );
aFont.SetAlignment( ALIGN_TOP );
aFont.SetFamilyName( rFontItem.GetFamilyName() );
aFont.SetFamily( rFontItem.GetFamily() );
@@ -245,7 +245,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
nFntItm = EE_CHAR_FONTINFO_CJK;
const SvxFontItem& rFontItem = static_cast<const SvxFontItem&>(pCustomShape->GetMergedItem( nFntItm ));
vcl::Font aFont;
- aFont.SetHeight( rFWData.nSingleLineHeight );
+ aFont.SetFontHeight( rFWData.nSingleLineHeight );
aFont.SetAlignment( ALIGN_TOP );
aFont.SetFamilyName( rFontItem.GetFamilyName() );
@@ -337,7 +337,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F
pDXArry.reset(new long[ rText.getLength() ]);
pVirDev->GetTextArray( rText, pDXArry.get());
FontMetric aFontMetric( pVirDev->GetFontMetric() );
- aFont.SetWidth( (sal_Int32)( (double)aFontMetric.GetWidth() * ( (double)100 / (double)nCharScaleWidth ) ) );
+ aFont.SetAverageFontWidth( (sal_Int32)( (double)aFontMetric.GetAverageFontWidth() * ( (double)100 / (double)nCharScaleWidth ) ) );
pVirDev->SetFont( aFont );
}
FWCharacterData aCharacterData;
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
index bd3c81bf8600..c4fe0028b7bd 100644
--- a/svx/source/dialog/charmap.cxx
+++ b/svx/source/dialog/charmap.cxx
@@ -524,7 +524,7 @@ void SvxShowCharSet::InitSettings(vcl::RenderContext& rRenderContext)
vcl::Font aFont(rRenderContext.GetFont());
aFont.SetWeight(WEIGHT_LIGHT);
aFont.SetAlignment(ALIGN_TOP);
- aFont.SetSize(maFontSize);
+ aFont.SetFontSize(maFontSize);
aFont.SetTransparent(true);
rRenderContext.SetFont(aFont);
@@ -559,7 +559,7 @@ void SvxShowCharSet::RecalculateFont(vcl::RenderContext& rRenderContext)
aFont.SetAlignment(ALIGN_TOP);
int nFontHeight = (aSize.Height() - 5) * 2 / (3 * ROW_COUNT);
maFontSize = rRenderContext.PixelToLogic(Size(0, nFontHeight));
- aFont.SetSize(maFontSize);
+ aFont.SetFontSize(maFontSize);
aFont.SetTransparent(true);
rRenderContext.SetFont(aFont);
rRenderContext.GetFontCharMap(mxFontCharMap);
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx
index 77f62b1b4fc4..c1f7eba13e61 100644
--- a/svx/source/dialog/dialcontrol.cxx
+++ b/svx/source/dialog/dialcontrol.cxx
@@ -470,7 +470,7 @@ void DialControl::Init( const Size& rWinSize )
vcl::Font aFont( OutputDevice::GetDefaultFont(
DefaultFontType::UI_SANS, Application::GetSettings().GetUILanguageTag().getLanguageType(), GetDefaultFontFlags::OnlyOne ) );
- aFont.SetHeight(aDefaultSize.GetHeight());
+ aFont.SetFontHeight(aDefaultSize.GetFontHeight());
Init( rWinSize, aFont );
}
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 23fcff86a175..aa55415b7fe9 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -85,8 +85,8 @@ namespace
{
void scaleFontWidth(vcl::Font& rFont, vcl::RenderContext& rRenderContext,long& n100PercentFont)
{
- rFont.SetWidth(0);
- n100PercentFont = rRenderContext.GetFontMetric(rFont).GetWidth();
+ rFont.SetAverageFontWidth(0);
+ n100PercentFont = rRenderContext.GetFontMetric(rFont).GetAverageFontWidth();
}
void initFont(vcl::Font& rFont)
@@ -97,10 +97,10 @@ void initFont(vcl::Font& rFont)
void setFontSize(vcl::Font& rFont)
{
- Size aSize(rFont.GetSize());
+ Size aSize(rFont.GetFontSize());
aSize.Height() = (aSize.Height() * 3) / 5;
aSize.Width() = (aSize.Width() * 3) / 5;
- rFont.SetSize(aSize);
+ rFont.SetFontSize(aSize);
}
void calcFontHeightAnyAscent(vcl::RenderContext& rRenderContext, const vcl::Font& rFont, long& nHeight, long& nAscent)
@@ -446,9 +446,9 @@ void FontPrevWin_Impl::ScaleFontWidth(vcl::RenderContext& rOutDev)
scaleFontWidth(maCTLFont, rOutDev, mn100PercentFontWidthCTL);
}
- maFont.SetWidth(mn100PercentFontWidth * mnFontWidthScale / 100);
- maCJKFont.SetWidth(mn100PercentFontWidthCJK * mnFontWidthScale / 100);
- maCTLFont.SetWidth(mn100PercentFontWidthCTL * mnFontWidthScale / 100);
+ maFont.SetAverageFontWidth(mn100PercentFontWidth * mnFontWidthScale / 100);
+ maCJKFont.SetAverageFontWidth(mn100PercentFontWidthCJK * mnFontWidthScale / 100);
+ maCTLFont.SetAverageFontWidth(mn100PercentFontWidthCTL * mnFontWidthScale / 100);
}
void SvxFontPrevWindow::ResetSettings(bool bForeground, bool bBackground)
@@ -763,7 +763,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
if (IsTwoLines())
{
SvxFont aSmallFont(rFont);
- Size aOldSize = pImpl->maCJKFont.GetSize();
+ Size aOldSize = pImpl->maCJKFont.GetFontSize();
setFontSize(aSmallFont);
setFontSize(pImpl->maCJKFont);
@@ -811,7 +811,7 @@ void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangl
OUString sBracket(pImpl->mcEndBracket);
rFont.DrawPrev(&rRenderContext, pPrinter, aTmpPoint, sBracket);
}
- pImpl->maCJKFont.SetSize(aOldSize);
+ pImpl->maCJKFont.SetFontSize(aOldSize);
}
else
{
@@ -914,7 +914,7 @@ void SvxFontPrevWindow::SetFontSize( const SfxItemSet& rSet, sal_uInt16 nSlot, S
else
nH = 240;// as default 12pt
- rFont.SetSize(Size(0, nH));
+ rFont.SetFontSize(Size(0, nH));
}
void SvxFontPrevWindow::SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont)
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index 4f14fa4613d4..079c994e8d13 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -251,9 +251,9 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
{
Point aPos;
vcl::Font aFont(rRenderContext.GetFont());
- const Size aSaveSize = aFont.GetSize();
+ const Size aSaveSize = aFont.GetFontSize();
Size aDrawSize(0,aRect.GetHeight() / 6);
- aFont.SetSize(aDrawSize);
+ aFont.SetFontSize(aDrawSize);
rRenderContext.SetFont(aFont);
OUString sText("ABC");
Point aMove(1, rRenderContext.GetTextHeight());
@@ -308,7 +308,7 @@ void SvxPageWindow::DrawPage(vcl::RenderContext& rRenderContext, const Point& rO
aPos.Y() += aMove.Y();
}
}
- aFont.SetSize(aSaveSize);
+ aFont.SetFontSize(aSaveSize);
rRenderContext.SetFont(aFont);
}
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 1dffa9b54b24..ae9c7a947e73 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -803,7 +803,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*r
Size aWinSize = rRenderContext.GetOutputSize();
vcl::Font aSaveFont = rRenderContext.GetFont();
- aSaveFont.SetHeight(aWinSize.Height() / 4);
+ aSaveFont.SetFontHeight(aWinSize.Height() / 4);
rRenderContext.SetFont(aSaveFont);
Rectangle aRect(Point(0, 0), aWinSize);
@@ -818,7 +818,7 @@ void RubyPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*r
long nBaseWidth = rRenderContext.GetTextWidth(sBaseText);
vcl::Font aRubyFont(aSaveFont);
- aRubyFont.SetHeight(aRubyFont.GetHeight() * 70 / 100);
+ aRubyFont.SetFontHeight(aRubyFont.GetFontHeight() * 70 / 100);
rRenderContext.SetFont(aRubyFont);
long nRubyWidth = rRenderContext.GetTextWidth(sRubyText);
rRenderContext.SetFont(aSaveFont);
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 953f062a2095..e4d48afbcf6b 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -153,11 +153,11 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
vcl::Font aFont(OutputDevice::GetDefaultFont(
DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
vcl::Font aRuleFont( lcl_GetDefaultBulletFont() );
aSize.Height() = nRectHeight/6;
- aRuleFont.SetSize(aSize);
+ aRuleFont.SetFontSize(aSize);
aRuleFont.SetColor(aTextColor);
aRuleFont.SetFillColor(aBackColor);
if(ePageType == NumberingPageType::BULLET)
@@ -168,7 +168,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
}
aFont.SetColor(aTextColor);
aFont.SetFillColor(aBackColor);
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
pDev->SetFont(aFont);
if(!pVDev)
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index 0773a1407754..5c4fc1b27fae 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -175,13 +175,13 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
if (nAnchor == TextContentAnchorType_AS_CHARACTER)
{
- aFont.SetSize(Size(0, aParaPrtArea.GetHeight() - 2));
+ aFont.SetFontSize(Size(0, aParaPrtArea.GetHeight() - 2));
SetFont(aFont);
aParaPrtArea.SetSize(Size(GetTextWidth(DEMOTEXT), GetTextHeight()));
}
else
{
- aFont.SetSize(Size(0, aParaPrtArea.GetHeight() / 2));
+ aFont.SetFontSize(Size(0, aParaPrtArea.GetHeight() / 2));
rRenderContext.SetFont(aFont);
aAutoCharFrame.SetSize(Size(GetTextWidth(OUString('A')), GetTextHeight()));
aAutoCharFrame.SetPos(Point(aParaPrtArea.Left() + (aParaPrtArea.GetWidth() - aAutoCharFrame.GetWidth()) / 2,
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 5e63d62a3334..507df1631cdc 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -84,8 +84,8 @@ css::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont )
css::awt::FontDescriptor aFD;
aFD.Name = rFont.GetFamilyName();
aFD.StyleName = rFont.GetStyleName();
- aFD.Height = (sal_Int16)rFont.GetSize().Height();
- aFD.Width = (sal_Int16)rFont.GetSize().Width();
+ aFD.Height = (sal_Int16)rFont.GetFontSize().Height();
+ aFD.Width = (sal_Int16)rFont.GetFontSize().Width();
aFD.Family = (sal_Int16)rFont.GetFamilyType();
aFD.CharSet = rFont.GetCharSet();
aFD.Pitch = (sal_Int16)rFont.GetPitch();
@@ -107,7 +107,7 @@ vcl::Font ImplCreateFont( const css::awt::FontDescriptor& rDescr )
vcl::Font aFont;
aFont.SetFamilyName( rDescr.Name );
aFont.SetStyleName( rDescr.StyleName );
- aFont.SetSize( ::Size( rDescr.Width, rDescr.Height ) );
+ aFont.SetFontSize( ::Size( rDescr.Width, rDescr.Height ) );
aFont.SetFamily( (FontFamily)rDescr.Family );
aFont.SetCharSet( (rtl_TextEncoding)rDescr.CharSet );
aFont.SetPitch( (FontPitch)rDescr.Pitch );
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 5348090cbb11..db84d3073e2a 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -446,7 +446,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
{
vcl::Font aApplFont (m_aAbsolute->GetFont());
const Size pointAbsoluteSize(m_aAbsolute->PixelToLogic( Size( 0, nH - 2 ), MapMode(MAP_POINT) ));
- aApplFont.SetSize( pointAbsoluteSize );
+ aApplFont.SetFontSize( pointAbsoluteSize );
m_aAbsolute->SetControlFont( aApplFont );
aApplFont.SetTransparent( true );
diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx
index 2d41152032c0..a260709bb678 100644
--- a/svx/source/sidebar/line/LineWidthValueSet.cxx
+++ b/svx/source/sidebar/line/LineWidthValueSet.cxx
@@ -98,9 +98,9 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt )
Color aOldFillColor = pDev->GetFillColor();
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
aSize.Height() = nRectHeight*3/5;
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
Point aLineStart(aBLPos.X() + 5, aBLPos.Y() + ( nRectHeight - nItemId )/2);
Point aLineEnd(aBLPos.X() + nRectWidth * 7 / 9 - 10, aBLPos.Y() + ( nRectHeight - nItemId )/2);
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index d2c9943113e5..440ea416dc94 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -155,9 +155,9 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
vcl::Font aFont(OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, MsLangId::getSystemLanguage(), GetDefaultFontFlags::OnlyOne));
{
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
aSize.Height() = (nRectHeight*4)/9;
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
}
{
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index b67864354468..49f884abf470 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -146,7 +146,7 @@ bool CommonStylePreviewRenderer::recalculate()
const SvxFontHeightItem* pFontHeightItem = static_cast<const SvxFontHeightItem*>(pItem);
Size aFontSize(0, pFontHeightItem->GetHeight());
maPixelSize = Size(mrOutputDev.LogicToPixel(aFontSize, mrShell.GetMapUnit()));
- pFont->SetSize(maPixelSize);
+ pFont->SetFontSize(maPixelSize);
vcl::Font aOldFont(mrOutputDev.GetFont());
@@ -158,7 +158,7 @@ bool CommonStylePreviewRenderer::recalculate()
double ratio = double(mnMaxHeight) / aTextRect.Bottom();
maPixelSize.Width() *= ratio;
maPixelSize.Height() *= ratio;
- pFont->SetSize(maPixelSize);
+ pFont->SetFontSize(maPixelSize);
}
mrOutputDev.SetFont(aOldFont);
}
@@ -202,7 +202,7 @@ bool CommonStylePreviewRenderer::render(const Rectangle& aRectangle, RenderAlign
if (maFontColor != COL_AUTO)
mrOutputDev.SetTextColor(maFontColor);
- Size aPixelSize((m_pFont) ? maPixelSize : mrOutputDev.GetFont().GetSize());
+ Size aPixelSize((m_pFont) ? maPixelSize : mrOutputDev.GetFont().GetFontSize());
Point aFontDrawPosition = aRectangle.TopLeft();
if (eRenderAlign == RenderAlign::CENTER)
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index ace66d914d70..0f44f35cd274 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -406,7 +406,7 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr
if(bText && mbFntDirty)
{
vcl::Font aFnt(mpVD->GetFont());
- const sal_uInt32 nHeight(FRound(aFnt.GetSize().Height() * mfScaleY));
+ const sal_uInt32 nHeight(FRound(aFnt.GetFontSize().Height() * mfScaleY));
mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO ) );
mpTextAttr->Put( SvxFontItem( aFnt.GetFamilyType(), aFnt.GetFamilyName(), aFnt.GetStyleName(), aFnt.GetPitch(), aFnt.GetCharSet(), EE_CHAR_FONTINFO_CJK ) );
@@ -1005,7 +1005,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt
pText->SetMergedItem ( makeSdrTextRightDistItem (0));
pText->SetMergedItem ( makeSdrTextLeftDistItem (0));
- if ( aFnt.GetWidth() || ( rAct.GetType() == MetaActionType::STRETCHTEXT ) )
+ if ( aFnt.GetAverageFontWidth() || ( rAct.GetType() == MetaActionType::STRETCHTEXT ) )
{
pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH );
pText->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) );
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 3656b9e6d3c6..64bb308c320e 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -915,10 +915,10 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS
vcl::Font aFontMerk(pOut->GetFont());
vcl::Font aTmpFont( OutputDevice::GetDefaultFont( DefaultFontType::SERIF, LANGUAGE_SYSTEM, GetDefaultFontFlags::OnlyOne ) );
- aTmpFont.SetSize(Size(0,100));
+ aTmpFont.SetFontSize(Size(0,100));
pOut->SetFont(aTmpFont);
Size aSize1(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
- aTmpFont.SetSize(Size(800,100));
+ aTmpFont.SetFontSize(Size(800,100));
pOut->SetFont(aTmpFont);
Size aSize2(pOut->GetTextWidth(aTestString), pOut->GetTextHeight());
pOut->SetFont(aFontMerk);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6bcb4a32f4e4..b544df07f90c 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -578,10 +578,10 @@ bool SvxStyleBox_Impl::AdjustFontForItemHeight(OutputDevice* pDevice, Rectangle&
// the text does not fit, adjust the font size
double ratio = static_cast< double >( nHeight ) / rTextRect.Bottom();
vcl::Font aFont(pDevice->GetFont());
- Size aPixelSize(aFont.GetSize());
+ Size aPixelSize(aFont.GetFontSize());
aPixelSize.Width() *= ratio;
aPixelSize.Height() *= ratio;
- aFont.SetSize(aPixelSize);
+ aFont.SetFontSize(aPixelSize);
pDevice->SetFont(aFont);
return true;
}
@@ -659,7 +659,7 @@ void SvxStyleBox_Impl::SetupEntry(vcl::RenderContext& rRenderContext, vcl::Windo
SvxFont aFont;
aFont.SetFamilyName(pFontItem->GetFamilyName());
aFont.SetStyleName(pFontItem->GetStyleName());
- aFont.SetSize(aPixelSize);
+ aFont.SetFontSize(aPixelSize);
const SfxPoolItem *pItem = pItemSet->GetItem( SID_ATTR_CHAR_WEIGHT );
if ( pItem )
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx
index 22ea34f2b70f..9d9bb13037b7 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -198,7 +198,7 @@ void SvxFontSizeBox_Impl::UpdateFont( const css::awt::FontDescriptor& rCurrentFo
FontMetric _aFontMetric;
_aFontMetric.SetFamilyName( rCurrentFont.Name );
_aFontMetric.SetStyleName( rCurrentFont.StyleName );
- _aFontMetric.SetHeight( rCurrentFont.Height );
+ _aFontMetric.SetFontHeight( rCurrentFont.Height );
Fill( &_aFontMetric, _pFontList );
}
else
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index 5df3acf3b48f..e5608e5d65c7 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -280,7 +280,7 @@ public:
sal_uInt8 GetPropr() const { return m_aSub[m_nActual].GetPropr(); }
FontItalic GetItalic() const { return m_aSub[m_nActual].GetItalic(); }
LanguageType GetLanguage() const { return m_aSub[m_nActual].GetLanguage(); }
- long GetHeight() const { return m_aSub[m_nActual].GetSize().Height(); }
+ long GetHeight() const { return m_aSub[m_nActual].GetFontSize().Height(); }
FontWeight GetWeight() const { return m_aSub[m_nActual].GetWeight(); }
FontEmphasisMark GetEmphasisMark() const
{ return m_aSub[m_nActual].GetEmphasisMark(); }
@@ -293,7 +293,7 @@ public:
inline rtl_TextEncoding GetCharSet( const sal_uInt8 nWhich ) const
{ return m_aSub[nWhich].GetCharSet(); }
inline long GetHeight( const sal_uInt8 nWhich ) const
- { return m_aSub[nWhich].GetSize().Height(); }
+ { return m_aSub[nWhich].GetFontSize().Height(); }
// makes the logical font be effective in the OutputDevice
void ChgPhysFnt( SwViewShell *pSh, OutputDevice& rOut );
@@ -715,10 +715,10 @@ inline void SwSubFont::SetSize( const Size& rSize )
{
m_aSize = rSize;
if ( GetPropr() == 100 )
- Font::SetSize( m_aSize );
+ Font::SetFontSize( m_aSize );
else
{
- Font::SetSize( Size(
+ Font::SetFontSize( Size(
(long) m_aSize.Width() * GetPropr() / 100L,
(long) m_aSize.Height() * GetPropr() / 100L ) );
}
@@ -748,7 +748,7 @@ inline void SwFont::SetActual( sal_uInt8 nNew )
inline void SwSubFont::SetProportion( const sal_uInt8 nNewPropr )
{
m_pMagic = nullptr;
- Font::SetSize( Size( (long) m_aSize.Width() * nNewPropr / 100L,
+ Font::SetFontSize( Size( (long) m_aSize.Width() * nNewPropr / 100L,
(long) m_aSize.Height() * nNewPropr / 100L ) );
SvxFont::SetPropr( nNewPropr );
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 07d0bc0fc814..80443c8394a3 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3849,7 +3849,7 @@ void SwColumnFrame::PaintBreak( ) const
basegfx::B2DVector aFontSize;
OutputDevice* pOut = gProp.pSGlobalShell->GetOut();
vcl::Font aFont = pOut->GetSettings().GetStyleSettings().GetToolFont();
- aFont.SetHeight( 8 * 20 );
+ aFont.SetFontHeight( 8 * 20 );
pOut->SetFont( aFont );
drawinglayer::attribute::FontAttribute aFontAttr = drawinglayer::primitive2d::getFontAttributeFromVclFont(
aFontSize, aFont, false, false );
@@ -7367,7 +7367,7 @@ const vcl::Font& SwPageFrame::GetEmptyPageFont()
if ( nullptr == pEmptyPgFont )
{
pEmptyPgFont = new vcl::Font;
- pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt
+ pEmptyPgFont->SetFontSize( Size( 0, 80 * 20 )); // == 80 pt
pEmptyPgFont->SetWeight( WEIGHT_BOLD );
pEmptyPgFont->SetStyleName( aEmptyOUStr );
pEmptyPgFont->SetFamilyName("Helvetica");
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 792638dac411..d8f8a759168b 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -1172,7 +1172,7 @@ bool SwCombinedPortion::Format( SwTextFormatInfo &rInf )
{
rInf.GetOut()->SetFont( rInf.GetFont()->GetFnt( aScrType[i] ) );
aWidth[ aScrType[i] ] =
- static_cast<sal_uInt16>(2 * rInf.GetOut()->GetFontMetric().GetSize().Width() / 3);
+ static_cast<sal_uInt16>(2 * rInf.GetOut()->GetFontMetric().GetFontSize().Width() / 3);
}
}
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index e0910e20be20..4389f10b293e 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -148,12 +148,12 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt )
((OutputDevice&)rPrt).SetFont( aFont );
const FontMetric aWinMet( rPrt.GetFontMetric() );
((OutputDevice&)rPrt).SetFont( aOldFnt );
- long nWidth = ( aWinMet.GetSize().Width() * nPropWidth ) / 100;
+ long nWidth = ( aWinMet.GetFontSize().Width() * nPropWidth ) / 100;
if( !nWidth )
++nWidth;
pPrtFont = new vcl::Font( aFont );
- pPrtFont->SetSize( Size( nWidth, aFont.GetSize().Height() ) );
+ pPrtFont->SetFontSize( Size( nWidth, aFont.GetFontSize().Height() ) );
pScrFont = nullptr;
}
}
@@ -515,7 +515,7 @@ void SwFntObj::GuessLeading( const SwViewShell&
const vcl::Font aOldFnt( pWin->GetFont() );
pWin->SetFont( *pPrtFont );
const FontMetric aWinMet( pWin->GetFontMetric() );
- const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() );
+ const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetFontSize().Height() );
if( pPrtFont->GetFamilyName().indexOf( aWinMet.GetFamilyName() ) != -1 )
{
// If the Leading on the Window is also 0, then it has to stay
@@ -1059,7 +1059,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
lcl_IsMonoSpaceFont( *(rInf.GetpOut()) ) )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
- rInf.GetKanaComp(), (sal_uInt16)aFont.GetSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ) , &aTextOriginPos );
+ rInf.GetKanaComp(), (sal_uInt16)aFont.GetFontSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ) , &aTextOriginPos );
bSpecialJust = true;
}
///Asian Justification
@@ -1230,7 +1230,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (sal_uInt16)aFont.GetSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTextOriginPos );
+ (sal_uInt16)aFont.GetFontSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTextOriginPos );
bSpecialJust = true;
}
@@ -1440,10 +1440,10 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
Point aTmpPos( aTextOriginPos );
pSI->Compress( pScrArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (sal_uInt16)aFont.GetSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTmpPos );
+ (sal_uInt16)aFont.GetFontSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTmpPos );
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (sal_uInt16)aFont.GetSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTextOriginPos );
+ (sal_uInt16)aFont.GetFontSize().Height(), lcl_IsFullstopCentered( rInf.GetOut() ), &aTextOriginPos );
}
// Asian Justification
@@ -1657,7 +1657,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if( rInf.GetLen() )
{
long nHght = rInf.GetOut().LogicToPixel(
- pPrtFont->GetSize() ).Height();
+ pPrtFont->GetFontSize() ).Height();
if( WRONG_SHOW_MIN < nHght )
{
if ( rInf.GetOut().GetConnectMetaFile() )
@@ -1736,9 +1736,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
// draw them BEFORE the grammar check lines to 'override' the latter in case of conflict.
// reason: some grammar errors can only be found if spelling errors are fixed,
// therefore we don't want the user to miss a spelling error.
- lcl_DrawLineForWrongListData( aForbidden, rInf, rInf.GetWrong(), aCalcLinePosData, pPrtFont->GetSize() );
+ lcl_DrawLineForWrongListData( aForbidden, rInf, rInf.GetWrong(), aCalcLinePosData, pPrtFont->GetFontSize() );
// draw wave line for grammar check errors
- lcl_DrawLineForWrongListData( aForbidden, rInf, rInf.GetGrammarCheck(), aCalcLinePosData, pPrtFont->GetSize() );
+ lcl_DrawLineForWrongListData( aForbidden, rInf, rInf.GetGrammarCheck(), aCalcLinePosData, pPrtFont->GetFontSize() );
}
}
@@ -1932,7 +1932,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
if( bCompress )
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (sal_uInt16)aFont.GetSize().Height() ,lcl_IsFullstopCentered( rInf.GetOut() ) ) );
+ (sal_uInt16)aFont.GetFontSize().Height() ,lcl_IsFullstopCentered( rInf.GetOut() ) ) );
else
rInf.SetKanaDiff( 0 );
@@ -1995,7 +1995,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
rInf.GetIdx(), nLn );
rInf.SetKanaDiff( rInf.GetScriptInfo()->Compress( pKernArray,
rInf.GetIdx(), nLn, rInf.GetKanaComp(),
- (sal_uInt16) aFont.GetSize().Height() ,lcl_IsFullstopCentered( rInf.GetOut() ) ) );
+ (sal_uInt16) aFont.GetFontSize().Height() ,lcl_IsFullstopCentered( rInf.GetOut() ) ) );
aTextSize.Width() = pKernArray[ nLn - 1 ];
delete[] pKernArray;
}
@@ -2055,7 +2055,7 @@ sal_Int32 SwFntObj::GetCursorOfst( SwDrawTextInfo &rInf )
{
pSI->Compress( pKernArray, rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
- (sal_uInt16) aFont.GetSize().Height(),
+ (sal_uInt16) aFont.GetFontSize().Height(),
lcl_IsFullstopCentered( rInf.GetOut() ) );
}
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 012e913f1975..29e6ae4f23fc 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -502,7 +502,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
m_aSub[SW_LATIN].SvxFont::SetPropr( 100 );
- m_aSub[SW_LATIN].m_aSize = m_aSub[SW_LATIN].Font::GetSize();
+ m_aSub[SW_LATIN].m_aSize = m_aSub[SW_LATIN].Font::GetFontSize();
Size aTmpSize = m_aSub[SW_LATIN].m_aSize;
aTmpSize.Height() = pHeight->GetHeight();
m_aSub[SW_LATIN].SetSize( aTmpSize );
@@ -532,7 +532,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
m_aSub[SW_CJK].SvxFont::SetPropr( 100 );
- m_aSub[SW_CJK].m_aSize = m_aSub[SW_CJK].Font::GetSize();
+ m_aSub[SW_CJK].m_aSize = m_aSub[SW_CJK].Font::GetFontSize();
Size aTmpSize = m_aSub[SW_CJK].m_aSize;
aTmpSize.Height() = pHeight->GetHeight();
m_aSub[SW_CJK].SetSize( aTmpSize );
@@ -568,7 +568,7 @@ void SwFont::SetDiffFnt( const SfxItemSet *pAttrSet,
{
const SvxFontHeightItem *pHeight = static_cast<const SvxFontHeightItem *>(pItem);
m_aSub[SW_CTL].SvxFont::SetPropr( 100 );
- m_aSub[SW_CTL].m_aSize = m_aSub[SW_CTL].Font::GetSize();
+ m_aSub[SW_CTL].m_aSize = m_aSub[SW_CTL].Font::GetFontSize();
Size aTmpSize = m_aSub[SW_CTL].m_aSize;
aTmpSize.Height() = pHeight->GetHeight();
m_aSub[SW_CTL].SetSize( aTmpSize );
@@ -1035,7 +1035,7 @@ sal_uInt16 SwSubFont::CalcEscHeight( const sal_uInt16 nOldHeight,
short SwSubFont::_CheckKerning( )
{
- short nKernx = - short( Font::GetSize().Height() / 6 );
+ short nKernx = - short( Font::GetFontSize().Height() / 6 );
if ( nKernx < GetFixKerning() )
return GetFixKerning();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 7ec09795fc46..2dff4a4eaefe 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5356,7 +5356,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
vcl::Font aFont = numfunc::GetDefBulletFont();
- int nHeight = aFont.GetHeight() * 12;
+ int nHeight = aFont.GetFontHeight() * 12;
Size aPrefSize( aGraphic.GetPrefSize());
if (aPrefSize.Height() * aPrefSize.Width() != 0 )
{
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 35f27d39e2c6..c62886f21fd3 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2360,11 +2360,11 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
case RES_CHRATR_FONTSIZE:
{
- Size aSize( aFont.GetSize().Width(),
+ Size aSize( aFont.GetFontSize().Width(),
static_cast<const SvxFontHeightItem*>(pItem)->GetHeight() );
aTmp <<= ((float)aSize.Height()) / 20.0;
- aFont.SetSize(OutputDevice::LogicToLogic(aSize, MAP_TWIP,
+ aFont.SetFontSize(OutputDevice::LogicToLogic(aSize, MAP_TWIP,
MAP_100TH_MM));
}
break;
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 3a2afb8b4e22..9a1a94086dc7 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -312,9 +312,9 @@ void SwDropCapsPict::UpdatePaintSettings()
}
mnTextH = mnLines * mnTotLineH;
- aFont.SetSize(Size(0, mnTextH));
- maCJKFont.SetSize(Size(0, mnTextH));
- maCTLFont.SetSize(Size(0, mnTextH));
+ aFont.SetFontSize(Size(0, mnTextH));
+ maCJKFont.SetFontSize(Size(0, mnTextH));
+ maCTLFont.SetFontSize(Size(0, mnTextH));
aFont.SetTransparent(true);
maCJKFont.SetTransparent(true);
@@ -328,11 +328,11 @@ void SwDropCapsPict::UpdatePaintSettings()
maCJKFont.SetFillColor(GetSettings().GetStyleSettings().GetWindowColor());
maCTLFont.SetFillColor(GetSettings().GetStyleSettings().GetWindowColor());
- maCJKFont.SetSize(Size(0, maCJKFont.GetSize().Height()));
- maCTLFont.SetSize(Size(0, maCTLFont.GetSize().Height()));
+ maCJKFont.SetFontSize(Size(0, maCJKFont.GetFontSize().Height()));
+ maCTLFont.SetFontSize(Size(0, maCTLFont.GetFontSize().Height()));
SetFont(aFont);
- aFont.SetSize(Size(0, aFont.GetSize().Height()));
+ aFont.SetFontSize(Size(0, aFont.GetFontSize().Height()));
SetFont(aFont);
maFont = aFont;
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 49c63a885b20..0bb49e74f310 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -409,7 +409,7 @@ void SwCaptionPreview::ApplySettings(vcl::RenderContext& rRenderContext)
if (!mbFontInitialized)
{
maFont = vcl::Font(rRenderContext.GetFont());
- maFont.SetHeight(maFont.GetHeight() * 120 / 100);
+ maFont.SetFontHeight(maFont.GetFontHeight() * 120 / 100);
mbFontInitialized = true;
}
rRenderContext.SetFont(maFont);
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 2c0c8d13938e..22742be8613d 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2267,9 +2267,9 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
vcl::Font aCTLFont( OutputDevice::GetDefaultFont( DefaultFontType::CTL_TEXT, eLangType,
GetDefaultFontFlags::OnlyOne, &rExampleWin ) );
const Size aDefSize( 0, 12 );
- aFont.SetSize( aDefSize );
- aCJKFont.SetSize( aDefSize );
- aCTLFont.SetSize( aDefSize );
+ aFont.SetFontSize( aDefSize );
+ aCJKFont.SetFontSize( aDefSize );
+ aCTLFont.SetFontSize( aDefSize );
aFont.SetFillColor( aBackCol );
aCJKFont.SetFillColor( aBackCol );
@@ -2284,8 +2284,8 @@ void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin)
rCTLFont = aCTLFont;
const Size aNewSize( 0, rExampleWin.GetOutputSize().Height() * 2 / 3 );
- rFont.SetSize( aNewSize );
- rCJKFont.SetSize( aNewSize );
+ rFont.SetFontSize( aNewSize );
+ rCJKFont.SetFontSize( aNewSize );
rExampleWin.SetFont( rFont, rCJKFont,rCTLFont );
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 20c8d748ba87..fb8181b91cb9 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -126,7 +126,7 @@ IMPL_LINK_NOARG_TYPED(SwInsFootNoteDlg, NumberExtCharHdl, Button*, void)
{
m_aFontName = pFontItem->GetFamilyName();
eCharSet = pFontItem->GetCharSet();
- vcl::Font aFont( m_aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetSize() );
+ vcl::Font aFont( m_aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetFontSize() );
aFont.SetCharSet( pFontItem->GetCharSet() );
aFont.SetPitch( pFontItem->GetPitch() );
m_pNumberCharEdit->SetFont( aFont );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 0c691319bb1d..10685ec4ce15 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -870,7 +870,7 @@ static long lcl_DrawBullet(vcl::RenderContext* pVDev, const SwNumFormat& rFormat
vcl::Font aTmpFont(pVDev->GetFont());
vcl::Font aFont(*rFormat.GetBulletFont());
- aFont.SetSize(rSize);
+ aFont.SetFontSize(rSize);
aFont.SetTransparent(true);
pVDev->SetFont(aFont);
OUString aText(rFormat.GetBulletChar());
@@ -938,7 +938,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
aStdFont.SetColor(SwViewOption::GetFontColor());
const long nFontHeight = nYStep * ( bPosition ? 15 : 6 ) / 10;
- aStdFont.SetSize(Size( 0, nFontHeight ));
+ aStdFont.SetFontSize(Size( 0, nFontHeight ));
long nPreNum = pActNum->Get(0).GetStart();
@@ -990,7 +990,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
nBulletWidth = lcl_DrawBullet(pVDev.get(), rFormat, nNumberXPos,
- nYStart, aStdFont.GetSize());
+ nYStart, aStdFont.GetFontSize());
}
else
{
@@ -1081,7 +1081,7 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const Rectangle
}
else if (SVX_NUM_CHAR_SPECIAL == rFormat.GetNumberingType())
{
- nTextOffset = lcl_DrawBullet(pVDev.get(), rFormat, nXStart, nYStart, aStdFont.GetSize());
+ nTextOffset = lcl_DrawBullet(pVDev.get(), rFormat, nXStart, nYStart, aStdFont.GetFontSize());
nTextOffset += nXStep;
}
else
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 3ecbd16825ce..fdd2c8000b63 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -584,20 +584,20 @@ void AutoFormatPreview::MakeFonts( sal_uInt8 nIndex, vcl::Font& rFont, vcl::Font
const SwBoxAutoFormat& rBoxFormat = aCurData.GetBoxFormat( nIndex );
rFont = rCJKFont = rCTLFont = GetFont();
- Size aFontSize( rFont.GetSize().Width(), 10 * GetDPIScaleFactor() );
+ Size aFontSize( rFont.GetFontSize().Width(), 10 * GetDPIScaleFactor() );
lcl_SetFontProperties( rFont, rBoxFormat.GetFont(), rBoxFormat.GetWeight(), rBoxFormat.GetPosture() );
lcl_SetFontProperties( rCJKFont, rBoxFormat.GetCJKFont(), rBoxFormat.GetCJKWeight(), rBoxFormat.GetCJKPosture() );
lcl_SetFontProperties( rCTLFont, rBoxFormat.GetCTLFont(), rBoxFormat.GetCTLWeight(), rBoxFormat.GetCTLPosture() );
- SETONALLFONTS( SetUnderline, (FontLineStyle)rBoxFormat.GetUnderline().GetValue() );
- SETONALLFONTS( SetOverline, (FontLineStyle)rBoxFormat.GetOverline().GetValue() );
- SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFormat.GetCrossedOut().GetValue() );
- SETONALLFONTS( SetOutline, rBoxFormat.GetContour().GetValue() );
- SETONALLFONTS( SetShadow, rBoxFormat.GetShadowed().GetValue() );
- SETONALLFONTS( SetColor, rBoxFormat.GetColor().GetValue() );
- SETONALLFONTS( SetSize, aFontSize );
- SETONALLFONTS( SetTransparent, true );
+ SETONALLFONTS( SetUnderline, (FontLineStyle)rBoxFormat.GetUnderline().GetValue() );
+ SETONALLFONTS( SetOverline, (FontLineStyle)rBoxFormat.GetOverline().GetValue() );
+ SETONALLFONTS( SetStrikeout, (FontStrikeout)rBoxFormat.GetCrossedOut().GetValue() );
+ SETONALLFONTS( SetOutline, rBoxFormat.GetContour().GetValue() );
+ SETONALLFONTS( SetShadow, rBoxFormat.GetShadowed().GetValue() );
+ SETONALLFONTS( SetColor, rBoxFormat.GetColor().GetValue() );
+ SETONALLFONTS( SetFontSize, aFontSize );
+ SETONALLFONTS( SetTransparent, true );
}
sal_uInt8 AutoFormatPreview::GetFormatIndex( size_t nCol, size_t nRow ) const
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index 3a207b03e865..876531c46cf2 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -162,7 +162,7 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta
vcl::Font aFont(aOldFont);
Color aCol(COL_BLACK);
aFont.SetColor(aCol);
- aFont.SetHeight(200);
+ aFont.SetFontHeight(200);
aFont.SetWeight(WEIGHT_MEDIUM);
rRenderContext.SetFont(aFont);
rRenderContext.DrawText(aRect, OUString("Edit Note"), DrawTextFlags::Center);
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 97d9767ad86d..4bc6cfc13887 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -572,7 +572,7 @@ void SwSidebarWin::InitControls()
AllSettings aSettings = mpMetadataAuthor->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
vcl::Font aFont = aStyleSettings.GetFieldFont();
- aFont.SetHeight(8);
+ aFont.SetFontHeight(8);
aStyleSettings.SetFieldFont(aFont);
aSettings.SetStyleSettings(aStyleSettings);
mpMetadataAuthor->SetSettings(aSettings);
@@ -591,7 +591,7 @@ void SwSidebarWin::InitControls()
AllSettings aSettings = mpMetadataDate->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
vcl::Font aFont = aStyleSettings.GetFieldFont();
- aFont.SetHeight(8);
+ aFont.SetFontHeight(8);
aStyleSettings.SetFieldFont(aFont);
aSettings.SetStyleSettings(aStyleSettings);
mpMetadataDate->SetSettings(aSettings);
@@ -720,17 +720,17 @@ void SwSidebarWin::Rescale()
if ( mpMetadataAuthor )
{
vcl::Font aFont( mpMetadataAuthor->GetSettings().GetStyleSettings().GetFieldFont() );
- sal_Int32 nHeight = aFont.GetHeight();
+ sal_Int32 nHeight = aFont.GetFontHeight();
nHeight = nHeight * rFraction.GetNumerator() / rFraction.GetDenominator();
- aFont.SetHeight( nHeight );
+ aFont.SetFontHeight( nHeight );
mpMetadataAuthor->SetControlFont( aFont );
}
if ( mpMetadataDate )
{
vcl::Font aFont( mpMetadataDate->GetSettings().GetStyleSettings().GetFieldFont() );
- sal_Int32 nHeight = aFont.GetHeight();
+ sal_Int32 nHeight = aFont.GetFontHeight();
nHeight = nHeight * rFraction.GetNumerator() / rFraction.GetDenominator();
- aFont.SetHeight( nHeight );
+ aFont.SetFontHeight( nHeight );
mpMetadataDate->SetControlFont( aFont );
}
}
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx
index 353397e2b3d8..0c8e6367f0d0 100644
--- a/sw/source/uibase/docvw/srcedtw.cxx
+++ b/sw/source/uibase/docvw/srcedtw.cxx
@@ -992,11 +992,11 @@ void SwSrcEditWindow::SetFont()
const vcl::Font& rFont = GetTextEngine()->GetFont();
vcl::Font aFont(aFontMetric);
- Size aSize(rFont.GetSize());
+ Size aSize(rFont.GetFontSize());
//font height is stored in point and set in twip
aSize.Height() =
officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20;
- aFont.SetSize(pOutWin->LogicToPixel(aSize, MAP_TWIP));
+ aFont.SetFontSize(pOutWin->LogicToPixel(aSize, MAP_TWIP));
GetTextEngine()->SetFont( aFont );
pOutWin->SetFont(aFont);
}
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index db3b7600e546..0ab4728b559f 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -95,7 +95,7 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString& aName)
pVirtualDev->DrawRect(aNameRect);
vcl::Font aFont;
- aFont.SetSize(Size(0, nNameFontSize));
+ aFont.SetFontSize(Size(0, nNameFontSize));
pVirtualDev->SetFont(aFont);
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index c70efd054b71..a20b6a965e4c 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -704,9 +704,9 @@ sal_Int32 SwSrcView::PrintSource(
TextEngine* pTextEngine = aEditWin->GetTextEngine();
pOutDev->SetMapMode( MAP_100TH_MM );
vcl::Font aFont( aEditWin->GetOutWin()->GetFont() );
- Size aSize( aFont.GetSize() );
+ Size aSize( aFont.GetFontSize() );
aSize = aEditWin->GetOutWin()->PixelToLogic( aSize, MAP_100TH_MM );
- aFont.SetSize( aSize );
+ aFont.SetFontSize( aSize );
aFont.SetColor( COL_BLACK );
pOutDev->SetFont( aFont );
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 64efc48a3f39..51264b9e4c38 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -352,8 +352,8 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
rWriter.attribute("fillcolor", convertColorToString(aFont.GetFillColor()));
rWriter.attribute("name", aFont.GetFamilyName());
rWriter.attribute("stylename", aFont.GetStyleName());
- rWriter.attribute("width", aFont.GetSize().Width());
- rWriter.attribute("height", aFont.GetSize().Height());
+ rWriter.attribute("width", aFont.GetFontSize().Width());
+ rWriter.attribute("height", aFont.GetFontSize().Height());
rWriter.attribute("orientation", aFont.GetOrientation());
rWriter.attribute("weight", convertFontWeigthToString(aFont.GetWeight()));
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 9c0f76f2002a..0e8f618a9925 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -365,8 +365,8 @@ css::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const vcl::Font& rF
css::awt::FontDescriptor aFD;
aFD.Name = rFont.GetFamilyName();
aFD.StyleName = rFont.GetStyleName();
- aFD.Height = (sal_Int16)rFont.GetSize().Height();
- aFD.Width = (sal_Int16)rFont.GetSize().Width();
+ aFD.Height = (sal_Int16)rFont.GetFontSize().Height();
+ aFD.Width = (sal_Int16)rFont.GetFontSize().Width();
aFD.Family = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyType());
aFD.CharSet = rFont.GetCharSet();
aFD.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch());
@@ -390,7 +390,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons
if ( !rDescr.StyleName.isEmpty() )
aFont.SetStyleName( rDescr.StyleName );
if ( rDescr.Height )
- aFont.SetSize( Size( rDescr.Width, rDescr.Height ) );
+ aFont.SetFontSize( Size( rDescr.Width, rDescr.Height ) );
if ( (FontFamily)rDescr.Family != FAMILY_DONTKNOW )
aFont.SetFamily( (FontFamily)rDescr.Family );
if ( (rtl_TextEncoding)rDescr.CharSet != RTL_TEXTENCODING_DONTKNOW )
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index e30bfe4befdf..b566ea47bdcf 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -47,6 +47,7 @@ public:
FontWidth GetWidthType() { if(meWidthType==WIDTH_DONTKNOW) AskConfig(); return meWidthType; }
TextAlign GetAlignment() const { return meAlign; }
rtl_TextEncoding GetCharSet() const { return meCharSet; }
+ const Size& GetFontSize() const { return maAverageFontSize; }
bool IsSymbolFont() const { return mbSymbolFlag; }
@@ -60,6 +61,7 @@ public:
void SetWidthType( const FontWidth eWidthType ) { meWidthType = eWidthType; }
void SetAlignment( const TextAlign eAlignment ) { meAlign = eAlignment; }
void SetCharSet( const rtl_TextEncoding eCharSet ) { meCharSet = eCharSet; }
+ void SetFontSize( const Size& rSize ) { maAverageFontSize = rSize; }
void SetSymbolFlag( const bool bSymbolFlag ) { mbSymbolFlag = bSymbolFlag; }
@@ -91,11 +93,6 @@ public:
void SetSubsettableFlag( bool bSubsettable ) { mbSubsettable = bSubsettable; }
void SetOrientationFlag( bool bCanRotate ) { mbRotatable = bCanRotate; }
- // Metric data
- const Size& GetFontSize() const { return maSize; }
-
- void SetFontSize( const Size& rSize ) { maSize = rSize; }
-
bool operator==( const ImplFont& ) const;
private:
@@ -122,7 +119,7 @@ private:
FontRelief meRelief;
FontEmphasisMark meEmphasisMark;
FontKerning meKerning;
- Size maSize;
+ Size maAverageFontSize;
rtl_TextEncoding meCharSet;
LanguageTag maLanguageTag;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 66e0def36506..d83a80cb7504 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1102,7 +1102,7 @@ static vcl::Font getFont( NSFont* pFont, long nDPIY, const vcl::Font& rDefault )
if( pFont )
{
aResult.SetFamilyName( GetOUString( [pFont familyName] ) );
- aResult.SetHeight( static_cast<int>(([pFont pointSize] * 72.0 / (float)nDPIY)+0.5) );
+ aResult.SetFontHeight( static_cast<int>(([pFont pointSize] * 72.0 / (float)nDPIY)+0.5) );
aResult.SetItalic( ([pFont italicAngle] != 0.0) ? ITALIC_NORMAL : ITALIC_NONE );
// FIMXE: bold ?
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index fd0beb44d6ae..dc835ed7f645 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1071,7 +1071,7 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext, bool bLa
// prepare single line hint (needed on mac to decide between normal push button and
// rectangular bevel button look)
- Size aFontSize(Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetSize());
+ Size aFontSize(Application::GetSettings().GetStyleSettings().GetPushButtonFont().GetFontSize());
aFontSize = rRenderContext.LogicToPixel(aFontSize, MapMode(MAP_POINT));
Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), aInRect.GetHeight())));
aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height());
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 13e91579b93e..61d6d43c88bc 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -1366,10 +1366,10 @@ void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size&
Size aSize = pDev->LogicToPixel( rSize );
vcl::Font aFont = pImpVclMEdit->GetTextWindow()->GetPointFont(*this);
- Size aFontSize = aFont.GetSize();
+ Size aFontSize = aFont.GetFontSize();
MapMode aPtMapMode(MAP_POINT);
aFontSize = pDev->LogicToPixel(aFontSize, aPtMapMode);
- aFont.SetSize(aFontSize);
+ aFont.SetFontSize(aFontSize);
aFont.SetTransparent( true );
OutDevType eOutDevType = pDev->GetOutDevType();
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 837e44482739..25e8decb6ea6 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -524,9 +524,9 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u
}
Brei=Brei*sal_uLong(Atr.Breite)/100;
Brei=Brei*sal_uLong(StdBrei)/100;
- aFont.SetSize(Size(hPoint2Sgf(sal_uInt16(Brei)),hPoint2Sgf(sal_uInt16(Grad))));
+ aFont.SetFontSize(Size(hPoint2Sgf(sal_uInt16(Brei)),hPoint2Sgf(sal_uInt16(Grad))));
} else {
- aFont.SetSize(Size(0,hPoint2Sgf(sal_uInt16(Grad))));
+ aFont.SetFontSize(Size(0,hPoint2Sgf(sal_uInt16(Grad))));
}
aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor);
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index ab2d7a8a6c8b..b400a344b821 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -511,8 +511,8 @@ void EMFWriter::ImplCheckTextAttr()
ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW );
m_rStm.WriteUInt32( mnTextHandle );
- ImplWriteExtent( -rFont.GetSize().Height() );
- ImplWriteExtent( rFont.GetSize().Width() );
+ ImplWriteExtent( -rFont.GetFontSize().Height() );
+ ImplWriteExtent( rFont.GetFontSize().Width() );
m_rStm.WriteInt32( rFont.GetOrientation() ).WriteInt32( rFont.GetOrientation() );
switch( rFont.GetWeight() )
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 3ff2d3b5c2e4..55601721ca5a 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -238,7 +238,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
SolarMutexGuard aGuard;
ScopedVclPtrInstance< VirtualDevice > pVDev;
// converting the cell height into a font height
- aFont.SetSize( aFontSize );
+ aFont.SetFontSize( aFontSize );
pVDev->SetFont( aFont );
FontMetric aMetric( pVDev->GetFontMetric() );
long nHeight = aMetric.GetAscent() + aMetric.GetDescent();
@@ -252,7 +252,7 @@ WinMtfFontStyle::WinMtfFontStyle( LOGFONTW& rFont )
// Convert height to positive
aFontSize.Height() = std::abs(aFontSize.Height());
- aFont.SetSize(aFontSize);
+ aFont.SetFontSize(aFontSize);
};
WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigItem* pConfigItem )
@@ -482,12 +482,12 @@ void WinMtfOutput::ImplMap( vcl::Font& rFont )
{
// !!! HACK: we now always set the width to zero because the OS width is interpreted differently;
// must later be made portable in SV (KA 1996-02-08)
- Size aFontSize = ImplMap (rFont.GetSize(), false);
+ Size aFontSize = ImplMap (rFont.GetFontSize(), false);
if( aFontSize.Height() < 0 )
aFontSize.Height() *= -1;
- rFont.SetSize( aFontSize );
+ rFont.SetFontSize( aFontSize );
if( ( mnWinExtX * mnWinExtY ) < 0 )
rFont.SetOrientation( 3600 - rFont.GetOrientation() );
@@ -687,8 +687,8 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
if ( eType == GDI_FONT )
{
WinMtfFontStyle* pFontStyle = static_cast<WinMtfFontStyle*>(pStyle);
- if (pFontStyle->aFont.GetHeight() == 0)
- pFontStyle->aFont.SetHeight(423);
+ if (pFontStyle->aFont.GetFontHeight() == 0)
+ pFontStyle->aFont.SetFontHeight(423);
ImplMap(pFontStyle->aFont); // defaulting to 12pt
}
else if ( eType == GDI_PEN )
@@ -721,8 +721,8 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
if ( eType == GDI_FONT )
{
WinMtfFontStyle* pFontStyle = static_cast<WinMtfFontStyle*>(pStyle);
- if (pFontStyle->aFont.GetHeight() == 0)
- pFontStyle->aFont.SetHeight(423);
+ if (pFontStyle->aFont.GetFontHeight() == 0)
+ pFontStyle->aFont.SetFontHeight(423);
ImplMap(pFontStyle->aFont);
}
else if ( eType == GDI_PEN )
@@ -858,7 +858,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
maFont.SetFamilyName( "Arial" ); // sj: #i57205#, we do have some scaling problems if using
maFont.SetCharSet( RTL_TEXTENCODING_MS_1252 ); // the default font then most times a x11 font is used, we
- maFont.SetHeight( 423 ); // will prevent this defining a font
+ maFont.SetFontHeight( 423 ); // will prevent this defining a font
maLatestLineStyle.aLineColor = Color( 0x12, 0x34, 0x56 );
maLatestFillStyle.aFillColor = Color( 0x12, 0x34, 0x56 );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 72830fbbbeda..79f56f0fa09d 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -312,7 +312,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const vcl::Font & rFont)
sal_uInt8 nPitchFamily;
WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT);
- WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height()));
+ WriteHeightWidth(Size(rFont.GetFontSize().Width(),-rFont.GetFontSize().Height()));
pWMF->WriteInt16( rFont.GetOrientation() ).WriteInt16( rFont.GetOrientation() );
switch (rFont.GetWeight()) {
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 4cfd900f400d..2080ea1d52ab 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -148,7 +148,7 @@ void Font::SetStyleName( const OUString& rStyleName )
mpImplFont->maStyleName = rStyleName;
}
-void Font::SetSize( const Size& rSize )
+void Font::SetFontSize( const Size& rSize )
{
if( mpImplFont->GetFontSize() != rSize )
{
@@ -428,8 +428,8 @@ void Font::Merge( const vcl::Font& rFont )
if ( rFont.mpImplFont->GetWidthTypeNoAsk() != WIDTH_DONTKNOW )
SetWidthType( rFont.GetWidthType() );
- if ( rFont.GetSize().Height() )
- SetSize( rFont.GetSize() );
+ if ( rFont.GetFontSize().Height() )
+ SetFontSize( rFont.GetFontSize() );
if ( rFont.GetUnderline() != LINESTYLE_DONTKNOW )
{
SetUnderline( rFont.GetUnderline() );
@@ -477,7 +477,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont )
rImplFont.SetFamilyName( rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet()) );
rImplFont.maStyleName = rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet());
- ReadPair( rIStm, rImplFont.maSize );
+ ReadPair( rIStm, rImplFont.maAverageFontSize );
rIStm.ReadUInt16( nTmp16 ); rImplFont.SetCharSet( (rtl_TextEncoding) nTmp16 );
rIStm.ReadUInt16( nTmp16 ); rImplFont.SetFamilyType( (FontFamily) nTmp16 );
@@ -520,7 +520,7 @@ SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont )
VersionCompat aCompat( rOStm, StreamMode::WRITE, 3 );
rOStm.WriteUniOrByteString( rImplFont.GetFamilyName(), rOStm.GetStreamCharSet() );
rOStm.WriteUniOrByteString( rImplFont.GetStyleName(), rOStm.GetStreamCharSet() );
- WritePair( rOStm, rImplFont.maSize );
+ WritePair( rOStm, rImplFont.maAverageFontSize );
rOStm.WriteUInt16( GetStoreCharSet( rImplFont.GetCharSet() ) );
rOStm.WriteUInt16( rImplFont.GetFamilyTypeNoAsk() );
@@ -605,23 +605,23 @@ namespace
if( aInfo.width )
{
if( aInfo.width == FWIDTH_ULTRA_CONDENSED )
- o_rResult.SetWidth( WIDTH_ULTRA_CONDENSED );
+ o_rResult.SetAverageFontWidth( WIDTH_ULTRA_CONDENSED );
else if( aInfo.width == FWIDTH_EXTRA_CONDENSED )
- o_rResult.SetWidth( WIDTH_EXTRA_CONDENSED );
+ o_rResult.SetAverageFontWidth( WIDTH_EXTRA_CONDENSED );
else if( aInfo.width == FWIDTH_CONDENSED )
- o_rResult.SetWidth( WIDTH_CONDENSED );
+ o_rResult.SetAverageFontWidth( WIDTH_CONDENSED );
else if( aInfo.width == FWIDTH_SEMI_CONDENSED )
- o_rResult.SetWidth( WIDTH_SEMI_CONDENSED );
+ o_rResult.SetAverageFontWidth( WIDTH_SEMI_CONDENSED );
else if( aInfo.width == FWIDTH_NORMAL )
- o_rResult.SetWidth( WIDTH_NORMAL );
+ o_rResult.SetAverageFontWidth( WIDTH_NORMAL );
else if( aInfo.width == FWIDTH_SEMI_EXPANDED )
- o_rResult.SetWidth( WIDTH_SEMI_EXPANDED );
+ o_rResult.SetAverageFontWidth( WIDTH_SEMI_EXPANDED );
else if( aInfo.width == FWIDTH_EXPANDED )
- o_rResult.SetWidth( WIDTH_EXPANDED );
+ o_rResult.SetAverageFontWidth( WIDTH_EXPANDED );
else if( aInfo.width == FWIDTH_EXTRA_EXPANDED )
- o_rResult.SetWidth( WIDTH_EXTRA_EXPANDED );
+ o_rResult.SetAverageFontWidth( WIDTH_EXTRA_EXPANDED );
else if( aInfo.width >= FWIDTH_ULTRA_EXPANDED )
- o_rResult.SetWidth( WIDTH_ULTRA_EXPANDED );
+ o_rResult.SetAverageFontWidth( WIDTH_ULTRA_EXPANDED );
}
// set italic
o_rResult.SetItalic( (aInfo.italicAngle != 0) ? ITALIC_NORMAL : ITALIC_NONE );
@@ -780,11 +780,11 @@ FontAlign Font::GetAlignment() const { return mpImplFont->GetAlignment(); }
const OUString& Font::GetFamilyName() const { return mpImplFont->GetFamilyName(); }
const OUString& Font::GetStyleName() const { return mpImplFont->maStyleName; }
-const Size& Font::GetSize() const { return mpImplFont->maSize; }
-void Font::SetHeight( long nHeight ) { SetSize( Size( mpImplFont->GetFontSize().Width(), nHeight ) ); }
-long Font::GetHeight() const { return mpImplFont->GetFontSize().Height(); }
-void Font::SetWidth( long nWidth ) { SetSize( Size( nWidth, mpImplFont->GetFontSize().Height() ) ); }
-long Font::GetWidth() const { return mpImplFont->GetFontSize().Width(); }
+const Size& Font::GetFontSize() const { return mpImplFont->GetFontSize(); }
+void Font::SetFontHeight( long nHeight ) { SetFontSize( Size( mpImplFont->GetFontSize().Width(), nHeight ) ); }
+long Font::GetFontHeight() const { return mpImplFont->GetFontSize().Height(); }
+void Font::SetAverageFontWidth( long nWidth ) { SetFontSize( Size( nWidth, mpImplFont->GetFontSize().Height() ) ); }
+long Font::GetAverageFontWidth() const { return mpImplFont->GetFontSize().Width(); }
rtl_TextEncoding Font::GetCharSet() const { return mpImplFont->GetCharSet(); }
@@ -888,7 +888,7 @@ ImplFont::ImplFont( const ImplFont& rImplFont ) :
meRelief( rImplFont.meRelief ),
meEmphasisMark( rImplFont.meEmphasisMark ),
meKerning( rImplFont.meKerning ),
- maSize( rImplFont.maSize ),
+ maAverageFontSize( rImplFont.maAverageFontSize ),
meCharSet( rImplFont.meCharSet ),
maLanguageTag( rImplFont.maLanguageTag ),
maCJKLanguageTag( rImplFont.maCJKLanguageTag ),
@@ -925,7 +925,7 @@ bool ImplFont::operator==( const ImplFont& rOther ) const
|| (meAlign != rOther.meAlign) )
return false;
- if( (maSize != rOther.maSize)
+ if( (maAverageFontSize != rOther.maAverageFontSize)
|| (mnOrientation != rOther.mnOrientation)
|| (mbVertical != rOther.mbVertical) )
return false;
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index 7a40ce51afe5..f214ddd64948 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -362,7 +362,7 @@ void ImplFontMetricData::ImplInitTextLineSize( const OutputDevice* pDev )
const OUString sFullstop( sal_Unicode( 0x3001 ) ); // Fullwidth fullstop
Rectangle aRect;
pDev->GetTextBoundRect( aRect, sFullstop );
- const sal_uInt16 nH = rFont.GetSize().Height();
+ const sal_uInt16 nH = rFont.GetFontSize().Height();
const sal_uInt16 nB = aRect.Left();
// Use 18.75% as a threshold to define a centered fullwidth fullstop.
// In general, nB/nH < 5% for most Japanese fonts.
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 344c2e6835ea..6acf9b19abe3 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -102,7 +102,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
for(;; aSz.Height() -= nStep )
{
- pFont->SetSize( aSz );
+ pFont->SetFontSize( aSz );
pOutDev->SetFont( *pFont );
long nTextHeight = pOutDev->GetTextHeight();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 4756804f96f6..e12d49ee38e3 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -2797,9 +2797,9 @@ MetaAction* MetaFontAction::Clone()
void MetaFontAction::Scale( double fScaleX, double fScaleY )
{
const Size aSize(
- FRound(maFont.GetSize().Width() * fabs(fScaleX)),
- FRound(maFont.GetSize().Height() * fabs(fScaleY)));
- maFont.SetSize( aSize );
+ FRound(maFont.GetFontSize().Width() * fabs(fScaleX)),
+ FRound(maFont.GetFontSize().Height() * fabs(fScaleY)));
+ maFont.SetFontSize( aSize );
}
void MetaFontAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3c20b492aaf3..2e4966fc9c52 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1783,7 +1783,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
Font aFont;
aFont.SetFamilyName( "Times" );
- aFont.SetSize( Size( 0, 12 ) );
+ aFont.SetFontSize( Size( 0, 12 ) );
GraphicsState aState;
aState.m_aMapMode = m_aMapMode;
@@ -2316,7 +2316,7 @@ void PDFWriterImpl::endPage()
// reset the default font
Font aFont;
aFont.SetFamilyName( "Times" );
- aFont.SetSize( Size( 0, 12 ) );
+ aFont.SetFontSize( Size( 0, 12 ) );
m_aCurrentPDFState = m_aGraphicsStack.front();
m_aGraphicsStack.front().m_aFont = aFont;
@@ -4694,8 +4694,8 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font&
if( aFont.GetFamilyName().isEmpty() )
{
aFont = rAppSetFont;
- if( rControlFont.GetHeight() )
- aFont.SetSize( Size( 0, rControlFont.GetHeight() ) );
+ if( rControlFont.GetFontHeight() )
+ aFont.SetFontSize( Size( 0, rControlFont.GetFontHeight() ) );
else
bAdjustSize = true;
if( rControlFont.GetItalic() != ITALIC_DONTKNOW )
@@ -4703,17 +4703,17 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font&
if( rControlFont.GetWeight() != WEIGHT_DONTKNOW )
aFont.SetWeight( rControlFont.GetWeight() );
}
- else if( ! aFont.GetHeight() )
+ else if( ! aFont.GetFontHeight() )
{
- aFont.SetSize( rAppSetFont.GetSize() );
+ aFont.SetFontSize( rAppSetFont.GetFontSize() );
bAdjustSize = true;
}
if( bAdjustSize )
{
- Size aFontSize = aFont.GetSize();
+ Size aFontSize = aFont.GetFontSize();
OutputDevice* pDefDev = Application::GetDefaultDevice();
aFontSize = OutputDevice::LogicToLogic( aFontSize, pDefDev->GetMapMode(), getMapMode() );
- aFont.SetSize( aFontSize );
+ aFont.SetFontSize( aFontSize );
}
return aFont;
}
@@ -4779,12 +4779,12 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
// (that is before endRedirect())
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetButtonTextColor() ), aDA );
- Font aDummyFont( OUString( "Helvetica" ), aFont.GetSize() );
+ Font aDummyFont( OUString( "Helvetica" ), aFont.GetFontSize() );
sal_Int32 nDummyBuiltin = getBestBuiltinFont( aDummyFont );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nDummyBuiltin].getNameObject() );
aDA.append( ' ' );
- m_aPages[m_nCurrentPage].appendMappedLength( sal_Int32( aFont.GetHeight() ), aDA );
+ m_aPages[m_nCurrentPage].appendMappedLength( sal_Int32( aFont.GetFontHeight() ), aDA );
aDA.append( " Tf" );
rButton.m_aDAString = aDA.makeStringAndClear();
@@ -4846,7 +4846,7 @@ Font PDFWriterImpl::drawFieldBorder( PDFWidget& rIntern,
if( rWidget.Border )
{
// adjust edit area accounting for border
- sal_Int32 nDelta = aFont.GetHeight()/4;
+ sal_Int32 nDelta = aFont.GetFontHeight()/4;
if( nDelta < 1 )
nDelta = 1;
rIntern.m_aRect.Left() += nDelta;
@@ -4887,7 +4887,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
else
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( ' ' );
- m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetHeight() ), aDA );
+ m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetFontHeight() ), aDA );
aDA.append( " Tf" );
/* create an empty appearance stream, let the viewer create
@@ -4956,7 +4956,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
else
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( ' ' );
- m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetHeight() ), aDA );
+ m_aPages[ m_nCurrentPage ].appendMappedLength( sal_Int32( aFont.GetFontHeight() ), aDA );
aDA.append( " Tf" );
rBox.m_aDAString = aDA.makeStringAndClear();
}
@@ -4977,7 +4977,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
Font aFont = replaceFont( rWidget.TextFont, rSettings.GetRadioCheckFont() );
setFont( aFont );
- Size aFontSize = aFont.GetSize();
+ Size aFontSize = aFont.GetFontSize();
if( aFontSize.Height() > rBox.m_aRect.GetHeight() )
aFontSize.Height() = rBox.m_aRect.GetHeight();
sal_Int32 nDelta = aFontSize.Height()/10;
@@ -5041,7 +5041,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
- sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetSize() ) );
+ sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetFontSize() ) );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( " 0 Tf" );
@@ -5102,7 +5102,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
Font aFont = replaceFont( rWidget.TextFont, rSettings.GetRadioCheckFont() );
setFont( aFont );
- Size aFontSize = aFont.GetSize();
+ Size aFontSize = aFont.GetFontSize();
if( aFontSize.Height() > rBox.m_aRect.GetHeight() )
aFontSize.Height() = rBox.m_aRect.GetHeight();
sal_Int32 nDelta = aFontSize.Height()/10;
@@ -5166,7 +5166,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
OStringBuffer aDA( 256 );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
- sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetSize() ) );
+ sal_Int32 nBest = getBestBuiltinFont( Font( OUString( "ZapfDingbats" ), aFont.GetFontSize() ) );
aDA.append( ' ' );
aDA.append( m_aBuiltinFonts[nBest].getNameObject() );
aDA.append( " 0 Tf" );
@@ -8851,16 +8851,16 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
// transform font height back to current units
// note: the layout calculates in outdevs device pixel !!
sal_Int32 nFontHeight = m_pReferenceDevice->ImplDevicePixelToLogicHeight( nPixelFontHeight );
- if( m_aCurrentPDFState.m_aFont.GetWidth() )
+ if( m_aCurrentPDFState.m_aFont.GetAverageFontWidth() )
{
Font aFont( m_aCurrentPDFState.m_aFont );
- aFont.SetWidth( 0 );
+ aFont.SetAverageFontWidth( 0 );
FontMetric aMetric = m_pReferenceDevice->GetFontMetric( aFont );
- if( aMetric.GetWidth() != m_aCurrentPDFState.m_aFont.GetWidth() )
+ if( aMetric.GetAverageFontWidth() != m_aCurrentPDFState.m_aFont.GetAverageFontWidth() )
{
fXScale =
- (double)m_aCurrentPDFState.m_aFont.GetWidth() /
- (double)aMetric.GetWidth();
+ (double)m_aCurrentPDFState.m_aFont.GetAverageFontWidth() /
+ (double)aMetric.GetAverageFontWidth();
}
// force state before GetFontMetric
m_pReferenceDevice->ImplNewFont();
@@ -8952,7 +8952,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
}
else
{
- double fW = (double)m_aCurrentPDFState.m_aFont.GetHeight() / 30.0;
+ double fW = (double)m_aCurrentPDFState.m_aFont.GetFontHeight() / 30.0;
m_aPages.back().appendMappedLength( fW, aLine );
aLine.append ( " w\n" );
}
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 3ff05366678f..150590a5dcfe 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -243,7 +243,7 @@ void ImplWriteFont( SvStream& rOStm, const vcl::Font& rFont,
ImplWriteColor( rOStm, rFont.GetColor() );
ImplWriteColor( rOStm, rFont.GetFillColor() );
rOStm.Write( aName, 32 );
- WritePair( rOStm, rFont.GetSize() );
+ WritePair( rOStm, rFont.GetFontSize() );
rOStm.WriteInt16( 0 ); // no character orientation anymore
rOStm.WriteInt16( rFont.GetOrientation() );
rOStm.WriteInt16( rActualCharSet );
@@ -824,7 +824,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout );
rIStm.ReadCharAsBool( bItalic ).ReadCharAsBool( bOutline ).ReadCharAsBool( bShadow ).ReadCharAsBool( bTransparent );
- aFont.SetSize( Size( nWidth, nHeight ) );
+ aFont.SetFontSize( Size( nWidth, nHeight ) );
aFont.SetCharSet( (rtl_TextEncoding) nCharSet );
aFont.SetFamily( (FontFamily) nFamily );
aFont.SetPitch( (FontPitch) nPitch );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index b10965eb29e6..79f983f79569 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -144,14 +144,14 @@ namespace vcl
// now that the Zoom is part of the map mode, reset the target device's font to the "unzoomed" version
Font aDrawFont( m_aUnzoomedPointFont );
- aDrawFont.SetSize( OutputDevice::LogicToLogic( aDrawFont.GetSize(), MAP_POINT, eTargetMapUnit ) );
+ aDrawFont.SetFontSize( OutputDevice::LogicToLogic( aDrawFont.GetFontSize(), MAP_POINT, eTargetMapUnit ) );
_rTargetDevice.SetFont( aDrawFont );
// transfer font to the reference device
m_rReferenceDevice.Push( PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
Font aRefFont( m_aUnzoomedPointFont );
- aRefFont.SetSize( OutputDevice::LogicToLogic(
- aRefFont.GetSize(), MAP_POINT, m_rReferenceDevice.GetMapMode().GetMapUnit() ) );
+ aRefFont.SetFontSize( OutputDevice::LogicToLogic(
+ aRefFont.GetFontSize(), MAP_POINT, m_rReferenceDevice.GetMapMode().GetMapUnit() ) );
m_rReferenceDevice.SetFont( aRefFont );
}
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 65bd0112ea33..9129ded50e9c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -177,7 +177,7 @@ FontMetric OutputDevice::GetFontMetric() const
// set aMetric with info from font
aMetric.SetFamilyName( maFont.GetFamilyName() );
aMetric.SetStyleName( xFontMetric->GetStyleName() );
- aMetric.SetSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) );
+ aMetric.SetFontSize( PixelToLogic( Size( xFontMetric->GetWidth(), xFontMetric->GetAscent() + xFontMetric->GetDescent() - xFontMetric->GetInternalLeading() ) ) );
aMetric.SetCharSet( xFontMetric->IsSymbolFont() ? RTL_TEXTENCODING_SYMBOL : RTL_TEXTENCODING_UNICODE );
aMetric.SetFamily( xFontMetric->GetFamilyType() );
aMetric.SetPitch( xFontMetric->GetPitch() );
@@ -838,7 +838,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
if ( !aSearch.isEmpty() )
{
- aFont.SetHeight( 12 ); // corresponds to nDefaultHeight
+ aFont.SetFontHeight( 12 ); // corresponds to nDefaultHeight
aFont.SetWeight( WEIGHT_NORMAL );
aFont.SetLanguage( eLang );
@@ -885,18 +885,18 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan
aFont.SetFamilyName( aSearch );
// convert to pixel height
- Size aSize = pOutDev->ImplLogicToDevicePixel( aFont.GetSize() );
+ Size aSize = pOutDev->ImplLogicToDevicePixel( aFont.GetFontSize() );
if ( !aSize.Height() )
{
// use default pixel height only when logical height is zero
- if ( aFont.GetHeight() )
+ if ( aFont.GetFontHeight() )
aSize.Height() = 1;
else
aSize.Height() = (12*pOutDev->mnDPIY)/72;
}
// use default width only when logical width is zero
- if( (0 == aSize.Width()) && (0 != aFont.GetSize().Width()) )
+ if( (0 == aSize.Width()) && (0 != aFont.GetFontSize().Width()) )
aSize.Width() = 1;
// get the name of the first available font
@@ -1038,12 +1038,12 @@ bool OutputDevice::ImplNewFont() const
// convert to pixel height
// TODO: replace integer based aSize completely with subpixel accurate type
- float fExactHeight = ImplFloatLogicHeightToDevicePixel( static_cast<float>(maFont.GetHeight()) );
- Size aSize = ImplLogicToDevicePixel( maFont.GetSize() );
+ float fExactHeight = ImplFloatLogicHeightToDevicePixel( static_cast<float>(maFont.GetFontHeight()) );
+ Size aSize = ImplLogicToDevicePixel( maFont.GetFontSize() );
if ( !aSize.Height() )
{
// use default pixel height only when logical height is zero
- if ( maFont.GetSize().Height() )
+ if ( maFont.GetFontSize().Height() )
aSize.Height() = 1;
else
aSize.Height() = (12*mnDPIY)/72;
@@ -1051,7 +1051,7 @@ bool OutputDevice::ImplNewFont() const
}
// select the default width only when logical width is zero
- if( (0 == aSize.Width()) && (0 != maFont.GetSize().Width()) )
+ if( (0 == aSize.Width()) && (0 != maFont.GetFontSize().Width()) )
aSize.Width() = 1;
// get font entry
@@ -1169,13 +1169,13 @@ bool OutputDevice::ImplNewFont() const
int nNewWidth = (int)(nOrigWidth * fStretch + 0.5);
if( (nNewWidth != nOrigWidth) && (nNewWidth != 0) )
{
- Size aOrigSize = maFont.GetSize();
- const_cast<vcl::Font&>(maFont).SetSize( Size( nNewWidth, aSize.Height() ) );
+ Size aOrigSize = maFont.GetFontSize();
+ const_cast<vcl::Font&>(maFont).SetFontSize( Size( nNewWidth, aSize.Height() ) );
mbMap = false;
mbNewFont = true;
ImplNewFont(); // recurse once using stretched width
mbMap = true;
- const_cast<vcl::Font&>(maFont).SetSize( aOrigSize );
+ const_cast<vcl::Font&>(maFont).SetFontSize( aOrigSize );
}
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 4211bad7d28b..810d5b50413b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -232,7 +232,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
vcl::Font aFont( GetFont() );
aFont.SetOrientation( 0 );
- aFont.SetSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
+ aFont.SetFontSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
pVDev->SetFont( aFont );
pVDev->SetTextColor( Color( COL_BLACK ) );
pVDev->SetTextFillColor();
@@ -2508,7 +2508,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
aFont.SetOutline( false );
aFont.SetRelief( RELIEF_NONE );
aFont.SetOrientation( 0 );
- aFont.SetSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
+ aFont.SetFontSize( Size( mpFontInstance->maFontSelData.mnWidth, mpFontInstance->maFontSelData.mnHeight ) );
aVDev->SetFont( aFont );
aVDev->SetTextAlign( ALIGN_TOP );
@@ -2735,7 +2735,7 @@ bool OutputDevice::GetTextOutlines( basegfx::B2DPolyPolygonVector& rVector,
aFont.SetOrientation(0);
if( bOptimize )
{
- aFont.SetSize( Size( 0, GLYPH_FONT_HEIGHT ) );
+ aFont.SetFontSize( Size( 0, GLYPH_FONT_HEIGHT ) );
aVDev->SetMapMode( MAP_PIXEL );
}
aVDev->SetFont( aFont );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 33183cf9a692..9b829d633a95 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2127,7 +2127,7 @@ void MessageDialog::SetMessagesWidths(vcl::Window *pParent,
{
assert(pPrimaryMessage);
vcl::Font aFont = pParent->GetSettings().GetStyleSettings().GetLabelFont();
- aFont.SetSize(Size(0, aFont.GetSize().Height() * 1.2));
+ aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * 1.2));
aFont.SetWeight(WEIGHT_BOLD);
pPrimaryMessage->SetControlFont(aFont);
pPrimaryMessage->SetMaxTextWidth(pPrimaryMessage->approximate_char_width() * 44);
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 1c6500d99529..1b4f76f10a91 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1366,8 +1366,8 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
vcl::Font aCopyFont = GetFont();
if( nOldDPIX != mnDPIX || nOldDPIY != mnDPIY )
{
- aCopyFont.SetHeight( aCopyFont.GetHeight() * mnDPIY / nOldDPIY );
- aCopyFont.SetWidth( aCopyFont.GetWidth() * mnDPIX / nOldDPIX );
+ aCopyFont.SetFontHeight( aCopyFont.GetFontHeight() * mnDPIY / nOldDPIY );
+ aCopyFont.SetAverageFontWidth( aCopyFont.GetAverageFontWidth() * mnDPIX / nOldDPIX );
}
SetFont( aCopyFont );
SetTextColor( GetTextColor() );
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 71c175b52dfc..5f1970b86ab2 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -332,7 +332,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
int nPages = mnRows * mnColumns;
Font aFont(rRenderContext.GetSettings().GetStyleSettings().GetFieldFont());
- aFont.SetSize(Size(0, 24));
+ aFont.SetFontSize(Size(0, 24));
rRenderContext.SetFont(aFont);
Size aSampleTextSize(rRenderContext.GetTextWidth(OUString::number(nPages + 1)), rRenderContext.GetTextHeight());
Size aOutSize(GetOutputSizePixel());
@@ -344,7 +344,7 @@ void PrintDialog::ShowNupOrderWindow::Paint(vcl::RenderContext& rRenderContext,
long nFontHeight = long(24.0 * fScale) - 3;
if (nFontHeight < 5)
nFontHeight = 5;
- aFont.SetSize(Size( 0, nFontHeight));
+ aFont.SetFontSize(Size( 0, nFontHeight));
rRenderContext.SetFont(aFont);
long nTextHeight = rRenderContext.GetTextHeight();
for (int i = 0; i < nPages; i++)
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index e54a4382c747..c9a8fd1c7ba0 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -161,7 +161,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
maxFontheight = (int) ((( 8.0 * (double) GetDesktopRectPixel().getHeight()) / 600.0) + 1.5);
vcl::Font aFont = aStyleSettings.GetMenuFont();
- int defFontheight = aFont.GetHeight();
+ int defFontheight = aFont.GetFontHeight();
if( defFontheight > maxFontheight )
defFontheight = maxFontheight;
@@ -178,59 +178,59 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
toolfontheight = (defFontheight+8) / 2;
aFont = aStyleSettings.GetAppFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetAppFont( aFont );
aFont = aStyleSettings.GetTitleFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetTitleFont( aFont );
aFont = aStyleSettings.GetFloatTitleFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetFloatTitleFont( aFont );
// keep menu and help font size from system unless in broken locale size
if( bBrokenLangFontHeight )
{
aFont = aStyleSettings.GetMenuFont();
- if( aFont.GetHeight() < defFontheight )
+ if( aFont.GetFontHeight() < defFontheight )
{
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetMenuFont( aFont );
}
aFont = aStyleSettings.GetHelpFont();
- if( aFont.GetHeight() < defFontheight )
+ if( aFont.GetFontHeight() < defFontheight )
{
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetHelpFont( aFont );
}
}
// use different height for toolfont
aFont = aStyleSettings.GetToolFont();
- aFont.SetHeight( toolfontheight );
+ aFont.SetFontHeight( toolfontheight );
aStyleSettings.SetToolFont( aFont );
aFont = aStyleSettings.GetLabelFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetLabelFont( aFont );
aFont = aStyleSettings.GetInfoFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetInfoFont( aFont );
aFont = aStyleSettings.GetRadioCheckFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetRadioCheckFont( aFont );
aFont = aStyleSettings.GetPushButtonFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetPushButtonFont( aFont );
aFont = aStyleSettings.GetFieldFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetFieldFont( aFont );
aFont = aStyleSettings.GetIconFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetIconFont( aFont );
aFont = aStyleSettings.GetTabFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetTabFont( aFont );
aFont = aStyleSettings.GetGroupFont();
- aFont.SetHeight( defFontheight );
+ aFont.SetFontHeight( defFontheight );
aStyleSettings.SetGroupFont( aFont );
rSettings.SetStyleSettings( aStyleSettings );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a6c4fc8d4d30..fbe64960bb23 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1410,7 +1410,7 @@ void Window::ImplInitResolutionSettings()
void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const
{
- Size aSize = rFont.GetSize();
+ Size aSize = rFont.GetFontSize();
sal_uInt16 nScreenFontZoom;
if (!utl::ConfigManager::IsAvoidConfig())
nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom();
@@ -1434,12 +1434,12 @@ void Window::ImplPointToLogic(vcl::RenderContext& rRenderContext, vcl::Font& rFo
if (rRenderContext.IsMapModeEnabled())
aSize = rRenderContext.PixelToLogic(aSize);
- rFont.SetSize(aSize);
+ rFont.SetFontSize(aSize);
}
void Window::ImplLogicToPoint(vcl::RenderContext& rRenderContext, vcl::Font& rFont) const
{
- Size aSize = rFont.GetSize();
+ Size aSize = rFont.GetFontSize();
sal_uInt16 nScreenFontZoom;
if (!utl::ConfigManager::IsAvoidConfig())
nScreenFontZoom = rRenderContext.GetSettings().GetStyleSettings().GetScreenFontZoom();
@@ -1463,7 +1463,7 @@ void Window::ImplLogicToPoint(vcl::RenderContext& rRenderContext, vcl::Font& rFo
aSize.Height() += mpWindowImpl->mpFrameData->mnDPIY / 2;
aSize.Height() /= mpWindowImpl->mpFrameData->mnDPIY;
- rFont.SetSize(aSize);
+ rFont.SetFontSize(aSize);
}
bool Window::ImplUpdatePos()
@@ -1828,12 +1828,12 @@ void Window::ImplNewInputContext()
if (!rFontName.isEmpty())
{
OutputDevice *pFocusWinOutDev = pFocusWin->GetOutDev();
- Size aSize = pFocusWinOutDev->ImplLogicToDevicePixel( rFont.GetSize() );
+ Size aSize = pFocusWinOutDev->ImplLogicToDevicePixel( rFont.GetFontSize() );
if ( !aSize.Height() )
{
// only set default sizes if the font height in logical
// coordinates equals 0
- if ( rFont.GetSize().Height() )
+ if ( rFont.GetFontSize().Height() )
aSize.Height() = 1;
else
aSize.Height() = (12*pFocusWin->mnDPIY)/72;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 4624105aa68d..88344cf74e63 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -453,7 +453,7 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
if (rZoom.GetNumerator() != rZoom.GetDenominator())
{
vcl::Font aFont(rFont);
- Size aSize = aFont.GetSize();
+ Size aSize = aFont.GetFontSize();
double n = double(aSize.Width());
n *= double(rZoom.GetNumerator());
n /= double(rZoom.GetDenominator());
@@ -462,13 +462,13 @@ void Window::SetZoomedPointFont(vcl::RenderContext& rRenderContext, const vcl::F
n *= double(rZoom.GetNumerator());
n /= double(rZoom.GetDenominator());
aSize.Height() = WinFloatRound(n);
- aFont.SetSize(aSize);
+ aFont.SetFontSize(aSize);
SetPointFont(rRenderContext, aFont);
// Use another font if the representation is to be scaled,
// and the actual font is not scalable
FontMetric aMetric = rRenderContext.GetFontMetric();
- long nFontDiff = std::abs(rRenderContext.GetFont().GetSize().Height() - aMetric.GetSize().Height());
+ long nFontDiff = std::abs(rRenderContext.GetFont().GetFontSize().Height() - aMetric.GetFontSize().Height());
if ((aMetric.GetType() == TYPE_RASTER) && (nFontDiff >= 2))
{
DefaultFontType nType;
@@ -649,10 +649,10 @@ Size Window::CalcOutputSize( const Size& rWinSz ) const
vcl::Font Window::GetDrawPixelFont(OutputDevice* pDev) const
{
vcl::Font aFont = GetPointFont(*pDev);
- Size aFontSize = aFont.GetSize();
+ Size aFontSize = aFont.GetFontSize();
MapMode aPtMapMode(MAP_POINT);
aFontSize = pDev->LogicToPixel( aFontSize, aPtMapMode );
- aFont.SetSize( aFontSize );
+ aFont.SetFontSize( aFontSize );
return aFont;
}
@@ -1493,7 +1493,7 @@ bool Window::set_font_attribute(const OString &rKey, const OString &rValue)
{
vcl::Font aFont(GetControlFont());
sal_Int32 nHeight = rValue.toInt32() / 1000;
- aFont.SetHeight(nHeight);
+ aFont.SetFontHeight(nHeight);
SetControlFont(aFont);
}
else
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index ef1c3f9c71ec..eda878510b6f 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -145,7 +145,7 @@ void XIMStatusWindow::layout()
{
m_aWindowSize.Width() = m_aStatusText->GetTextWidth( m_aStatusText->GetText() )+8;
Font aFont( m_aStatusText->GetFont() );
- m_aWindowSize.Height() = aFont.GetHeight()+10;
+ m_aWindowSize.Height() = aFont.GetFontHeight()+10;
m_aWindowSize = LogicToPixel( m_aWindowSize );
Size aControlSize( m_aWindowSize );
@@ -371,7 +371,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
void IIIMPStatusWindow::layout()
{
Font aFont( m_aStatusBtn->GetFont() );
- Size aSize( 15*aFont.GetHeight(), aFont.GetHeight()+14 );
+ Size aSize( 15*aFont.GetFontHeight(), aFont.GetFontHeight()+14 );
aSize = m_aStatusBtn->LogicToPixel( aSize );
m_aStatusBtn->SetPosSizePixel( Point( 0, 0 ), aSize );
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 5ce0d947a3bf..ea352b0483e3 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -883,7 +883,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont )
nFontHeight *= 72;
nFontHeight += nDPIY/2;
nFontHeight /= nDPIY;
- rFont.SetSize( Size( 0, nFontHeight ) );
+ rFont.SetFontSize( Size( 0, nFontHeight ) );
rFont.SetOrientation( (short)rLogFont.lfEscapement );
if ( rLogFont.lfItalic )
rFont.SetItalic( ITALIC_NORMAL );
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 8230ffb916e9..617cbe20df4b 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2580,12 +2580,12 @@ static void ImplSalUpdateStyleFontW( HDC hDC, const LOGFONTW& rLogFont, vcl::Fon
// So if it is MS Sans Serif, a none scalable font we use
// 8 Point as the minimum control height, in all other cases
// 6 Point is the smallest one
- if ( rFont.GetHeight() < 8 )
+ if ( rFont.GetFontHeight() < 8 )
{
if ( rtl_ustr_compareIgnoreAsciiCase( reinterpret_cast<const sal_Unicode*>(rLogFont.lfFaceName), reinterpret_cast<const sal_Unicode*>(L"MS Sans Serif") ) == 0 )
- rFont.SetHeight( 8 );
- else if ( rFont.GetHeight() < 6 )
- rFont.SetHeight( 6 );
+ rFont.SetFontHeight( 8 );
+ else if ( rFont.GetFontHeight() < 6 )
+ rFont.SetFontHeight( 6 );
}
}
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 2303f23c0d0b..2bb8f4318876 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -257,7 +257,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
{
FontMetric aFont = rRenderContext.GetDevFont((i * nFontCount) / nFontSamples);
- aFont.SetHeight(400 + (i % 7) * 100);
+ aFont.SetFontHeight(400 + (i % 7) * 100);
aFont.SetOrientation(i * (3600 / nFontSamples));
rRenderContext.SetFont(aFont);
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 79601b33157e..88c8030e6936 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -46,7 +46,7 @@ awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault
if (aHeight)
{
nHeight = aHeight->second.get<double>() * 35; // points -> mm100
- aFont.SetSize(Size(0, nHeight));
+ aFont.SetFontSize(Size(0, nHeight));
}
pOut->SetFont(aFont);
pOut->SetMapMode(aMap);
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index e6d4fefae3a7..1fd368570133 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -224,7 +224,7 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP( vcl::Window* _pParent, C
nStyle &= ~WB_HSCROLL;
m_pElementsLB->SetStyle( nStyle );
- m_aFixedWidthFont.SetHeight( m_aStdFont.GetHeight() );
+ m_aFixedWidthFont.SetFontHeight( m_aStdFont.GetFontHeight() );
static long nTabs[] = { 2, 0, 30*CS_LB_WIDTH/100 };
m_pElementsLB->SetTabs( &nTabs[ 0 ] );