RTL_CONSTASCII_USTRINGPARAM in filters 8 (build problem in sal ?)

This commit is contained in:
Gert Faller 2010-11-27 17:35:06 +01:00
parent 454a2c2cd5
commit 17e4b5ee63
22 changed files with 94 additions and 90 deletions

View file

@ -142,7 +142,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( OUString::createFromAscii("DefaultContext") ) >>= xContext;
}
catch( Exception& )
{}

View file

@ -246,7 +246,7 @@ Reference< XShape > Shape::createAndInsert(
OUString aServiceName = rServiceName;
if( mxCreateCallback.get() )
aServiceName = mxCreateCallback->onCreateXShape( aServiceName, awt::Rectangle( aPosition.X / 360, aPosition.Y / 360, aSize.Width / 360, aSize.Height / 360 ) );
sal_Bool bIsCustomShape = aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
sal_Bool bIsCustomShape = aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" );
basegfx::B2DHomMatrix aTransformation;
if( aSize.Width != 1 || aSize.Height != 1)
@ -289,7 +289,7 @@ Reference< XShape > Shape::createAndInsert(
}
// special for lineshape
if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.LineShape")) )
if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) )
{
::basegfx::B2DPolygon aPoly;
aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
@ -310,7 +310,7 @@ Reference< XShape > Shape::createAndInsert(
maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
}
else if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape")) )
else if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.ConnectorShape" ) )
{
::basegfx::B2DPolygon aPoly;
aPoly.insert( 0, ::basegfx::B2DPoint( 0, 0 ) );
@ -438,9 +438,9 @@ Reference< XShape > Shape::createAndInsert(
// applying properties
PropertySet aPropSet( xSet );
if ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")) )
if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) )
mpGraphicPropertiesPtr->pushToPropSet( aPropSet, rGraphicHelper );
if ( mpTablePropertiesPtr.get() && ( aServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TableShape")) ) )
if ( mpTablePropertiesPtr.get() && ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.TableShape" ) ) )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
aFillProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, FillProperties::DEFAULT_IDS, mnRotation, nFillPhClr );
aLineProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, LineProperties::DEFAULT_IDS, nLinePhClr );
@ -455,7 +455,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 != OUString::createFromAscii( "com.sun.star.drawing.GroupShape" ) )
aPropSet.setProperties( aShapeProperties );
if( bIsCustomShape )

View file

@ -207,7 +207,7 @@ Reference< chart2::XDataSeries > SchXMLSeriesHelper::getFirstCandleStickSeries(
for( sal_Int32 nCTIdx=0; !xResult.is() && nCTIdx<aCTSeq.getLength(); ++nCTIdx )
{
if( aCTSeq[nCTIdx]->getChartType().equals(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.CandleStickChartType"))))
::rtl::OUString::createFromAscii("com.sun.star.chart2.CandleStickChartType")))
{
Reference< chart2::XDataSeriesContainer > xSeriesCnt( aCTSeq[nCTIdx], uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xSeriesCnt->getDataSeries() );
@ -240,7 +240,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 );
OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{
@ -277,7 +277,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 );
OUString::createFromAscii( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
if(xInit.is())
{

View file

@ -142,7 +142,7 @@ Reference< uno::XComponentContext > lcl_getComponentContext()
{
Reference< beans::XPropertySet > xFactProp( comphelper::getProcessServiceFactory(), uno::UNO_QUERY );
if( xFactProp.is())
xFactProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext"))) >>= xContext;
xFactProp->getPropertyValue(OUString::createFromAscii("DefaultContext")) >>= xContext;
}
catch( uno::Exception& )
{}
@ -231,7 +231,7 @@ Reference< chart2::data::XLabeledDataSequence > lcl_getCategories( const Referen
{
Sequence< Reference< chart2::data::XLabeledDataSequence > > aUnusedSequences( xDiagram->getUnusedData() );
lcl_MatchesRole aHasCategories( OUString(RTL_CONSTASCII_USTRINGPARAM("categories")) );
lcl_MatchesRole aHasCategories( OUString::createFromAscii("categories" ) );
for( sal_Int32 nN=0; nN<aUnusedSequences.getLength(); nN++ )
{
if( aHasCategories( aUnusedSequences[nN] ) )
@ -254,7 +254,7 @@ Reference< chart2::data::XDataSource > lcl_createDataSource(
if( xContext.is() )
xSink.set(
xContext->getServiceManager()->createInstanceWithContext(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.data.DataSource")),
OUString::createFromAscii("com.sun.star.chart2.data.DataSource"),
xContext ), uno::UNO_QUERY_THROW );
if( xSink.is())
xSink->setData( aData );
@ -320,12 +320,12 @@ Reference< chart2::data::XDataSource > lcl_pressUsedDataIntoRectangularFormat( c
//the first x-values is always the next sequence //todo ... other x-values get lost for old format
Reference< chart2::data::XLabeledDataSequence > xXValues(
lcl_getDataSequenceByRole( aSeriesSeqVector, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
lcl_getDataSequenceByRole( aSeriesSeqVector, OUString::createFromAscii("values-x" ) ) );
if( xXValues.is() )
aLabeledSeqVector.push_back( xXValues );
//add all other sequences now without x-values
lcl_MatchesRole aHasXValues( OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) );
lcl_MatchesRole aHasXValues( OUString::createFromAscii("values-x" ) );
for( sal_Int32 nN=0; nN<aSeriesSeqVector.getLength(); nN++ )
{
if( !aHasXValues( aSeriesSeqVector[nN] ) )
@ -641,7 +641,7 @@ OUString ChartExport::parseFormula( const OUString& rRange )
{
try
{
xParser.set( xSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.FormulaParser")) ), UNO_QUERY );
xParser.set( xSF->createInstance( OUString::createFromAscii( "com.sun.star.sheet.FormulaParser" ) ), UNO_QUERY );
}
catch( Exception& )
{
@ -653,12 +653,12 @@ OUString ChartExport::parseFormula( const OUString& rRange )
Reference< XPropertySet > xParserProps( xParser, uno::UNO_QUERY );
if( xParserProps.is() )
{
xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
xParserProps->setPropertyValue( OUString::createFromAscii("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::OOO) );
}
uno::Sequence<sheet::FormulaToken> aTokens = xParser->parseFormula( rRange, CellAddress( 0, 0, 0 ) );
if( xParserProps.is() )
{
xParserProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FormulaConvention")), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
xParserProps->setPropertyValue( OUString::createFromAscii("FormulaConvention"), uno::makeAny(::com::sun::star::sheet::AddressConvention::XL_OOX) );
}
aResult = xParser->printFormula( aTokens, CellAddress( 0, 0, 0 ) );
}
@ -878,7 +878,7 @@ void ChartExport::_ExportContent()
if( xServ.is())
{
if( xServ->supportsService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart.ChartTableAddressSupplier"))))
OUString::createFromAscii( "com.sun.star.chart.ChartTableAddressSupplier" )))
{
Reference< beans::XPropertySet > xProp( xServ, uno::UNO_QUERY );
if( xProp.is())
@ -888,13 +888,13 @@ void ChartExport::_ExportContent()
{
OUString sChartAddress;
aAny = xProp->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("ChartRangeAddress")));
OUString::createFromAscii( "ChartRangeAddress" ));
aAny >>= msChartAddress;
//maExportHelper.SetChartRangeAddress( sChartAddress );
OUString sTableNumberList;
aAny = xProp->getPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("TableNumberList")));
OUString::createFromAscii( "TableNumberList" ));
aAny >>= msTableNumberList;
//maExportHelper.SetTableNumberList( sTableNumberList );
@ -1604,7 +1604,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
sal_Bool bJapaneseCandleSticks = sal_False;
Reference< beans::XPropertySet > xCTProp( xChartType, uno::UNO_QUERY );
if( xCTProp.is())
xCTProp->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Japanese"))) >>= bJapaneseCandleSticks;
xCTProp->getPropertyValue( OUString::createFromAscii("Japanese")) >>= bJapaneseCandleSticks;
exportCandleStickSeries(
xDSCnt->getDataSeries(), bJapaneseCandleSticks, nAttachedAxis );
return;
@ -1636,7 +1636,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
{
Reference< beans::XPropertySet > xSeqProp( xTempValueSeq, uno::UNO_QUERY );
if( xSeqProp.is())
xSeqProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Role"))) >>= aRole;
xSeqProp->getPropertyValue(OUString::createFromAscii("Role")) >>= aRole;
// "main" sequence
if( aRole.equals( aLabelRole ))
{
@ -1731,7 +1731,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
|| (eChartType == chart::TYPEID_BUBBLE) )
{
// export xVal
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-x")) ) );
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-x" ) ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@ -1744,7 +1744,7 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
if( eChartType == chart::TYPEID_BUBBLE )
{
// export yVal
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-y")) ) );
Reference< chart2::data::XLabeledDataSequence > xSequence( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii("values-y" ) ) );
if( xSequence.is() )
{
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
@ -1791,7 +1791,7 @@ void ChartExport::exportCandleStickSeries(
xSource->getDataSequences());
//sal_Int32 nSeriesLength =
// lcl_getSequenceLengthByRole( aSeqCnt, OUString(RTL_CONSTASCII_USTRINGPARAM("values-last")));
// lcl_getSequenceLengthByRole( aSeqCnt, OUString::createFromAscii("values-last"));
Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY );
const char* sSeries[] = {"values-first","values-max","values-min","values-last",0};

View file

@ -84,8 +84,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 != OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) &&
sServiceName != OUString::createFromAscii( "com.sun.star.drawing.OLE2Shape" ) )
{
switch( mnSubType )
{

View file

@ -171,22 +171,22 @@ void lclSetXShapeRect( const Reference< XShape >& rxShape, const Rectangle& rSha
try
{
// The size
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("SizeType")), Any( SizeType::FIX ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutomaticHeight")), Any( sal_False ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Height")), Any( rShapeRect.Height ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Width")), Any( rShapeRect.Width ) );
xProps->setPropertyValue( OUString::createFromAscii( "SizeType" ), Any( SizeType::FIX ) );
xProps->setPropertyValue( OUString::createFromAscii( "FrameIsAutomaticHeight" ), Any( sal_False ) );
xProps->setPropertyValue( OUString::createFromAscii( "Height" ), Any( rShapeRect.Height ) );
xProps->setPropertyValue( OUString::createFromAscii( "Width" ), Any( rShapeRect.Width ) );
// The position
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientPosition")), Any( rShapeRect.X ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrientRelation")),
xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientPosition" ), Any( rShapeRect.X ) );
xProps->setPropertyValue( OUString::createFromAscii( "HoriOrientRelation" ),
Any( RelOrientation::FRAME ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("HoriOrient")),
xProps->setPropertyValue( OUString::createFromAscii( "HoriOrient" ),
Any( HoriOrientation::NONE ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientPosition")), Any( rShapeRect.Y ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrientRelation")),
xProps->setPropertyValue( OUString::createFromAscii( "VertOrientPosition" ), Any( rShapeRect.Y ) );
xProps->setPropertyValue( OUString::createFromAscii( "VertOrientRelation" ),
Any( RelOrientation::FRAME ) );
xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("VertOrient")),
xProps->setPropertyValue( OUString::createFromAscii( "VertOrient" ),
Any( VertOrientation::NONE ) );
}
catch ( Exception& )

View file

@ -294,7 +294,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
// Custom shape in Writer with a textbox are transformed into a frame
if ( nElement == ( NMSP_VML + XML_textbox ) )
dynamic_cast<SimpleShape&>( mrShape ).setService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) );
OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
// Excel specific shape client data
if( isRootElement() && (nElement == VMLX_TOKEN( ClientData )) )
@ -342,7 +342,7 @@ ContextHandlerRef RectangleShapeContext::onCreateContext( sal_Int32 nElement, co
{
if ( nElement == ( NMSP_VML + XML_textbox ) )
dynamic_cast< SimpleShape &>( mrShape ).setService(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextFrame")) );
OUString::createFromAscii( "com.sun.star.text.TextFrame" ) );
// The parent class's context is fine
return ShapeContext::onCreateContext( nElement, rAttribs );

View file

@ -211,7 +211,7 @@ void Comment::finalizeImport()
Reference< XShape > xAnnoShape( xAnnoShapeSupp->getAnnotationShape(), UNO_SET_THROW );
Reference <XText> xText( xAnnoShape, UNO_QUERY_THROW );
Reference <XTextRange> xTextRange( xText, UNO_QUERY_THROW );
xTextRange->setString( OUString(RTL_CONSTASCII_USTRINGPARAM("")) ); // Clear contents
xTextRange->setString( OUString::createFromAscii("") ); // Clear contents
maModel.mxText->convert( xText, -1 );
// Add shape formatting properties (autoFill, colHidden and rowHidden are dropped)

View file

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

View file

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

View file

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

View file

@ -504,7 +504,7 @@ namespace DOM
{
if (aNsPrefix.getLength() > 0)
aQName = aNsPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aQName;
aQName = aNsPrefix + OUString::createFromAscii(":") + aQName;
newElement = createElementNS(aNsUri, aQName);
}
else
@ -524,7 +524,7 @@ namespace DOM
if (aAttrUri.getLength() > 0)
{
if (aAttrPrefix.getLength() > 0)
aAttrName = aAttrPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aAttrName;
aAttrName = aAttrPrefix + OUString::createFromAscii(":") + aAttrName;
newElement->setAttributeNS(aAttrUri, aAttrName, curAttr->getValue());
}
else
@ -590,8 +590,8 @@ namespace DOM
{
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument"))
OUString::createFromAscii("DOMNodeInsertedIntoDocument")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMNodeInsertedIntoDocument")
, sal_True, sal_False, Reference< XNode >(),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -601,7 +601,7 @@ namespace DOM
}
OUString SAL_CALL CDocument::getNodeName()throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#document"));
return OUString::createFromAscii("#document");
}
OUString SAL_CALL CDocument::getNodeValue() throw (RuntimeException)
{

View file

@ -297,7 +297,7 @@ namespace DOM
// default warning handler triggers assertion
static void warning_func(void * ctx, const char * /*msg*/, ...)
{
OUStringBuffer buf(OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 warning\n")));
OUStringBuffer buf(OUString::createFromAscii("libxml2 warning\n"));
buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, msg.getStr());
@ -306,7 +306,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(OUString::createFromAscii("libxml2 error\n"));
buf.append(make_error_message(static_cast< xmlParserCtxtPtr >(ctx)));
OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, msg.getStr());

View file

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

View file

@ -53,7 +53,7 @@ namespace DOM
if (!i_xHandler.is()) throw RuntimeException();
comphelper::AttributeList *pAttrs =
new comphelper::AttributeList();
OUString type = OUString();
OUString type = OUString::createFromAscii("");
// add namespace definitions to attributes
for (xmlNsPtr pNs = m_aNodePtr->nsDef; pNs != 0; pNs = pNs->next) {
const xmlChar *pPrefix = pNs->prefix;
@ -61,8 +61,8 @@ namespace DOM
strlen(reinterpret_cast<const char*>(pPrefix)),
RTL_TEXTENCODING_UTF8);
OUString name = (prefix.equalsAscii(""))
? OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns"))
: OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:")) + prefix;
? OUString::createFromAscii("xmlns")
: OUString::createFromAscii("xmlns:") + prefix;
const xmlChar *pHref = pNs->href;
OUString val(reinterpret_cast<const sal_Char*>(pHref),
strlen(reinterpret_cast<const char*>(pHref)),
@ -463,8 +463,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")),
OUString::createFromAscii("DOMAttrModified")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMAttrModified"),
sal_True, sal_False, Reference< XNode >(aAttr, UNO_QUERY),
OUString(), aAttr->getValue(), aAttr->getName(), AttrChangeType_ADDITION);
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -518,8 +518,8 @@ namespace DOM
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")),
OUString::createFromAscii("DOMAttrModified")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMAttrModified"),
sal_True, sal_False, Reference< XNode >(getAttributeNode(name), UNO_QUERY),
oldValue, value, name, aChangeType);
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -588,8 +588,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")), sal_True, sal_False,
OUString::createFromAscii("DOMAttrModified")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMAttrModified"), sal_True, sal_False,
Reference< XNode >(getAttributeNodeNS(namespaceURI, OUString((char*)xLName, strlen((char*)xLName), RTL_TEXTENCODING_UTF8)), UNO_QUERY),
oldValue, value, qualifiedName, aChangeType);
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -632,7 +632,7 @@ namespace DOM
void SAL_CALL CElement::setElementName(const OUString& aName) throw (RuntimeException, DOMException)
{
if (aName.getLength() > 0 && aName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(":"))) < 0)
if (aName.getLength() > 0 && aName.indexOf(OUString::createFromAscii(":")) < 0)
{
OString oName = OUStringToOString(aName, RTL_TEXTENCODING_UTF8);
xmlChar *xName = (xmlChar*)oName.getStr();

View file

@ -66,7 +66,7 @@ namespace DOM
// get the XNode
Reference< XNode > xNode(CNode::get(static_cast<const CNode*>(pElement)->m_aNodePtr));
Reference< XEventTarget > xTarget(xNode, UNO_QUERY_THROW);
OUString aType(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified"));
OUString aType = OUString::createFromAscii("DOMSubtreeModified");
sal_Bool capture = sal_False;
xTarget->addEventListener(aType, Reference< XEventListener >(this), capture);
} catch (Exception &e){

View file

@ -466,8 +466,8 @@ namespace DOM
{
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"))
OUString::createFromAscii("DOMNodeInserted")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMNodeInserted")
, sal_True, sal_False, Reference< XNode >(CNode::get(m_aNodePtr)),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -861,8 +861,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")), sal_True,
OUString::createFromAscii("DOMNodeRemoved")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMNodeRemoved"), sal_True,
sal_False, Reference< XNode >(CNode::get(m_aNodePtr)),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));
@ -950,8 +950,8 @@ namespace DOM
// target is _this_ node
Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY);
Reference< XMutationEvent > event(docevent->createEvent(
OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified"))), UNO_QUERY);
event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified")), sal_True,
OUString::createFromAscii("DOMSubtreeModified")), UNO_QUERY);
event->initMutationEvent(OUString::createFromAscii("DOMSubtreeModified"), sal_True,
sal_False, Reference< XNode >(),
OUString(), OUString(), OUString(), (AttrChangeType)0 );
dispatchEvent(Reference< XEvent >(event, UNO_QUERY));

View file

@ -164,7 +164,7 @@ namespace DOM
throw SAXException();
Reference< XDocumentBuilder > aBuilder(m_aServiceManager->createInstance(
OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder"))), UNO_QUERY_THROW);
OUString::createFromAscii("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;
@ -210,12 +210,12 @@ 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(OUString::createFromAscii("xmlns:")) == 0)
{
newprefix = attr_qname.copy(attr_qname.indexOf(':')+1);
aNSMap.insert(NSMap::value_type(newprefix, attr_value));
}
else if (attr_qname == OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns")))
else if (attr_qname == OUString::createFromAscii("xmlns"))
{
// new default prefix
aNSMap.insert(NSMap::value_type(OUString(), attr_value));
@ -300,7 +300,7 @@ namespace DOM
OUString aRefName;
OUString aPrefix = aElement->getPrefix();
if (aPrefix.getLength() > 0)
aRefName = aPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aElement->getTagName();
aRefName = aPrefix + OUString::createFromAscii(":") + aElement->getTagName();
else
aRefName = aElement->getTagName();
if (aRefName != aName) // consistency check

View file

@ -54,7 +54,7 @@ namespace DOM
OUString SAL_CALL CText::getNodeName()throw (RuntimeException)
{
return OUString(RTL_CONSTASCII_USTRINGPARAM("#text"));
return OUString::createFromAscii("#text");
}
void SAL_CALL CText::fastSaxify( Context& io_rContext )

View file

@ -92,21 +92,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);
OUString::createFromAscii("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);
OUString::createFromAscii("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(OUString::createFromAscii("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);
OUString::createFromAscii("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 = OUString::createFromAscii("<unnamed listener>");
m_target = aTarget;
m_type = aType;

View file

@ -1382,10 +1382,14 @@ void SAL_CALL librdf_Repository::setStatementRDFa(
throw (uno::RuntimeException, lang::IllegalArgumentException,
rdf::RepositoryException)
{
static const ::rtl::OUString s_cell(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.table.Cell"));
static const ::rtl::OUString s_cellprops(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.CellProperties")); // for writer
static const ::rtl::OUString s_paragraph(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Paragraph"));
static const ::rtl::OUString s_bookmark(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark"));
static const ::rtl::OUString s_cell(
::rtl::OUString::createFromAscii("com.sun.star.table.Cell"));
static const ::rtl::OUString s_cellprops( // for writer
::rtl::OUString::createFromAscii("com.sun.star.text.CellProperties"));
static const ::rtl::OUString s_paragraph(
::rtl::OUString::createFromAscii("com.sun.star.text.Paragraph"));
static const ::rtl::OUString s_bookmark(
::rtl::OUString::createFromAscii("com.sun.star.text.Bookmark"));
static const ::rtl::OUString s_meta( ::rtl::OUString::createFromAscii(
"com.sun.star.text.InContentMetadata"));
@ -1440,7 +1444,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
"ensureMetadataReference did not"), *this);
}
::rtl::OUString const sXmlId(mdref.First +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second);
::rtl::OUString::createFromAscii("#") + mdref.Second);
uno::Reference<rdf::XURI> xXmlId;
try {
xXmlId.set( rdf::URI::create(m_xContext,
@ -1504,7 +1508,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
try {
xXmlId.set( rdf::URI::create(m_xContext,
::rtl::OUString::createFromAscii(s_nsOOo)
+ mdref.First + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#"))
+ mdref.First + ::rtl::OUString::createFromAscii("#")
+ mdref.Second),
uno::UNO_QUERY_THROW);
} catch (lang::IllegalArgumentException & iae) {
@ -1532,7 +1536,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >();
}
::rtl::OUString const sXmlId(mdref.First +
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second);
::rtl::OUString::createFromAscii("#") + mdref.Second);
uno::Reference<rdf::XURI> xXmlId;
try {
xXmlId.set( rdf::URI::create(m_xContext,

View file

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