targetted string cleanup

Change-Id: Iaf77bb427d62d7f3be00a96cba4dfb25a01934ac
This commit is contained in:
Michael Meeks
2012-06-01 17:19:58 +01:00
parent fcc31f1749
commit ff43ad1a77
20 changed files with 254 additions and 301 deletions

View File

@@ -210,7 +210,7 @@ static Reference< XComponentContext > lcl_getComponentContext(Reference< XMultiS
{
Reference< XPropertySet > xFactProp( aFactory, UNO_QUERY );
if( xFactProp.is() )
xFactProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext;
xFactProp->getPropertyValue( "DefaultContext") >>= xContext;
}
catch( Exception& )
{}

View File

@@ -336,17 +336,18 @@ Reference< XShape > Shape::createAndInsert(
awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 );
OUString aServiceName;
if( rServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape") ) &&
if( rServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
mpGraphicPropertiesPtr && !mpGraphicPropertiesPtr->maAudio.msEmbed.isEmpty() )
{
aServiceName = finalizeServiceName( rFilterBase, OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.MediaShape" ) ), aShapeRectHmm );
aServiceName = finalizeServiceName( rFilterBase, "com.sun.star.presentation.MediaShape", aShapeRectHmm );
bIsEmbMedia = true;
}
else
{
aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm );
}
sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.CustomShape" ) ) || aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.ConnectorShape" ) );
sal_Bool bIsCustomShape = ( aServiceName == "com.sun.star.drawing.CustomShape" ||
aServiceName == "com.sun.star.drawing.ConnectorShape" );
basegfx::B2DHomMatrix aTransformation;
@@ -529,9 +530,9 @@ Reference< XShape > Shape::createAndInsert(
// applying properties
aShapeProps.assignUsed( getShapeProperties() );
aShapeProps.assignUsed( maDefaultShapeProperties );
if ( bIsEmbMedia || aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) )
if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" )
mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper );
if ( mpTablePropertiesPtr.get() && aServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape")) )
if ( mpTablePropertiesPtr.get() && aServiceName == "com.sun.star.drawing.TableShape" )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
aFillProperties.pushToPropMap( aShapeProps, rGraphicHelper, mnRotation, nFillPhClr );
aLineProperties.pushToPropMap( aShapeProps, rGraphicHelper, nLinePhClr );
@@ -546,7 +547,7 @@ Reference< XShape > Shape::createAndInsert(
xSet->setPropertyValue( rPropName, Any( false ) );
// do not set properties at a group shape (this causes assertions from svx)
if( aServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GroupShape")) )
if( aServiceName != "com.sun.star.drawing.GroupShape" )
PropertySet( xSet ).setProperties( aShapeProps );
if( bIsCustomShape )

View File

@@ -34,7 +34,6 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
// header for define RTL_CONSTASCII_USTRINGPARAM
#include <rtl/ustring.h>
// header for define DBG_ERROR1
#include <tools/debug.hxx>
@@ -80,12 +79,9 @@ using ::rtl::OUString;
{
(void)ex; // avoid warning for pro build
OSL_FAIL( OUStringToOString( OUString(
OUString( RTL_CONSTASCII_USTRINGPARAM( "Exception caught. Type: " )) +
OUString::createFromAscii( typeid( ex ).name()) +
OUString( RTL_CONSTASCII_USTRINGPARAM( ", Message: " )) +
ex.Message), RTL_TEXTENCODING_ASCII_US ).getStr());
OSL_FAIL( OUStringToOString( "Exception caught. Type: " +
OUString::createFromAscii( typeid( ex ).name() ) +
", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
}
return aResult;
@@ -202,7 +198,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
if( xFactory.is() )
{
xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.DataSeriesWrapper")) ), uno::UNO_QUERY );
"com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
@@ -239,7 +235,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
if( xFactory.is() )
{
xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.DataSeriesWrapper")) ), uno::UNO_QUERY );
"com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{

View File

@@ -139,8 +139,8 @@ void PPTShape::addShape(
Reference< lang::XMultiServiceFactory > xServiceFact( rFilterBase.getModel(), UNO_QUERY_THROW );
sal_Bool bClearText = sal_False;
if ( sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) &&
sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")) )
if ( sServiceName != "com.sun.star.drawing.GraphicObjectShape" &&
sServiceName != "com.sun.star.drawing.OLE2Shape" )
{
const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) );
OSL_TRACE("has master: %p", rSlidePersist.getMasterPersist().get());

View File

@@ -349,18 +349,18 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
OUString aName, aValue;
if( ConversionHelper::separatePair( aName, aValue, rStyle.getToken( 0, ';', nIndex ), ':' ) )
{
if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "position" ) ) ) mrTypeModel.maPosition = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "left" ) ) ) mrTypeModel.maLeft = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "top" ) ) ) mrTypeModel.maTop = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "width" ) ) ) mrTypeModel.maWidth = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "height" ) ) ) mrTypeModel.maHeight = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-left" ) ) ) mrTypeModel.maMarginLeft = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-top" ) ) ) mrTypeModel.maMarginTop = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-position-vertical-relative" ) ) ) mrTypeModel.maPositionVerticalRelative = aValue;
if( aName == "position" ) mrTypeModel.maPosition = aValue;
else if( aName == "left" ) mrTypeModel.maLeft = aValue;
else if( aName == "top" ) mrTypeModel.maTop = aValue;
else if( aName == "width" ) mrTypeModel.maWidth = aValue;
else if( aName == "height" ) mrTypeModel.maHeight = aValue;
else if( aName == "margin-left" ) mrTypeModel.maMarginLeft = aValue;
else if( aName == "margin-top" ) mrTypeModel.maMarginTop = aValue;
else if( aName == "mso-position-vertical-relative" ) mrTypeModel.maPositionVerticalRelative = aValue;
else if( aName == "mso-position-horizontal" ) mrTypeModel.maPositionHorizontal = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-fit-shape-to-text" ) ) ) mrTypeModel.mbAutoHeight = sal_True;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "rotation" ) ) ) mrTypeModel.maRotation = aValue;
else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flip" ) ) ) mrTypeModel.maFlip = aValue;
else if( aName == "mso-fit-shape-to-text" ) mrTypeModel.mbAutoHeight = sal_True;
else if( aName == "rotation" ) mrTypeModel.maRotation = aValue;
else if( aName == "flip" ) mrTypeModel.maFlip = aValue;
}
}
}
@@ -389,7 +389,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
case VML_TOKEN( textbox ):
// Custom shape in Writer with a textbox are transformed into a frame
dynamic_cast<SimpleShape&>( mrShape ).setService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")));
"com.sun.star.text.TextFrame");
return new TextBoxContext( *this, mrShapeModel.createTextBox(), rAttribs );
case VMLX_TOKEN( ClientData ):
return new ClientDataContext( *this, mrShapeModel.createClientData(), rAttribs );
@@ -397,7 +397,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
// Force RectangleShape, this is ugly :(
// and is there because of the lines above which change it to TextFrame
dynamic_cast< SimpleShape& >( mrShape ).setService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.RectangleShape")));
"com.sun.star.drawing.RectangleShape");
mrShapeModel.maLegacyDiagramPath = getFragmentPathFromRelId(rAttribs.getString(XML_id, OUString()));
break;
}

