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: unotbl.hxx,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 ************************************************************************/
34 #include <com/sun/star/chart/XChartData.hpp>
35 #include <com/sun/star/chart/XChartDataArray.hpp>
36 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
37 #include <com/sun/star/text/XTextTableCursor.hpp>
38 #include <com/sun/star/text/XTextTable.hpp>
39 #include <com/sun/star/table/XCellRange.hpp>
40 #include <com/sun/star/sheet/XCellRangeData.hpp>
41 #include <com/sun/star/table/XAutoFormattable.hpp>
42 #include <cppuhelper/implbase10.hxx> // helper for implementations
43 #include <cppuhelper/implbase7.hxx> // helper for implementations
44 #include <cppuhelper/implbase5.hxx> // helper for implementations
52 class SwChartDataProvider
;
55 /* -----------------------------22.09.00 11:10--------------------------------
57 ---------------------------------------------------------------------------*/
58 class SwChartEventListenerContainer
: public SwEventListenerContainer
61 SwChartEventListenerContainer( ::com::sun::star::uno::XInterface
* pxParentL
) :
62 SwEventListenerContainer(pxParentL
){}
63 void ChartDataChanged();
65 /* ---------------------------------------------------------------------------
67 ---------------------------------------------------------------------------*/
71 ::com::sun::star::table::XCell
,
72 ::com::sun::star::lang::XServiceInfo
,
73 ::com::sun::star::beans::XPropertySet
,
74 ::com::sun::star::container::XEnumerationAccess
77 class SwXCell
: public SwXCellBaseClass
,
81 friend void lcl_setString( SwXCell
&rCell
, const rtl::OUString
&rTxt
,
82 BOOL bKeepNumberFmt
= FALSE
);
83 friend double lcl_getValue( SwXCell
&rCell
);
84 friend void lcl_setValue( SwXCell
&rCell
, double nVal
);
87 const SfxItemPropertySet
* m_pPropSet
;
88 SwTableBox
* pBox
; // only set in non-XML import
89 const SwStartNode
* pStartNode
; // only set in XML import
91 // table position where pBox was found last
94 using SwXText::IsValid
;
97 virtual const SwStartNode
*GetStartNode() const;
98 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> createCursor()throw(::com::sun::star::uno::RuntimeException
);
105 SwXCell(SwFrmFmt
* pTblFmt
, SwTableBox
* pBox
, sal_uInt16 nPos
=USHRT_MAX
);
106 SwXCell(SwFrmFmt
* pTblFmt
, const SwStartNode
& rStartNode
); // XML import interface
111 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
114 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
116 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw(::com::sun::star::uno::RuntimeException
);
117 virtual void SAL_CALL
acquire( ) throw();
118 virtual void SAL_CALL
release( ) throw();
121 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
122 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
125 virtual ::rtl::OUString SAL_CALL
getFormula( ) throw(::com::sun::star::uno::RuntimeException
);
126 virtual void SAL_CALL
setFormula( const ::rtl::OUString
& aFormula
) throw(::com::sun::star::uno::RuntimeException
);
127 virtual double SAL_CALL
getValue( ) throw(::com::sun::star::uno::RuntimeException
);
128 virtual void SAL_CALL
setValue( double nValue
) throw(::com::sun::star::uno::RuntimeException
);
129 virtual ::com::sun::star::table::CellContentType SAL_CALL
getType( ) throw(::com::sun::star::uno::RuntimeException
);
130 virtual sal_Int32 SAL_CALL
getError( ) throw(::com::sun::star::uno::RuntimeException
);
133 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException
);
134 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
createTextCursorByRange(const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> & aTextPosition
) throw( ::com::sun::star::uno::RuntimeException
);
135 virtual void SAL_CALL
setString(const rtl::OUString
& aString
) throw( ::com::sun::star::uno::RuntimeException
);
138 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
139 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
140 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
141 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
142 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
143 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
144 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
147 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
148 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
149 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
152 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
154 //XEnumerationAccess - frueher XParagraphEnumerationAccess
155 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException
);
158 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
159 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
161 SwTableBox
* GetTblBox()const {return pBox
;}
162 static SwXCell
* CreateXCell(SwFrmFmt
* pTblFmt
, SwTableBox
* pBox
, SwTable
*pTbl
= 0 );
163 SwTableBox
* FindBox(SwTable
* pTable
, SwTableBox
* pBox
);
165 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
167 /* -----------------27.06.98 15:40-------------------
169 * --------------------------------------------------*/
170 class SwXTextTableRow
: public cppu::WeakImplHelper2
172 ::com::sun::star::beans::XPropertySet
,
173 ::com::sun::star::lang::XServiceInfo
177 const SfxItemPropertySet
* m_pPropSet
;
180 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
182 virtual ~SwXTextTableRow();
184 SwXTextTableRow(SwFrmFmt
* pFmt
, SwTableLine
* pLine
);
190 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
191 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
192 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
193 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
194 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
195 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
196 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
199 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
200 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
201 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
204 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
206 const SwTableLine
* GetTblRow() const {return pLine
;}
207 static SwTableLine
* FindLine(SwTable
* pTable
, SwTableLine
* pLine
);
209 /* -----------------20.07.98 13:03-------------------
211 * --------------------------------------------------*/
212 typedef cppu::WeakImplHelper3
<
213 ::com::sun::star::text::XTextTableCursor
,
214 ::com::sun::star::lang::XServiceInfo
,
215 ::com::sun::star::beans::XPropertySet
216 > SwXTextTableCursor_Base
;
217 class SW_DLLPUBLIC SwXTextTableCursor
: public SwXTextTableCursor_Base
219 ,public OTextCursorHelper
221 SwDepend aCrsrDepend
;
222 const SfxItemPropertySet
* m_pPropSet
;
224 // SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)aCrsrDepend.GetRegisteredIn(); }
227 virtual ~SwXTextTableCursor();
229 SwXTextTableCursor(SwFrmFmt
* pFmt
, SwTableBox
* pBox
);
230 SwXTextTableCursor(SwFrmFmt
& rTableFmt
,
231 const SwTableCursor
* pTableSelection
);
237 virtual ::rtl::OUString SAL_CALL
getRangeName( ) throw(::com::sun::star::uno::RuntimeException
);
238 virtual sal_Bool SAL_CALL
gotoCellByName( const ::rtl::OUString
& aCellName
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
239 virtual sal_Bool SAL_CALL
goLeft( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
240 virtual sal_Bool SAL_CALL
goRight( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
241 virtual sal_Bool SAL_CALL
goUp( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
242 virtual sal_Bool SAL_CALL
goDown( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
243 virtual void SAL_CALL
gotoStart( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
244 virtual void SAL_CALL
gotoEnd( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
245 virtual sal_Bool SAL_CALL
mergeRange( ) throw(::com::sun::star::uno::RuntimeException
);
246 virtual sal_Bool SAL_CALL
splitRange( sal_Int16 Count
, sal_Bool Horizontal
) throw(::com::sun::star::uno::RuntimeException
);
249 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
250 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
251 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
252 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
253 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
254 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
255 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
258 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
259 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
260 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
263 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
266 virtual const SwPaM
* GetPaM() const;
267 virtual SwPaM
* GetPaM();
268 virtual const SwDoc
* GetDoc() const;
269 virtual SwDoc
* GetDoc();
271 const SwUnoCrsr
* GetCrsr() const;
272 SwUnoCrsr
* GetCrsr();
273 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
276 /*-----------------11.12.97 09:38-------------------
278 --------------------------------------------------*/
279 struct SwRangeDescriptor
289 class SwTableProperties_Impl
;
290 class SwXTextTable
: public cppu::WeakImplHelper10
292 ::com::sun::star::text::XTextTable
,
293 ::com::sun::star::lang::XServiceInfo
,
294 ::com::sun::star::table::XCellRange
,
295 ::com::sun::star::chart::XChartDataArray
,
296 ::com::sun::star::beans::XPropertySet
,
297 ::com::sun::star::container::XNamed
,
298 ::com::sun::star::table::XAutoFormattable
,
299 ::com::sun::star::util::XSortable
,
300 ::com::sun::star::lang::XUnoTunnel
,
301 ::com::sun::star::sheet::XCellRangeData
305 SwEventListenerContainer aLstnrCntnr
;
306 SwChartEventListenerContainer aChartLstnrCntnr
;
307 const SfxItemPropertySet
* m_pPropSet
;
309 // Descriptor-interface
310 SwTableProperties_Impl
* pTableProps
;
312 sal_Bool bIsDescriptor
;
313 unsigned short nRows
;
314 unsigned short nColumns
;
317 sal_Bool bFirstRowAsLabel
:1;
318 sal_Bool bFirstColumnAsLabel
:1;
320 virtual ~SwXTextTable();
323 SwXTextTable(SwFrmFmt
& rFrmFmt
);
326 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
329 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
334 virtual void SAL_CALL
initialize( sal_Int32 nRows
, sal_Int32 nColumns
) throw(::com::sun::star::uno::RuntimeException
);
335 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XTableRows
> SAL_CALL
getRows( ) throw(::com::sun::star::uno::RuntimeException
);
336 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XTableColumns
> SAL_CALL
getColumns( ) throw(::com::sun::star::uno::RuntimeException
);
337 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
> SAL_CALL
getCellByName( const ::rtl::OUString
& aCellName
) throw(::com::sun::star::uno::RuntimeException
);
338 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getCellNames( ) throw(::com::sun::star::uno::RuntimeException
);
339 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextTableCursor
> SAL_CALL
createCursorByCellName( const ::rtl::OUString
& aCellName
) throw(::com::sun::star::uno::RuntimeException
);
342 virtual void SAL_CALL
attach(const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> & xTextRange
) throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
343 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getAnchor( ) throw(::com::sun::star::uno::RuntimeException
);
346 virtual void SAL_CALL
dispose(void) throw( ::com::sun::star::uno::RuntimeException
);
347 virtual void SAL_CALL
addEventListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
348 virtual void SAL_CALL
removeEventListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
351 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
352 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) throw(com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
353 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByName( const ::rtl::OUString
& aRange
) throw(::com::sun::star::uno::RuntimeException
);
356 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > > SAL_CALL
getData( ) throw(::com::sun::star::uno::RuntimeException
);
357 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > >& aData
) throw(::com::sun::star::uno::RuntimeException
);
358 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
359 virtual void SAL_CALL
setRowDescriptions( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aRowDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
360 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
361 virtual void SAL_CALL
setColumnDescriptions( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aColumnDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
364 virtual void SAL_CALL
addChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
365 virtual void SAL_CALL
removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
366 virtual double SAL_CALL
getNotANumber( ) throw(::com::sun::star::uno::RuntimeException
);
367 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) throw(::com::sun::star::uno::RuntimeException
);
370 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException
);
371 virtual void SAL_CALL
sort(const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& xDescriptor
) throw( ::com::sun::star::uno::RuntimeException
);
374 virtual void SAL_CALL
autoFormat(const rtl::OUString
& aName
) throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
377 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
378 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
379 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
380 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
381 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
382 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
383 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
386 virtual rtl::OUString SAL_CALL
getName(void) throw( ::com::sun::star::uno::RuntimeException
);
387 virtual void SAL_CALL
setName(const rtl::OUString
& Name_
) throw( ::com::sun::star::uno::RuntimeException
);
390 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> > SAL_CALL
getDataArray( ) throw (::com::sun::star::uno::RuntimeException
);
391 virtual void SAL_CALL
setDataArray( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> >& aArray
) throw (::com::sun::star::uno::RuntimeException
);
394 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
395 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
396 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
398 void attachToRange(const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> & xTextRange
)throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
400 sal_uInt16
getRowCount(void);
401 sal_uInt16
getColumnCount(void);
402 ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> GetRangeByName(SwFrmFmt
* pFmt
, SwTable
* pTable
,
403 const String
& sTLName
, const String
& sBRName
,
404 SwRangeDescriptor
& rDesc
);
407 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
409 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
411 static SwXTextTable
* GetImplementation(::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> xRef
);
414 /* -----------------27.04.98 16:41-------------------
416 * --------------------------------------------------*/
417 class SwXCellRange
: public cppu::WeakImplHelper7
419 ::com::sun::star::table::XCellRange
,
420 ::com::sun::star::lang::XServiceInfo
,
421 ::com::sun::star::lang::XUnoTunnel
,
422 ::com::sun::star::beans::XPropertySet
,
423 ::com::sun::star::chart::XChartDataArray
,
424 ::com::sun::star::util::XSortable
,
425 ::com::sun::star::sheet::XCellRangeData
429 SwDepend aCursorDepend
; //the cursor is removed after the doc has been removed
430 SwChartEventListenerContainer aChartLstnrCntnr
;
432 SwRangeDescriptor aRgDesc
;
433 const SfxItemPropertySet
* m_pPropSet
;
437 sal_Bool bFirstRowAsLabel
:1;
438 sal_Bool bFirstColumnAsLabel
:1;
441 SwXCellRange(SwUnoCrsr
* pCrsr
, SwFrmFmt
& rFrmFmt
, SwRangeDescriptor
& rDesc
);
446 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
449 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
453 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
454 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) throw(com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
455 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByName( const ::rtl::OUString
& aRange
) throw(::com::sun::star::uno::RuntimeException
);
458 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
459 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
460 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
461 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
462 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
463 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
464 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
467 virtual void SAL_CALL
addChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
468 virtual void SAL_CALL
removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
469 virtual double SAL_CALL
getNotANumber( ) throw(::com::sun::star::uno::RuntimeException
);
470 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) throw(::com::sun::star::uno::RuntimeException
);
473 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > > SAL_CALL
getData( ) throw(::com::sun::star::uno::RuntimeException
);
474 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > >& aData
) throw(::com::sun::star::uno::RuntimeException
);
475 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
476 virtual void SAL_CALL
setRowDescriptions( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aRowDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
477 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
478 virtual void SAL_CALL
setColumnDescriptions( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aColumnDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
481 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException
);
482 virtual void SAL_CALL
sort(const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& xDescriptor
) throw( ::com::sun::star::uno::RuntimeException
);
485 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> > SAL_CALL
getDataArray( ) throw (::com::sun::star::uno::RuntimeException
);
486 virtual void SAL_CALL
setDataArray( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> >& aArray
) throw (::com::sun::star::uno::RuntimeException
);
489 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
490 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
491 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
494 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
496 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
497 sal_uInt16
getRowCount(void);
498 sal_uInt16
getColumnCount(void);
500 const SwUnoCrsr
* GetTblCrsr() const;
502 // for SwChartDataSequence
503 void GetDataSequence(
504 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> *pAnySeq
,
505 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> *pTxtSeq
,
506 ::com::sun::star::uno::Sequence
< double > *pDblSeq
,
507 sal_Bool bForceNumberResults
= sal_False
) throw (::com::sun::star::uno::RuntimeException
);
510 /* -----------------03.02.99 07:31-------------------
512 * --------------------------------------------------*/
513 class SwXTableRows
: public cppu::WeakImplHelper2
515 ::com::sun::star::table::XTableRows
,
516 ::com::sun::star::lang::XServiceInfo
521 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
523 virtual ~SwXTableRows();
525 SwXTableRows(SwFrmFmt
& rFrmFmt
);
530 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
531 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
533 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
534 // virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
536 // SMART_UNO_DECLARATION( SwXTableRows, UsrObject );
539 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
540 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
543 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
544 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
547 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
548 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
551 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
552 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
553 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
556 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);
559 /* -----------------03.02.99 07:31-------------------
561 * --------------------------------------------------*/
562 class SwXTableColumns
: public cppu::WeakImplHelper2
564 ::com::sun::star::table::XTableColumns
,
565 ::com::sun::star::lang::XServiceInfo
570 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
572 virtual ~SwXTableColumns();
574 SwXTableColumns(SwFrmFmt
& rFrmFmt
);
578 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
579 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void) throw( ::com::sun::star::uno::RuntimeException );
581 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
582 // virtual sal_Bool queryInterface( ::com::sun::star::uno::Uik aUik, ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rOut );
584 // SMART_UNO_DECLARATION( SwXTableColumns, UsrObject );
587 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
588 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) throw( ::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
591 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
592 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
595 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
596 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
599 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
600 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
601 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
604 virtual void Modify( SfxPoolItem
*pOld
, SfxPoolItem
*pNew
);