| SidebarFactory.hxx (7a32b0c8) | SidebarFactory.hxx (02c50d82) |
|---|---|
| 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 14 unchanged lines hidden (view full) --- 23#define SD_SIDEBAR_FACTORY_HXX 24 25#include <cppuhelper/compbase4.hxx> 26#include <cppuhelper/basemutex.hxx> 27#include <rtl/ref.hxx> 28#include "framework/Pane.hxx" 29 30#include <com/sun/star/ui/XUIElementFactory.hpp> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 14 unchanged lines hidden (view full) --- 23#define SD_SIDEBAR_FACTORY_HXX 24 25#include <cppuhelper/compbase4.hxx> 26#include <cppuhelper/basemutex.hxx> 27#include <rtl/ref.hxx> 28#include "framework/Pane.hxx" 29 30#include <com/sun/star/ui/XUIElementFactory.hpp> |
| 31#include <com/sun/star/drawing/framework/XResourceFactory.hpp> 32#include <com/sun/star/drawing/framework/XConfigurationController.hpp> | |
| 33#include <com/sun/star/uno/XComponentContext.hpp> 34#include <com/sun/star/lang/XInitialization.hpp> 35 36#include <map> 37#include <boost/noncopyable.hpp> 38#include <boost/shared_ptr.hpp> 39 40 41namespace css = ::com::sun::star; 42namespace cssu = ::com::sun::star::uno; | 31#include <com/sun/star/uno/XComponentContext.hpp> 32#include <com/sun/star/lang/XInitialization.hpp> 33 34#include <map> 35#include <boost/noncopyable.hpp> 36#include <boost/shared_ptr.hpp> 37 38 39namespace css = ::com::sun::star; 40namespace cssu = ::com::sun::star::uno; |
| 43namespace cssdf = ::com::sun::star::drawing::framework; | |
| 44 45 46namespace sd { 47 class ViewShellBase; 48} 49 50namespace sd { namespace sidebar { 51 52namespace 53{ | 41 42 43namespace sd { 44 class ViewShellBase; 45} 46 47namespace sd { namespace sidebar { 48 49namespace 50{ |
| 54 typedef ::cppu::WeakComponentImplHelper4 < | 51 typedef ::cppu::WeakComponentImplHelper3 < |
| 55 css::lang::XInitialization, 56 css::ui::XUIElementFactory, | 52 css::lang::XInitialization, 53 css::ui::XUIElementFactory, |
| 57 cssdf::XResourceFactory, | |
| 58 css::lang::XEventListener 59 > SidebarFactoryInterfaceBase; 60} 61 62 63/** This factory creates both XUIElements (for sidebar panels) and 64 a drawing framework pane. 65 --- 41 unchanged lines hidden (view full) --- 107 const ::rtl::OUString& rsResourceURL, 108 const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) 109 throw( 110 css::container::NoSuchElementException, 111 css::lang::IllegalArgumentException, 112 cssu::RuntimeException); 113 114 | 54 css::lang::XEventListener 55 > SidebarFactoryInterfaceBase; 56} 57 58 59/** This factory creates both XUIElements (for sidebar panels) and 60 a drawing framework pane. 61 --- 41 unchanged lines hidden (view full) --- 103 const ::rtl::OUString& rsResourceURL, 104 const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) 105 throw( 106 css::container::NoSuchElementException, 107 css::lang::IllegalArgumentException, 108 cssu::RuntimeException); 109 110 |
| 115 // XResourceFactory 116 117 virtual css::uno::Reference<cssdf::XResource> 118 SAL_CALL createResource ( 119 const css::uno::Reference<cssdf::XResourceId>& rxPaneId) 120 throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException); 121 virtual void SAL_CALL 122 releaseResource ( 123 const css::uno::Reference<cssdf::XResource>& rxPane) 124 throw (css::uno::RuntimeException); 125 126 | |
| 127 // XEventListener 128 129 virtual void SAL_CALL disposing (const ::css::lang::EventObject& rEvent) 130 throw(cssu::RuntimeException); | 111 // XEventListener 112 113 virtual void SAL_CALL disposing (const ::css::lang::EventObject& rEvent) 114 throw(cssu::RuntimeException); |
| 131 132private: 133 /** Due to the fact that this class is a factory for both 134 XUIElement and XResource objects, there are different 135 instantiations for the same XController although only one 136 would be really necessary. This map makes sure that the 137 different object have access to the same information. 138 */ 139 class Implementation; 140 typedef ::boost::shared_ptr<Implementation> SharedImplementation; 141 typedef ::std::map<cssu::Reference<css::frame::XController>,SharedImplementation> 142 ControllerToImplementationMap; 143 static ControllerToImplementationMap maControllerToImplementationMap; 144 SharedImplementation mpImplementation; 145 146 static SharedImplementation GetImplementationForController ( 147 const cssu::Reference<css::frame::XController>& rxController); | |
| 148}; 149 150 151} } // end of namespace sd::sidebar 152 153#endif | 115}; 116 117 118} } // end of namespace sd::sidebar 119 120#endif |