Remove ToolBarLayoutManager::implts_createUIElement()
There is no need for this function, merge it into createUIElement. This really helps when I'm looking at a backtrace in gdb. Change-Id: I005b5161eb2cc8acf509ae7ba4e41186969904d1 Reviewed-on: https://gerrit.libreoffice.org/9309 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
This commit is contained in:
@@ -462,7 +462,29 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL )
|
|||||||
UIElement aToolbarElement = implts_findToolbar( rResourceURL );
|
UIElement aToolbarElement = implts_findToolbar( rResourceURL );
|
||||||
if ( !aToolbarElement.m_xUIElement.is() )
|
if ( !aToolbarElement.m_xUIElement.is() )
|
||||||
{
|
{
|
||||||
uno::Reference< ui::XUIElement > xUIElement = implts_createElement( rResourceURL );
|
uno::Reference< ui::XUIElement > xUIElement;
|
||||||
|
|
||||||
|
uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
|
||||||
|
aPropSeq[0].Name = "Frame";
|
||||||
|
aPropSeq[0].Value <<= m_xFrame;
|
||||||
|
aPropSeq[1].Name = "Persistent";
|
||||||
|
aPropSeq[1].Value <<= true;
|
||||||
|
uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager );
|
||||||
|
aReadLock.clear();
|
||||||
|
|
||||||
|
implts_setToolbarCreation( true );
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ( xUIElementFactory.is() )
|
||||||
|
xUIElement = xUIElementFactory->createUIElement( rResourceURL, aPropSeq );
|
||||||
|
}
|
||||||
|
catch (const container::NoSuchElementException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
catch (const lang::IllegalArgumentException&)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
implts_setToolbarCreation( false );
|
||||||
|
|
||||||
bool bVisible( false );
|
bool bVisible( false );
|
||||||
bool bFloating( false );
|
bool bFloating( false );
|
||||||
@@ -1374,36 +1396,6 @@ bool ToolbarLayoutManager::implts_isToolbarCreationActive()
|
|||||||
return m_bToolbarCreation;
|
return m_bToolbarCreation;
|
||||||
}
|
}
|
||||||
|
|
||||||
uno::Reference< ui::XUIElement > ToolbarLayoutManager::implts_createElement( const OUString& aName )
|
|
||||||
{
|
|
||||||
uno::Reference< ui::XUIElement > xUIElement;
|
|
||||||
|
|
||||||
SolarMutexClearableGuard aReadLock;
|
|
||||||
uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
|
|
||||||
aPropSeq[0].Name = "Frame";
|
|
||||||
aPropSeq[0].Value <<= m_xFrame;
|
|
||||||
aPropSeq[1].Name = "Persistent";
|
|
||||||
aPropSeq[1].Value <<= true;
|
|
||||||
uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager );
|
|
||||||
aReadLock.clear();
|
|
||||||
|
|
||||||
implts_setToolbarCreation( true );
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if ( xUIElementFactory.is() )
|
|
||||||
xUIElement = xUIElementFactory->createUIElement( aName, aPropSeq );
|
|
||||||
}
|
|
||||||
catch (const container::NoSuchElementException&)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
catch (const lang::IllegalArgumentException&)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
implts_setToolbarCreation( false );
|
|
||||||
|
|
||||||
return xUIElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno::Reference< awt::XDockableWindow >& rDockWindow )
|
void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno::Reference< awt::XDockableWindow >& rDockWindow )
|
||||||
{
|
{
|
||||||
SolarMutexClearableGuard aReadLock;
|
SolarMutexClearableGuard aReadLock;
|
||||||
|
@@ -258,7 +258,6 @@ class ToolbarLayoutManager : public ::cppu::WeakImplHelper3< ::com::sun::star::a
|
|||||||
void implts_createNonContextSensitiveToolBars();
|
void implts_createNonContextSensitiveToolBars();
|
||||||
void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq );
|
void implts_createCustomToolBars( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >& aCustomTbxSeq );
|
||||||
void implts_createCustomToolBar( const OUString& aTbxResName, const OUString& aTitle );
|
void implts_createCustomToolBar( const OUString& aTbxResName, const OUString& aTitle );
|
||||||
css::uno::Reference< css::ui::XUIElement > implts_createElement( const OUString& aName );
|
|
||||||
void implts_setToolbarCreation( bool bStart = true );
|
void implts_setToolbarCreation( bool bStart = true );
|
||||||
bool implts_isToolbarCreationActive();
|
bool implts_isToolbarCreationActive();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user