[Libreoffice-commits] .: basctl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Oct 3 16:10:36 PDT 2012
basctl/source/basicide/basicbox.cxx | 4 +-
basctl/source/basicide/basicrenderable.cxx | 36 +++++++++---------
basctl/source/basicide/baside2.cxx | 56 ++++++++++++++---------------
basctl/source/basicide/baside2.hxx | 20 +++++-----
4 files changed, 58 insertions(+), 58 deletions(-)
New commits:
commit db1af9a43458bd7cc9995c3c4e901ddad4e79c8d
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Mon Oct 1 13:03:37 2012 -0300
OUString and RTL_CONSTASCII_US... cleanup in basctl
Change-Id: I440d245d013873ec2830280ad01a4d0625fc4c1a
Reviewed-on: https://gerrit.libreoffice.org/741
Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 2cc65d1..5d278c2 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -237,9 +237,9 @@ void LibBox::FillBox()
void LibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
// get a sorted list of library names
- Sequence< ::rtl::OUString > aLibNames = rDocument.getLibraryNames();
+ Sequence< OUString > aLibNames = rDocument.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 )
{
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 9fe4ae7..5200c8c 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -46,31 +46,31 @@ Renderable::Renderable (BaseWindow* pWin)
// show Subgroup for print range
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
- aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
+ aPrintRangeOpt.maGroupHint = "PrintRange" ;
aPrintRangeOpt.mbInternalOnly = true;
m_aUIProperties[0].Value = setSubgroupControlOpt("printrange",
- rtl::OUString(aStrings.GetString(0)), rtl::OUString(), aPrintRangeOpt);
+ OUString(aStrings.GetString(0)), OUString(), aPrintRangeOpt);
// create a choice for the range to print
- rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
- Sequence< rtl::OUString > aChoices( 2 );
- Sequence< rtl::OUString > aHelpIds( 2 );
- Sequence< rtl::OUString > aWidgetIds( 2 );
+ OUString aPrintContentName( "PrintContent" );
+ Sequence< OUString > aChoices( 2 );
+ Sequence< OUString > aHelpIds( 2 );
+ Sequence< OUString > aWidgetIds( 2 );
aChoices[0] = aStrings.GetString( 1 );
- aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ;
aChoices[1] = aStrings.GetString( 2 );
- aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
- aWidgetIds[0] = rtl::OUString("printallpages");
- aWidgetIds[1] = rtl::OUString("printpages");
- m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
+ aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
+ aWidgetIds[0] = "printallpages" ;
+ aWidgetIds[1] = "printpages" ;
+ m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds, aPrintContentName,
aChoices, 0);
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true);
- m_aUIProperties[2].Value = setEditControlOpt("pagerange", rtl::OUString(),
- rtl::OUString(), "PageRange",
- rtl::OUString(), aPageRangeOpt);
+ m_aUIProperties[2].Value = setEditControlOpt("pagerange", OUString(),
+ OUString(), "PageRange",
+ OUString(), aPageRangeOpt);
}
Renderable::~Renderable()
@@ -80,7 +80,7 @@ Renderable::~Renderable()
Printer* Renderable::getPrinter()
{
Printer* pPrinter = NULL;
- Any aValue( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
+ Any aValue( getValue( "RenderDevice" ) );
Reference<awt::XDevice> xRenderDevice;
if( aValue >>= xRenderDevice )
@@ -107,7 +107,7 @@ sal_Int32 SAL_CALL Renderable::getRendererCount (
sal_Int64 nContent = getIntValue( "PrintContent", -1 );
if( nContent == 1 )
{
- rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ OUString aPageRange( getStringValue( "PageRange" ) );
if( !aPageRange.isEmpty() )
{
StringRangeEnumerator aRangeEnum( aPageRange, 0, nCount-1 );
@@ -139,7 +139,7 @@ Sequence<beans::PropertyValue> SAL_CALL Renderable::getRenderer (
Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
aVals.realloc( 1 );
- aVals[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
+ aVals[0].Name = "PageSize" ;
awt::Size aSize;
aSize.Width = aPageSize.Width();
aSize.Height = aPageSize.Height();
@@ -165,7 +165,7 @@ void SAL_CALL Renderable::render (
sal_Int64 nContent = getIntValue( "PrintContent", -1 );
if( nContent == 1 )
{
- rtl::OUString aPageRange( getStringValue( "PageRange" ) );
+ OUString aPageRange( getStringValue( "PageRange" ) );
if( !aPageRange.isEmpty() )
{
sal_Int32 nPageCount = mpWindow->countPages( pPrinter );
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 13b1691..657182d 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -90,7 +90,7 @@ TYPEINIT1( ModulWindow , BaseWindow );
namespace
{
-void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const ::rtl::OUString& rTitle, bool bOutput )
+void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const OUString& rTitle, bool bOutput )
{
Size const aSz = pPrinter->GetOutputSize();
@@ -133,8 +133,8 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
if( bOutput )
{
- ::rtl::OUStringBuffer aPageStr;
- aPageStr.appendAscii( RTL_CONSTASCII_STRINGPARAM( " [" ) );
+ OUStringBuffer aPageStr;
+ aPageStr.appendAscii( " [" );
aPageStr.append(IDE_RESSTR(RID_STR_PAGE));
aPageStr.append(' ');
aPageStr.append( nCurPage );
@@ -190,7 +190,7 @@ bool bSourceLinesEnabled = false;
ModulWindow::ModulWindow (
ModulWindowLayout* pParent,
ScriptDocument const& rDocument,
- rtl::OUString aLibName, rtl::OUString aName, rtl::OUString& aModule
+ OUString aLibName, OUString aName, OUString& aModule
) :
BaseWindow(pParent, rDocument, aLibName, aName),
rLayout(*pParent),
@@ -358,7 +358,7 @@ bool ModulWindow::BasicExecute()
if ( !pMethod )
{
// If not in a method then prompt the user
- return ( !ChooseMacro( uno::Reference< frame::XModel >(), false, rtl::OUString() ).isEmpty() );
+ return ( !ChooseMacro( uno::Reference< frame::XModel >(), false, OUString() ).isEmpty() );
}
if ( pMethod )
{
@@ -442,20 +442,20 @@ bool ModulWindow::LoadBasic()
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 );
}
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
- xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
+ xFltMgr->appendFilter( "BASIC" , "*.bas" );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
+ xFltMgr->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
- Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
+ Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE );
SvStream* pStream = aMedium.GetInStream();
@@ -496,7 +496,7 @@ bool ModulWindow::SaveBasicSource()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
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 );
}
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
@@ -509,13 +509,13 @@ bool ModulWindow::SaveBasicSource()
xFP->setDisplayDirectory ( aCurPath );
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
- xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
- xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
- xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
+ xFltMgr->appendFilter( "BASIC", "*.bas" );
+ xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
+ xFltMgr->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
- Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
+ Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC );
SvStream* pStream = aMedium.GetOutStream();
@@ -539,12 +539,12 @@ bool ModulWindow::SaveBasicSource()
return bDone;
}
-extern bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName ); // defined in baside3.cxx
+extern bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ); // defined in baside3.cxx
bool ModulWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
- ::rtl::OUString aLibName = GetLibName();
+ OUString aLibName = GetLibName();
return implImportDialog( this, aCurPath, rDocument, aLibName );
}
@@ -671,7 +671,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
// ReturnWert: BOOL
// FALSE: cancel
// TRUE: go on....
- ::rtl::OUString aErrorText( pBasic->GetErrorText() );
+ OUString aErrorText( pBasic->GetErrorText() );
sal_uInt16 nErrorLine = pBasic->GetLine() - 1;
sal_uInt16 nErrCol1 = pBasic->GetCol1();
sal_uInt16 nErrCol2 = pBasic->GetCol2();
@@ -681,7 +681,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
AssertValidEditEngine();
GetEditView()->SetSelection( TextSelection( TextPaM( nErrorLine, nErrCol1 ), TextPaM( nErrorLine, nErrCol2 ) ) );
- ::rtl::OUStringBuffer aErrorTextPrefixBuf;
+ OUStringBuffer aErrorTextPrefixBuf;
if( pBasic->IsCompilerError() )
aErrorTextPrefixBuf.append(IDE_RESSTR(RID_STR_COMPILEERROR));
else
@@ -691,7 +691,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
aErrorTextPrefixBuf.append(' ');
rLayout.UpdateDebug(false);
}
- ::rtl::OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear());
+ OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear());
// if other basic, the IDE should try to display the correct module
bool const bMarkError = pBasic == GetBasic();
if ( bMarkError )
@@ -766,7 +766,7 @@ void ModulWindow::BasicAddWatch()
if ( !GetEditView()->HasSelection() )
{
TextPaM aWordStart;
- ::rtl::OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart );
+ OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart );
if ( !aWord.isEmpty() )
{
TextSelection aSel( aWordStart );
@@ -918,7 +918,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
// nLinepPage is not correct if there's a line break
sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height()/nLineHeight);
- sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth(rtl::OUString('X')) );
+ sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) );
sal_uLong nParas = GetEditEngine()->GetParagraphCount();
sal_uInt16 nPages = (sal_uInt16) (nParas/nLinespPage+1 );
@@ -1161,7 +1161,7 @@ void ModulWindow::GetState( SfxItemSet &rSet )
String aPos( IDEResId( RID_STR_LINE ) );
aPos += ' ';
aPos += String::CreateFromInt32( aSel.GetEnd().GetPara()+1 );
- aPos += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
+ aPos += String( ", " );
aPos += String( IDEResId( RID_STR_COLUMN ) );
aPos += ' ';
aPos += String::CreateFromInt32( aSel.GetEnd().GetIndex()+1 );
@@ -1217,15 +1217,15 @@ void ModulWindow::GoOnTop()
GetShell()->GetViewFrame()->ToTop();
}
-::rtl::OUString ModulWindow::GetSbModuleName()
+OUString ModulWindow::GetSbModuleName()
{
- ::rtl::OUString aModuleName;
+ OUString aModuleName;
if ( XModule().Is() )
aModuleName = xModule->GetName();
return aModuleName;
}
-::rtl::OUString ModulWindow::GetTitle()
+OUString ModulWindow::GetTitle()
{
return GetSbModuleName();
}
@@ -1381,7 +1381,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
uno::Reference< container::XNameContainer > xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
if( xLib.is() )
{
- ::rtl::OUString sObjName;
+ OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() )
{
@@ -1461,7 +1461,7 @@ bool ModulWindow::HasActiveEditor () const
void ModulWindow::UpdateModule ()
{
- rtl::OUString const aModule = getTextEngineText(*GetEditEngine());
+ OUString const aModule = getTextEngineText(*GetEditEngine());
// update module in basic
assert(xModule);
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index b7d8975..8ca3812 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -64,8 +64,8 @@ DBG_NAMEEX( ModulWindow )
// using the stream interface (get/setText() only supports
// tools Strings limited to 64K).
// defined in baside2b.cxx
-rtl::OUString getTextEngineText (ExtTextEngine&);
-void setTextEngineText (ExtTextEngine&, rtl::OUString const&);
+OUString getTextEngineText (ExtTextEngine&);
+void setTextEngineText (ExtTextEngine&, OUString const&);
class EditorWindow : public Window, public SfxListener
@@ -192,7 +192,7 @@ class WatchTreeListBox : public SvHeaderTabListBox
protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText );
bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
@@ -294,8 +294,8 @@ private:
ComplexEditorWindow aXEditorWindow;
BasicStatus aStatus;
SbModuleRef xModule;
- ::rtl::OUString aCurPath;
- ::rtl::OUString m_aModule;
+ OUString aCurPath;
+ OUString m_aModule;
void CheckCompileBasic();
bool BasicExecute();
@@ -314,7 +314,7 @@ protected:
public:
TYPEINFO();
- ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName, ::rtl::OUString& aModule );
+ ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName, OUString& aModule );
~ModulWindow();
@@ -328,7 +328,7 @@ public:
virtual sal_Int32 countPages( Printer* pPrinter );
// print page
virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
- virtual ::rtl::OUString GetTitle();
+ virtual OUString GetTitle();
virtual EntryDescriptor CreateEntryDescriptor();
virtual bool AllowUndo();
virtual void SetReadOnly (bool bReadOnly);
@@ -338,7 +338,7 @@ public:
SbModule* GetSbModule() { return xModule; }
void SetSbModule( SbModule* pModule ) { xModule = pModule; }
- ::rtl::OUString GetSbModuleName();
+ OUString GetSbModuleName();
bool CompileBasic();
bool BasicRun();
@@ -391,8 +391,8 @@ public:
virtual ::svl::IUndoManager*
GetUndoManager();
- const ::rtl::OUString& GetModule() const { return m_aModule; }
- void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; }
+ const OUString& GetModule() const { return m_aModule; }
+ void SetModule( const OUString& aModule ) { m_aModule = aModule; }
virtual void Activating ();
virtual void Deactivating ();
More information about the Libreoffice-commits
mailing list