diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-23 20:59:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 12:14:53 +0000 |
commit | f06615ef3326f49f86472853555b7df857f50ed7 (patch) | |
tree | 0485dd80b0d6b59391652dcd96b93b5f5c9a1e6f /sw | |
parent | 0fc8df6d7bd1f9d2770e22a1e595f18a5053092e (diff) |
This cast is complete rubbish of course
It just works because the first element in SwFont is an array of three
SvxFont's which inherit from vcl::Font so this ends up as calling
GetSize().Height() on the first (i.e. LATIN) font.
To keep this exactly the same we could call GetFnt(SW_LATIN) to get the first
font that we have been querying all these years, but lets try instead to take
the presumably intended "nActual" font here.
Change-Id: I1d0f404d4620c2b3d38b35e4de48b8c9f6b011a6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/itrform2.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 593dd18757d2..6cdbf9cf48b7 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -967,8 +967,7 @@ SwTxtPortion *SwTxtFormatter::NewTxtPortion( SwTxtFormatInfo &rInf ) CalcAscent( rInf, pPor ); const SwFont* pTmpFnt = rInf.GetFont(); - sal_Int32 nExpect = std::min( sal_Int32( reinterpret_cast<vcl::Font const *>(pTmpFnt)->GetSize().Height() ), - //TODO: is that reinterpret_cast sound? + sal_Int32 nExpect = std::min( sal_Int32( pTmpFnt->GetHeight() ), sal_Int32( pPor->GetAscent() ) ) / 8; if ( !nExpect ) nExpect = 1; |