diff options
Diffstat (limited to 'framework')
81 files changed, 256 insertions, 345 deletions
diff --git a/framework/inc/classes/filtercachedata.hxx b/framework/inc/classes/filtercachedata.hxx index dcd449db0266..f92da9cae2d1 100644 --- a/framework/inc/classes/filtercachedata.hxx +++ b/framework/inc/classes/filtercachedata.hxx @@ -32,7 +32,7 @@ /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble with solaris headers ... */ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <iterator> @@ -470,7 +470,7 @@ struct ContentHandler // and could be used in a generic way //***************************************************************************************************************** template< class HashType > -class SetNodeHash : public ::std::hash_map< ::rtl::OUString , +class SetNodeHash : public ::boost::unordered_map< ::rtl::OUString , HashType , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > @@ -511,7 +511,7 @@ class SetNodeHash : public ::std::hash_map< ::rtl::OUString , // It's an optimism to find registered services faster! // The preferred hash maps file extensions to preferred types to find these ones faster. //***************************************************************************************************************** -class PerformanceHash : public ::std::hash_map< ::rtl::OUString , +class PerformanceHash : public ::boost::unordered_map< ::rtl::OUString , OUStringList , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/classes/sfxhelperfunctions.hxx b/framework/inc/classes/sfxhelperfunctions.hxx index 9b137520771c..a234b0bcad7b 100644 --- a/framework/inc/classes/sfxhelperfunctions.hxx +++ b/framework/inc/classes/sfxhelperfunctions.hxx @@ -36,39 +36,68 @@ #include <svtools/toolboxcontroller.hxx> #include <svtools/statusbarcontroller.hxx> -typedef svt::ToolboxController* ( *pfunc_setToolBoxControllerCreator)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL ); -typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const ::rtl::OUString& aCommandURL ); -typedef void ( *pfunc_getRefreshToolbars)( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); -typedef void ( *pfunc_createDockingWindow)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); -typedef bool ( *pfunc_isDockingWindowVisible)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); -typedef void ( *pfunc_activateToolPanel)( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ); +typedef svt::ToolboxController* ( *pfunc_setToolBoxControllerCreator)( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + ToolBox* pToolbox, + unsigned short nID, + const ::rtl::OUString& aCommandURL ); + +typedef svt::StatusbarController* ( *pfunc_setStatusBarControllerCreator)( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + StatusBar* pStatusBar, + unsigned short nID, + const ::rtl::OUString& aCommandURL ); + +typedef void ( *pfunc_getRefreshToolbars)( + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); + +typedef void ( *pfunc_createDockingWindow)( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::rtl::OUString& rResourceURL ); + +typedef bool ( *pfunc_isDockingWindowVisible)( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::rtl::OUString& rResourceURL ); + +typedef void ( *pfunc_activateToolPanel)( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, + const ::rtl::OUString& i_rPanelURL ); + namespace framework { - pfunc_setToolBoxControllerCreator SAL_CALL SetToolBoxControllerCreator( pfunc_setToolBoxControllerCreator pSetToolBoxControllerCreator ); - -svt::ToolboxController* SAL_CALL CreateToolBoxController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL ); +svt::ToolboxController* SAL_CALL CreateToolBoxController( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + ToolBox* pToolbox, + unsigned short nID, + const ::rtl::OUString& aCommandURL ); pfunc_setStatusBarControllerCreator SAL_CALL SetStatusBarControllerCreator( pfunc_setStatusBarControllerCreator pSetStatusBarControllerCreator ); - -svt::StatusbarController* SAL_CALL CreateStatusBarController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const ::rtl::OUString& aCommandURL ); +svt::StatusbarController* SAL_CALL CreateStatusBarController( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + StatusBar* pStatusBar, + unsigned short nID, + const ::rtl::OUString& aCommandURL ); pfunc_getRefreshToolbars SAL_CALL SetRefreshToolbars( pfunc_getRefreshToolbars pRefreshToolbarsFunc ); - -void SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); +void SAL_CALL RefreshToolbars( + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); pfunc_createDockingWindow SAL_CALL SetDockingWindowCreator( pfunc_createDockingWindow pCreateDockingWindow ); - -void SAL_CALL CreateDockingWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); +void SAL_CALL CreateDockingWindow( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::rtl::OUString& rResourceURL ); pfunc_isDockingWindowVisible SAL_CALL SetIsDockingWindowVisible( pfunc_isDockingWindowVisible pIsDockingWindowVisible ); - -bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& rResourceURL ); +bool SAL_CALL IsDockingWindowVisible( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::rtl::OUString& rResourceURL ); pfunc_activateToolPanel SAL_CALL SetActivateToolPanel( pfunc_activateToolPanel i_pActivator ); - -void SAL_CALL ActivateToolPanel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, const ::rtl::OUString& i_rPanelURL ); +void SAL_CALL ActivateToolPanel( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame, + const ::rtl::OUString& i_rPanelURL ); } #endif // __FRAMEWORK_CLASSES_SFXHELPERFUNCTIONS_HXX_ diff --git a/framework/inc/dispatch/oxt_handler.hxx b/framework/inc/dispatch/oxt_handler.hxx index 446ed493c7e7..671af774107c 100644 --- a/framework/inc/dispatch/oxt_handler.hxx +++ b/framework/inc/dispatch/oxt_handler.hxx @@ -32,49 +32,31 @@ //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ - #include <threadhelp/threadhelpbase.hxx> - #include <threadhelp/resetableguard.hxx> - #include <macros/xinterface.hxx> - #include <macros/xtypeprovider.hxx> - #include <macros/xserviceinfo.hxx> - #include <macros/debug.hxx> - #include <macros/generic.hxx> - #include <general.h> - #include <stdtypes.h> //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ - #include <com/sun/star/lang/XTypeProvider.hpp> - #include <com/sun/star/lang/XMultiServiceFactory.hpp> - #include <com/sun/star/frame/XNotifyingDispatch.hpp> - #include <com/sun/star/frame/XStatusListener.hpp> - #include <com/sun/star/frame/XFrame.hpp> - #include <com/sun/star/document/XExtendedFilterDetection.hpp> - #include <com/sun/star/beans/PropertyValue.hpp> - #include <com/sun/star/util/URL.hpp> //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ - #include <cppuhelper/weak.hxx> //_________________________________________________________________________________________________________________ diff --git a/framework/inc/helper/titlehelper.hxx b/framework/inc/helper/titlehelper.hxx index 1a61422466df..f9bd3f089e9c 100644 --- a/framework/inc/helper/titlehelper.hxx +++ b/framework/inc/helper/titlehelper.hxx @@ -51,7 +51,7 @@ #include <rtl/ustrbuf.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> //_______________________________________________ // namespace diff --git a/framework/inc/pch/precompiled_framework.hxx b/framework/inc/pch/precompiled_framework.hxx index 8d7979bc2649..7a7a58fccde4 100644 --- a/framework/inc/pch/precompiled_framework.hxx +++ b/framework/inc/pch/precompiled_framework.hxx @@ -360,7 +360,7 @@ #include "rtl/instance.hxx" #include "rtl/logfile.hxx" #include "rtl/random.h" -#include "rtl.ref.hxx" +#include "rtl/ref.hxx" #include "rtl/strbuf.hxx" #include "rtl/string.h" #include "rtl/string.hxx" @@ -370,7 +370,6 @@ #include "rtl/ustring.hxx" #include "sal/alloca.h" -#include "sal/main.h" #include "salhelper/simplereferenceobject.hxx" #include "salhelper/singletonref.hxx" diff --git a/framework/inc/services/frame.hxx b/framework/inc/services/frame.hxx index fc559880107e..7edb072493b9 100644 --- a/framework/inc/services/frame.hxx +++ b/framework/inc/services/frame.hxx @@ -105,6 +105,8 @@ enum EActiveState E_FOCUS // I have the focus now. I must a member of an active path! }; +class WindowCommandDispatch; + //_________________________________________________________________________________________________________________ // exported definitions //_________________________________________________________________________________________________________________ @@ -438,6 +440,8 @@ class Frame : // interfaces css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper ; css::uno::Reference< css::frame::XTitle > m_xTitleHelper ; + WindowCommandDispatch* m_pWindowCommandDispatch ; + protected: FrameContainer m_aChildFrameContainer ; /// array of child frames diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx index e575ff7ee469..be65a5e54041 100644 --- a/framework/inc/services/substitutepathvars.hxx +++ b/framework/inc/services/substitutepathvars.hxx @@ -34,7 +34,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -110,7 +110,7 @@ struct SubstitutePathNotify const com::sun::star::uno::Sequence<rtl::OUString> aPropertyNames; }; -class SubstituteVariables : public ::std::hash_map< ::rtl::OUString, +class SubstituteVariables : public ::boost::unordered_map< ::rtl::OUString, SubstituteRule, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > @@ -277,7 +277,7 @@ class SubstitutePathVariables : private ThreadHelpBase throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); private: - class VarNameToIndexMap : public std::hash_map< ::rtl::OUString, + class VarNameToIndexMap : public boost::unordered_map< ::rtl::OUString, PreDefVariable, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/services/tabwindowservice.hxx b/framework/inc/services/tabwindowservice.hxx index 21977c666aef..2c5f6968d726 100644 --- a/framework/inc/services/tabwindowservice.hxx +++ b/framework/inc/services/tabwindowservice.hxx @@ -104,7 +104,7 @@ struct TTabPageInfo css::uno::Sequence< css::beans::NamedValue > m_lProperties; }; -typedef ::std::hash_map< ::sal_Int32 , +typedef ::boost::unordered_map< ::sal_Int32 , TTabPageInfo , Int32HashCode , ::std::equal_to< ::sal_Int32 > > TTabPageInfoHash; diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h index 432744e1dea6..83754a884c28 100644 --- a/framework/inc/stdtypes.h +++ b/framework/inc/stdtypes.h @@ -31,7 +31,7 @@ #include <vector> #include <queue> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // own includes @@ -162,12 +162,12 @@ typedef ::std::queue< ::rtl::OUString > OUStringQueue; //_________________________________________________________________________________________________________________ /** - Basic hash based on a std::hash_map() which provides key=[OUString] and value=[template type] pairs + Basic hash based on a boost::unordered_map() which provides key=[OUString] and value=[template type] pairs It implements some additional funtionality which can be usefull but is missing at the normal hash implementation. */ template< class TType > -class BaseHash : public ::std::hash_map< ::rtl::OUString , +class BaseHash : public ::boost::unordered_map< ::rtl::OUString , TType , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/uiconfiguration/globalsettings.hxx b/framework/inc/uiconfiguration/globalsettings.hxx index ec0ca269c966..77489515b822 100644 --- a/framework/inc/uiconfiguration/globalsettings.hxx +++ b/framework/inc/uiconfiguration/globalsettings.hxx @@ -34,7 +34,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes diff --git a/framework/inc/uiconfiguration/imagemanager.hxx b/framework/inc/uiconfiguration/imagemanager.hxx index 1b5a653dbc93..1719070aa038 100644 --- a/framework/inc/uiconfiguration/imagemanager.hxx +++ b/framework/inc/uiconfiguration/imagemanager.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <memory> //_________________________________________________________________________________________________________________ diff --git a/framework/inc/uiconfiguration/imagetype.hxx b/framework/inc/uiconfiguration/imagetype.hxx index 4c2b2b687321..7d0a31cb2e44 100644 --- a/framework/inc/uiconfiguration/imagetype.hxx +++ b/framework/inc/uiconfiguration/imagetype.hxx @@ -29,7 +29,7 @@ #ifndef __FRAMEWORK_UICONFIGURATION_IMAGETYPE_HXX_ #define __FRAMEWORK_UICONFIGURATION_IMAGETYPE_HXX_ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <rtl/ustring.hxx> namespace framework @@ -42,11 +42,11 @@ enum ImageType ImageType_COUNT }; -typedef std::hash_map< rtl::OUString, +typedef boost::unordered_map< rtl::OUString, rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > CommandToImageNameMap; -typedef std::hash_map< rtl::OUString, +typedef boost::unordered_map< rtl::OUString, bool, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > CommandMap; diff --git a/framework/inc/uiconfiguration/moduleimagemanager.hxx b/framework/inc/uiconfiguration/moduleimagemanager.hxx index 1a0657771839..97d8446875e6 100644 --- a/framework/inc/uiconfiguration/moduleimagemanager.hxx +++ b/framework/inc/uiconfiguration/moduleimagemanager.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <memory> //_________________________________________________________________________________________________________________ diff --git a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx b/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx index 94c3a06c8452..26c3347f9a80 100644 --- a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx +++ b/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -98,7 +98,7 @@ namespace framework throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); private: - typedef ::std::hash_map< rtl::OUString, com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >, OUStringHashCode, ::std::equal_to< rtl::OUString > > ModuleToModuleCfgMgr; + typedef ::boost::unordered_map< rtl::OUString, com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager >, OUStringHashCode, ::std::equal_to< rtl::OUString > > ModuleToModuleCfgMgr; //TODO_AS void impl_initStorages(); diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx index 9b7a95c65b44..86be656196d1 100644 --- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx +++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -169,7 +169,7 @@ namespace framework struct UIElementType; friend struct UIElementType; - typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; struct UIElementType { @@ -189,7 +189,7 @@ namespace framework typedef ::std::vector< UIElementType > UIElementTypesVector; typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; - typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; // private methods void impl_Initialize(); diff --git a/framework/inc/uiconfiguration/uicategorydescription.hxx b/framework/inc/uiconfiguration/uicategorydescription.hxx index 1310ffb1f43e..822b0c8a6ae4 100644 --- a/framework/inc/uiconfiguration/uicategorydescription.hxx +++ b/framework/inc/uiconfiguration/uicategorydescription.hxx @@ -34,7 +34,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx index 9c497b0af41f..ccb2eaeaeb0d 100644 --- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx +++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -155,7 +155,7 @@ namespace framework struct UIElementType; friend struct UIElementType; - typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; struct UIElementType { @@ -175,7 +175,7 @@ namespace framework typedef ::std::vector< UIElementType > UIElementTypesVector; typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; - typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; // private methods void impl_Initialize(); diff --git a/framework/inc/uiconfiguration/windowstateconfiguration.hxx b/framework/inc/uiconfiguration/windowstateconfiguration.hxx index ce491064e385..6ddee64905e4 100644 --- a/framework/inc/uiconfiguration/windowstateconfiguration.hxx +++ b/framework/inc/uiconfiguration/windowstateconfiguration.hxx @@ -34,7 +34,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -109,12 +109,12 @@ class WindowStateConfiguration : private ThreadHelpBase virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException); - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ModuleToWindowStateFileMap; - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ModuleToWindowStateConfigHashMap; diff --git a/framework/inc/uielement/controlmenucontroller.hxx b/framework/inc/uielement/controlmenucontroller.hxx index 9d307bba4af5..3f877f3bafc6 100644 --- a/framework/inc/uielement/controlmenucontroller.hxx +++ b/framework/inc/uielement/controlmenucontroller.hxx @@ -91,7 +91,7 @@ namespace framework virtual void impl_setPopupMenu(); virtual void impl_select(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& _xDispatch,const ::com::sun::star::util::URL& aURL); - class UrlToDispatchMap : public ::std::hash_map< ::rtl::OUString, + class UrlToDispatchMap : public ::boost::unordered_map< ::rtl::OUString, com::sun::star::uno::Reference< com::sun::star::frame::XDispatch >, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index bc9c422dd24d..ba444052f8d1 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -83,7 +83,7 @@ struct PopupControllerEntry ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XDispatchProvider > m_xDispatchProvider; }; -typedef std::hash_map< rtl::OUString, PopupControllerEntry, OUStringHashCode, ::std::equal_to< rtl::OUString > > PopupControllerCache; +typedef boost::unordered_map< rtl::OUString, PopupControllerEntry, OUStringHashCode, ::std::equal_to< rtl::OUString > > PopupControllerCache; class BmkMenu; class AddonMenu; diff --git a/framework/inc/uielement/menubarwrapper.hxx b/framework/inc/uielement/menubarwrapper.hxx index 847971c8f586..81fcb23deed2 100644 --- a/framework/inc/uielement/menubarwrapper.hxx +++ b/framework/inc/uielement/menubarwrapper.hxx @@ -49,7 +49,7 @@ // other includes //_________________________________________________________________________________________________________________ -#include <hash_map> +#include <boost/unordered_map.hpp> namespace framework { diff --git a/framework/inc/uielement/newmenucontroller.hxx b/framework/inc/uielement/newmenucontroller.hxx index e89002ff19ae..f3c7b1b926ea 100644 --- a/framework/inc/uielement/newmenucontroller.hxx +++ b/framework/inc/uielement/newmenucontroller.hxx @@ -60,7 +60,7 @@ #include <rtl/ustring.hxx> #include <vcl/accel.hxx> #include <vcl/menu.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> namespace framework { @@ -105,7 +105,7 @@ namespace framework rtl::OUString aImageId; }; - typedef ::std::hash_map< int, AddInfo > AddInfoForId; + typedef ::boost::unordered_map< int, AddInfo > AddInfoForId; void fillPopupMenu( com::sun::star::uno::Reference< com::sun::star::awt::XPopupMenu >& rPopupMenu ); void retrieveShortcutsFromConfiguration( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration >& rAccelCfg, diff --git a/framework/inc/uielement/simpletextstatusbarcontroller.hxx b/framework/inc/uielement/simpletextstatusbarcontroller.hxx index 5285e0fa92a7..1b538390aa15 100644 --- a/framework/inc/uielement/simpletextstatusbarcontroller.hxx +++ b/framework/inc/uielement/simpletextstatusbarcontroller.hxx @@ -35,7 +35,7 @@ #include <macros/xserviceinfo.hxx> #include <stdtypes.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <svtools/statusbarcontroller.hxx> #include <vcl/image.hxx> diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 0fbd7b6d3e6b..d42c40ad9eb7 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -209,11 +209,11 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener bool RetrieveShortcut( const rtl::OUString& rCommandURL, rtl::OUString& rShortCut ); protected: - typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap; + typedef ::boost::unordered_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener > > ToolBarControllerMap; typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XSubToolbarController > > SubToolBarControllerVector; typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap; - typedef ::std::hash_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > > MenuDescriptionMap; + typedef ::boost::unordered_map< sal_uInt16, ::com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > > MenuDescriptionMap; sal_Bool m_bDisposed : 1, m_bSmallSymbols : 1, m_bModuleIdentified : 1, diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index 3ebbe7d0c343..65eb2b724bfd 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -34,7 +34,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -90,12 +90,12 @@ private: throw (::com::sun::star::uno::RuntimeException); public: - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ModuleToCommandFileMap; - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > UICommandsHashMap; diff --git a/framework/inc/uifactory/factoryconfiguration.hxx b/framework/inc/uifactory/factoryconfiguration.hxx index d3943014ecbb..46ff30b544d0 100644 --- a/framework/inc/uifactory/factoryconfiguration.hxx +++ b/framework/inc/uifactory/factoryconfiguration.hxx @@ -95,7 +95,7 @@ private: ControllerInfo(const ::rtl::OUString& _aImplementationName,const ::rtl::OUString& _aValue) : m_aImplementationName(_aImplementationName),m_aValue(_aValue){} ControllerInfo(){} }; - class MenuControllerMap : public std::hash_map< rtl::OUString, + class MenuControllerMap : public boost::unordered_map< rtl::OUString, ControllerInfo, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/uifactory/uielementfactorymanager.hxx b/framework/inc/uifactory/uielementfactorymanager.hxx index 6be5da8fcb97..8c7d1a02f436 100644 --- a/framework/inc/uifactory/uielementfactorymanager.hxx +++ b/framework/inc/uifactory/uielementfactorymanager.hxx @@ -91,7 +91,7 @@ namespace framework virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); private: - class FactoryManagerMap : public std::hash_map< rtl::OUString, + class FactoryManagerMap : public boost::unordered_map< rtl::OUString, rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/xml/eventsdocumenthandler.hxx b/framework/inc/xml/eventsdocumenthandler.hxx index c335c525e64e..607d3c2fca60 100644 --- a/framework/inc/xml/eventsdocumenthandler.hxx +++ b/framework/inc/xml/eventsdocumenthandler.hxx @@ -44,7 +44,7 @@ #include <rtl/ustring.hxx> #include <cppuhelper/implbase1.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -126,7 +126,7 @@ class OReadEventsDocumentHandler : private ThreadHelpBase, // Struct for right private: ::rtl::OUString getErrorLineString(); - class EventsHashMap : public ::std::hash_map< ::rtl::OUString , + class EventsHashMap : public ::boost::unordered_map< ::rtl::OUString , Events_XML_Entry , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/xml/imagesdocumenthandler.hxx b/framework/inc/xml/imagesdocumenthandler.hxx index 609d88413d80..6f73b52207af 100644 --- a/framework/inc/xml/imagesdocumenthandler.hxx +++ b/framework/inc/xml/imagesdocumenthandler.hxx @@ -43,7 +43,7 @@ #include <rtl/ustring.hxx> #include <cppuhelper/implbase1.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -127,7 +127,7 @@ class OReadImagesDocumentHandler : private ThreadHelpBase, // Struct for right private: ::rtl::OUString getErrorLineString(); - class ImageHashMap : public ::std::hash_map< ::rtl::OUString , + class ImageHashMap : public ::boost::unordered_map< ::rtl::OUString , Image_XML_Entry , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/xml/statusbardocumenthandler.hxx b/framework/inc/xml/statusbardocumenthandler.hxx index e6330e6eecdd..bec28624593b 100644 --- a/framework/inc/xml/statusbardocumenthandler.hxx +++ b/framework/inc/xml/statusbardocumenthandler.hxx @@ -44,7 +44,7 @@ #include <rtl/ustring.hxx> #include <cppuhelper/implbase1.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <stdtypes.h> //_________________________________________________________________________________________________________________ @@ -125,7 +125,7 @@ class OReadStatusBarDocumentHandler : private ThreadHelpBase, // Struct for ri private: ::rtl::OUString getErrorLineString(); - class StatusBarHashMap : public ::std::hash_map< ::rtl::OUString , + class StatusBarHashMap : public ::boost::unordered_map< ::rtl::OUString , StatusBar_XML_Entry , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/inc/xml/toolboxdocumenthandler.hxx b/framework/inc/xml/toolboxdocumenthandler.hxx index c298ecdd4f72..e23935047d1b 100644 --- a/framework/inc/xml/toolboxdocumenthandler.hxx +++ b/framework/inc/xml/toolboxdocumenthandler.hxx @@ -129,7 +129,7 @@ class OReadToolBoxDocumentHandler : private ThreadHelpBase, // Struct for right private: ::rtl::OUString getErrorLineString(); - class ToolBoxHashMap : public ::std::hash_map< ::rtl::OUString , + class ToolBoxHashMap : public ::boost::unordered_map< ::rtl::OUString , ToolBox_XML_Entry , OUStringHashCode , ::std::equal_to< ::rtl::OUString > > diff --git a/framework/qa/complex/ModuleManager/makefile.mk b/framework/qa/complex/ModuleManager/makefile.mk index bcef75fca4ef..ec11ef5030de 100644 --- a/framework/qa/complex/ModuleManager/makefile.mk +++ b/framework/qa/complex/ModuleManager/makefile.mk @@ -30,6 +30,7 @@ PRJNAME = $(TARGET) PACKAGE = complex$/ModuleManager # --- Settings ----------------------------------------------------- + .INCLUDE: settings.mk #----- compile .java files ----------------------------------------- diff --git a/framework/qa/complex/accelerators/makefile.mk b/framework/qa/complex/accelerators/makefile.mk index 3af496191d4f..034287fbb57e 100644 --- a/framework/qa/complex/accelerators/makefile.mk +++ b/framework/qa/complex/accelerators/makefile.mk @@ -31,6 +31,7 @@ PRJNAME = $(TARGET) PACKAGE = complex$/accelerators # --- Settings ----------------------------------------------------- + .INCLUDE: settings.mk #----- compile .java files ----------------------------------------- diff --git a/framework/qa/complex/framework/recovery/makefile.mk b/framework/qa/complex/framework/recovery/makefile.mk index 4a9f80b4b2a5..34155753e873 100755 --- a/framework/qa/complex/framework/recovery/makefile.mk +++ b/framework/qa/complex/framework/recovery/makefile.mk @@ -31,8 +31,8 @@ PRJNAME = framework PACKAGE = complex$/framework$/recovery # --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk +.INCLUDE: settings.mk #----- compile .java files ----------------------------------------- @@ -74,8 +74,6 @@ MYTAR: ALLTAR CT_APPEXECCOMMAND = .ELSE CT_APPEXECCOMMAND = -cmd "$(cmd)" -#CT_APPEXECCOMMAND = -AppExecutionCommand \ -# "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" .ENDIF # test base is java complex @@ -93,11 +91,6 @@ CT_NOOFFICE = -NoOffice true .INCLUDE : target.mk RUN: run -# muss noch angepasst werden: es soll auf -AppExecutionCommand und -NoOffice gepr??ft werden -#.IF "$(OFFICE)" == "" -#run: -# @echo Exit -#.ELSE run: +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_NOOFFICE) $(CT_PACKAGE).RecoveryTest diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index cd99a2ddf2eb..d79c1383d20a 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -58,27 +58,16 @@ //_______________________________________________ // other includes #include <vcl/svapp.hxx> - #include <com/sun/star/container/XNamed.hpp> - #include <com/sun/star/container/XNameContainer.hpp> - #include <com/sun/star/awt/KeyEvent.hpp> - #include <com/sun/star/awt/KeyModifier.hpp> - #include <com/sun/star/lang/XSingleServiceFactory.hpp> - #include <com/sun/star/util/XChangesNotifier.hpp> - #include <comphelper/configurationhelper.hxx> - #include <unotools/configpathes.hxx> - #include <rtl/logfile.hxx> - #include <svtools/acceleratorexecute.hxx> - #include <stdio.h> //_______________________________________________ diff --git a/framework/source/classes/addonsoptions.cxx b/framework/source/classes/addonsoptions.cxx index ae1a7553f28a..f0ebee73d4b5 100644 --- a/framework/source/classes/addonsoptions.cxx +++ b/framework/source/classes/addonsoptions.cxx @@ -50,7 +50,7 @@ #include <vcl/graph.hxx> #include <svtools/filter.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <algorithm> #include <vector> @@ -297,10 +297,10 @@ class AddonsOptions_Impl : public ConfigItem Image aImageBigNoScale; }; - typedef std::hash_map< ::rtl::OUString, ImageEntry, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ImageManager; - typedef std::hash_map< ::rtl::OUString, sal_uInt32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > StringToIndexMap; + typedef boost::unordered_map< ::rtl::OUString, ImageEntry, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ImageManager; + typedef boost::unordered_map< ::rtl::OUString, sal_uInt32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > StringToIndexMap; typedef std::vector< Sequence< Sequence< PropertyValue > > > AddonToolBars; - typedef ::std::hash_map< ::rtl::OUString, MergeToolbarInstructionContainer, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ToolbarMergingInstructions; + typedef ::boost::unordered_map< ::rtl::OUString, MergeToolbarInstructionContainer, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ToolbarMergingInstructions; enum ImageSize { @@ -502,7 +502,7 @@ void AddonsOptions_Impl::Notify( const Sequence< ::rtl::OUString >& /*lPropertyN //***************************************************************************************************************** void AddonsOptions_Impl::Commit() { - DBG_ERROR( "AddonsOptions_Impl::Commit()\nNot implemented yet!\n" ); + OSL_FAIL( "AddonsOptions_Impl::Commit()\nNot implemented yet!\n" ); } //***************************************************************************************************************** diff --git a/framework/source/classes/fwkresid.cxx b/framework/source/classes/fwkresid.cxx index a5c701c7838a..60c00e2b0e0b 100644 --- a/framework/source/classes/fwkresid.cxx +++ b/framework/source/classes/fwkresid.cxx @@ -45,11 +45,8 @@ ResMgr* FwkResId::GetResManager() if ( !pResMgr ) { - rtl::OStringBuffer aBuf( 32 ); - aBuf.append( "fwe" ); - SolarMutexGuard aSolarGuard; - pResMgr = ResMgr::CreateResMgr( aBuf.getStr() ); + pResMgr = ResMgr::CreateResMgr("fwe"); } return pResMgr; diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index 245a9f3de7ba..8d42a46655b2 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -194,8 +194,7 @@ void FwkTabPage::Resize() { if ( m_xPage.is () ) { - Size aSize = GetSizePixel (); - Point aPos = GetPosPixel (); + Size aSize = GetSizePixel(); m_xPage->setPosSize( 0, 0, aSize.Width()-1 , aSize.Height()-1, awt::PosSize::POSSIZE ); } diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx index 27a5485c4484..4527826e6daf 100644 --- a/framework/source/classes/fwlresid.cxx +++ b/framework/source/classes/fwlresid.cxx @@ -45,11 +45,8 @@ ResMgr* FwlResId::GetResManager() if ( !pResMgr ) { - rtl::OStringBuffer aBuf( 32 ); - aBuf.append( "fwe" ); - SolarMutexGuard aSolarGuard; - pResMgr = ResMgr::CreateResMgr( aBuf.getStr() ); + pResMgr = ResMgr::CreateResMgr("fwe"); } return pResMgr; diff --git a/framework/source/classes/propertysethelper.cxx b/framework/source/classes/propertysethelper.cxx index 0eca64e60746..68f190a95f44 100644 --- a/framework/source/classes/propertysethelper.cxx +++ b/framework/source/classes/propertysethelper.cxx @@ -291,13 +291,8 @@ css::uno::Any SAL_CALL PropertySetHelper::getPropertyValue(const ::rtl::OUString css::beans::Property aPropInfo = pIt->second; - sal_Bool bLocked = sal_True; if (m_bReleaseLockOnCall) - { aReadLock.unlock(); - bLocked = sal_False; - // <- SAFE - } return impl_getPropertyValue(aPropInfo.Name, aPropInfo.Handle); } diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index 3f354d438879..1dd9e130efee 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -53,8 +53,6 @@ String STR_UPDATEDOC String STR_CLOSEDOC_ANDRETURN { - /* ### ACHTUNG: Neuer Text in Resource? S~chlieen & zur ck zu : S~chlieen & zurck zu */ - /* ### ACHTUNG: Neuer Text in Resource? S~chlie en & zur ck zu : S~chlieen & zurck zu */ Text [ en-US ] = "~Close & Return to " ; }; diff --git a/framework/source/classes/sfxhelperfunctions.cxx b/framework/source/classes/sfxhelperfunctions.cxx index d47050d831cf..ca08db178add 100644 --- a/framework/source/classes/sfxhelperfunctions.cxx +++ b/framework/source/classes/sfxhelperfunctions.cxx @@ -153,8 +153,8 @@ bool SAL_CALL IsDockingWindowVisible( const ::com::sun::star::uno::Reference< :: pCall = pIsDockingWindowVisible; } - if ( pIsDockingWindowVisible ) - return (*pIsDockingWindowVisible)( rFrame, rResourceURL ); + if ( pCall ) + return (*pCall)( rFrame, rResourceURL ); else return false; } diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx index 09efdb3e8ae6..459496fd300e 100644 --- a/framework/source/dispatch/windowcommanddispatch.cxx +++ b/framework/source/dispatch/windowcommanddispatch.cxx @@ -82,30 +82,20 @@ WindowCommandDispatch::WindowCommandDispatch(const css::uno::Reference< css::lan //----------------------------------------------- WindowCommandDispatch::~WindowCommandDispatch() { + impl_stopListening(); m_xSMGR.clear(); } //----------------------------------------------- -void SAL_CALL WindowCommandDispatch::disposing(const css::lang::EventObject& /*aSource*/) - throw (css::uno::RuntimeException) -{ - // We hold our window weak ... so there is no need to clear it's reference here. - // The window and we will die by ref count automatically. -} - -//----------------------------------------------- void WindowCommandDispatch::impl_startListening() { - // SYNCHRONIZED -> ReadGuard aReadLock(m_aLock); css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), css::uno::UNO_QUERY ); aReadLock.unlock(); - // <- SYNCHRONIZED if ( ! xWindow.is()) return; - // SYNCHRONIZED -> { SolarMutexGuard aSolarLock; @@ -115,9 +105,31 @@ void WindowCommandDispatch::impl_startListening() pWindow->AddEventListener( LINK(this, WindowCommandDispatch, impl_notifyCommand) ); } - // <- SYNCHRONIZED } +void WindowCommandDispatch::impl_stopListening() +{ + ReadGuard aReadLock(m_aLock); + css::uno::Reference< css::awt::XWindow > xWindow( m_xWindow.get(), css::uno::UNO_QUERY ); + aReadLock.unlock(); + + if (!xWindow.is()) + return; + + { + SolarMutexGuard aSolarLock; + + Window* pWindow = VCLUnoHelper::GetWindow(xWindow); + if (!pWindow) + return; + + pWindow->RemoveEventListener( LINK(this, WindowCommandDispatch, impl_notifyCommand) ); + + m_xWindow.clear(); + } +} + + //----------------------------------------------- IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam) { @@ -125,6 +137,11 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam) return 0L; const VclWindowEvent* pEvent = (VclWindowEvent*)pParam; + if (pEvent->GetId() == VCLEVENT_OBJECT_DYING) + { + impl_stopListening(); + return 0L; + } if (pEvent->GetId() != VCLEVENT_WINDOW_COMMAND) return 0L; @@ -137,7 +154,7 @@ IMPL_LINK(WindowCommandDispatch, impl_notifyCommand, void*, pParam) return 0L; const int nCommand = pData->GetDialogId(); - ::rtl::OUString sCommand; + ::rtl::OUString sCommand; switch (nCommand) { diff --git a/framework/source/helper/actiontriggerhelper.cxx b/framework/source/helper/actiontriggerhelper.cxx index a5e0a1438a1e..e75b2609d26a 100644 --- a/framework/source/helper/actiontriggerhelper.cxx +++ b/framework/source/helper/actiontriggerhelper.cxx @@ -45,13 +45,14 @@ const USHORT START_ITEMID = 1000; -using namespace rtl; using namespace com::sun::star::awt; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::container; +using ::rtl::OUString; + namespace framework { @@ -138,7 +139,6 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta OUString aHelpURL; Reference< XBitmap > xBitmap; Reference< XIndexContainer > xSubContainer; - sal_Bool bSpecialItemId = sal_False; USHORT nNewItemId = nItemId++; GetMenuItemAttributes( xPropSet, aLabel, aCommandURL, aHelpURL, xBitmap, xSubContainer ); @@ -153,7 +153,6 @@ void InsertSubMenuItems( Menu* pSubMenu, USHORT& nItemId, Reference< XIndexConta // command url but uses the item id as a unqiue identifier. These entries // got a special url during conversion from menu=>actiontriggercontainer. // Now we have to extract this special url and set the correct item id!!! - bSpecialItemId = sal_True; nNewItemId = (USHORT)aCommandURL.copy( nIndex+aSlotURL.getLength() ).toInt32(); pSubMenu->InsertItem( nNewItemId, aLabel ); } diff --git a/framework/source/helper/propertysetcontainer.cxx b/framework/source/helper/propertysetcontainer.cxx index a21a634a9106..7e05bbf03d38 100644 --- a/framework/source/helper/propertysetcontainer.cxx +++ b/framework/source/helper/propertysetcontainer.cxx @@ -35,7 +35,7 @@ #define WRONG_TYPE_EXCEPTION "Only XPropertSet allowed!" -using namespace rtl; +using ::rtl::OUString; using namespace cppu; using namespace com::sun::star::uno; using namespace com::sun::star::container; diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index a7e61256f988..832c56b0d1e1 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -28,65 +28,41 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_framework.hxx" - #include <helper/titlebarupdate.hxx> //_________________________________________________________________________________________________________________ // my own includes //_________________________________________________________________________________________________________________ - #include <pattern/window.hxx> - #include <threadhelp/writeguard.hxx> - #include <threadhelp/readguard.hxx> - #include <macros/generic.hxx> - #include <services.h> - #include <properties.h> //_________________________________________________________________________________________________________________ // interface includes //_________________________________________________________________________________________________________________ - #include <com/sun/star/awt/XWindow.hpp> - #include <com/sun/star/lang/XServiceInfo.hpp> - #include <com/sun/star/lang/IllegalArgumentException.hpp> - #include <com/sun/star/frame/XModuleManager.hpp> - #include <com/sun/star/container/XNameAccess.hpp> - #include <com/sun/star/beans/XPropertySet.hpp> - #include <com/sun/star/beans/XMaterialHolder.hpp> - #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> - #include <com/sun/star/beans/NamedValue.hpp> //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ - #include <comphelper/sequenceashashmap.hxx> - #include <unotools/configmgr.hxx> - #include <unotools/bootstrap.hxx> - #include <vcl/window.hxx> - #include <vcl/syswin.hxx> - #include <toolkit/unohlp.hxx> - #include <vcl/svapp.hxx> - #include <vcl/wrkwin.hxx> //_________________________________________________________________________________________________________________ @@ -273,9 +249,6 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr ) { WorkWindow* pWorkWindow = (WorkWindow*)pWindow; -#ifdef COPY_TO_TITLE_FOR_DEBUG - pWorkWindow->SetText( sApplicationID ); -#endif pWorkWindow->SetApplicationID( sApplicationID ); } // <- VCL SYNCHRONIZED diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index b4be597c21c3..534a2533d20d 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -70,8 +70,7 @@ const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); const rtl::OUString UIELEMENT_PROPNAME_XMENUBAR( RTL_CONSTASCII_USTRINGPARAM( "XMenuBar" )); const rtl::OUString UIELEMENT_PROPNAME_NOCLOSE( RTL_CONSTASCII_USTRINGPARAM( "NoClose" )); - -using namespace rtl; +using ::rtl::OUString; using namespace com::sun::star::beans; using namespace com::sun::star::uno; using namespace com::sun::star::frame; diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 87c730b69eb3..bb8226e746af 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -58,10 +58,10 @@ const rtl::OUString UIELEMENT_PROPNAME_RESOURCEURL( RTL_CONSTASCII_USTRINGPARAM( const rtl::OUString UIELEMENT_PROPNAME_TYPE( RTL_CONSTASCII_USTRINGPARAM( "Type" )); const rtl::OUString UIELEMENT_PROPNAME_FRAME( RTL_CONSTASCII_USTRINGPARAM( "Frame" )); -using namespace rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; +using ::rtl::OUString; namespace framework { diff --git a/framework/source/inc/accelerators/acceleratorcache.hxx b/framework/source/inc/accelerators/acceleratorcache.hxx index 8ac776b5c108..775288a9e7d1 100644 --- a/framework/source/inc/accelerators/acceleratorcache.hxx +++ b/framework/source/inc/accelerators/acceleratorcache.hxx @@ -79,7 +79,7 @@ class AcceleratorCache : public ThreadHelpBase // attention! Must be the first b /** TODO document me keys -> commands */ - typedef ::std::hash_map< css::awt::KeyEvent , + typedef ::boost::unordered_map< css::awt::KeyEvent , ::rtl::OUString , KeyEventHashCode , KeyEventEqualsFunc > TKey2Commands; diff --git a/framework/source/inc/accelerators/keymapping.hxx b/framework/source/inc/accelerators/keymapping.hxx index 5f05b7148ad4..722893094c6d 100644 --- a/framework/source/inc/accelerators/keymapping.hxx +++ b/framework/source/inc/accelerators/keymapping.hxx @@ -77,7 +77,7 @@ class KeyMapping //--------------------------------------- /** @short hash structure to map key codes to identifier. */ - typedef ::std::hash_map< sal_Int16 , + typedef ::boost::unordered_map< sal_Int16 , ::rtl::OUString , ShortHashCode , ::std::equal_to< sal_Int16 > > Code2IdentifierHash; diff --git a/framework/source/inc/accelerators/storageholder.hxx b/framework/source/inc/accelerators/storageholder.hxx index 2fcc37bf643c..8b8994cdc8f7 100644 --- a/framework/source/inc/accelerators/storageholder.hxx +++ b/framework/source/inc/accelerators/storageholder.hxx @@ -91,7 +91,7 @@ class StorageHolder : private ThreadHelpBase // attention! Must be the first bas }; /** @short TODO */ - typedef ::std::hash_map< ::rtl::OUString , + typedef ::boost::unordered_map< ::rtl::OUString , TStorageInfo , ::rtl::OUStringHash , ::std::equal_to< ::rtl::OUString > > TPath2StorageInfo; diff --git a/framework/source/inc/dispatch/windowcommanddispatch.hxx b/framework/source/inc/dispatch/windowcommanddispatch.hxx index 03aded6ad1ad..549c6d9e69ae 100644 --- a/framework/source/inc/dispatch/windowcommanddispatch.hxx +++ b/framework/source/inc/dispatch/windowcommanddispatch.hxx @@ -67,13 +67,12 @@ namespace css = ::com::sun::star; e.g. "Pereferences" or "About". These menu entries trigger hard coded commands. Here we map these commands to the right URLs and dispatch them. - This helper knows a frame and it's container window (where VCL provide the hard coded - commands). We hold those objects weak ... so there is no need to react for complex dispose/ing() + This helper knows a frame and its container window (where VCL provide the hard coded + commands). We hold those objects weak so there is no need to react for complex UNO dispose/ing() scenarios. On the other side VCL does not hold us alive (because it doesn't know our UNO reference). - So we register us at the XWindow as event listener also to be sure to live as long the XWindow/VCLWindow lives. + So we register at the VCL level as an event listener and */ class WindowCommandDispatch : private ThreadHelpBase - , public ::cppu::WeakImplHelper1< css::lang::XEventListener > { //___________________________________________ // const @@ -129,15 +128,6 @@ class WindowCommandDispatch : private ThreadHelpBase virtual ~WindowCommandDispatch(); //___________________________________________ - // uno interface - - public: - - // XEventListener - virtual void SAL_CALL disposing(const css::lang::EventObject& aSource) - throw (css::uno::RuntimeException); - - //___________________________________________ // implementation private: @@ -148,11 +138,15 @@ class WindowCommandDispatch : private ThreadHelpBase @descr Those listener connections will be created one times only (see ctor). Afterwards we listen for incoming events till our referred frame/window pair - will be closed. All objects die by refcount automatically. Because we hold - it weak ... + will be closed. */ void impl_startListening(); + /** @short drop all listener connections we need. + + */ + void impl_stopListening(); + //_______________________________________ /** @short callback from VCL to notify new commands diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 33adc3361448..8e5739732da7 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -130,13 +130,13 @@ bool lcl_checkUIElement(const Reference< XUIElement >& xUIElement,css::awt::Rect _rPosSize = _xWindow->getPosSize(); Window* pWindow = VCLUnoHelper::GetWindow( _xWindow ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ::Size aSize = ((ToolBox*)pWindow)->CalcWindowSizePixel( 1 ); _rPosSize.Width = aSize.Width(); _rPosSize.Height = aSize.Height(); } - } // if ( xUIElement.is() ) + } return bRet; } @@ -817,7 +817,7 @@ void LayoutManager::implts_createCustomToolBar( const rtl::OUString& aTbxResName if ( aTbxResName.getLength() > 0 ) { createElement( aTbxResName ); - if ( aTitle ) + if ( !aTitle.isEmpty() ) { Reference< XUIElement > xUIElement = getElement( aTbxResName ); if ( xUIElement.is() ) @@ -1007,9 +1007,9 @@ void LayoutManager::implts_createAddonsToolBars() // Set generic title for add-on toolbar SolarMutexGuard aGuard; Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow->GetText().Len() == 0 ) + if ( pWindow && pWindow->GetText().Len() == 0 ) pWindow->SetText( aGenericAddonTitle ); - if ( pWindow->GetType() == WINDOW_TOOLBOX ) + if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX ) { ToolBox* pToolbar = (ToolBox *)pWindow; pToolbar->SetMenuType(); @@ -3672,21 +3672,11 @@ throw (::com::sun::star::uno::RuntimeException) WriteGuard aWriteLock( m_aLock ); m_xFrame = xFrame; aWriteLock.unlock(); - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - // if ( xFrame.is() ) - // xFrame->getContainerWindow()->addWindowListener( Reference< css::awt::XWindowListener >( static_cast< OWeakObject* >( this ), UNO_QUERY )); } void SAL_CALL LayoutManager::reset() throw (RuntimeException) { - sal_Bool bComponentAttached( sal_False ); - - /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - ReadGuard aReadLock( m_aLock ); - bComponentAttached = m_bComponentAttached; - aReadLock.unlock(); - implts_reset( sal_True ); } @@ -4726,7 +4716,6 @@ throw (RuntimeException) RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::LayoutManager::hideElement" ); - sal_Bool bResult( sal_False ); sal_Bool bNotify( sal_False ); ::rtl::OUString aElementType; ::rtl::OUString aElementName; @@ -4755,7 +4744,6 @@ throw (RuntimeException) if ( pMenuBar ) { pMenuBar->SetDisplayable( sal_False ); - bResult = sal_True; bNotify = sal_True; } } @@ -4774,14 +4762,13 @@ throw (RuntimeException) implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement ); doLayout(); bNotify = sal_True; - bResult = sal_True; } } } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "progressbar" ) && aElementName.equalsIgnoreAsciiCaseAscii( "progressbar" )) { - bResult = bNotify = implts_hideProgressBar(); + bNotify = implts_hideProgressBar(); } else if ( aElementType.equalsIgnoreAsciiCaseAscii( "toolbar" )) { @@ -4806,7 +4793,6 @@ throw (RuntimeException) if ( xDockWindow.is() && !xDockWindow->isFloating() ) doLayout(); - bResult = sal_True; bNotify = sal_True; } // if ( xDockWindow.is() ) break; diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 1c862faf36bf..1dfa1b4cca56 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -283,7 +283,14 @@ Desktop::Desktop( const css::uno::Reference< css::lang::XMultiServiceFactory >& *//*-*************************************************************************************************************/ Desktop::~Desktop() { - LOG_ASSERT2( m_bIsTerminated ==sal_False, "Desktop::~Desktop()", "Who forgot to terminate the desktop service?" ) +#ifdef ENABLE_ASSERTIONS + // Perhaps we should here do use a real assertion, but make the + // condition more specific? We don't want it to fire in unit tests + // in sc/qa/unit for instance, that don't even have any GUI. + if( !m_bIsTerminated ) + fprintf( stderr, "This used to be an assertion failure: Desktop not terminated before being destructed,\n" + "but it is probably not a real problem.\n" ); +#endif LOG_ASSERT2( m_aTransactionManager.getWorkingMode()!=E_CLOSE , "Desktop::~Desktop()", "Who forgot to dispose this service?" ) } @@ -750,7 +757,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Desktop::queryDispatch( co if ( aURL.Protocol.equalsIgnoreAsciiCaseAsciiL( UNO_PROTOCOL, sizeof( UNO_PROTOCOL )-1 )) aCommand = aURL.Path; - // Make hash_map lookup if the current URL is in the disabled list + // Make boost::unordered_map lookup if the current URL is in the disabled list if ( m_aCommandOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, aCommand ) ) return css::uno::Reference< css::frame::XDispatch >(); else @@ -1178,8 +1185,14 @@ void SAL_CALL Desktop::dispose() { // Safe impossible cases // It's an programming error if dispose is called before terminate! - LOG_ASSERT2( m_bIsTerminated==sal_False, "Desktop::dispose()", "It's not allowed to dispose the desktop before terminate() is called!" ) + // But if you just ignore the assertion (which happens in unit + // tests for instance in sc/qa/unit) nothing bad happens. +#ifdef ENABLE_ASSERTIONS + if( !m_bIsTerminated ) + fprintf( stderr, "This used to be an assertion failure: Desktop disposed before terminating it,\n" + "but nothing bad seems to happen anyway?\n" ); +#endif SYNCHRONIZED_START WriteGuard aWriteLock( m_aLock ); diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 67adb5242c0c..e0caad6991eb 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -292,6 +292,7 @@ Frame::Frame( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFac , m_bSelfClose ( sal_False ) // Important! , m_bIsHidden ( sal_True ) , m_xTitleHelper ( ) + , m_pWindowCommandDispatch ( 0 ) , m_aChildFrameContainer ( ) { // Check incoming parameter to avoid against wrong initialization. @@ -622,8 +623,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >& impl_enablePropertySet(); - // create WindowCommandDispatch; it is supposed to release itself at frame destruction - (void)new WindowCommandDispatch(xSMGR, this); + m_pWindowCommandDispatch = new WindowCommandDispatch(xSMGR, this); // Initialize title functionality TitleHelper* pTitleHelper = new TitleHelper(xSMGR); @@ -1863,6 +1863,8 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException ) // We will die, die and die ... implts_stopWindowListening(); + delete m_pWindowCommandDispatch; + // Send message to all listener and forget her references. css::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); @@ -2087,7 +2089,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Frame::queryDispatch( cons if ( aURL.Protocol.equalsIgnoreAsciiCaseAsciiL( UNO_PROTOCOL, sizeof( UNO_PROTOCOL )-1 )) aCommand = aURL.Path; - // Make hash_map lookup if the current URL is in the disabled list + // Make boost::unordered_map lookup if the current URL is in the disabled list if ( m_aCommandOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED, aCommand ) ) return css::uno::Reference< css::frame::XDispatch >(); else diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 2a4dc8b9c31d..65363a5e29f2 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -268,10 +268,9 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na // determine the filename of the license to show ::rtl::OUString aLangString; ::com::sun::star::lang::Locale aLocale; - ::rtl::OString aMgrName = ::rtl::OString("fwe"); AllSettings aSettings(Application::GetSettings()); aLocale = aSettings.GetUILocale(); - ResMgr* pResMgr = ResMgr::SearchCreateResMgr(aMgrName, aLocale); + ResMgr* pResMgr = ResMgr::SearchCreateResMgr("fwe", aLocale); aLangString = aLocale.Language; if ( aLocale.Country.getLength() != 0 ) diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index 9a5d2a24a185..72a7e5bc2046 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -84,8 +84,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::beans; using namespace com::sun::star::container; -using namespace rtl; - +using ::rtl::OUString; +using ::rtl::OString; namespace framework{ //_______________________________________________ diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 22989307147a..9c881abbdc51 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -1188,9 +1188,9 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable if( aState == ::utl::Bootstrap::PATH_EXISTS ) { aPreDefPathVariables.m_FixedVar[ PREDEFVAR_USERPATH ] = ConvertOSLtoUCBURL( sVal ); } - else { - LOG_ERROR( "SubstitutePathVariables::SetPredefinedPathVariables", "Bootstrap code has no value for userpath"); - } + // We use to have a LOG_ERROR here in an else branch, but that + // always fired in some unit tests, and if you then just ignored + // it, nothing bad happened, so it seems fairly pointless. // Set $(inst), $(instpath), $(insturl) aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTURL ] = aPreDefPathVariables.m_FixedVar[ PREDEFVAR_INSTPATH ]; @@ -1222,10 +1222,11 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable rtl::OUString aLocaleStr; if ( utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( utl::ConfigManager::LOCALE ) >>= aLocaleStr ) aPreDefPathVariables.m_eLanguageType = MsLangId::convertIsoStringToLanguage( aLocaleStr ); - else - { - LOG_ERROR( "SubstitutePathVariables::SetPredefinedPathVariables", "Wrong Any type for language!" ); - } + // We used to have an else branch here with a LOG_ERROR, but that + // always fired in some unit tests when this code was built with + // debug=t, so it seems fairly pointless, especially as + // aPreDefPathVariables.m_eLanguageType has been initialized to a + // default value above anyway. // Set $(lang) aPreDefPathVariables.m_FixedVar[ PREDEFVAR_LANG ] = ConvertOSLtoUCBURL( diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 007608a06dcd..ae12fc18e340 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -60,7 +60,7 @@ //_________________________________________________________________________________________________________________ // -using namespace rtl; +using ::rtl::OUString; using namespace com::sun::star; namespace framework diff --git a/framework/source/tabwin/tabwinfactory.cxx b/framework/source/tabwin/tabwinfactory.cxx index 37f3dad23cb2..8be283d220b5 100644 --- a/framework/source/tabwin/tabwinfactory.cxx +++ b/framework/source/tabwin/tabwinfactory.cxx @@ -56,7 +56,7 @@ //_________________________________________________________________________________________________________________ // -using namespace rtl; +using ::rtl::OUString; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::beans; diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index 4b400b2f6fef..a7974f6ed082 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -60,9 +60,10 @@ //_________________________________________________________________________________________________________________ // -using namespace rtl; using namespace ::com::sun::star; +using ::rtl::OUString; + //_________________________________________________________________________________________________________________ // Namespace //_________________________________________________________________________________________________________________ diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index 15f324185ddb..e3a502074a18 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -63,12 +63,6 @@ #include <rtl/logfile.hxx> #include "svtools/miscopt.hxx" -#include "vcl/imagerepository.hxx" - -//_________________________________________________________________________________________________________________ -// namespaces -//_________________________________________________________________________________________________________________ - using ::rtl::OUString; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::XInterface; @@ -363,15 +357,7 @@ GlobalImageList::~GlobalImageList() Image GlobalImageList::getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL ) { osl::MutexGuard guard( getGlobalImageListMutex() ); - Image aImage = CmdImageList::getImageFromCommandURL( nImageType, rCommandURL ); - if (!aImage) - { - BitmapEx rBitmap; - bool res = ::vcl::ImageRepository::loadDefaultImage(rBitmap); - if (res) - aImage = Image(rBitmap); - } - return aImage; + return CmdImageList::getImageFromCommandURL( nImageType, rCommandURL ); } bool GlobalImageList::hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL ) diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx index aa10b763ad3b..46582fbf19c6 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.hxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -162,7 +162,7 @@ namespace framework void clear(); - typedef std::hash_map< rtl::OUString, + typedef boost::unordered_map< rtl::OUString, sal_Bool, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ImageNameMap; diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index 608214d1d656..59cb3b531e2b 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -122,7 +122,7 @@ ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons , m_aListenerContainer( m_aLock.getShareableOslMutex() ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier" ); - // Retrieve known modules and insert them into our hash_map to speed-up access time. + // Retrieve known modules and insert them into our boost::unordered_map to speed-up access time. Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY ); const Sequence< ::rtl::OUString > aNameSeq = xNameAccess->getElementNames(); const ::rtl::OUString* pNameSeq = aNameSeq.getConstArray(); diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 817eb969a16a..64756c1cf298 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -287,7 +287,7 @@ void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer, aUIElementData.bDefaultNode = false; } - // Create hash_map entries for all user interface elements inside the storage. We don't load the + // Create boost::unordered_map entries for all user interface elements inside the storage. We don't load the // settings to speed up the process. rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); } @@ -408,7 +408,7 @@ ModuleUIConfigurationManager::UIElementData* ModuleUIConfigurationManager::impl impl_preloadUIElementTypeList( LAYER_USERDEFINED, nElementType ); impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); - // first try to look into our user-defined vector/hash_map combination + // first try to look into our user-defined vector/boost::unordered_map combination UIElementDataHashMap& rUserHashMap = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap; UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL ); if ( pIter != rUserHashMap.end() ) @@ -422,7 +422,7 @@ ModuleUIConfigurationManager::UIElementData* ModuleUIConfigurationManager::impl } } - // Not successfull, we have to look into our default vector/hash_map combination + // Not successfull, we have to look into our default vector/boost::unordered_map combination UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; pIter = rDefaultHashMap.find( aResourceURL ); if ( pIter != rDefaultHashMap.end() ) @@ -1446,7 +1446,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la // preload list of element types on demand impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); - // Look into our default vector/hash_map combination + // Look into our default vector/boost::unordered_map combination UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; UIElementDataHashMap::iterator pIter = rDefaultHashMap.find( ResourceURL ); if ( pIter != rDefaultHashMap.end() ) diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index ec60d680475f..49d415b7655f 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -137,7 +137,7 @@ class ConfigurationAccess_UICategory : // Order is neccessary for right initiali sal_Bool fillCache(); private: - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > IdToInfoCache; diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 06bec8c814f3..df7505460265 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -225,7 +225,7 @@ void UIConfigurationManager::impl_preloadUIElementTypeList( sal_Int16 nElementTy aUIElementData.bModified = false; aUIElementData.bDefault = false; - // Create hash_map entries for all user interface elements inside the storage. We don't load the + // Create boost::unordered_map entries for all user interface elements inside the storage. We don't load the // settings to speed up the process. rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); } @@ -344,7 +344,7 @@ UIConfigurationManager::UIElementData* UIConfigurationManager::impl_findUIElemen // preload list of element types on demand impl_preloadUIElementTypeList( nElementType ); - // try to look into our document vector/hash_map combination + // try to look into our document vector/boost::unordered_map combination UIElementDataHashMap& rUserHashMap = m_aUIElements[nElementType].aElementsHashMap; UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL ); if ( pIter != rUserHashMap.end() ) diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx index f9926f5635d1..313d07734995 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx @@ -257,7 +257,7 @@ void UIConfigurationManagerImpl::impl_preloadUIElementTypeList( Layer eLayer, sa aUIElementData.bDefaultNode = false; } - // Create hash_map entries for all user interface elements inside the storage. We don't load the + // Create boost::unordered_map entries for all user interface elements inside the storage. We don't load the // settings to speed up the process. rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); } @@ -378,7 +378,7 @@ UIConfigurationManagerImpl::UIElementData* UIConfigurationManagerImpl::impl_fin if ( m_bUseDefault ) impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); - // first try to look into our user-defined vector/hash_map combination + // first try to look into our user-defined vector/boost::unordered_map combination UIElementDataHashMap& rUserHashMap = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap; UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL ); if ( pIter != rUserHashMap.end() ) @@ -394,7 +394,7 @@ UIConfigurationManagerImpl::UIElementData* UIConfigurationManagerImpl::impl_fin if ( m_bUseDefault ) { - // Not successfull, we have to look into our default vector/hash_map combination + // Not successfull, we have to look into our default vector/boost::unordered_map combination UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; pIter = rDefaultHashMap.find( aResourceURL ); if ( pIter != rDefaultHashMap.end() ) @@ -1536,7 +1536,7 @@ throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::la // preload list of element types on demand impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); - // Look into our default vector/hash_map combination + // Look into our default vector/boost::unordered_map combination UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; UIElementDataHashMap::iterator pIter = rDefaultHashMap.find( ResourceURL ); if ( pIter != rDefaultHashMap.end() ) diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx index 4483693804bf..a2be907122d0 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx +++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx @@ -35,7 +35,7 @@ */ #include <vector> #include <list> -#include <hash_map> +#include <boost/unordered_map.hpp> //_________________________________________________________________________________________________________________ // my own includes @@ -159,7 +159,7 @@ namespace framework struct UIElementType; friend struct UIElementType; - typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; struct UIElementType { @@ -179,7 +179,7 @@ namespace framework typedef ::std::vector< UIElementType > UIElementTypesVector; typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; - typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; + typedef ::boost::unordered_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; // private methods void impl_Initialize(); diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 8936f88ce9f6..7b081b335bde 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -257,7 +257,7 @@ class ConfigurationAccess_WindowState : // interfaces sal_Bool impl_initializeConfigAccess(); private: - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, WindowStateInfo, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ResourceURLToInfoCache; diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 6b2730195458..82674e30a896 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -230,9 +230,7 @@ ControlMenuController::~ControlMenuController() // private function void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu ) { - rtl::OUString aResName( RTL_CONSTASCII_USTRINGPARAM( "svx" )); - - ResMgr* pResMgr = ResMgr::CreateResMgr( rtl::OUStringToOString( aResName, RTL_TEXTENCODING_ASCII_US )); + ResMgr* pResMgr = ResMgr::CreateResMgr("svx"); ResId aResId( RID_SVXIMGLIST_FMEXPL, *pResMgr ); aResId.SetRT( RSC_IMAGELIST ); @@ -383,10 +381,7 @@ void ControlMenuController::impl_setPopupMenu() { if ( m_pResPopupMenu == 0 ) { - rtl::OStringBuffer aBuf( 32 ); - aBuf.append( "svx" ); - - ResMgr* pResMgr = ResMgr::CreateResMgr( aBuf.getStr() ); + ResMgr* pResMgr = ResMgr::CreateResMgr("svx"); if ( pResMgr ) { ResId aResId( RID_FMSHELL_CONVERSIONMENU, *pResMgr ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 5c27fdccdd2a..e515f1065cb8 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -524,9 +524,9 @@ throw ( RuntimeException ) // #b6673979# enable some slots hardly, because UNIX clipboard does not notify all changes // Can be removed if follow up task will be fixed directly within applications. if ( - ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:Paste" ) ) || - ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:PasteSpecial" ) ) || - ( pMenuItemHandler->aMenuItemURL.equalsAscii (".uno:PasteClipboard") ) // special for draw/impress + ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:Paste"))) || + ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:PasteSpecial"))) || + ( pMenuItemHandler->aMenuItemURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:PasteClipboard"))) // special for draw/impress ) bEnabledItem = sal_True; #endif diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index e391ead2f04d..f7011398f069 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -368,7 +368,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup AddInfo aAddInfo; // retrieve additional parameters from bookmark menu and - // store it in a hash_map. + // store it in a boost::unordered_map. for ( USHORT i = 0; i < pSubMenu->GetItemCount(); i++ ) { USHORT nItemId = pSubMenu->GetItemId( sal::static_int_cast<USHORT>( i ) ); diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 54fed3dfb0a8..87c7917bcaf9 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -59,8 +59,8 @@ #include <cppuhelper/implbase1.hxx> #include <osl/file.hxx> #ifdef WNT -#include <tools/prewin.h> -#include <tools/postwin.h> +#include <prewin.h> +#include <postwin.h> #include <odma_lib.hxx> #endif #include <dispatch/uieventloghelper.hxx> diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index a939b2c472f4..0c26320ab174 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -496,27 +496,27 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc { for ( int i = 0; i < aProp.getLength(); i++ ) { - if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) + if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) { aProp[i].Value >>= aCommandURL; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_HELPURL )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) { aProp[i].Value >>= aHelpURL; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) { aProp[i].Value >>= nStyle; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) { aProp[i].Value >>= nType; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_WIDTH )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_WIDTH)) ) { aProp[i].Value >>= nWidth; } - else if ( aProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_OFFSET )) + else if ( aProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_OFFSET)) ) { aProp[i].Value >>= nOffset; } diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 9371ea007f92..a8619dd3e628 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -94,7 +94,6 @@ using namespace ::com::sun::star::ui; static const char CONFIGURE_TOOLBARS_CMD[] = "ConfigureDialog"; static const char CONFIGURE_TOOLBARS[] = ".uno:ConfigureDialog"; static const char CMD_COLORBAR[] = ".uno:ColorControl"; -static const char CMD_HYPERLINKBAR[] = ".uno:InsertHyperlink"; static const char CMD_FORMULABAR[] = ".uno:InsertFormula"; static const char CMD_INPUTLINEBAR[] = ".uno:InputLineVisible"; static const char CMD_RESTOREVISIBILITY[] = ".cmd:RestoreVisibility"; @@ -108,7 +107,7 @@ static const char STATIC_INTERNAL_CMD_PART[] = ".cmd:"; namespace framework { -typedef std::hash_map< rtl::OUString, rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ToolbarHashMap; +typedef boost::unordered_map< rtl::OUString, rtl::OUString, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > ToolbarHashMap; struct ToolBarEntry { @@ -506,7 +505,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) || m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) )) { - addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )), 10360, aEmptyString ); if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) || m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) )) addCommand( m_xPopupMenu, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_COLORBAR )), 10417, aEmptyString ); diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index d8e9b27c1588..073c08302959 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -172,7 +172,7 @@ class ConfigurationAccess_UICommand : // Order is neccessary for right initializ std::vector< ::rtl::OUString >& aImageMirrorVector); private: - typedef ::std::hash_map< ::rtl::OUString, + typedef ::boost::unordered_map< ::rtl::OUString, CmdToInfoMap, OUStringHashCode, ::std::equal_to< ::rtl::OUString > > CommandToInfoCache; diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx index 271dcbf5eee5..92ad6780ecf0 100644 --- a/framework/source/xml/menudocumenthandler.cxx +++ b/framework/source/xml/menudocumenthandler.cxx @@ -140,28 +140,28 @@ static void ExtractMenuParameters( const Sequence< PropertyValue > rProp, { for ( sal_Int32 i = 0; i < rProp.getLength(); i++ ) { - if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_COMMANDURL )) + if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_COMMANDURL)) ) { rProp[i].Value >>= rCommandURL; rCommandURL = rCommandURL.intern(); } - else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_HELPURL )) + else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_HELPURL)) ) { rProp[i].Value >>= rHelpURL; } - else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_CONTAINER )) + else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_CONTAINER)) ) { rProp[i].Value >>= rSubMenu; } - else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_LABEL )) + else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_LABEL)) ) { rProp[i].Value >>= rLabel; } - else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_TYPE )) + else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_TYPE)) ) { rProp[i].Value >>= rType; } - else if ( rProp[i].Name.equalsAscii( ITEM_DESCRIPTOR_STYLE )) + else if ( rProp[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ITEM_DESCRIPTOR_STYLE)) ) { rProp[i].Value >>= rStyle; } @@ -893,8 +893,8 @@ throw ( SAXException, RuntimeException ) ExtractMenuParameters( aProps, aCommandURL, aLabel, aHelpURL, xSubMenu, nType, nItemBits ); if ( xSubMenu.is() ) { - if ( aCommandURL.equalsAscii( ADDDIRECT_CMD ) || - aCommandURL.equalsAscii( AUTOPILOTMENU_CMD )) + if ( aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(ADDDIRECT_CMD)) || + aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(AUTOPILOTMENU_CMD)) ) { WriteMenuItem( aCommandURL, aLabel, aHelpURL, nItemBits ); bSeparator = sal_False; @@ -908,7 +908,7 @@ throw ( SAXException, RuntimeException ) m_aAttributeType, aCommandURL ); - if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL ))) + if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL))) ) pListMenu->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), m_aAttributeType, aLabel ); @@ -967,13 +967,13 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandUR aHelpURL ); } - if (( aLabel.getLength() > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL ))) + if (( aLabel.getLength() > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )) { pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), m_aAttributeType, aLabel ); } - if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAscii( CMD_PROTOCOL ))) + if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )) { rtl::OUString aValue; MenuStyleItem* pStyle = MenuItemStyles; diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/xml/toolboxdocumenthandler.cxx index c7097253545f..fb44b6e26681 100644 --- a/framework/source/xml/toolboxdocumenthandler.cxx +++ b/framework/source/xml/toolboxdocumenthandler.cxx @@ -319,8 +319,6 @@ throw( SAXException, RuntimeException ) ::rtl::OUString aTooltip; ::rtl::OUString aBitmapName; sal_uInt16 nItemBits( 0 ); - sal_uInt16 nWidth( 0 ); - sal_uInt16 nUserDef( 0 ); sal_Bool bVisible( sal_True ); for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ ) @@ -370,18 +368,6 @@ throw( SAXException, RuntimeException ) } break; - case TB_ATTRIBUTE_WIDTH: - { - nWidth = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); - } - break; - - case TB_ATTRIBUTE_USER: - { - nUserDef = (USHORT)(xAttribs->getValueByIndex( n ).toInt32()); - } - break; - case TB_ATTRIBUTE_HELPID: { aHelpURL = xAttribs->getValueByIndex( n ); @@ -429,9 +415,10 @@ throw( SAXException, RuntimeException ) while ( nIndex >= 0 ); } break; - - default: - break; + case TB_ATTRIBUTE_USER: + case TB_ATTRIBUTE_WIDTH: + default: + break; } } } // for diff --git a/framework/test/makefile.mk b/framework/test/makefile.mk index 1059cbca443b..df4adda7c290 100644 --- a/framework/test/makefile.mk +++ b/framework/test/makefile.mk @@ -24,6 +24,7 @@ # for a copy of the LGPLv3 License. # #************************************************************************* + PRJ=.. PRJNAME= framework @@ -36,29 +37,6 @@ USE_DEFFILE= TRUE .INCLUDE : settings.mk -# --- applikation: "test" -------------------------------------------------- - -#APP1TARGET= test - -#APP1OBJS= $(SLO)$/test.obj -#DEPOBJFILES+= $(APP1OBJS) - -#APP1LIBS= $(SLB)$/fwk_classes.lib \ -# $(SLB)$/fwk_helper.lib - -#APP1STDLIBS= $(CPPULIB) \ -# $(CPPUHELPERLIB) \ -# $(SALLIB) \ -# \ -# $(TOOLSLIB) \ -# $(SVTOOLLIB) \ -# $(TKLIB) \ -# $(COMPHELPERLIB) \ -# $(VCLLIB) - -#APP1DEPN= $(SLB)$/fwk_helper.lib \ -# $(SLB)$/fwk_classes.lib - # --- application: "threadtest" -------------------------------------------------- APP2TARGET= threadtest @@ -90,4 +68,3 @@ APP2DEPN= $(SLO)$/fairrwlock.obj \ # --- Targets ------------------------------------------------------ .INCLUDE : target.mk - diff --git a/framework/test/typecfg/cfgview.cxx b/framework/test/typecfg/cfgview.cxx index 8d000666191a..3fbd4913fb08 100644 --- a/framework/test/typecfg/cfgview.cxx +++ b/framework/test/typecfg/cfgview.cxx @@ -55,7 +55,7 @@ #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vcl/event.hxx> #include <vcl/svapp.hxx> |