//apply to all except current module if (&rButton == m_xResetBtn.get()) // Apply to All
{
std::shared_ptr<comphelper::ConfigurationChanges> aBatch(
comphelper::ConfigurationChanges::create());
officecfg::Office::UI::ToolbarMode::ActiveWriter::set(sCmd, aBatch);
officecfg::Office::UI::ToolbarMode::ActiveCalc::set(sCmd, aBatch);
officecfg::Office::UI::ToolbarMode::ActiveImpress::set(sCmd, aBatch);
officecfg::Office::UI::ToolbarMode::ActiveDraw::set(sCmd, aBatch);
aBatch->commit();
const OUString sCurrentApp = UITabPage::GetCurrentApp(); if (SfxViewFrame::Current())
{ constauto& xContext = comphelper::getProcessComponentContext(); const utl::OConfigurationTreeRoot aAppNode(
xContext, u"org.openoffice.Office.UI.ToolbarMode/Applications/"_ustr, true); if (sCurrentApp != "Writer")
aAppNode.setNodeValue(u"Writer/Active"_ustr, css::uno::Any(sCmd)); if (sCurrentApp != "Calc")
aAppNode.setNodeValue(u"Calc/Active"_ustr, css::uno::Any(sCmd)); if (sCurrentApp != "Impress")
aAppNode.setNodeValue(u"Impress/Active"_ustr, css::uno::Any(sCmd)); if (sCurrentApp != "Draw")
aAppNode.setNodeValue(u"Draw/Active"_ustr, css::uno::Any(sCmd));
aAppNode.commit();
};
} //apply to current module
comphelper::dispatchCommand(".uno:ToolbarMode?Mode:string=" + sCmd, {});
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.