Kaydet (Commit) d50fbfab authored tarafından Caolán McNamara's avatar Caolán McNamara

restore a FontSizeBox::GetValue variant

correctly removed by 994a737a but
we will need it again soon

Change-Id: Ifedf8da2a33e834a5cba6da11c63c784572bd58d
üst 2174bb1a
......@@ -539,6 +539,7 @@ public:
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue( FieldUnit eOutUnit ) const;
virtual sal_Int64 GetValue() const;
sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const;
private:
// declared as private because some compilers would generate the default functions
......
......@@ -1992,6 +1992,27 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue )
SetValue( nNewValue, FUNIT_NONE );
}
// -----------------------------------------------------------------------
sal_Int64 FontSizeBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
{
if ( !bRelative )
{
sal_Int64 nComboVal = static_cast<sal_Int64>(reinterpret_cast<long>(ComboBox::GetEntryData( nPos )));
if ( nComboVal < 0 ) // marked as special?
{
return MetricField::ConvertValue( -nComboVal, mnBaseValue, GetDecimalDigits(),
meUnit, eOutUnit );
}
}
// do normal font size processing
sal_Int64 nRetValue = MetricBox::GetValue( nPos, eOutUnit );
return nRetValue;
}
// -----------------------------------------------------------------------
sal_Int64 FontSizeBox::GetValue( FieldUnit eOutUnit ) const
{
if ( !bRelative )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment