[Libreoffice-commits] core.git: framework/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Wed Dec 16 03:10:41 PST 2015
framework/source/fwe/xml/toolboxdocumenthandler.cxx | 59 +++++++++-----------
1 file changed, 29 insertions(+), 30 deletions(-)
New commits:
commit 0db3361527f799be6cadf5bedb8a37976fb0a39d
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Tue Dec 15 09:29:20 2015 +0100
Fix indentation
Change-Id: Ie0b842cd35ca05e4adfc0b8692423e0a91e1739c
diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
index 912e2e1..c002662 100644
--- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx
+++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx
@@ -162,8 +162,8 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde
m_nHashCode_Style_DropDown = OUString( ATTRIBUTE_ITEMSTYLE_DROPDOWN ).hashCode();
m_nHashCode_Style_Repeat = OUString( ATTRIBUTE_ITEMSTYLE_REPEAT ).hashCode();
m_nHashCode_Style_DropDownOnly = OUString( ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY ).hashCode();
- m_nHashCode_Style_Text = OUString( ATTRIBUTE_ITEMSTYLE_TEXT ).hashCode();
- m_nHashCode_Style_Image = OUString( ATTRIBUTE_ITEMSTYLE_IMAGE ).hashCode();
+ m_nHashCode_Style_Text = OUString( ATTRIBUTE_ITEMSTYLE_TEXT ).hashCode();
+ m_nHashCode_Style_Image = OUString( ATTRIBUTE_ITEMSTYLE_IMAGE ).hashCode();
m_bToolBarStartFound = false;
m_bToolBarEndFound = false;
@@ -216,43 +216,42 @@ throw( SAXException, RuntimeException, std::exception )
aErrorMessage += "Element 'toolbar:toolbar' cannot be embedded into 'toolbar:toolbar'!";
throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
}
- else
- {
- // Check if we have a UI name set in our XML file
- OUString aUIName;
- for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ )
- {
+ else
+ {
+ // Check if we have a UI name set in our XML file
+ OUString aUIName;
+ for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ )
+ {
pToolBoxEntry = m_aToolBoxMap.find( xAttribs->getNameByIndex( n ) );
if ( pToolBoxEntry != m_aToolBoxMap.end() )
{
- switch ( pToolBoxEntry->second )
- {
- case TB_ATTRIBUTE_UINAME:
+ switch ( pToolBoxEntry->second )
+ {
+ case TB_ATTRIBUTE_UINAME:
aUIName = xAttribs->getValueByIndex( n );
- break;
- default:
- break;
- }
- }
+ break;
+ default:
+ break;
}
-
- if ( !aUIName.isEmpty() )
+ }
+ }
+ if ( !aUIName.isEmpty() )
+ {
+ // Try to set UI name as a container property
+ Reference< XPropertySet > xPropSet( m_rItemContainer, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ xPropSet->setPropertyValue("UIName", makeAny( aUIName ) );
+ }
+ catch ( const UnknownPropertyException& )
{
- // Try to set UI name as a container property
- Reference< XPropertySet > xPropSet( m_rItemContainer, UNO_QUERY );
- if ( xPropSet.is() )
- {
- try
- {
- xPropSet->setPropertyValue("UIName", makeAny( aUIName ) );
- }
- catch ( const UnknownPropertyException& )
- {
- }
- }
}
}
+ }
+ }
m_bToolBarStartFound = true;
}
break;
More information about the Libreoffice-commits
mailing list