summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/com/sun/star/drawing/framework/XModuleController.idl7
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Impress.xcu122
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Impress.xcs12
-rw-r--r--sd/source/ui/framework/module/ModuleController.cxx81
-rw-r--r--sd/source/ui/inc/framework/ModuleController.hxx9
5 files changed, 38 insertions, 193 deletions
diff --git a/offapi/com/sun/star/drawing/framework/XModuleController.idl b/offapi/com/sun/star/drawing/framework/XModuleController.idl
index fab24be73a5d..8d9d9b3a9d7b 100644
--- a/offapi/com/sun/star/drawing/framework/XModuleController.idl
+++ b/offapi/com/sun/star/drawing/framework/XModuleController.idl
@@ -23,12 +23,7 @@ interface XView;
/** The module controller is responsible for loading a module (ad-don,
plugin, whatever the name) when it is first used.
- <p>For this there is a
- list in the office configuration which associates resource URLs with
- service names which in turn are associated with modules (or dlls). The
- path to the office configuration list is
- MultiPaneGUI/Framework/ResourceFactories in the
- Impress.xcu file.</p>
+ <p>For this there is a list in the sd::framework::ModuleController class.</p>
*/
interface XModuleController
{
diff --git a/officecfg/registry/data/org/openoffice/Office/Impress.xcu b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
index 37ebdf4d005f..76c79668d321 100644
--- a/officecfg/registry/data/org/openoffice/Office/Impress.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
@@ -60,128 +60,6 @@
</prop>
</node>
</node>
- <node oor:name="Framework">
- <node oor:name="ResourceFactories">
- <node oor:name="F0" oor:op="replace">
- <prop oor:name="ServiceName">
- <value>com.sun.star.drawing.framework.BasicPaneFactory</value>
- </prop>
- <node oor:name="ResourceList">
- <node oor:name="R0" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/pane/CenterPane</value>
- </prop>
- </node>
- <node oor:name="R1" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/pane/LeftImpressPane</value>
- </prop>
- </node>
- <node oor:name="R2" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/pane/LeftDrawPane</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="F1" oor:op="replace">
- <prop oor:name="ServiceName">
- <value>com.sun.star.drawing.framework.BasicViewFactory</value>
- </prop>
- <node oor:name="ResourceList">
- <node oor:name="R0" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/ImpressView</value>
- </prop>
- </node>
- <node oor:name="R1" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/GraphicView</value>
- </prop>
- </node>
- <node oor:name="R2" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/OutlineView</value>
- </prop>
- </node>
- <node oor:name="R3" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/NotesView</value>
- </prop>
- </node>
- <node oor:name="R4" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/HandoutView</value>
- </prop>
- </node>
- <node oor:name="R5" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/SlideSorter</value>
- </prop>
- </node>
- <node oor:name="R6" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/view/PresentationView</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="F2" oor:op="replace">
- <prop oor:name="ServiceName">
- <value>com.sun.star.drawing.framework.BasicToolBarFactory</value>
- </prop>
- <node oor:name="ResourceList">
- <node oor:name="R0" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolbar/ViewTabBar</value>
- </prop>
- </node>
- </node>
- </node>
- <node oor:name="F3" oor:op="replace">
- <prop oor:name="ServiceName">
- <value>com.sun.star.comp.Draw.framework.TaskPanelFactory</value>
- </prop>
- <node oor:name="ResourceList">
- <node oor:name="R0a" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/AllMasterPages</value>
- </prop>
- </node>
- <node oor:name="R0b" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/RecentMasterPages</value>
- </prop>
- </node>
- <node oor:name="R0c" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/UsedMasterPages</value>
- </prop>
- </node>
- <node oor:name="R1" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/Layouts</value>
- </prop>
- </node>
- <node oor:name="R2" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/TableDesign</value>
- </prop>
- </node>
- <node oor:name="R3" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/CustomAnimations</value>
- </prop>
- </node>
- <node oor:name="R4" oor:op="replace">
- <prop oor:name="URL">
- <value>private:resource/toolpanel/SlideTransitions</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </node>
</node>
<node oor:name="Misc">
<prop oor:name="TransitionFiles" install:module="ogltrans">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index e650c48e9766..cd7f06b87070 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -1308,18 +1308,6 @@
</info>
</set>
</group>
- <group oor:name="Framework">
- <info>
- <desc>Options that control the multi pane framework.</desc>
- <label>Multi Pane Framework Options</label>
- </info>
- <set oor:name="ResourceFactories" oor:node-type="ResourceFactory">
- <info>
- <desc>Set of factories and the resources created by them.</desc>
- <label>Multi Pane Framework Resource Factories</label>
- </info>
- </set>
- </group>
<group oor:name="SlideSorterBar">
<info>
<desc>Values related to the slide sorter.</desc>
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index a703c48ca27c..4d98bbfa38c2 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -37,45 +37,44 @@ using ::sd::tools::ConfigurationAccess;
namespace sd::framework {
-const sal_uInt32 snFactoryPropertyCount (2);
-
//===== ModuleController ======================================================
-Reference<XModuleController> ModuleController::CreateInstance (
- const Reference<XComponentContext>& rxContext)
+Reference<XModuleController> ModuleController::CreateInstance()
{
- return new ModuleController(rxContext);
+ return new ModuleController();
}
-ModuleController::ModuleController (const Reference<XComponentContext>& rxContext)
+ModuleController::ModuleController()
{
- /** Load a list of URL to service mappings from the
- /org.openoffice.Office.Impress/MultiPaneGUI/Framework/ResourceFactories
- configuration entry. The mappings are stored in the
+ /** Load a list of URL to service mappings.
+ The mappings are stored in the
mpResourceToFactoryMap member.
*/
- try
- {
- ConfigurationAccess aConfiguration (
- rxContext,
- "/org.openoffice.Office.Impress/",
- ConfigurationAccess::READ_ONLY);
- Reference<container::XNameAccess> xFactories (
- aConfiguration.GetConfigurationNode("MultiPaneGUI/Framework/ResourceFactories"),
- UNO_QUERY);
- ::std::vector<OUString> aProperties (snFactoryPropertyCount);
- aProperties[0] = "ServiceName";
- aProperties[1] = "ResourceList";
- ConfigurationAccess::ForAll(
- xFactories,
- aProperties,
- [this] (OUString const&, ::std::vector<Any> const& xs) {
- return this->ProcessFactory(xs);
- } );
- }
- catch (Exception&)
- {
- DBG_UNHANDLED_EXCEPTION("sd");
- }
+ ProcessFactory(
+ "com.sun.star.drawing.framework.BasicPaneFactory",
+ { "private:resource/pane/CenterPane",
+ "private:resource/pane/LeftImpressPane",
+ "private:resource/pane/LeftDrawPane" });
+ ProcessFactory(
+ "com.sun.star.drawing.framework.BasicViewFactory",
+ { "private:resource/view/ImpressView",
+ "private:resource/view/GraphicView",
+ "private:resource/view/OutlineView",
+ "private:resource/view/NotesView",
+ "private:resource/view/HandoutView",
+ "private:resource/view/SlideSorter",
+ "private:resource/view/PresentationView" });
+ ProcessFactory(
+ "com.sun.star.drawing.framework.BasicToolBarFactory",
+ { "private:resource/toolbar/ViewTabBar" });
+ ProcessFactory(
+ "com.sun.star.comp.Draw.framework.TaskPanelFactory",
+ { "private:resource/toolpanel/AllMasterPages",
+ "private:resource/toolpanel/RecentMasterPages",
+ "private:resource/toolpanel/UsedMasterPages",
+ "private:resource/toolpanel/Layouts",
+ "private:resource/toolpanel/TableDesign",
+ "private:resource/toolpanel/CustomAnimations",
+ "private:resource/toolpanel/SlideTransitions" });
}
ModuleController::~ModuleController() noexcept
@@ -90,21 +89,9 @@ void ModuleController::disposing(std::unique_lock<std::mutex>&)
mxController.clear();
}
-void ModuleController::ProcessFactory (const ::std::vector<Any>& rValues)
+void ModuleController::ProcessFactory (const OUString& sServiceName, ::std::vector<OUString> aURLs)
{
- OSL_ASSERT(rValues.size() == snFactoryPropertyCount);
-
- // Get the service name of the factory.
- OUString sServiceName;
- rValues[0] >>= sServiceName;
-
// Get all resource URLs that are created by the factory.
- Reference<container::XNameAccess> xResources (rValues[1], UNO_QUERY);
- ::std::vector<OUString> aURLs;
- tools::ConfigurationAccess::FillList(
- xResources,
- "URL",
- aURLs);
SAL_INFO("sd.fwk", __func__ << ": ModuleController::adding factory " << sServiceName);
@@ -197,10 +184,10 @@ void SAL_CALL ModuleController::initialize (const Sequence<Any>& aArguments)
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
com_sun_star_comp_Draw_framework_module_ModuleController_get_implementation(
- css::uno::XComponentContext* context,
+ css::uno::XComponentContext* /*context*/,
css::uno::Sequence<css::uno::Any> const &)
{
- css::uno::Reference< css::uno::XInterface > xModCont ( sd::framework::ModuleController::CreateInstance(context) );
+ css::uno::Reference< css::uno::XInterface > xModCont ( sd::framework::ModuleController::CreateInstance() );
xModCont->acquire();
return xModCont.get();
}
diff --git a/sd/source/ui/inc/framework/ModuleController.hxx b/sd/source/ui/inc/framework/ModuleController.hxx
index 5075e4c4710f..dd8985e175a1 100644
--- a/sd/source/ui/inc/framework/ModuleController.hxx
+++ b/sd/source/ui/inc/framework/ModuleController.hxx
@@ -59,9 +59,7 @@ class ModuleController final
public:
static css::uno::Reference<
css::drawing::framework::XModuleController>
- CreateInstance (
- const css::uno::Reference<css::uno::XComponentContext>&
- rxContext);
+ CreateInstance();
virtual void disposing(std::unique_lock<std::mutex>&) override;
@@ -82,14 +80,13 @@ private:
std::unordered_map<OUString, css::uno::WeakReference<css::uno::XInterface>> maLoadedFactories;
/// @throws std::exception
- ModuleController (
- const css::uno::Reference<css::uno::XComponentContext>& rxContext);
+ ModuleController();
ModuleController (const ModuleController&) = delete;
virtual ~ModuleController() noexcept override;
/** Called for every entry in the ResourceFactories configuration entry.
*/
- void ProcessFactory (const ::std::vector<css::uno::Any>& rValues);
+ void ProcessFactory (const OUString& ServiceName, ::std::vector<OUString> aURLs);
/** Instantiate startup services. This method is called once when a new
ModuleController object is created.