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 #ifndef _SFXSLSTITM_HXX 24 #define _SFXSLSTITM_HXX 25 26 #include "svl/svldllapi.h" 27 #include <tools/rtti.hxx> 28 #include <tools/list.hxx> 29 #include <svl/poolitem.hxx> 30 #include <com/sun/star/uno/Sequence.h> 31 32 class SfxImpStringList; 33 34 class SVL_DLLPUBLIC SfxStringListItem : public SfxPoolItem 35 { 36 protected: 37 SfxImpStringList* pImp; 38 39 public: 40 TYPEINFO(); 41 42 SfxStringListItem(); 43 SfxStringListItem( sal_uInt16 nWhich, const List* pList=NULL ); 44 SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream ); 45 SfxStringListItem( const SfxStringListItem& rItem ); 46 ~SfxStringListItem(); 47 48 List * GetList(); 49 GetList() const50 const List * GetList() const 51 { return SAL_CONST_CAST(SfxStringListItem *, this)->GetList(); } 52 53 #ifndef TF_POOLABLE 54 virtual int IsPoolable() const; 55 #endif 56 57 // String-Separator: \n 58 virtual void SetString( const XubString& ); 59 virtual XubString GetString(); 60 61 void SetStringList( const com::sun::star::uno::Sequence< rtl::OUString >& rList ); 62 void GetStringList( com::sun::star::uno::Sequence< rtl::OUString >& rList ) const; 63 64 virtual int operator==( const SfxPoolItem& ) const; 65 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 66 SfxMapUnit eCoreMetric, 67 SfxMapUnit ePresMetric, 68 XubString &rText, 69 const IntlWrapper * = 0 ) const; 70 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 71 virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const; 72 virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const; 73 void Sort( sal_Bool bAscending = sal_True, List* pParallelList = 0 ); 74 75 virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal, 76 sal_uInt8 nMemberId = 0 ); 77 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, 78 sal_uInt8 nMemberId = 0 ) const; 79 }; 80 #endif 81