diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-03-31 15:54:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 14:53:48 +0100 |
commit | ae9219769106648ac35d594fc07c83103a62ecbe (patch) | |
tree | dbc21e302fe1808fc798c15156ad3a96418f5f45 /framework/source/fwe/xml | |
parent | 437f93ec8d1cb0f1486c69b863cb509aea4dac65 (diff) |
remove static objects from static_initialization_and_destruction chain
Diffstat (limited to 'framework/source/fwe/xml')
-rw-r--r-- | framework/source/fwe/xml/saxnamespacefilter.cxx | 11 | ||||
-rw-r--r-- | framework/source/fwe/xml/xmlnamespaces.cxx | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/framework/source/fwe/xml/saxnamespacefilter.cxx b/framework/source/fwe/xml/saxnamespacefilter.cxx index ede89d5232b4..52d5dc0ad54f 100644 --- a/framework/source/fwe/xml/saxnamespacefilter.cxx +++ b/framework/source/fwe/xml/saxnamespacefilter.cxx @@ -44,9 +44,6 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::uno; -const ::rtl::OUString aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )); -const ::rtl::OUString aXMLAttributeType( RTL_CONSTASCII_USTRINGPARAM( "CDATA" )); - namespace framework{ @@ -54,7 +51,9 @@ SaxNamespaceFilter::SaxNamespaceFilter( Reference< XDocumentHandler >& rSax1Docu ThreadHelpBase( &Application::GetSolarMutex() ), m_xLocator( 0 ), xDocumentHandler( rSax1DocumentHandler ), - m_nDepth( 0 ) + m_nDepth( 0 ), + m_aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )), + m_aXMLAttributeType( RTL_CONSTASCII_USTRINGPARAM( "CDATA" )) { } @@ -89,7 +88,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( for ( sal_Int16 i=0; i< xAttribs->getLength(); i++ ) { ::rtl::OUString aName = xAttribs->getNameByIndex( i ); - if ( aName.compareTo( aXMLAttributeNamespace, aXMLAttributeNamespace.getLength() ) == 0 ) + if ( aName.compareTo( m_aXMLAttributeNamespace, m_aXMLAttributeNamespace.getLength() ) == 0 ) aXMLNamespaces.addNamespace( aName, xAttribs->getValueByIndex( i )); else aAttributeIndexes.push_back( i ); @@ -109,7 +108,7 @@ void SAL_CALL SaxNamespaceFilter::startElement( ::rtl::OUString aAttributeName = xAttribs->getNameByIndex( *i ); ::rtl::OUString aValue = xAttribs->getValueByIndex( *i ); ::rtl::OUString aNamespaceAttributeName = aXMLNamespaces.applyNSToAttributeName( aAttributeName ); - pNewList->AddAttribute( aNamespaceAttributeName, aXMLAttributeType, aValue ); + pNewList->AddAttribute( aNamespaceAttributeName, m_aXMLAttributeType, aValue ); } } catch ( SAXException& e ) diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index 80104946dfd1..da2eb459eb18 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -32,12 +32,11 @@ using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::uno; -const ::rtl::OUString aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )); - namespace framework { XMLNamespaces::XMLNamespaces() + : m_aXMLAttributeNamespace( RTL_CONSTASCII_USTRINGPARAM( "xmlns" )) { } @@ -55,10 +54,10 @@ void XMLNamespaces::addNamespace( const ::rtl::OUString& aName, const ::rtl::OUS { NamespaceMap::iterator p; ::rtl::OUString aNamespaceName( aName ); - sal_Int32 nXMLNamespaceLength = aXMLAttributeNamespace.getLength(); + sal_Int32 nXMLNamespaceLength = m_aXMLAttributeNamespace.getLength(); // delete preceding "xmlns" - if ( aNamespaceName.compareTo( aXMLAttributeNamespace, nXMLNamespaceLength ) == 0 ) + if ( aNamespaceName.compareTo( m_aXMLAttributeNamespace, nXMLNamespaceLength ) == 0 ) { if ( aNamespaceName.getLength() == nXMLNamespaceLength ) { |