[Libreoffice-commits] core.git: 10 commits - framework/inc framework/source offapi/com
Jan Holesovsky
kendy at suse.cz
Tue Apr 9 09:11:17 PDT 2013
framework/inc/services/layoutmanager.hxx | 12 --
framework/inc/uielement/addonstoolbarwrapper.hxx | 1
framework/inc/uielement/toolbarmanager.hxx | 32 ++-----
framework/inc/uielement/toolbarwrapper.hxx | 1
framework/source/layoutmanager/layoutmanager.cxx | 63 ++++++--------
framework/source/uielement/addonstoolbarwrapper.cxx | 2
framework/source/uielement/toolbarmanager.cxx | 71 +++++++---------
framework/source/uielement/toolbarmerger.cxx | 77 ++++++------------
framework/source/uielement/toolbarsmenucontroller.cxx | 34 +++----
framework/source/uielement/toolbarwrapper.cxx | 2
offapi/com/sun/star/ui/ItemStyle.idl | 20 ++++
11 files changed, 129 insertions(+), 186 deletions(-)
New commits:
commit 2dc7318d845552a45aeb4f87ce8c333e51dca908
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 17:43:44 2013 +0200
Kill not necessasy OUString member variables.
Change-Id: I1bbfd19bc70fc12ac5dc5fdb18c556f4dc5300cb
diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx
index 74d866e..c604dde 100644
--- a/framework/inc/services/layoutmanager.hxx
+++ b/framework/inc/services/layoutmanager.hxx
@@ -321,18 +321,6 @@ namespace framework
css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier;
GlobalSettings* m_pGlobalSettings;
OUString m_aModuleIdentifier;
- OUString m_aStatusBarAlias;
- OUString m_aProgressBarAlias;
- OUString m_aPropDocked;
- OUString m_aPropVisible;
- OUString m_aPropDockingArea;
- OUString m_aPropDockPos;
- OUString m_aPropPos;
- OUString m_aPropSize;
- OUString m_aPropUIName;
- OUString m_aPropStyle;
- OUString m_aPropLocked;
- OUString m_aCustomizeCmd;
sal_Int16 m_eSymbolsSize;
sal_Int16 m_eSymbolsStyle;
Timer m_aAsyncLayoutTimer;
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 1ceb6b4..e8b8358 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -99,6 +99,9 @@ using namespace ::com::sun::star::frame;
// You have to change BOTH values, see sfx2/inc/sfx2/sfxsids.hrc (SID_DOCKWIN_START)
static const sal_Int32 DOCKWIN_ID_BASE = 9800;
+static const char STATUS_BAR_ALIAS[] = "private:resource/statusbar/statusbar";
+static const char PROGRESS_BAR_ALIAS[] = "private:resource/progressbar/progressbar";
+
namespace framework
{
@@ -134,26 +137,14 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM
, m_xUIElementFactoryManager( ui::UIElementFactoryManager::create(comphelper::getComponentContext(xServiceManager)) )
, m_xPersistentWindowStateSupplier( ui::WindowStateConfiguration::create( comphelper::getComponentContext(xServiceManager) ) )
, m_pGlobalSettings( 0 )
- , m_aStatusBarAlias( "private:resource/statusbar/statusbar" )
- , m_aProgressBarAlias( "private:resource/progressbar/progressbar" )
- , m_aPropDocked( WINDOWSTATE_PROPERTY_DOCKED )
- , m_aPropVisible( WINDOWSTATE_PROPERTY_VISIBLE )
- , m_aPropDockingArea( WINDOWSTATE_PROPERTY_DOCKINGAREA )
- , m_aPropDockPos( WINDOWSTATE_PROPERTY_DOCKPOS )
- , m_aPropPos( WINDOWSTATE_PROPERTY_POS )
- , m_aPropSize( WINDOWSTATE_PROPERTY_SIZE )
- , m_aPropUIName( WINDOWSTATE_PROPERTY_UINAME )
- , m_aPropStyle( WINDOWSTATE_PROPERTY_STYLE )
- , m_aPropLocked( WINDOWSTATE_PROPERTY_LOCKED )
- , m_aCustomizeCmd( "ConfigureDialog" )
, m_aListenerContainer( m_aLock.getShareableOslMutex() )
, m_pToolbarManager( 0 )
, m_xToolbarManager( 0 )
{
// Initialize statusbar member
const sal_Bool bRefreshVisibility = sal_False;
- m_aStatusBarElement.m_aType = OUString( "statusbar" );
- m_aStatusBarElement.m_aName = m_aStatusBarAlias;
+ m_aStatusBarElement.m_aType = "statusbar";
+ m_aStatusBarElement.m_aName = STATUS_BAR_ALIAS;
m_pToolbarManager = new ToolbarLayoutManager( comphelper::getComponentContext(xServiceManager), Reference<XUIElementFactory>(m_xUIElementFactoryManager, UNO_QUERY_THROW), this );
m_xToolbarManager = uno::Reference< ui::XUIConfigurationListener >( static_cast< OWeakObject* >( m_pToolbarManager ), uno::UNO_QUERY );
@@ -518,49 +509,49 @@ sal_Bool LayoutManager::implts_readWindowStateData( const OUString& aName, UIEle
sal_Bool bValue( sal_False );
for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ )
{
- if ( aWindowState[n].Name == m_aPropDocked )
+ if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_DOCKED )
{
if ( aWindowState[n].Value >>= bValue )
rElementData.m_bFloating = !bValue;
}
- else if ( aWindowState[n].Name == m_aPropVisible )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_VISIBLE )
{
if ( aWindowState[n].Value >>= bValue )
rElementData.m_bVisible = bValue;
}
- else if ( aWindowState[n].Name == m_aPropDockingArea )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_DOCKINGAREA )
{
ui::DockingArea eDockingArea;
if ( aWindowState[n].Value >>= eDockingArea )
rElementData.m_aDockedData.m_nDockedArea = sal_Int16( eDockingArea );
}
- else if ( aWindowState[n].Name == m_aPropDockPos )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_DOCKPOS )
{
awt::Point aPoint;
if ( aWindowState[n].Value >>= aPoint )
rElementData.m_aDockedData.m_aPos = aPoint;
}
- else if ( aWindowState[n].Name == m_aPropPos )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_POS )
{
awt::Point aPoint;
if ( aWindowState[n].Value >>= aPoint )
rElementData.m_aFloatingData.m_aPos = aPoint;
}
- else if ( aWindowState[n].Name == m_aPropSize )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_SIZE )
{
awt::Size aSize;
if ( aWindowState[n].Value >>= aSize )
rElementData.m_aFloatingData.m_aSize = aSize;
}
- else if ( aWindowState[n].Name == m_aPropUIName )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_UINAME )
aWindowState[n].Value >>= rElementData.m_aUIName;
- else if ( aWindowState[n].Name == m_aPropStyle )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_STYLE )
{
sal_Int32 nStyle = 0;
if ( aWindowState[n].Value >>= nStyle )
rElementData.m_nStyle = sal_Int16( nStyle );
}
- else if ( aWindowState[n].Name == m_aPropLocked )
+ else if ( aWindowState[n].Name == WINDOWSTATE_PROPERTY_LOCKED )
{
if ( aWindowState[n].Value >>= bValue )
rElementData.m_aDockedData.m_bLocked = bValue;
@@ -657,25 +648,25 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI
{
Sequence< PropertyValue > aWindowState( 8 );
- aWindowState[0].Name = m_aPropDocked;
+ aWindowState[0].Name = WINDOWSTATE_PROPERTY_DOCKED;
aWindowState[0].Value = makeAny( sal_Bool( !rElementData.m_bFloating ));
- aWindowState[1].Name = m_aPropVisible;
+ aWindowState[1].Name = WINDOWSTATE_PROPERTY_VISIBLE;
aWindowState[1].Value = makeAny( sal_Bool( rElementData.m_bVisible ));
- aWindowState[2].Name = m_aPropDockingArea;
+ aWindowState[2].Name = WINDOWSTATE_PROPERTY_DOCKINGAREA;
aWindowState[2].Value = makeAny( static_cast< DockingArea >( rElementData.m_aDockedData.m_nDockedArea ) );
- aWindowState[3].Name = m_aPropDockPos;
+ aWindowState[3].Name = WINDOWSTATE_PROPERTY_DOCKPOS;
aWindowState[3].Value <<= rElementData.m_aDockedData.m_aPos;
- aWindowState[4].Name = m_aPropPos;
+ aWindowState[4].Name = WINDOWSTATE_PROPERTY_POS;
aWindowState[4].Value <<= rElementData.m_aFloatingData.m_aPos;
- aWindowState[5].Name = m_aPropSize;
+ aWindowState[5].Name = WINDOWSTATE_PROPERTY_SIZE;
aWindowState[5].Value <<= rElementData.m_aFloatingData.m_aSize;
- aWindowState[6].Name = m_aPropUIName;
+ aWindowState[6].Name = WINDOWSTATE_PROPERTY_UINAME;
aWindowState[6].Value = makeAny( rElementData.m_aUIName );
- aWindowState[7].Name = m_aPropLocked;
+ aWindowState[7].Name = WINDOWSTATE_PROPERTY_LOCKED;
aWindowState[7].Value = makeAny( rElementData.m_aDockedData.m_bLocked );
if ( xPersistentWindowState->hasByName( aName ))
@@ -1066,7 +1057,7 @@ sal_Bool LayoutManager::implts_hideProgressBar()
bInternalStatusBar = xStatusBar != xWindow;
}
m_aProgressBarElement.m_bVisible = sal_False;
- implts_readStatusBarState( m_aStatusBarAlias );
+ implts_readStatusBarState( STATUS_BAR_ALIAS );
bHideStatusBar = !m_aStatusBarElement.m_bVisible;
aWriteLock.unlock();
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
@@ -1807,7 +1798,7 @@ throw (RuntimeException)
{
aWriteLock.unlock();
- implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement );
+ implts_writeWindowStateData( STATUS_BAR_ALIAS, m_aStatusBarElement );
bMustLayout = true;
bResult = true;
bNotify = true;
@@ -1900,7 +1891,7 @@ throw (RuntimeException)
if ( m_aStatusBarElement.m_xUIElement.is() && !m_aStatusBarElement.m_bMasterHide &&
implts_hideStatusBar( sal_True ))
{
- implts_writeWindowStateData( m_aStatusBarAlias, m_aStatusBarElement );
+ implts_writeWindowStateData( STATUS_BAR_ALIAS, m_aStatusBarElement );
bMustLayout = sal_True;
bNotify = sal_True;
}
@@ -2496,8 +2487,8 @@ throw (uno::RuntimeException)
::Size LayoutManager::implts_getStatusBarSize()
{
ReadGuard aReadLock( m_aLock );
- bool bStatusBarVisible( isElementVisible( m_aStatusBarAlias ));
- bool bProgressBarVisible( isElementVisible( m_aProgressBarAlias ));
+ bool bStatusBarVisible( isElementVisible( STATUS_BAR_ALIAS ));
+ bool bProgressBarVisible( isElementVisible( PROGRESS_BAR_ALIAS ));
bool bVisible( m_bVisible );
Reference< XUIElement > xStatusBar( m_aStatusBarElement.m_xUIElement );
Reference< XUIElement > xProgressBar( m_aProgressBarElement.m_xUIElement );
commit 8efe5b7096f14f9434730a8429a5a8771bed8503
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 17:27:57 2013 +0200
equalsAscii() and equalsAsciiL() -> operator==()
Change-Id: Id9e1057302575686a61d79bef034b8431ef22196
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index b085f84..d992c62 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -269,9 +269,9 @@ static void fillHashMap( const Sequence< Sequence< ::com::sun::star::beans::Prop
const PropertyValue* pProperties = rSeqToolBars[i].getConstArray();
for ( sal_Int32 j = 0; j < rSeqToolBars[i].getLength(); j++ )
{
- if ( pProperties[j].Name.equalsAscii( ITEM_DESCRIPTOR_RESOURCEURL) )
+ if ( pProperties[j].Name == ITEM_DESCRIPTOR_RESOURCEURL )
pProperties[j].Value >>= aResourceURL;
- else if ( pProperties[j].Name.equalsAscii( ITEM_DESCRIPTOR_UINAME) )
+ else if ( pProperties[j].Name == ITEM_DESCRIPTOR_UINAME )
pProperties[j].Value >>= aUIName;
}
@@ -401,13 +401,13 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
{
for ( sal_Int32 i = 0; i < aWindowState.getLength(); i++ )
{
- if ( aWindowState[i].Name.equalsAscii( WINDOWSTATE_PROPERTY_UINAME ))
+ if ( aWindowState[i].Name == WINDOWSTATE_PROPERTY_UINAME )
aWindowState[i].Value >>= aUIName;
- else if ( aWindowState[i].Name.equalsAscii( WINDOWSTATE_PROPERTY_HIDEFROMENU ))
+ else if ( aWindowState[i].Name == WINDOWSTATE_PROPERTY_HIDEFROMENU )
aWindowState[i].Value >>= bHideFromMenu;
- else if ( aWindowState[i].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT ))
+ else if ( aWindowState[i].Name == WINDOWSTATE_PROPERTY_CONTEXT )
aWindowState[i].Value >>= bContextSensitive;
- else if ( aWindowState[i].Name.equalsAscii( WINDOWSTATE_PROPERTY_VISIBLE ))
+ else if ( aWindowState[i].Name == WINDOWSTATE_PROPERTY_VISIBLE )
aWindowState[i].Value >>= bVisible;
}
}
@@ -471,15 +471,15 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
}
// Create commands for non-toolbars
- if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ))
+ if ( m_aModuleIdentifier == "com.sun.star.text.TextDocument" ||
+ m_aModuleIdentifier == "com.sun.star.text.WebDocument" ||
+ m_aModuleIdentifier == "com.sun.star.text.GlobalDocument" ||
+ m_aModuleIdentifier == "com.sun.star.drawing.DrawingDocument" ||
+ m_aModuleIdentifier == "com.sun.star.presentation.PresentationDocument" ||
+ m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" )
{
- if ( m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ||
- m_aModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ))
+ if ( m_aModuleIdentifier == "com.sun.star.drawing.DrawingDocument" ||
+ m_aModuleIdentifier == "com.sun.star.presentation.PresentationDocument" )
addCommand( m_xPopupMenu, OUString( CMD_COLORBAR ), aEmptyString );
else if ( m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" )
addCommand( m_xPopupMenu, OUString( CMD_INPUTLINEBAR ), aEmptyString );
@@ -645,12 +645,12 @@ void SAL_CALL ToolbarsMenuController::select( const css::awt::MenuEvent& rEvent
sal_Int32 nVisibleIndex( -1 );
for ( sal_Int32 j = 0; j < aWindowState.getLength(); j++ )
{
- if ( aWindowState[j].Name.equalsAscii( WINDOWSTATE_PROPERTY_VISIBLE ))
+ if ( aWindowState[j].Name == WINDOWSTATE_PROPERTY_VISIBLE )
{
aWindowState[j].Value >>= bVisible;
nVisibleIndex = j;
}
- else if ( aWindowState[j].Name.equalsAscii( WINDOWSTATE_PROPERTY_CONTEXT ))
+ else if ( aWindowState[j].Name == WINDOWSTATE_PROPERTY_CONTEXT )
aWindowState[j].Value >>= bContextSensitive;
}
@@ -782,7 +782,7 @@ void SAL_CALL ToolbarsMenuController::activate( const css::awt::MenuEvent& ) thr
xDispatch->removeStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL );
}
}
- else if ( aCmdVector[i].equalsAscii( CMD_RESTOREVISIBILITY ))
+ else if ( aCmdVector[i] == CMD_RESTOREVISIBILITY )
{
// Special code to determine the enable/disable state of this command
FeatureStateEvent aFeatureStateEvent;
commit 1223467b15570539bb7fff3b620dc891d0a068ca
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 16:56:17 2013 +0200
Make this readable on a normal screen too.
Change-Id: I91259408aaa2294b2c1e01ac3979ef402665ac7a
diff --git a/offapi/com/sun/star/ui/ItemStyle.idl b/offapi/com/sun/star/ui/ItemStyle.idl
index ae3d5f6..cfd8558 100644
--- a/offapi/com/sun/star/ui/ItemStyle.idl
+++ b/offapi/com/sun/star/ui/ItemStyle.idl
@@ -109,7 +109,15 @@ constants ItemStyle
/** specifies if an icon is placed on left side of the text, like an entry in a taskbar.
<p>This style is only valid if the item describes a toolbar item and visible if
style of the toolbar is set to symboltext.</p>
- <p> This style can also be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="::com::sun::star::ui::ItemStyle">TEXT</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
+
+ <p>This style can also be used for custom toolbars and menus, in a
+ custom toolbar an item's Style setting can used to override the
+ toolbar container setting, the style can be bitwise OR-ed with <member
+ scope="::com::sun::star::ui::ItemStyle">TEXT</member> to define text,
+ text+icon or icon only is to be displayed. Similarly for menu items,
+ an items Style can override the application setting to display either
+ text or icon (note: for menu an icon only setting interpreted as
+ icon+text)</p>
*/
const short ICON = 128;
@@ -130,7 +138,15 @@ constants ItemStyle
*/
const short DROPDOWN_ONLY = 1024;
/** indicates if icon, text or text+icon is displayed for the item.
- <p> This style can be used for custom toolbars and menus, in a custom toolbar an item's Style setting can used to override the toolbar container setting, the style can be bitwise OR-ed with <member scope="com::sun::star::ui::ItemStyle">ICON</member> to define text, text+icon or icon only is to be displayed. Similarly for menu items, an items Style can override the application setting to display either text or icon ( note: for menu an icon only setting interpreted as icon+text ) </p>
+
+ <p>This style can be used for custom toolbars and menus, in a custom
+ toolbar an item's Style setting can used to override the toolbar
+ container setting, the style can be bitwise OR-ed with <member
+ scope="com::sun::star::ui::ItemStyle">ICON</member> to define text,
+ text+icon or icon only is to be displayed. Similarly for menu items,
+ an items Style can override the application setting to display either
+ text or icon (note: for menu an icon only setting interpreted as
+ icon+text)</p>
*/
const short TEXT = 2048;
};
commit fcffc8694807fb2962d64fc0eae519d94473ce2a
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 15:24:04 2013 +0200
Kill m_xToolBarWindow here too.
Change-Id: I8e07b798776ac06eb5a91bf6479105a2c08a073b
diff --git a/framework/inc/uielement/addonstoolbarwrapper.hxx b/framework/inc/uielement/addonstoolbarwrapper.hxx
index 310eaf6..d73c67b 100644
--- a/framework/inc/uielement/addonstoolbarwrapper.hxx
+++ b/framework/inc/uielement/addonstoolbarwrapper.hxx
@@ -51,7 +51,6 @@ class AddonsToolBarWrapper : public UIElementWrapperBase
private:
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager;
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xToolBarManager;
- com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xToolBarWindow;
com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > > m_aConfigData;
};
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx
index 3f2f366..a3617ee 100644
--- a/framework/source/uielement/addonstoolbarwrapper.cxx
+++ b/framework/source/uielement/addonstoolbarwrapper.cxx
@@ -78,7 +78,6 @@ void SAL_CALL AddonsToolBarWrapper::dispose() throw ( RuntimeException )
if ( m_xToolBarManager.is() )
m_xToolBarManager->dispose();
m_xToolBarManager.clear();
- m_xToolBarWindow.clear();
m_bDisposed = sal_True;
}
@@ -119,7 +118,6 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument
sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
pToolBar = new ToolBar( pWindow, nStyles );
- m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar );
pToolBarManager = new AddonsToolBarManager( comphelper::getComponentContext(m_xServiceManager), xFrame, m_aResourceURL, pToolBar );
pToolBar->SetToolBarManager( pToolBarManager );
m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
commit 36afd52a76973aad60f7aaa934f8d978bc709681
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 14:53:21 2013 +0200
m_xToolBarWindow is apparently unused.
Change-Id: I0f69401c46a2b3a362b7481acacc748d103faa30
diff --git a/framework/inc/uielement/toolbarwrapper.hxx b/framework/inc/uielement/toolbarwrapper.hxx
index 57611c6..37c94d7 100644
--- a/framework/inc/uielement/toolbarwrapper.hxx
+++ b/framework/inc/uielement/toolbarwrapper.hxx
@@ -74,7 +74,6 @@ class ToolBarWrapper : public ::com::sun::star::ui::XUIFunctionListener,
private:
com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xToolBarManager;
- com::sun::star::uno::Reference< com::sun::star::awt::XWindow > m_xToolBarWindow;
};
}
diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx
index a9d21cf..20cf3db 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -110,7 +110,6 @@ void SAL_CALL ToolBarWrapper::dispose() throw ( RuntimeException )
m_xToolBarManager.clear();
m_xConfigSource.clear();
m_xConfigData.clear();
- m_xToolBarWindow.clear();
m_bDisposed = sal_True;
}
@@ -155,7 +154,6 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th
sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
pToolBar = new ToolBar( pWindow, nStyles );
- m_xToolBarWindow = VCLUnoHelper::GetInterface( pToolBar );
pToolBarManager = new ToolBarManager( comphelper::getComponentContext(m_xServiceFactory), xFrame, m_aResourceURL, pToolBar );
pToolBar->SetToolBarManager( pToolBarManager );
m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY );
commit c0fb2954f3117b610197feda237bf97d99dbf778
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 14:08:35 2013 +0200
Kill unused constants.
Change-Id: I18e5db67cfa790b5a6e9db17e1823e7ce7f75598
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index c820f98..85de30c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -92,30 +92,21 @@ using namespace ::com::sun::star;
namespace framework
{
-static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
-static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
-static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
-static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
-static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
-static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
-static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible";
-static const char ITEM_DESCRIPTOR_WIDTH[] = "Width";
-static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
-
-static const sal_Int32 ITEM_DESCRIPTOR_COMMANDURL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_COMMANDURL);
-static const sal_Int32 ITEM_DESCRIPTOR_HELPURL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_HELPURL);
-static const sal_Int32 ITEM_DESCRIPTOR_TOOLTIP_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_TOOLTIP);
-static const sal_Int32 ITEM_DESCRIPTOR_CONTAINER_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_CONTAINER);
-static const sal_Int32 ITEM_DESCRIPTOR_LABEL_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_LABEL);
-static const sal_Int32 ITEM_DESCRIPTOR_TYPE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_TYPE);
-static const sal_Int32 ITEM_DESCRIPTOR_VISIBLE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_VISIBLE);
-static const sal_Int32 ITEM_DESCRIPTOR_WIDTH_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_WIDTH);
-static const sal_Int32 ITEM_DESCRIPTOR_STYLE_LEN = RTL_CONSTASCII_LENGTH(ITEM_DESCRIPTOR_STYLE);
-
-static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:";
-static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000;
-
-#define MENUPREFIX "private:resource/menubar/"
+static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
+static const char ITEM_DESCRIPTOR_HELPURL[] = "HelpURL";
+static const char ITEM_DESCRIPTOR_TOOLTIP[] = "Tooltip";
+static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
+static const char ITEM_DESCRIPTOR_LABEL[] = "Label";
+static const char ITEM_DESCRIPTOR_TYPE[] = "Type";
+static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible";
+static const char ITEM_DESCRIPTOR_WIDTH[] = "Width";
+static const char ITEM_DESCRIPTOR_STYLE[] = "Style";
+
+static const char MENUPREFIX[] = "private:resource/menubar/";
+
+static const char HELPID_PREFIX_TESTTOOL[] = ".HelpId:";
+
+static const sal_uInt16 STARTID_CUSTOMIZE_POPUPMENU = 1000;
class ImageOrientationListener : public svt::FrameStatusListener
{
commit 7e06132878a495ffb8ed9d54588e1a3ebbd0e8da
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 13:18:29 2013 +0200
equalsAsciiL() -> operator==().
Change-Id: I012fc0341df2bb6d8dd913c13c39c7e657eef235
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index f11155a..ecc51e4 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -29,55 +29,32 @@ namespace framework
{
static const char MERGE_TOOLBAR_URL[] = "URL";
-static const sal_uInt32 MERGE_TOOLBAR_URL_LEN = 3;
static const char MERGE_TOOLBAR_TITLE[] = "Title";
-static const sal_uInt32 MERGE_TOOLBAR_TITLE_LEN = 5;
static const char MERGE_TOOLBAR_IMAGEID[] = "ImageIdentifier";
-static const sal_uInt32 MERGE_TOOLBAR_IMAGEID_LEN = 15;
static const char MERGE_TOOLBAR_CONTEXT[] = "Context";
-static const sal_uInt32 MERGE_TOOLBAR_CONTEXT_LEN = 7;
static const char MERGE_TOOLBAR_TARGET[] = "Target";
-static const sal_uInt32 MERGE_TOOLBAR_TARGET_LEN = 6;
static const char MERGE_TOOLBAR_CONTROLTYPE[] = "ControlType";
-static const char MERGE_TOOLBAR_CONTROLTYPE_LEN = 11;
static const char MERGE_TOOLBAR_WIDTH[] = "Width";
-static const char MERGE_TOOLBAR_WIDTH_LEN = 5;
static const char MERGECOMMAND_ADDAFTER[] = "AddAfter";
-static const sal_uInt32 MERGECOMMAND_ADDAFTER_LEN = 8;
static const char MERGECOMMAND_ADDBEFORE[] = "AddBefore";
-static const sal_uInt32 MERGECOMMAND_ADDBEFORE_LEN = 9;
static const char MERGECOMMAND_REPLACE[] = "Replace";
-static const sal_uInt32 MERGECOMMAND_REPLACE_LEN = 7;
static const char MERGECOMMAND_REMOVE[] = "Remove";
-static const sal_uInt32 MERGECOMMAND_REMOVE_LEN = 6;
static const char MERGEFALLBACK_ADDLAST[] = "AddLast";
-static const char MERGEFALLBACK_ADDLAST_LEN = 7;
static const char MERGEFALLBACK_ADDFIRST[] = "AddFirst";
-static const char MERGEFALLBACK_ADDFIRST_LEN = 8;
static const char MERGEFALLBACK_IGNORE[] = "Ignore";
-static const char MERGEFALLBACK_IGNORE_LEN = 6;
static const char TOOLBARCONTROLLER_BUTTON[] = "Button";
-static const sal_uInt32 TOOLBARCONTROLLER_BUTTON_LEN = 6;
static const char TOOLBARCONTROLLER_COMBOBOX[] = "Combobox";
-static const sal_uInt32 TOOLBARCONTROLLER_COMBOBOX_LEN = 8;
static const char TOOLBARCONTROLLER_EDIT[] = "Editfield";
-static const sal_uInt32 TOOLBARCONTROLLER_EDIT_LEN = 9;
static const char TOOLBARCONTROLLER_SPINFIELD[] = "Spinfield";
-static const sal_uInt32 TOOLBARCONTROLLER_SPINFIELD_LEN = 9;
static const char TOOLBARCONTROLLER_IMGBUTTON[] = "ImageButton";
-static const sal_uInt32 TOOLBARCONTROLLER_IMGBUTTON_LEN = 11;
static const char TOOLBARCONTROLLER_DROPDOWNBOX[] = "Dropdownbox";
-static const sal_uInt32 TOOLBARCONTROLLER_DROPDOWNBOX_LEN = 11;
static const char TOOLBARCONTROLLER_DROPDOWNBTN[] = "DropdownButton";
-static const sal_uInt32 TOOLBARCONTROLLER_DROPDOWNBTN_LEN = 14;
static const char TOOLBARCONTROLLER_TOGGLEDDBTN[] = "ToggleDropdownButton";
-static const sal_uInt32 TOOLBARCONTROLLER_TOGGLEDDBTN_LEN = 20;
static const char TOOLBOXITEM_SEPARATOR_STR[] = "private:separator";
-static const sal_uInt16 TOOLBOXITEM_SEPARATOR_STR_LEN = sizeof( TOOLBOXITEM_SEPARATOR_STR )-1;
using namespace ::com::sun::star;
@@ -215,19 +192,19 @@ void ToolBarMerger::ConvertSequenceToValues(
{
for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
{
- if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_URL, MERGE_TOOLBAR_URL_LEN ))
+ if ( rSequence[i].Name == MERGE_TOOLBAR_URL )
rSequence[i].Value >>= rCommandURL;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_TITLE, MERGE_TOOLBAR_TITLE_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_TITLE )
rSequence[i].Value >>= rLabel;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_IMAGEID, MERGE_TOOLBAR_IMAGEID_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_IMAGEID )
rSequence[i].Value >>= rImageIdentifier;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_CONTEXT, MERGE_TOOLBAR_CONTEXT_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_CONTEXT )
rSequence[i].Value >>= rContext;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_TARGET, MERGE_TOOLBAR_TARGET_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_TARGET )
rSequence[i].Value >>= rTarget;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_CONTROLTYPE, MERGE_TOOLBAR_CONTROLTYPE_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_CONTROLTYPE )
rSequence[i].Value >>= rControlType;
- else if ( rSequence[i].Name.equalsAsciiL( MERGE_TOOLBAR_WIDTH, MERGE_TOOLBAR_WIDTH_LEN ))
+ else if ( rSequence[i].Name == MERGE_TOOLBAR_WIDTH )
{
sal_Int32 aValue = 0;
rSequence[i].Value >>= aValue;
@@ -347,13 +324,13 @@ bool ToolBarMerger::ProcessMergeOperation(
const OUString& rMergeCommandParameter,
const AddonToolbarItemContainer& rItems )
{
- if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDAFTER, MERGECOMMAND_ADDAFTER_LEN ))
+ if ( rMergeCommand == MERGECOMMAND_ADDAFTER )
return MergeItems( xFrame, pToolbar, nPos, 1, rItemId, rCommandMap, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDBEFORE, MERGECOMMAND_ADDBEFORE_LEN ))
+ else if ( rMergeCommand == MERGECOMMAND_ADDBEFORE )
return MergeItems( xFrame, pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REPLACE, MERGECOMMAND_REPLACE_LEN ))
+ else if ( rMergeCommand == MERGECOMMAND_REPLACE )
return ReplaceItem( xFrame, pToolbar, nPos, rItemId, rCommandMap, rModuleIdentifier, rItems );
- else if ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REMOVE, MERGECOMMAND_REMOVE_LEN ))
+ else if ( rMergeCommand == MERGECOMMAND_REMOVE )
return RemoveItems( pToolbar, nPos, rMergeCommandParameter );
return false;
@@ -416,18 +393,18 @@ bool ToolBarMerger::ProcessMergeFallback(
const OUString& rMergeFallback,
const AddonToolbarItemContainer& rItems )
{
- if (( rMergeFallback.equalsAsciiL( MERGEFALLBACK_IGNORE, MERGEFALLBACK_IGNORE_LEN )) ||
- ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REPLACE, MERGECOMMAND_REPLACE_LEN )) ||
- ( rMergeCommand.equalsAsciiL( MERGECOMMAND_REMOVE, MERGECOMMAND_REMOVE_LEN )) )
+ if (( rMergeFallback == MERGEFALLBACK_IGNORE ) ||
+ ( rMergeCommand == MERGECOMMAND_REPLACE ) ||
+ ( rMergeCommand == MERGECOMMAND_REMOVE ) )
{
return true;
}
- else if (( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDBEFORE, MERGECOMMAND_ADDBEFORE_LEN )) ||
- ( rMergeCommand.equalsAsciiL( MERGECOMMAND_ADDAFTER, MERGECOMMAND_ADDAFTER_LEN )) )
+ else if (( rMergeCommand == MERGECOMMAND_ADDBEFORE ) ||
+ ( rMergeCommand == MERGECOMMAND_ADDAFTER ) )
{
- if ( rMergeFallback.equalsAsciiL( MERGEFALLBACK_ADDFIRST, MERGEFALLBACK_ADDFIRST_LEN ))
+ if ( rMergeFallback == MERGEFALLBACK_ADDFIRST )
return MergeItems( xFrame, pToolbar, 0, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
- else if ( rMergeFallback.equalsAsciiL( MERGEFALLBACK_ADDLAST, MERGEFALLBACK_ADDLAST_LEN ))
+ else if ( rMergeFallback == MERGEFALLBACK_ADDLAST )
return MergeItems( xFrame, pToolbar, TOOLBOX_APPEND, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
}
@@ -499,7 +476,7 @@ bool ToolBarMerger::MergeItems(
if ( nInsPos > sal_Int32( pToolbar->GetItemCount() ))
nInsPos = TOOLBOX_APPEND;
- if ( rItem.aCommandURL.equalsAsciiL( TOOLBOXITEM_SEPARATOR_STR, TOOLBOXITEM_SEPARATOR_STR_LEN ))
+ if ( rItem.aCommandURL == TOOLBOXITEM_SEPARATOR_STR )
pToolbar->InsertSeparator( sal_uInt16( nInsPos ));
else
{
@@ -660,22 +637,22 @@ bool ToolBarMerger::RemoveItems(
{
::cppu::OWeakObject* pResult( 0 );
- if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_BUTTON, TOOLBARCONTROLLER_BUTTON_LEN ))
+ if ( rControlType == TOOLBARCONTROLLER_BUTTON )
pResult = new ButtonToolbarController( rxContext, pToolbar, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_COMBOBOX, TOOLBARCONTROLLER_COMBOBOX_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_COMBOBOX )
pResult = new ComboboxToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_EDIT, TOOLBARCONTROLLER_EDIT_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_EDIT )
pResult = new EditToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_SPINFIELD, TOOLBARCONTROLLER_SPINFIELD_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_SPINFIELD )
pResult = new SpinfieldToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_IMGBUTTON, TOOLBARCONTROLLER_IMGBUTTON_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_IMGBUTTON )
pResult = new ImageButtonToolbarController( rxContext, xFrame, pToolbar, nId, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_DROPDOWNBOX, TOOLBARCONTROLLER_DROPDOWNBOX_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_DROPDOWNBOX )
pResult = new DropdownToolbarController( rxContext, xFrame, pToolbar, nId, nWidth, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_DROPDOWNBTN, TOOLBARCONTROLLER_DROPDOWNBTN_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_DROPDOWNBTN )
pResult = new ToggleButtonToolbarController( rxContext, xFrame, pToolbar, nId,
ToggleButtonToolbarController::STYLE_DROPDOWNBUTTON, rCommandURL );
- else if ( rControlType.equalsAsciiL( TOOLBARCONTROLLER_TOGGLEDDBTN, TOOLBARCONTROLLER_TOGGLEDDBTN_LEN ))
+ else if ( rControlType == TOOLBARCONTROLLER_TOGGLEDDBTN )
pResult = new ToggleButtonToolbarController( rxContext, xFrame, pToolbar, nId,
ToggleButtonToolbarController::STYLE_TOGGLE_DROPDOWNBUTTON, rCommandURL );
else
commit ca123c1e0d85b9c1332d6b6911695215df112c9a
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 12:33:55 2013 +0200
Kill unused member variable.
Change-Id: Iaad6700b68d70f5193ee723e868b9efc29a1cd04
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 8b77a96..572bb6b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -179,7 +179,6 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
m_bSmallSymbols : 1,
m_bModuleIdentified : 1,
m_bAddedToTaskPaneList : 1,
- m_bVerticalTextEnabled : 1,
m_bFrameActionRegistered : 1,
m_bUpdateControllers : 1,
m_bImageOrientationRegistered : 1,
commit 1dd6e02f15266560c59948c144983ca2ec06d463
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 12:33:21 2013 +0200
sal_Bool -> bool.
Change-Id: I12eaceb304ef67c533dc23db3f6b666bdb6a7a1f
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index c4f9c7b..8b77a96 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -175,15 +175,15 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap;
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,
- m_bAddedToTaskPaneList : 1,
- m_bVerticalTextEnabled : 1,
- m_bFrameActionRegistered : 1,
- m_bUpdateControllers : 1;
- sal_Bool m_bImageOrientationRegistered : 1,
- m_bImageMirrored : 1;
+ bool m_bDisposed : 1,
+ m_bSmallSymbols : 1,
+ m_bModuleIdentified : 1,
+ m_bAddedToTaskPaneList : 1,
+ m_bVerticalTextEnabled : 1,
+ m_bFrameActionRegistered : 1,
+ m_bUpdateControllers : 1,
+ m_bImageOrientationRegistered : 1,
+ m_bImageMirrored : 1;
long m_lImageRotation;
ToolBar* m_pToolBar;
OUString m_aModuleIdentifier;
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 5d1000c..c820f98 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -213,14 +213,14 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext,
ToolBar* pToolBar ) :
ThreadHelpBase( &Application::GetSolarMutex() ),
OWeakObject(),
- m_bDisposed( sal_False ),
+ m_bDisposed( false ),
m_bSmallSymbols( !SvtMiscOptions().AreCurrentSymbolsLarge() ),
- m_bModuleIdentified( sal_False ),
- m_bAddedToTaskPaneList( sal_True ),
- m_bFrameActionRegistered( sal_False ),
- m_bUpdateControllers( sal_False ),
- m_bImageOrientationRegistered( sal_False ),
- m_bImageMirrored( sal_False ),
+ m_bModuleIdentified( false ),
+ m_bAddedToTaskPaneList( true ),
+ m_bFrameActionRegistered( false ),
+ m_bUpdateControllers( false ),
+ m_bImageOrientationRegistered( false ),
+ m_bImageMirrored( false ),
m_lImageRotation( 0 ),
m_pToolBar( pToolBar ),
m_aResourceName( rResourceName ),
@@ -296,7 +296,7 @@ void ToolBarManager::Destroy()
if ( pWindow )
((SystemWindow *)pWindow)->GetTaskPaneList()->RemoveWindow( m_pToolBar );
- m_bAddedToTaskPaneList = sal_False;
+ m_bAddedToTaskPaneList = false;
}
// Delete the additional add-ons data
@@ -465,7 +465,7 @@ void ToolBarManager::UpdateControllers()
if ( !m_bUpdateControllers )
{
- m_bUpdateControllers = sal_True;
+ m_bUpdateControllers = true;
ToolBarControllerMap::iterator pIter = m_aControllerMap.begin();
while ( pIter != m_aControllerMap.end() )
@@ -482,7 +482,7 @@ void ToolBarManager::UpdateControllers()
++pIter;
}
}
- m_bUpdateControllers = sal_False;
+ m_bUpdateControllers = false;
}
//for update toolbar controller via Support Visible
@@ -492,7 +492,7 @@ void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::
if ( !m_bUpdateControllers )
{
- m_bUpdateControllers = sal_True;
+ m_bUpdateControllers = true;
try
{ if(xController.is())
{
@@ -507,7 +507,7 @@ void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::
}
- m_bUpdateControllers = sal_False;
+ m_bUpdateControllers = false;
}
void ToolBarManager::frameAction( const FrameActionEvent& Action )
@@ -666,7 +666,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException )
m_xModuleAcceleratorManager.clear();
m_xDocAcceleratorManager.clear();
- m_bDisposed = sal_True;
+ m_bDisposed = true;
}
}
@@ -817,7 +817,7 @@ uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const
Reference< XModuleManager2 > xModuleManager = ModuleManager::create( m_xContext );
Reference< XInterface > xIfac( m_xFrame, UNO_QUERY );
- m_bModuleIdentified = sal_True;
+ m_bModuleIdentified = true;
m_aModuleIdentifier = xModuleManager->identify( xIfac );
if ( !m_aModuleIdentifier.isEmpty() )
@@ -1124,7 +1124,7 @@ void ToolBarManager::AddFrameActionListener()
{
if ( !m_bFrameActionRegistered && m_xFrame.is() )
{
- m_bFrameActionRegistered = sal_True;
+ m_bFrameActionRegistered = true;
m_xFrame->addFrameActionListener( Reference< XFrameActionListener >(
static_cast< ::cppu::OWeakObject *>( this ), UNO_QUERY ));
}
@@ -1134,7 +1134,7 @@ void ToolBarManager::AddImageOrientationListener()
{
if ( !m_bImageOrientationRegistered && m_xFrame.is() )
{
- m_bImageOrientationRegistered = sal_True;
+ m_bImageOrientationRegistered = true;
ImageOrientationListener* pImageOrientation = new ImageOrientationListener(
Reference< XStatusListener >( static_cast< ::cppu::OWeakObject *>( this ), UNO_QUERY ),
m_xContext,
commit be91ca51ee5da0c88de1ba23b3d384731b0dd610
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Apr 9 12:23:16 2013 +0200
Include is better here.
Change-Id: I66893bb2ce7a89aac44b20dc38aa405ae868a0d8
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 96497b6..c4f9c7b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -38,6 +38,7 @@
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/frame/XSubToolbarController.hpp>
+#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
@@ -50,20 +51,6 @@
#include <vcl/toolbox.hxx>
#include <vcl/accel.hxx>
-namespace com
-{
- namespace sun
- {
- namespace star
- {
- namespace frame
- {
- class XLayoutManager;
- }
- }
- }
-}
-
namespace framework
{
More information about the Libreoffice-commits
mailing list