Kaydet (Commit) b0aac3f4 authored tarafından August Sodora's avatar August Sodora

String->OUString

üst 6703e91a
...@@ -732,7 +732,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton ) ...@@ -732,7 +732,7 @@ IMPL_LINK( ObjectPage, ButtonHdl, Button *, pButton )
return 0; return 0;
} }
bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName ) bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName )
{ {
bool bRet = false; bool bRet = false;
...@@ -740,8 +740,8 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName ) ...@@ -740,8 +740,8 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
BasicEntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pCurEntry ) ); BasicEntryDescriptor aDesc( aBasicBox.GetEntryDescriptor( pCurEntry ) );
rDocument = aDesc.GetDocument(); rDocument = aDesc.GetDocument();
rLibName = aDesc.GetLibName(); rLibName = aDesc.GetLibName();
if ( !rLibName.Len() ) if ( rLibName.isEmpty() )
rLibName = String::CreateFromAscii( "Standard" ); rLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
DBG_ASSERT( rDocument.isAlive(), "ObjectPage::GetSelection: no or dead ScriptDocument in the selection!" ); DBG_ASSERT( rDocument.isAlive(), "ObjectPage::GetSelection: no or dead ScriptDocument in the selection!" );
if ( !rDocument.isAlive() ) if ( !rDocument.isAlive() )
...@@ -784,11 +784,11 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName ) ...@@ -784,11 +784,11 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
void ObjectPage::NewModule() void ObjectPage::NewModule()
{ {
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() ); ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
String aLibName; ::rtl::OUString aLibName;
if ( GetSelection( aDocument, aLibName ) ) if ( GetSelection( aDocument, aLibName ) )
{ {
String aModName; ::rtl::OUString aModName;
createModImpl( static_cast<Window*>( this ), aDocument, createModImpl( static_cast<Window*>( this ), aDocument,
aBasicBox, aLibName, aModName, true ); aBasicBox, aLibName, aModName, true );
} }
...@@ -797,7 +797,7 @@ void ObjectPage::NewModule() ...@@ -797,7 +797,7 @@ void ObjectPage::NewModule()
void ObjectPage::NewDialog() void ObjectPage::NewDialog()
{ {
ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() ); ScriptDocument aDocument( ScriptDocument::getApplicationScriptDocument() );
String aLibName; ::rtl::OUString aLibName;
if ( GetSelection( aDocument, aLibName ) ) if ( GetSelection( aDocument, aLibName ) )
{ {
...@@ -809,14 +809,14 @@ void ObjectPage::NewDialog() ...@@ -809,14 +809,14 @@ void ObjectPage::NewDialog()
if (xNewDlg->Execute() != 0) if (xNewDlg->Execute() != 0)
{ {
String aDlgName( xNewDlg->GetObjectName() ); ::rtl::OUString aDlgName( xNewDlg->GetObjectName() );
if (aDlgName.Len() == 0) if (aDlgName.isEmpty())
aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName); aDlgName = aDocument.createObjectName( E_DIALOGS, aLibName);
if ( aDocument.hasDialog( aLibName, aDlgName ) ) if ( aDocument.hasDialog( aLibName, aDlgName ) )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, ErrorBox( this, WB_OK | WB_DEF_OK,
String( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute(); ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute();
} }
else else
{ {
...@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent ) ...@@ -933,7 +933,7 @@ LibDialog::LibDialog( Window* pParent )
aReferenceBox( this, IDEResId( RID_CB_REF ) ), aReferenceBox( this, IDEResId( RID_CB_REF ) ),
aReplaceBox( this, IDEResId( RID_CB_REPL ) ) aReplaceBox( this, IDEResId( RID_CB_REPL ) )
{ {
SetText( String( IDEResId( RID_STR_APPENDLIBS ) ) ); SetText( ResId::toString( IDEResId( RID_STR_APPENDLIBS ) ) );
FreeResource(); FreeResource();
} }
...@@ -942,16 +942,16 @@ LibDialog::~LibDialog() ...@@ -942,16 +942,16 @@ LibDialog::~LibDialog()
{ {
} }
void LibDialog::SetStorageName( const String& rName ) void LibDialog::SetStorageName( const ::rtl::OUString& rName )
{ {
String aName( IDEResId( RID_STR_FILENAME ) ); ::rtl::OUString aName( ResId::toString( IDEResId( RID_STR_FILENAME ) ) );
aName += rName; aName += rName;
aStorageName.SetText( aName ); aStorageName.SetText( aName );
} }
// Helper function // Helper function
SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
BasicTreeListBox& rBasicBox, const String& rLibName, String aModName, bool bMain ) BasicTreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain )
{ {
OSL_ENSURE( rDocument.isAlive(), "createModImpl: invalid document!" ); OSL_ENSURE( rDocument.isAlive(), "createModImpl: invalid document!" );
if ( !rDocument.isAlive() ) if ( !rDocument.isAlive() )
...@@ -959,11 +959,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, ...@@ -959,11 +959,11 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
SbModule* pModule = NULL; SbModule* pModule = NULL;
String aLibName( rLibName ); ::rtl::OUString aLibName( rLibName );
if ( !aLibName.Len() ) if ( aLibName.isEmpty() )
aLibName = String::CreateFromAscii( "Standard" ); aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName ); rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
if ( !aModName.Len() ) if ( aModName.isEmpty() )
aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
boost::scoped_ptr< NewObjectDialog > xNewDlg( boost::scoped_ptr< NewObjectDialog > xNewDlg(
...@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, ...@@ -1011,7 +1011,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
if( pBasic && rDocument.isInVBAMode() ) if( pBasic && rDocument.isInVBAMode() )
{ {
// add the new module in the "Modules" entry // add the new module in the "Modules" entry
SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, String( IDEResId( RID_STR_NORMAL_MODULES ) ) , OBJ_TYPE_NORMAL_MODULES ); SvLBoxEntry* pLibSubEntry = rBasicBox.FindEntry( pLibEntry, ResId::toString( IDEResId( RID_STR_NORMAL_MODULES ) ) , OBJ_TYPE_NORMAL_MODULES );
if( pLibSubEntry ) if( pLibSubEntry )
{ {
if( !rBasicBox.IsExpanded( pLibSubEntry ) ) if( !rBasicBox.IsExpanded( pLibSubEntry ) )
...@@ -1040,7 +1040,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, ...@@ -1040,7 +1040,7 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
catch (const container::ElementExistException& ) catch (const container::ElementExistException& )
{ {
ErrorBox( pWin, WB_OK | WB_DEF_OK, ErrorBox( pWin, WB_OK | WB_DEF_OK,
String( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute(); ResId::toString( IDEResId( RID_STR_SBXNAMEALLREADYUSED2 ) ) ).Execute();
} }
catch (const container::NoSuchElementException& ) catch (const container::NoSuchElementException& )
{ {
...@@ -1050,7 +1050,4 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, ...@@ -1050,7 +1050,4 @@ SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
return pModule; return pModule;
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -171,7 +171,7 @@ public: ...@@ -171,7 +171,7 @@ public:
LibDialog( Window* pParent ); LibDialog( Window* pParent );
~LibDialog(); ~LibDialog();
void SetStorageName( const String& rName ); void SetStorageName( const ::rtl::OUString& rName );
BasicCheckBox& GetLibBox() { return aLibBox; } BasicCheckBox& GetLibBox() { return aLibBox; }
sal_Bool IsReference() const { return aReferenceBox.IsChecked(); } sal_Bool IsReference() const { return aReferenceBox.IsChecked(); }
...@@ -211,7 +211,7 @@ protected: ...@@ -211,7 +211,7 @@ protected:
DECL_LINK( BasicBoxHighlightHdl, BasicTreeListBox * ); DECL_LINK( BasicBoxHighlightHdl, BasicTreeListBox * );
DECL_LINK( ButtonHdl, Button * ); DECL_LINK( ButtonHdl, Button * );
void CheckButtons(); void CheckButtons();
bool GetSelection( ScriptDocument& rDocument, String& rLibName ); bool GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibName );
void DeleteCurrent(); void DeleteCurrent();
void NewModule(); void NewModule();
void NewDialog(); void NewDialog();
...@@ -282,7 +282,7 @@ public: ...@@ -282,7 +282,7 @@ public:
// Helper functions // Helper functions
SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument, SbModule* createModImpl( Window* pWin, const ScriptDocument& rDocument,
BasicTreeListBox& rBasicBox, const String& rLibName, String aModName, bool bMain = false ); BasicTreeListBox& rBasicBox, const ::rtl::OUString& rLibName, ::rtl::OUString aModName, bool bMain = false );
void createLibImpl( Window* pWin, const ScriptDocument& rDocument, void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
BasicCheckBox* pLibBox, BasicTreeListBox* pBasicBox ); BasicCheckBox* pLibBox, BasicTreeListBox* pBasicBox );
......
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