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 _ENVIMG_HXX 24 #define _ENVIMG_HXX 25 26 #include <svl/poolitem.hxx> 27 #include <unotools/configitem.hxx> 28 #include "swdllapi.h" 29 30 // MakeSender ----------------------------------------------------------------- 31 32 SW_DLLPUBLIC String MakeSender(); 33 34 // enum ----------------------------------------------------------------------- 35 36 enum SwEnvAlign 37 { 38 ENV_HOR_LEFT = 0, 39 ENV_HOR_CNTR, 40 ENV_HOR_RGHT, 41 ENV_VER_LEFT, 42 ENV_VER_CNTR, 43 ENV_VER_RGHT 44 }; 45 46 // class SwEnvItem ------------------------------------------------------------ 47 48 class SW_DLLPUBLIC SwEnvItem : public SfxPoolItem 49 { 50 public: 51 52 rtl::OUString aAddrText; // Text fuer Empfaenger 53 sal_Bool bSend; // Absender? 54 rtl::OUString aSendText; // Text fuer Absender 55 sal_Int32 lAddrFromLeft; // Linker Abstand fuer Empfaenger (twips) 56 sal_Int32 lAddrFromTop; // Oberer Abstand fuer Empfaenger (twips) 57 sal_Int32 lSendFromLeft; // Linker Abstand fuer Absender (twips) 58 sal_Int32 lSendFromTop; // Oberer Abstand fuer Absender (twips) 59 sal_Int32 lWidth; // Breite des Umschlags (twips) 60 sal_Int32 lHeight; // Hoehe des Umschlags (twips) 61 SwEnvAlign eAlign; // Ausrichtung beim Einzug 62 sal_Bool bPrintFromAbove; // Von oben drucken? 63 sal_Int32 lShiftRight; // Verschiebung nach rechts (twips) 64 sal_Int32 lShiftDown; // Verschiebung nach unten (twips) 65 66 SwEnvItem(); 67 SwEnvItem(const SwEnvItem& rItem); 68 69 TYPEINFO(); 70 71 SwEnvItem& operator =(const SwEnvItem& rItem); 72 73 virtual int operator ==(const SfxPoolItem& rItem) const; 74 75 virtual SfxPoolItem* Clone(SfxItemPool* = 0) const; 76 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 77 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 78 }; 79 80 // class SwEnvCfgItem ------------------------------------------------------- 81 class SwEnvCfgItem : public utl::ConfigItem 82 { 83 SwEnvItem aEnvItem; 84 85 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 86 public: 87 SwEnvCfgItem(); 88 ~SwEnvCfgItem(); 89 GetItem()90 SwEnvItem& GetItem() {return aEnvItem;} 91 92 virtual void Commit(); 93 virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); 94 }; 95 #endif 96 97