42#include <sfx2/sfxsids.hrc>
44#include <rtl/ustrbuf.hxx>
63#include <com/sun/star/container/XNameContainer.hpp>
64#include <com/sun/star/embed/ElementModes.hpp>
65#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
66#include <com/sun/star/frame/ModuleManager.hpp>
67#include <com/sun/star/frame/XFrames.hpp>
68#include <com/sun/star/frame/XLayoutManager.hpp>
69#include <com/sun/star/frame/FrameSearchFlag.hpp>
70#include <com/sun/star/frame/XController.hpp>
71#include <com/sun/star/frame/Desktop.hpp>
72#include <com/sun/star/frame/theUICommandDescription.hpp>
73#include <com/sun/star/graphic/GraphicProvider.hpp>
74#include <com/sun/star/io/IOException.hpp>
75#include <com/sun/star/ui/ItemType.hpp>
76#include <com/sun/star/ui/ItemStyle.hpp>
77#include <com/sun/star/ui/ImageManager.hpp>
78#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
79#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
80#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
81#include <com/sun/star/ui/XUIElement.hpp>
82#include <com/sun/star/ui/UIElementType.hpp>
83#include <com/sun/star/ui/ImageType.hpp>
84#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
85#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
86#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
87#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
88#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
89#include <com/sun/star/util/thePathSettings.hpp>
102#if OSL_DEBUG_LEVEL > 1
105 const OUString& prefix,
109 xPropSet->getPropertySetInfo();
112 xPropSetInfo->getProperties();
114 SAL_WARN(
"cui",
"printPropertySet: " << aPropDetails.getLength() <<
" properties" );
116 for ( beans::Property
const & aPropDetail : aPropDetails )
121 uno::Any a = xPropSet->getPropertyValue( aPropDetail.Name );
125 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name << tmp);
127 else if ( (
a >>= ival ) )
129 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name <<
" = " << ival);
133 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropDetail.Name <<
" of type " <<
a.getValueTypeName());
139 const OUString& prefix,
142 for (beans::PropertyValue
const & aPropVal : aProp)
146 aPropVal.Value >>= tmp;
148 SAL_WARN(
"cui",
prefix <<
": Got property: " << aPropVal.Name <<
" = " << tmp);
154 for (
auto const& entry : *entries)
156 SAL_WARN(
"cui",
"printEntries: " << entry->GetName());
165 return aModuleId !=
u"com.sun.star.script.BasicIDE" && aModuleId !=
u"com.sun.star.frame.Bibliography";
170 return std::make_unique<SvxMenuConfigPage>(pPage, pController, *
rSet);
175 return std::make_unique<SvxMenuConfigPage>(pPage, pController, *
rSet,
false);
180 return std::make_unique<SfxAcceleratorConfigPage>(pPage, pController, *
rSet);
186 return std::make_unique<SvxNotebookbarConfigPage>(pPage, pController, *
rSet);
191 return std::make_unique<SvxToolbarConfigPage>(pPage, pController, *
rSet);
234 GetResetButton()->set_visible(rPage !=
"keyboard");
242 if (aModuleId !=
"com.sun.star.text.TextDocument" &&
243 aModuleId !=
"com.sun.star.sheet.SpreadsheetDocument" &&
244 aModuleId !=
"com.sun.star.presentation.PresentationDocument" &&
245 aModuleId !=
"com.sun.star.drawing.DrawingDocument")
248 if (aModuleId ==
"com.sun.star.frame.StartModule")
254 if (rId ==
"menus" || rId ==
"keyboard" || rId ==
"notebookbar"
255 || rId ==
"toolbars" || rId ==
"contextmenus")
259 else if (rId ==
"events")
278 const OUString& aModuleId,
282 bDocConfig( isDocConfig ),
284 m_xCfgMgr(
std::move( xCfgMgr )),
285 m_xParentCfgMgr(
std::move( xParentCfgMgr )),
287 css::ui::
ItemType::SEPARATOR_LINE) }
294 bReadOnly = xDocPersistence->isReadOnly();
300 css::frame::theUICommandDescription::get(xContext) );
333 if (!xGraphic.is() &&
xDefaultImgMgr !=
nullptr && (*xDefaultImgMgr).is())
351 xConfigPersistence( xManager, uno::UNO_QUERY );
353 if ( xConfigPersistence->isModified() )
355 xConfigPersistence->store();
359 catch ( css::io::IOException& )
380 const OUString& aModuleId,
383 SaveInData( cfgmgr, xParentCfgMgr, aModuleId, isDocConfig ),
386 m_aDescriptorContainer(
393 catch ( container::NoSuchElementException& )
436 pRootEntry->SetEntries( std::move(pNewEntries) );
440 const OUString& rBaseTitle,
SvxConfigEntry const * pParentData,
bool bContextMenu )
445 if ( !xMenuSettings.is() )
451 OUString aCommandURL;
454 sal_uInt16
nType( css::ui::ItemType::DEFAULT );
462 bool bIsUserDefined =
true;
464 if (
nType == css::ui::ItemType::DEFAULT )
470 bIsUserDefined =
false;
472 catch ( container::NoSuchElementException& )
474 bIsUserDefined =
true;
477 bool bUseDefaultLabel =
false;
482 bUseDefaultLabel =
true;
484 if (
a >>= aPropSeq )
487 for (
const beans::PropertyValue& prop : std::as_const(aPropSeq) )
491 if ( prop.Name ==
"PopupLabel" )
496 else if ( prop.Name ==
"Label" )
498 prop.Value >>= aMenuLabel;
501 else if ( prop.Name ==
"Label" )
513 aLabel, aCommandURL, xSubMenu.is(),
false );
517 if ( !bUseDefaultLabel )
520 pEntries->push_back( pEntry );
525 OUString subMenuTitle( rBaseTitle );
527 if ( !subMenuTitle.isEmpty() )
538 LoadSubMenus( xSubMenu, subMenuTitle, pEntry, bContextMenu );
545 pEntries->push_back( pEntry );
581 catch ( css::uno::Exception& )
606 rFactory->createInstanceWithContext( xContext ),
609 sal_Int32
nIndex = aPropValueSeq.getLength();
610 aPropValueSeq.realloc( nIndex + 1 );
611 auto pPropValueSeq = aPropValueSeq.getArray();
613 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
614 rMenuBar->insertByIndex(
615 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
616 ApplyMenu( xSubMenuBar, rFactory, entryData );
627 for (
auto const& entry : *pMenuData->
GetEntries())
629 if (entry->IsPopup())
635 rFactory->createInstanceWithContext( xContext ),
638 sal_Int32
nIndex = aPropValueSeq.getLength();
639 aPropValueSeq.realloc(
nIndex + 1 );
640 auto pPropValueSeq = aPropValueSeq.getArray();
642 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
644 rMenuBar->insertByIndex(
645 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
647 ApplyMenu( xSubMenuBar, rFactory, entry );
648 entry->SetModified(
false );
650 else if (entry->IsSeparator())
652 rMenuBar->insertByIndex(
659 rMenuBar->insertByIndex(
660 rMenuBar->getCount(),
uno::Any( aPropValueSeq ));
673 catch (
const css::uno::Exception& )
685 catch ( container::NoSuchElementException& )
692 const css::uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
693 const css::uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
694 const OUString& aModuleId,
bool bIsDocConfig )
695 :
SaveInData( xCfgMgr, xParentCfgMgr, aModuleId, bIsDocConfig )
698 css::uno::Reference< css::container::XNameAccess > xConfig( css::ui::theWindowStateConfiguration::get( xContext ) );
710 css::uno::Sequence< css::beans::PropertyValue > aProps;
715 catch (
const css::uno::Exception& )
718 for (
const auto& aProp : std::as_const(aProps) )
723 aProp.Value >>= aResult;
735 std::unordered_map< OUString, bool > aMenuInfo;
738 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aElementsInfo;
741 aElementsInfo =
GetConfigManager()->getUIElementsInfo( css::ui::UIElementType::POPUPMENU );
743 catch (
const css::lang::IllegalArgumentException& )
746 for (
const auto& aElement : std::as_const(aElementsInfo) )
749 for (
const auto& aElementProp : aElement )
753 aElementProp.Value >>= aUrl;
758 css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
763 catch (
const css::uno::Exception& )
766 if ( xPopupMenu.is() )
769 aMenuInfo.emplace( aUrl,
true );
771 OUString aUIMenuName =
GetUIName( aUrl );
772 if ( aUIMenuName.isEmpty() )
785 css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aParentElementsInfo;
788 if ( xParentCfgMgr.is() )
789 aParentElementsInfo = xParentCfgMgr->getUIElementsInfo( css::ui::UIElementType::POPUPMENU );
791 catch (
const css::lang::IllegalArgumentException& )
794 for (
const auto& aElement : std::as_const(aParentElementsInfo) )
797 for (
const auto& aElementProp : aElement )
801 aElementProp.Value >>= aUrl;
806 css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
809 if ( aMenuInfo.find( aUrl ) == aMenuInfo.end() )
810 xPopupMenu = xParentCfgMgr->getSettings( aUrl,
false );
812 catch (
const css::uno::Exception& )
815 if ( xPopupMenu.is() )
817 OUString aUIMenuName =
GetUIName( aUrl );
818 if ( aUIMenuName.isEmpty() )
840 for (
const auto& pEntry : *pEntries )
841 if ( pEntry->GetCommand() == rURL )
858 for (
const auto& pEntry : *pEntries )
862 css::uno::Reference< css::container::XIndexContainer > xIndexContainer =
GetConfigManager()->createSettings();
863 css::uno::Reference< css::lang::XSingleComponentFactory >
xFactory( xIndexContainer, css::uno::UNO_QUERY );
866 const OUString& aUrl = pEntry->GetCommand();
874 catch (
const css::uno::Exception& )
885 for (
const auto& pEntry : *pEntries )
891 catch (
const css::uno::Exception& )
906 catch (
const css::uno::Exception& )
916 int nWidth = (
m_xControl->get_text_height() * 3) / 4;
920 SymbolType::SPIN_RIGHT,
m_xDropDown->GetTextColor(),
921 DrawSymbolFlags::NONE);
934 , m_xDropDown(
m_xControl->create_virtual_device())
953 m_pPage->DeleteSelectedContent();
958 m_pPage->MoveEntry(
true );
962 m_pPage->MoveEntry(
false );
979 :
SfxTabPage(pPage, pController,
"cui/ui/menuassignpage.ui",
"MenuAssignPage", &
rSet)
980 , m_aUpdateDataTimer(
"SvxConfigPage UpdateDataTimer" )
981 , bInitialised(false)
982 , pCurrentSaveInData(nullptr)
983 , m_xCommandCategoryListBox(new
CommandCategoryListBox(m_xBuilder->weld_combo_box(
"commandcategorylist")))
985 , m_xCategoryLabel(m_xBuilder->weld_label(
"categorylabel"))
986 , m_xDescriptionFieldLb(m_xBuilder->weld_label(
"descriptionlabel"))
987 , m_xDescriptionField(m_xBuilder->weld_text_view(
"desc"))
988 , m_xLeftFunctionLabel(m_xBuilder->weld_label(
"leftfunctionlabel"))
989 , m_xSearchEdit(m_xBuilder->weld_entry(
"searchEntry"))
990 , m_xSearchLabel(m_xBuilder->weld_label(
"searchlabel"))
991 , m_xCustomizeLabel(m_xBuilder->weld_label(
"customizelabel"))
992 , m_xTopLevelListBox(m_xBuilder->weld_combo_box(
"toplevellist"))
993 , m_xMoveUpButton(m_xBuilder->weld_button(
"up"))
994 , m_xMoveDownButton(m_xBuilder->weld_button(
"down"))
995 , m_xSaveInListBox(m_xBuilder->weld_combo_box(
"savein"))
996 , m_xInsertBtn(m_xBuilder->weld_menu_button(
"insert"))
997 , m_xModifyBtn(m_xBuilder->weld_menu_button(
"modify"))
998 , m_xResetBtn(m_xBuilder->weld_button(
"defaultsbtn"))
999 , m_xAddCommandButton(m_xBuilder->weld_button(
"add"))
1000 , m_xRemoveCommandButton(m_xBuilder->weld_button(
"remove"))
1029 for(
int i=0;
i < cnt; ++
i)
1051 ::comphelper::getProcessComponentContext(), uno::UNO_SET_THROW );
1058 css::frame::ModuleManager::create( xContext ));
1062 xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
1070 xModuleCfgSupplier->getUIConfigurationManager(
m_aModuleId );
1077 catch ( container::NoSuchElementException& )
1081 if ( pModuleData !=
nullptr )
1097 xCfgSupplier(
xModel, uno::UNO_QUERY );
1099 if ( xCfgSupplier.is() )
1101 xDocCfgMgr = xCfgSupplier->getUIConfigurationManager();
1103 aTitle = ::comphelper::DocumentInfo::getDocumentTitle(
xModel );
1108 if ( xDocCfgMgr.is() )
1121 bool bURLToSelectFound =
false;
1128 bURLToSelectFound =
true;
1134 bURLToSelectFound =
true;
1138 if ( !bURLToSelectFound )
1142 if ( pDocData !=
nullptr && pDocData->
HasSettings() )
1169 xFramesSupplier->getFrames();
1171 aFrameList = xFrames->queryFrames(
1172 frame::FrameSearchFlag::ALL & ~frame::FrameSearchFlag::SELF );
1175 catch(
const uno::Exception& )
1186 aCheckId = xModuleManager->identify( xf );
1187 }
catch(
const uno::Exception&)
1188 { aCheckId.clear(); }
1195 xf->getController();
1197 if ( xController_.is() )
1200 xController_->getModel() );
1205 css::ui::XUIConfigurationManagerSupplier >
1206 xCfgSupplier(
xModel, uno::UNO_QUERY );
1208 if ( xCfgSupplier.is() )
1211 xCfgSupplier->getUIConfigurationManager();
1213 aTitle2 = ::comphelper::DocumentInfo::getDocumentTitle(
xModel );
1217 if ( xDocCfgMgr.is() )
1257 ::comphelper::getProcessComponentContext() );
1262 if ( !_inout_rxFrame.is() )
1263 _inout_rxFrame = xDesktop->getActiveFrame();
1265 if ( !_inout_rxFrame.is() )
1267 _inout_rxFrame = xDesktop->getCurrentFrame();
1273 if ( !_inout_rxFrame.is() )
1275 SAL_WARN(
"cui.customize",
"SvxConfigPage::GetFrameWithDefaultAndIdentify(): no frame found!" );
1281 catch(
const uno::Exception& )
1330 OUString
sId = m_xSaveInListBox->get_active_id();
1332 pCurrentSaveInData = weld::fromId<SaveInData*>(
sId);
1343 for (
auto const& entryData : *
GetSaveInData()->GetEntries())
1348 if (entryData == pToSelect)
1359 "SvxConfigPage::ReloadTopLevelListBox(): no SaveInData entries" );
1363 nSelectionPos = (nSelectionPos != -1 && nSelectionPos <
m_xTopLevelListBox->get_count()) ?
1371 std::u16string_view rBaseTitle,
SvxConfigEntry const * pParentData )
1373 for (
auto const& entryData : *pParentData->
GetEntries())
1375 if (entryData->IsPopup())
1390 for (
auto const& entryData : *pRootEntries)
1393 if (entryData == pChildData)
1395 return pRootEntries;
1397 else if (entryData->IsPopup())
1413 OUString aDisplayName;
1415 if (
aURL.isEmpty() ) {
1433 if ( aDisplayName.isEmpty() )
1444 if ( pEntries !=
nullptr
1445 && pEntryData !=
nullptr )
1447 for (
auto const& entry : *pEntries)
1449 if ( entry->GetCommand() == pEntryData->
GetCommand() )
1466 if (
aURL.isEmpty() || pParent ==
nullptr )
1475 if ( !bAllowDuplicates
1479 delete pNewEntryData;
1494 if (pTopLevelSelection ==
nullptr)
1508 pEntries->push_back( pNewEntryData );
1517 SvxEntries::iterator iter = pEntries->begin();
1518 SvxEntries::const_iterator
end = pEntries->end();
1521 sal_uInt16
nPos = 0;
1522 while (*iter != pEntryData && ++iter !=
end)
1534 pEntries->insert( iter, pNewEntryData );
1540 if (nNewEntry != -1)
1559 rTreeView.
set_id(rIter, sId);
1563 rTreeView.
set_text(rIter,
"----------------------------------", 0);
1571 rTreeView.
set_text(rIter, aName, 0);
1576 if (pNewEntryData->
IsPopup() || pNewEntryData->
GetStyle() & css::ui::ItemStyle::DROP_DOWN)
1577 rTreeView.
set_image(rIter, rDropDown, 1);
1579 rTreeView.
set_image(rIter, css::uno::Reference<css::graphic::XGraphic>(), 1);
1592 TmplInsertEntryIntoUI<weld::TreeIter>(pNewEntryData, rTreeView, rIter,
GetSaveInData(),
1598 MoveEntry(&rButton == m_xMoveUpButton.get());
1603 if (m_xAddCommandButton->get_sensitive())
1604 m_xAddCommandButton->clicked();
1613 bool bIsValidCommand = !aSelectCommand.isEmpty();
1616 if (bIsValidCommand)
1618 m_xAddCommandButton->set_sensitive(
true);
1619 m_xRemoveCommandButton->set_sensitive(
true);
1623 m_xDescriptionField->set_text(m_xFunctions->GetHelpText(
false));
1633 OUString aExperimental =
"\n" +
CuiResId(RID_CUISTR_COMMANDEXPERIMENTAL);
1636 OUString aTip =
CuiResId(RID_CUISTR_COMMANDTIP) +
": " +
pData->sTooltip;
1638 m_xDescriptionField->set_text(
aLabel +
aName + aTip + aExperimental);
1640 m_xDescriptionField->set_text(
aLabel +
aName + aTip);
1647 m_xAddCommandButton->set_sensitive(
false);
1648 m_xRemoveCommandButton->set_sensitive(
false);
1650 m_xDescriptionField->set_text(
"");
1653 UpdateButtonStates();
1658 OUString aSearchTerm(m_xSearchEdit->get_text());
1659 m_xCommandCategoryListBox->categorySelected(m_xFunctions.get(), aSearchTerm, GetSaveInData());
1660 SelectFunctionHdl(m_xFunctions->get_widget());
1665 m_aUpdateDataTimer.Start();
1670 if (m_aUpdateDataTimer.IsActive())
1672 m_aUpdateDataTimer.Stop();
1673 m_aUpdateDataTimer.Invoke();
1682 int nTargetEntry = -1;
1685 if (nSourceEntry == -1)
1693 nTargetEntry = nSourceEntry;
1694 nSourceEntry = nTargetEntry - 1;
1695 nToSelect = nSourceEntry;
1699 nTargetEntry = nSourceEntry + 1;
1700 nToSelect = nTargetEntry;
1705 rTreeView.
swap(nSourceEntry, nTargetEntry);
1706 rTreeView.
select(nToSelect);
1716 if (nSourceEntry == -1 || nTargetEntry == -1)
1730 if ( pSourceData ==
nullptr || pTargetData ==
nullptr )
1736 SvxEntries::iterator iter = pEntries->begin();
1737 SvxEntries::const_iterator
end = pEntries->end();
1740 while (*iter != pTargetData && ++iter !=
end) ;
1743 pEntries->insert( ++iter, pSourceData );
1754 : GenericDialogController(pParent,
"cui/ui/movemenu.ui",
"MoveMenuDialog")
1755 , m_xMenuBox(m_xBuilder->weld_widget(
"namebox"))
1756 , m_xMenuNameEdit(m_xBuilder->weld_entry(
"menuname"))
1757 , m_xMenuListBox(m_xBuilder->weld_tree_view(
"menulist"))
1758 , m_xMoveUpButton(m_xBuilder->weld_button(
"up"))
1759 , m_xMoveDownButton(m_xBuilder->weld_button(
"down"))
1764 if ( entries !=
nullptr )
1767 for (
auto const& entry : *entries)
1772 if (entry == selection)
1789 pNewEntryData->
SetName( newname );
1827 if (m_xMenuNameEdit->get_text().isEmpty())
1832 SvxConfigEntry* pNewEntryData = weld::fromId<SvxConfigEntry*>(m_sNewMenuEntryId);
1833 pNewEntryData->
SetName(m_xMenuNameEdit->get_text());
1835 const int nNewMenuPos = m_xMenuListBox->find_id(m_sNewMenuEntryId);
1836 const int nOldSelection = m_xMenuListBox->get_selected_index();
1837 m_xMenuListBox->remove(nNewMenuPos);
1838 m_xMenuListBox->insert(nNewMenuPos, pNewEntryData->
GetName(), &m_sNewMenuEntryId,
nullptr,
nullptr);
1839 m_xMenuListBox->select(nOldSelection);
1844 UpdateButtonStates();
1852 m_xMoveDownButton->set_sensitive(nSelected != -1 && nSelected < m_xMenuListBox->n_children() - 1);
1857 int nSourceEntry = m_xMenuListBox->get_selected_index();
1858 if (nSourceEntry == -1)
1863 if (&rButton == m_xMoveDownButton.get())
1865 nTargetEntry = nSourceEntry + 1;
1870 nTargetEntry = nSourceEntry - 1;
1873 OUString
sId = m_xMenuListBox->get_id(nSourceEntry);
1874 OUString sEntry = m_xMenuListBox->get_text(nSourceEntry);
1875 m_xMenuListBox->remove(nSourceEntry);
1876 m_xMenuListBox->insert(nTargetEntry, sEntry, &
sId,
nullptr,
nullptr);
1877 m_xMenuListBox->select(nTargetEntry);
1879 std::swap(mpEntries->at(nSourceEntry), mpEntries->at(nTargetEntry));
1881 UpdateButtonStates();
1887 if (nSelected == -1)
1889 return weld::fromId<SvxConfigEntry*>(
m_xMenuListBox->get_id(nSelected));
1893 OUString aCommandURL,
bool bPopup,
bool bParentData )
1898 , bStrEdited( false )
1899 , bIsUserDefined( false )
1901 , bIsParentData( bParentData )
1902 , bIsModified( false )
1903 , bIsVisible( true )
1941 const OUString& aModuleId,
1944 SaveInData ( xCfgMgr, xParentCfgMgr, aModuleId, docConfig ),
1964 if ( rResourceURL.startsWith(
"private" ) &&
1975 for ( beans::PropertyValue
const & prop : std::as_const(aProps) )
1985 catch ( uno::Exception& )
1996 const OUString& rResourceURL,
2008 if ( xPropSet.is() )
2010 uno::Any a = xPropSet->getPropertyValue(
"LayoutManager" );
2011 a >>= xLayoutManager;
2014 if ( xLayoutManager.is() )
2017 xLayoutManager->getElement( rResourceURL );
2023 if ( xUIElement.is() )
2024 xWindow.set( xUIElement->getRealInterface(), uno::UNO_QUERY );
2029 if ( window ==
nullptr || window->
GetType() != WindowType::TOOLBOX )
2038 else if ( nStyle == 1 )
2049 const OUString& rResourceURL,
2052 if ( !(rResourceURL.startsWith(
"private" ) &&
2065 for ( beans::PropertyValue& prop : asNonConstRange(aProps) )
2069 prop.Value <<= nStyle;
2078 xNameReplace->replaceByName( rResourceURL,
uno::Any( aProps ) );
2080 catch ( uno::Exception& )
2091 if ( rResourceURL.startsWith(
"private" ) &&
2102 for ( beans::PropertyValue
const & prop : std::as_const(aProps) )
2111 catch ( uno::Exception& )
2117 if ( rResourceURL.startsWith(
".uno" ) &&
2127 if (
a >>= aPropSeq )
2129 for ( beans::PropertyValue
const & prop : std::as_const(aPropSeq) )
2138 catch ( uno::Exception& )
2149 typedef std::unordered_map<OUString, bool > ToolbarInfo;
2151 ToolbarInfo aToolbarInfo;
2160 css::ui::UIElementType::TOOLBAR );
2165 OUString systemname;
2168 for (
const beans::PropertyValue& prop :
props )
2173 systemname = url.copy( url.lastIndexOf(
'/' ) + 1 );
2177 prop.Value >>= uiname;
2186 if ( uiname.isEmpty() )
2191 if ( uiname.isEmpty() )
2193 uiname = systemname;
2198 uiname, url,
true,
false );
2205 aToolbarInfo.emplace( systemname,
true );
2216 pRootEntry->GetEntries()->push_back( pEntry );
2220 catch ( container::NoSuchElementException& )
2227 if ( xParentCfgMgr.is() )
2233 xParentCfgMgr->getUIElementsInfo(
2234 css::ui::UIElementType::TOOLBAR );
2239 OUString systemname;
2242 for (
const beans::PropertyValue& prop :
props )
2247 systemname = url.copy( url.lastIndexOf(
'/' ) + 1 );
2251 prop.Value >>= uiname;
2257 if ( systemname.startsWith( custom ) )
2261 ToolbarInfo::const_iterator pIter = aToolbarInfo.find( systemname );
2262 if ( pIter == aToolbarInfo.end() )
2264 aToolbarInfo.emplace( systemname,
true );
2269 xParentCfgMgr->getSettings( url,
false );
2271 if ( uiname.isEmpty() )
2276 if ( uiname.isEmpty() )
2278 uiname = systemname;
2283 uiname, url,
true,
true );
2288 if ( systemname.startsWith( custom ) )
2297 pRootEntry->GetEntries()->push_back( pEntry );
2301 catch ( container::NoSuchElementException& )
2318 pRootEntry->SetEntries( std::move(pNewEntries) );
2326 if (entry->GetCommand() == rURL)
2328 return !entry->IsParentData();
2347 const OUString& url = entry->GetCommand();
2350 catch ( uno::Exception& )
2370 catch ( uno::Exception& )
2372 SAL_WARN(
"cui.customize",
"Error resetting all icons when resetting toolbars");
2389 for (
auto const& entry : *pToolbarData->
GetEntries())
2391 if (entry->IsPopup())
2397 rFactory->createInstanceWithContext( xContext ),
2400 sal_Int32
nIndex = aPropValueSeq.getLength();
2401 aPropValueSeq.realloc( nIndex + 1 );
2402 auto pPropValueSeq = aPropValueSeq.getArray();
2404 pPropValueSeq[
nIndex].Value <<= xSubMenuBar;
2405 rToolbarBar->insertByIndex(
2406 rToolbarBar->getCount(),
uno::Any( aPropValueSeq ));
2410 else if (entry->IsSeparator())
2412 rToolbarBar->insertByIndex(
2420 rToolbarBar->insertByIndex(
2421 rToolbarBar->getCount(),
uno::Any( aPropValueSeq ));
2433 xSettings, uno::UNO_QUERY );
2436 xSettings, uno::UNO_QUERY );
2441 xSettings, uno::UNO_QUERY );
2445 xProps->setPropertyValue(
2465 catch ( css::uno::Exception
const & )
2480 xPropertySet( xSettings, uno::UNO_QUERY );
2482 xPropertySet->setPropertyValue(
2490 catch ( css::uno::Exception
const & )
2512 css::uno::Reference< css::container::XNameContainer > xNameContainer(
2515 xNameContainer->removeByName( url );
2517 catch ( uno::Exception& )
2532 if ( bParentToolbar )
2541 catch ( uno::Exception& )
2564 auto pURLSeq = aURLSeq.getArray();
2565 for (
auto const& entry : *pToolbar->
GetEntries())
2567 pURLSeq[ 0 ] = entry->GetCommand();
2573 catch ( uno::Exception& )
2575 SAL_WARN(
"cui.customize",
"Error restoring icon when resetting toolbar");
2580 catch ( container::NoSuchElementException& )
2595 OUString aCommandURL;
2600 sal_uInt16
nType( css::ui::ItemType::DEFAULT );
2607 bool bIsUserDefined =
true;
2609 if (
nType == css::ui::ItemType::DEFAULT )
2615 bIsUserDefined =
false;
2617 catch ( container::NoSuchElementException& )
2619 bIsUserDefined =
true;
2622 bool bUseDefaultLabel =
false;
2627 bUseDefaultLabel =
true;
2629 if (
a >>= aPropSeq )
2631 for ( beans::PropertyValue
const & prop : std::as_const(aPropSeq) )
2633 if ( prop.Name ==
"Name" )
2643 aLabel, aCommandURL,
false,
false );
2649 if ( !bUseDefaultLabel )
2652 pEntries->push_back( pEntry );
2658 pEntries->push_back( pEntry );
2665 : GenericDialogController(pWindow,
"cui/ui/newtoolbardialog.ui",
"NewToolbarDialog")
2666 , m_xEdtName(m_xBuilder->weld_entry(
"edit"))
2667 , m_xBtnOK(m_xBuilder->weld_button(
"ok"))
2668 , m_xSaveInListBox(m_xBuilder->weld_combo_box(
"savein"))
2686 : GenericDialogController(pWindow,
"cui/ui/iconselectordialog.ui",
"IconSelector")
2687 , m_xImageManager(
std::move(xImageManager))
2688 , m_xParentImageManager(
std::move(xParentImageManager))
2689 , m_xTbSymbol(new
ValueSet(m_xBuilder->weld_scrolled_window(
"symbolswin", true)))
2690 , m_xTbSymbolWin(new
weld::CustomWeld(*m_xBuilder,
"symbolsToolbar", *m_xTbSymbol))
2691 , m_xFtNote(m_xBuilder->weld_label(
"noteLabel"))
2692 , m_xBtnImport(m_xBuilder->weld_button(
"importButton"))
2693 , m_xBtnDelete(m_xBuilder->weld_button(
"deleteButton"))
2695 typedef std::unordered_map< OUString, bool > ImageInfo;
2718 ::comphelper::getProcessComponentContext();
2720 m_xGraphProvider.set( graphic::GraphicProvider::create( xComponentContext ) );
2723 css::util::thePathSettings::get( xComponentContext );
2726 OUString aDirectory = xPathSettings->getUserConfig();
2728 sal_Int32 aCount = aDirectory.getLength();
2743 aDirectory +=
"soffice.cfg/import";
2746 css::embed::FileSystemStorageFactory::create( xComponentContext ) );
2749 uno::Any(css::embed::ElementModes::READWRITE) };
2752 xStorageFactory->createInstanceWithArguments( aArgs ), uno::UNO_QUERY );
2756 {
"UserConfigStorage",
uno::Any(xStorage)},
2757 {
"OpenMode",
uno::Any(css::embed::ElementModes::READWRITE)}
2762 ImageInfo aImageInfo1;
2766 for (
auto const &
name : names )
2767 aImageInfo1.emplace(
name,
false );
2771 auto pname =
name.getArray();
2772 for (
auto const& elem : aImageInfo1)
2774 pname[ 0 ] = elem.first;
2776 if ( graphics.hasElements() )
2779 Image img(graphics[0]);
2784 ImageInfo aImageInfo;
2789 for (
auto const &
i : names )
2790 aImageInfo.emplace(
i,
false );
2794 for (
auto const &
i : names )
2796 ImageInfo::iterator pIter = aImageInfo.find(
i );
2797 if ( pIter != aImageInfo.end() )
2798 pIter->second =
true;
2800 aImageInfo.emplace(
i,
true );
2804 for (
auto const& elem : aImageInfo)
2806 pname[ 0 ] = elem.first;
2816 catch ( uno::Exception& )
2822 if ( graphics.hasElements() )
2824 Image img(graphics[0]);
2859 sal_uInt16
nId = m_xTbSymbol->GetSelectedItemId();
2863 m_xBtnDelete->set_sensitive(
false);
2867 OUString aSelImageText = m_xTbSymbol->GetItemText(
nId);
2870 m_xBtnDelete->set_sensitive(
true);
2874 m_xBtnDelete->set_sensitive(
false);
2881 css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
2882 FileDialogFlags::Graphic | FileDialogFlags::MultiSelection,
m_xDialog.get());
2891 css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK,
2902 ImportGraphics ( paths );
2908 OUString message =
CuiResId( RID_CUISTR_DELETE_ICON_CONFIRM );
2911 VclMessageType::Warning, VclButtonsType::OkCancel,
2913 if (xWarn->run() !=
RET_OK)
2916 sal_uInt16
nId = m_xTbSymbol->GetSelectedItemId();
2918 OUString aSelImageText = m_xTbSymbol->GetItemText(
nId );
2920 m_xTbSymbol->RemoveItem(
nId);
2922 if ( m_xImportedImageManager->isModified() )
2924 m_xImportedImageManager->store();
2929 const OUString& aURL )
2934 css::awt::Size aSize;
2944 if (0 == aSize.Width || 0 == aSize.Height)
2949 catch ( uno::Exception& )
2954 bool bResult(
false );
2969 Image aImage( xGraphic );
2974 aImage =
Image( aBitmapex);
2986 catch ( css::uno::Exception& )
2998 OUString ReplaceIconName(std::u16string_view rMessage)
3001 OUString message =
CuiResId( RID_CUISTR_REPLACE_ICON_WARNING );
3002 OUString placeholder(
"%ICONNAME" );
3003 sal_Int32
pos = message.indexOf( placeholder );
3006 name = message.replaceAt(
3007 pos, placeholder.getLength(), rMessage );
3012 class SvxIconReplacementDialog
3017 SvxIconReplacementDialog(
weld::Window *pParent, std::u16string_view rMessage,
bool bYestoAll)
3035 std::vector< OUString > rejected( rPaths.getLength() );
3036 sal_Int32 rejectedCount = 0;
3042 if ( rPaths.getLength() == 1 )
3046 aIndex = rPaths[0].lastIndexOf(
'/' );
3047 aIconName = rPaths[0].copy(
aIndex+1 );
3048 SvxIconReplacementDialog aDlg(
m_xDialog.get(), aIconName,
false);
3059 rejected[0] = rPaths[0];
3066 OUString aSourcePath( rPaths[0] );
3067 if ( rPaths[0].lastIndexOf(
'/' ) != rPaths[0].
getLength() -1 )
3068 aSourcePath = rPaths[0] +
"/";
3070 for ( sal_Int32
i = 1;
i < rPaths.getLength(); ++
i )
3072 OUString aPath = aSourcePath + rPaths[
i];
3075 aIndex = rPaths[
i].lastIndexOf(
'/' );
3076 aIconName = rPaths[
i].copy(
aIndex+1 );
3077 SvxIconReplacementDialog aDlg(
m_xDialog.get(), aIconName,
true);
3083 else if ( ret == 5 )
3085 for ( sal_Int32 k =
i; k < rPaths.getLength(); ++k )
3087 aPath = aSourcePath + rPaths[k];
3090 if ( !bHasReplaced )
3095 rejected[ rejectedCount ] = rPaths[
i];
3108 rejected[ rejectedCount ] = rPaths[
i];
3115 if ( rejectedCount == 0 )
3118 OUStringBuffer message;
3120 if (rejectedCount > 1)
3121 fPath = OUString::Concat(rPaths[0].subView(8)) +
"/";
3122 for ( sal_Int32
i = 0;
i < rejectedCount; ++
i )
3124 message.append(fPath + rejected[
i] +
"\n");
3145 if ( xGraphic.is() )
3148 css::awt::Size aSize;
3151 if ( 0 == aSize.Width || 0 == aSize.Height )
3154 Image aImage( xGraphic );
3160 aImage =
Image( aBitmapex);
3162 if ( bOK && !!aImage )
3179 SAL_WARN(
"cui.customize",
"could not create Image from XGraphic");
3184 SAL_WARN(
"cui.customize",
"could not get query XGraphic");
3187 catch( uno::Exception
const & )
3200 : MessageDialogController(pWindow,
"cui/ui/iconchangedialog.ui",
"IconChange",
"grid")
3201 , m_xLineEditDescription(m_xBuilder->weld_text_view(
"addrTextview"))
3209 :
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)
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)
IMPL_LINK(SvxConfigDialog, ActivatePageHdl, const OString &, rPage, void)
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_DESCRIPTOR_CONTAINER
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
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
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
static bool IsHelpInstalled()
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void SetCurPageId(const OString &rName)
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
std::unique_ptr< weld::Notebook > m_xTabCtrl
void RemoveTabPage(const OString &rName)
css::uno::Reference< css::frame::XFrame > GetFrame() const
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
static SfxViewFrame * Current()
SfxFrame & GetFrame() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
css::uno::Reference< css::frame::XFrame > m_xFrame
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
virtual void PageCreated(const OString &rId, SfxTabPage &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 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