diff options
-rw-r--r-- | framework/source/xml/toolboxdocumenthandler.cxx | 240 |
1 files changed, 120 insertions, 120 deletions
diff --git a/framework/source/xml/toolboxdocumenthandler.cxx b/framework/source/xml/toolboxdocumenthandler.cxx index 4cd508beca..e48dd41a37 100644 --- a/framework/source/xml/toolboxdocumenthandler.cxx +++ b/framework/source/xml/toolboxdocumenthandler.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: toolboxdocumenthandler.cxx,v $ - * $Revision: 1.16 $ + * $Revision: 1.17 $ * * This file is part of OpenOffice.org. * @@ -65,7 +65,6 @@ // namespace //_________________________________________________________________________________________________________________ -using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; @@ -87,9 +86,9 @@ static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible"; static const char ITEM_DESCRIPTOR_WIDTH[] = "Width"; static void ExtractToolbarParameters( const Sequence< PropertyValue > rProp, - OUString& rCommandURL, - OUString& rLabel, - OUString& rHelpURL, + ::rtl::OUString& rCommandURL, + ::rtl::OUString& rLabel, + ::rtl::OUString& rHelpURL, sal_Int16& rWidth, sal_Bool& rVisible, sal_Int16& rType ) @@ -140,8 +139,8 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO }; OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) : - ThreadHelpBase( &Application::GetSolarMutex() ), - ::cppu::OWeakObject(), + ThreadHelpBase( &Application::GetSolarMutex() ), + ::cppu::OWeakObject(), m_rItemContainer( rItemContainer ), m_aType( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )), m_aLabel( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL )), @@ -150,37 +149,37 @@ OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XInde m_aIsVisible( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_VISIBLE )), m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL )) { - OUString aNamespaceToolBar( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )); - OUString aNamespaceXLink( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )); - OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( XMLNS_FILTER_SEPARATOR )); + ::rtl::OUString aNamespaceToolBar( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )); + ::rtl::OUString aNamespaceXLink( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )); + ::rtl::OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( XMLNS_FILTER_SEPARATOR )); // create hash map for ( int i = 0; i < (int)TB_XML_ENTRY_COUNT; i++ ) { if ( ToolBoxEntries[i].nNamespace == TB_NS_TOOLBAR ) { - OUString temp( aNamespaceToolBar ); + ::rtl::OUString temp( aNamespaceToolBar ); temp += aSeparator; - temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); + temp += ::rtl::OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); m_aToolBoxMap.insert( ToolBoxHashMap::value_type( temp, (ToolBox_XML_Entry)i ) ); } else { - OUString temp( aNamespaceXLink ); + ::rtl::OUString temp( aNamespaceXLink ); temp += aSeparator; - temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); + temp += ::rtl::OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); m_aToolBoxMap.insert( ToolBoxHashMap::value_type( temp, (ToolBox_XML_Entry)i ) ); } } // pre-calculate a hash code for all style strings to speed up xml read process - m_nHashCode_Style_Radio = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_RADIO ).hashCode(); - m_nHashCode_Style_Auto = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_AUTO ).hashCode(); - m_nHashCode_Style_Left = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_LEFT ).hashCode(); - m_nHashCode_Style_AutoSize = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_AUTOSIZE ).hashCode(); - m_nHashCode_Style_DropDown = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWN ).hashCode(); - m_nHashCode_Style_Repeat = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_REPEAT ).hashCode(); - m_nHashCode_Style_DropDownOnly = OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY ).hashCode(); + m_nHashCode_Style_Radio = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_RADIO ).hashCode(); + m_nHashCode_Style_Auto = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_AUTO ).hashCode(); + m_nHashCode_Style_Left = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_LEFT ).hashCode(); + m_nHashCode_Style_AutoSize = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_AUTOSIZE ).hashCode(); + m_nHashCode_Style_DropDown = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWN ).hashCode(); + m_nHashCode_Style_Repeat = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_REPEAT ).hashCode(); + m_nHashCode_Style_DropDownOnly = ::rtl::OUString::createFromAscii( ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY ).hashCode(); m_bToolBarStartFound = sal_False; m_bToolBarEndFound = sal_False; @@ -220,14 +219,14 @@ throw( SAXException, RuntimeException ) if (( m_bToolBarStartFound && !m_bToolBarEndFound ) || ( !m_bToolBarStartFound && m_bToolBarEndFound ) ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'toolbar' found!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'toolbar' found!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } void SAL_CALL OReadToolBoxDocumentHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttribs ) + const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -241,14 +240,14 @@ throw( SAXException, RuntimeException ) { if ( m_bToolBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbar' cannot be embeded into 'toolbar:toolbar'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbar' cannot be embeded into 'toolbar:toolbar'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } else { // Check if we have a UI name set in our XML file - OUString aUIName; + ::rtl::OUString aUIName; for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ ) { pToolBoxEntry = m_aToolBoxMap.find( xAttribs->getNameByIndex( n ) ); @@ -262,7 +261,7 @@ throw( SAXException, RuntimeException ) default: break; } - } + } } if ( aUIName.getLength() > 0 ) @@ -273,14 +272,14 @@ throw( SAXException, RuntimeException ) { try { - xPropSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" )), makeAny( aUIName ) ); + xPropSet->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" )), makeAny( aUIName ) ); } catch ( UnknownPropertyException& ) { } } } - } + } m_bToolBarStartFound = sal_True; } @@ -290,8 +289,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbaritem' must be embeded into element 'toolbar:toolbar'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbaritem' must be embeded into element 'toolbar:toolbar'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -300,19 +299,19 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbaritem is not a container!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbaritem is not a container!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } - OUString aAttribute; + ::rtl::OUString aAttribute; sal_Bool bAttributeURL = sal_False; m_bToolBarItemStartFound = sal_True; - OUString aLabel; - OUString aCommandURL; - OUString aHelpURL; - OUString aBitmapName; + ::rtl::OUString aLabel; + ::rtl::OUString aCommandURL; + ::rtl::OUString aHelpURL; + ::rtl::OUString aBitmapName; sal_uInt16 nItemBits( 0 ); sal_uInt16 nWidth( 0 ); sal_uInt16 nUserDef( 0 ); @@ -358,8 +357,8 @@ throw( SAXException, RuntimeException ) bVisible = sal_False; else { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute toolbar:visible must have value 'true' or 'false'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute toolbar:visible must have value 'true' or 'false'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -386,12 +385,12 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_STYLE: { // read space seperated item style list - OUString aTemp = xAttribs->getValueByIndex( n ); + ::rtl::OUString aTemp = xAttribs->getValueByIndex( n ); sal_Int32 nIndex = 0; do { - OUString aToken = aTemp.getToken( 0, ' ', nIndex ); + ::rtl::OUString aToken = aTemp.getToken( 0, ' ', nIndex ); if ( aToken.getLength() > 0 ) { sal_Int32 nHashCode = aToken.hashCode(); @@ -421,8 +420,8 @@ throw( SAXException, RuntimeException ) if ( !bAttributeURL ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute toolbar:url must have a value!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute toolbar:url must have a value!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -455,8 +454,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarspace is not a container!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarspace is not a container!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -480,8 +479,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarbreak is not a container!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarbreak is not a container!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -505,8 +504,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarseparator is not a container!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarseparator is not a container!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -524,12 +523,12 @@ throw( SAXException, RuntimeException ) break; default: - break; + break; } } } -void SAL_CALL OReadToolBoxDocumentHandler::endElement(const OUString& aName) +void SAL_CALL OReadToolBoxDocumentHandler::endElement(const ::rtl::OUString& aName) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -543,8 +542,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar' found, but no start element 'toolbar'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar' found, but no start element 'toolbar'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -556,8 +555,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbaritem' found, but no start element 'toolbar:toolbaritem'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbaritem' found, but no start element 'toolbar:toolbaritem'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -569,8 +568,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarBreakStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarbreak' found, but no start element 'toolbar:toolbarbreak'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarbreak' found, but no start element 'toolbar:toolbarbreak'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -582,8 +581,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarSpaceStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarspace' found, but no start element 'toolbar:toolbarspace'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarspace' found, but no start element 'toolbar:toolbarspace'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -595,8 +594,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarSeparatorStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarseparator' found, but no start element 'toolbar:toolbarseparator'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarseparator' found, but no start element 'toolbar:toolbarseparator'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -605,23 +604,23 @@ throw( SAXException, RuntimeException ) break; default: - break; + break; } } } -void SAL_CALL OReadToolBoxDocumentHandler::characters(const OUString&) +void SAL_CALL OReadToolBoxDocumentHandler::characters(const ::rtl::OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadToolBoxDocumentHandler::ignorableWhitespace(const OUString&) +void SAL_CALL OReadToolBoxDocumentHandler::ignorableWhitespace(const ::rtl::OUString&) throw( SAXException, RuntimeException ) { } void SAL_CALL OReadToolBoxDocumentHandler::processingInstruction( - const OUString& /*aTarget*/, const OUString& /*aData*/ ) + const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ ) throw( SAXException, RuntimeException ) { } @@ -644,10 +643,10 @@ throw( SAXException, RuntimeException ) if ( m_xLocator.is() ) { snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() )); - return OUString::createFromAscii( buffer ); + return ::rtl::OUString::createFromAscii( buffer ); } else - return OUString(); + return ::rtl::OUString(); } @@ -655,18 +654,18 @@ throw( SAXException, RuntimeException ) // OWriteToolBoxDocumentHandler //_________________________________________________________________________________________________________________ -OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler( +OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler( const Reference< XIndexAccess >& rItemAccess, Reference< XDocumentHandler >& rWriteDocumentHandler ) : - ThreadHelpBase( &Application::GetSolarMutex() ), + ThreadHelpBase( &Application::GetSolarMutex() ), m_xWriteDocumentHandler( rWriteDocumentHandler ), m_rItemAccess( rItemAccess ) { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); - m_aXMLXlinkNS = OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX )); - m_aXMLToolbarNS = OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR_PREFIX )); + m_aAttributeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); + m_aXMLXlinkNS = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX )); + m_aXMLToolbarNS = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR_PREFIX )); } OWriteToolBoxDocumentHandler::~OWriteToolBoxDocumentHandler() @@ -684,17 +683,17 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); if ( xExtendedDocHandler.is() ) { - xExtendedDocHandler->unknown( OUString( RTL_CONSTASCII_USTRINGPARAM( TOOLBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + xExtendedDocHandler->unknown( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( TOOLBAR_DOCTYPE )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); } - OUString aUIName; + ::rtl::OUString aUIName; Reference< XPropertySet > xPropSet( m_rItemAccess, UNO_QUERY ); if ( xPropSet.is() ) { try { - Any a = xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))); + Any a = xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))); a >>= aUIName; } catch ( UnknownPropertyException& ) @@ -705,21 +704,21 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_TOOLBAR )), + pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_TOOLBAR )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )) ); - pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )), + pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) ); if ( aUIName.getLength() > 0 ) - pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )), + pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )), m_aAttributeType, aUIName ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )), pList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); sal_Int32 nItemCount = m_rItemAccess->getCount(); Any aAny; @@ -729,10 +728,10 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw Sequence< PropertyValue > aProps; aAny = m_rItemAccess->getByIndex( nItemPos ); if ( aAny >>= aProps ) - { - OUString aCommandURL; - OUString aLabel; - OUString aHelpURL; + { + ::rtl::OUString aCommandURL; + ::rtl::OUString aLabel; + ::rtl::OUString aHelpURL; sal_Bool bVisible( sal_True ); sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT ); sal_Int16 nWidth( 0 ); @@ -749,9 +748,9 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw } } - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); m_xWriteDocumentHandler->endDocument(); } @@ -759,10 +758,10 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw // protected member functions //_________________________________________________________________________________________________________________ -void OWriteToolBoxDocumentHandler::WriteToolBoxItem( - const OUString& rCommandURL, - const OUString& rLabel, - const OUString& rHelpURL, +void OWriteToolBoxDocumentHandler::WriteToolBoxItem( + const ::rtl::OUString& rCommandURL, + const ::rtl::OUString& rLabel, + const ::rtl::OUString& rHelpURL, sal_Int16 nWidth, sal_Bool bVisible ) throw ( SAXException, RuntimeException ) @@ -773,7 +772,7 @@ throw ( SAXException, RuntimeException ) if ( m_aAttributeURL.getLength() == 0 ) { m_aAttributeURL = m_aXMLXlinkNS; - m_aAttributeURL += OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL )); + m_aAttributeURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL )); } // save required attribute (URL) @@ -781,63 +780,64 @@ throw ( SAXException, RuntimeException ) if ( rLabel.getLength() > 0 ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )), + pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )), m_aAttributeType, rLabel ); } if ( bVisible == sal_False ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_VISIBLE )), + pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_VISIBLE )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) ); } if ( rHelpURL.getLength() > 0 ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )), + pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )), m_aAttributeType, rHelpURL ); } if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLToolbarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), + pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), m_aAttributeType, - OUString::valueOf( sal_Int32( nWidth )) ); + ::rtl::OUString::valueOf( sal_Int32( nWidth )) ); } - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARITEM )), xList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARITEM )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARITEM )), xList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARITEM )) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxSpace() throw ( SAXException, RuntimeException ) { - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSPACE )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSPACE )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSPACE )), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSPACE )) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxBreak() throw ( SAXException, RuntimeException ) { - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARBREAK )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARBREAK )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARBREAK )), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARBREAK )) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxSeparator() throw ( SAXException, RuntimeException ) { - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSEPARATOR )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSEPARATOR )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSEPARATOR )), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBARSEPARATOR )) ); } } // namespace framework + |