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