diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 3ef1b08e9ca1..91ccaa83d8fb 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -884,7 +884,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) void ChartController::execute_DoubleClick( const Point* pMousePixel, bool &bEditText ) { const SfxViewShell* pViewShell = SfxViewShell::Current(); - bool notAllowed = pViewShell && (pViewShell->isLOKMobilePhone() || pViewShell->IsLokReadOnlyView()); + bool notAllowed = pViewShell && (pViewShell->IsLokReadOnlyView()); if (notAllowed) return; diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 54706d5b7547..9495be102488 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -119,8 +119,7 @@ enum class LOKDeviceFormFactor { UNKNOWN = 0, DESKTOP = 1, - TABLET = 2, - MOBILE = 3 + TABLET = 2 }; class SfxViewFactory; @@ -479,8 +478,6 @@ public: bool isLOKDesktop() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::DESKTOP; } /// Check if the lok client is running on a tablet. bool isLOKTablet() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::TABLET; } - /// Check if the lok client is running on a mobile device. - bool isLOKMobilePhone() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::MOBILE; } virtual tools::Rectangle getLOKVisibleArea() const { return tools::Rectangle(); } diff --git a/include/vcl/builderpage.hxx b/include/vcl/builderpage.hxx index cf37cc9ba249..9d8d6ac00fec 100644 --- a/include/vcl/builderpage.hxx +++ b/include/vcl/builderpage.hxx @@ -25,7 +25,7 @@ class VCL_DLLPUBLIC BuilderPage { public: BuilderPage(weld::Widget* pParent, weld::DialogController* pController, - const OUString& rUIXMLDescription, const OUString& rID, bool bIsMobile = false); + const OUString& rUIXMLDescription, const OUString& rID); virtual ~BuilderPage(); /* The title of the page, in an Assistant the dialog may append this page title to the diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 2c511d4d67d2..550440da0980 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -1333,7 +1333,7 @@ public: // For vclbootstrapprotector: static void setDeInitHook(Link const & hook); - static std::unique_ptr CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, bool bMobile = false, sal_uInt64 nLOKWindowId = 0); + static std::unique_ptr CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, sal_uInt64 nLOKWindowId = 0); // For the duration of vcl parent windows static std::unique_ptr CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile, bool bAllowCycleFocusOut, sal_uInt64 nLOKWindowId = 0); diff --git a/include/vcl/weld/DialogController.hxx b/include/vcl/weld/DialogController.hxx index cb670a777fa8..4cffc959c654 100644 --- a/include/vcl/weld/DialogController.hxx +++ b/include/vcl/weld/DialogController.hxx @@ -49,7 +49,7 @@ protected: public: GenericDialogController(weld::Widget* pParent, const OUString& rUIFile, - const OUString& rDialogId, bool bMobile = false); + const OUString& rDialogId); virtual Dialog* getDialog() override; virtual ~GenericDialogController() override; }; diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 1a832d4272c9..81123fdd6c41 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -196,10 +196,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) : InsertItem (SID_INPUT_FUNCTION, Image(StockImage::Yes, RID_BMP_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2); } - const bool bIsLOKMobilePhone = mpViewShell && mpViewShell->isLOKMobilePhone(); - // sigma and equal buttons - if (!bIsLOKMobilePhone) { InsertItem (SID_INPUT_SUM, Image(StockImage::Yes, RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWN, 3); InsertItem (SID_INPUT_EQUAL, Image(StockImage::Yes, RID_BMP_INPUT_EQUAL), ToolBoxItemBits::NONE, 4); @@ -224,7 +221,6 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) : } // sigma and equal buttons - if (!bIsLOKMobilePhone) { SetHelpId (SID_INPUT_SUM, HID_INSWIN_SUM); SetHelpId (SID_INPUT_EQUAL, HID_INSWIN_FUNC); @@ -883,10 +879,7 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, ScTabViewShell* pViewSh) mxButtonUp->set_size_request(-1, nHeight); mxButtonDown->set_size_request(-1, nHeight); - // disable the multiline toggle on the mobile phones - const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (!comphelper::LibreOfficeKit::isActive() || !(pViewShell && pViewShell->isLOKMobilePhone())) - mxButtonDown->show(); + mxButtonDown->show(); // tdf#154042 Use an initial height of one row so the Toolbar positions // this in the same place regardless of how many rows it eventually shows diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 81936bc8384e..d84153fe4138 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -420,17 +420,11 @@ IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry&, rEntry, void ) RecalcAll(); } -static bool isLOKMobilePhone() -{ - SfxViewShell* pCurrent = SfxViewShell::Current(); - return pCurrent && pCurrent->isLOKMobilePhone(); -} - ScCondFormatDlg::ScCondFormatDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent, ScViewData& rViewData, const std::shared_ptr& rItem) : ScAnyRefDlgController(pB, pCW, pParent, - isLOKMobilePhone()?u"modules/scalc/ui/conditionalformatdialogmobile.ui"_ustr:u"modules/scalc/ui/conditionalformatdialog.ui"_ustr, + u"modules/scalc/ui/conditionalformatdialog.ui"_ustr, u"ConditionalFormatDialog"_ustr) , mrViewData(rViewData) // previous version based on SfxPoolItem used SfxPoolItem::Clone here, so make a copy diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 7e28274c57bf..904d1455ddbd 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -46,15 +46,9 @@ // force them to take a 1/3 of the available space #define CommonWidgetWidth 10 -static bool isLOKMobilePhone() -{ - SfxViewShell* pCurrent = SfxViewShell::Current(); - return pCurrent && pCurrent->isLOKMobilePhone(); -} - ScCondFrmtEntry::ScCondFrmtEntry(ScCondFormatList* pParent, ScDocument& rDoc, const ScAddress& rPos) : mpParent(pParent) - , mxBuilder(Application::CreateBuilder(pParent->GetGrid(), isLOKMobilePhone()?u"modules/scalc/ui/conditionalentrymobile.ui"_ustr:u"modules/scalc/ui/conditionalentry.ui"_ustr)) + , mxBuilder(Application::CreateBuilder(pParent->GetGrid(), u"modules/scalc/ui/conditionalentry.ui"_ustr)) , mxBorder(mxBuilder->weld_widget(u"border"_ustr)) , mxGrid(mxBuilder->weld_container(u"grid"_ustr)) , mxFtCondNr(mxBuilder->weld_label(u"number"_ustr)) diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 590768f75518..0af029794a44 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -81,14 +81,6 @@ const WhichRangesContainer ScTPValidationValue::pValueRanges(svl::Items< FID_VALID_MODE, FID_VALID_ERRTEXT >); -static bool isLOKMobilePhone() -{ - if (!comphelper::LibreOfficeKit::isActive()) - return false; - SfxViewShell* pViewShell = SfxViewShell::Current(); - return pViewShell && pViewShell->isLOKMobilePhone(); -} - ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell *pTabViewSh) : ScValidationDlgBase(pParent, @@ -105,12 +97,6 @@ ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSe ScTPValidationHelp::Create, RID_L + RID_TAB_VALIDITY_INPUT.sIconName); AddTabPage(u"erroralert"_ustr, TabResId(RID_TAB_VALIDITY_ERROR.aLabel), ScTPValidationError::Create, RID_L + RID_TAB_VALIDITY_ERROR.sIconName); - - if (isLOKMobilePhone()) - { - m_xBuilder->weld_button(u"cancel"_ustr)->hide(); - m_xBuilder->weld_button(u"help"_ustr)->hide(); - } } void ScValidationDlg::EndDialog(int nResponse) diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index c9c57512b7e5..49fa6c8a4b60 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -271,15 +271,6 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt) if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - bool isMobilePhone = comphelper::LibreOfficeKit::isActive() && rViewShell.isLOKMobilePhone(); - // Double tapping on charts on phone may result in activating the edit mode which is not wanted. - // It happens due to the delay of selection message of the object from kit to javascript - // in that case F2 is sent instead of double click - if (isMobilePhone && ScDocument::IsChart(pObj)) - { - rViewShell.ActivateObject(static_cast(pObj), css::embed::EmbedVerbs::MS_OLEVERB_PRIMARY); - break; - } if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) ) // start text edit for suitable object bReturn = true; } diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index d8921bdc4d90..edaaf56bb4de 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -627,7 +627,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawV if( xChartModel.is() ) xChartModel->unlockControllers(); } - else if (!rViewSh.isLOKMobilePhone()) + else { //the controller will be unlocked by the dialog when the dialog is told to do so diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index bd1339f696af..0e5ba8d1b31f 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -58,103 +58,6 @@ using sc::TwipsToEvenHMM; -namespace -{ -/// Rid ourselves of unwanted " quoted json characters. -OString escapeJSON(const OUString &aStr) -{ - OUString aEscaped = aStr; - aEscaped = aEscaped.replaceAll("\n", " "); - aEscaped = aEscaped.replaceAll("\"", "'"); - return OUStringToOString(aEscaped, RTL_TEXTENCODING_UTF8); -} - -void lcl_lokGetWholeFunctionList() -{ - const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (!(comphelper::LibreOfficeKit::isActive() - && pViewShell && pViewShell->isLOKMobilePhone())) - return; - - const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); - sal_uInt32 nListCount = pFuncList->GetCount(); - std::set aFuncNameOrderedSet; - for(sal_uInt32 i = 0; i < nListCount; ++i) - { - const ScFuncDesc* pDesc = pFuncList->GetFunction( i ); - if ( pDesc->mxFuncName ) - { - aFuncNameOrderedSet.insert(*pDesc->mxFuncName); - } - } - ScFunctionMgr* pFuncManager = ScGlobal::GetStarCalcFunctionMgr(); - if (!(pFuncManager && aFuncNameOrderedSet.size())) - return; - - OStringBuffer aPayload( - "{ \"wholeList\": true, " - "\"categories\": [ "); - - formula::FormulaHelper aHelper(pFuncManager); - sal_uInt32 nCategoryCount = pFuncManager->getCount(); - for (sal_uInt32 i = 0; i < nCategoryCount; ++i) - { - OUString sCategoryName = ScFunctionMgr::GetCategoryName(i); - aPayload.append("{" - "\"name\": \"" - + escapeJSON(sCategoryName) - + "\"}, "); - } - sal_Int32 nLen = aPayload.getLength(); - aPayload[nLen - 2] = ' '; - aPayload[nLen - 1] = ']'; - aPayload.append(", "); - - OUString aDescFuncNameStr; - aPayload.append("\"functions\": [ "); - sal_uInt32 nCurIndex = 0; - for (const OUString& aFuncNameStr : aFuncNameOrderedSet) - { - aDescFuncNameStr = aFuncNameStr + "()"; - sal_Int32 nNextFStart = 0; - const formula::IFunctionDescription* ppFDesc; - ::std::vector< OUString > aArgs; - OUString eqPlusFuncName = "=" + aDescFuncNameStr; - if ( aHelper.GetNextFunc( eqPlusFuncName, false, nNextFStart, nullptr, &ppFDesc, &aArgs ) ) - { - if ( ppFDesc && !ppFDesc->getFunctionName().isEmpty() ) - { - if (ppFDesc->getCategory()) - { - aPayload.append("{" - "\"index\": " - + OString::number(static_cast(nCurIndex)) - + ", " - "\"category\": " - + OString::number(static_cast(ppFDesc->getCategory()->getNumber())) - + ", " - "\"signature\": \"" - + escapeJSON(ppFDesc->getSignature()) - + "\", " - "\"description\": \"" - + escapeJSON(ppFDesc->getDescription()) - + "\"}, "); - } - } - } - ++nCurIndex; - } - nLen = aPayload.getLength(); - aPayload[nLen - 2] = ' '; - aPayload[nLen - 1] = ']'; - aPayload.append(" }"); - - OString s = aPayload.makeStringAndClear(); - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, s); -} - -} // end namespace - void ScCellShell::Execute( SfxRequest& rReq ) { ScTabViewShell* pTabViewShell = GetViewData().GetViewShell(); @@ -417,23 +320,11 @@ void ScCellShell::Execute( SfxRequest& rReq ) case SID_OPENDLG_FUNCTION: { - const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (comphelper::LibreOfficeKit::isActive() - && pViewShell && pViewShell->isLOKMobilePhone()) - { - // not set the dialog id in the mobile case or we would - // not be able to get cell address pasted in the edit view - // by just tapping on them - lcl_lokGetWholeFunctionList(); - } - else - { - sal_uInt16 nId = SID_OPENDLG_FUNCTION; - SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame(); - SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId ); - bool bVis = comphelper::LibreOfficeKit::isActive() || pWnd == nullptr; - pScMod->SetRefDialog( nId, bVis ); - } + sal_uInt16 nId = SID_OPENDLG_FUNCTION; + SfxViewFrame& rViewFrm = pTabViewShell->GetViewFrame(); + SfxChildWindow* pWnd = rViewFrm.GetChildWindow( nId ); + bool bVis = comphelper::LibreOfficeKit::isActive() || pWnd == nullptr; + pScMod->SetRefDialog( nId, bVis ); rReq.Ignore(); } break; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 60f97f828cda..ae132913138e 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1846,21 +1846,6 @@ bool ScGridWindow::TestMouse( const MouseEvent& rMEvt, bool bAction ) void ScGridWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - if (SfxLokHelper::getDeviceFormFactor() == LOKDeviceFormFactor::MOBILE) - { - ScViewFunc* pView = mrViewData.GetView(); - ScTabViewShell* pViewShell = mrViewData.GetViewShell(); - bool bRefMode = pViewShell && pViewShell->IsRefInputMode(); - - Point aPos(rMEvt.GetPosPixel()); - SCCOL nPosX; - SCROW nPosY; - mrViewData.GetPosFromPixel(aPos.X(), aPos.Y(), eWhich, nPosX, nPosY); - - if (bRefMode && pView->GetFunctionSet().CheckRefBounds(nPosX, nPosY)) - return; - } - nNestedButtonState = ScNestedButtonState::Down; MouseEventState aState; @@ -2750,8 +2735,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) // 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->isLOKMobilePhone() || pViewShell->isLOKTablet())) + if (isTiledRendering && pViewShell && pViewShell->isLOKTablet()) { aPos = rMEvt.GetPosPixel(); mrViewData.GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, nPosX, nPosY ); diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index b90a9d330469..fbf3a207a66a 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -486,7 +486,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll if (bRefMode) { // if no input is possible from this doc, don't move the reference cursor around - if ( !ScModule::get()->IsModalMode(m_rViewData.GetSfxDocShell()) && (!CheckRefBounds(nPosX, nPosY) || SfxLokHelper::getDeviceFormFactor() != LOKDeviceFormFactor::MOBILE)) + if ( !ScModule::get()->IsModalMode(m_rViewData.GetSfxDocShell()) && !CheckRefBounds(nPosX, nPosY)) { if (!m_bAnchor) { @@ -494,8 +494,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCCOL nPosX, SCROW nPosY, bool bScroll pView->InitRefMode( nPosX, nPosY, m_rViewData.CurrentTabForData(), SC_REFTYPE_REF ); } - if(SfxLokHelper::getDeviceFormFactor() != LOKDeviceFormFactor::MOBILE) - pView->UpdateRef( nPosX, nPosY, m_rViewData.CurrentTabForData() ); + pView->UpdateRef( nPosX, nPosY, m_rViewData.CurrentTabForData() ); pView->SelectionChanged(); } diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 006d751cad93..8ca5e4936f87 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -425,11 +425,8 @@ std::shared_ptr ScTabViewShell::CreateRefDialogCont } case SID_OPENDLG_FUNCTION: { - if (!isLOKMobilePhone()) - { - // dialog checks, what is in the cell - xResult = std::make_shared(pB, pCW, pParent, GetViewData(), ScGlobal::GetStarCalcFunctionMgr()); - } + // dialog checks, what is in the cell + xResult = std::make_shared(pB, pCW, pParent, GetViewData(), ScGlobal::GetStarCalcFunctionMgr()); break; } case WID_CONDFRMT_REF: diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index d5e85fd9683a..0cddc26c20b4 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -760,9 +760,8 @@ bool ScViewFunc::PasteDataFormatFormattedText( SotClipboardFormatId nFormatId, && rDataHelper.GetString( nFormatId, *pStrBuffer )) { // Do CSV dialog if more than one line. But not if invoked from Automation. - const SfxViewShell* pViewShell = SfxViewShell::Current(); sal_Int32 nDelim = pStrBuffer->indexOf('\n'); - if (!(pViewShell && pViewShell->isLOKMobilePhone()) && !comphelper::Automation::AutomationInvokedZone::isActive() + if (!comphelper::Automation::AutomationInvokedZone::isActive() && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1) { vcl::Window* pParent = GetActiveWin(); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index b10ab3a7d94a..a1d97749f8ec 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2718,7 +2718,7 @@ OUString SdPage::GetPresObjText(PresObjKind eObjKind) const #else bool isMobileDevice = false; if (const SfxViewShell* pCurrentViewShell = SfxViewShell::Current()) - isMobileDevice = pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet(); + isMobileDevice = pCurrentViewShell->isLOKTablet(); #endif if (eObjKind == PresObjKind::Title) diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 2cf4051ffafd..6cbc58d1fdef 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -90,7 +90,7 @@ namespace sd { SdPropertySubControl::SdPropertySubControl(weld::Container* pParent) : mxBuilder(Application::CreateBuilder(pParent, u"modules/simpress/ui/customanimationfragment.ui"_ustr, - false, reinterpret_cast(SfxViewShell::Current()))) + reinterpret_cast(SfxViewShell::Current()))) , mxContainer(mxBuilder->weld_container(u"EffectFragment"_ustr)) , mpParent(pParent) { diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 2071425629b0..ceda5723c8f6 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -525,7 +525,7 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) pTxtObj->SetMergedItemSet(aSet); pTxtObj->AdjustTextFrameWidthAndHeight(); const SfxViewShell* pCurrentViewShell = SfxViewShell::Current(); - if (pCurrentViewShell && (pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet())) + if (pCurrentViewShell && (pCurrentViewShell->isLOKTablet())) pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE)); } else if( nSlotId == SID_ATTR_CHAR_VERTICAL ) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index a79e8d803100..37fb22a27c00 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1020,22 +1020,9 @@ OString Int32Payload(sal_uInt16, SfxViewFrame*, const css::frame::FeatureStateEv return aBuffer.makeStringAndClear(); } -OString TransformPayload(sal_uInt16 nSID, SfxViewFrame* pViewFrame, +OString TransformPayload(sal_uInt16, SfxViewFrame*, const css::frame::FeatureStateEvent& aEvent, const SfxPoolItem*) { - if (aEvent.IsEnabled && pViewFrame->GetViewShell()->isLOKMobilePhone()) - { - boost::property_tree::ptree aTree; - boost::property_tree::ptree aState; - - aTree.put("commandName", aEvent.FeatureURL.Complete); - pViewFrame->GetBindings().QueryControlState(nSID, aState); - aTree.add_child("state", aState); - - std::stringstream aStream; - boost::property_tree::write_json(aStream, aTree); - return OString(aStream.str()); - } return aEvent.FeatureURL.Complete.toUtf8() + "="; // Should an empty string be returned? } diff --git a/sfx2/source/dialog/SfxTabPage.cxx b/sfx2/source/dialog/SfxTabPage.cxx index 004ad0e7f75f..73bbc5cbb475 100644 --- a/sfx2/source/dialog/SfxTabPage.cxx +++ b/sfx2/source/dialog/SfxTabPage.cxx @@ -34,16 +34,8 @@ css::uno::Reference< css::frame::XFrame > SfxTabPage::GetFrame() const return mxFrame; } -static bool isLOKMobilePhone() -{ - if (!comphelper::LibreOfficeKit::isActive()) - return false; - const SfxViewShell* pCurrentShell = SfxViewShell::Current(); - return pCurrentShell && pCurrentShell->isLOKMobilePhone(); -} - SfxTabPage::SfxTabPage(weld::Container* pPage, weld::DialogController* pController, const OUString& rUIXMLDescription, const OUString& rID, const SfxItemSet *rAttrSet) - : BuilderPage(pPage, pController, rUIXMLDescription, rID, isLOKMobilePhone()) + : BuilderPage(pPage, pController, rUIXMLDescription, rID) , mpSet(rAttrSet) , mbHasExchangeSupport(false) , mbCancel(false) diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index d2796b19206e..2d8054e1ac9c 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -203,17 +203,9 @@ void SfxModelessDialogController::Close() SfxDialogController::Close(); } -static bool isLOKMobilePhone() -{ - if (!comphelper::LibreOfficeKit::isActive()) - return false; - const SfxViewShell* pCurrentShell = SfxViewShell::Current(); - return pCurrentShell && pCurrentShell->isLOKMobilePhone(); -} - SfxDialogController::SfxDialogController(weld::Widget* pParent, const OUString& rUIFile, const OUString& rDialogId) - : GenericDialogController(pParent, rUIFile, rDialogId, isLOKMobilePhone()) + : GenericDialogController(pParent, rUIFile, rDialogId) { m_xDialog->SetInstallLOKNotifierHdl(LINK(this, SfxDialogController, InstallLOKNotifierHdl)); m_xDialog->connect_container_focus_changed(LINK(this, SfxDialogController, FocusChangeHdl)); diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 330b03459a83..0b9f40618459 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -241,13 +241,6 @@ void Deck::RequestLayout() aParentSize.setHeight(mnMinimalHeight); bChangeNeeded = true; } - const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (mnMinimalWidth > 0 && (mnMinimalWidth != aParentSize.Width() || GetSizePixel().Width() != mnMinimalWidth) - && pViewShell && pViewShell->isLOKMobilePhone()) - { - aParentSize.setWidth(mnMinimalWidth); - bChangeNeeded = true; - } if (bChangeNeeded) { diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index b24dc6e70251..529fc97b86f5 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -50,7 +50,7 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor, Deck* pDeck, std::function aContextAccess, const css::uno::Reference& rxFrame) - : mxBuilder(Application::CreateBuilder(pParentWindow, u"sfx/ui/panel.ui"_ustr, false, reinterpret_cast(SfxViewShell::Current()))) + : mxBuilder(Application::CreateBuilder(pParentWindow, u"sfx/ui/panel.ui"_ustr, reinterpret_cast(SfxViewShell::Current()))) , msPanelId(rPanelDescriptor.msId) , msTitle(rPanelDescriptor.msTitle) , mbIsTitleBarOptional(rPanelDescriptor.mbIsTitleBarOptional) diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx index 2b012f3d723b..316a90c3f8bd 100644 --- a/sfx2/source/sidebar/PanelLayout.cxx +++ b/sfx2/source/sidebar/PanelLayout.cxx @@ -28,7 +28,7 @@ PanelLayout::PanelLayout(weld::Widget* pParent, const OUString& rID, PanelLayout::PanelLayout(weld::Widget* pParent, const OUString& rID, const OUString& rUIXMLDescription, sal_uInt64 nWindowId) - : m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription, false, nWindowId)) + : m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription, nWindowId)) , m_xContainer(m_xBuilder->weld_container(rID)) , m_pPanel(nullptr) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 9060e646776a..59d933ccdb08 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1227,17 +1227,7 @@ void SidebarController::RequestCloseDeck() if (comphelper::LibreOfficeKit::isActive() && mpCurrentDeck) { const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (pViewShell && pViewShell->isLOKMobilePhone()) - { - // Mobile phone - TODO: unify with desktop - tools::JsonWriter aJsonWriter; - aJsonWriter.put("id", mpParentWindow->get_id()); - aJsonWriter.put("type", "dockingwindow"); - aJsonWriter.put("text", mpParentWindow->GetText()); - aJsonWriter.put("enabled", false); - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aJsonWriter.finishAndGetAsOString()); - } - else if (pViewShell) + if (pViewShell) { tools::JsonWriter aJsonWriter; aJsonWriter.put("id", mpParentWindow->get_id()); diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 6d38a3b9e483..cd625b2e2344 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -460,8 +460,6 @@ void SfxLokHelper::setDeviceFormFactor(std::u16string_view rDeviceFormFactor) g_deviceFormFactor = LOKDeviceFormFactor::DESKTOP; else if (rDeviceFormFactor == u"tablet") g_deviceFormFactor = LOKDeviceFormFactor::TABLET; - else if (rDeviceFormFactor == u"mobile") - g_deviceFormFactor = LOKDeviceFormFactor::MOBILE; else g_deviceFormFactor = LOKDeviceFormFactor::UNKNOWN; } diff --git a/solenv/sanitizers/ui/svx.suppr b/solenv/sanitizers/ui/svx.suppr index d4661584933c..103179cd6764 100644 --- a/solenv/sanitizers/ui/svx.suppr +++ b/solenv/sanitizers/ui/svx.suppr @@ -35,14 +35,6 @@ svx/uiconfig/ui/findreplacedialog.ui://GtkLabel[@id='label7'] orphan-label svx/uiconfig/ui/findreplacedialog.ui://GtkRadioButton[@id='rows'] labelled-by-and-mnemonic svx/uiconfig/ui/floatingcontour.ui://GtkLabel[@id='statuspos'] orphan-label svx/uiconfig/ui/floatingcontour.ui://GtkLabel[@id='statussize'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='label4'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='searchdesc'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='entirecells'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='label5'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='replacedesc'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='label7'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkLabel[@id='searchinlabel'] orphan-label -svx/uiconfig/ui/findreplacedialog-mobile.ui://GtkComboBoxText[@id='calcsearchin'] no-labelled-by svx/uiconfig/ui/fontworkgallerydialog.ui://GtkLabel[@id='label1'] orphan-label svx/uiconfig/ui/grafctrlbox.ui://GtkSpinButton[@id='spinfield'] no-labelled-by svx/uiconfig/ui/imapdialog.ui://GtkLabel[@id='statusurl'] orphan-label diff --git a/static/CustomTarget_emscripten_fs_image.mk b/static/CustomTarget_emscripten_fs_image.mk index 8f0208425205..d16e8ffc7e4d 100644 --- a/static/CustomTarget_emscripten_fs_image.mk +++ b/static/CustomTarget_emscripten_fs_image.mk @@ -1538,7 +1538,6 @@ gb_emscripten_fs_image_files += \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/filtermenu.ui \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/filternavigator.ui \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/findbox.ui \ - $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/findreplacedialog-mobile.ui \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/findreplacedialog.ui \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/floatingareastyle.ui \ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/svx/ui/floatingcontour.ui \ diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 03324d91f172..962a33fe4afc 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -55,7 +55,6 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/filternavigator \ svx/uiconfig/ui/findbox \ svx/uiconfig/ui/findreplacedialog \ - svx/uiconfig/ui/findreplacedialog-mobile \ svx/uiconfig/ui/floatingareastyle \ svx/uiconfig/ui/floatingcontour \ svx/uiconfig/ui/floatingframeborder \ diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 5daed50640a6..0c3a22b6627a 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -86,15 +86,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star; using namespace comphelper; - -static bool IsMobile() -{ - if (!comphelper::LibreOfficeKit::isActive()) - return false; - SfxViewShell* pCurrent = SfxViewShell::Current(); - return pCurrent && pCurrent->isLOKMobilePhone(); -} - enum class ModifyFlags { NONE = 0x000000, Search = 0x000001, @@ -244,7 +235,7 @@ void SearchAttrItemList::Remove(size_t nPos) SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind) : SfxModelessDialogController(&rBind, pChildWin, pParent, - IsMobile() ? u"svx/ui/findreplacedialog-mobile.ui"_ustr : u"svx/ui/findreplacedialog.ui"_ustr, + u"svx/ui/findreplacedialog.ui"_ustr, u"FindReplaceDialog"_ustr) , m_rBindings(rBind) , m_aPresentIdle("Bring SvxSearchDialog to Foreground") @@ -324,10 +315,7 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWi m_xSearchAttrText->hide(); this->SetSearchLabel(u""_ustr); // hide the message but keep the box height - - //weird findreplacedialog-mobile.ui case doesn't have searchicon or searchbox - if (m_xSearchIcon) - m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here + m_xSearchIcon->set_size_request(24, 24); // vcl/res/infobar.png is 32x32 - too large here m_xReplaceTmplLB->make_sorted(); m_xReplaceAttrText->hide(); @@ -573,26 +561,20 @@ void SvxSearchDialog::SetSearchLabel(const OUString& rStr) if (!rStr.isEmpty()) { m_xSearchLabel->show(); - if (m_xSearchIcon) - { - m_xSearchIcon->show(); - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - if (rStyleSettings.GetDialogColor().IsDark()) - m_xSearchBox->set_background(Color(0x00, 0x56, 0x80)); - else - m_xSearchBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as InfobarType::INFO - } + m_xSearchIcon->show(); + const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + if (rStyleSettings.GetDialogColor().IsDark()) + m_xSearchBox->set_background(Color(0x00, 0x56, 0x80)); + else + m_xSearchBox->set_background(Color(0xBD, 0xE5, 0xF8)); // same as InfobarType::INFO } else { m_xSearchLabel->hide(); - if (m_xSearchIcon) - { - const Size aSize = m_xSearchBox->get_preferred_size(); - m_xSearchIcon->hide(); - m_xSearchBox->set_size_request(-1, aSize.Height()); - m_xSearchBox->set_background(COL_TRANSPARENT); - } + const Size aSize = m_xSearchBox->get_preferred_size(); + m_xSearchIcon->hide(); + m_xSearchBox->set_size_request(-1, aSize.Height()); + m_xSearchBox->set_background(COL_TRANSPARENT); } if (rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND)) diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 719e296dce6c..5f5065060f21 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -65,12 +65,6 @@ TextPropertyPanel::TextPropertyPanel(weld::Widget* pParent, const css::uno::Refe , mxSpacingBar(m_xBuilder->weld_toolbar(u"spacingbar"_ustr)) , mxSpacingBarDispatch(new ToolbarUnoDispatcher(*mxSpacingBar, *m_xBuilder, rxFrame)) { - bool isMobilePhone = false; - const SfxViewShell* pViewShell = SfxViewShell::Current(); - if (comphelper::LibreOfficeKit::isActive() && - pViewShell && pViewShell->isLOKMobilePhone()) - isMobilePhone = true; - mxSpacingBar->set_visible(!isMobilePhone); } TextPropertyPanel::~TextPropertyPanel() diff --git a/svx/uiconfig/ui/findreplacedialog-mobile.ui b/svx/uiconfig/ui/findreplacedialog-mobile.ui deleted file mode 100644 index 1d7ff7066774..000000000000 --- a/svx/uiconfig/ui/findreplacedialog-mobile.ui +++ /dev/null @@ -1,1117 +0,0 @@ - - - - - - False - 6 - Find & Replace - False - 0 - 0 - dialog - - - - - - False - vertical - 6 - - - False - end - - - _Help - False - True - True - True - - - False - True - 1 - True - - - - - _Close - False - True - True - True - - - False - True - 2 - - - - - False - True - end - 0 - - - - - True - False - True - vertical - 6 - - - True - False - True - 0 - none - - - - True - False - True - 6 - 12 - 12 - 6 - - - - True - False - center - 6 - True - - - True - False - center - True - True - - - True - True - True - - - - - 0 - 0 - - - - - False - True - True - - - 0 - 1 - - - - - 1 - 0 - 2 - - - - - True - False - start - center - _Find: - True - 0 - 0.5 - - - - - - 0 - 0 - - - - - False - True - True - True - end - 0 - 0.5 - - - 1 - 2 - - - - - False - True - True - True - end - 0 - - - static - - - - - 1 - 4 - - - - - True - False - 12 - - - Ma_tch case - True - True - False - True - True - - - False - True - 0 - - - - - For_matted display - True - True - False - True - True - - - False - True - 1 - - - - - True - False - - - Whole wor_ds only - True - True - False - True - True - - - False - True - 0 - - - - - False - True - _Entire cells - True - - - False - True - 1 - - - - - False - True - 2 - - - - - All _sheets - True - False - True - True - True - - - False - True - 3 - - - - - 1 - 3 - - - - - - - - - - - - - - - - - - - False - _Search For - True - - - - - - - - False - True - 0 - - - - - True - False - True - 0 - none - - - - True - False - True - vertical - 6 - 12 - 12 - - - - True - False - center - 6 - True - - - True - False - center - True - True - - - True - True - True - - - - - 0 - 0 - - - - - False - True - True - - - 0 - 1 - - - - - 1 - 0 - 2 - - - - - True - False - start - center - Re_place: - True - 0 - - - - - - 0 - 0 - - - - - 1 - False - True - True - True - end - 0 - - - 1 - 2 - - - - - - - - - - - - - False - Re_place With - True - - - - - - - - False - True - 1 - - - - - True - False - center - 10 - 10 - 15 - 12 - True - - - Find _All - True - True - True - True - - - False - True - 0 - - - - - Find Pre_vious - True - True - True - True - - - False - True - 1 - - - - - Find Ne_xt - True - True - True - True - True - True - - - False - True - 2 - - - - - _Replace - True - True - True - True - - - False - True - 3 - - - - - Replace A_ll - True - True - True - True - - - False - True - 4 - - - - - False - True - 2 - - - - - False - - - False - True - 6 - True - 0 - none - - - True - False - True - 18 - 12 - 6 - - - False - Component Label - True - - - - - - False - True - 1 - - - - - True - False - 12 - - - component button 1 - True - True - True - - - False - True - 0 - - - - - component button 2 - True - True - True - - - False - True - 1 - - - - - False - True - 2 - - - - - - - False - Component Label - True - - - - - - - - - - False - True - 3 - - - - - - False - False - 10 - True - - - False - True - 6 - 1 - 1 - True - True - - - True - False - True - vertical - 12 - 12 - 6 - - - - True - False - True - 6 - 12 - True - - - C_urrent selection only - True - False - True - True - True - - - 0 - 0 - - - - - Re_gular expressions - True - False - True - True - True - - - 0 - 1 - - - - - True - False - True - 12 - spread - - - Attribut_es... - True - True - True - True - - - False - True - 0 - - - - - For_mat... - True - True - True - True - - - False - True - 1 - - - - - _No Format - True - True - True - True - - - False - True - 2 - - - - - 0 - 5 - 2 - - - - - Search for st_yles - True - False - True - True - True - - - 1 - 1 - - - - - Diac_ritic-sensitive - True - True - False - True - True - - - 0 - 4 - - - - - _Kashida-sensitive - True - True - False - True - True - - - 1 - 4 - - - - - Match character _width - True - True - False - True - True - - - 1 - 2 - - - - - True - False - 12 - - - S_imilarity search - True - False - True - True - True - - - False - True - 0 - - - - - Similarities... - True - True - True - end - True - True - - - False - True - 1 - - - - - 0 - 2 - - - - - True - False - 12 - - - Sounds like (_Japanese) - True - False - True - True - True - - - False - True - 0 - - - - - Sounds... - True - True - True - end - True - True - - - False - True - 1 - - - - - 0 - 3 - - - - - True - False - - - Wil_dcards - True - False - True - True - True - - - False - True - 0 - - - - - _Comments - True - True - False - True - True - - - False - True - 1 - - - - - 1 - 3 - - - - - Replace _backwards - True - False - True - True - True - - - 1 - 0 - - - - - False - True - 0 - - - - - - False - True - 6 - 12 - True - - - True - False - 15 - - - False - True - Search i_n: - True - 0 - - - False - True - 0 - - - - - False - True - - Formulas - Values - Notes - - - - False - True - 1 - - - - - 1 - 0 - - - - - True - False - 4 - 15 - - - False - True - Direction: - True - 0 - - - - - - - False - True - 0 - - - - - True - False - 15 - - - Ro_ws - True - False - True - True - True - True - - - - - - False - True - 0 - - - - - Colum_ns - True - False - True - True - True - rows - - - - - - False - True - 1 - - - - - False - True - 1 - - - - - 0 - 0 - - - - - False - True - 1 - - - - - - - True - False - start - Other _options - True - - - - - - - - 0 - 0 - - - - - False - True - 4 - - - - - False - True - 1 - - - - - - help - close - - - - True - - - - - - diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx index d0910709b43a..2516e6ad9789 100644 --- a/sw/source/core/crsr/bookmark.cxx +++ b/sw/source/core/crsr/bookmark.cxx @@ -1002,7 +1002,7 @@ namespace sw::mark if (!comphelper::LibreOfficeKit::isActive()) return; - if (!pViewShell || pViewShell->isLOKMobilePhone()) + if (!pViewShell) return; if (m_aPortionPaintArea.IsEmpty()) diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx b/sw/source/uibase/dialog/watermarkdialog.cxx index 6ab3e4c9a655..cbd2cf946fd2 100644 --- a/sw/source/uibase/dialog/watermarkdialog.cxx +++ b/sw/source/uibase/dialog/watermarkdialog.cxx @@ -28,14 +28,6 @@ #include #include -static bool isLOKMobilePhone() -{ - if (!comphelper::LibreOfficeKit::isActive()) - return false; - SfxViewShell* pCurrent = SfxViewShell::Current(); - return pCurrent && pCurrent->isLOKMobilePhone(); -} - SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindings) : SfxDialogController(pParent, u"modules/swriter/ui/watermarkdialog.ui"_ustr, u"WatermarkDialog"_ustr) , m_rBindings(rBindings) @@ -47,14 +39,6 @@ SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindin , m_xColor(new ColorListBox(m_xBuilder->weld_menu_button(u"Color"_ustr), [this]{ return m_xDialog.get(); })) { InitFields(); - - if (isLOKMobilePhone()) - { - m_xBuilder->weld_label(u"ColorLabel"_ustr)->hide(); - m_xColor->hide(); - m_xBuilder->weld_button(u"cancel"_ustr)->hide(); - m_xBuilder->weld_button(u"help"_ustr)->hide(); - } } SwWatermarkDialog::~SwWatermarkDialog() diff --git a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx index 6717bc83f45f..40c35251c015 100644 --- a/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx +++ b/sw/source/uibase/sidebar/A11yCheckIssuesPanel.cxx @@ -40,7 +40,6 @@ namespace sw::sidebar AccessibilityCheckEntry::AccessibilityCheckEntry( weld::Container* pParent, std::shared_ptr const& rAccessibilityIssue) : m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/accessibilitycheckentry.ui"_ustr, - false, reinterpret_cast(SfxViewShell::Current()))) , m_xContainer(m_xBuilder->weld_container(u"accessibilityCheckEntryBox"_ustr)) , m_xLabel(m_xBuilder->weld_label(u"accessibilityCheckEntryLabel"_ustr)) @@ -97,7 +96,6 @@ IMPL_LINK_NOARG(AccessibilityCheckEntry, FixButtonClicked, weld::Button&, void) AccessibilityCheckLevel::AccessibilityCheckLevel(weld::Box* pParent, css::uno::Reference xSidebar) : m_xBuilder(Application::CreateBuilder(pParent, u"svx/ui/accessibilitychecklevel.ui"_ustr, - false, reinterpret_cast(SfxViewShell::Current()))) , m_xContainer(m_xBuilder->weld_box(u"accessibilityCheckLevelBox"_ustr)) , m_xSidebar(std::move(xSidebar)) diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx index b095881e1d5b..ac3089b11af3 100644 --- a/vcl/inc/jsdialog/enabled.hxx +++ b/vcl/inc/jsdialog/enabled.hxx @@ -16,7 +16,7 @@ namespace jsdialog { /// used to not warn about it bool isIgnored(std::u16string_view rUIFile); -bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile); +bool isBuilderEnabled(std::u16string_view rUIFile); bool isBuilderEnabledForPopup(std::u16string_view rUIFile); bool isBuilderEnabledForMenu(std::u16string_view rUIFile); bool isBuilderEnabledForSidebar(std::u16string_view rUIFile); diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 27c2444ed4ae..45ef1e75f475 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -42,14 +42,6 @@ constexpr auto IgnoredList { u"sfx/ui/quickfind.ui" }, }); -// ========== MOBILE DIALOGS ================================================= // - -constexpr auto MobileDialogList - = frozen::make_unordered_set({ - { u"modules/swriter/ui/watermarkdialog.ui" }, - { u"svx/ui/findreplacedialog-mobile.ui" } - }); - // ========== DIALOGS ======================================================= // // Split into few - to allow constexpr and manage order @@ -560,15 +552,8 @@ bool isIgnored(std::u16string_view rUIFile) return isInMap(IgnoredList, rUIFile); } -bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) +bool isBuilderEnabled(std::u16string_view rUIFile) { - // mobile only dialogs - if (bMobile) - { - if (isInMap(MobileDialogList, rUIFile)) - return true; - } - if (isInMap(CuiDialogList, rUIFile)) return true; diff --git a/vcl/source/weld/DialogController.cxx b/vcl/source/weld/DialogController.cxx index 29d252561d08..4ed521ce0a8e 100644 --- a/vcl/source/weld/DialogController.cxx +++ b/vcl/source/weld/DialogController.cxx @@ -39,8 +39,8 @@ DialogController::~DialogController() {} Dialog* GenericDialogController::getDialog() { return m_xDialog.get(); } GenericDialogController::GenericDialogController(weld::Widget* pParent, const OUString& rUIFile, - const OUString& rDialogId, bool bMobile) - : m_xBuilder(Application::CreateBuilder(pParent, rUIFile, bMobile)) + const OUString& rDialogId) + : m_xBuilder(Application::CreateBuilder(pParent, rUIFile)) , m_xDialog(m_xBuilder->weld_dialog(rDialogId)) { } diff --git a/vcl/source/weld/weldutils.cxx b/vcl/source/weld/weldutils.cxx index ae43c9f4e7d6..51eb42002f43 100644 --- a/vcl/source/weld/weldutils.cxx +++ b/vcl/source/weld/weldutils.cxx @@ -26,9 +26,9 @@ #include BuilderPage::BuilderPage(weld::Widget* pParent, weld::DialogController* pController, - const OUString& rUIXMLDescription, const OUString& rID, bool bIsMobile) + const OUString& rUIXMLDescription, const OUString& rID) : m_pDialogController(pController) - , m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription, bIsMobile)) + , m_xBuilder(Application::CreateBuilder(pParent, rUIXMLDescription)) , m_xContainer(m_xBuilder->weld_container(rID)) { } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index b8633ed5ba56..db445c63beb5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -266,7 +266,7 @@ void Application::UICoverageReport(tools::JsonWriter& rJson, } } -std::unique_ptr Application::CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, bool bMobile, sal_uInt64 nLOKWindowId) +std::unique_ptr Application::CreateBuilder(weld::Widget* pParent, const OUString &rUIFile, sal_uInt64 nLOKWindowId) { SalInstance* pSalInstance = GetSalInstance(); @@ -285,7 +285,7 @@ std::unique_ptr Application::CreateBuilder(weld::Widget* pParent, return JSInstanceBuilder::CreateSidebarBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile, "navigator", nLOKWindowId); else if (jsdialog::isBuilderEnabledForQuickFind(rUIFile)) return JSInstanceBuilder::CreateSidebarBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile, "quickfind", nLOKWindowId); - else if (jsdialog::isBuilderEnabled(rUIFile, bMobile)) + else if (jsdialog::isBuilderEnabled(rUIFile)) return JSInstanceBuilder::CreateDialogBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile); // this is notebookbar widget but converted from sidebar panel else if (jsdialog::isInterimBuilderEnabledForNotebookbar(rUIFile))