View File

@@ -53,7 +53,7 @@ namespace DOM
OUString SAL_CALL CCDATASection::getNodeName()throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#cdata-section"));
return OUString( "#cdata-section" );
}
OUString SAL_CALL CCDATASection::getNodeValue() throw (RuntimeException)

View File

@@ -52,9 +52,9 @@ namespace DOM
{
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMCharacterDataModified"))), UNO_QUERY);
"DOMCharacterDataModified"), UNO_QUERY);
event->initMutationEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMCharacterDataModified")),
"DOMCharacterDataModified",
sal_True, sal_False, Reference< XNode >(),
prevValue, newValue, OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));

View File

@@ -50,7 +50,7 @@ namespace DOM
OUString SAL_CALL CComment::getNodeName()throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#comment"));
return OUString("#comment");
}
OUString SAL_CALL CComment::getNodeValue() throw (RuntimeException)

View File

@@ -808,8 +808,7 @@ namespace DOM
if (!aNsUri.isEmpty())
{
if (!aNsPrefix.isEmpty()) {
aQName = aNsPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":"))
+ aQName;
aQName = aNsPrefix + ":" + aQName;
}
xNewElement = xDocument->createElementNS(aNsUri, aQName);
} else {
@@ -831,8 +830,7 @@ namespace DOM
if (!aAttrUri.isEmpty())
{
if (!aAttrPrefix.isEmpty()) {
aAttrName = aAttrPrefix +
OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aAttrName;
aAttrName = aAttrPrefix + ":" + aAttrName;
}
xNewElement->setAttributeNS(
aAttrUri, aAttrName, sValue);
@@ -905,11 +903,9 @@ namespace DOM
{
Reference< XDocumentEvent > const xDocevent(xDocument, UNO_QUERY);
Reference< XMutationEvent > const event(xDocevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument"))),
UNO_QUERY_THROW);
"DOMNodeInsertedIntoDocument"), UNO_QUERY_THROW);
event->initMutationEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument"))
, sal_True, sal_False, Reference< XNode >(),
"DOMNodeInsertedIntoDocument", sal_True, sal_False, Reference< XNode >(),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
Reference< XEventTarget > const xDocET(xDocument, UNO_QUERY);
xDocET->dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@@ -949,11 +945,10 @@ namespace DOM
return xNode;
}
OUString SAL_CALL CDocument::getNodeName()throw (RuntimeException)
{
// does not need mutex currently
return OUString(RTL_CONSTASCII_USTRINGPARAM("#document"));
return OUString("#document");
}
OUString SAL_CALL CDocument::getNodeValue() throw (RuntimeException)

View File

@@ -293,7 +293,7 @@ namespace DOM
// default warning handler does not trigger assertion
static void warning_func(void * ctx, const char * /*msg*/, ...)
{
OUStringBuffer buf(OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 warning\n")));
OUStringBuffer buf("libxml2 warning\n");
buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
OSL_TRACE(msg.getStr());
@@ -302,7 +302,7 @@ namespace DOM
// default error handler triggers assertion
static void error_func(void * ctx, const char * /*msg*/, ...)
{
OUStringBuffer buf(OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 error\n")));
OUStringBuffer buf("libxml2 error\n");
buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
OSL_FAIL(msg.getStr());

View File

@@ -55,7 +55,7 @@ namespace DOM
OUString SAL_CALL CDocumentFragment::getNodeName()throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#document-fragment"));
return OUString("#document-fragment");
}
OUString SAL_CALL CDocumentFragment::getNodeValue() throw (RuntimeException)
{

View File

@@ -61,7 +61,7 @@ namespace DOM
if (!i_xHandler.is()) throw RuntimeException();
comphelper::AttributeList *pAttrs =
new comphelper::AttributeList();
OUString type = OUString();
OUString type = "";
// add namespace definitions to attributes
for (xmlNsPtr pNs = m_aNodePtr->nsDef; pNs != 0; pNs = pNs->next) {
const xmlChar *pPrefix = pNs->prefix;
@@ -69,8 +69,7 @@ namespace DOM
strlen(reinterpret_cast<const char*>(pPrefix)),
RTL_TEXTENCODING_UTF8);
OUString name = (prefix.isEmpty())
? OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns"))
: OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:")) + prefix;
? OUString( "xmlns" ) : OUString( "xmlns:" ) + prefix;
const xmlChar *pHref = pNs->href;
OUString val(reinterpret_cast<const sal_Char*>(pHref),
strlen(reinterpret_cast<const char*>(pHref)),
@@ -583,8 +582,8 @@ namespace DOM
// dispatch DOMAttrModified event
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified")),
"DOMAttrModified"), UNO_QUERY);
event->initMutationEvent("DOMAttrModified",
sal_True, sal_False, Reference< XNode >(xAttr, UNO_QUERY),
OUString(), xAttr->getValue(), xAttr->getName(),
AttrChangeType_ADDITION);
@@ -648,8 +647,8 @@ namespace DOM
// dispatch DOMAttrModified event
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified")),
"DOMAttrModified"), UNO_QUERY);
event->initMutationEvent("DOMAttrModified",
sal_True, sal_False,
Reference< XNode >(getAttributeNode(name), UNO_QUERY),
oldValue, value, name, aChangeType);
@@ -730,10 +729,9 @@ namespace DOM
// dispatch DOMAttrModified event
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY);
"DOMAttrModified"), UNO_QUERY);
event->initMutationEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified")),
sal_True, sal_False,
"DOMAttrModified", sal_True, sal_False,
Reference< XNode >(getAttributeNodeNS(namespaceURI, OUString((char*)xLName, strlen((char*)xLName), RTL_TEXTENCODING_UTF8)), UNO_QUERY),
oldValue, value, qualifiedName, aChangeType);
@@ -778,8 +776,7 @@ namespace DOM
void SAL_CALL CElement::setElementName(const OUString& aName)
throw (RuntimeException, DOMException)
{
if (aName.isEmpty() ||
(0 <= aName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(":")))))
if (aName.isEmpty() || (0 <= aName.indexOf(':')))
{
DOMException e;
e.Code = DOMExceptionType_INVALID_CHARACTER_ERR;

View File

@@ -65,9 +65,8 @@ namespace DOM
try {
Reference< XEventTarget > const xTarget(
static_cast<XElement*>(& rElement), UNO_QUERY_THROW);
OUString aType(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified"));
sal_Bool capture = sal_False;
xTarget->addEventListener(aType,
xTarget->addEventListener("DOMSubtreeModified",
Reference< XEventListener >(this), capture);
} catch (const Exception &e){
OString aMsg("Exception caught while registering NodeList as listener:\n");

View File

@@ -376,10 +376,8 @@ namespace DOM
pNode->m_bUnlinked = false; // will be deleted by xmlFreeDoc
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInserted"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInserted"))
, sal_True, sal_False,
this,
"DOMNodeInserted"), UNO_QUERY);
event->initMutationEvent("DOMNodeInserted", sal_True, sal_False, this,
OUString(), OUString(), OUString(), (AttrChangeType)0 );
// the following dispatch functions use only UNO interfaces
@@ -816,8 +814,8 @@ namespace DOM
*/
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeRemoved"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeRemoved")),
"DOMNodeRemoved"), UNO_QUERY);
event->initMutationEvent("DOMNodeRemoved",
sal_True,
sal_False,
this,
@@ -950,9 +948,9 @@ namespace DOM
// target is _this_ node
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified"))), UNO_QUERY);
"DOMSubtreeModified"), UNO_QUERY);
event->initMutationEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified")), sal_True,
"DOMSubtreeModified", sal_True,
sal_False, Reference< XNode >(),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));

View File

@@ -176,7 +176,7 @@ namespace DOM
throw SAXException();
Reference< XDocumentBuilder > aBuilder(m_aServiceManager->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder"))), UNO_QUERY_THROW);
"com.sun.star.xml.dom.DocumentBuilder"), UNO_QUERY_THROW);
Reference< XDocument > aDocument = aBuilder->newDocument();
m_aNodeStack.push(Reference< XNode >(aDocument, UNO_QUERY));
m_aDocument = aDocument;
@@ -226,7 +226,7 @@ namespace DOM
attr_qname = attribs->getNameByIndex(i);
attr_value = attribs->getValueByIndex(i);
// new prefix mapping
if (attr_qname.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:"))) == 0)
if (attr_qname.indexOf("xmlns:") == 0)
{
newprefix = attr_qname.copy(attr_qname.indexOf(':')+1);
aNSMap.insert(NSMap::value_type(newprefix, attr_value));
@@ -319,7 +319,7 @@ namespace DOM
OUString aRefName;
OUString aPrefix = aElement->getPrefix();
if (!aPrefix.isEmpty())
aRefName = aPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aElement->getTagName();
aRefName = aPrefix + ":" + aElement->getTagName();
else
aRefName = aElement->getTagName();
if (aRefName != aName) // consistency check

View File

@@ -64,7 +64,7 @@ namespace DOM
OUString SAL_CALL CText::getNodeName() throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#text"));
return OUString("#text");
}
Reference< XText > SAL_CALL CText::splitText(sal_Int32 /*offset*/)

View File

@@ -96,21 +96,21 @@ namespace DOM { namespace events
void SAL_CALL CTestListener::initialize(const Sequence< Any >& args) throw(RuntimeException)
{
if (args.getLength() < 3) throw IllegalArgumentException(
OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong number of arguments")), Reference< XInterface >(), 0);
"Wrong number of arguments", Reference< XInterface >(), 0);
Reference <XEventTarget> aTarget;
if(! (args[0] >>= aTarget)) throw IllegalArgumentException(
OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 1")), Reference< XInterface >(), 1);
"Illegal argument 1", Reference< XInterface >(), 1);
OUString aType;
if (! (args[1] >>= aType))
throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 2")), Reference< XInterface >(), 2);
throw IllegalArgumentException("Illegal argument 2", Reference< XInterface >(), 2);
sal_Bool bCapture = sal_False;
if(! (args[2] >>= bCapture)) throw IllegalArgumentException(
OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 3")), Reference< XInterface >(), 3);
"Illegal argument 3", Reference< XInterface >(), 3);
if(! (args[3] >>= m_name)) m_name = OUString(RTL_CONSTASCII_USTRINGPARAM("<unnamed listener>"));
if(! (args[3] >>= m_name)) m_name = "<unnamed listener>";
m_target = aTarget;
m_type = aType;

File diff suppressed because it is too large Load Diff

View File

@@ -310,7 +310,7 @@ namespace XPath
va_end(args);
::rtl::OUStringBuffer buf(
OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 error:\n")));
"libxml2 error:\n");
buf.appendAscii(str);
OString msg = OUStringToOString(buf.makeStringAndClear(),
RTL_TEXTENCODING_ASCII_US);
@@ -321,11 +321,11 @@ namespace XPath
{
(void) userData;
::rtl::OUStringBuffer buf(
OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 error:\n")));
"libxml2 error:\n");
if (error) {
buf.append(make_error_message(error));
} else {
buf.append(OUString(RTL_CONSTASCII_USTRINGPARAM("no error argument!")));
buf.append("no error argument!");
}
OString msg = OUStringToOString(buf.makeStringAndClear(),
RTL_TEXTENCODING_ASCII_US);

View File

@@ -311,7 +311,7 @@ struct SerializerTest : public CppUnit::TestFixture
CPPUNIT_ASSERT_MESSAGE(
"Converting ini file to URL",
osl_getFileURLFromSystemPath(
(sBaseDir+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unoxml_unittest_test.ini"))).pData,
(sBaseDir+rtl::"unoxml_unittest_test.ini").pData,
&aIniUrl.pData ) == osl_File_E_None );
mxCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl);