diff options
41 files changed, 52 insertions, 51 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index e4ac9b790633..410555b95be1 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1493,7 +1493,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) return; if (!mpUIBuilder) - mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", "")); + mpUIBuilder.reset(new VclBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/BasicIDE/ui/breakpointmenus.ui", "")); Point aPos( rCEvt.IsMouseEvent() ? rCEvt.GetMousePosPixel() : Point(1,1) ); Point aEventPos( PixelToLogic( aPos ) ); diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index 89310849537a..365c7f9f00d5 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -23,8 +23,8 @@ #include <CustomNotebookbarGenerator.hxx> #include <osl/file.hxx> #include <osl/thread.h> -#include <vcl/builder.hxx> #include <vcl/EnumContext.hxx> +#include <vcl/settings.hxx> #include <sfx2/viewfrm.hxx> #include <com/sun/star/frame/ModuleManager.hpp> #include <unotools/confignode.hxx> @@ -113,7 +113,7 @@ OUString CustomNotebookbarGenerator::getOriginalUIPath() { OUString sAppName, sNotebookbarUIFileName; CustomNotebookbarGenerator::getFileNameAndAppName(sAppName, sNotebookbarUIFileName); - return VclBuilderContainer::getUIRootDir() + "modules/s" + sAppName.toAsciiLowerCase() + "/ui/" + return AllSettings::GetUIRootDir() + "modules/s" + sAppName.toAsciiLowerCase() + "/ui/" + sNotebookbarUIFileName; } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 54ea53f0e18f..9f3df281d774 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1118,7 +1118,7 @@ bool OJoinTableView::IsAddAllowed() void OJoinTableView::executePopup(const Point& _aPos, VclPtr<OTableConnection>& rSelConnection) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/joinviewmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/joinviewmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); aContextMenu->Execute(this, _aPos); OString sIdent = aContextMenu->GetCurItemIdent(); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index bb7bd9584115..5a42aec9c842 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1940,7 +1940,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) if (!static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly()) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); sal_uInt16 nItemId = aContextMenu->Execute(this, aMenuPos); if (nItemId == aContextMenu->GetItemId("delete")) @@ -1953,7 +1953,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) { if (!static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly()) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/queryfuncmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/queryfuncmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); aContextMenu->CheckItem("functions", m_bVisibleRow[BROW_FUNCTION_ROW]); aContextMenu->CheckItem("tablename", m_bVisibleRow[BROW_TABLE_ROW]); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index d32ba27b90ca..05ea3e744281 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -574,7 +574,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) ptWhere = m_xTitle->GetPosPixel(); } - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/jointablemenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/jointablemenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); if (aContextMenu->Execute(this, ptWhere)) Remove(); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 39e3bd86ee3f..6dbb9327877a 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1385,7 +1385,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if ( !IsColumnSelected( nColId ) ) SelectColumnId( nColId ); - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), false); aContextMenu->RemoveDisabledEntries(true, true); @@ -1396,7 +1396,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) } else { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/tabledesignrowmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/tabledesignrowmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), IsCutAllowed()); diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index a969dc2c0f28..a11b0ce9a222 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -109,7 +109,7 @@ void OTableRowView::Command(const CommandEvent& rEvt) if ( nColId == HANDLE_ID ) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); long nSelectRowCount = GetSelectRowCount(); aContextMenu->EnableItem(aContextMenu->GetItemId("cut"), nSelectRowCount != 0); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index d43a93505724..fda93027044c 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -906,7 +906,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo if ( !(xSpeller.is() && pImpEditView->IsWrongSpelledWord( aPaM, true )) ) return; - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "editeng/ui/spellmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "editeng/ui/spellmenu.ui", ""); VclPtr<PopupMenu> aPopupMenu(aBuilder.get_menu("menu")); const sal_uInt16 nAutoCorrId = aPopupMenu->GetItemId("autocorrect"); PopupMenu *pAutoMenu = aPopupMenu->GetPopupMenu(nAutoCorrId); diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index ce6a983b88cf..f060bda8eec7 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -305,7 +305,7 @@ void ControlMenuController::impl_setPopupMenu() { if (!m_xResPopupMenu) { - m_xBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/convertmenu.ui", "")); + m_xBuilder.reset(new VclBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/convertmenu.ui", "")); m_xResPopupMenu = m_xBuilder->get_menu("menu"); updateImagesPopupMenu(m_xResPopupMenu); } diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx index cdc877939b3f..64f929248fb5 100644 --- a/include/vcl/builder.hxx +++ b/include/vcl/builder.hxx @@ -463,8 +463,6 @@ public: virtual ~VclBuilderContainer(); void disposeBuilder(); - static OUString getUIRootDir(); - template <typename T> T* get(VclPtr<T>& ret, const OString& sID) { return m_pUIBuilder->get<T>(ret, sID); diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index c3567e4120d9..d6c365565e9c 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -705,6 +705,7 @@ public: const LanguageTag& GetUILanguageTag() const; static bool GetLayoutRTL(); // returns true if UI language requires right-to-left Text Layout static bool GetMathLayoutRTL(); // returns true if UI language requires right-to-left Math Layout + static OUString GetUIRootDir(); const LocaleDataWrapper& GetLocaleDataWrapper() const; const LocaleDataWrapper& GetUILocaleDataWrapper() const; const LocaleDataWrapper& GetNeutralLocaleDataWrapper() const; diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 1159fdd51cd0..4b6777e83ef2 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -689,7 +689,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) bEnable = true; nIndex = NextSelectedRow(); } - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/dbreport/ui/groupsortmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/dbreport/ui/groupsortmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); aContextMenu->EnableItem(aContextMenu->GetItemId("delete"), IsDeleteAllowed() && bEnable); if (aContextMenu->Execute(this, rEvt.GetMousePosPixel())) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 65d6bd4fbdc8..8322f0502dde 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG(ScInputWindow, DropdownClickHdl, ToolBox *, void) EndSelection(); if (nCurID == SID_INPUT_SUM) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/scalc/ui/autosum.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/scalc/ui/autosum.ui", ""); VclPtr<PopupMenu> aPopMenu(aBuilder.get_menu("menu")); aPopMenu->SetSelectHdl(LINK(this, ScInputWindow, MenuHdl)); aPopMenu->Execute(this, GetItemRect(SID_INPUT_SUM), PopupMenuFlags::NoMouseUpClose); diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index 4edab188efab..ed9c0fee48f0 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -1081,7 +1081,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( const Reference< XAnno sUIFile = "modules/simpress/ui/annotationmenu.ui"; else sUIFile = "modules/simpress/ui/annotationtagmenu.ui"; - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), sUIFile, ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), sUIFile, ""); VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu")); SvtUserOptions aUserOptions; diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index b163201d2f30..44b85a56e9ab 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -600,7 +600,7 @@ void LayoutMenu::ShowContextMenu(const Point* pPos) } // Setup the menu. - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/layoutmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/simpress/ui/layoutmenu.ui", ""); VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu")); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != nullptr) diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index f8847dbfc673..0c34781480b0 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -209,7 +209,7 @@ void MasterPagesSelector::ShowContextMenu(const Point* pPos) aPosition = *pPos; // Setup the menu. - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), GetContextMenuUIFile(), ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), GetContextMenuUIFile(), ""); VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu")); FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow()); if (pMenuWindow != nullptr) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 92d6cdd65f80..fba43df9aebe 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1933,7 +1933,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl, void*, void) if( !mbWasPaused ) pause(); - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/slidecontextmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/simpress/ui/slidecontextmenu.ui", ""); VclPtr<PopupMenu> pMenu(aBuilder.get_menu("menu")); // Adding button to display if in Pen mode diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 3b85a2e374e4..ead00a2beeb9 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -71,7 +71,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) : maButtonsTextColor(Color(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get())), mbInitControls( false ) { - m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), "sfx/ui/startcenter.ui", "StartCenter" )); + m_pUIBuilder.reset(new VclBuilder(this, AllSettings::GetUIRootDir(), "sfx/ui/startcenter.ui", "StartCenter" )); get(mpOpenButton, "open_all"); get(mpRemoteButton, "open_remote"); diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 0f497bf8c763..10904269d274 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -3322,7 +3322,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) } else { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/rulermenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/rulermenu.ui", ""); VclPtr<PopupMenu> aMenu(aBuilder.get_menu("menu")); aMenu->SetSelectHdl(LINK(this, SvxRuler, MenuSelect)); FieldUnit eUnit = GetUnit(); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 050824efd915..340e3b11e36c 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -493,7 +493,7 @@ IMPL_LINK_NOARG( FmGridHeader, OnAsyncExecuteDrop, void*, void ) OString sPreferredType = aPossibleTypes[0]; if ((m_pImpl->nDropAction == DND_ACTION_LINK) && (aPossibleTypes.size() > 1)) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/colsmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/colsmenu.ui", ""); VclPtr<PopupMenu> aInsertMenu(aBuilder.get_menu("menu")); PopupMenu* pTypeMenu = aInsertMenu->GetPopupMenu(aInsertMenu->GetItemId("insert")); pTypeMenu->ShowItem(pTypeMenu->GetItemId("dateandtimefield")); @@ -987,7 +987,7 @@ void FmGridHeader::triggerColumnContextMenu( const ::Point& _rPreferredPos ) sal_uInt16 nColId = GetItemId( _rPreferredPos ); // the menu - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/colsmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/colsmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); // let derivatives modify the menu diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index e0d8093ec989..f3b06d9d6453 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2746,7 +2746,7 @@ void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId) void DbGridControl::executeRowContextMenu( long _nRow, const Point& _rPreferredPos ) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/rowsmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/rowsmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); PreExecuteRowContextMenu( static_cast<sal_uInt16>(_nRow), *aContextMenu ); @@ -2789,7 +2789,7 @@ void DbGridControl::Command(const CommandEvent& rEvt) } else if (canCopyCellText(nRow, nColId)) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/cellmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/cellmenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); if (aContextMenu->Execute(this, rEvt.GetMousePosPixel())) copyCellText(nRow, nColId); diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 6a5d39fcf6ae..9e32c52af0d6 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1582,7 +1582,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) aSelectList.clear(); } - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/filtermenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/filtermenu.ui", ""); VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu")); // every condition could be deleted except the first one if it's the only one diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index ebadad17cdd3..2c9bc03b5bd4 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -151,7 +151,7 @@ sal_uInt16 FunctionPopup_Impl::function_to_id(sal_uInt16 nFunc) const } FunctionPopup_Impl::FunctionPopup_Impl(sal_uInt32 nCheckEncoded) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/functionmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/functionmenu.ui", "") , m_xMenu(m_aBuilder.get_menu("menu")) , m_nSelected(nCheckEncoded) { diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx index df54a7ae4f40..37747b919436 100644 --- a/svx/source/stbctrls/selctrl.cxx +++ b/svx/source/stbctrls/selctrl.cxx @@ -78,7 +78,7 @@ sal_uInt16 SelectionTypePopup::state_to_id(sal_uInt16 nState) const } SelectionTypePopup::SelectionTypePopup(sal_uInt16 nCurrent) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/selectionmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/selectionmenu.ui", "") , m_xMenu(m_aBuilder.get_menu("menu")) { m_xMenu->CheckItem(state_to_id(nCurrent)); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index c7b2bf2dca7d..9d1b98085883 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -101,7 +101,7 @@ void XmlSecStatusBarControl::Command( const CommandEvent& rCEvt ) { if( rCEvt.GetCommand() == CommandEventId::ContextMenu ) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/xmlsecstatmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/xmlsecstatmenu.ui", ""); VclPtr<PopupMenu> aPopupMenu(aBuilder.get_menu("menu")); if (aPopupMenu->Execute(&GetStatusBar(), rCEvt.GetMousePosPixel())) { diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 7ac0bc81afcc..d598822eda81 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -64,7 +64,7 @@ private: } ZoomPopup_Impl::ZoomPopup_Impl( sal_uInt16 nZ, SvxZoomEnableFlags nValueSet ) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "svx/ui/zoommenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "svx/ui/zoommenu.ui", "") , m_xMenu(m_aBuilder.get_menu("menu")) , nZoom(nZ) { diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 29a7e6cac33f..99cc57173860 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -29,6 +29,7 @@ #include <vcl/edit.hxx> #include <vcl/menu.hxx> #include <vcl/scrbar.hxx> +#include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <svl/undo.hxx> @@ -73,7 +74,7 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, SwSidebarItem& rSidebarItem, SwFormatField* aField ) : Window(&rEditWin) - , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/annotationmenu.ui", "") + , maBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/annotationmenu.ui", "") , mrMgr(aMgr) , mrView(rEditWin.GetView()) , mnEventId(nullptr) diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index c4d933ac9df7..45dfb48da60b 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -163,7 +163,7 @@ void SwFrameButtonPainter::PaintButton(drawinglayer::primitive2d::Primitive2DCon SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwFrame *pFrame, bool bHeader ) : SwFrameMenuButtonBase( pEditWin, pFrame ), - m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/headerfootermenu.ui", ""), + m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/headerfootermenu.ui", ""), m_bIsHeader( bHeader ), m_pPopupMenu(m_aBuilder.get_menu("menu")), m_pLine( nullptr ), diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 84ebedb0eb79..dedf167e7ed2 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -97,7 +97,7 @@ namespace SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwFrame *pFrame ) : SwFrameMenuButtonBase( pEditWin, pFrame ), - m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/pagebreakmenu.ui", ""), + m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/pagebreakmenu.ui", ""), m_pPopupMenu(m_aBuilder.get_menu("menu")), m_pLine( nullptr ), m_bIsAppearing( false ), diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 15cdb8e8ccd4..a252c16b0140 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -21,6 +21,7 @@ #include <hintids.hxx> #include <svl/eitem.hxx> +#include <vcl/settings.hxx> #include <vcl/transfer.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> @@ -75,7 +76,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher con #define MN_READONLY_BACKGROUNDTOGALLERY 2000 SwReadOnlyPopup::SwReadOnlyPopup(const Point &rDPos, SwView &rV) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/readonlymenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/readonlymenu.ui", "") , m_xMenu(m_aBuilder.get_menu("menu")) , m_nReadonlyOpenurl(m_xMenu->GetItemId("openurl")) , m_nReadonlyOpendoc(m_xMenu->GetItemId("opendoc")) diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 813cfae970af..04dbb8cdad6a 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -196,7 +196,7 @@ SwSpellPopup::SwSpellPopup( SwWrtShell* pWrtSh, const uno::Reference< linguistic2::XSpellAlternatives > &xAlt, const OUString &rParaText) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") , m_xPopupMenu(m_aBuilder.get_menu("menu")) , m_nIgnoreWordId(m_xPopupMenu->GetItemId("ignoreall")) , m_nAddMenuId(m_xPopupMenu->GetItemId("addmenu")) @@ -409,7 +409,7 @@ SwSpellPopup::SwSpellPopup( sal_Int32 nErrorInResult, const uno::Sequence< OUString > &rSuggestions, const OUString &rParaText ) - : m_aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") + : m_aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/spellmenu.ui", "") , m_xPopupMenu(m_aBuilder.get_menu("menu")) , m_nIgnoreWordId(m_xPopupMenu->GetItemId("ignoreall")) , m_nAddMenuId(m_xPopupMenu->GetItemId("addmenu")) diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 7cce5f47dd0d..8ae9fe5d087d 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -305,7 +305,7 @@ IMPL_LINK_NOARG(SwInputWindow, DropdownClickHdl, ToolBox *, void) EndSelection(); // reset back CurItemId ! if (nCurID == FN_FORMULA_CALC) { - VclBuilder aBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/swriter/ui/inputwinmenu.ui", ""); + VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "modules/swriter/ui/inputwinmenu.ui", ""); VclPtr<PopupMenu> aPopMenu(aBuilder.get_menu("menu")); aPopMenu->SetSelectHdl(LINK(this, SwInputWindow, MenuHdl)); aPopMenu->Execute(this, GetItemRect(FN_FORMULA_CALC), PopupMenuFlags::NoMouseUpClose); diff --git a/vcl/source/control/WeldedTabbedNotebookbar.cxx b/vcl/source/control/WeldedTabbedNotebookbar.cxx index 2ecab57b267e..3f701d08109c 100644 --- a/vcl/source/control/WeldedTabbedNotebookbar.cxx +++ b/vcl/source/control/WeldedTabbedNotebookbar.cxx @@ -14,8 +14,8 @@ WeldedTabbedNotebookbar::WeldedTabbedNotebookbar( VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath, const css::uno::Reference<css::frame::XFrame>& rFrame, sal_uInt64 nWindowId) - : m_xBuilder(new JSInstanceBuilder(pContainerWindow, VclBuilderContainer::getUIRootDir(), - rUIFilePath, rFrame, nWindowId)) + : m_xBuilder(new JSInstanceBuilder(pContainerWindow, AllSettings::GetUIRootDir(), rUIFilePath, + rFrame, nWindowId)) { m_xContainer = m_xBuilder->weld_container("NotebookBar"); m_xNotebook = m_xBuilder->weld_notebook("ContextContainer"); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 0330fd4cf6f9..fc1a93dd030e 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -2707,7 +2707,7 @@ namespace vcl VclPtr<PopupMenu> Edit::CreatePopupMenu() { if (!mpUIBuilder) - mpUIBuilder.reset(new VclBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "vcl/ui/editmenu.ui", "")); + mpUIBuilder.reset(new VclBuilder(nullptr, AllSettings::GetUIRootDir(), "vcl/ui/editmenu.ui", "")); VclPtr<PopupMenu> pPopup = mpUIBuilder->get_menu("menu"); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if (rStyleSettings.GetHideDisabledMenuItems()) diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index 3dd4f889ee71..c6bbe576c05d 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -63,7 +63,7 @@ NotebookBar::NotebookBar(Window* pParent, const OString& rID, const OUString& rU mxFrame = rFrame; SetStyle(GetStyle() | WB_DIALOGCONTROL); - OUString sUIDir = getUIRootDir(); + OUString sUIDir = AllSettings::GetUIRootDir(); bool doesCustomizedUIExist = doesFileExist(getCustomizedUIRootDir(), rUIXMLDescription); if ( doesCustomizedUIExist ) sUIDir = getCustomizedUIRootDir(); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index bebe56062866..caec0ae3b57e 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -175,9 +175,9 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString } if (bUseJSBuilder) - return new JSInstanceBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile); + return new JSInstanceBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile); else - return ImplGetSVData()->mpDefInst->CreateBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile); + return ImplGetSVData()->mpDefInst->CreateBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile); } weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile, sal_uInt64 nLOKWindowId) @@ -186,10 +186,10 @@ weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUS && (rUIFile == "svx/ui/stylespreview.ui" || rUIFile == "modules/scalc/ui/numberbox.ui")) { - return new JSInstanceBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, css::uno::Reference<css::frame::XFrame>(), nLOKWindowId); + return new JSInstanceBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile, css::uno::Reference<css::frame::XFrame>(), nLOKWindowId); } - return ImplGetSVData()->mpDefInst->CreateInterimBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, nLOKWindowId); + return ImplGetSVData()->mpDefInst->CreateInterimBuilder(pParent, AllSettings::GetUIRootDir(), rUIFile, nLOKWindowId); } weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType, diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d6d00cad270e..746d7a03595d 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -543,7 +543,7 @@ void VclBuilderContainer::disposeBuilder() m_pUIBuilder->disposeBuilder(); } -OUString VclBuilderContainer::getUIRootDir() +OUString AllSettings::GetUIRootDir() { OUString sShareLayer("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/"); rtl::Bootstrap::expandMacros(sShareLayer); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 8fc7937d6ec4..7c0daa54bc18 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -370,7 +370,7 @@ void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStr { mbIsDeferredInit = true; mpDialogParent = pParent; //should be unset in doDeferredInit - m_pUIBuilder.reset( new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame) ); + m_pUIBuilder.reset( new VclBuilder(this, AllSettings::GetUIRootDir(), rUIXMLDescription, rID, rFrame) ); } DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID, diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index a3f5a2a933fd..2df41ae7dae7 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -90,7 +90,7 @@ void SystemWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStri { mbIsDeferredInit = true; mpDialogParent = pParent; //should be unset in doDeferredInit - m_pUIBuilder.reset( new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame) ); + m_pUIBuilder.reset( new VclBuilder(this, AllSettings::GetUIRootDir(), rUIXMLDescription, rID, rFrame) ); } SystemWindow::~SystemWindow() diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index e4d09cc89b59..bfb7b67a8497 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -74,7 +74,7 @@ TabPage::TabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXM , IContext() { ImplInit(pParent, 0); - m_pUIBuilder.reset( new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID) ); + m_pUIBuilder.reset( new VclBuilder(this, AllSettings::GetUIRootDir(), rUIXMLDescription, rID) ); set_hexpand(true); set_vexpand(true); set_expand(true); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 1dd294f7b995..3435ea041d45 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -13048,7 +13048,7 @@ namespace { GtkBuilder* makeComboBoxBuilder() { - OUString aUri(VclBuilderContainer::getUIRootDir() + "vcl/ui/combobox.ui"); + OUString aUri(AllSettings::GetUIRootDir() + "vcl/ui/combobox.ui"); OUString aPath; osl::FileBase::getSystemPathFromFileURL(aUri, aPath); return gtk_builder_new_from_file(OUStringToOString(aPath, RTL_TEXTENCODING_UTF8).getStr()); |