diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-06-24 16:07:09 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-06-24 16:07:09 +0000 |
commit | 1fa70d2df96b184e1084617c2cfd9f39a6ab817a (patch) | |
tree | e74f4a982ef04cdc50c8f5aa7e7cc8825128b66d /framework/source/xml | |
parent | a763ba2570d785234d3df832594c366d3e1c75aa (diff) |
INTEGRATION: CWS obo30 (1.12.38); FILE MERGED
2008/06/20 10:00:22 obo 1.12.38.3: RESYNC: (1.12-1.13); FILE MERGED
2008/06/06 06:38:58 obo 1.12.38.2: #i90100# EOL missing
2008/05/30 08:31:12 obo 1.12.38.1: #i90100# ambigous Reference during ENABLE_PCH build
Diffstat (limited to 'framework/source/xml')
-rw-r--r-- | framework/source/xml/statusbardocumenthandler.cxx | 232 |
1 files changed, 116 insertions, 116 deletions
diff --git a/framework/source/xml/statusbardocumenthandler.cxx b/framework/source/xml/statusbardocumenthandler.cxx index 314e25c298..cebb852d79 100644 --- a/framework/source/xml/statusbardocumenthandler.cxx +++ b/framework/source/xml/statusbardocumenthandler.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: statusbardocumenthandler.cxx,v $ - * $Revision: 1.13 $ + * $Revision: 1.14 $ * * This file is part of OpenOffice.org. * @@ -64,7 +64,6 @@ // namespace //_________________________________________________________________________________________________________________ -using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::xml::sax; @@ -122,10 +121,10 @@ static const char ITEM_DESCRIPTOR_STYLE[] = "Style"; static const char ITEM_DESCRIPTOR_WIDTH[] = "Width"; static const char ITEM_DESCRIPTOR_TYPE[] = "Type"; -static void ExtractStatusbarItemParameters( +static void ExtractStatusbarItemParameters( const Sequence< PropertyValue > rProp, - OUString& rCommandURL, - OUString& rHelpURL, + ::rtl::OUString& rCommandURL, + ::rtl::OUString& rHelpURL, sal_Int16& rOffset, sal_Int16& rStyle, sal_Int16& rWidth ) @@ -162,7 +161,7 @@ struct StatusBarEntryProperty char aEntryName[20]; }; -StatusBarEntryProperty StatusBarEntries[OReadStatusBarDocumentHandler::SB_XML_ENTRY_COUNT] = +StatusBarEntryProperty StatusBarEntries[OReadStatusBarDocumentHandler::SB_XML_ENTRY_COUNT] = { { OReadStatusBarDocumentHandler::SB_NS_STATUSBAR, ELEMENT_STATUSBAR }, { OReadStatusBarDocumentHandler::SB_NS_STATUSBAR, ELEMENT_STATUSBARITEM }, @@ -177,31 +176,31 @@ StatusBarEntryProperty StatusBarEntries[OReadStatusBarDocumentHandler::SB_XML_EN }; -OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler( - const Reference< XIndexContainer >& rStatusBarItems ) : - ThreadHelpBase( &Application::GetSolarMutex() ), - ::cppu::OWeakObject(), +OReadStatusBarDocumentHandler::OReadStatusBarDocumentHandler( + const Reference< XIndexContainer >& rStatusBarItems ) : + ThreadHelpBase( &Application::GetSolarMutex() ), + ::cppu::OWeakObject(), m_aStatusBarItems( rStatusBarItems ) { - OUString aNamespaceStatusBar( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR )); - OUString aNamespaceXLink( RTL_CONSTASCII_USTRINGPARAM( XMLNS_XLINK )); - OUString aSeparator( RTL_CONSTASCII_USTRINGPARAM( XMLNS_FILTER_SEPARATOR )); + ::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 )); // create hash map for ( int i = 0; i < (int)SB_XML_ENTRY_COUNT; i++ ) { if ( StatusBarEntries[i].nNamespace == SB_NS_STATUSBAR ) { - OUString temp( aNamespaceStatusBar ); + ::rtl::OUString temp( aNamespaceStatusBar ); temp += aSeparator; - temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); + temp += ::rtl::OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) ); } else { - OUString temp( aNamespaceXLink ); + ::rtl::OUString temp( aNamespaceXLink ); temp += aSeparator; - temp += OUString::createFromAscii( StatusBarEntries[i].aEntryName ); + temp += ::rtl::OUString::createFromAscii( StatusBarEntries[i].aEntryName ); m_aStatusBarMap.insert( StatusBarHashMap::value_type( temp, (StatusBar_XML_Entry)i ) ); } } @@ -215,7 +214,7 @@ OReadStatusBarDocumentHandler::~OReadStatusBarDocumentHandler() { } -Any SAL_CALL OReadStatusBarDocumentHandler::queryInterface( const Type & rType ) +Any SAL_CALL OReadStatusBarDocumentHandler::queryInterface( const Type & rType ) throw( RuntimeException ) { Any a = ::cppu::queryInterface( @@ -241,14 +240,14 @@ throw( SAXException, RuntimeException ) if (( m_bStatusBarStartFound && !m_bStatusBarEndFound ) || ( !m_bStatusBarStartFound && m_bStatusBarEndFound ) ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'statusbar' found!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No matching start or end element 'statusbar' found!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } void SAL_CALL OReadStatusBarDocumentHandler::startElement( - const OUString& aName, const Reference< XAttributeList > &xAttribs ) + const ::rtl::OUString& aName, const Reference< XAttributeList > &xAttribs ) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -262,8 +261,8 @@ throw( SAXException, RuntimeException ) { if ( m_bStatusBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbar' cannot be embeded into 'statusbar:statusbar'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbar' cannot be embeded into 'statusbar:statusbar'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -275,20 +274,20 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbaritem' must be embeded into element 'statusbar:statusbar'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element 'statusbar:statusbaritem' must be embeded into element 'statusbar:statusbar'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } - + if ( m_bStatusBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Element statusbar:statusbaritem is not a container!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Element statusbar:statusbaritem is not a container!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } - OUString aCommandURL; - OUString aHelpURL; + ::rtl::OUString aCommandURL; + ::rtl::OUString aHelpURL; sal_Int16 nItemBits( ItemStyle::ALIGN_CENTER|ItemStyle::DRAW_IN3D ); sal_Int16 nWidth( 0 ); sal_Int16 nOffset( STATUSBAR_OFFSET ); @@ -308,7 +307,7 @@ throw( SAXException, RuntimeException ) aCommandURL = xAttribs->getValueByIndex( n ); } break; - + case SB_ATTRIBUTE_ALIGN: { if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ALIGN_LEFT )) ) @@ -327,8 +326,8 @@ throw( SAXException, RuntimeException ) } else { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:align must have one value of 'left','right' or 'center'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:align must have one value of 'left','right' or 'center'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -352,23 +351,23 @@ throw( SAXException, RuntimeException ) } else { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } break; - + case SB_ATTRIBUTE_AUTOSIZE: { if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ) - nItemBits |= ItemStyle::AUTO_SIZE; + nItemBits |= ItemStyle::AUTO_SIZE; else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) ) nItemBits &= ~ItemStyle::AUTO_SIZE; else { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:autosize must have value 'true' or 'false'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } @@ -377,24 +376,24 @@ throw( SAXException, RuntimeException ) case SB_ATTRIBUTE_OWNERDRAW: { if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ) - nItemBits |= ItemStyle::OWNER_DRAW; + nItemBits |= ItemStyle::OWNER_DRAW; else if ( xAttribs->getValueByIndex( n ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_BOOLEAN_FALSE )) ) nItemBits &= ~ItemStyle::OWNER_DRAW; else { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:ownerdraw must have value 'true' or 'false'!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Attribute statusbar:ownerdraw must have value 'true' or 'false'!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } } break; - + case SB_ATTRIBUTE_WIDTH: { nWidth = (sal_Int16)(xAttribs->getValueByIndex( n ).toInt32()); } break; - + case SB_ATTRIBUTE_OFFSET: { nOffset = (sal_Int16)(xAttribs->getValueByIndex( n ).toInt32()); @@ -408,15 +407,15 @@ throw( SAXException, RuntimeException ) break; default: - break; + break; } } } // for if ( !bCommandURL ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute statusbar:url must have a value!" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Required attribute statusbar:url must have a value!" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } else @@ -428,7 +427,7 @@ throw( SAXException, RuntimeException ) 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].Value = makeAny( aCommandURL ); aStatusbarItemProp[1].Value = makeAny( aHelpURL ); aStatusbarItemProp[2].Value = makeAny( nOffset ); @@ -442,12 +441,12 @@ throw( SAXException, RuntimeException ) break; default: - break; + break; } } } -void SAL_CALL OReadStatusBarDocumentHandler::endElement(const OUString& aName) +void SAL_CALL OReadStatusBarDocumentHandler::endElement(const ::rtl::OUString& aName) throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -461,11 +460,11 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar' found, but no start element 'statusbar'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar' found, but no start element 'statusbar'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } - + m_bStatusBarStartFound = sal_False; } break; @@ -474,8 +473,8 @@ throw( SAXException, RuntimeException ) { if ( !m_bStatusBarItemStartFound ) { - OUString aErrorMessage = getErrorLineString(); - aErrorMessage += OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar:statusbaritem' found, but no start element 'statusbar:statusbaritem'" )); + ::rtl::OUString aErrorMessage = getErrorLineString(); + aErrorMessage += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "End element 'statusbar:statusbaritem' found, but no start element 'statusbar:statusbaritem'" )); throw SAXException( aErrorMessage, Reference< XInterface >(), Any() ); } @@ -484,23 +483,23 @@ throw( SAXException, RuntimeException ) break; default: - break; + break; } } } -void SAL_CALL OReadStatusBarDocumentHandler::characters(const OUString&) +void SAL_CALL OReadStatusBarDocumentHandler::characters(const ::rtl::OUString&) throw( SAXException, RuntimeException ) { } -void SAL_CALL OReadStatusBarDocumentHandler::ignorableWhitespace(const OUString&) +void SAL_CALL OReadStatusBarDocumentHandler::ignorableWhitespace(const ::rtl::OUString&) throw( SAXException, RuntimeException ) { } void SAL_CALL OReadStatusBarDocumentHandler::processingInstruction( - const OUString& /*aTarget*/, const OUString& /*aData*/ ) + const ::rtl::OUString& /*aTarget*/, const ::rtl::OUString& /*aData*/ ) throw( SAXException, RuntimeException ) { } @@ -510,23 +509,23 @@ void SAL_CALL OReadStatusBarDocumentHandler::setDocumentLocator( throw( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); - + m_xLocator = xLocator; } ::rtl::OUString OReadStatusBarDocumentHandler::getErrorLineString() { ResetableGuard aGuard( m_aLock ); - + char buffer[32]; 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(); } @@ -543,16 +542,16 @@ OWriteStatusBarDocumentHandler::OWriteStatusBarDocumentHandler( { ::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_aXMLStatusBarNS = OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR_PREFIX )); + 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 )); } OWriteStatusBarDocumentHandler::~OWriteStatusBarDocumentHandler() { } -void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw +void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw ( SAXException, RuntimeException ) { ResetableGuard aGuard( m_aLock ); @@ -563,23 +562,23 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY ); if ( xExtendedDocHandler.is() ) { - xExtendedDocHandler->unknown( OUString( RTL_CONSTASCII_USTRINGPARAM( STATUSBAR_DOCTYPE )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + xExtendedDocHandler->unknown( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STATUSBAR_DOCTYPE )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); } ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; Reference< XAttributeList > xList( (XAttributeList *) pList , UNO_QUERY ); - pList->AddAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_STATUSBAR )), + pList->AddAttribute( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_XMLNS_STATUSBAR )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( XMLNS_STATUSBAR )) ); - 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 )) ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )), pList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )), pList ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); sal_Int32 nItemCount = m_aStatusBarItems->getCount(); Any aAny; @@ -589,42 +588,42 @@ void OWriteStatusBarDocumentHandler::WriteStatusBarDocument() throw Sequence< PropertyValue > aProps; aAny = m_aStatusBarItems->getByIndex( nItemPos ); if ( aAny >>= aProps ) - { - OUString aCommandURL; - OUString aHelpURL; + { + ::rtl::OUString aCommandURL; + ::rtl::OUString aHelpURL; sal_Int16 nStyle( ItemStyle::ALIGN_CENTER|ItemStyle::DRAW_IN3D ); sal_Int16 nWidth( 0 ); sal_Int16 nOffset( STATUSBAR_OFFSET ); - - ExtractStatusbarItemParameters( - aProps, - aCommandURL, - aHelpURL, + + ExtractStatusbarItemParameters( + aProps, + aCommandURL, + aHelpURL, nOffset, nStyle, nWidth ); - + if ( aCommandURL.getLength() > 0 ) WriteStatusBarItem( aCommandURL, aHelpURL, nOffset, nStyle, nWidth ); } } - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )) ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); + m_xWriteDocumentHandler->endElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBAR )) ); + m_xWriteDocumentHandler->ignorableWhitespace( ::rtl::OUString() ); m_xWriteDocumentHandler->endDocument(); } - + //_________________________________________________________________________________________________________________ // protected member functions //_________________________________________________________________________________________________________________ -void OWriteStatusBarDocumentHandler::WriteStatusBarItem( +void OWriteStatusBarDocumentHandler::WriteStatusBarItem( const rtl::OUString& rCommandURL, const rtl::OUString& /*rHelpURL*/, sal_Int16 nOffset, sal_Int16 nStyle, - sal_Int16 nWidth ) + sal_Int16 nWidth ) throw ( SAXException, RuntimeException ) { ::comphelper::AttributeList* pList = new ::comphelper::AttributeList; @@ -633,7 +632,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) @@ -642,73 +641,74 @@ throw ( SAXException, RuntimeException ) // alignment if ( nStyle & ItemStyle::ALIGN_RIGHT ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_RIGHT )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_RIGHT )) ); } else if ( nStyle & ItemStyle::ALIGN_CENTER ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_CENTER )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_CENTER )) ); } else { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_LEFT )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_ALIGN_LEFT )) ); } // style ( SIB_IN is default ) if ( nStyle & ItemStyle::DRAW_FLAT ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_FLAT )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_FLAT )) ); } else if ( nStyle & ItemStyle::DRAW_OUT3D ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_OUT )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_STYLE_OUT )) ); } // autosize (default FALSE) if ( nStyle & ItemStyle::AUTO_SIZE ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_AUTOSIZE )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_AUTOSIZE )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); } // ownerdraw (default FALSE) if ( nStyle & ItemStyle::OWNER_DRAW ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OWNERDRAW )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OWNERDRAW )), m_aAttributeType, - OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_BOOLEAN_TRUE )) ); } - + // width (default 0) if ( nWidth > 0 ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_WIDTH )), m_aAttributeType, - OUString::valueOf( (sal_Int32)nWidth ) ); + ::rtl::OUString::valueOf( (sal_Int32)nWidth ) ); } // offset (default STATUSBAR_OFFSET) if ( nOffset != STATUSBAR_OFFSET ) { - pList->AddAttribute( m_aXMLStatusBarNS + OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OFFSET )), + pList->AddAttribute( m_aXMLStatusBarNS + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ATTRIBUTE_OFFSET )), m_aAttributeType, - OUString::valueOf( (sal_Int32)nOffset ) ); + ::rtl::OUString::valueOf( (sal_Int32)nOffset ) ); } - - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->startElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBARITEM )), xList ); - m_xWriteDocumentHandler->ignorableWhitespace( OUString() ); - m_xWriteDocumentHandler->endElement( OUString( RTL_CONSTASCII_USTRINGPARAM( ELEMENT_NS_STATUSBARITEM )) ); + + 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 )) ); } } // namespace framework + |