diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-27 20:16:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-27 20:16:51 +0100 |
commit | 2914d52fdf6ef3b672190ccbb2c8be5a6760187e (patch) | |
tree | 49e7181a50c9f864f3b132c5c4914ff445a47021 /xmlreader | |
parent | 1692cf6854ff7adbb2bd47f2f7ec2b3de51864f3 (diff) |
remove xmlreader from string now I don't need it anymore
Change-Id: I8d280a5fa352bf4514a5e593b34be767648f4e64
Diffstat (limited to 'xmlreader')
-rw-r--r-- | xmlreader/inc/xmlreader/xmlreader.hxx | 6 | ||||
-rw-r--r-- | xmlreader/source/xmlreader.cxx | 23 |
2 files changed, 2 insertions, 27 deletions
diff --git a/xmlreader/inc/xmlreader/xmlreader.hxx b/xmlreader/inc/xmlreader/xmlreader.hxx index 1d3faf05c0c2..b6de02734e84 100644 --- a/xmlreader/inc/xmlreader/xmlreader.hxx +++ b/xmlreader/inc/xmlreader/xmlreader.hxx @@ -44,10 +44,6 @@ public: com::sun::star::container::NoSuchElementException, com::sun::star::uno::RuntimeException)); - //string is not copied so must persist for lifetime - //of XmlReader - explicit XmlReader(const char * str, sal_uInt64 len) SAL_THROW(()); - ~XmlReader(); enum { NAMESPACE_NONE = -2, NAMESPACE_UNKNOWN = -1, NAMESPACE_XML = 0 }; @@ -174,8 +170,6 @@ private: SAL_DLLPRIVATE int toNamespaceId(NamespaceIris::size_type pos); - SAL_DLLPRIVATE void init(); - rtl::OUString fileUrl_; oslFileHandle fileHandle_; sal_uInt64 fileSize_; diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx index e297cd176c53..fcf6e157a246 100644 --- a/xmlreader/source/xmlreader.cxx +++ b/xmlreader/source/xmlreader.cxx @@ -96,38 +96,19 @@ XmlReader::XmlReader(rtl::OUString const & fileUrl) rtl::OUString::valueOf(static_cast< sal_Int32 >(e)) + ")"), css::uno::Reference< css::uno::XInterface >()); } - init(); - pos_ = static_cast< char * >(fileAddress_); - end_ = pos_ + fileSize_; -} - -XmlReader::XmlReader(const char * str, sal_uInt64 len) - SAL_THROW(()) - : fileHandle_(NULL) - , fileSize_(len) - , fileAddress_(NULL) -{ - init(); - pos_ = str; - end_ = pos_ + fileSize_; -} - -void XmlReader::init() -{ namespaceIris_.push_back( Span( RTL_CONSTASCII_STRINGPARAM( "http://www.w3.org/XML/1998/namespace"))); namespaces_.push_back( NamespaceData(Span(RTL_CONSTASCII_STRINGPARAM("xml")), NAMESPACE_XML)); + pos_ = static_cast< char * >(fileAddress_); + end_ = pos_ + fileSize_; state_ = STATE_CONTENT; firstAttribute_ = true; } XmlReader::~XmlReader() { - if (!fileHandle_) - return; - oslFileError e = osl_unmapMappedFile(fileHandle_, fileAddress_, fileSize_); if (e != osl_File_E_None) { SAL_WARN( |