139a19a47SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 339a19a47SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 439a19a47SAndrew Rist * or more contributor license agreements. See the NOTICE file 539a19a47SAndrew Rist * distributed with this work for additional information 639a19a47SAndrew Rist * regarding copyright ownership. The ASF licenses this file 739a19a47SAndrew Rist * to you under the Apache License, Version 2.0 (the 839a19a47SAndrew Rist * "License"); you may not use this file except in compliance 939a19a47SAndrew Rist * with the License. You may obtain a copy of the License at 1039a19a47SAndrew Rist * 1139a19a47SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 1239a19a47SAndrew Rist * 1339a19a47SAndrew Rist * Unless required by applicable law or agreed to in writing, 1439a19a47SAndrew Rist * software distributed under the License is distributed on an 1539a19a47SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1639a19a47SAndrew Rist * KIND, either express or implied. See the License for the 1739a19a47SAndrew Rist * specific language governing permissions and limitations 1839a19a47SAndrew Rist * under the License. 1939a19a47SAndrew Rist * 2039a19a47SAndrew Rist *************************************************************/ 2139a19a47SAndrew Rist 22cdf0e10cSrcweir #ifndef _SFXSTYLE_HXX 23cdf0e10cSrcweir #define _SFXSTYLE_HXX 24cdf0e10cSrcweir 25cdf0e10cSrcweir #include <com/sun/star/style/XStyle.hpp> 26cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 27cdf0e10cSrcweir #include <rtl/ref.hxx> 28cdf0e10cSrcweir #include <vector> 29cdf0e10cSrcweir #include <comphelper/weak.hxx> 30cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 31*49bd4d4bSArmin Le Grand #include <svl/svldllapi.h> 32cdf0e10cSrcweir #include <rsc/rscsfx.hxx> 33cdf0e10cSrcweir #include <tools/string.hxx> 34cdf0e10cSrcweir #include <svl/hint.hxx> 35cdf0e10cSrcweir #include <svl/lstner.hxx> 36cdf0e10cSrcweir #include <svl/brdcst.hxx> 37cdf0e10cSrcweir #include <svl/poolitem.hxx> 38cdf0e10cSrcweir #include <svl/style.hrc> 39*49bd4d4bSArmin Le Grand #include <boost/shared_ptr.hpp> 40cdf0e10cSrcweir 41cdf0e10cSrcweir class SfxItemSet; 42cdf0e10cSrcweir class SfxItemPool; 43cdf0e10cSrcweir class SfxStyleSheetBasePool; 44cdf0e10cSrcweir class SvStream; 45cdf0e10cSrcweir 46cdf0e10cSrcweir /* 47cdf0e10cSrcweir Everyone changing instances of SfxStyleSheetBasePool or SfxStyleSheetBase 48cdf0e10cSrcweir mußt broadcast this using <SfxStyleSheetBasePool::GetBroadcaster()> broadcasten. 49cdf0e10cSrcweir The class <SfxStyleSheetHint> is used for this, it contains an Action-Id and a 50cdf0e10cSrcweir pointer to the <SfxStyleSheetBase>. The actions are: 51cdf0e10cSrcweir 52cdf0e10cSrcweir #define SFX_STYLESHEET_CREATED // style is created 53cdf0e10cSrcweir #define SFX_STYLESHEET_MODIFIED // style is modified 54cdf0e10cSrcweir #define SFX_STYLESHEET_CHANGED // style is replaced 55cdf0e10cSrcweir #define SFX_STYLESHEET_ERASED // style is deleted 56cdf0e10cSrcweir 57cdf0e10cSrcweir The following methods already broadcast themself 58cdf0e10cSrcweir 59cdf0e10cSrcweir SfxStyleSheetHint(SFX_STYLESHEET_MODIFIED) from: 60cdf0e10cSrcweir SfxStyleSheetBase::SetName( const String& rName ) 61cdf0e10cSrcweir SfxStyleSheetBase::SetParent( const String& rName ) 62cdf0e10cSrcweir SfxStyleSheetBase::SetFollow( const String& rName ) 63cdf0e10cSrcweir 64cdf0e10cSrcweir SfxSimpleHint(SFX_HINT_DYING) from: 65cdf0e10cSrcweir SfxStyleSheetBasePool::~SfxStyleSheetBasePool() 66cdf0e10cSrcweir 67cdf0e10cSrcweir SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from: 68cdf0e10cSrcweir SfxStyleSheetBasePool::Make( const String& rName, 69cdf0e10cSrcweir SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos) 70cdf0e10cSrcweir 71cdf0e10cSrcweir SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from: 72cdf0e10cSrcweir SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet ) 73cdf0e10cSrcweir 74cdf0e10cSrcweir SfxStyleSheetHint( SFX_STYLESHEET_ERASED, *p ) from: 75cdf0e10cSrcweir SfxStyleSheetBasePool::Erase( SfxStyleSheetBase* p ) 76cdf0e10cSrcweir SfxStyleSheetBasePool::Clear() 77cdf0e10cSrcweir */ 78cdf0e10cSrcweir 79cdf0e10cSrcweir #define VIRTUAL510 virtual 80cdf0e10cSrcweir 81cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetBase : public comphelper::OWeakTypeObject 82cdf0e10cSrcweir { 83cdf0e10cSrcweir friend class SfxStyleSheetBasePool; 84cdf0e10cSrcweir 85cdf0e10cSrcweir protected: 86cdf0e10cSrcweir SfxStyleSheetBasePool& rPool; // zugehoeriger Pool 87cdf0e10cSrcweir SfxStyleFamily nFamily; // Familie 88cdf0e10cSrcweir 89cdf0e10cSrcweir UniString aName, aParent, aFollow; 90cdf0e10cSrcweir rtl::OUString maDisplayName; 91cdf0e10cSrcweir String aHelpFile; // Name der Hilfedatei 92cdf0e10cSrcweir SfxItemSet* pSet; // ItemSet 93cdf0e10cSrcweir sal_uInt16 nMask; // Flags 94cdf0e10cSrcweir 95cdf0e10cSrcweir sal_uLong nHelpId; // Hilfe-ID 96cdf0e10cSrcweir 97cdf0e10cSrcweir sal_Bool bMySet; // sal_True: Set loeschen im dtor 98cdf0e10cSrcweir 99cdf0e10cSrcweir SfxStyleSheetBase(); // do not use! 100cdf0e10cSrcweir SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, sal_uInt16 mask ); 101cdf0e10cSrcweir SfxStyleSheetBase( const SfxStyleSheetBase& ); 102cdf0e10cSrcweir virtual ~SfxStyleSheetBase(); 103cdf0e10cSrcweir virtual void Load( SvStream&, sal_uInt16 ); 104cdf0e10cSrcweir virtual void Store( SvStream& ); 105cdf0e10cSrcweir 106cdf0e10cSrcweir public: 107cdf0e10cSrcweir TYPEINFO(); 108cdf0e10cSrcweir 109cdf0e10cSrcweir // returns the internal name of this style 110cdf0e10cSrcweir virtual const UniString& GetName() const; 111cdf0e10cSrcweir 112cdf0e10cSrcweir // sets the internal name of this style 113cdf0e10cSrcweir virtual sal_Bool SetName( const UniString& ); 114cdf0e10cSrcweir 115cdf0e10cSrcweir /** returns the display name of this style, it is used at the user interface. 116cdf0e10cSrcweir If the display name is empty, this method returns the internal name. */ 117cdf0e10cSrcweir virtual rtl::OUString GetDisplayName() const; 118cdf0e10cSrcweir 119cdf0e10cSrcweir // sets the display name of this style 120cdf0e10cSrcweir virtual void SetDisplayName( const rtl::OUString& ); 121cdf0e10cSrcweir 122cdf0e10cSrcweir virtual const UniString& GetParent() const; 123cdf0e10cSrcweir virtual sal_Bool SetParent( const UniString& ); 124cdf0e10cSrcweir virtual const UniString& GetFollow() const; 125cdf0e10cSrcweir virtual sal_Bool SetFollow( const UniString& ); 126cdf0e10cSrcweir virtual sal_Bool HasFollowSupport() const; // Default sal_True 127cdf0e10cSrcweir virtual sal_Bool HasParentSupport() const; // Default sal_True 128cdf0e10cSrcweir virtual sal_Bool HasClearParentSupport() const; // Default sal_False 129cdf0e10cSrcweir virtual sal_Bool IsUsed() const; // Default sal_True 130cdf0e10cSrcweir // Default aus dem Itemset; entweder dem uebergebenen 131cdf0e10cSrcweir // oder aus dem per GetItemSet() zurueckgelieferten Set 132cdf0e10cSrcweir virtual UniString GetDescription(); 133cdf0e10cSrcweir virtual UniString GetDescription( SfxMapUnit eMetric ); 134cdf0e10cSrcweir GetPool()135cdf0e10cSrcweir SfxStyleSheetBasePool& GetPool() { return rPool; } GetFamily() const136cdf0e10cSrcweir SfxStyleFamily GetFamily() const { return nFamily; } GetMask() const137cdf0e10cSrcweir sal_uInt16 GetMask() const { return nMask; } SetMask(sal_uInt16 mask)138cdf0e10cSrcweir void SetMask( sal_uInt16 mask) { nMask = mask; } IsUserDefined() const139cdf0e10cSrcweir sal_Bool IsUserDefined() const 140cdf0e10cSrcweir { return sal_Bool( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); } 141cdf0e10cSrcweir 142cdf0e10cSrcweir virtual sal_uLong GetHelpId( String& rFile ); 143cdf0e10cSrcweir virtual void SetHelpId( const String& r, sal_uLong nId ); 144cdf0e10cSrcweir 145cdf0e10cSrcweir virtual SfxItemSet& GetItemSet(); 146cdf0e10cSrcweir virtual sal_uInt16 GetVersion() const; 147cdf0e10cSrcweir }; 148cdf0e10cSrcweir 149cdf0e10cSrcweir //========================================================================= 150cdf0e10cSrcweir 151cdf0e10cSrcweir typedef std::vector< rtl::Reference< SfxStyleSheetBase > > SfxStyles; 152cdf0e10cSrcweir 153cdf0e10cSrcweir //========================================================================= 154cdf0e10cSrcweir 155cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetIterator 156cdf0e10cSrcweir 157cdf0e10cSrcweir /* [Beschreibung] 158cdf0e10cSrcweir 159cdf0e10cSrcweir Klasse zum Iterieren und Suchen auf einem SfxStyleSheetBasePool. 160cdf0e10cSrcweir 161cdf0e10cSrcweir */ 162cdf0e10cSrcweir 163cdf0e10cSrcweir { 164cdf0e10cSrcweir public: 165cdf0e10cSrcweir SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase, 166cdf0e10cSrcweir SfxStyleFamily eFam, sal_uInt16 n=0xFFFF ); 167cdf0e10cSrcweir virtual sal_uInt16 GetSearchMask() const; 168cdf0e10cSrcweir virtual SfxStyleFamily GetSearchFamily() const; 169cdf0e10cSrcweir virtual sal_uInt16 Count(); 170cdf0e10cSrcweir virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx); 171cdf0e10cSrcweir virtual SfxStyleSheetBase* First(); 172cdf0e10cSrcweir virtual SfxStyleSheetBase* Next(); 173cdf0e10cSrcweir virtual SfxStyleSheetBase* Find(const UniString& rStr); 174cdf0e10cSrcweir virtual ~SfxStyleSheetIterator(); 175cdf0e10cSrcweir 176cdf0e10cSrcweir protected: 177cdf0e10cSrcweir 178cdf0e10cSrcweir SfxStyleSheetBasePool* pBasePool; 179cdf0e10cSrcweir SfxStyleFamily nSearchFamily; 180cdf0e10cSrcweir sal_uInt16 nMask; SearchUsed() const181cdf0e10cSrcweir sal_Bool SearchUsed() const { return bSearchUsed; } 182cdf0e10cSrcweir 183cdf0e10cSrcweir private: GetPos()184cdf0e10cSrcweir sal_uInt16 GetPos(){return nAktPosition;} 185cdf0e10cSrcweir SVL_DLLPRIVATE sal_Bool IsTrivialSearch(); 186cdf0e10cSrcweir SVL_DLLPRIVATE sal_Bool DoesStyleMatch(SfxStyleSheetBase *pStyle); 187cdf0e10cSrcweir 188cdf0e10cSrcweir void* pImp; 189cdf0e10cSrcweir SfxStyleSheetBase* pAktStyle; 190cdf0e10cSrcweir sal_uInt16 nAktPosition; 191cdf0e10cSrcweir sal_Bool bSearchUsed; 192cdf0e10cSrcweir 193cdf0e10cSrcweir friend class SfxStyleSheetBasePool; 194cdf0e10cSrcweir }; 195cdf0e10cSrcweir 196*49bd4d4bSArmin Le Grand typedef ::boost::shared_ptr< SfxStyleSheetIterator > SfxStyleSheetIteratorPtr; 197cdf0e10cSrcweir //========================================================================= 198cdf0e10cSrcweir 199cdf0e10cSrcweir class SfxStyleSheetBasePool_Impl; 200cdf0e10cSrcweir 201cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetBasePool: public SfxBroadcaster, public comphelper::OWeakTypeObject 202cdf0e10cSrcweir { 203cdf0e10cSrcweir friend class SfxStyleSheetIterator; 204cdf0e10cSrcweir friend class SfxStyleSheetBase; 205cdf0e10cSrcweir 206cdf0e10cSrcweir SfxStyleSheetBasePool_Impl *pImp; 207cdf0e10cSrcweir 208cdf0e10cSrcweir private: 209cdf0e10cSrcweir SVL_DLLPRIVATE sal_Bool Load1_Impl( SvStream& ); 210cdf0e10cSrcweir SVL_DLLPRIVATE SfxStyleSheetIterator& GetIterator_Impl(); 211cdf0e10cSrcweir protected: 212cdf0e10cSrcweir String aAppName; 213cdf0e10cSrcweir SfxItemPool& rPool; 214cdf0e10cSrcweir SfxStyles aStyles; 215cdf0e10cSrcweir SfxStyleFamily nSearchFamily; 216cdf0e10cSrcweir sal_uInt16 nMask; 217cdf0e10cSrcweir 218cdf0e10cSrcweir SfxStyleSheetBase& Add( SfxStyleSheetBase& ); 219cdf0e10cSrcweir void ChangeParent( const UniString&, const UniString&, sal_Bool bVirtual = sal_True ); 220cdf0e10cSrcweir virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, sal_uInt16 ); 221cdf0e10cSrcweir virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& ); 222cdf0e10cSrcweir 223cdf0e10cSrcweir ~SfxStyleSheetBasePool(); 224cdf0e10cSrcweir 225cdf0e10cSrcweir public: 226cdf0e10cSrcweir SfxStyleSheetBasePool( SfxItemPool& ); 227cdf0e10cSrcweir SfxStyleSheetBasePool( const SfxStyleSheetBasePool& ); 228cdf0e10cSrcweir 229cdf0e10cSrcweir static String GetStreamName(); 230cdf0e10cSrcweir GetAppName() const231cdf0e10cSrcweir const String& GetAppName() const { return aAppName; } 232cdf0e10cSrcweir 233cdf0e10cSrcweir SfxItemPool& GetPool(); 234cdf0e10cSrcweir const SfxItemPool& GetPool() const; 235cdf0e10cSrcweir 236*49bd4d4bSArmin Le Grand virtual SfxStyleSheetIteratorPtr CreateIterator(SfxStyleFamily, sal_uInt16 nMask); 237cdf0e10cSrcweir virtual sal_uInt16 Count(); 238cdf0e10cSrcweir virtual SfxStyleSheetBase* operator[](sal_uInt16 nIdx); 239cdf0e10cSrcweir 240cdf0e10cSrcweir virtual SfxStyleSheetBase& Make(const UniString&, 241cdf0e10cSrcweir SfxStyleFamily eFam, 242cdf0e10cSrcweir sal_uInt16 nMask = 0xffff , 243cdf0e10cSrcweir sal_uInt16 nPos = 0xffff); 244cdf0e10cSrcweir 245cdf0e10cSrcweir virtual void Replace( 246cdf0e10cSrcweir SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget ); 247cdf0e10cSrcweir 248cdf0e10cSrcweir virtual void Remove( SfxStyleSheetBase* ); 249cdf0e10cSrcweir virtual void Insert( SfxStyleSheetBase* ); 250cdf0e10cSrcweir 251cdf0e10cSrcweir virtual void Clear(); 252cdf0e10cSrcweir 253cdf0e10cSrcweir SfxStyleSheetBasePool& operator=( const SfxStyleSheetBasePool& ); 254cdf0e10cSrcweir SfxStyleSheetBasePool& operator+=( const SfxStyleSheetBasePool& ); 255cdf0e10cSrcweir 256cdf0e10cSrcweir const SfxStyles& GetStyles(); 257cdf0e10cSrcweir virtual SfxStyleSheetBase* First(); 258cdf0e10cSrcweir virtual SfxStyleSheetBase* Next(); 259cdf0e10cSrcweir virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF ); 260cdf0e10cSrcweir 261cdf0e10cSrcweir virtual sal_Bool SetParent(SfxStyleFamily eFam, 262cdf0e10cSrcweir const UniString &rStyle, 263cdf0e10cSrcweir const UniString &rParent); 264cdf0e10cSrcweir Find(const UniString & rStr)265cdf0e10cSrcweir SfxStyleSheetBase* Find(const UniString& rStr) 266cdf0e10cSrcweir { return Find(rStr, nSearchFamily, nMask); } 267cdf0e10cSrcweir 268cdf0e10cSrcweir void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=0xFFFF ); 269cdf0e10cSrcweir sal_uInt16 GetSearchMask() const; GetSearchFamily() const270cdf0e10cSrcweir SfxStyleFamily GetSearchFamily() const { return nSearchFamily; } 271cdf0e10cSrcweir 272cdf0e10cSrcweir sal_Bool Load( SvStream& ); 273cdf0e10cSrcweir sal_Bool Store( SvStream&, sal_Bool bUsed = sal_True ); 274cdf0e10cSrcweir }; 275cdf0e10cSrcweir 276cdf0e10cSrcweir //========================================================================= 277cdf0e10cSrcweir 278cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheet: public SfxStyleSheetBase, 279cdf0e10cSrcweir public SfxListener, public SfxBroadcaster 280cdf0e10cSrcweir { 281cdf0e10cSrcweir public: 282cdf0e10cSrcweir TYPEINFO(); 283cdf0e10cSrcweir 284cdf0e10cSrcweir SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, sal_uInt16 ); 285cdf0e10cSrcweir SfxStyleSheet( const SfxStyleSheet& ); 286cdf0e10cSrcweir 287cdf0e10cSrcweir virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); 288cdf0e10cSrcweir virtual sal_Bool SetParent( const UniString& ); 289cdf0e10cSrcweir 290cdf0e10cSrcweir protected: 291cdf0e10cSrcweir SfxStyleSheet(); // do not use! 292cdf0e10cSrcweir virtual ~SfxStyleSheet(); 293cdf0e10cSrcweir }; 294cdf0e10cSrcweir 295cdf0e10cSrcweir //========================================================================= 296cdf0e10cSrcweir 297cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool 298cdf0e10cSrcweir { 299cdf0e10cSrcweir protected: 300cdf0e10cSrcweir using SfxStyleSheetBasePool::Create; 301cdf0e10cSrcweir virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, sal_uInt16 mask); 302cdf0e10cSrcweir virtual SfxStyleSheetBase* Create(const SfxStyleSheet &); 303cdf0e10cSrcweir 304cdf0e10cSrcweir public: 305cdf0e10cSrcweir SfxStyleSheetPool( SfxItemPool const& ); 306cdf0e10cSrcweir 307cdf0e10cSrcweir // virtual sal_Bool CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName); 308cdf0e10cSrcweir }; 309cdf0e10cSrcweir 310cdf0e10cSrcweir //========================================================================= 311cdf0e10cSrcweir 312cdf0e10cSrcweir #define SFX_STYLESHEET_CREATED 1 // neu 313cdf0e10cSrcweir #define SFX_STYLESHEET_MODIFIED 2 // ver"andert 314cdf0e10cSrcweir #define SFX_STYLESHEET_CHANGED 3 // gel"oscht und neu (ausgetauscht) 315cdf0e10cSrcweir #define SFX_STYLESHEET_ERASED 4 // gel"oscht 316cdf0e10cSrcweir #define SFX_STYLESHEET_INDESTRUCTION 5 // wird gerade entfernt 317cdf0e10cSrcweir 318cdf0e10cSrcweir #define SFX_STYLESHEETPOOL_CHANGES 1 // Aenderungen, die den Zustand 319cdf0e10cSrcweir // des Pools anedern, aber nicht 320cdf0e10cSrcweir // ueber die STYLESHEET Hints 321cdf0e10cSrcweir // verschickt werden sollen. 322cdf0e10cSrcweir 323cdf0e10cSrcweir //======================================================================== 324cdf0e10cSrcweir 325cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint 326cdf0e10cSrcweir { 327cdf0e10cSrcweir sal_uInt16 nHint; 328cdf0e10cSrcweir 329cdf0e10cSrcweir public: 330cdf0e10cSrcweir TYPEINFO(); 331cdf0e10cSrcweir SfxStyleSheetPoolHint(sal_uInt16 nArgHint)332cdf0e10cSrcweir SfxStyleSheetPoolHint(sal_uInt16 nArgHint) : nHint(nArgHint){} GetHint() const333cdf0e10cSrcweir sal_uInt16 GetHint() const 334cdf0e10cSrcweir { return nHint; } 335cdf0e10cSrcweir }; 336cdf0e10cSrcweir 337cdf0e10cSrcweir //========================================================================= 338cdf0e10cSrcweir 339cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint 340cdf0e10cSrcweir { 341cdf0e10cSrcweir SfxStyleSheetBase* pStyleSh; 342cdf0e10cSrcweir sal_uInt16 nHint; 343cdf0e10cSrcweir 344cdf0e10cSrcweir public: 345cdf0e10cSrcweir TYPEINFO(); 346cdf0e10cSrcweir 347cdf0e10cSrcweir SfxStyleSheetHint( sal_uInt16 ); 348cdf0e10cSrcweir SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& ); GetStyleSheet() const349cdf0e10cSrcweir SfxStyleSheetBase* GetStyleSheet() const 350cdf0e10cSrcweir { return pStyleSh; } GetHint() const351cdf0e10cSrcweir sal_uInt16 GetHint() const 352cdf0e10cSrcweir { return nHint; } 353cdf0e10cSrcweir }; 354cdf0e10cSrcweir 355cdf0e10cSrcweir class SVL_DLLPUBLIC SfxStyleSheetHintExtended: public SfxStyleSheetHint 356cdf0e10cSrcweir { 357cdf0e10cSrcweir String aName; 358cdf0e10cSrcweir 359cdf0e10cSrcweir public: 360cdf0e10cSrcweir TYPEINFO(); 361cdf0e10cSrcweir 362cdf0e10cSrcweir SfxStyleSheetHintExtended( 363cdf0e10cSrcweir sal_uInt16, const String& rOld ); 364cdf0e10cSrcweir SfxStyleSheetHintExtended( 365cdf0e10cSrcweir sal_uInt16, const String& rOld, 366cdf0e10cSrcweir SfxStyleSheetBase& ); GetOldName()367cdf0e10cSrcweir const String& GetOldName() { return aName; } 368cdf0e10cSrcweir }; 369cdf0e10cSrcweir 370cdf0e10cSrcweir class SVL_DLLPUBLIC SfxUnoStyleSheet : public ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel > 371cdf0e10cSrcweir { 372cdf0e10cSrcweir public: 373cdf0e10cSrcweir SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske ); 374cdf0e10cSrcweir SfxUnoStyleSheet( const SfxStyleSheet& _rSheet ); 375cdf0e10cSrcweir 376cdf0e10cSrcweir static SfxUnoStyleSheet* getUnoStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >& xStyle ); 377cdf0e10cSrcweir 378cdf0e10cSrcweir // XUnoTunnel 379cdf0e10cSrcweir virtual ::sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aIdentifier ) throw (::com::sun::star::uno::RuntimeException); 380cdf0e10cSrcweir 381cdf0e10cSrcweir private: 382cdf0e10cSrcweir SfxUnoStyleSheet(); // not implemented 383cdf0e10cSrcweir 384cdf0e10cSrcweir static const ::com::sun::star::uno::Sequence< ::sal_Int8 >& getIdentifier(); 385cdf0e10cSrcweir }; 386cdf0e10cSrcweir 387cdf0e10cSrcweir #endif 388cdf0e10cSrcweir 389