xref: /AOO41X/main/toolkit/source/controls/grid/gridcolumn.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #include "precompiled_toolkit.hxx"
29*cdf0e10cSrcweir #include "gridcolumn.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <comphelper/sequence.hxx>
32*cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
33*cdf0e10cSrcweir #include <toolkit/helper/servicenames.hxx>
34*cdf0e10cSrcweir 
35*cdf0e10cSrcweir namespace toolkit
36*cdf0e10cSrcweir {
37*cdf0e10cSrcweir     using namespace ::com::sun::star;
38*cdf0e10cSrcweir     using namespace ::com::sun::star::uno;
39*cdf0e10cSrcweir     using namespace ::com::sun::star::awt;
40*cdf0e10cSrcweir     using namespace ::com::sun::star::awt::grid;
41*cdf0e10cSrcweir     using namespace ::com::sun::star::lang;
42*cdf0e10cSrcweir     using namespace ::com::sun::star::util;
43*cdf0e10cSrcweir     using namespace ::com::sun::star::style;
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir     //==================================================================================================================
46*cdf0e10cSrcweir     //= DefaultGridColumnModel
47*cdf0e10cSrcweir     //==================================================================================================================
48*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
49*cdf0e10cSrcweir     GridColumn::GridColumn()
50*cdf0e10cSrcweir         :GridColumn_Base( m_aMutex )
51*cdf0e10cSrcweir         ,m_aIdentifier()
52*cdf0e10cSrcweir         ,m_nIndex(-1)
53*cdf0e10cSrcweir         ,m_nDataColumnIndex(-1)
54*cdf0e10cSrcweir         ,m_nColumnWidth(4)
55*cdf0e10cSrcweir         ,m_nMaxWidth(0)
56*cdf0e10cSrcweir         ,m_nMinWidth(0)
57*cdf0e10cSrcweir         ,m_nFlexibility(1)
58*cdf0e10cSrcweir         ,m_bResizeable(true)
59*cdf0e10cSrcweir         ,m_eHorizontalAlign( HorizontalAlignment_LEFT )
60*cdf0e10cSrcweir     {
61*cdf0e10cSrcweir     }
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
64*cdf0e10cSrcweir     GridColumn::GridColumn( GridColumn const & i_copySource )
65*cdf0e10cSrcweir         :cppu::BaseMutex()
66*cdf0e10cSrcweir         ,GridColumn_Base( m_aMutex )
67*cdf0e10cSrcweir         ,m_aIdentifier( i_copySource.m_aIdentifier )
68*cdf0e10cSrcweir         ,m_nIndex( -1 )
69*cdf0e10cSrcweir         ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex )
70*cdf0e10cSrcweir         ,m_nColumnWidth( i_copySource.m_nColumnWidth )
71*cdf0e10cSrcweir         ,m_nMaxWidth( i_copySource.m_nMaxWidth )
72*cdf0e10cSrcweir         ,m_nMinWidth( i_copySource.m_nMinWidth )
73*cdf0e10cSrcweir         ,m_nFlexibility( i_copySource.m_nFlexibility )
74*cdf0e10cSrcweir         ,m_bResizeable( i_copySource.m_bResizeable )
75*cdf0e10cSrcweir         ,m_sTitle( i_copySource.m_sTitle )
76*cdf0e10cSrcweir         ,m_sHelpText( i_copySource.m_sHelpText )
77*cdf0e10cSrcweir         ,m_eHorizontalAlign( i_copySource.m_eHorizontalAlign )
78*cdf0e10cSrcweir     {
79*cdf0e10cSrcweir     }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
82*cdf0e10cSrcweir     GridColumn::~GridColumn()
83*cdf0e10cSrcweir     {
84*cdf0e10cSrcweir     }
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
87*cdf0e10cSrcweir     void GridColumn::broadcast_changed( sal_Char const * const i_asciiAttributeName, Any i_oldValue, Any i_newValue,
88*cdf0e10cSrcweir         ::comphelper::ComponentGuard& i_Guard )
89*cdf0e10cSrcweir     {
90*cdf0e10cSrcweir 	    Reference< XInterface > const xSource( static_cast< ::cppu::OWeakObject* >( this ) );
91*cdf0e10cSrcweir         GridColumnEvent const aEvent(
92*cdf0e10cSrcweir             xSource, ::rtl::OUString::createFromAscii( i_asciiAttributeName ),
93*cdf0e10cSrcweir             i_oldValue, i_newValue, m_nIndex
94*cdf0e10cSrcweir         );
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir         ::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( XGridColumnListener::static_type() );
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir         i_Guard.clear();
99*cdf0e10cSrcweir 	    if( pIter )
100*cdf0e10cSrcweir             pIter->notifyEach( &XGridColumnListener::columnChanged, aEvent );
101*cdf0e10cSrcweir     }
102*cdf0e10cSrcweir 
103*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
104*cdf0e10cSrcweir     ::com::sun::star::uno::Any SAL_CALL GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException)
105*cdf0e10cSrcweir     {
106*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
107*cdf0e10cSrcweir 	    return m_aIdentifier;
108*cdf0e10cSrcweir     }
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
111*cdf0e10cSrcweir     void SAL_CALL GridColumn::setIdentifier(const ::com::sun::star::uno::Any & value) throw (::com::sun::star::uno::RuntimeException)
112*cdf0e10cSrcweir     {
113*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
114*cdf0e10cSrcweir 	    m_aIdentifier = value;
115*cdf0e10cSrcweir     }
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
118*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException)
119*cdf0e10cSrcweir     {
120*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
121*cdf0e10cSrcweir 	    return m_nColumnWidth;
122*cdf0e10cSrcweir     }
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
125*cdf0e10cSrcweir     void SAL_CALL GridColumn::setColumnWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
126*cdf0e10cSrcweir     {
127*cdf0e10cSrcweir         impl_set( m_nColumnWidth, value, "ColumnWidth" );
128*cdf0e10cSrcweir     }
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
131*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getMaxWidth() throw (::com::sun::star::uno::RuntimeException)
132*cdf0e10cSrcweir     {
133*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
134*cdf0e10cSrcweir 	    return m_nMaxWidth;
135*cdf0e10cSrcweir     }
136*cdf0e10cSrcweir 
137*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
138*cdf0e10cSrcweir     void SAL_CALL GridColumn::setMaxWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
139*cdf0e10cSrcweir     {
140*cdf0e10cSrcweir         impl_set( m_nMaxWidth, value, "MaxWidth" );
141*cdf0e10cSrcweir     }
142*cdf0e10cSrcweir 
143*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
144*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getMinWidth() throw (::com::sun::star::uno::RuntimeException)
145*cdf0e10cSrcweir     {
146*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
147*cdf0e10cSrcweir 	    return m_nMinWidth;
148*cdf0e10cSrcweir     }
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
151*cdf0e10cSrcweir     void SAL_CALL GridColumn::setMinWidth(::sal_Int32 value) throw (::com::sun::star::uno::RuntimeException)
152*cdf0e10cSrcweir     {
153*cdf0e10cSrcweir         impl_set( m_nMinWidth, value, "MinWidth" );
154*cdf0e10cSrcweir     }
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
157*cdf0e10cSrcweir     ::rtl::OUString SAL_CALL GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException)
158*cdf0e10cSrcweir     {
159*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
160*cdf0e10cSrcweir 	    return m_sTitle;
161*cdf0e10cSrcweir     }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
164*cdf0e10cSrcweir     void SAL_CALL GridColumn::setTitle(const ::rtl::OUString & value) throw (::com::sun::star::uno::RuntimeException)
165*cdf0e10cSrcweir     {
166*cdf0e10cSrcweir         impl_set( m_sTitle, value, "Title" );
167*cdf0e10cSrcweir     }
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
170*cdf0e10cSrcweir     ::rtl::OUString SAL_CALL GridColumn::getHelpText() throw (RuntimeException)
171*cdf0e10cSrcweir     {
172*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
173*cdf0e10cSrcweir 	    return m_sHelpText;
174*cdf0e10cSrcweir     }
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
177*cdf0e10cSrcweir     void SAL_CALL GridColumn::setHelpText( const ::rtl::OUString & value ) throw (RuntimeException)
178*cdf0e10cSrcweir     {
179*cdf0e10cSrcweir         impl_set( m_sHelpText, value, "HelpText" );
180*cdf0e10cSrcweir     }
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
183*cdf0e10cSrcweir     sal_Bool SAL_CALL GridColumn::getResizeable() throw (::com::sun::star::uno::RuntimeException)
184*cdf0e10cSrcweir     {
185*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
186*cdf0e10cSrcweir 	    return m_bResizeable;
187*cdf0e10cSrcweir     }
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
190*cdf0e10cSrcweir     void SAL_CALL GridColumn::setResizeable(sal_Bool value) throw (::com::sun::star::uno::RuntimeException)
191*cdf0e10cSrcweir     {
192*cdf0e10cSrcweir         impl_set( m_bResizeable, value, "Resizeable" );
193*cdf0e10cSrcweir     }
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
196*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getFlexibility() throw (RuntimeException)
197*cdf0e10cSrcweir     {
198*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
199*cdf0e10cSrcweir         return m_nFlexibility;
200*cdf0e10cSrcweir     }
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
203*cdf0e10cSrcweir     void SAL_CALL GridColumn::setFlexibility( ::sal_Int32 i_value ) throw (IllegalArgumentException, RuntimeException)
204*cdf0e10cSrcweir     {
205*cdf0e10cSrcweir         if ( i_value < 0 )
206*cdf0e10cSrcweir             throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
207*cdf0e10cSrcweir         impl_set( m_nFlexibility, i_value, "Flexibility" );
208*cdf0e10cSrcweir     }
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
211*cdf0e10cSrcweir     HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign() throw (::com::sun::star::uno::RuntimeException)
212*cdf0e10cSrcweir     {
213*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
214*cdf0e10cSrcweir 	    return m_eHorizontalAlign;
215*cdf0e10cSrcweir     }
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
218*cdf0e10cSrcweir     void SAL_CALL GridColumn::setHorizontalAlign(HorizontalAlignment align) throw (::com::sun::star::uno::RuntimeException)
219*cdf0e10cSrcweir     {
220*cdf0e10cSrcweir         impl_set( m_eHorizontalAlign, align, "HorizontalAlign" );
221*cdf0e10cSrcweir     }
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
224*cdf0e10cSrcweir     void SAL_CALL GridColumn::addGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
225*cdf0e10cSrcweir     {
226*cdf0e10cSrcweir 	    rBHelper.addListener( XGridColumnListener::static_type(), xListener );
227*cdf0e10cSrcweir     }
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
230*cdf0e10cSrcweir     void SAL_CALL GridColumn::removeGridColumnListener( const Reference< XGridColumnListener >& xListener ) throw (RuntimeException)
231*cdf0e10cSrcweir     {
232*cdf0e10cSrcweir 	    rBHelper.removeListener( XGridColumnListener::static_type(), xListener );
233*cdf0e10cSrcweir     }
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
236*cdf0e10cSrcweir     void SAL_CALL GridColumn::disposing()
237*cdf0e10cSrcweir     {
238*cdf0e10cSrcweir         ::osl::MutexGuard aGuard( m_aMutex );
239*cdf0e10cSrcweir         m_aIdentifier.clear();
240*cdf0e10cSrcweir         m_sTitle = m_sHelpText = ::rtl::OUString();
241*cdf0e10cSrcweir     }
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
244*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getIndex() throw (RuntimeException)
245*cdf0e10cSrcweir     {
246*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
247*cdf0e10cSrcweir         return m_nIndex;
248*cdf0e10cSrcweir     }
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
251*cdf0e10cSrcweir     void GridColumn::setIndex( sal_Int32 const i_index )
252*cdf0e10cSrcweir     {
253*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
254*cdf0e10cSrcweir 	    m_nIndex = i_index;
255*cdf0e10cSrcweir     }
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
258*cdf0e10cSrcweir     ::sal_Int32 SAL_CALL GridColumn::getDataColumnIndex() throw(RuntimeException)
259*cdf0e10cSrcweir     {
260*cdf0e10cSrcweir         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
261*cdf0e10cSrcweir         return m_nDataColumnIndex;
262*cdf0e10cSrcweir     }
263*cdf0e10cSrcweir 
264*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
265*cdf0e10cSrcweir     void SAL_CALL GridColumn::setDataColumnIndex( ::sal_Int32 i_dataColumnIndex ) throw(RuntimeException)
266*cdf0e10cSrcweir     {
267*cdf0e10cSrcweir         impl_set( m_nDataColumnIndex, i_dataColumnIndex, "DataColumnIndex" );
268*cdf0e10cSrcweir     }
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
271*cdf0e10cSrcweir     ::rtl::OUString SAL_CALL GridColumn::getImplementationName(  ) throw (RuntimeException)
272*cdf0e10cSrcweir     {
273*cdf0e10cSrcweir         return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.toolkit.GridColumn" ) );
274*cdf0e10cSrcweir     }
275*cdf0e10cSrcweir 
276*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
277*cdf0e10cSrcweir     sal_Bool SAL_CALL GridColumn::supportsService( const ::rtl::OUString& i_serviceName ) throw (RuntimeException)
278*cdf0e10cSrcweir     {
279*cdf0e10cSrcweir         const Sequence< ::rtl::OUString > aServiceNames( getSupportedServiceNames() );
280*cdf0e10cSrcweir         for ( sal_Int32 i=0; i<aServiceNames.getLength(); ++i )
281*cdf0e10cSrcweir             if ( aServiceNames[i] == i_serviceName )
282*cdf0e10cSrcweir                 return sal_True;
283*cdf0e10cSrcweir         return sal_False;
284*cdf0e10cSrcweir     }
285*cdf0e10cSrcweir 
286*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
287*cdf0e10cSrcweir     ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GridColumn::getSupportedServiceNames(  ) throw (RuntimeException)
288*cdf0e10cSrcweir     {
289*cdf0e10cSrcweir         const ::rtl::OUString aServiceName( ::rtl::OUString::createFromAscii( szServiceName_GridColumn ) );
290*cdf0e10cSrcweir         const Sequence< ::rtl::OUString > aSeq( &aServiceName, 1 );
291*cdf0e10cSrcweir         return aSeq;
292*cdf0e10cSrcweir     }
293*cdf0e10cSrcweir 
294*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
295*cdf0e10cSrcweir     Reference< XCloneable > SAL_CALL GridColumn::createClone(  ) throw (RuntimeException)
296*cdf0e10cSrcweir     {
297*cdf0e10cSrcweir         return new GridColumn( *this );
298*cdf0e10cSrcweir     }
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
301*cdf0e10cSrcweir     sal_Int64 SAL_CALL GridColumn::getSomething( const Sequence< sal_Int8 >& i_identifier ) throw(RuntimeException)
302*cdf0e10cSrcweir     {
303*cdf0e10cSrcweir         if ( ( i_identifier.getLength() == 16 ) && ( i_identifier == getUnoTunnelId() ) )
304*cdf0e10cSrcweir             return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) );
305*cdf0e10cSrcweir         return 0;
306*cdf0e10cSrcweir     }
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
309*cdf0e10cSrcweir     Sequence< sal_Int8 > GridColumn::getUnoTunnelId() throw()
310*cdf0e10cSrcweir     {
311*cdf0e10cSrcweir         static ::cppu::OImplementationId const aId;
312*cdf0e10cSrcweir         return aId.getImplementationId();
313*cdf0e10cSrcweir     }
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir     //------------------------------------------------------------------------------------------------------------------
316*cdf0e10cSrcweir     GridColumn* GridColumn::getImplementation( const Reference< XInterface >& i_component )
317*cdf0e10cSrcweir     {
318*cdf0e10cSrcweir         Reference< XUnoTunnel > const xTunnel( i_component, UNO_QUERY );
319*cdf0e10cSrcweir         if ( xTunnel.is() )
320*cdf0e10cSrcweir             return reinterpret_cast< GridColumn* >( ::sal::static_int_cast< sal_IntPtr >( xTunnel->getSomething( getUnoTunnelId() ) ) );
321*cdf0e10cSrcweir         return NULL;
322*cdf0e10cSrcweir     }
323*cdf0e10cSrcweir }
324*cdf0e10cSrcweir 
325*cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
326*cdf0e10cSrcweir {
327*cdf0e10cSrcweir     return *( new ::toolkit::GridColumn );
328*cdf0e10cSrcweir }
329*cdf0e10cSrcweir 
330