diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 20:09:46 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 20:09:46 +0200 |
commit | ae2ebf8fac893aeb2a328918ce1b12ef6834f16d (patch) | |
tree | d75f454c5866f8c605245814daadd7fafa1ec98d /unoxml | |
parent | 6e135ba19ae197fa6b1ca65034ad3dc8876a6be0 (diff) | |
parent | 7aedcad054e814a904e8378a75632b42a3295e92 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
filter/source/config/cache/filtercache.cxx
filter/source/odfflatxml/makefile.mk
oox/Library_oox.mk
oox/Makefile
oox/Module_oox.mk
oox/Package_generated.mk
oox/Package_inc.mk
oox/prj/build.lst
oox/prj/d.lst
oox/prj/makefile.mk
oox/source/dump/makefile.mk
unoxml/Library_unordf.mk
unoxml/Library_unoxml.mk
writerfilter/CppunitTest_writerfilter_doctok.mk
writerfilter/Library_writerfilter.mk
writerfilter/Module_writerfilter.mk
writerfilter/Package_inc.mk
writerfilter/inc/resourcemodel/TagLogger.hxx
writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
writerfilter/prj/build.lst
writerfilter/prj/makefile.mk
writerfilter/qa/complex/ooxml/makefile.mk
writerfilter/qa/cppunittests/doctok/makefile.mk
writerfilter/qa/cppunittests/doctok/testdoctok.cxx
writerfilter/qa/cppunittests/xxml/testXXML.cxx
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/DomainMapperTableHandler.cxx
writerfilter/source/dmapper/DomainMapperTableManager.cxx
writerfilter/source/dmapper/DomainMapper_Impl.cxx
writerfilter/source/dmapper/FontTable.cxx
writerfilter/source/dmapper/GraphicHelpers.cxx
writerfilter/source/dmapper/PropertyIds.cxx
writerfilter/source/dmapper/PropertyMap.cxx
writerfilter/source/dmapper/SettingsTable.cxx
writerfilter/source/dmapper/StyleSheetTable.cxx
writerfilter/source/dmapper/TablePropertiesHandler.cxx
writerfilter/source/dmapper/TblStylePrHandler.cxx
writerfilter/source/dmapper/ThemeTable.cxx
writerfilter/source/doctok/WW8DocumentImpl.cxx
writerfilter/source/doctok/resourcesimpl.xsl
writerfilter/source/filter/WriterFilter.cxx
writerfilter/source/generated.mk
writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
writerfilter/source/ooxml/OOXMLFactory.cxx
writerfilter/source/ooxml/OOXMLFactory.hxx
writerfilter/source/ooxml/OOXMLStreamImpl.cxx
writerfilter/source/ooxml/RefAndPointer.hxx
writerfilter/source/resourcemodel/TagLogger.cxx
writerfilter/unocomponent/component.cxx
writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx
Diffstat (limited to 'unoxml')
76 files changed, 554 insertions, 375 deletions
diff --git a/unoxml/Library_unordf.mk b/unoxml/Library_unordf.mk index e4350aabc76a..0e1fe61e816a 100644 --- a/unoxml/Library_unordf.mk +++ b/unoxml/Library_unordf.mk @@ -38,7 +38,6 @@ $(eval $(call gb_Library_add_linked_libs,unordf,\ cppuhelper \ cppu \ sal \ - stl \ $(gb_STDLIBS) \ )) diff --git a/unoxml/Library_unoxml.mk b/unoxml/Library_unoxml.mk index 44ead4e9e550..3303e5df6cf7 100644 --- a/unoxml/Library_unoxml.mk +++ b/unoxml/Library_unoxml.mk @@ -41,7 +41,6 @@ $(eval $(call gb_Library_add_linked_libs,unoxml,\ cppuhelper \ cppu \ sal \ - stl \ $(gb_STDLIBS) \ )) diff --git a/unoxml/qa/complex/unoxml/DOMTest.java b/unoxml/qa/complex/unoxml/DOMTest.java index e7efad8ab5a7..d4b9a5fcf3b6 100644 --- a/unoxml/qa/complex/unoxml/DOMTest.java +++ b/unoxml/qa/complex/unoxml/DOMTest.java @@ -98,7 +98,8 @@ public class DOMTest //FIXME TODO } - @Test public void testXDocumentBuilder() throws Exception + @Test + public void testXDocumentBuilder() throws Exception { XDocumentBuilder xBuilder = UnoRuntime.queryInterface(XDocumentBuilder.class, diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java index 3cf203325a70..7944a0edc064 100644 --- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java +++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java @@ -361,7 +361,8 @@ public class RDFRepositoryTest } } - @Test public void checkSPARQL() + @Test + public void checkSPARQL() { try { diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index 8851c3ada86b..ddfbe21fdf2f 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -269,3 +270,5 @@ namespace DOM } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/attr.hxx b/unoxml/source/dom/attr.hxx index 824f042a2b85..9a712ccf715b 100644 --- a/unoxml/source/dom/attr.hxx +++ b/unoxml/source/dom/attr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -216,3 +217,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx index 3cec81767d9e..539320df62b9 100644 --- a/unoxml/source/dom/attributesmap.cxx +++ b/unoxml/source/dom/attributesmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -242,3 +243,5 @@ namespace DOM return xRet; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/attributesmap.hxx b/unoxml/source/dom/attributesmap.hxx index b987349c9194..bb2cd6aa0a56 100644 --- a/unoxml/source/dom/attributesmap.hxx +++ b/unoxml/source/dom/attributesmap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/cdatasection.cxx b/unoxml/source/dom/cdatasection.cxx index 6f8035a793b3..41637696f96a 100644 --- a/unoxml/source/dom/cdatasection.cxx +++ b/unoxml/source/dom/cdatasection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,7 +53,7 @@ namespace DOM OUString SAL_CALL CCDATASection::getNodeName()throw (RuntimeException) { - return OUString::createFromAscii("#cdata-section"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("#cdata-section")); } OUString SAL_CALL CCDATASection::getNodeValue() throw (RuntimeException) @@ -60,3 +61,5 @@ namespace DOM return CCharacterData::getData(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/cdatasection.hxx b/unoxml/source/dom/cdatasection.hxx index d809ef7e7f76..2eb0afc194ac 100644 --- a/unoxml/source/dom/cdatasection.hxx +++ b/unoxml/source/dom/cdatasection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -233,3 +234,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx index 6cd3d9f2c1d5..39bdc788ddae 100644 --- a/unoxml/source/dom/characterdata.cxx +++ b/unoxml/source/dom/characterdata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,9 +52,9 @@ namespace DOM { Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMCharacterDataModified")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMCharacterDataModified"))), UNO_QUERY); event->initMutationEvent( - OUString::createFromAscii("DOMCharacterDataModified"), + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMCharacterDataModified")), sal_True, sal_False, Reference< XNode >(), prevValue, newValue, OUString(), (AttrChangeType)0 ); dispatchEvent(Reference< XEvent >(event, UNO_QUERY)); @@ -93,7 +94,7 @@ namespace DOM ::boost::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); OString aData(reinterpret_cast<sal_Char const*>(pContent.get())); - OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8); + OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; e.Code = DOMExceptionType_INDEX_SIZE_ERR; @@ -164,7 +165,7 @@ namespace DOM ::boost::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); OString aData(reinterpret_cast<sal_Char const*>(pContent.get())); - OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8); + OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0) { DOMException e; e.Code = DOMExceptionType_INDEX_SIZE_ERR; @@ -199,7 +200,7 @@ namespace DOM ::boost::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); OString aData(reinterpret_cast<sal_Char const*>(pContent.get())); - OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8); + OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0){ DOMException e; e.Code = DOMExceptionType_INDEX_SIZE_ERR; @@ -254,7 +255,7 @@ namespace DOM ::boost::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); OString aData(reinterpret_cast<sal_Char const*>(pContent.get())); - OUString tmp(aData, aData.getLength(), RTL_TEXTENCODING_UTF8); + OUString tmp(rtl::OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; e.Code = DOMExceptionType_INDEX_SIZE_ERR; @@ -268,3 +269,4 @@ namespace DOM } // namspace DOM +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/characterdata.hxx b/unoxml/source/dom/characterdata.hxx index 9639108f1e85..85d4d1fc857b 100644 --- a/unoxml/source/dom/characterdata.hxx +++ b/unoxml/source/dom/characterdata.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -244,3 +245,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/childlist.cxx b/unoxml/source/dom/childlist.cxx index 3c80c664204e..28731cef8c63 100644 --- a/unoxml/source/dom/childlist.cxx +++ b/unoxml/source/dom/childlist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -91,3 +92,5 @@ namespace DOM return 0; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/childlist.hxx b/unoxml/source/dom/childlist.hxx index f23617e49806..d9d96db13429 100644 --- a/unoxml/source/dom/childlist.hxx +++ b/unoxml/source/dom/childlist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/comment.cxx b/unoxml/source/dom/comment.cxx index d1ea6d83e3e9..e2bd7ec26c32 100644 --- a/unoxml/source/dom/comment.cxx +++ b/unoxml/source/dom/comment.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,7 +50,7 @@ namespace DOM OUString SAL_CALL CComment::getNodeName()throw (RuntimeException) { - return OUString::createFromAscii("#comment"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("#comment")); } OUString SAL_CALL CComment::getNodeValue() throw (RuntimeException) @@ -57,3 +58,5 @@ namespace DOM return CCharacterData::getData(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/comment.hxx b/unoxml/source/dom/comment.hxx index 0aed0cf6a09b..d18b94c12590 100644 --- a/unoxml/source/dom/comment.hxx +++ b/unoxml/source/dom/comment.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -227,3 +228,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index 14d72555157a..50f4dc1c52e2 100644 --- a/unoxml/source/dom/document.cxx +++ b/unoxml/source/dom/document.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -385,7 +386,7 @@ namespace DOM while (iter1 != streamListeners.end()) { Reference< XStreamListener > aListener = *iter1; aListener->started(); - iter1++; + ++iter1; } { @@ -406,7 +407,7 @@ namespace DOM while (iter2 != streamListeners.end()) { Reference< XStreamListener > aListener = *iter2; aListener->closed(); - iter2++; + ++iter2; } } @@ -807,7 +808,7 @@ namespace DOM if (aNsUri.getLength() > 0) { if (aNsPrefix.getLength() > 0) { - aQName = aNsPrefix + OUString::createFromAscii(":") + aQName = aNsPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aQName; } xNewElement = xDocument->createElementNS(aNsUri, aQName); @@ -831,7 +832,7 @@ namespace DOM { if (aAttrPrefix.getLength() > 0) { aAttrName = aAttrPrefix + - OUString::createFromAscii(":") + aAttrName; + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aAttrName; } xNewElement->setAttributeNS( aAttrUri, aAttrName, sValue); @@ -904,10 +905,10 @@ namespace DOM { Reference< XDocumentEvent > const xDocevent(xDocument, UNO_QUERY); Reference< XMutationEvent > const event(xDocevent->createEvent( - OUString::createFromAscii("DOMNodeInsertedIntoDocument")), + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument"))), UNO_QUERY_THROW); event->initMutationEvent( - OUString::createFromAscii("DOMNodeInsertedIntoDocument") + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInsertedIntoDocument")) , sal_True, sal_False, Reference< XNode >(), OUString(), OUString(), OUString(), (AttrChangeType)0 ); Reference< XEventTarget > const xDocET(xDocument, UNO_QUERY); @@ -952,7 +953,7 @@ namespace DOM OUString SAL_CALL CDocument::getNodeName()throw (RuntimeException) { // does not need mutex currently - return OUString::createFromAscii("#document"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("#document")); } OUString SAL_CALL CDocument::getNodeValue() throw (RuntimeException) @@ -982,29 +983,29 @@ namespace DOM // does not need mutex currently events::CEvent *pEvent = 0; if ( - aType.compareToAscii("DOMSubtreeModified") == 0|| - aType.compareToAscii("DOMNodeInserted") == 0|| - aType.compareToAscii("DOMNodeRemoved") == 0|| - aType.compareToAscii("DOMNodeRemovedFromDocument") == 0|| - aType.compareToAscii("DOMNodeInsertedIntoDocument") == 0|| - aType.compareToAscii("DOMAttrModified") == 0|| - aType.compareToAscii("DOMCharacterDataModified") == 0) + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMSubtreeModified")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeInserted")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeRemoved")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeRemovedFromDocument")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeInsertedIntoDocument")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMAttrModified")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMCharacterDataModified"))) { pEvent = new events::CMutationEvent; } else if ( - aType.compareToAscii("DOMFocusIn") == 0|| - aType.compareToAscii("DOMFocusOut") == 0|| - aType.compareToAscii("DOMActivate") == 0) + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMFocusIn")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMFocusOut")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMActivate"))) { pEvent = new events::CUIEvent; } else if ( - aType.compareToAscii("click") == 0|| - aType.compareToAscii("mousedown") == 0|| - aType.compareToAscii("mouseup") == 0|| - aType.compareToAscii("mouseover") == 0|| - aType.compareToAscii("mousemove") == 0|| - aType.compareToAscii("mouseout") == 0 ) + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("click")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mousedown")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseup")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseover")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mousemove")) || + aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseout")) ) { pEvent = new events::CMouseEvent; } @@ -1086,3 +1087,5 @@ namespace DOM fastSaxify(aContext); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/document.hxx b/unoxml/source/dom/document.hxx index c85a85fba9a6..7045603b06d6 100644 --- a/unoxml/source/dom/document.hxx +++ b/unoxml/source/dom/document.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -396,3 +397,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 695ccb670e4c..b5c19d0a5a40 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,8 +83,8 @@ namespace DOM Content aContent(sSystemId, aEnvironment); is.aInputStream = aContent.openStream(); - } catch (com::sun::star::uno::Exception) { - OSL_ENSURE(sal_False, "exception in default entity resolver"); + } catch (const com::sun::star::uno::Exception&) { + OSL_FAIL("exception in default entity resolver"); is.aInputStream = Reference< XInputStream >(); } return is; @@ -221,7 +222,7 @@ namespace DOM return nread; } catch (com::sun::star::uno::Exception& ex) { (void) ex; - OSL_ENSURE(sal_False, OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); + OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; } } @@ -241,7 +242,7 @@ namespace DOM return 0; } catch (com::sun::star::uno::Exception& ex) { (void) ex; - OSL_ENSURE(sal_False, OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); + OSL_FAIL(OUStringToOString(ex.Message, RTL_TEXTENCODING_UTF8).getStr()); return -1; } } @@ -289,30 +290,30 @@ namespace DOM } #endif - // default warning handler triggers assertion + // default warning handler does not trigger assertion static void warning_func(void * ctx, const char * /*msg*/, ...) { - OUStringBuffer buf(OUString::createFromAscii("libxml2 warning\n")); + OUStringBuffer buf(OUString(RTL_CONSTASCII_USTRINGPARAM("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()); + OSL_TRACE(msg.getStr()); } // default error handler triggers assertion static void error_func(void * ctx, const char * /*msg*/, ...) { - OUStringBuffer buf(OUString::createFromAscii("libxml2 error\n")); + OUStringBuffer buf(OUString(RTL_CONSTASCII_USTRINGPARAM("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()); + OSL_FAIL(msg.getStr()); } } // extern "C" - void throwEx(xmlParserCtxtPtr ctxt) { - OUString msg = make_error_message(ctxt); + void throwEx(xmlParserCtxtPtr ctxt) + { com::sun::star::xml::sax::SAXParseException saxex; - saxex.Message = msg; + saxex.Message = make_error_message(ctxt); saxex.LineNumber = static_cast<sal_Int32>(ctxt->lastError.line); saxex.ColumnNumber = static_cast<sal_Int32>(ctxt->lastError.int2); throw saxex; @@ -410,3 +411,5 @@ namespace DOM m_xErrorHandler = xEH; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documentbuilder.hxx b/unoxml/source/dom/documentbuilder.hxx index ea1bfcc603e8..3cb47696da96 100644 --- a/unoxml/source/dom/documentbuilder.hxx +++ b/unoxml/source/dom/documentbuilder.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -163,3 +164,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documentfragment.cxx b/unoxml/source/dom/documentfragment.cxx index 683938e7f1e4..1a7954b0c5bb 100644 --- a/unoxml/source/dom/documentfragment.cxx +++ b/unoxml/source/dom/documentfragment.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,10 +55,12 @@ namespace DOM OUString SAL_CALL CDocumentFragment::getNodeName()throw (RuntimeException) { - return OUString::createFromAscii("#document-fragment"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("#document-fragment")); } OUString SAL_CALL CDocumentFragment::getNodeValue() throw (RuntimeException) { return OUString(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documentfragment.hxx b/unoxml/source/dom/documentfragment.hxx index 6236d5ca453a..7e08150a832e 100644 --- a/unoxml/source/dom/documentfragment.hxx +++ b/unoxml/source/dom/documentfragment.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,4 @@ namespace DOM } #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documenttype.cxx b/unoxml/source/dom/documenttype.cxx index f105e804ec9f..6c7103d57533 100644 --- a/unoxml/source/dom/documenttype.cxx +++ b/unoxml/source/dom/documenttype.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -142,3 +143,5 @@ namespace DOM return OUString(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/documenttype.hxx b/unoxml/source/dom/documenttype.hxx index ca276bb384e8..5f5ee5a1f449 100644 --- a/unoxml/source/dom/documenttype.hxx +++ b/unoxml/source/dom/documenttype.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -223,3 +224,5 @@ namespace DOM }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/domimplementation.cxx b/unoxml/source/dom/domimplementation.cxx index 6f4cc692cba8..95d01d3c4b29 100644 --- a/unoxml/source/dom/domimplementation.cxx +++ b/unoxml/source/dom/domimplementation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,5 @@ namespace DOM return sal_False; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/domimplementation.hxx b/unoxml/source/dom/domimplementation.hxx index 53895287e59c..5ef1aa254224 100644 --- a/unoxml/source/dom/domimplementation.hxx +++ b/unoxml/source/dom/domimplementation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ namespace DOM }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index c034ca1257d2..9259caa318e0 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -60,16 +61,16 @@ namespace DOM if (!i_xHandler.is()) throw RuntimeException(); comphelper::AttributeList *pAttrs = new comphelper::AttributeList(); - OUString type = OUString::createFromAscii(""); + OUString type = OUString(); // add namespace definitions to attributes for (xmlNsPtr pNs = m_aNodePtr->nsDef; pNs != 0; pNs = pNs->next) { const xmlChar *pPrefix = pNs->prefix; OUString prefix(reinterpret_cast<const sal_Char*>(pPrefix), strlen(reinterpret_cast<const char*>(pPrefix)), RTL_TEXTENCODING_UTF8); - OUString name = (prefix.equalsAscii("")) - ? OUString::createFromAscii("xmlns") - : OUString::createFromAscii("xmlns:") + prefix; + OUString name = (prefix.getLength() == 0) + ? OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns")) + : OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:")) + prefix; const xmlChar *pHref = pNs->href; OUString val(reinterpret_cast<const sal_Char*>(pHref), strlen(reinterpret_cast<const char*>(pHref)), @@ -578,12 +579,12 @@ namespace DOM reinterpret_cast<xmlNodePtr>(res)).get()), UNO_QUERY_THROW); - // attribute adition event + // attribute addition event // dispatch DOMAttrModified event Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMAttrModified")), UNO_QUERY); - event->initMutationEvent(OUString::createFromAscii("DOMAttrModified"), + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY); + event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified")), sal_True, sal_False, Reference< XNode >(xAttr, UNO_QUERY), OUString(), xAttr->getValue(), xAttr->getName(), AttrChangeType_ADDITION); @@ -647,8 +648,8 @@ namespace DOM // dispatch DOMAttrModified event Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMAttrModified")), UNO_QUERY); - event->initMutationEvent(OUString::createFromAscii("DOMAttrModified"), + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY); + event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified")), sal_True, sal_False, Reference< XNode >(getAttributeNode(name), UNO_QUERY), oldValue, value, name, aChangeType); @@ -729,9 +730,9 @@ namespace DOM // dispatch DOMAttrModified event Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMAttrModified")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMAttrModified"))), UNO_QUERY); event->initMutationEvent( - OUString::createFromAscii("DOMAttrModified"), + OUString(RTL_CONSTASCII_USTRINGPARAM("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,7 +779,7 @@ namespace DOM throw (RuntimeException, DOMException) { if ((aName.getLength() <= 0) || - (0 <= aName.indexOf(OUString::createFromAscii(":")))) + (0 <= aName.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM(":"))))) { DOMException e; e.Code = DOMExceptionType_INVALID_CHARACTER_ERR; @@ -796,3 +797,5 @@ namespace DOM } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/element.hxx b/unoxml/source/dom/element.hxx index 58891ed0d21c..a425becb131e 100644 --- a/unoxml/source/dom/element.hxx +++ b/unoxml/source/dom/element.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -303,3 +304,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index 92285cca8ce0..f12795273882 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,14 +65,14 @@ namespace DOM try { Reference< XEventTarget > const xTarget( static_cast<XElement*>(& rElement), UNO_QUERY_THROW); - OUString aType = OUString::createFromAscii("DOMSubtreeModified"); + OUString aType(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified")); sal_Bool capture = sal_False; xTarget->addEventListener(aType, Reference< XEventListener >(this), capture); } catch (Exception &e){ OString aMsg("Exception caught while registering NodeList as listener:\n"); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE(sal_False, aMsg.getStr()); + OSL_FAIL(aMsg.getStr()); } } @@ -153,3 +154,5 @@ namespace DOM m_bRebuild = true; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/elementlist.hxx b/unoxml/source/dom/elementlist.hxx index 95b9960e700f..eeb2cd89094f 100644 --- a/unoxml/source/dom/elementlist.hxx +++ b/unoxml/source/dom/elementlist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entitiesmap.cxx b/unoxml/source/dom/entitiesmap.cxx index aab2f5551332..381e8945f609 100644 --- a/unoxml/source/dom/entitiesmap.cxx +++ b/unoxml/source/dom/entitiesmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -132,3 +133,5 @@ namespace DOM return Reference< XNode >(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entitiesmap.hxx b/unoxml/source/dom/entitiesmap.hxx index 468e897639db..83703991f898 100644 --- a/unoxml/source/dom/entitiesmap.hxx +++ b/unoxml/source/dom/entitiesmap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx index 3fb1790ab621..134d78c8d4bc 100644 --- a/unoxml/source/dom/entity.cxx +++ b/unoxml/source/dom/entity.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,3 +113,5 @@ namespace DOM return OUString(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entity.hxx b/unoxml/source/dom/entity.hxx index 671ad8af91cf..dea53fd421ab 100644 --- a/unoxml/source/dom/entity.hxx +++ b/unoxml/source/dom/entity.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -208,3 +209,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entityreference.cxx b/unoxml/source/dom/entityreference.cxx index 0dda6bc3f495..de773f2f88c7 100644 --- a/unoxml/source/dom/entityreference.cxx +++ b/unoxml/source/dom/entityreference.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,5 @@ namespace DOM return OUString(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/entityreference.hxx b/unoxml/source/dom/entityreference.hxx index d4e349076453..ff2dc2542fa4 100644 --- a/unoxml/source/dom/entityreference.hxx +++ b/unoxml/source/dom/entityreference.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,5 @@ namespace DOM }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index fb95fa6ade02..8cbcfc534a7d 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,6 +43,8 @@ #include <com/sun/star/xml/sax/FastToken.hpp> +#include <comphelper/servicehelper.hxx> + #include <document.hxx> #include <attr.hxx> #include <childlist.hxx> @@ -53,19 +56,9 @@ using namespace ::com::sun::star; - -namespace { - struct UnoTunnelId - : public ::rtl::StaticWithInit< Sequence<sal_Int8>, UnoTunnelId > - { - Sequence<sal_Int8> operator() () - { - Sequence<sal_Int8> ret(16); - rtl_createUuid( - reinterpret_cast<sal_uInt8*>(ret.getArray()), 0, sal_True); - return ret; - } - }; +namespace +{ + class theCNodeUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theCNodeUnoTunnelId > {}; } namespace DOM @@ -86,8 +79,9 @@ namespace DOM // add node's namespaces to current context for (xmlNsPtr pNs = pNode->nsDef; pNs != 0; pNs = pNs->next) { const xmlChar *pPrefix = pNs->prefix; + // prefix can be NULL when xmlns attribute is empty (xmlns="") OString prefix(reinterpret_cast<const sal_Char*>(pPrefix), - strlen(reinterpret_cast<const char*>(pPrefix))); + pPrefix ? strlen(reinterpret_cast<const char*>(pPrefix)) : 0); const xmlChar *pHref = pNs->href; OUString val(reinterpret_cast<const sal_Char*>(pHref), strlen(reinterpret_cast<const char*>(pHref)), @@ -190,7 +184,7 @@ namespace DOM if (!xUnoTunnel.is()) { return 0; } CNode *const pCNode( reinterpret_cast< CNode* >( ::sal::static_int_cast< sal_IntPtr >( - xUnoTunnel->getSomething(UnoTunnelId::get())))); + xUnoTunnel->getSomething(theCNodeUnoTunnelId::get().getSeq())))); return pCNode; } @@ -382,8 +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::createFromAscii("DOMNodeInserted")), UNO_QUERY); - event->initMutationEvent(OUString::createFromAscii("DOMNodeInserted") + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInserted"))), UNO_QUERY); + event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeInserted")) , sal_True, sal_False, this, OUString(), OUString(), OUString(), (AttrChangeType)0 ); @@ -822,8 +816,8 @@ namespace DOM */ Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMNodeRemoved")), UNO_QUERY); - event->initMutationEvent(OUString::createFromAscii("DOMNodeRemoved"), + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeRemoved"))), UNO_QUERY); + event->initMutationEvent(OUString(RTL_CONSTASCII_USTRINGPARAM("DOMNodeRemoved")), sal_True, sal_False, this, @@ -956,9 +950,9 @@ namespace DOM // target is _this_ node Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); Reference< XMutationEvent > event(docevent->createEvent( - OUString::createFromAscii("DOMSubtreeModified")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified"))), UNO_QUERY); event->initMutationEvent( - OUString::createFromAscii("DOMSubtreeModified"), sal_True, + OUString(RTL_CONSTASCII_USTRINGPARAM("DOMSubtreeModified")), sal_True, sal_False, Reference< XNode >(), OUString(), OUString(), OUString(), (AttrChangeType)0 ); dispatchEvent(Reference< XEvent >(event, UNO_QUERY)); @@ -1051,7 +1045,7 @@ namespace DOM throw (RuntimeException) { if ((rId.getLength() == 16) && - (0 == rtl_compareMemory(UnoTunnelId::get().getConstArray(), + (0 == rtl_compareMemory(theCNodeUnoTunnelId::get().getSeq().getConstArray(), rId.getConstArray(), 16))) { return ::sal::static_int_cast< sal_Int64 >( @@ -1061,3 +1055,4 @@ namespace DOM } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/node.hxx b/unoxml/source/dom/node.hxx index 6d9c4afcfafb..3d0ff86afab7 100644 --- a/unoxml/source/dom/node.hxx +++ b/unoxml/source/dom/node.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,8 +29,6 @@ #ifndef DOM_NODE_HXX #define DOM_NODE_HXX -#include <hash_map> - #include <libxml/tree.h> #include <sal/types.h> @@ -54,6 +53,7 @@ #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/xml/sax/XFastDocumentHandler.hpp> +#include <boost/unordered_map.hpp> using ::rtl::OUString; using ::rtl::OString; @@ -89,7 +89,7 @@ namespace DOM }; typedef std::vector< std::vector<Namespace> > NamespaceVectorType; - typedef std::hash_map< OUString, + typedef boost::unordered_map< OUString, sal_Int32, rtl::OUStringHash > NamespaceMapType; @@ -349,3 +349,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/notation.cxx b/unoxml/source/dom/notation.cxx index 5988d1a9761f..63a6d6ec869e 100644 --- a/unoxml/source/dom/notation.cxx +++ b/unoxml/source/dom/notation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,5 @@ namespace DOM return OUString(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/notation.hxx b/unoxml/source/dom/notation.hxx index c98e81b353a3..414bc0e80cf4 100644 --- a/unoxml/source/dom/notation.hxx +++ b/unoxml/source/dom/notation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -197,3 +198,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/notationsmap.cxx b/unoxml/source/dom/notationsmap.cxx index a37fed98cc04..171baa96365f 100644 --- a/unoxml/source/dom/notationsmap.cxx +++ b/unoxml/source/dom/notationsmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,5 @@ namespace DOM return Reference< XNode >(); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/notationsmap.hxx b/unoxml/source/dom/notationsmap.hxx index 42648311374b..b4355e903da0 100644 --- a/unoxml/source/dom/notationsmap.hxx +++ b/unoxml/source/dom/notationsmap.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/processinginstruction.cxx b/unoxml/source/dom/processinginstruction.cxx index b604a3284032..aa119c7ade0f 100644 --- a/unoxml/source/dom/processinginstruction.cxx +++ b/unoxml/source/dom/processinginstruction.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -141,3 +142,5 @@ namespace DOM return setData(rNodeValue); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/processinginstruction.hxx b/unoxml/source/dom/processinginstruction.hxx index 4bf8d52f3c41..41ee9f6f17c6 100644 --- a/unoxml/source/dom/processinginstruction.hxx +++ b/unoxml/source/dom/processinginstruction.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -202,3 +203,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx index 524e4353e2a2..6b73cbfb733f 100644 --- a/unoxml/source/dom/saxbuilder.cxx +++ b/unoxml/source/dom/saxbuilder.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -175,7 +176,7 @@ namespace DOM throw SAXException(); Reference< XDocumentBuilder > aBuilder(m_aServiceManager->createInstance( - OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), UNO_QUERY_THROW); + OUString(RTL_CONSTASCII_USTRINGPARAM("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; @@ -225,12 +226,12 @@ namespace DOM attr_qname = attribs->getNameByIndex(i); attr_value = attribs->getValueByIndex(i); // new prefix mapping - if (attr_qname.indexOf(OUString::createFromAscii("xmlns:")) == 0) + if (attr_qname.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns:"))) == 0) { newprefix = attr_qname.copy(attr_qname.indexOf(':')+1); aNSMap.insert(NSMap::value_type(newprefix, attr_value)); } - else if (attr_qname == OUString::createFromAscii("xmlns")) + else if (attr_qname == OUString(RTL_CONSTASCII_USTRINGPARAM("xmlns"))) { // new default prefix aNSMap.insert(NSMap::value_type(OUString(), attr_value)); @@ -279,10 +280,8 @@ namespace DOM attr_qname = a->first; attr_value = a->second; idx = attr_qname.indexOf(':'); - if(idx != -1) - { + if (idx != -1) aPrefix = attr_qname.copy(0, idx); - } else aPrefix = OUString(); @@ -291,11 +290,13 @@ namespace DOM { // set attribute with namespace aElement->setAttributeNS(result->second, attr_qname, attr_value); - } else { + } + else + { // set attribute without namespace aElement->setAttribute(attr_qname, attr_value); - } - a++; + } + ++a; } m_aNSStack.push(aNSMap); } @@ -318,7 +319,7 @@ namespace DOM OUString aRefName; OUString aPrefix = aElement->getPrefix(); if (aPrefix.getLength() > 0) - aRefName = aPrefix + OUString::createFromAscii(":") + aElement->getTagName(); + aRefName = aPrefix + OUString(RTL_CONSTASCII_USTRINGPARAM(":")) + aElement->getTagName(); else aRefName = aElement->getTagName(); if (aRefName != aName) // consistency check @@ -378,3 +379,5 @@ namespace DOM m_aLocator = aLocator; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/saxbuilder.hxx b/unoxml/source/dom/saxbuilder.hxx index cd280c9f7129..7c46b2eed2fb 100644 --- a/unoxml/source/dom/saxbuilder.hxx +++ b/unoxml/source/dom/saxbuilder.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,5 @@ namespace DOM } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/text.cxx b/unoxml/source/dom/text.cxx index 5d07aa86a6d4..198afcb34e3a 100644 --- a/unoxml/source/dom/text.cxx +++ b/unoxml/source/dom/text.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,13 +64,15 @@ namespace DOM OUString SAL_CALL CText::getNodeName() throw (RuntimeException) { - return OUString::createFromAscii("#text"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("#text")); } Reference< XText > SAL_CALL CText::splitText(sal_Int32 /*offset*/) throw (RuntimeException) { - OSL_ENSURE(false, "CText::splitText: not implemented (#i113683#)"); + OSL_FAIL("CText::splitText: not implemented (#i113683#)"); return Reference< XText >(this); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/dom/text.hxx b/unoxml/source/dom/text.hxx index c58a4e14255e..be86624b0a64 100644 --- a/unoxml/source/dom/text.hxx +++ b/unoxml/source/dom/text.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -245,3 +246,5 @@ namespace DOM }; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/event.cxx b/unoxml/source/events/event.cxx index 87201d7eece7..b674156a9560 100644 --- a/unoxml/source/events/event.cxx +++ b/unoxml/source/events/event.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -109,3 +110,5 @@ namespace DOM { namespace events } }} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/event.hxx b/unoxml/source/events/event.hxx index 0336be16412f..719880bac13d 100644 --- a/unoxml/source/events/event.hxx +++ b/unoxml/source/events/event.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -83,3 +84,5 @@ public: }; }} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx index 4b4cac807538..be45adb09dce 100644 --- a/unoxml/source/events/eventdispatcher.cxx +++ b/unoxml/source/events/eventdispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,11 +74,11 @@ namespace DOM { namespace events { if ((iter->second).is() && iter->second == aListener) { ListenerMap::iterator tmp_iter = iter; - iter++; + ++iter; pMap->erase(tmp_iter); } else - iter++; + ++iter; } } } @@ -93,7 +94,7 @@ namespace DOM { namespace events { ListenerMap *pMap = tIter->second; ListenerMap::const_iterator iter = pMap->lower_bound(pNode); ListenerMap::const_iterator ibound = pMap->upper_bound(pNode); - for( ; iter != ibound; iter++ ) + for( ; iter != ibound; ++iter ) { if((iter->second).is()) (iter->second)->handleEvent(xEvent); @@ -214,7 +215,7 @@ namespace DOM { namespace events { pEvent->m_currentTarget = rinode->first; callListeners(captureListeners, rinode->second, aType, xEvent); if (pEvent->m_canceled) return sal_True; - rinode++; + ++rinode; } NodeVector_t::const_iterator inode = captureVector.begin(); @@ -225,7 +226,7 @@ namespace DOM { namespace events { callListeners(targetListeners, inode->second, aType, xEvent); if (pEvent->m_canceled) return sal_True; // bubbeling phase - inode++; + ++inode; if (i_xEvent->getBubbles()) { pEvent->m_phase = PhaseType_BUBBLING_PHASE; while (inode != captureVector.end()) @@ -234,10 +235,12 @@ namespace DOM { namespace events { callListeners(targetListeners, inode->second, aType, xEvent); if (pEvent->m_canceled) return sal_True; - inode++; + ++inode; } } } return sal_True; } }} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/eventdispatcher.hxx b/unoxml/source/events/eventdispatcher.hxx index 62cb2d38b3f5..9f007ff25066 100644 --- a/unoxml/source/events/eventdispatcher.hxx +++ b/unoxml/source/events/eventdispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -93,3 +94,4 @@ public: #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/mouseevent.cxx b/unoxml/source/events/mouseevent.cxx index 02d1ea619c84..6e60df7fd669 100644 --- a/unoxml/source/events/mouseevent.cxx +++ b/unoxml/source/events/mouseevent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -199,3 +200,4 @@ namespace DOM { namespace events } }} +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/mouseevent.hxx b/unoxml/source/events/mouseevent.hxx index 0bbcbf7698b7..18090b381126 100644 --- a/unoxml/source/events/mouseevent.hxx +++ b/unoxml/source/events/mouseevent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,5 @@ public: }; }} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/mutationevent.cxx b/unoxml/source/events/mutationevent.cxx index 201fbe9e07da..a0cf02107e1d 100644 --- a/unoxml/source/events/mutationevent.cxx +++ b/unoxml/source/events/mutationevent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,4 @@ namespace DOM { namespace events } }} +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/mutationevent.hxx b/unoxml/source/events/mutationevent.hxx index 20b8dbf4523a..85a8117c17d4 100644 --- a/unoxml/source/events/mutationevent.hxx +++ b/unoxml/source/events/mutationevent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ public: }; }} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/testlistener.cxx b/unoxml/source/events/testlistener.cxx index a493aefb55f8..0b29277158eb 100644 --- a/unoxml/source/events/testlistener.cxx +++ b/unoxml/source/events/testlistener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,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::createFromAscii("Wrong number of arguments"), Reference< XInterface >(), 0); + OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong number of arguments")), Reference< XInterface >(), 0); Reference <XEventTarget> aTarget; if(! (args[0] >>= aTarget)) throw IllegalArgumentException( - OUString::createFromAscii("Illegal argument 1"), Reference< XInterface >(), 1); + OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 1")), Reference< XInterface >(), 1); OUString aType; if (! (args[1] >>= aType)) - throw IllegalArgumentException(OUString::createFromAscii("Illegal argument 2"), Reference< XInterface >(), 2); + throw IllegalArgumentException(OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 2")), Reference< XInterface >(), 2); sal_Bool bCapture = sal_False; if(! (args[2] >>= bCapture)) throw IllegalArgumentException( - OUString::createFromAscii("Illegal argument 3"), Reference< XInterface >(), 3); + OUString(RTL_CONSTASCII_USTRINGPARAM("Illegal argument 3")), Reference< XInterface >(), 3); - if(! (args[3] >>= m_name)) m_name = OUString::createFromAscii("<unnamed listener>"); + if(! (args[3] >>= m_name)) m_name = OUString(RTL_CONSTASCII_USTRINGPARAM("<unnamed listener>")); m_target = aTarget; m_type = aType; @@ -139,3 +140,5 @@ namespace DOM { namespace events } }} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/testlistener.hxx b/unoxml/source/events/testlistener.hxx index 1d96edefca34..117fca9c32c5 100644 --- a/unoxml/source/events/testlistener.hxx +++ b/unoxml/source/events/testlistener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,3 +108,5 @@ namespace DOM { namespace events }} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/uievent.cxx b/unoxml/source/events/uievent.cxx index 68e5dbbc6862..0a87b20482ed 100644 --- a/unoxml/source/events/uievent.cxx +++ b/unoxml/source/events/uievent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -115,3 +116,5 @@ namespace DOM { namespace events CEvent::initEvent(eventTypeArg, canBubbleArg, cancelableArg); } }} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/events/uievent.hxx b/unoxml/source/events/uievent.hxx index 2f1c6f28dc3d..5ddd90152372 100644 --- a/unoxml/source/events/uievent.hxx +++ b/unoxml/source/events/uievent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,5 @@ public: }; }} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx index 483269002fdc..62d5978b3846 100644 --- a/unoxml/source/rdf/CBlankNode.cxx +++ b/unoxml/source/rdf/CBlankNode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,15 +101,15 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star: { if (aArguments.getLength() != 1) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CBlankNode::initialize: " - "must give exactly 1 argument"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: " + "must give exactly 1 argument")), *this, 1); } ::rtl::OUString arg; if (!(aArguments[0] >>= arg)) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CBlankNode::initialize: " - "argument must be string"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: " + "argument must be string")), *this, 0); } //FIXME: what is legal? @@ -116,8 +117,8 @@ void SAL_CALL CBlankNode::initialize(const css::uno::Sequence< ::com::sun::star: m_NodeID = arg; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CBlankNode::initialize: " - "argument is not valid blank node ID"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CBlankNode::initialize: " + "argument is not valid blank node ID")), *this, 0); } } @@ -156,3 +157,4 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL _create( } // closing component helper namespace +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx index 30c72ccc841e..549cee2146f4 100644 --- a/unoxml/source/rdf/CLiteral.cxx +++ b/unoxml/source/rdf/CLiteral.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,23 +111,23 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u const sal_Int32 len( aArguments.getLength() ); if (len < 1 || len > 2) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "must give 1 or 2 argument(s)"), *this, 2); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "must give 1 or 2 argument(s)")), *this, 2); } ::rtl::OUString arg0; if (!(aArguments[0] >>= arg0)) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "argument must be string"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "argument must be string")), *this, 0); } //FIXME: what is legal? if (true) { m_Value = arg0; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "argument is not valid literal value"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "argument is not valid literal value")), *this, 0); } if (len > 1) { @@ -137,21 +138,21 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u m_Language = arg1; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "argument is not valid language"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "argument is not valid language")), *this, 1); } } else if ((aArguments[1] >>= xURI)) { if (xURI.is()) { m_xDatatype = xURI; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "argument is null"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "argument is null")), *this, 1); } } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CLiteral::initialize: " - "argument must be string or URI"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CLiteral::initialize: " + "argument must be string or URI")), *this, 1); } } } @@ -159,7 +160,7 @@ void SAL_CALL CLiteral::initialize(const css::uno::Sequence< ::com::sun::star::u // ::com::sun::star::rdf::XNode: ::rtl::OUString SAL_CALL CLiteral::getStringValue() throw (css::uno::RuntimeException) { - if (!m_Language.equalsAscii("")) { + if (m_Language.getLength()) { ::rtl::OUStringBuffer buf(m_Value); buf.appendAscii("@"); buf.append(m_Language); @@ -219,3 +220,4 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL _create( } // closing component helper namespace +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/CNodes.hxx b/unoxml/source/rdf/CNodes.hxx index f9ba6bb9048c..46e8daa3eb89 100644 --- a/unoxml/source/rdf/CNodes.hxx +++ b/unoxml/source/rdf/CNodes.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL _create( css::uno::Referenc #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx index 03ce85872635..414267ffe795 100644 --- a/unoxml/source/rdf/CURI.cxx +++ b/unoxml/source/rdf/CURI.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -737,8 +738,8 @@ void SAL_CALL CURI::initFromConstant(const sal_Int16 i_Constant) default: throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "invalid URIs constant argument"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "invalid URIs constant argument")), *this, 0); } m_Namespace = ::rtl::OUString::createFromAscii(ns).intern(); m_LocalName = ::rtl::OUString::createFromAscii(ln).intern(); @@ -751,8 +752,8 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno:: sal_Int32 len = aArguments.getLength(); if ((len < 1) || (len > 2)) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "must give 1 or 2 argument(s)"), *this, 2); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "must give 1 or 2 argument(s)")), *this, 2); } sal_Int16 arg(0); @@ -762,22 +763,22 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno:: // integer argument: constant from rdf::URIs if (len != 1) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "must give 1 int argument"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "must give 1 int argument")), *this, 1); } initFromConstant(arg); return; } if (!(aArguments[0] >>= arg0)) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "argument must be string or short"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "argument must be string or short")), *this, 0); } if (len > 1) { if (!(aArguments[1] >>= arg1)) { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "argument must be string"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "argument must be string")), *this, 1); } // just append the parameters and then split them again; seems simplest arg0 = arg0 + arg1; @@ -797,8 +798,8 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno:: } } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "argument not splittable: no separator [#/:]"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "argument not splittable: no separator [#/:]")), *this, 0); } //FIXME: what is legal? @@ -806,16 +807,16 @@ void SAL_CALL CURI::initialize(const css::uno::Sequence< ::com::sun::star::uno:: m_Namespace = arg0; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "argument is not valid namespace"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "argument is not valid namespace")), *this, 0); } //FIXME: what is legal? if (true) { m_LocalName = arg1; } else { throw css::lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("CURI::initialize: " - "argument is not valid local name"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CURI::initialize: " + "argument is not valid local name")), *this, 1); } } @@ -865,3 +866,4 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL _create( } // closing component helper namespace +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 948c84cf3dab..644d283efc8f 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,6 @@ #include <libxslt/security.h> -// #i114999# do not include librdf.h, it is broken in redland 1.0.11 #include <redland.h> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -479,12 +479,12 @@ throw (uno::RuntimeException, container::NoSuchElementException, librdf_statement *pStmt( librdf_stream_get_object(m_pStream.get()) ); if (!pStmt) { - rdf::QueryException e(::rtl::OUString::createFromAscii( + rdf::QueryException e(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_GraphResult::nextElement: " - "librdf_stream_get_object failed"), *this); - throw lang::WrappedTargetException(::rtl::OUString::createFromAscii( + "librdf_stream_get_object failed")), *this); + throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 @@ -593,12 +593,12 @@ throw (uno::RuntimeException, container::NoSuchElementException, if (librdf_query_results_get_bindings(m_pQueryResult.get(), NULL, pNodes.get())) { - rdf::QueryException e(::rtl::OUString::createFromAscii( + rdf::QueryException e(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_QuerySelectResult::nextElement: " - "librdf_query_results_get_bindings failed"), *this); - throw lang::WrappedTargetException(::rtl::OUString::createFromAscii( + "librdf_query_results_get_bindings failed")), *this); + throw lang::WrappedTargetException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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); @@ -717,8 +717,8 @@ throw (uno::RuntimeException, { uno::Reference< rdf::XRepository > xRep( m_wRep ); if (!xRep.is()) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( - "librdf_NamedGraph::clear: repository is gone"), *this); + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_NamedGraph::clear: repository is gone")), *this); } try { m_pRep->clearGraph(m_xName); @@ -736,8 +736,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, { uno::Reference< rdf::XRepository > xRep( m_wRep ); if (!xRep.is()) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( - "librdf_NamedGraph::addStatement: repository is gone"), *this); + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_NamedGraph::addStatement: repository is gone")), *this); } m_pRep->addStatementGraph(i_xSubject, i_xPredicate, i_xObject, m_xName); } @@ -751,8 +751,8 @@ throw (uno::RuntimeException, { uno::Reference< rdf::XRepository > xRep( m_wRep ); if (!xRep.is()) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( - "librdf_NamedGraph::removeStatements: repository is gone"), *this); + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_NamedGraph::removeStatements: repository is gone")), *this); } m_pRep->removeStatementsGraph(i_xSubject, i_xPredicate, i_xObject, m_xName); } @@ -767,8 +767,8 @@ throw (uno::RuntimeException, { uno::Reference< rdf::XRepository > xRep( m_wRep ); if (!xRep.is()) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( - "librdf_NamedGraph::getStatements: repository is gone"), *this); + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_NamedGraph::getStatements: repository is gone")), *this); } return m_pRep->getStatementsGraph( i_xSubject, i_xPredicate, i_xObject, m_xName); @@ -849,15 +849,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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))); @@ -865,9 +865,9 @@ throw (uno::RuntimeException) return rdf::BlankNode::create(m_xContext, nodeID); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::createBlankNode: " - "illegal blank node label"), *this, uno::makeAny(iae)); + "illegal blank node label")), *this, uno::makeAny(iae)); } } @@ -891,44 +891,44 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, ::osl::MutexGuard g(m_aMutex); if (!i_xInStream.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::importGraph: " - "stream is null"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: " + "stream is null")), *this, 1); } //FIXME: other formats if (i_Format != rdf::FileFormat::RDF_XML) { throw datatransfer::UnsupportedFlavorException( - ::rtl::OUString::createFromAscii("librdf_Repository::importGraph: " - "file format not supported"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: " + "file format not supported")), *this); } if (!i_xGraphName.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::importGraph: " - "graph name is null"), *this, 2); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::importGraph: " - "URI is reserved"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: " + "URI is reserved")), *this, 0); } if (formatNeedsBaseURI(i_Format) && !i_xBaseURI.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::importGraph: " - "base URI is null"), *this, 3); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::importGraph: " - "base URI is not absolute"), *this, 3); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::importGraph: " - "graph with given URI exists"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::importGraph: " + "graph with given URI exists")), *this); } const ::rtl::OString context( ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) ); @@ -938,9 +938,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, reinterpret_cast<const unsigned char*> (context.getStr())), safe_librdf_free_node); if (!pContext) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::importGraph: " - "librdf_new_node_from_uri_string failed"), *this); + "librdf_new_node_from_uri_string failed")), *this); } const ::rtl::OString baseURI( @@ -950,18 +950,18 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, reinterpret_cast<const unsigned char*> (baseURI.getStr())), safe_librdf_free_uri); if (!pBaseURI) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::importGraph: " - "librdf_new_uri failed"), *this); + "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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::importGraph: " - "librdf_new_parser failed"), *this); + "librdf_new_parser failed")), *this); } uno::Sequence<sal_Int8> buf; @@ -976,17 +976,17 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, buf.getLength(), pBaseURI.get()), safe_librdf_free_stream); if (!pStream) { - throw rdf::ParseException(::rtl::OUString::createFromAscii( + throw rdf::ParseException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::importGraph: " - "librdf_model_context_add_statements failed"), *this); + "librdf_model_context_add_statements failed")), *this); } return getGraph(i_xGraphName); } @@ -1004,38 +1004,38 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, ::osl::MutexGuard g(m_aMutex); if (!i_xOutStream.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::exportGraph: " - "stream is null"), *this, 1); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: " + "stream is null")), *this, 1); } // FIXME: other formats if (i_Format != rdf::FileFormat::RDF_XML) { throw datatransfer::UnsupportedFlavorException( - ::rtl::OUString::createFromAscii("librdf_Repository::exportGraph: " - "file format not supported"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: " + "file format not supported")), *this); } if (!i_xGraphName.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::exportGraph: " - "graph name is null"), *this, 2); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: " + "graph name is null")), *this, 2); } if (formatNeedsBaseURI(i_Format) && !i_xBaseURI.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::exportGraph: " - "base URI is null"), *this, 3); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::exportGraph: " - "base URI is not absolute"), *this, 3); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::exportGraph: " - "no graph with given URI exists"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::exportGraph: " + "no graph with given URI exists")), *this); } const ::rtl::OString context( ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) ); @@ -1045,9 +1045,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, reinterpret_cast<const unsigned char*> (context.getStr())), safe_librdf_free_node); if (!pContext) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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) ); @@ -1056,18 +1056,18 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, reinterpret_cast<const unsigned char*> (baseURI.getStr())), safe_librdf_free_uri); if (!pBaseURI) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 @@ -1076,9 +1076,9 @@ 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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::exportGraph: " - "librdf_new_serializer failed"), *this); + "librdf_new_serializer failed")), *this); } const boost::shared_ptr<librdf_uri> pRelativeURI( @@ -1098,26 +1098,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::exportGraph: " - "librdf_serializer_set_feature writeBaseURI failed"), *this); + "librdf_serializer_set_feature writeBaseURI failed")), *this); } size_t length; @@ -1125,9 +1125,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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::exportGraph: " - "librdf_serializer_serialize_stream_to_counted_string failed"), + "librdf_serializer_serialize_stream_to_counted_string failed")), *this); } const uno::Sequence<sal_Int8> buf( @@ -1157,8 +1157,8 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, ::osl::MutexGuard g(m_aMutex); if (!i_xGraphName.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::getGraph: " - "URI is null"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::getGraph: " + "URI is null")), *this, 0); } const NamedGraphMap_t::iterator iter( m_NamedGraphs.find(i_xGraphName->getStringValue()) ); @@ -1177,14 +1177,14 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, ::osl::MutexGuard g(m_aMutex); if (!i_xGraphName.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::createGraph: " - "URI is null"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: " + "URI is null")), *this, 0); } if (i_xGraphName->getStringValue().matchAsciiL(s_nsOOo, sizeof(s_nsOOo)-1)) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::createGraph: " - "URI is reserved"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: " + "URI is reserved")), *this, 0); } // NB: librdf does not have a concept of graphs as such; @@ -1193,8 +1193,8 @@ 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::createFromAscii("librdf_Repository::createGraph: " - "graph with given URI exists"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::createGraph: " + "graph with given URI exists")), *this); } m_NamedGraphs.insert(std::make_pair(contextU, new librdf_NamedGraph(this, i_xGraphName))); @@ -1247,9 +1247,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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::getStatements: " - "librdf_model_find_statements failed"), *this); + "librdf_model_find_statements failed")), *this); } return new librdf_GraphResult(this, m_aMutex, pStream, @@ -1269,17 +1269,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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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()) ); @@ -1289,9 +1289,9 @@ 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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::querySelect: " - "binding is null"), *this); + "binding is null")), *this); } names[i] = ::rtl::OUString::createFromAscii(name); @@ -1301,9 +1301,9 @@ throw (uno::RuntimeException, rdf::QueryException, rdf::RepositoryException) pQuery, pResults, names); } else { - throw rdf::QueryException(::rtl::OUString::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::querySelect: " - "librdf_query_results_get_bindings_count failed"), *this); + "librdf_query_results_get_bindings_count failed")), *this); } } @@ -1319,25 +1319,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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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, @@ -1357,17 +1357,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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::QueryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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; @@ -1383,37 +1383,33 @@ void SAL_CALL librdf_Repository::setStatementRDFa( throw (uno::RuntimeException, lang::IllegalArgumentException, rdf::RepositoryException) { - 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( + 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")); if (!i_xSubject.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::setStatementRDFa: Subject is null"), *this, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::setStatementRDFa: Subject is null")), *this, 0); } if (!i_rPredicates.getLength()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::setStatementRDFa: no Predicates"), + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "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::createFromAscii( - "librdf_Repository::setStatementRDFa: Predicate is null"), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::setStatementRDFa: Predicate is null")), *this, 1); } } if (!i_xObject.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::setStatementRDFa: Object is null"), *this, 2); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::setStatementRDFa: Object is null")), *this, 2); } const uno::Reference<lang::XServiceInfo> xService(i_xObject, uno::UNO_QUERY_THROW); @@ -1432,20 +1428,20 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, xTextRange = xTextContent->getAnchor(); } if (!xTextRange.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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.equalsAscii("") || mdref.Second.equalsAscii("")) { - throw uno::RuntimeException( ::rtl::OUString::createFromAscii( + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { + throw uno::RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::setStatementRDFa: " - "ensureMetadataReference did not"), *this); + "ensureMetadataReference did not")), *this); } ::rtl::OUString const sXmlId(mdref.First + - ::rtl::OUString::createFromAscii("#") + mdref.Second); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second); uno::Reference<rdf::XURI> xXmlId; try { xXmlId.set( rdf::URI::create(m_xContext, @@ -1453,9 +1449,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, uno::UNO_QUERY_THROW); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::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); @@ -1474,9 +1470,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::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.getLength() == 0) { @@ -1496,27 +1492,27 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, rdf::RepositoryException) { if (!i_xElement.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::removeStatementRDFa: Element is null"), + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::removeStatementRDFa: Element is null")), *this, 0); } const beans::StringPair mdref( i_xElement->getMetadataReference() ); - if (mdref.First.equalsAscii("") || mdref.Second.equalsAscii("")) { + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { return; // nothing to do... } uno::Reference<rdf::XURI> xXmlId; try { xXmlId.set( rdf::URI::create(m_xContext, ::rtl::OUString::createFromAscii(s_nsOOo) - + mdref.First + ::rtl::OUString::createFromAscii("#") + + mdref.First + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second), uno::UNO_QUERY_THROW); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::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); @@ -1529,15 +1525,15 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, rdf::RepositoryException) { if (!i_xElement.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::getStatementRDFa: Element is null"), *this, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::getStatementRDFa: Element is null")), *this, 0); } const beans::StringPair mdref( i_xElement->getMetadataReference() ); - if (mdref.First.equalsAscii("") || mdref.Second.equalsAscii("")) { + if ((mdref.First.getLength() == 0) || (mdref.Second.getLength() == 0)) { return beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool >(); } ::rtl::OUString const sXmlId(mdref.First + - ::rtl::OUString::createFromAscii("#") + mdref.Second); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#")) + mdref.Second); uno::Reference<rdf::XURI> xXmlId; try { xXmlId.set( rdf::URI::create(m_xContext, @@ -1545,9 +1541,9 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, uno::UNO_QUERY_THROW); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::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); @@ -1559,7 +1555,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, while (xIter->hasMoreElements()) { rdf::Statement stmt; if (!(xIter->nextElement() >>= stmt)) { - OSL_ENSURE(false, "getStatementRDFa: result of wrong type?"); + OSL_FAIL("getStatementRDFa: result of wrong type?"); } else { ret.push_back(stmt); } @@ -1611,16 +1607,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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::getStatementsRDFa: " - "librdf_stream_add_map failed"), *this); + "librdf_stream_add_map failed")), *this); } return new librdf_GraphResult(this, m_aMutex, pStream, @@ -1650,16 +1646,16 @@ const NamedGraphMap_t::iterator SAL_CALL librdf_Repository::clearGraph( { if (!i_xGraphName.is()) { throw lang::IllegalArgumentException( - ::rtl::OUString::createFromAscii("librdf_Repository::clearGraph: " - "URI is null"), *this, 0); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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::createFromAscii("librdf_Repository::clearGraph: " - "no graph with given URI exists"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::clearGraph: " + "no graph with given URI exists")), *this); } const ::rtl::OString context( ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) ); @@ -1669,15 +1665,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::clearGraph: " - "librdf_model_context_remove_statements failed"), *this); + "librdf_model_context_remove_statements failed")), *this); } return iter; } @@ -1692,25 +1688,25 @@ void SAL_CALL librdf_Repository::addStatementGraph( // container::NoSuchElementException, rdf::RepositoryException) { if (!i_xSubject.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::addStatement: Subject is null"), *this, 0); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::addStatement: Subject is null")), *this, 0); } if (!i_xPredicate.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::addStatement: Predicate is null"), + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_Repository::addStatement: Predicate is null")), *this, 1); } if (!i_xObject.is()) { - throw lang::IllegalArgumentException(::rtl::OUString::createFromAscii( - "librdf_Repository::addStatement: Object is null"), *this, 2); + throw lang::IllegalArgumentException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "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::createFromAscii("librdf_Repository::addStatement: " - "no graph with given URI exists"), *this); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("librdf_Repository::addStatement: " + "no graph with given URI exists")), *this); } const ::rtl::OString context( ::rtl::OUStringToOString(contextU, RTL_TEXTENCODING_UTF8) ); @@ -1720,9 +1716,9 @@ void SAL_CALL librdf_Repository::addStatementGraph( reinterpret_cast<const unsigned char*> (context.getStr())), safe_librdf_free_node); if (!pContext) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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(), @@ -1744,9 +1740,9 @@ void SAL_CALL librdf_Repository::addStatementGraph( if (librdf_model_context_add_statement(m_pModel.get(), pContext.get(), pStatement.get())) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::addStatement: " - "librdf_model_context_add_statement failed"), *this); + "librdf_model_context_add_statement failed")), *this); } } @@ -1769,9 +1765,9 @@ void SAL_CALL librdf_Repository::removeStatementsGraph( const ::rtl::OUString contextU( i_xGraphName->getStringValue() ); if (m_NamedGraphs.find(contextU) == m_NamedGraphs.end()) { throw container::NoSuchElementException( - ::rtl::OUString::createFromAscii( + ::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) ); @@ -1781,9 +1777,9 @@ void SAL_CALL librdf_Repository::removeStatementsGraph( reinterpret_cast<const unsigned char*> (context.getStr())), safe_librdf_free_node); if (!pContext) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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(), @@ -1796,24 +1792,24 @@ void SAL_CALL librdf_Repository::removeStatementsGraph( pStatement.get(), pContext.get()), safe_librdf_free_stream); if (!pStream) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_Repository::removeStatements: " - "librdf_model_context_remove_statement failed"), *this); + "librdf_model_context_remove_statement failed")), *this); } } while (!librdf_stream_next(pStream.get())); } @@ -1846,9 +1842,9 @@ 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::createFromAscii( + ::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) ); @@ -1858,9 +1854,9 @@ librdf_Repository::getStatementsGraph( reinterpret_cast<const unsigned char*> (context.getStr())), safe_librdf_free_node); if (!pContext) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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(), @@ -1873,9 +1869,9 @@ librdf_Repository::getStatementsGraph( pStatement.get(), pContext.get()), safe_librdf_free_stream); if (!pStream) { - throw rdf::RepositoryException(::rtl::OUString::createFromAscii( + throw rdf::RepositoryException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 @@ -1888,8 +1884,8 @@ librdf_world *librdf_TypeConverter::createWorld() const // create and initialize world librdf_world *pWorld( librdf_new_world() ); if (!pWorld) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( - "librdf_TypeConverter::createWorld: librdf_new_world failed"), + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_TypeConverter::createWorld: librdf_new_world failed")), m_rRep); } //FIXME logger, digest, features? @@ -1913,8 +1909,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::createFromAscii( - "librdf_TypeConverter::createStorage: librdf_new_storage failed"), + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_TypeConverter::createStorage: librdf_new_storage failed")), m_rRep); } return pStorage; @@ -1925,8 +1921,8 @@ librdf_model *librdf_TypeConverter::createModel( { librdf_model *pRepository( librdf_new_model(i_pWorld, i_pStorage, NULL) ); if (!pRepository) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( - "librdf_TypeConverter::createModel: librdf_new_model failed"), + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_TypeConverter::createModel: librdf_new_model failed")), m_rRep); } //FIXME @@ -1957,8 +1953,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::createFromAscii( - "librdf_TypeConverter::mkURI: librdf_new_uri failed"), 0); + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "librdf_TypeConverter::mkURI: librdf_new_uri failed")), 0); } return pURI; } @@ -1977,9 +1973,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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 @@ -1990,9 +1986,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::mkResource: " - "librdf_new_node_from_uri_string failed"), 0); + "librdf_new_node_from_uri_string failed")), 0); } return pNode; } @@ -2038,14 +2034,14 @@ librdf_node* librdf_TypeConverter::mkNode( librdf_world* i_pWorld, (lang.getStr()), 0); } else { - OSL_ENSURE(false, "mkNode: invalid literal"); + OSL_FAIL("mkNode: invalid literal"); return 0; } } if (!ret) { - throw uno::RuntimeException(::rtl::OUString::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::mkNode: " - "librdf_new_node_from_literal failed"), 0); + "librdf_new_node_from_literal failed")), 0); } return ret; } @@ -2076,9 +2072,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::mkStatement: " - "librdf_new_statement_from_nodes failed"), 0); + "librdf_new_statement_from_nodes failed")), 0); } return pStatement; } @@ -2089,9 +2085,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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)), @@ -2100,9 +2096,9 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const return rdf::URI::create(m_xContext, uriU); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::convertToXURI: " - "illegal uri"), m_rRep, uno::makeAny(iae)); + "illegal uri")), m_rRep, uno::makeAny(iae)); } } @@ -2113,13 +2109,13 @@ 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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "librdf_TypeConverter::convertToXURI: " - "resource has no uri"), m_rRep); + "resource has no uri")), m_rRep); } return convertToXURI(pURI); } else { - OSL_ENSURE(false, "convertToXURI: unknown librdf_node"); + OSL_FAIL("convertToXURI: unknown librdf_node"); return 0; } } @@ -2131,9 +2127,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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)), @@ -2143,9 +2139,9 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const rdf::BlankNode::create(m_xContext, labelU), uno::UNO_QUERY); } catch (lang::IllegalArgumentException & iae) { throw lang::WrappedTargetRuntimeException( - ::rtl::OUString::createFromAscii( + ::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), @@ -2163,9 +2159,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::createFromAscii( + throw uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "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( @@ -2237,3 +2233,4 @@ uno::Reference< uno::XInterface > SAL_CALL _create( } // closing component helper namespace +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/librdf_repository.hxx b/unoxml/source/rdf/librdf_repository.hxx index 0af918a1eabe..10bff77ac7a9 100644 --- a/unoxml/source/rdf/librdf_repository.hxx +++ b/unoxml/source/rdf/librdf_repository.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,4 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL _create( css::uno::Referenc #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/rdf/librdf_services.cxx b/unoxml/source/rdf/librdf_services.cxx index 4c614eef433b..03b2b1e39eec 100644 --- a/unoxml/source/rdf/librdf_services.cxx +++ b/unoxml/source/rdf/librdf_services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,8 +39,7 @@ using namespace ::com::sun::star; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment(const sal_Char **o_ppEnvironmentTypeName, +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char **o_ppEnvironmentTypeName, uno_Environment ** /* ppEnvironment */) { *o_ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; @@ -65,8 +65,7 @@ static ::cppu::ImplementationEntry const entries[] = { { 0, 0, 0, 0, 0, 0 } }; -SAL_DLLPUBLIC_EXPORT void * SAL_CALL -component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const char * implName, void * serviceManager, void * registryKey) { return ::cppu::component_getFactoryHelper( @@ -75,3 +74,4 @@ component_getFactory( } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx index c50faf3e8522..b81c363931fa 100644 --- a/unoxml/source/service/services.cxx +++ b/unoxml/source/service/services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,14 +55,12 @@ using namespace ::com::sun::star::registry; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL -component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, uno_Environment ** /*ppEnvironment */) +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, uno_Environment ** /*ppEnvironment */) { *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; } -SAL_DLLPUBLIC_EXPORT void* SAL_CALL -component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void * /*pRegistryKey*/) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void * /*pRegistryKey*/) { void* pReturn = NULL ; if ( pImplementationName && pServiceManager ) @@ -113,3 +112,5 @@ component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx index 05add3ca44bc..6d9d4b78528f 100644 --- a/unoxml/source/xpath/nodelist.cxx +++ b/unoxml/source/xpath/nodelist.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -76,3 +77,4 @@ namespace XPath } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/nodelist.hxx b/unoxml/source/xpath/nodelist.hxx index fd6b428af27e..ed3543ee815e 100644 --- a/unoxml/source/xpath/nodelist.hxx +++ b/unoxml/source/xpath/nodelist.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,5 @@ namespace XPath } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index 00d13be6348c..dac4b2e2ca9d 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -145,7 +146,7 @@ namespace XPath p = (xmlChar*)oprefix.getStr(); u = (xmlChar*)ouri.getStr(); xmlXPathRegisterNs(ctx, p, u); - i++; + ++i; } } @@ -215,7 +216,7 @@ namespace XPath reinterpret_cast<void*>( sal::static_int_cast<sal_IntPtr>(aHandle.variableData))); } - i++; + ++i; } } @@ -309,26 +310,26 @@ namespace XPath va_end(args); ::rtl::OUStringBuffer buf( - OUString::createFromAscii("libxml2 error:\n")); + OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 error:\n"))); buf.appendAscii(str); OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE(sal_False, msg.getStr()); + OSL_FAIL(msg.getStr()); } static void structured_error_func(void * userData, xmlErrorPtr error) { (void) userData; ::rtl::OUStringBuffer buf( - OUString::createFromAscii("libxml2 error:\n")); + OUString(RTL_CONSTASCII_USTRINGPARAM("libxml2 error:\n"))); if (error) { buf.append(make_error_message(error)); } else { - buf.append(OUString::createFromAscii("no error argument!")); + buf.append(OUString(RTL_CONSTASCII_USTRINGPARAM("no error argument!"))); } OString msg = OUStringToOString(buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); - OSL_ENSURE(sal_False, msg.getStr()); + OSL_FAIL(msg.getStr()); } } // extern "C" @@ -453,3 +454,5 @@ namespace XPath m_extensions.push_back( xExtension ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx index a64eff7444c7..dc8e0536656c 100644 --- a/unoxml/source/xpath/xpathapi.hxx +++ b/unoxml/source/xpath/xpathapi.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,3 +153,5 @@ namespace XPath } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx index 36fdf1ba933e..c9d84bd4173f 100644 --- a/unoxml/source/xpath/xpathobject.cxx +++ b/unoxml/source/xpath/xpathobject.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -181,3 +182,4 @@ namespace XPath } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/source/xpath/xpathobject.hxx b/unoxml/source/xpath/xpathobject.hxx index f15aed9ded95..8e507aa0c19b 100644 --- a/unoxml/source/xpath/xpathobject.hxx +++ b/unoxml/source/xpath/xpathobject.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -123,3 +124,5 @@ namespace XPath } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/test/domtest.cxx b/unoxml/test/domtest.cxx index 5d3c2fa212dc..ff44e2b9dc3e 100644 --- a/unoxml/test/domtest.cxx +++ b/unoxml/test/domtest.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -310,7 +311,7 @@ struct SerializerTest : public CppUnit::TestFixture CPPUNIT_ASSERT_MESSAGE( "Converting ini file to URL", osl_getFileURLFromSystemPath( - (sBaseDir+rtl::OUString::createFromAscii("unoxml_unittest_test.ini")).pData, + (sBaseDir+rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unoxml_unittest_test.ini"))).pData, &aIniUrl.pData ) == osl_File_E_None ); mxCtx = ::cppu::defaultBootstrap_InitialComponentContext(aIniUrl); @@ -397,3 +398,4 @@ CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(SerializerTest, "SerializerTest"); // to let the user the possibility to also register some functions by hand. NOADDITIONAL; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unoxml/test/makefile.mk b/unoxml/test/makefile.mk index 11fe8884befd..790a34a6a71b 100644 --- a/unoxml/test/makefile.mk +++ b/unoxml/test/makefile.mk @@ -64,7 +64,6 @@ SHL1STDLIBS= \ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPUNITLIB) \ - $(TESTSHL2LIB) \ $(CPPULIB) \ $(SAXLIB) \ $(SALLIB)\ |