1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <precomp.h> 29 #include <cosv/csv_ostream.hxx> 30 31 // NOT FULLY DECLARED SERVICES 32 33 34 #ifndef CSV_NO_IOSTREAMS 35 #else 36 37 #include <cosv/streamstr.hxx> 38 39 namespace csv 40 { 41 42 ostream::~ostream() { } 43 44 ostream & ostream::operator<<( 45 const char * i_s ) { *pData << i_s; return *this; } 46 ostream & ostream::operator<<( 47 char i_c ) { *pData << i_c; return *this; } 48 ostream & ostream::operator<<( 49 unsigned char i_c ) { *pData << i_c; return *this; } 50 ostream & ostream::operator<<( 51 signed char i_c ) { *pData << i_c; return *this; } 52 53 ostream & ostream::operator<<( 54 short i_n ) { *pData << i_n; return *this; } 55 ostream & ostream::operator<<( 56 unsigned short i_n ) { *pData << i_n; return *this; } 57 ostream & ostream::operator<<( 58 int i_n ) { *pData << i_n; return *this; } 59 ostream & ostream::operator<<( 60 unsigned int i_n ) { *pData << i_n; return *this; } 61 ostream & ostream::operator<<( 62 long i_n ) { *pData << i_n; return *this; } 63 ostream & ostream::operator<<( 64 unsigned long i_n ) { *pData << i_n; return *this; } 65 66 ostream & ostream::operator<<( 67 float i_n ) { *pData << i_n; return *this; } 68 ostream & ostream::operator<<( 69 double i_n ) { *pData << i_n; return *this; } 70 71 ostream & 72 ostream::seekp( intt i_nOffset, 73 seek_dir i_eStart ) 74 { 75 pData->seekp(i_nOffset, csv::seek_dir(int(i_eStart)) ); 76 return *this; 77 } 78 79 ostream::ostream( uintt i_nStartSize ) 80 : pData( new StreamStr(i_nStartSize) ) 81 { 82 } 83 84 85 86 } // namespace csv 87 88 #endif 89 90 91 92 93