1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 #include <com/sun/star/container/XNamed.hpp>
24 #include <com/sun/star/container/XEnumerationAccess.hpp>
25 #include <com/sun/star/util/XSortable.hpp>
26 #include <com/sun/star/chart/XChartData.hpp>
27 #include <com/sun/star/chart/XChartDataArray.hpp>
28 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
29 #include <com/sun/star/text/XTextTableCursor.hpp>
30 #include <com/sun/star/text/XTextTable.hpp>
31 #include <com/sun/star/table/XCellRange.hpp>
32 #include <com/sun/star/sheet/XCellRangeData.hpp>
33 #include <com/sun/star/table/XAutoFormattable.hpp>
35 #include <cppuhelper/implbase3.hxx>
36 #include <cppuhelper/implbase4.hxx>
37 #include <cppuhelper/implbase5.hxx>
38 #include <cppuhelper/implbase7.hxx>
39 #include <cppuhelper/implbase10.hxx>
40 #include <cppuhelper/interfacecontainer.h>
42 #include <comphelper/uno3.hxx>
43 #include <tools/string.hxx>
46 #include <TextCursorHelper.hxx>
47 #include <unotext.hxx>
56 class SwChartDataProvider
;
63 ::com::sun::star::table::XCell
,
64 ::com::sun::star::lang::XServiceInfo
,
65 ::com::sun::star::beans::XPropertySet
,
66 ::com::sun::star::container::XEnumerationAccess
69 class SwXCell
: public SwXCellBaseClass
,
73 friend void sw_setString( SwXCell
&rCell
, const OUString
&rTxt
,
74 sal_Bool bKeepNumberFmt
= sal_False
);
75 friend double sw_getValue( SwXCell
&rCell
);
76 friend void sw_setValue( SwXCell
&rCell
, double nVal
);
79 const SfxItemPropertySet
* m_pPropSet
;
80 SwTableBox
* pBox
; // only set in non-XML import
81 const SwStartNode
* pStartNode
; // only set in XML import
83 // table position where pBox was found last
85 static size_t const NOTFOUND
= SAL_MAX_SIZE
;
88 virtual const SwStartNode
*GetStartNode() const;
90 virtual ::com::sun::star::uno::Reference
<
91 ::com::sun::star::text::XTextCursor
>
93 throw (::com::sun::star::uno::RuntimeException
);
100 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
103 SwXCell(SwFrmFmt
* pTblFmt
, SwTableBox
* pBox
, size_t nPos
= NOTFOUND
);
104 SwXCell(SwFrmFmt
* pTblFmt
, const SwStartNode
& rStartNode
); // XML import interface
109 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
112 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
114 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw(::com::sun::star::uno::RuntimeException
);
115 virtual void SAL_CALL
acquire( ) throw();
116 virtual void SAL_CALL
release( ) throw();
119 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
120 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
123 virtual OUString SAL_CALL
getFormula( ) throw(::com::sun::star::uno::RuntimeException
);
124 virtual void SAL_CALL
setFormula( const OUString
& aFormula
) throw(::com::sun::star::uno::RuntimeException
);
125 virtual double SAL_CALL
getValue( ) throw(::com::sun::star::uno::RuntimeException
);
126 virtual void SAL_CALL
setValue( double nValue
) throw(::com::sun::star::uno::RuntimeException
);
127 virtual ::com::sun::star::table::CellContentType SAL_CALL
getType( ) throw(::com::sun::star::uno::RuntimeException
);
128 virtual sal_Int32 SAL_CALL
getError( ) throw(::com::sun::star::uno::RuntimeException
);
131 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
createTextCursor(void) throw( ::com::sun::star::uno::RuntimeException
);
132 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
);
133 virtual void SAL_CALL
setString(const OUString
& aString
) throw( ::com::sun::star::uno::RuntimeException
);
136 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
137 virtual void SAL_CALL
setPropertyValue( const 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
);
138 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
139 virtual void SAL_CALL
addPropertyChangeListener( const 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
);
140 virtual void SAL_CALL
removePropertyChangeListener( const 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
);
141 virtual void SAL_CALL
addVetoableChangeListener( const 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
);
142 virtual void SAL_CALL
removeVetoableChangeListener( const 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
);
145 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
146 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
147 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
149 //XEnumerationAccess - was: XParagraphEnumerationAccess
150 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException
);
153 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
154 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
156 SwTableBox
* GetTblBox()const {return pBox
;}
157 static SwXCell
* CreateXCell(SwFrmFmt
* pTblFmt
, SwTableBox
* pBox
, SwTable
*pTbl
= 0 );
158 SwTableBox
* FindBox(SwTable
* pTable
, SwTableBox
* pBox
);
160 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
163 class SwXTextTableRow
: public cppu::WeakImplHelper2
165 ::com::sun::star::beans::XPropertySet
,
166 ::com::sun::star::lang::XServiceInfo
170 const SfxItemPropertySet
* m_pPropSet
;
173 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
175 virtual ~SwXTextTableRow();
177 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
180 SwXTextTableRow(SwFrmFmt
* pFmt
, SwTableLine
* pLine
);
186 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
187 virtual void SAL_CALL
setPropertyValue( const 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
);
188 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
189 virtual void SAL_CALL
addPropertyChangeListener( const 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
);
190 virtual void SAL_CALL
removePropertyChangeListener( const 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
);
191 virtual void SAL_CALL
addVetoableChangeListener( const 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
);
192 virtual void SAL_CALL
removeVetoableChangeListener( const 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
);
195 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
196 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
197 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
199 const SwTableLine
* GetTblRow() const {return pLine
;}
200 static SwTableLine
* FindLine(SwTable
* pTable
, SwTableLine
* pLine
);
203 typedef cppu::WeakImplHelper3
<
204 ::com::sun::star::text::XTextTableCursor
,
205 ::com::sun::star::lang::XServiceInfo
,
206 ::com::sun::star::beans::XPropertySet
207 > SwXTextTableCursor_Base
;
208 class SW_DLLPUBLIC SwXTextTableCursor
: public SwXTextTableCursor_Base
210 ,public OTextCursorHelper
212 SwDepend aCrsrDepend
;
213 const SfxItemPropertySet
* m_pPropSet
;
216 virtual ~SwXTextTableCursor();
218 SwXTextTableCursor(SwFrmFmt
* pFmt
, SwTableBox
* pBox
);
219 SwXTextTableCursor(SwFrmFmt
& rTableFmt
,
220 const SwTableCursor
* pTableSelection
);
226 virtual OUString SAL_CALL
getRangeName( ) throw(::com::sun::star::uno::RuntimeException
);
227 virtual sal_Bool SAL_CALL
gotoCellByName( const OUString
& aCellName
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
228 virtual sal_Bool SAL_CALL
goLeft( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
229 virtual sal_Bool SAL_CALL
goRight( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
230 virtual sal_Bool SAL_CALL
goUp( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
231 virtual sal_Bool SAL_CALL
goDown( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
232 virtual void SAL_CALL
gotoStart( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
233 virtual void SAL_CALL
gotoEnd( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
234 virtual sal_Bool SAL_CALL
mergeRange( ) throw(::com::sun::star::uno::RuntimeException
);
235 virtual sal_Bool SAL_CALL
splitRange( sal_Int16 Count
, sal_Bool Horizontal
) throw(::com::sun::star::uno::RuntimeException
);
238 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
239 virtual void SAL_CALL
setPropertyValue( const 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
);
240 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
241 virtual void SAL_CALL
addPropertyChangeListener( const 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
);
242 virtual void SAL_CALL
removePropertyChangeListener( const 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
);
243 virtual void SAL_CALL
addVetoableChangeListener( const 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
);
244 virtual void SAL_CALL
removeVetoableChangeListener( const 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
);
247 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
248 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
249 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
252 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
255 virtual const SwPaM
* GetPaM() const;
256 virtual SwPaM
* GetPaM();
257 virtual const SwDoc
* GetDoc() const;
258 virtual SwDoc
* GetDoc();
260 const SwUnoCrsr
* GetCrsr() const;
261 SwUnoCrsr
* GetCrsr();
262 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
265 struct SwRangeDescriptor
275 class SwTableProperties_Impl
;
276 class SwXTextTable
: public cppu::WeakImplHelper10
278 ::com::sun::star::text::XTextTable
,
279 ::com::sun::star::lang::XServiceInfo
,
280 ::com::sun::star::table::XCellRange
,
281 ::com::sun::star::chart::XChartDataArray
,
282 ::com::sun::star::beans::XPropertySet
,
283 ::com::sun::star::container::XNamed
,
284 ::com::sun::star::table::XAutoFormattable
,
285 ::com::sun::star::util::XSortable
,
286 ::com::sun::star::lang::XUnoTunnel
,
287 ::com::sun::star::sheet::XCellRangeData
293 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
295 const SfxItemPropertySet
* m_pPropSet
;
297 // Descriptor-interface
298 SwTableProperties_Impl
* pTableProps
;
300 sal_Bool bIsDescriptor
;
301 unsigned short nRows
;
302 unsigned short nColumns
;
305 sal_Bool bFirstRowAsLabel
:1;
306 sal_Bool bFirstColumnAsLabel
:1;
308 virtual ~SwXTextTable();
311 SwXTextTable(SwFrmFmt
& rFrmFmt
);
314 SW_DLLPUBLIC
static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
317 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
322 virtual void SAL_CALL
initialize( sal_Int32 nRows
, sal_Int32 nColumns
) throw(::com::sun::star::uno::RuntimeException
);
323 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XTableRows
> SAL_CALL
getRows( ) throw(::com::sun::star::uno::RuntimeException
);
324 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XTableColumns
> SAL_CALL
getColumns( ) throw(::com::sun::star::uno::RuntimeException
);
325 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
> SAL_CALL
getCellByName( const OUString
& aCellName
) throw(::com::sun::star::uno::RuntimeException
);
326 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getCellNames( ) throw(::com::sun::star::uno::RuntimeException
);
327 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextTableCursor
> SAL_CALL
createCursorByCellName( const OUString
& aCellName
) throw(::com::sun::star::uno::RuntimeException
);
330 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
);
331 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getAnchor( ) throw(::com::sun::star::uno::RuntimeException
);
334 virtual void SAL_CALL
dispose(void) throw( ::com::sun::star::uno::RuntimeException
);
335 virtual void SAL_CALL
addEventListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
336 virtual void SAL_CALL
removeEventListener(const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
> & aListener
) throw( ::com::sun::star::uno::RuntimeException
);
339 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
);
340 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
);
341 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) throw(::com::sun::star::uno::RuntimeException
);
344 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > > SAL_CALL
getData( ) throw(::com::sun::star::uno::RuntimeException
);
345 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > >& aData
) throw(::com::sun::star::uno::RuntimeException
);
346 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
347 virtual void SAL_CALL
setRowDescriptions( const ::com::sun::star::uno::Sequence
< OUString
>& aRowDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
348 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
349 virtual void SAL_CALL
setColumnDescriptions( const ::com::sun::star::uno::Sequence
< OUString
>& aColumnDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
352 virtual void SAL_CALL
addChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
353 virtual void SAL_CALL
removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
354 virtual double SAL_CALL
getNotANumber( ) throw(::com::sun::star::uno::RuntimeException
);
355 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) throw(::com::sun::star::uno::RuntimeException
);
358 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException
);
359 virtual void SAL_CALL
sort(const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& xDescriptor
) throw( ::com::sun::star::uno::RuntimeException
);
362 virtual void SAL_CALL
autoFormat(const OUString
& aName
) throw( ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
365 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
366 virtual void SAL_CALL
setPropertyValue( const 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
);
367 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
368 virtual void SAL_CALL
addPropertyChangeListener( const 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
);
369 virtual void SAL_CALL
removePropertyChangeListener( const 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
);
370 virtual void SAL_CALL
addVetoableChangeListener( const 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
);
371 virtual void SAL_CALL
removeVetoableChangeListener( const 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
);
374 virtual OUString SAL_CALL
getName(void) throw( ::com::sun::star::uno::RuntimeException
);
375 virtual void SAL_CALL
setName(const OUString
& Name_
) throw( ::com::sun::star::uno::RuntimeException
);
378 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
);
379 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
);
382 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
383 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
384 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
386 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
);
388 sal_uInt16
getRowCount(void);
389 sal_uInt16
getColumnCount(void);
390 ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> GetRangeByName(SwFrmFmt
* pFmt
, SwTable
* pTable
,
391 const String
& sTLName
, const String
& sBRName
,
392 SwRangeDescriptor
& rDesc
);
395 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
397 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
400 class SwXCellRange
: public cppu::WeakImplHelper7
402 ::com::sun::star::table::XCellRange
,
403 ::com::sun::star::lang::XServiceInfo
,
404 ::com::sun::star::lang::XUnoTunnel
,
405 ::com::sun::star::beans::XPropertySet
,
406 ::com::sun::star::chart::XChartDataArray
,
407 ::com::sun::star::util::XSortable
,
408 ::com::sun::star::sheet::XCellRangeData
412 SwDepend aCursorDepend
; //the cursor is removed after the doc has been removed
413 ::osl::Mutex m_Mutex
;
414 ::cppu::OInterfaceContainerHelper m_ChartListeners
;
416 SwRangeDescriptor aRgDesc
;
417 const SfxItemPropertySet
* m_pPropSet
;
421 sal_Bool bFirstRowAsLabel
:1;
422 sal_Bool bFirstColumnAsLabel
:1;
425 SwXCellRange(SwUnoCrsr
* pCrsr
, SwFrmFmt
& rFrmFmt
, SwRangeDescriptor
& rDesc
);
430 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
433 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
437 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
);
438 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
);
439 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) throw(::com::sun::star::uno::RuntimeException
);
442 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
443 virtual void SAL_CALL
setPropertyValue( const 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
);
444 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
445 virtual void SAL_CALL
addPropertyChangeListener( const 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
);
446 virtual void SAL_CALL
removePropertyChangeListener( const 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
);
447 virtual void SAL_CALL
addVetoableChangeListener( const 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
);
448 virtual void SAL_CALL
removeVetoableChangeListener( const 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
);
451 virtual void SAL_CALL
addChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
452 virtual void SAL_CALL
removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::chart::XChartDataChangeEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
453 virtual double SAL_CALL
getNotANumber( ) throw(::com::sun::star::uno::RuntimeException
);
454 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) throw(::com::sun::star::uno::RuntimeException
);
457 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > > SAL_CALL
getData( ) throw(::com::sun::star::uno::RuntimeException
);
458 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Sequence
< double > >& aData
) throw(::com::sun::star::uno::RuntimeException
);
459 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
460 virtual void SAL_CALL
setRowDescriptions( const ::com::sun::star::uno::Sequence
< OUString
>& aRowDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
461 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) throw(::com::sun::star::uno::RuntimeException
);
462 virtual void SAL_CALL
setColumnDescriptions( const ::com::sun::star::uno::Sequence
< OUString
>& aColumnDescriptions
) throw(::com::sun::star::uno::RuntimeException
);
465 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
createSortDescriptor(void) throw( ::com::sun::star::uno::RuntimeException
);
466 virtual void SAL_CALL
sort(const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& xDescriptor
) throw( ::com::sun::star::uno::RuntimeException
);
469 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
);
470 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
);
473 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
474 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
475 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
478 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
480 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
481 sal_uInt16
getRowCount(void);
482 sal_uInt16
getColumnCount(void);
484 const SwUnoCrsr
* GetTblCrsr() const;
486 // for SwChartDataSequence
487 void GetDataSequence(
488 ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> *pAnySeq
,
489 ::com::sun::star::uno::Sequence
< OUString
> *pTxtSeq
,
490 ::com::sun::star::uno::Sequence
< double > *pDblSeq
,
491 sal_Bool bForceNumberResults
= sal_False
) throw (::com::sun::star::uno::RuntimeException
);
495 class SwXTableRows
: public cppu::WeakImplHelper2
497 ::com::sun::star::table::XTableRows
,
498 ::com::sun::star::lang::XServiceInfo
503 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
505 virtual ~SwXTableRows();
507 SwXTableRows(SwFrmFmt
& rFrmFmt
);
513 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
514 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
);
517 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
518 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
521 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
522 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
525 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
526 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
527 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
530 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
533 class SwXTableColumns
: public cppu::WeakImplHelper2
535 ::com::sun::star::table::XTableColumns
,
536 ::com::sun::star::lang::XServiceInfo
541 SwFrmFmt
* GetFrmFmt() const { return (SwFrmFmt
*)GetRegisteredIn(); }
543 virtual ~SwXTableColumns();
545 SwXTableColumns(SwFrmFmt
& rFrmFmt
);
551 virtual sal_Int32 SAL_CALL
getCount(void) throw( ::com::sun::star::uno::RuntimeException
);
552 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
);
555 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
556 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
559 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
560 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) throw( ::com::sun::star::uno::RuntimeException
);
563 virtual OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
564 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
565 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
568 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
*pNew
);
576 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */