diff options
Diffstat (limited to 'cui/source/tabpages/grfpage.cxx')
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index fe48e241c93b..70c126dcf651 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -681,17 +681,17 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) // display original size const FieldUnit eMetric = GetModuleFieldUnit( GetItemSet() ); - MetricField aFld(this, WB_HIDE); - SetFieldUnit( aFld, eMetric ); - aFld.SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); - aFld.SetMax( LONG_MAX - 1 ); - - aFld.SetValue( aFld.Normalize( aOrigSize.Width() ), eUnit ); - OUString sTemp = aFld.GetText(); - aFld.SetValue( aFld.Normalize( aOrigSize.Height() ), eUnit ); + VclPtr<MetricField> aFld(new MetricField(this, WB_HIDE)); + SetFieldUnit( *aFld.get(), eMetric ); + aFld->SetDecimalDigits( m_pWidthMF->GetDecimalDigits() ); + aFld->SetMax( LONG_MAX - 1 ); + + aFld->SetValue( aFld->Normalize( aOrigSize.Width() ), eUnit ); + OUString sTemp = aFld->GetText(); + aFld->SetValue( aFld->Normalize( aOrigSize.Height() ), eUnit ); // multiplication sign (U+00D7) sTemp += OUString( sal_Unicode (0x00D7) ); - sTemp += aFld.GetText(); + sTemp += aFld->GetText(); if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) { sal_Int32 ax = sal_Int32(floor((float)aOrigPixelSize.Width() / |