summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/accelerators/acceleratorconfiguration.cxx11
-rw-r--r--framework/source/classes/addonsoptions.cxx10
-rw-r--r--framework/source/classes/fwkresid.cxx5
-rw-r--r--framework/source/classes/fwktabwindow.cxx3
-rw-r--r--framework/source/classes/fwlresid.cxx5
-rw-r--r--framework/source/classes/propertysethelper.cxx5
-rw-r--r--framework/source/classes/resource.src2
-rw-r--r--framework/source/classes/sfxhelperfunctions.cxx4
-rw-r--r--framework/source/dispatch/windowcommanddispatch.cxx43
-rw-r--r--framework/source/helper/actiontriggerhelper.cxx5
-rw-r--r--framework/source/helper/propertysetcontainer.cxx2
-rw-r--r--framework/source/helper/titlebarupdate.cxx27
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx3
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx2
-rw-r--r--framework/source/inc/accelerators/acceleratorcache.hxx2
-rw-r--r--framework/source/inc/accelerators/keymapping.hxx2
-rw-r--r--framework/source/inc/accelerators/storageholder.hxx2
-rw-r--r--framework/source/inc/dispatch/windowcommanddispatch.hxx24
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx26
-rw-r--r--framework/source/services/desktop.cxx19
-rw-r--r--framework/source/services/frame.cxx8
-rw-r--r--framework/source/services/license.cxx3
-rw-r--r--framework/source/services/sessionlistener.cxx4
-rw-r--r--framework/source/services/substitutepathvars.cxx15
-rw-r--r--framework/source/tabwin/tabwindow.cxx2
-rw-r--r--framework/source/tabwin/tabwinfactory.cxx2
-rw-r--r--framework/source/uiconfiguration/globalsettings.cxx3
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx16
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.hxx4
-rw-r--r--framework/source/uiconfiguration/moduleuicfgsupplier.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx8
-rw-r--r--framework/source/uiconfiguration/uicategorydescription.cxx2
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx4
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx8
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanagerimpl.hxx6
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx2
-rw-r--r--framework/source/uielement/controlmenucontroller.cxx9
-rw-r--r--framework/source/uielement/menubarmanager.cxx6
-rw-r--r--framework/source/uielement/newmenucontroller.cxx2
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx4
-rw-r--r--framework/source/uielement/statusbarmanager.cxx12
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx4
-rw-r--r--framework/source/uielement/uicommanddescription.cxx2
-rw-r--r--framework/source/xml/menudocumenthandler.cxx22
-rw-r--r--framework/source/xml/toolboxdocumenthandler.cxx21
45 files changed, 149 insertions, 224 deletions
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