From 2e677c39818f3a6479ac9103ac9c7e8ef985eeb0 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 26 Sep 2012 23:45:28 +0200 Subject: gbuild: split uwinapi out of gb_STDLIBS Change-Id: I53316e0b9369d806197bccb42cf22d3497af43e7 --- basctl/Library_basctl.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'basctl') diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index 3e7db4cd7da8..f83840635926 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,basctl,\ ucbhelper \ vcl \ xmlscript \ + $(gb_UWINAPI) \ $(gb_STDLIBS) \ )) -- cgit From b85c34978356eb01311f197f00f4dd5f808e3664 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 27 Sep 2012 00:49:12 +0200 Subject: gbuild: replace direct gb_STDLIBS use with ... ... new gb_LinkTarget_add_standard_system_libs Change-Id: Ib2bc843098db3d8c6822b45a3d21724e67f57d69 --- basctl/Library_basctl.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index f83840635926..6cd860ee73f9 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -61,9 +61,10 @@ $(eval $(call gb_Library_use_libraries,basctl,\ vcl \ xmlscript \ $(gb_UWINAPI) \ - $(gb_STDLIBS) \ )) +$(eval $(call gb_Library_add_standard_system_libs,basctl)) + $(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/accessibility/accessibledialogcontrolshape \ basctl/source/accessibility/accessibledialogwindow \ -- cgit From dc397aae70433c0086ef41f4dac5289fb07a9b19 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Sep 2012 15:31:46 +0200 Subject: gbuild: gb_Library_PLAINLIBS_NONE cleanup for WNT: add a new gb_LinkTarget_use_system_win32_libs to abstract different linker options on MSVC and GCC. Change-Id: Ic9bf2545f59bf7871e6fc06b290c486ddfbec03d --- basctl/Library_basctl.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index 6cd860ee73f9..ce2b096cbcac 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -124,7 +124,7 @@ $(eval $(call gb_SdiTarget_set_include,basctl/sdi/basslots,\ )) ifeq ($(OS),WNT) -$(eval $(call gb_Library_use_libraries,basctl,\ +$(eval $(call gb_Library_use_system_win32_libs,basctl,\ advapi32 \ gdi32 \ shell32 \ -- cgit From 5032dc0fc339ba6b200e80a5482cc86e00662a0b Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 28 Sep 2012 16:29:24 +0200 Subject: gbuild: invert handling of standard system libraries: Always link in gb_STDLIBS, except when the library explicitly opts out with gb_LinkTarget_disable_standard_system_libs. Change-Id: I489a99114fbfa46d0421a27cf6c7b899dc268a4a --- basctl/Library_basctl.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'basctl') diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index ce2b096cbcac..b6e1c3b7dc5f 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -63,8 +63,6 @@ $(eval $(call gb_Library_use_libraries,basctl,\ $(gb_UWINAPI) \ )) -$(eval $(call gb_Library_add_standard_system_libs,basctl)) - $(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/accessibility/accessibledialogcontrolshape \ basctl/source/accessibility/accessibledialogwindow \ -- cgit From c2ca6fabd1afc3fc07001721c2069d3c8db7000a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 29 Sep 2012 17:20:22 +0200 Subject: Use comphelper::getComponentContext ...and some further clean up. Change-Id: Id294c0f38fe0041646fc86cacbd2e19734c746a9 --- basctl/source/basicide/baside3.cxx | 17 +++++------------ basctl/source/basicide/basides3.cxx | 6 ++---- basctl/source/basicide/moduldlg.cxx | 7 ++----- basctl/source/basicide/scriptdocument.cxx | 5 ++--- basctl/source/dlged/dlged.cxx | 12 ++++-------- basctl/source/dlged/propbrw.cxx | 4 +--- 6 files changed, 16 insertions(+), 35 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 619704312955..e5fc1ce20e04 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -724,10 +724,7 @@ bool DialogWindow::SaveDialog() // export dialog model to xml Reference< container::XNameContainer > xDialogModel = GetDialog(); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() ); Reference< XInputStream > xInput( xISP->createInputStream() ); @@ -1002,10 +999,8 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri if( xSFI->exists( aCurPath ) ) xInput = xSFI->openFileRead( aCurPath ); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); ::rtl::OUString aXmlDlgName; @@ -1327,10 +1322,8 @@ void DialogWindow::StoreData() if( xDialogModel.is() ) { - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getProcessComponentContext() ); Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() ); xLib->replaceByName( ::rtl::OUString( GetName() ), makeAny( xISP ) ); } diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx index 5f6d86b039a2..d642a2ae1785 100644 --- a/basctl/source/basicide/basides3.cxx +++ b/basctl/source/basicide/basides3.cxx @@ -81,10 +81,8 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl: Reference< container::XNameContainer > xDialogModel( xMSF->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY ); Reference< XInputStream > xInput( xISP->createInputStream() ); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); LocalizationMgr::setStringResourceAtDialog( rDocument, rLibName, aDlgName, xDialogModel ); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 0d0d867c4e4a..4a8cdb5e6261 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -28,7 +28,6 @@ #include "iderdll.hxx" #include -#include #include #include #include @@ -288,10 +287,8 @@ void Shell::CopyDialogResources( Reference< container::XNameContainer > xDialogModel = Reference< container::XNameContainer >( xMSF->createInstance ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY ); Reference< io::XInputStream > xInput( io_xISP->createInputStream() ); - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rSourceDoc.isDocument() ? rSourceDoc.getDocument() : Reference< frame::XModel >() ); if( xDialogModel.is() ) diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index dfede33a0f73..cdf91fbc37e5 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -960,9 +960,8 @@ namespace basctl { ::rtl::OUString aDecodedURL( aAuthority.copy( sizeof ( "vnd.sun.star.expand:" ) - 1 ) ); aDecodedURL = ::rtl::Uri::decode( aDecodedURL, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ); - Reference< XComponentContext > xContext; - Reference< XPropertySet > xProps( xMSF, UNO_QUERY_THROW ); - xContext.set( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" )) ), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); Reference< XMacroExpander > xMacroExpander( xContext->getValueByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.util.theMacroExpander" )) ), diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 9dfb43182c94..422a9d80eba2 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -742,10 +742,8 @@ void DlgEditor::Copy() } // export clipboard dialog model to xml - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( ::comphelper::getProcessServiceFactory(), UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getProcessComponentContext() ); Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xClipDialogModel, xContext, m_xDocument ); Reference< XInputStream > xStream( xISP->createInputStream() ); Sequence< sal_Int8 > DialogModelBytes; @@ -920,10 +918,8 @@ void DlgEditor::Paste() if ( xClipDialogModel.is() ) { - Reference< XComponentContext > xContext; - Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY ); - OSL_ASSERT( xProps.is() ); - OSL_VERIFY( xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext ); + Reference< XComponentContext > xContext( + comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( ::xmlscript::createInputStream( rtl::ByteSequence(DialogModelBytes.getArray(), DialogModelBytes.getLength()) ) , xClipDialogModel, xContext, m_xDocument ); } diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 11529c240369..986a69b8baae 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -127,10 +127,8 @@ void PropBrw::ImplReCreateController() try { - Reference< XPropertySet > xFactoryProperties( m_xORB, UNO_QUERY_THROW ); Reference< XComponentContext > xOwnContext( - xFactoryProperties->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), - UNO_QUERY_THROW ); + comphelper::getComponentContext( m_xORB ) ); // a ComponentContext for the ::cppu::ContextEntry_Init aHandlerContextInfo[] = -- cgit From 36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Sat, 29 Sep 2012 14:47:11 +0200 Subject: Replace usage of rtl_*Memory with equivalent from string.h Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159 Reviewed-on: https://gerrit.libreoffice.org/734 Reviewed-by: Norbert Thiebaud Tested-by: Norbert Thiebaud --- basctl/source/dlged/dlged.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'basctl') diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 422a9d80eba2..d4b8c5f12b85 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -677,7 +677,7 @@ void implCopyStreamToByteSequence( Reference< XInputStream > xStream, sal_Int32 nPos = bytes.getLength(); bytes.realloc( nPos + nRead ); - ::rtl_copyMemory( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); + memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); } } @@ -810,8 +810,8 @@ void DlgEditor::Copy() pCombinedData[i] = sal_Int8( n & 0xff ); n >>= 8; } - ::rtl_copyMemory( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen ); - ::rtl_copyMemory( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen ); + memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen ); + memcpy( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen ); Any aCombinedDataAny; aCombinedDataAny <<= aCombinedData; @@ -905,10 +905,10 @@ void DlgEditor::Paste() sal_Int32 nDialogDataLen = nTotalLen - nResDataLen - 4; DialogModelBytes.realloc( nDialogDataLen ); - ::rtl_copyMemory( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen ); + memcpy( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen ); aResData.realloc( nResDataLen ); - ::rtl_copyMemory( aResData.getArray(), pCombinedData + nResOffset, nResDataLen ); + memcpy( aResData.getArray(), pCombinedData + nResOffset, nResDataLen ); } else { -- cgit From 7b089e2ccccb9872e6bd01af6ed8cefbd8160364 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 1 Oct 2012 21:54:06 +0300 Subject: Use prefix Change-Id: Ide081f18af82e68b55d6d48168a0a567e5e64f04 --- basctl/source/basicide/register.cxx | 2 +- basctl/util/basctl.component | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/register.cxx b/basctl/source/basicide/register.cxx index b2846591dc63..563cc6246de9 100644 --- a/basctl/source/basicide/register.cxx +++ b/basctl/source/basicide/register.cxx @@ -36,7 +36,7 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, +SAL_DLLPUBLIC_EXPORT void* SAL_CALL basctl_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) { diff --git a/basctl/util/basctl.component b/basctl/util/basctl.component index d9ecf795f037..a42ddff3eddf 100644 --- a/basctl/util/basctl.component +++ b/basctl/util/basctl.component @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . --> - -- cgit From db1af9a43458bd7cc9995c3c4e901ddad4e79c8d Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Mon, 1 Oct 2012 13:03:37 -0300 Subject: OUString and RTL_CONSTASCII_US... cleanup in basctl Change-Id: I440d245d013873ec2830280ad01a4d0625fc4c1a Reviewed-on: https://gerrit.libreoffice.org/741 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- 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(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 2cc65d197c39..5d278c2b86cf 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 9fe4ae711ef5..5200c8c8fa73 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 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 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 13b169152819..657182d10420 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 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 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 b7d8975d67b8..8ca38127b4df 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 (); -- cgit From c25cb8a641723ab098980bb842caf75c0dc9b059 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 2 Oct 2012 15:03:12 +0200 Subject: fdo#46808, Adapt task::InteractionHandler UNO service to new style Since we don't need to expose XInitialisation, we can make the new-style service implement XInteractionHandler2. Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558 --- basctl/source/basicide/moduldl2.cxx | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 20b4bcd99105..f14611836c2d 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include "com/sun/star/ucb/XCommandEnvironment.hpp" @@ -1253,21 +1254,16 @@ void LibPage::ExportAsPackage( const String& aLibName ) { // file open dialog Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); - Reference< task::XInteractionHandler > xHandler; - Reference< XSimpleFileAccess2 > xSFA; - Reference < XFilePicker > xFP; - if( xMSF.is() ) - { - xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance - ( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY ); + Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY ); + Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext); - xSFA = SimpleFileAccess::create(comphelper::getProcessComponentContext()); + Reference < XFilePicker > xFP; + Sequence 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 ); - Sequence 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 ); - } xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) ); // filter @@ -1387,16 +1383,10 @@ void LibPage::ExportAsBasic( const String& aLibName ) { // Folder picker Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); - Reference< XFolderPicker > xFolderPicker; - Reference< task::XInteractionHandler > xHandler; - if( xMSF.is() ) - { - xFolderPicker = Reference< XFolderPicker >( xMSF->createInstance( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY ); - - xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance - ( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY ); - } + Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + Reference< XFolderPicker > xFolderPicker( xMSF->createInstance( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY ); + Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW ); if( xFolderPicker.is() ) { -- cgit From dd11a1e57a2565560803dc3fef5fccc9e7157105 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 4 Oct 2012 14:36:34 +0200 Subject: Fixes/improvements on previous commit * UUIInteractionHandler still needs to implement XInitialization. * Moved ambiguating InteractionHandler typedef out of the way. * Removed InteractionHandler.createDefault, as it was originally stated that "it is strongly recommended that [the "Parent"] property is supplied." * Added back documentation about Parent and Context. * Simplified some call-sites to directly use XInteractionHandler2. Change-Id: I1029b8f3cf079171c75920cafaaa44b5bbada883 --- basctl/source/basicide/moduldl2.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index f14611836c2d..5de042e9262f 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -82,9 +82,9 @@ namespace class DummyInteractionHandler : public HandlerImpl_BASE { - Reference< task::XInteractionHandler > m_xHandler; + Reference< task::XInteractionHandler2 > m_xHandler; public: - DummyInteractionHandler( const Reference< task::XInteractionHandler >& xHandler ) : m_xHandler( xHandler ){} + DummyInteractionHandler( const Reference< task::XInteractionHandler2 >& xHandler ) : m_xHandler( xHandler ){} virtual void SAL_CALL handle( const Reference< task::XInteractionRequest >& rRequest ) throw (::com::sun::star::uno::RuntimeException) { @@ -1255,7 +1255,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) // file open dialog Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY ); + Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext); Reference < XFilePicker > xFP; @@ -1307,7 +1307,10 @@ void LibPage::ExportAsPackage( const String& aLibName ) implExportLib( aLibName, aTmpPath, xDummyHandler ); Reference< XCommandEnvironment > xCmdEnv = - static_cast( new OLibCommandEnvironment( xHandler ) ); + static_cast( + new OLibCommandEnvironment( + Reference< task::XInteractionHandler >( + xHandler, UNO_QUERY ) ) ); ::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() ); @@ -1386,7 +1389,7 @@ void LibPage::ExportAsBasic( const String& aLibName ) Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); Reference< XFolderPicker > xFolderPicker( xMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY ); - Reference< task::XInteractionHandler > xHandler( task::InteractionHandler::createDefault(xContext), UNO_QUERY_THROW ); + Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) ); if( xFolderPicker.is() ) { -- cgit From 554a45f266791c32543fcf96a979036becf41f8a Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Tue, 2 Oct 2012 11:31:09 -0300 Subject: ::rtl::OUString to OUString in basctl Change-Id: I34228049e15ee8a899a4c5e1484d7ed3bc541dd4 Reviewed-on: https://gerrit.libreoffice.org/748 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- basctl/source/basicide/baside3.cxx | 90 +++++++++++++++++----------------- basctl/source/basicide/basidectrlr.cxx | 2 +- basctl/source/basicide/basides1.cxx | 74 ++++++++++++++-------------- basctl/source/basicide/bastype2.hxx | 62 +++++++++++------------ 4 files changed, 114 insertions(+), 114 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index e5fc1ce20e04..27bdba100164 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -77,7 +77,7 @@ TYPEINIT1( DialogWindow, BaseWindow ); DialogWindow::DialogWindow ( DialogWindowLayout* pParent, ScriptDocument const& rDocument, - rtl::OUString aLibName, rtl::OUString aName, + OUString aLibName, OUString aName, com::sun::star::uno::Reference const& xDialogModel ) : BaseWindow(pParent, rDocument, aLibName, aName), @@ -256,7 +256,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) if ( xModel.is() ) { Reference< lang::XServiceInfo > xServiceInfo ( xModel, UNO_QUERY ); - if ( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument") ) ) ) + if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) ) bIsCalc = true; } } @@ -662,7 +662,7 @@ Reference< container::XNameContainer > DialogWindow::GetDialog() const return pEditor->GetDialog(); } -bool DialogWindow::RenameDialog( const ::rtl::OUString& rNewName ) +bool DialogWindow::RenameDialog( const OUString& rNewName ) { if ( !basctl::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) ) return false; @@ -683,7 +683,7 @@ void DialogWindow::UpdateBrowser() rLayout.UpdatePropertyBrowser(); } -static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); +static OUString aResourceResolverPropName( "ResourceResolver" ); bool DialogWindow::SaveDialog() { @@ -697,7 +697,7 @@ bool DialogWindow::SaveDialog() Sequence 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); @@ -709,17 +709,17 @@ bool DialogWindow::SaveDialog() if ( !aCurPath.isEmpty() ) xFP->setDisplayDirectory ( aCurPath ); - xFP->setDefaultName( ::rtl::OUString( GetName() ) ); + xFP->setDefaultName( OUString( GetName() ) ); - ::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME)); + OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME)); Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY); - xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) ); - xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) ); + xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) ); + xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) ); xFltMgr->setCurrentFilter( aDialogStr ); if( xFP->execute() == RET_OK ) { - Sequence< ::rtl::OUString > aPaths = xFP->getFiles(); + Sequence< OUString > aPaths = xFP->getFiles(); aCurPath = aPaths[0]; // export dialog model to xml @@ -782,29 +782,29 @@ bool DialogWindow::SaveDialog() { INetURLObject aURLObj( aCurPath ); aURLObj.removeExtension(); - ::rtl::OUString aDialogName( aURLObj.getName() ); + OUString aDialogName( aURLObj.getName() ); aURLObj.removeSegment(); - ::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); + OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); bool bReadOnly = false; - ::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " )); + OUString aComment( "# " ); aComment += aDialogName; - aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" )); + aComment += " strings" ; Reference< task::XInteractionHandler > xDummyHandler; // Remove old properties files in case of overwriting Dialog files if( xSFI->isFolder( aURL ) ) { - Sequence< ::rtl::OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); + Sequence< OUString > aContentSeq = xSFI->getFolderContents( aURL, false ); - ::rtl::OUString aDialogName_( aDialogName ); - aDialogName_ += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_" )); + OUString aDialogName_( aDialogName ); + aDialogName_ += "_" ; sal_Int32 nCount = aContentSeq.getLength(); - const ::rtl::OUString* pFiles = aContentSeq.getConstArray(); + const OUString* pFiles = aContentSeq.getConstArray(); for( int i = 0 ; i < nCount ; i++ ) { - ::rtl::OUString aCompleteName = pFiles[i]; - rtl::OUString aPureName; - rtl::OUString aExtension; + OUString aCompleteName = pFiles[i]; + OUString aPureName; + OUString aExtension; sal_Int32 iDot = aCompleteName.lastIndexOf( '.' ); sal_Int32 iSlash = aCompleteName.lastIndexOf( '/' ); if( iDot != -1 ) @@ -946,7 +946,7 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent, } -bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName ) +bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ) { bool bDone = false; @@ -957,7 +957,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri Sequence 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 ); } Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); @@ -966,23 +966,23 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri aValue <<= sal_True; xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); - ::rtl::OUString aCurPath( rCurPath ); + OUString aCurPath( rCurPath ); if ( !aCurPath.isEmpty() ) xFP->setDisplayDirectory ( aCurPath ); - ::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME)); + OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME)); Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY); - xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) ); - xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) ); + xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) ); + xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) ); xFltMgr->setCurrentFilter( aDialogStr ); if( xFP->execute() == RET_OK ) { - Sequence< ::rtl::OUString > aPaths = xFP->getFiles(); + Sequence< OUString > aPaths = xFP->getFiles(); aCurPath = aPaths[0]; - ::rtl::OUString aBasePath; - ::rtl::OUString aOUCurPath( aCurPath ); + OUString aBasePath; + OUString aOUCurPath( aCurPath ); sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' ); if( iSlash != -1 ) aBasePath = aOUCurPath.copy( 0, iSlash + 1 ); @@ -991,7 +991,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri { // create dialog model Reference< container::XNameContainer > xDialogModel( xMSF->createInstance - ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW ); + ( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY_THROW ); Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); @@ -1003,14 +1003,14 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri comphelper::getComponentContext( xMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); - ::rtl::OUString aXmlDlgName; + OUString aXmlDlgName; Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY ); if( xDialogModelPropSet.is() ) { try { Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME ); - ::rtl::OUString aOUXmlDialogName; + OUString aOUXmlDialogName; aXmlDialogNameAny >>= aOUXmlDialogName; aXmlDlgName = aOUXmlDialogName; } @@ -1024,7 +1024,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName ); - ::rtl::OUString aNewDlgName = aXmlDlgName; + OUString aNewDlgName = aXmlDlgName; enum NameClashMode { NO_CLASH, @@ -1034,8 +1034,8 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri NameClashMode eNameClashMode = NO_CLASH; if( bDialogAlreadyExists ) { - ::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE)); - ::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT)); + OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE)); + OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT)); aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName); NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); @@ -1071,7 +1071,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri bool bReadOnly = true; Reference< XStringResourceWithLocation > xImportStringResource = StringResourceWithLocation::create( xContext, aBasePath, bReadOnly, - aLocale, aXmlDlgName, ::rtl::OUString(), xDummyHandler ); + aLocale, aXmlDlgName, OUString(), xDummyHandler ); Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength(); @@ -1098,8 +1098,8 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri bool bAddDialogLanguagesToLib = false; if( nOnlyInImportLanguageCount > 0 ) { - ::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE)); - ::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT)); + OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE)); + OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT)); LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); sal_uInt16 nRet = aQueryBox.Execute(); if( RET_YES == nRet ) @@ -1207,7 +1207,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri try { Any aXmlDialogNameAny; - aXmlDialogNameAny <<= ::rtl::OUString( aNewDlgName ); + aXmlDialogNameAny <<= OUString( aNewDlgName ); xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny ); bRenamed = true; } @@ -1250,7 +1250,7 @@ bool DialogWindow::ImportDialog() DBG_CHKTHIS( DialogWindow, 0 ); const ScriptDocument& rDocument = GetDocument(); - ::rtl::OUString aLibName = GetLibName(); + OUString aLibName = GetLibName(); return implImportDialog( this, aCurPath, rDocument, aLibName ); } @@ -1279,7 +1279,7 @@ bool DialogWindow::IsModified() return pUndoMgr.get(); } -::rtl::OUString DialogWindow::GetTitle() +OUString DialogWindow::GetTitle() { return GetName(); } @@ -1287,8 +1287,8 @@ bool DialogWindow::IsModified() EntryDescriptor DialogWindow::CreateEntryDescriptor() { ScriptDocument aDocument( GetDocument() ); - ::rtl::OUString aLibName( GetLibName() ); - ::rtl::OUString aLibSubName; + OUString aLibName( GetLibName() ); + OUString aLibSubName; LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName ); return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG ); } @@ -1325,7 +1325,7 @@ void DialogWindow::StoreData() Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() ); - xLib->replaceByName( ::rtl::OUString( GetName() ), makeAny( xISP ) ); + xLib->replaceByName( OUString( GetName() ), makeAny( xISP ) ); } } } diff --git a/basctl/source/basicide/basidectrlr.cxx b/basctl/source/basicide/basidectrlr.cxx index 6af458723822..855ad1ee3f6f 100644 --- a/basctl/source/basicide/basidectrlr.cxx +++ b/basctl/source/basicide/basidectrlr.cxx @@ -38,7 +38,7 @@ namespace { int const nPropertyIconId = 1; -rtl::OUString const sPropertyIconId("IconId"); +OUString const sPropertyIconId("IconId"); } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 7244f092098d..42644e5762a0 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -114,8 +114,8 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) else nFound = pCurWin->StartSearchAndReplace(rSearchItem); - rtl::OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES)); - aReplStr = aReplStr.replaceAll("XX", rtl::OUString::valueOf(nFound)); + OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES)); + aReplStr = aReplStr.replaceAll("XX", OUString::valueOf(nFound)); InfoBox( pCurWin, aReplStr ).Execute(); } else @@ -272,7 +272,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) break; case SID_BASICIDE_CHOOSEMACRO: { - ChooseMacro( NULL, false, ::rtl::OUString() ); + ChooseMacro( NULL, false, OUString() ); } break; case SID_BASICIDE_CREATEMACRO: @@ -286,9 +286,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); StartListening( *pBasMgr, true /* log on only once */ ); - ::rtl::OUString aLibName( rInfo.GetLib() ); + OUString aLibName( rInfo.GetLib() ); if ( aLibName.isEmpty() ) - aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); + aLibName = "Standard" ; StarBASIC* pBasic = pBasMgr->GetLib( aLibName ); if ( !pBasic ) { @@ -310,9 +310,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { if ( rInfo.GetModule().Len() || !pBasic->GetModules()->Count() ) { - ::rtl::OUString aModName = rInfo.GetModule(); + OUString aModName = rInfo.GetModule(); - ::rtl::OUString sModuleCode; + OUString sModuleCode; if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) ) pModule = pBasic->FindModule( aModName ); } @@ -351,14 +351,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if ( aWindowTable.find( rTabId.GetValue() ) != aWindowTable.end() ) { BaseWindow* pWin = aWindowTable[ rTabId.GetValue() ]; - ::rtl::OUString aNewName( rModName.GetValue() ); - ::rtl::OUString aOldName( pWin->GetName() ); + OUString aNewName( rModName.GetValue() ); + OUString aOldName( pWin->GetName() ); if ( aNewName != aOldName ) { bool bRenameOk = false; if (ModulWindow* pModWin = dynamic_cast(pWin)) { - rtl::OUString aLibName = pModWin->GetLibName(); + OUString aLibName = pModWin->GetLibName(); ScriptDocument aDocument( pWin->GetDocument() ); if (RenameModule(pModWin, aDocument, aLibName, aOldName, aNewName)) @@ -437,7 +437,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) uno::Reference< frame::XModel > xModel( rShellItem.GetValue(), UNO_QUERY ); ScriptDocument aDocument( xModel.is() ? ScriptDocument( xModel ) : ScriptDocument::getApplicationScriptDocument() ); const SfxStringItem& rLibNameItem = (const SfxStringItem&)rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME ); - ::rtl::OUString aLibName( rLibNameItem.GetValue() ); + OUString aLibName( rLibNameItem.GetValue() ); if ( nSlot == SID_BASICIDE_LIBSELECTED ) { @@ -453,7 +453,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { - ::rtl::OUString aPassword; + OUString aPassword; bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); } } @@ -512,8 +512,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ); ScriptDocument aDocument( rSbxItem.GetDocument() ); - ::rtl::OUString aLibName( rSbxItem.GetLibName() ); - ::rtl::OUString aName( rSbxItem.GetName() ); + OUString aLibName( rSbxItem.GetLibName() ); + OUString aName( rSbxItem.GetName() ); if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) ) { if ( rSbxItem.GetType() == TYPE_MODULE ) @@ -538,8 +538,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) DBG_ASSERT( rReq.GetArgs(), "arguments expected" ); const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ); ScriptDocument aDocument( rSbxItem.GetDocument() ); - ::rtl::OUString aLibName( rSbxItem.GetLibName() ); - ::rtl::OUString aName( rSbxItem.GetName() ); + OUString aLibName( rSbxItem.GetLibName() ); + OUString aName( rSbxItem.GetName() ); SetCurLib( aDocument, aLibName ); BaseWindow* pWin = 0; if ( rSbxItem.GetType() == TYPE_DIALOG ) @@ -567,7 +567,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) SFX_REQUEST_ARG( rReq, pDocumentItem, SfxStringItem, SID_BASICIDE_ARG_DOCUMENT, false ); if ( pDocumentItem ) { - ::rtl::OUString sDocumentCaption = pDocumentItem->GetValue(); + OUString sDocumentCaption = pDocumentItem->GetValue(); if ( !sDocumentCaption.isEmpty() ) pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) ); } @@ -587,16 +587,16 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if ( !pLibNameItem ) break; - ::rtl::OUString aLibName( pLibNameItem->GetValue() ); + OUString aLibName( pLibNameItem->GetValue() ); pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName ); SetCurLib( *pDocument, aLibName ); SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_BASICIDE_ARG_NAME, false ); if ( pNameItem ) { - ::rtl::OUString aName( pNameItem->GetValue() ); - ::rtl::OUString aModType(RTL_CONSTASCII_USTRINGPARAM("Module")); - ::rtl::OUString aDlgType(RTL_CONSTASCII_USTRINGPARAM("Dialog")); - ::rtl::OUString aType( aModType ); + OUString aName( pNameItem->GetValue() ); + OUString aModType( "Module" ); + OUString aDlgType( "Dialog" ); + OUString aType( aModType ); SFX_REQUEST_ARG( rReq, pTypeItem, SfxStringItem, SID_BASICIDE_ARG_TYPE, false ); if ( pTypeItem ) aType = pTypeItem->GetValue(); @@ -839,7 +839,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICIDE_LIBSELECTOR: { - ::rtl::OUString aName; + OUString aName; if ( !m_aCurLibName.isEmpty() ) { LibraryLocation eLocation = m_aCurDocument.getLibraryLocation( m_aCurLibName ); @@ -851,7 +851,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_SEARCH_ITEM: { - ::rtl::OUString aSelected = GetSelectionText(true); + OUString aSelected = GetSelectionText(true); SvxSearchItem& rItem = GetExtraData()->GetSearchItem(); rItem.SetSearchString( aSelected ); rSet.Put( rItem ); @@ -859,7 +859,7 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_BASICIDE_STAT_DATE: { - ::rtl::OUString aDate(RTL_CONSTASCII_USTRINGPARAM("Datum?!")); + OUString aDate( "Datum?!" ); SfxStringItem aItem( SID_BASICIDE_STAT_DATE, aDate ); rSet.Put( aItem ); } @@ -887,7 +887,7 @@ void Shell::GetState(SfxItemSet &rSet) { if ( pCurWin ) { - ::rtl::OUString aTitle = pCurWin->CreateQualifiedName(); + OUString aTitle = pCurWin->CreateQualifiedName(); SfxStringItem aItem( SID_BASICIDE_STAT_TITLE, aTitle ); rSet.Put( aItem ); } @@ -910,7 +910,7 @@ void Shell::GetState(SfxItemSet &rSet) rSet.DisableItem( nWh ); else { - ::rtl::OUString aItemStr; + OUString aItemStr; boost::shared_ptr pCurMgr(GetCurLocalizationMgr()); if ( pCurMgr->isLibraryLocalized() ) { @@ -919,7 +919,7 @@ void Shell::GetState(SfxItemSet &rSet) sal_Int32 i, nCount = aLocaleSeq.getLength(); // Force different results for any combination of locales and default locale - ::rtl::OUString aLangStr; + OUString aLangStr; for ( i = 0; i <= nCount; ++i ) { lang::Locale aLocale; @@ -1051,11 +1051,11 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe void Shell::ManageToolbars() { - static ::rtl::OUString aLayoutManagerName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )); - static ::rtl::OUString aMacroBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/macrobar" )); - static ::rtl::OUString aDialogBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/dialogbar" )); - static ::rtl::OUString aInsertControlsBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcontrolsbar" )); - static ::rtl::OUString aFormControlsBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/formcontrolsbar" )); + static OUString aLayoutManagerName( "LayoutManager" ); + static OUString aMacroBarResName( "private:resource/toolbar/macrobar" ); + static OUString aDialogBarResName( "private:resource/toolbar/dialogbar" ); + static OUString aInsertControlsBarResName( "private:resource/toolbar/insertcontrolsbar" ); + static OUString aFormControlsBarResName( "private:resource/toolbar/formcontrolsbar" ); (void)aInsertControlsBarResName; if( !pCurWin ) @@ -1099,7 +1099,7 @@ BaseWindow* Shell::FindApplicationWindow() BaseWindow* Shell::FindWindow( ScriptDocument const& rDocument, - rtl::OUString const& rLibName, rtl::OUString const& rName, + OUString const& rLibName, OUString const& rName, ItemType eType, bool bFindSuspended ) { @@ -1153,7 +1153,7 @@ long Shell::CallBasicBreakHdl( StarBASIC* pBasic ) ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic ) { - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false ); SbModule* pActiveModule = StarBASIC::GetActiveModule(); if (SbClassModuleObject* pCMO = dynamic_cast(pActiveModule)) @@ -1169,7 +1169,7 @@ ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic ) if (BasicManager* pBasMgr = FindBasicManager(pLib)) { ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - ::rtl::OUString aLibName = pLib->GetName(); + OUString aLibName = pLib->GetName(); pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), true ); DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" ); SetCurLib( aDocument, aLibName ); @@ -1260,7 +1260,7 @@ void Shell::Deactivate( sal_Bool bMDI ) if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() ) { if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false ); SetCurWindow( pWin, true ); break; } diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index acd531f60f4a..b718ce2df6de 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -91,28 +91,28 @@ public: class LibEntry : public DocumentEntry { private: - rtl::OUString m_aLibName; + OUString m_aLibName; public: LibEntry ( ScriptDocument const& rDocument, LibraryLocation eLocation, - rtl::OUString const& rLibName, + OUString const& rLibName, EntryType eType = OBJ_TYPE_LIBRARY ); virtual ~LibEntry (); - rtl::OUString const& GetLibName () const { return m_aLibName; } + OUString const& GetLibName () const { return m_aLibName; } }; class EntryDescriptor { ScriptDocument m_aDocument; LibraryLocation m_eLocation; - rtl::OUString m_aLibName; - rtl::OUString m_aLibSubName; // for vba entry: Document Objects, Class Modules, Forms and Normal Modules - rtl::OUString m_aName; - rtl::OUString m_aMethodName; + OUString m_aLibName; + OUString m_aLibSubName; // for vba entry: Document Objects, Class Modules, Forms and Normal Modules + OUString m_aName; + OUString m_aMethodName; EntryType m_eType; public: @@ -120,41 +120,41 @@ public: EntryDescriptor ( ScriptDocument const& rDocument, LibraryLocation eLocation, - rtl::OUString const& rLibName, - rtl::OUString const& rLibSubName, - rtl::OUString const& rName, + OUString const& rLibName, + OUString const& rLibSubName, + OUString const& rName, EntryType eType ); EntryDescriptor ( ScriptDocument const& rDocument, LibraryLocation eLocation, - rtl::OUString const& rLibName, - rtl::OUString const& rLibSubName, - rtl::OUString const& rName, - rtl::OUString const& rMethodName, + OUString const& rLibName, + OUString const& rLibSubName, + OUString const& rName, + OUString const& rMethodName, EntryType eType ); virtual ~EntryDescriptor (); bool operator == (EntryDescriptor const& rDesc) const; - ScriptDocument const& GetDocument() const { return m_aDocument; } - void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; } + ScriptDocument const& GetDocument() const { return m_aDocument; } + void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; } LibraryLocation GetLocation() const { return m_eLocation; } void SetLocation( LibraryLocation eLocation ) { m_eLocation = eLocation; } - const ::rtl::OUString& GetLibName() const { return m_aLibName; } - void SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; } + const OUString& GetLibName() const { return m_aLibName; } + void SetLibName( const OUString& aLibName ) { m_aLibName = aLibName; } - const ::rtl::OUString& GetLibSubName() const { return m_aLibSubName; } - void SetLibSubName( const ::rtl::OUString& aLibSubName ) { m_aLibSubName = aLibSubName; } + const OUString& GetLibSubName() const { return m_aLibSubName; } + void SetLibSubName( const OUString& aLibSubName ) { m_aLibSubName = aLibSubName; } - const ::rtl::OUString& GetName() const { return m_aName; } - void SetName( const ::rtl::OUString& aName ) { m_aName = aName; } + const OUString& GetName() const { return m_aName; } + void SetName( const OUString& aName ) { m_aName = aName; } - const ::rtl::OUString& GetMethodName() const { return m_aMethodName; } - void SetMethodName( const ::rtl::OUString& aMethodName ) { m_aMethodName = aMethodName; } + const OUString& GetMethodName() const { return m_aMethodName; } + void SetMethodName( const OUString& aMethodName ) { m_aMethodName = aMethodName; } EntryType GetType() const { return m_eType; } void SetType( EntryType eType ) { m_eType = eType; } @@ -188,10 +188,10 @@ protected: virtual long ExpandingHdl(); void ImpCreateLibEntries( SvLBoxEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation ); - void ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ); - void ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ); - void ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ); - SvLBoxEntry* ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText ); + void ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); + void ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); + void ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); + SvLBoxEntry* ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText ); // DocumentEventListener virtual void onDocumentCreated( const ScriptDocument& _rDocument ); @@ -220,7 +220,7 @@ public: SbModule* FindModule( SvLBoxEntry* pEntry ); SbxVariable* FindVariable( SvLBoxEntry* pEntry ); SvLBoxEntry* FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation ); - SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, EntryType eType ); + SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType ); EntryDescriptor GetEntryDescriptor( SvLBoxEntry* pEntry ); @@ -228,14 +228,14 @@ public: bool IsValidEntry( SvLBoxEntry* pEntry ); SvLBoxEntry* AddEntry( - const ::rtl::OUString& rText, const Image& rImage, + const OUString& rText, const Image& rImage, SvLBoxEntry* pParent, bool bChildrenOnDemand, std::auto_ptr aUserData ); void RemoveEntry (SvLBoxEntry*); void RemoveEntry (ScriptDocument const&); - ::rtl::OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const; + OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const; void GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage ); void SetCurrentEntry (EntryDescriptor&); -- cgit From b29ecc914b78216ea9a355c431ca4748eb056b06 Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Thu, 4 Oct 2012 00:32:16 -0300 Subject: More ::rtl::OUString cleanup in basctl Change-Id: If7cefe8d2e188e65a465a25a5d5f77e6daebcd17 Reviewed-on: https://gerrit.libreoffice.org/760 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- basctl/source/basicide/basidesh.cxx | 41 ++++++++++++++--------------- basctl/source/basicide/basobj2.cxx | 52 ++++++++++++++++++------------------- 2 files changed, 46 insertions(+), 47 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 5b64d24aa854..4639b4eaf734 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -65,7 +65,6 @@ namespace basctl using namespace ::com::sun::star::uno; using namespace ::com::sun::star; -using ::rtl::OUString; typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE; @@ -79,7 +78,7 @@ public: ~ContainerListenerImpl() { } - void addContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName ) + void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) { try { @@ -92,7 +91,7 @@ public: } catch(const uno::Exception& ) {} } - void removeContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName ) + void removeContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName ) { try { @@ -112,14 +111,14 @@ public: // XContainerListener virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event ) throw( uno::RuntimeException ) { - rtl::OUString sModuleName; + OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, true, false ); } virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { } virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException ) { - rtl::OUString sModuleName; + OUString sModuleName; if( mpShell && ( Event.Accessor >>= sModuleName ) ) { ModulWindow* pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true); @@ -186,7 +185,7 @@ void Shell::Init() GetExtraData()->ShellInCriticalSection() = true; - SetName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) ); + SetName( OUString( "BasicIDE" ) ); SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH ); LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR ); @@ -208,7 +207,7 @@ void Shell::Init() InitScrollBars(); InitTabBar(); - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), false, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", false, false ); ShellCreated(this); @@ -330,7 +329,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument ) pData->GetLibInfos().RemoveInfoFor( _rDocument ); if ( bSetCurLib ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), true, false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", true, false ); else if ( bSetCurWindow ) SetCurWindow( FindApplicationWindow(), true ); } @@ -401,7 +400,7 @@ sal_uInt16 Shell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) if ( !pWin->CanClose() ) { if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) - SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); + SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false ); SetCurWindow( pWin, true ); bCanClose = false; } @@ -626,7 +625,7 @@ void Shell::CheckWindows() -void Shell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, bool bDestroy ) +void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy ) { bool bChangeCurWindow = pCurWin ? false : true; std::vector aDeleteVec; @@ -693,13 +692,13 @@ void Shell::UpdateWindows() StartListening( *doc->getBasicManager(), true /* log on only once */ ); // libraries - 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++ ) { - ::rtl::OUString aLibName = pLibNames[ i ]; + OUString aLibName = pLibNames[ i ]; if ( m_aCurLibName.isEmpty() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) ) { @@ -730,13 +729,13 @@ void Shell::UpdateWindows() try { - Sequence< ::rtl::OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) ); + Sequence< OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) ); sal_Int32 nModCount = aModNames.getLength(); - const ::rtl::OUString* pModNames = aModNames.getConstArray(); + const OUString* pModNames = aModNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nModCount ; j++ ) { - ::rtl::OUString aModName = pModNames[ j ]; + OUString aModName = pModNames[ j ]; ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, false ); if ( !pWin ) pWin = CreateBasWin( *doc, aLibName, aModName ); @@ -759,13 +758,13 @@ void Shell::UpdateWindows() { try { - Sequence< ::rtl::OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName ); + Sequence< OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName ); sal_Int32 nDlgCount = aDlgNames.getLength(); - const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray(); + const OUString* pDlgNames = aDlgNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ ) { - ::rtl::OUString aDlgName = pDlgNames[ j ]; + OUString aDlgName = pDlgNames[ j ]; // this find only looks for non-suspended windows; // suspended windows are handled in CreateDlgWin DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, false ); @@ -907,7 +906,7 @@ void Shell::EnableScrollbars( bool bEnable ) aVScrollBar.Enable(bEnable); } -void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName, bool bUpdateWindows, bool bCheck ) +void Shell::SetCurLib( const ScriptDocument& rDocument, OUString aLibName, bool bUpdateWindows, bool bCheck ) { if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) ) { @@ -938,7 +937,7 @@ void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName } } -void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, ::rtl::OUString aLibName ) +void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, OUString aLibName ) { // Create LocalizationMgr Reference< resource::XStringResourceManager > xStringResourceManager; diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index e7a9b4e0119e..25d43a0d74d8 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -56,9 +56,9 @@ using namespace ::com::sun::star::container; extern "C" { SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, sal_Bool bChooseOnly, rtl_uString* pMacroDesc ) { - ::rtl::OUString aMacroDesc( pMacroDesc ); + OUString aMacroDesc( pMacroDesc ); Reference< frame::XModel > aDocument( static_cast< frame::XModel* >( pOnlyInDocument_AsXModel ) ); - ::rtl::OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc ); + OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc ); rtl_uString* pScriptURL = aScriptURL.pData; rtl_uString_acquire( pScriptURL ); @@ -112,15 +112,15 @@ static bool StringCompareLessThan( const String& rStr1, const String& rStr2 ) //---------------------------------------------------------------------------- -Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer ) +Sequence< OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer ) { // create a sorted list of module library names ::std::vector aModLibList; if ( xModLibContainer.is() ) { - Sequence< ::rtl::OUString > aModLibNames = xModLibContainer->getElementNames(); + Sequence< OUString > aModLibNames = xModLibContainer->getElementNames(); sal_Int32 nModLibCount = aModLibNames.getLength(); - const ::rtl::OUString* pModLibNames = aModLibNames.getConstArray(); + const OUString* pModLibNames = aModLibNames.getConstArray(); for ( sal_Int32 i = 0 ; i < nModLibCount ; i++ ) aModLibList.push_back( pModLibNames[ i ] ); ::std::sort( aModLibList.begin() , aModLibList.end() , StringCompareLessThan ); @@ -130,9 +130,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib ::std::vector aDlgLibList; if ( xDlgLibContainer.is() ) { - Sequence< ::rtl::OUString > aDlgLibNames = xDlgLibContainer->getElementNames(); + Sequence< OUString > aDlgLibNames = xDlgLibContainer->getElementNames(); sal_Int32 nDlgLibCount = aDlgLibNames.getLength(); - const ::rtl::OUString* pDlgLibNames = aDlgLibNames.getConstArray(); + const OUString* pDlgLibNames = aDlgLibNames.getConstArray(); for ( sal_Int32 i = 0 ; i < nDlgLibCount ; i++ ) aDlgLibList.push_back( pDlgLibNames[ i ] ); ::std::sort( aDlgLibList.begin() , aDlgLibList.end() , StringCompareLessThan ); @@ -146,7 +146,7 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib // copy to sequence sal_Int32 nLibCount = aLibList.size(); - Sequence< ::rtl::OUString > aSeqLibNames( nLibCount ); + Sequence< OUString > aSeqLibNames( nLibCount ); for ( sal_Int32 i = 0 ; i < nLibCount ; i++ ) aSeqLibNames.getArray()[ i ] = aLibList[ i ]; @@ -158,9 +158,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib bool RenameModule ( Window* pErrorParent, const ScriptDocument& rDocument, - const ::rtl::OUString& rLibName, - const ::rtl::OUString& rOldName, - const ::rtl::OUString& rNewName + const OUString& rLibName, + const OUString& rOldName, + const OUString& rNewName ) { if ( !rDocument.hasModule( rLibName, rOldName ) ) @@ -259,7 +259,7 @@ namespace //---------------------------------------------------------------------------- -::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const ::rtl::OUString& rMacroDesc ) +OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const OUString& rMacroDesc ) { (void)rMacroDesc; @@ -324,15 +324,15 @@ namespace aName += pMethod->GetName(); // language - rtl::OUString aLanguage("Basic"); + OUString aLanguage("Basic"); // location - rtl::OUString aLocation; + OUString aLocation; ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); if ( aDocument.isDocument() ) { // document basic - aLocation = rtl::OUString("document"); + aLocation = "document" ; if ( rxLimitToDocument.is() ) { @@ -366,17 +366,17 @@ namespace else { // application basic - aLocation = rtl::OUString("application"); + aLocation = "application" ; } // script URL if ( !bError ) { - aScriptURL = rtl::OUString("vnd.sun.star.script:"); + aScriptURL = "vnd.sun.star.script:" ; aScriptURL += aName; - aScriptURL += rtl::OUString("?language="); + aScriptURL += "?language=" ; aScriptURL += aLanguage; - aScriptURL += rtl::OUString("&location="); + aScriptURL += "&location=" ; aScriptURL += aLocation; } @@ -396,13 +396,13 @@ namespace //---------------------------------------------------------------------------- -Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName ) +Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName ) throw(NoSuchElementException ) { - Sequence< ::rtl::OUString > aSeqMethods; + Sequence< OUString > aSeqMethods; // get module - ::rtl::OUString aOUSource; + OUString aOUSource; if ( rDocument.getModule( rLibName, rModName, aOUSource ) ) { SbModuleRef xModule = new SbModule( rModName ); @@ -435,14 +435,14 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con bool HasMethod ( ScriptDocument const& rDocument, - rtl::OUString const& rLibName, - rtl::OUString const& rModName, - rtl::OUString const& rMethName + OUString const& rLibName, + OUString const& rModName, + OUString const& rMethName ) { bool bHasMethod = false; - ::rtl::OUString aOUSource; + OUString aOUSource; if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) ) { SbModuleRef xModule = new SbModule( rModName ); -- cgit From bb414e9eeed32b9f931b0f2a9909bb43e1f6bdbb Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Fri, 5 Oct 2012 01:25:41 -0300 Subject: rtl::OUString to OUString in basctl Change-Id: Iaa56c5f8a15032c3102ad58011c80e3c86fe287c --- 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/inc/bastypes.hxx | 62 +++++++++---------- 5 files changed, 119 insertions(+), 119 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 16e73fef6430..410d3a78652c 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 d642a2ae1785..5d043eacc1bf 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 5da04e9016fb..6a726662f08c 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 bd9858a7525d..db208138ed90 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, + OUString const& rLibName, EntryType eType ) : DocumentEntry(rDocument, eLocation, eType), @@ -129,9 +129,9 @@ EntryDescriptor::EntryDescriptor () : EntryDescriptor::EntryDescriptor ( ScriptDocument const& rDocument, LibraryLocation eLocation, - rtl::OUString const& rLibName, - rtl::OUString const& rLibSubName, - rtl::OUString const& rName, + OUString const& rLibName, + OUString const& rLibSubName, + OUString const& rName, EntryType eType ) : m_aDocument(rDocument), @@ -147,10 +147,10 @@ EntryDescriptor::EntryDescriptor ( EntryDescriptor::EntryDescriptor ( ScriptDocument const& rDocument, LibraryLocation eLocation, - rtl::OUString const& rLibName, - rtl::OUString const& rLibSubName, - rtl::OUString const& rName, - rtl::OUString const& rMethodName, + OUString const& rLibName, + OUString const& rLibSubName, + OUString const& rName, + OUString const& rMethodName, EntryType eType ) : m_aDocument(rDocument), @@ -223,7 +223,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation ); if ( !pDocumentRootEntry ) { - ::rtl::OUString aRootName( GetRootEntryName( rDocument, eLocation ) ); + OUString aRootName( GetRootEntryName( rDocument, eLocation ) ); Image aImage; GetRootEntryBitmaps( rDocument, aImage ); SAL_WNODEPRECATED_DECLARATIONS_PUSH @@ -242,19 +242,19 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, 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++ ) { - ::rtl::OUString aLibName = pLibNames[ i ]; + OUString aLibName = pLibNames[ i ]; if ( eLocation == rDocument.getLibraryLocation( aLibName ) ) { // check, if the module library is loaded bool bModLibLoaded = false; - ::rtl::OUString aOULibName( aLibName ); + OUString aOULibName( aLibName ); Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) ) bModLibLoaded = true; @@ -303,7 +303,7 @@ void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const Sc } } -void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ) +void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ) { // modules if ( nMode & BROWSEMODE_MODULES ) @@ -319,13 +319,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri else { // get a sorted list of module names - Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName ); + Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName ); 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 ]; SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE ); if ( !pModuleEntry ) pModuleEntry = AddEntry( @@ -338,13 +338,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri // methods if ( nMode & BROWSEMODE_SUBS ) { - Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName ); + Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName ); sal_Int32 nCount = aNames.getLength(); - const ::rtl::OUString* pNames = aNames.getConstArray(); + const OUString* pNames = aNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nCount ; j++ ) { - ::rtl::OUString aName = pNames[ j ]; + OUString aName = pNames[ j ]; SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD ); if ( !pEntry ) pEntry = AddEntry( @@ -375,13 +375,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri try { // get a sorted list of dialog names - Sequence< ::rtl::OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) ); + Sequence< OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) ); 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 ]; SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG ); if ( !pDialogEntry ) pDialogEntry = AddEntry( @@ -400,20 +400,20 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri } } -void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ) +void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ) { - std::vector > aEntries; + std::vector > aEntries; aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) ); aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, IDE_RESSTR(RID_STR_USERFORMS) ) ); aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, IDE_RESSTR(RID_STR_NORMAL_MODULES) ) ); aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, IDE_RESSTR(RID_STR_CLASS_MODULES) ) ); - std::vector >::iterator iter; + std::vector >::iterator iter; for( iter = aEntries.begin(); iter != aEntries.end(); ++iter ) { EntryType eType = iter->first; - rtl::OUString aEntryName = iter->second; + OUString aEntryName = iter->second; SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType ); if( pLibSubRootEntry ) { @@ -433,7 +433,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, c } } -void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName ) +void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ) { uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName ); if( !xLib.is() ) @@ -442,16 +442,16 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn try { // get a sorted list of module names - Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName ); + Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName ); sal_Int32 nModCount = aModNames.getLength(); - const ::rtl::OUString* pModNames = aModNames.getConstArray(); + const OUString* pModNames = aModNames.getConstArray(); EntryDescriptor aDesc( GetEntryDescriptor( pLibSubRootEntry ) ); EntryType eCurrentType( aDesc.GetType() ); for ( sal_Int32 i = 0 ; i < nModCount ; i++ ) { - ::rtl::OUString aModName = pModNames[ i ]; + OUString aModName = pModNames[ i ]; EntryType eType = OBJ_TYPE_UNKNOWN; switch( ModuleInfoHelper::getModuleType( xLib, aModName ) ) { @@ -473,19 +473,19 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn // display a nice friendly name in the ObjectModule tab, // combining the objectname and module name, e.g. Sheet1 ( Financials ) - ::rtl::OUStringBuffer aEntryNameBuf( aModName ); + OUStringBuffer aEntryNameBuf( aModName ); if( eType == OBJ_TYPE_DOCUMENT_OBJECTS ) { - ::rtl::OUString sObjName; + OUString sObjName; ModuleInfoHelper::getObjectName( xLib, aModName, sObjName ); if( !sObjName.isEmpty() ) { - aEntryNameBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" (")); + aEntryNameBuf.appendAscii( " (" ); aEntryNameBuf.append(sObjName); aEntryNameBuf.append(')'); } } - ::rtl::OUString aEntryName(aEntryNameBuf.makeStringAndClear()); + OUString aEntryName(aEntryNameBuf.makeStringAndClear()); SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE ); if ( !pModuleEntry ) pModuleEntry = AddEntry( @@ -498,13 +498,13 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn // methods if ( nMode & BROWSEMODE_SUBS ) { - Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName ); + Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName ); sal_Int32 nCount = aNames.getLength(); - const ::rtl::OUString* pNames = aNames.getConstArray(); + const OUString* pNames = aNames.getConstArray(); for ( sal_Int32 j = 0 ; j < nCount ; j++ ) { - ::rtl::OUString aName = pNames[ j ]; + OUString aName = pNames[ j ]; SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD ); if ( !pEntry ) pEntry = AddEntry( @@ -523,7 +523,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn } } -SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText ) +SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText ) { sal_uLong nRootPos = 0; SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos ); @@ -640,7 +640,7 @@ SvLBoxEntry* TreeListBox::CloneEntry( SvLBoxEntry* pSource ) return pNew; } -SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, EntryType eType ) +SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType ) { sal_uLong nRootPos = 0; SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos ); @@ -668,10 +668,10 @@ long TreeListBox::ExpandingHdl() OSL_ENSURE( aDocument.isAlive(), "TreeListBox::ExpandingHdl: no document, or document is dead!" ); if ( aDocument.isAlive() ) { - ::rtl::OUString aLibName( aDesc.GetLibName() ); - ::rtl::OUString aLibSubName( aDesc.GetLibSubName() ); - ::rtl::OUString aName( aDesc.GetName() ); - ::rtl::OUString aMethodName( aDesc.GetMethodName() ); + OUString aLibName( aDesc.GetLibName() ); + OUString aLibSubName( aDesc.GetLibSubName() ); + OUString aName( aDesc.GetName() ); + OUString aMethodName( aDesc.GetMethodName() ); if ( !aLibName.isEmpty() && aLibSubName.isEmpty() && aName.isEmpty() && aMethodName.isEmpty() ) { @@ -682,7 +682,7 @@ long TreeListBox::ExpandingHdl() Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) ) { - ::rtl::OUString aPassword; + OUString aPassword; bOK = QueryPassword( xModLibContainer, aLibName, aPassword ); } } @@ -702,7 +702,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) OSL_ENSURE( aDocument.isAlive(), "TreeListBox::IsEntryProtected: no document, or document is dead!" ); if ( aDocument.isAlive() ) { - ::rtl::OUString aOULibName( aDesc.GetLibName() ); + OUString aOULibName( aDesc.GetLibName() ); Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) { @@ -719,7 +719,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry ) SAL_WNODEPRECATED_DECLARATIONS_PUSH SvLBoxEntry* TreeListBox::AddEntry( - rtl::OUString const& rText, + OUString const& rText, const Image& rImage, SvLBoxEntry* pParent, bool bChildrenOnDemand, @@ -750,7 +750,7 @@ LibraryType TreeListBox::GetLibraryType() const return eType; } -::rtl::OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const +OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const { return rDocument.getTitle( eLocation, GetLibraryType() ); } @@ -763,12 +763,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r if ( rDocument.isDocument() ) { - ::rtl::OUString sFactoryURL; + OUString sFactoryURL; Reference xContext( ::comphelper::getProcessComponentContext() ); Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xContext) ); try { - ::rtl::OUString sModule( xModuleManager->identify( rDocument.getDocument() ) ); + OUString sModule( xModuleManager->identify( rDocument.getDocument() ) ); Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY ); if ( xModuleConfig.is() ) { @@ -816,7 +816,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) aDesc = EntryDescriptor( ScriptDocument::getApplicationScriptDocument(), LIBRARY_LOCATION_USER, "Standard", - ::rtl::OUString(), ".", OBJ_TYPE_UNKNOWN + OUString(), ".", OBJ_TYPE_UNKNOWN ); } ScriptDocument aDocument = aDesc.GetDocument(); @@ -826,7 +826,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) if ( pRootEntry ) { pCurEntry = pRootEntry; - ::rtl::OUString aLibName( aDesc.GetLibName() ); + OUString aLibName( aDesc.GetLibName() ); if ( !aLibName.isEmpty() ) { Expand( pRootEntry ); @@ -834,7 +834,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) if ( pLibEntry ) { pCurEntry = pLibEntry; - ::rtl::OUString aLibSubName( aDesc.GetLibSubName() ); + OUString aLibSubName( aDesc.GetLibSubName() ); if( !aLibSubName.isEmpty() ) { Expand( pLibEntry ); @@ -844,7 +844,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) pCurEntry = pLibSubEntry; } } - ::rtl::OUString aName( aDesc.GetName() ); + OUString aName( aDesc.GetName() ); if ( !aName.isEmpty() ) { Expand( pCurEntry ); @@ -855,7 +855,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc) if ( pEntry ) { pCurEntry = pEntry; - ::rtl::OUString aMethodName( aDesc.GetMethodName() ); + OUString aMethodName( aDesc.GetMethodName() ); if ( !aMethodName.isEmpty() ) { Expand( pEntry ); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index d7d2e69d0196..b5bb4004cac7 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -50,7 +50,7 @@ class DialogWindow; #define LINE_SEP 0x0A // Implementation: baside2b.cxx -sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex ); +sal_Int32 searchEOL( const OUString& rStr, sal_Int32 fromIndex ); // Meaning of bToBeKilled: // While being in a reschedule-loop, I may not destroy the window. @@ -155,8 +155,8 @@ private: int nStatus; ScriptDocument m_aDocument; - rtl::OUString m_aLibName; - rtl::OUString m_aName; + OUString m_aLibName; + OUString m_aName; friend class ModulWindow; friend class DialogWindow; @@ -166,7 +166,7 @@ protected: public: TYPEINFO(); - BaseWindow( Window* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName ); + BaseWindow( Window* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName ); virtual ~BaseWindow(); void Init(); @@ -192,8 +192,8 @@ public: // print page virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0; - virtual ::rtl::OUString GetTitle(); - ::rtl::OUString CreateQualifiedName(); + virtual OUString GetTitle(); + OUString CreateQualifiedName(); virtual EntryDescriptor CreateEntryDescriptor() = 0; virtual bool IsModified(); @@ -223,16 +223,16 @@ public: GetDocument() const { return m_aDocument; } void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; } bool IsDocument( const ScriptDocument& rDocument ) const { return rDocument == m_aDocument; } - const ::rtl::OUString& GetLibName() const { return m_aLibName; } - void SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; } - const ::rtl::OUString& GetName() const { return m_aName; } - void SetName( const ::rtl::OUString& aName ) { m_aName = aName; } + const OUString& GetLibName() const { return m_aLibName; } + void SetLibName( const OUString& aLibName ) { m_aLibName = aLibName; } + const OUString& GetName() const { return m_aName; } + void SetName( const OUString& aName ) { m_aName = aName; } virtual void OnNewDocument (); virtual char const* GetHid () const = 0; virtual ItemType GetType () const = 0; void InsertLibInfo () const; - bool Is (ScriptDocument const&, rtl::OUString const&, rtl::OUString const&, ItemType, bool bFindSuspended); + bool Is (ScriptDocument const&, OUString const&, OUString const&, ItemType, bool bFindSuspended); virtual bool HasActiveEditor () const; }; @@ -244,19 +244,19 @@ public: LibInfos (); ~LibInfos (); public: - void InsertInfo (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType); + void InsertInfo (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType); void RemoveInfoFor (ScriptDocument const&); - Item const* GetInfo (ScriptDocument const&, rtl::OUString const& rLibName); + Item const* GetInfo (ScriptDocument const&, OUString const& rLibName); private: class Key { private: ScriptDocument m_aDocument; - ::rtl::OUString m_aLibName; + OUString m_aLibName; public: - Key (ScriptDocument const&, rtl::OUString const& rLibName); + Key (ScriptDocument const&, OUString const& rLibName); ~Key (); public: bool operator == (Key const&) const; @@ -266,24 +266,24 @@ private: }; public: const ScriptDocument& GetDocument() const { return m_aDocument; } - const ::rtl::OUString& GetLibName() const { return m_aLibName; } + const OUString& GetLibName() const { return m_aLibName; } }; public: class Item { private: ScriptDocument m_aDocument; - ::rtl::OUString m_aLibName; - ::rtl::OUString m_aCurrentName; + OUString m_aLibName; + OUString m_aCurrentName; ItemType m_eCurrentType; public: - Item (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType); + Item (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType); ~Item (); public: const ScriptDocument& GetDocument() const { return m_aDocument; } - const ::rtl::OUString& GetLibName() const { return m_aLibName; } - const ::rtl::OUString& GetCurrentName() const { return m_aCurrentName; } + const OUString& GetLibName() const { return m_aLibName; } + const OUString& GetCurrentName() const { return m_aCurrentName; } ItemType GetCurrentType() const { return m_eCurrentType; } }; private: @@ -291,16 +291,16 @@ private: Map m_aMap; }; -void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false ); -::rtl::OUString CreateMgrAndLibStr( const ::rtl::OUString& rMgrName, const ::rtl::OUString& rLibName ); +void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false ); +OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName ); sal_uLong CalcLineCount( SvStream& rStream ); -bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent = 0 ); -bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent = 0 ); -bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent = 0 ); -bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent = 0 ); -bool QueryDelLib( const ::rtl::OUString& rName, bool bRef = false, Window* pParent = 0 ); -bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat = false, bool bNewTitle = false ); +bool QueryReplaceMacro( const OUString& rName, Window* pParent = 0 ); +bool QueryDelMacro( const OUString& rName, Window* pParent = 0 ); +bool QueryDelDialog( const OUString& rName, Window* pParent = 0 ); +bool QueryDelModule( const OUString& rName, Window* pParent = 0 ); +bool QueryDelLib( const OUString& rName, bool bRef = false, Window* pParent = 0 ); +bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false ); class ModuleInfoHelper { @@ -309,8 +309,8 @@ class ModuleInfoHelper ModuleInfoHelper (const ModuleInfoHelper&); ModuleInfoHelper& operator = (const ModuleInfoHelper&); public: - static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName ); - static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName ); + static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName ); + static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName ); }; } // namespace basctl -- cgit From d3e08f257437fe942719304e45792a294d9310db Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Sun, 7 Oct 2012 16:26:46 -0300 Subject: More ::rtl::OUString to OUString in basctl Change-Id: Ie27a55e933462c644f315d0123978082054d79af --- basctl/source/basicide/bastype3.cxx | 10 +++---- basctl/source/basicide/bastypes.cxx | 54 ++++++++++++++++++------------------- basctl/source/basicide/brkdlg.cxx | 12 ++++----- basctl/source/basicide/iderdll.cxx | 7 +++-- 4 files changed, 41 insertions(+), 42 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 19ecab328f77..17c66a7cbe40 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 384566d3ad9e..461044c7d407 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 5ee425e6dc37..d8f2f5ebb070 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 1923141bd92c..c0669e8b5989 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 { public: - DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr(::com::sun::star::uno::Reference(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(::com::sun::star::uno::Reference(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 ) ) { -- cgit From 9c6c53db832c61d70e9364a5a47566fb445b1560 Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Sun, 7 Oct 2012 16:44:11 -0300 Subject: ::rtl::OUString to OUString in basctl Change-Id: If6a53fd69f8a99bafc7fc324911132dd51e67266 --- basctl/source/basicide/linenumberwindow.cxx | 6 +- basctl/source/basicide/localizationmgr.cxx | 228 ++++++++++++++-------------- 2 files changed, 117 insertions(+), 117 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 56445830d8ac..6e8107521403 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 62004ad27859..996767f34e2b 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 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 ); -- cgit From 7b34748b1bfd8b5fe0406c1f6bdaaa585d7bc4c3 Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Sun, 7 Oct 2012 17:31:09 -0300 Subject: Some OUString and RTL_CONST refactoring Change-Id: I27709f12ef6e3448ed457bd0e9f2056979ba0291 --- basctl/source/basicide/brkdlg.cxx | 4 +- basctl/source/basicide/macrodlg.cxx | 10 +-- basctl/source/basicide/moduldl2.cxx | 172 ++++++++++++++++++------------------ 3 files changed, 92 insertions(+), 94 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index d8f2f5ebb070..9be73f16ef33 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 4feb8ffefac5..9bc56e994098 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 5de042e9262f..931e727c6f64 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(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 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 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 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 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 > 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 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 >( &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(); -- cgit From ac7acb0ab1329913b0cec79790adcde0263960be Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 11 Oct 2012 16:13:12 -0400 Subject: Merged SvTreeListBox and SvLBox. There is no reason to keep SvLBox separate. Change-Id: I0b34aa8f8ca539d4f4f0f9cea9fa9b8faec241e8 --- basctl/source/basicide/bastype2.hxx | 2 +- basctl/source/basicide/moduldl2.cxx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx index b718ce2df6de..1c0de301f33f 100644 --- a/basctl/source/basicide/bastype2.hxx +++ b/basctl/source/basicide/bastype2.hxx @@ -24,7 +24,7 @@ #include #include "tools/solar.h" -#include +#include #include #include #include diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 931e727c6f64..4986ad2dad37 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -121,12 +122,12 @@ public: LibLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) : SvLBoxString( pEntry, nFlags, rTxt ) {} - virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); + virtual void Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry ); }; //---------------------------------------------------------------------------- -void LibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) +void LibLBoxString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) { // Change text color if library is read only: bool bReadOnly = false; @@ -1445,7 +1446,7 @@ void LibPage::DeleteCurrent() if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) xDlgLibContainer->removeLibrary( aOULibName ); - static_cast(aLibBox).GetModel()->Remove( pCurEntry ); + static_cast(aLibBox).GetModel()->Remove( pCurEntry ); MarkDocumentModified( m_aCurDocument ); } } -- cgit From ceb06a8f0906dd9bd7aa69b121a050eb4dcc861e Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Wed, 10 Oct 2012 12:06:14 -0300 Subject: 766 gerrit patch, fix appendAscii in bastype2.cxx Change-Id: I4409d1b0585a8c52cba14d1e67ccf776c6070c8a Reviewed-on: https://gerrit.libreoffice.org/854 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- basctl/source/basicide/bastype2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index db208138ed90..8ef1a92fe785 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -480,7 +480,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn ModuleInfoHelper::getObjectName( xLib, aModName, sObjName ); if( !sObjName.isEmpty() ) { - aEntryNameBuf.appendAscii( " (" ); + aEntryNameBuf.append( " (" ); aEntryNameBuf.append(sObjName); aEntryNameBuf.append(')'); } -- cgit From f50f9c43414403aca721612fdba9a9aa2dbdbf9b Mon Sep 17 00:00:00 2001 From: Ricardo Montania Date: Tue, 9 Oct 2012 17:30:01 -0300 Subject: Review corrections in basctl/.../basobj3.cxx Change-Id: I905e85ce9d754047ad287c9dd3caa92427b25b0d --- basctl/source/basicide/basobj3.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 6a726662f08c..8ab1add87ef0 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -83,20 +83,20 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName ) if ( pModule->GetMethods()->Find( rMacroName, SbxCLASS_METHOD ) ) return 0; - String aMacroName( rMacroName ); - if ( aMacroName.Len() == 0 ) + OUString aMacroName( rMacroName ); + if ( aMacroName.getLength() == 0 ) { if ( !pModule->GetMethods()->Count() ) - aMacroName = String( "Main" ); + aMacroName = "Main" ; else { bool bValid = false; - String aStdMacroText( "Macro" ); + OUString aStdMacroText( "Macro" ); sal_uInt16 nMacro = 1; while ( !bValid ) { aMacroName = aStdMacroText; - aMacroName += String::CreateFromInt32( nMacro ); + aMacroName += OUString::valueOf( nMacro ); // test whether existing... bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? false : true; nMacro++; -- cgit From 08ec85d064107d8186b2ca3a05af63fad6d27cdb Mon Sep 17 00:00:00 2001 From: Ivan Timofeev Date: Sat, 13 Oct 2012 13:53:07 +0400 Subject: fix String->OUString conversion Change-Id: Icc21b8998f205b635a21275ea4355824eca83a60 --- basctl/source/basicide/basobj3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index 8ab1add87ef0..7850b9597a68 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -92,7 +92,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName ) { bool bValid = false; OUString aStdMacroText( "Macro" ); - sal_uInt16 nMacro = 1; + sal_Int32 nMacro = 1; while ( !bValid ) { aMacroName = aStdMacroText; -- cgit