vcl: unneeded functions in PhysicalFontFace

Nothing uses PhysicalFontFace::SetBitmapSize(), so remove it. This in
turn meant that the class doesn't ever use CompareWithSize() directly,
as this calls on CompareIgnoreSize() when no width or height is set I
have removed CompareWithSize().

Change-Id: I1012ffd3bc0f39f917a8b725f9985844967533dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121931
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/vcl/inc/PhysicalFontFace.hxx b/vcl/inc/PhysicalFontFace.hxx
index a4d032f..44d1855 100644
--- a/vcl/inc/PhysicalFontFace.hxx
+++ b/vcl/inc/PhysicalFontFace.hxx
@@ -73,12 +73,10 @@ public:
    virtual bool GetFontCapabilities(vcl::FontCapabilities&) const = 0;

    bool                    IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const;
    sal_Int32               CompareWithSize( const PhysicalFontFace& ) const;
    sal_Int32               CompareIgnoreSize( const PhysicalFontFace& ) const;

protected:
    explicit PhysicalFontFace(const FontAttributes&);
    void                    SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; }

    tools::Long                    mnWidth;    // Width (in pixels)
    tools::Long                    mnHeight;   // Height (in pixels)
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index 876d6df..4fc3f005 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -17,6 +17,8 @@
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include <sal/config.h>

#include <sal/types.h>
#include <tools/fontenum.hxx>
#include <unotools/fontdefs.hxx>
@@ -65,25 +67,6 @@ sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) 
    return nRet;
}

sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const
{
    sal_Int32 nCompare = CompareIgnoreSize( rOther );
    if (nCompare != 0)
        return nCompare;

    if( mnHeight < rOther.mnHeight )
        return -1;
    else if( mnHeight > rOther.mnHeight )
        return 1;

    if( mnWidth < rOther.mnWidth )
        return -1;
    else if( mnWidth > rOther.mnWidth )
        return 1;

    return 0;
}

bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchStatus& rStatus ) const
{
    int nMatch = 0;
@@ -196,4 +179,4 @@ bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchSt
    return true;
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index cfe93b9..e6aacb9 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -162,7 +162,7 @@ void PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewFontFace )
    for (; it != maFontFaces.end(); ++it)
    {
        PhysicalFontFace* pFoundFontFace = it->get();
        sal_Int32 eComp = pNewFontFace->CompareWithSize( *pFoundFontFace );
        sal_Int32 eComp = pNewFontFace->CompareIgnoreSize( *pFoundFontFace );
        if( eComp > 0 )
            continue;
        if( eComp < 0 )