diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-16 23:06:36 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-01-17 11:33:17 -0500 |
commit | 0a3544fed489a658fef20bfa5b6ea6600a0c69f6 (patch) | |
tree | 2a7b529226a09f07bba9032ec894806b53fd072a /sc/source | |
parent | 1cb500c2aa66f4be20428e21a9101a8e3468842e (diff) |
Make the same change to the xlsx import filter.
Change-Id: I94c97e5aa55e6b728d07e91f2527fc0c10820f24
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/inc/stylesbuffer.hxx | 4 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 42 |
2 files changed, 25 insertions, 21 deletions
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index 58d9be51b898..6802e9b7dc26 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -66,9 +66,9 @@ const sal_Int32 OOX_COLOR_FONTAUTO = 0x7FFF; /// Font auto color (sys const sal_Int16 API_LINE_NONE = 0; const sal_Int16 API_LINE_HAIR = 1; -const sal_Int16 API_LINE_THIN = 1; +const sal_Int16 API_LINE_THIN = 15; const sal_Int16 API_LINE_MEDIUM = 35; -const sal_Int16 API_LINE_THICK = 53; +const sal_Int16 API_LINE_THICK = 50; const sal_Int16 API_ESCAPE_NONE = 0; /// No escapement. const sal_Int16 API_ESCAPE_SUPERSCRIPT = 101; /// Superscript: raise characters automatically (magic value 101). diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index f1b65110bf10..49b1194f0ee0 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -34,6 +34,7 @@ #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/text/WritingMode2.hpp> #include <com/sun/star/text/XText.hpp> +#include <com/sun/star/table/BorderLineStyle.hpp> #include <com/sun/star/table/CellVertJustify2.hpp> #include <com/sun/star/table/CellJustifyMethod.hpp> #include <com/sun/star/table/TableBorder.hpp> @@ -83,6 +84,7 @@ namespace xls { // ============================================================================ +using namespace com::sun::star; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::container; using namespace ::com::sun::star::style; @@ -1634,19 +1636,19 @@ void Border::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const SvxBoxItem aBoxItem( ATTR_BORDER ); ::editeng::SvxBorderLine aLine; - if ( SvxBoxItem::LineToSvxLine(maApiData.maLeft, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maLeft, aLine, false)) { aBoxItem.SetLine( &aLine, BOX_LINE_LEFT ); } - if ( SvxBoxItem::LineToSvxLine(maApiData.maRight, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maRight, aLine, false)) { aBoxItem.SetLine( &aLine, BOX_LINE_RIGHT ); } - if ( SvxBoxItem::LineToSvxLine(maApiData.maTop, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maTop, aLine, false)) { aBoxItem.SetLine( &aLine, BOX_LINE_TOP ); } - if ( SvxBoxItem::LineToSvxLine(maApiData.maBottom, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maBottom, aLine, false)) { aBoxItem.SetLine( &aLine, BOX_LINE_BOTTOM ); } @@ -1657,11 +1659,11 @@ void Border::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const SvxLineItem aTLBRItem( ATTR_BORDER_TLBR ); SvxLineItem aBLTRItem( ATTR_BORDER_BLTR ); ::editeng::SvxBorderLine aLine; - if ( SvxBoxItem::LineToSvxLine(maApiData.maTLtoBR, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maTLtoBR, aLine, false)) { aTLBRItem.SetLine( &aLine ); } - if ( SvxBoxItem::LineToSvxLine(maApiData.maBLtoTR, aLine, true ) ) + if (SvxBoxItem::LineToSvxLine(maApiData.maBLtoTR, aLine, false)) { aBLTRItem.SetLine( &aLine ); } @@ -1726,23 +1728,25 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& case XML_dashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); break; case XML_dashDotDot: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); break; case XML_dashed: - { - lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); - rBorderLine.LineStyle = API_LINE_DASHED; - break; - } + lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); + rBorderLine.LineStyle = table::BorderLineStyle::FINE_DASHED; + break; case XML_dotted: - { - lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); - rBorderLine.LineStyle = API_LINE_DOTTED; - break; - } - case XML_double: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN, API_LINE_THIN, API_LINE_THIN ); break; - case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); rBorderLine.LineStyle = API_FINE_LINE_DASHED; break; + lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); + rBorderLine.LineStyle = table::BorderLineStyle::DOTTED; + break; + case XML_double: + lclSetBorderLineWidth( rBorderLine, 5 ,5, 5 ); + rBorderLine.LineStyle = table::BorderLineStyle::DOUBLE; + break; + case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break; case XML_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_mediumDashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_mediumDashDotDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; - case XML_mediumDashed: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; + case XML_mediumDashed: + lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); + rBorderLine.LineStyle = table::BorderLineStyle::DASHED; + break; case XML_none: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); break; case XML_slantDashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_thick: lclSetBorderLineWidth( rBorderLine, API_LINE_THICK ); break; |