summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/sdpage.cxx4
-rw-r--r--sd/source/ui/func/futext.cxx3
2 files changed, 5 insertions, 2 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 7f8178dea79f..39b59ca30ed6 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -2608,7 +2608,9 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
#if defined(IOS) || defined(ANDROID)
bool isMobileDevice = true;
#else
- bool isMobileDevice = comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) || comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView());
+ bool isMobileDevice = false;
+ if (const SfxViewShell* pCurrentViewShell = SfxViewShell::Current())
+ isMobileDevice = pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKMobilePhone();
#endif
if (eObjKind == PresObjKind::Title)
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 67f86e54c53d..51e5494ac697 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -524,7 +524,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
pTxtObj->SetMergedItemSet(aSet);
- if (comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView()) || comphelper::LibreOfficeKit::isTablet(SfxLokHelper::getView()))
+ const SfxViewShell* pCurrentViewShell = SfxViewShell::Current();
+ if (pCurrentViewShell && (pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet()))
pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE));
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )