diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2010-11-12 08:47:15 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-12 08:47:15 +0100 |
commit | 93b5940b98665738da063756529385f35f1d33e6 (patch) | |
tree | 286436a37fb9dd5bcf8a7116da2d2fa5e11a1bd0 /sc/source | |
parent | 65c8902e30031f3588b4be55802cab52fce1961d (diff) |
RTL_CONSTASCII_USTRINGPARAM for calc_ui
Diffstat (limited to 'sc/source')
34 files changed, 137 insertions, 146 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index b4948460be42..ce7e7d4de919 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -173,7 +173,7 @@ Reference<XAccessibleStateSet> ScAccessibleFilterMenu::getAccessibleStateSet() OUString ScAccessibleFilterMenu::getImplementationName() throw (RuntimeException) { - return OUString::createFromAscii("ScAccessibleFilterMenu"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("ScAccessibleFilterMenu")); } // XAccessibleEventBroadcaster diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx index 1c70ee6ba5c5..bff9ad5bd88e 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenuItem.cxx @@ -90,7 +90,7 @@ Reference<XAccessibleStateSet> ScAccessibleFilterMenuItem::getAccessibleStateSet OUString ScAccessibleFilterMenuItem::getImplementationName() throw (RuntimeException) { - return OUString::createFromAscii("ScAccessibleFilterMenuItem"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("ScAccessibleFilterMenuItem")); } // XAccessibleAction @@ -110,7 +110,7 @@ sal_Bool ScAccessibleFilterMenuItem::doAccessibleAction(sal_Int32 /*nIndex*/) OUString ScAccessibleFilterMenuItem::getAccessibleActionDescription(sal_Int32 /*nIndex*/) throw (IndexOutOfBoundsException, RuntimeException) { - return OUString::createFromAscii("click"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("click")); } Reference<XAccessibleKeyBinding> ScAccessibleFilterMenuItem::getAccessibleActionKeyBinding( diff --git a/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx b/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx index fb649eba5f4f..4e28e8bbb7cf 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterTopWindow.cxx @@ -97,7 +97,7 @@ Reference<XAccessible> ScAccessibleFilterTopWindow::getAccessibleChild( OUString ScAccessibleFilterTopWindow::getImplementationName() throw (RuntimeException) { - return OUString::createFromAscii("ScAccessibleFilterTopWindow"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("ScAccessibleFilterTopWindow")); } void ScAccessibleFilterTopWindow::setAccessibleChild( diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index cba682688f1f..0c83daa50669 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -160,9 +160,9 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - rtl::OUString sPropButtonType = rtl::OUString::createFromAscii( "ButtonType" ); - rtl::OUString sPropTargetURL = rtl::OUString::createFromAscii( "TargetURL" ); - rtl::OUString sPropLabel = rtl::OUString::createFromAscii( "Label" ); + rtl::OUString sPropButtonType(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )); + rtl::OUString sPropTargetURL(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )); + rtl::OUString sPropLabel(RTL_CONSTASCII_USTRINGPARAM( "Label" )); if(xInfo->hasPropertyByName( sPropButtonType )) { @@ -540,7 +540,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse try { uno::Sequence < beans::PropertyValue > aSeq; - ::rtl::OUString aDummyName = ::rtl::OUString::createFromAscii("Dummy"); + ::rtl::OUString aDummyName(RTL_CONSTASCII_USTRINGPARAM("Dummy")); xPers->storeToEntry( xWorkStore, aDummyName, aSeq, aSeq ); if ( xWorkStore->isStreamElement( aDummyName ) ) { diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 10ba4b66f2b5..d7a47f74d8eb 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -152,7 +152,7 @@ void ScDLL::Init() ScModule* pMod = new ScModule( &ScDocShell::Factory() ); (*ppShlPtr) = pMod; - ScDocShell::Factory().SetDocumentServiceName( rtl::OUString::createFromAscii( "com.sun.star.sheet.SpreadsheetDocument" ) ); + ScDocShell::Factory().SetDocumentServiceName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" )) ); ScGlobal::Init(); // erst wenn der ResManager initialisiert ist // erst nach ScGlobal::Init duerfen die App-Optionen diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 66b9fade4d8f..08776bc2b3b6 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -628,7 +628,7 @@ void ScModule::Execute( SfxRequest& rReq ) { try { - com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString::createFromAscii("com.sun.star.comp.ui.XSLTFilterDialog")), com::sun::star::uno::UNO_QUERY); + com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XExecutableDialog > xDialog(::comphelper::getProcessServiceFactory()->createInstance(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.ui.XSLTFilterDialog"))), com::sun::star::uno::UNO_QUERY); if( xDialog.is() ) { xDialog->execute(); diff --git a/sc/source/ui/app/scmod2.cxx b/sc/source/ui/app/scmod2.cxx index 246d204038ae..d21255806fc4 100644 --- a/sc/source/ui/app/scmod2.cxx +++ b/sc/source/ui/app/scmod2.cxx @@ -76,7 +76,7 @@ void ScModule::SetAutoSpellProperty( BOOL bSet ) uno::Any aAny; aAny <<= bSet; - aConfig.SetProperty( rtl::OUString::createFromAscii( LINGUPROP_AUTOSPELL ), aAny ); + aConfig.SetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( LINGUPROP_AUTOSPELL )), aAny ); } diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 1866008f6782..eb6b662c5c75 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -70,7 +70,7 @@ BOOL lcl_IsURLButton( SdrObject* pObject ) uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - rtl::OUString sPropButtonType = rtl::OUString::createFromAscii( "ButtonType" ); + rtl::OUString sPropButtonType(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )); if(xInfo->hasPropertyByName( sPropButtonType )) { uno::Any aAny = xPropSet->getPropertyValue( sPropButtonType ); diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 84d5ad6bee1b..2dd2ebc21faf 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -61,9 +61,9 @@ static void load_FixedWidthList(ScCsvSplits &aSplits) const Any *pProperties; Sequence<OUString> aNames(1); OUString* pNames = aNames.getArray(); - ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) ); + ScLinkConfigItem aItem( OUString(RTL_CONSTASCII_USTRINGPARAM( SEP_PATH )) ); - pNames[0] = OUString::createFromAscii( FIXED_WIDTH_LIST ); + pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FIXED_WIDTH_LIST )); aValues = aItem.GetProperties( aNames ); pProperties = aValues.getConstArray(); @@ -96,9 +96,9 @@ static void save_FixedWidthList(ScCsvSplits aSplits) Any *pProperties; Sequence<OUString> aNames(1); OUString* pNames = aNames.getArray(); - ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) ); + ScLinkConfigItem aItem( OUString(RTL_CONSTASCII_USTRINGPARAM( SEP_PATH )) ); - pNames[0] = OUString::createFromAscii( FIXED_WIDTH_LIST ); + pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FIXED_WIDTH_LIST )); aValues = aItem.GetProperties( aNames ); pProperties = aValues.getArray(); pProperties[0] <<= sFixedWidthLists; diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index ab2159af2f93..1be379894444 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -91,7 +91,7 @@ ScDataPilotDatabaseDlg::ScDataPilotDatabaseDlg( Window* pParent ) : uno::Reference<container::XNameAccess> xContext( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii( DP_SERVICE_DBCONTEXT ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( DP_SERVICE_DBCONTEXT )) ), uno::UNO_QUERY); if (xContext.is()) { @@ -166,7 +166,7 @@ void ScDataPilotDatabaseDlg::FillObjects() uno::Reference<container::XNameAccess> xContext( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii( DP_SERVICE_DBCONTEXT ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( DP_SERVICE_DBCONTEXT )) ), uno::UNO_QUERY); if ( !xContext.is() ) return; @@ -177,7 +177,7 @@ void ScDataPilotDatabaseDlg::FillObjects() uno::Reference<task::XInteractionHandler> xHandler( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_INTHANDLER ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ), uno::UNO_QUERY); uno::Reference<sdbc::XConnection> xConnection = xSource->connectWithCompletion( xHandler ); diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 67817a140af2..9da5ef51d62a 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -127,17 +127,17 @@ static void load_Separators( OUString &sFieldSeparators, OUString &sTextSeparato const Any *pProperties; Sequence<OUString> aNames(9); OUString* pNames = aNames.getArray(); - ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) ); - - pNames[0] = OUString::createFromAscii( MERGE_DELIMITERS ); - pNames[1] = OUString::createFromAscii( SEPARATORS ); - pNames[2] = OUString::createFromAscii( TEXT_SEPARATORS ); - pNames[3] = OUString::createFromAscii( FIXED_WIDTH ); - pNames[4] = OUString::createFromAscii( FROM_ROW ); - pNames[5] = OUString::createFromAscii( CHAR_SET ); - pNames[6] = OUString::createFromAscii( QUOTED_AS_TEXT ); - pNames[7] = OUString::createFromAscii( DETECT_SPECIAL_NUM ); - pNames[8] = OUString::createFromAscii( LANGUAGE ); + ScLinkConfigItem aItem( OUString(RTL_CONSTASCII_USTRINGPARAM( SEP_PATH )) ); + + pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( MERGE_DELIMITERS )); + pNames[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATORS )); + pNames[2] = OUString(RTL_CONSTASCII_USTRINGPARAM( TEXT_SEPARATORS )); + pNames[3] = OUString(RTL_CONSTASCII_USTRINGPARAM( FIXED_WIDTH )); + pNames[4] = OUString(RTL_CONSTASCII_USTRINGPARAM( FROM_ROW )); + pNames[5] = OUString(RTL_CONSTASCII_USTRINGPARAM( CHAR_SET )); + pNames[6] = OUString(RTL_CONSTASCII_USTRINGPARAM( QUOTED_AS_TEXT )); + pNames[7] = OUString(RTL_CONSTASCII_USTRINGPARAM( DETECT_SPECIAL_NUM )); + pNames[8] = OUString(RTL_CONSTASCII_USTRINGPARAM( LANGUAGE )); aValues = aItem.GetProperties( aNames ); pProperties = aValues.getConstArray(); if( pProperties[1].hasValue() ) @@ -178,17 +178,17 @@ static void save_Separators( Any *pProperties; Sequence<OUString> aNames(9); OUString* pNames = aNames.getArray(); - ScLinkConfigItem aItem( OUString::createFromAscii( SEP_PATH ) ); - - pNames[0] = OUString::createFromAscii( MERGE_DELIMITERS ); - pNames[1] = OUString::createFromAscii( SEPARATORS ); - pNames[2] = OUString::createFromAscii( TEXT_SEPARATORS ); - pNames[3] = OUString::createFromAscii( FIXED_WIDTH ); - pNames[4] = OUString::createFromAscii( FROM_ROW ); - pNames[5] = OUString::createFromAscii( CHAR_SET ); - pNames[6] = OUString::createFromAscii( QUOTED_AS_TEXT ); - pNames[7] = OUString::createFromAscii( DETECT_SPECIAL_NUM ); - pNames[8] = OUString::createFromAscii( LANGUAGE ); + ScLinkConfigItem aItem( OUString(RTL_CONSTASCII_USTRINGPARAM( SEP_PATH )) ); + + pNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( MERGE_DELIMITERS )); + pNames[1] = OUString(RTL_CONSTASCII_USTRINGPARAM( SEPARATORS )); + pNames[2] = OUString(RTL_CONSTASCII_USTRINGPARAM( TEXT_SEPARATORS )); + pNames[3] = OUString(RTL_CONSTASCII_USTRINGPARAM( FIXED_WIDTH )); + pNames[4] = OUString(RTL_CONSTASCII_USTRINGPARAM( FROM_ROW )); + pNames[5] = OUString(RTL_CONSTASCII_USTRINGPARAM( CHAR_SET )); + pNames[6] = OUString(RTL_CONSTASCII_USTRINGPARAM( QUOTED_AS_TEXT )); + pNames[7] = OUString(RTL_CONSTASCII_USTRINGPARAM( DETECT_SPECIAL_NUM )); + pNames[8] = OUString(RTL_CONSTASCII_USTRINGPARAM( LANGUAGE )); aValues = aItem.GetProperties( aNames ); pProperties = aValues.getArray(); pProperties[1] <<= sFieldSeparators; diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index 0fbbe991e327..42b625f135af 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -55,9 +55,9 @@ ScSortDlg::ScSortDlg( Window* pParent, AddTabPage( TP_FIELDS, ScTabPageSortFields::Create, 0 ); AddTabPage( TP_OPTIONS, ScTabPageSortOptions::Create, 0 ); #else - String fields = rtl::OUString::createFromAscii ("fields"); + String fields = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("fields")); AddTabPage( TP_FIELDS, fields, ScTabPageSortFields::Create, 0, FALSE, TAB_APPEND); - String options = rtl::OUString::createFromAscii ("options"); + String options = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("options")); AddTabPage( TP_OPTIONS, options, ScTabPageSortOptions::Create, 0, FALSE, TAB_APPEND); #endif FreeResource(); diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx index 8400f1ad8b6f..3524c8788e0c 100644 --- a/sc/source/ui/docshell/dbdocimp.cxx +++ b/sc/source/ui/docshell/dbdocimp.cxx @@ -92,7 +92,7 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram uno::Reference<frame::XDispatchProvider> xDP(xFrame, uno::UNO_QUERY); uno::Reference<frame::XFrame> xBeamerFrame = xFrame->findFrame( - rtl::OUString::createFromAscii("_beamer"), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_beamer")), frame::FrameSearchFlag::CHILDREN); if (xBeamerFrame.is()) { @@ -290,7 +290,7 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, bDispose = sal_True; xRowSet = uno::Reference<sdbc::XRowSet>( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_ROWSET ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); DBG_ASSERT( xRowProp.is(), "can't get RowSet" ); @@ -307,22 +307,22 @@ BOOL ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam, aAny <<= rtl::OUString( rParam.aDBName ); xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_DATASOURCENAME), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_DATASOURCENAME)), aAny ); aAny <<= rtl::OUString( rParam.aStatement ); xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMAND), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny ); aAny <<= nType; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMANDTYPE), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMANDTYPE)), aAny ); uno::Reference<sdb::XCompletedExecution> xExecute( xRowSet, uno::UNO_QUERY ); if ( xExecute.is() ) { uno::Reference<task::XInteractionHandler> xHandler( comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_INTHANDLER ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ), uno::UNO_QUERY); xExecute->executeWithCompletion( xHandler ); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index d7c8857e8518..b83d809b96cd 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2681,7 +2681,7 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String nNum = 1; } while( xLib->hasByName( genModuleName ) ) - genModuleName = rtl::OUString::createFromAscii( "Sheet" ) + rtl::OUString::valueOf( ++nNum ); + genModuleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Sheet")) + rtl::OUString::valueOf( ++nNum ); uno::Any aSourceAny; rtl::OUString sTmpSource = sSource; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index a777de7888e2..4169c3fb187a 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -725,7 +725,7 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : NULL ); uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : 0 ); uno::Reference< sheet::XSpreadsheetView > xSpreadsheetView( xController, uno::UNO_QUERY_THROW ); - aArgsForJob[0] = beans::NamedValue( ::rtl::OUString::createFromAscii( "SpreadsheetView" ), + aArgsForJob[0] = beans::NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "SpreadsheetView" )), uno::makeAny( xSpreadsheetView ) ); xJob->execute( aArgsForJob ); } @@ -854,14 +854,14 @@ void __EXPORT ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) uno::Reference< frame::XStorable > xStor( GetModel(), uno::UNO_QUERY_THROW ); // TODO/LATER: More entries from the MediaDescriptor might be interesting for the merge uno::Sequence< beans::PropertyValue > aValues(1); - aValues[0].Name = ::rtl::OUString::createFromAscii( "FilterName" ); + aValues[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName")); aValues[0].Value <<= ::rtl::OUString( GetMedium()->GetFilter()->GetFilterName() ); SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False); if ( pPasswordItem && pPasswordItem->GetValue().Len() ) { aValues.realloc( 2 ); - aValues[1].Name = ::rtl::OUString::createFromAscii( "Password" ); + aValues[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Password") ); aValues[1].Value <<= ::rtl::OUString( pPasswordItem->GetValue() ); } @@ -2830,7 +2830,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgSupplier( xServiceManager->createInstance( - OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"))), UNO_QUERY); if (!xModuleCfgSupplier.is()) return; @@ -2838,7 +2838,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) // Grab the Calc configuration. Reference<XUIConfigurationManager> xConfigMgr = xModuleCfgSupplier->getUIConfigurationManager( - OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"))); if (!xConfigMgr.is()) return; @@ -2885,15 +2885,15 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType ) switch (eType) { case ScOptionsUtil::KEY_DEFAULT: - xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:ClearContents")); - xScAccel->setKeyEvent(aBackspace, OUString::createFromAscii(".uno:Delete")); - xScAccel->setKeyEvent(aCtrlD, OUString::createFromAscii(".uno:FillDown")); - xScAccel->setKeyEvent(aCtrlShiftD, OUString::createFromAscii(".uno:DataSelect")); + xScAccel->setKeyEvent(aDelete, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ClearContents"))); + xScAccel->setKeyEvent(aBackspace, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Delete"))); + xScAccel->setKeyEvent(aCtrlD, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FillDown"))); + xScAccel->setKeyEvent(aCtrlShiftD, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DataSelect"))); break; case ScOptionsUtil::KEY_OOO_LEGACY: - xScAccel->setKeyEvent(aDelete, OUString::createFromAscii(".uno:Delete")); - xScAccel->setKeyEvent(aBackspace, OUString::createFromAscii(".uno:ClearContents")); - xScAccel->setKeyEvent(aCtrlD, OUString::createFromAscii(".uno:DataSelect")); + xScAccel->setKeyEvent(aDelete, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Delete"))); + xScAccel->setKeyEvent(aBackspace, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:ClearContents"))); + xScAccel->setKeyEvent(aCtrlD, OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DataSelect"))); break; default: ; diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 6abc194aa105..bc1ef1a40cfa 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2678,7 +2678,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument() xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), uno::UNO_QUERY_THROW ); uno::Sequence < beans::PropertyValue > aArgs( 1 ); - aArgs[0].Name = ::rtl::OUString::createFromAscii( "Hidden" ); + aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" )); aArgs[0].Value <<= sal_True; if ( GetMedium() ) @@ -2687,7 +2687,7 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument() if ( pPasswordItem && pPasswordItem->GetValue().Len() ) { aArgs.realloc( 2 ); - aArgs[1].Name = ::rtl::OUString::createFromAscii( "Password" ); + aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Password" )); aArgs[1].Value <<= ::rtl::OUString( pPasswordItem->GetValue() ); } } diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 1e94a7f3b2e4..676ed8bc8e5f 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -131,7 +131,7 @@ namespace if (!xFactory.is()) return SCERR_EXPORT_CONNECT; _rDrvMgr.set( xFactory->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_DRVMAN ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_DRVMAN )) ), uno::UNO_QUERY); DBG_ASSERT( _rDrvMgr.is(), "can't get DriverManager" ); if (!_rDrvMgr.is()) return SCERR_EXPORT_CONNECT; @@ -160,9 +160,9 @@ namespace } uno::Sequence<beans::PropertyValue> aProps(2); - aProps[0].Name = rtl::OUString::createFromAscii(SC_DBPROP_EXTENSION); + aProps[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_EXTENSION)); aProps[0].Value <<= rtl::OUString( aExtension ); - aProps[1].Name = rtl::OUString::createFromAscii(SC_DBPROP_CHARSET); + aProps[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_CHARSET)); aProps[1].Value <<= aCharSetStr; _rConnection = _rDrvMgr->getConnectionWithInfo( aConnUrl, aProps ); @@ -192,7 +192,7 @@ BOOL ScDocShell::MoveFile( const INetURLObject& rSourceObj, const INetURLObject& ::ucbhelper::Content aDestPath( aDestPathObj.GetMainURL(INetURLObject::NO_DECODE), uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); uno::Reference< ::com::sun::star::ucb::XCommandInfo > xInfo = aDestPath.getCommands(); - rtl::OUString aTransferName = rtl::OUString::createFromAscii( "transfer" ); + rtl::OUString aTransferName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "transfer" )); if ( xInfo->hasCommandByName( aTransferName ) ) { aDestPath.executeCommand( aTransferName, uno::makeAny( @@ -225,7 +225,7 @@ BOOL ScDocShell::KillFile( const INetURLObject& rURL ) { ::ucbhelper::Content aCnt( rURL.GetMainURL(INetURLObject::NO_DECODE), uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); - aCnt.executeCommand( rtl::OUString::createFromAscii( "delete" ), + aCnt.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "delete" )), comphelper::makeBoolAny( sal_True ) ); } catch( uno::Exception& ) @@ -333,7 +333,7 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, ScProgress aProgress( this, ScGlobal::GetRscString( STR_LOAD_DOC ), nRowCount ); uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_ROWSET ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ), uno::UNO_QUERY); ::utl::DisposableComponent aRowSetHelper(xRowSet); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); @@ -345,19 +345,19 @@ ULONG ScDocShell::DBaseImport( const String& rFullFileName, CharSet eCharSet, aAny <<= xConnection; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_ACTIVECONNECTION), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_ACTIVECONNECTION)), aAny ); aAny <<= nType; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMANDTYPE), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMANDTYPE)), aAny ); aAny <<= rtl::OUString( aTabName ); xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMAND), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny ); aAny <<= sal_False; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_PROPCHANGE_NOTIFY), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_PROPCHANGE_NOTIFY)), aAny ); xRowSet->execute(); @@ -877,7 +877,7 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO if (!xTableDesc.is()) return SCERR_EXPORT_CONNECT; aAny <<= rtl::OUString( aTabName ); - xTableDesc->setPropertyValue( rtl::OUString::createFromAscii(SC_DBPROP_NAME), aAny ); + xTableDesc->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_NAME)), aAny ); // create columns @@ -910,31 +910,26 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO if (!xColumnDesc.is()) return SCERR_EXPORT_CONNECT; aAny <<= pColNames[nCol]; - xColumnDesc->setPropertyValue( rtl::OUString::createFromAscii(SC_DBPROP_NAME), aAny ); + xColumnDesc->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_NAME)), aAny ); aAny <<= pColTypes[nCol]; - xColumnDesc->setPropertyValue( rtl::OUString::createFromAscii(SC_DBPROP_TYPE), aAny ); + xColumnDesc->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_TYPE)), aAny ); aAny <<= pColLengths[nCol]; - xColumnDesc->setPropertyValue( rtl::OUString::createFromAscii(SC_DBPROP_PRECISION), aAny ); + xColumnDesc->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_PRECISION)), aAny ); aAny <<= pColScales[nCol]; - xColumnDesc->setPropertyValue( rtl::OUString::createFromAscii(SC_DBPROP_SCALE), aAny ); + xColumnDesc->setPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_SCALE)), aAny ); xColumnsAppend->appendByDescriptor( xColumnDesc ); } xTablesAppend->appendByDescriptor( xTableDesc ); - // re-open connection -// xConnection = xDrvMan->getConnectionWithInfo( aConnUrl, aProps ); -// DBG_ASSERT( xConnection.is(), "can't get Connection" ); -// if (!xConnection.is()) return SCERR_EXPORT_CONNECT; - // get row set for writing uno::Reference<lang::XMultiServiceFactory> xFactory = comphelper::getProcessServiceFactory(); uno::Reference<sdbc::XRowSet> xRowSet( xFactory->createInstance( - rtl::OUString::createFromAscii( SC_SERVICE_ROWSET ) ), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_ROWSET )) ), uno::UNO_QUERY); ::utl::DisposableComponent aRowSetHelper(xRowSet); uno::Reference<beans::XPropertySet> xRowProp( xRowSet, uno::UNO_QUERY ); @@ -943,15 +938,15 @@ ULONG ScDocShell::DBaseExport( const String& rFullFileName, CharSet eCharSet, BO aAny <<= xConnection; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_ACTIVECONNECTION), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_ACTIVECONNECTION)), aAny ); aAny <<= (sal_Int32) sdb::CommandType::TABLE; xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMANDTYPE), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMANDTYPE)), aAny ); aAny <<= rtl::OUString( aTabName ); xRowProp->setPropertyValue( - rtl::OUString::createFromAscii(SC_DBPROP_COMMAND), aAny ); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_DBPROP_COMMAND)), aAny ); xRowSet->execute(); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index c0fc2fbfa215..e1a9f3703914 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2131,7 +2131,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri { // Generate a relative file path. INetURLObject aBaseURL(getOwnDocumentName()); - aBaseURL.insertName(OUString::createFromAscii("content.xml")); + aBaseURL.insertName(OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml"))); String aStr = URIHelper::simpleNormalizedMakeRelative( aBaseURL.GetMainURL(INetURLObject::NO_DECODE), aFile); @@ -2235,7 +2235,7 @@ void ScExternalRefManager::SrcFileData::maybeCreateRealFileName(const String& rO // Formulate the absolute file path from the relative path. const String& rRelPath = maRelativeName; INetURLObject aBaseURL(rOwnDocName); - aBaseURL.insertName(OUString::createFromAscii("content.xml")); + aBaseURL.insertName(OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml"))); bool bWasAbs = false; maRealFileName = aBaseURL.smartRel2Abs(rRelPath, bWasAbs).GetMainURL(INetURLObject::NO_DECODE); } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 1e85d17bd741..7dba164ed5bb 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2058,7 +2058,7 @@ ScFormatFilterPlugin &ScFormatFilter::Get() if ( aModule.loadRelative( &thisModule, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "scfilt" ) ) ) ) ) { - oslGenericFunction fn = aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( "ScFilterCreate" ) ); + oslGenericFunction fn = aModule.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ScFilterCreate" )) ); if (fn != NULL) plugin = reinterpret_cast<FilterFn>(fn)(); } diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index 23270038e419..6db7faf051a5 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -108,10 +108,10 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - rtl::OUString sPropButtonType = rtl::OUString::createFromAscii( "ButtonType" ); - rtl::OUString sPropTargetURL = rtl::OUString::createFromAscii( "TargetURL" ); - rtl::OUString sPropTargetFrame = rtl::OUString::createFromAscii( "TargetFrame" ); - rtl::OUString sPropLabel = rtl::OUString::createFromAscii( "Label" ); + rtl::OUString sPropButtonType(RTL_CONSTASCII_USTRINGPARAM( "ButtonType" )); + rtl::OUString sPropTargetURL(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )); + rtl::OUString sPropTargetFrame(RTL_CONSTASCII_USTRINGPARAM( "TargetFrame" )); + rtl::OUString sPropLabel(RTL_CONSTASCII_USTRINGPARAM( "Label" )); if(xInfo->hasPropertyByName( sPropButtonType )) { @@ -195,20 +195,16 @@ void ScDrawShell::ExecuteHLink( SfxRequest& rReq ) uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); uno::Reference< beans::XPropertySetInfo > xInfo = xPropSet->getPropertySetInfo(); - rtl::OUString sPropTargetURL = - rtl::OUString::createFromAscii( "TargetURL" ); + rtl::OUString sPropTargetURL(RTL_CONSTASCII_USTRINGPARAM( "TargetURL" )); // Darf man eine URL an dem Objekt setzen? if (xInfo->hasPropertyByName( sPropTargetURL )) { // Ja! - rtl::OUString sPropButtonType = - rtl::OUString::createFromAscii( "ButtonType" ); - rtl::OUString sPropTargetFrame = - rtl::OUString::createFromAscii( "TargetFrame" ); - rtl::OUString sPropLabel = - rtl::OUString::createFromAscii( "Label" ); + rtl::OUString sPropButtonType(RTL_CONSTASCII_USTRINGPARAM( "ButtonType") ); + rtl::OUString sPropTargetFrame(RTL_CONSTASCII_USTRINGPARAM( "TargetFrame" )); + rtl::OUString sPropLabel(RTL_CONSTASCII_USTRINGPARAM( "Label" )); uno::Any aAny; if ( xInfo->hasPropertyByName( sPropLabel ) ) diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 89a483d736d5..c45ae623912d 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -193,16 +193,16 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie uno::Sequence< beans::PropertyValue > aArgs( 4 ); aArgs[0] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("CellRangeRepresentation"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellRangeRepresentation")), -1, uno::makeAny( aRangeString ), beans::PropertyState_DIRECT_VALUE ); aArgs[1] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("HasCategories"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasCategories")), -1, uno::makeAny( bHasCategories ), beans::PropertyState_DIRECT_VALUE ); aArgs[2] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("FirstCellAsLabel"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstCellAsLabel")), -1, uno::makeAny( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE ); aArgs[3] = beans::PropertyValue( - ::rtl::OUString::createFromAscii("DataRowSource"), -1, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataRowSource")), -1, uno::makeAny( eDataRowSource ), beans::PropertyState_DIRECT_VALUE ); xReceiver->setArguments( aArgs ); @@ -312,7 +312,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* pVie uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY ); if ( xSet.is() ) { - xSet->setPropertyValue( ::rtl::OUString::createFromAscii("PluginURL"), + xSet->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PluginURL")), uno::makeAny( ::rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) ); } } @@ -716,7 +716,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* { uno::Reference< ui::dialogs::XExecutableDialog > xDialog( xMCF->createInstanceWithContext( - rtl::OUString::createFromAscii("com.sun.star.comp.chart2.WizardDialog") + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.WizardDialog")) , xContext), uno::UNO_QUERY); uno::Reference< lang::XInitialization > xInit( xDialog, uno::UNO_QUERY ); if( xChartModel.is() && xInit.is() ) @@ -726,10 +726,10 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* uno::Sequence<uno::Any> aSeq(2); uno::Any* pArray = aSeq.getArray(); beans::PropertyValue aParam1; - aParam1.Name = rtl::OUString::createFromAscii("ParentWindow"); + aParam1.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")); aParam1.Value <<= uno::makeAny(xDialogParentWindow); beans::PropertyValue aParam2; - aParam2.Name = rtl::OUString::createFromAscii("ChartModel"); + aParam2.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ChartModel")); aParam2.Value <<= uno::makeAny(xChartModel); pArray[0] <<= uno::makeAny(aParam1); pArray[1] <<= uno::makeAny(aParam2); @@ -743,7 +743,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* { //get dialog size: awt::Size aDialogAWTSize; - if( xDialogProps->getPropertyValue( ::rtl::OUString::createFromAscii("Size") ) + if( xDialogProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ) >>= aDialogAWTSize ) { Size aDialogSize( aDialogAWTSize.Width, aDialogAWTSize.Height ); @@ -751,12 +751,12 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* { //calculate and set new position Point aDialogPos = pViewShell->GetChartDialogPos( aDialogSize, aRect ); - xDialogProps->setPropertyValue( ::rtl::OUString::createFromAscii("Position"), + xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Position")), uno::makeAny( awt::Point(aDialogPos.getX(),aDialogPos.getY()) ) ); } } //tell the dialog to unlock controller - xDialogProps->setPropertyValue( ::rtl::OUString::createFromAscii("UnlockControllersOnExecute"), + xDialogProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UnlockControllersOnExecute")), uno::makeAny( sal_True ) ); } diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index 1fdf75eabc2f..27bce1f384e5 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -220,7 +220,7 @@ BOOL __EXPORT FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { try { - aCaller = xProps->getPropertyValue( rtl::OUString::createFromAscii("Name") ); + aCaller = xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")) ); } catch( uno::Exception& ) {} } diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx index cf04d45250db..8d1e64c7f22e 100644 --- a/sc/source/ui/vba/testvba/testvba.cxx +++ b/sc/source/ui/vba/testvba/testvba.cxx @@ -45,7 +45,7 @@ using ::rtl::OUString; using ::std::auto_ptr; -const OUString EXTN = rtl::OUString::createFromAscii(".xls"); +const OUString EXTN(RTL_CONSTASCII_USTRINGPARAM(".xls")); OUString convertToURL( const OUString& rPath ) { @@ -59,7 +59,7 @@ OUString convertToURL( const OUString& rPath ) { osl::FileBase::getFileURLFromSystemPath( rPath, aURL ); if ( aURL.equals( rPath ) ) - throw uno::RuntimeException( rtl::OUString::createFromAscii( "could'nt convert " ).concat( rPath ).concat( rtl::OUString::createFromAscii( " to a URL, is it a fully qualified path name? " ) ), Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "could'nt convert " )).concat( rPath ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " to a URL, is it a fully qualified path name? " )) ), Reference< uno::XInterface >() ); } return aURL; } @@ -98,15 +98,15 @@ public: const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) { - mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ), mxContext), uno::UNO_QUERY_THROW ); + mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )), mxContext), uno::UNO_QUERY_THROW ); } rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) { rtl::OUString sLogLocation; - Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW ); - pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation; - sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( rtl::OUString::createFromAscii( "HelperAPI-test.log" ) ); + Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PathSettings" )), mxContext), uno::UNO_QUERY_THROW ); + pathSettings->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Work" )) ) >>= sLogLocation; + sLogLocation = sLogLocation.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) ).concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "HelperAPI-test.log" )) ); return sLogLocation; } rtl::OUString getLogLocationWithName( OUString fileName ) throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) @@ -115,9 +115,9 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) printf("file name %s\n", rtl::OUStringToOString( fileName, RTL_TEXTENCODING_UTF8 ).getStr() ); //rtl::OUString sLogLocation( rtl::OUString::createFromAscii( getenv("HOME") ) ); rtl::OUString sLogLocation; - Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString::createFromAscii( "com.sun.star.comp.framework.PathSettings" ), mxContext), uno::UNO_QUERY_THROW ); - pathSettings->getPropertyValue( rtl::OUString::createFromAscii( "Work" ) ) >>= sLogLocation; - sLogLocation = sLogLocation.concat( rtl::OUString::createFromAscii( "/" ) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString::createFromAscii( ".log" ) ); + Reference< XPropertySet > pathSettings( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.framework.PathSettings" )), mxContext), uno::UNO_QUERY_THROW ); + pathSettings->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Work" )) ) >>= sLogLocation; + sLogLocation = sLogLocation.concat( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" )) ).concat( fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".log" )) ); return sLogLocation; } @@ -137,13 +137,13 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) printf( "processing %s\n", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); // Loading the wanted document Sequence< PropertyValue > propertyValues(1); - propertyValues[0].Name = rtl::OUString::createFromAscii( "Hidden" ); + propertyValues[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Hidden" )); propertyValues[0].Value <<= sal_False; rtl::OUString sfileUrl = convertToURL( sUrl ); printf( "try to get xDoc %s\n", rtl::OUStringToOString( sfileUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); Reference< uno::XInterface > xDoc = - mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString::createFromAscii( "_blank" ), 0, propertyValues); + mxCompLoader->loadComponentFromURL( sfileUrl, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_blank" )), 0, propertyValues); printf( "got xDoc\n" ); OUString logFileURL = convertToURL( getLogLocation() ); @@ -160,15 +160,15 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) Reference< script::provider::XScript > xScript; try { - xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.TestMacros.Main?language=Basic&location=document" )); + xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.TestMacros.Main?language=Basic&location=document") )); } catch ( uno::Exception& e ) { try { - xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.testMacro.Main?language=Basic&location=document" )); + xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.testMacro.Main?language=Basic&location=document" ))); } catch ( uno::Exception& e2 ) { - xScript = xProv->getScript( rtl::OUString::createFromAscii( "vnd.sun.star.script:VBAProject.testMain.Main?language=Basic&location=document" )); + xScript = xProv->getScript( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:VBAProject.testMain.Main?language=Basic&location=document" ))); } } OSL_TRACE("Got script for doc %s", rtl::OUStringToOString( sUrl, RTL_TEXTENCODING_UTF8 ).getStr() ); @@ -180,7 +180,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) xScript->invoke(aArgs, aOutArgsIndex, aOutArgs); OUString fileName = sUrl.copy ( sUrl.lastIndexOf( '/' ) ); - OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString::createFromAscii( ".log" ); + OUString newLocation = msOutDirPath + fileName.copy ( 0, fileName.lastIndexOf( EXTN ) ) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".log" )); try { printf("move log file\n"); @@ -240,7 +240,7 @@ mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) rtl::OUString sFileDirectoryURL = convertToURL( sFileDirectory ); if ( !mxSFA->isFolder( sFileDirectoryURL) ) { - throw lang::IllegalArgumentException( rtl::OUString::createFromAscii( "not a directory: ").concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 ); + throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "not a directory: ")).concat( sFileDirectoryURL ), Reference<uno::XInterface>(), 1 ); } // Getting all files and directories in the current directory Sequence<OUString> entries = mxSFA->getFolderContents( sFileDirectoryURL, sal_False ); diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index eac7083a797c..9005ffdf6069 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -73,7 +73,7 @@ ScVbaAxes::createAxis( const uno::Reference< excel::XChart >& xChart, const uno: { ScVbaChart* pChart = static_cast< ScVbaChart* >( xChart.get() ); if ( !pChart ) - throw uno::RuntimeException( rtl::OUString::createFromAscii( "Object failure, can't access chart implementation" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Object failure, can't access chart implementation" )), uno::Reference< uno::XInterface >() ); uno::Reference< beans::XPropertySet > xAxisPropertySet; if (((nType == xlCategory) || (nType == xlSeriesAxis) || (nType == xlValue))) @@ -169,7 +169,7 @@ ScVbaAxes::Item( const css::uno::Any& _nType, const css::uno::Any& _oAxisGroup) sal_Int32 nAxisGroup = xlPrimary; sal_Int32 nType = -1; if ( !_nType.hasValue() || ( ( _nType >>= nType ) == sal_False ) ) - throw uno::RuntimeException( rtl::OUString::createFromAscii( "Axes::Item Failed to extract type" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Axes::Item Failed to extract type" )), uno::Reference< uno::XInterface >() ); if ( _oAxisGroup.hasValue() ) _oAxisGroup >>= nAxisGroup ; diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index b8706b233462..0ca3fa9112f2 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -83,10 +83,10 @@ ScVbaChartObjects::getChartObjectNames() throw( css::script::BasicErrorException ScCellRangesBase* pUno= dynamic_cast< ScCellRangesBase* >( xIf.get() ); ScDocShell* pDocShell = NULL; if ( !pUno ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("Failed to obtain the impl class from the drawpage"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Failed to obtain the impl class from the drawpage")), uno::Reference< uno::XInterface >() ); pDocShell = pUno->GetDocShell(); if ( !pDocShell ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("Failed to obtain the docshell implclass"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Failed to obtain the docshell implclass")), uno::Reference< uno::XInterface >() ); uno::Reference< sheet::XSpreadsheetDocument > xSpreadsheetDocument( pDocShell->GetModel(), uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheets > xSpreadsheets = xSpreadsheetDocument->getSheets(); diff --git a/sc/source/ui/vba/vbafiledialog.cxx b/sc/source/ui/vba/vbafiledialog.cxx index 482e6ab2d5e1..b08f336f2af9 100644 --- a/sc/source/ui/vba/vbafiledialog.cxx +++ b/sc/source/ui/vba/vbafiledialog.cxx @@ -90,7 +90,7 @@ ScVbaFileDialog::Show( ) throw (::com::sun::star::uno::RuntimeException) { m_sSelectedItems.realloc(0); - const ::rtl::OUString sServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.FilePicker" ); + const ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" )); Reference< lang::XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory(), uno::UNO_QUERY ); // Set the type of File Picker Dialog: TemplateDescription::FILEOPEN_SIMPLE. diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 4dfaefcddda4..1c06e737bdd2 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -107,7 +107,7 @@ ScVbaMenuBars::Item( const uno::Any& aIndex, const uno::Any& /*aIndex2*/ ) throw if( nIndex == excel::XlSheetType::xlWorksheet ) { uno::Any aSource; - aSource <<= rtl::OUString::createFromAscii( "Worksheet Menu Bar" ); + aSource <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Worksheet Menu Bar" )); uno::Reference< XCommandBar > xCommandBar( m_xCommandBars->Item( aSource, uno::Any() ), uno::UNO_QUERY_THROW ); uno::Reference< excel::XMenuBar > xMenuBar( new ScVbaMenuBar( this, mxContext, xCommandBar ) ); return uno::makeAny( xMenuBar ); diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 71d42038f89b..4a1020aa8980 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -125,7 +125,7 @@ ScVbaName::getValue(const formula::FormulaGrammar::Grammar eGrammar) throw (css: } if ( sValue.indexOf('=') != 0 ) { - sValue = rtl::OUString::createFromAscii("=") + sValue; + sValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("=")) + sValue; } return sValue; } diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index bee4fbb58856..8379ebafcbc4 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -81,10 +81,10 @@ ScVbaNames::getScDocument() uno::Reference< frame::XModel > xModel( getModel() , uno::UNO_QUERY_THROW ); ScTabViewShell * pTabViewShell = excel::getBestViewShell( xModel ); if ( !pTabViewShell ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewShell available"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewShell available")), uno::Reference< uno::XInterface >() ); ScViewData* pViewData = pTabViewShell->GetViewData(); if ( !pViewData ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("No ViewData available"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No ViewData available")), uno::Reference< uno::XInterface >() ); return pViewData->GetDocument(); } @@ -156,7 +156,7 @@ ScVbaNames::Add( const css::uno::Any& Name , sResult = sName.copy( nIndex ); sName = sResult ; if ( !ScRangeData::IsNameValid( sName , getScDocument() ) ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("This Name is a invalid ."), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("This Name is a invalid .")), uno::Reference< uno::XInterface >() ); } } if ( RefersTo.hasValue() || RefersToR1C1.hasValue() || RefersToR1C1Local.hasValue() ) diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 46c60ac35e50..fe59cc5034f2 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -288,7 +288,7 @@ public: // XDefaultMethod ::rtl::OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException); // XDefaultProperty - ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString::createFromAscii("Value"); } + ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (css::uno::RuntimeException) { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); } // #TODO completely rewrite ScVbaRange, its become a hackfest diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index a31d348ff7c8..1f0c9183708a 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -273,7 +273,7 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P /* sal_Int32 nSheets = 0; sal_Int32 nPosition = 0; - throw uno::RuntimeException( rtl::OUString::createFromAscii("No Implemented" ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No Implemented" )), uno::Reference< uno::XInterface >() ); sal_Bool bSheets = ( Sheets >>= nSheets ); sal_Bool bPosition = ( Position >>= nPosition ); if ( bSheets || bPosition ) // at least one param specified diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index f7a3e6acb589..e5d0a09e33e7 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -78,7 +78,7 @@ public: m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XDesktop > xDesktop - (xSMgr->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop"), m_xContext), uno::UNO_QUERY_THROW ); + (xSMgr->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")), m_xContext), uno::UNO_QUERY_THROW ); uno::Reference< container::XEnumeration > mxComponents = xDesktop->getComponents()->createEnumeration(); while( mxComponents->hasMoreElements() ) { diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 67de260af9aa..e7b102c4d4bd 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -246,7 +246,7 @@ ScVbaWorkbooks::isSpreadSheetFile( const rtl::OUString& sType ) rtl::OUString ScVbaWorkbooks::getFileFilterType( const rtl::OUString& rFileName ) { - uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.document.TypeDetection"), mxContext), uno::UNO_QUERY_THROW ); + uno::Reference< document::XTypeDetection > xTypeDetect( mxContext->getServiceManager()->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")), mxContext), uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aMediaDesc(1); aMediaDesc[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ("URL" ) ); aMediaDesc[ 0 ].Value <<= rFileName; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 2c2df72120fa..d9f3ccc97b2e 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -2173,7 +2173,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet if (!xPropSet.is()) continue; - Any any = xPropSet->getPropertyValue( rtl::OUString::createFromAscii(SC_UNO_NUMBERFO) ); + Any any = xPropSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_NUMBERFO)) ); sal_Int32 nNumFmt = 0; if (!(any >>= nNumFmt)) continue; |