nss: upgrade to release 3.73
[LibreOffice.git] / lotuswordpro / inc / xfilter / xfdrawlinestyle.hxx
blob5dae0ccd482b984ca9c5c2f31a2d76e06f86d9ee
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * The Contents of this file are made available subject to the terms of
5 * either of the following licenses
7 * - GNU Lesser General Public License Version 2.1
8 * - Sun Industry Standards Source License Version 1.1
10 * Sun Microsystems Inc., October, 2000
12 * GNU Lesser General Public License Version 2.1
13 * =============================================
14 * Copyright 2000 by Sun Microsystems, Inc.
15 * 901 San Antonio Road, Palo Alto, CA 94303, USA
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License version 2.1, as published by the Free Software Foundation.
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 * MA 02111-1307 USA
32 * Sun Industry Standards Source License Version 1.1
33 * =================================================
34 * The contents of this file are subject to the Sun Industry Standards
35 * Source License Version 1.1 (the "License"); You may not use this file
36 * except in compliance with the License. You may obtain a copy of the
37 * License at http://www.openoffice.org/license.html.
39 * Software provided under this License is provided on an "AS IS" basis,
40 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
41 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
42 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
43 * See the License for the specific provisions governing your rights and
44 * obligations concerning the Software.
46 * The Initial Developer of the Original Code is: IBM Corporation
48 * Copyright: 2008 by IBM Corporation
50 * All Rights Reserved.
52 * Contributor(s): _______________________________________
55 ************************************************************************/
56 /*************************************************************************
57 * @file
58 * Line style of Drawing object.
59 ************************************************************************/
60 #ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINESTYLE_HXX
61 #define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFDRAWLINESTYLE_HXX
63 #include <xfilter/xfstyle.hxx>
64 #include <xfilter/xfcolor.hxx>
66 /**
67 * @brief
68 * Border line style for drawing object.
70 class XFDrawLineStyle : public XFStyle
72 public:
73 XFDrawLineStyle();
75 public:
76 /**
77 * @descr Set line width.
79 void SetWidth(double width);
81 /**
82 * @descr Set line color.
84 void SetColor(const XFColor& color);
86 /**
87 * @descr Set line transparency.
89 void SetTransparency(sal_Int32 transparency);
91 /**
92 * @descr Set line type, solid,dash,dot?
94 void SetLineStyle(enumXFLineStyle style);
96 /**
97 * @descr Set first dot number of dash line.
99 void SetDot1Number(sal_Int32 number);
102 * @descr Set second dot number of dash line.
104 void SetDot2Number(sal_Int32 number);
107 * @descr Set first dot length.
109 void SetDot1Length(double length);
112 * @descr Set second dot length.
114 void SetDot2Length(double length);
117 * @descr Set space between dash dot.
119 void SetSpace(double space);
122 * @descr decide whether it's a solid line.
124 bool IsSolid() const;
126 double GetWidth() const;
128 const XFColor& GetColor() const;
130 sal_Int32 GetTransparency() const;
132 virtual enumXFStyle GetStyleFamily() override;
134 virtual void ToXml(IXFStream *pStrm) override;
136 private:
137 enumXFLineStyle m_eLineStyle;
138 XFColor m_aColor;
139 double m_fWidth;
140 sal_Int32 m_nTransparency;
141 sal_Int32 m_nNumber1;
142 sal_Int32 m_nNumber2;
143 double m_fSpace;
144 double m_fLength1;
145 double m_fLength2;
148 inline void XFDrawLineStyle::SetWidth(double width)
150 m_fWidth = width;
153 inline void XFDrawLineStyle::SetColor(const XFColor& color)
155 m_aColor = color;
158 inline void XFDrawLineStyle::SetTransparency(sal_Int32 transparency)
160 m_nTransparency = transparency;
163 inline void XFDrawLineStyle::SetLineStyle(enumXFLineStyle style)
165 m_eLineStyle = style;
168 inline void XFDrawLineStyle::SetDot1Number(sal_Int32 number)
170 m_nNumber1 = number;
173 inline void XFDrawLineStyle::SetDot2Number(sal_Int32 number)
175 m_nNumber2 = number;
178 inline void XFDrawLineStyle::SetDot1Length(double length)
180 m_fLength1 = length;
183 inline void XFDrawLineStyle::SetDot2Length(double length)
185 m_fLength2 = length;
188 inline void XFDrawLineStyle::SetSpace(double space)
190 m_fSpace = space;
193 inline bool XFDrawLineStyle::IsSolid() const
195 return (m_eLineStyle==enumXFLineSolid);
198 inline double XFDrawLineStyle::GetWidth() const
200 return m_fWidth;
203 inline const XFColor& XFDrawLineStyle::GetColor() const
205 return m_aColor;
208 inline sal_Int32 XFDrawLineStyle::GetTransparency() const
210 return m_nTransparency;
213 #endif
215 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */