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/lang/XUnoTunnel.hpp>
24 #include <com/sun/star/container/XNamed.hpp>
25 #include <com/sun/star/container/XEnumerationAccess.hpp>
26 #include <com/sun/star/util/XSortable.hpp>
27 #include <com/sun/star/chart/XChartDataArray.hpp>
28 #include <com/sun/star/text/XTextTableCursor.hpp>
29 #include <com/sun/star/text/XTextTable.hpp>
30 #include <com/sun/star/table/XCellRange.hpp>
31 #include <com/sun/star/sheet/XCellRangeData.hpp>
32 #include <com/sun/star/table/XAutoFormattable.hpp>
34 #include <cppuhelper/implbase.hxx>
36 #include <comphelper/uno3.hxx>
38 #include <svl/listener.hxx>
40 #include "TextCursorHelper.hxx"
41 #include "unotext.hxx"
43 #include "unocrsr.hxx"
49 class SfxItemPropertySet
;
55 css::lang::XServiceInfo
,
56 css::beans::XPropertySet
,
57 css::container::XEnumerationAccess
60 class SwXCell final
: public SwXCellBaseClass
,
64 friend void sw_setString( SwXCell
&rCell
, const OUString
&rText
,
65 bool bKeepNumberFormat
);
66 friend void sw_setValue( SwXCell
&rCell
, double nVal
);
68 const SfxItemPropertySet
* m_pPropSet
;
69 SwTableBox
* m_pBox
; // only set in non-XML import
70 const SwStartNode
* m_pStartNode
; // only set in XML import
71 SwFrameFormat
* m_pTableFormat
;
73 // table position where pBox was found last
75 css::uno::Reference
<css::text::XText
> m_xParentText
;
76 static size_t const NOTFOUND
= SAL_MAX_SIZE
;
78 virtual const SwStartNode
*GetStartNode() const override
;
82 virtual ~SwXCell() override
;
84 virtual void Notify(const SfxHint
&) override
;
87 SwXCell(SwFrameFormat
* pTableFormat
, SwTableBox
* pBox
, size_t nPos
);
88 SwXCell(SwFrameFormat
* pTableFormat
, const SwStartNode
& rStartNode
); // XML import interface
90 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& aType
) override
;
91 virtual void SAL_CALL
acquire( ) noexcept override
;
92 virtual void SAL_CALL
release( ) noexcept override
;
95 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
96 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
99 virtual OUString SAL_CALL
getFormula( ) override
;
100 virtual void SAL_CALL
setFormula( const OUString
& aFormula
) override
;
101 virtual double SAL_CALL
getValue( ) override
;
102 /// @throws css::uno::RuntimeException
103 double getValue( ) const
104 { return const_cast<SwXCell
*>(this)->getValue(); };
105 virtual void SAL_CALL
setValue( double nValue
) override
;
106 virtual css::table::CellContentType SAL_CALL
getType( ) override
;
107 virtual sal_Int32 SAL_CALL
getError( ) override
;
110 virtual rtl::Reference
< SwXTextCursor
> createXTextCursor() override
;
111 virtual rtl::Reference
< SwXTextCursor
> createXTextCursorByRange(
112 const ::css::uno::Reference
< ::css::text::XTextRange
>& aTextPosition
) override
;
113 virtual void SAL_CALL
setString(const OUString
& aString
) override
;
116 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
117 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
118 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
119 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
120 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
121 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
122 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
125 virtual OUString SAL_CALL
getImplementationName() override
;
126 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
127 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
129 //XEnumerationAccess - was: XParagraphEnumerationAccess
130 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
createEnumeration() override
;
133 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
134 virtual sal_Bool SAL_CALL
hasElements( ) override
;
136 SwTableBox
* GetTableBox() const { return m_pBox
; }
137 static rtl::Reference
<SwXCell
> CreateXCell(SwFrameFormat
* pTableFormat
, SwTableBox
* pBox
, SwTable
*pTable
= nullptr );
138 SwTableBox
* FindBox(SwTable
* pTable
, SwTableBox
* pBox
);
139 SwFrameFormat
* GetFrameFormat() const { return m_pTableFormat
; }
140 double GetForcedNumericalValue() const;
141 css::uno::Any
GetAny() const;
144 class SwXTextTableRow final
145 : public cppu::WeakImplHelper
<css::beans::XPropertySet
, css::lang::XServiceInfo
>
148 SwFrameFormat
* m_pFormat
;
149 SwTableLine
* m_pLine
;
150 const SfxItemPropertySet
* m_pPropSet
;
152 SwFrameFormat
* GetFrameFormat() { return m_pFormat
; }
153 const SwFrameFormat
* GetFrameFormat() const { return m_pFormat
; }
154 virtual ~SwXTextTableRow() override
;
157 SwXTextTableRow(SwFrameFormat
* pFormat
, SwTableLine
* pLine
);
161 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
162 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
163 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
164 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
165 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
166 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
167 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
170 virtual OUString SAL_CALL
getImplementationName() override
;
171 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
172 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
174 static SwTableLine
* FindLine(SwTable
* pTable
, SwTableLine
const * pLine
);
176 void Notify(const SfxHint
&) override
;
179 typedef cppu::WeakImplHelper
<
180 css::text::XTextTableCursor
,
181 css::lang::XServiceInfo
,
182 css::beans::XPropertySet
> SwXTextTableCursor_Base
;
183 class SW_DLLPUBLIC SwXTextTableCursor final
184 : public SwXTextTableCursor_Base
186 , public OTextCursorHelper
188 SwFrameFormat
* m_pFrameFormat
;
189 const SfxItemPropertySet
* m_pPropSet
;
190 sw::UnoCursorPointer m_pUnoCursor
;
193 SwXTextTableCursor(SwFrameFormat
* pFormat
, SwTableBox
const* pBox
);
194 SwXTextTableCursor(SwFrameFormat
& rTableFormat
, const SwTableCursor
* pTableSelection
);
195 virtual void SAL_CALL
release() noexcept override
;
198 virtual OUString SAL_CALL
getRangeName() override
;
199 virtual sal_Bool SAL_CALL
gotoCellByName( const OUString
& aCellName
, sal_Bool bExpand
) override
;
200 virtual sal_Bool SAL_CALL
goLeft( sal_Int16 nCount
, sal_Bool bExpand
) override
;
201 virtual sal_Bool SAL_CALL
goRight( sal_Int16 nCount
, sal_Bool bExpand
) override
;
202 virtual sal_Bool SAL_CALL
goUp( sal_Int16 nCount
, sal_Bool bExpand
) override
;
203 virtual sal_Bool SAL_CALL
goDown( sal_Int16 nCount
, sal_Bool bExpand
) override
;
204 virtual void SAL_CALL
gotoStart( sal_Bool bExpand
) override
;
205 virtual void SAL_CALL
gotoEnd( sal_Bool bExpand
) override
;
206 virtual sal_Bool SAL_CALL
mergeRange() override
;
207 virtual sal_Bool SAL_CALL
splitRange( sal_Int16 Count
, sal_Bool Horizontal
) override
;
210 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
211 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
212 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
213 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
214 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
215 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
216 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
219 virtual OUString SAL_CALL
getImplementationName() override
;
220 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
221 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
225 virtual const SwPaM
* GetPaM() const override
;
226 virtual SwPaM
* GetPaM() override
;
227 virtual const SwDoc
* GetDoc() const override
;
228 virtual SwDoc
* GetDoc() override
;
230 virtual void Notify( const SfxHint
& ) override
;
232 const SwUnoCursor
& GetCursor() const;
233 SwUnoCursor
& GetCursor();
234 SwFrameFormat
* GetFrameFormat() const { return m_pFrameFormat
; }
237 struct SwRangeDescriptor
247 class SW_DLLPUBLIC SwXTextTable final
: public cppu::WeakImplHelper
249 css::text::XTextTable
,
250 css::lang::XServiceInfo
,
251 css::table::XCellRange
,
252 css::chart::XChartDataArray
,
253 css::beans::XPropertySet
,
254 css::container::XNamed
,
255 css::table::XAutoFormattable
,
256 css::util::XSortable
,
257 css::sheet::XCellRangeData
262 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
265 SwXTextTable(SwFrameFormat
& rFrameFormat
);
266 virtual ~SwXTextTable() override
;
269 static rtl::Reference
<SwXTextTable
>
270 CreateXTextTable(SwFrameFormat
* pFrameFormat
);
272 static void GetCellPosition(std::u16string_view aCellName
, sal_Int32
& o_rColumn
, sal_Int32
& o_rRow
);
274 SwFrameFormat
* GetFrameFormat();
277 virtual void SAL_CALL
initialize( sal_Int32 nRows
, sal_Int32 nColumns
) override
;
278 virtual css::uno::Reference
< css::table::XTableRows
> SAL_CALL
getRows( ) override
;
279 virtual css::uno::Reference
< css::table::XTableColumns
> SAL_CALL
getColumns( ) override
;
280 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByName( const OUString
& aCellName
) override
;
281 virtual css::uno::Sequence
< OUString
> SAL_CALL
getCellNames( ) override
;
282 virtual css::uno::Reference
< css::text::XTextTableCursor
> SAL_CALL
createCursorByCellName( const OUString
& aCellName
) override
;
285 virtual void SAL_CALL
attach(const css::uno::Reference
< css::text::XTextRange
> & xTextRange
) override
;
286 virtual css::uno::Reference
< css::text::XTextRange
> SAL_CALL
getAnchor( ) override
;
289 virtual void SAL_CALL
dispose() override
;
290 virtual void SAL_CALL
addEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
291 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) override
;
294 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) override
;
295 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) override
;
296 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) override
;
299 virtual css::uno::Sequence
< css::uno::Sequence
< double > > SAL_CALL
getData( ) override
;
300 virtual void SAL_CALL
setData( const css::uno::Sequence
< css::uno::Sequence
< double > >& aData
) override
;
301 virtual css::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) override
;
302 virtual void SAL_CALL
setRowDescriptions( const css::uno::Sequence
< OUString
>& aRowDescriptions
) override
;
303 virtual css::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) override
;
304 virtual void SAL_CALL
setColumnDescriptions( const css::uno::Sequence
< OUString
>& aColumnDescriptions
) override
;
307 virtual void SAL_CALL
addChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
308 virtual void SAL_CALL
removeChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
309 virtual double SAL_CALL
getNotANumber( ) override
;
310 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) override
;
313 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
createSortDescriptor() override
;
314 virtual void SAL_CALL
sort(const css::uno::Sequence
< css::beans::PropertyValue
>& xDescriptor
) override
;
317 virtual void SAL_CALL
autoFormat(const OUString
& aName
) override
;
320 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
321 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
322 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
323 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
324 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
325 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
326 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
329 virtual OUString SAL_CALL
getName() override
;
330 virtual void SAL_CALL
setName(const OUString
& Name_
) override
;
333 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > SAL_CALL
getDataArray( ) override
;
334 virtual void SAL_CALL
setDataArray( const css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >& aArray
) override
;
337 virtual OUString SAL_CALL
getImplementationName() override
;
338 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
339 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
343 class SwXCellRange final
: public cppu::WeakImplHelper
345 css::table::XCellRange
,
346 css::lang::XServiceInfo
,
347 css::beans::XPropertySet
,
348 css::chart::XChartDataArray
,
349 css::util::XSortable
,
350 css::sheet::XCellRangeData
355 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
357 SwXCellRange(const sw::UnoCursorPointer
& pCursor
, SwFrameFormat
& rFrameFormat
, SwRangeDescriptor
const & rDesc
);
358 virtual ~SwXCellRange() override
;
361 static ::rtl::Reference
<SwXCellRange
> CreateXCellRange(
362 const sw::UnoCursorPointer
& pCursor
, SwFrameFormat
& rFrameFormat
,
363 SwRangeDescriptor
const & rDesc
);
365 void SetLabels(bool bFirstRowAsLabel
, bool bFirstColumnAsLabel
);
367 std::vector
<css::uno::Reference
<css::table::XCell
>> GetCells();
369 const SwUnoCursor
* GetTableCursor() const;
372 virtual css::uno::Reference
< css::table::XCell
> SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
) override
;
373 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
) override
;
374 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
getCellRangeByName( const OUString
& aRange
) override
;
377 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
378 virtual void SAL_CALL
setPropertyValue(const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
379 virtual css::uno::Any SAL_CALL
getPropertyValue(const OUString
& PropertyName
) override
;
380 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
381 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
382 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
383 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
386 virtual void SAL_CALL
addChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
387 virtual void SAL_CALL
removeChartDataChangeEventListener( const css::uno::Reference
< css::chart::XChartDataChangeEventListener
>& aListener
) override
;
388 virtual double SAL_CALL
getNotANumber( ) override
;
389 virtual sal_Bool SAL_CALL
isNotANumber( double nNumber
) override
;
392 virtual css::uno::Sequence
< css::uno::Sequence
< double > > SAL_CALL
getData( ) override
;
393 virtual void SAL_CALL
setData( const css::uno::Sequence
< css::uno::Sequence
< double > >& aData
) override
;
394 virtual css::uno::Sequence
< OUString
> SAL_CALL
getRowDescriptions( ) override
;
395 virtual void SAL_CALL
setRowDescriptions( const css::uno::Sequence
< OUString
>& aRowDescriptions
) override
;
396 virtual css::uno::Sequence
< OUString
> SAL_CALL
getColumnDescriptions( ) override
;
397 virtual void SAL_CALL
setColumnDescriptions( const css::uno::Sequence
< OUString
>& aColumnDescriptions
) override
;
400 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
createSortDescriptor() override
;
401 virtual void SAL_CALL
sort(const css::uno::Sequence
< css::beans::PropertyValue
>& xDescriptor
) override
;
404 virtual css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> > SAL_CALL
getDataArray( ) override
;
405 virtual void SAL_CALL
setDataArray( const css::uno::Sequence
< css::uno::Sequence
< css::uno::Any
> >& aArray
) override
;
408 virtual OUString SAL_CALL
getImplementationName() override
;
409 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
410 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
414 /// UNO API wrapper for SwTableLines.
415 class SwXTableRows final
: public cppu::WeakImplHelper
417 css::table::XTableRows
,
418 css::lang::XServiceInfo
422 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
423 SwFrameFormat
* GetFrameFormat();
424 const SwFrameFormat
* GetFrameFormat() const { return const_cast<SwXTableRows
*>(this)->GetFrameFormat(); }
425 virtual ~SwXTableRows() override
;
428 SwXTableRows(SwFrameFormat
& rFrameFormat
);
431 virtual sal_Int32 SAL_CALL
getCount() override
;
432 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) override
;
435 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
436 virtual sal_Bool SAL_CALL
hasElements( ) override
;
439 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
440 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
443 virtual OUString SAL_CALL
getImplementationName() override
;
444 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
445 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
448 class SwXTableColumns final
: public cppu::WeakImplHelper
450 css::table::XTableColumns
,
451 css::lang::XServiceInfo
456 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
457 SwFrameFormat
* GetFrameFormat() const;
459 virtual ~SwXTableColumns() override
;
461 SwXTableColumns(SwFrameFormat
& rFrameFormat
);
465 virtual sal_Int32 SAL_CALL
getCount() override
;
466 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 nIndex
) override
;
469 virtual css::uno::Type SAL_CALL
getElementType( ) override
;
470 virtual sal_Bool SAL_CALL
hasElements( ) override
;
473 virtual void SAL_CALL
insertByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
474 virtual void SAL_CALL
removeByIndex(sal_Int32 nIndex
, sal_Int32 nCount
) override
;
477 virtual OUString SAL_CALL
getImplementationName() override
;
478 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) override
;
479 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
482 int sw_CompareCellRanges(
483 std::u16string_view aRange1StartCell
, std::u16string_view aRange1EndCell
,
484 std::u16string_view aRange2StartCell
, std::u16string_view aRange2EndCell
,
485 bool bCmpColsFirst
);
487 void sw_NormalizeRange( OUString
&rCell1
, OUString
&rCell2
);
489 OUString
sw_GetCellName( sal_Int32 nColumn
, sal_Int32 nRow
);
491 int sw_CompareCellsByColFirst( std::u16string_view aCellName1
, std::u16string_view aCellName2
);
493 int sw_CompareCellsByRowFirst( std::u16string_view aCellName1
, std::u16string_view aCellName2
);
497 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */