diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-16 17:34:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-17 09:58:50 +0100 |
commit | fb032d58c71fc2d5c199b24b669a69ce119fff80 (patch) | |
tree | c98750da1e243086da09937617404ff2cbdbcb0a /vcl | |
parent | b4b224f6710adaa1cd9c6413e9754db6fbee3e9c (diff) |
flush out unused Font objects
Change-Id: Ifd6379b2cb6e5945ff509be8dc61c61bd70724c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86938
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/calendar.cxx | 3 | ||||
-rw-r--r-- | vcl/source/edit/texteng.cxx | 2 | ||||
-rw-r--r-- | vcl/workben/vcldemo.cxx | 11 |
3 files changed, 6 insertions, 10 deletions
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx index 22d3d9f56ab3..0baecf397d5f 100644 --- a/vcl/source/control/calendar.cxx +++ b/vcl/source/control/calendar.cxx @@ -204,8 +204,6 @@ void Calendar::ImplFormat() OUString const a99Text("99"); - vcl::Font aOldFont = GetFont(); - long n99TextWidth = GetTextWidth( a99Text ); long nTextHeight = GetTextHeight(); @@ -1532,7 +1530,6 @@ void Calendar::EndSelection() Size Calendar::CalcWindowSizePixel() const { OUString const a99Text("99"); - vcl::Font aOldFont = GetFont(); Size aSize; long n99TextWidth = GetTextWidth( a99Text ); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 397a1de8a23a..9ceb0c83542e 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2135,8 +2135,6 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) sal_Int32 nIndex = pLine->GetStart(); TextLine aSaveLine( *pLine ); - vcl::Font aFont; - while ( nIndex < pNode->GetText().getLength() ) { bool bEOL = false; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 2698d350caae..97b51bbb8f00 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -2237,17 +2237,18 @@ public: }; namespace { - void renderFonts(const std::vector<OUString> &aFontNames) + void renderFonts() { ScopedVclPtrInstance<VirtualDevice> xDevice; Size aSize(1024, 1024); xDevice->SetOutputSizePixel(aSize); +#if 0 for (auto & aFontName : aFontNames) { vcl::Font aFont(aFontName, Size(0,96)); -#if 0 - aFont.SetCOL_BLACK); + + aFont.Set(COL_BLACK); xDevice->SetFont(aFont); xDevice->Erase(); @@ -2288,8 +2289,8 @@ include/vcl/outdev.hxx: DrawTextFla TextRectInfo* pInfo = nullptr, const vcl::ITextLayout* _pTextLayout = nullptr ) const; -#endif } +#endif } }; @@ -2384,7 +2385,7 @@ public: else if (bPopup) xPopup = VclPtrInstance< DemoPopup> (); else if (!aFontNames.empty()) - renderFonts(aFontNames); + renderFonts(); else aMainWin->Show(); |