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 .
20 #ifndef INCLUDED_SW_INC_UNOTBL_HXX
21 #define INCLUDED_SW_INC_UNOTBL_HXX
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/XChartDataArray.hpp>
27 #include <com/sun/star/text/XTextTableCursor.hpp>
28 #include <com/sun/star/text/XTextTable.hpp>
29 #include <com/sun/star/table/XCellRange.hpp>
30 #include <com/sun/star/sheet/XCellRangeData.hpp>
31 #include <com/sun/star/table/XAutoFormattable.hpp>
33 #include <cppuhelper/implbase.hxx>
35 #include <comphelper/uno3.hxx>
37 #include <svl/listener.hxx>
39 #include "TextCursorHelper.hxx"
40 #include "unotext.hxx"
42 #include "unocrsr.hxx"
48 class SfxItemPropertySet
;
54 css::lang::XServiceInfo
,
55 css::beans::XPropertySet
,
56 css::container::XEnumerationAccess
59 class SwXCell final
: public SwXCellBaseClass
,
63 friend void sw_setString( SwXCell
&rCell
, const OUString
&rText
,
64 bool bKeepNumberFormat
);
65 friend void sw_setValue( SwXCell
&rCell
, double nVal
);
67 const SfxItemPropertySet
* m_pPropSet
;
68 SwTableBox
* m_pBox
; // only set in non-XML import
69 const SwStartNode
* m_pStartNode
; // only set in XML import
70 SwFrameFormat
* m_pTableFormat
;
72 // table position where pBox was found last
74 css::uno::Reference
<css::text::XText
> m_xParentText
;
75 static size_t const NOTFOUND
= SAL_MAX_SIZE
;
77 virtual const SwStartNode
*GetStartNode() const override
;
79 virtual css::uno::Reference
< css::text::XTextCursor
>
80 CreateCursor() override
;
84 virtual ~SwXCell() override
;
86 virtual void Notify(const SfxHint
&) override
;
89 SwXCell(SwFrameFormat
* pTableFormat
, SwTableBox
* pBox
, size_t nPos
);
90 SwXCell(SwFrameFormat
* pTableFormat
, const SwStartNode
& rStartNode
); // XML import interface
93 static const css::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
96 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
98 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& aType
) override
;
99 virtual void SAL_CALL
acquire( ) throw() override
;
100 virtual void SAL_CALL
release( ) throw() override
;
103 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
104 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
107 virtual OUString SAL_CALL
getFormula( ) override
;
108 virtual void SAL_CALL
setFormula( const OUString
& aFormula
) override
;
109 virtual double SAL_CALL
getValue( ) override
;
110 /// @throws css::uno::RuntimeException
111 double getValue( ) const
112 { return const_cast<SwXCell
*>(this)->getValue(); };
113 virtual void SAL_CALL
setValue( double nValue
) override
;
114 virtual css::table::CellContentType SAL_CALL
getType( ) override
;
115 virtual sal_Int32 SAL_CALL
getError( ) override
;
118 virtual css::uno::Reference
< css::text::XTextCursor
> SAL_CALL
createTextCursor() override
;
119 virtual css::uno::Reference
< css::text::XTextCursor
> SAL_CALL
createTextCursorByRange(const css::uno::Reference
< css::text::XTextRange
> & aTextPosition
) override
;
120 virtual void SAL_CALL
setString(const OUString
& aString
) override
;
123 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
124 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
125 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
126 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
127 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
128 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
129 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
132 virtual OUString SAL_CALL
getImplementationName() override
;
133 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
134 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
136 //XEnumerationAccess - was: XParagraphEnumerationAccess
137 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
createEnumeration() override
;
140 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
141 virtual sal_Bool SAL_CALL
hasElements( ) override
;
143 SwTableBox
* GetTableBox() const { return m_pBox
; }
144 static SwXCell
* CreateXCell(SwFrameFormat
* pTableFormat
, SwTableBox
* pBox
, SwTable
*pTable
= nullptr );
145 SwTableBox
* FindBox(SwTable
* pTable
, SwTableBox
* pBox
);
146 SwFrameFormat
* GetFrameFormat() const { return m_pTableFormat
; }
147 double GetForcedNumericalValue() const;
148 css::uno::Any
GetAny() const;
151 class SwXTextTableRow final
152 : public cppu::WeakImplHelper
<css::beans::XPropertySet
, css::lang::XServiceInfo
>
155 SwFrameFormat
* m_pFormat
;
157 const SfxItemPropertySet
* m_pPropSet
;
159 SwFrameFormat
* GetFrameFormat() { return m_pFormat
; }
160 const SwFrameFormat
* GetFrameFormat() const { return m_pFormat
; }
161 virtual ~SwXTextTableRow() override
;
164 SwXTextTableRow(SwFrameFormat
* pFormat
, SwTableLine
* pLine
);
168 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
169 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
170 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
171 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
172 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
173 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
174 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
177 virtual OUString SAL_CALL
getImplementationName() override
;
178 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
179 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
181 static SwTableLine
* FindLine(SwTable
* pTable
, SwTableLine
const * pLine
);
183 void Notify(const SfxHint
&) override
;
186 typedef cppu::WeakImplHelper
<
187 css::text::XTextTableCursor
,
188 css::lang::XServiceInfo
,
189 css::beans::XPropertySet
> SwXTextTableCursor_Base
;
190 class SW_DLLPUBLIC SwXTextTableCursor final
191 : public SwXTextTableCursor_Base
193 , public OTextCursorHelper
195 SwFrameFormat
* m_pFrameFormat
;
196 const SfxItemPropertySet
* m_pPropSet
;
199 SwXTextTableCursor(SwFrameFormat
* pFormat
, SwTableBox
const* pBox
);
200 SwXTextTableCursor(SwFrameFormat
& rTableFormat
, const SwTableCursor
* pTableSelection
);
204 virtual OUString SAL_CALL
getRangeName() override
;
205 virtual sal_Bool SAL_CALL
gotoCellByName( const OUString
& aCellName
, sal_Bool bExpand
) override
;
206 virtual sal_Bool SAL_CALL
goLeft( sal_Int16 nCount
, sal_Bool bExpand
) override
;
207 virtual sal_Bool SAL_CALL
goRight( sal_Int16 nCount
, sal_Bool bExpand
) override
;
208 virtual sal_Bool SAL_CALL
goUp( sal_Int16 nCount
, sal_Bool bExpand
) override
;
209 virtual sal_Bool SAL_CALL
goDown( sal_Int16 nCount
, sal_Bool bExpand
) override
;
210 virtual void SAL_CALL
gotoStart( sal_Bool bExpand
) override
;
211 virtual void SAL_CALL
gotoEnd( sal_Bool bExpand
) override
;
212 virtual sal_Bool SAL_CALL
mergeRange() override
;
213 virtual sal_Bool SAL_CALL
splitRange( sal_Int16 Count
, sal_Bool Horizontal
) override
;
216 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
217 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
218 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
219 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
220 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
221 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
222 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
225 virtual OUString SAL_CALL
getImplementationName() override
;
226 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
227 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
231 virtual const SwPaM
* GetPaM() const override
;
232 virtual SwPaM
* GetPaM() override
;
233 virtual const SwDoc
* GetDoc() const override
;
234 virtual SwDoc
* GetDoc() override
;
236 virtual void Notify( const SfxHint
& ) override
;
238 const SwUnoCursor
& GetCursor() const;
239 SwUnoCursor
& GetCursor();
240 sw::UnoCursorPointer m_pUnoCursor
;
241 SwFrameFormat
* GetFrameFormat() const { return m_pFrameFormat
; }
244 struct SwRangeDescriptor
254 class SAL_DLLPUBLIC_RTTI SwXTextTable final
: public cppu::WeakImplHelper
256 css::text::XTextTable
,
257 css::lang::XServiceInfo
,
258 css::table::XCellRange
,
259 css::chart::XChartDataArray
,
260 css::beans::XPropertySet
,
261 css::container::XNamed
,
262 css::table::XAutoFormattable
,
263 css::util::XSortable
,
264 css::lang::XUnoTunnel
,
265 css::sheet::XCellRangeData
270 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
273 SwXTextTable(SwFrameFormat
& rFrameFormat
);
274 virtual ~SwXTextTable() override
;
277 static css::uno::Reference
<css::text::XTextTable
>
278 CreateXTextTable(SwFrameFormat
* pFrameFormat
);
280 SW_DLLPUBLIC
static const css::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
282 SW_DLLPUBLIC
static void GetCellPosition(const OUString
& rCellName
, sal_Int32
& o_rColumn
, sal_Int32
& o_rRow
);
284 SW_DLLPUBLIC SwFrameFormat
* GetFrameFormat();
287 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
291 virtual void SAL_CALL
initialize( sal_Int32 nRows
, sal_Int32 nColumns
) override
;
292 virtual css::uno::Reference
< css::table::XTableRows
> SAL_CALL
getRows( ) override
;
293 virtual css::uno::Reference
< css::table::XTableColumns
> SAL_CALL
getColumns( ) override
;
294 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByName( const OUString
& aCellName
) override
;
295 virtual css::uno::Sequence
< OUString
> SAL_CALL
getCellNames( ) override
;
296 virtual css::uno::Reference
< css::text::XTextTableCursor
> SAL_CALL
createCursorByCellName( const OUString
& aCellName
) override
;
299 virtual void SAL_CALL
attach(const css::uno::Reference
< css::text::XTextRange
> & xTextRange
) override
;
300 virtual css::uno::Reference
< css::text::XTextRange
> SAL_CALL
getAnchor( ) override
;
303 virtual void SAL_CALL
dispose() override
;
304 virtual void SAL_CALL
addEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
305 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
308 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) override
;
309 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) override
;
310 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) override
;
313 virtual css::uno::Sequence
< css::uno::Sequence
< double > > SAL_CALL
getData( ) override
;
314 virtual void SAL_CALL
setData( const css::uno::Sequence
< css::uno::Sequence
< double > >& aData
) override
;
315 virtual css::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) override
;
316 virtual void SAL_CALL
setRowDescriptions( const css::uno::Sequence
< OUString
>& aRowDescriptions
) override
;
317 virtual css::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) override
;
318 virtual void SAL_CALL
setColumnDescriptions( const css::uno::Sequence
< OUString
>& aColumnDescriptions
) override
;
321 virtual void SAL_CALL
addChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
322 virtual void SAL_CALL
removeChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
323 virtual double SAL_CALL
getNotANumber( ) override
;
324 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) override
;
327 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
createSortDescriptor() override
;
328 virtual void SAL_CALL
sort(const css::uno::Sequence
< css::beans::PropertyValue
>& xDescriptor
) override
;
331 virtual void SAL_CALL
autoFormat(const OUString
& aName
) override
;
334 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
335 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
336 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
337 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
338 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
339 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
340 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
343 virtual OUString SAL_CALL
getName() override
;
344 virtual void SAL_CALL
setName(const OUString
& Name_
) override
;
347 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > SAL_CALL
getDataArray( ) override
;
348 virtual void SAL_CALL
setDataArray( const css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >& aArray
) override
;
351 virtual OUString SAL_CALL
getImplementationName() override
;
352 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
353 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
357 class SwXCellRange final
: public cppu::WeakImplHelper
359 css::table::XCellRange
,
360 css::lang::XServiceInfo
,
361 css::lang::XUnoTunnel
,
362 css::beans::XPropertySet
,
363 css::chart::XChartDataArray
,
364 css::util::XSortable
,
365 css::sheet::XCellRangeData
370 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
372 SwXCellRange(const sw::UnoCursorPointer
& pCursor
, SwFrameFormat
& rFrameFormat
, SwRangeDescriptor
const & rDesc
);
373 virtual ~SwXCellRange() override
;
376 static ::rtl::Reference
<SwXCellRange
> CreateXCellRange(
377 const sw::UnoCursorPointer
& pCursor
, SwFrameFormat
& rFrameFormat
,
378 SwRangeDescriptor
const & rDesc
);
380 static const css::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
382 void SetLabels(bool bFirstRowAsLabel
, bool bFirstColumnAsLabel
);
384 std::vector
<css::uno::Reference
<css::table::XCell
>> GetCells();
386 const SwUnoCursor
* GetTableCursor() const;
389 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
392 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) override
;
393 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) override
;
394 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) override
;
397 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
398 virtual void SAL_CALL
setPropertyValue(const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
399 virtual css::uno::Any SAL_CALL
getPropertyValue(const OUString
& PropertyName
) override
;
400 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
401 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
402 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
403 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
406 virtual void SAL_CALL
addChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
407 virtual void SAL_CALL
removeChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
408 virtual double SAL_CALL
getNotANumber( ) override
;
409 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) override
;
412 virtual css::uno::Sequence
< css::uno::Sequence
< double > > SAL_CALL
getData( ) override
;
413 virtual void SAL_CALL
setData( const css::uno::Sequence
< css::uno::Sequence
< double > >& aData
) override
;
414 virtual css::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) override
;
415 virtual void SAL_CALL
setRowDescriptions( const css::uno::Sequence
< OUString
>& aRowDescriptions
) override
;
416 virtual css::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) override
;
417 virtual void SAL_CALL
setColumnDescriptions( const css::uno::Sequence
< OUString
>& aColumnDescriptions
) override
;
420 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
createSortDescriptor() override
;
421 virtual void SAL_CALL
sort(const css::uno::Sequence
< css::beans::PropertyValue
>& xDescriptor
) override
;
424 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > SAL_CALL
getDataArray( ) override
;
425 virtual void SAL_CALL
setDataArray( const css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >& aArray
) override
;
428 virtual OUString SAL_CALL
getImplementationName() override
;
429 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
430 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
434 class SwXTableRows final
: public cppu::WeakImplHelper
436 css::table::XTableRows
,
437 css::lang::XServiceInfo
441 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
442 SwFrameFormat
* GetFrameFormat();
443 const SwFrameFormat
* GetFrameFormat() const { return const_cast<SwXTableRows
*>(this)->GetFrameFormat(); }
444 virtual ~SwXTableRows() override
;
447 SwXTableRows(SwFrameFormat
& rFrameFormat
);
450 virtual sal_Int32 SAL_CALL
getCount() override
;
451 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) override
;
454 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
455 virtual sal_Bool SAL_CALL
hasElements( ) override
;
458 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
459 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
462 virtual OUString SAL_CALL
getImplementationName() override
;
463 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
464 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
467 class SwXTableColumns final
: public cppu::WeakImplHelper
469 css::table::XTableColumns
,
470 css::lang::XServiceInfo
475 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
476 SwFrameFormat
* GetFrameFormat() const;
478 virtual ~SwXTableColumns() override
;
480 SwXTableColumns(SwFrameFormat
& rFrameFormat
);
484 virtual sal_Int32 SAL_CALL
getCount() override
;
485 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) override
;
488 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
489 virtual sal_Bool SAL_CALL
hasElements( ) override
;
492 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
493 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
496 virtual OUString SAL_CALL
getImplementationName() override
;
497 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
498 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
501 int sw_CompareCellRanges(
502 const OUString
&rRange1StartCell
, const OUString
&rRange1EndCell
,
503 const OUString
&rRange2StartCell
, const OUString
&rRange2EndCell
,
504 bool bCmpColsFirst
);
506 void sw_NormalizeRange( OUString
&rCell1
, OUString
&rCell2
);
508 OUString
sw_GetCellName( sal_Int32 nColumn
, sal_Int32 nRow
);
510 int sw_CompareCellsByColFirst( const OUString
&rCellName1
, const OUString
&rCellName2
);
512 int sw_CompareCellsByRowFirst( const OUString
&rCellName1
, const OUString
&rCellName2
);
516 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */