[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 4 commits - cui/source editeng/inc editeng/qa editeng/source sc/qa sc/source sd/source svtools/source svx/inc svx/source sw/source writerfilter/Library_writerfilter.mk writerfilter/source
Michael Stahl
mst at kemper.freedesktop.org
Wed Jul 4 09:19:46 PDT 2012
cui/source/tabpages/border.cxx | 2
editeng/inc/editeng/borderline.hxx | 39 ++---
editeng/qa/items/borderline_test.cxx | 53 +++++--
editeng/source/items/borderline.cxx | 167 ++++++++++++++++++++---
editeng/source/items/frmitems.cxx | 90 +++---------
editeng/source/rtf/rtfitem.cxx | 29 ++-
sc/qa/unit/subsequent_filters-test.cxx | 18 +-
sc/qa/unit/ucalc.cxx | 2
sc/source/core/data/attarray.cxx | 2
sc/source/core/data/dpoutput.cxx | 2
sc/source/filter/excel/xestyle.cxx | 9 -
sc/source/filter/excel/xistyle.cxx | 31 ++--
sc/source/filter/html/htmlexp.cxx | 32 ++--
sc/source/filter/html/htmlpars.cxx | 4
sc/source/filter/lotus/lotattr.cxx | 8 -
sc/source/ui/view/formatsh.cxx | 12 +
sc/source/ui/view/tabvwsh4.cxx | 3
sc/source/ui/view/tabvwsh8.cxx | 2
sc/source/ui/view/viewfun2.cxx | 4
sd/source/core/drawdoc4.cxx | 3
svtools/source/control/ctrlbox.cxx | 31 +++-
svx/inc/svx/framelink.hxx | 5
svx/source/dialog/framelink.cxx | 6
svx/source/dialog/frmsel.cxx | 12 +
svx/source/table/viewcontactoftableobj.cxx | 8 -
svx/source/tbxctrls/tbcontrl.cxx | 6
sw/source/core/doc/poolfmt.cxx | 2
sw/source/core/docnode/ndtbl.cxx | 2
sw/source/core/edit/autofmt.cxx | 24 +--
sw/source/core/inc/frame.hxx | 3
sw/source/core/layout/atrfrm.cxx | 13 -
sw/source/core/layout/pagedesc.cxx | 5
sw/source/core/layout/paintfrm.cxx | 28 ++-
sw/source/core/unocore/unosett.cxx | 6
sw/source/core/unocore/unotbl.cxx | 2
sw/source/filter/html/css1atr.cxx | 31 ++--
sw/source/filter/html/htmltab.cxx | 13 +
sw/source/filter/html/svxcss1.cxx | 21 +-
sw/source/filter/html/swhtml.cxx | 6
sw/source/filter/ww1/w1sprm.cxx | 10 -
sw/source/filter/ww8/docxattributeoutput.cxx | 36 ++--
sw/source/filter/ww8/rtfattributeoutput.cxx | 42 +++--
sw/source/filter/ww8/wrtw8esh.cxx | 8 -
sw/source/filter/ww8/ww8atr.cxx | 38 ++---
sw/source/filter/ww8/ww8graf.cxx | 24 +--
sw/source/filter/ww8/ww8par6.cxx | 44 +++---
sw/source/filter/xml/xmlexpit.cxx | 46 +++---
sw/source/filter/xml/xmlithlp.cxx | 15 --
sw/source/ui/frmdlg/column.cxx | 15 +-
sw/source/ui/misc/pgfnote.cxx | 15 +-
sw/source/ui/shells/frmsh.cxx | 5
sw/source/ui/shells/tabsh.cxx | 4
sw/source/ui/utlui/uiitems.cxx | 16 +-
writerfilter/Library_writerfilter.mk | 1
writerfilter/source/dmapper/BorderHandler.cxx | 4
writerfilter/source/dmapper/ConversionHelper.cxx | 8 -
writerfilter/source/dmapper/MeasureHandler.cxx | 2
writerfilter/source/dmapper/TDefTableHandler.cxx | 2
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 54 +++----
59 files changed, 674 insertions(+), 451 deletions(-)
New commits:
commit e4fc7e777fbfa600dcfe8914da81e89329279e7b
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 4 17:47:22 2012 +0200
refactor handling of double border widths:
Word uses a completely different definition of "width" of a double border
than OOo and ODF: for Word the width is apparently the largest of the 3
component widths, while OOo and ODF define the width as the total with of
all 3 components. The new border implementation in LO 3.4 was apparently
inspired by Word's double border definition, which resulted in
various import filter regressions, see the previous fixes:
36e43b52992735c622833e923faa63774b9e2f76
e2ffb71305c5f085eec6d396651c76d6daee3406
70a6a4d425558340bb49507975343a3e0a1bdde8
These fixes set the ScaleMetrics, which actually seems sub-optimal as
there is a ScaleItemSet function somewhere that apparently re-scales
all items in an itemset, which could undo the fixes.
Also, one of the fixes actually managed to break RTF/DOCX import
of double borders, as that ended up in the same code via the API.
This commit now reverses the change, so that the width of a border is
now always the total with of all components, which is (imho) much more
intutitive, and also leads to a consistent UI where selecting say 3pt
width has predictable results, no matter what the border style.
The border widths are now converted in the Word format import/export
filters (writerfilter and sw/source/filter/ww8), and various tests
were adapted to the new handling.
(cherry picked from commit 2d045cdb69176b280812dda0b813371cf1ac72e2)
Conflicts:
sw/qa/extras/ooxmltok/ooxmltok.cxx
Change-Id: I50456c49b1a298569607e6c88f19f18441348ac3
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx
index e026fc2..7d18587 100644
--- a/editeng/inc/editeng/borderline.hxx
+++ b/editeng/inc/editeng/borderline.hxx
@@ -52,6 +52,10 @@ namespace editeng {
// values from ::com::sun::star::table::BorderLineStyle
typedef sal_Int16 SvxBorderStyle;
+ /// convert border width in twips between Word formats and LO
+ double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderStyle, double);
+ double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderStyle, double);
+
class EDITENG_DLLPUBLIC SvxBorderLine
{
protected:
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 8a1de32..f330451 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -99,7 +99,10 @@ void BorderLineTest::testGuessWidthDouble()
SvxBorderLine line;
line.GuessLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
- CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetOutWidth()) );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetInWidth()) );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetDistance()) );
+ CPPUNIT_ASSERT_EQUAL( 3*TEST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthNoMatch()
@@ -108,6 +111,9 @@ void BorderLineTest::testGuessWidthNoMatch()
line.GuessLinesWidths( DOUBLE,
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+1, static_cast<long>(line.GetOutWidth()) );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+2, static_cast<long>(line.GetInWidth()) );
+ CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast<long>(line.GetDistance()));
CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() );
}
@@ -119,7 +125,14 @@ void BorderLineTest::testGuessWidthThinthickSmallgap()
THINTHICKSG_IN_WIDTH,
THINTHICKSG_DIST_WIDTH );
CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
- CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH,
+ static_cast<long>(line.GetOutWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKSG_IN_WIDTH,
+ static_cast<long>(line.GetInWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKSG_DIST_WIDTH,
+ static_cast<long>(line.GetDistance()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH + THINTHICKSG_IN_WIDTH
+ + THINTHICKSG_DIST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthThinthickLargegap()
@@ -130,7 +143,14 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
- CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
+ static_cast<long>(line.GetOutWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
+ static_cast<long>(line.GetInWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_DIST_WIDTH,
+ static_cast<long>(line.GetDistance()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH + THINTHICKLG_IN_WIDTH
+ + THINTHICKLG_DIST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthNostyleDouble()
@@ -141,7 +161,14 @@ void BorderLineTest::testGuessWidthNostyleDouble()
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
- CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
+ static_cast<long>(line.GetOutWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
+ static_cast<long>(line.GetInWidth()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_DIST_WIDTH,
+ static_cast<long>(line.GetDistance()) );
+ CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH + THINTHICKLG_IN_WIDTH
+ + THINTHICKLG_DIST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthNostyleSingle()
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 7470f5a..f6e184f 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -120,6 +120,127 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
aColor = *pCol;
}
+static const double THINTHICK_SMALLGAP_line2 = 15.0;
+static const double THINTHICK_SMALLGAP_gap = 15.0;
+static const double THINTHICK_LARGEGAP_line1 = 30.0;
+static const double THINTHICK_LARGEGAP_line2 = 15.0;
+static const double THICKTHIN_SMALLGAP_line1 = 15.0;
+static const double THICKTHIN_SMALLGAP_gap = 15.0;
+static const double THICKTHIN_LARGEGAP_line1 = 15.0;
+static const double THICKTHIN_LARGEGAP_line2 = 30.0;
+static const double OUTSET_line1 = 15.0;
+static const double INSET_line2 = 15.0;
+
+double
+ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const fWidth)
+{
+ switch (eStyle)
+ {
+ // Single lines
+ case SOLID:
+ case DOTTED:
+ case DASHED:
+ return fWidth;
+ break;
+
+ // Double lines
+ case DOUBLE:
+ return fWidth * 3.0;
+ break;
+
+ case THINTHICK_MEDIUMGAP:
+ case THICKTHIN_MEDIUMGAP:
+ case EMBOSSED:
+ case ENGRAVED:
+ return fWidth * 2.0;
+ break;
+
+ case THINTHICK_SMALLGAP:
+ return fWidth + THINTHICK_SMALLGAP_line2 + THINTHICK_SMALLGAP_gap;
+ break;
+
+ case THINTHICK_LARGEGAP:
+ return fWidth + THINTHICK_LARGEGAP_line1 + THINTHICK_LARGEGAP_line2;
+ break;
+
+ case THICKTHIN_SMALLGAP:
+ return fWidth + THICKTHIN_SMALLGAP_line1 + THICKTHIN_SMALLGAP_gap;
+ break;
+
+ case THICKTHIN_LARGEGAP:
+ return fWidth + THICKTHIN_LARGEGAP_line1 + THICKTHIN_LARGEGAP_line2;
+ break;
+
+ case OUTSET:
+ return (fWidth * 2.0) + OUTSET_line1;
+ break;
+
+ case INSET:
+ return (fWidth * 2.0) + INSET_line2;
+ break;
+
+ default:
+ assert(false); // should only be called for known border style
+ return 0;
+ break;
+ }
+}
+
+double
+ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
+{
+ switch (eStyle)
+ {
+ // Single lines
+ case SOLID:
+ case DOTTED:
+ case DASHED:
+ return fWidth;
+ break;
+
+ // Double lines
+ case DOUBLE:
+ return fWidth / 3.0;
+ break;
+
+ case THINTHICK_MEDIUMGAP:
+ case THICKTHIN_MEDIUMGAP:
+ case EMBOSSED:
+ case ENGRAVED:
+ return fWidth / 2.0;
+ break;
+
+ case THINTHICK_SMALLGAP:
+ return fWidth - THINTHICK_SMALLGAP_line2 - THINTHICK_SMALLGAP_gap;
+ break;
+
+ case THINTHICK_LARGEGAP:
+ return fWidth - THINTHICK_LARGEGAP_line1 - THINTHICK_LARGEGAP_line2;
+ break;
+
+ case THICKTHIN_SMALLGAP:
+ return fWidth - THICKTHIN_SMALLGAP_line1 - THICKTHIN_SMALLGAP_gap;
+ break;
+
+ case THICKTHIN_LARGEGAP:
+ return fWidth - THICKTHIN_LARGEGAP_line1 - THICKTHIN_LARGEGAP_line2;
+ break;
+
+ case OUTSET:
+ return (fWidth / 2.0) - OUTSET_line1;
+ break;
+
+ case INSET:
+ return (fWidth / 2.0) - INSET_line2;
+ break;
+
+ default:
+ assert(false); // should only be called for known border style
+ return 0;
+ break;
+ }
+}
+
/** Get the BorderWithImpl object corresponding to the given #nStyle, all the
units handled by the resulting object are Twips and the
BorderWidthImpl::GetLine1() corresponds to the Outer Line.
@@ -147,35 +268,41 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
case DOUBLE:
aImpl = BorderWidthImpl(
CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST,
- 1.0, 1.0, 1.0 );
+ // fdo#46112 fdo#38542 fdo#43249:
+ // non-constant witdths must sum to 1
+ 1.0/3.0, 1.0/3.0, 1.0/3.0 );
break;
case THINTHICK_SMALLGAP:
- aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0, 15.0, 15.0 );
+ aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0,
+ THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap );
break;
case THINTHICK_MEDIUMGAP:
aImpl = BorderWidthImpl(
CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST,
- 1.0, 0.5, 0.5 );
+ 0.5, 0.25, 0.25 );
break;
case THINTHICK_LARGEGAP:
- aImpl = BorderWidthImpl( CHANGE_DIST, 30.0, 15.0, 1.0 );
+ aImpl = BorderWidthImpl( CHANGE_DIST,
+ THINTHICK_LARGEGAP_line1, THINTHICK_LARGEGAP_line2, 1.0 );
break;
case THICKTHIN_SMALLGAP:
- aImpl = BorderWidthImpl( CHANGE_LINE2, 15.0, 1.0, 15.0 );
+ aImpl = BorderWidthImpl( CHANGE_LINE2, THICKTHIN_SMALLGAP_line1,
+ 1.0, THICKTHIN_SMALLGAP_gap );
break;
case THICKTHIN_MEDIUMGAP:
aImpl = BorderWidthImpl(
CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST,
- 0.5, 1.0, 0.5 );
+ 0.25, 0.5, 0.25 );
break;
case THICKTHIN_LARGEGAP:
- aImpl = BorderWidthImpl( CHANGE_DIST, 15.0, 30.0, 1.0 );
+ aImpl = BorderWidthImpl( CHANGE_DIST, THICKTHIN_LARGEGAP_line1,
+ THICKTHIN_LARGEGAP_line2, 1.0 );
break;
// Engraved / Embossed
@@ -188,7 +315,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
case ENGRAVED:
aImpl = BorderWidthImpl(
CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST,
- 0.5, 0.5, 1.0 );
+ 0.25, 0.25, 0.5 );
break;
// Inset / Outset
@@ -199,13 +326,13 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
case OUTSET:
aImpl = BorderWidthImpl(
CHANGE_LINE2 | CHANGE_DIST,
- 15.0, 1.0, 1.0 );
+ OUTSET_line1, 0.5, 0.5 );
break;
case INSET:
aImpl = BorderWidthImpl(
CHANGE_LINE1 | CHANGE_DIST,
- 1.0, 15.0, 1.0 );
+ 0.5, INSET_line2, 0.5 );
break;
}
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index fb46de9..da4ca7d 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1791,13 +1791,6 @@ lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_B
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth ),
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance ));
}
- else
- {
- if (DOUBLE == rSvxLine.GetBorderLineStyle())
- { // fdo#46112: divide width by 3 for outer line, gap, inner line
- rSvxLine.ScaleMetrics(1, 3);
- }
- }
sal_Bool bRet = !rSvxLine.isEmpty();
return bRet;
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 15eae11..a1d8906 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -321,7 +321,12 @@ long BorderWidthImpl::GetLine1( long nWidth ) const
{
long result = static_cast<long>(m_nRate1);
if ( ( m_nFlags & CHANGE_LINE1 ) > 0 )
- result = static_cast<long>(m_nRate1 * nWidth);
+ {
+ long const nConstant2 = (m_nFlags & CHANGE_LINE2) ? 0 : m_nRate2;
+ long const nConstantD = (m_nFlags & CHANGE_DIST ) ? 0 : m_nRateGap;
+ result = std::max<long>(0,
+ static_cast<long>(m_nRate1 * nWidth) - (nConstant2 + nConstantD));
+ }
return result;
}
@@ -329,7 +334,12 @@ long BorderWidthImpl::GetLine2( long nWidth ) const
{
long result = static_cast<long>(m_nRate2);
if ( ( m_nFlags & CHANGE_LINE2 ) > 0 )
- result = static_cast<long>(m_nRate2 * nWidth);
+ {
+ long const nConstant1 = (m_nFlags & CHANGE_LINE1) ? 0 : m_nRate1;
+ long const nConstantD = (m_nFlags & CHANGE_DIST ) ? 0 : m_nRateGap;
+ result = std::max<long>(0,
+ static_cast<long>(m_nRate2 * nWidth) - (nConstant1 + nConstantD));
+ }
return result;
}
@@ -337,7 +347,12 @@ long BorderWidthImpl::GetGap( long nWidth ) const
{
long result = static_cast<long>(m_nRateGap);
if ( ( m_nFlags & CHANGE_DIST ) > 0 )
- result = static_cast<long>(m_nRateGap * nWidth);
+ {
+ long const nConstant1 = (m_nFlags & CHANGE_LINE1) ? 0 : m_nRate1;
+ long const nConstant2 = (m_nFlags & CHANGE_LINE2) ? 0 : m_nRate2;
+ result = std::max<long>(0,
+ static_cast<long>(m_nRateGap * nWidth) - (nConstant1 + nConstant2));
+ }
// Avoid having too small distances (less than 0.1pt)
if ( result < MINGAPWIDTH && m_nRate1 > 0 && m_nRate2 > 0 )
@@ -386,6 +401,11 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap )
else if ( !bGapChange && nWidthGap < 0 )
bInvalid = true;
+ // non-constant line width factors must sum to 1
+ assert((((bLine1Change) ? m_nRate1 : 0) +
+ ((bLine2Change) ? m_nRate2 : 0) +
+ ((bGapChange) ? m_nRateGap : 0)) - 1.0 < 0.00001 );
+
double nWidth = 0.0;
if ( (!bInvalid) && (!aToCompare.empty()) )
{
@@ -396,11 +416,10 @@ long BorderWidthImpl::GuessWidth( long nLine1, long nLine2, long nGap )
bInvalid = ( nWidth != *pIt );
pIt++;
}
- if ( bInvalid )
- nWidth = 0.0;
+ nWidth = (bInvalid) ? 0.0 : nLine1 + nLine2 + nGap;
}
- return long( nWidth );
+ return nWidth;
}
/** Utility class storing the border line width, style and colors. The widths
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 26c0bea..2d1bb23 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1468,8 +1468,10 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
{
// Compute the sz attribute
+ double const fConverted( ::editeng::ConvertBorderWidthToWord(
+ pBorderLine->GetBorderLineStyle(), pBorderLine->GetWidth()));
// The unit is the 8th of point
- sal_Int32 nWidth = sal_Int32( pBorderLine->GetWidth() / 2.5 );
+ sal_Int32 nWidth = sal_Int32( fConverted / 2.5 );
sal_uInt16 nMinWidth = 2;
sal_uInt16 nMaxWidth = 96;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 3ef3aff..6224265 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -179,12 +179,18 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
break;
}
+ double const fConverted( ::editeng::ConvertBorderWidthToWord(
+ pLine->GetBorderLineStyle(), pLine->GetWidth()) );
if ( 255 >= pLine->GetWidth() ) // That value comes from RTF specs
{
- aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetWidth());
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRW).append(
+ static_cast<sal_Int32>(fConverted));
}
else
- aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW).append((sal_Int32)pLine->GetWidth() / 2);
+ { // use \brdrth to double the value range...
+ aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW);
+ aRet.append(static_cast<sal_Int32>(fConverted) / 2);
+ }
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF);
aRet.append((sal_Int32)rExport.GetColor(pLine->GetColor()));
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 3f2c0c0..26db61b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4057,7 +4057,8 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// what SwRTFWriter::OutRTFBorder does in the RTF filter Eventually it
// would be nice if all this functionality was in the one place
WW8_BRC aBrc;
- sal_uInt16 nWidth = rLine.GetWidth();
+ sal_uInt16 nWidth = ::editeng::ConvertBorderWidthToWord(
+ rLine.GetBorderLineStyle(), rLine.GetWidth());
sal_uInt8 brcType = 0, nColCode = 0;
if( nWidth ) // Linie ?
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 49fb0b2..9cde7c4 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1570,10 +1570,6 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetWidth( nLineThick ); // No conversion here, nLineThick is already in twips
aLine.SetBorderLineStyle(nIdx);
- if (table::BorderLineStyle::DOUBLE == nIdx)
- { // fdo#43249: divide width by 3 for outer line, gap, inner line
- aLine.ScaleMetrics(1, 3);
- }
for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 1ed0250..5010d4b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1354,7 +1354,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt
::editeng::SvxBorderLine aLine;
aLine.SetBorderLineStyle( eStyle );
- aLine.SetWidth( nLineThickness );
+ double const fConverted( (table::BorderLineStyle::NONE == eStyle) ? 0.0 :
+ ::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness));
+ aLine.SetWidth(fConverted);
//No AUTO for borders as yet, so if AUTO, use BLACK
if (nCol == 0)
@@ -1363,7 +1365,7 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt
aLine.SetColor(SwWW8ImplReader::GetCol(nCol));
if (pSize)
- pSize[nWWIndex] = nLineThickness+nSpace;
+ pSize[nWWIndex] = fConverted + nSpace;
rBox.SetLine(&aLine, nOOIndex);
rBox.SetDistance(nSpace, nOOIndex);
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 0902899..d29853e 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -218,10 +218,6 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
rpLine->GetOutWidth();
rpLine->SetWidth( nWidth );
- if (bDouble)
- { // fdo#38542: divide width by 3 for outer line, gap, inner line
- rpLine->ScaleMetrics(1, 3);
- }
}
}
lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle );
diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 3644c42..5a34f94 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,writerfilter,\
comphelper \
cppu \
cppuhelper \
+ editeng \
i18nisolang1 \
i18nutil \
msfilter \
diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx
index f4858f5..5bb53fd 100644
--- a/writerfilter/source/dmapper/BorderHandler.cxx
+++ b/writerfilter/source/dmapper/BorderHandler.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
BorderHandler::BorderHandler( bool bOOXML ) :
LoggedProperties(dmapper_logger, "BorderHandler"),
m_nCurrentBorderPosition( BORDER_TOP ),
-m_nLineWidth(26), // Word default
+m_nLineWidth(15), // Word default, in twips
m_nLineType(0),
m_nLineColor(0),
m_nLineDistance(0),
@@ -79,7 +79,7 @@ void BorderHandler::lcl_attribute(Id rName, Value & rVal)
break;
case NS_rtf::LN_DPTLINEWIDTH: // 0x2871
// width of a single line in 1/8 pt, max of 32 pt -> twip * 5 / 2.
- m_nLineWidth = ConversionHelper::convertTwipToMM100( nIntValue * 5 / 2 );
+ m_nLineWidth = nIntValue * 5 / 2;
break;
case NS_rtf::LN_BRCTYPE: // 0x2872
m_nLineType = nIntValue;
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index cc6a88a..bb060eb 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/style/NumberingType.hpp>
+#include <editeng/borderline.hxx>
#include <ooxml/resourceids.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/color.hxx>
@@ -121,8 +122,7 @@ sal_Int32 MakeBorderLine( sal_Int32 nSprmValue, table::BorderLine2& rToFill )
sal_Int32 nLineType = ((nSprmValue & 0xff00) >> 8);
sal_Int32 nLineColor = (nSprmValue & 0xff0000)>>16;
sal_Int32 nLineDistance = (((nSprmValue & 0x3f000000)>>24) * 2540 + 36)/72L;
- sal_Int32 nLineThickness = TWIP_TO_MM100(nLineThicknessTwip);
- MakeBorderLine( nLineThickness, nLineType, nLineColor, rToFill, false);
+ MakeBorderLine( nLineThicknessTwip, nLineType, nLineColor, rToFill, false);
return nLineDistance;
}
void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineType,
@@ -213,7 +213,9 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineType,
}
rToFill.LineStyle = nLineStyle;
- rToFill.LineWidth = sal_uInt32( nLineThickness );
+ double const fConverted( (NONE == nLineStyle) ? 0.0 :
+ ::editeng::ConvertBorderWidthFromWord(nLineStyle, nLineThickness));
+ rToFill.LineWidth = convertTwipToMM100(fConverted);
rToFill.Color = nLineColor;
}
diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx
index 1da1624..cbb4f08 100644
--- a/writerfilter/source/dmapper/MeasureHandler.cxx
+++ b/writerfilter/source/dmapper/MeasureHandler.cxx
@@ -104,7 +104,9 @@ sal_Int32 MeasureHandler::getMeasureValue() const
{
// TODO m_nUnit 3 - twip, other values unknown :-(
if( m_nUnit == 3 || sal::static_int_cast<Id>(m_nUnit) == NS_ooxml::LN_Value_ST_TblWidth_dxa)
+ {
nRet = ConversionHelper::convertTwipToMM100( m_nMeasureValue );
+ }
//todo: handle additional width types:
//NS_ooxml::LN_Value_ST_TblWidth_nil, NS_ooxml::LN_Value_ST_TblWidth_pct,
//NS_ooxml::LN_Value_ST_TblWidth_dxa, NS_ooxml::LN_Value_ST_TblWidth_auto;
diff --git a/writerfilter/source/dmapper/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx
index 9a45bec..ca5947d 100644
--- a/writerfilter/source/dmapper/TDefTableHandler.cxx
+++ b/writerfilter/source/dmapper/TDefTableHandler.cxx
@@ -110,7 +110,7 @@ void TDefTableHandler::lcl_attribute(Id rName, Value & rVal)
//from LN_BRCXXXX - handled within the BorderHandler
case NS_rtf::LN_DPTLINEWIDTH: // 0x2871
// width of a single line in 1/8 pt, max of 32 pt -> twip * 5 / 2.
- m_nLineWidth = ConversionHelper::convertTwipToMM100( nIntValue * 5 / 2 );
+ m_nLineWidth = nIntValue * 5 / 2;
break;
case NS_rtf::LN_BRCTYPE: // 0x2872
m_nLineType = nIntValue;
commit 549cf1ab08fc5ee78730c139781ad53805e4717d
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 4 13:44:27 2012 +0200
rtftok: border types must be mapped to the values in ooxml/model.xml
... not to the tables::BorderLineStyle values, because the domain
mapper's MakeBorderLine converts the values to BorderLineStyle.
Change-Id: Id89e0bcf80fbd9a1ac9238e09d898bb6b82303b4
(cherry picked from commit 6146c5d1557f4813c9793c1b00567885382c00e7)
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 0db4d72..be34248 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -35,7 +35,6 @@
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
-#include <editeng/borderline.hxx>
#include <rtl/tencinfo.h>
#include <svtools/wmf.hxx>
#include <svl/lngmisc.hxx>
@@ -1692,29 +1691,29 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
// Border types
{
- using namespace ::com::sun::star::table::BorderLineStyle;
switch (nKeyword)
{
// brdrhair and brdrs are the same, brdrw will make a difference
- case RTF_BRDRHAIR: nParam = SOLID; break;
- case RTF_BRDRS: nParam = SOLID; break;
- case RTF_BRDRDOT: nParam = DOTTED; break;
- case RTF_BRDRDASH: nParam = DASHED; break;
- case RTF_BRDRDB: nParam = DOUBLE; break;
- case RTF_BRDRTNTHSG: nParam = THINTHICK_SMALLGAP; break;
- case RTF_BRDRTNTHMG: nParam = THINTHICK_MEDIUMGAP; break;
- case RTF_BRDRTNTHLG: nParam = THINTHICK_LARGEGAP; break;
- case RTF_BRDRTHTNSG: nParam = THICKTHIN_SMALLGAP; break;
- case RTF_BRDRTHTNMG: nParam = THICKTHIN_MEDIUMGAP; break;
- case RTF_BRDRTHTNLG: nParam = THICKTHIN_LARGEGAP; break;
- case RTF_BRDREMBOSS: nParam = EMBOSSED; break;
- case RTF_BRDRENGRAVE: nParam = ENGRAVED; break;
- case RTF_BRDROUTSET: nParam = OUTSET; break;
- case RTF_BRDRINSET: nParam = INSET; break;
- case RTF_BRDRNONE: nParam = NONE; break;
+ // map to values in ooxml/model.xml resource ST_Border
+ case RTF_BRDRHAIR: nParam = 5; break;
+ case RTF_BRDRS: nParam = 1; break;
+ case RTF_BRDRDOT: nParam = 6; break;
+ case RTF_BRDRDASH: nParam = 7; break;
+ case RTF_BRDRDB: nParam = 3; break;
+ case RTF_BRDRTNTHSG: nParam = 11; break;
+ case RTF_BRDRTNTHMG: nParam = 14; break;
+ case RTF_BRDRTNTHLG: nParam = 17; break;
+ case RTF_BRDRTHTNSG: nParam = 12; break;
+ case RTF_BRDRTHTNMG: nParam = 15; break;
+ case RTF_BRDRTHTNLG: nParam = 18; break;
+ case RTF_BRDREMBOSS: nParam = 24; break;
+ case RTF_BRDRENGRAVE: nParam = 25; break;
+ case RTF_BRDROUTSET: nParam = 18; break;
+ case RTF_BRDRINSET: nParam = 17; break;
+ case RTF_BRDRNONE: nParam = 0; break;
default: break;
}
- if (nParam >= 0 && nParam != NONE)
+ if (nParam >= 0)
{
RTFValue::Pointer_t pValue(new RTFValue(nParam));
lcl_putBorderProperty(m_aStates, NS_rtf::LN_BRCTYPE, pValue);
commit af24dfc60aae08fe49ac8544ddced6974c58f097
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jul 3 21:26:13 2012 +0200
replace enum SvxBorderStyle with css::table::BorderLineSyle
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67
(cherry picked from commit 8b4593948582c3b5b3d013bd751bb19ffd37a31b)
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index d6bf7a0..a75741d 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1030,6 +1030,8 @@ Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
void SvxBorderTabPage::FillLineListBox_Impl()
{
+ using namespace ::com::sun::star::table::BorderLineStyle;
+
aLbLineStyle.SetSourceUnit( FUNIT_TWIP );
aLbLineStyle.SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) );
diff --git a/editeng/inc/editeng/borderline.hxx b/editeng/inc/editeng/borderline.hxx
index 0c3bdcb..e026fc2 100644
--- a/editeng/inc/editeng/borderline.hxx
+++ b/editeng/inc/editeng/borderline.hxx
@@ -29,6 +29,8 @@
#ifndef SVX_BORDERLINE_HXX
#define SVX_BORDERLINE_HXX
+#include <com/sun/star/table/BorderLineStyle.hpp>
+
#include <tools/color.hxx>
#include <svl/poolitem.hxx>
#include <editeng/editengdllapi.h>
@@ -47,24 +49,8 @@
namespace editeng {
- enum SvxBorderStyle
- {
- SOLID,
- DOTTED,
- DASHED,
- DOUBLE,
- THINTHICK_SMALLGAP,
- THINTHICK_MEDIUMGAP,
- THINTHICK_LARGEGAP,
- THICKTHIN_SMALLGAP,
- THICKTHIN_MEDIUMGAP,
- THICKTHIN_LARGEGAP,
- EMBOSSED,
- ENGRAVED,
- OUTSET,
- INSET,
- NO_STYLE = -1
- };
+ // values from ::com::sun::star::table::BorderLineStyle
+ typedef sal_Int16 SvxBorderStyle;
class EDITENG_DLLPUBLIC SvxBorderLine
{
@@ -89,7 +75,8 @@ namespace editeng {
public:
SvxBorderLine( const Color *pCol = 0,
- long nWidth = 0, SvxBorderStyle nStyle = SOLID,
+ long nWidth = 0, SvxBorderStyle nStyle =
+ ::com::sun::star::table::BorderLineStyle::SOLID,
bool bUseLeftTop = false,
Color (*pColorOutFn)( Color ) = &darkColor,
Color (*pColorInFn)( Color ) = &darkColor,
@@ -139,14 +126,14 @@ namespace editeng {
sal_uInt16 GetInWidth() const;
sal_uInt16 GetDistance() const;
- SvxBorderStyle GetSvxBorderStyle() const { return m_nStyle; }
+ SvxBorderStyle GetBorderLineStyle() const { return m_nStyle; }
void SetColor( const Color &rColor ) { aColor = rColor; }
void SetColorOutFn( Color (*pColorOutFn)( Color ) ) { m_pColorOutFn = pColorOutFn; }
void SetColorInFn( Color (*pColorInFn)( Color ) ) { m_pColorInFn = pColorInFn; }
void SetColorGapFn( Color (*pColorGapFn)( Color ) ) { m_pColorGapFn = pColorGapFn; }
void SetUseLeftTop( bool bUseLeftTop ) { m_bUseLeftTop = bUseLeftTop; }
- void SetSvxBorderStyle( SvxBorderStyle nNew );
+ void SetBorderLineStyle( SvxBorderStyle nNew );
void ScaleMetrics( long nMult, long nDiv );
sal_Bool operator==( const SvxBorderLine &rCmp ) const;
@@ -157,7 +144,11 @@ namespace editeng {
bool HasPriority( const SvxBorderLine& rOtherLine ) const;
- bool isEmpty() const { return m_aWidthImpl.IsEmpty( ) || m_nStyle == NO_STYLE || m_nWidth == 0; }
+ bool isEmpty() const {
+ return m_aWidthImpl.IsEmpty()
+ || m_nStyle == ::com::sun::star::table::BorderLineStyle::NONE
+ || m_nWidth == 0;
+ }
bool isDouble() const { return m_aWidthImpl.IsDouble(); }
sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 69adb10..8a1de32 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -36,6 +36,8 @@
#include <editeng/borderline.hxx>
+using namespace ::com::sun::star::table::BorderLineStyle;
+
#define TEST_WIDTH long( 40 )
#define THINTHICKSG_IN_WIDTH long( 15 )
@@ -96,7 +98,7 @@ void BorderLineTest::testGuessWidthDouble()
// Normal double case
SvxBorderLine line;
line.GuessLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetSvxBorderStyle() );
+ CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
@@ -105,7 +107,7 @@ void BorderLineTest::testGuessWidthNoMatch()
SvxBorderLine line;
line.GuessLinesWidths( DOUBLE,
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
- CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetSvxBorderStyle() );
+ CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() );
}
@@ -116,7 +118,7 @@ void BorderLineTest::testGuessWidthThinthickSmallgap()
THINTHICKSG_OUT_WIDTH,
THINTHICKSG_IN_WIDTH,
THINTHICKSG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetSvxBorderStyle() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
@@ -127,26 +129,26 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetSvxBorderStyle() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthNostyleDouble()
{
SvxBorderLine line;
- line.GuessLinesWidths( NO_STYLE,
+ line.GuessLinesWidths( NONE,
THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetSvxBorderStyle() );
+ CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
void BorderLineTest::testGuessWidthNostyleSingle()
{
SvxBorderLine line;
- line.GuessLinesWidths( NO_STYLE, TEST_WIDTH );
- CPPUNIT_ASSERT_EQUAL( SOLID, line.GetSvxBorderStyle() );
+ line.GuessLinesWidths( NONE, TEST_WIDTH );
+ CPPUNIT_ASSERT_EQUAL( SOLID, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index b344ee1..7470f5a 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -35,6 +35,9 @@
#include <editeng/borderline.hxx>
#include <editeng/itemtype.hxx>
+
+using namespace ::com::sun::star::table::BorderLineStyle;
+
// class SvxBorderLine --------------------------------------------------
namespace {
@@ -128,7 +131,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
switch ( nStyle )
{
// No line: no width
- case NO_STYLE:
+ case NONE:
aImpl = BorderWidthImpl( 0, 0.0 );
break;
@@ -244,7 +247,8 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
{
- if ( nStyle == NO_STYLE ) {
+ if (NONE == nStyle)
+ {
nStyle = SOLID;
if ( nOut > 0 && nIn > 0 )
nStyle = DOUBLE;
@@ -265,7 +269,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
long nWidth = 0;
- SvxBorderStyle nTestStyle(NO_STYLE);
+ SvxBorderStyle nTestStyle(NONE);
for (size_t i = 0; i < len && nWidth == 0; ++i)
{
nTestStyle = aDoubleStyles[i];
@@ -277,13 +281,13 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
if ( nWidth > 0 )
{
nStyle = nTestStyle;
- SetSvxBorderStyle(nStyle);
+ SetBorderLineStyle(nStyle);
m_nWidth = nWidth;
}
else
{
// fdo#38542: not a known double, default to something custom...
- SetSvxBorderStyle(nStyle);
+ SetBorderLineStyle(nStyle);
m_nWidth = nOut + nIn + nDist;
if (nOut + nIn + nDist)
{
@@ -297,7 +301,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
}
else
{
- SetSvxBorderStyle(nStyle);
+ SetBorderLineStyle(nStyle);
if (nOut == 0 && nIn > 0)
{
// If only inner width is given swap inner and outer widths for
@@ -347,14 +351,14 @@ sal_Bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
( m_nWidth == rCmp.m_nWidth ) &&
( m_bMirrorWidths == rCmp.m_bMirrorWidths ) &&
( m_aWidthImpl == rCmp.m_aWidthImpl ) &&
- ( m_nStyle == rCmp.GetSvxBorderStyle()) &&
+ ( m_nStyle == rCmp.GetBorderLineStyle()) &&
( m_bUseLeftTop == rCmp.m_bUseLeftTop ) &&
( m_pColorOutFn == rCmp.m_pColorOutFn ) &&
( m_pColorInFn == rCmp.m_pColorInFn ) &&
( m_pColorGapFn == rCmp.m_pColorGapFn ) );
}
-void SvxBorderLine::SetSvxBorderStyle( SvxBorderStyle nNew )
+void SvxBorderLine::SetBorderLineStyle( SvxBorderStyle nNew )
{
m_nStyle = nNew;
m_aWidthImpl = getWidthImpl( m_nStyle );
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6d087e2..fb46de9 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -94,6 +94,7 @@
using namespace ::editeng;
using namespace ::rtl;
using namespace ::com::sun::star;
+using namespace ::com::sun::star::table::BorderLineStyle;
// Conversion for UNO
@@ -145,7 +146,7 @@ namespace
<< l.GetDistance();
if (version >= BORDER_LINE_WITH_STYLE_VERSION)
- stream << static_cast<sal_uInt16>(l.GetSvxBorderStyle());
+ stream << static_cast<sal_uInt16>(l.GetBorderLineStyle());
return stream;
}
@@ -153,7 +154,8 @@ namespace
/// Creates a border line from a stream.
SvxBorderLine CreateBorderLine(SvStream &stream, sal_uInt16 version)
{
- sal_uInt16 nOutline, nInline, nDistance, nStyle = NO_STYLE;
+ sal_uInt16 nOutline, nInline, nDistance;
+ sal_uInt16 nStyle = NONE;
Color aColor;
stream >> aColor >> nOutline >> nInline >> nDistance;
@@ -161,7 +163,7 @@ namespace
stream >> nStyle;
SvxBorderLine border(&aColor);
- border.GuessLinesWidths(static_cast<SvxBorderStyle>(nStyle), nOutline, nInline, nDistance);
+ border.GuessLinesWidths(nStyle, nOutline, nInline, nDistance);
return border;
}
@@ -1696,7 +1698,7 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, sal_Boo
aLine.InnerLineWidth = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetInWidth() ): pLine->GetInWidth() );
aLine.OuterLineWidth = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetOutWidth()): pLine->GetOutWidth() );
aLine.LineDistance = sal_uInt16( bConvert ? TWIP_TO_MM100_UNSIGNED(pLine->GetDistance()): pLine->GetDistance() );
- aLine.LineStyle = pLine->GetSvxBorderStyle();
+ aLine.LineStyle = pLine->GetBorderLineStyle();
aLine.LineWidth = sal_uInt32( bConvert ? TWIP_TO_MM100( pLine->GetWidth( ) ) : pLine->GetWidth( ) );
}
else
@@ -1784,14 +1786,14 @@ lcl_lineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLine, sal_B
rSvxLine.SetColor( Color(rLine.Color));
if ( bGuessWidth )
{
- rSvxLine.GuessLinesWidths( rSvxLine.GetSvxBorderStyle(),
+ rSvxLine.GuessLinesWidths( rSvxLine.GetBorderLineStyle(),
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.OuterLineWidth) : rLine.OuterLineWidth ),
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.InnerLineWidth) : rLine.InnerLineWidth ),
sal_uInt16( bConvert ? MM100_TO_TWIP(rLine.LineDistance ) : rLine.LineDistance ));
}
else
{
- if (DOUBLE == rSvxLine.GetSvxBorderStyle())
+ if (DOUBLE == rSvxLine.GetBorderLineStyle())
{ // fdo#46112: divide width by 3 for outer line, gap, inner line
rSvxLine.ScaleMetrics(1, 3);
}
@@ -1812,54 +1814,12 @@ sal_Bool SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine& rL
sal_Bool
SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, sal_Bool bConvert)
{
- SvxBorderStyle nStyle = NO_STYLE;
- switch ( rLine.LineStyle )
- {
- default:
- case table::BorderLineStyle::SOLID:
- nStyle = SOLID;
- break;
- case table::BorderLineStyle::DOTTED:
- nStyle = DOTTED;
- break;
- case table::BorderLineStyle::DASHED:
- nStyle = DASHED;
- break;
- case table::BorderLineStyle::DOUBLE:
- nStyle = DOUBLE;
- break;
- case table::BorderLineStyle::THINTHICK_SMALLGAP:
- nStyle = THINTHICK_SMALLGAP;
- break;
- case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
- nStyle = THINTHICK_MEDIUMGAP;
- break;
- case table::BorderLineStyle::THINTHICK_LARGEGAP:
- nStyle = THINTHICK_LARGEGAP;
- break;
- case table::BorderLineStyle::THICKTHIN_SMALLGAP:
- nStyle = THICKTHIN_SMALLGAP;
- break;
- case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
- nStyle = THICKTHIN_MEDIUMGAP;
- break;
- case table::BorderLineStyle::THICKTHIN_LARGEGAP:
- nStyle = THICKTHIN_LARGEGAP;
- break;
- case table::BorderLineStyle::EMBOSSED:
- nStyle = EMBOSSED;
- break;
- case table::BorderLineStyle::ENGRAVED:
- nStyle = ENGRAVED;
- break;
- case table::BorderLineStyle::OUTSET:
- nStyle = OUTSET;
- break;
- case table::BorderLineStyle::INSET:
- nStyle = INSET;
- break;
- }
- rSvxLine.SetSvxBorderStyle( nStyle );
+ SvxBorderStyle const nStyle =
+ (rLine.LineStyle < 0 || INSET < rLine.LineStyle)
+ ? SOLID // default
+ : rLine.LineStyle;
+
+ rSvxLine.SetBorderLineStyle( nStyle );
sal_Bool bGuessWidth = sal_True;
if ( rLine.LineWidth )
@@ -1989,18 +1949,17 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
drawing::LineStyle eDrawingStyle;
rVal >>= eDrawingStyle;
- editeng::SvxBorderStyle eBorderStyle = editeng::NO_STYLE;
+ editeng::SvxBorderStyle eBorderStyle = NONE;
switch ( eDrawingStyle )
{
default:
case drawing::LineStyle_NONE:
- eBorderStyle = editeng::NO_STYLE;
break;
case drawing::LineStyle_SOLID:
- eBorderStyle = editeng::SOLID;
+ eBorderStyle = SOLID;
break;
case drawing::LineStyle_DASH:
- eBorderStyle = editeng::DASHED;
+ eBorderStyle = DASHED;
break;
}
@@ -2010,7 +1969,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) );
if( pLine )
- pLine->SetSvxBorderStyle( eBorderStyle );
+ pLine->SetBorderLineStyle( eBorderStyle );
}
return sal_True;
}
@@ -2731,7 +2690,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
Color aColor;
rStrm >> aColor >> nOutline >> nInline >> nDistance;
SvxBorderLine aBorder( &aColor );
- aBorder.GuessLinesWidths( NO_STYLE, nOutline, nInline, nDistance );
+ aBorder.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
switch( cLine )
{
@@ -3276,7 +3235,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId )
{
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
case MID_LINE_STYLE:
- pLine->SetSvxBorderStyle(static_cast<SvxBorderStyle>(nVal));
+ pLine->SetBorderLineStyle(static_cast<SvxBorderStyle>(nVal));
break;
default:
OSL_FAIL( "Wrong MemberId" );
@@ -3361,7 +3320,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
if( nOutline )
{
SvxBorderLine aLine( &aColor );
- aLine.GuessLinesWidths( NO_STYLE, nOutline, nInline, nDistance );
+ aLine.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
_pLine->SetLine( &aLine );
}
return _pLine;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index fc02868..f99bfb5 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -93,6 +93,7 @@
#define BRACELEFT '{'
#define BRACERIGHT '}'
+using namespace ::com::sun::star;
using namespace editeng;
// Some helper functions
@@ -1468,49 +1469,49 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
}
case RTF_BRDRDOT: // dotted border
- aBrd.SetSvxBorderStyle( DOTTED );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
break;
case RTF_BRDRDASH: // dashed border
- aBrd.SetSvxBorderStyle( DASHED );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::DASHED);
break;
case RTF_BRDRHAIR: // hairline border
{
- aBrd.SetSvxBorderStyle( SOLID );
+ aBrd.SetBorderLineStyle( table::BorderLineStyle::SOLID);
aBrd.SetWidth( DEF_LINE_WIDTH_0 );
}
break;
case RTF_BRDRDB: // Double border
- aBrd.SetSvxBorderStyle( DOUBLE );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
break;
case RTF_BRDRINSET: // inset border
- aBrd.SetSvxBorderStyle( INSET );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::INSET);
break;
case RTF_BRDROUTSET: // outset border
- aBrd.SetSvxBorderStyle( OUTSET );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
break;
case RTF_BRDRTNTHSG: // ThinThick Small gap
- aBrd.SetSvxBorderStyle( THINTHICK_SMALLGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
break;
case RTF_BRDRTNTHMG: // ThinThick Medium gap
- aBrd.SetSvxBorderStyle( THINTHICK_MEDIUMGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_MEDIUMGAP);
break;
case RTF_BRDRTNTHLG: // ThinThick Large gap
- aBrd.SetSvxBorderStyle( THINTHICK_LARGEGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_LARGEGAP);
break;
case RTF_BRDRTHTNSG: // ThickThin Small gap
- aBrd.SetSvxBorderStyle( THICKTHIN_SMALLGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
break;
case RTF_BRDRTHTNMG: // ThickThin Medium gap
- aBrd.SetSvxBorderStyle( THICKTHIN_MEDIUMGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_MEDIUMGAP);
break;
case RTF_BRDRTHTNLG: // ThickThin Large gap
- aBrd.SetSvxBorderStyle( THICKTHIN_LARGEGAP );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_LARGEGAP);
break;
case RTF_BRDREMBOSS: // Embossed border
- aBrd.SetSvxBorderStyle( EMBOSSED );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
break;
case RTF_BRDRENGRAVE: // Engraved border
- aBrd.SetSvxBorderStyle( ENGRAVED );
+ aBrd.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
break;
case RTF_BRDRS: // single thickness border
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 20d457a..0719d0f 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -507,7 +507,8 @@ void ScFiltersTest::testBorderODS()
CPPUNIT_ASSERT(!pTop);
CPPUNIT_ASSERT(!pBottom);
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
pDoc->GetBorderLines( 2, 1, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(!pLeft);
@@ -515,7 +516,8 @@ void ScFiltersTest::testBorderODS()
CPPUNIT_ASSERT(!pBottom);
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),20L);
pDoc->GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom );
@@ -524,7 +526,8 @@ void ScFiltersTest::testBorderODS()
CPPUNIT_ASSERT(pTop);
CPPUNIT_ASSERT(pBottom);
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),5L);
CPPUNIT_ASSERT(pRight->GetColor() == Color(COL_BLUE));
@@ -546,17 +549,20 @@ void ScFiltersTest::testBorderXLS()
pDoc->GetBorderLines( 2, 3, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),6L);
pDoc->GetBorderLines( 3, 5, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),18L);
pDoc->GetBorderLines( 5, 7, 0, &pLeft, &pTop, &pRight, &pBottom );
CPPUNIT_ASSERT(pRight);
- CPPUNIT_ASSERT_EQUAL(pRight->GetSvxBorderStyle(),editeng::SOLID);
+ CPPUNIT_ASSERT_EQUAL(pRight->GetBorderLineStyle(),
+ table::BorderLineStyle::SOLID);
CPPUNIT_ASSERT_EQUAL(pRight->GetWidth(),24L);
}
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 2cd2958..8d9febe 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -3097,7 +3097,7 @@ void Test::testDataArea()
CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
// Now, set borders in some cells....
- ::editeng::SvxBorderLine aLine(NULL, 50, ::editeng::SOLID);
+ ::editeng::SvxBorderLine aLine(NULL, 50, table::BorderLineStyle::SOLID);
SvxBoxItem aBorderItem(ATTR_BORDER);
aBorderItem.SetLine(&aLine, BOX_LINE_LEFT);
aBorderItem.SetLine(&aLine, BOX_LINE_RIGHT);
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 1a54e6c..4d841d3 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -573,7 +573,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet*
if ((dest)) \
{ \
SvxBorderLine* pCast = (SvxBorderLine*)(dest); \
- pCast->SetSvxBorderStyle( (src)->GetSvxBorderStyle() ); \
+ pCast->SetBorderLineStyle( (src)->GetBorderLineStyle() ); \
pCast->SetWidth( (src)->GetWidth( ) ); \
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 741ee2d..34ae9d6 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -329,7 +329,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
sal_uInt16 nWidth )
{
- ::editeng::SvxBorderLine aLine( NULL, nWidth, ::editeng::SOLID );
+ ::editeng::SvxBorderLine aLine(0, nWidth, table::BorderLineStyle::SOLID);
SvxBoxItem aBox( ATTR_BORDER );
aBox.SetLine(&aLine, BOX_LINE_LEFT);
aBox.SetLine(&aLine, BOX_LINE_TOP);
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 881b2b2..5e2e011 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -63,6 +63,7 @@
using ::rtl::OString;
using ::rtl::OUString;
+using namespace ::com::sun::star;
using namespace oox;
// PALETTE record - color information =========================================
@@ -1571,18 +1572,18 @@ void lclGetBorderLine(
else if( nOuterWidth >= EXC_BORDER_MEDIUM )
{
rnXclLine = EXC_LINE_MEDIUM;
- if (pLine->GetSvxBorderStyle( ) == ::editeng::DASHED)
+ if (pLine->GetBorderLineStyle( ) == table::BorderLineStyle::DASHED)
rnXclLine = EXC_LINE_MEDIUMDASHED;
}
else if( nOuterWidth >= EXC_BORDER_THIN )
{
rnXclLine = EXC_LINE_THIN;
- switch (pLine->GetSvxBorderStyle())
+ switch (pLine->GetBorderLineStyle())
{
- case ::editeng::DASHED:
+ case table::BorderLineStyle::DASHED:
rnXclLine = EXC_LINE_DASHED;
break;
- case ::editeng::DOTTED:
+ case table::BorderLineStyle::DOTTED:
rnXclLine = EXC_LINE_DOTTED;
break;
default:
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 7c146cb..b6ecf6d 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -896,20 +896,20 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
static const sal_uInt16 ppnLineParam[][ 4 ] =
{
// outer width, type
- { 0, ::editeng::SOLID }, // 0 = none
- { EXC_BORDER_THIN, ::editeng::SOLID }, // 1 = thin
- { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // 2 = medium
- { EXC_BORDER_THIN, ::editeng::DASHED }, // 3 = dashed
- { EXC_BORDER_THIN, ::editeng::DOTTED }, // 4 = dotted
- { EXC_BORDER_THICK, ::editeng::SOLID }, // 5 = thick
- { EXC_BORDER_THIN, ::editeng::DOUBLE }, // 6 = double
- { EXC_BORDER_HAIR, ::editeng::SOLID }, // 7 = hair
- { EXC_BORDER_MEDIUM, ::editeng::DASHED }, // 8 = med dash
- { EXC_BORDER_THIN, ::editeng::SOLID }, // 9 = thin dashdot
- { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // A = med dashdot
- { EXC_BORDER_THIN, ::editeng::SOLID }, // B = thin dashdotdot
- { EXC_BORDER_MEDIUM, ::editeng::SOLID }, // C = med dashdotdot
- { EXC_BORDER_MEDIUM, ::editeng::SOLID } // D = med slant dashdot
+ { 0, table::BorderLineStyle::SOLID }, // 0 = none
+ { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 1 = thin
+ { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // 2 = medium
+ { EXC_BORDER_THIN, table::BorderLineStyle::DASHED }, // 3 = dashed
+ { EXC_BORDER_THIN, table::BorderLineStyle::DOTTED }, // 4 = dotted
+ { EXC_BORDER_THICK, table::BorderLineStyle::SOLID }, // 5 = thick
+ { EXC_BORDER_THIN, table::BorderLineStyle::DOUBLE }, // 6 = double
+ { EXC_BORDER_HAIR, table::BorderLineStyle::SOLID }, // 7 = hair
+ { EXC_BORDER_MEDIUM, table::BorderLineStyle::DASHED }, // 8 = med dash
+ { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot
+ { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // A = med dashdot
+ { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // B = thin dashdotdot
+ { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // C = med dashdotdot
+ { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID } // D = med slant dashdot
};
if( nXclLine == EXC_LINE_NONE )
@@ -919,7 +919,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
rLine.SetColor( rPalette.GetColor( nXclColor ) );
rLine.SetWidth( ppnLineParam[ nXclLine ][ 0 ] );
- rLine.SetSvxBorderStyle( static_cast< ::editeng::SvxBorderStyle>(
+ rLine.SetBorderLineStyle( static_cast< ::editeng::SvxBorderStyle>(
ppnLineParam[ nXclLine ][ 1 ]) );
return true;
}
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index e4bbe25..ed69e11 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -92,7 +92,9 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <rtl/strbuf.hxx>
+
using ::editeng::SvxBorderLine;
+using namespace ::com::sun::star;
//========================================================================
@@ -520,36 +522,36 @@ rtl::OString ScHTMLExport::BorderToStyle(const char* pBorderName,
std::max(int(nWidth / TWIPS_PER_PIXEL), 1) : 0;
aOut.append(static_cast<sal_Int32>(nPxWidth)).
append(RTL_CONSTASCII_STRINGPARAM("px "));
- switch (pLine->GetSvxBorderStyle())
+ switch (pLine->GetBorderLineStyle())
{
- case ::editeng::SOLID:
+ case table::BorderLineStyle::SOLID:
aOut.append(RTL_CONSTASCII_STRINGPARAM("solid"));
break;
- case ::editeng::DOTTED:
+ case table::BorderLineStyle::DOTTED:
aOut.append(RTL_CONSTASCII_STRINGPARAM("dotted"));
break;
- case ::editeng::DASHED:
+ case table::BorderLineStyle::DASHED:
aOut.append(RTL_CONSTASCII_STRINGPARAM("dashed"));
break;
- case ::editeng::DOUBLE:
- case ::editeng::THINTHICK_SMALLGAP:
- case ::editeng::THINTHICK_MEDIUMGAP:
- case ::editeng::THINTHICK_LARGEGAP:
- case ::editeng::THICKTHIN_SMALLGAP:
- case ::editeng::THICKTHIN_MEDIUMGAP:
- case ::editeng::THICKTHIN_LARGEGAP:
+ case table::BorderLineStyle::DOUBLE:
+ case table::BorderLineStyle::THINTHICK_SMALLGAP:
+ case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+ case table::BorderLineStyle::THINTHICK_LARGEGAP:
+ case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+ case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case table::BorderLineStyle::THICKTHIN_LARGEGAP:
aOut.append(RTL_CONSTASCII_STRINGPARAM("double"));
break;
- case ::editeng::EMBOSSED:
+ case table::BorderLineStyle::EMBOSSED:
aOut.append(RTL_CONSTASCII_STRINGPARAM("ridge"));
break;
- case ::editeng::ENGRAVED:
+ case table::BorderLineStyle::ENGRAVED:
aOut.append(RTL_CONSTASCII_STRINGPARAM("groove"));
break;
- case ::editeng::OUTSET:
+ case table::BorderLineStyle::OUTSET:
aOut.append(RTL_CONSTASCII_STRINGPARAM("outset"));
break;
- case ::editeng::INSET:
+ case table::BorderLineStyle::INSET:
aOut.append(RTL_CONSTASCII_STRINGPARAM("inset"));
break;
default:
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 019d057..6395fb6 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2389,8 +2389,8 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
const SCROW nLastRow = maSize.mnRows - 1;
const long nOuterLine = DEF_LINE_WIDTH_2;
const long nInnerLine = DEF_LINE_WIDTH_0;
- SvxBorderLine aOuterLine( NULL, nOuterLine, ::editeng::SOLID );
- SvxBorderLine aInnerLine( NULL, nInnerLine, ::editeng::SOLID );
+ SvxBorderLine aOuterLine(0, nOuterLine, table::BorderLineStyle::SOLID);
+ SvxBorderLine aInnerLine(0, nInnerLine, table::BorderLineStyle::SOLID);
SvxBoxItem aBorderItem( ATTR_BORDER );
for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol )
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 2d53cd4..e21e847 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -44,6 +44,10 @@
#include "root.hxx"
#include "scitems.hxx"
+
+using namespace ::com::sun::star;
+
+
LotAttrCache::ENTRY::ENTRY (ScPatternAttr* p)
: pPattAttr(p)
{
@@ -168,12 +172,12 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin
switch ( nLine )
{
default:
- case 0: aBL.SetSvxBorderStyle( ::editeng::NO_STYLE ); break;
+ case 0: aBL.SetBorderLineStyle(table::BorderLineStyle::NONE); break;
case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break;
case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
case 3:
{
- aBL.SetSvxBorderStyle( ::editeng::DOUBLE );
+ aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aBL.SetWidth( DEF_LINE_WIDTH_1 );
}
break;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index c9ddb4e..9c45390 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -108,6 +108,9 @@
#include "scabstdlg.hxx"
+
+using namespace ::com::sun::star;
+
namespace {
SvxCellHorJustify lclConvertSlotToHAlign( sal_uInt16 nSlot )
@@ -1511,8 +1514,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
if ( pDefLine )
{
- pDefLine->SetSvxBorderStyle(
- pLine->GetSvxBorderStyle());
+ pDefLine->SetBorderLineStyle(
+ pLine->GetBorderLineStyle());
pDefLine->SetWidth( pLine->GetWidth( ) );
pTabViewShell->SetSelectionFrameLines( pDefLine, false );
}
@@ -1526,7 +1529,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
else
{
Color aColorBlack( COL_BLACK );
- ::editeng::SvxBorderLine aDefLine( &aColorBlack, 20, ::editeng::SOLID );
+ ::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
+ table::BorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
pTabViewShell->SetSelectionFrameLines( NULL, false );
}
@@ -1548,7 +1552,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
}
else
{
- ::editeng::SvxBorderLine aDefLine( &rColor, 20, ::editeng::SOLID );
+ ::editeng::SvxBorderLine aDefLine( &rColor, 20,
+ table::BorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 238d124..203dffb 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1514,7 +1514,8 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode )
SetPool( &SC_MOD()->GetPool() );
SetWindow( GetActiveWin() );
- pCurFrameLine = new ::editeng::SvxBorderLine( &aColBlack, 20, ::editeng::SOLID );
+ pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20,
+ table::BorderLineStyle::SOLID);
pPivotSource = new ScArea;
StartListening(*GetViewData()->GetDocShell(),sal_True);
StartListening(*GetViewFrame(),sal_True);
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index eb502dd..fb339b6 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -47,7 +47,7 @@ void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine
delete pCurFrameLine;
pCurFrameLine = new ::editeng::SvxBorderLine( &pLine->GetColor(),
pLine->GetWidth(),
- pLine->GetSvxBorderStyle() );
+ pLine->GetBorderLineStyle() );
}
else if ( pCurFrameLine )
{
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index ac50009..40f23df 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2930,13 +2930,13 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
if ( bColor )
{
rLine.SetColor ( pSrcLine->GetColor() );
- rLine.SetSvxBorderStyle(pDestLine->GetSvxBorderStyle());
+ rLine.SetBorderLineStyle(pDestLine->GetBorderLineStyle());
rLine.SetWidth ( pDestLine->GetWidth() );
}
else
{
rLine.SetColor ( pDestLine->GetColor() );
- rLine.SetSvxBorderStyle(pSrcLine->GetSvxBorderStyle());
+ rLine.SetBorderLineStyle(pSrcLine->GetBorderLineStyle());
rLine.SetWidth ( pSrcLine->GetWidth() );
}
}
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 6fce9ca..76fba52 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -616,7 +616,8 @@ void SdDrawDocument::CreateDefaultCellStyles()
rISet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT) );
Color aWhite( COL_WHITE );
- ::editeng::SvxBorderLine aBorderLine( &aWhite, 1, ::editeng::SOLID );
+ ::editeng::SvxBorderLine aBorderLine(
+ &aWhite, 1, table::BorderLineStyle::SOLID);
SvxBoxItem aBoxItem( SDRATTR_TABLE_BORDER );
aBoxItem.SetLine( &aBorderLine, BOX_LINE_TOP );
diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx
index c2edbb4..3a91172 100644
--- a/svx/inc/svx/framelink.hxx
+++ b/svx/inc/svx/framelink.hxx
@@ -116,7 +116,10 @@ class SVX_DLLPUBLIC Style
{
public:
/** Constructs an invisible frame style. */
- inline explicit Style() : meRefMode( REFMODE_CENTERED ), mnType( editeng::SOLID ) { Clear(); }
+ inline explicit Style()
+ : meRefMode( REFMODE_CENTERED )
+ , mnType( ::com::sun::star::table::BorderLineStyle::SOLID )
+ { Clear(); }
/** Constructs a frame style with passed line widths. */
inline explicit Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
meRefMode( REFMODE_CENTERED ), mnType( nType )
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 8e38b61..565b851 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -56,6 +56,8 @@
#include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
#include <drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx>
+
+using namespace ::com::sun::star;
using namespace editeng;
namespace svx {
@@ -1185,7 +1187,7 @@ void Style::Set( const SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWid
sal_uInt16 nDist = rBorder.GetDistance();
sal_uInt16 nSecn = rBorder.GetInWidth();
- mnType = rBorder.GetSvxBorderStyle();
+ mnType = rBorder.GetBorderLineStyle();
if( !nSecn ) // no or single frame border
{
Set( SCALEVALUE( nPrim ), 0, 0 );
@@ -1232,7 +1234,7 @@ void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWid
else
{
Clear();
- mnType = SOLID;
+ mnType = table::BorderLineStyle::SOLID;
}
}
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 9aace50..75a7d7e 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -39,6 +39,7 @@
#include <tools/rcid.h>
+using namespace ::com::sun::star;
using namespace ::editeng;
namespace svx {
@@ -160,7 +161,7 @@ void FrameBorder::SetState( FrameBorderState eState )
break;
case FRAMESTATE_DONTCARE:
maCoreStyle = SvxBorderLine();
- maUIStyle = frame::Style(3, 0, 0, SOLID); //OBJ_FRAMESTYLE_DONTCARE
+ maUIStyle = frame::Style(3, 0, 0, table::BorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE
break;
}
}
@@ -881,14 +882,14 @@ bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderStyle& rnStyle ) co
{
bFound =
(rStyle.GetWidth() == (*aIt)->GetCoreStyle().GetWidth()) &&
- (rStyle.GetSvxBorderStyle() ==
- (*aIt)->GetCoreStyle().GetSvxBorderStyle());
+ (rStyle.GetBorderLineStyle() ==
+ (*aIt)->GetCoreStyle().GetBorderLineStyle());
}
if( bFound )
{
rnWidth = rStyle.GetWidth();
- rnStyle = rStyle.GetSvxBorderStyle();
+ rnStyle = rStyle.GetBorderLineStyle();
}
return bFound;
}
@@ -951,7 +952,7 @@ void FrameSelector::SelectAllVisibleBorders( bool bSelect )
void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderStyle nStyle )
{
- mxImpl->maCurrStyle.SetSvxBorderStyle( nStyle );
+ mxImpl->maCurrStyle.SetBorderLineStyle( nStyle );
mxImpl->maCurrStyle.SetWidth( nWidth );
for( SelFrameBorderIter aIt( mxImpl->maEnabBorders ); aIt.Is(); ++aIt )
mxImpl->SetBorderState( **aIt, FRAMESTATE_SHOW );
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index f1494fe..c4b3e7b 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -331,7 +331,7 @@ namespace drawinglayer
getLeftLine().GetColorIn(true).getBColor(),
getLeftLine().GetColorGap().getBColor(),
getLeftLine().HasGapColor(),
- getLeftLine().GetSvxBorderStyle()));
+ getLeftLine().GetBorderLineStyle()));
}
}
@@ -362,7 +362,7 @@ namespace drawinglayer
getBottomLine().GetColorIn(false).getBColor(),
getBottomLine().GetColorGap().getBColor(),
getBottomLine().HasGapColor(),
- getBottomLine().GetSvxBorderStyle()));
+ getBottomLine().GetBorderLineStyle()));
}
}
@@ -393,7 +393,7 @@ namespace drawinglayer
getRightLine().GetColorIn(true).getBColor(),
getRightLine().GetColorGap().getBColor(),
getRightLine().HasGapColor(),
- getRightLine().GetSvxBorderStyle()));
+ getRightLine().GetBorderLineStyle()));
}
}
@@ -424,7 +424,7 @@ namespace drawinglayer
getTopLine().GetColorIn(false).getBColor(),
getTopLine().GetColorGap().getBColor(),
getTopLine().HasGapColor(),
- getTopLine().GetSvxBorderStyle()));
+ getTopLine().GetBorderLineStyle()));
}
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 2eb7511..6ff2c51 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1153,7 +1153,7 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl)
sal_uInt16 nModifier = aFrameSet.GetModifier();
sal_uInt8 nValidFlags = 0;
- theDefLine.GuessLinesWidths(theDefLine.GetSvxBorderStyle(),
+ theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(),
DEF_LINE_WIDTH_0);
switch ( nSel )
{
@@ -1344,6 +1344,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
m_aLineStyleLb.SetSourceUnit( FUNIT_TWIP );
m_aLineStyleLb.SetNone( SVX_RESSTR(STR_NONE) );
+ using namespace table::BorderLineStyle;
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
@@ -1394,7 +1395,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl)
if ( m_aLineStyleLb.GetSelectEntryPos( ) > 0 )
{
SvxBorderLine aTmp;
- aTmp.SetSvxBorderStyle( nStyle );
+ aTmp.SetBorderLineStyle( nStyle );
aTmp.SetWidth( 20 ); // TODO Make it depend on a width field
aLineItem.SetLine( &aTmp );
}
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 467bb38..0280a47 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -991,7 +991,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage )
{
SvxBoxItem aBox( RES_BOX );
Color aColor( COL_GRAY );
- SvxBorderLine aNew( &aColor, 1, DOUBLE );
+ SvxBorderLine aNew(&aColor, 1, table::BorderLineStyle::DOUBLE);
aBox.SetLine( &aNew, BOX_LINE_BOTTOM );
aSet.Put( aBox );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 7065f94..ea1f4e4 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -127,7 +127,7 @@ void lcl_SetDfltBoxAttr( SwFrmFmt& rFmt, sal_uInt8 nId )
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
if ( bHTML )
{
- aLine.SetSvxBorderStyle( editeng::DOUBLE );
+ aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_0 );
}
SvxBoxItem aBox(RES_BOX); aBox.SetDistance( 55 );
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index d4ab105..54156cb 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -592,28 +592,28 @@ sal_Bool SwAutoFormat::DoUnderline()
editeng::SvxBorderLine aLine;
switch( eState )
{
- case 1: // einfach, 0,05 pt
- aLine.SetSvxBorderStyle( editeng::SOLID );
+ case 1: // single, 0,05 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
aLine.SetWidth( DEF_LINE_WIDTH_0 );
break;
- case 2: // einfach, 1,0 pt
- aLine.SetSvxBorderStyle( editeng::SOLID );
+ case 2: // single, 1,0 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
aLine.SetWidth( DEF_LINE_WIDTH_1 );
break;
- case 3: // doppelt, 1,1 pt
- aLine.SetSvxBorderStyle( editeng::DOUBLE );
+ case 3: // double, 1,1 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_0 );
break;
- case 4: // doppelt, 4,5 pt
- aLine.SetSvxBorderStyle( editeng::THICKTHIN_SMALLGAP );
+ case 4: // double, 4,5 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
aLine.SetWidth( DEF_LINE_WIDTH_1 );
break;
- case 5: // doppelt, 6,0 pt
- aLine.SetSvxBorderStyle( editeng::THINTHICK_SMALLGAP );
+ case 5: // double, 6,0 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
aLine.SetWidth( DEF_LINE_WIDTH_2 );
break;
- case 6: // doppelt, 9,0 pt
- aLine.SetSvxBorderStyle( editeng::DOUBLE );
+ case 6: // double, 9,0 pt
+ aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aLine.SetWidth( DEF_LINE_WIDTH_2 );
break;
}
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 544655a..3812a29 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -500,7 +500,8 @@ public:
const sal_Bool bLowerMode = sal_False,
const sal_Bool bLowerBorder = sal_False ) const;
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*,
- const Color *pColor, const editeng::SvxBorderStyle = editeng::SOLID ) const;
+ const Color *pColor, const editeng::SvxBorderStyle =
+ ::com::sun::star::table::BorderLineStyle::SOLID ) const;
drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const;
void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 51c1a82..bb4e44f 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -855,8 +855,9 @@ SwFmtCol& SwFmtCol::operator=( const SwFmtCol& rCpy )
}
SwFmtCol::SwFmtCol()
- : SfxPoolItem( RES_COL ),
- eLineStyle( editeng::NO_STYLE ),
+ : SfxPoolItem( RES_COL )
+ , eLineStyle( table::BorderLineStyle::NONE)
+ ,
nLineWidth(0),
nLineHeight( 100 ),
eAdj( COLADJ_NONE ),
@@ -1111,10 +1112,10 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
switch ( pSwColums->GetSepLineStyle() )
{
default:
- case 0: eLineStyle = editeng::NO_STYLE; break;
- case 1: eLineStyle = editeng::SOLID; break;
- case 2: eLineStyle = editeng::DOTTED; break;
- case 3: eLineStyle = editeng::DASHED; break;
+ case 0: eLineStyle = table::BorderLineStyle::NONE; break;
+ case 1: eLineStyle = table::BorderLineStyle::SOLID; break;
+ case 2: eLineStyle = table::BorderLineStyle::DOTTED; break;
+ case 3: eLineStyle = table::BorderLineStyle::DASHED; break;
}
if(!pSwColums->GetSepLineIsOn())
eAdj = COLADJ_NONE;
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index ffe37a8..2c98d80 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -51,6 +51,9 @@
#include <poolfmt.hxx>
#include <switerator.hxx>
+
+using namespace ::com::sun::star;
+
/*************************************************************************
|*
|* SwPageDesc::SwPageDesc()
@@ -359,7 +362,7 @@ SwPageFtnInfo::SwPageFtnInfo() :
nMaxHeight( 0 ),
// aPen( PEN_SOLID ),
nLineWidth(10),
- eLineStyle( editeng::SOLID ),
+ eLineStyle( table::BorderLineStyle::SOLID ),
aWidth( 25, 100 ),
nTopDist( 57 ), //1mm
nBottomDist( 57 )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index cff8a26..d26dca7 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -733,7 +733,8 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Bottom( pLA->Bottom() );
if ( !rL1.IsInside( aIns ) )
continue;
- this->push_back( SwLineRect( aIns, rL1.GetColor(), SOLID,
+ this->push_back( SwLineRect( aIns, rL1.GetColor(),
+ table::BorderLineStyle::SOLID,
rL1.GetTab(), SUBCOL_TAB ) );
if ( isFull() )
{
@@ -773,7 +774,8 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut )
aIns.Right( pLA->Right() );
if ( !rL1.IsInside( aIns ) )
continue;
- this->push_back( SwLineRect( aIns, rL1.GetColor(), SOLID,
+ this->push_back( SwLineRect( aIns, rL1.GetColor(),
+ table::BorderLineStyle::SOLID,
rL1.GetTab(), SUBCOL_TAB ) );
if ( isFull() )
{
@@ -802,7 +804,10 @@ inline void SwSubsRects::Ins( const SwRect &rRect, const sal_uInt8 nSCol )
{
// Lines that are shorted than the largest line width won't be inserted
if ( rRect.Height() > DEF_LINE_WIDTH_4 || rRect.Width() > DEF_LINE_WIDTH_4 )
- this->push_back( SwLineRect( rRect, 0, SOLID, 0, nSCol ) );
+ {
+ this->push_back(
+ SwLineRect(rRect, 0, table::BorderLineStyle::SOLID, 0, nSCol));
+ }
}
void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects )
@@ -4638,7 +4643,7 @@ lcl_MakeBorderLine(SwRect const& rRect,
nExtentRightStart, nExtentRightEnd,
aLeftColor.getBColor(), aRightColor.getBColor(),
rBorder.GetColorGap().getBColor(), rBorder.HasGapColor(),
- rBorder.GetSvxBorderStyle() );
+ rBorder.GetBorderLineStyle() );
g_pBorderLines->AddBorderLine(xLine);
}
@@ -6398,7 +6403,8 @@ void lcl_RefreshLine( const SwLayoutFrm *pLay,
SwRect aRect( aP1, aP2 );
// OD 18.11.2002 #99672# - use parameter <_pSubsLines> instead of
// global variable <pSubsLines>.
- _pSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
+ _pSubsLines->AddLineRect( aRect, 0, table::BorderLineStyle::SOLID,
+ 0, nSubColor );
}
aP1 = aP2;
aP1.*pDirPt += 1;
@@ -6702,13 +6708,15 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
if ( aOriginal.Left() == aOut.Left() )
{
const SwRect aRect( aOut.Pos(), aLB );
- pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0,
+ table::BorderLineStyle::SOLID, 0, nSubColor );
}
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
if ( aOriginal.Right() == nRight )
{
const SwRect aRect( aRT, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0,
+ table::BorderLineStyle::SOLID, 0, nSubColor );
}
}
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines
@@ -6718,12 +6726,14 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
{
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
const SwRect aRect( aOut.Pos(), aRT );
- pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0,
+ table::BorderLineStyle::SOLID, 0, nSubColor );
}
if ( aOriginal.Bottom() == nBottom )
{
const SwRect aRect( aLB, aRB );
- pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor );
+ pUsedSubsLines->AddLineRect( aRect, 0,
+ table::BorderLineStyle::SOLID, 0, nSubColor );
}
}
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 255121b..2b312a3 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2438,9 +2438,9 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
sal_Int8 nStyle = API_COL_LINE_NONE;
switch (rFmtCol.GetLineStyle())
{
- case editeng::SOLID: nStyle = API_COL_LINE_SOLID; break;
- case editeng::DOTTED: nStyle = API_COL_LINE_DOTTED; break;
- case editeng::DASHED: nStyle = API_COL_LINE_DASHED; break;
+ case table::BorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
+ case table::BorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
+ case table::BorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
default: break;
}
nSepLineStyle = nStyle;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index ac17fd4..c18ae15 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -136,7 +136,7 @@ sal_Bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSvxLi
{
rSvxLine.SetColor(Color(rLine.Color));
- rSvxLine.GuessLinesWidths( editeng::NO_STYLE,
+ rSvxLine.GuessLinesWidths( table::BorderLineStyle::NONE,
MM100_TO_TWIP( rLine.OuterLineWidth ),
MM100_TO_TWIP( rLine.InnerLineWidth ),
MM100_TO_TWIP( rLine.LineDistance ) );
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 98727ad..af2a309 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -101,6 +101,7 @@
#include <rtl/strbuf.hxx>
+using namespace ::com::sun::star;
using ::editeng::SvxBorderLine;
/*
@@ -3583,36 +3584,36 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
// Linien-Stil: solid oder double
sOut.append(' ');
- switch (pLine->GetSvxBorderStyle())
+ switch (pLine->GetBorderLineStyle())
{
- case ::editeng::SOLID:
+ case table::BorderLineStyle::SOLID:
sOut.append(sCSS1_PV_solid);
break;
- case ::editeng::DOTTED:
+ case table::BorderLineStyle::DOTTED:
sOut.append(sCSS1_PV_dotted);
break;
- case ::editeng::DASHED:
+ case table::BorderLineStyle::DASHED:
sOut.append(sCSS1_PV_dashed);
break;
- case ::editeng::DOUBLE:
- case ::editeng::THINTHICK_SMALLGAP:
- case ::editeng::THINTHICK_MEDIUMGAP:
- case ::editeng::THINTHICK_LARGEGAP:
- case ::editeng::THICKTHIN_SMALLGAP:
- case ::editeng::THICKTHIN_MEDIUMGAP:
- case ::editeng::THICKTHIN_LARGEGAP:
+ case table::BorderLineStyle::DOUBLE:
+ case table::BorderLineStyle::THINTHICK_SMALLGAP:
+ case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
+ case table::BorderLineStyle::THINTHICK_LARGEGAP:
+ case table::BorderLineStyle::THICKTHIN_SMALLGAP:
+ case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
+ case table::BorderLineStyle::THICKTHIN_LARGEGAP:
sOut.append(sCSS1_PV_double);
break;
- case ::editeng::EMBOSSED:
+ case table::BorderLineStyle::EMBOSSED:
sOut.append(sCSS1_PV_ridge);
break;
- case ::editeng::ENGRAVED:
+ case table::BorderLineStyle::ENGRAVED:
sOut.append(sCSS1_PV_groove);
break;
- case ::editeng::INSET:
+ case table::BorderLineStyle::INSET:
sOut.append(sCSS1_PV_inset);
break;
- case ::editeng::OUTSET:
+ case table::BorderLineStyle::OUTSET:
sOut.append(sCSS1_PV_outset);
break;
default:
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 53529f6..bfde623 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1025,7 +1025,9 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
}
if ( pOptions->nCellSpacing != 0 )
- aTopBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ {
+ aTopBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ }
aTopBorderLine.SetWidth( nPHeight );
aTopBorderLine.SetColor( rBorderColor );
aBottomBorderLine = aTopBorderLine;
@@ -1037,7 +1039,9 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
else
{
if ( pOptions->nCellSpacing != 0 )
- aLeftBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ {
+ aLeftBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
+ }
aLeftBorderLine.SetWidth( nPWidth );
aLeftBorderLine.SetColor( rBorderColor );
}
@@ -1045,7 +1049,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
if( pOptions->nCellSpacing != 0 )
{
- aBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
else
@@ -1487,7 +1491,8 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
sal_uInt16 nBorderWidth = aBorderLine.GetOutWidth();
nBorderWidth *= (nEmptyRows + 1);
- aThickBorderLine.SetSvxBorderStyle( ::editeng::SOLID );
+ aThickBorderLine.SetBorderLineStyle(
+ table::BorderLineStyle::SOLID);
aThickBorderLine.SetWidth( nBorderWidth );
aBoxItem.SetLine( &aThickBorderLine, BOX_LINE_BOTTOM );
}
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 90f66e7..40f2378 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -65,6 +65,9 @@
#include <memory>
+
+using namespace ::com::sun::star;
+
// die Funktionen zum Parsen einer CSS1-Property sind von folgendem Typ:
typedef void (*FnParseCSS1Prop)( const CSS1Expression *pExpr,
SfxItemSet& rItemSet,
@@ -323,31 +326,31 @@ void SvxCSS1BorderInfo::SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem )
switch ( eStyle )
{
case CSS1_BS_SINGLE:
- aBorderLine.SetSvxBorderStyle( ::editeng::SOLID );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
break;
case CSS1_BS_DOUBLE:
- aBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
break;
case CSS1_BS_DOTTED:
- aBorderLine.SetSvxBorderStyle( ::editeng::DOTTED );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
break;
case CSS1_BS_DASHED:
- aBorderLine.SetSvxBorderStyle( ::editeng::DASHED );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DASHED);
break;
case CSS1_BS_GROOVE:
- aBorderLine.SetSvxBorderStyle( ::editeng::ENGRAVED );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
break;
case CSS1_BS_RIDGE:
- aBorderLine.SetSvxBorderStyle( ::editeng::EMBOSSED );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
break;
case CSS1_BS_INSET:
- aBorderLine.SetSvxBorderStyle( ::editeng::INSET );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::INSET);
break;
case CSS1_BS_OUTSET:
- aBorderLine.SetSvxBorderStyle( ::editeng::OUTSET );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
break;
default:
- aBorderLine.SetSvxBorderStyle( ::editeng::NO_STYLE );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::NONE);
break;
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index a3d4ae5..d64d14e 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5246,7 +5246,7 @@ void SwHTMLParser::InsertHorzRule()
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
if ( !bNoShade )
{
- aBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
}
aBorderLine.SetWidth( nPHeight );
}
@@ -5256,7 +5256,7 @@ void SwHTMLParser::InsertHorzRule()
}
else
{
- aBorderLine.SetSvxBorderStyle( ::editeng::DOUBLE );
+ aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
}
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 6c7bd75..7cd9bb9 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -206,7 +206,7 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
{
sal_uInt16 nCode;
- ::editeng::SvxBorderStyle eStyle = ::editeng::SOLID;
+ ::editeng::SvxBorderStyle eStyle = table::BorderLineStyle::SOLID;
if(pBrc->dxpLine2WidthGet() == 0)
{
switch(pBrc->dxpLine1WidthGet())
@@ -220,21 +220,21 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
case 5: nCode = DEF_LINE_WIDTH_4; break;
case 6:
nCode = DEF_LINE_WIDTH_5;
- eStyle = ::editeng::DOTTED;
+ eStyle = table::BorderLineStyle::DOTTED;
break;
case 7:
nCode = DEF_LINE_WIDTH_5;
- eStyle = ::editeng::DASHED;
+ eStyle = table::BorderLineStyle::DASHED;
break;
}
pLine->SetWidth( nCode );
- pLine->SetSvxBorderStyle( eStyle );
+ pLine->SetBorderLineStyle( eStyle );
}
else
{
if ( pBrc->dxpLine1WidthGet() == 1 && pBrc->dxpLine2WidthGet() == 1 )
{
- pLine->SetSvxBorderStyle( ::editeng::DOUBLE );
+ pLine->SetBorderLineStyle( table::BorderLineStyle::DOUBLE );
pLine->SetWidth( DEF_LINE_WIDTH_0 );
}
else
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index fb347bb..26c0bea 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1412,51 +1412,51 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
const char* pVal = "none";
if ( !pBorderLine->isEmpty( ) )
{
- switch (pBorderLine->GetSvxBorderStyle())
+ switch (pBorderLine->GetBorderLineStyle())
{
- case ::editeng::SOLID:
+ case table::BorderLineStyle::SOLID:
pVal = ( sal_Char* )"single";
break;
- case ::editeng::DOTTED:
+ case table::BorderLineStyle::DOTTED:
pVal = ( sal_Char* )"dotted";
break;
- case ::editeng::DASHED:
+ case table::BorderLineStyle::DASHED:
pVal = ( sal_Char* )"dashed";
break;
- case ::editeng::DOUBLE:
+ case table::BorderLineStyle::DOUBLE:
pVal = ( sal_Char* )"double";
break;
- case ::editeng::THINTHICK_SMALLGAP:
+ case table::BorderLineStyle::THINTHICK_SMALLGAP:
pVal = ( sal_Char* )"thinThickSmallGap";
break;
- case ::editeng::THINTHICK_MEDIUMGAP:
+ case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
pVal = ( sal_Char* )"thinThickMediumGap";
break;
- case ::editeng::THINTHICK_LARGEGAP:
+ case table::BorderLineStyle::THINTHICK_LARGEGAP:
pVal = ( sal_Char* )"thinThickLargeGap";
break;
- case ::editeng::THICKTHIN_SMALLGAP:
+ case table::BorderLineStyle::THICKTHIN_SMALLGAP:
pVal = ( sal_Char* )"thickThinSmallGap";
break;
- case ::editeng::THICKTHIN_MEDIUMGAP:
+ case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
pVal = ( sal_Char* )"thickThinMediumGap";
break;
- case ::editeng::THICKTHIN_LARGEGAP:
+ case table::BorderLineStyle::THICKTHIN_LARGEGAP:
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list