diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:27:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:27:54 +0000 |
commit | adb203bc05e3e36173cbd46b9951f79821a81799 (patch) | |
tree | 6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /sw/source/uibase/shells | |
parent | Adding debian version 4:24.2.0-3. (diff) | |
download | libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip |
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index a5a63a6634..d5eec21320 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -836,8 +836,12 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); SwFrameFormat* pFrameFormat = FindFrameFormat(pObj); - SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT)); - rSet.Put(SfxBoolItem(nWhich, aHOrient.GetHoriOrient() == nHoriOrient)); + if (pFrameFormat) + { + SwFormatHoriOrient aHOrient( + pFrameFormat->GetFormatAttr(RES_HORI_ORIENT)); + rSet.Put(SfxBoolItem(nWhich, aHOrient.GetHoriOrient() == nHoriOrient)); + } } if (bVert && !bDisableThis && rMarkList.GetMarkCount() == 1) @@ -860,8 +864,12 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); SwFrameFormat* pFrameFormat = FindFrameFormat(pObj); - SwFormatVertOrient aVOrient(pFrameFormat->GetFormatAttr(RES_VERT_ORIENT)); - rSet.Put(SfxBoolItem(nWhich, aVOrient.GetVertOrient() == nVertOrient)); + if (pFrameFormat) + { + SwFormatVertOrient aVOrient( + pFrameFormat->GetFormatAttr(RES_VERT_ORIENT)); + rSet.Put(SfxBoolItem(nWhich, aVOrient.GetVertOrient() == nVertOrient)); + } } } break; |