void ModuleController::disposing(std::unique_lock<std::mutex>&)
{ // Break the cyclic reference back to DrawController object
maLoadedFactories.clear();
maResourceToFactoryMap.clear();
mxController.clear();
}
void ModuleController::ProcessFactory (const OUString& sServiceName, ::std::vector<OUString> aURLs)
{ // Get all resource URLs that are created by the factory.
// Add the resource URLs to the map. for (constauto& rResource : aURLs)
{
maResourceToFactoryMap[rResource] = sServiceName;
SAL_INFO("sd.fwk", __func__ << ": " << rResource);
}
}
void ModuleController::InstantiateStartupServices()
{ try
{ // Instantiate service. // Note that when the new object will be destroyed at the end of // this scope when it does not register itself anywhere. // Typically it will add itself as ConfigurationChangeListener // at the configuration controller.
sd::framework::PresentationFactory::install(mxController);
} catch (Exception&)
{
SAL_WARN("sd.fwk", "ERROR in ModuleController::InstantiateStartupServices");
}
}
void SAL_CALL ModuleController::requestResource (const OUString& rsResourceURL)
{ auto iFactory = maResourceToFactoryMap.find(rsResourceURL); if (iFactory == maResourceToFactoryMap.end()) return;
// Check that the factory has already been loaded and not been // destroyed in the meantime.
Reference<XInterface> xFactory; auto iLoadedFactory = maLoadedFactories.find(iFactory->second); if (iLoadedFactory != maLoadedFactories.end())
xFactory.set(iLoadedFactory->second, UNO_QUERY); if ( xFactory.is()) return;
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.