diff options
author | Paris Oplopoios <paris.oplopoios@collabora.com> | 2023-03-08 17:34:02 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-03-16 08:41:38 +0000 |
commit | 1916d161902bdd52b8cfa5b29153c8f8c39fce52 (patch) | |
tree | fdb789357ef4e58e3f26066235b5928efcf63437 /sw/source/ui/misc | |
parent | ee8e9b993595e728f827a5fe6ab1ae5fb1f6aaae (diff) |
De-static-izing colors in SwViewOption
The view colors in SwViewOption were static which means that two
separate views couldn't have different colors
Change-Id: Id595b00ba56bdb210ad1a784cf76e99ead0d6014
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148481
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index f98603c6c7c3..1d4e3888f250 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -872,9 +872,13 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re pVDev->SetMapMode(rRenderContext.GetMapMode()); pVDev->SetOutputSize(aSize); + const SwViewOption& pOpt = SwViewOption::GetCurrentViewOptions(); + const Color& rDocColor = pOpt.GetDocColor(); + const Color& rDocBoundariesColor = pOpt.GetDocBoundariesColor(); + const Color& rFontColor = pOpt.GetFontColor(); // #101524# OJ - pVDev->SetFillColor(SwViewOption::GetDocColor()); - pVDev->SetLineColor(SwViewOption::GetDocBoundariesColor()); + pVDev->SetFillColor(rDocColor); + pVDev->SetLineColor(rDocBoundariesColor); pVDev->DrawRect(tools::Rectangle(Point(0,0), aSize)); if (m_pActNum) @@ -897,9 +901,9 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re GetDefaultFontFlags::OnlyOne, &rRenderContext); if (svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR, false).nColor == COL_AUTO) - m_aStdFont.SetColor( SwViewOption::GetDocColor().IsDark() ? COL_WHITE : COL_BLACK ); + m_aStdFont.SetColor( rDocColor.IsDark() ? COL_WHITE : COL_BLACK ); else - m_aStdFont.SetColor( SwViewOption::GetFontColor() ); + m_aStdFont.SetColor( rFontColor ); const tools::Long nFontHeight = nYStep * ( m_bPosition ? 15 : 6 ) / 10; m_aStdFont.SetFontSize(Size( 0, nFontHeight )); |