sw/source/core/txtnode/ndtxt.cxx | 6 +++--- vcl/source/font/PhysicalFontFamily.cxx | 7 ++++++- vcl/win/gdi/salfont.cxx | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-)
New commits: commit 5a7b0d2c7f3a305eb5f4eb629c0a08a256cc9ae3 Author: Michael Stahl <mst...@redhat.com> Date: Wed Apr 6 00:26:39 2016 +0200 vcl: lstrcpynW actually takes length *including* null terminator ... which is surprising, but means that these arguments are too small. Change-Id: I9c58e7fefa30d19c701df4f04043ddb474b28986 diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 6819d21..4b844c3 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1376,7 +1376,7 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontS && !bImplSalCourierScalable && bImplSalCourierNew && (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) ) - lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 ); + lstrcpynW( aLogFont.lfFaceName, L"Courier New", 12 ); // #i47675# limit font requests to MAXFONTHEIGHT // TODO: share MAXFONTHEIGHT font instance @@ -1413,7 +1413,7 @@ HFONT WinSalGraphics::ImplDoSetFont( FontSelectPattern* i_pFont, float& o_rFontS { // the selected font doesn't work => try a replacement // TODO: use its font fallback instead - lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 ); + lstrcpynW( aLogFont.lfFaceName, L"Courier New", 12 ); aLogFont.lfPitchAndFamily = FIXED_PITCH; HFONT hNewFont2 = CreateFontIndirectW( &aLogFont ); SelectFont( getHDC(), hNewFont2 ); commit 2f89245fb7e1c94bed49dde10b08ab1cf41b597b Author: Michael Stahl <mst...@redhat.com> Date: Wed Apr 6 00:20:28 2016 +0200 tdf#98989: vcl: fix handling of non-scalable fonts like "Courier" For a VirtualDevice only scalable fonts are cloned, but for non-scalable bitmap fonts still an empty PhysicalFontFamily with no PhysicalFontFace is created, which causes text to disappear (height 0). Suppress creation of such families like it was done in LO 4.3, so that the fall-back can handle it and map "Courier" to "Courier New". (regression from 8d6697587776136f3121733e1c29d4200720dbd9) Change-Id: I6542a3f7a01bdf46ae2bcf328fa04064f7f86332 diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx index 8cc63fa..b2eb5ce 100644 --- a/vcl/source/font/PhysicalFontFamily.cxx +++ b/vcl/source/font/PhysicalFontFamily.cxx @@ -264,7 +264,7 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle bool bEmbeddable ) const { OUString aFamilyName = GetEnglishSearchFontName( GetFamilyName() ); - PhysicalFontFamily* pFamily = rFontCollection.FindOrCreateFontFamily( aFamilyName ); + PhysicalFontFamily* pFamily(nullptr); for( std::vector< PhysicalFontFace* >::const_iterator it=maFontFaces.begin(); it != maFontFaces.end(); ++it ) { @@ -275,6 +275,11 @@ void PhysicalFontFamily::UpdateCloneFontList( PhysicalFontCollection& rFontColle if( bEmbeddable && !pFoundFontFace->CanEmbed() && !pFoundFontFace->CanSubset() ) continue; + if (!pFamily) + { // tdf#98989 lazy create as family without faces won't work + pFamily = rFontCollection.FindOrCreateFontFamily(aFamilyName); + } + assert(pFamily); PhysicalFontFace* pClonedFace = pFoundFontFace->Clone(); #if OSL_DEBUG_LEVEL > 0 commit e6371f31623a25cc556922735459274ed48e7b7c Author: Michael Stahl <mst...@redhat.com> Date: Fri Apr 1 12:37:22 2016 +0200 sw: fix typo Change-Id: I1f439382dd11a4082cce20e410ecdbcdab31adb9 diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index d9faf9d..7693a83 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4070,7 +4070,7 @@ bool SwTextNode::AreListLevelIndentsApplicable() const */ bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const { - bool bListTanStopPositionProvided( false ); + bool bListTabStopPositionProvided(false); const SwNumRule* pNumRule = GetNum() ? GetNum()->GetNumRule() : nullptr; if ( pNumRule && HasVisibleNumberingOrBullet() && GetActualListLevel() >= 0 ) @@ -4079,7 +4079,7 @@ bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const if ( rFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT && rFormat.GetLabelFollowedBy() == SvxNumberFormat::LISTTAB ) { - bListTanStopPositionProvided = true; + bListTabStopPositionProvided = true; nListTabStopPosition = rFormat.GetListtabPos(); if ( getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ) @@ -4099,7 +4099,7 @@ bool SwTextNode::GetListTabStopPosition( long& nListTabStopPosition ) const } } - return bListTanStopPositionProvided; + return bListTabStopPositionProvided; } OUString SwTextNode::GetLabelFollowedBy() const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits