Kaydet (Commit) 8e600d76 authored tarafından Tomas O'Connor's avatar Tomas O'Connor

Use OUStringBuffer when reading description from parcel-descriptor.xml file

üst 51ee7d2d
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ScriptMetadataImporter.cxx,v $ * $RCSfile: ScriptMetadataImporter.cxx,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: dfoster $ $Date: 2002-11-06 16:26:25 $ * last change: $Author: toconnor $ $Date: 2003-02-25 16:16:40 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -85,12 +85,14 @@ ScriptMetadataImporter::ScriptMetadataImporter( ...@@ -85,12 +85,14 @@ ScriptMetadataImporter::ScriptMetadataImporter(
: m_xContext( xContext ) : m_xContext( xContext )
{ {
OSL_TRACE( "< ScriptMetadataImporter ctor called >\n" ); OSL_TRACE( "< ScriptMetadataImporter ctor called >\n" );
ms_localeDesc = new OUStringBuffer();
} }
//************************************************************************* //*************************************************************************
ScriptMetadataImporter::~ScriptMetadataImporter() SAL_THROW( () ) ScriptMetadataImporter::~ScriptMetadataImporter() SAL_THROW( () )
{ {
OSL_TRACE( "< ScriptMetadataImporter dtor called >\n" ); OSL_TRACE( "< ScriptMetadataImporter dtor called >\n" );
delete ms_localeDesc;
} }
...@@ -389,7 +391,7 @@ void ScriptMetadataImporter::endElement( const ::rtl::OUString & aName ) ...@@ -389,7 +391,7 @@ void ScriptMetadataImporter::endElement( const ::rtl::OUString & aName )
break; break;
case LOCALE: case LOCALE:
m_ScriptData.locales[ ms_localeLang ] = ::std::make_pair( m_ScriptData.locales[ ms_localeLang ] = ::std::make_pair(
ms_localeDisName, ms_localeDesc ); ms_localeDisName, ms_localeDesc->makeStringAndClear().trim() );
break; break;
case FILESET: case FILESET:
OSL_TRACE("adding fileset %s to filesets map", OSL_TRACE("adding fileset %s to filesets map",
...@@ -414,7 +416,7 @@ void ScriptMetadataImporter::endElement( const ::rtl::OUString & aName ) ...@@ -414,7 +416,7 @@ void ScriptMetadataImporter::endElement( const ::rtl::OUString & aName )
void ScriptMetadataImporter::characters( const ::rtl::OUString & aChars ) void ScriptMetadataImporter::characters( const ::rtl::OUString & aChars )
throw ( xml::sax::SAXException, RuntimeException ) throw ( xml::sax::SAXException, RuntimeException )
{ {
OSL_TRACE( "ScriptMetadataImporter: characters()\n" ); OSL_TRACE( "ScriptMetadataImporter: characters()\n");
::osl::Guard< ::osl::Mutex > aGuard( m_mutex ); ::osl::Guard< ::osl::Mutex > aGuard( m_mutex );
...@@ -422,7 +424,7 @@ void ScriptMetadataImporter::characters( const ::rtl::OUString & aChars ) ...@@ -422,7 +424,7 @@ void ScriptMetadataImporter::characters( const ::rtl::OUString & aChars )
{ {
case DESCRIPTION: case DESCRIPTION:
//Put description into the struct //Put description into the struct
ms_localeDesc = aChars; ms_localeDesc->append(aChars);
break; break;
} }
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ScriptMetadataImporter.hxx,v $ * $RCSfile: ScriptMetadataImporter.hxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: npower $ $Date: 2002-10-24 10:37:53 $ * last change: $Author: toconnor $ $Date: 2003-02-25 16:16:40 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <vector> #include <vector>
#include <rtl/ustring.h> #include <rtl/ustring.h>
#include <rtl/ustrbuf.hxx>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <cppuhelper/implbase1.hxx> // helper for component factory #include <cppuhelper/implbase1.hxx> // helper for component factory
...@@ -256,7 +257,7 @@ private: ...@@ -256,7 +257,7 @@ private:
/** @internal */ /** @internal */
::rtl::OUString ms_localeLang; ::rtl::OUString ms_localeLang;
::rtl::OUString ms_localeDisName; ::rtl::OUString ms_localeDisName;
::rtl::OUString ms_localeDesc; ::rtl::OUStringBuffer *ms_localeDesc;
props_vec mv_filesetprops; props_vec mv_filesetprops;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment