[Libreoffice-commits] .: oox/source unoxml/source unoxml/test

Michael Meeks michael at kemper.freedesktop.org
Fri Jun 1 09:41:44 PDT 2012


 oox/source/core/xmlfilterbase.cxx        |    2 
 oox/source/drawingml/shape.cxx           |   13 -
 oox/source/export/SchXMLSeriesHelper.cxx |   14 -
 oox/source/ppt/pptshape.cxx              |    4 
 oox/source/vml/vmlshapecontext.cxx       |   26 +-
 unoxml/source/dom/cdatasection.cxx       |    2 
 unoxml/source/dom/characterdata.cxx      |    4 
 unoxml/source/dom/comment.cxx            |    2 
 unoxml/source/dom/document.cxx           |   15 -
 unoxml/source/dom/documentbuilder.cxx    |    4 
 unoxml/source/dom/documentfragment.cxx   |    2 
 unoxml/source/dom/element.cxx            |   21 -
 unoxml/source/dom/elementlist.cxx        |    3 
 unoxml/source/dom/node.cxx               |   14 -
 unoxml/source/dom/saxbuilder.cxx         |    6 
 unoxml/source/dom/text.cxx               |    2 
 unoxml/source/events/testlistener.cxx    |   10 
 unoxml/source/rdf/librdf_repository.cxx  |  403 ++++++++++++++-----------------
 unoxml/source/xpath/xpathapi.cxx         |    6 
 unoxml/test/domtest.cxx                  |    2 
 20 files changed, 254 insertions(+), 301 deletions(-)

New commits:
commit ff43ad1a77a89d1d1ebc0c20807bb9ec508fc9fd
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Jun 1 17:19:58 2012 +0100

    targetted string cleanup
    
    Change-Id: Iaf77bb427d62d7f3be00a96cba4dfb25a01934ac

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 762e2bd..04957cf 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -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& )
     {}
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index be58314..66a1ee1 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -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 )
diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx
index 509c121..310566c 100644
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ b/oox/source/export/SchXMLSeriesHelper.cxx
@@ -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())
                 {
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 9fa052c..3b66253 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -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());
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index e6485f3..3134282 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -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;
     }
diff --git a/unoxml/source/dom/cdatasection.cxx b/unoxml/source/dom/cdatasection.cxx
index 4163769..d071581 100644
--- a/unoxml/source/dom/cdatasection.cxx
+++ b/unoxml/source/dom/cdatasection.cxx
@@ -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)
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx
index 39bdc78..6b8d0ed 100644
--- a/unoxml/source/dom/characterdata.cxx
+++ b/unoxml/source/dom/characterdata.cxx
@@ -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));
diff --git a/unoxml/source/dom/comment.cxx b/unoxml/source/dom/comment.cxx
index e2bd7ec..ccf6dcf 100644
--- a/unoxml/source/dom/comment.cxx
+++ b/unoxml/source/dom/comment.cxx
@@ -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)
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index ce8a4c5..4755511 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -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)
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 6104a5a..89c1d5f 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -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());
diff --git a/unoxml/source/dom/documentfragment.cxx b/unoxml/source/dom/documentfragment.cxx
index 1a7954b..d1932c8 100644
--- a/unoxml/source/dom/documentfragment.cxx
+++ b/unoxml/source/dom/documentfragment.cxx
@@ -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)
     {
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx
index 09f3ec3..5cf8772 100644
--- a/unoxml/source/dom/element.cxx
+++ b/unoxml/source/dom/element.cxx
@@ -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;
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index ae66fa6..a9b7b30 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -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");
diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx
index 8cbcfc5..0c5a846 100644
--- a/unoxml/source/dom/node.cxx
+++ b/unoxml/source/dom/node.cxx
@@ -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));
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index d182be2..6d59c35 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -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
diff --git a/unoxml/source/dom/text.cxx b/unoxml/source/dom/text.cxx
index 198afcb..132a792 100644
--- a/unoxml/source/dom/text.cxx
+++ b/unoxml/source/dom/text.cxx
@@ -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*/)
diff --git a/unoxml/source/events/testlistener.cxx b/unoxml/source/events/testlistener.cxx
index 0b29277..496f89f 100644
--- a/unoxml/source/events/testlistener.cxx
+++ b/unoxml/source/events/testlistener.cxx
@@ -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;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index f97d3be..830eef9 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -483,12 +483,12 @@ throw (uno::RuntimeException, container::NoSuchElementException,
 
         librdf_statement *pStmt( librdf_stream_get_object(m_pStream.get()) );
         if (!pStmt) {
-            rdf::QueryException e(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            rdf::QueryException e(
                 "librdf_GraphResult::nextElement: "
-                "librdf_stream_get_object failed")), *this);
-            throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "librdf_stream_get_object failed", *this);
+            throw lang::WrappedTargetException(
                 "librdf_GraphResult::nextElement: "
-                "librdf_stream_get_object failed")), *this,
+                "librdf_stream_get_object failed", *this,
                     uno::makeAny(e));
         }
         // NB: pCtxt may be null here if this is result of a graph query
@@ -597,12 +597,12 @@ throw (uno::RuntimeException, container::NoSuchElementException,
         if (librdf_query_results_get_bindings(m_pQueryResult.get(), NULL,
                     pNodes.get()))
         {
-            rdf::QueryException e(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            rdf::QueryException e(
                 "librdf_QuerySelectResult::nextElement: "
-                "librdf_query_results_get_bindings failed")), *this);
-            throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                "librdf_query_results_get_bindings failed", *this);
+            throw lang::WrappedTargetException(
                 "librdf_QuerySelectResult::nextElement: "
-                "librdf_query_results_get_bindings failed")), *this,
+                "librdf_query_results_get_bindings failed", *this,
                 uno::makeAny(e));
         }
         uno::Sequence< uno::Reference< rdf::XNode > > ret(count);
@@ -721,8 +721,8 @@ throw (uno::RuntimeException,
 {
     uno::Reference< rdf::XRepository > xRep( m_wRep );
     if (!xRep.is()) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_NamedGraph::clear: repository is gone")), *this);
+        throw rdf::RepositoryException(
+            "librdf_NamedGraph::clear: repository is gone", *this);
     }
     try {
         m_pRep->clearGraph(m_xName);
@@ -740,8 +740,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
 {
     uno::Reference< rdf::XRepository > xRep( m_wRep );
     if (!xRep.is()) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_NamedGraph::addStatement: repository is gone")), *this);
+        throw rdf::RepositoryException(
+            "librdf_NamedGraph::addStatement: repository is gone", *this);
     }
     m_pRep->addStatementGraph(i_xSubject, i_xPredicate, i_xObject, m_xName);
 }
@@ -755,8 +755,8 @@ throw (uno::RuntimeException,
 {
     uno::Reference< rdf::XRepository > xRep( m_wRep );
     if (!xRep.is()) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_NamedGraph::removeStatements: repository is gone")), *this);
+        throw rdf::RepositoryException(
+            "librdf_NamedGraph::removeStatements: repository is gone", *this);
     }
     m_pRep->removeStatementsGraph(i_xSubject, i_xPredicate, i_xObject, m_xName);
 }
@@ -771,8 +771,8 @@ throw (uno::RuntimeException,
 {
     uno::Reference< rdf::XRepository > xRep( m_wRep );
     if (!xRep.is()) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_NamedGraph::getStatements: repository is gone")), *this);
+        throw rdf::RepositoryException(
+            "librdf_NamedGraph::getStatements: repository is gone", *this);
     }
     return m_pRep->getStatementsGraph(
             i_xSubject, i_xPredicate, i_xObject, m_xName);
@@ -853,15 +853,15 @@ throw (uno::RuntimeException)
         librdf_new_node_from_blank_identifier(m_pWorld.get(), NULL),
         safe_librdf_free_node);
     if (!pNode) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::createBlankNode: "
-            "librdf_new_node_from_blank_identifier failed")), *this);
+            "librdf_new_node_from_blank_identifier failed", *this);
     }
     const unsigned char * id (librdf_node_get_blank_identifier(pNode.get()));
     if (!id) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::createBlankNode: "
-            "librdf_node_get_blank_identifier failed")), *this);
+            "librdf_node_get_blank_identifier failed", *this);
     }
     const ::rtl::OUString nodeID(::rtl::OUString::createFromAscii(
         reinterpret_cast<const char *>(id)));
@@ -869,9 +869,8 @@ throw (uno::RuntimeException)
         return rdf::BlankNode::create(m_xContext, nodeID);
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::createBlankNode: "
-                "illegal blank node label")), *this, uno::makeAny(iae));
+                "illegal blank node label", *this, uno::makeAny(iae));
     }
 }
 
@@ -895,44 +894,37 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     ::osl::MutexGuard g(m_aMutex);
     if (!i_xInStream.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "stream is null")), *this, 1);
+            "librdf_Repository::importGraph: stream is null", *this, 1);
     }
     //FIXME: other formats
     if (i_Format != rdf::FileFormat::RDF_XML) {
         throw datatransfer::UnsupportedFlavorException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "file format not supported")), *this);
+                "librdf_Repository::importGraph: file format not supported", *this);
     }
     if (!i_xGraphName.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "graph name is null")), *this, 2);
+                "librdf_Repository::importGraph: graph name is null", *this, 2);
     }
     if (i_xGraphName->getStringValue().matchAsciiL(s_nsOOo, sizeof(s_nsOOo)-1))
     {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "URI is reserved")), *this, 0);
+                "librdf_Repository::importGraph: URI is reserved", *this, 0);
     }
     if (formatNeedsBaseURI(i_Format) && !i_xBaseURI.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "base URI is null")), *this, 3);
+                "librdf_Repository::importGraph: base URI is null", *this, 3);
     }
     OSL_ENSURE(i_xBaseURI.is(), "no base uri");
     const ::rtl::OUString baseURIU( i_xBaseURI->getStringValue() );
     if (baseURIU.indexOf('#') >= 0) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "base URI is not absolute")), *this, 3);
+                "librdf_Repository::importGraph: base URI is not absolute", *this, 3);
     }
 
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (m_NamedGraphs.find(contextU) != m_NamedGraphs.end()) {
         throw container::ElementExistException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: "
-                "graph with given URI exists")), *this);
+                "librdf_Repository::importGraph: graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -942,9 +934,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::importGraph: "
-            "librdf_new_node_from_uri_string failed")), *this);
+        throw uno::RuntimeException(
+            "librdf_Repository::importGraph: librdf_new_node_from_uri_string failed", *this);
     }
 
     const ::rtl::OString baseURI(
@@ -954,18 +945,16 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             reinterpret_cast<const unsigned char*> (baseURI.getStr())),
         safe_librdf_free_uri);
     if (!pBaseURI) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::importGraph: "
