[Libreoffice-commits] .: 4 commits - basctl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Oct 9 07:38:34 PDT 2012
basctl/source/basicide/basides2.cxx | 18 +-
basctl/source/basicide/basides3.cxx | 12 -
basctl/source/basicide/basobj3.cxx | 30 +--
basctl/source/basicide/bastype2.cxx | 116 +++++++-------
basctl/source/basicide/bastype3.cxx | 10 -
basctl/source/basicide/bastypes.cxx | 54 +++---
basctl/source/basicide/brkdlg.cxx | 12 -
basctl/source/basicide/iderdll.cxx | 7
basctl/source/basicide/linenumberwindow.cxx | 6
basctl/source/basicide/localizationmgr.cxx | 228 ++++++++++++++--------------
basctl/source/basicide/macrodlg.cxx | 10 -
basctl/source/basicide/moduldl2.cxx | 172 ++++++++++-----------
basctl/source/inc/bastypes.hxx | 62 +++----
13 files changed, 367 insertions(+), 370 deletions(-)
New commits:
commit 7b34748b1bfd8b5fe0406c1f6bdaaa585d7bc4c3
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Sun Oct 7 17:31:09 2012 -0300
Some OUString and RTL_CONST refactoring
Change-Id: I27709f12ef6e3448ed457bd0e9f2056979ba0291
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index d8f2f5e..9be73f1 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i )
{
BreakPoint* pBrk = m_aModifiedBreakPointList.at( i );
- String aEntryStr( "# " );
+ OUString aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
}
@@ -200,7 +200,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
pBrk->bEnabled = aCheckBox.IsChecked();
pBrk->nStopAfter = (size_t) aNumericField.GetValue();
m_aModifiedBreakPointList.InsertSorted( pBrk );
- String aEntryStr( "# " );
+ OUString aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
if (SfxDispatcher* pDispatcher = GetDispatcher())
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 4feb8ff..9bc56e9 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -303,7 +303,7 @@ void MacroChooser::DeleteMacro()
SbModule* pModule = pMethod->GetModule();
DBG_ASSERT( pModule, "DeleteMacro: Kein Modul?!" );
- ::rtl::OUString aSource( pModule->GetSource32() );
+ OUString aSource( pModule->GetSource32() );
sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
pModule->GetMethods()->Remove( pMethod );
@@ -335,11 +335,11 @@ SbMethod* MacroChooser::CreateMacro()
String aLibName( aDesc.GetLibName() );
if ( !aLibName.Len() )
- aLibName = rtl::OUString("Standard");
+ aLibName = "Standard" ;
aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
- ::rtl::OUString aOULibName( aLibName );
+ OUString aOULibName( aLibName );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
xModLibContainer->loadLibrary( aOULibName );
@@ -405,7 +405,7 @@ void MacroChooser::CheckButtons()
if ( nDepth == 1 || nDepth == 2 )
{
ScriptDocument aDocument( aDesc.GetDocument() );
- ::rtl::OUString aOULibName( aDesc.GetLibName() );
+ OUString aOULibName( aDesc.GetLibName() );
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
@@ -504,7 +504,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
if ( pModule )
{
String aStr = aMacrosInTxtBaseStr;
- aStr += rtl::OUString(" ");
+ aStr += " " ;
aStr += pModule->GetName();
aMacrosInTxt.SetText( aStr );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5de042e..931e727 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -67,7 +67,6 @@
namespace basctl
{
-using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -137,7 +136,7 @@ void LibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEn
static_cast<LibUserData*>(pEntry->GetUserData())->
GetDocument() );
- rtl::OUString aLibName(
+ OUString aLibName(
static_cast< SvLBoxString * >(pEntry->GetItem(1))->GetText());
Reference< script::XLibraryContainer2 > xModLibContainer(
aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY);
@@ -287,7 +286,7 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
DBG_ASSERT( pEntry, "Kein Eintrag?" );
// check, if Standard library
- ::rtl::OUString aLibName = GetEntryText( pEntry, 0 );
+ OUString aLibName = GetEntryText( pEntry, 0 );
if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute();
@@ -312,7 +311,7 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
- ::rtl::OUString aPassword;
+ OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
@@ -327,10 +326,10 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
//----------------------------------------------------------------------------
-sal_Bool CheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewName )
+sal_Bool CheckBox::EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewName )
{
bool bValid = rNewName.getLength() <= 30 && IsValidSbxName(rNewName);
- rtl::OUString aOldName( GetEntryText( pEntry, 0 ) );
+ OUString aOldName( GetEntryText( pEntry, 0 ) );
if ( bValid && ( aOldName != rNewName ) )
{
try
@@ -451,7 +450,7 @@ GotoLineDialog::GotoLineDialog(Window * pParent )
sal_Int32 GotoLineDialog::GetLineNumber()
{
- return rtl::OUString( aEdit.GetText() ).toInt32();
+ return OUString( aEdit.GetText() ).toInt32();
}
IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
@@ -561,7 +560,7 @@ void LibPage::CheckButtons()
SvLBoxEntry* pCur = aLibBox.GetCurEntry();
if ( pCur )
{
- ::rtl::OUString aLibName = aLibBox.GetEntryText( pCur, 0 );
+ OUString aLibName = aLibBox.GetEntryText( pCur, 0 );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
@@ -682,7 +681,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
else if ( pButton == &aPasswordButton )
{
SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
- ::rtl::OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
+ OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// load module library (if not loaded)
Reference< script::XLibraryContainer > xModLibContainer = m_aCurDocument.getLibraryContainer( E_SCRIPTS );
@@ -749,15 +748,15 @@ IMPL_LINK_INLINE_START( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
long nRet = 0;
SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
- ::rtl::OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
+ OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
Reference< script::XLibraryContainerPassword > xPasswd( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xPasswd.is() )
{
try
{
- ::rtl::OUString aOldPassword( pDlg->GetOldPassword() );
- ::rtl::OUString aNewPassword( pDlg->GetNewPassword() );
+ OUString aOldPassword( pDlg->GetOldPassword() );
+ OUString aNewPassword( pDlg->GetNewPassword() );
xPasswd->changeLibraryPassword( aLibName, aOldPassword, aNewPassword );
nRet = 1;
}
@@ -789,30 +788,30 @@ void LibPage::InsertLib()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
+ "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
xFP->setTitle( String( IDEResId( RID_STR_APPENDLIBS ) ) );
// filter
- ::rtl::OUString aTitle = String( IDEResId( RID_STR_BASIC ) );
- ::rtl::OUString aFilter;
- aFilter = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.sbl;*.xlc;*.xlb" ) ); // library files
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdw;*.sxw;*.odt" ) ); // text
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.vor;*.stw;*.ott" ) ); // text template
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sgl;*.sxg;*.odm" ) ); // master document
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.oth" ) ); // html document template
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdc;*.sxc;*.ods" ) ); // spreadsheet
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.stc;*.ots" ) ); // spreadsheet template
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sda;*.sxd;*.odg" ) ); // drawing
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.std;*.otg" ) ); // drawing template
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdd;*.sxi;*.odp" ) ); // presentation
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sti;*.otp" ) ); // presentation template
- aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sxm;*.odf" ) ); // formula
+ OUString aTitle = String( IDEResId( RID_STR_BASIC ) );
+ OUString aFilter;
+ aFilter = "*.sbl;*.xlc;*.xlb" ; // library files
+ aFilter += ";*.sdw;*.sxw;*.odt" ; // text
+ aFilter += ";*.vor;*.stw;*.ott" ; // text template
+ aFilter += ";*.sgl;*.sxg;*.odm" ; // master document
+ aFilter += ";*.oth" ; // html document template
+ aFilter += ";*.sdc;*.sxc;*.ods" ; // spreadsheet
+ aFilter += ";*.stc;*.ots" ; // spreadsheet template
+ aFilter += ";*.sda;*.sxd;*.odg" ; // drawing
+ aFilter += ";*.std;*.otg" ; // drawing template
+ aFilter += ";*.sdd;*.sxi;*.odp" ; // presentation
+ aFilter += ";*.sti;*.otp" ; // presentation template
+ aFilter += ";*.sxm;*.odf" ; // formula
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aTitle, aFilter );
// set display directory and filter
- ::rtl::OUString aPath(GetExtraData()->GetAddLibPath());
+ OUString aPath(GetExtraData()->GetAddLibPath());
if ( !aPath.isEmpty() )
xFP->setDisplayDirectory( aPath );
else
@@ -821,7 +820,7 @@ void LibPage::InsertLib()
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
}
- rtl::OUString aLastFilter(GetExtraData()->GetAddLibFilter());
+ OUString aLastFilter(GetExtraData()->GetAddLibFilter());
if ( !aLastFilter.isEmpty() )
xFltMgr->setCurrentFilter( aLastFilter );
else
@@ -837,14 +836,14 @@ void LibPage::InsertLib()
Reference< script::XLibraryContainer2 > xDlgLibContImport;
// file URLs
- Sequence< ::rtl::OUString > aFiles = xFP->getFiles();
+ Sequence< OUString > aFiles = xFP->getFiles();
INetURLObject aURLObj( aFiles[0] );
INetURLObject aModURLObj( aURLObj );
INetURLObject aDlgURLObj( aURLObj );
- ::rtl::OUString aBase = aURLObj.getBase();
- ::rtl::OUString aModBase(RTL_CONSTASCII_USTRINGPARAM("script"));
- ::rtl::OUString aDlgBase(RTL_CONSTASCII_USTRINGPARAM("dialog"));
+ OUString aBase = aURLObj.getBase();
+ OUString aModBase( "script" );
+ OUString aDlgBase( "dialog" );
if ( aBase == aModBase || aBase == aDlgBase )
{
@@ -856,22 +855,22 @@ void LibPage::InsertLib()
{
Reference< XSimpleFileAccess2 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
- ::rtl::OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aModURL ) )
{
Sequence <Any> aSeqModURL(1);
aSeqModURL[0] <<= aModURL;
xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DocumentScriptLibraryContainer" ) ), aSeqModURL ), UNO_QUERY );
+ "com.sun.star.script.DocumentScriptLibraryContainer", aSeqModURL ), UNO_QUERY );
}
- ::rtl::OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aDlgURL ) )
{
Sequence <Any> aSeqDlgURL(1);
aSeqDlgURL[0] <<= aDlgURL;
xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DocumentDialogLibraryContainer" ) ), aSeqDlgURL ), UNO_QUERY );
+ "com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY );
}
}
@@ -881,9 +880,9 @@ void LibPage::InsertLib()
Reference< script::XLibraryContainer > xModLibContImp( xModLibContImport, UNO_QUERY );
Reference< script::XLibraryContainer > xDlgLibContImp( xDlgLibContImport, UNO_QUERY );
- Sequence< ::rtl::OUString > aLibNames = GetMergedLibraryNames( xModLibContImp, xDlgLibContImp );
+ Sequence< OUString > aLibNames = GetMergedLibraryNames( xModLibContImp, xDlgLibContImp );
sal_Int32 nLibCount = aLibNames.getLength();
- const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
+ const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
// library import dialog
@@ -895,7 +894,7 @@ void LibPage::InsertLib()
}
// libbox entries
- ::rtl::OUString aLibName( pLibNames[ i ] );
+ OUString aLibName( pLibNames[ i ] );
if ( !( ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) && xModLibContImport->isLibraryLink( aLibName ) ) ||
( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aLibName ) && xDlgLibContImport->isLibraryLink( aLibName ) ) ) )
{
@@ -910,9 +909,9 @@ void LibPage::InsertLib()
else
{
bool bChanges = false;
- ::rtl::OUString aExtension( aURLObj.getExtension() );
- ::rtl::OUString aLibExtension(RTL_CONSTASCII_USTRINGPARAM("xlb"));
- ::rtl::OUString aContExtension(RTL_CONSTASCII_USTRINGPARAM("xlc"));
+ OUString aExtension( aURLObj.getExtension() );
+ OUString aLibExtension( "xlb" );
+ OUString aContExtension( "xlc" );
// disable reference checkbox for documents and sbls
if ( aExtension != aLibExtension && aExtension != aContExtension )
@@ -930,7 +929,7 @@ void LibPage::InsertLib()
{
SvLBoxEntry* pEntry = pLibDlg->GetLibBox().GetEntry( nLib );
DBG_ASSERT( pEntry, "Entry?!" );
- ::rtl::OUString aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) );
+ OUString aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
@@ -951,9 +950,9 @@ void LibPage::InsertLib()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{
- ::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
+ OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
- aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ aErrStr += OUString( "\n" );
aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -964,13 +963,13 @@ void LibPage::InsertLib()
}
else
{
- ::rtl::OUString aErrStr;
+ OUString aErrStr;
if ( bReference )
aErrStr = IDE_RESSTR(RID_STR_REFNOTPOSSIBLE);
else
aErrStr = IDE_RESSTR(RID_STR_IMPORTNOTPOSSIBLE);
aErrStr = aErrStr.replaceAll("XX", aLibName);
- aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
+ aErrStr += "\n" ;
aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -979,7 +978,7 @@ void LibPage::InsertLib()
// check, if the library is password protected
bool bOK = false;
- ::rtl::OUString aPassword;
+ OUString aPassword;
if ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
@@ -989,7 +988,7 @@ void LibPage::InsertLib()
if ( !bOK )
{
- ::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
+ OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -1029,7 +1028,7 @@ void LibPage::InsertLib()
aModStorageURLObj.setExtension( aLibExtension );
aModStorageURLObj.setFinalSlash();
}
- ::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
@@ -1052,12 +1051,12 @@ void LibPage::InsertLib()
xModLibContImport->loadLibrary( aLibName );
// copy all modules
- Sequence< ::rtl::OUString > aModNames = xModLibImport->getElementNames();
+ Sequence< OUString > aModNames = xModLibImport->getElementNames();
sal_Int32 nModCount = aModNames.getLength();
- const ::rtl::OUString* pModNames = aModNames.getConstArray();
+ const OUString* pModNames = aModNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
{
- ::rtl::OUString aModName( pModNames[ i ] );
+ OUString aModName( pModNames[ i ] );
Any aElement_ = xModLibImport->getByName( aModName );
xModLib->insertByName( aModName, aElement_ );
}
@@ -1070,8 +1069,8 @@ void LibPage::InsertLib()
{
try
{
- ::rtl::OUString _aPassword( aPassword );
- xPasswd->changeLibraryPassword( aLibName, ::rtl::OUString(), _aPassword );
+ OUString _aPassword( aPassword );
+ xPasswd->changeLibraryPassword( aLibName, OUString(), _aPassword );
}
catch (...)
{
@@ -1098,7 +1097,7 @@ void LibPage::InsertLib()
aDlgStorageURLObj.setExtension( aLibExtension );
aDlgStorageURLObj.setFinalSlash();
}
- ::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
@@ -1121,12 +1120,12 @@ void LibPage::InsertLib()
xDlgLibContImport->loadLibrary( aLibName );
// copy all dialogs
- Sequence< ::rtl::OUString > aDlgNames = xDlgLibImport->getElementNames();
+ Sequence< OUString > aDlgNames = xDlgLibImport->getElementNames();
sal_Int32 nDlgCount = aDlgNames.getLength();
- const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
+ const OUString* pDlgNames = aDlgNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
{
- ::rtl::OUString aDlgName( pDlgNames[ i ] );
+ OUString aDlgName( pDlgNames[ i ] );
Any aElement_ = xDlgLibImport->getByName( aDlgName );
xDlgLib->insertByName( aDlgName, aElement_ );
}
@@ -1162,7 +1161,7 @@ void LibPage::Export( void )
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// Password verification
- ::rtl::OUString aOULibName( aLibName );
+ OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
@@ -1173,7 +1172,7 @@ void LibPage::Export( void )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- ::rtl::OUString aPassword;
+ OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
@@ -1201,7 +1200,7 @@ void LibPage::Export( void )
void LibPage::implExportLib( const String& aLibName, const String& aTargetURL,
const Reference< task::XInteractionHandler >& Handler )
{
- ::rtl::OUString aOULibName( aLibName );
+ OUString aOULibName( aLibName );
Reference< script::XLibraryContainerExport > xModLibContainerExport
( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainerExport > xDlgLibContainerExport
@@ -1262,14 +1261,14 @@ void LibPage::ExportAsPackage( const String& aLibName )
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
+ "com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) );
// filter
- ::rtl::OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) );
- ::rtl::OUString aFilter;
- aFilter = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.oxt" ) ); // library files
+ OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) );
+ OUString aFilter;
+ aFilter = "*.oxt" ; // library files
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aTitle, aFilter );
@@ -1290,12 +1289,12 @@ void LibPage::ExportAsPackage( const String& aLibName )
{
GetExtraData()->SetAddLibPath(xFP->getDisplayDirectory());
- Sequence< ::rtl::OUString > aFiles = xFP->getFiles();
+ Sequence< OUString > aFiles = xFP->getFiles();
INetURLObject aURL( aFiles[0] );
if( aURL.getExtension().isEmpty() )
- aURL.setExtension( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "oxt" ) ) );
+ aURL.setExtension( "oxt" );
- ::rtl::OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
+ OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
String aTmpPath = SvtPathOptions().GetTempPath();
INetURLObject aInetObj( aTmpPath );
@@ -1314,8 +1313,8 @@ void LibPage::ExportAsPackage( const String& aLibName )
::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
- ::rtl::OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
+ OUStringBuffer buf;
+ buf.appendAscii( "vnd.sun.star.zip://" );
buf.append( ::rtl::Uri::encode( aPackageURL,
rtl_UriCharClassRegName,
rtl_UriEncodeIgnoreEscapes,
@@ -1332,7 +1331,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
OUString(), NameClash::OVERWRITE );
INetURLObject aMetaInfInetObj( aTmpPath );
- aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ),
+ aMetaInfInetObj.insertName( "META-INF",
true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE );
if( xSFA->exists( aMetaInfFolder ) )
@@ -1340,16 +1339,15 @@ void LibPage::ExportAsPackage( const String& aLibName )
xSFA->createFolder( aMetaInfFolder );
::std::vector< Sequence<beans::PropertyValue> > manifest;
- const OUString strMediaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
- const OUString strFullPath = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FullPath" ) );
- const OUString strBasicMediaType = ::rtl::OUString
- ( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.basic-library" ) );
+ const OUString strMediaType = "MediaType" ;
+ const OUString strFullPath = "FullPath" ;
+ const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
Sequence<beans::PropertyValue> attribs( 2 );
beans::PropertyValue * pattribs = attribs.getArray();
pattribs[ 0 ].Name = strFullPath;
OUString fullPath = aLibName;
- fullPath += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/") );
+ fullPath += "/" ;
pattribs[ 0 ].Value <<= fullPath;
pattribs[ 1 ].Name = strMediaType;
pattribs[ 1 ].Value <<= strBasicMediaType;
@@ -1363,7 +1361,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
xPipe, Sequence< Sequence<beans::PropertyValue> >(
&manifest[ 0 ], manifest.size() ) );
- aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "manifest.xml" ) ),
+ aMetaInfInetObj.insertName( "manifest.xml",
true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
// write buffered pipe data to content:
@@ -1388,7 +1386,7 @@ void LibPage::ExportAsBasic( const String& aLibName )
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XFolderPicker > xFolderPicker( xMSF->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
+ "com.sun.star.ui.dialogs.FolderPicker" ), UNO_QUERY );
Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
if( xFolderPicker.is() )
@@ -1423,7 +1421,7 @@ void LibPage::DeleteCurrent()
// check, if library is link
bool bIsLibraryLink = false;
- ::rtl::OUString aOULibName( aLibName );
+ OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLink( aOULibName ) ) ||
@@ -1508,9 +1506,9 @@ void LibPage::SetCurLib()
aLibBox.Clear();
// get a sorted list of library names
- Sequence< ::rtl::OUString > aLibNames = aDocument.getLibraryNames();
+ Sequence< OUString > aLibNames = aDocument.getLibraryNames();
sal_Int32 nLibCount = aLibNames.getLength();
- const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
+ const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -1519,7 +1517,7 @@ void LibPage::SetCurLib()
ImpInsertLibEntry( aLibName, i );
}
- SvLBoxEntry* pEntry_ = aLibBox.FindEntry( rtl::OUString("Standard") );
+ SvLBoxEntry* pEntry_ = aLibBox.FindEntry( OUString( "Standard" ) );
if ( !pEntry_ )
pEntry_ = aLibBox.GetEntry( 0 );
aLibBox.SetCurEntry( pEntry_ );
@@ -1533,7 +1531,7 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos
{
// check, if library is password protected
bool bProtected = false;
- ::rtl::OUString aOULibName( rLibName );
+ OUString aOULibName( rLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
@@ -1576,7 +1574,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create library name
String aLibName;
- String aLibStdName( String( RTL_CONSTASCII_USTRINGPARAM( "Library" ) ) );
+ String aLibStdName( String( "Library" ) );
//String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) );
bool bValid = false;
sal_uInt16 i = 1;
@@ -1628,7 +1626,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create a module
String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
- ::rtl::OUString sModuleCode;
+ OUString sModuleCode;
if ( !rDocument.createModule( aLibName, aModName, true, sModuleCode ) )
throw Exception();
commit 9c6c53db832c61d70e9364a5a47566fb445b1560
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Sun Oct 7 16:44:11 2012 -0300
::rtl::OUString to OUString in basctl
Change-Id: If6a53fd69f8a99bafc7fc324911132dd51e67266
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx
index 5644583..6e81075 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -41,7 +41,7 @@ LineNumberWindow::LineNumberWindow (Window* pParent, ModulWindow* pModulWindow)
m_nCurYOffset(0)
{
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
- m_nBaseWidth = GetTextWidth(rtl::OUString('8'));
+ m_nBaseWidth = GetTextWidth('8');
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
}
@@ -75,7 +75,7 @@ void LineNumberWindow::Paint( const Rectangle& )
// FIXME: it would be best if we could get notified of a font change
// rather than doing that re-calculation at each Paint event
- m_nBaseWidth = GetTextWidth(rtl::OUString('8'));
+ m_nBaseWidth = GetTextWidth(OUString('8'));
// reserve enough for 3 sigit minimum, with a bit to spare for confort
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
@@ -88,7 +88,7 @@ void LineNumberWindow::Paint( const Rectangle& )
sal_Int64 y = (nStartLine - 1) * nLineHeight;
for(sal_Int32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight)
- DrawText(Point(0, y - m_nCurYOffset), rtl::OUString::valueOf(n));
+ DrawText(Point(0, y - m_nCurYOffset), OUString::valueOf(n));
}
void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt)
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 62004ad..996767f 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -41,16 +41,16 @@ using namespace ::com::sun::star::resource;
namespace
{
-rtl::OUString const aDot(".");
-rtl::OUString const aEsc("&");
-rtl::OUString const aSemi(";");
+OUString const aDot(".");
+OUString const aEsc("&");
+OUString const aSemi(";");
} // namespace
LocalizationMgr::LocalizationMgr(
Shell* pShell,
ScriptDocument const& rDocument,
- rtl::OUString const& aLibName,
+ OUString const& aLibName,
Reference<XStringResourceManager> const& xStringResourceManager
) :
m_xStringResourceManager(xStringResourceManager),
@@ -68,8 +68,8 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
- static rtl::OUString const aLayoutManagerName("LayoutManager");
- static rtl::OUString const aToolBarResName("private:resource/toolbar/translationbar");
+ static OUString const aLayoutManagerName("LayoutManager");
+ static OUString const aToolBarResName("private:resource/toolbar/translationbar");
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
@@ -102,7 +102,7 @@ namespace
}
-bool isLanguageDependentProperty( ::rtl::OUString aName )
+bool isLanguageDependentProperty( OUString aName )
{
static struct Prop
{
@@ -129,9 +129,9 @@ bool isLanguageDependentProperty( ::rtl::OUString aName )
void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode )
{
- Sequence< ::rtl::OUString > aDlgNames = m_aDocument.getObjectNames( E_DIALOGS, m_aLibName );
+ Sequence< OUString > aDlgNames = m_aDocument.getObjectNames( E_DIALOGS, m_aLibName );
sal_Int32 nDlgCount = aDlgNames.getLength();
- const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
+ const OUString* pDlgNames = aDlgNames.getConstArray();
Reference< XStringResourceResolver > xDummyStringResolver;
for( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
@@ -146,15 +146,15 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
Any aDialogCtrl;
aDialogCtrl <<= xDialog;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- ::rtl::OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
+ OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialog->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialog->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 j = 0 ; j < nCtrls ; ++j )
{
- ::rtl::OUString aCtrlName( pNames[j] );
+ OUString aCtrlName( pNames[j] );
Any aCtrl = xDialog->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, m_xStringResourceManager, xDummyStringResolver, eMode );
@@ -165,13 +165,13 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
}
-::rtl::OUString implCreatePureResourceId
- ( const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
- const ::rtl::OUString& aPropName,
+OUString implCreatePureResourceId
+ ( const OUString& aDialogName, const OUString& aCtrlName,
+ const OUString& aPropName,
Reference< XStringResourceManager > xStringResourceManager )
{
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- ::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aDot;
aPureIdStr += aDialogName;
aPureIdStr += aDot;
@@ -191,7 +191,7 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
// anyway only one language should exist when calling this method then,
// either the first one for mode SET_IDS or the last one for mode RESET_IDS
sal_Int32 LocalizationMgr::implHandleControlResourceProperties
- ( Any aControlAny, const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
+ ( Any aControlAny, const OUString& aDialogName, const OUString& aCtrlName,
Reference< XStringResourceManager > xStringResourceManager,
Reference< XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode )
{
@@ -218,7 +218,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 j = 0 ; j < nCtrlProps ; ++j )
{
const Property& rProp = pProps[j];
- ::rtl::OUString aPropName = rProp.Name;
+ OUString aPropName = rProp.Name;
TypeClass eType = rProp.Type.getTypeClass();
bool bLanguageDependentProperty =
(eType == TypeClass_STRING || eType == TypeClass_SEQUENCE)
@@ -229,7 +229,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
if( eType == TypeClass_STRING )
{
Any aPropAny = xPropertySet->getPropertyValue( aPropName );
- ::rtl::OUString aPropStr;
+ OUString aPropStr;
aPropAny >>= aPropStr;
// Replace string by id, add id+string to StringResource
@@ -239,7 +239,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
if( bEscAlreadyExisting )
continue;
- ::rtl::OUString aPureIdStr = implCreatePureResourceId
+ OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
// Set Id for all locales
@@ -250,7 +250,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -262,8 +262,8 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
if( aPropStr.getLength() > 1 )
{
- ::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
- ::rtl::OUString aNewPropStr = aPropStr;
+ OUString aPureIdStr = aPropStr.copy( 1 );
+ OUString aNewPropStr = aPropStr;
try
{
aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
@@ -280,7 +280,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
if( aPropStr.getLength() > 1 )
{
- ::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
+ OUString aPureIdStr = aPropStr.copy( 1 );
const Locale* pLocales = aLocaleSeq.getConstArray();
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
@@ -299,10 +299,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Rename resource id
else if( eMode == RENAME_DIALOG_IDS || eMode == RENAME_CONTROL_IDS )
{
- ::rtl::OUString aSourceIdStr = aPropStr;
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = aPropStr;
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
- ::rtl::OUString aPureIdStr = implCreatePureResourceId
+ OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
// Set new Id and remove old one for all locales
@@ -310,7 +310,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xStringResourceManager->resolveStringForLocale
@@ -322,7 +322,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{}
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -332,10 +332,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
{
- ::rtl::OUString aSourceIdStr = aPropStr;
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = aPropStr;
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
- ::rtl::OUString aPureIdStr = implCreatePureResourceId
+ OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
@@ -345,7 +345,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -359,7 +359,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -369,8 +369,8 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Copy string from source to target resource
else if( eMode == COPY_RESOURCES && xSourceStringResolver.is() )
{
- ::rtl::OUString aSourceIdStr = aPropStr;
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = aPropStr;
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
@@ -379,7 +379,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -400,10 +400,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
else if( eType == TypeClass_SEQUENCE )
{
Any aPropAny = xPropertySet->getPropertyValue( aPropName );
- Sequence< ::rtl::OUString > aPropStrings;
+ Sequence< OUString > aPropStrings;
aPropAny >>= aPropStrings;
- const ::rtl::OUString* pPropStrings = aPropStrings.getConstArray();
+ const OUString* pPropStrings = aPropStrings.getConstArray();
sal_Int32 nPropStringCount = aPropStrings.getLength();
if( nPropStringCount == 0 )
continue;
@@ -411,11 +411,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by id, add id+string to StringResource
if( eMode == SET_IDS )
{
- Sequence< ::rtl::OUString > aIdStrings;
+ Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
- ::rtl::OUString* pIdStrings = aIdStrings.getArray();
+ OUString* pIdStrings = aIdStrings.getArray();
- ::rtl::OUString aIdStrBase = aDot;
+ OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -424,7 +424,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aPropStr = pPropStrings[i];
+ OUString aPropStr = pPropStrings[i];
bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
if( bEscAlreadyExisting )
{
@@ -433,7 +433,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
}
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- ::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -443,7 +443,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -453,18 +453,18 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace id by string from StringResource
else if( eMode == RESET_IDS )
{
- Sequence< ::rtl::OUString > aNewPropStrings;
+ Sequence< OUString > aNewPropStrings;
aNewPropStrings.realloc( nPropStringCount );
- ::rtl::OUString* pNewPropStrings = aNewPropStrings.getArray();
+ OUString* pNewPropStrings = aNewPropStrings.getArray();
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aIdStr = pPropStrings[i];
- ::rtl::OUString aNewPropStr = aIdStr;
+ OUString aIdStr = pPropStrings[i];
+ OUString aNewPropStr = aIdStr;
if( aIdStr.getLength() > 1 )
{
- ::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
+ OUString aPureIdStr = aIdStr.copy( 1 );
try
{
aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
@@ -481,17 +481,17 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Remove Id for all locales
else if( eMode == REMOVE_IDS_FROM_RESOURCE )
{
- Sequence< ::rtl::OUString > aNewPropStrings;
+ Sequence< OUString > aNewPropStrings;
aNewPropStrings.realloc( nPropStringCount );
const Locale* pLocales = aLocaleSeq.getConstArray();
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aIdStr = pPropStrings[i];
+ OUString aIdStr = pPropStrings[i];
if( aIdStr.getLength() > 1 )
{
- ::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
+ OUString aPureIdStr = aIdStr.copy( 1 );
for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
{
@@ -510,11 +510,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Rename resource id
else if( eMode == RENAME_CONTROL_IDS )
{
- Sequence< ::rtl::OUString > aIdStrings;
+ Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
- ::rtl::OUString* pIdStrings = aIdStrings.getArray();
+ OUString* pIdStrings = aIdStrings.getArray();
- ::rtl::OUString aIdStrBase = aDot;
+ OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -523,11 +523,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aSourceIdStr = pPropStrings[i];
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = pPropStrings[i];
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- ::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -535,7 +535,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
const Locale& rLocale = pLocales[ iLocale ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xStringResourceManager->resolveStringForLocale
@@ -547,7 +547,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{}
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -557,11 +557,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
{
- Sequence< ::rtl::OUString > aIdStrings;
+ Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
- ::rtl::OUString* pIdStrings = aIdStrings.getArray();
+ OUString* pIdStrings = aIdStrings.getArray();
- ::rtl::OUString aIdStrBase = aDot;
+ OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -572,11 +572,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aSourceIdStr = pPropStrings[i];
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = pPropStrings[i];
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
- ::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
+ OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -584,7 +584,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
const Locale& rLocale = pLocales[ iLocale ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -598,7 +598,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
}
- ::rtl::OUString aPropIdStr = aEsc;
+ OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -614,15 +614,15 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
- ::rtl::OUString aSourceIdStr = pPropStrings[i];
- ::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
+ OUString aSourceIdStr = pPropStrings[i];
+ OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
// Set Id for all locales
for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
{
const Locale& rLocale = pLocales[ iLocale ];
- ::rtl::OUString aResStr;
+ OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -818,7 +818,7 @@ DialogWindow* FindDialogWindowForEditor( DlgEditor* pEditor )
void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEditor,
- Any aControlAny, const ::rtl::OUString& aCtrlName )
+ Any aControlAny, const OUString& aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -837,7 +837,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
- ::rtl::OUString aDialogName = pDlgWin->GetName();
+ OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
sal_Int32 nChangedCount = implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
@@ -848,7 +848,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
}
void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEditor,
- ::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aNewCtrlName )
+ ::com::sun::star::uno::Any aControlAny, const OUString& aNewCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -867,7 +867,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
- ::rtl::OUString aDialogName = pDlgWin->GetName();
+ OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties
( aControlAny, aDialogName, aNewCtrlName, xStringResourceManager,
@@ -876,7 +876,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor,
- Any aControlAny, const ::rtl::OUString& aCtrlName )
+ Any aControlAny, const OUString& aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -891,7 +891,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
- ::rtl::OUString aDialogName = pDlgWin->GetName();
+ OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
sal_Int32 nChangedCount = implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
@@ -901,10 +901,10 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
MarkDocumentModified( aDocument );
}
-void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
- const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
+void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
+ const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
- static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
+ static OUString aResourceResolverPropName( "ResourceResolver" );
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -922,7 +922,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- ::rtl::OUString(), xStringResourceManager,
+ OUString(), xStringResourceManager,
xDummyStringResolver, SET_IDS );
}
@@ -933,8 +933,8 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
}
}
-void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
- const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
+void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName,
+ const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -947,16 +947,16 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- ::rtl::OUString(), xStringResourceManager,
+ OUString(), xStringResourceManager,
xDummyStringResolver, RENAME_DIALOG_IDS );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, xStringResourceManager,
@@ -964,8 +964,8 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
}
}
-void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
- const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
+void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName,
+ const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -978,16 +978,16 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
- ::rtl::OUString(), xStringResourceManager,
+ OUString(), xStringResourceManager,
xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, xStringResourceManager,
@@ -1002,7 +1002,7 @@ void LocalizationMgr::resetResourceForDialog( Reference< container::XNameContain
return;
// Dialog as control
- ::rtl::OUString aDummyName;
+ OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1010,12 +1010,12 @@ void LocalizationMgr::resetResourceForDialog( Reference< container::XNameContain
aDummyName, xStringResourceManager, xDummyStringResolver, RESET_IDS );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName,
aCtrlName, xStringResourceManager, xDummyStringResolver, RESET_IDS );
@@ -1029,7 +1029,7 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
return;
// Dialog as control
- ::rtl::OUString aDummyName;
+ OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1037,12 +1037,12 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
aDummyName, xStringResourceManager, xDummyStringResolver, SET_IDS );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName,
aCtrlName, xStringResourceManager, xDummyStringResolver, SET_IDS );
@@ -1050,7 +1050,7 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
}
void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
- Any aControlAny, const ::rtl::OUString& aCtrlName,
+ Any aControlAny, const OUString& aCtrlName,
Reference< XStringResourceResolver > xSourceStringResolver )
{
// Get library for DlgEditor
@@ -1070,33 +1070,33 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
- ::rtl::OUString aDialogName = pDlgWin->GetName();
+ OUString aDialogName = pDlgWin->GetName();
implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
xSourceStringResolver, MOVE_RESOURCES );
}
void LocalizationMgr::copyResourceForDroppedDialog( Reference< container::XNameContainer > xDialogModel,
- const ::rtl::OUString& aDialogName, Reference< XStringResourceManager > xStringResourceManager,
+ const OUString& aDialogName, Reference< XStringResourceManager > xStringResourceManager,
Reference< XStringResourceResolver > xSourceStringResolver )
{
if( !xStringResourceManager.is() )
return;
// Dialog as control
- ::rtl::OUString aDummyName;
+ OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
implHandleControlResourceProperties( aDialogCtrl, aDialogName,
aDummyName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDialogName,
aCtrlName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
@@ -1111,7 +1111,7 @@ void LocalizationMgr::copyResourceForDialog(
if( !xDialogModel.is() || !xSourceStringResolver.is() || !xTargetStringResourceManager.is() )
return;
- ::rtl::OUString aDummyName;
+ OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
implHandleControlResourceProperties
@@ -1119,12 +1119,12 @@ void LocalizationMgr::copyResourceForDialog(
xSourceStringResolver, COPY_RESOURCES );
// Handle all controls
- Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
- const ::rtl::OUString* pNames = aNames.getConstArray();
+ Sequence< OUString > aNames = xDialogModel->getElementNames();
+ const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
- ::rtl::OUString aCtrlName( pNames[i] );
+ OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName, aDummyName,
xTargetStringResourceManager, xSourceStringResolver, COPY_RESOURCES );
commit d3e08f257437fe942719304e45792a294d9310db
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Sun Oct 7 16:26:46 2012 -0300
More ::rtl::OUString to OUString in basctl
Change-Id: Ie27a55e933462c644f315d0123978082054d79af
diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 19ecab3..17c66a7 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -58,7 +58,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
}
else if ( eType == OBJ_TYPE_LIBRARY )
{
- ::rtl::OUString aOULibName( aDesc.GetLibName() );
+ OUString aOULibName( aDesc.GetLibName() );
// check password
bool bOK = true;
@@ -68,7 +68,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
- ::rtl::OUString aPassword;
+ OUString aPassword;
bOK = QueryPassword( xModLibContainer, aOULibName, aPassword );
}
}
@@ -123,7 +123,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
|| eType == OBJ_TYPE_NORMAL_MODULES
|| eType == OBJ_TYPE_CLASS_MODULES )
{
- ::rtl::OUString aLibName( aDesc.GetLibName() );
+ OUString aLibName( aDesc.GetLibName() );
ImpCreateLibSubSubEntriesInVBAMode( pEntry, aDocument, aLibName );
}
else {
@@ -452,9 +452,9 @@ SvLBoxEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, Librar
return 0;
}
-::rtl::OUString CreateMgrAndLibStr( const ::rtl::OUString& rMgrName, const ::rtl::OUString& rLibName )
+OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName )
{
- ::rtl::OUStringBuffer aName;
+ OUStringBuffer aName;
aName.append('[');
aName.append(rMgrName);
aName.append(']');
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 384566d..461044c 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -54,7 +54,7 @@ DBG_NAME( BaseWindow )
TYPEINIT0( BaseWindow )
TYPEINIT1( SbxItem, SfxPoolItem );
-BaseWindow::BaseWindow( Window* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName )
+BaseWindow::BaseWindow( Window* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName )
:Window( pParent, WinBits( WB_3DLOOK ) )
,m_aDocument( rDocument )
,m_aLibName( aLibName )
@@ -176,14 +176,14 @@ void BaseWindow::UpdateData()
{
}
-::rtl::OUString BaseWindow::GetTitle()
+OUString BaseWindow::GetTitle()
{
- return ::rtl::OUString();
+ return OUString();
}
-::rtl::OUString BaseWindow::CreateQualifiedName()
+OUString BaseWindow::CreateQualifiedName()
{
- ::rtl::OUStringBuffer aName;
+ OUStringBuffer aName;
if ( !m_aLibName.isEmpty() )
{
LibraryLocation eLocation = m_aDocument.getLibraryLocation( m_aLibName );
@@ -250,7 +250,7 @@ void BaseWindow::InsertLibInfo () const
bool BaseWindow::Is (
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName, rtl::OUString const& rName,
+ OUString const& rLibName, OUString const& rName,
ItemType eType, bool bFindSuspended
)
{
@@ -521,7 +521,7 @@ void TabBar::Command( const CommandEvent& rCEvt )
if (Shell* pShell = GetShell())
{
ScriptDocument aDocument( pShell->GetCurDocument() );
- ::rtl::OUString aOULibName( pShell->GetCurLibName() );
+ OUString aOULibName( pShell->GetCurLibName() );
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
@@ -651,7 +651,7 @@ void TabBar::Sort()
}
}
-void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines )
+void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nLine = 0;
@@ -678,7 +678,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bo
else
nEndPos++;
- ::rtl::OUString aEndStr = rStr.copy( nEndPos );
+ OUString aEndStr = rStr.copy( nEndPos );
rStr = rStr.copy( 0, nStartPos );
rStr += aEndStr;
}
@@ -694,7 +694,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bo
if ( n > nStartPos )
{
- ::rtl::OUString aEndStr = rStr.copy( n );
+ OUString aEndStr = rStr.copy( n );
rStr = rStr.copy( 0, nStartPos );
rStr += aEndStr;
}
@@ -737,8 +737,8 @@ LibInfos::~LibInfos ()
void LibInfos::InsertInfo (
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName,
- rtl::OUString const& rCurrentName,
+ OUString const& rLibName,
+ OUString const& rCurrentName,
ItemType eCurrentType
)
{
@@ -758,14 +758,14 @@ void LibInfos::RemoveInfoFor (ScriptDocument const& rDocument)
}
LibInfos::Item const* LibInfos::GetInfo (
- ScriptDocument const& rDocument, rtl::OUString const& rLibName
+ ScriptDocument const& rDocument, OUString const& rLibName
)
{
Map::iterator it = m_aMap.find(Key(rDocument, rLibName));
return it != m_aMap.end() ? &it->second : 0;
}
-LibInfos::Key::Key (ScriptDocument const& rDocument, rtl::OUString const& rLibName) :
+LibInfos::Key::Key (ScriptDocument const& rDocument, OUString const& rLibName) :
m_aDocument(rDocument), m_aLibName(rLibName)
{ }
@@ -784,8 +784,8 @@ size_t LibInfos::Key::Hash::operator () (Key const& rKey) const
LibInfos::Item::Item (
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName,
- rtl::OUString const& rCurrentName,
+ OUString const& rLibName,
+ OUString const& rCurrentName,
ItemType eCurrentType
) :
m_aDocument(rDocument),
@@ -797,10 +797,10 @@ LibInfos::Item::Item (
LibInfos::Item::~Item ()
{ }
-bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
+bool QueryDel( const OUString& rName, const ResId& rId, Window* pParent )
{
- ::rtl::OUString aQuery(rId.toString());
- ::rtl::OUStringBuffer aNameBuf( rName );
+ OUString aQuery(rId.toString());
+ OUStringBuffer aNameBuf( rName );
aNameBuf.append('\'');
aNameBuf.insert(sal_Int32(0), sal_Unicode('\''));
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
@@ -808,32 +808,32 @@ bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
return ( aQueryBox.Execute() == RET_YES );
}
-bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent )
+bool QueryDelMacro( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
}
-bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent )
+bool QueryReplaceMacro( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
}
-bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent )
+bool QueryDelDialog( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
}
-bool QueryDelLib( const ::rtl::OUString& rName, bool bRef, Window* pParent )
+bool QueryDelLib( const OUString& rName, bool bRef, Window* pParent )
{
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
}
-bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent )
+bool QueryDelModule( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
}
-bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat, bool bNewTitle )
+bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat, bool bNewTitle )
{
bool bOK = false;
sal_uInt16 nRet = 0;
@@ -847,7 +847,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
// set new title
if ( bNewTitle )
{
- ::rtl::OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD));
+ OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD));
aTitle = aTitle.replaceAll("XX", rLibName);
aDlg.SetText( aTitle );
}
@@ -864,7 +864,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) )
{
rPassword = aDlg.GetPassword();
- // ::rtl::OUString aOUPassword( rPassword );
+ // OUString aOUPassword( rPassword );
bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword );
if ( !bOK )
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 5ee425e..d8f2f5e 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -38,15 +38,15 @@ namespace basctl
namespace
{
-bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr )
+bool lcl_ParseText(OUString const &rText, size_t& rLineNr )
{
// aText should look like "# n" where
// n > 0 && n < std::numeric_limits< sal_uInt16 >::max().
// All spaces are ignored, so there can even be spaces within the
// number n. (Maybe it would be better to ignore all whitespace instead
// of just spaces.)
- rtl::OUString aText(
- rText.replaceAll(" ", rtl::OUString()));
+ OUString aText(
+ rText.replaceAll(" ", OUString()));
sal_Unicode cFirst = aText[0];
if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9'))
return false;
@@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i )
{
BreakPoint* pBrk = m_aModifiedBreakPointList.at( i );
- String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
+ String aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
}
@@ -111,7 +111,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
void BreakPointDialog::SetCurrentBreakPoint( BreakPoint* pBrk )
{
- String aStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
+ String aStr( "# " );
aStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.SetText( aStr );
UpdateFields( pBrk );
@@ -200,7 +200,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
pBrk->bEnabled = aCheckBox.IsChecked();
pBrk->nStopAfter = (size_t) aNumericField.GetValue();
m_aModifiedBreakPointList.InsertSorted( pBrk );
- String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
+ String aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
if (SfxDispatcher* pDispatcher = GetDispatcher())
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index 1923141..c0669e8 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -46,7 +46,6 @@
namespace basctl
{
-using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -71,7 +70,7 @@ public:
class DllInstance : public comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>
{
public:
- DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>(::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), ::com::sun::star::uno::UNO_QUERY_THROW), new Dll)
+ DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>(::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.frame.Desktop")), ::com::sun::star::uno::UNO_QUERY_THROW), new Dll)
{ }
};
@@ -137,7 +136,7 @@ Dll::Dll () :
SfxModule* pMod = Module::Get();
SfxObjectFactory& rFactory = DocShell::Factory();
- rFactory.SetDocumentServiceName( rtl::OUString("com.sun.star.script.BasicIDE") );
+ rFactory.SetDocumentServiceName( "com.sun.star.script.BasicIDE" );
DocShell::RegisterInterface( pMod );
Shell::RegisterFactory( SVX_INTERFACE_BASIDE_VIEWSH );
@@ -198,7 +197,7 @@ IMPL_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic )
OSL_ENSURE( aDocument.isValid(), "basctl::ExtraData::GlobalBasicBreakHdl: no document for the basic manager!" );
if ( aDocument.isValid() )
{
- ::rtl::OUString aOULibName( pBasic->GetName() );
+ OUString aOULibName( pBasic->GetName() );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
commit bb414e9eeed32b9f931b0f2a9909bb43e1f6bdbb
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Fri Oct 5 01:25:41 2012 -0300
rtl::OUString to OUString in basctl
Change-Id: Iaa56c5f8a15032c3102ad58011c80e3c86fe287c
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 16e73fe..410d3a7 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -126,7 +126,7 @@ void Shell::SetMDITitle()
aTitleBuf.append(IDE_RESSTR(RID_STR_SIGNED));
aTitleBuf.append(' ');
}
- ::rtl::OUString aTitle(aTitleBuf.makeStringAndClear());
+ OUString aTitle(aTitleBuf.makeStringAndClear());
SfxViewFrame* pViewFrame = GetViewFrame();
if ( pViewFrame )
@@ -145,18 +145,18 @@ void Shell::SetMDITitle()
}
}
-ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
+ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
{
bCreatingWindow = true;
sal_uLong nKey = 0;
ModulWindow* pWin = 0;
- ::rtl::OUString aLibName( rLibName );
- ::rtl::OUString aModName( rModName );
+ OUString aLibName( rLibName );
+ OUString aModName( rModName );
if ( aLibName.isEmpty() )
- aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ aLibName = "Standard" ;
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
@@ -168,7 +168,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
if ( !pWin )
{
- ::rtl::OUString aModule;
+ OUString aModule;
bool bSuccess = false;
if ( rDocument.hasModule( aLibName, aModName ) )
bSuccess = rDocument.getModule( aLibName, aModName, aModule );
@@ -200,11 +200,11 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
{
// display a nice friendly name in the ObjectModule tab,
// combining the objectname and module name, e.g. Sheet1 ( Financials )
- ::rtl::OUString sObjName;
+ OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
if( !sObjName.isEmpty() )
{
- ::rtl::OUStringBuffer aModNameBuf(aModName);
+ OUStringBuffer aModNameBuf(aModName);
aModNameBuf.append(' ');
aModNameBuf.append('(');
aModNameBuf.append(sObjName);
@@ -224,7 +224,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
ModulWindow* Shell::FindBasWin (
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName, rtl::OUString const& rName,
+ OUString const& rLibName, OUString const& rName,
bool bCreateIfNotExist, bool bFindSuspended
)
{
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index d642a2a..5d043ea 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -44,17 +44,17 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
-DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
+DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
{
bCreatingWindow = true;
sal_uLong nKey = 0;
DialogWindow* pWin = 0;
- ::rtl::OUString aLibName( rLibName );
- ::rtl::OUString aDlgName( rDlgName );
+ OUString aLibName( rLibName );
+ OUString aDlgName( rDlgName );
if ( aLibName.isEmpty() )
- aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
+ aLibName = "Standard" ;
rDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
@@ -79,7 +79,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
// create dialog model
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
- ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
+ ( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY );
Reference< XInputStream > xInput( xISP->createInputStream() );
Reference< XComponentContext > xContext(
comphelper::getComponentContext( xMSF ) );
@@ -120,7 +120,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
DialogWindow* Shell::FindDlgWin (
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName, rtl::OUString const& rName,
+ OUString const& rLibName, OUString const& rName,
bool bCreateIfNotExist, bool bFindSuspended
)
{
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 5da04e9..6a72666 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -87,11 +87,11 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
if ( aMacroName.Len() == 0 )
{
if ( !pModule->GetMethods()->Count() )
- aMacroName = String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) );
+ aMacroName = String( "Main" );
else
{
bool bValid = false;
- String aStdMacroText( RTL_CONSTASCII_USTRINGPARAM( "Macro" ) );
+ String aStdMacroText( "Macro" );
sal_uInt16 nMacro = 1;
while ( !bValid )
{
@@ -104,7 +104,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
}
}
- ::rtl::OUString aOUSource( pModule->GetSource32() );
+ OUString aOUSource( pModule->GetSource32() );
// don't produce too many empty lines...
sal_Int32 nSourceLen = aOUSource.getLength();
@@ -112,17 +112,17 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
{
const sal_Unicode* pStr = aOUSource.getStr();
if ( pStr[ nSourceLen - 1 ] != LINE_SEP )
- aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\n" ) );
+ aOUSource += "\n\n" ;
else if ( pStr[ nSourceLen - 2 ] != LINE_SEP )
- aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
+ aOUSource += "\n" ;
else if ( pStr[ nSourceLen - 3 ] == LINE_SEP )
aOUSource = aOUSource.copy( 0, nSourceLen-1 );
}
- ::rtl::OUString aSubStr;
- aSubStr = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Sub " ) );
+ OUString aSubStr;
+ aSubStr = "Sub " ;
aSubStr += aMacroName;
- aSubStr += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\nEnd Sub" ) );
+ aSubStr += "\n\nEnd Sub" ;
aOUSource += aSubStr;
@@ -165,9 +165,9 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
bool RenameDialog (
Window* pErrorParent,
ScriptDocument const& rDocument,
- rtl::OUString const& rLibName,
- rtl::OUString const& rOldName,
- rtl::OUString const& rNewName
+ OUString const& rLibName,
+ OUString const& rOldName,
+ OUString const& rNewName
)
throw(ElementExistException, NoSuchElementException)
{
@@ -228,7 +228,7 @@ bool RenameDialog (
//----------------------------------------------------------------------------
-bool RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
+bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
{
if (Shell* pShell = GetShell())
{
@@ -267,9 +267,9 @@ BasicManager* FindBasicManager( StarBASIC* pLib )
if ( !pBasicMgr )
continue;
- Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
+ Sequence< OUString > aLibNames( doc->getLibraryNames() );
sal_Int32 nLibCount = aLibNames.getLength();
- const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
+ const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -431,7 +431,7 @@ long HandleBasicError( StarBASIC* pBasic )
OSL_ENSURE( aDocument.isValid(), "basctl::HandleBasicError: no document for the given BasicManager!" );
if ( aDocument.isValid() )
{
- ::rtl::OUString aOULibName( pBasic->GetName() );
+ OUString aOULibName( pBasic->GetName() );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index bd9858a..db20813 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -54,7 +54,7 @@ namespace basctl
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName )
+void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName )
{
try
{
@@ -64,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
uno::Any aObject( aModuleInfo.ModuleObject );
uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY );
- if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Worksheet" )) ) )
+ if( xServiceInfo.is() && xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) )
{
uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY );
if( xNamed.is() )
@@ -77,7 +77,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
}
}
-sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName )
+sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName )
{
sal_Int32 nType = script::ModuleType::NORMAL;
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
@@ -110,7 +110,7 @@ DocumentEntry::~DocumentEntry()
LibEntry::LibEntry (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
- rtl::OUString const& rLibName,
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list