drop isLOKTablet
follow-up of
commit f436c1cd89
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Fri May 29 10:07:20 2026 +0200
drop isLOKMobilePhone
Change-Id: I0b7774357071ea25069655dad33b2f3e2c02b835
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205827
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
@@ -118,8 +118,7 @@ namespace o3tl
|
||||
enum class LOKDeviceFormFactor
|
||||
{
|
||||
UNKNOWN = 0,
|
||||
DESKTOP = 1,
|
||||
TABLET = 2
|
||||
DESKTOP = 1
|
||||
};
|
||||
|
||||
class SfxViewFactory;
|
||||
@@ -476,8 +475,6 @@ public:
|
||||
CalendarWrapper& GetLOKCalendar();
|
||||
/// Check if the lok client is running on a desktop machine.
|
||||
bool isLOKDesktop() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::DESKTOP; }
|
||||
/// Check if the lok client is running on a tablet.
|
||||
bool isLOKTablet() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::TABLET; }
|
||||
|
||||
virtual tools::Rectangle getLOKVisibleArea() const { return tools::Rectangle(); }
|
||||
|
||||
|
||||
@@ -2732,23 +2732,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
|
||||
ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
|
||||
return;
|
||||
}
|
||||
// On a mobile device view there is no ctrl+click and for hyperlink popup
|
||||
// the cell coordinates must be sent along with click position for elegance
|
||||
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
|
||||
if (isTiledRendering && pViewShell && pViewShell->isLOKTablet())
|
||||
{
|
||||
aPos = rMEvt.GetPosPixel();
|
||||
mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY );
|
||||
OString aCursor
|
||||
= pViewShell->GetViewData().describeCellCursorAt(nUrlCellX, nPosY);
|
||||
double fPPTX = pViewShell->GetViewData().GetPPTX();
|
||||
int mouseX = aPos.X() / fPPTX;
|
||||
int mouseY = aPos.Y() / fPPTX;
|
||||
OString aMsg(aUrl.toUtf8() + " coordinates: " + aCursor + ", "
|
||||
+ OString::number(mouseX) + ", " + OString::number(mouseY));
|
||||
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, aMsg);
|
||||
} else
|
||||
ScGlobal::OpenURL(aUrl, aTarget);
|
||||
ScGlobal::OpenURL(aUrl, aTarget);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -296,7 +296,6 @@
|
||||
#define STR_PRESOBJ_TITLE_MOBILE NC_("STR_PRESOBJ_TITLE_MOBILE", "Double-tap to add Title" )
|
||||
#define STR_PRESOBJ_OUTLINE_MOBILE NC_("STR_PRESOBJ_OUTLINE_MOBILE", "Double-tap to add Text" )
|
||||
#define STR_PRESOBJ_TEXT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Double-tap to add Text" )
|
||||
#define STR_PRESOBJ_TEXT_EDIT_MOBILE NC_("STR_PRESOBJ_TEXT_MOBILE", "Tap to edit text" )
|
||||
#define STR_PRESOBJ_NOTESTEXT_MOBILE NC_("STR_PRESOBJ_NOTESTEXT_MOBILE", "Double-tap to add Notes" )
|
||||
#define STR_PRESOBJ_GRAPHIC NC_("STR_PRESOBJ_GRAPHIC", "Double-click to add an Image" )
|
||||
#define STR_PRESOBJ_OBJECT NC_("STR_PRESOBJ_OBJECT", "Double-click to add an Object" )
|
||||
|
||||
@@ -2717,8 +2717,6 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const
|
||||
bool isMobileDevice = true;
|
||||
#else
|
||||
bool isMobileDevice = false;
|
||||
if (const SfxViewShell* pCurrentViewShell = SfxViewShell::Current())
|
||||
isMobileDevice = pCurrentViewShell->isLOKTablet();
|
||||
#endif
|
||||
|
||||
if (eObjKind == PresObjKind::Title)
|
||||
|
||||
@@ -524,9 +524,6 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
|
||||
aSet.Put(makeSdrTextAutoGrowHeightItem(true));
|
||||
pTxtObj->SetMergedItemSet(aSet);
|
||||
pTxtObj->AdjustTextFrameWidthAndHeight();
|
||||
const SfxViewShell* pCurrentViewShell = SfxViewShell::Current();
|
||||
if (pCurrentViewShell && (pCurrentViewShell->isLOKTablet()))
|
||||
pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE));
|
||||
}
|
||||
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
|
||||
{
|
||||
|
||||
@@ -458,8 +458,6 @@ void SfxLokHelper::setDeviceFormFactor(std::u16string_view rDeviceFormFactor)
|
||||
{
|
||||
if (rDeviceFormFactor == u"desktop")
|
||||
g_deviceFormFactor = LOKDeviceFormFactor::DESKTOP;
|
||||
else if (rDeviceFormFactor == u"tablet")
|
||||
g_deviceFormFactor = LOKDeviceFormFactor::TABLET;
|
||||
else
|
||||
g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user