[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sc/source
Michael Meeks
michael at kemper.freedesktop.org
Thu Jan 26 06:52:03 PST 2012
sc/source/filter/xml/xmlstyli.cxx | 5 +++--
sc/source/ui/unoobj/cellsuno.cxx | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 6e891a42560c6811e490fc68c90b8477e71d281a
Author: Eike Rathke <erack at redhat.com>
Date: Thu Jan 26 14:03:13 2012 +0100
resolved fdo#38595 border width lost in ODF import
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index b22bbf4..c20f6e9 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -170,12 +170,14 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
pBorders[i]->maValue >>= aBorderLine;
if( pBorderWidths[i] )
{
+ // Merge style:border-line-width values to fo:border values. Do
+ // not override fo:border line width or line style with an
+ // empty value!
table::BorderLine2 aBorderLineWidth;
pBorderWidths[i]->maValue >>= aBorderLineWidth;
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
- aBorderLine.LineWidth = aBorderLineWidth.LineWidth;
pBorders[i]->maValue <<= aBorderLine;
}
}
@@ -194,7 +196,6 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >&
aBorderLine.OuterLineWidth = aBorderLineWidth.OuterLineWidth;
aBorderLine.InnerLineWidth = aBorderLineWidth.InnerLineWidth;
aBorderLine.LineDistance = aBorderLineWidth.LineDistance;
- aBorderLine.LineWidth = aBorderLineWidth.LineWidth;
pDiagBorders[i]->maValue <<= aBorderLine;
if (pDiagBorderWidths[i])
pDiagBorderWidths[i]->mnIndex = -1;
commit b1718b9dd74e13cd0f7aeccdb1187729c68687f3
Author: Eike Rathke <erack at redhat.com>
Date: Thu Jan 26 14:03:12 2012 +0100
cast from BorderLine to BorderLine2 is not valid
Don't access a css::table::BorderLine struct as if it was
a css::table::BorderLine2 struct, which it isn't. A proper implementation
would need to pass BorderLine2 structs around for which it would need
a css::table::TableBorder2 struct that holds BorderLine2 instead of
BorderLine, and adapt various places for API compatibility to support both.
For now use the default table::BorderLineStyle::SOLID to set the line style at
::editeng::SvxBorderLine
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index fc38a45..423e324 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -59,6 +59,7 @@
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/table/TableBorder.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
+#include <com/sun/star/table/BorderLineStyle.hpp>
#include <com/sun/star/sheet/CellFlags.hpp>
#include <com/sun/star/sheet/FormulaResult.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -952,8 +953,7 @@ ScSubTotalFunc lcl_SummaryToSubTotal( sheet::GeneralFunction eSummary )
const ::editeng::SvxBorderLine* ScHelperFunctions::GetBorderLine( ::editeng::SvxBorderLine& rLine, const table::BorderLine& rStruct )
{
// Calc needs Twips, and there are 1/100mm in the Uno structure
- const table::BorderLine2& rBorder2 = static_cast< const table::BorderLine2& >( rStruct );
- rLine.SetStyle( ::editeng::SvxBorderStyle( rBorder2.LineStyle ) );
+ rLine.SetStyle( ::editeng::SvxBorderStyle( table::BorderLineStyle::SOLID ) );
rLine.GuessLinesWidths( rLine.GetStyle(),
(sal_uInt16)HMMToTwips( rStruct.OuterLineWidth ),
(sal_uInt16)HMMToTwips( rStruct.InnerLineWidth ),
More information about the Libreoffice-commits
mailing list