diff options
Diffstat (limited to 'sc/source/core/data/global.cxx')
-rw-r--r-- | sc/source/core/data/global.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index b7145d569445..12b7cbbe6b56 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -577,13 +577,13 @@ void ScGlobal::InitTextHeight(SfxItemPool* pPool) } OutputDevice* pDefaultDev = Application::GetDefaultDevice(); - VirtualDevice aVirtWindow( *pDefaultDev ); - aVirtWindow.SetMapMode(MAP_PIXEL); + ScopedVclPtrInstance< VirtualDevice > pVirtWindow( *pDefaultDev ); + pVirtWindow->SetMapMode(MAP_PIXEL); vcl::Font aDefFont; - pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, &aVirtWindow); // Font color doesn't matter here - aVirtWindow.SetFont(aDefFont); + pPattern->GetFont(aDefFont, SC_AUTOCOL_BLACK, pVirtWindow); // Font color doesn't matter here + pVirtWindow->SetFont(aDefFont); sal_uInt16 nTest = static_cast<sal_uInt16>( - aVirtWindow.PixelToLogic(Size(0, aVirtWindow.GetTextHeight()), MAP_TWIP).Height()); + pVirtWindow->PixelToLogic(Size(0, pVirtWindow->GetTextHeight()), MAP_TWIP).Height()); if (nTest > nDefFontHeight) nDefFontHeight = nTest; |