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/core/text/inftxt.cxx | |
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/core/text/inftxt.cxx')
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index a4fea746dc9d..358b961c8b50 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1084,7 +1084,7 @@ void SwTextPaintInfo::DrawPostIts( bool bScript ) const if ( GetTextFrame()->IsVertical() ) GetTextFrame()->SwitchHorizontalToVertical( aTmpRect ); - SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aTmpRect, bScript ); + GetOpt().PaintPostIts( const_cast<OutputDevice*>(GetOut()), aTmpRect, bScript ); } @@ -1095,12 +1095,12 @@ void SwTextPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool if ( !aIntersect.HasArea() ) return; - if (OnWin() && SwViewOption::IsFieldShadings() && + if (OnWin() && GetOpt().IsFieldShadings() && !GetOpt().IsPagePreview()) { OutputDevice* pOut = const_cast<OutputDevice*>(GetOut()); pOut->Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR ); - pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOut->SetFillColor( GetOpt().GetFieldShadingsColor() ); pOut->SetLineColor(); pOut->DrawRect( aIntersect.SVRect() ); pOut->Pop(); @@ -1135,7 +1135,7 @@ void SwTextPaintInfo::DrawBackground( const SwLinePortion &rPor, const Color *pC if ( pColor ) pOut->SetFillColor( *pColor ); else - pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOut->SetFillColor( GetOpt().GetFieldShadingsColor() ); pOut->SetLineColor(); @@ -1161,12 +1161,12 @@ void SwTextPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const if(bIsStartMark) SAL_INFO("sw.core", "Found StartMark"); if (OnWin() && (pFieldmark!=nullptr || bIsStartMark) && - SwViewOption::IsFieldShadings() && + GetOpt().IsFieldShadings() && !GetOpt().IsPagePreview()) { OutputDevice* pOutDev = const_cast<OutputDevice*>(GetOut()); pOutDev->Push( vcl::PushFlags::LINECOLOR | vcl::PushFlags::FILLCOLOR ); - pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() ); + pOutDev->SetFillColor( GetOpt().GetFieldShadingsColor() ); pOutDev->SetLineColor( ); pOutDev->DrawRect( aIntersect.SVRect() ); pOutDev->Pop(); @@ -1326,7 +1326,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor, case PortionType::ControlChar: if ( !GetOpt().IsPagePreview() && !GetOpt().IsReadonly() - && SwViewOption::IsFieldShadings() + && GetOpt().IsFieldShadings() && ( PortionType::Number != nWhich || m_pFrame->GetTextNodeForParaProps()->HasMarkedLabel())) // #i27615# { @@ -1339,7 +1339,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor, case PortionType::InputField: // input field shading also in read-only mode if ( !GetOpt().IsPagePreview() - && SwViewOption::IsFieldShadings() ) + && GetOpt().IsFieldShadings() ) { bDraw = true; } |