diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-14 16:42:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-15 21:36:27 +0200 |
commit | bf3d1b8e8f89bfdb409c70cfea126f36474d4772 (patch) | |
tree | 9d496d04fc1bbd76c15ab215f947ac28587f0e1e /sc/source/ui/view/cellsh4.cxx | |
parent | 957adc83e67276805c6dcd7be1ea23c142c49306 (diff) |
establish that ScViewData::GetDocument can always return ScDocument&
we can only be ctored with a ScDocShell& or ScDocument&, and ScDocShell
provides a ScDocument& from its GetDocument() so we can always have a
ScDocument& when a public ctor has completed
some null checks can then be seen to be redundant and are removed
Change-Id: Ifaf39cb06e8dbce363999c05ee0aeb3ec4f00428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102775
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view/cellsh4.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh4.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx index 56d74cd4b86a..3243400faaf1 100644 --- a/sc/source/ui/view/cellsh4.cxx +++ b/sc/source/ui/view/cellsh4.cxx @@ -107,7 +107,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) } SCCOLROW nRTLSign = 1; - if ( pData->GetDocument()->IsLayoutRTL( pData->GetTabNo() ) ) + if ( pData->GetDocument().IsLayoutRTL( pData->GetTabNo() ) ) { //! evaluate cursor movement option? nRTLSign = -1; @@ -266,7 +266,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq ) SCROW nMovY = nRepeat; // Horizontal direction depends on whether or not the UI language is RTL. SCCOL nMovX = nRepeat; - if (GetViewData()->GetDocument()->IsLayoutRTL(GetViewData()->GetTabNo())) + if (GetViewData()->GetDocument().IsLayoutRTL(GetViewData()->GetTabNo())) { // mirror horizontal movement for right-to-left mode. nMovX = -nRepeat; |