update dev300-m57
[ooovba.git] / lotuswordpro / source / filter / lwpgrfobj.hxx
blobb448d45985f8133a586b1620ac1813821595b6ae
1 /*************************************************************************
3 * The Contents of this file are made available subject to the terms of
4 * either of the following licenses
6 * - GNU Lesser General Public License Version 2.1
7 * - Sun Industry Standards Source License Version 1.1
9 * Sun Microsystems Inc., October, 2000
11 * GNU Lesser General Public License Version 2.1
12 * =============================================
13 * Copyright 2000 by Sun Microsystems, Inc.
14 * 901 San Antonio Road, Palo Alto, CA 94303, USA
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License version 2.1, as published by the Free Software Foundation.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
28 * MA 02111-1307 USA
31 * Sun Industry Standards Source License Version 1.1
32 * =================================================
33 * The contents of this file are subject to the Sun Industry Standards
34 * Source License Version 1.1 (the "License"); You may not use this file
35 * except in compliance with the License. You may obtain a copy of the
36 * License at http://www.openoffice.org/license.html.
38 * Software provided under this License is provided on an "AS IS" basis,
39 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
40 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
41 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
42 * See the License for the specific provisions governing your rights and
43 * obligations concerning the Software.
45 * The Initial Developer of the Original Code is: IBM Corporation
47 * Copyright: 2008 by IBM Corporation
49 * All Rights Reserved.
51 * Contributor(s): _______________________________________
54 ************************************************************************/
55 /*************************************************************************
56 * @file
57 * For LWP filter architecture prototype
58 ************************************************************************/
60 #ifndef LWPGRFOBJECT_HXX_
61 #define LWPGRFOBJECT_HXX_
63 #include "lwpoleobject.hxx"
64 #include "lwpheader.hxx"
65 #include "xfilter/xfrect.hxx"
66 #include <tools/gen.hxx>
68 struct ImageProcessingData
70 sal_uInt8 nBrightness;
71 sal_uInt8 nContrast;
72 sal_uInt8 nEdgeEnchancement;
73 sal_uInt8 nSmoothing;
74 sal_Bool bAutoContrast;
75 sal_Bool bInvertImage;
77 ImageProcessingData()
79 nBrightness = 50;
80 nContrast = 50;
81 nEdgeEnchancement = 0;
82 nSmoothing = 0;
83 bAutoContrast = sal_False;
84 bInvertImage= sal_False;
88 class XFFrame;
89 class LwpGraphicObject : public LwpGraphicOleObject
91 public:
92 LwpGraphicObject(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
93 ~LwpGraphicObject();
94 private:
95 unsigned char m_sDataFormat[AFID_MAX_FILE_FORMAT_SIZE];
96 unsigned char m_sServerContextFormat[AFID_MAX_CONTEXT_FORMAT_SIZE];
97 sal_Int32 m_nCachedBaseLine;
98 sal_Int16 m_bIsLinked;
99 AFID_CACHE m_Cache;
100 sal_Int16 m_bCompressed;
101 OUString m_WatermarkName;
102 OUString m_LinkedFilePath;
104 ImageProcessingData m_aIPData;
106 void GetRect(INT32& nLeft, INT32& nTop, INT32& nRight, INT32& nBottom);
107 XFRect GetRectInCM();
108 Rectangle GetRectIn100thMM();
109 void XFConvertEquation(XFContentContainer* pCont);
111 void ParseChart(IXFStream* pOutputStream);
112 sal_Bool IsGrafFormatValid();
113 // add by , 03/25/2005
114 std::vector <XFFrame*> m_vXFDrawObjects;
115 // end add
117 public:
118 //inline sal_uInt8* GetBuffer(){return m_DataBuffer;}
119 void Read();
120 //Added by for XFConvert refactor, 03/31/2005
121 virtual void XFConvert (XFContentContainer* pCont);
122 //End of Add
123 void RegisterStyle();
125 // add by , 03/25/2005
126 void CreateDrawObjects();
127 void CreateGrafObject();
128 void GetBentoNamebyID(LwpObjectID* pMyID, std::string& rName);
129 sal_uInt32 GetRawGrafData(sal_uInt8*& pGrafData);
130 sal_uInt32 GetGrafData(sal_uInt8*& pGrafData);
131 void GetGrafOrgSize(long& rWidth, long& rHeight) { rWidth = m_Cache.Width; rHeight = m_Cache.Height; }
132 void GetGrafOrgSize(double& rWidth, double& rHeight);
133 // end add
135 OUString GetWatermarkName(){ return m_WatermarkName;}
136 sal_Int16 IsLinked(){ return m_bIsLinked;}
137 OUString GetLinkedFilePath(){ return m_LinkedFilePath;}
140 #endif