summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/dialogs/searchresults.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:47:06 +0000
commit8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch)
treeca2b0cc4fba88107f5f6e740285184a061011866 /sc/source/ui/dialogs/searchresults.cxx
parentAdding debian version 4:24.2.3-2. (diff)
downloadlibreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz
libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sc/source/ui/dialogs/searchresults.cxx')
-rw-r--r--sc/source/ui/dialogs/searchresults.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx
index 4ea08c1d49..31444dbb3f 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -249,18 +249,22 @@ IMPL_LINK_NOARG( SearchResultsDlg, ListSelectHdl, weld::TreeView&, void )
return;
// Jump to the cell.
- ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
- pScViewShell->SetTabNo(nTab);
- pScViewShell->SetCursor(aPos.Col(), aPos.Row());
- pScViewShell->AlignToCursor(aPos.Col(), aPos.Row(), SC_FOLLOW_JUMP);
+ if (ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell())
+ {
+ pScViewShell->SetTabNo(nTab);
+ pScViewShell->SetCursor(aPos.Col(), aPos.Row());
+ pScViewShell->AlignToCursor(aPos.Col(), aPos.Row(), SC_FOLLOW_JUMP);
+ }
}
IMPL_STATIC_LINK( SearchResultsDlg, OnShowToggled, weld::Toggleable&, rButton, void )
{
- ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
- ScViewOptions aViewOpt( pScViewShell->GetViewData().GetOptions() );
- aViewOpt.SetOption( VOPT_SUMMARY, rButton.get_active() );
- pScViewShell->GetViewData().SetOptions( aViewOpt );
+ if (ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell())
+ {
+ ScViewOptions aViewOpt( pScViewShell->GetViewData().GetOptions() );
+ aViewOpt.SetOption( VOPT_SUMMARY, rButton.get_active() );
+ pScViewShell->GetViewData().SetOptions( aViewOpt );
+ }
}
SearchResultsDlgWrapper::SearchResultsDlgWrapper(