LibreOffice Module oox (master)  1
tablecell.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 
22 #include <basegfx/color/bcolor.hxx>
24 #include <drawingml/textbody.hxx>
25 #include <oox/drawingml/theme.hxx>
28 #include <oox/token/properties.hxx>
29 #include <oox/token/tokens.hxx>
30 #include <tools/color.hxx>
31 #include <com/sun/star/table/BorderLineStyle.hpp>
32 #include <com/sun/star/table/BorderLine2.hpp>
33 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
34 #include <com/sun/star/text/XText.hpp>
35 #include <com/sun/star/text/WritingMode.hpp>
36 
37 using namespace ::oox::core;
38 using namespace ::com::sun::star;
39 using namespace ::com::sun::star::uno;
40 using namespace ::com::sun::star::beans;
41 using ::com::sun::star::table::BorderLine2;
42 
43 namespace oox::drawingml::table {
44 
46 : mpTextBody( std::make_shared<TextBody>() )
47 , mnRowSpan ( 1 )
48 , mnGridSpan( 1 )
49 , mbhMerge( false )
50 , mbvMerge( false )
51 , mnMarL( 91440 )
52 , mnMarR( 91440 )
53 , mnMarT( 45720 )
54 , mnMarB( 45720 )
55 , mnVertToken( XML_horz )
56 , mnAnchorToken( XML_t )
57 , mbAnchorCtr( false )
58 , mnHorzOverflowToken( XML_clip )
59 {
60 }
61 
62 static void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
63  Reference< XPropertySet > const & rxPropSet, oox::drawingml::LineProperties const & rLineProperties,
64  sal_Int32 nPropId )
65 {
66  BorderLine2 aBorderLine;
67  if ( rLineProperties.maLineFill.moFillType.differsFrom( XML_noFill ))
68  {
69  Color aColor = rLineProperties.maLineFill.getBestSolidColor();
70  aBorderLine.Color = sal_Int32(aColor.getColor( rFilterBase.getGraphicHelper() ));
71  aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
72  aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
73  aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
74  aBorderLine.LineDistance = 0;
75  }
76  else if ( rLineProperties.moLineWidth.get(0)!=0 )
77  {
78  aBorderLine.Color = sal_Int32( COL_AUTO );
79  aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
80  aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
81  aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
82  aBorderLine.LineDistance = 0;
83  }
84 
85  if ( rLineProperties.moPresetDash.has() )
86  {
87  switch ( rLineProperties.moPresetDash.get() )
88  {
89  case XML_dot:
90  case XML_sysDot:
91  aBorderLine.LineStyle = ::table::BorderLineStyle::DOTTED;
92  break;
93  case XML_dash:
94  case XML_lgDash:
95  case XML_sysDash:
96  aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
97  break;
98  case XML_dashDot:
99  case XML_lgDashDot:
100  case XML_sysDashDot:
101  aBorderLine.LineStyle = ::table::BorderLineStyle::DASH_DOT;
102  break;
103  case XML_lgDashDotDot:
104  case XML_sysDashDotDot:
105  aBorderLine.LineStyle = ::table::BorderLineStyle::DASH_DOT_DOT;
106  break;
107  case XML_solid:
108  aBorderLine.LineStyle = ::table::BorderLineStyle::SOLID;
109  break;
110  default:
111  aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
112  break;
113  }
114  }
115  else if ( !rLineProperties.maCustomDash.empty() )
116  {
117  aBorderLine.LineStyle = ::table::BorderLineStyle::DASHED;
118  }
119  else
120  {
121  aBorderLine.LineStyle = ::table::BorderLineStyle::NONE;
122  }
123 
124  PropertySet aPropSet( rxPropSet );
125  aPropSet.setProperty( nPropId, aBorderLine );
126 }
127 
128 static void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableStylePart& rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties& rLineProperties )
129 {
130  std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rPartLineBorders( rTableStylePart.getLineBorders() );
131  ::oox::drawingml::ShapeStyleRef& rLineStyleRef = rTableStylePart.getStyleRefs()[ nLineType ];
132  std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >::const_iterator aIter( rPartLineBorders.find( nLineType ) );
133  if ( ( aIter != rPartLineBorders.end() ) && aIter->second )
134  rLineProperties.assignUsed( *aIter->second );
135  else if (rLineStyleRef.mnThemedIdx != 0)
136  {
137  if (const Theme* pTheme = rFilterBase.getCurrentTheme())
138  {
139  rLineProperties.assignUsed( *pTheme->getLineStyle(rLineStyleRef.mnThemedIdx) );
140  ::Color nPhClr = rLineStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() );
141  rLineProperties.maLineFill.maFillColor.setSrgbClr( nPhClr );
142  }
143  }
144 }
145 
146 static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
147  oox::drawingml::FillProperties& rFillProperties,
148  TextCharacterProperties& aTextCharProps,
149  oox::drawingml::LineProperties& rLeftBorder,
150  oox::drawingml::LineProperties& rRightBorder,
151  oox::drawingml::LineProperties& rTopBorder,
152  oox::drawingml::LineProperties& rBottomBorder,
153  oox::drawingml::LineProperties& rTopLeftToBottomRightBorder,
154  oox::drawingml::LineProperties& rBottomLeftToTopRightBorder,
155  TableStylePart& rTableStylePart )
156 {
157  ::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() );
158  if ( rPartFillPropertiesPtr )
159  rFillProperties.assignUsed( *rPartFillPropertiesPtr );
160  else
161  {
162  ::oox::drawingml::ShapeStyleRef& rFillStyleRef = rTableStylePart.getStyleRefs()[ XML_fillRef ];
163  const Theme* pTheme = rFilterBase.getCurrentTheme();
164  if (pTheme && rFillStyleRef.mnThemedIdx != 0 )
165  {
166  rFillProperties.assignUsed( *pTheme->getFillStyle( rFillStyleRef.mnThemedIdx ) );
167  ::Color nPhClr = rFillStyleRef.maPhClr.getColor( rFilterBase.getGraphicHelper() );
168  rFillProperties.maFillColor.setSrgbClr( nPhClr );
169  }
170  }
171 
172  applyBorder( rFilterBase, rTableStylePart, XML_left, rLeftBorder );
173  applyBorder( rFilterBase, rTableStylePart, XML_right, rRightBorder );
174  applyBorder( rFilterBase, rTableStylePart, XML_top, rTopBorder );
175  applyBorder( rFilterBase, rTableStylePart, XML_bottom, rBottomBorder );
176  applyBorder( rFilterBase, rTableStylePart, XML_tl2br, rTopLeftToBottomRightBorder );
177  applyBorder( rFilterBase, rTableStylePart, XML_tr2bl, rBottomLeftToTopRightBorder );
178 
179  aTextCharProps.maLatinFont = rTableStylePart.getLatinFont();
180  aTextCharProps.maAsianFont = rTableStylePart.getAsianFont();
181  aTextCharProps.maComplexFont = rTableStylePart.getComplexFont();
182  aTextCharProps.maSymbolFont = rTableStylePart.getSymbolFont();
183  if ( rTableStylePart.getTextColor().isUsed() )
184  {
185  aTextCharProps.maFillProperties.maFillColor = rTableStylePart.getTextColor();
186  aTextCharProps.maFillProperties.moFillType.set(XML_solidFill);
187  }
188  if( rTableStylePart.getTextBoldStyle() )
189  aTextCharProps.moBold = *rTableStylePart.getTextBoldStyle();
190  if( rTableStylePart.getTextItalicStyle() )
191  aTextCharProps.moItalic = *rTableStylePart.getTextItalicStyle();
192 }
193 
194 static void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, const TableCell& rTableCell )
195 {
196  Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
197  xPropSet->setPropertyValue( "TextUpperDistance", Any( static_cast< sal_Int32 >( rTableCell.getTopMargin() / 360 ) ) );
198  xPropSet->setPropertyValue( "TextRightDistance", Any( static_cast< sal_Int32 >( rTableCell.getRightMargin() / 360 ) ) );
199  xPropSet->setPropertyValue( "TextLeftDistance", Any( static_cast< sal_Int32 >( rTableCell.getLeftMargin() / 360 ) ) );
200  xPropSet->setPropertyValue( "TextLowerDistance", Any( static_cast< sal_Int32 >( rTableCell.getBottomMargin() / 360 ) ) );
201 
202  drawing::TextVerticalAdjust eVA;
203  switch( rTableCell.getAnchorToken() )
204  {
205  case XML_ctr: eVA = drawing::TextVerticalAdjust_CENTER; break;
206  case XML_b: eVA = drawing::TextVerticalAdjust_BOTTOM; break;
207  case XML_just:
208  case XML_dist:
209  default:
210  case XML_t: eVA = drawing::TextVerticalAdjust_TOP; break;
211  }
212  xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
213 }
214 
215 void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
216  const css::uno::Reference < css::table::XCell >& rxCell, const TableProperties& rTableProperties,
217  const TableStyle& rTableStyle, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow )
218 {
219  TableStyle& rTable( const_cast< TableStyle& >( rTableStyle ) );
220  TableProperties& rProperties( const_cast< TableProperties& >( rTableProperties ) );
221 
222  Reference< text::XText > xText( rxCell, UNO_QUERY_THROW );
223  Reference< text::XTextCursor > xAt = xText->createTextCursor();
224 
225  applyTableCellProperties( rxCell, *this );
226  TextCharacterProperties aTextStyleProps;
227  xAt->gotoStart( true );
228  xAt->gotoEnd( true );
229 
230  Reference< XPropertySet > xPropSet( rxCell, UNO_QUERY_THROW );
231  oox::drawingml::FillProperties aFillProperties;
232  oox::drawingml::LineProperties aLinePropertiesLeft;
233  oox::drawingml::LineProperties aLinePropertiesRight;
234  oox::drawingml::LineProperties aLinePropertiesTop;
235  oox::drawingml::LineProperties aLinePropertiesBottom;
236  oox::drawingml::LineProperties aLinePropertiesTopLeftToBottomRight;
237  oox::drawingml::LineProperties aLinePropertiesBottomLeftToTopRight;
238 
239  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
240  aLinePropertiesLeft,
241  aLinePropertiesRight,
242  aLinePropertiesTop,
243  aLinePropertiesBottom,
244  aLinePropertiesTopLeftToBottomRight,
245  aLinePropertiesBottomLeftToTopRight,
246  rTable.getWholeTbl() );
247 
248  if ( rProperties.isFirstRow() && ( nRow == 0 ) )
249  {
250  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
251  aLinePropertiesLeft,
252  aLinePropertiesRight,
253  aLinePropertiesTop,
254  aLinePropertiesBottom,
255  aLinePropertiesTopLeftToBottomRight,
256  aLinePropertiesBottomLeftToTopRight,
257  rTable.getFirstRow() );
258  }
259  if ( rProperties.isLastRow() && ( nRow == nMaxRow ) )
260  {
261  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
262  aLinePropertiesLeft,
263  aLinePropertiesRight,
264  aLinePropertiesTop,
265  aLinePropertiesBottom,
266  aLinePropertiesTopLeftToBottomRight,
267  aLinePropertiesBottomLeftToTopRight,
268  rTable.getLastRow() );
269  }
270  if ( rProperties.isFirstCol() && ( nColumn == 0 ) )
271  {
272  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
273  aLinePropertiesLeft,
274  aLinePropertiesRight,
275  aLinePropertiesTop,
276  aLinePropertiesBottom,
277  aLinePropertiesTopLeftToBottomRight,
278  aLinePropertiesBottomLeftToTopRight,
279  rTable.getFirstCol() );
280  }
281  if ( rProperties.isLastCol() && ( nColumn == nMaxColumn ) )
282  {
283  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
284  aLinePropertiesLeft,
285  aLinePropertiesRight,
286  aLinePropertiesTop,
287  aLinePropertiesBottom,
288  aLinePropertiesTopLeftToBottomRight,
289  aLinePropertiesBottomLeftToTopRight,
290  rTable.getLastCol() );
291  }
292  if ( rProperties.isBandRow() )
293  {
294  if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) &&
295  ( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) &&
296  ( !rProperties.isFirstCol() || ( nColumn != 0 ) ) &&
297  ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) )
298  {
299  sal_Int32 nBand = nRow;
300  if ( rProperties.isFirstRow() )
301  nBand++;
302  if ( nBand & 1 )
303  {
304  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
305  aLinePropertiesLeft,
306  aLinePropertiesRight,
307  aLinePropertiesTop,
308  aLinePropertiesBottom,
309  aLinePropertiesTopLeftToBottomRight,
310  aLinePropertiesBottomLeftToTopRight,
311  rTable.getBand2H() );
312  }
313  else
314  {
315  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
316  aLinePropertiesLeft,
317  aLinePropertiesRight,
318  aLinePropertiesTop,
319  aLinePropertiesBottom,
320  aLinePropertiesTopLeftToBottomRight,
321  aLinePropertiesBottomLeftToTopRight,
322  rTable.getBand1H() );
323  }
324  }
325  }
326  if ( ( nRow == 0 ) && ( nColumn == 0 ) )
327  {
328  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
329  aLinePropertiesLeft,
330  aLinePropertiesRight,
331  aLinePropertiesTop,
332  aLinePropertiesBottom,
333  aLinePropertiesTopLeftToBottomRight,
334  aLinePropertiesBottomLeftToTopRight,
335  rTable.getNwCell() );
336  }
337  if ( ( nRow == nMaxRow ) && ( nColumn == 0 ) )
338  {
339  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
340  aLinePropertiesLeft,
341  aLinePropertiesRight,
342  aLinePropertiesTop,
343  aLinePropertiesBottom,
344  aLinePropertiesTopLeftToBottomRight,
345  aLinePropertiesBottomLeftToTopRight,
346  rTable.getSwCell() );
347  }
348  if ( ( nRow == 0 ) && ( nColumn == nMaxColumn ) )
349  {
350  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
351  aLinePropertiesLeft,
352  aLinePropertiesRight,
353  aLinePropertiesTop,
354  aLinePropertiesBottom,
355  aLinePropertiesTopLeftToBottomRight,
356  aLinePropertiesBottomLeftToTopRight,
357  rTable.getNeCell() );
358  }
359  if ( ( nRow == nMaxRow ) && ( nColumn == nMaxColumn ) )
360  {
361  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
362  aLinePropertiesLeft,
363  aLinePropertiesRight,
364  aLinePropertiesTop,
365  aLinePropertiesBottom,
366  aLinePropertiesTopLeftToBottomRight,
367  aLinePropertiesBottomLeftToTopRight,
368  rTable.getSeCell() );
369  }
370  if ( rProperties.isBandCol() )
371  {
372  if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) &&
373  ( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) &&
374  ( !rProperties.isFirstCol() || ( nColumn != 0 ) ) &&
375  ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) )
376  {
377  sal_Int32 nBand = nColumn;
378  if ( rProperties.isFirstCol() )
379  nBand++;
380  if ( nBand & 1 )
381  {
382  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
383  aLinePropertiesLeft,
384  aLinePropertiesRight,
385  aLinePropertiesTop,
386  aLinePropertiesBottom,
387  aLinePropertiesTopLeftToBottomRight,
388  aLinePropertiesBottomLeftToTopRight,
389  rTable.getBand2V() );
390  }
391  else
392  {
393  applyTableStylePart( rFilterBase, aFillProperties, aTextStyleProps,
394  aLinePropertiesLeft,
395  aLinePropertiesRight,
396  aLinePropertiesTop,
397  aLinePropertiesBottom,
398  aLinePropertiesTopLeftToBottomRight,
399  aLinePropertiesBottomLeftToTopRight,
400  rTable.getBand1V() );
401  }
402  }
403  }
404  aLinePropertiesLeft.assignUsed( maLinePropertiesLeft );
405  aLinePropertiesRight.assignUsed( maLinePropertiesRight );
406  aLinePropertiesTop.assignUsed( maLinePropertiesTop );
407  aLinePropertiesBottom.assignUsed( maLinePropertiesBottom );
408  aLinePropertiesTopLeftToBottomRight.assignUsed( maLinePropertiesTopLeftToBottomRight );
409  aLinePropertiesBottomLeftToTopRight.assignUsed( maLinePropertiesBottomLeftToTopRight );
410  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesLeft, PROP_LeftBorder );
411  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesRight, PROP_RightBorder );
412  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTop, PROP_TopBorder );
413  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesBottom, PROP_BottomBorder );
414  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesTopLeftToBottomRight, PROP_DiagonalTLBR );
415  applyLineAttributes( rFilterBase, xPropSet, aLinePropertiesBottomLeftToTopRight, PROP_DiagonalBLTR );
416 
417  if (rProperties.getBgColor().isUsed() && !maFillProperties.maFillColor.isUsed() && maFillProperties.moFillType.get() == XML_noFill)
418  {
419  maFillProperties.moFillType = XML_solidFill;
420  maFillProperties.maFillColor = rProperties.getBgColor();
421  }
422 
423  aFillProperties.assignUsed( maFillProperties );
424  ShapePropertyMap aPropMap( rFilterBase.getModelObjectHelper() );
425 
426  Color aBgColor;
427  ::Color nPhClr = API_RGB_TRANSPARENT;
428  std::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() );
429  ::oox::drawingml::ShapeStyleRef& rBackgroundFillStyle( rTable.getBackgroundFillStyleRef() );
430  if (rBackgroundFillPropertiesPtr)
431  aBgColor = rBackgroundFillPropertiesPtr->getBestSolidColor();
432  else if (rBackgroundFillStyle.mnThemedIdx != 0)
433  {
434  if (const Theme* pTheme = rFilterBase.getCurrentTheme())
435  {
436  aBgColor = pTheme->getFillStyle(rBackgroundFillStyle.mnThemedIdx)->getBestSolidColor();
437  nPhClr = rBackgroundFillStyle.maPhClr.getColor(rFilterBase.getGraphicHelper());
438  }
439  }
440  if (aBgColor.isUsed())
441  {
442  const Color& rCellColor = aFillProperties.getBestSolidColor();
443  const double fTransparency = rCellColor.isUsed() ? 0.01 * rCellColor.getTransparency() : 1.0;
444  ::Color nBgColor( aBgColor.getColor(rFilterBase.getGraphicHelper(), nPhClr) );
445  ::Color nCellColor( rCellColor.getColor(rFilterBase.getGraphicHelper()) );
446  ::Color aResult( basegfx::interpolate(nBgColor.getBColor(), nCellColor.getBColor(), 1.0 - fTransparency) );
447  aFillProperties.maFillColor.clearTransformations();
448  aFillProperties.maFillColor.setSrgbClr(sal_Int32(aResult.GetRGBColor()));
449  aFillProperties.moFillType.set(XML_solidFill);
450  }
451  if (!aFillProperties.moFillType.has())
452  aFillProperties.moFillType.set(XML_noFill);
453 
454  // TODO: phClr?
455  aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper() );
456  PropertySet( xPropSet ).setProperties( aPropMap );
457 
458  if ( getVertToken() == XML_eaVert )
459  {
460  xPropSet->setPropertyValue("TextWritingMode", Any(css::text::WritingMode_TB_RL));
461  }
462 
463  getTextBody()->insertAt( rFilterBase, xText, xAt, aTextStyleProps, pMasterTextListStyle );
464 
465  if (getVertToken() == XML_vert)
466  xPropSet->setPropertyValue("RotateAngle", Any(short(27000)));
467  else if (getVertToken() == XML_vert270)
468  xPropSet->setPropertyValue("RotateAngle", Any(short(9000)));
469 }
470 
471 }
472 
473 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
::oox::drawingml::FillPropertiesPtr & getBackgroundFillProperties()
Definition: tablestyle.hxx:40
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
Transparent color for API calls.
::oox::drawingml::ShapeStyleRefMap & getStyleRefs()
std::shared_ptr< FillProperties > FillPropertiesPtr
OptValue< sal_Int32 > moFillType
::oox::drawingml::Color & getTextColor()
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
Color getBestSolidColor() const
Tries to resolve current settings to a solid color, e.g.
OptValue< sal_Int32 > moPresetDash
Line width (EMUs).
std::shared_ptr< T > make_shared(Args &&...args)
oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight
Definition: tablecell.hxx:85
void setProperties(const css::uno::Sequence< OUString > &rPropNames, const css::uno::Sequence< css::uno::Any > &rValues)
Puts the passed properties into the property set.
static void applyLineAttributes(const ::oox::core::XmlFilterBase &rFilterBase, Reference< XPropertySet > const &rxPropSet, oox::drawingml::LineProperties const &rLineProperties, sal_Int32 nPropId)
Definition: tablecell.cxx:62
sal_Int32 getAnchorToken() const
Definition: tablecell.hxx:62
void set(const Type &rValue)
Definition: helper.hxx:188
oox::drawingml::LineProperties maLinePropertiesTop
Definition: tablecell.hxx:83
const Type & get() const
Definition: helper.hxx:185
oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight
Definition: tablecell.hxx:86
sal_Int32 getTopMargin() const
Definition: tablecell.hxx:56
oox::drawingml::LineProperties maLinePropertiesRight
Definition: tablecell.hxx:82
::Color getColor(const GraphicHelper &rGraphicHelper,::Color nPhClr=API_RGB_TRANSPARENT) const
Returns the final RGB color value.
Definition: color.cxx:481
void clearTransformations()
Removes all color transformations.
Definition: color.cxx:361
bool isUsed() const
Returns true, if the color is initialized.
Definition: color.hxx:87
oox::drawingml::LineProperties maLinePropertiesBottom
Definition: tablecell.hxx:84
sal_Int32 getVertToken() const
Definition: tablecell.hxx:60
::std::optional< bool > & getTextBoldStyle()
std::map< sal_Int32,::oox::drawingml::LinePropertiesPtr > & getLineBorders()
sal_Int32 getLeftMargin() const
Definition: tablecell.hxx:52
A wrapper for a UNO property set.
Definition: propertyset.hxx:57
void pushToPropMap(ShapePropertyMap &rPropMap, const GraphicHelper &rGraphicHelper, sal_Int32 nShapeRotation=0,::Color nPhClr=API_RGB_TRANSPARENT, bool bFlipH=false, bool bFlipV=false, bool bIsCustomShape=false) const
Writes the properties to the passed property map.
oox::drawingml::LineProperties maLinePropertiesLeft
Definition: tablecell.hxx:81
::std::optional< bool > & getTextItalicStyle()
TableStylePart & getWholeTbl()
Definition: tablestyle.hxx:42
sal_Int32 getBottomMargin() const
Definition: tablecell.hxx:58
::oox::drawingml::TextFont & getSymbolFont()
::oox::drawingml::TextFont & getComplexFont()
::oox::drawingml::ShapeStyleRef & getBackgroundFillStyleRef()
Definition: tablestyle.hxx:38
static void applyBorder(const ::oox::core::XmlFilterBase &rFilterBase, TableStylePart &rTableStylePart, sal_Int32 nLineType, oox::drawingml::LineProperties &rLineProperties)
Definition: tablecell.cxx:128
std::shared_ptr< TextListStyle > TextListStylePtr
sal_Int32 mnRowSpan
TableStylePart & getFirstRow()
Definition: tablestyle.hxx:52
sal_Int32 GetCoordinate(sal_Int32 nValue)
converts EMUs into 1/100th mmm
static void applyTableCellProperties(const Reference< css::table::XCell > &rxCell, const TableCell &rTableCell)
Definition: tablecell.cxx:194
FillProperties maLineFill
End line arrow style.
void setSrgbClr(sal_Int32 nRgb)
Sets an RGB value (hexadecimal RRGGBB) from the a:srgbClr element.
Definition: color.cxx:260
const oox::drawingml::TextBodyPtr & getTextBody() const
Definition: tablecell.hxx:68
::oox::drawingml::FillPropertiesPtr & getFillProperties()
sal_Int16 getTransparency() const
Returns the transparency of the color (0 = opaque, 100 = full transparent).
Definition: color.cxx:658
::oox::drawingml::TextFont & getAsianFont()
static void applyTableStylePart(const ::oox::core::XmlFilterBase &rFilterBase, oox::drawingml::FillProperties &rFillProperties, TextCharacterProperties &aTextCharProps, oox::drawingml::LineProperties &rLeftBorder, oox::drawingml::LineProperties &rRightBorder, oox::drawingml::LineProperties &rTopBorder, oox::drawingml::LineProperties &rBottomBorder, oox::drawingml::LineProperties &rTopLeftToBottomRightBorder, oox::drawingml::LineProperties &rBottomLeftToTopRightBorder, TableStylePart &rTableStylePart)
Definition: tablecell.cxx:146
void assignUsed(const FillProperties &rSourceProps)
Properties for bitmap fills.
sal_Int32 getRightMargin() const
Definition: tablecell.hxx:54
Color maFillColor
Fill type (OOXML token).
void assignUsed(const LineProperties &rSourceProps)
Line joint type (OOXML token).
OptValue< sal_Int32 > moLineWidth
User-defined line dash style.
TableStylePart & getFirstCol()
Definition: tablestyle.hxx:48
oox::drawingml::FillProperties maFillProperties
Definition: tablecell.hxx:88
DashStopVector maCustomDash
Line fill (solid, gradient, ...).
bool has() const
Definition: helper.hxx:181
const FillProperties * getFillStyle(sal_Int32 nIndex) const
Returns the fill properties of the passed one-based themed style index.
Definition: theme.cxx:45
bool setProperty(sal_Int32 nPropId, const Type &rValue)
Puts the passed value into the property set.
B2DTuple interpolate(const B2DTuple &rOld1, const B2DTuple &rOld2, double t)
bool differsFrom(const Type &rValue) const
Definition: helper.hxx:183
::oox::drawingml::TextFont & getLatinFont()
void pushToXCell(const ::oox::core::XmlFilterBase &rFilterBase, const ::oox::drawingml::TextListStylePtr &pMasterTextListStyle, const css::uno::Reference< css::table::XCell > &rxCell, const TableProperties &rTableProperties, const TableStyle &rTable, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow)
Definition: tablecell.cxx:215