1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: treedatamodel.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_toolkit.hxx"
33 #include "gridcolumn.hxx"
34 #include <comphelper/sequence.hxx>
35 #include <toolkit/helper/servicenames.hxx>
36 #include <rtl/ref.hxx>
38 using ::rtl::OUString
;
39 using namespace ::com::sun::star
;
40 using namespace ::com::sun::star::uno
;
41 using namespace ::com::sun::star::awt
;
42 using namespace ::com::sun::star::awt::grid
;
43 using namespace ::com::sun::star::lang
;
48 ///////////////////////////////////////////////////////////////////////
50 ///////////////////////////////////////////////////////////////////////
52 GridColumn::GridColumn()
57 //---------------------------------------------------------------------
59 GridColumn::~GridColumn()
63 //---------------------------------------------------------------------
65 //---------------------------------------------------------------------
67 //---------------------------------------------------------------------
69 ::com::sun::star::uno::Any SAL_CALL
GridColumn::getIdentifier() throw (::com::sun::star::uno::RuntimeException
)
74 //---------------------------------------------------------------------
76 void SAL_CALL
GridColumn::setIdentifier(const ::com::sun::star::uno::Any
& value
) throw (::com::sun::star::uno::RuntimeException
)
81 //--------------------------------------------------------------------
83 ::sal_Int32 SAL_CALL
GridColumn::getColumnWidth() throw (::com::sun::star::uno::RuntimeException
)
88 //--------------------------------------------------------------------
90 void SAL_CALL
GridColumn::setColumnWidth(::sal_Int32 value
) throw (::com::sun::star::uno::RuntimeException
)
95 //--------------------------------------------------------------------
97 ::rtl::OUString SAL_CALL
GridColumn::getTitle() throw (::com::sun::star::uno::RuntimeException
)
102 //--------------------------------------------------------------------
104 void SAL_CALL
GridColumn::setTitle(const ::rtl::OUString
& value
) throw (::com::sun::star::uno::RuntimeException
)
109 //---------------------------------------------------------------------
111 //---------------------------------------------------------------------
113 void SAL_CALL
GridColumn::dispose() throw (RuntimeException
)
117 //---------------------------------------------------------------------
119 void SAL_CALL
GridColumn::addEventListener( const Reference
< XEventListener
>& xListener
) throw (RuntimeException
)
124 //---------------------------------------------------------------------
126 void SAL_CALL
GridColumn::removeEventListener( const Reference
< XEventListener
>& xListener
) throw (RuntimeException
)
131 //---------------------------------------------------------------------
133 //---------------------------------------------------------------------
135 ::rtl::OUString SAL_CALL
GridColumn::getImplementationName( ) throw (RuntimeException
)
137 ::osl::Guard
< ::osl::Mutex
> aGuard( GetMutex() );
138 static const OUString
aImplName( RTL_CONSTASCII_USTRINGPARAM( "toolkit.GridColumn" ) );
142 //---------------------------------------------------------------------
144 sal_Bool SAL_CALL
GridColumn::supportsService( const ::rtl::OUString
& ServiceName
) throw (RuntimeException
)
146 ::osl::Guard
< ::osl::Mutex
> aGuard( GetMutex() );
147 return ServiceName
.equalsAscii( szServiceName_GridColumn
);
150 //---------------------------------------------------------------------
152 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
GridColumn::getSupportedServiceNames( ) throw (RuntimeException
)
154 ::osl::Guard
< ::osl::Mutex
> aGuard( GetMutex() );
155 static const OUString
aServiceName( OUString::createFromAscii( szServiceName_GridColumn
) );
156 static const Sequence
< OUString
> aSeq( &aServiceName
, 1 );
162 Reference
< XInterface
> SAL_CALL
GridColumn_CreateInstance( const Reference
< XMultiServiceFactory
>& )
164 return Reference
< XInterface
>( ( ::cppu::OWeakObject
* ) new ::toolkit::GridColumn
);