LibreOffice Module sc (master) 1
vbaborders.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#include "vbaborders.hxx"
20
21#include <sal/macros.h>
23#include <ooo/vba/excel/XlBordersIndex.hpp>
24#include <ooo/vba/excel/XlBorderWeight.hpp>
25#include <ooo/vba/excel/XlLineStyle.hpp>
26#include <ooo/vba/excel/XlColorIndex.hpp>
27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/table/TableBorder.hpp>
29#include <com/sun/star/table/XCellRange.hpp>
30#include <com/sun/star/table/XColumnRowRange.hpp>
31#include <utility>
32
33#include "vbapalette.hxx"
34
35using namespace ::com::sun::star;
36using namespace ::ooo::vba;
37using namespace ::ooo::vba::excel;
38
39typedef ::cppu::WeakImplHelper<container::XIndexAccess > RangeBorders_Base;
41
42// #TODO sort these indexes to match the order in which Excel iterates over the
43// borders, the enumeration will match the order in this list
44const sal_Int16 supportedIndexTable[] = { XlBordersIndex::xlEdgeLeft, XlBordersIndex::xlEdgeTop, XlBordersIndex::xlEdgeBottom, XlBordersIndex::xlEdgeRight, XlBordersIndex::xlDiagonalDown, XlBordersIndex::xlDiagonalUp, XlBordersIndex::xlInsideVertical, XlBordersIndex::xlInsideHorizontal };
45
46constexpr OUStringLiteral sTableBorder = u"TableBorder";
47
48// Equiv widths in 1/100 mm
49const sal_Int32 OOLineThin = 26;
50const sal_Int32 OOLineMedium = 88;
51const sal_Int32 OOLineThick = 141;
52const sal_Int32 OOLineHairline = 2;
53
54namespace {
55
56class ScVbaBorder : public ScVbaBorder_Base
57{
58private:
59 uno::Reference< beans::XPropertySet > m_xProps;
60 sal_Int32 m_LineType;
61 ScVbaPalette m_Palette;
62 void setBorderLine( const table::BorderLine& rBorderLine )
63 {
64 table::TableBorder aTableBorder;
65 m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder;
66
67 switch ( m_LineType )
68 {
69 case XlBordersIndex::xlEdgeLeft:
70 aTableBorder.IsLeftLineValid = true;
71 aTableBorder.LeftLine= rBorderLine;
72 break;
73 case XlBordersIndex::xlEdgeTop:
74 aTableBorder.IsTopLineValid = true;
75 aTableBorder.TopLine = rBorderLine;
76 break;
77
78 case XlBordersIndex::xlEdgeBottom:
79 aTableBorder.IsBottomLineValid = true;
80 aTableBorder.BottomLine = rBorderLine;
81 break;
82 case XlBordersIndex::xlEdgeRight:
83 aTableBorder.IsRightLineValid = true;
84 aTableBorder.RightLine = rBorderLine;
85 break;
86 case XlBordersIndex::xlInsideVertical:
87 aTableBorder.IsVerticalLineValid = true;
88 aTableBorder.VerticalLine = rBorderLine;
89 break;
90 case XlBordersIndex::xlInsideHorizontal:
91 aTableBorder.IsHorizontalLineValid = true;
92 aTableBorder.HorizontalLine = rBorderLine;
93 break;
94 case XlBordersIndex::xlDiagonalDown:
95 case XlBordersIndex::xlDiagonalUp:
96 // #TODO have to ignore at the moment, would be
97 // nice to investigate what we can do here
98 break;
99 default:
100 return;
101 }
102 m_xProps->setPropertyValue( sTableBorder, uno::Any(aTableBorder) );
103 }
104
105 bool getBorderLine( table::BorderLine& rBorderLine )
106 {
107 table::TableBorder aTableBorder;
108 m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder;
109 switch ( m_LineType )
110 {
111 case XlBordersIndex::xlEdgeLeft:
112 if ( aTableBorder.IsLeftLineValid )
113 rBorderLine = aTableBorder.LeftLine;
114 break;
115 case XlBordersIndex::xlEdgeTop:
116 if ( aTableBorder.IsTopLineValid )
117 rBorderLine = aTableBorder.TopLine;
118 break;
119
120 case XlBordersIndex::xlEdgeBottom:
121 if ( aTableBorder.IsBottomLineValid )
122 rBorderLine = aTableBorder.BottomLine;
123 break;
124 case XlBordersIndex::xlEdgeRight:
125 if ( aTableBorder.IsRightLineValid )
126 rBorderLine = aTableBorder.RightLine;
127 break;
128 case XlBordersIndex::xlInsideVertical:
129 if ( aTableBorder.IsVerticalLineValid )
130 rBorderLine = aTableBorder.VerticalLine;
131 break;
132 case XlBordersIndex::xlInsideHorizontal:
133 if ( aTableBorder.IsHorizontalLineValid )
134 rBorderLine = aTableBorder.HorizontalLine;
135 break;
136
137 case XlBordersIndex::xlDiagonalDown:
138 case XlBordersIndex::xlDiagonalUp:
139 // #TODO have to ignore at the moment, would be
140 // nice to investigate what we can do here
141 break;
142 default:
143 return false;
144 }
145 return true;
146 }
147
148protected:
149 virtual OUString getServiceImplName() override
150 {
151 return "ScVbaBorder";
152 }
153 virtual css::uno::Sequence<OUString> getServiceNames() override
154 {
155 static uno::Sequence< OUString > const aServiceNames
156 {
157 "ooo.vba.excel.Border"
158 };
159 return aServiceNames;
160 }
161public:
162 ScVbaBorder( const uno::Reference< beans::XPropertySet > & xProps, const uno::Reference< uno::XComponentContext >& xContext, sal_Int32 lineType, const ScVbaPalette& rPalette) : ScVbaBorder_Base( uno::Reference< XHelperInterface >( xProps, uno::UNO_QUERY ), xContext ), m_xProps( xProps ), m_LineType( lineType ), m_Palette( rPalette ) {}
163
164 // XBorder
165 uno::Any SAL_CALL getColor() override
166 {
167 table::BorderLine aBorderLine;
168 if ( getBorderLine( aBorderLine ) )
169 return uno::Any( OORGBToXLRGB( Color(ColorTransparency, aBorderLine.Color) ) );
170 throw uno::RuntimeException("No Implementation available" );
171 }
172 void SAL_CALL setColor( const uno::Any& _color ) override
173 {
174 sal_Int32 nColor = 0;
175 _color >>= nColor;
176 table::BorderLine aBorderLine;
177 if ( !getBorderLine( aBorderLine ) )
178 throw uno::RuntimeException("No Implementation available" );
179
180 aBorderLine.Color = XLRGBToOORGB( nColor );
181 setBorderLine( aBorderLine );
182
183 }
184
185 uno::Any SAL_CALL getColorIndex() override
186 {
187 sal_Int32 nColor = 0;
188 XLRGBToOORGB( getColor() ) >>= nColor;
189 uno::Reference< container::XIndexAccess > xIndex = m_Palette.getPalette();
190 sal_Int32 nElems = xIndex->getCount();
191 sal_Int32 nIndex = -1;
192 for ( sal_Int32 count=0; count<nElems; ++count )
193 {
194 sal_Int32 nPaletteColor = 0;
195 xIndex->getByIndex( count ) >>= nPaletteColor;
196 if ( nPaletteColor == nColor )
197 {
198 nIndex = count + 1;
199 break;
200 }
201 }
202 return uno::Any(nIndex);
203 }
204
205 void SAL_CALL setColorIndex( const uno::Any& _colorindex ) override
206 {
207 sal_Int32 nColor = 0;
208 _colorindex >>= nColor;
209 if ( !nColor || nColor == XlColorIndex::xlColorIndexAutomatic )
210 nColor = 1;
211 setColor( OORGBToXLRGB( m_Palette.getPalette()->getByIndex( --nColor ) ) );
212 }
213 uno::Any SAL_CALL getWeight() override
214 {
215 table::BorderLine aBorderLine;
216 if ( getBorderLine( aBorderLine ) )
217 {
218 switch ( aBorderLine.OuterLineWidth )
219 {
220 case 0: // Thin = default OO thickness
221 case OOLineThin:
222 return uno::Any( XlBorderWeight::xlThin );
223 case OOLineMedium:
224 return uno::Any( XlBorderWeight::xlMedium );
225 case OOLineThick:
226 return uno::Any( XlBorderWeight::xlThick );
227 case OOLineHairline:
228 return uno::Any( XlBorderWeight::xlHairline );
229 default:
230 break;
231 }
232 }
233 throw uno::RuntimeException("Method failed" );
234 }
235 void SAL_CALL setWeight( const uno::Any& _weight ) override
236 {
237 sal_Int32 nWeight = 0;
238 _weight >>= nWeight;
239 table::BorderLine aBorderLine;
240 if ( !getBorderLine( aBorderLine ) )
241 throw uno::RuntimeException("Method failed" );
242
243 switch ( nWeight )
244 {
245 case XlBorderWeight::xlThin:
246 aBorderLine.OuterLineWidth = OOLineThin;
247 break;
248 case XlBorderWeight::xlMedium:
249 aBorderLine.OuterLineWidth = OOLineMedium;
250 break;
251 case XlBorderWeight::xlThick:
252 aBorderLine.OuterLineWidth = OOLineThick;
253 break;
254 case XlBorderWeight::xlHairline:
255 aBorderLine.OuterLineWidth = OOLineHairline;
256 break;
257 default:
258 throw uno::RuntimeException("Bad param" );
259 }
260 setBorderLine( aBorderLine );
261
262 }
263
264 void SAL_CALL setTintAndShade( const uno::Any& /*rAny*/ ) override
265 {
266 // TODO implement
267 }
268 uno::Any SAL_CALL getTintAndShade() override
269 {
270 // TODO implement
271 return uno::Any(static_cast<double>(0));
272 }
273
274 uno::Any SAL_CALL getLineStyle() override
275 {
276 // always return xlContinuous;
277 return uno::Any( XlLineStyle::xlContinuous );
278 }
279 void SAL_CALL setLineStyle( const uno::Any& _linestyle ) override
280 {
281 // Urk no choice but to silently ignore we don't support this attribute
282 // #TODO would be nice to support the excel line styles
283 sal_Int32 nLineStyle = 0;
284 _linestyle >>= nLineStyle;
285 table::BorderLine aBorderLine;
286 if ( !getBorderLine( aBorderLine ) )
287 throw uno::RuntimeException("Method failed" );
288
289 switch ( nLineStyle )
290 {
291 case XlLineStyle::xlContinuous:
292 case XlLineStyle::xlDash:
293 case XlLineStyle::xlDashDot:
294 case XlLineStyle::xlDashDotDot:
295 case XlLineStyle::xlDot:
296 case XlLineStyle::xlDouble:
297 case XlLineStyle::xlLineStyleNone:
298 case XlLineStyle::xlSlantDashDot:
299 break;
300 default:
301 throw uno::RuntimeException("Bad param" );
302 }
303 setBorderLine( aBorderLine );
304
305 }
306};
307
308class RangeBorders : public RangeBorders_Base
309{
310private:
311 uno::Reference< table::XCellRange > m_xRange;
312 uno::Reference< uno::XComponentContext > m_xContext;
313 ScVbaPalette m_Palette;
314 sal_Int32 getTableIndex( sal_Int32 nConst )
315 {
316 // okay return position of the index in the table
317 sal_Int32 nIndexes = getCount();
318 sal_Int32 realIndex = 0;
319 const sal_Int16* pTableEntry = supportedIndexTable;
320 for ( ; realIndex < nIndexes; ++realIndex, ++pTableEntry )
321 {
322 if ( *pTableEntry == nConst )
323 return realIndex;
324 }
325 return getCount(); // error condition
326 }
327public:
328 RangeBorders( uno::Reference< table::XCellRange > xRange, uno::Reference< uno::XComponentContext > xContext, const ScVbaPalette& rPalette ) : m_xRange(std::move( xRange )), m_xContext(std::move( xContext )), m_Palette( rPalette )
329 {
330 }
331 // XIndexAccess
332 virtual ::sal_Int32 SAL_CALL getCount( ) override
333 {
335 }
336 virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override
337 {
338
339 sal_Int32 nIndex = getTableIndex( Index );
340 if ( nIndex >= 0 && nIndex < getCount() )
341 {
342 uno::Reference< beans::XPropertySet > xProps( m_xRange, uno::UNO_QUERY_THROW );
343 return uno::Any( uno::Reference< excel::XBorder >( new ScVbaBorder( xProps, m_xContext, supportedIndexTable[ nIndex ], m_Palette )) );
344 }
345 throw lang::IndexOutOfBoundsException();
346 }
347 virtual uno::Type SAL_CALL getElementType( ) override
348 {
350 }
351 virtual sal_Bool SAL_CALL hasElements( ) override
352 {
353 return true;
354 }
355};
356
357}
358
359static uno::Reference< container::XIndexAccess >
360rangeToBorderIndexAccess( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, const ScVbaPalette& rPalette )
361{
362 return new RangeBorders( xRange, xContext, rPalette );
363}
364
365namespace {
366
367class RangeBorderEnumWrapper : public EnumerationHelper_BASE
368{
369 uno::Reference<container::XIndexAccess > m_xIndexAccess;
370 sal_Int32 m_nIndex;
371public:
372 explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), m_nIndex( 0 ) {}
373 virtual sal_Bool SAL_CALL hasMoreElements( ) override
374 {
375 return ( m_nIndex < m_xIndexAccess->getCount() );
376 }
377
378 virtual uno::Any SAL_CALL nextElement( ) override
379 {
380 if ( m_nIndex < m_xIndexAccess->getCount() )
381 return m_xIndexAccess->getByIndex( m_nIndex++ );
382 throw container::NoSuchElementException();
383 }
384};
385
386}
387
388ScVbaBorders::ScVbaBorders( const uno::Reference< XHelperInterface >& xParent,
389 const uno::Reference< uno::XComponentContext > & xContext,
390 const uno::Reference< table::XCellRange >& xRange,
391 const ScVbaPalette& rPalette )
392 : ScVbaBorders_BASE( xParent, xContext, rangeToBorderIndexAccess( xRange ,xContext, rPalette ) ), bRangeIsSingleCell( false )
393{
394 uno::Reference< table::XColumnRowRange > xColumnRowRange(xRange, uno::UNO_QUERY_THROW );
395 if ( xColumnRowRange->getRows()->getCount() == 1 && xColumnRowRange->getColumns()->getCount() == 1 )
396 bRangeIsSingleCell = true;
397 m_xProps.set( xRange, uno::UNO_QUERY_THROW );
398}
399
400uno::Reference< container::XEnumeration >
402{
403 return new RangeBorderEnumWrapper( m_xIndexAccess );
404}
405
407ScVbaBorders::createCollectionObject( const css::uno::Any& aSource )
408{
409 return aSource; // it's already a Border object
410}
411
414{
416}
417
419ScVbaBorders::getItemByIntIndex( const sal_Int32 nIndex )
420{
421 return createCollectionObject( m_xIndexAccess->getByIndex( nIndex ) );
422}
423
425{
426 sal_Int32 count = getCount();
428 for( sal_Int32 i = 0; i < count ; i++ )
429 {
430 if( XlBordersIndex::xlDiagonalDown != supportedIndexTable[i] && XlBordersIndex::xlDiagonalUp != supportedIndexTable[i] )
431 {
432 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
433 if( color.hasValue() )
434 {
435 if( color != xBorder->getColor() )
436 return uno::Any( uno::Reference< uno::XInterface >() );
437 }
438 else
439 color = xBorder->getColor();
440 }
441 }
442 return color;
443}
444void SAL_CALL ScVbaBorders::setColor( const uno::Any& _color )
445{
446 sal_Int32 count = getCount();
447 for( sal_Int32 i = 0; i < count ; i++ )
448 {
449 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
450 xBorder->setColor( _color );
451 }
452}
454{
455 sal_Int32 count = getCount();
456 uno::Any nColorIndex;
457 for( sal_Int32 i = 0; i < count ; i++ )
458 {
459 if( XlBordersIndex::xlDiagonalDown != supportedIndexTable[i] && XlBordersIndex::xlDiagonalUp != supportedIndexTable[i] )
460 {
461 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
462 if( nColorIndex.hasValue() )
463 {
464 if( nColorIndex != xBorder->getColorIndex() )
465 return uno::Any( uno::Reference< uno::XInterface >() );
466 }
467 else
468 nColorIndex = xBorder->getColorIndex();
469 }
470 }
471 return nColorIndex;
472}
473void SAL_CALL ScVbaBorders::setColorIndex( const uno::Any& _colorindex )
474{
475 sal_Int32 count = getCount();
476 for( sal_Int32 i = 0; i < count ; i++ )
477 {
478 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
479 xBorder->setColorIndex( _colorindex );
480 }
481}
482
483static bool
484lcl_areAllLineWidthsSame( const table::TableBorder& maTableBorder, bool bIsCell )
485{
486
487 bool bRes = false;
488 if (bIsCell)
489 {
490 bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) &&
491(maTableBorder.TopLine.OuterLineWidth == maTableBorder.LeftLine.OuterLineWidth) &&
492(maTableBorder.TopLine.OuterLineWidth == maTableBorder.RightLine.OuterLineWidth));
493 }
494 else
495 {
496 bRes = ((maTableBorder.TopLine.OuterLineWidth == maTableBorder.BottomLine.OuterLineWidth) &&
497(maTableBorder.TopLine.OuterLineWidth == maTableBorder.LeftLine.OuterLineWidth) &&
498(maTableBorder.TopLine.OuterLineWidth == maTableBorder.HorizontalLine.OuterLineWidth) &&
499(maTableBorder.TopLine.OuterLineWidth == maTableBorder.VerticalLine.OuterLineWidth) &&
500(maTableBorder.TopLine.OuterLineWidth == maTableBorder.RightLine.OuterLineWidth));
501 }
502 return bRes;
503}
504
506{
507 table::TableBorder aTableBorder;
508 m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder;
509
510 sal_Int32 aLinestyle = XlLineStyle::xlLineStyleNone;
511
512 if ( lcl_areAllLineWidthsSame( aTableBorder, bRangeIsSingleCell ))
513 {
514 if (aTableBorder.TopLine.LineDistance != 0)
515 {
516 aLinestyle = XlLineStyle::xlDouble;
517 }
518 else if ( aTableBorder.TopLine.OuterLineWidth != 0 )
519 {
520 aLinestyle = XlLineStyle::xlContinuous;
521 }
522 }
523 return uno::Any( aLinestyle );
524}
525void SAL_CALL ScVbaBorders::setLineStyle( const uno::Any& _linestyle )
526{
527 sal_Int32 count = getCount();
528 for( sal_Int32 i = 0; i < count ; i++ )
529 {
530 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
531 xBorder->setLineStyle( _linestyle );
532 }
533}
535{
536 sal_Int32 count = getCount();
537 uno::Any weight;
538 for( sal_Int32 i = 0; i < count ; i++ )
539 {
540 if( XlBordersIndex::xlDiagonalDown != supportedIndexTable[i] && XlBordersIndex::xlDiagonalUp != supportedIndexTable[i] )
541 {
542 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
543 if( weight.hasValue() )
544 {
545 if( weight != xBorder->getWeight() )
546 return uno::Any( uno::Reference< uno::XInterface >() );
547 }
548 else
549 weight = xBorder->getWeight();
550 }
551 }
552 return weight;
553}
554
556{
557 // TODO implement
558 return uno::Any(static_cast<double>(0));
559}
560
561void SAL_CALL ScVbaBorders::setTintAndShade(const uno::Any& /*rAny*/)
562{
563 // TODO implement
564}
565
566void SAL_CALL ScVbaBorders::setWeight( const uno::Any& _weight )
567{
568 sal_Int32 count = getCount();
569 for( sal_Int32 i = 0; i < count ; i++ )
570 {
571 uno::Reference< XBorder > xBorder( getItemByIntIndex( supportedIndexTable[i] ), uno::UNO_QUERY_THROW );
572 xBorder->setWeight( _weight );
573 }
574}
575
576OUString
578{
579 return "ScVbaBorders";
580}
581
582uno::Sequence< OUString >
584{
585 static uno::Sequence< OUString > const aServiceNames
586 {
587 "ooo.vba.excel.Borders"
588 };
589 return aServiceNames;
590}
591
592/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
Reference< XPropertySet > m_xProps
Reference< XComponentContext > m_xContext
virtual css::uno::Sequence< OUString > getServiceNames()=0
virtual css::uno::Any SAL_CALL getColorIndex() override
Definition: vbaborders.cxx:453
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: vbaborders.cxx:401
virtual css::uno::Any getItemByIntIndex(const sal_Int32 nIndex) override
Definition: vbaborders.cxx:419
virtual css::uno::Any SAL_CALL getLineStyle() override
Definition: vbaborders.cxx:505
ScVbaBorders(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::table::XCellRange > &xRange, const ScVbaPalette &rPalette)
Definition: vbaborders.cxx:388
virtual css::uno::Any SAL_CALL getWeight() override
Definition: vbaborders.cxx:534
virtual OUString getServiceImplName() override
Definition: vbaborders.cxx:577
virtual css::uno::Any SAL_CALL getTintAndShade() override
Definition: vbaborders.cxx:555
virtual css::uno::Type SAL_CALL getElementType() override
Definition: vbaborders.cxx:413
virtual void SAL_CALL setTintAndShade(const css::uno::Any &) override
Definition: vbaborders.cxx:561
css::uno::Reference< css::beans::XPropertySet > m_xProps
Definition: vbaborders.hxx:36
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
Definition: vbaborders.cxx:407
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbaborders.cxx:583
virtual void SAL_CALL setWeight(const css::uno::Any &) override
Definition: vbaborders.cxx:566
virtual css::uno::Any SAL_CALL getColor() override
Definition: vbaborders.cxx:424
virtual void SAL_CALL setColor(const css::uno::Any &_color) override
Definition: vbaborders.cxx:444
virtual void SAL_CALL setLineStyle(const css::uno::Any &_linestyle) override
Definition: vbaborders.cxx:525
virtual void SAL_CALL setColorIndex(const css::uno::Any &_colorindex) override
Definition: vbaborders.cxx:473
bool bRangeIsSingleCell
Definition: vbaborders.hxx:35
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
virtual ::sal_Int32 SAL_CALL getCount() override
css::uno::Reference< css::container::XIndexAccess > getPalette() const
Definition: vbapalette.cxx:100
css::uno::Type const & get()
ColorTransparency
float u
Sequence< OUString > aServiceNames
sal_Int32 nIndex
#define SAL_N_ELEMENTS(arr)
int i
sal_Int32 XLRGBToOORGB(sal_Int32 nCol)
sal_Int32 OORGBToXLRGB(sal_Int32 nCol)
bool hasValue()
unsigned char sal_Bool
constexpr OUStringLiteral sTableBorder
Definition: vbaborders.cxx:46
const sal_Int32 OOLineMedium
Definition: vbaborders.cxx:50
const sal_Int32 OOLineThin
Definition: vbaborders.cxx:49
::cppu::WeakImplHelper< container::XIndexAccess > RangeBorders_Base
Definition: vbaborders.cxx:39
static bool lcl_areAllLineWidthsSame(const table::TableBorder &maTableBorder, bool bIsCell)
Definition: vbaborders.cxx:484
const sal_Int32 OOLineHairline
Definition: vbaborders.cxx:52
const sal_Int16 supportedIndexTable[]
Definition: vbaborders.cxx:44
static uno::Reference< container::XIndexAccess > rangeToBorderIndexAccess(const uno::Reference< table::XCellRange > &xRange, const uno::Reference< uno::XComponentContext > &xContext, const ScVbaPalette &rPalette)
Definition: vbaborders.cxx:360
InheritedHelperInterfaceWeakImpl< excel::XBorder > ScVbaBorder_Base
Definition: vbaborders.cxx:40
const sal_Int32 OOLineThick
Definition: vbaborders.cxx:51
::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper_BASE