From 6671fa81db0ecea4ada005bb79f55f08fb440ad4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Sep 2011 20:21:15 +0200 Subject: Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *(). --- .../source/skeletonmaker/cppcompskeleton.cxx | 3 +- unodevtools/source/skeletonmaker/cpptypemaker.cxx | 1 + .../source/skeletonmaker/javacompskeleton.cxx | 1 + unodevtools/source/skeletonmaker/javatypemaker.cxx | 1 + .../skeletonmaker/ostringostreaminserter.hxx | 49 ++++++++++++++++++++++ .../source/skeletonmaker/skeletoncommon.cxx | 1 + unodevtools/source/skeletonmaker/skeletonmaker.cxx | 1 + 7 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 unodevtools/source/skeletonmaker/ostringostreaminserter.hxx (limited to 'unodevtools') diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index 2074efe85ee8..d7e484e49ff6 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -28,6 +28,7 @@ #include "codemaker/commoncpp.hxx" +#include "ostringostreaminserter.hxx" #include "skeletoncommon.hxx" #include "skeletoncpp.hxx" @@ -692,7 +693,7 @@ OString generateClassDefinition(std::ostream& o, "css::uno::RuntimeException);\n"; OStringBuffer buffer(256); - buffer.append(parentname); + buffer.append(parentname.toString()); buffer.append("< "); boost::unordered_set< OString, OStringHash >::const_iterator iter = interfaces.begin(); diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index ce9f4b8d95a6..a9d21d7c7dac 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -28,6 +28,7 @@ #include "codemaker/commoncpp.hxx" +#include "ostringostreaminserter.hxx" #include "skeletoncommon.hxx" #include "skeletoncpp.hxx" diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx index 33b99676f8e1..ba8851c19d12 100644 --- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx @@ -28,6 +28,7 @@ #include "codemaker/commonjava.hxx" +#include "ostringostreaminserter.hxx" #include "skeletoncommon.hxx" #include "skeletonjava.hxx" diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx index 9f49f66a8785..ae224078c184 100644 --- a/unodevtools/source/skeletonmaker/javatypemaker.cxx +++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx @@ -28,6 +28,7 @@ #include "codemaker/commonjava.hxx" +#include "ostringostreaminserter.hxx" #include "skeletoncommon.hxx" #include "skeletonjava.hxx" diff --git a/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx b/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx new file mode 100644 index 000000000000..9339d1ae2a4b --- /dev/null +++ b/unodevtools/source/skeletonmaker/ostringostreaminserter.hxx @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License or as specified alternatively below. You may obtain a copy of + * the License at http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * Major Contributor(s): + * [ Copyright (C) 2011 Stephan Bergmann, Red Hat Inc. + * (initial developer) ] + * + * All Rights Reserved. + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#ifndef INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_OSTRINGOSTREAMINSERTER_HXX +#define INCLUDED_UNODEVTOOLS_SOURCE_SKELETONMAKER_OSTRINGOSTREAMINSERTER_HXX + +#include "sal/config.h" + +#include + +#include "rtl/string.hxx" + +template< typename charT, typename traits > std::basic_ostream & +operator <<( + std::basic_ostream & stream, rtl::OString const & string) +{ + return stream << string.getStr(); + // potentially loses data due to embedded null characters +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx index 7329b793ab54..aecb39ab233c 100644 --- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx +++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx @@ -32,6 +32,7 @@ #include "codemaker/commoncpp.hxx" #include "codemaker/generatedtypeset.hxx" +#include "ostringostreaminserter.hxx" #include "skeletoncommon.hxx" #include diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx index 127411060105..ddd2ab43de06 100644 --- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx +++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx @@ -32,6 +32,7 @@ #include "rtl/ustrbuf.hxx" #include "unodevtools/typemanager.hxx" #include "unodevtools/options.hxx" +#include "ostringostreaminserter.hxx" #include "skeletonjava.hxx" #include "skeletoncpp.hxx" -- cgit