-            "librdf_new_uri failed")), *this);
+        throw uno::RuntimeException( "librdf_Repository::importGraph: librdf_new_uri failed", *this);
     }
 
     const boost::shared_ptr<librdf_parser> pParser(
         librdf_new_parser(m_pWorld.get(), "rdfxml", NULL, NULL),
         safe_librdf_free_parser);
     if (!pParser) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::importGraph: "
-            "librdf_new_parser failed")), *this);
+        throw uno::RuntimeException(
+                "librdf_Repository::importGraph: "
+                "librdf_new_parser failed", *this);
     }
 
     uno::Sequence<sal_Int8> buf;
@@ -980,17 +969,17 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             buf.getLength(), pBaseURI.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::ParseException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::ParseException(
             "librdf_Repository::importGraph: "
-            "librdf_parser_parse_counted_string_as_stream failed")), *this);
+            "librdf_parser_parse_counted_string_as_stream failed", *this);
     }
     m_NamedGraphs.insert(std::make_pair(contextU,
         new librdf_NamedGraph(this, i_xGraphName)));
     if (librdf_model_context_add_statements(m_pModel.get(),
             pContext.get(), pStream.get())) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::importGraph: "
-            "librdf_model_context_add_statements failed")), *this);
+            "librdf_model_context_add_statements failed", *this);
     }
     return getGraph(i_xGraphName);
 }
@@ -1027,9 +1016,9 @@ void addChaffWhenEncryptedStorage(const uno::Reference< io::XOutputStream > &rSt
             rStream->writeBytes(buf);
 
             rtl::OStringBuffer aComment;
-            aComment.append(RTL_CONSTASCII_STRINGPARAM("<!--"));
+            aComment.append("<!--");
             aComment.append(comphelper::xml::makeXMLChaff());
-            aComment.append(RTL_CONSTASCII_STRINGPARAM("-->"));
+            aComment.append("-->");
 
             buf = uno::Sequence<sal_Int8>(
                 reinterpret_cast<const sal_Int8*>(aComment.getStr()), aComment.getLength());
@@ -1055,38 +1044,37 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     ::osl::MutexGuard g(m_aMutex);
     if (!i_xOutStream.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "stream is null")), *this, 1);
+                "librdf_Repository::exportGraph: stream is null", *this, 1);
     }
     // FIXME: other formats
     if (i_Format != rdf::FileFormat::RDF_XML) {
         throw datatransfer::UnsupportedFlavorException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "file format not supported")), *this);
+                "librdf_Repository::exportGraph: "
+                "file format not supported", *this);
     }
     if (!i_xGraphName.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "graph name is null")), *this, 2);
+                "librdf_Repository::exportGraph: "
+                "graph name is null", *this, 2);
     }
     if (formatNeedsBaseURI(i_Format) && !i_xBaseURI.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "base URI is null")), *this, 3);
+                "librdf_Repository::exportGraph: "
+                "base URI is null", *this, 3);
     }
     OSL_ENSURE(i_xBaseURI.is(), "no base uri");
     const ::rtl::OUString baseURIU( i_xBaseURI->getStringValue() );
     if (baseURIU.indexOf('#') >= 0) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "base URI is not absolute")), *this, 3);
+                "librdf_Repository::exportGraph: "
+                "base URI is not absolute", *this, 3);
     }
 
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (m_NamedGraphs.find(contextU) == m_NamedGraphs.end()) {
         throw container::NoSuchElementException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: "
-                "no graph with given URI exists")), *this);
+                "librdf_Repository::exportGraph: "
+                "no graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -1096,9 +1084,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_new_node_from_uri_string failed")), *this);
+            "librdf_new_node_from_uri_string failed", *this);
     }
     const ::rtl::OString baseURI(
         ::rtl::OUStringToOString(baseURIU, RTL_TEXTENCODING_UTF8) );
@@ -1107,18 +1095,18 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             reinterpret_cast<const unsigned char*> (baseURI.getStr())),
         safe_librdf_free_uri);
     if (!pBaseURI) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_new_uri failed")), *this);
+            "librdf_new_uri failed", *this);
     }
 
     const boost::shared_ptr<librdf_stream> pStream(
         librdf_model_context_as_stream(m_pModel.get(), pContext.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::exportGraph: "
-            "librdf_model_context_as_stream failed")), *this);
+            "librdf_model_context_as_stream failed", *this);
     }
     const char *format("rdfxml");
     // #i116443#: abbrev breaks when certain URIs are used as data types
@@ -1127,19 +1115,19 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         librdf_new_serializer(m_pWorld.get(), format, NULL, NULL),
         safe_librdf_free_serializer);
     if (!pSerializer) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_new_serializer failed")), *this);
+            "librdf_new_serializer failed", *this);
     }
 
     const boost::shared_ptr<librdf_uri> pRelativeURI(
         librdf_new_uri(m_pWorld.get(), reinterpret_cast<const unsigned char*>
                 ("http://feature.librdf.org/raptor-relativeURIs")),
-        safe_librdf_free_uri);
+                 safe_librdf_free_uri);
     const boost::shared_ptr<librdf_uri> pWriteBaseURI(
         librdf_new_uri(m_pWorld.get(), reinterpret_cast<const unsigned char*>
             ("http://feature.librdf.org/raptor-writeBaseURI")),
-        safe_librdf_free_uri);
+             safe_librdf_free_uri);
     const boost::shared_ptr<librdf_node> p0(
         librdf_new_node_from_literal(m_pWorld.get(),
             reinterpret_cast<const unsigned char*> ("0"), NULL, 0),
@@ -1149,26 +1137,26 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             reinterpret_cast<const unsigned char*> ("1"), NULL, 0),
         safe_librdf_free_node);
     if (!pWriteBaseURI || !pRelativeURI || !p0 || !p1) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_new_uri or librdf_new_node_from_literal failed")), *this);
+            "librdf_new_uri or librdf_new_node_from_literal failed", *this);
     }
 
     // make URIs relative to base URI
     if (librdf_serializer_set_feature(pSerializer.get(),
         pRelativeURI.get(), p1.get()))
     {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_serializer_set_feature relativeURIs failed")), *this);
+            "librdf_serializer_set_feature relativeURIs failed", *this);
     }
     // but do not write the base URI to the file!
     if (librdf_serializer_set_feature(pSerializer.get(),
         pWriteBaseURI.get(), p0.get()))
     {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::exportGraph: "
-            "librdf_serializer_set_feature writeBaseURI failed")), *this);
+            "librdf_serializer_set_feature writeBaseURI failed", *this);
     }
 
     size_t length;
@@ -1176,9 +1164,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         librdf_serializer_serialize_stream_to_counted_string(
             pSerializer.get(), pBaseURI.get(), pStream.get(), &length), free);
     if (!pBuf) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::exportGraph: "
-            "librdf_serializer_serialize_stream_to_counted_string failed")),
+            "librdf_serializer_serialize_stream_to_counted_string failed",
             *this);
     }
     addChaffWhenEncryptedStorage(i_xOutStream, pBuf.get(), length);
@@ -1205,8 +1193,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     ::osl::MutexGuard g(m_aMutex);
     if (!i_xGraphName.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::getGraph: "
-                "URI is null")), *this, 0);
+                "librdf_Repository::getGraph: URI is null", *this, 0);
     }
     const NamedGraphMap_t::iterator iter(
         m_NamedGraphs.find(i_xGraphName->getStringValue()) );
@@ -1225,14 +1212,12 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     ::osl::MutexGuard g(m_aMutex);
     if (!i_xGraphName.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: "
-                "URI is null")), *this, 0);
+                "librdf_Repository::createGraph: URI is null", *this, 0);
     }
     if (i_xGraphName->getStringValue().matchAsciiL(s_nsOOo, sizeof(s_nsOOo)-1))
     {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: "
-                "URI is reserved")), *this, 0);
+                "librdf_Repository::createGraph: URI is reserved", *this, 0);
     }
 
     // NB: librdf does not have a concept of graphs as such;
@@ -1241,8 +1226,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (m_NamedGraphs.find(contextU) != m_NamedGraphs.end()) {
         throw container::ElementExistException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: "
-            "graph with given URI exists")), *this);
+                "librdf_Repository::createGraph: graph with given URI exists", *this);
     }
     m_NamedGraphs.insert(std::make_pair(contextU,
         new librdf_NamedGraph(this, i_xGraphName)));
@@ -1295,9 +1279,9 @@ throw (uno::RuntimeException, rdf::RepositoryException)
         librdf_model_find_statements(m_pModel.get(), pStatement.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::getStatements: "
-            "librdf_model_find_statements failed")), *this);
+            "librdf_model_find_statements failed", *this);
     }
 
     return new librdf_GraphResult(this, m_aMutex, pStream,
@@ -1317,17 +1301,17 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException)
             reinterpret_cast<const unsigned char*> (query.getStr()), NULL),
         safe_librdf_free_query);
     if (!pQuery) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::querySelect: "
-            "librdf_new_query failed")), *this);
+            "librdf_new_query failed", *this);
     }
     const boost::shared_ptr<librdf_query_results> pResults(
         librdf_model_query_execute(m_pModel.get(), pQuery.get()),
         safe_librdf_free_query_results);
     if (!pResults || !librdf_query_results_is_bindings(pResults.get())) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::querySelect: "
-            "query result is null or not bindings")), *this);
+            "query result is null or not bindings", *this);
     }
 
     const int count( librdf_query_results_get_bindings_count(pResults.get()) );
@@ -1337,9 +1321,8 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException)
             const char* name( librdf_query_results_get_binding_name(
                 pResults.get(), i) );
             if (!name) {
-                throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-                    "librdf_Repository::querySelect: "
-                    "binding is null")), *this);
+                throw rdf::QueryException(
+                    "librdf_Repository::querySelect: binding is null", *this);
             }
 
             names[i] = ::rtl::OUString::createFromAscii(name);
@@ -1349,9 +1332,9 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException)
             pQuery, pResults, names);
 
     } else {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::querySelect: "
-            "librdf_query_results_get_bindings_count failed")), *this);
+            "librdf_query_results_get_bindings_count failed", *this);
     }
 }
 
@@ -1367,25 +1350,25 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException)
             reinterpret_cast<const unsigned char*> (query.getStr()), NULL),
         safe_librdf_free_query);
     if (!pQuery) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::queryConstruct: "
-            "librdf_new_query failed")), *this);
+            "librdf_new_query failed", *this);
     }
     const boost::shared_ptr<librdf_query_results> pResults(
         librdf_model_query_execute(m_pModel.get(), pQuery.get()),
         safe_librdf_free_query_results);
     if (!pResults || !librdf_query_results_is_graph(pResults.get())) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::queryConstruct: "
-            "query result is null or not graph")), *this);
+            "query result is null or not graph", *this);
     }
     const boost::shared_ptr<librdf_stream> pStream(
         librdf_query_results_as_stream(pResults.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::queryConstruct: "
-            "librdf_query_results_as_stream failed")), *this);
+            "librdf_query_results_as_stream failed", *this);
     }
 
     return new librdf_GraphResult(this, m_aMutex, pStream,
@@ -1405,17 +1388,17 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException)
             reinterpret_cast<const unsigned char*> (query.getStr()), NULL),
         safe_librdf_free_query);
     if (!pQuery) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::queryAsk: "
-            "librdf_new_query failed")), *this);
+            "librdf_new_query failed", *this);
     }
     const boost::shared_ptr<librdf_query_results> pResults(
         librdf_model_query_execute(m_pModel.get(), pQuery.get()),
         safe_librdf_free_query_results);
     if (!pResults || !librdf_query_results_is_boolean(pResults.get())) {
-        throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::QueryException(
             "librdf_Repository::queryAsk: "
-            "query result is null or not boolean")), *this);
+            "query result is null or not boolean", *this);
     }
     return librdf_query_results_get_boolean(pResults.get())
         ? sal_True : sal_False;
@@ -1431,33 +1414,31 @@ 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_meta( RTL_CONSTASCII_USTRINGPARAM(
-        "com.sun.star.text.InContentMetadata"));
+    static const ::rtl::OUString s_cell("com.sun.star.table.Cell");
+    static const ::rtl::OUString s_cellprops("com.sun.star.text.CellProperties"); // for writer
+    static const ::rtl::OUString s_paragraph("com.sun.star.text.Paragraph");
+    static const ::rtl::OUString s_bookmark("com.sun.star.text.Bookmark");
+    static const ::rtl::OUString s_meta("com.sun.star.text.InContentMetadata");
 
     if (!i_xSubject.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::setStatementRDFa: Subject is null")), *this, 0);
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::setStatementRDFa: Subject is null", *this, 0);
     }
     if (!i_rPredicates.getLength()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::setStatementRDFa: no Predicates")),
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::setStatementRDFa: no Predicates",
             *this, 1);
     }
     for (sal_Int32 i = 0; i < i_rPredicates.getLength(); ++i) {
         if (!i_rPredicates[i].is()) {
             throw lang::IllegalArgumentException(
-                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-                    "librdf_Repository::setStatementRDFa: Predicate is null")),
+                    "librdf_Repository::setStatementRDFa: Predicate is null",
                 *this, 1);
         }
     }
     if (!i_xObject.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::setStatementRDFa: Object is null")), *this, 2);
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::setStatementRDFa: Object is null", *this, 2);
     }
     const uno::Reference<lang::XServiceInfo> xService(i_xObject,
         uno::UNO_QUERY_THROW);
@@ -1476,20 +1457,19 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         xTextRange = xTextContent->getAnchor();
     }
     if (!xTextRange.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw lang::IllegalArgumentException(
             "librdf_Repository::setStatementRDFa: "
-            "Object does not support RDFa")), *this, 2);
+            "Object does not support RDFa", *this, 2);
     }
     // ensure that the metadatable has an XML ID
     i_xObject->ensureMetadataReference();
     const beans::StringPair mdref( i_xObject->getMetadataReference() );
     if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
-        throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
                 "librdf_Repository::setStatementRDFa: "
-                "ensureMetadataReference did not")), *this);
+                "ensureMetadataReference did not", *this);
     }
-    ::rtl::OUString const sXmlId(mdref.First +
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second);
+    ::rtl::OUString const sXmlId(mdref.First + "#" + mdref.Second);
     uno::Reference<rdf::XURI> xXmlId;
     try {
         xXmlId.set( rdf::URI::create(m_xContext,
@@ -1497,9 +1477,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             uno::UNO_QUERY_THROW);
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::setStatementRDFa: "
-                "cannot create URI for XML ID")), *this, uno::makeAny(iae));
+                "cannot create URI for XML ID", *this, uno::makeAny(iae));
     }
 
     ::osl::MutexGuard g(m_aMutex);
@@ -1518,9 +1497,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
         }
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::setStatementRDFa: "
-                "cannot create literal")), *this, uno::makeAny(iae));
+                "cannot create literal", *this, uno::makeAny(iae));
     }
     removeStatementRDFa(i_xObject);
     if (i_rRDFaContent.isEmpty()) {
@@ -1540,8 +1518,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     rdf::RepositoryException)
 {
     if (!i_xElement.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::removeStatementRDFa: Element is null")),
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::removeStatementRDFa: Element is null",
             *this, 0);
     }
 
@@ -1553,14 +1531,13 @@ 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 + "#"
                 + mdref.Second),
             uno::UNO_QUERY_THROW);
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::removeStatementRDFa: "
-                "cannot create URI for XML ID")), *this, uno::makeAny(iae));
+                "cannot create URI for XML ID", *this, uno::makeAny(iae));
     }
     // clearGraph does locking, not needed here
     clearGraph(xXmlId, true);
