summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r--sc/source/ui/vba/vbarange.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 089e92f8c948..913b05ceffc9 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3834,8 +3834,8 @@ static double getDefaultCharWidth( ScDocShell* pDocShell )
OutputDevice* pRefDevice = rDoc.GetRefDevice();
ScPatternAttr* pAttr = rDoc.GetDefPattern();
vcl::Font aDefFont;
- pAttr->GetFont( aDefFont, SC_AUTOCOL_BLACK, pRefDevice );
- pRefDevice->SetFont( aDefFont );
+ pAttr->fillFontOnly(aDefFont, pRefDevice);
+ pRefDevice->SetFont(aDefFont);
tools::Long nCharWidth = pRefDevice->GetTextWidth( OUString( '0' ) ); // 1/100th mm
return o3tl::convert<double>(nCharWidth, o3tl::Length::mm100, o3tl::Length::pt);
}