summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-12-09 00:50:03 -0500
committerAugust Sodora <augsod@gmail.com>2011-12-09 00:50:03 -0500
commit9c2f9c79aca1e1dc0670d6443fd7865b8dc1ee63 (patch)
treee6f38020b4d280b3ebc6f76d435fcd1ff8bdb985 /basctl
parent7ffca8ed2ed7dda9d74edb498ec74620e9489c7a (diff)
String->OUString
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx2
-rw-r--r--basctl/source/basicide/bastype2.cxx2
-rw-r--r--basctl/source/basicide/bastype3.cxx2
-rw-r--r--basctl/source/basicide/bastypes.cxx40
-rw-r--r--basctl/source/basicide/moduldl2.cxx6
-rw-r--r--basctl/source/basicide/moduldlg.cxx2
-rw-r--r--basctl/source/inc/bastypes.hxx12
7 files changed, 33 insertions, 33 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 9846e6c30858..b9245db01654 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -550,7 +550,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
}
}
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 15ce34181239..c3ce38a757f0 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -661,7 +661,7 @@ long BasicTreeListBox::ExpandingHdl()
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
}
}
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 0edbddc65b88..9f41a7a8842b 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -78,7 +78,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
}
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index ca6b97a42f40..c019142ba796 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -38,6 +38,7 @@
#include <basic/basmgr.hxx>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
+#include <comphelper/string.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/viewfrm.hxx>
@@ -756,43 +757,43 @@ LibInfoItem* LibInfos::GetInfo( const LibInfoKey& rKey )
return pItem;
}
-bool QueryDel( const String& rName, const ResId& rId, Window* pParent )
+bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
{
- String aQuery( rId );
- String aName( rName );
- aName += '\'';
- aName.Insert( '\'', 0 );
- aQuery.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "XX" ) ), aName );
+ ::rtl::OUString aQuery( ResId::toString(rId) );
+ ::rtl::OUStringBuffer aNameBuf( rName );
+ aNameBuf.append('\'');
+ aNameBuf.insert(0, '\'');
+ aQuery = ::comphelper::string::replace(aQuery, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "XX")), aNameBuf.makeStringAndClear());
QueryBox aQueryBox( pParent, WB_YES_NO | WB_DEF_YES, aQuery );
return ( aQueryBox.Execute() == RET_YES );
}
-bool QueryDelMacro( const String& rName, Window* pParent )
+bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
}
-bool QueryReplaceMacro( const String& rName, Window* pParent )
+bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
}
-bool QueryDelDialog( const String& rName, Window* pParent )
+bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
}
-bool QueryDelLib( const String& rName, bool bRef, Window* pParent )
+bool QueryDelLib( const ::rtl::OUString& rName, bool bRef, Window* pParent )
{
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
}
-bool QueryDelModule( const String& rName, Window* pParent )
+bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
}
-bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, bool bRepeat, bool bNewTitle )
+bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat, bool bNewTitle )
{
bool bOK = false;
sal_uInt16 nRet = 0;
@@ -806,8 +807,8 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
// set new title
if ( bNewTitle )
{
- String aTitle( IDEResId( RID_STR_ENTERPASSWORD ) );
- aTitle.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "XX" ) ), rLibName );
+ ::rtl::OUString aTitle(ResId::toString(IDEResId(RID_STR_ENTERPASSWORD)));
+ aTitle = ::comphelper::string::replace(aTitle, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("XX")), rLibName);
pDlg->SetText( aTitle );
}
@@ -817,19 +818,18 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
// verify password
if ( nRet == RET_OK )
{
- ::rtl::OUString aOULibName( rLibName );
- if ( xLibContainer.is() && xLibContainer->hasByName( aOULibName ) )
+ if ( xLibContainer.is() && xLibContainer->hasByName( rLibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xLibContainer, UNO_QUERY );
- if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
+ if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) )
{
rPassword = pDlg->GetPassword();
- ::rtl::OUString aOUPassword( rPassword );
- bOK = xPasswd->verifyLibraryPassword( aOULibName, aOUPassword );
+ // ::rtl::OUString aOUPassword( rPassword );
+ bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword );
if ( !bOK )
{
- ErrorBox aErrorBox( Application::GetDefDialogParent(), WB_OK, String( IDEResId( RID_STR_WRONGPASSWORD ) ) );
+ ErrorBox aErrorBox( Application::GetDefDialogParent(), WB_OK, ResId::toString( IDEResId( RID_STR_WRONGPASSWORD ) ) );
aErrorBox.Execute();
}
}
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5777fe82991d..ebc662c0e8cd 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -313,7 +313,7 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
@@ -1006,7 +1006,7 @@ void LibPage::InsertLib()
// check, if the library is password protected
sal_Bool bOK = sal_False;
- String aPassword;
+ ::rtl::OUString aPassword;
if ( xModLibContImport.is() && xModLibContImport->hasByName( aOULibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
@@ -1200,7 +1200,7 @@ void LibPage::Export( void )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index c63e6a6427c6..0c66258da524 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -771,7 +771,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- String aPassword;
+ ::rtl::OUString aPassword;
bOK = QueryPassword( xModLibContainer, rLibName, aPassword );
}
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index f65d1d690c6e..7b177a94c989 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -274,12 +274,12 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32
String CreateMgrAndLibStr( const String& rMgrName, const String& rLibName );
sal_uLong CalcLineCount( SvStream& rStream );
-bool QueryReplaceMacro( const String& rName, Window* pParent = 0 );
-bool QueryDelMacro( const String& rName, Window* pParent = 0 );
-bool QueryDelDialog( const String& rName, Window* pParent = 0 );
-bool QueryDelModule( const String& rName, Window* pParent = 0 );
-bool QueryDelLib( const String& rName, bool bRef = sal_False, Window* pParent = 0 );
-bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const String& rLibName, String& rPassword, bool bRepeat = false, bool bNewTitle = false );
+bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
+bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
+bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent = 0 );
+bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent = 0 );
+bool QueryDelLib( const ::rtl::OUString& rName, bool bRef = false, Window* pParent = 0 );
+bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat = false, bool bNewTitle = false );
class ModuleInfoHelper
{