43#include <sfx2/sfxsids.hrc>
45#include <rtl/ustrbuf.hxx>
64#include <com/sun/star/container/XNameContainer.hpp>
65#include <com/sun/star/embed/ElementModes.hpp>
66#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
67#include <com/sun/star/frame/ModuleManager.hpp>
68#include <com/sun/star/frame/XFrames.hpp>
69#include <com/sun/star/frame/XLayoutManager.hpp>
70#include <com/sun/star/frame/FrameSearchFlag.hpp>
71#include <com/sun/star/frame/XController.hpp>
72#include <com/sun/star/frame/Desktop.hpp>
73#include <com/sun/star/frame/theUICommandDescription.hpp>
74#include <com/sun/star/graphic/GraphicProvider.hpp>
75#include <com/sun/star/io/IOException.hpp>
76#include <com/sun/star/ui/ItemType.hpp>
77#include <com/sun/star/ui/ItemStyle.hpp>
78#include <com/sun/star/ui/ImageManager.hpp>
79#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
80#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
81#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
82#include <com/sun/star/ui/XUIElement.hpp>
83#include <com/sun/star/ui/UIElementType.hpp>
84#include <com/sun/star/ui/ImageType.hpp>
85#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
86#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
87#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
88#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
89#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
90#include <com/sun/star/util/thePathSettings.hpp>
95#include <config_features.h>
104#if OSL_DEBUG_LEVEL > 1
107 const OUString& prefix,
111 xPropSet->getPropertySetInfo();
114 xPropSetInfo->getProperties();
116 SAL_WARN(
"cui",
"printPropertySet: " << aPropDetails.getLength() <<
" properties" );
118 for ( beans::Property
const & aPropDetail : aPropDetails )
123 uno::Any a = xPropSet->getPropertyValue( aPropDetail.Name );
127 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name << tmp);
129 else if ( (
a >>= ival ) )
131 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name <<
" = " << ival);
135 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name <<
" of type " <<
a.getValueTypeName());
141 const OUString& prefix,
144 for (beans::PropertyValue
const & aPropVal : aProp)
148 aPropVal.Value >>= tmp;
150 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropVal.Name <<
" = " << tmp);
156 for (
auto const& entry : *entries)
158 SAL_WARN(
"cui",
"printEntries: " << entry->GetName());
167 return aModuleId !=
u"com.sun.star.script.BasicIDE" && aModuleId !=
u"com.sun.star.frame.Bibliography";
172 return std::make_unique<SvxMenuConfigPage>(pPage, pController, *
rSet);
177 return std::make_unique<SvxMenuConfigPage>(pPage, pController, *
rSet,
false);
182 return std::make_unique<SfxAcceleratorConfigPage>(pPage, pController, *
rSet);
188 return std::make_unique<SvxNotebookbarConfigPage>(pPage, pController, *
rSet);
193 return std::make_unique<SvxToolbarConfigPage>(pPage, pController, *
rSet);
228#if HAVE_FEATURE_SCRIPTING
250 if (aModuleId !=
"com.sun.star.text.TextDocument" &&
251 aModuleId !=
"com.sun.star.sheet.SpreadsheetDocument" &&
252 aModuleId !=
"com.sun.star.presentation.PresentationDocument" &&
253 aModuleId !=
"com.sun.star.drawing.DrawingDocument")
256 if (aModuleId ==
"com.sun.star.frame.StartModule")
262 if (rId ==
"menus" || rId ==
"keyboard" || rId ==
"notebookbar"
263 || rId ==
"toolbars" || rId ==
"contextmenus")
267 else if (rId ==
"events")
286 const OUString& aModuleId,
290 bDocConfig( isDocConfig ),
292 m_xCfgMgr(
std::move( xCfgMgr )),
293 m_xParentCfgMgr(
std::move( xParentCfgMgr )),
295 css::ui::
ItemType::SEPARATOR_LINE) }
302 bReadOnly = xDocPersistence->isReadOnly();
308 css::frame::theUICommandDescription::get(xContext) );
341 if (!xGraphic.is() &&
xDefaultImgMgr !=
nullptr && (*xDefaultImgMgr).is())
359 xConfigPersistence( xManager, uno::UNO_QUERY );
361 if ( xConfigPersistence->isModified() )
363 xConfigPersistence->store();
367 catch ( css::io::IOException& )
388 const OUString& aModuleId,
391 SaveInData( cfgmgr, xParentCfgMgr, aModuleId, isDocConfig ),
394 m_aDescriptorContainer(
401 catch ( container::NoSuchElementException& )
444 pRootEntry->SetEntries( std::move(pNewEntries) );
448 const OUString& rBaseTitle,
SvxConfigEntry const * pParentData,
bool bContextMenu )
453 if ( !xMenuSettings.is() )
459 OUString aCommandURL;
462 sal_uInt16
nType( css::ui::ItemType::DEFAULT );
470 bool bIsUserDefined =
true;
472 if (
nType == css::ui::ItemType::DEFAULT )
478 bIsUserDefined =
false;
480 catch ( container::NoSuchElementException& )
482 bIsUserDefined =
true;
485 bool bUseDefaultLabel =
false;
490 bUseDefaultLabel =
true;
492 if (
a >>= aPropSeq )
495 for (
const beans::PropertyValue& prop : std::as_const(aPropSeq) )
499 if ( prop.Name ==
"PopupLabel" )
504 else if ( prop.Name ==
"Label" )
506 prop.Value >>= aMenuLabel;
509 else if ( prop.Name ==
"Label" )
521 aLabel, aCommandURL, xSubMenu.is(),
false );
525 if ( !bUseDefaultLabel )
528 pEntries->push_back( pEntry );
533 OUString subMenuTitle( rBaseTitle );
535 if ( !subMenuTitle.isEmpty() )
546 LoadSubMenus( xSubMenu, subMenuTitle, pEntry, bContextMenu );
553 pEntries->push_back( pEntry );
589 catch ( css::uno::Exception& )
614 rFactory->createInstanceWithContext( xContext ),
617 sal_Int32
nIndex = aPropValueSeq.getLength();
618 aPropValueSeq.realloc( nIndex + 1 );
619 auto pPropValueSeq = aPropValueSeq.getArray();
621 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
622 rMenuBar->insertByIndex(
623 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
624 ApplyMenu( xSubMenuBar, rFactory, entryData );
635 for (
auto const& entry : *pMenuData->
GetEntries())
637 if (entry->IsPopup())
643 rFactory->createInstanceWithContext( xContext ),
646 sal_Int32
nIndex = aPropValueSeq.getLength();
647 aPropValueSeq.realloc(
nIndex + 1 );
648 auto pPropValueSeq = aPropValueSeq.getArray();
650 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
652 rMenuBar->insertByIndex(
653 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
655 ApplyMenu( xSubMenuBar, rFactory, entry );
656 entry->SetModified(
false );
658 else if (entry->IsSeparator())
660 rMenuBar->insertByIndex(
667 rMenuBar->insertByIndex(
668 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
681 catch (
const css::uno::Exception& )
693 catch ( container::NoSuchElementException& )
700 const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
701 const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
702 const OUString& aModuleId,
bool bIsDocConfig )
703 :
SaveInData( xCfgMgr, xParentCfgMgr, aModuleId, bIsDocConfig )
706 css::uno::Reference< css::container::XNameAccess > xConfig( css::ui::theWindowStateConfiguration::get( xContext ) );
718 css::uno::Sequence< css::beans::PropertyValue > aProps;
723 catch (
const css::uno::Exception& )
726 for (
const auto& aProp : std::as_const(aProps) )
731 aProp.Value >>= aResult;
743 std::unordered_map< OUString, bool > aMenuInfo;
746 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aElementsInfo;
749 aElementsInfo =
GetConfigManager()->getUIElementsInfo( css::ui::UIElementType::POPUPMENU );
751 catch (
const css::lang::IllegalArgumentException& )
754 for (
const auto& aElement : std::as_const(aElementsInfo) )
757 for (
const auto& aElementProp : aElement )
761 aElementProp.Value >>= aUrl;
766 css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
771 catch (
const css::uno::Exception& )
774 if ( xPopupMenu.is() )
777 aMenuInfo.emplace( aUrl,
true );
779 OUString aUIMenuName =
GetUIName( aUrl );
780 if ( aUIMenuName.isEmpty() )
793 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aParentElementsInfo;
796 if ( xParentCfgMgr.is() )
797 aParentElementsInfo = xParentCfgMgr->getUIElementsInfo( css::ui::UIElementType::POPUPMENU );
799 catch (
const css::lang::IllegalArgumentException& )
802 for (
const auto& aElement : std::as_const(aParentElementsInfo) )
805 for (
const auto& aElementProp : aElement )
809 aElementProp.Value >>= aUrl;
814 css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
817 if ( aMenuInfo.find( aUrl ) == aMenuInfo.end() )
818 xPopupMenu = xParentCfgMgr->getSettings( aUrl,
false );
820 catch (
const css::uno::Exception& )
823 if ( xPopupMenu.is() )
825 OUString aUIMenuName =
GetUIName( aUrl );
826 if ( aUIMenuName.isEmpty() )
848 for (
const auto& pEntry : *pEntries )
849 if ( pEntry->GetCommand() == rURL )
866 for (
const auto& pEntry : *pEntries )
870 css::uno::Reference< css::container::XIndexContainer > xIndexContainer =
GetConfigManager()->createSettings();
871 css::uno::Reference< css::lang::XSingleComponentFactory >
xFactory( xIndexContainer, css::uno::UNO_QUERY );
874 const OUString& aUrl = pEntry->GetCommand();
882 catch (
const css::uno::Exception& )
893 for (
const auto& pEntry : *pEntries )
899 catch (
const css::uno::Exception& )
914 catch (
const css::uno::Exception& )
924 int nWidth = (
m_xControl->get_text_height() * 3) / 4;
928 SymbolType::SPIN_RIGHT,
m_xDropDown->GetTextColor(),
929 DrawSymbolFlags::NONE);
942 , m_xDropDown(
m_xControl->create_virtual_device())
962 m_pPage->DeleteSelectedContent();
967 m_pPage->MoveEntry(
true );
971 m_pPage->MoveEntry(
false );
983 if (!pEntry || pEntry->
GetCommand().isEmpty())
985 const OUString sCommand(pEntry->
GetCommand());
989 m_pPage->GetFrame());
990 return CuiResId(RID_CUISTR_COMMANDLABEL) +
": " + pEntry->
GetName().replaceFirst(
"~",
"") +
"\n" +
991 CuiResId(RID_CUISTR_COMMANDNAME) +
": " + sCommand +
"\n" +
992 CuiResId(RID_CUISTR_COMMANDTIP) +
": " + sTooltipLabel.replaceFirst(
"~",
"");
1003 :
SfxTabPage(pPage, pController,
"cui/ui/menuassignpage.ui",
"MenuAssignPage", &
rSet)
1004 , m_aUpdateDataTimer(
"SvxConfigPage UpdateDataTimer" )
1005 , bInitialised(false)
1006 , pCurrentSaveInData(nullptr)
1007 , m_xCommandCategoryListBox(new
CommandCategoryListBox(m_xBuilder->weld_combo_box(
"commandcategorylist")))
1009 , m_xCategoryLabel(m_xBuilder->weld_label(
"categorylabel"))
1010 , m_xDescriptionFieldLb(m_xBuilder->weld_label(
"descriptionlabel"))
1011 , m_xDescriptionField(m_xBuilder->weld_text_view(
"desc"))
1012 , m_xLeftFunctionLabel(m_xBuilder->weld_label(
"leftfunctionlabel"))
1013 , m_xSearchEdit(m_xBuilder->weld_entry(
"searchEntry"))
1014 , m_xSearchLabel(m_xBuilder->weld_label(
"searchlabel"))
1015 , m_xCustomizeLabel(m_xBuilder->weld_label(
"customizelabel"))
1016 , m_xTopLevelListBox(m_xBuilder->weld_combo_box(
"toplevellist"))
1017 , m_xMoveUpButton(m_xBuilder->weld_button(
"up"))
1018 , m_xMoveDownButton(m_xBuilder->weld_button(
"down"))
1019 , m_xSaveInListBox(m_xBuilder->weld_combo_box(
"savein"))
1020 , m_xCustomizeBox(m_xBuilder->weld_widget(
"customizebox"))
1021 , m_xInsertBtn(m_xBuilder->weld_menu_button(
"insert"))
1022 , m_xModifyBtn(m_xBuilder->weld_menu_button(
"modify"))
1023 , m_xResetBtn(m_xBuilder->weld_button(
"defaultsbtn"))
1024 , m_xCommandButtons(m_xBuilder->weld_widget(
"arrowgrid"))
1025 , m_xAddCommandButton(m_xBuilder->weld_button(
"add"))
1026 , m_xRemoveCommandButton(m_xBuilder->weld_button(
"remove"))
1055 for(
int i=0;
i < cnt; ++
i)
1077 ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
1084 css::frame::ModuleManager::create( xContext ));
1088 xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
1096 xModuleCfgSupplier->getUIConfigurationManager(
m_aModuleId );
1103 catch ( container::NoSuchElementException& )
1107 if ( pModuleData !=
nullptr )
1123 xCfgSupplier(
xModel, uno::UNO_QUERY );
1125 if ( xCfgSupplier.is() )
1127 xDocCfgMgr = xCfgSupplier->getUIConfigurationManager();
1129 aTitle = ::comphelper::DocumentInfo::getDocumentTitle(
xModel );
1134 if ( xDocCfgMgr.is() )
1147 bool bURLToSelectFound =
false;
1154 bURLToSelectFound =
true;
1160 bURLToSelectFound =
true;
1164 if ( !bURLToSelectFound )
1168 if ( pDocData !=
nullptr && pDocData->
HasSettings() )
1195 xFramesSupplier->getFrames();
1197 aFrameList = xFrames->queryFrames(
1198 frame::FrameSearchFlag::ALL & ~frame::FrameSearchFlag::SELF );
1201 catch(
const uno::Exception& )
1212 aCheckId = xModuleManager->identify( xf );
1213 }
catch(
const uno::Exception&)
1214 { aCheckId.clear(); }
1221 xf->getController();
1223 if ( xController_.is() )
1226 xController_->getModel() );
1231 css::ui::XUIConfigurationManagerSupplier >
1232 xCfgSupplier(
xModel, uno::UNO_QUERY );
1234 if ( xCfgSupplier.is() )
1237 xCfgSupplier->getUIConfigurationManager();
1239 aTitle2 = ::comphelper::DocumentInfo::getDocumentTitle(
xModel );
1243 if ( xDocCfgMgr.is() )
1283 ::comphelper::getProcessComponentContext() );
1288 if ( !_inout_rxFrame.is() )
1289 _inout_rxFrame = xDesktop->getActiveFrame();
1291 if ( !_inout_rxFrame.is() )
1293 _inout_rxFrame = xDesktop->getCurrentFrame();
1296 if ( !_inout_rxFrame.is())
1299 _inout_rxFrame = pViewFrame->GetFrame().GetFrameInterface();
1302 if ( !_inout_rxFrame.is() )
1304 SAL_WARN(
"cui.customize",
"SvxConfigPage::GetFrameWithDefaultAndIdentify(): no frame found!" );
1310 catch(
const uno::Exception& )
1359 OUString
sId = m_xSaveInListBox->get_active_id();
1361 pCurrentSaveInData = weld::fromId<SaveInData*>(
sId);
1372 for (
auto const& entryData : *
GetSaveInData()->GetEntries())
1377 if (entryData == pToSelect)
1388 "SvxConfigPage::ReloadTopLevelListBox(): no SaveInData entries" );
1392 nSelectionPos = (nSelectionPos != -1 && nSelectionPos <
m_xTopLevelListBox->get_count()) ?
1400 std::u16string_view rBaseTitle,
SvxConfigEntry const * pParentData )
1402 for (
auto const& entryData : *pParentData->
GetEntries())
1404 if (entryData->IsPopup())
1419 for (
auto const& entryData : *pRootEntries)
1422 if (entryData == pChildData)
1424 return pRootEntries;
1426 else if (entryData->IsPopup())
1442 OUString aDisplayName;
1444 if (
aURL.isEmpty() ) {
1462 if ( aDisplayName.isEmpty() )
1473 if ( pEntries !=
nullptr
1474 && pEntryData !=
nullptr )
1476 for (
auto const& entry : *pEntries)
1478 if ( entry->GetCommand() == pEntryData->
GetCommand() )
1495 if (
aURL.isEmpty() || pParent ==
nullptr )
1504 if ( !bAllowDuplicates
1508 delete pNewEntryData;
1523 if (pTopLevelSelection ==
nullptr)
1537 pEntries->push_back( pNewEntryData );
1546 SvxEntries::iterator iter = pEntries->begin();
1547 SvxEntries::const_iterator
end = pEntries->end();
1550 sal_uInt16
nPos = 0;
1551 while (*iter != pEntryData && ++iter !=
end)
1563 pEntries->insert( iter, pNewEntryData );
1569 if (nNewEntry != -1)
1588 rTreeView.
set_id(rIter, sId);
1592 rTreeView.
set_text(rIter,
"----------------------------------", 0);
1600 rTreeView.
set_text(rIter, aName, 0);
1605 if (pNewEntryData->
IsPopup() || pNewEntryData->
GetStyle() & css::ui::ItemStyle::DROP_DOWN)
1606 rTreeView.
set_image(rIter, rDropDown, 1);
1608 rTreeView.
set_image(rIter, css::uno::Reference<css::graphic::XGraphic>(), 1);
1621 TmplInsertEntryIntoUI<weld::TreeIter>(pNewEntryData, rTreeView, rIter,
GetSaveInData(),
1627 MoveEntry(&rButton == m_xMoveUpButton.get());
1632 if (m_xAddCommandButton->get_sensitive())
1633 m_xAddCommandButton->clicked();
1642 bool bIsValidCommand = !aSelectCommand.isEmpty();
1645 if (bIsValidCommand)
1647 m_xAddCommandButton->set_sensitive(
true);
1648 m_xRemoveCommandButton->set_sensitive(
true);
1652 m_xDescriptionField->set_text(m_xFunctions->GetHelpText(
false));
1662 OUString aExperimental =
"\n" +
CuiResId(RID_CUISTR_COMMANDEXPERIMENTAL);
1665 OUString aTip =
CuiResId(RID_CUISTR_COMMANDTIP) +
": " +
pData->sTooltip;
1667 m_xDescriptionField->set_text(
aLabel +
aName + aTip + aExperimental);
1669 m_xDescriptionField->set_text(
aLabel +
aName + aTip);
1676 m_xAddCommandButton->set_sensitive(
false);
1677 m_xRemoveCommandButton->set_sensitive(
false);
1679 m_xDescriptionField->set_text(
"");
1682 UpdateButtonStates();
1687 OUString aSearchTerm(m_xSearchEdit->get_text());
1688 m_xCommandCategoryListBox->categorySelected(m_xFunctions.get(), aSearchTerm, GetSaveInData());
1689 SelectFunctionHdl(m_xFunctions->get_widget());
1694 m_aUpdateDataTimer.Start();
1699 if (m_aUpdateDataTimer.IsActive())
1701 m_aUpdateDataTimer.Stop();
1702 m_aUpdateDataTimer.Invoke();
1711 int nTargetEntry = -1;
1714 if (nSourceEntry == -1)
1722 nTargetEntry = nSourceEntry;
1723 nSourceEntry = nTargetEntry - 1;
1724 nToSelect = nSourceEntry;
1728 nTargetEntry = nSourceEntry + 1;
1729 nToSelect = nTargetEntry;
1734 rTreeView.
swap(nSourceEntry, nTargetEntry);
1735 rTreeView.
select(nToSelect);
1745 if (nSourceEntry == -1 || nTargetEntry == -1)
1759 if ( pSourceData ==
nullptr || pTargetData ==
nullptr )
1765 SvxEntries::iterator iter = pEntries->begin();
1766 SvxEntries::const_iterator
end = pEntries->end();
1769 while (*iter != pTargetData && ++iter !=
end) ;
1772 pEntries->insert( ++iter, pSourceData );
1783 : GenericDialogController(pParent,
"cui/ui/movemenu.ui",
"MoveMenuDialog")
1784 , m_xMenuBox(m_xBuilder->weld_widget(
"namebox"))
1785 , m_xMenuNameEdit(m_xBuilder->weld_entry(
"menuname"))
1786 , m_xMenuListBox(m_xBuilder->weld_tree_view(
"menulist"))
1787 , m_xMoveUpButton(m_xBuilder->weld_button(
"up"))
1788 , m_xMoveDownButton(m_xBuilder->weld_button(
"down"))
1793 if ( entries !=
nullptr )
1796 for (
auto const& entry : *entries)
1801 if (entry == selection)
1818 pNewEntryData->
SetName( newname );
1856 if (m_xMenuNameEdit->get_text().isEmpty())
1861 SvxConfigEntry* pNewEntryData = weld::fromId<SvxConfigEntry*>(m_sNewMenuEntryId);
1862 pNewEntryData->
SetName(m_xMenuNameEdit->get_text());
1864 const int nNewMenuPos = m_xMenuListBox->find_id(m_sNewMenuEntryId);
1865 const int nOldSelection = m_xMenuListBox->get_selected_index();
1866 m_xMenuListBox->remove(nNewMenuPos);
1867 m_xMenuListBox->insert(nNewMenuPos, pNewEntryData->
GetName(), &m_sNewMenuEntryId,
nullptr,
nullptr);
1868 m_xMenuListBox->select(nOldSelection);
1873 UpdateButtonStates();
1881 m_xMoveDownButton->set_sensitive(nSelected != -1 && nSelected < m_xMenuListBox->n_children() - 1);
1886 int nSourceEntry = m_xMenuListBox->get_selected_index();
1887 if (nSourceEntry == -1)
1892 if (&rButton == m_xMoveDownButton.get())
1894 nTargetEntry = nSourceEntry + 1;
1899 nTargetEntry = nSourceEntry - 1;
1902 OUString
sId = m_xMenuListBox->get_id(nSourceEntry);
1903 OUString sEntry = m_xMenuListBox->get_text(nSourceEntry);
1904 m_xMenuListBox->remove(nSourceEntry);
1905 m_xMenuListBox->insert(nTargetEntry, sEntry, &
sId,
nullptr,
nullptr);
1906 m_xMenuListBox->select(nTargetEntry);
1908 std::swap(mpEntries->at(nSourceEntry), mpEntries->at(nTargetEntry));
1910 UpdateButtonStates();
1916 if (nSelected == -1)
1918 return weld::fromId<SvxConfigEntry*>(
m_xMenuListBox->get_id(nSelected));
1922 OUString aCommandURL,
bool bPopup,
bool bParentData )
1927 , bStrEdited( false )
1928 , bIsUserDefined( false )
1930 , bIsParentData( bParentData )
1931 , bIsModified( false )
1932 , bIsVisible( true )
1970 const OUString& aModuleId,
1973 SaveInData ( xCfgMgr, xParentCfgMgr, aModuleId, docConfig ),
1993 if ( rResourceURL.startsWith(
"private" ) &&
2004 for ( beans::PropertyValue
const & prop : std::as_const(aProps) )
2014 catch ( uno::Exception& )
2025 const OUString& rResourceURL,
2037 if ( xPropSet.is() )
2039 uno::Any a = xPropSet->getPropertyValue(
"LayoutManager" );
2040 a >>= xLayoutManager;
2043 if ( xLayoutManager.is() )
2046 xLayoutManager->getElement( rResourceURL );
2052 if ( xUIElement.is() )
2053 xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
2058 if ( window ==
nullptr || window->
GetType() != WindowType::TOOLBOX )
2067 else if ( nStyle == 1 )
2078 const OUString& rResourceURL,
2081 if ( !(rResourceURL.startsWith(
"private" ) &&
2094 for ( beans::PropertyValue& prop : asNonConstRange(aProps) )
2098 prop.Value <<= nStyle;
2107 xNameReplace->replaceByName( rResourceURL,
uno::Any( aProps ) );
2109 catch ( uno::Exception& )
2120 if ( rResourceURL.startsWith(
"private" ) &&
2131 for ( beans::PropertyValue
const & prop : std::as_const(aProps) )
2140 catch ( uno::Exception& )
2146 if ( rResourceURL.startsWith(
".uno" ) &&
2156 if (
a >>= aPropSeq )
2158 for ( beans::PropertyValue
const & prop : std::as_const(aPropSeq) )
2167 catch ( uno::Exception& )
2178 typedef std::unordered_map<OUString, bool > ToolbarInfo;
2180 ToolbarInfo aToolbarInfo;
2189 css::ui::UIElementType::TOOLBAR );
2194 OUString systemname;
2197 for (
const beans::PropertyValue& prop :
props )
2202 systemname = url.copy( url.lastIndexOf(
'/' ) + 1 );
2206 prop.Value >>= uiname;
2215 if ( uiname.isEmpty() )
2220 if ( uiname.isEmpty() )
2222 uiname = systemname;
2227 uiname, url,
true,
false );
2234 aToolbarInfo.emplace( systemname,
true );
2245 pRootEntry->GetEntries()->push_back( pEntry );
2249 catch ( container::NoSuchElementException& )
2256 if ( xParentCfgMgr.is() )
2262 xParentCfgMgr->getUIElementsInfo(
2263 css::ui::UIElementType::TOOLBAR );
2268 OUString systemname;
2271 for (
const beans::PropertyValue& prop :
props )
2276 systemname = url.copy( url.lastIndexOf(
'/' ) + 1 );
2280 prop.Value >>= uiname;
2286 if ( systemname.startsWith( custom ) )
2290 ToolbarInfo::const_iterator pIter = aToolbarInfo.find( systemname );
2291 if ( pIter == aToolbarInfo.end() )
2293 aToolbarInfo.emplace( systemname,
true );
2298 xParentCfgMgr->getSettings( url,
false );
2300 if ( uiname.isEmpty() )
2305 if ( uiname.isEmpty() )
2307 uiname = systemname;
2312 uiname, url,
true,
true );
2317 if ( systemname.startsWith( custom ) )
2326 pRootEntry->GetEntries()->push_back( pEntry );
2330 catch ( container::NoSuchElementException& )
2347 pRootEntry->SetEntries( std::move(pNewEntries) );
2355 if (entry->GetCommand() == rURL)
2357 return !entry->IsParentData();
2376 const OUString& url = entry->GetCommand();
2379 catch ( uno::Exception& )
2399 catch ( uno::Exception& )
2401 SAL_WARN(
"cui.customize",
"Error resetting all icons when resetting toolbars");
2418 for (
auto const& entry : *pToolbarData->
GetEntries())
2420 if (entry->IsPopup())
2426 rFactory->createInstanceWithContext( xContext ),
2429 sal_Int32
nIndex = aPropValueSeq.getLength();
2430 aPropValueSeq.realloc( nIndex + 1 );
2431 auto pPropValueSeq = aPropValueSeq.getArray();
2433 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
2434 rToolbarBar->insertByIndex(
2435 rToolbarBar->getCount(),
uno::Any( aPropValueSeq ));
2439 else if (entry->IsSeparator())
2441 rToolbarBar->insertByIndex(
2449 rToolbarBar->insertByIndex(
2450 rToolbarBar->getCount(),
uno::Any( aPropValueSeq ));
2462 xSettings, uno::UNO_QUERY );
2465 xSettings, uno::UNO_QUERY );
2470 xSettings, uno::UNO_QUERY );
2474 xProps->setPropertyValue(
2494 catch ( css::uno::Exception
const & )
2509 xPropertySet( xSettings, uno::UNO_QUERY );
2511 xPropertySet->setPropertyValue(
2519 catch ( css::uno::Exception
const & )
2541 css::uno::Reference< css::container::XNameContainer > xNameContainer(
2544 xNameContainer->removeByName( url );
2546 catch ( uno::Exception& )
2561 if ( bParentToolbar )
2570 catch ( uno::Exception& )
2593 auto pURLSeq = aURLSeq.getArray();
2594 for (
auto const& entry : *pToolbar->
GetEntries())
2596 pURLSeq[ 0 ] = entry->GetCommand();
2602 catch ( uno::Exception& )
2604 SAL_WARN(
"cui.customize",
"Error restoring icon when resetting toolbar");
2609 catch ( container::NoSuchElementException& )
2624 OUString aCommandURL;
2629 sal_uInt16
nType( css::ui::ItemType::DEFAULT );
2636 bool bIsUserDefined =
true;
2638 if (
nType == css::ui::ItemType::DEFAULT )
2644 bIsUserDefined =
false;
2646 catch ( container::NoSuchElementException& )
2648 bIsUserDefined =
true;
2651 bool bUseDefaultLabel =
false;
2656 bUseDefaultLabel =
true;
2658 if (
a >>= aPropSeq )
2660 for ( beans::PropertyValue
const & prop : std::as_const(aPropSeq) )
2662 if ( prop.Name ==
"Name" )
2672 aLabel, aCommandURL,
false,
false );
2678 if ( !bUseDefaultLabel )
2681 pEntries->push_back( pEntry );
2687 pEntries->push_back( pEntry );
2694 : GenericDialogController(pWindow,
"cui/ui/newtoolbardialog.ui",
"NewToolbarDialog")
2695 , m_xEdtName(m_xBuilder->weld_entry(
"edit"))
2696 , m_xSaveInListBox(m_xBuilder->weld_combo_box(
"savein"))
2714 : GenericDialogController(pWindow,
"cui/ui/iconselectordialog.ui",
"IconSelector")
2715 , m_xImageManager(
std::move(xImageManager))
2716 , m_xParentImageManager(
std::move(xParentImageManager))
2717 , m_xTbSymbol(new
ValueSet(m_xBuilder->weld_scrolled_window(
"symbolswin", true)))
2718 , m_xTbSymbolWin(new
weld::CustomWeld(*m_xBuilder,
"symbolsToolbar", *m_xTbSymbol))
2719 , m_xFtNote(m_xBuilder->weld_label(
"noteLabel"))
2720 , m_xBtnImport(m_xBuilder->weld_button(
"importButton"))
2721 , m_xBtnDelete(m_xBuilder->weld_button(
"deleteButton"))
2723 typedef std::unordered_map< OUString, bool > ImageInfo;
2746 ::comphelper::getProcessComponentContext();
2748 m_xGraphProvider.set( graphic::GraphicProvider::create( xComponentContext ) );
2751 css::util::thePathSettings::get( xComponentContext );
2754 OUString aDirectory = xPathSettings->getUserConfig();
2756 sal_Int32 aCount = aDirectory.getLength();
2771 aDirectory +=
"soffice.cfg/import";
2774 css::embed::FileSystemStorageFactory::create( xComponentContext ) );
2777 uno::Any(css::embed::ElementModes::READWRITE) };
2780 xStorageFactory->createInstanceWithArguments( aArgs ), uno::UNO_QUERY );
2784 {
"UserConfigStorage",
uno::Any(xStorage)},
2785 {
"OpenMode",
uno::Any(css::embed::ElementModes::READWRITE)}
2790 ImageInfo aImageInfo1;
2794 for (
auto const &
name : names )
2795 aImageInfo1.emplace(
name,
false );
2799 auto pname =
name.getArray();
2800 for (
auto const& elem : aImageInfo1)
2802 pname[ 0 ] = elem.first;
2804 if ( graphics.hasElements() )
2807 Image img(graphics[0]);
2812 ImageInfo aImageInfo;
2817 for (
auto const &
i : names )
2818 aImageInfo.emplace(
i,
false );
2822 for (
auto const &
i : names )
2824 ImageInfo::iterator pIter = aImageInfo.find(
i );
2825 if ( pIter != aImageInfo.end() )
2826 pIter->second =
true;
2828 aImageInfo.emplace(
i,
true );
2832 for (
auto const& elem : aImageInfo)
2834 pname[ 0 ] = elem.first;
2844 catch ( uno::Exception& )
2850 if ( graphics.hasElements() )
2852 Image img(graphics[0]);
2887 sal_uInt16
nId = m_xTbSymbol->GetSelectedItemId();
2891 m_xBtnDelete->set_sensitive(
false);
2895 OUString aSelImageText = m_xTbSymbol->GetItemText(
nId);
2898 m_xBtnDelete->set_sensitive(
true);
2902 m_xBtnDelete->set_sensitive(
false);
2909 css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
2910 FileDialogFlags::Graphic | FileDialogFlags::MultiSelection,
m_xDialog.get());
2919 css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK,
2930 ImportGraphics ( paths );
2936 OUString message =
CuiResId( RID_CUISTR_DELETE_ICON_CONFIRM );
2939 VclMessageType::Warning, VclButtonsType::OkCancel,
2941 if (xWarn->run() !=
RET_OK)
2944 sal_uInt16
nId = m_xTbSymbol->GetSelectedItemId();
2946 OUString aSelImageText = m_xTbSymbol->GetItemText(
nId );
2948 m_xTbSymbol->RemoveItem(
nId);
2950 if ( m_xImportedImageManager->isModified() )
2952 m_xImportedImageManager->store();
2957 const OUString& aURL )
2962 css::awt::Size aSize;
2972 if (0 == aSize.Width || 0 == aSize.Height)
2977 catch ( uno::Exception& )
2982 bool bResult(
false );
2997 Image aImage( xGraphic );
3002 aImage =
Image( aBitmapex);
3014 catch ( css::uno::Exception& )
3026 OUString ReplaceIconName(std::u16string_view rMessage)
3029 OUString message =
CuiResId( RID_CUISTR_REPLACE_ICON_WARNING );
3030 OUString placeholder(
"%ICONNAME" );
3031 sal_Int32
pos = message.indexOf( placeholder );
3034 name = message.replaceAt(
3035 pos, placeholder.getLength(), rMessage );
3040 class SvxIconReplacementDialog
3045 SvxIconReplacementDialog(
weld::Window *pParent, std::u16string_view rMessage,
bool bYestoAll)
3063 std::vector< OUString > rejected( rPaths.getLength() );
3064 sal_Int32 rejectedCount = 0;
3070 if ( rPaths.getLength() == 1 )
3074 aIndex = rPaths[0].lastIndexOf(
'/' );
3075 aIconName = rPaths[0].copy(
aIndex+1 );
3076 SvxIconReplacementDialog aDlg(
m_xDialog.get(), aIconName,
false);
3087 rejected[0] = rPaths[0];
3094 OUString aSourcePath( rPaths[0] );
3095 if ( rPaths[0].lastIndexOf(
'/' ) != rPaths[0].
getLength() -1 )
3096 aSourcePath = rPaths[0] +
"/";
3098 for ( sal_Int32
i = 1;
i < rPaths.getLength(); ++
i )
3100 OUString aPath = aSourcePath + rPaths[
i];
3103 aIndex = rPaths[
i].lastIndexOf(
'/' );
3104 aIconName = rPaths[
i].copy(
aIndex+1 );
3105 SvxIconReplacementDialog aDlg(
m_xDialog.get(), aIconName,
true);
3111 else if ( ret == 5 )
3113 for ( sal_Int32 k =
i; k < rPaths.getLength(); ++k )
3115 aPath = aSourcePath + rPaths[k];
3118 if ( !bHasReplaced )
3123 rejected[ rejectedCount ] = rPaths[
i];
3136 rejected[ rejectedCount ] = rPaths[
i];
3143 if ( rejectedCount == 0 )
3146 OUStringBuffer message;
3148 if (rejectedCount > 1)
3149 fPath = OUString::Concat(rPaths[0].subView(8)) +
"/";
3150 for ( sal_Int32
i = 0;
i < rejectedCount; ++
i )
3152 message.append(fPath + rejected[
i] +
"\n");
3173 if ( xGraphic.is() )
3176 css::awt::Size aSize;
3179 if ( 0 == aSize.Width || 0 == aSize.Height )
3182 Image aImage( xGraphic );
3188 aImage =
Image( aBitmapex);
3190 if ( bOK && !!aImage )
3207 SAL_WARN(
"cui.customize",
"could not create Image from XGraphic");
3212 SAL_WARN(
"cui.customize",
"could not get query XGraphic");
3215 catch( uno::Exception
const & )
3228 : MessageDialogController(pWindow,
"cui/ui/iconchangedialog.ui",
"IconChange",
"grid")
3229 , m_xLineEditDescription(m_xBuilder->weld_text_view(
"addrTextview"))
3237 :
weld::ReorderingDropTarget(rTreeView)
PropertiesInfo aProperties
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< weld::MessageDialog > m_xQueryBox
static std::unique_ptr< SfxTabPage > CreateSvxContextMenuConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
IMPL_LINK_NOARG(SvxConfigPage, SelectElementHdl, weld::ComboBox &, void)
void printProperties(const OUString &prefix, const uno::Sequence< beans::PropertyValue > &aProp)
static std::unique_ptr< SfxTabPage > CreateSvxMenuConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
IMPL_LINK(SvxMenuEntriesListBox, KeyInputHdl, const KeyEvent &, rKeyEvent, bool)
static std::unique_ptr< SfxTabPage > CreateSvxNotebookbarConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void printPropertySet(const OUString &prefix, const uno::Reference< beans::XPropertySet > &xPropSet)
static std::unique_ptr< SfxTabPage > CreateSvxToolbarConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void printEntries(SvxEntries *entries)
static std::unique_ptr< SfxTabPage > CreateKeyboardConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static std::unique_ptr< SfxTabPage > CreateSvxEventConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
constexpr OUStringLiteral CUSTOM_TOOLBAR_STR
constexpr OUStringLiteral ITEM_TOOLBAR_URL
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
constexpr OUStringLiteral ITEM_DESCRIPTOR_RESOURCEURL
constexpr OUStringLiteral ITEM_DESCRIPTOR_UINAME
constexpr OUStringLiteral aMenuSeparatorStr
std::vector< SvxConfigEntry * > SvxEntries
constexpr OUStringLiteral notebookbarTabScope
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
constexpr OUStringLiteral ITEM_MENUBAR_URL
constexpr OUStringLiteral ITEM_EVENT_URL
constexpr OUStringLiteral ITEM_DESCRIPTOR_CONTAINER
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static BitmapEx AutoScaleBitmap(BitmapEx const &aBitmap, const tools::Long aStandardSize)
static void getFileNameAndAppName(OUString &sAppName, OUString &sNotebookbarUIFileName)
void DrawSymbol(const tools::Rectangle &rRect, SymbolType eType, const Color &rColor, DrawSymbolFlags nStyle=DrawSymbolFlags::NONE)
static GraphicFilter & GetGraphicFilter()
OUString GetImportFormatName(sal_uInt16 nFormat)
sal_uInt16 GetImportFormatNumberForShortName(std::u16string_view rShortName)
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
BitmapEx GetBitmapEx() const
css::uno::Reference< css::graphic::XGraphic > GetImage(const OUString &rCommandURL)
void LoadSubMenus(const css::uno::Reference< css::container::XIndexAccess > &xMenuSettings, const OUString &rBaseTitle, SvxConfigEntry const *pParentData, bool bContextMenu)
css::uno::Reference< css::ui::XImageManager > m_xParentImgMgr
virtual bool HasSettings()=0
const css::uno::Reference< css::ui::XImageManager > & GetImageManager() const
css::uno::Reference< css::container::XNameAccess > m_xCommandToLabelMap
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetConfigManager() const
css::uno::Sequence< css::beans::PropertyValue > m_aSeparatorSeq
virtual bool HasURL(const OUString &aURL)=0
void ApplyMenu(css::uno::Reference< css::container::XIndexContainer > const &rMenuBar, css::uno::Reference< css::lang::XSingleComponentFactory > &rFactory, SvxConfigEntry *pMenuData)
void SetModified(bool bValue=true)
css::uno::Reference< css::ui::XUIConfigurationManager > m_xParentCfgMgr
static css::uno::Reference< css::ui::XImageManager > * xDefaultImgMgr
SaveInData(css::uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr, css::uno::Reference< css::ui::XUIConfigurationManager > xParentCfgMgr, const OUString &aModuleId, bool docConfig)
css::uno::Reference< css::ui::XImageManager > m_xImgMgr
bool PersistChanges(const css::uno::Reference< css::uno::XInterface > &xManager)
const css::uno::Reference< css::ui::XUIConfigurationManager > & GetParentConfigManager() const
static bool IsHelpInstalled()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void SetCurPageId(const OUString &rName)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
void RemoveTabPage(const OUString &rName)
virtual void ActivatePage(const OUString &rPage)
weld::Button * GetResetButton() const
css::uno::Reference< css::frame::XFrame > GetFrame() const
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
css::uno::Reference< css::frame::XFrame > m_xFrame
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
virtual void ActivatePage(const OUString &rPage) override
SvxConfigDialog(weld::Window *, const SfxItemSet *)
sal_Int32 GetStyle() const
const OUString & GetCommand() const
void SetStyle(sal_Int32 style)
bool IsParentData() const
void SetParentData(bool bValue=true)
SvxEntries * GetEntries() const
std::unique_ptr< SvxEntries > mpEntries
void SetName(const OUString &rStr)
void SetModified(bool bValue=true)
bool IsUserDefined() const
void SetUserDefined(bool bOn=true)
const OUString & GetName() const
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
SvxConfigPageFunctionDropTarget(SvxConfigPage &rPage, weld::TreeView &rTreeView)
static void InitImageType()
static sal_Int16 GetImageType()
static OUString generateCustomMenuURL(SvxEntries *entries, sal_Int32 suffix=1)
static OUString GetUIModuleName(const OUString &aModuleId, const css::uno::Reference< css::frame::XModuleManager2 > &rModuleManager)
static bool GetMenuItemData(const css::uno::Reference< css::container::XIndexAccess > &rItemContainer, sal_Int32 nIndex, OUString &rCommandURL, OUString &rLabel, sal_uInt16 &rType, sal_Int32 &rStyle, css::uno::Reference< css::container::XIndexAccess > &rSubMenu)
static css::uno::Sequence< css::beans::PropertyValue > ConvertSvxConfigEntry(const SvxConfigEntry *pEntry)
static OUString stripHotKey(const OUString &str)
static OUString generateCustomName(const OUString &prefix, SvxEntries *entries, sal_Int32 suffix=1)
static bool GetToolbarItemData(const css::uno::Reference< css::container::XIndexAccess > &rItemContainer, sal_Int32 nIndex, OUString &rCommandURL, OUString &rLabel, sal_uInt16 &rType, bool &rIsVisible, sal_Int32 &rStyle)
static void RemoveEntry(SvxEntries *pEntries, SvxConfigEntry const *pChildEntry)
static bool SvxConfigEntryModified(SvxConfigEntry const *pEntry)
static css::uno::Reference< css::graphic::XGraphic > GetGraphic(const css::uno::Reference< css::ui::XImageManager > &xImageManager, const OUString &rCommandURL)
static OUString replaceSixteen(const OUString &str, sal_Int32 nReplacement)
static css::uno::Sequence< css::beans::PropertyValue > ConvertToolbarEntry(const SvxConfigEntry *pEntry)
static bool EntrySort(SvxConfigEntry const *a, SvxConfigEntry const *b)
void ReloadTopLevelListBox(SvxConfigEntry const *pSelection=nullptr)
void InsertEntryIntoUI(SvxConfigEntry *pNewEntryData, weld::TreeView &rTreeView, int nPos, bool bMenu=false)
OUString GetScriptURL() const
std::unique_ptr< weld::ComboBox > m_xTopLevelListBox
static bool CanConfig(std::u16string_view rModuleId)
virtual void ListModified()
virtual ~SvxConfigPage() override
void Reset(const SfxItemSet *) override
SvxConfigEntry * GetTopLevelSelection()
int AppendEntry(SvxConfigEntry *pNewEntryData, int nTarget)
static OUString GetFrameWithDefaultAndIdentify(css::uno::Reference< css::frame::XFrame > &_inout_rxFrame)
identifies the module in the given frame.
virtual void SelectElement()=0
std::unique_ptr< CuiConfigFunctionListBox > m_xFunctions
virtual void UpdateButtonStates()=0
virtual SaveInData * CreateSaveInData(const css::uno::Reference< css::ui::XUIConfigurationManager > &, const css::uno::Reference< css::ui::XUIConfigurationManager > &, const OUString &aModuleId, bool docConfig)=0
std::unique_ptr< weld::Entry > m_xSearchEdit
int AddFunction(int nTarget, bool bAllowDuplicates)
OUString m_aURLToSelect
the ResourceURL to select when opening the dialog
void AddSubMenusToUI(std::u16string_view rBaseTitle, SvxConfigEntry const *pParentData)
static bool IsCommandInMenuList(const SvxConfigEntry *pEntryData, const SvxEntries *pEntries)
std::unique_ptr< weld::TextView > m_xDescriptionField
OUString GetSelectedDisplayName() const
SvxConfigEntry * CreateCommandFromSelection(const OUString &aURL)
css::uno::Reference< css::frame::XFrame > m_xFrame
bool MoveEntryData(int SourceEntry, int nTargetEntry)
bool FillItemSet(SfxItemSet *) override
virtual void MoveEntry(bool bMoveUp)
std::unique_ptr< weld::ComboBox > m_xSaveInListBox
SaveInData * GetSaveInData()
SaveInData * pCurrentSaveInData
SvxConfigPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &)
SvxEntries * FindParentForChild(SvxEntries *pParentEntries, SvxConfigEntry *pChildData)
virtual short QueryReset()=0
std::unique_ptr< SvxMenuEntriesListBox > m_xContentsListBox
std::unique_ptr< weld::TextView > m_xLineEditDescription
SvxIconChangeDialog(weld::Window *pWindow, const OUString &rMessage)
void ImportGraphics(const css::uno::Sequence< OUString > &aURLs)
bool ReplaceGraphicItem(const OUString &aURL)
std::unique_ptr< weld::Button > m_xBtnImport
std::unique_ptr< weld::Label > m_xFtNote
std::unique_ptr< weld::Button > m_xBtnDelete
SvxIconSelectorDialog(weld::Window *pWindow, css::uno::Reference< css::ui::XImageManager > xImageManager, css::uno::Reference< css::ui::XImageManager > xParentImageManager)
virtual ~SvxIconSelectorDialog() override
std::vector< css::uno::Reference< css::graphic::XGraphic > > m_aGraphics
sal_Int32 m_nExpectedSize
css::uno::Reference< css::graphic::XGraphic > GetSelectedIcon()
bool ImportGraphic(const OUString &aURL)
std::unique_ptr< ValueSet > m_xTbSymbol
css::uno::Reference< css::ui::XImageManager > m_xImportedImageManager
css::uno::Reference< css::ui::XImageManager > m_xParentImageManager
css::uno::Reference< css::graphic::XGraphicProvider > m_xGraphProvider
css::uno::Reference< css::ui::XImageManager > m_xImageManager
OUString m_sNewMenuEntryId
void UpdateButtonStates()
SvxMainMenuOrganizerDialog(weld::Window *, SvxEntries *, SvxConfigEntry const *, bool bCreateMenu)
virtual ~SvxMainMenuOrganizerDialog() override
std::unique_ptr< weld::Button > m_xMoveUpButton
SvxConfigEntry * GetSelectedEntry()
std::unique_ptr< weld::Widget > m_xMenuBox
std::unique_ptr< weld::TreeView > m_xMenuListBox
std::unique_ptr< weld::Entry > m_xMenuNameEdit
std::unique_ptr< weld::Button > m_xMoveDownButton
std::unique_ptr< SvxEntries > mpEntries
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
reference_type * get() const
const css::uno::Reference< css::ui::dialogs::XFilePicker3 > & GetFilePicker() const
css::uno::Sequence< OUString > GetMPath() const
void SetCurrentFilter(const OUString &rFilter)
void SetContext(Context _eNewContext)
static OUString getProductName()
sal_uInt16 GetCode() const
WindowType GetType() const
std::shared_ptr< weld::Dialog > m_xDialog
virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent &rEvt) override
virtual void scroll_to_row(int row)=0
void connect_row_activated(const Link< TreeView &, bool > &rLink)
virtual void swap(int pos1, int pos2)=0
virtual void set_text(int row, const OUString &rText, int col=-1)=0
void connect_changed(const Link< TreeView &, void > &rLink)
virtual void set_image(int row, const OUString &rImage, int col=-1)=0
virtual int get_height_rows(int nRows) const=0
virtual void select(int pos)=0
virtual void set_id(int row, const OUString &rId)=0
virtual int get_selected_index() const=0
OUString CuiResId(TranslateId aKey)
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
virtual OUString GetScriptURL() const override
virtual tools::Long GetValue() const override
std::deque< AttacherIndex_Impl > aIndex
Reference< XSingleServiceFactory > xFactory
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
#define LINK(Instance, Class, Member)
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
def run(arg=None, arg2=-1)
double getLength(const B2DPolygon &rCandidate)
css::uno::Sequence< css::uno::Any > InitAnyPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
enumrange< T >::Iterator begin(enumrange< T >)
Sequence< beans::PropertyValue > GetCommandProperties(const OUString &rsCommandName, const OUString &rsModuleName)
OUString GetTooltipForCommand(const OUString &rsCommandName, const css::uno::Sequence< css::beans::PropertyValue > &rProperties, const Reference< frame::XFrame > &rxFrame)
OUString GetModuleIdentifier(const Reference< frame::XFrame > &rxFrame)
OUString GetPopupLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
OUString GetLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
bool IsExperimental(const OUString &rsCommandName, const OUString &rModuleName)
OUString GetMenuLabelForCommand(const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
OUString toId(const void *pValue)
OUString VCL_DLLPUBLIC GetStandardText(StandardButtonType eButton)
this is only to let callers know that there is a LateInit which must be called
Reference< XController > xController
Reference< XFrame > xFrame
Reference< XModel > xModel
#define EDIT_UPDATEDATA_TIMEOUT