diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 00754d301f57..07e4b80db1dc 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2945,9 +2945,6 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, } } - const OUString aDeviceFormFactor = extractParameter(aOptions, u"DeviceFormFactor"); - SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor); - const OUString aBatch = extractParameter(aOptions, u"Batch"); if (!aBatch.isEmpty()) { @@ -7168,9 +7165,6 @@ static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis, comphelper::LibreOfficeKit::setLocale(LanguageTag(aLanguage)); } - const OUString aDeviceFormFactor = extractParameter(aOptions, u"DeviceFormFactor"); - SfxLokHelper::setDeviceFormFactor(aDeviceFormFactor); - LibLODocument_Impl* pDocument = static_cast(pThis); const int nId = SfxLokHelper::createView(pDocument->mnDocumentId); diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index bca63af173d1..fb180b033839 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -139,10 +139,6 @@ public: static void setLoadLanguage(const OUString& rBcp47LanguageTag); /// Set the locale for the given view. static void setViewLocale(int nId, const OUString& rBcp47LanguageTag); - /// Get the device form factor that should be used for a new view. - static LOKDeviceFormFactor getDeviceFormFactor(); - /// Set the device form factor that should be used for a new view. - static void setDeviceFormFactor(std::u16string_view rDeviceFormFactor); /// Set color preview state for the given view. static void setColorPreviewState(int nId, bool nEnabled); diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 9944a4d8cd62..0ad4f1fcf643 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -108,19 +108,6 @@ namespace o3tl template<> struct typed_flags : is_typed_flags {}; } -/* [Description] - - The SfxViewShell flags control the behavior of SfxViewShell for the - duration of its lifetime. They are defined in the constructor of - . -*/ - -enum class LOKDeviceFormFactor -{ - UNKNOWN = 0, - DESKTOP = 1 -}; - class SfxViewFactory; #define SFX_DECL_VIEWFACTORY(Class) \ private: \ @@ -170,7 +157,6 @@ friend class SfxPrinterController; LanguageTag maLOKLanguageTag; LanguageTag maLOKLocale; std::unique_ptr mpCalendar; - LOKDeviceFormFactor maLOKDeviceFormFactor; bool mbLOKAccessibilityEnabled; rtl::Reference mpLOKDocumentFocusListener; std::unordered_set mvLOKBlockedCommandList; @@ -473,8 +459,6 @@ public: void SetLOKLanguageAndLocale(const OUString& rBcp47LanguageTag); /// Get the LibreOfficeKit calendar of this view. CalendarWrapper& GetLOKCalendar(); - /// Check if the lok client is running on a desktop machine. - bool isLOKDesktop() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::DESKTOP; } virtual tools::Rectangle getLOKVisibleArea() const { return tools::Rectangle(); } diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 654318b2143c..72276d83e4bc 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1278,7 +1278,7 @@ void ScInputHandler::ShowArgumentsTip( OUString& rSelText ) } const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (comphelper::LibreOfficeKit::isActive() && pViewShell && pViewShell->isLOKDesktop()) + if (comphelper::LibreOfficeKit::isActive()) { tools::JsonWriter writer; writer.put("type", "formulausage"); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 81123fdd6c41..e42c54dbad2b 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -426,12 +426,6 @@ void ScInputWindow::StartFormula() if (comphelper::LibreOfficeKit::isActive()) { TextGrabFocus(); - if (pViewSh && !pViewSh->isLOKDesktop()) - { - nStartPara = nEndPara = pView->getEditEngine().GetParagraphCount() ? - (pView->getEditEngine().GetParagraphCount() - 1) : 0; - nStartPos = nEndPos = pView->getEditEngine().GetTextLen(nStartPara); - } } pView->SetSelection(ESelection(nStartPara, nStartPos, nEndPara, nEndPos)); pScMod->InputChanged(pView); diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 3e9f7d854f2e..49823799f709 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -95,7 +95,6 @@ namespace { LanguageTag g_defaultLanguageTag(u"en-US"_ustr, true); LanguageTag g_loadLanguageTag(u"en-US"_ustr, true); //< The language used to load. -LOKDeviceFormFactor g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN; bool g_isDefaultTimezoneSet = false; OUString g_DefaultTimezone; const std::size_t g_logNotifierCacheMaxSize = 50; @@ -449,19 +448,6 @@ void SfxLokHelper::setViewLocale(int nId, const OUString& rBcp47LanguageTag) } } -LOKDeviceFormFactor SfxLokHelper::getDeviceFormFactor() -{ - return g_deviceFormFactor; -} - -void SfxLokHelper::setDeviceFormFactor(std::u16string_view rDeviceFormFactor) -{ - if (rDeviceFormFactor == u"desktop") - g_deviceFormFactor = LOKDeviceFormFactor::DESKTOP; - else - g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN; -} - void SfxLokHelper::setColorPreviewState(int nId, bool nEnabled) { std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl(); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index ec2f1146908e..d7fc3ae23b7e 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2754,7 +2754,6 @@ SfxViewShell::SfxViewShell , mbPrinterSettingsModified(false) , maLOKLanguageTag(LANGUAGE_NONE) , maLOKLocale(LANGUAGE_NONE) -, maLOKDeviceFormFactor(LOKDeviceFormFactor::UNKNOWN) , mbLOKAccessibilityEnabled(false) , mbLOKColorPreviewEnabled(false) { @@ -2776,8 +2775,6 @@ SfxViewShell::SfxViewShell maLOKIsTimezoneSet = isTimezoneSet; maLOKTimezone = aTimezone; - maLOKDeviceFormFactor = SfxLokHelper::getDeviceFormFactor(); - vcl::Window* pFrameWin = rViewFrame.GetWindow().GetFrameWindow(); if (pFrameWin && !pFrameWin->GetLOKNotifier()) pFrameWin->SetLOKNotifier(this, true);