Kaydet (Commit) ed383ebf authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith Kaydeden (comit) Björn Michaelsen

remove RTL_CONSTASCII_(U)STRINGPARAM

Change-Id: Ica4dc859229c2ba0dc052a97ff23178895c25580
Reviewed-on: https://gerrit.libreoffice.org/2368Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
üst c064fa50
...@@ -197,7 +197,7 @@ namespace DOM ...@@ -197,7 +197,7 @@ namespace DOM
// dispatch DOM events to signal change in attribute value // dispatch DOM events to signal change in attribute value
// dispatch DomAttrModified + DOMSubtreeModified // dispatch DomAttrModified + DOMSubtreeModified
OUString sEventName( RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified") ); OUString sEventName( "DOMAttrModified" );
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(sEventName),UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent(sEventName),UNO_QUERY);
event->initMutationEvent( event->initMutationEvent(
......
...@@ -162,8 +162,8 @@ namespace DOM ...@@ -162,8 +162,8 @@ namespace DOM
// no MutexGuard needed: m_pElement is const // no MutexGuard needed: m_pElement is const
Reference< XAttr > const xAttr(m_pElement->getAttributeNode(name)); Reference< XAttr > const xAttr(m_pElement->getAttributeNode(name));
if (!xAttr.is()) { if (!xAttr.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM( throw DOMException(OUString(
"CAttributesMap::removeNamedItem: no such attribute")), "CAttributesMap::removeNamedItem: no such attribute"),
static_cast<OWeakObject*>(this), static_cast<OWeakObject*>(this),
DOMExceptionType_NOT_FOUND_ERR); DOMExceptionType_NOT_FOUND_ERR);
} }
...@@ -184,8 +184,8 @@ namespace DOM ...@@ -184,8 +184,8 @@ namespace DOM
Reference< XAttr > const xAttr( Reference< XAttr > const xAttr(
m_pElement->getAttributeNodeNS(namespaceURI, localName)); m_pElement->getAttributeNodeNS(namespaceURI, localName));
if (!xAttr.is()) { if (!xAttr.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM( throw DOMException(OUString(
"CAttributesMap::removeNamedItemNS: no such attribute")), "CAttributesMap::removeNamedItemNS: no such attribute"),
static_cast<OWeakObject*>(this), static_cast<OWeakObject*>(this),
DOMExceptionType_NOT_FOUND_ERR); DOMExceptionType_NOT_FOUND_ERR);
} }
...@@ -203,8 +203,8 @@ namespace DOM ...@@ -203,8 +203,8 @@ namespace DOM
{ {
Reference< XAttr > const xAttr(xNode, UNO_QUERY); Reference< XAttr > const xAttr(xNode, UNO_QUERY);
if (!xNode.is()) { if (!xNode.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM( throw DOMException(OUString(
"CAttributesMap::setNamedItem: XAttr argument expected")), "CAttributesMap::setNamedItem: XAttr argument expected"),
static_cast<OWeakObject*>(this), static_cast<OWeakObject*>(this),
DOMExceptionType_HIERARCHY_REQUEST_ERR); DOMExceptionType_HIERARCHY_REQUEST_ERR);
} }
...@@ -223,8 +223,8 @@ namespace DOM ...@@ -223,8 +223,8 @@ namespace DOM
{ {
Reference< XAttr > const xAttr(xNode, UNO_QUERY); Reference< XAttr > const xAttr(xNode, UNO_QUERY);
if (!xNode.is()) { if (!xNode.is()) {
throw DOMException(OUString(RTL_CONSTASCII_USTRINGPARAM( throw DOMException(OUString(
"CAttributesMap::setNamedItemNS: XAttr argument expected")), "CAttributesMap::setNamedItemNS: XAttr argument expected"),
static_cast<OWeakObject*>(this), static_cast<OWeakObject*>(this),
DOMExceptionType_HIERARCHY_REQUEST_ERR); DOMExceptionType_HIERARCHY_REQUEST_ERR);
} }
......
...@@ -137,8 +137,7 @@ private: ...@@ -137,8 +137,7 @@ private:
throw; throw;
} catch (::css::uno::Exception &) { } catch (::css::uno::Exception &) {
throw ::css::uno::RuntimeException( throw ::css::uno::RuntimeException(
::rtl::OUString( ::rtl::OUString("error creating instance"),
RTL_CONSTASCII_USTRINGPARAM("error creating instance")),
static_cast< ::cppu::OWeakObject * >(this)); static_cast< ::cppu::OWeakObject * >(this));
} }
if (!instance.is()) { if (!instance.is()) {
...@@ -152,18 +151,18 @@ private: ...@@ -152,18 +151,18 @@ private:
for (::std::size_t i = 0; i < SAL_N_ELEMENTS(singletons); ++i) for (::std::size_t i = 0; i < SAL_N_ELEMENTS(singletons); ++i)
{ {
::rtl::OUStringBuffer b; ::rtl::OUStringBuffer b;
b.appendAscii(RTL_CONSTASCII_STRINGPARAM("/singletons/")); b.append("/singletons/");
b.appendAscii(singletons[i]); b.append(singletons[i]);
::css::uno::Reference< ::css::uno::XInterface > instance( ::css::uno::Reference< ::css::uno::XInterface > instance(
context_->getValueByName(b.makeStringAndClear()), context_->getValueByName(b.makeStringAndClear()),
::css::uno::UNO_QUERY_THROW); ::css::uno::UNO_QUERY_THROW);
} }
test( test(
::test::types::CppTest::create(context_), ::test::types::CppTest::create(context_),
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test.types.CppTest"))); ::rtl::OUString("test.types.CppTest"));
test( test(
::test::types::JavaTest::create(context_), ::test::types::JavaTest::create(context_),
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test.types.JavaTest"))); ::rtl::OUString("test.types.JavaTest"));
return 0; return 0;
} }
...@@ -180,8 +179,7 @@ void Service::test( ...@@ -180,8 +179,7 @@ void Service::test(
if (!ok) { if (!ok) {
throw ::css::uno::RuntimeException( throw ::css::uno::RuntimeException(
(name (name
+ ::rtl::OUString( + ::rtl::OUString(".throwException failed")),
RTL_CONSTASCII_USTRINGPARAM(".throwException failed"))),
static_cast< ::cppu::OWeakObject * >(this)); static_cast< ::cppu::OWeakObject * >(this));
} }
} }
...@@ -196,14 +194,13 @@ namespace CppMain { ...@@ -196,14 +194,13 @@ namespace CppMain {
return static_cast< ::cppu::OWeakObject * >(new Service(context)); return static_cast< ::cppu::OWeakObject * >(new Service(context));
} catch (::std::bad_alloc &) { } catch (::std::bad_alloc &) {
throw ::css::uno::RuntimeException( throw ::css::uno::RuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("std::bad_alloc")), ::rtl::OUString("std::bad_alloc"),
::css::uno::Reference< ::css::uno::XInterface >()); ::css::uno::Reference< ::css::uno::XInterface >());
} }
} }
::rtl::OUString getImplementationName() { OUString getImplementationName() {
return ::rtl::OUString( return OUString("test.cpp.cppmain.Component");
RTL_CONSTASCII_USTRINGPARAM("test.cpp.cppmain.Component"));
} }
::css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames() { ::css::uno::Sequence< ::rtl::OUString > getSupportedServiceNames() {
......
...@@ -300,48 +300,48 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St ...@@ -300,48 +300,48 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
uno::Reference< awt::XControlModel > xNewModel; uno::Reference< awt::XControlModel > xNewModel;
bool bFontSupport = false; bool bFontSupport = false;
bool bNativeAX = false; bool bNativeAX = false;
if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CommandButton.1" ) ) ) if( aComServiceName.equalsIgnoreAsciiCase( "Forms.CommandButton.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 72.0; fDefHeight = 24.0; fDefWidth = 72.0; fDefHeight = 24.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Label.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.Label.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlFixedTextModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlFixedTextModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 72.0; fDefHeight = 18.0; fDefWidth = 72.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Image.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.Image.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlImageControlModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlImageControlModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 72.0; fDefHeight = 72.0; fDefWidth = 72.0; fDefHeight = 72.0;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.CheckBox.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.CheckBox.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlCheckBoxModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlCheckBoxModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 108.0; fDefHeight = 18.0; fDefWidth = 108.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.OptionButton.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.OptionButton.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlRadioButtonModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 108.0; fDefHeight = 18.0; fDefWidth = 108.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.TextBox.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.TextBox.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlEditModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlEditModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 72.0; fDefHeight = 18.0; fDefWidth = 72.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ListBox.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.ListBox.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlListBoxModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlListBoxModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 72.0; fDefHeight = 18.0; fDefWidth = 72.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ComboBox.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.ComboBox.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlComboBoxModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlComboBoxModel" ), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW );
...@@ -349,7 +349,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St ...@@ -349,7 +349,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
fDefWidth = 72.0; fDefHeight = 18.0; fDefWidth = 72.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ToggleButton.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.ToggleButton.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlButtonModel" ), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xNewModel, uno::UNO_QUERY_THROW );
...@@ -357,18 +357,18 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St ...@@ -357,18 +357,18 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
fDefWidth = 72.0; fDefHeight = 18.0; fDefWidth = 72.0; fDefHeight = 18.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.Frame.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.Frame.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlGroupBoxModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlGroupBoxModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 216.0; fDefHeight = 144.0; fDefWidth = 216.0; fDefHeight = 144.0;
bFontSupport = true; bFontSupport = true;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.SpinButton.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.SpinButton.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlSpinButtonModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlSpinButtonModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 12.75; fDefHeight = 25.5; fDefWidth = 12.75; fDefHeight = 25.5;
} }
else if( aComServiceName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Forms.ScrollBar.1" ) ) ) else if( aComServiceName.equalsIgnoreAsciiCase( "Forms.ScrollBar.1" ) )
{ {
xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlScrollBarModel" ), uno::UNO_QUERY_THROW ); xNewModel.set( xModelFactory->createInstance( "com.sun.star.awt.UnoControlScrollBarModel" ), uno::UNO_QUERY_THROW );
fDefWidth = 12.75; fDefHeight = 63.8; fDefWidth = 12.75; fDefHeight = 63.8;
...@@ -488,7 +488,7 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex ) ...@@ -488,7 +488,7 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex )
} }
catch (const uno::Exception&) catch (const uno::Exception&)
{ {
// throw lang::WrappedTargetException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Can not create AXControl!" ) ), // throw lang::WrappedTargetException( ::rtl::OUString( "Can not create AXControl!" ),
// uno::Reference< uno::XInterface >(), // uno::Reference< uno::XInterface >(),
// uno::makeAny( e ) ); // uno::makeAny( e ) );
} }
......
...@@ -111,13 +111,13 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource ) ...@@ -111,13 +111,13 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
// some built-in command bars // some built-in command bars
if( m_pCBarHelper->getModuleId() == "com.sun.star.sheet.SpreadsheetDocument" ) if( m_pCBarHelper->getModuleId() == "com.sun.star.sheet.SpreadsheetDocument" )
{ {
if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Worksheet Menu Bar") ) ) if( sBarName.equalsIgnoreAsciiCase( "Worksheet Menu Bar" ) )
{ {
// spreadsheet menu bar // spreadsheet menu bar
sResourceUrl = ITEM_MENUBAR_URL; sResourceUrl = ITEM_MENUBAR_URL;
bMenu = sal_True; bMenu = sal_True;
} }
else if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Cell") ) ) else if( sBarName.equalsIgnoreAsciiCase( "Cell" ) )
{ {
// EVIL HACK (tm): spreadsheet cell context menu as dummy object without functionality // EVIL HACK (tm): spreadsheet cell context menu as dummy object without functionality
aRet <<= uno::Reference< XCommandBar >( new VbaDummyCommandBar( this, mxContext, sBarName, office::MsoBarType::msoBarTypePopup ) ); aRet <<= uno::Reference< XCommandBar >( new VbaDummyCommandBar( this, mxContext, sBarName, office::MsoBarType::msoBarTypePopup ) );
...@@ -125,7 +125,7 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource ) ...@@ -125,7 +125,7 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
} }
else if( m_pCBarHelper->getModuleId() == "com.sun.star.text.TextDocument" ) else if( m_pCBarHelper->getModuleId() == "com.sun.star.text.TextDocument" )
{ {
if( sBarName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("Menu Bar") ) ) if( sBarName.equalsIgnoreAsciiCase( "Menu Bar" ) )
{ {
// text processor menu bar // text processor menu bar
sResourceUrl = ITEM_MENUBAR_URL; sResourceUrl = ITEM_MENUBAR_URL;
......
...@@ -81,10 +81,8 @@ namespace testdoctok ...@@ -81,10 +81,8 @@ namespace testdoctok
OSL_ASSERT(xFactory.is()); OSL_ASSERT(xFactory.is());
uno::Sequence<uno::Any> aUcbInitSequence(2); uno::Sequence<uno::Any> aUcbInitSequence(2);
aUcbInitSequence[0] <<= aUcbInitSequence[0] <<= rtl::OUString("Local");
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local")); aUcbInitSequence[1] <<= rtl::OUString("Office");
aUcbInitSequence[1] <<=
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office"));
uno::Reference<lang::XMultiServiceFactory> uno::Reference<lang::XMultiServiceFactory>
xServiceFactory(xFactory, uno::UNO_QUERY); xServiceFactory(xFactory, uno::UNO_QUERY);
......
...@@ -110,7 +110,7 @@ namespace helpdatafileproxy { ...@@ -110,7 +110,7 @@ namespace helpdatafileproxy {
, m_nItRead( -1 ) , m_nItRead( -1 )
, m_iItPos( -1 ) , m_iItPos( -1 )
{ {
OSL_ASSERT(!rFileURL.compareTo(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:")), 5)); OSL_ASSERT(!rFileURL.compareTo("file:", 5));
} }
~Hdf() ~Hdf()
{ releaseHashMap(); } { releaseHashMap(); }
......
...@@ -129,7 +129,7 @@ XInputStream_impl::skipBytes( ...@@ -129,7 +129,7 @@ XInputStream_impl::skipBytes(
if (m_aFile.setPos(osl_Pos_Current, sal_uInt64(nBytesToSkip)) != osl::FileBase::E_None) if (m_aFile.setPos(osl_Pos_Current, sal_uInt64(nBytesToSkip)) != osl::FileBase::E_None)
{ {
throw io::IOException(::rtl::OUString( throw io::IOException(::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("XInputStream_impl::skipBytes failed seek")), uno::Reference< uno::XInterface >()); "XInputStream_impl::skipBytes failed seek"), uno::Reference< uno::XInterface >());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment