summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-18 22:30:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-19 09:30:44 +0100
commitd1fb13adf9ab73e53851e5d56cbbbe33bcdcd82c (patch)
tree43c8a344a67113e3b1a26138f6653304809f62c7 /basic
parent2add3f0e5a6b6e5b818a9e41b19436c496aa4c66 (diff)
convert tools::Config to rtl::OString
Diffstat (limited to 'basic')
-rw-r--r--basic/source/app/app.cxx16
-rw-r--r--basic/source/app/appedit.cxx6
-rw-r--r--basic/source/app/apperror.cxx8
-rw-r--r--basic/source/app/dialogs.cxx8
4 files changed, 19 insertions, 19 deletions
diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 6509ad8a54ff..392d2465f662 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -604,8 +604,8 @@ void BasicFrame::LoadIniFile()
for ( i = 0 ; i < aConf.GetGroupCount() ; i++ )
{
aConf.SetGroup( ByteString( aConf.GetGroupName( i ) ) );
- if ( ( aConf.ReadKey( "Aktuell" ).Len() || aConf.ReadKey( "Alle" ).Len() )
- &&( !aConf.ReadKey( "Current" ).Len() && !aConf.ReadKey( "All" ).Len() ) )
+ if ( ( aConf.ReadKey( "Aktuell" ).getLength() || aConf.ReadKey( "Alle" ).getLength() )
+ &&( !aConf.ReadKey( "Current" ).getLength() && !aConf.ReadKey( "All" ).getLength() ) )
{
aConf.WriteKey( "Current", aConf.ReadKey( "Aktuell" ) );
aConf.WriteKey( "All", aConf.ReadKey( "Alle" ) );
@@ -1061,13 +1061,13 @@ void BasicFrame::AddToLRU(String const& aFile)
PopupMenu *pPopup = GetMenuBar()->GetPopupMenu(RID_APPFILE);
aConfig.SetGroup("LRU");
- sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
+ sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").toInt32();
DirEntry aFileEntry( aFile );
sal_uInt16 i,nLastMove = nMaxLRU;
for ( i = 1 ; i<nMaxLRU && nLastMove == nMaxLRU ; i++ )
{
- if ( DirEntry( UniString( aConfig.ReadKey(LRUNr(i),""), RTL_TEXTENCODING_UTF8 ) ) == aFileEntry )
+ if ( DirEntry( rtl::OStringToOUString(aConfig.ReadKey(LRUNr(i),""), RTL_TEXTENCODING_UTF8) ) == aFileEntry )
nLastMove = i;
}
@@ -1075,7 +1075,7 @@ void BasicFrame::AddToLRU(String const& aFile)
pPopup->InsertSeparator();
for ( i = nLastMove ; i>1 ; i-- )
{
- if ( aConfig.ReadKey(LRUNr(i-1),"").Len() )
+ if ( aConfig.ReadKey(LRUNr(i-1),"").getLength() )
{
aConfig.WriteKey(LRUNr(i), aConfig.ReadKey(LRUNr(i-1),""));
if ( pPopup->GetItemPos( IDM_FILE_LRU1 + i-1 ) == MENU_ITEM_NOTFOUND )
@@ -1098,7 +1098,7 @@ void BasicFrame::LoadLRU()
sal_Bool bAddSep = sal_True;
aConfig.SetGroup("LRU");
- sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").ToInt32();
+ sal_uInt16 nMaxLRU = (sal_uInt16)aConfig.ReadKey("MaxLRU","4").toInt32();
if ( pPopup )
bAddSep = pPopup->GetItemPos( IDM_FILE_LRU1 ) == MENU_ITEM_NOTFOUND;
@@ -1106,7 +1106,7 @@ void BasicFrame::LoadLRU()
sal_uInt16 i;
for ( i = 1; i <= nMaxLRU && pPopup != NULL; i++)
{
- String aFile = UniString( aConfig.ReadKey(LRUNr(i)), RTL_TEXTENCODING_UTF8 );
+ String aFile = rtl::OStringToOUString(aConfig.ReadKey(LRUNr(i)), RTL_TEXTENCODING_UTF8);
if (aFile.Len() != 0)
{
@@ -1698,7 +1698,7 @@ void NewFileDialog::FilterSelect()
aConf.SetGroup( "Misc" );
ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
aConf.SetGroup( aCurrentProfile );
- aLastPath = UniString( aConf.ReadKey( aFilterType, aConf.ReadKey( "BaseDir" ) ), RTL_TEXTENCODING_UTF8 );
+ aLastPath = rtl::OStringToOUString(aConf.ReadKey(aFilterType, aConf.ReadKey( "BaseDir")), RTL_TEXTENCODING_UTF8);
SetPath( aLastPath );
}
diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx
index 1cf75d13c58a..1fffbc283f13 100644
--- a/basic/source/app/appedit.cxx
+++ b/basic/source/app/appedit.cxx
@@ -85,9 +85,9 @@ void AppEdit::LoadIniFile()
FontList aFontList( pFrame ); // Just some Window is needed
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
aConf.SetGroup("Misc");
- String aFontName = String( aConf.ReadKey( "ScriptFontName", "Courier" ), RTL_TEXTENCODING_UTF8 );
- String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
- String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
+ String aFontName = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontName", "Courier" ), RTL_TEXTENCODING_UTF8);
+ String aFontStyle = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8);
+ String aFontSize = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8);
Font aFont = aFontList.Get( aFontName, aFontStyle );
sal_uIntPtr nFontSize = aFontSize.ToInt32();
aFont.SetHeight( nFontSize );
diff --git a/basic/source/app/apperror.cxx b/basic/source/app/apperror.cxx
index 04b9e8e34f0f..f6e3fc54a07a 100644
--- a/basic/source/app/apperror.cxx
+++ b/basic/source/app/apperror.cxx
@@ -88,16 +88,16 @@ void AppError::LoadIniFile()
{
Config aConf(Config::GetConfigName( Config::GetDefDirectory(), CUniString("testtool") ));
aConf.SetGroup("Misc");
- ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
+ rtl::OString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
aConf.SetGroup( aCurrentProfile );
aBaseDir = DirEntry( aConf.ReadKey("BaseDir") );
FontList aFontList( pFrame ); // Just some Window is needed
aConf.SetGroup("Misc");
- String aFontName = String( aConf.ReadKey( "ScriptFontName", "Courier" ), RTL_TEXTENCODING_UTF8 );
- String aFontStyle = String( aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8 );
- String aFontSize = String( aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8 );
+ String aFontName = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontName", "Courier" ), RTL_TEXTENCODING_UTF8);
+ String aFontStyle = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontStyle", "normal" ), RTL_TEXTENCODING_UTF8);
+ String aFontSize = rtl::OStringToOUString(aConf.ReadKey( "ScriptFontSize", "12" ), RTL_TEXTENCODING_UTF8);
Font aFont = aFontList.Get( aFontName, aFontStyle );
sal_uIntPtr nFontSize = aFontSize.ToInt32();
aFont.SetHeight( nFontSize );
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index 2f692ab20f6e..77e1e091d5d3 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -146,7 +146,7 @@ void ConfEdit::Init( Config &aConf )
ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
aConf.SetGroup( aCurrentProfile );
- String aTemp = UniString( aConf.ReadKey( aKeyName ), RTL_TEXTENCODING_UTF8 );
+ String aTemp = rtl::OStringToOUString(aConf.ReadKey(aKeyName), RTL_TEXTENCODING_UTF8);
aEdit.SetText( aTemp );
}
@@ -182,7 +182,7 @@ void ConfEdit::Reload( Config &aConf )
aConf.SetGroup("Misc");
ByteString aCurrentProfile = aConf.ReadKey( "CurrentProfile", "Path" );
aConf.SetGroup( aCurrentProfile );
- String aValue = String( aConf.ReadKey( aKeyName ), RTL_TEXTENCODING_UTF8 );
+ String aValue = rtl::OStringToOUString(aConf.ReadKey(aKeyName), RTL_TEXTENCODING_UTF8);
aEdit.SetText( aValue );
}
@@ -817,7 +817,7 @@ void GenericOptions::LoadData()
{
String* pGroup = pGroups->at( i );
aConf.SetGroup( ByteString( *pGroup, RTL_TEXTENCODING_UTF8 ) );
- if ( aConf.ReadKey( C_KEY_AKTUELL ).Len() > 0 )
+ if ( aConf.ReadKey( C_KEY_AKTUELL ).getLength() > 0 )
aCbArea.InsertEntry( *pGroup );
delete pGroup;
}
@@ -882,7 +882,7 @@ IMPL_LINK( GenericOptions, MoveButtons, AutoTimer*, aTimer )
String GenericOptions::ReadKey( const ByteString &aGroup, const ByteString &aKey )
{
aConf.SetGroup( aGroup );
- return UniString( aConf.ReadKey( aKey ), RTL_TEXTENCODING_UTF8 );
+ return rtl::OStringToOUString(aConf.ReadKey(aKey), RTL_TEXTENCODING_UTF8);
}
IMPL_LINK( GenericOptions, LoadGroup, ComboBox*, EMPTYARG )