diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:27:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 09:27:54 +0000 |
commit | adb203bc05e3e36173cbd46b9951f79821a81799 (patch) | |
tree | 6e6739df9b3f0a567330a0dd7ee0e03ae70876a3 /oox/source/drawingml/table | |
parent | Adding debian version 4:24.2.0-3. (diff) | |
download | libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.tar.xz libreoffice-adb203bc05e3e36173cbd46b9951f79821a81799.zip |
Merging upstream version 4:24.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'oox/source/drawingml/table')
-rw-r--r-- | oox/source/drawingml/table/predefined-table-styles.cxx | 20 | ||||
-rw-r--r-- | oox/source/drawingml/table/tablecell.cxx | 12 |
2 files changed, 28 insertions, 4 deletions
diff --git a/oox/source/drawingml/table/predefined-table-styles.cxx b/oox/source/drawingml/table/predefined-table-styles.cxx index 4517590368..90fb22e48d 100644 --- a/oox/source/drawingml/table/predefined-table-styles.cxx +++ b/oox/source/drawingml/table/predefined-table-styles.cxx @@ -231,6 +231,12 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) std::unique_ptr<TableStyle> pTableStyle; pTableStyle.reset(new TableStyle()); + // Text Style definitions for table parts + + bool bFirstRowTextBoldStyle = false; + bool bFirstColTextBoldStyle = false; + bool bLastColTextBoldStyle = false; + // Text Color definitions for table parts ::oox::drawingml::Color wholeTblTextColor; @@ -410,6 +416,7 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pWholeTblBottomBorder->moLineWidth = 12700; pWholeTblInsideHBorder->moLineWidth = 12700; pWholeTblInsideVBorder->moLineWidth = 12700; + pFirstRowBottomBorder->moLineWidth = 12700; pWholeTblLeftBorder->moPresetDash = XML_solid; pWholeTblRightBorder->moPresetDash = XML_solid; @@ -417,6 +424,7 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pWholeTblBottomBorder->moPresetDash = XML_solid; pWholeTblInsideHBorder->moPresetDash = XML_solid; pWholeTblInsideVBorder->moPresetDash = XML_solid; + pFirstRowBottomBorder->moPresetDash = XML_solid; // Start to handle all style groups. @@ -557,7 +565,13 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) setBorderLineType(pFirstRowBottomBorder, XML_solidFill); setBorderLineType(pLastRowTopBorder, XML_solidFill); + bFirstRowTextBoldStyle = true; + bFirstColTextBoldStyle = true; + bLastColTextBoldStyle = true; + wholeTblTextColor.setSchemeClr(XML_tx1); + firstRowTextColor.setSchemeClr(XML_tx1); + lastColTextColor.setSchemeClr(XML_tx1); sal_Int32 accent_val; @@ -571,8 +585,6 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pFirstRowBottomBorder->maLineFill.maFillColor.setSchemeClr(accent_val); pLastRowTopBorder->maLineFill.maFillColor.setSchemeClr(accent_val); - firstRowTextColor.setSchemeClr(accent_val); - pBand1HFillProperties->maFillColor.setSchemeClr(accent_val); pBand1VFillProperties->maFillColor.setSchemeClr(accent_val); @@ -895,6 +907,10 @@ std::unique_ptr<TableStyle> CreateTableStyle(const OUString& styleId) pTableStyle->getStyleId() = styleId; pTableStyle->getStyleName() = style_name; + pTableStyle->getFirstRow().getTextBoldStyle() = bFirstRowTextBoldStyle; + pTableStyle->getFirstCol().getTextBoldStyle() = bFirstColTextBoldStyle; + pTableStyle->getLastCol().getTextBoldStyle() = bLastColTextBoldStyle; + pTableStyle->getWholeTbl().getTextColor() = wholeTblTextColor; pTableStyle->getFirstRow().getTextColor() = firstRowTextColor; pTableStyle->getFirstCol().getTextColor() = firstColTextColor; diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx index 687c987fe2..78ec4f61fe 100644 --- a/oox/source/drawingml/table/tablecell.cxx +++ b/oox/source/drawingml/table/tablecell.cxx @@ -358,10 +358,18 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons } if ( rProperties.isBandRow() ) { + bool bHasFirstColFillColor + = (rProperties.isFirstCol() && rTable.getFirstCol().getFillProperties() + && rTable.getFirstCol().getFillProperties()->maFillColor.isUsed()); + + bool bHasLastColFillColor + = (rProperties.isLastCol() && rTable.getLastCol().getFillProperties() + && rTable.getLastCol().getFillProperties()->maFillColor.isUsed()); + if ( ( !rProperties.isFirstRow() || ( nRow != 0 ) ) && ( !rProperties.isLastRow() || ( nRow != nMaxRow ) ) && - ( !rProperties.isFirstCol() || ( nColumn != 0 ) ) && - ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) ) ) + ( !rProperties.isFirstCol() || ( nColumn != 0 ) || !bHasFirstColFillColor ) && + ( !rProperties.isLastCol() || ( nColumn != nMaxColumn ) || !bHasLastColFillColor ) ) { sal_Int32 nBand = nRow; if ( rProperties.isFirstRow() ) |