1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef _SSTRING_HXX 25 #define _SSTRING_HXX 26 27 #include <tools/string.hxx> 28 #include <tools/list.hxx> 29 30 #define NOT_THERE LIST_ENTRY_NOTFOUND 31 32 #define SStringList SUniStringList 33 #define StringList UniStringList 34 35 DECLARE_LIST( ByteStringList, ByteString* ) 36 DECLARE_LIST( UniStringList, UniString* ) 37 38 class SvStream; 39 40 // --------------------- 41 // - class SStringList - 42 // --------------------- 43 44 class SByteStringList : public ByteStringList 45 { 46 public: 47 SByteStringList(); 48 ~SByteStringList(); 49 50 // neuen ByteString in Liste einfuegen 51 sal_uIntPtr PutString( ByteString* ); 52 ByteString* RemoveString( const ByteString& rName ); 53 54 // Position des ByteString in Liste, wenn nicht enthalten, dann 55 // return = NOT_THERE 56 sal_uIntPtr IsString( ByteString* ); 57 58 // Vorgaenger ermitteln ( auch wenn selbst noch nicht in 59 // Liste enthalten 60 sal_uIntPtr GetPrevString( ByteString* ); 61 void CleanUp(); 62 63 SByteStringList& operator<< ( SvStream& rStream ); 64 SByteStringList& operator>> ( SvStream& rStream ); 65 }; 66 67 // --------------------- 68 // - class SUniStringList - 69 // --------------------- 70 71 class SUniStringList : public UniStringList 72 { 73 public: 74 SUniStringList(); 75 ~SUniStringList(); 76 77 // neuen UniString in Liste einfuegen 78 sal_uIntPtr PutString( UniString* ); 79 UniString* RemoveString( const UniString& rName ); 80 81 // Position des UniString in Liste, wenn nicht enthalten, dann 82 // return = NOT_THERE 83 sal_uIntPtr IsString( UniString* ); 84 85 // Vorgaenger ermitteln ( auch wenn selbst noch nicht in 86 // Liste enthalten 87 sal_uIntPtr GetPrevString( UniString* ); 88 }; 89 90 class Text 91 { 92 protected: 93 String aString; 94 95 public: 96 Text( char* pChar ); Text(String & rStr)97 Text( String &rStr ) { aString = rStr; } 98 void Stderr(); 99 }; 100 101 #endif 102