19e0e4191SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
39e0e4191SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
49e0e4191SAndrew Rist * or more contributor license agreements. See the NOTICE file
59e0e4191SAndrew Rist * distributed with this work for additional information
69e0e4191SAndrew Rist * regarding copyright ownership. The ASF licenses this file
79e0e4191SAndrew Rist * to you under the Apache License, Version 2.0 (the
89e0e4191SAndrew Rist * "License"); you may not use this file except in compliance
99e0e4191SAndrew Rist * with the License. You may obtain a copy of the License at
10cdf0e10cSrcweir *
119e0e4191SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
139e0e4191SAndrew Rist * Unless required by applicable law or agreed to in writing,
149e0e4191SAndrew Rist * software distributed under the License is distributed on an
159e0e4191SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
169e0e4191SAndrew Rist * KIND, either express or implied. See the License for the
179e0e4191SAndrew Rist * specific language governing permissions and limitations
189e0e4191SAndrew Rist * under the License.
19cdf0e10cSrcweir *
209e0e4191SAndrew Rist *************************************************************/
219e0e4191SAndrew Rist
229e0e4191SAndrew Rist
23*b63233d8Sdamjan #include "precompiled_reportdesign.hxx"
24cdf0e10cSrcweir #include "FixedLine.hxx"
25cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
26cdf0e10cSrcweir #ifndef REPORTDESIGN_SHARED_CORESTRINGS_HRC
27cdf0e10cSrcweir #include "corestrings.hrc"
28cdf0e10cSrcweir #endif
29cdf0e10cSrcweir #ifndef REPORTDESIGN_CORE_RESOURCE_HRC_
30cdf0e10cSrcweir #include "core_resource.hrc"
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include "core_resource.hxx"
33cdf0e10cSrcweir #include <comphelper/sequence.hxx>
34cdf0e10cSrcweir #include <tools/debug.hxx>
35cdf0e10cSrcweir #include <comphelper/property.hxx>
36cdf0e10cSrcweir #include "Tools.hxx"
37cdf0e10cSrcweir #include "FormatCondition.hxx"
38cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
39cdf0e10cSrcweir #include <com/sun/star/text/ParagraphVertAlign.hpp>
40cdf0e10cSrcweir #include <boost/bind.hpp>
41cdf0e10cSrcweir #include "ReportHelperImpl.hxx"
42cdf0e10cSrcweir
43cdf0e10cSrcweir #define MIN_WIDTH 80
44cdf0e10cSrcweir #define MIN_HEIGHT 20
45cdf0e10cSrcweir // =============================================================================
46cdf0e10cSrcweir namespace reportdesign
47cdf0e10cSrcweir {
48cdf0e10cSrcweir // =============================================================================
49cdf0e10cSrcweir using namespace com::sun::star;
50cdf0e10cSrcweir using namespace comphelper;
lcl_getLineOptionals()51cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > lcl_getLineOptionals()
52cdf0e10cSrcweir {
53cdf0e10cSrcweir ::rtl::OUString pProps[] = {
54cdf0e10cSrcweir PROPERTY_DATAFIELD
55cdf0e10cSrcweir ,PROPERTY_DEFAULTCONTROL
56cdf0e10cSrcweir ,PROPERTY_CONTROLBORDER
57cdf0e10cSrcweir ,PROPERTY_CONTROLBORDERCOLOR
58cdf0e10cSrcweir ,PROPERTY_CHARCOLOR
59cdf0e10cSrcweir ,PROPERTY_CHAREMPHASIS
60cdf0e10cSrcweir ,PROPERTY_CHARFONTCHARSET
61cdf0e10cSrcweir ,PROPERTY_CHARFONTFAMILY
62cdf0e10cSrcweir ,PROPERTY_CHARFONTNAME
63cdf0e10cSrcweir ,PROPERTY_CHARFONTPITCH
64cdf0e10cSrcweir ,PROPERTY_CHARFONTSTYLENAME
65cdf0e10cSrcweir ,PROPERTY_CHARHEIGHT
66cdf0e10cSrcweir ,PROPERTY_CHARPOSTURE
67cdf0e10cSrcweir ,PROPERTY_CHARRELIEF
68cdf0e10cSrcweir ,PROPERTY_FONTDESCRIPTOR
69cdf0e10cSrcweir ,PROPERTY_FONTDESCRIPTORASIAN
70cdf0e10cSrcweir ,PROPERTY_FONTDESCRIPTORCOMPLEX
71cdf0e10cSrcweir ,PROPERTY_CONTROLTEXTEMPHASISMARK
72cdf0e10cSrcweir ,PROPERTY_CHARROTATION
73cdf0e10cSrcweir ,PROPERTY_CHARSCALEWIDTH
74cdf0e10cSrcweir ,PROPERTY_CHARSTRIKEOUT
75cdf0e10cSrcweir ,PROPERTY_CHARUNDERLINECOLOR
76cdf0e10cSrcweir ,PROPERTY_CHARUNDERLINE
77cdf0e10cSrcweir ,PROPERTY_CHARWEIGHT
78cdf0e10cSrcweir ,PROPERTY_CHARWORDMODE
79cdf0e10cSrcweir ,PROPERTY_CONTROLBACKGROUND
80cdf0e10cSrcweir ,PROPERTY_CONTROLBACKGROUNDTRANSPARENT
81cdf0e10cSrcweir ,PROPERTY_CHARFLASH
82cdf0e10cSrcweir ,PROPERTY_CHARAUTOKERNING
83cdf0e10cSrcweir ,PROPERTY_CHARESCAPEMENTHEIGHT
84cdf0e10cSrcweir ,PROPERTY_CHARLOCALE
85cdf0e10cSrcweir ,PROPERTY_CHARESCAPEMENT
86cdf0e10cSrcweir ,PROPERTY_CHARCASEMAP
87cdf0e10cSrcweir ,PROPERTY_CHARCOMBINEISON
88cdf0e10cSrcweir ,PROPERTY_CHARCOMBINEPREFIX
89cdf0e10cSrcweir ,PROPERTY_CHARCOMBINESUFFIX
90cdf0e10cSrcweir ,PROPERTY_CHARHIDDEN
91cdf0e10cSrcweir ,PROPERTY_CHARSHADOWED
92cdf0e10cSrcweir ,PROPERTY_CHARCONTOURED
93cdf0e10cSrcweir ,PROPERTY_HYPERLINKURL
94cdf0e10cSrcweir ,PROPERTY_HYPERLINKTARGET
95cdf0e10cSrcweir ,PROPERTY_HYPERLINKNAME
96cdf0e10cSrcweir ,PROPERTY_VISITEDCHARSTYLENAME
97cdf0e10cSrcweir ,PROPERTY_UNVISITEDCHARSTYLENAME
98cdf0e10cSrcweir ,PROPERTY_CHARKERNING
99cdf0e10cSrcweir ,PROPERTY_PRINTREPEATEDVALUES
100cdf0e10cSrcweir ,PROPERTY_CONDITIONALPRINTEXPRESSION
101cdf0e10cSrcweir ,PROPERTY_PRINTWHENGROUPCHANGE
102cdf0e10cSrcweir ,PROPERTY_MASTERFIELDS
103cdf0e10cSrcweir ,PROPERTY_DETAILFIELDS
104cdf0e10cSrcweir ,PROPERTY_PARAADJUST
105cdf0e10cSrcweir
106cdf0e10cSrcweir , PROPERTY_CHAREMPHASISASIAN
107cdf0e10cSrcweir , PROPERTY_CHARFONTNAMEASIAN
108cdf0e10cSrcweir , PROPERTY_CHARFONTSTYLENAMEASIAN
109cdf0e10cSrcweir , PROPERTY_CHARFONTFAMILYASIAN
110cdf0e10cSrcweir , PROPERTY_CHARFONTCHARSETASIAN
111cdf0e10cSrcweir , PROPERTY_CHARFONTPITCHASIAN
112cdf0e10cSrcweir , PROPERTY_CHARHEIGHTASIAN
113cdf0e10cSrcweir , PROPERTY_CHARUNDERLINEASIAN
114cdf0e10cSrcweir , PROPERTY_CHARWEIGHTASIAN
115cdf0e10cSrcweir , PROPERTY_CHARPOSTUREASIAN
116cdf0e10cSrcweir , PROPERTY_CHARWORDMODEASIAN
117cdf0e10cSrcweir , PROPERTY_CHARROTATIONASIAN
118cdf0e10cSrcweir , PROPERTY_CHARSCALEWIDTHASIAN
119cdf0e10cSrcweir , PROPERTY_CHARLOCALEASIAN
120cdf0e10cSrcweir , PROPERTY_CHAREMPHASISCOMPLEX
121cdf0e10cSrcweir , PROPERTY_CHARFONTNAMECOMPLEX
122cdf0e10cSrcweir , PROPERTY_CHARFONTSTYLENAMECOMPLEX
123cdf0e10cSrcweir , PROPERTY_CHARFONTFAMILYCOMPLEX
124cdf0e10cSrcweir , PROPERTY_CHARFONTCHARSETCOMPLEX
125cdf0e10cSrcweir , PROPERTY_CHARFONTPITCHCOMPLEX
126cdf0e10cSrcweir , PROPERTY_CHARHEIGHTCOMPLEX
127cdf0e10cSrcweir , PROPERTY_CHARUNDERLINECOMPLEX
128cdf0e10cSrcweir , PROPERTY_CHARWEIGHTCOMPLEX
129cdf0e10cSrcweir , PROPERTY_CHARPOSTURECOMPLEX
130cdf0e10cSrcweir , PROPERTY_CHARWORDMODECOMPLEX
131cdf0e10cSrcweir , PROPERTY_CHARROTATIONCOMPLEX
132cdf0e10cSrcweir , PROPERTY_CHARSCALEWIDTHCOMPLEX
133cdf0e10cSrcweir , PROPERTY_CHARLOCALECOMPLEX
134cdf0e10cSrcweir
135cdf0e10cSrcweir
136cdf0e10cSrcweir };
137cdf0e10cSrcweir return uno::Sequence< ::rtl::OUString >(pProps,sizeof(pProps)/sizeof(pProps[0]));
138cdf0e10cSrcweir }
DBG_NAME(rpt_OFixedLine)139cdf0e10cSrcweir DBG_NAME(rpt_OFixedLine)
140cdf0e10cSrcweir // -----------------------------------------------------------------------------
141cdf0e10cSrcweir OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext)
142cdf0e10cSrcweir :FixedLineBase(m_aMutex)
143cdf0e10cSrcweir ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
144cdf0e10cSrcweir ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
145cdf0e10cSrcweir ,m_nOrientation(1)
146cdf0e10cSrcweir ,m_LineColor(0)
147cdf0e10cSrcweir ,m_LineTransparence(0)
148cdf0e10cSrcweir ,m_LineWidth(0)
149cdf0e10cSrcweir {
150cdf0e10cSrcweir DBG_CTOR(rpt_OFixedLine,NULL);
151cdf0e10cSrcweir m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
152cdf0e10cSrcweir m_aProps.aComponent.m_nWidth = MIN_WIDTH;
153cdf0e10cSrcweir }
154cdf0e10cSrcweir // -----------------------------------------------------------------------------
OFixedLine(uno::Reference<uno::XComponentContext> const & _xContext,const uno::Reference<lang::XMultiServiceFactory> & _xFactory,uno::Reference<drawing::XShape> & _xShape,sal_Int32 _nOrientation)155cdf0e10cSrcweir OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContext
156cdf0e10cSrcweir ,const uno::Reference< lang::XMultiServiceFactory>& _xFactory
157cdf0e10cSrcweir ,uno::Reference< drawing::XShape >& _xShape
158cdf0e10cSrcweir ,sal_Int32 _nOrientation)
159cdf0e10cSrcweir :FixedLineBase(m_aMutex)
160cdf0e10cSrcweir ,FixedLinePropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getLineOptionals())
161cdf0e10cSrcweir ,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
162cdf0e10cSrcweir ,m_nOrientation(_nOrientation)
163cdf0e10cSrcweir ,m_LineColor(0)
164cdf0e10cSrcweir ,m_LineTransparence(0)
165cdf0e10cSrcweir ,m_LineWidth(0)
166cdf0e10cSrcweir {
167cdf0e10cSrcweir DBG_CTOR(rpt_OFixedLine,NULL);
168cdf0e10cSrcweir m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
169cdf0e10cSrcweir m_aProps.aComponent.m_xFactory = _xFactory;
170cdf0e10cSrcweir osl_incrementInterlockedCount( &m_refCount );
171cdf0e10cSrcweir try
172cdf0e10cSrcweir {
173cdf0e10cSrcweir awt::Size aSize = _xShape->getSize();
174cdf0e10cSrcweir if ( m_nOrientation == 1 )
175cdf0e10cSrcweir {
176cdf0e10cSrcweir if ( aSize.Width < MIN_WIDTH )
177cdf0e10cSrcweir {
178cdf0e10cSrcweir aSize.Width = MIN_WIDTH;
179cdf0e10cSrcweir _xShape->setSize(aSize);
180cdf0e10cSrcweir }
181cdf0e10cSrcweir }
182cdf0e10cSrcweir else if ( MIN_HEIGHT > aSize.Height )
183cdf0e10cSrcweir {
184cdf0e10cSrcweir aSize.Height = MIN_HEIGHT;
185cdf0e10cSrcweir _xShape->setSize(aSize);
186cdf0e10cSrcweir }
187cdf0e10cSrcweir m_aProps.aComponent.setShape(_xShape,this,m_refCount);
188cdf0e10cSrcweir }
189cdf0e10cSrcweir catch(uno::Exception&)
190cdf0e10cSrcweir {
191cdf0e10cSrcweir OSL_ENSURE(0,"OFixedLine::OFixedLine: Exception caught!");
192cdf0e10cSrcweir }
193cdf0e10cSrcweir osl_decrementInterlockedCount( &m_refCount );
194cdf0e10cSrcweir }
195cdf0e10cSrcweir // -----------------------------------------------------------------------------
~OFixedLine()196cdf0e10cSrcweir OFixedLine::~OFixedLine()
197cdf0e10cSrcweir {
198cdf0e10cSrcweir DBG_DTOR(rpt_OFixedLine,NULL);
199cdf0e10cSrcweir }
200cdf0e10cSrcweir // -----------------------------------------------------------------------------
201cdf0e10cSrcweir //IMPLEMENT_FORWARD_XINTERFACE2(OFixedLine,FixedLineBase,FixedLinePropertySet)
IMPLEMENT_FORWARD_REFCOUNT(OFixedLine,FixedLineBase)202cdf0e10cSrcweir IMPLEMENT_FORWARD_REFCOUNT( OFixedLine, FixedLineBase )
203cdf0e10cSrcweir // --------------------------------------------------------------------------------
204cdf0e10cSrcweir uno::Any SAL_CALL OFixedLine::queryInterface( const uno::Type& _rType ) throw (uno::RuntimeException)
205cdf0e10cSrcweir {
206cdf0e10cSrcweir uno::Any aReturn = FixedLineBase::queryInterface(_rType);
207cdf0e10cSrcweir if ( !aReturn.hasValue() )
208cdf0e10cSrcweir aReturn = FixedLinePropertySet::queryInterface(_rType);
209cdf0e10cSrcweir if ( !aReturn.hasValue() && OReportControlModel::isInterfaceForbidden(_rType) )
210cdf0e10cSrcweir return aReturn;
211cdf0e10cSrcweir
212cdf0e10cSrcweir return aReturn.hasValue() ? aReturn : (m_aProps.aComponent.m_xProxy.is() ? m_aProps.aComponent.m_xProxy->queryAggregation(_rType) : aReturn);
213cdf0e10cSrcweir }
214cdf0e10cSrcweir // -----------------------------------------------------------------------------
dispose()215cdf0e10cSrcweir void SAL_CALL OFixedLine::dispose() throw(uno::RuntimeException)
216cdf0e10cSrcweir {
217cdf0e10cSrcweir FixedLinePropertySet::dispose();
218cdf0e10cSrcweir cppu::WeakComponentImplHelperBase::dispose();
219cdf0e10cSrcweir }
220cdf0e10cSrcweir // -----------------------------------------------------------------------------
getImplementationName_Static()221cdf0e10cSrcweir ::rtl::OUString OFixedLine::getImplementationName_Static( ) throw(uno::RuntimeException)
222cdf0e10cSrcweir {
223cdf0e10cSrcweir return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.OFixedLine"));
224cdf0e10cSrcweir }
225cdf0e10cSrcweir
226cdf0e10cSrcweir //--------------------------------------------------------------------------
getImplementationName()227cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getImplementationName( ) throw(uno::RuntimeException)
228cdf0e10cSrcweir {
229cdf0e10cSrcweir return getImplementationName_Static();
230cdf0e10cSrcweir }
231cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames_Static()232cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > OFixedLine::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
233cdf0e10cSrcweir {
234cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > aServices(1);
235cdf0e10cSrcweir aServices.getArray()[0] = SERVICE_FIXEDLINE;
236cdf0e10cSrcweir
237cdf0e10cSrcweir return aServices;
238cdf0e10cSrcweir }
239cdf0e10cSrcweir //------------------------------------------------------------------------------
create(uno::Reference<uno::XComponentContext> const & xContext)240cdf0e10cSrcweir uno::Reference< uno::XInterface > OFixedLine::create(uno::Reference< uno::XComponentContext > const & xContext)
241cdf0e10cSrcweir {
242cdf0e10cSrcweir return *(new OFixedLine(xContext));
243cdf0e10cSrcweir }
244cdf0e10cSrcweir
245cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames()246cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > SAL_CALL OFixedLine::getSupportedServiceNames( ) throw(uno::RuntimeException)
247cdf0e10cSrcweir {
248cdf0e10cSrcweir return getSupportedServiceNames_Static();
249cdf0e10cSrcweir }
250cdf0e10cSrcweir //------------------------------------------------------------------------------
supportsService(const::rtl::OUString & ServiceName)251cdf0e10cSrcweir sal_Bool SAL_CALL OFixedLine::supportsService(const ::rtl::OUString& ServiceName) throw( uno::RuntimeException )
252cdf0e10cSrcweir {
253cdf0e10cSrcweir return ::comphelper::existsValue(ServiceName,getSupportedServiceNames_Static());
254cdf0e10cSrcweir }
255cdf0e10cSrcweir // -----------------------------------------------------------------------------
256cdf0e10cSrcweir // XReportComponent
257cdf0e10cSrcweir REPORTCOMPONENT_IMPL3(OFixedLine,m_aProps.aComponent)
REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)258cdf0e10cSrcweir REPORTCOMPONENT_NOMASTERDETAIL(OFixedLine)
259cdf0e10cSrcweir // -----------------------------------------------------------------------------
260cdf0e10cSrcweir ::sal_Int16 SAL_CALL OFixedLine::getControlBorder( ) throw (beans::UnknownPropertyException, uno::RuntimeException)
261cdf0e10cSrcweir {
262cdf0e10cSrcweir throw beans::UnknownPropertyException();
263cdf0e10cSrcweir }
264cdf0e10cSrcweir // -----------------------------------------------------------------------------
setControlBorder(::sal_Int16)265cdf0e10cSrcweir void SAL_CALL OFixedLine::setControlBorder( ::sal_Int16 /*_border*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
266cdf0e10cSrcweir {
267cdf0e10cSrcweir throw beans::UnknownPropertyException();
268cdf0e10cSrcweir }
269cdf0e10cSrcweir // -----------------------------------------------------------------------------
getControlBorderColor()270cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getControlBorderColor() throw (beans::UnknownPropertyException,uno::RuntimeException)
271cdf0e10cSrcweir {
272cdf0e10cSrcweir throw beans::UnknownPropertyException();
273cdf0e10cSrcweir }
274cdf0e10cSrcweir // -----------------------------------------------------------------------------
setControlBorderColor(::sal_Int32)275cdf0e10cSrcweir void SAL_CALL OFixedLine::setControlBorderColor( ::sal_Int32 /*_bordercolor*/ ) throw (beans::UnknownPropertyException,lang::IllegalArgumentException,uno::RuntimeException)
276cdf0e10cSrcweir {
277cdf0e10cSrcweir throw beans::UnknownPropertyException();
278cdf0e10cSrcweir }
279cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPropertySetInfo()280cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL OFixedLine::getPropertySetInfo( ) throw(uno::RuntimeException)
281cdf0e10cSrcweir {
282cdf0e10cSrcweir return FixedLinePropertySet::getPropertySetInfo();
283cdf0e10cSrcweir }
284cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPropertyValue(const::rtl::OUString & aPropertyName,const uno::Any & aValue)285cdf0e10cSrcweir void SAL_CALL OFixedLine::setPropertyValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
286cdf0e10cSrcweir {
287cdf0e10cSrcweir FixedLinePropertySet::setPropertyValue( aPropertyName, aValue );
288cdf0e10cSrcweir }
289cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPropertyValue(const::rtl::OUString & PropertyName)290cdf0e10cSrcweir uno::Any SAL_CALL OFixedLine::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
291cdf0e10cSrcweir {
292cdf0e10cSrcweir return FixedLinePropertySet::getPropertyValue( PropertyName);
293cdf0e10cSrcweir }
294cdf0e10cSrcweir // -----------------------------------------------------------------------------
addPropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & xListener)295cdf0e10cSrcweir void SAL_CALL OFixedLine::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
296cdf0e10cSrcweir {
297cdf0e10cSrcweir FixedLinePropertySet::addPropertyChangeListener( aPropertyName, xListener );
298cdf0e10cSrcweir }
299cdf0e10cSrcweir // -----------------------------------------------------------------------------
removePropertyChangeListener(const::rtl::OUString & aPropertyName,const uno::Reference<beans::XPropertyChangeListener> & aListener)300cdf0e10cSrcweir void SAL_CALL OFixedLine::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
301cdf0e10cSrcweir {
302cdf0e10cSrcweir FixedLinePropertySet::removePropertyChangeListener( aPropertyName, aListener );
303cdf0e10cSrcweir }
304cdf0e10cSrcweir // -----------------------------------------------------------------------------
addVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)305cdf0e10cSrcweir void SAL_CALL OFixedLine::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
306cdf0e10cSrcweir {
307cdf0e10cSrcweir FixedLinePropertySet::addVetoableChangeListener( PropertyName, aListener );
308cdf0e10cSrcweir }
309cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeVetoableChangeListener(const::rtl::OUString & PropertyName,const uno::Reference<beans::XVetoableChangeListener> & aListener)310cdf0e10cSrcweir void SAL_CALL OFixedLine::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
311cdf0e10cSrcweir {
312cdf0e10cSrcweir FixedLinePropertySet::removeVetoableChangeListener( PropertyName, aListener );
313cdf0e10cSrcweir }
314cdf0e10cSrcweir // -----------------------------------------------------------------------------
315cdf0e10cSrcweir // XReportControlModel
getDataField()316cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getDataField() throw (beans::UnknownPropertyException, uno::RuntimeException)
317cdf0e10cSrcweir {
318cdf0e10cSrcweir throw beans::UnknownPropertyException();
319cdf0e10cSrcweir }
320cdf0e10cSrcweir // -----------------------------------------------------------------------------
setDataField(const::rtl::OUString &)321cdf0e10cSrcweir void SAL_CALL OFixedLine::setDataField( const ::rtl::OUString& /*_datafield*/ ) throw (lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException)
322cdf0e10cSrcweir {
323cdf0e10cSrcweir throw beans::UnknownPropertyException();
324cdf0e10cSrcweir }
325cdf0e10cSrcweir // -----------------------------------------------------------------------------
getControlBackground()326cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getControlBackground() throw (beans::UnknownPropertyException, uno::RuntimeException)
327cdf0e10cSrcweir {
328cdf0e10cSrcweir throw beans::UnknownPropertyException();
329cdf0e10cSrcweir }
330cdf0e10cSrcweir // -----------------------------------------------------------------------------
setControlBackground(::sal_Int32)331cdf0e10cSrcweir void SAL_CALL OFixedLine::setControlBackground( ::sal_Int32 /*_backgroundcolor*/ ) throw (uno::RuntimeException,beans::UnknownPropertyException)
332cdf0e10cSrcweir {
333cdf0e10cSrcweir throw beans::UnknownPropertyException();
334cdf0e10cSrcweir }
335cdf0e10cSrcweir // -----------------------------------------------------------------------------
getControlBackgroundTransparent()336cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedLine::getControlBackgroundTransparent() throw (beans::UnknownPropertyException, uno::RuntimeException)
337cdf0e10cSrcweir {
338cdf0e10cSrcweir throw beans::UnknownPropertyException();
339cdf0e10cSrcweir }
340cdf0e10cSrcweir // -----------------------------------------------------------------------------
setControlBackgroundTransparent(::sal_Bool)341cdf0e10cSrcweir void SAL_CALL OFixedLine::setControlBackgroundTransparent( ::sal_Bool /*_controlbackgroundtransparent*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
342cdf0e10cSrcweir {
343cdf0e10cSrcweir throw beans::UnknownPropertyException();
344cdf0e10cSrcweir }
345cdf0e10cSrcweir // -----------------------------------------------------------------------------
getPrintWhenGroupChange()346cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedLine::getPrintWhenGroupChange() throw (beans::UnknownPropertyException, uno::RuntimeException)
347cdf0e10cSrcweir {
348cdf0e10cSrcweir throw beans::UnknownPropertyException();
349cdf0e10cSrcweir }
350cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPrintWhenGroupChange(::sal_Bool)351cdf0e10cSrcweir void SAL_CALL OFixedLine::setPrintWhenGroupChange( ::sal_Bool /*_printwhengroupchange*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
352cdf0e10cSrcweir {
353cdf0e10cSrcweir throw beans::UnknownPropertyException();
354cdf0e10cSrcweir }
355cdf0e10cSrcweir // -----------------------------------------------------------------------------
getConditionalPrintExpression()356cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getConditionalPrintExpression() throw (beans::UnknownPropertyException, uno::RuntimeException)
357cdf0e10cSrcweir {
358cdf0e10cSrcweir throw beans::UnknownPropertyException();
359cdf0e10cSrcweir }
360cdf0e10cSrcweir // -----------------------------------------------------------------------------
setConditionalPrintExpression(const::rtl::OUString &)361cdf0e10cSrcweir void SAL_CALL OFixedLine::setConditionalPrintExpression( const ::rtl::OUString& /*_conditionalprintexpression*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
362cdf0e10cSrcweir {
363cdf0e10cSrcweir throw beans::UnknownPropertyException();
364cdf0e10cSrcweir }
365cdf0e10cSrcweir // -----------------------------------------------------------------------------
366cdf0e10cSrcweir // XCloneable
createClone()367cdf0e10cSrcweir uno::Reference< util::XCloneable > SAL_CALL OFixedLine::createClone( ) throw (uno::RuntimeException)
368cdf0e10cSrcweir {
369cdf0e10cSrcweir uno::Reference< report::XReportComponent> xSource = this;
370cdf0e10cSrcweir uno::Reference< report::XFixedLine> xSet(cloneObject(xSource,m_aProps.aComponent.m_xFactory,SERVICE_FIXEDLINE),uno::UNO_QUERY_THROW);
371cdf0e10cSrcweir return xSet.get();
372cdf0e10cSrcweir }
373cdf0e10cSrcweir // -----------------------------------------------------------------------------
374cdf0e10cSrcweir
375cdf0e10cSrcweir // XFixedLine
376cdf0e10cSrcweir // -----------------------------------------------------------------------------
getOrientation()377cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getOrientation() throw (beans::UnknownPropertyException,uno::RuntimeException)
378cdf0e10cSrcweir {
379cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
380cdf0e10cSrcweir return m_nOrientation;
381cdf0e10cSrcweir }
382cdf0e10cSrcweir // -----------------------------------------------------------------------------
setOrientation(::sal_Int32 _orientation)383cdf0e10cSrcweir void SAL_CALL OFixedLine::setOrientation( ::sal_Int32 _orientation ) throw (beans::UnknownPropertyException,uno::RuntimeException)
384cdf0e10cSrcweir {
385cdf0e10cSrcweir set(PROPERTY_ORIENTATION,_orientation,m_nOrientation);
386cdf0e10cSrcweir }
387cdf0e10cSrcweir // -----------------------------------------------------------------------------
getLineStyle()388cdf0e10cSrcweir drawing::LineStyle SAL_CALL OFixedLine::getLineStyle() throw (uno::RuntimeException)
389cdf0e10cSrcweir {
390cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
391cdf0e10cSrcweir return m_LineStyle;
392cdf0e10cSrcweir }
393cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLineStyle(drawing::LineStyle _linestyle)394cdf0e10cSrcweir void SAL_CALL OFixedLine::setLineStyle( drawing::LineStyle _linestyle ) throw (uno::RuntimeException)
395cdf0e10cSrcweir {
396cdf0e10cSrcweir set(PROPERTY_LINESTYLE,_linestyle,m_LineStyle);
397cdf0e10cSrcweir }
398cdf0e10cSrcweir // -----------------------------------------------------------------------------
getLineDash()399cdf0e10cSrcweir drawing::LineDash SAL_CALL OFixedLine::getLineDash() throw (uno::RuntimeException)
400cdf0e10cSrcweir {
401cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
402cdf0e10cSrcweir return m_LineDash;
403cdf0e10cSrcweir }
404cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLineDash(const drawing::LineDash & _linedash)405cdf0e10cSrcweir void SAL_CALL OFixedLine::setLineDash( const drawing::LineDash& _linedash ) throw (uno::RuntimeException)
406cdf0e10cSrcweir {
407cdf0e10cSrcweir set(PROPERTY_LINEDASH,_linedash,m_LineDash);
408cdf0e10cSrcweir }
409cdf0e10cSrcweir // -----------------------------------------------------------------------------
getLineColor()410cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getLineColor() throw (uno::RuntimeException)
411cdf0e10cSrcweir {
412cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
413cdf0e10cSrcweir return m_LineColor;
414cdf0e10cSrcweir }
415cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLineColor(::sal_Int32 _linecolor)416cdf0e10cSrcweir void SAL_CALL OFixedLine::setLineColor( ::sal_Int32 _linecolor ) throw (uno::RuntimeException)
417cdf0e10cSrcweir {
418cdf0e10cSrcweir set(PROPERTY_LINECOLOR,_linecolor,m_LineColor);
419cdf0e10cSrcweir }
420cdf0e10cSrcweir // -----------------------------------------------------------------------------
getLineTransparence()421cdf0e10cSrcweir ::sal_Int16 SAL_CALL OFixedLine::getLineTransparence() throw (uno::RuntimeException)
422cdf0e10cSrcweir {
423cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
424cdf0e10cSrcweir return m_LineTransparence;
425cdf0e10cSrcweir }
426cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLineTransparence(::sal_Int16 _linetransparence)427cdf0e10cSrcweir void SAL_CALL OFixedLine::setLineTransparence( ::sal_Int16 _linetransparence ) throw (uno::RuntimeException)
428cdf0e10cSrcweir {
429cdf0e10cSrcweir set(PROPERTY_LINETRANSPARENCE,_linetransparence,m_LineTransparence);
430cdf0e10cSrcweir }
431cdf0e10cSrcweir // -----------------------------------------------------------------------------
getLineWidth()432cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getLineWidth() throw (uno::RuntimeException)
433cdf0e10cSrcweir {
434cdf0e10cSrcweir ::osl::MutexGuard aGuard(m_aMutex);
435cdf0e10cSrcweir return m_LineWidth;
436cdf0e10cSrcweir }
437cdf0e10cSrcweir // -----------------------------------------------------------------------------
setLineWidth(::sal_Int32 _linewidth)438cdf0e10cSrcweir void SAL_CALL OFixedLine::setLineWidth( ::sal_Int32 _linewidth ) throw (uno::RuntimeException)
439cdf0e10cSrcweir {
440cdf0e10cSrcweir set(PROPERTY_LINEWIDTH,_linewidth,m_LineWidth);
441cdf0e10cSrcweir }
442cdf0e10cSrcweir // -----------------------------------------------------------------------------
443cdf0e10cSrcweir // -----------------------------------------------------------------------------
444cdf0e10cSrcweir // XChild
getParent()445cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL OFixedLine::getParent( ) throw (uno::RuntimeException)
446cdf0e10cSrcweir {
447cdf0e10cSrcweir return OShapeHelper::getParent(this);
448cdf0e10cSrcweir }
449cdf0e10cSrcweir // -----------------------------------------------------------------------------
setParent(const uno::Reference<uno::XInterface> & Parent)450cdf0e10cSrcweir void SAL_CALL OFixedLine::setParent( const uno::Reference< uno::XInterface >& Parent ) throw (lang::NoSupportException, uno::RuntimeException)
451cdf0e10cSrcweir {
452cdf0e10cSrcweir OShapeHelper::setParent(Parent,this);
453cdf0e10cSrcweir }
454cdf0e10cSrcweir // -----------------------------------------------------------------------------
createFormatCondition()455cdf0e10cSrcweir uno::Reference< report::XFormatCondition > SAL_CALL OFixedLine::createFormatCondition( ) throw (uno::Exception, uno::RuntimeException)
456cdf0e10cSrcweir {
457cdf0e10cSrcweir return new OFormatCondition(m_aProps.aComponent.m_xContext);
458cdf0e10cSrcweir }
459cdf0e10cSrcweir // -----------------------------------------------------------------------------
460cdf0e10cSrcweir // XContainer
addContainerListener(const uno::Reference<container::XContainerListener> & xListener)461cdf0e10cSrcweir void SAL_CALL OFixedLine::addContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
462cdf0e10cSrcweir {
463cdf0e10cSrcweir m_aProps.addContainerListener(xListener);
464cdf0e10cSrcweir }
465cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeContainerListener(const uno::Reference<container::XContainerListener> & xListener)466cdf0e10cSrcweir void SAL_CALL OFixedLine::removeContainerListener( const uno::Reference< container::XContainerListener >& xListener ) throw (uno::RuntimeException)
467cdf0e10cSrcweir {
468cdf0e10cSrcweir m_aProps.removeContainerListener(xListener);
469cdf0e10cSrcweir }
470cdf0e10cSrcweir // -----------------------------------------------------------------------------
471cdf0e10cSrcweir // XElementAccess
getElementType()472cdf0e10cSrcweir uno::Type SAL_CALL OFixedLine::getElementType( ) throw (uno::RuntimeException)
473cdf0e10cSrcweir {
474cdf0e10cSrcweir return ::getCppuType(static_cast< uno::Reference<report::XFormatCondition>*>(NULL));
475cdf0e10cSrcweir }
476cdf0e10cSrcweir // -----------------------------------------------------------------------------
hasElements()477cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedLine::hasElements( ) throw (uno::RuntimeException)
478cdf0e10cSrcweir {
479cdf0e10cSrcweir return m_aProps.hasElements();
480cdf0e10cSrcweir }
481cdf0e10cSrcweir // -----------------------------------------------------------------------------
482cdf0e10cSrcweir // XIndexContainer
insertByIndex(::sal_Int32 Index,const uno::Any & Element)483cdf0e10cSrcweir void SAL_CALL OFixedLine::insertByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
484cdf0e10cSrcweir {
485cdf0e10cSrcweir m_aProps.insertByIndex(Index,Element);
486cdf0e10cSrcweir }
487cdf0e10cSrcweir // -----------------------------------------------------------------------------
removeByIndex(::sal_Int32 Index)488cdf0e10cSrcweir void SAL_CALL OFixedLine::removeByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
489cdf0e10cSrcweir {
490cdf0e10cSrcweir m_aProps.removeByIndex(Index);
491cdf0e10cSrcweir }
492cdf0e10cSrcweir // -----------------------------------------------------------------------------
493cdf0e10cSrcweir // XIndexReplace
replaceByIndex(::sal_Int32 Index,const uno::Any & Element)494cdf0e10cSrcweir void SAL_CALL OFixedLine::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element ) throw (lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
495cdf0e10cSrcweir {
496cdf0e10cSrcweir m_aProps.replaceByIndex(Index,Element);
497cdf0e10cSrcweir }
498cdf0e10cSrcweir // -----------------------------------------------------------------------------
499cdf0e10cSrcweir // XIndexAccess
getCount()500cdf0e10cSrcweir ::sal_Int32 SAL_CALL OFixedLine::getCount( ) throw (uno::RuntimeException)
501cdf0e10cSrcweir {
502cdf0e10cSrcweir return m_aProps.getCount();
503cdf0e10cSrcweir }
504cdf0e10cSrcweir // -----------------------------------------------------------------------------
getByIndex(::sal_Int32 Index)505cdf0e10cSrcweir uno::Any SAL_CALL OFixedLine::getByIndex( ::sal_Int32 Index ) throw (lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
506cdf0e10cSrcweir {
507cdf0e10cSrcweir return m_aProps.getByIndex( Index );
508cdf0e10cSrcweir }
509cdf0e10cSrcweir // -----------------------------------------------------------------------------
510cdf0e10cSrcweir // XShape
getPosition()511cdf0e10cSrcweir awt::Point SAL_CALL OFixedLine::getPosition( ) throw (uno::RuntimeException)
512cdf0e10cSrcweir {
513cdf0e10cSrcweir return OShapeHelper::getPosition(this);
514cdf0e10cSrcweir }
515cdf0e10cSrcweir // -----------------------------------------------------------------------------
setPosition(const awt::Point & aPosition)516cdf0e10cSrcweir void SAL_CALL OFixedLine::setPosition( const awt::Point& aPosition ) throw (uno::RuntimeException)
517cdf0e10cSrcweir {
518cdf0e10cSrcweir OShapeHelper::setPosition(aPosition,this);
519cdf0e10cSrcweir }
520cdf0e10cSrcweir // -----------------------------------------------------------------------------
getSize()521cdf0e10cSrcweir awt::Size SAL_CALL OFixedLine::getSize( ) throw (uno::RuntimeException)
522cdf0e10cSrcweir {
523cdf0e10cSrcweir return OShapeHelper::getSize(this);
524cdf0e10cSrcweir }
525cdf0e10cSrcweir // -----------------------------------------------------------------------------
setSize(const awt::Size & aSize)526cdf0e10cSrcweir void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::PropertyVetoException, uno::RuntimeException)
527cdf0e10cSrcweir {
528cdf0e10cSrcweir if ( (aSize.Width < MIN_WIDTH && m_nOrientation == 1) || (aSize.Height < MIN_HEIGHT && m_nOrientation == 0) )
529cdf0e10cSrcweir throw beans::PropertyVetoException();
530cdf0e10cSrcweir OShapeHelper::setSize(aSize,this);
531cdf0e10cSrcweir }
532cdf0e10cSrcweir // -----------------------------------------------------------------------------
533cdf0e10cSrcweir // XShapeDescriptor
getShapeType()534cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException)
535cdf0e10cSrcweir {
5369320a50fSMichael Stahl return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
537cdf0e10cSrcweir }
538cdf0e10cSrcweir // -----------------------------------------------------------------------------
getHyperLinkURL()539cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
540cdf0e10cSrcweir {
541cdf0e10cSrcweir throw beans::UnknownPropertyException();
542cdf0e10cSrcweir }
setHyperLinkURL(const::rtl::OUString &)543cdf0e10cSrcweir void SAL_CALL OFixedLine::setHyperLinkURL(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
544cdf0e10cSrcweir {
545cdf0e10cSrcweir throw beans::UnknownPropertyException();
546cdf0e10cSrcweir }
getHyperLinkTarget()547cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkTarget() throw (uno::RuntimeException, beans::UnknownPropertyException)
548cdf0e10cSrcweir {
549cdf0e10cSrcweir throw beans::UnknownPropertyException();
550cdf0e10cSrcweir }
setHyperLinkTarget(const::rtl::OUString &)551cdf0e10cSrcweir void SAL_CALL OFixedLine::setHyperLinkTarget(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
552cdf0e10cSrcweir {
553cdf0e10cSrcweir throw beans::UnknownPropertyException();
554cdf0e10cSrcweir }
getHyperLinkName()555cdf0e10cSrcweir ::rtl::OUString SAL_CALL OFixedLine::getHyperLinkName() throw (uno::RuntimeException, beans::UnknownPropertyException)
556cdf0e10cSrcweir {
557cdf0e10cSrcweir throw beans::UnknownPropertyException();
558cdf0e10cSrcweir }
setHyperLinkName(const::rtl::OUString &)559cdf0e10cSrcweir void SAL_CALL OFixedLine::setHyperLinkName(const ::rtl::OUString & /*the_value*/) throw (uno::RuntimeException, beans::UnknownPropertyException)
560cdf0e10cSrcweir {
561cdf0e10cSrcweir throw beans::UnknownPropertyException();
562cdf0e10cSrcweir }
563cdf0e10cSrcweir
NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)564cdf0e10cSrcweir NO_REPORTCONTROLFORMAT_IMPL(OFixedLine)
565cdf0e10cSrcweir
566cdf0e10cSrcweir ::sal_Bool SAL_CALL OFixedLine::getPrintRepeatedValues() throw (beans::UnknownPropertyException, uno::RuntimeException)
567cdf0e10cSrcweir {
568cdf0e10cSrcweir throw beans::UnknownPropertyException();
569cdf0e10cSrcweir }
setPrintRepeatedValues(::sal_Bool)570cdf0e10cSrcweir void SAL_CALL OFixedLine::setPrintRepeatedValues( ::sal_Bool /*_printrepeatedvalues*/ ) throw (beans::UnknownPropertyException, uno::RuntimeException)
571cdf0e10cSrcweir {
572cdf0e10cSrcweir throw beans::UnknownPropertyException();
573cdf0e10cSrcweir }
574cdf0e10cSrcweir
575cdf0e10cSrcweir // -----------------------------------------------------------------------------
576cdf0e10cSrcweir // =============================================================================
577cdf0e10cSrcweir } // namespace reportdesign
578cdf0e10cSrcweir // =============================================================================
579