diff options
Diffstat (limited to 'framework/source/layoutmanager/layoutmanager.cxx')
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 78 |
1 files changed, 38 insertions, 40 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 73fa53b6a3d6..64646e35aabc 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -292,12 +292,11 @@ static sal_Bool implts_isFrameOrWindowTop( const css::uno::Reference< css::frame css::uno::Reference< css::awt::XTopWindow > xWindowCheck(xFrame->getContainerWindow(), css::uno::UNO_QUERY); // dont use _THROW here ... its a check only if (xWindowCheck.is()) { - // --> PB 2007-06-18 #i76867# top and system window is required. + // Top and system window is required (#i76867#) SolarMutexGuard aGuard; css::uno::Reference< css::awt::XWindow > xWindow( xWindowCheck, UNO_QUERY ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); return ( pWindow && pWindow->IsSystemWindow() ); - // <-- } return sal_False; @@ -334,7 +333,7 @@ static void impl_setDockingWindowVisibility( const css::uno::Reference< css::lan xDispatcher->executeDispatch( xProvider, aDockWinCommand, - ::rtl::OUString::createFromAscii("_self"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0, aArgs); } @@ -765,7 +764,7 @@ void LayoutManager::implts_destroyElements() aWriteLock.unlock(); UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); ++pIter ) { Reference< XComponent > xComponent( pIter->m_xUIElement, UNO_QUERY ); if ( xComponent.is() ) @@ -1112,7 +1111,7 @@ void LayoutManager::implts_toggleFloatingUIElementsVisibility( sal_Bool bActive UIElementVector::iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) { @@ -1184,7 +1183,7 @@ sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, rtl::OUS UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName ) { @@ -1203,7 +1202,7 @@ sal_Bool LayoutManager::implts_findElement( const Reference< XInterface >& xUIEl UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) { @@ -1224,7 +1223,7 @@ sal_Bool LayoutManager::implts_findElement( const rtl::OUString& aName, UIElemen UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName ) { @@ -1243,7 +1242,7 @@ LayoutManager::UIElement& LayoutManager::impl_findElement( const rtl::OUString& UIElementVector::iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName ) return *pIter; @@ -1331,7 +1330,7 @@ void LayoutManager::implts_refreshContextToolbarsVisibility() UIElementVisibility aUIElementVisible; UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aType.equalsAsciiL( "toolbar", 7 )) { @@ -1768,7 +1767,7 @@ void LayoutManager::implts_setElementData( UIElement& rElement, const Reference< // Try to find a cascaded position for the new floating window UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) { @@ -1974,7 +1973,7 @@ void LayoutManager::implts_sortUIElements() // We have to reset our temporary flags. UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { // why check, just set it to false //if ( pIter->m_bUserActive ) @@ -2002,7 +2001,7 @@ void LayoutManager::implts_getDockingAreaElementInfos( DockingArea eDockingArea, aWindowVector.reserve(m_aUIElements.size()); xDockAreaWindow = m_xDockAreaWindows[eDockingArea]; UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea && pIter->m_bVisible && !pIter->m_bFloating ) { @@ -2188,7 +2187,7 @@ void LayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( DockingArea ReadGuard aReadLock( m_aLock ); UIElementVector::iterator pIter; UIElementVector::iterator pEnd = m_aUIElements.end(); - for ( pIter = m_aUIElements.begin(); pIter != pEnd; pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != pEnd; ++pIter ) { if ( pIter->m_aDockedData.m_nDockedArea == eDockingArea ) { @@ -2939,7 +2938,7 @@ void LayoutManager::implts_renumberRowColumnData( WriteGuard aWriteLock( m_aLock ); UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if (( pIter->m_aDockedData.m_nDockedArea == sal_Int16( eDockingArea )) && ( pIter->m_aName != rUIElement.m_aName )) @@ -3086,7 +3085,7 @@ void LayoutManager::implts_setVisibleState( sal_Bool bShow ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) pIter->m_bMasterHide = !bShow; m_aStatusBarElement.m_bMasterHide = !bShow; aWriteLock.unlock(); @@ -3116,7 +3115,7 @@ void LayoutManager::implts_updateUIElementsVisibleState( sal_Bool bSetVisible ) ReadGuard aReadLock( m_aLock ); aWinVector.reserve(m_aUIElements.size()); UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) { @@ -3245,7 +3244,7 @@ void LayoutManager::implts_setCurrentUIVisibility( sal_Bool bShow ) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ WriteGuard aWriteLock( m_aLock ); UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( !bShow && pIter->m_bVisible && pIter->m_xUIElement.is() ) pIter->m_bMasterHide = true; @@ -3931,7 +3930,7 @@ void LayoutManager::implts_reparentChildWindows() if ( pContainerWindow ) { UIElementVector::iterator pIter; - for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); pIter++ ) + for ( pIter = aUIElementVector.begin(); pIter != aUIElementVector.end(); ++pIter ) { Reference< XUIElement > xUIElement( pIter->m_xUIElement ); if ( xUIElement.is() ) @@ -4021,7 +4020,7 @@ IMPL_LINK( LayoutManager, WindowEventListener, VclSimpleEvent*, pEvent ) std::vector< css::uno::Reference< css::ui::XUIFunctionListener > > aListenerArray; UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aType.equalsAscii( "toolbar" ) && pIter->m_xUIElement.is() ) @@ -4309,7 +4308,7 @@ throw (RuntimeException) { UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName ) { @@ -4461,7 +4460,7 @@ throw (::com::sun::star::uno::RuntimeException) bool bFound( false ); bool bShowElement( false ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == ResourceURL ) { @@ -4588,7 +4587,7 @@ throw (::com::sun::star::uno::RuntimeException) sal_Int32 nIndex = 0; UIElementVector::const_iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) aSeq[nIndex++] = pIter->m_xUIElement; @@ -4656,7 +4655,7 @@ throw (RuntimeException) UIElementVector::iterator pIter; WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { @@ -4789,7 +4788,7 @@ throw (RuntimeException) UIElementVector::iterator pIter; WriteGuard aWriteLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { @@ -4944,7 +4943,7 @@ throw (RuntimeException) { ReadGuard aReadLock( m_aLock ); UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aType.equalsAscii( "toolbar" ) && pIter->m_xUIElement.is() && @@ -5266,7 +5265,7 @@ throw (RuntimeException) UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { @@ -5298,7 +5297,7 @@ throw (RuntimeException) UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { @@ -5316,7 +5315,7 @@ throw (RuntimeException) UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_aName == aName && pIter->m_xUIElement.is() ) { @@ -5334,7 +5333,7 @@ throw (::com::sun::star::uno::RuntimeException) UIElementVector::const_iterator pIter; ReadGuard aReadLock( m_aLock ); - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if (( pIter->m_aName == ResourceURL ) && ( pIter->m_xUIElement.is() )) { @@ -5943,7 +5942,7 @@ css::awt::Rectangle LayoutManager::implts_calcDockingAreaSizes() aRowColumnSizes[nCurrDockingArea].clear(); aRowColumnSizes[nCurrDockingArea].push_back( 0 ); - for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); pConstIter++ ) + for ( pConstIter = aWindowVector.begin(); pConstIter != aWindowVector.end(); ++pConstIter ) { Reference< XUIElement > xUIElement( pConstIter->m_xUIElement, UNO_QUERY ); if ( xUIElement.is() ) @@ -6228,8 +6227,8 @@ IMPL_LINK( LayoutManager, MenuBarClose, MenuBar *, EMPTYARG ) xDispatcher->executeDispatch( xProvider, - ::rtl::OUString::createFromAscii(".uno:CloseWin"), - ::rtl::OUString::createFromAscii("_self"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CloseWin")), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0, css::uno::Sequence< css::beans::PropertyValue >()); @@ -6258,7 +6257,7 @@ IMPL_LINK( LayoutManager, OptionsChanged, void*, EMPTYARG ) aReadLock.lock(); { UIElementVector::iterator pIter; - for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); pIter++ ) + for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) { if ( pIter->m_xUIElement.is() ) aToolBarVector.push_back( Reference< XUpdatable >( pIter->m_xUIElement, UNO_QUERY )); @@ -6269,7 +6268,7 @@ IMPL_LINK( LayoutManager, OptionsChanged, void*, EMPTYARG ) lock(); { std::vector< Reference< XUpdatable > >::iterator pIter; - for ( pIter = aToolBarVector.begin(); pIter != aToolBarVector.end(); pIter++ ) + for ( pIter = aToolBarVector.begin(); pIter != aToolBarVector.end(); ++pIter ) { if ( (*pIter).is() ) (*pIter)->update(); @@ -6423,7 +6422,6 @@ throw (::com::sun::star::uno::RuntimeException) ::Rectangle aHotZoneRightDockRect( implts_calcHotZoneRect( aRightDockRect, nMagneticZone )); Window* pContainerWindow( VCLUnoHelper::GetWindow( xContainerWindow ) ); - Window* pDockingAreaWindow( 0 ); ::Point aMousePos( pContainerWindow->ScreenToOutputPixel( ::Point( e.MousePos.X, e.MousePos.Y ))); if ( aHotZoneTopDockRect.IsInside( aMousePos )) @@ -6457,25 +6455,25 @@ throw (::com::sun::star::uno::RuntimeException) { aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_TOP; aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xTopDockingWindow ); + VCLUnoHelper::GetWindow( xTopDockingWindow ); } else if ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ) { aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_BOTTOM; aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xBottomDockingWindow ); + VCLUnoHelper::GetWindow( xBottomDockingWindow ); } else if ( eDockingArea == DockingArea_DOCKINGAREA_LEFT ) { aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_LEFT; aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xLeftDockingWindow ); + VCLUnoHelper::GetWindow( xLeftDockingWindow ); } else if ( eDockingArea == DockingArea_DOCKINGAREA_RIGHT ) { aUIDockingElement.m_aDockedData.m_nDockedArea = DockingArea_DOCKINGAREA_RIGHT; aUIDockingElement.m_bFloating = sal_False; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xRightDockingWindow ); + VCLUnoHelper::GetWindow( xRightDockingWindow ); } ::Point aOutputPos = pContainerWindow->ScreenToOutputPixel( aTrackingRect.TopLeft() ); |