1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _ENVIMG_HXX 28 #define _ENVIMG_HXX 29 30 #include <svl/poolitem.hxx> 31 #include <unotools/configitem.hxx> 32 #include "swdllapi.h" 33 34 // MakeSender ----------------------------------------------------------------- 35 36 SW_DLLPUBLIC String MakeSender(); 37 38 // enum ----------------------------------------------------------------------- 39 40 enum SwEnvAlign 41 { 42 ENV_HOR_LEFT = 0, 43 ENV_HOR_CNTR, 44 ENV_HOR_RGHT, 45 ENV_VER_LEFT, 46 ENV_VER_CNTR, 47 ENV_VER_RGHT 48 }; 49 50 // class SwEnvItem ------------------------------------------------------------ 51 52 class SW_DLLPUBLIC SwEnvItem : public SfxPoolItem 53 { 54 public: 55 56 rtl::OUString aAddrText; // Text fuer Empfaenger 57 sal_Bool bSend; // Absender? 58 rtl::OUString aSendText; // Text fuer Absender 59 sal_Int32 lAddrFromLeft; // Linker Abstand fuer Empfaenger (twips) 60 sal_Int32 lAddrFromTop; // Oberer Abstand fuer Empfaenger (twips) 61 sal_Int32 lSendFromLeft; // Linker Abstand fuer Absender (twips) 62 sal_Int32 lSendFromTop; // Oberer Abstand fuer Absender (twips) 63 sal_Int32 lWidth; // Breite des Umschlags (twips) 64 sal_Int32 lHeight; // Hoehe des Umschlags (twips) 65 SwEnvAlign eAlign; // Ausrichtung beim Einzug 66 sal_Bool bPrintFromAbove; // Von oben drucken? 67 sal_Int32 lShiftRight; // Verschiebung nach rechts (twips) 68 sal_Int32 lShiftDown; // Verschiebung nach unten (twips) 69 70 SwEnvItem(); 71 SwEnvItem(const SwEnvItem& rItem); 72 73 TYPEINFO(); 74 75 SwEnvItem& operator =(const SwEnvItem& rItem); 76 77 virtual int operator ==(const SfxPoolItem& rItem) const; 78 79 virtual SfxPoolItem* Clone(SfxItemPool* = 0) const; 80 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 81 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 82 }; 83 84 // class SwEnvCfgItem ------------------------------------------------------- 85 class SwEnvCfgItem : public utl::ConfigItem 86 { 87 SwEnvItem aEnvItem; 88 89 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); 90 public: 91 SwEnvCfgItem(); 92 ~SwEnvCfgItem(); 93 94 SwEnvItem& GetItem() {return aEnvItem;} 95 96 virtual void Commit(); 97 virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); 98 }; 99 #endif 100 101