@@ -1573,15 +1550,14 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
     rdf::RepositoryException)
 {
     if (!i_xElement.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::getStatementRDFa: Element is null")), *this, 0);
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::getStatementRDFa: Element is null", *this, 0);
     }
     const beans::StringPair mdref( i_xElement->getMetadataReference() );
     if ((mdref.First.isEmpty()) || (mdref.Second.isEmpty())) {
         return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >();
     }
-    ::rtl::OUString const sXmlId(mdref.First +
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second);
+    ::rtl::OUString const sXmlId(mdref.First + "#" + mdref.Second);
     uno::Reference<rdf::XURI> xXmlId;
     try {
         xXmlId.set( rdf::URI::create(m_xContext,
@@ -1589,9 +1565,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
             uno::UNO_QUERY_THROW);
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::getStatementRDFa: "
-                "cannot create URI for XML ID")), *this, uno::makeAny(iae));
+                "cannot create URI for XML ID", *this, uno::makeAny(iae));
     }
 
     ::osl::MutexGuard g(m_aMutex);
@@ -1657,16 +1632,16 @@ throw (uno::RuntimeException, rdf::RepositoryException)
         librdf_model_find_statements(m_pModel.get(), pStatement.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::getStatementsRDFa: "
-            "librdf_model_find_statements failed")), *this);
+            "librdf_model_find_statements failed", *this);
     }
 
     if (librdf_stream_add_map(pStream.get(), rdfa_context_stream_map_handler,
                 0, 0)) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::getStatementsRDFa: "
-            "librdf_stream_add_map failed")), *this);
+            "librdf_stream_add_map failed", *this);
     }
 
     return new librdf_GraphResult(this, m_aMutex, pStream,
@@ -1696,16 +1671,15 @@ const NamedGraphMap_t::iterator SAL_CALL librdf_Repository::clearGraph(
 {
     if (!i_xGraphName.is()) {
         throw lang::IllegalArgumentException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::clearGraph: "
-                "URI is null")), *this, 0);
+                "librdf_Repository::clearGraph: URI is null", *this, 0);
     }
     ::osl::MutexGuard g(m_aMutex);
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     const NamedGraphMap_t::iterator iter( m_NamedGraphs.find(contextU) );
     if (!i_Internal && iter == m_NamedGraphs.end()) {
         throw container::NoSuchElementException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::clearGraph: "
-            "no graph with given URI exists")), *this);
+                "librdf_Repository::clearGraph: "
+                "no graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -1715,15 +1689,15 @@ const NamedGraphMap_t::iterator SAL_CALL librdf_Repository::clearGraph(
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::clearGraph: "
-            "librdf_new_node_from_uri_string failed")), *this);
+            "librdf_new_node_from_uri_string failed", *this);
     }
     if (librdf_model_context_remove_statements(m_pModel.get(), pContext.get()))
     {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::clearGraph: "
-            "librdf_model_context_remove_statements failed")), *this);
+            "librdf_model_context_remove_statements failed", *this);
     }
     return iter;
 }
@@ -1738,25 +1712,25 @@ void librdf_Repository::addStatementGraph(
 //    container::NoSuchElementException, rdf::RepositoryException)
 {
     if (!i_xSubject.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::addStatement: Subject is null")), *this, 0);
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::addStatement: Subject is null", *this, 0);
     }
     if (!i_xPredicate.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::addStatement: Predicate is null")),
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::addStatement: Predicate is null",
             *this, 1);
     }
     if (!i_xObject.is()) {
-        throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_Repository::addStatement: Object is null")), *this, 2);
+        throw lang::IllegalArgumentException(
+            "librdf_Repository::addStatement: Object is null", *this, 2);
     }
 
     ::osl::MutexGuard g(m_aMutex);
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (!i_Internal && (m_NamedGraphs.find(contextU) == m_NamedGraphs.end())) {
         throw container::NoSuchElementException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::addStatement: "
-            "no graph with given URI exists")), *this);
+                "librdf_Repository::addStatement: "
+                "no graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -1766,9 +1740,9 @@ void librdf_Repository::addStatementGraph(
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::addStatement: "
-            "librdf_new_node_from_uri_string failed")), *this);
+            "librdf_new_node_from_uri_string failed", *this);
     }
     const boost::shared_ptr<librdf_statement> pStatement(
         m_TypeConverter.mkStatement(m_pWorld.get(),
@@ -1790,9 +1764,9 @@ void librdf_Repository::addStatementGraph(
 
     if (librdf_model_context_add_statement(m_pModel.get(),
             pContext.get(), pStatement.get())) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::addStatement: "
-            "librdf_model_context_add_statement failed")), *this);
+            "librdf_model_context_add_statement failed", *this);
     }
 }
 
@@ -1815,9 +1789,8 @@ void librdf_Repository::removeStatementsGraph(
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (m_NamedGraphs.find(contextU) == m_NamedGraphs.end()) {
         throw container::NoSuchElementException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::removeStatements: "
-                "no graph with given URI exists")), *this);
+                "no graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -1827,9 +1800,9 @@ void librdf_Repository::removeStatementsGraph(
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::removeStatements: "
-            "librdf_new_node_from_uri_string failed")), *this);
+            "librdf_new_node_from_uri_string failed", *this);
     }
     const boost::shared_ptr<librdf_statement> pStatement(
         m_TypeConverter.mkStatement(m_pWorld.get(),
@@ -1842,24 +1815,24 @@ void librdf_Repository::removeStatementsGraph(
             pStatement.get(), pContext.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::removeStatements: "
-            "librdf_model_find_statements_in_context failed")), *this);
+            "librdf_model_find_statements_in_context failed", *this);
     }
 
     if (!librdf_stream_end(pStream.get())) {
         do {
             librdf_statement *pStmt( librdf_stream_get_object(pStream.get()) );
             if (!pStmt) {
-                throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                throw rdf::RepositoryException(
                     "librdf_Repository::removeStatements: "
-                    "librdf_stream_get_object failed")), *this);
+                    "librdf_stream_get_object failed", *this);
             }
             if (librdf_model_context_remove_statement(m_pModel.get(),
                     pContext.get(), pStmt)) {
-                throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+                throw rdf::RepositoryException(
                     "librdf_Repository::removeStatements: "
-                    "librdf_model_context_remove_statement failed")), *this);
+                    "librdf_model_context_remove_statement failed", *this);
             }
         } while (!librdf_stream_next(pStream.get()));
     }
@@ -1892,9 +1865,8 @@ librdf_Repository::getStatementsGraph(
     const ::rtl::OUString contextU( i_xGraphName->getStringValue() );
     if (!i_Internal && (m_NamedGraphs.find(contextU) == m_NamedGraphs.end())) {
         throw container::NoSuchElementException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_Repository::getStatements: "
-                "no graph with given URI exists")), *this);
+                "no graph with given URI exists", *this);
     }
     const ::rtl::OString context(
         ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) );
@@ -1904,9 +1876,9 @@ librdf_Repository::getStatementsGraph(
             reinterpret_cast<const unsigned char*> (context.getStr())),
         safe_librdf_free_node);
     if (!pContext) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_Repository::getStatements: "
-            "librdf_new_node_from_uri_string failed")), *this);
+            "librdf_new_node_from_uri_string failed", *this);
     }
     const boost::shared_ptr<librdf_statement> pStatement(
         m_TypeConverter.mkStatement(m_pWorld.get(),
@@ -1919,9 +1891,9 @@ librdf_Repository::getStatementsGraph(
             pStatement.get(), pContext.get()),
         safe_librdf_free_stream);
     if (!pStream) {
-        throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw rdf::RepositoryException(
             "librdf_Repository::getStatements: "
-            "librdf_model_find_statements_in_context failed")), *this);
+            "librdf_model_find_statements_in_context failed", *this);
     }
 
     // librdf_model_find_statements_in_context is buggy and does not put
@@ -1934,8 +1906,8 @@ librdf_world *librdf_TypeConverter::createWorld() const
     // create and initialize world
     librdf_world *pWorld( librdf_new_world() );
     if (!pWorld) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_TypeConverter::createWorld: librdf_new_world failed")),
+        throw uno::RuntimeException(
+            "librdf_TypeConverter::createWorld: librdf_new_world failed",
             m_rRep);
     }
     //FIXME logger, digest, features?
@@ -1959,8 +1931,8 @@ librdf_TypeConverter::createStorage(librdf_world *i_pWorld) const
         librdf_new_storage(i_pWorld, "hashes", NULL,
             "contexts='yes',hash-type='memory'") );
     if (!pStorage) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_TypeConverter::createStorage: librdf_new_storage failed")),
+        throw uno::RuntimeException(
+            "librdf_TypeConverter::createStorage: librdf_new_storage failed",
             m_rRep);
     }
     return pStorage;
@@ -1971,8 +1943,8 @@ librdf_model *librdf_TypeConverter::createModel(
 {
     librdf_model *pRepository( librdf_new_model(i_pWorld, i_pStorage, NULL) );
     if (!pRepository) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_TypeConverter::createModel: librdf_new_model failed")),
+        throw uno::RuntimeException(
+            "librdf_TypeConverter::createModel: librdf_new_model failed",
             m_rRep);
     }
     //FIXME
@@ -2003,8 +1975,8 @@ librdf_uri* librdf_TypeConverter::mkURI( librdf_world* i_pWorld,
     librdf_uri *pURI( librdf_new_uri(i_pWorld,
         reinterpret_cast<const unsigned char *>(uri.getStr())));
     if (!pURI) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_TypeConverter::mkURI: librdf_new_uri failed")), 0);
+        throw uno::RuntimeException(
+            "librdf_TypeConverter::mkURI: librdf_new_uri failed", 0);
     }
     return pURI;
 }
@@ -2023,9 +1995,9 @@ librdf_node* librdf_TypeConverter::mkResource( librdf_world* i_pWorld,
             librdf_new_node_from_blank_identifier(i_pWorld,
                 reinterpret_cast<const unsigned char*> (label.getStr())));
         if (!pNode) {
-            throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            throw uno::RuntimeException(
                 "librdf_TypeConverter::mkResource: "
-                "librdf_new_node_from_blank_identifier failed")), 0);
+                "librdf_new_node_from_blank_identifier failed", 0);
         }
         return pNode;
     } else { // assumption: everything else is URI
@@ -2036,9 +2008,9 @@ librdf_node* librdf_TypeConverter::mkResource( librdf_world* i_pWorld,
             librdf_new_node_from_uri_string(i_pWorld,
                 reinterpret_cast<const unsigned char*> (uri.getStr())));
         if (!pNode) {
-            throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            throw uno::RuntimeException(
                 "librdf_TypeConverter::mkResource: "
-                "librdf_new_node_from_uri_string failed")), 0);
+                "librdf_new_node_from_uri_string failed", 0);
         }
         return pNode;
     }
@@ -2089,9 +2061,8 @@ librdf_node* librdf_TypeConverter::mkNode( librdf_world* i_pWorld,
         }
     }
     if (!ret) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-            "librdf_TypeConverter::mkNode: "
-            "librdf_new_node_from_literal failed")), 0);
+        throw uno::RuntimeException(
+            "librdf_TypeConverter::mkNode: librdf_new_node_from_literal failed", 0);
     }
     return ret;
 }
@@ -2122,9 +2093,9 @@ librdf_statement* librdf_TypeConverter::mkStatement( librdf_world* i_pWorld,
     librdf_statement* pStatement( librdf_new_statement_from_nodes(i_pWorld,
         pSubject, pPredicate, pObject) );
     if (!pStatement) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_TypeConverter::mkStatement: "
-            "librdf_new_statement_from_nodes failed")), 0);
+            "librdf_new_statement_from_nodes failed", 0);
     }
     return pStatement;
 }
@@ -2135,9 +2106,9 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const
     if (!i_pURI) return 0;
     const unsigned char* uri( librdf_uri_as_string(i_pURI) );
     if (!uri) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_TypeConverter::convertToXURI: "
-            "librdf_uri_as_string failed")), m_rRep);
+            "librdf_uri_as_string failed", m_rRep);
     }
     ::rtl::OUString uriU( ::rtl::OStringToOUString(
         ::rtl::OString(reinterpret_cast<const sal_Char*>(uri)),
@@ -2146,9 +2117,8 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const
         return rdf::URI::create(m_xContext, uriU);
     } catch (const lang::IllegalArgumentException & iae) {
         throw lang::WrappedTargetRuntimeException(
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                 "librdf_TypeConverter::convertToXURI: "
-                "illegal uri")), m_rRep, uno::makeAny(iae));
+                "illegal uri", m_rRep, uno::makeAny(iae));
     }
 }
 
@@ -2159,9 +2129,9 @@ librdf_TypeConverter::convertToXURI(librdf_node* i_pNode) const
     if (librdf_node_is_resource(i_pNode)) {
         librdf_uri* pURI( librdf_node_get_uri(i_pNode) );
         if (!pURI) {
-            throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            throw uno::RuntimeException(
                 "librdf_TypeConverter::convertToXURI: "
-                "resource has no uri")), m_rRep);
+                "resource has no uri", m_rRep);
         }
         return convertToXURI(pURI);
     } else {
@@ -2177,9 +2147,9 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
     if (librdf_node_is_blank(i_pNode)) {
         const unsigned char* label( librdf_node_get_blank_identifier(i_pNode) );
         if (!label) {
-            throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+            throw uno::RuntimeException(
                 "librdf_TypeConverter::convertToXResource: "
-                "blank node has no label")), m_rRep);
+                "blank node has no label", m_rRep);
         }
         ::rtl::OUString labelU( ::rtl::OStringToOUString(
             ::rtl::OString(reinterpret_cast<const sal_Char*>(label)),
@@ -2189,9 +2159,8 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const
                 rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY);
         } catch (const lang::IllegalArgumentException & iae) {
             throw lang::WrappedTargetRuntimeException(
-                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                     "librdf_TypeConverter::convertToXResource: "
-                    "illegal blank node label")), m_rRep, uno::makeAny(iae));
+                    "illegal blank node label", m_rRep, uno::makeAny(iae));
         }
     } else {
         return uno::Reference<rdf::XResource>(convertToXURI(i_pNode),
@@ -2209,9 +2178,9 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const
     }
     const unsigned char* value( librdf_node_get_literal_value(i_pNode) );
     if (!value) {
-        throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+        throw uno::RuntimeException(
             "librdf_TypeConverter::convertToXNode: "
-            "literal has no value")), m_rRep);
+            "literal has no value", m_rRep);
     }
     const char * lang( librdf_node_get_literal_value_language(i_pNode) );
     librdf_uri* pType(
@@ -2262,15 +2231,13 @@ librdf_TypeConverter::convertToStatement(librdf_statement* i_pStmt,
 namespace comp_librdf_Repository {
 
 ::rtl::OUString SAL_CALL _getImplementationName() {
-    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-        "librdf_Repository"));
+    return rtl::OUString("librdf_Repository");
 }
 
 uno::Sequence< ::rtl::OUString > SAL_CALL _getSupportedServiceNames()
 {
     uno::Sequence< ::rtl::OUString > s(1);
-    s[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-        "com.sun.star.rdf.Repository"));
+    s[0] = "com.sun.star.rdf.Repository";
     return s;
 }
 
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index dac4b2e..2c43664 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -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);
diff --git a/unoxml/test/domtest.cxx b/unoxml/test/domtest.cxx
index a9d95b5..789c984 100644
--- a/unoxml/test/domtest.cxx
+++ b/unoxml/test/domtest.cxx
@@ -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);


More information about the Libreoffice-commits mailing list