summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-17 10:06:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-20 12:57:31 +0000
commit8550b42a1d304054ee878c9c6debae0a10b0bf39 (patch)
tree849bc47fe7f09ce3191af98919df1adb7f5838be /basctl
parent0a14f36501e2e0ce8373464dc1655fdb1e9550b6 (diff)
remove extra string casts
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.hxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx2
-rw-r--r--basctl/source/basicide/moduldl2.cxx17
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
-rw-r--r--basctl/source/basicide/moduldlg.hxx4
5 files changed, 13 insertions, 16 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 5dbc4be5dec6..2267914c33f8 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -217,7 +217,7 @@ class WatchTreeListBox : public SvHeaderTabListBox
protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
sal_Bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 67c2a75e9fda..efe352ff4c14 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1966,7 +1966,7 @@ sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bEdit;
}
-sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
{
WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
String aVName( pItem->maName );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 96545f649d51..913de2d326e5 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -326,24 +326,21 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
//----------------------------------------------------------------------------
-sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewName )
{
- sal_Bool bValid = ( rNewText.Len() <= 30 ) && BasicIDE::IsValidSbxName( rNewText );
- String aCurText( GetEntryText( pEntry, 0 ) );
- if ( bValid && ( aCurText != rNewText ) )
+ sal_Bool bValid = ( rNewName.getLength() <= 30 ) && BasicIDE::IsValidSbxName( rNewName );
+ rtl::OUString aOldName( GetEntryText( pEntry, 0 ) );
+ if ( bValid && ( aOldName != rNewName ) )
{
try
{
- ::rtl::OUString aOldName( aCurText );
- ::rtl::OUString aNewName( rNewText );
-
Reference< script::XLibraryContainer2 > xModLibContainer( m_aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() )
- xModLibContainer->renameLibrary( aOldName, aNewName );
+ xModLibContainer->renameLibrary( aOldName, rNewName );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( xDlgLibContainer.is() )
- xDlgLibContainer->renameLibrary( aOldName, aNewName );
+ xDlgLibContainer->renameLibrary( aOldName, rNewName );
BasicIDE::MarkDocumentModified( m_aDocument );
SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
@@ -367,7 +364,7 @@ sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText
if ( !bValid )
{
- if ( rNewText.Len() > 30 )
+ if ( rNewName.getLength() > 30 )
ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_LIBNAMETOLONG ) ) ).Execute();
else
ErrorBox( this, WB_OK | WB_DEF_OK, ResId::toString( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 657c3c8cff6c..c86089ef8ff1 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -89,7 +89,7 @@ sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bRet;
}
-sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
{
sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText );
if ( !bValid )
@@ -98,7 +98,7 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rN
return sal_False;
}
- String aCurText( GetEntryText( pEntry ) );
+ rtl::OUString aCurText( GetEntryText( pEntry ) );
if ( aCurText == rNewText )
// nothing to do
return sal_True;
diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx
index 0626bab789ff..c83b2941c5fe 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -108,7 +108,7 @@ class ExtBasicTreeListBox : public BasicTreeListBox
{
protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData, SvLBoxEntry* pEntry );
virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* pEntry );
@@ -148,7 +148,7 @@ public:
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind );
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }