sc/source/core/data/sortparam.cxx | 1 + sd/source/ui/view/drviewsk.cxx | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-)
New commits: commit 439a78496a9a45c6e412fa93edb537727ab7862a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri May 12 21:17:57 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat May 13 11:38:42 2023 +0200 cid#1530046 Unchecked dynamic_cast Change-Id: Iaeec0f90e6faae8f7c5ab8e1745c8bdb62925ca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151714 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx index 673416aff4f7..607b59d25111 100644 --- a/sd/source/ui/view/drviewsk.cxx +++ b/sd/source/ui/view/drviewsk.cxx @@ -23,19 +23,21 @@ void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, Co { svtools::ColorConfig *pColorConfig = dynamic_cast<svtools::ColorConfig*>(pCb); ConfigureAppBackgroundColor(pColorConfig); - SfxViewShell* pCurrentShell = SfxViewShell::Current(); - if (comphelper::LibreOfficeKit::isActive() && pCurrentShell) + if (comphelper::LibreOfficeKit::isActive()) { - DrawViewShell* pCurrentDrawShell = nullptr; + SfxViewShell* pCurrentShell = SfxViewShell::Current(); ViewShellBase* pShellBase = dynamic_cast<ViewShellBase*>(pCurrentShell); - if(pShellBase) - pCurrentDrawShell = dynamic_cast<DrawViewShell*>(pShellBase->GetMainViewShell().get()); - pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; - pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); + if (!pShellBase) + return; + if (DrawViewShell* pCurrentDrawShell = dynamic_cast<DrawViewShell*>(pShellBase->GetMainViewShell().get())) + { + pCurrentDrawShell->maViewOptions.mnDocBackgroundColor = pColorConfig->GetColorValue(svtools::DOCCOLOR).nColor; + pCurrentDrawShell->maViewOptions.msColorSchemeName = pColorConfig->GetCurrentSchemeName(); + } SdXImpressDocument* pDoc = comphelper::getFromUnoTunnel<SdXImpressDocument>(pCurrentShell->GetCurrentDocument()); SfxLokHelper::notifyViewRenderState(pCurrentShell, pDoc); Color aFillColor(pColorConfig->GetColorValue(svtools::APPBACKGROUND).nColor); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, + pCurrentShell->libreOfficeKitViewCallback(LOK_CALLBACK_APPLICATION_BACKGROUND_COLOR, aFillColor.AsRGBHexString().toUtf8()); } } commit 2ac8bf040be16eea79b1386a9466a058deee330f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri May 12 21:10:50 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat May 13 11:38:35 2023 +0200 cid#1529965 Uninitialized scalar variable Change-Id: I8a4ca8ad47086d19b6714d9846775afd5e81fda8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/data/sortparam.cxx b/sc/source/core/data/sortparam.cxx index 66b8c4f33db6..3e1506dbad7c 100644 --- a/sc/source/core/data/sortparam.cxx +++ b/sc/source/core/data/sortparam.cxx @@ -198,6 +198,7 @@ ScSortParam::ScSortParam( const ScSubTotalParam& rSub, const ScSortParam& rOld ) key.bDoSort = true; key.nField = nThisField; key.bAscending = rOld.maKeyState[i].bAscending; + key.aColorSortMode = ScColorSortMode::None; maKeyState.push_back(key); } }