summaryrefslogtreecommitdiff
path: root/sot/source/sdstor/stgelem.cxx
diff options
context:
space:
mode:
authormm <mm@openoffice.org>2001-05-14 10:23:33 +0000
committermm <mm@openoffice.org>2001-05-14 10:23:33 +0000
commit4c68f9916ffed67963d5277e5bb24b6d368e8ddb (patch)
tree75a8965bcc08606117b80ae25a126f163fb9c867 /sot/source/sdstor/stgelem.cxx
parent0b024a3bbac200acaf051b9ab22ee800f4ddd503 (diff)
stgelem.cxx
Diffstat (limited to 'sot/source/sdstor/stgelem.cxx')
-rw-r--r--sot/source/sdstor/stgelem.cxx30
1 files changed, 23 insertions, 7 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 38dc434992f8..e968f4c764a1 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: stgelem.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: pl $ $Date: 2001-05-11 16:59:14 $
+ * last change: $Author: mm $ $Date: 2001-05-14 11:23:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,8 @@
#include <string.h> // memset(), memcpy()
#include <rtl/ustring.hxx>
+#include <com/sun/star/lang/Locale.hpp>
+#include <unotools/charclass.hxx>
#include "stg.hxx"
#include "stgelem.hxx"
#include "stgcache.hxx"
@@ -288,11 +290,24 @@ BOOL StgEntry::Init()
return TRUE;
}
+static String ToUpperUnicode( const String & rStr )
+{
+ // I don't know the locale, so en_US is hopefully fine
+ /*
+ com.sun.star.lang.Locale aLocale;
+ aLocale.Language = OUString::createFromAscii( "en" );
+ aLocale.Country = OUString::createFromAscii( "US" );
+ */
+ static CharClass aCC( com::sun::star::lang::Locale( rtl::OUString::createFromAscii( "en" ),
+ rtl::OUString::createFromAscii( "US" ), rtl::OUString() ) );
+ return aCC.toUpper( rStr, 0, rStr.Len() );
+}
+
+
BOOL StgEntry::SetName( const String& rName )
{
- // make upper case character in current language
- aName = rName;
- aName = rtl::OUString( aName ).toAsciiUpperCase();
+ // I don't know the locale, so en_US is hopefully fine
+ aName = ToUpperUnicode( rName );
aName.Erase( 31 );
int i;
@@ -401,9 +416,10 @@ BOOL StgEntry::Load( const void* pFrom )
return FALSE;
aName = String( nName, n );
- // make upper case character in current language
- aName = rtl::OUString( aName ).toAsciiUpperCase();
+ // I don't know the locale, so en_US is hopefully fine
+ aName = ToUpperUnicode( aName );
aName.Erase( 31 );
+
return TRUE;
}