diff options
author | Krisztian Pinter <pin.terminator@gmail.com> | 2013-03-08 03:07:46 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-03-08 02:45:23 +0000 |
commit | fd4380759d67bcfa582dd8880077ea8445ab8a06 (patch) | |
tree | 606dee7c3f7e0b6987976302865dfc2a4ac77570 /framework/source/fwe/xml | |
parent | 925138ec7f0a162bd3d984935849226ad91126ca (diff) |
RTL_CONSTASCII_USTRINGPARAM and ::rtl:: removals
Change-Id: Ief6418425676d6943993513c4d05c8d22e4740cf
Reviewed-on: https://gerrit.libreoffice.org/2470
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'framework/source/fwe/xml')
-rw-r--r-- | framework/source/fwe/xml/menudocumenthandler.cxx | 234 | ||||
-rw-r--r-- | framework/source/fwe/xml/saxnamespacefilter.cxx | 38 | ||||
-rw-r--r-- | framework/source/fwe/xml/statusbardocumenthandler.cxx | 176 | ||||
-rw-r--r-- | framework/source/fwe/xml/toolboxdocumenthandler.cxx | 256 | ||||
-rw-r--r-- | framework/source/fwe/xml/xmlnamespaces.cxx | 34 |
5 files changed, 369 insertions, 369 deletions
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx index 9e498de9e6cb..b9653dd176b1 100644 --- a/framework/source/fwe/xml/menudocumenthandler.cxx +++ b/framework/source/fwe/xml/menudocumenthandler.cxx @@ -116,9 +116,9 @@ MenuStyleItem MenuItemStyles[ ] = { sal_Int32 nMenuStyleItemEntries = (sizeof (MenuItemStyles) / sizeof (MenuItemStyles[0])); static void ExtractMenuParameters( const Sequence< PropertyValue > rProp, - ::rtl::OUString& rCommandURL, - ::rtl::OUString& rLabel, - ::rtl::OUString& rHelpURL, + OUString& rCommandURL, + OUString& rLabel, + OUString& rHelpURL, Reference< XIndexAccess >& rSubMenu, sal_Int16& rType, sal_Int16& rStyle ) @@ -160,12 +160,12 @@ static void ExtractMenuParameters( const Sequence< PropertyValue > rProp, ReadMenuDocumentHandlerBase::ReadMenuDocumentHandlerBase() : m_xLocator( 0 ), m_xReader( 0 ), - m_aType( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )), - m_aLabel( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL )), - m_aContainer( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_CONTAINER )), - m_aHelpURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL )), - m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL )), - m_aStyle( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE )) + m_aType( ITEM_DESCRIPTOR_TYPE ), + m_aLabel( ITEM_DESCRIPTOR_LABEL ), + m_aContainer( ITEM_DESCRIPTOR_CONTAINER ), + m_aHelpURL( ITEM_DESCRIPTOR_HELPURL ), + m_aCommandURL( ITEM_DESCRIPTOR_COMMANDURL ), + m_aStyle( ITEM_DESCRIPTOR_STYLE ) { } @@ -174,13 +174,13 @@ ReadMenuDocumentHandlerBase::~ReadMenuDocumentHandlerBase() } void SAL_CALL ReadMenuDocumentHandlerBase::ignorableWhitespace( - const ::rtl::OUString& ) + const OUString& ) throw( SAXException, RuntimeException ) { } void SAL_CALL ReadMenuDocumentHandlerBase::processingInstruction( - const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ ) + const OUString& /*aTarget*/, const OUString& /*aData*/ ) throw( SAXException, RuntimeException ) { } @@ -192,22 +192,22 @@ throw( SAXException, RuntimeException ) m_xLocator = xLocator; } -::rtl::OUString ReadMenuDocumentHandlerBase::getErrorLineString() +OUString ReadMenuDocumentHandlerBase::getErrorLineString() { char buffer[32]; if ( m_xLocator.is() ) { snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() )); - return ::rtl::OUString::createFromAscii( buffer ); + return OUString::createFromAscii( buffer ); } else - return ::rtl::OUString(); + return OUString(); } void ReadMenuDocumentHandlerBase::initPropertyCommon( - Sequence< PropertyValue > &rProps, const rtl::OUString &rCommandURL, - const rtl::OUString &rHelpId, const rtl::OUString &rLabel, sal_Int16 nItemStyleBits ) + Sequence< PropertyValue > &rProps, const OUString &rCommandURL, + const OUString &rHelpId, const OUString &rLabel, sal_Int16 nItemStyleBits ) { rProps[0].Name = m_aCommandURL; rProps[1].Name = m_aHelpURL; @@ -252,15 +252,15 @@ void SAL_CALL OReadMenuDocumentHandler::endDocument(void) { if ( m_nElementDepth > 0 ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "A closing element is missing!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "A closing element is missing!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } void SAL_CALL OReadMenuDocumentHandler::startElement( - const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttrList ) + const OUString& aName, const Reference< XAttributeList > &xAttrList ) throw( SAXException, RuntimeException ) { if ( m_bMenuBarMode ) @@ -279,13 +279,13 @@ throw( SAXException, RuntimeException ) } -void SAL_CALL OReadMenuDocumentHandler::characters(const rtl::OUString&) +void SAL_CALL OReadMenuDocumentHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadMenuDocumentHandler::endElement( const ::rtl::OUString& aName ) +void SAL_CALL OReadMenuDocumentHandler::endElement( const OUString& aName ) throw( SAXException, RuntimeException ) { if ( m_bMenuBarMode ) @@ -299,8 +299,8 @@ void SAL_CALL OReadMenuDocumentHandler::endElement( const ::rtl::OUString& aName m_bMenuBarMode = sal_False; if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUBAR ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menubar expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menubar expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -339,7 +339,7 @@ void SAL_CALL OReadMenuBarHandler::endDocument(void) void SAL_CALL OReadMenuBarHandler::startElement( - const ::rtl::OUString& rName, const Reference< XAttributeList > &xAttrList ) + const OUString& rName, const Reference< XAttributeList > &xAttrList ) throw( SAXException, RuntimeException ) { if ( m_bMenuMode ) @@ -351,9 +351,9 @@ throw( SAXException, RuntimeException ) { ++m_nElementDepth; - ::rtl::OUString aHelpId; - ::rtl::OUString aCommandId; - ::rtl::OUString aLabel; + OUString aHelpId; + OUString aCommandId; + OUString aLabel; sal_Int16 nItemBits(0); m_bMenuMode = sal_True; @@ -371,8 +371,8 @@ throw( SAXException, RuntimeException ) // read attributes for menu for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ ) { - ::rtl::OUString aName = xAttrList->getNameByIndex( i ); - ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); + OUString aName = xAttrList->getNameByIndex( i ); + OUString aValue = xAttrList->getValueByIndex( i ); if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; else if ( aName == ATTRIBUTE_LABEL ) @@ -381,11 +381,11 @@ throw( SAXException, RuntimeException ) aHelpId = aValue; else if ( aName == ATTRIBUTE_STYLE ) { - ::rtl::OUString aTemp( aValue ); + OUString aTemp( aValue ); sal_Int32 nIndex = 0; do { - ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); + OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) @@ -410,8 +410,8 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "attribute id for element menu required!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "attribute id for element menu required!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -421,20 +421,20 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "element menu expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "element menu expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } -void SAL_CALL OReadMenuBarHandler::characters(const rtl::OUString&) +void SAL_CALL OReadMenuBarHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void OReadMenuBarHandler::endElement( const ::rtl::OUString& aName ) +void OReadMenuBarHandler::endElement( const OUString& aName ) throw( SAXException, RuntimeException ) { if ( m_bMenuMode ) @@ -447,8 +447,8 @@ void OReadMenuBarHandler::endElement( const ::rtl::OUString& aName ) m_bMenuMode = sal_False; if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menu expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menu expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -490,7 +490,7 @@ void SAL_CALL OReadMenuHandler::endDocument(void) void SAL_CALL OReadMenuHandler::startElement( - const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttrList ) + const OUString& aName, const Reference< XAttributeList > &xAttrList ) throw( SAXException, RuntimeException ) { if ( m_bMenuPopupMode ) @@ -507,20 +507,20 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown element found!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "unknown element found!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } -void SAL_CALL OReadMenuHandler::characters(const rtl::OUString&) +void SAL_CALL OReadMenuHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadMenuHandler::endElement( const ::rtl::OUString& aName ) +void SAL_CALL OReadMenuHandler::endElement( const OUString& aName ) throw( SAXException, RuntimeException ) { if ( m_bMenuPopupMode ) @@ -533,8 +533,8 @@ void SAL_CALL OReadMenuHandler::endElement( const ::rtl::OUString& aName ) m_bMenuPopupMode = sal_False; if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUPOPUP ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menupopup expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menupopup expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -577,7 +577,7 @@ void SAL_CALL OReadMenuPopupHandler::endDocument(void) } void SAL_CALL OReadMenuPopupHandler::startElement( - const ::rtl::OUString& rName, const Reference< XAttributeList > &xAttrList ) + const OUString& rName, const Reference< XAttributeList > &xAttrList ) throw( SAXException, RuntimeException ) { ++m_nElementDepth; @@ -586,9 +586,9 @@ throw( SAXException, RuntimeException ) m_xReader->startElement( rName, xAttrList ); else if ( rName == ELEMENT_MENU ) { - ::rtl::OUString aHelpId; - ::rtl::OUString aCommandId; - ::rtl::OUString aLabel; + OUString aHelpId; + OUString aCommandId; + OUString aLabel; sal_Int16 nItemBits(0); m_bMenuMode = sal_True; @@ -601,8 +601,8 @@ throw( SAXException, RuntimeException ) // read attributes for menu for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ ) { - ::rtl::OUString aName = xAttrList->getNameByIndex( i ); - ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); + OUString aName = xAttrList->getNameByIndex( i ); + OUString aValue = xAttrList->getValueByIndex( i ); if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; else if ( aName == ATTRIBUTE_LABEL ) @@ -611,11 +611,11 @@ throw( SAXException, RuntimeException ) aHelpId = aValue; else if ( aName == ATTRIBUTE_STYLE ) { - ::rtl::OUString aTemp( aValue ); + OUString aTemp( aValue ); sal_Int32 nIndex = 0; do { - ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); + OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) @@ -641,8 +641,8 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "attribute id for element menu required!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "attribute id for element menu required!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -651,15 +651,15 @@ throw( SAXException, RuntimeException ) } else if ( rName == ELEMENT_MENUITEM ) { - ::rtl::OUString aHelpId; - ::rtl::OUString aCommandId; - ::rtl::OUString aLabel; + OUString aHelpId; + OUString aCommandId; + OUString aLabel; sal_Int16 nItemBits(0); // read attributes for menu item for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ ) { - ::rtl::OUString aName = xAttrList->getNameByIndex( i ); - ::rtl::OUString aValue = xAttrList->getValueByIndex( i ); + OUString aName = xAttrList->getNameByIndex( i ); + OUString aValue = xAttrList->getValueByIndex( i ); if ( aName == ATTRIBUTE_ID ) aCommandId = aValue; else if ( aName == ATTRIBUTE_LABEL ) @@ -668,11 +668,11 @@ throw( SAXException, RuntimeException ) aHelpId = aValue; else if ( aName == ATTRIBUTE_STYLE ) { - ::rtl::OUString aTemp( aValue ); + OUString aTemp( aValue ); sal_Int32 nIndex = 0; do { - ::rtl::OUString aToken = aTemp.getToken( 0, '+', nIndex ); + OUString aToken = aTemp.getToken( 0, '+', nIndex ); if ( !aToken.isEmpty() ) { if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT ) @@ -702,7 +702,7 @@ throw( SAXException, RuntimeException ) else if ( rName == ELEMENT_MENUSEPARATOR ) { Sequence< PropertyValue > aMenuSeparator( 1 ); - aMenuSeparator[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )); + aMenuSeparator[0].Name = OUString( ITEM_DESCRIPTOR_TYPE ); aMenuSeparator[0].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINE; m_xMenuContainer->insertByIndex( m_xMenuContainer->getCount(), makeAny( aMenuSeparator ) ); @@ -711,20 +711,20 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown element found!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "unknown element found!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } -void SAL_CALL OReadMenuPopupHandler::characters(const rtl::OUString&) +void SAL_CALL OReadMenuPopupHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadMenuPopupHandler::endElement( const ::rtl::OUString& aName ) +void SAL_CALL OReadMenuPopupHandler::endElement( const OUString& aName ) throw( SAXException, RuntimeException ) { --m_nElementDepth; @@ -737,8 +737,8 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const ::rtl::OUString& aName ) m_bMenuMode = sal_False; if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENU ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menu expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menu expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -751,8 +751,8 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const ::rtl::OUString& aName ) { if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUITEM ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menuitem expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menuitem expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -760,8 +760,8 @@ void SAL_CALL OReadMenuPopupHandler::endElement( const ::rtl::OUString& aName ) { if ( !aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ELEMENT_MENUSEPARATOR ))) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "closing element menuseparator expected!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "closing element menuseparator expected!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -782,7 +782,7 @@ OWriteMenuDocumentHandler::OWriteMenuDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); + m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); } @@ -803,26 +803,26 @@ throw ( SAXException, RuntimeException ) Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); if ( xExtendedDocHandler.is() ) { - xExtendedDocHandler->unknown( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( MENUBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + xExtendedDocHandler->unknown( OUString( MENUBAR_DOCTYPE ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_MENU )), + pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_MENU ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_MENU )) ); + OUString( XMLNS_MENU ) ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), + pList->AddAttribute( OUString( ATTRIBUTE_NS_ID ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "menubar" )) ); + OUString( "menubar" ) ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_MENUBAR ), pList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); WriteMenu( m_xMenuBarContainer ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_MENUBAR ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->endDocument(); } @@ -840,9 +840,9 @@ throw ( SAXException, RuntimeException ) aAny = rMenuContainer->getByIndex( nItemPos ); if ( aAny >>= aProps ) { - ::rtl::OUString aCommandURL; - ::rtl::OUString aLabel; - ::rtl::OUString aHelpURL; + OUString aCommandURL; + OUString aLabel; + OUString aHelpURL; sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT ); sal_Int16 nItemBits( 0 ); Reference< XIndexAccess > xSubMenu; @@ -861,28 +861,28 @@ throw ( SAXException, RuntimeException ) ::comphelper::AttributeList* pListMenu = new ::comphelper::AttributeList; Reference< XAttributeList > xListMenu( (XAttributeList *)pListMenu , UNO_QUERY ); - pListMenu->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), + pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_ID ), m_aAttributeType, aCommandURL ); if ( !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL))) ) - pListMenu->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), + pListMenu->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), m_aAttributeType, aLabel ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )), xListMenu ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_MENU ), xListMenu ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_MENUPOPUP ), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); WriteMenu( xSubMenu ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUPOPUP )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENU )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_MENUPOPUP ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_MENU ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); bSeparator = sal_False; } } @@ -908,31 +908,31 @@ throw ( SAXException, RuntimeException ) } -void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandURL, const ::rtl::OUString& aLabel, const ::rtl::OUString& aHelpURL, sal_Int16 nStyle ) +void OWriteMenuDocumentHandler::WriteMenuItem( const OUString& aCommandURL, const OUString& aLabel, const OUString& aHelpURL, sal_Int16 nStyle ) { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_ID )), + pList->AddAttribute( OUString( ATTRIBUTE_NS_ID ), m_aAttributeType, aCommandURL ); if ( !aHelpURL.isEmpty() ) { - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_HELPID )), + pList->AddAttribute( OUString( ATTRIBUTE_NS_HELPID ), m_aAttributeType, aHelpURL ); } if ( !aLabel.isEmpty() && !aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) ) { - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_LABEL )), + pList->AddAttribute( OUString( ATTRIBUTE_NS_LABEL ), m_aAttributeType, aLabel ); } if (( nStyle > 0 ) && !( aCommandURL.copy( CMD_PROTOCOL_SIZE ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CMD_PROTOCOL)) )) { - rtl::OUString aValue; + OUString aValue; MenuStyleItem* pStyle = MenuItemStyles; for ( sal_Int32 nIndex = 0; nIndex < nMenuStyleItemEntries; ++nIndex, ++pStyle ) @@ -940,28 +940,28 @@ void OWriteMenuDocumentHandler::WriteMenuItem( const ::rtl::OUString& aCommandUR if ( nStyle & pStyle->nBit ) { if ( !aValue.isEmpty() ) - aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("+") ) ); - aValue += rtl::OUString::createFromAscii( pStyle->attrName ); + aValue = aValue.concat( OUString( "+" ) ); + aValue += OUString::createFromAscii( pStyle->attrName ); } } - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_NS_STYLE )), + pList->AddAttribute( OUString( ATTRIBUTE_NS_STYLE ), m_aAttributeType, aValue ); } - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUITEM )), xList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUITEM )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_MENUITEM ), xList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_MENUITEM ) ); } void OWriteMenuDocumentHandler::WriteMenuSeparator() { - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUSEPARATOR )), m_xEmptyList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_MENUSEPARATOR )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_MENUSEPARATOR ), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_MENUSEPARATOR ) ); } } // namespace framework diff --git a/framework/source/fwe/xml/saxnamespacefilter.cxx b/framework/source/fwe/xml/saxnamespacefilter.cxx index 1e9c529cad93..3a9e25649c37 100644 --- a/framework/source/fwe/xml/saxnamespacefilter.cxx +++ b/framework/source/fwe/xml/saxnamespacefilter.cxx @@ -43,8 +43,8 @@ SaxNamespaceFilter::SaxNamespaceFilter( Reference< XDocumentHandler >& rSax1Docu m_xLocator( 0 ), xDocumentHandler( rSax1DocumentHandler ), m_nDepth( 0 ), - m_aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )), - m_aXMLAttributeType( RTL_CONSTASCII_USTRINGPARAM( "CDATA" )) + m_aXMLAttributeNamespace( "xmlns" ), + m_aXMLAttributeType( "CDATA" ) { } @@ -64,7 +64,7 @@ void SAL_CALL SaxNamespaceFilter::endDocument(void) } void SAL_CALL SaxNamespaceFilter::startElement( - const rtl::OUString& rName, const Reference< XAttributeList > &xAttribs ) + const OUString& rName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException ) { XMLNamespaces aXMLNamespaces; @@ -78,7 +78,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( { for ( sal_Int16 i=0; i< xAttribs->getLength(); i++ ) { - ::rtl::OUString aName = xAttribs->getNameByIndex( i ); + OUString aName = xAttribs->getNameByIndex( i ); if ( aName.compareTo( m_aXMLAttributeNamespace, m_aXMLAttributeNamespace.getLength() ) == 0 ) aXMLNamespaces.addNamespace( aName, xAttribs->getValueByIndex( i )); else @@ -96,19 +96,19 @@ void SAL_CALL SaxNamespaceFilter::startElement( aAttributeIndexes.begin()); i != aAttributeIndexes.end(); ++i ) { - ::rtl::OUString aAttributeName = xAttribs->getNameByIndex( *i ); - ::rtl::OUString aValue = xAttribs->getValueByIndex( *i ); - ::rtl::OUString aNamespaceAttributeName = aXMLNamespaces.applyNSToAttributeName( aAttributeName ); + OUString aAttributeName = xAttribs->getNameByIndex( *i ); + OUString aValue = xAttribs->getValueByIndex( *i ); + OUString aNamespaceAttributeName = aXMLNamespaces.applyNSToAttributeName( aAttributeName ); pNewList->AddAttribute( aNamespaceAttributeName, m_aXMLAttributeType, aValue ); } } catch ( SAXException& e ) { - e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); + e.Message = OUString( getErrorLineString() + e.Message ); throw; } - ::rtl::OUString aNamespaceElementName; + OUString aNamespaceElementName; try { @@ -116,18 +116,18 @@ void SAL_CALL SaxNamespaceFilter::startElement( } catch ( SAXException& e ) { - e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); + e.Message = OUString( getErrorLineString() + e.Message ); throw; } xDocumentHandler->startElement( aNamespaceElementName, pNewList ); } -void SAL_CALL SaxNamespaceFilter::endElement(const rtl::OUString& aName) +void SAL_CALL SaxNamespaceFilter::endElement(const OUString& aName) throw( SAXException, RuntimeException ) { XMLNamespaces& aXMLNamespaces = m_aNamespaceStack.top(); - ::rtl::OUString aNamespaceElementName; + OUString aNamespaceElementName; try { @@ -135,7 +135,7 @@ void SAL_CALL SaxNamespaceFilter::endElement(const rtl::OUString& aName) } catch ( SAXException& e ) { - e.Message = ::rtl::OUString( getErrorLineString() + e.Message ); + e.Message = OUString( getErrorLineString() + e.Message ); throw; } @@ -143,20 +143,20 @@ void SAL_CALL SaxNamespaceFilter::endElement(const rtl::OUString& aName) m_aNamespaceStack.pop(); } -void SAL_CALL SaxNamespaceFilter::characters(const rtl::OUString& aChars) +void SAL_CALL SaxNamespaceFilter::characters(const OUString& aChars) throw( SAXException, RuntimeException ) { xDocumentHandler->characters( aChars ); } -void SAL_CALL SaxNamespaceFilter::ignorableWhitespace(const rtl::OUString& aWhitespaces) +void SAL_CALL SaxNamespaceFilter::ignorableWhitespace(const OUString& aWhitespaces) throw( SAXException, RuntimeException ) { xDocumentHandler->ignorableWhitespace( aWhitespaces ); } void SAL_CALL SaxNamespaceFilter::processingInstruction( - const rtl::OUString& aTarget, const rtl::OUString& aData) + const OUString& aTarget, const OUString& aData) throw( SAXException, RuntimeException ) { xDocumentHandler->processingInstruction( aTarget, aData ); @@ -170,17 +170,17 @@ void SAL_CALL SaxNamespaceFilter::setDocumentLocator( xDocumentHandler->setDocumentLocator( xLocator ); } -::rtl::OUString SaxNamespaceFilter::getErrorLineString() +OUString SaxNamespaceFilter::getErrorLineString() { char buffer[32]; if ( m_xLocator.is() ) { snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() )); - return ::rtl::OUString::createFromAscii( buffer ); + return OUString::createFromAscii( buffer ); } else - return ::rtl::OUString(); + return OUString(); } } // namespace diff --git a/framework/source/fwe/xml/statusbardocumenthandler.cxx b/framework/source/fwe/xml/statusbardocumenthandler.cxx index 07a28706100a..ed6b352f5b93 100644 --- a/framework/source/fwe/xml/statusbardocumenthandler.cxx +++ b/framework/source/fwe/xml/statusbardocumenthandler.cxx @@ -93,8 +93,8 @@ static const char ITEM_DESCRIPTOR_TYPE[] = "Type"; static void ExtractStatusbarItemParameters( const Sequence< PropertyValue > rProp, - ::rtl::OUString& rCommandURL, - ::rtl::OUString& rHelpURL, + OUString& rCommandURL, + OUString& rHelpURL, sal_Int16& rOffset, sal_Int16& rStyle, sal_Int16& rWidth ) @@ -151,25 +151,25 @@ OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler( ThreadHelpBase( &Application::GetSolarMutex() ), m_aStatusBarItems( rStatusBarItems ) { - ::rtl::OUString aNamespaceStatusBar( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR )); - ::rtl::OUString aNamespaceXLink( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )); - ::rtl::OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( XMLNS_FILTER_SEPARATOR )); + OUString aNamespaceStatusBar( XMLNS_STATUSBAR ); + OUString aNamespaceXLink( XMLNS_XLINK ); + OUString aSeparator( XMLNS_FILTER_SEPARATOR ); // create hash map for ( int i = 0; i < (int)SB_XML_ENTRY_COUNT; i++ ) { if ( StatusBarEntries[i].nNamespace == SB_NS_STATUSBAR ) { - ::rtl::OUString temp( aNamespaceStatusBar ); + OUString temp( aNamespaceStatusBar ); temp += aSeparator; - temp += ::rtl::OUString::createFromAscii( StatusBarEntries[i].aEntryName ); + temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) ); } else { - ::rtl::OUString temp( aNamespaceXLink ); + OUString temp( aNamespaceXLink ); temp += aSeparator; - temp += ::rtl::OUString::createFromAscii( StatusBarEntries[i].aEntryName ); + temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) ); } } @@ -197,14 +197,14 @@ throw( SAXException, RuntimeException ) if (( m_bStatusBarStartFound && !m_bStatusBarEndFound ) || ( !m_bStatusBarStartFound && m_bStatusBarEndFound ) ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'statusbar' found!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "No matching start or end element 'statusbar' found!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } void SAL_CALL OReadStatusBarDocumentHandler::startElement( - const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttribs ) + const OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -218,8 +218,8 @@ throw( SAXException, RuntimeException ) { if ( m_bStatusBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbar' cannot be embeded into 'statusbar:statusbar'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element 'statusbar:statusbar' cannot be embeded into 'statusbar:statusbar'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -231,20 +231,20 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbaritem' must be embeded into element 'statusbar:statusbar'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element 'statusbar:statusbaritem' must be embeded into element 'statusbar:statusbar'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } if ( m_bStatusBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element statusbar:statusbaritem is not a container!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element statusbar:statusbaritem is not a container!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } - ::rtl::OUString aCommandURL; - ::rtl::OUString aHelpURL; + OUString aCommandURL; + OUString aHelpURL; sal_Int16 nItemBits( ItemStyle::ALIGN_CENTER|ItemStyle::DRAW_IN3D ); sal_Int16 nWidth( 0 ); sal_Int16 nOffset( STATUSBAR_OFFSET ); @@ -283,8 +283,8 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:align must have one value of 'left','right' or 'center'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Attribute statusbar:align must have one value of 'left','right' or 'center'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -308,8 +308,8 @@ throw( SAXException, RuntimeException ) } else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Attribute statusbar:autosize must have value 'true' or 'false'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -323,8 +323,8 @@ throw( SAXException, RuntimeException ) nItemBits &= ~ItemStyle::AUTO_SIZE; else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Attribute statusbar:autosize must have value 'true' or 'false'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -338,8 +338,8 @@ throw( SAXException, RuntimeException ) nItemBits &= ~ItemStyle::OWNER_DRAW; else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:ownerdraw must have value 'true' or 'false'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Attribute statusbar:ownerdraw must have value 'true' or 'false'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -371,19 +371,19 @@ throw( SAXException, RuntimeException ) if ( !bCommandURL ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute statusbar:url must have a value!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Required attribute statusbar:url must have a value!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } else { Sequence< PropertyValue > aStatusbarItemProp( 6 ); - aStatusbarItemProp[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL )); - aStatusbarItemProp[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL )); - aStatusbarItemProp[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_OFFSET )); - aStatusbarItemProp[3].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE )); - aStatusbarItemProp[4].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_WIDTH )); - aStatusbarItemProp[5].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )); + aStatusbarItemProp[0].Name = OUString( ITEM_DESCRIPTOR_COMMANDURL ); + aStatusbarItemProp[1].Name = OUString( ITEM_DESCRIPTOR_HELPURL ); + aStatusbarItemProp[2].Name = OUString( ITEM_DESCRIPTOR_OFFSET ); + aStatusbarItemProp[3].Name = OUString( ITEM_DESCRIPTOR_STYLE ); + aStatusbarItemProp[4].Name = OUString( ITEM_DESCRIPTOR_WIDTH ); + aStatusbarItemProp[5].Name = OUString( ITEM_DESCRIPTOR_TYPE ); aStatusbarItemProp[0].Value <<= aCommandURL; aStatusbarItemProp[1].Value <<= aHelpURL; @@ -403,7 +403,7 @@ throw( SAXException, RuntimeException ) } } -void SAL_CALL OReadStatusBarDocumentHandler::endElement(const ::rtl::OUString& aName) +void SAL_CALL OReadStatusBarDocumentHandler::endElement(const OUString& aName) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -417,8 +417,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar' found, but no start element 'statusbar'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'statusbar' found, but no start element 'statusbar'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -430,8 +430,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar:statusbaritem' found, but no start element 'statusbar:statusbaritem'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'statusbar:statusbaritem' found, but no start element 'statusbar:statusbaritem'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -445,18 +445,18 @@ throw( SAXException, RuntimeException ) } } -void SAL_CALL OReadStatusBarDocumentHandler::characters(const ::rtl::OUString&) +void SAL_CALL OReadStatusBarDocumentHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadStatusBarDocumentHandler::ignorableWhitespace(const ::rtl::OUString&) +void SAL_CALL OReadStatusBarDocumentHandler::ignorableWhitespace(const OUString&) throw( SAXException, RuntimeException ) { } void SAL_CALL OReadStatusBarDocumentHandler::processingInstruction( - const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ ) + const OUString& /*aTarget*/, const OUString& /*aData*/ ) throw( SAXException, RuntimeException ) { } @@ -470,7 +470,7 @@ throw( SAXException, RuntimeException ) m_xLocator = xLocator; } -::rtl::OUString OReadStatusBarDocumentHandler::getErrorLineString() +OUString OReadStatusBarDocumentHandler::getErrorLineString() { ResetableGuard aGuard( m_aLock ); @@ -479,10 +479,10 @@ throw( SAXException, RuntimeException ) if ( m_xLocator.is() ) { snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() )); - return ::rtl::OUString::createFromAscii( buffer ); + return OUString::createFromAscii( buffer ); } else - return ::rtl::OUString(); + return OUString(); } @@ -499,9 +499,9 @@ OWriteStatusBarDocumentHandler::OWriteStatusBarDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - m_aAttributeType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TYPE_CDATA )); - m_aXMLXlinkNS = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK_PREFIX )); - m_aXMLStatusBarNS = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR_PREFIX )); + m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); + m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX ); + m_aXMLStatusBarNS = OUString( XMLNS_STATUSBAR_PREFIX ); } OWriteStatusBarDocumentHandler::~OWriteStatusBarDocumentHandler() @@ -519,23 +519,23 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); if ( xExtendedDocHandler.is() ) { - xExtendedDocHandler->unknown( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STATUSBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + xExtendedDocHandler->unknown( OUString( STATUSBAR_DOCTYPE ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_STATUSBAR )), + pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_STATUSBAR ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR )) ); + OUString( XMLNS_STATUSBAR ) ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )), + pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_XLINK ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) ); + OUString( XMLNS_XLINK ) ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_STATUSBAR ), pList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); sal_Int32 nItemCount = m_aStatusBarItems->getCount(); Any aAny; @@ -546,8 +546,8 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw aAny = m_aStatusBarItems->getByIndex( nItemPos ); if ( aAny >>= aProps ) { - ::rtl::OUString aCommandURL; - ::rtl::OUString aHelpURL; + OUString aCommandURL; + OUString aHelpURL; sal_Int16 nStyle( ItemStyle::ALIGN_CENTER|ItemStyle::DRAW_IN3D ); sal_Int16 nWidth( 0 ); sal_Int16 nOffset( STATUSBAR_OFFSET ); @@ -565,9 +565,9 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw } } - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_STATUSBAR ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->endDocument(); } @@ -576,8 +576,8 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw //_________________________________________________________________________________________________________________ void OWriteStatusBarDocumentHandler::WriteStatusBarItem( - const rtl::OUString& rCommandURL, - const rtl::OUString& /*rHelpURL*/, + const OUString& rCommandURL, + const OUString& /*rHelpURL*/, sal_Int16 nOffset, sal_Int16 nStyle, sal_Int16 nWidth ) @@ -589,7 +589,7 @@ throw ( SAXException, RuntimeException ) if (m_aAttributeURL.isEmpty() ) { m_aAttributeURL = m_aXMLXlinkNS; - m_aAttributeURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL )); + m_aAttributeURL += OUString( ATTRIBUTE_URL ); } // save required attribute (URL) @@ -598,73 +598,73 @@ throw ( SAXException, RuntimeException ) // alignment if ( nStyle & ItemStyle::ALIGN_RIGHT ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_RIGHT )) ); + OUString( ATTRIBUTE_ALIGN_RIGHT ) ); } else if ( nStyle & ItemStyle::ALIGN_CENTER ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_CENTER )) ); + OUString( ATTRIBUTE_ALIGN_CENTER ) ); } else { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_ALIGN ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_LEFT )) ); + OUString( ATTRIBUTE_ALIGN_LEFT ) ); } // style ( SIB_IN is default ) if ( nStyle & ItemStyle::DRAW_FLAT ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_STYLE ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_FLAT )) ); + OUString( ATTRIBUTE_STYLE_FLAT ) ); } else if ( nStyle & ItemStyle::DRAW_OUT3D ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_STYLE ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_OUT )) ); + OUString( ATTRIBUTE_STYLE_OUT ) ); } // autosize (default sal_False) if ( nStyle & ItemStyle::AUTO_SIZE ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_AUTOSIZE )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_AUTOSIZE ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); + OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); } // ownerdraw (default sal_False) if ( nStyle & ItemStyle::OWNER_DRAW ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OWNERDRAW )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_OWNERDRAW ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); + OUString( ATTRIBUTE_BOOLEAN_TRUE ) ); } // width (default 0) if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_WIDTH ), m_aAttributeType, - ::rtl::OUString::valueOf( (sal_Int32)nWidth ) ); + OUString::valueOf( (sal_Int32)nWidth ) ); } // offset (default STATUSBAR_OFFSET) if ( nOffset != STATUSBAR_OFFSET ) { - pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OFFSET )), + pList->AddAttribute( m_aXMLStatusBarNS + OUString( ATTRIBUTE_OFFSET ), m_aAttributeType, - ::rtl::OUString::valueOf( (sal_Int32)nOffset ) ); + OUString::valueOf( (sal_Int32)nOffset ) ); } - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBARITEM )), xList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBARITEM )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_STATUSBARITEM ), xList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_STATUSBARITEM ) ); } } // namespace framework diff --git a/framework/source/fwe/xml/toolboxdocumenthandler.cxx b/framework/source/fwe/xml/toolboxdocumenthandler.cxx index 017a0418efd7..9aecb6bd6c5a 100644 --- a/framework/source/fwe/xml/toolboxdocumenthandler.cxx +++ b/framework/source/fwe/xml/toolboxdocumenthandler.cxx @@ -60,10 +60,10 @@ static const char ITEM_DESCRIPTOR_VISIBLE[] = "IsVisible"; static const char ITEM_DESCRIPTOR_WIDTH[] = "Width"; static void ExtractToolbarParameters( const Sequence< PropertyValue > rProp, - ::rtl::OUString& rCommandURL, - ::rtl::OUString& rLabel, - ::rtl::OUString& rHelpURL, - ::rtl::OUString& rTooltip, + OUString& rCommandURL, + OUString& rLabel, + OUString& rHelpURL, + OUString& rTooltip, sal_Int16& rStyle, sal_Int16& rWidth, sal_Bool& rVisible, @@ -141,47 +141,47 @@ ToolBarEntryProperty ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_CO OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) : ThreadHelpBase( &Application::GetSolarMutex() ), m_rItemContainer( rItemContainer ), - m_aType( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TYPE )), - m_aLabel( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_LABEL )), - m_aStyle( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_STYLE )), - m_aHelpURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL )), - m_aTooltip( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_TOOLTIP )), - m_aIsVisible( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_VISIBLE )), - m_aCommandURL( RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL )) + m_aType( ITEM_DESCRIPTOR_TYPE ), + m_aLabel( ITEM_DESCRIPTOR_LABEL ), + m_aStyle( ITEM_DESCRIPTOR_STYLE ), + m_aHelpURL( ITEM_DESCRIPTOR_HELPURL ), + m_aTooltip( ITEM_DESCRIPTOR_TOOLTIP ), + m_aIsVisible( ITEM_DESCRIPTOR_VISIBLE ), + m_aCommandURL( ITEM_DESCRIPTOR_COMMANDURL ) { - ::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 )); + OUString aNamespaceToolBar( XMLNS_TOOLBAR ); + OUString aNamespaceXLink( XMLNS_XLINK ); + OUString aSeparator( XMLNS_FILTER_SEPARATOR ); // create hash map for ( int i = 0; i < (int)TB_XML_ENTRY_COUNT; i++ ) { if ( ToolBoxEntries[i].nNamespace == TB_NS_TOOLBAR ) { - ::rtl::OUString temp( aNamespaceToolBar ); + OUString temp( aNamespaceToolBar ); temp += aSeparator; - temp += ::rtl::OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); + temp += OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); m_aToolBoxMap.insert( ToolBoxHashMap::value_type( temp, (ToolBox_XML_Entry)i ) ); } else { - ::rtl::OUString temp( aNamespaceXLink ); + OUString temp( aNamespaceXLink ); temp += aSeparator; - temp += ::rtl::OUString::createFromAscii( ToolBoxEntries[i].aEntryName ); + temp += 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 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO )).hashCode(); - m_nHashCode_Style_Auto = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_AUTO )).hashCode(); - m_nHashCode_Style_Left = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_LEFT )).hashCode(); - m_nHashCode_Style_AutoSize = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_AUTOSIZE )).hashCode(); - m_nHashCode_Style_DropDown = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_DROPDOWN )).hashCode(); - m_nHashCode_Style_Repeat = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_REPEAT )).hashCode(); - m_nHashCode_Style_DropDownOnly = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY )).hashCode(); - m_nHashCode_Style_Text = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT )).hashCode(); - m_nHashCode_Style_Image = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE )).hashCode(); + m_nHashCode_Style_Radio = OUString( ATTRIBUTE_ITEMSTYLE_RADIO ).hashCode(); + m_nHashCode_Style_Auto = OUString( ATTRIBUTE_ITEMSTYLE_AUTO ).hashCode(); + m_nHashCode_Style_Left = OUString( ATTRIBUTE_ITEMSTYLE_LEFT ).hashCode(); + m_nHashCode_Style_AutoSize = OUString( ATTRIBUTE_ITEMSTYLE_AUTOSIZE ).hashCode(); + 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_bToolBarStartFound = sal_False; m_bToolBarEndFound = sal_False; @@ -209,14 +209,14 @@ throw( SAXException, RuntimeException ) if (( m_bToolBarStartFound && !m_bToolBarEndFound ) || ( !m_bToolBarStartFound && m_bToolBarEndFound ) ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'toolbar' found!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "No matching start or end element 'toolbar' found!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } void SAL_CALL OReadToolBoxDocumentHandler::startElement( - const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttribs ) + const OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -230,14 +230,14 @@ throw( SAXException, RuntimeException ) { if ( m_bToolBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbar' cannot be embeded into 'toolbar:toolbar'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "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 - ::rtl::OUString aUIName; + OUString aUIName; for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ ) { pToolBoxEntry = m_aToolBoxMap.find( xAttribs->getNameByIndex( n ) ); @@ -262,7 +262,7 @@ throw( SAXException, RuntimeException ) { try { - xPropSet->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" )), makeAny( aUIName ) ); + xPropSet->setPropertyValue( OUString( "UIName" ), makeAny( aUIName ) ); } catch ( const UnknownPropertyException& ) { @@ -279,8 +279,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'toolbar:toolbaritem' must be embeded into element 'toolbar:toolbar'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element 'toolbar:toolbaritem' must be embeded into element 'toolbar:toolbar'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -289,19 +289,19 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbaritem is not a container!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element toolbar:toolbaritem is not a container!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } sal_Bool bAttributeURL = sal_False; m_bToolBarItemStartFound = sal_True; - ::rtl::OUString aLabel; - ::rtl::OUString aCommandURL; - ::rtl::OUString aHelpURL; - ::rtl::OUString aTooltip; - ::rtl::OUString aBitmapName; + OUString aLabel; + OUString aCommandURL; + OUString aHelpURL; + OUString aTooltip; + OUString aBitmapName; sal_uInt16 nItemBits( 0 ); sal_Bool bVisible( sal_True ); @@ -345,8 +345,8 @@ throw( SAXException, RuntimeException ) bVisible = sal_False; else { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute toolbar:visible must have value 'true' or 'false'!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Attribute toolbar:visible must have value 'true' or 'false'!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -367,12 +367,12 @@ throw( SAXException, RuntimeException ) case TB_ATTRIBUTE_STYLE: { // read space separated item style list - ::rtl::OUString aTemp = xAttribs->getValueByIndex( n ); + OUString aTemp = xAttribs->getValueByIndex( n ); sal_Int32 nIndex = 0; do { - ::rtl::OUString aToken = aTemp.getToken( 0, ' ', nIndex ); + OUString aToken = aTemp.getToken( 0, ' ', nIndex ); if ( !aToken.isEmpty() ) { sal_Int32 nHashCode = aToken.hashCode(); @@ -407,8 +407,8 @@ throw( SAXException, RuntimeException ) if ( !bAttributeURL ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute toolbar:url must have a value!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Required attribute toolbar:url must have a value!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -460,8 +460,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarspace is not a container!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element toolbar:toolbarspace is not a container!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -471,7 +471,7 @@ throw( SAXException, RuntimeException ) aToolbarItemProp[0].Name = m_aCommandURL; aToolbarItemProp[1].Name = m_aType; - aToolbarItemProp[0].Value <<= rtl::OUString(); + aToolbarItemProp[0].Value <<= OUString(); aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_SPACE; m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), makeAny( aToolbarItemProp ) ); @@ -485,8 +485,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarbreak is not a container!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element toolbar:toolbarbreak is not a container!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -496,7 +496,7 @@ throw( SAXException, RuntimeException ) aToolbarItemProp[0].Name = m_aCommandURL; aToolbarItemProp[1].Name = m_aType; - aToolbarItemProp[0].Value <<= rtl::OUString(); + aToolbarItemProp[0].Value <<= OUString(); aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINEBREAK; m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), makeAny( aToolbarItemProp ) ); @@ -510,8 +510,8 @@ throw( SAXException, RuntimeException ) m_bToolBarSpaceStartFound || m_bToolBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element toolbar:toolbarseparator is not a container!" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "Element toolbar:toolbarseparator is not a container!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -521,7 +521,7 @@ throw( SAXException, RuntimeException ) aToolbarItemProp[0].Name = m_aCommandURL; aToolbarItemProp[1].Name = m_aType; - aToolbarItemProp[0].Value <<= rtl::OUString(); + aToolbarItemProp[0].Value <<= OUString(); aToolbarItemProp[1].Value <<= ::com::sun::star::ui::ItemType::SEPARATOR_LINE; m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), makeAny( aToolbarItemProp ) ); @@ -534,7 +534,7 @@ throw( SAXException, RuntimeException ) } } -void SAL_CALL OReadToolBoxDocumentHandler::endElement(const ::rtl::OUString& aName) +void SAL_CALL OReadToolBoxDocumentHandler::endElement(const OUString& aName) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -548,8 +548,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar' found, but no start element 'toolbar'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'toolbar' found, but no start element 'toolbar'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -561,8 +561,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarItemStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbaritem' found, but no start element 'toolbar:toolbaritem'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'toolbar:toolbaritem' found, but no start element 'toolbar:toolbaritem'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -574,8 +574,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarBreakStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarbreak' found, but no start element 'toolbar:toolbarbreak'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'toolbar:toolbarbreak' found, but no start element 'toolbar:toolbarbreak'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -587,8 +587,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarSpaceStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarspace' found, but no start element 'toolbar:toolbarspace'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'toolbar:toolbarspace' found, but no start element 'toolbar:toolbarspace'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -600,8 +600,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bToolBarSeparatorStartFound ) { - ::rtl::OUString aErrorMessage = getErrorLineString(); - aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'toolbar:toolbarseparator' found, but no start element 'toolbar:toolbarseparator'" )); + OUString aErrorMessage = getErrorLineString(); + aErrorMessage += OUString( "End element 'toolbar:toolbarseparator' found, but no start element 'toolbar:toolbarseparator'" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -615,18 +615,18 @@ throw( SAXException, RuntimeException ) } } -void SAL_CALL OReadToolBoxDocumentHandler::characters(const ::rtl::OUString&) +void SAL_CALL OReadToolBoxDocumentHandler::characters(const OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadToolBoxDocumentHandler::ignorableWhitespace(const ::rtl::OUString&) +void SAL_CALL OReadToolBoxDocumentHandler::ignorableWhitespace(const OUString&) throw( SAXException, RuntimeException ) { } void SAL_CALL OReadToolBoxDocumentHandler::processingInstruction( - const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ ) + const OUString& /*aTarget*/, const OUString& /*aData*/ ) throw( SAXException, RuntimeException ) { } @@ -640,7 +640,7 @@ throw( SAXException, RuntimeException ) m_xLocator = xLocator; } -::rtl::OUString OReadToolBoxDocumentHandler::getErrorLineString() +OUString OReadToolBoxDocumentHandler::getErrorLineString() { ResetableGuard aGuard( m_aLock ); @@ -649,10 +649,10 @@ throw( SAXException, RuntimeException ) if ( m_xLocator.is() ) { snprintf( buffer, sizeof(buffer), "Line: %ld - ", static_cast<long>( m_xLocator->getLineNumber() )); - return ::rtl::OUString::createFromAscii( buffer ); + return OUString::createFromAscii( buffer ); } else - return ::rtl::OUString(); + return OUString(); } @@ -669,9 +669,9 @@ OWriteToolBoxDocumentHandler::OWriteToolBoxDocumentHandler( { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; m_xEmptyList = Reference< XAttributeList >( (XAttributeList *) pList, UNO_QUERY ); - 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 )); + m_aAttributeType = OUString( ATTRIBUTE_TYPE_CDATA ); + m_aXMLXlinkNS = OUString( XMLNS_XLINK_PREFIX ); + m_aXMLToolbarNS = OUString( XMLNS_TOOLBAR_PREFIX ); } OWriteToolBoxDocumentHandler::~OWriteToolBoxDocumentHandler() @@ -689,17 +689,17 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); if ( xExtendedDocHandler.is() ) { - xExtendedDocHandler->unknown( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( TOOLBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + xExtendedDocHandler->unknown( OUString( TOOLBAR_DOCTYPE ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); } - ::rtl::OUString aUIName; + OUString aUIName; Reference< XPropertySet > xPropSet( m_rItemAccess, UNO_QUERY ); if ( xPropSet.is() ) { try { - xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ))) >>= aUIName; + xPropSet->getPropertyValue( OUString( "UIName" )) >>= aUIName; } catch ( const UnknownPropertyException& ) { @@ -709,21 +709,21 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_TOOLBAR )), + pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_TOOLBAR ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_TOOLBAR )) ); + OUString( XMLNS_TOOLBAR ) ); - pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_XLINK )), + pList->AddAttribute( OUString( ATTRIBUTE_XMLNS_XLINK ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )) ); + OUString( XMLNS_XLINK ) ); if ( !aUIName.isEmpty() ) - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_UINAME )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_UINAME ), m_aAttributeType, aUIName ); - m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_TOOLBAR ), pList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); sal_Int32 nItemCount = m_rItemAccess->getCount(); Any aAny; @@ -734,10 +734,10 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw aAny = m_rItemAccess->getByIndex( nItemPos ); if ( aAny >>= aProps ) { - ::rtl::OUString aCommandURL; - ::rtl::OUString aLabel; - ::rtl::OUString aHelpURL; - ::rtl::OUString aTooltip; + OUString aCommandURL; + OUString aLabel; + OUString aHelpURL; + OUString aTooltip; sal_Bool bVisible( sal_True ); sal_Int16 nType( ::com::sun::star::ui::ItemType::DEFAULT ); sal_Int16 nWidth( 0 ); @@ -755,9 +755,9 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw } } - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); - m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_TOOLBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_TOOLBAR ) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); m_xWriteDocumentHandler->endDocument(); } @@ -766,10 +766,10 @@ void OWriteToolBoxDocumentHandler::WriteToolBoxDocument() throw //_________________________________________________________________________________________________________________ void OWriteToolBoxDocumentHandler::WriteToolBoxItem( - const ::rtl::OUString& rCommandURL, - const ::rtl::OUString& rLabel, - const ::rtl::OUString& rHelpURL, - const ::rtl::OUString& rTooltip, + const OUString& rCommandURL, + const OUString& rLabel, + const OUString& rHelpURL, + const OUString& rTooltip, sal_Int16 nStyle, sal_Int16 nWidth, sal_Bool bVisible ) @@ -781,7 +781,7 @@ throw ( SAXException, RuntimeException ) if ( m_aAttributeURL.isEmpty() ) { m_aAttributeURL = m_aXMLXlinkNS; - m_aAttributeURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_URL )); + m_aAttributeURL += OUString( ATTRIBUTE_URL ); } // save required attribute (URL) @@ -789,35 +789,35 @@ throw ( SAXException, RuntimeException ) if ( !rLabel.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TEXT )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_TEXT ), m_aAttributeType, rLabel ); } if ( bVisible == sal_False ) { - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_VISIBLE )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_VISIBLE ), m_aAttributeType, - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) ); + OUString( ATTRIBUTE_BOOLEAN_FALSE ) ); } if ( !rHelpURL.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_HELPID )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_HELPID ), m_aAttributeType, rHelpURL ); } if ( !rTooltip.isEmpty() ) { - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_TOOLTIP )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_TOOLTIP ), m_aAttributeType, rTooltip ); } if ( nStyle > 0 ) { - rtl::OUString aValue; + OUString aValue; ToolboxStyleItem* pStyle = Styles; for ( sal_Int32 nIndex = 0; nIndex < nStyleItemEntries; ++nIndex, ++pStyle ) @@ -825,53 +825,53 @@ throw ( SAXException, RuntimeException ) if ( nStyle & pStyle->nBit ) { if ( !aValue.isEmpty() ) - aValue = aValue.concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(" ") ) ); - aValue += rtl::OUString::createFromAscii( pStyle->attrName ); + aValue = aValue.concat( OUString( " " ) ); + aValue += OUString::createFromAscii( pStyle->attrName ); } } - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ITEMSTYLE )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_ITEMSTYLE ), m_aAttributeType, aValue ); } if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLToolbarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), + pList->AddAttribute( m_aXMLToolbarNS + OUString( ATTRIBUTE_WIDTH ), m_aAttributeType, - ::rtl::OUString::valueOf( sal_Int32( nWidth )) ); + OUString::valueOf( sal_Int32( nWidth )) ); } - 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 )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_TOOLBARITEM ), xList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_TOOLBARITEM ) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxSpace() throw ( SAXException, RuntimeException ) { - 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 )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_TOOLBARSPACE ), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_TOOLBARSPACE ) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxBreak() throw ( SAXException, RuntimeException ) { - 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 )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_TOOLBARBREAK ), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_TOOLBARBREAK ) ); } void OWriteToolBoxDocumentHandler::WriteToolBoxSeparator() throw ( SAXException, RuntimeException ) { - 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 )) ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( OUString( ELEMENT_NS_TOOLBARSEPARATOR ), m_xEmptyList ); + m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->endElement( OUString( ELEMENT_NS_TOOLBARSEPARATOR ) ); } } // namespace framework diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index ddf15175d712..ba8b39ab7077 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -27,7 +27,7 @@ namespace framework { XMLNamespaces::XMLNamespaces() - : m_aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )) + : m_aXMLAttributeNamespace( "xmlns" ) { } @@ -41,10 +41,10 @@ XMLNamespaces::~XMLNamespaces() { } -void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUString& aValue ) throw( SAXException ) +void XMLNamespaces::addNamespace( const OUString& aName, const OUString& aValue ) throw( SAXException ) { NamespaceMap::iterator p; - ::rtl::OUString aNamespaceName( aName ); + OUString aNamespaceName( aName ); sal_Int32 nXMLNamespaceLength = m_aXMLAttributeNamespace.getLength(); // delete preceding "xmlns" @@ -52,7 +52,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS { if ( aNamespaceName.getLength() == nXMLNamespaceLength ) { - aNamespaceName = ::rtl::OUString(); + aNamespaceName = OUString(); } else if ( aNamespaceName.getLength() >= nXMLNamespaceLength+2 ) { @@ -61,7 +61,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS else { // a xml namespace without name is not allowed (e.g. "xmlns:" ) - ::rtl::OUString aErrorMessage( RTL_CONSTASCII_USTRINGPARAM( "A xml namespace without name is not allowed!" )); + OUString aErrorMessage( "A xml namespace without name is not allowed!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -70,7 +70,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS { // namespace should be reseted - as xml draft states this is only allowed // for the default namespace - check and throw exception if check fails - ::rtl::OUString aErrorMessage( RTL_CONSTASCII_USTRINGPARAM( "Clearing xml namespace only allowed for default namespace!" )); + OUString aErrorMessage( "Clearing xml namespace only allowed for default namespace!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } else @@ -94,7 +94,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS } } -::rtl::OUString XMLNamespaces::applyNSToAttributeName( const ::rtl::OUString& aName ) const throw( SAXException ) +OUString XMLNamespaces::applyNSToAttributeName( const OUString& aName ) const throw( SAXException ) { // xml draft: there is no default namespace for attributes! @@ -103,15 +103,15 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS { if ( aName.getLength() > index+1 ) { - ::rtl::OUString aAttributeName = getNamespaceValue( aName.copy( 0, index ) ); - aAttributeName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("^")); + OUString aAttributeName = getNamespaceValue( aName.copy( 0, index ) ); + aAttributeName += OUString("^"); aAttributeName += aName.copy( index+1 ); return aAttributeName; } else { // attribute with namespace but without name "namespace:" is not allowed!! - ::rtl::OUString aErrorMessage( RTL_CONSTASCII_USTRINGPARAM( "Attribute has no name only preceding namespace!" )); + OUString aErrorMessage( "Attribute has no name only preceding namespace!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -119,13 +119,13 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS return aName; } -::rtl::OUString XMLNamespaces::applyNSToElementName( const ::rtl::OUString& aName ) const throw( SAXException ) +OUString XMLNamespaces::applyNSToElementName( const OUString& aName ) const throw( SAXException ) { // xml draft: element names can have a default namespace int index = aName.indexOf( ':' ); - ::rtl::OUString aNamespace; - ::rtl::OUString aElementName = aName; + OUString aNamespace; + OUString aElementName = aName; if ( index > 0 ) aNamespace = getNamespaceValue( aName.copy( 0, index ) ); @@ -135,7 +135,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS if ( !aNamespace.isEmpty() ) { aElementName = aNamespace; - aElementName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("^")); + aElementName += OUString("^"); } else return aName; @@ -147,7 +147,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS else { // attribute with namespace but without a name is not allowed (e.g. "cfg:" ) - ::rtl::OUString aErrorMessage( RTL_CONSTASCII_USTRINGPARAM( "Attribute has no name only preceding namespace!" )); + OUString aErrorMessage( "Attribute has no name only preceding namespace!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -157,7 +157,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS return aElementName; } -::rtl::OUString XMLNamespaces::getNamespaceValue( const ::rtl::OUString& aNamespace ) const throw( SAXException ) +OUString XMLNamespaces::getNamespaceValue( const OUString& aNamespace ) const throw( SAXException ) { if ( aNamespace.isEmpty() ) return m_aDefaultNamespace; @@ -170,7 +170,7 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS else { // namespace not defined => throw exception! - ::rtl::OUString aErrorMessage( RTL_CONSTASCII_USTRINGPARAM( "XML namespace used but not defined!" )); + OUString aErrorMessage( "XML namespace used but not defined!" ); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } |