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 #ifndef _SSTRING_HXX 29 #define _SSTRING_HXX 30 31 #include <tools/string.hxx> 32 #include <tools/list.hxx> 33 34 #define NOT_THERE LIST_ENTRY_NOTFOUND 35 36 #define SStringList SUniStringList 37 #define StringList UniStringList 38 39 DECLARE_LIST( ByteStringList, ByteString* ) 40 DECLARE_LIST( UniStringList, UniString* ) 41 42 class SvStream; 43 44 // --------------------- 45 // - class SStringList - 46 // --------------------- 47 48 class SByteStringList : public ByteStringList 49 { 50 public: 51 SByteStringList(); 52 ~SByteStringList(); 53 54 // neuen ByteString in Liste einfuegen 55 sal_uIntPtr PutString( ByteString* ); 56 ByteString* RemoveString( const ByteString& rName ); 57 58 // Position des ByteString in Liste, wenn nicht enthalten, dann 59 // return = NOT_THERE 60 sal_uIntPtr IsString( ByteString* ); 61 62 // Vorgaenger ermitteln ( auch wenn selbst noch nicht in 63 // Liste enthalten 64 sal_uIntPtr GetPrevString( ByteString* ); 65 void CleanUp(); 66 67 SByteStringList& operator<< ( SvStream& rStream ); 68 SByteStringList& operator>> ( SvStream& rStream ); 69 }; 70 71 // --------------------- 72 // - class SUniStringList - 73 // --------------------- 74 75 class SUniStringList : public UniStringList 76 { 77 public: 78 SUniStringList(); 79 ~SUniStringList(); 80 81 // neuen UniString in Liste einfuegen 82 sal_uIntPtr PutString( UniString* ); 83 UniString* RemoveString( const UniString& rName ); 84 85 // Position des UniString in Liste, wenn nicht enthalten, dann 86 // return = NOT_THERE 87 sal_uIntPtr IsString( UniString* ); 88 89 // Vorgaenger ermitteln ( auch wenn selbst noch nicht in 90 // Liste enthalten 91 sal_uIntPtr GetPrevString( UniString* ); 92 }; 93 94 class Text 95 { 96 protected: 97 String aString; 98 99 public: 100 Text( char* pChar ); 101 Text( String &rStr ) { aString = rStr; } 102 void Stderr(); 103 }; 104 105 #endif 106