convert SvxBorderStyle to scoped enum
and rename to SvxBorderLineStyle Change-Id: I19e530f162e4ca6290a0ad076e7fe3d5775ae6bc Reviewed-on: https://gerrit.libreoffice.org/35265 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
1bffa5e110
commit
f2a873cd13
@ -117,7 +117,7 @@ private:
|
|||||||
bool mbRemoveAdjacentCellBorders;
|
bool mbRemoveAdjacentCellBorders;
|
||||||
bool bIsCalcDoc;
|
bool bIsCalcDoc;
|
||||||
|
|
||||||
std::set<sal_Int16> maUsedBorderStyles;
|
std::set<SvxBorderLineStyle> maUsedBorderStyles;
|
||||||
|
|
||||||
// Handler
|
// Handler
|
||||||
DECL_LINK( SelStyleHdl_Impl, ListBox&, void );
|
DECL_LINK( SelStyleHdl_Impl, ListBox&, void );
|
||||||
@ -145,7 +145,7 @@ private:
|
|||||||
const editeng::SvxBorderLine* pCurLine,
|
const editeng::SvxBorderLine* pCurLine,
|
||||||
bool bValid );
|
bool bValid );
|
||||||
|
|
||||||
bool IsBorderLineStyleAllowed( sal_Int16 nStyle ) const;
|
bool IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const;
|
||||||
void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset );
|
void UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
|
|||||||
const SfxIntegerListItem* p = static_cast<const SfxIntegerListItem*>(pItem);
|
const SfxIntegerListItem* p = static_cast<const SfxIntegerListItem*>(pItem);
|
||||||
std::vector<sal_Int32> aUsedStyles = p->GetList();
|
std::vector<sal_Int32> aUsedStyles = p->GetList();
|
||||||
for (int aUsedStyle : aUsedStyles)
|
for (int aUsedStyle : aUsedStyles)
|
||||||
maUsedBorderStyles.insert(static_cast<sal_Int16>(aUsedStyle));
|
maUsedBorderStyles.insert(static_cast<SvxBorderLineStyle>(aUsedStyle));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rCoreAttrs.HasItem(SID_ATTR_BORDER_DEFAULT_WIDTH, &pItem))
|
if (rCoreAttrs.HasItem(SID_ATTR_BORDER_DEFAULT_WIDTH, &pItem))
|
||||||
@ -405,7 +405,7 @@ void SvxBorderTabPage::ResetFrameLine_Impl( svx::FrameBorderType eBorder, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SvxBorderTabPage::IsBorderLineStyleAllowed( sal_Int16 nStyle ) const
|
bool SvxBorderTabPage::IsBorderLineStyleAllowed( SvxBorderLineStyle nStyle ) const
|
||||||
{
|
{
|
||||||
if (maUsedBorderStyles.empty())
|
if (maUsedBorderStyles.empty())
|
||||||
// All border styles are allowed.
|
// All border styles are allowed.
|
||||||
@ -533,7 +533,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
|
|||||||
{
|
{
|
||||||
// Do all visible lines show the same line widths?
|
// Do all visible lines show the same line widths?
|
||||||
long nWidth;
|
long nWidth;
|
||||||
SvxBorderStyle nStyle;
|
SvxBorderLineStyle nStyle;
|
||||||
bool bWidthEq = m_pFrameSel->GetVisibleWidth( nWidth, nStyle );
|
bool bWidthEq = m_pFrameSel->GetVisibleWidth( nWidth, nStyle );
|
||||||
if( bWidthEq )
|
if( bWidthEq )
|
||||||
{
|
{
|
||||||
@ -912,7 +912,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, Edit&, void)
|
|||||||
m_pLbLineStyle->SetWidth( nVal );
|
m_pLbLineStyle->SetWidth( nVal );
|
||||||
|
|
||||||
m_pFrameSel->SetStyleToSelection( nVal,
|
m_pFrameSel->SetStyleToSelection( nVal,
|
||||||
SvxBorderStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
|
SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -925,7 +925,7 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox&, rLb, void )
|
|||||||
m_pLineWidthMF->GetDecimalDigits( ),
|
m_pLineWidthMF->GetDecimalDigits( ),
|
||||||
m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
|
m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
|
||||||
m_pFrameSel->SetStyleToSelection ( nVal,
|
m_pFrameSel->SetStyleToSelection ( nVal,
|
||||||
SvxBorderStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
|
SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1057,35 +1057,35 @@ void SvxBorderTabPage::FillLineListBox_Impl()
|
|||||||
using namespace ::com::sun::star::table::BorderLineStyle;
|
using namespace ::com::sun::star::table::BorderLineStyle;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
sal_Int16 mnStyle;
|
SvxBorderLineStyle mnStyle;
|
||||||
long mnMinWidth;
|
long mnMinWidth;
|
||||||
LineListBox::ColorFunc mpColor1Fn;
|
LineListBox::ColorFunc mpColor1Fn;
|
||||||
LineListBox::ColorFunc mpColor2Fn;
|
LineListBox::ColorFunc mpColor2Fn;
|
||||||
LineListBox::ColorDistFunc mpColorDistFn;
|
LineListBox::ColorDistFunc mpColorDistFn;
|
||||||
} aLines[] = {
|
} aLines[] = {
|
||||||
// Simple lines
|
// Simple lines
|
||||||
{ SOLID, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::SOLID, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ DOTTED, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DOTTED, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ DASHED, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DASHED, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ FINE_DASHED, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::FINE_DASHED, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ DASH_DOT, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DASH_DOT, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ DASH_DOT_DOT, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DASH_DOT_DOT, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
|
|
||||||
// Double lines
|
// Double lines
|
||||||
{ DOUBLE, 10, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DOUBLE, 10, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ DOUBLE_THIN, 10, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::DOUBLE_THIN, 10, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THINTHICK_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THINTHICK_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THINTHICK_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THINTHICK_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THINTHICK_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THINTHICK_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THICKTHIN_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THICKTHIN_SMALLGAP, 20, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THICKTHIN_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THICKTHIN_MEDIUMGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
{ THICKTHIN_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
{ SvxBorderLineStyle::THICKTHIN_LARGEGAP, 0, &sameColor, &sameColor, &sameDistColor },
|
||||||
|
|
||||||
{ EMBOSSED, 15, &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor, &lcl_mediumColor },
|
{ SvxBorderLineStyle::EMBOSSED, 15, &SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor, &lcl_mediumColor },
|
||||||
{ ENGRAVED, 15, &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor, &lcl_mediumColor },
|
{ SvxBorderLineStyle::ENGRAVED, 15, &SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor, &lcl_mediumColor },
|
||||||
|
|
||||||
{ OUTSET, 10, &SvxBorderLine::lightColor, &SvxBorderLine::darkColor, &sameDistColor },
|
{ SvxBorderLineStyle::OUTSET, 10, &SvxBorderLine::lightColor, &SvxBorderLine::darkColor, &sameDistColor },
|
||||||
{ INSET, 10, &SvxBorderLine::darkColor, &SvxBorderLine::lightColor, &sameDistColor }
|
{ SvxBorderLineStyle::INSET, 10, &SvxBorderLine::darkColor, &SvxBorderLine::lightColor, &sameDistColor }
|
||||||
};
|
};
|
||||||
|
|
||||||
m_pLbLineStyle->SetSourceUnit( FUNIT_TWIP );
|
m_pLbLineStyle->SetSourceUnit( FUNIT_TWIP );
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <test/bootstrapfixture.hxx>
|
#include <test/bootstrapfixture.hxx>
|
||||||
#include <vcl/vclptr.hxx>
|
#include <vcl/vclptr.hxx>
|
||||||
#include <vcl/virdev.hxx>
|
#include <vcl/virdev.hxx>
|
||||||
|
#include <editeng/borderline.hxx>
|
||||||
|
|
||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
|
|
||||||
@ -57,7 +58,7 @@ void DrawinglayerBorderTest::testDoubleDecompositionSolid()
|
|||||||
basegfx::BColor aColorLeft;
|
basegfx::BColor aColorLeft;
|
||||||
basegfx::BColor aColorGap;
|
basegfx::BColor aColorGap;
|
||||||
bool bHasGapColor = false;
|
bool bHasGapColor = false;
|
||||||
sal_Int16 nStyle = table::BorderLineStyle::DOUBLE;
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> aBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
|
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> aBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
|
||||||
|
|
||||||
// Decompose it into polygons.
|
// Decompose it into polygons.
|
||||||
@ -107,7 +108,7 @@ void DrawinglayerBorderTest::testDoublePixelProcessing()
|
|||||||
basegfx::BColor aColorLeft;
|
basegfx::BColor aColorLeft;
|
||||||
basegfx::BColor aColorGap;
|
basegfx::BColor aColorGap;
|
||||||
bool bHasGapColor = false;
|
bool bHasGapColor = false;
|
||||||
sal_Int16 nStyle = table::BorderLineStyle::DOUBLE;
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> xBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
|
rtl::Reference<drawinglayer::primitive2d::BorderLinePrimitive2D> xBorder(new drawinglayer::primitive2d::BorderLinePrimitive2D(aStart, aEnd, fLeftWidth, fDistance, fRightWidth, fExtendLeftStart, fExtendLeftEnd, fExtendRightStart, fExtendRightEnd, aColorRight, aColorLeft, aColorGap, bHasGapColor, nStyle));
|
||||||
drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
|
drawinglayer::primitive2d::Primitive2DContainer aPrimitives;
|
||||||
aPrimitives.push_back(drawinglayer::primitive2d::Primitive2DReference(xBorder.get()));
|
aPrimitives.push_back(drawinglayer::primitive2d::Primitive2DReference(xBorder.get()));
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
|
||||||
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
|
||||||
#include <svtools/borderhelper.hxx>
|
#include <svtools/borderhelper.hxx>
|
||||||
|
#include <editeng/borderline.hxx>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -240,7 +241,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
|
|||||||
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
|
const basegfx::B2DPoint aTmpEnd(getEnd() + (fExt * aVector));
|
||||||
|
|
||||||
// Get which is the line to show
|
// Get which is the line to show
|
||||||
bool bIsSolidline = mnStyle == css::table::BorderLineStyle::SOLID;
|
bool bIsSolidline = mnStyle == SvxBorderLineStyle::SOLID;
|
||||||
double nWidth = getLeftWidth();
|
double nWidth = getLeftWidth();
|
||||||
basegfx::BColor aColor = getRGBColorLeft();
|
basegfx::BColor aColor = getRGBColorLeft();
|
||||||
if ( basegfx::fTools::equal( 0.0, mfLeftWidth ) )
|
if ( basegfx::fTools::equal( 0.0, mfLeftWidth ) )
|
||||||
@ -333,7 +334,7 @@ primitive2d::Primitive2DReference makeSolidLinePrimitive(
|
|||||||
const basegfx::BColor& rRGBColorLeft,
|
const basegfx::BColor& rRGBColorLeft,
|
||||||
const basegfx::BColor& rRGBColorGap,
|
const basegfx::BColor& rRGBColorGap,
|
||||||
bool bHasGapColor,
|
bool bHasGapColor,
|
||||||
const short nStyle,
|
SvxBorderLineStyle nStyle,
|
||||||
double fPatternScale)
|
double fPatternScale)
|
||||||
: BufferedDecompositionPrimitive2D(),
|
: BufferedDecompositionPrimitive2D(),
|
||||||
maStart(rStart),
|
maStart(rStart),
|
||||||
|
@ -33,7 +33,7 @@ namespace drawinglayer
|
|||||||
const basegfx::BColor& rRGBColorLeft,
|
const basegfx::BColor& rRGBColorLeft,
|
||||||
const basegfx::BColor& rRGBColorGap,
|
const basegfx::BColor& rRGBColorGap,
|
||||||
bool bHasGapColor,
|
bool bHasGapColor,
|
||||||
const short nStyle,
|
SvxBorderLineStyle nStyle,
|
||||||
double fPatternScale)
|
double fPatternScale)
|
||||||
: BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth,
|
: BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth,
|
||||||
0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft,
|
0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft,
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
#include <toolkit/helper/vclunohelper.hxx>
|
#include <toolkit/helper/vclunohelper.hxx>
|
||||||
#include <vcl/window.hxx>
|
#include <vcl/window.hxx>
|
||||||
#include <svtools/borderhelper.hxx>
|
#include <svtools/borderhelper.hxx>
|
||||||
|
#include <editeng/borderline.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/table/BorderLineStyle.hpp>
|
#include <com/sun/star/table/BorderLineStyle.hpp>
|
||||||
|
|
||||||
@ -337,14 +338,14 @@ namespace drawinglayer
|
|||||||
|
|
||||||
switch (rSource.getStyle())
|
switch (rSource.getStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
case table::BorderLineStyle::DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
{
|
{
|
||||||
const basegfx::BColor aLineColor =
|
const basegfx::BColor aLineColor =
|
||||||
maBColorModifierStack.getModifiedColor(rSource.getRGBColorLeft());
|
maBColorModifierStack.getModifiedColor(rSource.getRGBColorLeft());
|
||||||
double nThick = rtl::math::round(rSource.getLeftWidth());
|
double nThick = rtl::math::round(rSource.getLeftWidth());
|
||||||
|
|
||||||
bool bDouble = rSource.getStyle() == table::BorderLineStyle::DOUBLE_THIN;
|
bool bDouble = rSource.getStyle() == SvxBorderLineStyle::DOUBLE_THIN;
|
||||||
|
|
||||||
basegfx::B2DPolygon aTarget;
|
basegfx::B2DPolygon aTarget;
|
||||||
|
|
||||||
@ -441,11 +442,11 @@ namespace drawinglayer
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
case table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
{
|
{
|
||||||
std::vector<double> aPattern =
|
std::vector<double> aPattern =
|
||||||
svtools::GetLineDashing(rSource.getStyle(), rSource.getPatternScale()*10.0);
|
svtools::GetLineDashing(rSource.getStyle(), rSource.getPatternScale()*10.0);
|
||||||
@ -1268,7 +1269,7 @@ namespace drawinglayer
|
|||||||
|
|
||||||
if (!tryDrawBorderLinePrimitive2DDirect(rBorder))
|
if (!tryDrawBorderLinePrimitive2DDirect(rBorder))
|
||||||
{
|
{
|
||||||
if (rBorder.getStyle() == table::BorderLineStyle::DOUBLE)
|
if (rBorder.getStyle() == SvxBorderLineStyle::DOUBLE)
|
||||||
{
|
{
|
||||||
primitive2d::Primitive2DContainer aContainer;
|
primitive2d::Primitive2DContainer aContainer;
|
||||||
rBorder.createDecomposition(aContainer, getViewInformation2D(), true);
|
rBorder.createDecomposition(aContainer, getViewInformation2D(), true);
|
||||||
|
@ -30,14 +30,14 @@ using namespace editeng;
|
|||||||
|
|
||||||
CPPUNIT_NS_BEGIN
|
CPPUNIT_NS_BEGIN
|
||||||
|
|
||||||
template<> struct assertion_traits<SvxBorderStyle>
|
template<> struct assertion_traits<SvxBorderLineStyle>
|
||||||
{
|
{
|
||||||
static bool equal( SvxBorderStyle x, SvxBorderStyle y )
|
static bool equal( SvxBorderLineStyle x, SvxBorderLineStyle y )
|
||||||
{
|
{
|
||||||
return x == y;
|
return x == y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string toString( SvxBorderStyle x )
|
static std::string toString( SvxBorderLineStyle x )
|
||||||
{
|
{
|
||||||
OStringStream ost;
|
OStringStream ost;
|
||||||
ost << static_cast<unsigned int>(x);
|
ost << static_cast<unsigned int>(x);
|
||||||
@ -75,8 +75,8 @@ void BorderLineTest::testGuessWidthDouble()
|
|||||||
{
|
{
|
||||||
// Normal double case
|
// Normal double case
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
|
line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE, TEST_WIDTH, TEST_WIDTH, TEST_WIDTH );
|
||||||
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetOutWidth()) );
|
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.GetInWidth()) );
|
||||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetDistance()) );
|
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, static_cast<long>(line.GetDistance()) );
|
||||||
@ -86,9 +86,9 @@ void BorderLineTest::testGuessWidthDouble()
|
|||||||
void BorderLineTest::testGuessWidthNoMatch()
|
void BorderLineTest::testGuessWidthNoMatch()
|
||||||
{
|
{
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( DOUBLE,
|
line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
|
||||||
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
|
TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 );
|
||||||
CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+1, static_cast<long>(line.GetOutWidth()) );
|
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+2, static_cast<long>(line.GetInWidth()) );
|
||||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast<long>(line.GetDistance()));
|
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH+3, static_cast<long>(line.GetDistance()));
|
||||||
@ -98,11 +98,11 @@ void BorderLineTest::testGuessWidthNoMatch()
|
|||||||
void BorderLineTest::testGuessWidthThinthickSmallgap()
|
void BorderLineTest::testGuessWidthThinthickSmallgap()
|
||||||
{
|
{
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( DOUBLE,
|
line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
|
||||||
THINTHICKSG_OUT_WIDTH,
|
THINTHICKSG_OUT_WIDTH,
|
||||||
THINTHICKSG_IN_WIDTH,
|
THINTHICKSG_IN_WIDTH,
|
||||||
THINTHICKSG_DIST_WIDTH );
|
THINTHICKSG_DIST_WIDTH );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_SMALLGAP, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_OUT_WIDTH,
|
||||||
static_cast<long>(line.GetOutWidth()) );
|
static_cast<long>(line.GetOutWidth()) );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_IN_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKSG_IN_WIDTH,
|
||||||
@ -116,11 +116,11 @@ void BorderLineTest::testGuessWidthThinthickSmallgap()
|
|||||||
void BorderLineTest::testGuessWidthThinthickLargegap()
|
void BorderLineTest::testGuessWidthThinthickLargegap()
|
||||||
{
|
{
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( DOUBLE,
|
line.GuessLinesWidths( SvxBorderLineStyle::DOUBLE,
|
||||||
THINTHICKLG_OUT_WIDTH,
|
THINTHICKLG_OUT_WIDTH,
|
||||||
THINTHICKLG_IN_WIDTH,
|
THINTHICKLG_IN_WIDTH,
|
||||||
THINTHICKLG_DIST_WIDTH );
|
THINTHICKLG_DIST_WIDTH );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
|
||||||
static_cast<long>(line.GetOutWidth()) );
|
static_cast<long>(line.GetOutWidth()) );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
|
||||||
@ -134,11 +134,11 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
|
|||||||
void BorderLineTest::testGuessWidthNostyleDouble()
|
void BorderLineTest::testGuessWidthNostyleDouble()
|
||||||
{
|
{
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( css::table::BorderLineStyle::NONE,
|
line.GuessLinesWidths( SvxBorderLineStyle::NONE,
|
||||||
THINTHICKLG_OUT_WIDTH,
|
THINTHICKLG_OUT_WIDTH,
|
||||||
THINTHICKLG_IN_WIDTH,
|
THINTHICKLG_IN_WIDTH,
|
||||||
THINTHICKLG_DIST_WIDTH );
|
THINTHICKLG_DIST_WIDTH );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::THINTHICK_LARGEGAP, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_OUT_WIDTH,
|
||||||
static_cast<long>(line.GetOutWidth()) );
|
static_cast<long>(line.GetOutWidth()) );
|
||||||
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
|
CPPUNIT_ASSERT_EQUAL( THINTHICKLG_IN_WIDTH,
|
||||||
@ -152,8 +152,8 @@ void BorderLineTest::testGuessWidthNostyleDouble()
|
|||||||
void BorderLineTest::testGuessWidthNostyleSingle()
|
void BorderLineTest::testGuessWidthNostyleSingle()
|
||||||
{
|
{
|
||||||
SvxBorderLine line;
|
SvxBorderLine line;
|
||||||
line.GuessLinesWidths( css::table::BorderLineStyle::NONE, TEST_WIDTH );
|
line.GuessLinesWidths( SvxBorderLineStyle::NONE, TEST_WIDTH );
|
||||||
CPPUNIT_ASSERT_EQUAL( SOLID, line.GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::SOLID, line.GetBorderLineStyle() );
|
||||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
|
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ Color SvxBorderLine::threeDMediumColor( Color aMain )
|
|||||||
}
|
}
|
||||||
|
|
||||||
SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
|
SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
|
||||||
SvxBorderStyle nStyle,
|
SvxBorderLineStyle nStyle,
|
||||||
Color (*pColorOutFn)( Color ), Color (*pColorInFn)( Color ) )
|
Color (*pColorOutFn)( Color ), Color (*pColorInFn)( Color ) )
|
||||||
: m_nWidth( nWidth )
|
: m_nWidth( nWidth )
|
||||||
, m_bMirrorWidths( false )
|
, m_bMirrorWidths( false )
|
||||||
@ -108,7 +108,7 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, long nWidth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SvxBorderStyle
|
SvxBorderLineStyle
|
||||||
ConvertBorderStyleFromWord(int const nWordLineStyle)
|
ConvertBorderStyleFromWord(int const nWordLineStyle)
|
||||||
{
|
{
|
||||||
switch (nWordLineStyle)
|
switch (nWordLineStyle)
|
||||||
@ -119,50 +119,50 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
|
|||||||
case 5: // hairline
|
case 5: // hairline
|
||||||
// and the unsupported special cases which we map to a single line
|
// and the unsupported special cases which we map to a single line
|
||||||
case 20:
|
case 20:
|
||||||
return SOLID;
|
return SvxBorderLineStyle::SOLID;
|
||||||
case 6:
|
case 6:
|
||||||
return DOTTED;
|
return SvxBorderLineStyle::DOTTED;
|
||||||
case 7:
|
case 7:
|
||||||
return DASHED;
|
return SvxBorderLineStyle::DASHED;
|
||||||
case 22:
|
case 22:
|
||||||
return FINE_DASHED;
|
return SvxBorderLineStyle::FINE_DASHED;
|
||||||
case 8:
|
case 8:
|
||||||
return DASH_DOT;
|
return SvxBorderLineStyle::DASH_DOT;
|
||||||
case 9:
|
case 9:
|
||||||
return DASH_DOT_DOT;
|
return SvxBorderLineStyle::DASH_DOT_DOT;
|
||||||
// then the shading beams which we represent by a double line
|
// then the shading beams which we represent by a double line
|
||||||
case 23:
|
case 23:
|
||||||
return DOUBLE;
|
return SvxBorderLineStyle::DOUBLE;
|
||||||
// then the double lines, for which we have good matches
|
// then the double lines, for which we have good matches
|
||||||
case 3:
|
case 3:
|
||||||
case 10: // Don't have triple so use double
|
case 10: // Don't have triple so use double
|
||||||
case 21: // Don't have double wave: use double instead
|
case 21: // Don't have double wave: use double instead
|
||||||
return DOUBLE;
|
return SvxBorderLineStyle::DOUBLE;
|
||||||
case 11:
|
case 11:
|
||||||
return THINTHICK_SMALLGAP;
|
return SvxBorderLineStyle::THINTHICK_SMALLGAP;
|
||||||
case 12:
|
case 12:
|
||||||
case 13: // Don't have thin thick thin, so use thick thin
|
case 13: // Don't have thin thick thin, so use thick thin
|
||||||
return THICKTHIN_SMALLGAP;
|
return SvxBorderLineStyle::THICKTHIN_SMALLGAP;
|
||||||
case 14:
|
case 14:
|
||||||
return THINTHICK_MEDIUMGAP;
|
return SvxBorderLineStyle::THINTHICK_MEDIUMGAP;
|
||||||
case 15:
|
case 15:
|
||||||
case 16: // Don't have thin thick thin, so use thick thin
|
case 16: // Don't have thin thick thin, so use thick thin
|
||||||
return THICKTHIN_MEDIUMGAP;
|
return SvxBorderLineStyle::THICKTHIN_MEDIUMGAP;
|
||||||
case 17:
|
case 17:
|
||||||
return THINTHICK_LARGEGAP;
|
return SvxBorderLineStyle::THINTHICK_LARGEGAP;
|
||||||
case 18:
|
case 18:
|
||||||
case 19: // Don't have thin thick thin, so use thick thin
|
case 19: // Don't have thin thick thin, so use thick thin
|
||||||
return THICKTHIN_LARGEGAP;
|
return SvxBorderLineStyle::THICKTHIN_LARGEGAP;
|
||||||
case 24:
|
case 24:
|
||||||
return EMBOSSED;
|
return SvxBorderLineStyle::EMBOSSED;
|
||||||
case 25:
|
case 25:
|
||||||
return ENGRAVED;
|
return SvxBorderLineStyle::ENGRAVED;
|
||||||
case 26:
|
case 26:
|
||||||
return OUTSET;
|
return SvxBorderLineStyle::OUTSET;
|
||||||
case 27:
|
case 27:
|
||||||
return INSET;
|
return SvxBorderLineStyle::INSET;
|
||||||
default:
|
default:
|
||||||
return css::table::BorderLineStyle::NONE;
|
return SvxBorderLineStyle::NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ static const double OUTSET_line1 = 15.0;
|
|||||||
static const double INSET_line2 = 15.0;
|
static const double INSET_line2 = 15.0;
|
||||||
|
|
||||||
double
|
double
|
||||||
ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
|
ConvertBorderWidthFromWord(SvxBorderLineStyle const eStyle, double const i_fWidth,
|
||||||
int const nWordLineStyle)
|
int const nWordLineStyle)
|
||||||
{
|
{
|
||||||
// fdo#68779: at least for RTF, 0.75pt is the default if width is missing
|
// fdo#68779: at least for RTF, 0.75pt is the default if width is missing
|
||||||
@ -186,7 +186,7 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
|
|||||||
switch (eStyle)
|
switch (eStyle)
|
||||||
{
|
{
|
||||||
// Single lines
|
// Single lines
|
||||||
case SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
switch (nWordLineStyle)
|
switch (nWordLineStyle)
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
@ -198,42 +198,42 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
case DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
return fWidth;
|
return fWidth;
|
||||||
|
|
||||||
// Display a minimum effective border width of 1pt
|
// Display a minimum effective border width of 1pt
|
||||||
case FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
return (fWidth > 0 && fWidth < 20) ? 20 : fWidth;
|
return (fWidth > 0 && fWidth < 20) ? 20 : fWidth;
|
||||||
|
|
||||||
// Double lines
|
// Double lines
|
||||||
case DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
return fWidth * 3.0;
|
return fWidth * 3.0;
|
||||||
|
|
||||||
case THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
case ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
return fWidth * 2.0;
|
return fWidth * 2.0;
|
||||||
|
|
||||||
case THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
return fWidth + THINTHICK_SMALLGAP_line2 + THINTHICK_SMALLGAP_gap;
|
return fWidth + THINTHICK_SMALLGAP_line2 + THINTHICK_SMALLGAP_gap;
|
||||||
|
|
||||||
case THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
return fWidth + THINTHICK_LARGEGAP_line1 + THINTHICK_LARGEGAP_line2;
|
return fWidth + THINTHICK_LARGEGAP_line1 + THINTHICK_LARGEGAP_line2;
|
||||||
|
|
||||||
case THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
return fWidth + THICKTHIN_SMALLGAP_line1 + THICKTHIN_SMALLGAP_gap;
|
return fWidth + THICKTHIN_SMALLGAP_line1 + THICKTHIN_SMALLGAP_gap;
|
||||||
|
|
||||||
case THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
return fWidth + THICKTHIN_LARGEGAP_line1 + THICKTHIN_LARGEGAP_line2;
|
return fWidth + THICKTHIN_LARGEGAP_line1 + THICKTHIN_LARGEGAP_line2;
|
||||||
|
|
||||||
case OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
return (fWidth * 2.0) + OUTSET_line1;
|
return (fWidth * 2.0) + OUTSET_line1;
|
||||||
|
|
||||||
case INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
return (fWidth * 2.0) + INSET_line2;
|
return (fWidth * 2.0) + INSET_line2;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -243,49 +243,49 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
|
|||||||
}
|
}
|
||||||
|
|
||||||
double
|
double
|
||||||
ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
|
ConvertBorderWidthToWord(SvxBorderLineStyle const eStyle, double const fWidth)
|
||||||
{
|
{
|
||||||
switch (eStyle)
|
switch (eStyle)
|
||||||
{
|
{
|
||||||
// Single lines
|
// Single lines
|
||||||
case SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
case DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
case DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
case DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
return fWidth;
|
return fWidth;
|
||||||
|
|
||||||
// Double lines
|
// Double lines
|
||||||
case DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
case DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
return fWidth / 3.0;
|
return fWidth / 3.0;
|
||||||
|
|
||||||
case THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
case ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
return fWidth / 2.0;
|
return fWidth / 2.0;
|
||||||
|
|
||||||
case THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
return fWidth - THINTHICK_SMALLGAP_line2 - THINTHICK_SMALLGAP_gap;
|
return fWidth - THINTHICK_SMALLGAP_line2 - THINTHICK_SMALLGAP_gap;
|
||||||
|
|
||||||
case THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
return fWidth - THINTHICK_LARGEGAP_line1 - THINTHICK_LARGEGAP_line2;
|
return fWidth - THINTHICK_LARGEGAP_line1 - THINTHICK_LARGEGAP_line2;
|
||||||
|
|
||||||
case THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
return fWidth - THICKTHIN_SMALLGAP_line1 - THICKTHIN_SMALLGAP_gap;
|
return fWidth - THICKTHIN_SMALLGAP_line1 - THICKTHIN_SMALLGAP_gap;
|
||||||
|
|
||||||
case THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
return fWidth - THICKTHIN_LARGEGAP_line1 - THICKTHIN_LARGEGAP_line2;
|
return fWidth - THICKTHIN_LARGEGAP_line1 - THICKTHIN_LARGEGAP_line2;
|
||||||
|
|
||||||
case OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
return (fWidth - OUTSET_line1) / 2.0;
|
return (fWidth - OUTSET_line1) / 2.0;
|
||||||
|
|
||||||
case INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
return (fWidth - INSET_line2) / 2.0;
|
return (fWidth - INSET_line2) / 2.0;
|
||||||
|
|
||||||
case css::table::BorderLineStyle::NONE:
|
case SvxBorderLineStyle::NONE:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -298,30 +298,30 @@ ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
|
|||||||
units handled by the resulting object are Twips and the
|
units handled by the resulting object are Twips and the
|
||||||
BorderWidthImpl::GetLine1() corresponds to the Outer Line.
|
BorderWidthImpl::GetLine1() corresponds to the Outer Line.
|
||||||
*/
|
*/
|
||||||
BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
|
BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderLineStyle nStyle )
|
||||||
{
|
{
|
||||||
BorderWidthImpl aImpl;
|
BorderWidthImpl aImpl;
|
||||||
|
|
||||||
switch ( nStyle )
|
switch ( nStyle )
|
||||||
{
|
{
|
||||||
// No line: no width
|
// No line: no width
|
||||||
case css::table::BorderLineStyle::NONE:
|
case SvxBorderLineStyle::NONE:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::FIXED, 0.0 );
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::FIXED, 0.0 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Single lines
|
// Single lines
|
||||||
case SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
case DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
case DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
case DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0 );
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Double lines
|
// Double lines
|
||||||
|
|
||||||
case DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
// fdo#46112 fdo#38542 fdo#43249:
|
// fdo#46112 fdo#38542 fdo#43249:
|
||||||
@ -329,38 +329,38 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
|
|||||||
1.0/3.0, 1.0/3.0, 1.0/3.0 );
|
1.0/3.0, 1.0/3.0, 1.0/3.0 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
aImpl = BorderWidthImpl(BorderWidthImplFlags::CHANGE_DIST, 10.0, 10.0, 1.0);
|
aImpl = BorderWidthImpl(BorderWidthImplFlags::CHANGE_DIST, 10.0, 10.0, 1.0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0,
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE1, 1.0,
|
||||||
THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap );
|
THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
0.5, 0.25, 0.25 );
|
0.5, 0.25, 0.25 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST,
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST,
|
||||||
THINTHICK_LARGEGAP_line1, THINTHICK_LARGEGAP_line2, 1.0 );
|
THINTHICK_LARGEGAP_line1, THINTHICK_LARGEGAP_line2, 1.0 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE2, THICKTHIN_SMALLGAP_line1,
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_LINE2, THICKTHIN_SMALLGAP_line1,
|
||||||
1.0, THICKTHIN_SMALLGAP_gap );
|
1.0, THICKTHIN_SMALLGAP_gap );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
0.25, 0.5, 0.25 );
|
0.25, 0.5, 0.25 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST, THICKTHIN_LARGEGAP_line1,
|
aImpl = BorderWidthImpl( BorderWidthImplFlags::CHANGE_DIST, THICKTHIN_LARGEGAP_line1,
|
||||||
THICKTHIN_LARGEGAP_line2, 1.0 );
|
THICKTHIN_LARGEGAP_line2, 1.0 );
|
||||||
break;
|
break;
|
||||||
@ -371,8 +371,8 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
|
|||||||
* 0.75pt up to 3pt and then 3pt
|
* 0.75pt up to 3pt and then 3pt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
case EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
case ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
0.25, 0.25, 0.5 );
|
0.25, 0.25, 0.5 );
|
||||||
@ -383,13 +383,13 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
|
|||||||
* Word compat: the gap width should be measured relatively to the biggest width for the
|
* Word compat: the gap width should be measured relatively to the biggest width for the
|
||||||
* row or column.
|
* row or column.
|
||||||
*/
|
*/
|
||||||
case OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE2 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
OUTSET_line1, 0.5, 0.5 );
|
OUTSET_line1, 0.5, 0.5 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
aImpl = BorderWidthImpl(
|
aImpl = BorderWidthImpl(
|
||||||
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_DIST,
|
BorderWidthImplFlags::CHANGE_LINE1 | BorderWidthImplFlags::CHANGE_DIST,
|
||||||
0.5, INSET_line2, 0.5 );
|
0.5, INSET_line2, 0.5 );
|
||||||
@ -429,32 +429,32 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
|
|||||||
m_nDiv = nDiv;
|
m_nDiv = nDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
|
void SvxBorderLine::GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
|
||||||
{
|
{
|
||||||
if (css::table::BorderLineStyle::NONE == nStyle)
|
if (SvxBorderLineStyle::NONE == nStyle)
|
||||||
{
|
{
|
||||||
nStyle = SOLID;
|
nStyle = SvxBorderLineStyle::SOLID;
|
||||||
if ( nOut > 0 && nIn > 0 )
|
if ( nOut > 0 && nIn > 0 )
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( nStyle == DOUBLE )
|
if ( nStyle == SvxBorderLineStyle::DOUBLE )
|
||||||
{
|
{
|
||||||
static const SvxBorderStyle aDoubleStyles[] =
|
static const SvxBorderLineStyle aDoubleStyles[] =
|
||||||
{
|
{
|
||||||
DOUBLE,
|
SvxBorderLineStyle::DOUBLE,
|
||||||
DOUBLE_THIN,
|
SvxBorderLineStyle::DOUBLE_THIN,
|
||||||
THINTHICK_SMALLGAP,
|
SvxBorderLineStyle::THINTHICK_SMALLGAP,
|
||||||
THINTHICK_MEDIUMGAP,
|
SvxBorderLineStyle::THINTHICK_MEDIUMGAP,
|
||||||
THINTHICK_LARGEGAP,
|
SvxBorderLineStyle::THINTHICK_LARGEGAP,
|
||||||
THICKTHIN_SMALLGAP,
|
SvxBorderLineStyle::THICKTHIN_SMALLGAP,
|
||||||
THICKTHIN_MEDIUMGAP,
|
SvxBorderLineStyle::THICKTHIN_MEDIUMGAP,
|
||||||
THICKTHIN_LARGEGAP
|
SvxBorderLineStyle::THICKTHIN_LARGEGAP
|
||||||
};
|
};
|
||||||
|
|
||||||
static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
|
static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
|
||||||
long nWidth = 0;
|
long nWidth = 0;
|
||||||
SvxBorderStyle nTestStyle(css::table::BorderLineStyle::NONE);
|
SvxBorderLineStyle nTestStyle(SvxBorderLineStyle::NONE);
|
||||||
for (size_t i = 0; i < len && nWidth == 0; ++i)
|
for (size_t i = 0; i < len && nWidth == 0; ++i)
|
||||||
{
|
{
|
||||||
nTestStyle = aDoubleStyles[i];
|
nTestStyle = aDoubleStyles[i];
|
||||||
@ -494,12 +494,12 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
|
|||||||
// and returns a 0 width.
|
// and returns a 0 width.
|
||||||
switch (nStyle)
|
switch (nStyle)
|
||||||
{
|
{
|
||||||
case SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
case DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
case DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
case DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
std::swap( nOut, nIn);
|
std::swap( nOut, nIn);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -545,32 +545,32 @@ bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
|
|||||||
( m_pColorGapFn == rCmp.m_pColorGapFn ) );
|
( m_pColorGapFn == rCmp.m_pColorGapFn ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SvxBorderLine::SetBorderLineStyle( SvxBorderStyle nNew )
|
void SvxBorderLine::SetBorderLineStyle( SvxBorderLineStyle nNew )
|
||||||
{
|
{
|
||||||
m_nStyle = nNew;
|
m_nStyle = nNew;
|
||||||
m_aWidthImpl = getWidthImpl( m_nStyle );
|
m_aWidthImpl = getWidthImpl( m_nStyle );
|
||||||
|
|
||||||
switch ( nNew )
|
switch ( nNew )
|
||||||
{
|
{
|
||||||
case EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
m_pColorOutFn = threeDLightColor;
|
m_pColorOutFn = threeDLightColor;
|
||||||
m_pColorInFn = threeDDarkColor;
|
m_pColorInFn = threeDDarkColor;
|
||||||
m_pColorGapFn = threeDMediumColor;
|
m_pColorGapFn = threeDMediumColor;
|
||||||
m_bUseLeftTop = true;
|
m_bUseLeftTop = true;
|
||||||
break;
|
break;
|
||||||
case ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
m_pColorOutFn = threeDDarkColor;
|
m_pColorOutFn = threeDDarkColor;
|
||||||
m_pColorInFn = threeDLightColor;
|
m_pColorInFn = threeDLightColor;
|
||||||
m_pColorGapFn = threeDMediumColor;
|
m_pColorGapFn = threeDMediumColor;
|
||||||
m_bUseLeftTop = true;
|
m_bUseLeftTop = true;
|
||||||
break;
|
break;
|
||||||
case OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
m_pColorOutFn = lightColor;
|
m_pColorOutFn = lightColor;
|
||||||
m_pColorInFn = darkColor;
|
m_pColorInFn = darkColor;
|
||||||
m_bUseLeftTop = true;
|
m_bUseLeftTop = true;
|
||||||
m_pColorGapFn = nullptr;
|
m_pColorGapFn = nullptr;
|
||||||
break;
|
break;
|
||||||
case INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
m_pColorOutFn = darkColor;
|
m_pColorOutFn = darkColor;
|
||||||
m_pColorInFn = lightColor;
|
m_pColorInFn = lightColor;
|
||||||
m_bUseLeftTop = true;
|
m_bUseLeftTop = true;
|
||||||
@ -660,9 +660,9 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
|
|||||||
};
|
};
|
||||||
OUString aStr = "(" + ::GetColorString( aColor ) + OUString(cpDelim);
|
OUString aStr = "(" + ::GetColorString( aColor ) + OUString(cpDelim);
|
||||||
|
|
||||||
if ( m_nStyle < int(SAL_N_ELEMENTS(aStyleIds)) )
|
if ( (int)m_nStyle < int(SAL_N_ELEMENTS(aStyleIds)) )
|
||||||
{
|
{
|
||||||
sal_uInt16 nResId = aStyleIds[m_nStyle];
|
sal_uInt16 nResId = aStyleIds[(int)m_nStyle];
|
||||||
aStr += EE_RESSTR(nResId);
|
aStr += EE_RESSTR(nResId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -111,7 +111,7 @@ namespace
|
|||||||
.WriteUInt16( l.GetDistance() );
|
.WriteUInt16( l.GetDistance() );
|
||||||
|
|
||||||
if (version >= BORDER_LINE_WITH_STYLE_VERSION)
|
if (version >= BORDER_LINE_WITH_STYLE_VERSION)
|
||||||
stream.WriteUInt16( l.GetBorderLineStyle() );
|
stream.WriteUInt16( (sal_uInt16)l.GetBorderLineStyle() );
|
||||||
|
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ namespace
|
|||||||
stream.ReadUInt16( nStyle );
|
stream.ReadUInt16( nStyle );
|
||||||
|
|
||||||
SvxBorderLine border(&aColor);
|
SvxBorderLine border(&aColor);
|
||||||
border.GuessLinesWidths(nStyle, nOutline, nInline, nDistance);
|
border.GuessLinesWidths((SvxBorderLineStyle)nStyle, nOutline, nInline, nDistance);
|
||||||
return border;
|
return border;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1671,7 +1671,7 @@ table::BorderLine2 SvxBoxItem::SvxLineToLine(const SvxBorderLine* pLine, bool bC
|
|||||||
aLine.InnerLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetInWidth() ): pLine->GetInWidth() );
|
aLine.InnerLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetInWidth() ): pLine->GetInWidth() );
|
||||||
aLine.OuterLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetOutWidth()): pLine->GetOutWidth() );
|
aLine.OuterLineWidth = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetOutWidth()): pLine->GetOutWidth() );
|
||||||
aLine.LineDistance = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetDistance()): pLine->GetDistance() );
|
aLine.LineDistance = sal_uInt16( bConvert ? convertTwipToMm100(pLine->GetDistance()): pLine->GetDistance() );
|
||||||
aLine.LineStyle = pLine->GetBorderLineStyle();
|
aLine.LineStyle = sal_Int16(pLine->GetBorderLineStyle());
|
||||||
aLine.LineWidth = sal_uInt32( bConvert ? convertTwipToMm100( pLine->GetWidth( ) ) : pLine->GetWidth( ) );
|
aLine.LineWidth = sal_uInt32( bConvert ? convertTwipToMm100( pLine->GetWidth( ) ) : pLine->GetWidth( ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1786,10 +1786,10 @@ bool SvxBoxItem::LineToSvxLine(const css::table::BorderLine& rLine, SvxBorderLin
|
|||||||
bool
|
bool
|
||||||
SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, bool bConvert)
|
SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& rSvxLine, bool bConvert)
|
||||||
{
|
{
|
||||||
SvxBorderStyle const nStyle =
|
SvxBorderLineStyle const nStyle =
|
||||||
(rLine.LineStyle < 0 || BORDER_LINE_STYLE_MAX < rLine.LineStyle)
|
(rLine.LineStyle < 0 || BORDER_LINE_STYLE_MAX < rLine.LineStyle)
|
||||||
? SOLID // default
|
? SvxBorderLineStyle::SOLID // default
|
||||||
: rLine.LineStyle;
|
: (SvxBorderLineStyle)rLine.LineStyle;
|
||||||
|
|
||||||
rSvxLine.SetBorderLineStyle( nStyle );
|
rSvxLine.SetBorderLineStyle( nStyle );
|
||||||
|
|
||||||
@ -1799,7 +1799,7 @@ SvxBoxItem::LineToSvxLine(const css::table::BorderLine2& rLine, SvxBorderLine& r
|
|||||||
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
|
rSvxLine.SetWidth( bConvert? convertMm100ToTwip( rLine.LineWidth ) : rLine.LineWidth );
|
||||||
// fdo#46112: double does not necessarily mean symmetric
|
// fdo#46112: double does not necessarily mean symmetric
|
||||||
// for backwards compatibility
|
// for backwards compatibility
|
||||||
bGuessWidth = ((DOUBLE == nStyle || DOUBLE_THIN == nStyle)) &&
|
bGuessWidth = ((SvxBorderLineStyle::DOUBLE == nStyle || SvxBorderLineStyle::DOUBLE_THIN == nStyle)) &&
|
||||||
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
|
(rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1924,17 +1924,17 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
|||||||
{
|
{
|
||||||
drawing::LineStyle eDrawingStyle;
|
drawing::LineStyle eDrawingStyle;
|
||||||
rVal >>= eDrawingStyle;
|
rVal >>= eDrawingStyle;
|
||||||
editeng::SvxBorderStyle eBorderStyle = css::table::BorderLineStyle::NONE;
|
SvxBorderLineStyle eBorderStyle = SvxBorderLineStyle::NONE;
|
||||||
switch ( eDrawingStyle )
|
switch ( eDrawingStyle )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case drawing::LineStyle_NONE:
|
case drawing::LineStyle_NONE:
|
||||||
break;
|
break;
|
||||||
case drawing::LineStyle_SOLID:
|
case drawing::LineStyle_SOLID:
|
||||||
eBorderStyle = SOLID;
|
eBorderStyle = SvxBorderLineStyle::SOLID;
|
||||||
break;
|
break;
|
||||||
case drawing::LineStyle_DASH:
|
case drawing::LineStyle_DASH:
|
||||||
eBorderStyle = DASHED;
|
eBorderStyle = SvxBorderLineStyle::DASHED;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2669,7 +2669,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
|
|||||||
Color aColor;
|
Color aColor;
|
||||||
ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
|
ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
|
||||||
SvxBorderLine aBorder( &aColor );
|
SvxBorderLine aBorder( &aColor );
|
||||||
aBorder.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
|
aBorder.GuessLinesWidths(SvxBorderLineStyle::NONE, nOutline, nInline, nDistance);
|
||||||
|
|
||||||
switch( cLine )
|
switch( cLine )
|
||||||
{
|
{
|
||||||
@ -3166,7 +3166,7 @@ bool SvxLineItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemId )
|
|||||||
{
|
{
|
||||||
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
|
case MID_FG_COLOR: pLine->SetColor( Color(nVal) ); break;
|
||||||
case MID_LINE_STYLE:
|
case MID_LINE_STYLE:
|
||||||
pLine->SetBorderLineStyle(static_cast<SvxBorderStyle>(nVal));
|
pLine->SetBorderLineStyle(static_cast<SvxBorderLineStyle>(nVal));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
OSL_FAIL( "Wrong MemberId" );
|
OSL_FAIL( "Wrong MemberId" );
|
||||||
@ -3237,7 +3237,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
|
|||||||
if( nOutline )
|
if( nOutline )
|
||||||
{
|
{
|
||||||
SvxBorderLine aLine( &aColor );
|
SvxBorderLine aLine( &aColor );
|
||||||
aLine.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
|
aLine.GuessLinesWidths(SvxBorderLineStyle::NONE, nOutline, nInline, nDistance);
|
||||||
_pLine->SetLine( &aLine );
|
_pLine->SetLine( &aLine );
|
||||||
}
|
}
|
||||||
return _pLine;
|
return _pLine;
|
||||||
|
@ -1453,49 +1453,49 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
|
|||||||
}
|
}
|
||||||
|
|
||||||
case RTF_BRDRDOT: // dotted border
|
case RTF_BRDRDOT: // dotted border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::DOTTED);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRDASH: // dashed border
|
case RTF_BRDRDASH: // dashed border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::DASHED);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::DASHED);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRHAIR: // hairline border
|
case RTF_BRDRHAIR: // hairline border
|
||||||
{
|
{
|
||||||
aBrd.SetBorderLineStyle( table::BorderLineStyle::SOLID);
|
aBrd.SetBorderLineStyle( SvxBorderLineStyle::SOLID);
|
||||||
aBrd.SetWidth( DEF_LINE_WIDTH_0 );
|
aBrd.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRDB: // Double border
|
case RTF_BRDRDB: // Double border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRINSET: // inset border
|
case RTF_BRDRINSET: // inset border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::INSET);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::INSET);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDROUTSET: // outset border
|
case RTF_BRDROUTSET: // outset border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::OUTSET);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTNTHSG: // ThinThick Small gap
|
case RTF_BRDRTNTHSG: // ThinThick Small gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_SMALLGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTNTHMG: // ThinThick Medium gap
|
case RTF_BRDRTNTHMG: // ThinThick Medium gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_MEDIUMGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_MEDIUMGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTNTHLG: // ThinThick Large gap
|
case RTF_BRDRTNTHLG: // ThinThick Large gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_LARGEGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_LARGEGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTHTNSG: // ThickThin Small gap
|
case RTF_BRDRTHTNSG: // ThickThin Small gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_SMALLGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTHTNMG: // ThickThin Medium gap
|
case RTF_BRDRTHTNMG: // ThickThin Medium gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_MEDIUMGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_MEDIUMGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRTHTNLG: // ThickThin Large gap
|
case RTF_BRDRTHTNLG: // ThickThin Large gap
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_LARGEGAP);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_LARGEGAP);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDREMBOSS: // Embossed border
|
case RTF_BRDREMBOSS: // Embossed border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::EMBOSSED);
|
||||||
break;
|
break;
|
||||||
case RTF_BRDRENGRAVE: // Engraved border
|
case RTF_BRDRENGRAVE: // Engraved border
|
||||||
aBrd.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
|
aBrd.SetBorderLineStyle(SvxBorderLineStyle::ENGRAVED);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RTF_BRDRS: // single thickness border
|
case RTF_BRDRS: // single thickness border
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
#include <basegfx/matrix/b2dhommatrix.hxx>
|
#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||||
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/table/BorderLineStyle.hpp>
|
enum class SvxBorderLineStyle : sal_Int16;
|
||||||
|
|
||||||
|
|
||||||
namespace drawinglayer
|
namespace drawinglayer
|
||||||
{
|
{
|
||||||
@ -66,7 +65,7 @@ namespace drawinglayer
|
|||||||
basegfx::BColor maRGBColorGap;
|
basegfx::BColor maRGBColorGap;
|
||||||
bool mbHasGapColor;
|
bool mbHasGapColor;
|
||||||
|
|
||||||
short mnStyle;
|
SvxBorderLineStyle mnStyle;
|
||||||
|
|
||||||
double mfPatternScale;
|
double mfPatternScale;
|
||||||
|
|
||||||
@ -107,7 +106,7 @@ namespace drawinglayer
|
|||||||
const basegfx::BColor& rRGBColorLeft,
|
const basegfx::BColor& rRGBColorLeft,
|
||||||
const basegfx::BColor& rRGBColorGap,
|
const basegfx::BColor& rRGBColorGap,
|
||||||
bool bHasGapColor,
|
bool bHasGapColor,
|
||||||
const short nStyle,
|
SvxBorderLineStyle nStyle,
|
||||||
double fPatternScale = 1.0 );
|
double fPatternScale = 1.0 );
|
||||||
|
|
||||||
/// data read access
|
/// data read access
|
||||||
@ -124,7 +123,7 @@ namespace drawinglayer
|
|||||||
const basegfx::BColor& getRGBColorLeft () const { return maRGBColorLeft; }
|
const basegfx::BColor& getRGBColorLeft () const { return maRGBColorLeft; }
|
||||||
const basegfx::BColor& getRGBColorGap () const { return maRGBColorGap; }
|
const basegfx::BColor& getRGBColorGap () const { return maRGBColorGap; }
|
||||||
bool hasGapColor( ) const { return mbHasGapColor; }
|
bool hasGapColor( ) const { return mbHasGapColor; }
|
||||||
short getStyle () const { return mnStyle; }
|
SvxBorderLineStyle getStyle () const { return mnStyle; }
|
||||||
double getPatternScale() const { return mfPatternScale; }
|
double getPatternScale() const { return mfPatternScale; }
|
||||||
/// Same as create2DDecomposition(), but can do pixel correction if requested.
|
/// Same as create2DDecomposition(), but can do pixel correction if requested.
|
||||||
void createDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation, bool bPixelCorrection) const;
|
void createDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& rViewInformation, bool bPixelCorrection) const;
|
||||||
|
@ -46,7 +46,7 @@ namespace drawinglayer
|
|||||||
const basegfx::BColor& rRGBColorLeft,
|
const basegfx::BColor& rRGBColorLeft,
|
||||||
const basegfx::BColor& rRGBColorGap,
|
const basegfx::BColor& rRGBColorGap,
|
||||||
bool bHasGapColor,
|
bool bHasGapColor,
|
||||||
const short nStyle,
|
SvxBorderLineStyle nStyle,
|
||||||
double fPatternScale );
|
double fPatternScale );
|
||||||
|
|
||||||
/// compare operator
|
/// compare operator
|
||||||
|
@ -37,118 +37,206 @@
|
|||||||
#define DEF_LINE_WIDTH_5 10
|
#define DEF_LINE_WIDTH_5 10
|
||||||
|
|
||||||
|
|
||||||
namespace editeng {
|
// Abstracts over values from css::table::BorderLineStyle
|
||||||
|
enum class SvxBorderLineStyle : sal_Int16
|
||||||
|
{
|
||||||
|
/** No border line
|
||||||
|
*/
|
||||||
|
NONE = css::table::BorderLineStyle::NONE,
|
||||||
|
|
||||||
// values from css::table::BorderLineStyle
|
/** Solid border line.
|
||||||
typedef sal_Int16 SvxBorderStyle;
|
*/
|
||||||
|
SOLID = css::table::BorderLineStyle::SOLID,
|
||||||
|
|
||||||
// convert border style between Word formats and LO
|
/** Dotted border line.
|
||||||
SvxBorderStyle EDITENG_DLLPUBLIC ConvertBorderStyleFromWord(int);
|
*/
|
||||||
/// convert border width in twips between Word formats and LO
|
DOTTED = css::table::BorderLineStyle::DOTTED,
|
||||||
double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderStyle, double);
|
|
||||||
double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderStyle,
|
|
||||||
double, int);
|
|
||||||
|
|
||||||
class EDITENG_DLLPUBLIC SvxBorderLine
|
/** Dashed border line.
|
||||||
{
|
*/
|
||||||
protected:
|
DASHED = css::table::BorderLineStyle::DASHED,
|
||||||
Color aColor;
|
|
||||||
|
|
||||||
long m_nWidth;
|
/** Double border line. Widths of the lines and the gap are all equal,
|
||||||
bool m_bMirrorWidths;
|
and vary equally with the total width.
|
||||||
BorderWidthImpl m_aWidthImpl;
|
*/
|
||||||
long m_nMult;
|
DOUBLE = css::table::BorderLineStyle::DOUBLE,
|
||||||
long m_nDiv;
|
|
||||||
|
|
||||||
SvxBorderStyle m_nStyle;
|
/** Double border line with a thin line outside and a thick line
|
||||||
|
inside separated by a small gap.
|
||||||
|
*/
|
||||||
|
THINTHICK_SMALLGAP = css::table::BorderLineStyle::THINTHICK_SMALLGAP,
|
||||||
|
|
||||||
bool m_bUseLeftTop;
|
/** Double border line with a thin line outside and a thick line
|
||||||
Color (*m_pColorOutFn)( Color );
|
inside separated by a medium gap.
|
||||||
Color (*m_pColorInFn)( Color );
|
*/
|
||||||
Color (*m_pColorGapFn)( Color );
|
THINTHICK_MEDIUMGAP = css::table::BorderLineStyle::THINTHICK_MEDIUMGAP,
|
||||||
|
|
||||||
public:
|
/** Double border line with a thin line outside and a thick line
|
||||||
SvxBorderLine( const Color *pCol = nullptr,
|
inside separated by a large gap.
|
||||||
long nWidth = 0,
|
*/
|
||||||
SvxBorderStyle nStyle = css::table::BorderLineStyle::SOLID,
|
THINTHICK_LARGEGAP = css::table::BorderLineStyle::THINTHICK_LARGEGAP,
|
||||||
Color (*pColorOutFn)( Color ) = &darkColor,
|
|
||||||
Color (*pColorInFn)( Color ) = &darkColor );
|
|
||||||
SvxBorderLine( const SvxBorderLine& r );
|
|
||||||
|
|
||||||
SvxBorderLine& operator=( const SvxBorderLine& r );
|
/** Double border line with a thick line outside and a thin line
|
||||||
|
inside separated by a small gap.
|
||||||
|
*/
|
||||||
|
THICKTHIN_SMALLGAP = css::table::BorderLineStyle::THICKTHIN_SMALLGAP,
|
||||||
|
|
||||||
const Color& GetColor() const { return aColor; }
|
/** Double border line with a thick line outside and a thin line
|
||||||
Color GetColorOut( bool bLeftOrTop = true ) const;
|
inside separated by a medium gap.
|
||||||
Color GetColorIn( bool bLeftOrTop = true ) const;
|
*/
|
||||||
bool HasGapColor() const { return m_pColorGapFn != nullptr; }
|
THICKTHIN_MEDIUMGAP = css::table::BorderLineStyle::THICKTHIN_MEDIUMGAP,
|
||||||
Color GetColorGap() const;
|
|
||||||
|
|
||||||
void SetWidth( long nWidth );
|
/** Double border line with a thick line outside and a thin line
|
||||||
/** Guess the style and width from the three lines widths values.
|
inside separated by a large gap.
|
||||||
|
*/
|
||||||
|
THICKTHIN_LARGEGAP = css::table::BorderLineStyle::THICKTHIN_LARGEGAP,
|
||||||
|
|
||||||
When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
|
/** 3D embossed border line.
|
||||||
using the three values to match the best possible style among the following:
|
*/
|
||||||
- SvxBorderLine::DOUBLE
|
EMBOSSED = css::table::BorderLineStyle::EMBOSSED,
|
||||||
- SvxBorderLine::THINTHICK_SMALLGAP
|
|
||||||
- SvxBorderLine::THINTHICK_MEDIUMGAP
|
|
||||||
- SvxBorderLine::THINTHICK_LARGEGAP
|
|
||||||
- SvxBorderLine::THICKTHIN_SMALLGAP
|
|
||||||
- SvxBorderLine::THICKTHIN_MEDIUMGAP
|
|
||||||
- SvxBorderLine::THICKTHIN_LARGEGAP
|
|
||||||
|
|
||||||
If no styles matches the width, then the width is set to 0.
|
/** 3D engraved border line.
|
||||||
|
*/
|
||||||
|
ENGRAVED = css::table::BorderLineStyle::ENGRAVED,
|
||||||
|
|
||||||
There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
|
/** Outset border line.
|
||||||
\a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
|
*/
|
||||||
SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
|
OUTSET = css::table::BorderLineStyle::OUTSET,
|
||||||
SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
|
|
||||||
also for thick-thin styles.
|
|
||||||
|
|
||||||
\param nStyle the border style used to guess the width.
|
/** Inset border line.
|
||||||
\param nIn the width of the inner line in 1th pt
|
*/
|
||||||
\param nOut the width of the outer line in 1th pt
|
INSET = css::table::BorderLineStyle::INSET,
|
||||||
\param nDist the width of the gap between the lines in 1th pt
|
|
||||||
*/
|
|
||||||
void GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
|
|
||||||
|
|
||||||
// TODO Hacky method to mirror lines in only a few cases
|
/** Finely dashed border line.
|
||||||
void SetMirrorWidths() { m_bMirrorWidths = true; }
|
*/
|
||||||
long GetWidth( ) const { return m_nWidth; }
|
FINE_DASHED = css::table::BorderLineStyle::FINE_DASHED,
|
||||||
sal_uInt16 GetOutWidth() const;
|
|
||||||
sal_uInt16 GetInWidth() const;
|
|
||||||
sal_uInt16 GetDistance() const;
|
|
||||||
|
|
||||||
SvxBorderStyle GetBorderLineStyle() const { return m_nStyle; }
|
/** Double border line consisting of two fixed thin lines separated by a
|
||||||
|
variable gap.
|
||||||
|
*/
|
||||||
|
DOUBLE_THIN = css::table::BorderLineStyle::DOUBLE_THIN,
|
||||||
|
|
||||||
void SetColor( const Color &rColor ) { aColor = rColor; }
|
/** Line consisting of a repetition of one dash and one dot. */
|
||||||
void SetBorderLineStyle( SvxBorderStyle nNew );
|
DASH_DOT = css::table::BorderLineStyle::DASH_DOT,
|
||||||
void ScaleMetrics( long nMult, long nDiv );
|
|
||||||
|
|
||||||
bool operator==( const SvxBorderLine &rCmp ) const;
|
/** Line consisting of a repetition of one dash and 2 dots. */
|
||||||
|
DASH_DOT_DOT = css::table::BorderLineStyle::DASH_DOT_DOT,
|
||||||
|
|
||||||
OUString GetValueString( MapUnit eSrcUnit, MapUnit eDestUnit,
|
/** Maximum valid border line style value.
|
||||||
const IntlWrapper* pIntl,
|
*/
|
||||||
bool bMetricStr = false ) const;
|
BORDER_LINE_STYLE_MAX = css::table::BorderLineStyle::BORDER_LINE_STYLE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
bool HasPriority( const SvxBorderLine& rOtherLine ) const;
|
namespace editeng
|
||||||
|
{
|
||||||
|
|
||||||
bool isEmpty() const {
|
// convert border style between Word formats and LO
|
||||||
return m_aWidthImpl.IsEmpty()
|
SvxBorderLineStyle EDITENG_DLLPUBLIC ConvertBorderStyleFromWord(int);
|
||||||
|| m_nStyle == css::table::BorderLineStyle::NONE
|
/// convert border width in twips between Word formats and LO
|
||||||
|| m_nWidth == 0;
|
double EDITENG_DLLPUBLIC ConvertBorderWidthToWord(SvxBorderLineStyle, double);
|
||||||
}
|
double EDITENG_DLLPUBLIC ConvertBorderWidthFromWord(SvxBorderLineStyle,
|
||||||
bool isDouble() const { return m_aWidthImpl.IsDouble(); }
|
double, int);
|
||||||
sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
|
|
||||||
|
|
||||||
static Color darkColor( Color aMain );
|
class EDITENG_DLLPUBLIC SvxBorderLine
|
||||||
static Color lightColor( Color aMain );
|
{
|
||||||
|
protected:
|
||||||
|
Color aColor;
|
||||||
|
|
||||||
static Color threeDLightColor( Color aMain );
|
long m_nWidth;
|
||||||
static Color threeDMediumColor( Color aMain );
|
bool m_bMirrorWidths;
|
||||||
static Color threeDDarkColor( Color aMain );
|
BorderWidthImpl m_aWidthImpl;
|
||||||
|
long m_nMult;
|
||||||
|
long m_nDiv;
|
||||||
|
|
||||||
static BorderWidthImpl getWidthImpl( SvxBorderStyle nStyle );
|
SvxBorderLineStyle m_nStyle;
|
||||||
};
|
|
||||||
|
bool m_bUseLeftTop;
|
||||||
|
Color (*m_pColorOutFn)( Color );
|
||||||
|
Color (*m_pColorInFn)( Color );
|
||||||
|
Color (*m_pColorGapFn)( Color );
|
||||||
|
|
||||||
|
public:
|
||||||
|
SvxBorderLine( const Color *pCol = nullptr,
|
||||||
|
long nWidth = 0,
|
||||||
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID,
|
||||||
|
Color (*pColorOutFn)( Color ) = &darkColor,
|
||||||
|
Color (*pColorInFn)( Color ) = &darkColor );
|
||||||
|
SvxBorderLine( const SvxBorderLine& r );
|
||||||
|
|
||||||
|
SvxBorderLine& operator=( const SvxBorderLine& r );
|
||||||
|
|
||||||
|
const Color& GetColor() const { return aColor; }
|
||||||
|
Color GetColorOut( bool bLeftOrTop = true ) const;
|
||||||
|
Color GetColorIn( bool bLeftOrTop = true ) const;
|
||||||
|
bool HasGapColor() const { return m_pColorGapFn != nullptr; }
|
||||||
|
Color GetColorGap() const;
|
||||||
|
|
||||||
|
void SetWidth( long nWidth );
|
||||||
|
/** Guess the style and width from the three lines widths values.
|
||||||
|
|
||||||
|
When the value of nStyle is SvxBorderLine::DOUBLE, the style set will be guessed
|
||||||
|
using the three values to match the best possible style among the following:
|
||||||
|
- SvxBorderLine::DOUBLE
|
||||||
|
- SvxBorderLine::THINTHICK_SMALLGAP
|
||||||
|
- SvxBorderLine::THINTHICK_MEDIUMGAP
|
||||||
|
- SvxBorderLine::THINTHICK_LARGEGAP
|
||||||
|
- SvxBorderLine::THICKTHIN_SMALLGAP
|
||||||
|
- SvxBorderLine::THICKTHIN_MEDIUMGAP
|
||||||
|
- SvxBorderLine::THICKTHIN_LARGEGAP
|
||||||
|
|
||||||
|
If no styles matches the width, then the width is set to 0.
|
||||||
|
|
||||||
|
There is one known case that could fit several styles: \a nIn = \a nDist = 0.75 pt,
|
||||||
|
\a nOut = 1.5 pt. This case fits SvxBorderLine::THINTHICK_SMALLGAP and
|
||||||
|
SvxBorderLine::THINTHICK_MEDIUMGAP with a 1.5 pt width and
|
||||||
|
SvxBorderLine::THINTHICK_LARGEGAP with a 0.75 pt width. The same case happens
|
||||||
|
also for thick-thin styles.
|
||||||
|
|
||||||
|
\param nStyle the border style used to guess the width.
|
||||||
|
\param nIn the width of the inner line in 1th pt
|
||||||
|
\param nOut the width of the outer line in 1th pt
|
||||||
|
\param nDist the width of the gap between the lines in 1th pt
|
||||||
|
*/
|
||||||
|
void GuessLinesWidths( SvxBorderLineStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn = 0, sal_uInt16 nDist = 0 );
|
||||||
|
|
||||||
|
// TODO Hacky method to mirror lines in only a few cases
|
||||||
|
void SetMirrorWidths() { m_bMirrorWidths = true; }
|
||||||
|
long GetWidth( ) const { return m_nWidth; }
|
||||||
|
sal_uInt16 GetOutWidth() const;
|
||||||
|
sal_uInt16 GetInWidth() const;
|
||||||
|
sal_uInt16 GetDistance() const;
|
||||||
|
|
||||||
|
SvxBorderLineStyle GetBorderLineStyle() const { return m_nStyle; }
|
||||||
|
|
||||||
|
void SetColor( const Color &rColor ) { aColor = rColor; }
|
||||||
|
void SetBorderLineStyle( SvxBorderLineStyle nNew );
|
||||||
|
void ScaleMetrics( long nMult, long nDiv );
|
||||||
|
|
||||||
|
bool operator==( const SvxBorderLine &rCmp ) const;
|
||||||
|
|
||||||
|
OUString GetValueString( MapUnit eSrcUnit, MapUnit eDestUnit,
|
||||||
|
const IntlWrapper* pIntl,
|
||||||
|
bool bMetricStr = false ) const;
|
||||||
|
|
||||||
|
bool HasPriority( const SvxBorderLine& rOtherLine ) const;
|
||||||
|
|
||||||
|
bool isEmpty() const {
|
||||||
|
return m_aWidthImpl.IsEmpty()
|
||||||
|
|| m_nStyle == SvxBorderLineStyle::NONE
|
||||||
|
|| m_nWidth == 0;
|
||||||
|
}
|
||||||
|
bool isDouble() const { return m_aWidthImpl.IsDouble(); }
|
||||||
|
sal_uInt16 GetScaledWidth() const { return GetOutWidth() + GetInWidth() + GetDistance(); }
|
||||||
|
|
||||||
|
static Color darkColor( Color aMain );
|
||||||
|
static Color lightColor( Color aMain );
|
||||||
|
|
||||||
|
static Color threeDLightColor( Color aMain );
|
||||||
|
static Color threeDMediumColor( Color aMain );
|
||||||
|
static Color threeDDarkColor( Color aMain );
|
||||||
|
|
||||||
|
static BorderWidthImpl getWidthImpl( SvxBorderLineStyle nStyle );
|
||||||
|
};
|
||||||
|
|
||||||
EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLine& rRight );
|
EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLine& rRight );
|
||||||
|
|
||||||
@ -156,4 +244,3 @@ EDITENG_DLLPUBLIC bool operator!=( const SvxBorderLine& rLeft, const SvxBorderLi
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
||||||
|
@ -27,18 +27,20 @@
|
|||||||
#include <basegfx/point/b2dpoint.hxx>
|
#include <basegfx/point/b2dpoint.hxx>
|
||||||
#include <vcl/outdev.hxx>
|
#include <vcl/outdev.hxx>
|
||||||
|
|
||||||
|
enum class SvxBorderLineStyle : sal_Int16;
|
||||||
|
|
||||||
namespace svtools {
|
namespace svtools {
|
||||||
|
|
||||||
SVT_DLLPUBLIC std::vector<double> GetLineDashing( sal_uInt16 nDashing, double fScale );
|
SVT_DLLPUBLIC std::vector<double> GetLineDashing( SvxBorderLineStyle nDashing, double fScale );
|
||||||
|
|
||||||
SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing(
|
SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing(
|
||||||
const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, double fScale );
|
const basegfx::B2DPolygon& rPolygon, SvxBorderLineStyle nDashing, double fScale );
|
||||||
|
|
||||||
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rBeg,
|
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rBeg,
|
||||||
const basegfx::B2DPoint& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
|
const basegfx::B2DPoint& rEnd, sal_uInt32 nWidth, SvxBorderLineStyle nDashing );
|
||||||
|
|
||||||
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const Point& rBeg,
|
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const Point& rBeg,
|
||||||
const Point& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
|
const Point& rEnd, sal_uInt32 nWidth, SvxBorderLineStyle nDashing );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
class FontList;
|
class FontList;
|
||||||
class ImpLineListData;
|
class ImpLineListData;
|
||||||
|
enum class SvxBorderLineStyle : sal_Int16;
|
||||||
|
|
||||||
typedef ::std::vector< ImpLineListData* > ImpLineList;
|
typedef ::std::vector< ImpLineListData* > ImpLineList;
|
||||||
typedef ::std::vector< FontMetric > ImplFontList;
|
typedef ::std::vector< FontMetric > ImplFontList;
|
||||||
@ -206,7 +207,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
|
|||||||
|
|
||||||
SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
|
SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
|
||||||
Color nColor1, Color nColor2, Color nColorDist,
|
Color nColor1, Color nColor2, Color nColorDist,
|
||||||
sal_uInt16 nStyle, Bitmap& rBmp );
|
SvxBorderLineStyle nStyle, Bitmap& rBmp );
|
||||||
using Window::ImplInit;
|
using Window::ImplInit;
|
||||||
SVT_DLLPRIVATE void ImplInit();
|
SVT_DLLPRIVATE void ImplInit();
|
||||||
void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
|
void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
|
||||||
@ -231,21 +232,21 @@ public:
|
|||||||
using ListBox::InsertEntry;
|
using ListBox::InsertEntry;
|
||||||
/** Insert a listbox entry with all widths in Twips. */
|
/** Insert a listbox entry with all widths in Twips. */
|
||||||
void InsertEntry(const BorderWidthImpl& rWidthImpl,
|
void InsertEntry(const BorderWidthImpl& rWidthImpl,
|
||||||
sal_uInt16 nStyle, long nMinWidth = 0,
|
SvxBorderLineStyle nStyle, long nMinWidth = 0,
|
||||||
ColorFunc pColor1Fn = &sameColor,
|
ColorFunc pColor1Fn = &sameColor,
|
||||||
ColorFunc pColor2Fn = &sameColor,
|
ColorFunc pColor2Fn = &sameColor,
|
||||||
ColorDistFunc pColorDistFn = &sameDistColor);
|
ColorDistFunc pColorDistFn = &sameDistColor);
|
||||||
|
|
||||||
using ListBox::GetEntryPos;
|
using ListBox::GetEntryPos;
|
||||||
sal_Int32 GetEntryPos( sal_uInt16 nStyle ) const;
|
sal_Int32 GetEntryPos( SvxBorderLineStyle nStyle ) const;
|
||||||
sal_uInt16 GetEntryStyle( sal_Int32 nPos ) const;
|
SvxBorderLineStyle GetEntryStyle( sal_Int32 nPos ) const;
|
||||||
|
|
||||||
void SelectEntry( sal_uInt16 nStyle, bool bSelect = true );
|
void SelectEntry( SvxBorderLineStyle nStyle, bool bSelect = true );
|
||||||
sal_uInt16 GetSelectEntryStyle() const;
|
SvxBorderLineStyle GetSelectEntryStyle() const;
|
||||||
|
|
||||||
void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
|
void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
|
||||||
|
|
||||||
void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; }
|
void SetSourceUnit( FieldUnit eNewUnit ) { eSourceUnit = eNewUnit; }
|
||||||
|
|
||||||
void SetColor( const Color& rColor );
|
void SetColor( const Color& rColor );
|
||||||
const Color& GetColor() const { return aColor; }
|
const Color& GetColor() const { return aColor; }
|
||||||
|
@ -110,10 +110,10 @@ public:
|
|||||||
/** Constructs an invisible frame style. */
|
/** Constructs an invisible frame style. */
|
||||||
explicit Style();
|
explicit Style();
|
||||||
/** Constructs a frame style with passed line widths. */
|
/** Constructs a frame style with passed line widths. */
|
||||||
explicit Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType );
|
explicit Style( double nP, double nD, double nS, SvxBorderLineStyle nType );
|
||||||
/** Constructs a frame style with passed color and line widths. */
|
/** Constructs a frame style with passed color and line widths. */
|
||||||
explicit Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
|
explicit Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
|
||||||
double nP, double nD, double nS, editeng::SvxBorderStyle nType );
|
double nP, double nD, double nS, SvxBorderLineStyle nType );
|
||||||
/** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
|
/** Constructs a frame style from the passed SvxBorderLine struct. Clears the style, if pBorder is 0. */
|
||||||
explicit Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0 );
|
explicit Style( const editeng::SvxBorderLine* pBorder, double fScale = 1.0 );
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ public:
|
|||||||
double Secn() const { return mfSecn; }
|
double Secn() const { return mfSecn; }
|
||||||
double PatternScale() const { return mfPatternScale;}
|
double PatternScale() const { return mfPatternScale;}
|
||||||
void SetPatternScale( double fScale );
|
void SetPatternScale( double fScale );
|
||||||
editeng::SvxBorderStyle Type() const { return mnType; }
|
SvxBorderLineStyle Type() const { return mnType; }
|
||||||
|
|
||||||
/** Returns the total width of this frame style. */
|
/** Returns the total width of this frame style. */
|
||||||
double GetWidth() const { return mfPrim + mfDist + mfSecn; }
|
double GetWidth() const { return mfPrim + mfDist + mfSecn; }
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
void SetColorPrim( const Color& rColor ) { maColorPrim = rColor; }
|
void SetColorPrim( const Color& rColor ) { maColorPrim = rColor; }
|
||||||
void SetColorSecn( const Color& rColor ) { maColorSecn = rColor; }
|
void SetColorSecn( const Color& rColor ) { maColorSecn = rColor; }
|
||||||
/** Sets whether to use dotted style for single hair lines. */
|
/** Sets whether to use dotted style for single hair lines. */
|
||||||
void SetType( editeng::SvxBorderStyle nType ) { mnType = nType; }
|
void SetType( SvxBorderLineStyle nType ) { mnType = nType; }
|
||||||
|
|
||||||
/** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */
|
/** Mirrors this style (exchanges primary and secondary), if it is a double frame style. */
|
||||||
Style& MirrorSelf();
|
Style& MirrorSelf();
|
||||||
@ -166,8 +166,8 @@ private:
|
|||||||
double mfPrim; /// Width of primary (single, left, or top) line.
|
double mfPrim; /// Width of primary (single, left, or top) line.
|
||||||
double mfDist; /// Distance between primary and secondary line.
|
double mfDist; /// Distance between primary and secondary line.
|
||||||
double mfSecn; /// Width of secondary (right or bottom) line.
|
double mfSecn; /// Width of secondary (right or bottom) line.
|
||||||
double mfPatternScale; /// Scale used for line pattern spacing.
|
double mfPatternScale; /// Scale used for line pattern spacing.
|
||||||
editeng::SvxBorderStyle mnType;
|
SvxBorderLineStyle mnType;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool operator==( const Style& rL, const Style& rR );
|
bool operator==( const Style& rL, const Style& rR );
|
||||||
|
@ -121,7 +121,7 @@ public:
|
|||||||
/** Returns true, if all visible frame borders have equal widths.
|
/** Returns true, if all visible frame borders have equal widths.
|
||||||
@descr Ignores hidden and "don't care" frame borders. On success,
|
@descr Ignores hidden and "don't care" frame borders. On success,
|
||||||
returns the width in the passed parameter. */
|
returns the width in the passed parameter. */
|
||||||
bool GetVisibleWidth( long& rnWidth, editeng::SvxBorderStyle& rnStyle ) const;
|
bool GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const;
|
||||||
/** Returns true, if all visible frame borders have equal color.
|
/** Returns true, if all visible frame borders have equal color.
|
||||||
@descr Ignores hidden and "don't care" frame borders. On success,
|
@descr Ignores hidden and "don't care" frame borders. On success,
|
||||||
returns the color in the passed parameter. */
|
returns the color in the passed parameter. */
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
void SelectAllVisibleBorders();
|
void SelectAllVisibleBorders();
|
||||||
|
|
||||||
/** Sets the passed line widths to all selected frame borders (in twips). */
|
/** Sets the passed line widths to all selected frame borders (in twips). */
|
||||||
void SetStyleToSelection( long nWidth, editeng::SvxBorderStyle nStyle );
|
void SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle );
|
||||||
/** Sets the passed color to all selected frame borders. */
|
/** Sets the passed color to all selected frame borders. */
|
||||||
void SetColorToSelection( const Color& rColor );
|
void SetColorToSelection( const Color& rColor );
|
||||||
|
|
||||||
|
@ -292,6 +292,12 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream& os, SvxBorderLineStyle n)
|
||||||
|
{
|
||||||
|
os << (int)n;
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
|
void ScExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
|
||||||
{
|
{
|
||||||
struct { xmlChar* pPrefix; xmlChar* pURI; } aNamespaces[] =
|
struct { xmlChar* pPrefix; xmlChar* pURI; } aNamespaces[] =
|
||||||
@ -1932,17 +1938,17 @@ void ScExportTest::testSheetProtectionXLSX()
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const char* toBorderName( sal_Int16 eStyle )
|
const char* toBorderName( SvxBorderLineStyle eStyle )
|
||||||
{
|
{
|
||||||
switch (eStyle)
|
switch (eStyle)
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID: return "SOLID";
|
case SvxBorderLineStyle::SOLID: return "SOLID";
|
||||||
case table::BorderLineStyle::DOTTED: return "DOTTED";
|
case SvxBorderLineStyle::DOTTED: return "DOTTED";
|
||||||
case table::BorderLineStyle::DASHED: return "DASHED";
|
case SvxBorderLineStyle::DASHED: return "DASHED";
|
||||||
case table::BorderLineStyle::DASH_DOT: return "DASH_DOT";
|
case SvxBorderLineStyle::DASH_DOT: return "DASH_DOT";
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT: return "DASH_DOT_DOT";
|
case SvxBorderLineStyle::DASH_DOT_DOT: return "DASH_DOT_DOT";
|
||||||
case table::BorderLineStyle::DOUBLE_THIN: return "DOUBLE_THIN";
|
case SvxBorderLineStyle::DOUBLE_THIN: return "DOUBLE_THIN";
|
||||||
case table::BorderLineStyle::FINE_DASHED: return "FINE_DASHED";
|
case SvxBorderLineStyle::FINE_DASHED: return "FINE_DASHED";
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
@ -1957,21 +1963,21 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
SCROW mnRow;
|
SCROW mnRow;
|
||||||
sal_Int16 mnStyle;
|
SvxBorderLineStyle mnStyle;
|
||||||
long mnWidth;
|
long mnWidth;
|
||||||
} aChecks[] = {
|
} aChecks[] = {
|
||||||
{ 1, table::BorderLineStyle::SOLID, 1L }, // hair
|
{ 1, SvxBorderLineStyle::SOLID, 1L }, // hair
|
||||||
{ 3, table::BorderLineStyle::DOTTED, 15L }, // dotted
|
{ 3, SvxBorderLineStyle::DOTTED, 15L }, // dotted
|
||||||
{ 5, table::BorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot
|
{ 5, SvxBorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot
|
||||||
{ 7, table::BorderLineStyle::DASH_DOT, 15L }, // dash dot
|
{ 7, SvxBorderLineStyle::DASH_DOT, 15L }, // dash dot
|
||||||
{ 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed
|
{ 9, SvxBorderLineStyle::FINE_DASHED, 15L }, // dashed
|
||||||
{ 11, table::BorderLineStyle::SOLID, 15L }, // thin
|
{ 11, SvxBorderLineStyle::SOLID, 15L }, // thin
|
||||||
{ 13, table::BorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot
|
{ 13, SvxBorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot
|
||||||
{ 17, table::BorderLineStyle::DASH_DOT, 35L }, // medium dash dot
|
{ 17, SvxBorderLineStyle::DASH_DOT, 35L }, // medium dash dot
|
||||||
{ 19, table::BorderLineStyle::DASHED, 35L }, // medium dashed
|
{ 19, SvxBorderLineStyle::DASHED, 35L }, // medium dashed
|
||||||
{ 21, table::BorderLineStyle::SOLID, 35L }, // medium
|
{ 21, SvxBorderLineStyle::SOLID, 35L }, // medium
|
||||||
{ 23, table::BorderLineStyle::SOLID, 50L }, // thick
|
{ 23, SvxBorderLineStyle::SOLID, 50L }, // thick
|
||||||
{ 25, table::BorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width)
|
{ 25, SvxBorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width)
|
||||||
};
|
};
|
||||||
|
|
||||||
ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType);
|
ScDocShellRef xDocSh = loadDoc("cell-borders.", nFormatType);
|
||||||
@ -2021,21 +2027,21 @@ void ScExportTest::testBordersExchangeXLSX()
|
|||||||
// Document: sc/qa/unit/data/README.cellborders
|
// Document: sc/qa/unit/data/README.cellborders
|
||||||
|
|
||||||
// short name for the table
|
// short name for the table
|
||||||
const ::editeng::SvxBorderStyle None = table::BorderLineStyle::NONE;
|
const SvxBorderLineStyle None = SvxBorderLineStyle::NONE;
|
||||||
const ::editeng::SvxBorderStyle Solid = table::BorderLineStyle::SOLID;
|
const SvxBorderLineStyle Solid = SvxBorderLineStyle::SOLID;
|
||||||
const ::editeng::SvxBorderStyle Dotted = table::BorderLineStyle::DOTTED;
|
const SvxBorderLineStyle Dotted = SvxBorderLineStyle::DOTTED;
|
||||||
const ::editeng::SvxBorderStyle Dashed = table::BorderLineStyle::DASHED;
|
const SvxBorderLineStyle Dashed = SvxBorderLineStyle::DASHED;
|
||||||
const ::editeng::SvxBorderStyle FineDash = table::BorderLineStyle::FINE_DASHED;
|
const SvxBorderLineStyle FineDash = SvxBorderLineStyle::FINE_DASHED;
|
||||||
const ::editeng::SvxBorderStyle DashDot = table::BorderLineStyle::DASH_DOT;
|
const SvxBorderLineStyle DashDot = SvxBorderLineStyle::DASH_DOT;
|
||||||
const ::editeng::SvxBorderStyle DashDoDo = table::BorderLineStyle::DASH_DOT_DOT;
|
const SvxBorderLineStyle DashDoDo = SvxBorderLineStyle::DASH_DOT_DOT;
|
||||||
const ::editeng::SvxBorderStyle DoubThin = table::BorderLineStyle::DOUBLE_THIN;
|
const SvxBorderLineStyle DoubThin = SvxBorderLineStyle::DOUBLE_THIN;
|
||||||
|
|
||||||
const size_t nMaxCol = 18;
|
const size_t nMaxCol = 18;
|
||||||
const size_t nMaxRow = 7;
|
const size_t nMaxRow = 7;
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
::editeng::SvxBorderStyle BorderStyleTop, BorderStyleBottom;
|
SvxBorderLineStyle BorderStyleTop, BorderStyleBottom;
|
||||||
long WidthTop, WidthBottom;
|
long WidthTop, WidthBottom;
|
||||||
} aCheckBorderWidth[nMaxCol][nMaxRow] =
|
} aCheckBorderWidth[nMaxCol][nMaxRow] =
|
||||||
{
|
{
|
||||||
|
@ -366,6 +366,11 @@ std::ostream& operator<<(std::ostream& rStrm, const SvxCellHorJustify& rCode)
|
|||||||
rStrm << static_cast<int>(rCode);
|
rStrm << static_cast<int>(rCode);
|
||||||
return rStrm;
|
return rStrm;
|
||||||
}
|
}
|
||||||
|
std::ostream& operator<<(std::ostream& os, SvxBorderLineStyle n)
|
||||||
|
{
|
||||||
|
os << (int)n;
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL,
|
bool ScFiltersTest::load(const OUString &rFilter, const OUString &rURL,
|
||||||
const OUString &rUserData, SfxFilterFlags nFilterFlags,
|
const OUString &rUserData, SfxFilterFlags nFilterFlags,
|
||||||
@ -936,7 +941,7 @@ void ScFiltersTest::testDoubleThinBorder()
|
|||||||
rDoc.GetBorderLines( 2, 2, 0, &pLeft, &pTop, &pRight, &pBottom );
|
rDoc.GetBorderLines( 2, 2, 0, &pLeft, &pTop, &pRight, &pBottom );
|
||||||
CPPUNIT_ASSERT(pTop);
|
CPPUNIT_ASSERT(pTop);
|
||||||
CPPUNIT_ASSERT(pRight);
|
CPPUNIT_ASSERT(pRight);
|
||||||
CPPUNIT_ASSERT_EQUAL( table::BorderLineStyle::DOUBLE_THIN, pRight->GetBorderLineStyle() );
|
CPPUNIT_ASSERT_EQUAL( SvxBorderLineStyle::DOUBLE_THIN, pRight->GetBorderLineStyle() );
|
||||||
xDocSh->DoClose();
|
xDocSh->DoClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -957,8 +962,7 @@ void ScFiltersTest::testBorderODS()
|
|||||||
CPPUNIT_ASSERT(!pTop);
|
CPPUNIT_ASSERT(!pTop);
|
||||||
CPPUNIT_ASSERT(!pBottom);
|
CPPUNIT_ASSERT(!pBottom);
|
||||||
CPPUNIT_ASSERT(pRight);
|
CPPUNIT_ASSERT(pRight);
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
||||||
table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
|
||||||
|
|
||||||
rDoc.GetBorderLines( 2, 1, 0, &pLeft, &pTop, &pRight, &pBottom );
|
rDoc.GetBorderLines( 2, 1, 0, &pLeft, &pTop, &pRight, &pBottom );
|
||||||
CPPUNIT_ASSERT(!pLeft);
|
CPPUNIT_ASSERT(!pLeft);
|
||||||
@ -966,8 +970,7 @@ void ScFiltersTest::testBorderODS()
|
|||||||
CPPUNIT_ASSERT(!pBottom);
|
CPPUNIT_ASSERT(!pBottom);
|
||||||
|
|
||||||
CPPUNIT_ASSERT(pRight);
|
CPPUNIT_ASSERT(pRight);
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
||||||
table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
|
||||||
CPPUNIT_ASSERT_EQUAL(20L, pRight->GetWidth());
|
CPPUNIT_ASSERT_EQUAL(20L, pRight->GetWidth());
|
||||||
|
|
||||||
rDoc.GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom );
|
rDoc.GetBorderLines( 2, 8, 0, &pLeft, &pTop, &pRight, &pBottom );
|
||||||
@ -976,8 +979,7 @@ void ScFiltersTest::testBorderODS()
|
|||||||
CPPUNIT_ASSERT(pTop);
|
CPPUNIT_ASSERT(pTop);
|
||||||
CPPUNIT_ASSERT(pBottom);
|
CPPUNIT_ASSERT(pBottom);
|
||||||
CPPUNIT_ASSERT(pRight);
|
CPPUNIT_ASSERT(pRight);
|
||||||
CPPUNIT_ASSERT_EQUAL(
|
CPPUNIT_ASSERT_EQUAL(SvxBorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
||||||
table::BorderLineStyle::SOLID, pRight->GetBorderLineStyle());
|
|
||||||
CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth());
|
CPPUNIT_ASSERT_EQUAL(5L, pRight->GetWidth());
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(COL_BLUE), pRight->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(COL_BLUE), pRight->GetColor());
|
||||||
|
|
||||||
@ -1004,17 +1006,18 @@ struct Border
|
|||||||
sal_uInt16 bOutWidth;
|
sal_uInt16 bOutWidth;
|
||||||
sal_uInt16 bInWidth;
|
sal_uInt16 bInWidth;
|
||||||
sal_uInt16 bDistance;
|
sal_uInt16 bDistance;
|
||||||
sal_Int32 lStyle;
|
SvxBorderLineStyle lStyle;
|
||||||
sal_Int32 tStyle;
|
SvxBorderLineStyle tStyle;
|
||||||
sal_Int32 rStyle;
|
SvxBorderLineStyle rStyle;
|
||||||
sal_Int32 bStyle;
|
SvxBorderLineStyle bStyle;
|
||||||
// that's a monstrum
|
// that's a monstrum
|
||||||
Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW,
|
Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW,
|
||||||
sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist,
|
sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist,
|
||||||
sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist, sal_Int32 lSt, sal_Int32 tSt, sal_Int32 rSt, sal_Int32 bSt):
|
sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist, sal_Int16 lSt, sal_Int16 tSt, sal_Int16 rSt, sal_Int16 bSt):
|
||||||
column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist),
|
column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist),
|
||||||
tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW),
|
tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW),
|
||||||
bDistance(bDist), lStyle(lSt), tStyle(tSt), rStyle(rSt), bStyle(bSt) {};
|
bDistance(bDist),
|
||||||
|
lStyle((SvxBorderLineStyle)lSt), tStyle((SvxBorderLineStyle)tSt), rStyle((SvxBorderLineStyle)rSt), bStyle((SvxBorderLineStyle)bSt) {};
|
||||||
};
|
};
|
||||||
|
|
||||||
void ScFiltersTest::testBordersOoo33()
|
void ScFiltersTest::testBordersOoo33()
|
||||||
@ -1073,7 +1076,7 @@ void ScFiltersTest::testBordersOoo33()
|
|||||||
CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth());
|
CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth());
|
||||||
CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth());
|
CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth());
|
||||||
CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance());
|
CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance());
|
||||||
sal_Int32 tempStyle = pLeft->GetBorderLineStyle();
|
SvxBorderLineStyle tempStyle = pLeft->GetBorderLineStyle();
|
||||||
CPPUNIT_ASSERT_EQUAL(borders[temp].lStyle, tempStyle);
|
CPPUNIT_ASSERT_EQUAL(borders[temp].lStyle, tempStyle);
|
||||||
tempStyle = pTop->GetBorderLineStyle();
|
tempStyle = pTop->GetBorderLineStyle();
|
||||||
CPPUNIT_ASSERT_EQUAL(borders[temp].tStyle, tempStyle);
|
CPPUNIT_ASSERT_EQUAL(borders[temp].tStyle, tempStyle);
|
||||||
@ -2865,10 +2868,10 @@ void ScFiltersTest::testOrcusODSStyleInterface()
|
|||||||
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetRight()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetRight()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetTop()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetTop()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetBottom()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 18), pBoxItem->GetBottom()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetTop()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetTop()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetBottom()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetBottom()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 1, pBoxItem->GetLeft()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 1, pBoxItem->GetLeft()->GetWidth());
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 1, pBoxItem->GetRight()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 1, pBoxItem->GetRight()->GetWidth());
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with top width", 1, pBoxItem->GetTop()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with top width", 1, pBoxItem->GetTop()->GetWidth());
|
||||||
@ -2892,8 +2895,8 @@ void ScFiltersTest::testOrcusODSStyleInterface()
|
|||||||
pBoxItem = static_cast<const SvxBoxItem*>(pItem);
|
pBoxItem = static_cast<const SvxBoxItem*>(pItem);
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(0, 0, 0), pBoxItem->GetLeft()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(0, 0, 0), pBoxItem->GetLeft()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(255, 0, 0), pBoxItem->GetRight()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(255, 0, 0), pBoxItem->GetRight()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::SOLID);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetLeft()->GetBorderLineStyle(), SvxBorderLineStyle::SOLID);
|
||||||
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DOTTED);
|
CPPUNIT_ASSERT_EQUAL(pBoxItem->GetRight()->GetBorderLineStyle(), SvxBorderLineStyle::DOTTED);
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 0, pBoxItem->GetLeft()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with left width", 0, pBoxItem->GetLeft()->GetWidth());
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 14, pBoxItem->GetRight()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with right width", 14, pBoxItem->GetRight()->GetWidth());
|
||||||
|
|
||||||
@ -2902,7 +2905,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
|
|||||||
|
|
||||||
const SvxLineItem* pTLBR= static_cast<const SvxLineItem*>(pItem);
|
const SvxLineItem* pTLBR= static_cast<const SvxLineItem*>(pItem);
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(18, 0, 0), pTLBR->GetLine()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(18, 0, 0), pTLBR->GetLine()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(pTLBR->GetLine()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DASH_DOT);
|
CPPUNIT_ASSERT_EQUAL(pTLBR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASH_DOT);
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 14, pTLBR->GetLine()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 14, pTLBR->GetLine()->GetWidth());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Doesn't have Attribute diagonal(bl-tr) border, but it should have.",
|
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Doesn't have Attribute diagonal(bl-tr) border, but it should have.",
|
||||||
@ -2910,7 +2913,7 @@ void ScFiltersTest::testOrcusODSStyleInterface()
|
|||||||
|
|
||||||
const SvxLineItem* pBLTR= static_cast<const SvxLineItem*>(pItem);
|
const SvxLineItem* pBLTR= static_cast<const SvxLineItem*>(pItem);
|
||||||
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 238), pBLTR->GetLine()->GetColor());
|
CPPUNIT_ASSERT_EQUAL(Color(255, 204, 238), pBLTR->GetLine()->GetColor());
|
||||||
CPPUNIT_ASSERT_EQUAL(pBLTR->GetLine()->GetBorderLineStyle(), ::com::sun::star::table::BorderLineStyle::DASHED);
|
CPPUNIT_ASSERT_EQUAL(pBLTR->GetLine()->GetBorderLineStyle(), SvxBorderLineStyle::DASHED);
|
||||||
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 34, pBLTR->GetLine()->GetWidth());
|
ASSERT_DOUBLES_EQUAL_MESSAGE("Error with diagonal tl-br width", 34, pBLTR->GetLine()->GetWidth());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Has Attribute background, but it shouldn't.",
|
CPPUNIT_ASSERT_MESSAGE("Style Name2 : Has Attribute background, but it shouldn't.",
|
||||||
|
@ -2113,7 +2113,7 @@ void Test::testDataArea()
|
|||||||
CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
|
CPPUNIT_ASSERT_MESSAGE("Sheet is expected to be empty.", m_pDoc->IsBlockEmpty(0, 0, 0, 100, 100));
|
||||||
|
|
||||||
// Now, set borders in some cells....
|
// Now, set borders in some cells....
|
||||||
::editeng::SvxBorderLine aLine(nullptr, 50, table::BorderLineStyle::SOLID);
|
::editeng::SvxBorderLine aLine(nullptr, 50, SvxBorderLineStyle::SOLID);
|
||||||
SvxBoxItem aBorderItem(ATTR_BORDER);
|
SvxBoxItem aBorderItem(ATTR_BORDER);
|
||||||
aBorderItem.SetLine(&aLine, SvxBoxItemLine::LEFT);
|
aBorderItem.SetLine(&aLine, SvxBoxItemLine::LEFT);
|
||||||
aBorderItem.SetLine(&aLine, SvxBoxItemLine::RIGHT);
|
aBorderItem.SetLine(&aLine, SvxBoxItemLine::RIGHT);
|
||||||
|
@ -313,7 +313,7 @@ void lcl_SetFrame( ScDocument* pDoc, SCTAB nTab,
|
|||||||
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
|
||||||
sal_uInt16 nWidth )
|
sal_uInt16 nWidth )
|
||||||
{
|
{
|
||||||
::editeng::SvxBorderLine aLine(nullptr, nWidth, table::BorderLineStyle::SOLID);
|
::editeng::SvxBorderLine aLine(nullptr, nWidth, SvxBorderLineStyle::SOLID);
|
||||||
SvxBoxItem aBox( ATTR_BORDER );
|
SvxBoxItem aBox( ATTR_BORDER );
|
||||||
aBox.SetLine(&aLine, SvxBoxItemLine::LEFT);
|
aBox.SetLine(&aLine, SvxBoxItemLine::LEFT);
|
||||||
aBox.SetLine(&aLine, SvxBoxItemLine::TOP);
|
aBox.SetLine(&aLine, SvxBoxItemLine::TOP);
|
||||||
|
@ -1659,28 +1659,28 @@ void lclGetBorderLine(
|
|||||||
|
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::NONE:
|
case SvxBorderLineStyle::NONE:
|
||||||
nStyleIndex = Idx_None;
|
nStyleIndex = Idx_None;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
nStyleIndex = Idx_Solid;
|
nStyleIndex = Idx_Solid;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
nStyleIndex = Idx_Dotted;
|
nStyleIndex = Idx_Dotted;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
nStyleIndex = Idx_Dashed;
|
nStyleIndex = Idx_Dashed;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
nStyleIndex = Idx_FineDashed;
|
nStyleIndex = Idx_FineDashed;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
nStyleIndex = Idx_DashDot;
|
nStyleIndex = Idx_DashDot;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
nStyleIndex = Idx_DashDotDot;
|
nStyleIndex = Idx_DashDotDot;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
// the "nOuterWidth" is not right for this line type
|
// the "nOuterWidth" is not right for this line type
|
||||||
// but at the moment width it not important for that
|
// but at the moment width it not important for that
|
||||||
// the right function is nOuterWidth = (sal_uInt16) pLine->GetWidth();
|
// the right function is nOuterWidth = (sal_uInt16) pLine->GetWidth();
|
||||||
|
@ -957,7 +957,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
|
|||||||
|
|
||||||
rLine.SetColor( rPalette.GetColor( nXclColor ) );
|
rLine.SetColor( rPalette.GetColor( nXclColor ) );
|
||||||
rLine.SetWidth( ppnLineParam[ nXclLine ][ 0 ] );
|
rLine.SetWidth( ppnLineParam[ nXclLine ][ 0 ] );
|
||||||
rLine.SetBorderLineStyle( static_cast< ::editeng::SvxBorderStyle>(
|
rLine.SetBorderLineStyle( static_cast< SvxBorderLineStyle>(
|
||||||
ppnLineParam[ nXclLine ][ 1 ]) );
|
ppnLineParam[ nXclLine ][ 1 ]) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -511,37 +511,37 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName,
|
|||||||
append("px ");
|
append("px ");
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
aOut.append("solid");
|
aOut.append("solid");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
aOut.append("dotted");
|
aOut.append("dotted");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
case table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
aOut.append("dashed");
|
aOut.append("dashed");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
case table::BorderLineStyle::DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
aOut.append("double");
|
aOut.append("double");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
aOut.append("ridge");
|
aOut.append("ridge");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
aOut.append("groove");
|
aOut.append("groove");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
aOut.append("outset");
|
aOut.append("outset");
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
aOut.append("inset");
|
aOut.append("inset");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -2296,8 +2296,8 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
|
|||||||
const SCROW nLastRow = maSize.mnRows - 1;
|
const SCROW nLastRow = maSize.mnRows - 1;
|
||||||
const long nOuterLine = DEF_LINE_WIDTH_2;
|
const long nOuterLine = DEF_LINE_WIDTH_2;
|
||||||
const long nInnerLine = DEF_LINE_WIDTH_0;
|
const long nInnerLine = DEF_LINE_WIDTH_0;
|
||||||
SvxBorderLine aOuterLine(nullptr, nOuterLine, table::BorderLineStyle::SOLID);
|
SvxBorderLine aOuterLine(nullptr, nOuterLine, SvxBorderLineStyle::SOLID);
|
||||||
SvxBorderLine aInnerLine(nullptr, nInnerLine, table::BorderLineStyle::SOLID);
|
SvxBorderLine aInnerLine(nullptr, nInnerLine, SvxBorderLineStyle::SOLID);
|
||||||
SvxBoxItem aBorderItem( ATTR_BORDER );
|
SvxBoxItem aBorderItem( ATTR_BORDER );
|
||||||
|
|
||||||
for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol )
|
for( SCCOL nCol = 0; nCol <= nLastCol; ++nCol )
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "conditio.hxx"
|
#include "conditio.hxx"
|
||||||
|
|
||||||
#include <rtl/strbuf.hxx>
|
#include <rtl/strbuf.hxx>
|
||||||
|
#include <editeng/borderline.hxx>
|
||||||
|
|
||||||
#define __ORCUS_STATIC_LIB
|
#define __ORCUS_STATIC_LIB
|
||||||
#include <orcus/spreadsheet/import_interface.hpp>
|
#include <orcus/spreadsheet/import_interface.hpp>
|
||||||
@ -38,8 +39,6 @@ class ScOrcusFactory;
|
|||||||
class ScRangeData;
|
class ScRangeData;
|
||||||
class SfxItemSet;
|
class SfxItemSet;
|
||||||
|
|
||||||
typedef sal_Int16 SvxBorderStyle;
|
|
||||||
|
|
||||||
namespace com { namespace sun { namespace star { namespace task {
|
namespace com { namespace sun { namespace star { namespace task {
|
||||||
|
|
||||||
class XStatusIndicator;
|
class XStatusIndicator;
|
||||||
@ -296,7 +295,7 @@ private:
|
|||||||
{
|
{
|
||||||
struct border_line
|
struct border_line
|
||||||
{
|
{
|
||||||
SvxBorderStyle mestyle;
|
SvxBorderLineStyle mestyle;
|
||||||
Color maColor;
|
Color maColor;
|
||||||
double mnWidth;
|
double mnWidth;
|
||||||
|
|
||||||
|
@ -156,12 +156,12 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin
|
|||||||
|
|
||||||
switch ( nLine )
|
switch ( nLine )
|
||||||
{
|
{
|
||||||
case 0: aBL.SetBorderLineStyle(table::BorderLineStyle::NONE); break;
|
case 0: aBL.SetBorderLineStyle(SvxBorderLineStyle::NONE); break;
|
||||||
case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break;
|
case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break;
|
||||||
case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
|
case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE_THIN);
|
aBL.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE_THIN);
|
||||||
aBL.SetWidth( DEF_LINE_WIDTH_1 );
|
aBL.SetWidth( DEF_LINE_WIDTH_1 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -853,7 +853,7 @@ ScOrcusStyles::border::border():
|
|||||||
}
|
}
|
||||||
|
|
||||||
ScOrcusStyles::border::border_line::border_line():
|
ScOrcusStyles::border::border_line::border_line():
|
||||||
mestyle(::com::sun::star::table::BorderLineStyle::SOLID),
|
mestyle(SvxBorderLineStyle::SOLID),
|
||||||
maColor(COL_WHITE),
|
maColor(COL_WHITE),
|
||||||
mnWidth(0)
|
mnWidth(0)
|
||||||
{
|
{
|
||||||
@ -1300,32 +1300,32 @@ void ScOrcusStyles::set_border_style(
|
|||||||
case orcus::spreadsheet::border_style_t::medium:
|
case orcus::spreadsheet::border_style_t::medium:
|
||||||
case orcus::spreadsheet::border_style_t::thick:
|
case orcus::spreadsheet::border_style_t::thick:
|
||||||
case orcus::spreadsheet::border_style_t::thin:
|
case orcus::spreadsheet::border_style_t::thin:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::SOLID;
|
current_line.mestyle = SvxBorderLineStyle::SOLID;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::dash_dot:
|
case orcus::spreadsheet::border_style_t::dash_dot:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT;
|
current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::dash_dot_dot:
|
case orcus::spreadsheet::border_style_t::dash_dot_dot:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT_DOT;
|
current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::dashed:
|
case orcus::spreadsheet::border_style_t::dashed:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASHED;
|
current_line.mestyle = SvxBorderLineStyle::DASHED;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::dotted:
|
case orcus::spreadsheet::border_style_t::dotted:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DOTTED;
|
current_line.mestyle = SvxBorderLineStyle::DOTTED;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::double_border:
|
case orcus::spreadsheet::border_style_t::double_border:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DOUBLE;
|
current_line.mestyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::medium_dash_dot:
|
case orcus::spreadsheet::border_style_t::medium_dash_dot:
|
||||||
case orcus::spreadsheet::border_style_t::slant_dash_dot:
|
case orcus::spreadsheet::border_style_t::slant_dash_dot:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT;
|
current_line.mestyle = SvxBorderLineStyle::DASH_DOT;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
|
case orcus::spreadsheet::border_style_t::medium_dash_dot_dot:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASH_DOT_DOT;
|
current_line.mestyle = SvxBorderLineStyle::DASH_DOT_DOT;
|
||||||
break;
|
break;
|
||||||
case orcus::spreadsheet::border_style_t::medium_dashed:
|
case orcus::spreadsheet::border_style_t::medium_dashed:
|
||||||
current_line.mestyle = ::com::sun::star::table::BorderLineStyle::DASHED;
|
current_line.mestyle = SvxBorderLineStyle::DASHED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
|
@ -244,7 +244,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void)
|
|||||||
else if (nId == maTBBorder3->GetItemId("doublebottom"))
|
else if (nId == maTBBorder3->GetItemId("doublebottom"))
|
||||||
{
|
{
|
||||||
pBottom.reset(new editeng::SvxBorderLine(nullptr));
|
pBottom.reset(new editeng::SvxBorderLine(nullptr));
|
||||||
pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
|
pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
|
||||||
nValidFlags |= FRM_VALID_BOTTOM;
|
nValidFlags |= FRM_VALID_BOTTOM;
|
||||||
}
|
}
|
||||||
else if (nId == maTBBorder3->GetItemId("topthickbottom"))
|
else if (nId == maTBBorder3->GetItemId("topthickbottom"))
|
||||||
@ -256,7 +256,7 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void)
|
|||||||
else if (nId == maTBBorder3->GetItemId("topdoublebottom"))
|
else if (nId == maTBBorder3->GetItemId("topdoublebottom"))
|
||||||
{
|
{
|
||||||
pBottom.reset(new editeng::SvxBorderLine(nullptr));
|
pBottom.reset(new editeng::SvxBorderLine(nullptr));
|
||||||
pBottom->GuessLinesWidths(DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
|
pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
|
||||||
pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
|
pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
|
||||||
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
|
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,7 @@ IMPL_LINK(CellLineStylePopup, VSSelectHdl, ValueSet*, pControl, void)
|
|||||||
{
|
{
|
||||||
const sal_uInt16 iPos(maCellLineStyleValueSet->GetSelectItemId());
|
const sal_uInt16 iPos(maCellLineStyleValueSet->GetSelectItemId());
|
||||||
SvxLineItem aLineItem(SID_FRAME_LINESTYLE);
|
SvxLineItem aLineItem(SID_FRAME_LINESTYLE);
|
||||||
using namespace ::com::sun::star::table::BorderLineStyle;
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID;
|
||||||
editeng::SvxBorderStyle nStyle = SOLID;
|
|
||||||
sal_uInt16 n1 = 0;
|
sal_uInt16 n1 = 0;
|
||||||
sal_uInt16 n2 = 0;
|
sal_uInt16 n2 = 0;
|
||||||
sal_uInt16 n3 = 0;
|
sal_uInt16 n3 = 0;
|
||||||
@ -131,31 +130,31 @@ IMPL_LINK(CellLineStylePopup, VSSelectHdl, ValueSet*, pControl, void)
|
|||||||
n1 = DEF_LINE_WIDTH_0;
|
n1 = DEF_LINE_WIDTH_0;
|
||||||
n2 = DEF_LINE_WIDTH_0;
|
n2 = DEF_LINE_WIDTH_0;
|
||||||
n3 = DEF_LINE_WIDTH_1;
|
n3 = DEF_LINE_WIDTH_1;
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
n1 = DEF_LINE_WIDTH_0;
|
n1 = DEF_LINE_WIDTH_0;
|
||||||
n2 = DEF_LINE_WIDTH_0;
|
n2 = DEF_LINE_WIDTH_0;
|
||||||
n3 = DEF_LINE_WIDTH_2;
|
n3 = DEF_LINE_WIDTH_2;
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
n1 = DEF_LINE_WIDTH_1;
|
n1 = DEF_LINE_WIDTH_1;
|
||||||
n2 = DEF_LINE_WIDTH_2;
|
n2 = DEF_LINE_WIDTH_2;
|
||||||
n3 = DEF_LINE_WIDTH_1;
|
n3 = DEF_LINE_WIDTH_1;
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
n1 = DEF_LINE_WIDTH_2;
|
n1 = DEF_LINE_WIDTH_2;
|
||||||
n2 = DEF_LINE_WIDTH_0;
|
n2 = DEF_LINE_WIDTH_0;
|
||||||
n3 = DEF_LINE_WIDTH_2;
|
n3 = DEF_LINE_WIDTH_2;
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
n1 = DEF_LINE_WIDTH_2;
|
n1 = DEF_LINE_WIDTH_2;
|
||||||
n2 = DEF_LINE_WIDTH_2;
|
n2 = DEF_LINE_WIDTH_2;
|
||||||
n3 = DEF_LINE_WIDTH_2;
|
n3 = DEF_LINE_WIDTH_2;
|
||||||
nStyle = DOUBLE;
|
nStyle = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1806,7 +1806,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
|
|||||||
{
|
{
|
||||||
Color aColorBlack( COL_BLACK );
|
Color aColorBlack( COL_BLACK );
|
||||||
::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
|
::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
|
||||||
table::BorderLineStyle::SOLID );
|
SvxBorderLineStyle::SOLID );
|
||||||
pTabViewShell->SetDefaultFrameLine( &aDefLine );
|
pTabViewShell->SetDefaultFrameLine( &aDefLine );
|
||||||
pTabViewShell->SetSelectionFrameLines( nullptr, false );
|
pTabViewShell->SetSelectionFrameLines( nullptr, false );
|
||||||
}
|
}
|
||||||
@ -1829,7 +1829,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
::editeng::SvxBorderLine aDefLine( &rColor, 20,
|
::editeng::SvxBorderLine aDefLine( &rColor, 20,
|
||||||
table::BorderLineStyle::SOLID );
|
SvxBorderLineStyle::SOLID );
|
||||||
pTabViewShell->SetDefaultFrameLine( &aDefLine );
|
pTabViewShell->SetDefaultFrameLine( &aDefLine );
|
||||||
pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
|
pTabViewShell->SetSelectionFrameLines( &aDefLine, false );
|
||||||
}
|
}
|
||||||
@ -2025,7 +2025,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
|
|||||||
{
|
{
|
||||||
// handled together because both need the cell border information for decisions
|
// handled together because both need the cell border information for decisions
|
||||||
Color aCol = 0;
|
Color aCol = 0;
|
||||||
editeng::SvxBorderLine aLine(nullptr,0,0);
|
editeng::SvxBorderLine aLine(nullptr,0,SvxBorderLineStyle::SOLID);
|
||||||
bool bCol = false;
|
bool bCol = false;
|
||||||
bool bColDisable = false, bStyleDisable = false;
|
bool bColDisable = false, bStyleDisable = false;
|
||||||
SvxBoxItem aBoxItem(ATTR_BORDER);
|
SvxBoxItem aBoxItem(ATTR_BORDER);
|
||||||
|
@ -1451,8 +1451,7 @@ void ScTabViewShell::Construct( TriState nForceDesignMode )
|
|||||||
SetPool( &SC_MOD()->GetPool() );
|
SetPool( &SC_MOD()->GetPool() );
|
||||||
SetWindow( GetActiveWin() );
|
SetWindow( GetActiveWin() );
|
||||||
|
|
||||||
pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20,
|
pCurFrameLine = new ::editeng::SvxBorderLine(&aColBlack, 20, SvxBorderLineStyle::SOLID);
|
||||||
table::BorderLineStyle::SOLID);
|
|
||||||
pPivotSource = new ScArea;
|
pPivotSource = new ScArea;
|
||||||
StartListening(*GetViewData().GetDocShell(),true);
|
StartListening(*GetViewData().GetDocShell(),true);
|
||||||
StartListening(*GetViewFrame(),true);
|
StartListening(*GetViewFrame(),true);
|
||||||
|
@ -596,7 +596,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
|
|||||||
|
|
||||||
Color aWhite( COL_WHITE );
|
Color aWhite( COL_WHITE );
|
||||||
::editeng::SvxBorderLine aBorderLine(
|
::editeng::SvxBorderLine aBorderLine(
|
||||||
&aWhite, 1, table::BorderLineStyle::SOLID);
|
&aWhite, 1, SvxBorderLineStyle::SOLID);
|
||||||
|
|
||||||
SvxBoxItem aBoxItem( SDRATTR_TABLE_BORDER );
|
SvxBoxItem aBoxItem( SDRATTR_TABLE_BORDER );
|
||||||
aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::TOP );
|
aBoxItem.SetLine( &aBorderLine, SvxBoxItemLine::TOP );
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include <vcl/fontcapabilities.hxx>
|
#include <vcl/fontcapabilities.hxx>
|
||||||
#include <basegfx/polygon/b2dpolygon.hxx>
|
#include <basegfx/polygon/b2dpolygon.hxx>
|
||||||
#include <basegfx/polygon/b2dpolygontools.hxx>
|
#include <basegfx/polygon/b2dpolygontools.hxx>
|
||||||
|
#include <editeng/borderline.hxx>
|
||||||
|
|
||||||
#include <com/sun/star/table/BorderLineStyle.hpp>
|
#include <com/sun/star/table/BorderLineStyle.hpp>
|
||||||
|
|
||||||
@ -208,10 +209,10 @@ private:
|
|||||||
Color ( *m_pColorDistFn )( Color, Color );
|
Color ( *m_pColorDistFn )( Color, Color );
|
||||||
|
|
||||||
long m_nMinWidth;
|
long m_nMinWidth;
|
||||||
sal_uInt16 m_nStyle;
|
SvxBorderLineStyle m_nStyle;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImpLineListData( BorderWidthImpl aWidthImpl, sal_uInt16 nStyle,
|
ImpLineListData( BorderWidthImpl aWidthImpl, SvxBorderLineStyle nStyle,
|
||||||
long nMinWidth,
|
long nMinWidth,
|
||||||
Color ( *pColor1Fn ) ( Color ),
|
Color ( *pColor1Fn ) ( Color ),
|
||||||
Color ( *pColor2Fn ) ( Color ),
|
Color ( *pColor2Fn ) ( Color ),
|
||||||
@ -232,11 +233,11 @@ public:
|
|||||||
|
|
||||||
/** Returns the minimum width in twips */
|
/** Returns the minimum width in twips */
|
||||||
long GetMinWidth( ) { return m_nMinWidth;}
|
long GetMinWidth( ) { return m_nMinWidth;}
|
||||||
sal_uInt16 GetStyle( ) { return m_nStyle;}
|
SvxBorderLineStyle GetStyle( ) { return m_nStyle;}
|
||||||
};
|
};
|
||||||
|
|
||||||
ImpLineListData::ImpLineListData( BorderWidthImpl aWidthImpl,
|
ImpLineListData::ImpLineListData( BorderWidthImpl aWidthImpl,
|
||||||
sal_uInt16 nStyle, long nMinWidth, Color ( *pColor1Fn )( Color ),
|
SvxBorderLineStyle nStyle, long nMinWidth, Color ( *pColor1Fn )( Color ),
|
||||||
Color ( *pColor2Fn )( Color ), Color ( *pColorDistFn )( Color, Color ) ) :
|
Color ( *pColor2Fn )( Color ), Color ( *pColorDistFn )( Color, Color ) ) :
|
||||||
m_aWidthImpl( aWidthImpl ),
|
m_aWidthImpl( aWidthImpl ),
|
||||||
m_pColor1Fn( pColor1Fn ),
|
m_pColor1Fn( pColor1Fn ),
|
||||||
@ -263,9 +264,9 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault )
|
|||||||
return ( *m_pColorDistFn )( rMain, rDefault );
|
return ( *m_pColorDistFn )( rMain, rDefault );
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uInt16 LineListBox::GetSelectEntryStyle() const
|
SvxBorderLineStyle LineListBox::GetSelectEntryStyle() const
|
||||||
{
|
{
|
||||||
sal_uInt16 nStyle = css::table::BorderLineStyle::SOLID;
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle::SOLID;
|
||||||
sal_Int32 nPos = GetSelectEntryPos();
|
sal_Int32 nPos = GetSelectEntryPos();
|
||||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
{
|
{
|
||||||
@ -278,7 +279,7 @@ sal_uInt16 LineListBox::GetSelectEntryStyle() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, sal_uInt16 nDashing )
|
void lclDrawPolygon( OutputDevice& rDev, const basegfx::B2DPolygon& rPolygon, long nWidth, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
AntialiasingFlags nOldAA = rDev.GetAntialiasing();
|
AntialiasingFlags nOldAA = rDev.GetAntialiasing();
|
||||||
rDev.SetAntialiasing( nOldAA & ~AntialiasingFlags::EnableB2dDraw );
|
rDev.SetAntialiasing( nOldAA & ~AntialiasingFlags::EnableB2dDraw );
|
||||||
@ -319,30 +320,30 @@ namespace svtools {
|
|||||||
/**
|
/**
|
||||||
* Dashing array must start with a line width and end with a blank width.
|
* Dashing array must start with a line width and end with a blank width.
|
||||||
*/
|
*/
|
||||||
std::vector<double> GetDashing( sal_uInt16 nDashing )
|
std::vector<double> GetDashing( SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
std::vector<double> aPattern;
|
std::vector<double> aPattern;
|
||||||
switch (nDashing)
|
switch (nDashing)
|
||||||
{
|
{
|
||||||
case css::table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
aPattern.push_back( 1.0 ); // line
|
aPattern.push_back( 1.0 ); // line
|
||||||
aPattern.push_back( 2.0 ); // blank
|
aPattern.push_back( 2.0 ); // blank
|
||||||
break;
|
break;
|
||||||
case css::table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
aPattern.push_back( 16.0 ); // line
|
aPattern.push_back( 16.0 ); // line
|
||||||
aPattern.push_back( 5.0 ); // blank
|
aPattern.push_back( 5.0 ); // blank
|
||||||
break;
|
break;
|
||||||
case css::table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
aPattern.push_back( 6.0 ); // line
|
aPattern.push_back( 6.0 ); // line
|
||||||
aPattern.push_back( 2.0 ); // blank
|
aPattern.push_back( 2.0 ); // blank
|
||||||
break;
|
break;
|
||||||
case css::table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
aPattern.push_back( 16.0 ); // line
|
aPattern.push_back( 16.0 ); // line
|
||||||
aPattern.push_back( 5.0 ); // blank
|
aPattern.push_back( 5.0 ); // blank
|
||||||
aPattern.push_back( 5.0 ); // line
|
aPattern.push_back( 5.0 ); // line
|
||||||
aPattern.push_back( 5.0 ); // blank
|
aPattern.push_back( 5.0 ); // blank
|
||||||
break;
|
break;
|
||||||
case css::table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
aPattern.push_back( 16.0 ); // line
|
aPattern.push_back( 16.0 ); // line
|
||||||
aPattern.push_back( 5.0 ); // blank
|
aPattern.push_back( 5.0 ); // blank
|
||||||
aPattern.push_back( 5.0 ); // line
|
aPattern.push_back( 5.0 ); // line
|
||||||
@ -372,14 +373,14 @@ public:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<double> GetLineDashing( sal_uInt16 nDashing, double fScale )
|
std::vector<double> GetLineDashing( SvxBorderLineStyle nDashing, double fScale )
|
||||||
{
|
{
|
||||||
std::vector<double> aPattern = GetDashing(nDashing);
|
std::vector<double> aPattern = GetDashing(nDashing);
|
||||||
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
|
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
|
||||||
return aPattern;
|
return aPattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, double fScale )
|
basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, SvxBorderLineStyle nDashing, double fScale )
|
||||||
{
|
{
|
||||||
std::vector<double> aPattern = GetDashing(nDashing);
|
std::vector<double> aPattern = GetDashing(nDashing);
|
||||||
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
|
std::for_each(aPattern.begin(), aPattern.end(), ApplyScale(fScale));
|
||||||
@ -395,14 +396,14 @@ basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2,
|
void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2,
|
||||||
sal_uInt32 nWidth, sal_uInt16 nDashing )
|
sal_uInt32 nWidth, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
DrawLine( rDev, basegfx::B2DPoint( rP1.X(), rP1.Y() ),
|
DrawLine( rDev, basegfx::B2DPoint( rP1.X(), rP1.Y() ),
|
||||||
basegfx::B2DPoint( rP2.X(), rP2.Y( ) ), nWidth, nDashing );
|
basegfx::B2DPoint( rP2.X(), rP2.Y( ) ), nWidth, nDashing );
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rP1, const basegfx::B2DPoint& rP2,
|
void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rP1, const basegfx::B2DPoint& rP2,
|
||||||
sal_uInt32 nWidth, sal_uInt16 nDashing )
|
sal_uInt32 nWidth, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
basegfx::B2DPolygon aPolygon;
|
basegfx::B2DPolygon aPolygon;
|
||||||
aPolygon.append( rP1 );
|
aPolygon.append( rP1 );
|
||||||
@ -414,7 +415,7 @@ void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rP1, const basegfx::
|
|||||||
|
|
||||||
void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
|
void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
|
||||||
Color aColor1, Color aColor2, Color aColorDist,
|
Color aColor1, Color aColor2, Color aColorDist,
|
||||||
sal_uInt16 nStyle, Bitmap& rBmp )
|
SvxBorderLineStyle nStyle, Bitmap& rBmp )
|
||||||
{
|
{
|
||||||
//TODO, rather than including the " " text to force
|
//TODO, rather than including the " " text to force
|
||||||
//the line height, better would be do drop
|
//the line height, better would be do drop
|
||||||
@ -472,7 +473,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance,
|
|||||||
{
|
{
|
||||||
double y2 = n1 + nDist + double( n2 ) / 2;
|
double y2 = n1 + nDist + double( n2 ) / 2;
|
||||||
aVirDev->SetFillColor( aColor2 );
|
aVirDev->SetFillColor( aColor2 );
|
||||||
svtools::DrawLine( *aVirDev.get(), basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, css::table::BorderLineStyle::SOLID );
|
svtools::DrawLine( *aVirDev.get(), basegfx::B2DPoint( 0, y2 ), basegfx::B2DPoint( aSize.Width(), y2 ), n2, SvxBorderLineStyle::SOLID );
|
||||||
}
|
}
|
||||||
rBmp = aVirDev->GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
|
rBmp = aVirDev->GetBitmap( Point(), Size( aSize.Width(), n1+nDist+n2 ) );
|
||||||
}
|
}
|
||||||
@ -553,7 +554,7 @@ sal_Int32 LineListBox::GetStylePos( sal_Int32 nListPos, long nWidth )
|
|||||||
return nPos;
|
return nPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
|
void LineListBox::SelectEntry( SvxBorderLineStyle nStyle, bool bSelect )
|
||||||
{
|
{
|
||||||
sal_Int32 nPos = GetEntryPos( nStyle );
|
sal_Int32 nPos = GetEntryPos( nStyle );
|
||||||
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
|
||||||
@ -561,7 +562,7 @@ void LineListBox::SelectEntry( sal_uInt16 nStyle, bool bSelect )
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LineListBox::InsertEntry(
|
void LineListBox::InsertEntry(
|
||||||
const BorderWidthImpl& rWidthImpl, sal_uInt16 nStyle, long nMinWidth,
|
const BorderWidthImpl& rWidthImpl, SvxBorderLineStyle nStyle, long nMinWidth,
|
||||||
ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
|
ColorFunc pColor1Fn, ColorFunc pColor2Fn, ColorDistFunc pColorDistFn )
|
||||||
{
|
{
|
||||||
ImpLineListData* pData = new ImpLineListData(
|
ImpLineListData* pData = new ImpLineListData(
|
||||||
@ -569,9 +570,9 @@ void LineListBox::InsertEntry(
|
|||||||
pLineList->push_back( pData );
|
pLineList->push_back( pData );
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
|
sal_Int32 LineListBox::GetEntryPos( SvxBorderLineStyle nStyle ) const
|
||||||
{
|
{
|
||||||
if(nStyle == css::table::BorderLineStyle::NONE && !m_sNone.isEmpty())
|
if(nStyle == SvxBorderLineStyle::NONE && !m_sNone.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
|
for ( size_t i = 0, n = pLineList->size(); i < n; ++i ) {
|
||||||
ImpLineListData* pData = (*pLineList)[ i ];
|
ImpLineListData* pData = (*pLineList)[ i ];
|
||||||
@ -589,10 +590,10 @@ sal_Int32 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
|
|||||||
return LISTBOX_ENTRY_NOTFOUND;
|
return LISTBOX_ENTRY_NOTFOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_uInt16 LineListBox::GetEntryStyle( sal_Int32 nPos ) const
|
SvxBorderLineStyle LineListBox::GetEntryStyle( sal_Int32 nPos ) const
|
||||||
{
|
{
|
||||||
ImpLineListData* pData = (0 <= nPos && static_cast<size_t>(nPos) < pLineList->size()) ? (*pLineList)[ nPos ] : nullptr;
|
ImpLineListData* pData = (0 <= nPos && static_cast<size_t>(nPos) < pLineList->size()) ? (*pLineList)[ nPos ] : nullptr;
|
||||||
return ( pData ) ? pData->GetStyle() : css::table::BorderLineStyle::NONE;
|
return ( pData ) ? pData->GetStyle() : SvxBorderLineStyle::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineListBox::UpdatePaintLineColor()
|
void LineListBox::UpdatePaintLineColor()
|
||||||
|
@ -756,7 +756,7 @@ void lclDrawHorLine(
|
|||||||
OutputDevice& rDev,
|
OutputDevice& rDev,
|
||||||
const Point& rLPos, const LineEndResult& rLRes,
|
const Point& rLPos, const LineEndResult& rLRes,
|
||||||
const Point& rRPos, const LineEndResult& rRRes,
|
const Point& rRPos, const LineEndResult& rRRes,
|
||||||
long nTOffs, long nBOffs, SvxBorderStyle nDashing )
|
long nTOffs, long nBOffs, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
LinePoints aTPoints( rLPos + lclToMapUnit( rLRes.mnOffs1, nTOffs ), rRPos + lclToMapUnit( rRRes.mnOffs1, nTOffs ) );
|
LinePoints aTPoints( rLPos + lclToMapUnit( rLRes.mnOffs1, nTOffs ), rRPos + lclToMapUnit( rRRes.mnOffs1, nTOffs ) );
|
||||||
LinePoints aBPoints( rLPos + lclToMapUnit( rLRes.mnOffs2, nBOffs ), rRPos + lclToMapUnit( rRRes.mnOffs2, nBOffs ) );
|
LinePoints aBPoints( rLPos + lclToMapUnit( rLRes.mnOffs2, nBOffs ), rRPos + lclToMapUnit( rRRes.mnOffs2, nBOffs ) );
|
||||||
@ -826,7 +826,7 @@ void lclDrawVerLine(
|
|||||||
OutputDevice& rDev,
|
OutputDevice& rDev,
|
||||||
const Point& rTPos, const LineEndResult& rTRes,
|
const Point& rTPos, const LineEndResult& rTRes,
|
||||||
const Point& rBPos, const LineEndResult& rBRes,
|
const Point& rBPos, const LineEndResult& rBRes,
|
||||||
long nLOffs, long nROffs, SvxBorderStyle nDashing )
|
long nLOffs, long nROffs, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
LinePoints aLPoints( rTPos + lclToMapUnit( nLOffs, rTRes.mnOffs1 ), rBPos + lclToMapUnit( nLOffs, rBRes.mnOffs1 ) );
|
LinePoints aLPoints( rTPos + lclToMapUnit( nLOffs, rTRes.mnOffs1 ), rBPos + lclToMapUnit( nLOffs, rBRes.mnOffs1 ) );
|
||||||
LinePoints aRPoints( rTPos + lclToMapUnit( nROffs, rTRes.mnOffs2 ), rBPos + lclToMapUnit( nROffs, rBRes.mnOffs2 ) );
|
LinePoints aRPoints( rTPos + lclToMapUnit( nROffs, rTRes.mnOffs2 ), rBPos + lclToMapUnit( nROffs, rBRes.mnOffs2 ) );
|
||||||
@ -1011,7 +1011,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool
|
|||||||
*/
|
*/
|
||||||
void lclDrawDiagLine(
|
void lclDrawDiagLine(
|
||||||
OutputDevice& rDev, const Rectangle& rRect, bool bTLBR,
|
OutputDevice& rDev, const Rectangle& rRect, bool bTLBR,
|
||||||
const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderStyle nDashing )
|
const DiagLineResult& rResult, long nDiagOffs1, long nDiagOffs2, SvxBorderLineStyle nDashing )
|
||||||
{
|
{
|
||||||
lclPushDiagClipRect( rDev, rRect, rResult );
|
lclPushDiagClipRect( rDev, rRect, rResult );
|
||||||
LinePoints aLPoints( lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs1 ) );
|
LinePoints aLPoints( lclGetDiagLineEnds( rRect, bTLBR, nDiagOffs1 ) );
|
||||||
@ -1122,12 +1122,12 @@ void lclDrawDiagFrameBorders(
|
|||||||
Style::Style() :
|
Style::Style() :
|
||||||
meRefMode(RefMode::Centered),
|
meRefMode(RefMode::Centered),
|
||||||
mfPatternScale(1.0),
|
mfPatternScale(1.0),
|
||||||
mnType(table::BorderLineStyle::SOLID)
|
mnType(SvxBorderLineStyle::SOLID)
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
|
Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType ) :
|
||||||
meRefMode(RefMode::Centered),
|
meRefMode(RefMode::Centered),
|
||||||
mfPatternScale(1.0),
|
mfPatternScale(1.0),
|
||||||
mnType(nType)
|
mnType(nType)
|
||||||
@ -1137,7 +1137,7 @@ Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
|
Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
|
||||||
double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
|
double nP, double nD, double nS, SvxBorderLineStyle nType ) :
|
||||||
meRefMode(RefMode::Centered),
|
meRefMode(RefMode::Centered),
|
||||||
mfPatternScale(1.0),
|
mfPatternScale(1.0),
|
||||||
mnType(nType)
|
mnType(nType)
|
||||||
@ -1244,7 +1244,7 @@ void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWid
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
mnType = table::BorderLineStyle::SOLID;
|
mnType = SvxBorderLineStyle::SOLID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1284,7 +1284,7 @@ bool operator<( const Style& rL, const Style& rR )
|
|||||||
if( (rL.Secn() && rR.Secn()) && !rtl::math::approxEqual(rL.Dist(), rR.Dist()) ) return rL.Dist() > rR.Dist();
|
if( (rL.Secn() && rR.Secn()) && !rtl::math::approxEqual(rL.Dist(), rR.Dist()) ) return rL.Dist() > rR.Dist();
|
||||||
|
|
||||||
// both lines single and 1 unit thick, only one is dotted -> rL<rR, if rL is dotted
|
// both lines single and 1 unit thick, only one is dotted -> rL<rR, if rL is dotted
|
||||||
if( (nLW == 1) && (rL.Type() != rR.Type()) ) return rL.Type();
|
if( (nLW == 1) && (rL.Type() != rR.Type()) ) return rL.Type() != SvxBorderLineStyle::SOLID;
|
||||||
|
|
||||||
// seem to be equal
|
// seem to be equal
|
||||||
return false;
|
return false;
|
||||||
|
@ -150,7 +150,7 @@ void FrameBorder::SetState( FrameBorderState eState )
|
|||||||
break;
|
break;
|
||||||
case FrameBorderState::DontCare:
|
case FrameBorderState::DontCare:
|
||||||
maCoreStyle = SvxBorderLine();
|
maCoreStyle = SvxBorderLine();
|
||||||
maUIStyle = frame::Style(3, 0, 0, table::BorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE
|
maUIStyle = frame::Style(3, 0, 0, SvxBorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -895,7 +895,7 @@ void FrameSelector::HideAllBorders()
|
|||||||
mxImpl->SetBorderState( **aIt, FrameBorderState::Hide );
|
mxImpl->SetBorderState( **aIt, FrameBorderState::Hide );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderStyle& rnStyle ) const
|
bool FrameSelector::GetVisibleWidth( long& rnWidth, SvxBorderLineStyle& rnStyle ) const
|
||||||
{
|
{
|
||||||
VisFrameBorderCIter aIt( mxImpl->maEnabBorders );
|
VisFrameBorderCIter aIt( mxImpl->maEnabBorders );
|
||||||
if( !aIt.Is() )
|
if( !aIt.Is() )
|
||||||
@ -986,7 +986,7 @@ void FrameSelector::SelectAllVisibleBorders()
|
|||||||
mxImpl->SelectBorder( **aIt, true/*bSelect*/ );
|
mxImpl->SelectBorder( **aIt, true/*bSelect*/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderStyle nStyle )
|
void FrameSelector::SetStyleToSelection( long nWidth, SvxBorderLineStyle nStyle )
|
||||||
{
|
{
|
||||||
mxImpl->maCurrStyle.SetBorderLineStyle( nStyle );
|
mxImpl->maCurrStyle.SetBorderLineStyle( nStyle );
|
||||||
mxImpl->maCurrStyle.SetWidth( nWidth );
|
mxImpl->maCurrStyle.SetWidth( nWidth );
|
||||||
|
@ -2070,32 +2070,31 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( svt::ToolboxController& rController, vcl
|
|||||||
m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP );
|
m_aLineStyleLb->SetSourceUnit( FUNIT_TWIP );
|
||||||
m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
|
m_aLineStyleLb->SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
|
||||||
|
|
||||||
using namespace table::BorderLineStyle;
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::SOLID ), SvxBorderLineStyle::SOLID );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOTTED ), SvxBorderLineStyle::DOTTED );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOTTED ), DOTTED );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DASHED ), SvxBorderLineStyle::DASHED );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DASHED ), DASHED );
|
|
||||||
|
|
||||||
// Double lines
|
// Double lines
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( DOUBLE ), DOUBLE );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::DOUBLE ), SvxBorderLineStyle::DOUBLE );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_SMALLGAP ), THINTHICK_SMALLGAP, 20 );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_SMALLGAP ), SvxBorderLineStyle::THINTHICK_SMALLGAP, 20 );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_MEDIUMGAP ), THINTHICK_MEDIUMGAP );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_MEDIUMGAP ), SvxBorderLineStyle::THINTHICK_MEDIUMGAP );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THINTHICK_LARGEGAP ), THINTHICK_LARGEGAP );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THINTHICK_LARGEGAP ), SvxBorderLineStyle::THINTHICK_LARGEGAP );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_SMALLGAP ), THICKTHIN_SMALLGAP, 20 );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_SMALLGAP ), SvxBorderLineStyle::THICKTHIN_SMALLGAP, 20 );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_MEDIUMGAP ), THICKTHIN_MEDIUMGAP );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_MEDIUMGAP ), SvxBorderLineStyle::THICKTHIN_MEDIUMGAP );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( THICKTHIN_LARGEGAP ), THICKTHIN_LARGEGAP );
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::THICKTHIN_LARGEGAP ), SvxBorderLineStyle::THICKTHIN_LARGEGAP );
|
||||||
|
|
||||||
// Engraved / Embossed
|
// Engraved / Embossed
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( EMBOSSED ), EMBOSSED, 15,
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::EMBOSSED ), SvxBorderLineStyle::EMBOSSED, 15,
|
||||||
&SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
|
&SvxBorderLine::threeDLightColor, &SvxBorderLine::threeDDarkColor,
|
||||||
&lcl_mediumColor );
|
&lcl_mediumColor );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( ENGRAVED ), ENGRAVED, 15,
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::ENGRAVED ), SvxBorderLineStyle::ENGRAVED, 15,
|
||||||
&SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
|
&SvxBorderLine::threeDDarkColor, &SvxBorderLine::threeDLightColor,
|
||||||
&lcl_mediumColor );
|
&lcl_mediumColor );
|
||||||
|
|
||||||
// Inset / Outset
|
// Inset / Outset
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( OUTSET ), OUTSET, 10,
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::OUTSET ), SvxBorderLineStyle::OUTSET, 10,
|
||||||
&SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
|
&SvxBorderLine::lightColor, &SvxBorderLine::darkColor );
|
||||||
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( INSET ), INSET, 10,
|
m_aLineStyleLb->InsertEntry( SvxBorderLine::getWidthImpl( SvxBorderLineStyle::INSET ), SvxBorderLineStyle::INSET, 10,
|
||||||
&SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
|
&SvxBorderLine::darkColor, &SvxBorderLine::lightColor );
|
||||||
m_aLineStyleLb->SetWidth( 20 ); // 1pt by default
|
m_aLineStyleLb->SetWidth( 20 ); // 1pt by default
|
||||||
|
|
||||||
@ -2127,7 +2126,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ListBox&, void)
|
|||||||
VclPtr<SvxLineWindow_Impl> xThis(this);
|
VclPtr<SvxLineWindow_Impl> xThis(this);
|
||||||
|
|
||||||
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
|
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
|
||||||
SvxBorderStyle nStyle = SvxBorderStyle( m_aLineStyleLb->GetSelectEntryStyle() );
|
SvxBorderLineStyle nStyle = SvxBorderLineStyle( m_aLineStyleLb->GetSelectEntryStyle() );
|
||||||
|
|
||||||
if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
|
if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ enum SwColLineAdj
|
|||||||
|
|
||||||
class SW_DLLPUBLIC SwFormatCol : public SfxPoolItem
|
class SW_DLLPUBLIC SwFormatCol : public SfxPoolItem
|
||||||
{
|
{
|
||||||
editeng::SvxBorderStyle m_eLineStyle; ///< style of the separator line
|
SvxBorderLineStyle m_eLineStyle; ///< style of the separator line
|
||||||
sal_uLong m_nLineWidth; ///< Width of the separator line.
|
sal_uLong m_nLineWidth; ///< Width of the separator line.
|
||||||
Color m_aLineColor; ///< Color of the separator line.
|
Color m_aLineColor; ///< Color of the separator line.
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
SwColumns &GetColumns() { return m_aColumns; }
|
SwColumns &GetColumns() { return m_aColumns; }
|
||||||
sal_uInt16 GetNumCols() const { return m_aColumns.size(); }
|
sal_uInt16 GetNumCols() const { return m_aColumns.size(); }
|
||||||
|
|
||||||
editeng::SvxBorderStyle GetLineStyle() const { return m_eLineStyle;}
|
SvxBorderLineStyle GetLineStyle() const { return m_eLineStyle;}
|
||||||
sal_uLong GetLineWidth() const { return m_nLineWidth;}
|
sal_uLong GetLineWidth() const { return m_nLineWidth;}
|
||||||
const Color& GetLineColor() const { return m_aLineColor;}
|
const Color& GetLineColor() const { return m_aLineColor;}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
@return smallest width if bMin is true. */
|
@return smallest width if bMin is true. */
|
||||||
sal_uInt16 GetGutterWidth( bool bMin = false ) const;
|
sal_uInt16 GetGutterWidth( bool bMin = false ) const;
|
||||||
|
|
||||||
void SetLineStyle(editeng::SvxBorderStyle eStyle) { m_eLineStyle = eStyle;}
|
void SetLineStyle(SvxBorderLineStyle eStyle) { m_eLineStyle = eStyle;}
|
||||||
void SetLineWidth(sal_uLong nLWidth) { m_nLineWidth = nLWidth;}
|
void SetLineWidth(sal_uLong nLWidth) { m_nLineWidth = nLWidth;}
|
||||||
void SetLineColor(const Color& rCol ) { m_aLineColor = rCol;}
|
void SetLineColor(const Color& rCol ) { m_aLineColor = rCol;}
|
||||||
void SetLineHeight( sal_uInt8 nNew ) { m_nLineHeight = nNew; }
|
void SetLineHeight( sal_uInt8 nNew ) { m_nLineHeight = nNew; }
|
||||||
|
@ -49,7 +49,7 @@ class SW_DLLPUBLIC SwPageFootnoteInfo
|
|||||||
private:
|
private:
|
||||||
SwTwips m_nMaxHeight; ///< maximum height of the footnote area.
|
SwTwips m_nMaxHeight; ///< maximum height of the footnote area.
|
||||||
sal_uLong m_nLineWidth; ///< width of separator line
|
sal_uLong m_nLineWidth; ///< width of separator line
|
||||||
editeng::SvxBorderStyle m_eLineStyle; ///< Style of the separator line
|
SvxBorderLineStyle m_eLineStyle; ///< Style of the separator line
|
||||||
Color m_LineColor; ///< color of the separator line
|
Color m_LineColor; ///< color of the separator line
|
||||||
Fraction m_Width; ///< percentage width of the separator line.
|
Fraction m_Width; ///< percentage width of the separator line.
|
||||||
css::text::HorizontalAdjust m_eAdjust; ///< line adjustment.
|
css::text::HorizontalAdjust m_eAdjust; ///< line adjustment.
|
||||||
@ -60,7 +60,7 @@ public:
|
|||||||
SwTwips GetHeight() const { return m_nMaxHeight; }
|
SwTwips GetHeight() const { return m_nMaxHeight; }
|
||||||
sal_uLong GetLineWidth() const { return m_nLineWidth; }
|
sal_uLong GetLineWidth() const { return m_nLineWidth; }
|
||||||
const Color& GetLineColor() const { return m_LineColor;}
|
const Color& GetLineColor() const { return m_LineColor;}
|
||||||
editeng::SvxBorderStyle GetLineStyle() const { return m_eLineStyle; }
|
SvxBorderLineStyle GetLineStyle() const { return m_eLineStyle; }
|
||||||
const Fraction& GetWidth() const { return m_Width; }
|
const Fraction& GetWidth() const { return m_Width; }
|
||||||
css::text::HorizontalAdjust GetAdj() const { return m_eAdjust; }
|
css::text::HorizontalAdjust GetAdj() const { return m_eAdjust; }
|
||||||
SwTwips GetTopDist() const { return m_nTopDist; }
|
SwTwips GetTopDist() const { return m_nTopDist; }
|
||||||
@ -68,7 +68,7 @@ public:
|
|||||||
|
|
||||||
void SetHeight(SwTwips const nNew) { m_nMaxHeight = nNew; }
|
void SetHeight(SwTwips const nNew) { m_nMaxHeight = nNew; }
|
||||||
void SetLineWidth(sal_uLong const nSet) { m_nLineWidth = nSet; }
|
void SetLineWidth(sal_uLong const nSet) { m_nLineWidth = nSet; }
|
||||||
void SetLineStyle(editeng::SvxBorderStyle const eSet) {m_eLineStyle = eSet;}
|
void SetLineStyle(SvxBorderLineStyle const eSet) {m_eLineStyle = eSet;}
|
||||||
void SetLineColor(const Color& rCol) { m_LineColor = rCol;}
|
void SetLineColor(const Color& rCol) { m_LineColor = rCol;}
|
||||||
void SetWidth(const Fraction & rNew) { m_Width = rNew; }
|
void SetWidth(const Fraction & rNew) { m_Width = rNew; }
|
||||||
void SetAdj(css::text::HorizontalAdjust const eNew) { m_eAdjust = eNew; }
|
void SetAdj(css::text::HorizontalAdjust const eNew) { m_eAdjust = eNew; }
|
||||||
|
@ -1028,7 +1028,7 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId,
|
|||||||
{
|
{
|
||||||
SvxBoxItem aBox( RES_BOX );
|
SvxBoxItem aBox( RES_BOX );
|
||||||
Color aColor( COL_GRAY );
|
Color aColor( COL_GRAY );
|
||||||
SvxBorderLine aNew(&aColor, 1, table::BorderLineStyle::DOUBLE);
|
SvxBorderLine aNew(&aColor, 1, SvxBorderLineStyle::DOUBLE);
|
||||||
aBox.SetLine( &aNew, SvxBoxItemLine::BOTTOM );
|
aBox.SetLine( &aNew, SvxBoxItemLine::BOTTOM );
|
||||||
|
|
||||||
aSet.Put( aBox );
|
aSet.Put( aBox );
|
||||||
|
@ -121,7 +121,7 @@ static void lcl_SetDfltBoxAttr( SwFrameFormat& rFormat, sal_uInt8 nId )
|
|||||||
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
|
SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
|
||||||
if ( bHTML )
|
if ( bHTML )
|
||||||
{
|
{
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_0 );
|
aLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
SvxBoxItem aBox(RES_BOX);
|
SvxBoxItem aBox(RES_BOX);
|
||||||
|
@ -553,27 +553,27 @@ bool SwAutoFormat::DoUnderline()
|
|||||||
switch( eState )
|
switch( eState )
|
||||||
{
|
{
|
||||||
case 1: // single, 0.05 pt
|
case 1: // single, 0.05 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_0 );
|
aLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
break;
|
break;
|
||||||
case 2: // single, 1.0 pt
|
case 2: // single, 1.0 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_1 );
|
aLine.SetWidth( DEF_LINE_WIDTH_1 );
|
||||||
break;
|
break;
|
||||||
case 3: // double, 1.0 pt
|
case 3: // double, 1.0 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_1 );
|
aLine.SetWidth( DEF_LINE_WIDTH_1 );
|
||||||
break;
|
break;
|
||||||
case 4: // double (thick/thin), 4.0 pt
|
case 4: // double (thick/thin), 4.0 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::THICKTHIN_SMALLGAP);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_SMALLGAP);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_3 );
|
aLine.SetWidth( DEF_LINE_WIDTH_3 );
|
||||||
break;
|
break;
|
||||||
case 5: // double (thin/thick), 4.0 pt
|
case 5: // double (thin/thick), 4.0 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::THINTHICK_SMALLGAP);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_SMALLGAP);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_3 );
|
aLine.SetWidth( DEF_LINE_WIDTH_3 );
|
||||||
break;
|
break;
|
||||||
case 6: // double, 2.5 pt
|
case 6: // double, 2.5 pt
|
||||||
aLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
aLine.SetWidth( DEF_LINE_WIDTH_2 );
|
aLine.SetWidth( DEF_LINE_WIDTH_2 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ public:
|
|||||||
const bool bOnlyTextBackground = false ) const;
|
const bool bOnlyTextBackground = false ) const;
|
||||||
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrame*,
|
void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrame*,
|
||||||
const Color *pColor,
|
const Color *pColor,
|
||||||
const editeng::SvxBorderStyle = css::table::BorderLineStyle::SOLID ) const;
|
const SvxBorderLineStyle = SvxBorderLineStyle::SOLID ) const;
|
||||||
|
|
||||||
drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const;
|
drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const;
|
||||||
void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DContainer& rSequence ) const;
|
void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DContainer& rSequence ) const;
|
||||||
|
@ -841,7 +841,7 @@ SwFormatCol& SwFormatCol::operator=( const SwFormatCol& rCpy )
|
|||||||
|
|
||||||
SwFormatCol::SwFormatCol()
|
SwFormatCol::SwFormatCol()
|
||||||
: SfxPoolItem( RES_COL )
|
: SfxPoolItem( RES_COL )
|
||||||
, m_eLineStyle( table::BorderLineStyle::NONE)
|
, m_eLineStyle( SvxBorderLineStyle::NONE)
|
||||||
,
|
,
|
||||||
m_nLineWidth(0),
|
m_nLineWidth(0),
|
||||||
m_nLineHeight( 100 ),
|
m_nLineHeight( 100 ),
|
||||||
@ -1100,10 +1100,10 @@ bool SwFormatCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
|||||||
switch ( pSwColums->GetSepLineStyle() )
|
switch ( pSwColums->GetSepLineStyle() )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case 0: m_eLineStyle = table::BorderLineStyle::NONE; break;
|
case 0: m_eLineStyle = SvxBorderLineStyle::NONE; break;
|
||||||
case 1: m_eLineStyle = table::BorderLineStyle::SOLID; break;
|
case 1: m_eLineStyle = SvxBorderLineStyle::SOLID; break;
|
||||||
case 2: m_eLineStyle = table::BorderLineStyle::DOTTED; break;
|
case 2: m_eLineStyle = SvxBorderLineStyle::DOTTED; break;
|
||||||
case 3: m_eLineStyle = table::BorderLineStyle::DASHED; break;
|
case 3: m_eLineStyle = SvxBorderLineStyle::DASHED; break;
|
||||||
}
|
}
|
||||||
if(!pSwColums->GetSepLineIsOn())
|
if(!pSwColums->GetSepLineIsOn())
|
||||||
m_eAdj = COLADJ_NONE;
|
m_eAdj = COLADJ_NONE;
|
||||||
@ -1124,7 +1124,7 @@ void SwFormatCol::dumpAsXml(xmlTextWriterPtr pWriter) const
|
|||||||
{
|
{
|
||||||
xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatCol"));
|
xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatCol"));
|
||||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
|
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
|
||||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLineStyle"), BAD_CAST(OString::number(m_eLineStyle).getStr()));
|
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eLineStyle"), BAD_CAST(OString::number((sal_Int16)m_eLineStyle).getStr()));
|
||||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineWidth"), BAD_CAST(OString::number(m_nLineWidth).getStr()));
|
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineWidth"), BAD_CAST(OString::number(m_nLineWidth).getStr()));
|
||||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aLineColor"), BAD_CAST(m_aLineColor.AsRGBHexString().toUtf8().getStr()));
|
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aLineColor"), BAD_CAST(m_aLineColor.AsRGBHexString().toUtf8().getStr()));
|
||||||
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineHeight"), BAD_CAST(OString::number(m_nLineHeight).getStr()));
|
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nLineHeight"), BAD_CAST(OString::number(m_nLineHeight).getStr()));
|
||||||
|
@ -377,7 +377,7 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName)
|
|||||||
SwPageFootnoteInfo::SwPageFootnoteInfo()
|
SwPageFootnoteInfo::SwPageFootnoteInfo()
|
||||||
: m_nMaxHeight( 0 )
|
: m_nMaxHeight( 0 )
|
||||||
, m_nLineWidth(10)
|
, m_nLineWidth(10)
|
||||||
, m_eLineStyle( table::BorderLineStyle::SOLID )
|
, m_eLineStyle( SvxBorderLineStyle::SOLID )
|
||||||
, m_Width( 25, 100 )
|
, m_Width( 25, 100 )
|
||||||
, m_nTopDist( 57 ) //1mm
|
, m_nTopDist( 57 ) //1mm
|
||||||
, m_nBottomDist( 57 )
|
, m_nBottomDist( 57 )
|
||||||
|
@ -145,17 +145,17 @@ namespace o3tl {
|
|||||||
class SwLineRect : public SwRect
|
class SwLineRect : public SwRect
|
||||||
{
|
{
|
||||||
Color aColor;
|
Color aColor;
|
||||||
SvxBorderStyle nStyle;
|
SvxBorderLineStyle nStyle;
|
||||||
const SwTabFrame *pTab;
|
const SwTabFrame *pTab;
|
||||||
SubColFlags nSubColor; //colorize subsidiary lines
|
SubColFlags nSubColor; //colorize subsidiary lines
|
||||||
bool bPainted; //already painted?
|
bool bPainted; //already painted?
|
||||||
sal_uInt8 nLock; //To distinguish the line and the hell layer.
|
sal_uInt8 nLock; //To distinguish the line and the hell layer.
|
||||||
public:
|
public:
|
||||||
SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
|
SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyle,
|
||||||
const SwTabFrame *pT , const SubColFlags nSCol );
|
const SwTabFrame *pT , const SubColFlags nSCol );
|
||||||
|
|
||||||
const Color& GetColor() const { return aColor;}
|
const Color& GetColor() const { return aColor;}
|
||||||
SvxBorderStyle GetStyle() const { return nStyle; }
|
SvxBorderLineStyle GetStyle() const { return nStyle; }
|
||||||
const SwTabFrame *GetTab() const { return pTab; }
|
const SwTabFrame *GetTab() const { return pTab; }
|
||||||
void SetPainted() { bPainted = true; }
|
void SetPainted() { bPainted = true; }
|
||||||
void Lock( bool bLock ) { if ( bLock )
|
void Lock( bool bLock ) { if ( bLock )
|
||||||
@ -198,7 +198,7 @@ public:
|
|||||||
dummy_function();
|
dummy_function();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle,
|
void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderLineStyle nStyle,
|
||||||
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties &properties );
|
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties &properties );
|
||||||
void ConnectEdges( OutputDevice *pOut, SwPaintProperties &properties );
|
void ConnectEdges( OutputDevice *pOut, SwPaintProperties &properties );
|
||||||
void PaintLines ( OutputDevice *pOut, SwPaintProperties &properties );
|
void PaintLines ( OutputDevice *pOut, SwPaintProperties &properties );
|
||||||
@ -625,7 +625,7 @@ void BorderLines::AddBorderLine(
|
|||||||
m_Lines.push_back(xLine);
|
m_Lines.push_back(xLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
|
SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyl,
|
||||||
const SwTabFrame *pT, const SubColFlags nSCol ) :
|
const SwTabFrame *pT, const SubColFlags nSCol ) :
|
||||||
SwRect( rRect ),
|
SwRect( rRect ),
|
||||||
nStyle( nStyl ),
|
nStyle( nStyl ),
|
||||||
@ -675,7 +675,7 @@ bool SwLineRect::MakeUnion( const SwRect &rRect, SwPaintProperties& properties)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
|
void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderLineStyle nStyle,
|
||||||
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties& properties )
|
const SwTabFrame *pTab, const SubColFlags nSCol, SwPaintProperties& properties )
|
||||||
{
|
{
|
||||||
// Loop backwards because lines which can be combined, can usually be painted
|
// Loop backwards because lines which can be combined, can usually be painted
|
||||||
@ -800,7 +800,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
|
|||||||
if ( !rL1.IsInside( aIns ) )
|
if ( !rL1.IsInside( aIns ) )
|
||||||
continue;
|
continue;
|
||||||
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
|
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
|
||||||
table::BorderLineStyle::SOLID,
|
SvxBorderLineStyle::SOLID,
|
||||||
rL1.GetTab(), SubColFlags::Tab ) );
|
rL1.GetTab(), SubColFlags::Tab ) );
|
||||||
if ( isFull() )
|
if ( isFull() )
|
||||||
{
|
{
|
||||||
@ -841,7 +841,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut, SwPaintProperties& propertie
|
|||||||
if ( !rL1.IsInside( aIns ) )
|
if ( !rL1.IsInside( aIns ) )
|
||||||
continue;
|
continue;
|
||||||
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
|
aLineRects.push_back( SwLineRect( aIns, &rL1.GetColor(),
|
||||||
table::BorderLineStyle::SOLID,
|
SvxBorderLineStyle::SOLID,
|
||||||
rL1.GetTab(), SubColFlags::Tab ) );
|
rL1.GetTab(), SubColFlags::Tab ) );
|
||||||
if ( isFull() )
|
if ( isFull() )
|
||||||
{
|
{
|
||||||
@ -2668,7 +2668,7 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons
|
|||||||
if (isTableBoundariesEnabled() && gProp.pSGlobalShell->GetWin())
|
if (isTableBoundariesEnabled() && gProp.pSGlobalShell->GetWin())
|
||||||
aStyles[ 0 ].Set( rCol, rCol, rCol, false, 1, 0, 0 );
|
aStyles[ 0 ].Set( rCol, rCol, rCol, false, 1, 0, 0 );
|
||||||
else
|
else
|
||||||
aStyles[0].SetType(table::BorderLineStyle::NONE);
|
aStyles[0].SetType(SvxBorderLineStyle::NONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pTmpColor = pHCColor;
|
pTmpColor = pHCColor;
|
||||||
@ -4650,7 +4650,7 @@ void SwFrame::PaintBorderLine( const SwRect& rRect,
|
|||||||
const SwRect& rOutRect,
|
const SwRect& rOutRect,
|
||||||
const SwPageFrame * pPage,
|
const SwPageFrame * pPage,
|
||||||
const Color *pColor,
|
const Color *pColor,
|
||||||
const SvxBorderStyle nStyle ) const
|
const SvxBorderLineStyle nStyle ) const
|
||||||
{
|
{
|
||||||
if ( !rOutRect.IsOver( rRect ) )
|
if ( !rOutRect.IsOver( rRect ) )
|
||||||
return;
|
return;
|
||||||
@ -5588,7 +5588,7 @@ void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
|
|||||||
nX), Size( nLineWidth, nWidth ) )
|
nX), Size( nLineWidth, nWidth ) )
|
||||||
: SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ),
|
: SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ),
|
||||||
Size( nWidth, rInf.GetLineWidth()));
|
Size( nWidth, rInf.GetLineWidth()));
|
||||||
if ( aLineRect.HasArea() && rInf.GetLineStyle() != css::table::BorderLineStyle::NONE)
|
if ( aLineRect.HasArea() && rInf.GetLineStyle() != SvxBorderLineStyle::NONE)
|
||||||
PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(),
|
PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(),
|
||||||
rInf.GetLineStyle() );
|
rInf.GetLineStyle() );
|
||||||
}
|
}
|
||||||
@ -6868,7 +6868,7 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
|
|||||||
SwRect aRect( aP1, aP2 );
|
SwRect aRect( aP1, aP2 );
|
||||||
// OD 18.11.2002 #99672# - use parameter <pSubsLines> instead of
|
// OD 18.11.2002 #99672# - use parameter <pSubsLines> instead of
|
||||||
// global variable <gProp.pSSubsLines>.
|
// global variable <gProp.pSSubsLines>.
|
||||||
pSubsLines->AddLineRect( aRect, nullptr, table::BorderLineStyle::SOLID,
|
pSubsLines->AddLineRect( aRect, nullptr, SvxBorderLineStyle::SOLID,
|
||||||
nullptr, nSubColor, gProp );
|
nullptr, nSubColor, gProp );
|
||||||
}
|
}
|
||||||
aP1 = aP2;
|
aP1 = aP2;
|
||||||
@ -7178,14 +7178,14 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
|
|||||||
{
|
{
|
||||||
const SwRect aRect( aOut.Pos(), aLB );
|
const SwRect aRect( aOut.Pos(), aLB );
|
||||||
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
||||||
table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
||||||
}
|
}
|
||||||
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
|
// OD 14.11.2002 #104821# - in vertical layout set page/column break at right
|
||||||
if ( aOriginal.Right() == nRight )
|
if ( aOriginal.Right() == nRight )
|
||||||
{
|
{
|
||||||
const SwRect aRect( aRT, aRB );
|
const SwRect aRect( aRT, aRB );
|
||||||
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
||||||
table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines
|
// OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines
|
||||||
@ -7196,13 +7196,13 @@ void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
|
|||||||
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
|
// OD 14.11.2002 #104821# - in horizontal layout set page/column break at top
|
||||||
const SwRect aRect( aOut.Pos(), aRT );
|
const SwRect aRect( aOut.Pos(), aRT );
|
||||||
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
||||||
table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
||||||
}
|
}
|
||||||
if ( aOriginal.Bottom() == nBottom )
|
if ( aOriginal.Bottom() == nBottom )
|
||||||
{
|
{
|
||||||
const SwRect aRect( aLB, aRB );
|
const SwRect aRect( aLB, aRB );
|
||||||
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
pUsedSubsLines->AddLineRect( aRect, nullptr,
|
||||||
table::BorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
SvxBorderLineStyle::SOLID, nullptr, nSubColor, gProp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2336,9 +2336,9 @@ SwXTextColumns::SwXTextColumns(const SwFormatCol& rFormatCol) :
|
|||||||
sal_Int8 nStyle = API_COL_LINE_NONE;
|
sal_Int8 nStyle = API_COL_LINE_NONE;
|
||||||
switch (rFormatCol.GetLineStyle())
|
switch (rFormatCol.GetLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
|
case SvxBorderLineStyle::SOLID: nStyle = API_COL_LINE_SOLID; break;
|
||||||
case table::BorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
|
case SvxBorderLineStyle::DOTTED: nStyle= API_COL_LINE_DOTTED; break;
|
||||||
case table::BorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
|
case SvxBorderLineStyle::DASHED: nStyle= API_COL_LINE_DASHED; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
nSepLineStyle = nStyle;
|
nSepLineStyle = nStyle;
|
||||||
|
@ -200,7 +200,7 @@ static bool lcl_LineToSvxLine(const table::BorderLine& rLine, SvxBorderLine& rSv
|
|||||||
{
|
{
|
||||||
rSvxLine.SetColor(Color(rLine.Color));
|
rSvxLine.SetColor(Color(rLine.Color));
|
||||||
|
|
||||||
rSvxLine.GuessLinesWidths( table::BorderLineStyle::NONE,
|
rSvxLine.GuessLinesWidths( SvxBorderLineStyle::NONE,
|
||||||
convertMm100ToTwip( rLine.OuterLineWidth ),
|
convertMm100ToTwip( rLine.OuterLineWidth ),
|
||||||
convertMm100ToTwip( rLine.InnerLineWidth ),
|
convertMm100ToTwip( rLine.InnerLineWidth ),
|
||||||
convertMm100ToTwip( rLine.LineDistance ) );
|
convertMm100ToTwip( rLine.LineDistance ) );
|
||||||
|
@ -3333,34 +3333,34 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
|
|||||||
sOut.append(' ');
|
sOut.append(' ');
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
sOut.append(sCSS1_PV_solid);
|
sOut.append(sCSS1_PV_solid);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
sOut.append(sCSS1_PV_dotted);
|
sOut.append(sCSS1_PV_dotted);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
sOut.append(sCSS1_PV_dashed);
|
sOut.append(sCSS1_PV_dashed);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
sOut.append(sCSS1_PV_double);
|
sOut.append(sCSS1_PV_double);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
sOut.append(sCSS1_PV_ridge);
|
sOut.append(sCSS1_PV_ridge);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
sOut.append(sCSS1_PV_groove);
|
sOut.append(sCSS1_PV_groove);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
sOut.append(sCSS1_PV_inset);
|
sOut.append(sCSS1_PV_inset);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
sOut.append(sCSS1_PV_outset);
|
sOut.append(sCSS1_PV_outset);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -970,7 +970,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
|
|||||||
|
|
||||||
if ( pOptions->nCellSpacing != 0 )
|
if ( pOptions->nCellSpacing != 0 )
|
||||||
{
|
{
|
||||||
m_aTopBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
m_aTopBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
}
|
}
|
||||||
m_aTopBorderLine.SetWidth( nPHeight );
|
m_aTopBorderLine.SetWidth( nPHeight );
|
||||||
m_aTopBorderLine.SetColor( rBorderColor );
|
m_aTopBorderLine.SetColor( rBorderColor );
|
||||||
@ -984,7 +984,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
|
|||||||
{
|
{
|
||||||
if ( pOptions->nCellSpacing != 0 )
|
if ( pOptions->nCellSpacing != 0 )
|
||||||
{
|
{
|
||||||
m_aLeftBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
m_aLeftBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
}
|
}
|
||||||
m_aLeftBorderLine.SetWidth( nPWidth );
|
m_aLeftBorderLine.SetWidth( nPWidth );
|
||||||
m_aLeftBorderLine.SetColor( rBorderColor );
|
m_aLeftBorderLine.SetColor( rBorderColor );
|
||||||
@ -993,7 +993,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions )
|
|||||||
|
|
||||||
if( pOptions->nCellSpacing != 0 )
|
if( pOptions->nCellSpacing != 0 )
|
||||||
{
|
{
|
||||||
m_aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
m_aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1378,8 +1378,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
|
|||||||
|
|
||||||
sal_uInt16 nBorderWidth = m_aBorderLine.GetOutWidth();
|
sal_uInt16 nBorderWidth = m_aBorderLine.GetOutWidth();
|
||||||
nBorderWidth *= (nEmptyRows + 1);
|
nBorderWidth *= (nEmptyRows + 1);
|
||||||
aThickBorderLine.SetBorderLineStyle(
|
aThickBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
|
||||||
table::BorderLineStyle::SOLID);
|
|
||||||
aThickBorderLine.SetWidth( nBorderWidth );
|
aThickBorderLine.SetWidth( nBorderWidth );
|
||||||
aBoxItem.SetLine( &aThickBorderLine, SvxBoxItemLine::BOTTOM );
|
aBoxItem.SetLine( &aThickBorderLine, SvxBoxItemLine::BOTTOM );
|
||||||
}
|
}
|
||||||
|
@ -323,31 +323,31 @@ void SvxCSS1BorderInfo::SetBorderLine( SvxBoxItemLine nLine, SvxBoxItem &rBoxIte
|
|||||||
switch ( eStyle )
|
switch ( eStyle )
|
||||||
{
|
{
|
||||||
case CSS1_BS_SINGLE:
|
case CSS1_BS_SINGLE:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_DOUBLE:
|
case CSS1_BS_DOUBLE:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_DOTTED:
|
case CSS1_BS_DOTTED:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOTTED);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOTTED);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_DASHED:
|
case CSS1_BS_DASHED:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DASHED);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DASHED);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_GROOVE:
|
case CSS1_BS_GROOVE:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::ENGRAVED);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::ENGRAVED);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_RIDGE:
|
case CSS1_BS_RIDGE:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::EMBOSSED);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::EMBOSSED);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_INSET:
|
case CSS1_BS_INSET:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::INSET);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::INSET);
|
||||||
break;
|
break;
|
||||||
case CSS1_BS_OUTSET:
|
case CSS1_BS_OUTSET:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::OUTSET);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::OUTSET);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::NONE);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::NONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5260,7 +5260,7 @@ void SwHTMLParser::InsertHorzRule()
|
|||||||
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
|
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
|
||||||
if ( !bNoShade )
|
if ( !bNoShade )
|
||||||
{
|
{
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
}
|
}
|
||||||
aBorderLine.SetWidth( nPHeight );
|
aBorderLine.SetWidth( nPHeight );
|
||||||
}
|
}
|
||||||
@ -5270,7 +5270,7 @@ void SwHTMLParser::InsertHorzRule()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::DOUBLE);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
|
||||||
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2636,52 +2636,52 @@ static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementT
|
|||||||
{
|
{
|
||||||
switch (pBorderLine->GetBorderLineStyle())
|
switch (pBorderLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
pVal = "single";
|
pVal = "single";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
pVal = "dotted";
|
pVal = "dotted";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
pVal = "dashed";
|
pVal = "dashed";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
pVal = "double";
|
pVal = "double";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
pVal = "thinThickSmallGap";
|
pVal = "thinThickSmallGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
pVal = "thinThickMediumGap";
|
pVal = "thinThickMediumGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
pVal = "thinThickLargeGap";
|
pVal = "thinThickLargeGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
pVal = "thickThinSmallGap";
|
pVal = "thickThinSmallGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
pVal = "thickThinMediumGap";
|
pVal = "thickThinMediumGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
pVal = "thickThinLargeGap";
|
pVal = "thickThinLargeGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
pVal = "threeDEmboss";
|
pVal = "threeDEmboss";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
pVal = "threeDEngrave";
|
pVal = "threeDEngrave";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
pVal = "outset";
|
pVal = "outset";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
pVal = "inset";
|
pVal = "inset";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
pVal = "dashSmallGap";
|
pVal = "dashSmallGap";
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::NONE:
|
case SvxBorderLineStyle::NONE:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2695,7 +2695,7 @@ static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementT
|
|||||||
// if they are equal, it means that they were style-defined and there is
|
// if they are equal, it means that they were style-defined and there is
|
||||||
// no need to write them.
|
// no need to write them.
|
||||||
if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
|
if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
|
||||||
pBorderLine->GetBorderLineStyle() == rStyleProps->LineStyle &&
|
pBorderLine->GetBorderLineStyle() == (SvxBorderLineStyle)rStyleProps->LineStyle &&
|
||||||
pBorderLine->GetColor() == rStyleProps->Color &&
|
pBorderLine->GetColor() == rStyleProps->Color &&
|
||||||
pBorderLine->GetWidth() == convertMm100ToTwip( rStyleProps->LineWidth ) )
|
pBorderLine->GetWidth() == convertMm100ToTwip( rStyleProps->LineWidth ) )
|
||||||
return;
|
return;
|
||||||
@ -7882,8 +7882,8 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
|
|||||||
*pLeft == *pRight && *pLeft == *pTop && *pLeft == *pBottom)
|
*pLeft == *pRight && *pLeft == *pTop && *pLeft == *pBottom)
|
||||||
{
|
{
|
||||||
// Check border style
|
// Check border style
|
||||||
editeng::SvxBorderStyle eBorderStyle = pTop->GetBorderLineStyle();
|
SvxBorderLineStyle eBorderStyle = pTop->GetBorderLineStyle();
|
||||||
if (eBorderStyle == table::BorderLineStyle::NONE)
|
if (eBorderStyle == SvxBorderLineStyle::NONE)
|
||||||
{
|
{
|
||||||
if (m_rExport.SdrExporter().getTextFrameSyntax())
|
if (m_rExport.SdrExporter().getTextFrameSyntax())
|
||||||
{
|
{
|
||||||
@ -7904,7 +7904,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
|
|||||||
AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), 2,
|
AddToAttrList( m_rExport.SdrExporter().getFlyAttrList(), 2,
|
||||||
XML_strokecolor, sColor.getStr(),
|
XML_strokecolor, sColor.getStr(),
|
||||||
XML_strokeweight, sWidth.getStr() );
|
XML_strokeweight, sWidth.getStr() );
|
||||||
if( drawing::LineStyle_DASH == pTop->GetBorderLineStyle() ) // Line Style is Dash type
|
if( SvxBorderLineStyle::DASHED == pTop->GetBorderLineStyle() ) // Line Style is Dash type
|
||||||
AddToAttrList( m_rExport.SdrExporter().getDashLineStyle(),
|
AddToAttrList( m_rExport.SdrExporter().getDashLineStyle(),
|
||||||
XML_dashstyle, "dash" );
|
XML_dashstyle, "dash" );
|
||||||
}
|
}
|
||||||
|
@ -1352,7 +1352,7 @@ void DocxSdrExport::writeBoxItemLine(const SvxBoxItem& rBox)
|
|||||||
FSEND);
|
FSEND);
|
||||||
pFS->endElementNS(XML_a, XML_solidFill);
|
pFS->endElementNS(XML_a, XML_solidFill);
|
||||||
|
|
||||||
if (drawing::LineStyle_DASH == pBorderLine->GetBorderLineStyle()) // Line Style is Dash type
|
if (SvxBorderLineStyle::DASHED == pBorderLine->GetBorderLineStyle()) // Line Style is Dash type
|
||||||
pFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
|
pFS->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
|
||||||
|
|
||||||
pFS->endElementNS(XML_a, XML_ln);
|
pFS->endElementNS(XML_a, XML_ln);
|
||||||
|
@ -92,7 +92,7 @@ static OString OutTBLBorderLine(RtfExport& rExport, const editeng::SvxBorderLine
|
|||||||
// single line
|
// single line
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
{
|
{
|
||||||
if (DEF_LINE_WIDTH_0 == pLine->GetWidth())
|
if (DEF_LINE_WIDTH_0 == pLine->GetWidth())
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR);
|
||||||
@ -100,46 +100,46 @@ static OString OutTBLBorderLine(RtfExport& rExport, const editeng::SvxBorderLine
|
|||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDOT);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDASH);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDB);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRDB);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHSG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHSG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHMG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHMG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHLG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTNTHLG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNSG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNSG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNMG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNMG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNLG);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTHTNLG);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDREMBOSS);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDREMBOSS);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRENGRAVE);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRENGRAVE);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDROUTSET);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDROUTSET);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRINSET);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRINSET);
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::NONE:
|
case SvxBorderLineStyle::NONE:
|
||||||
default:
|
default:
|
||||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRNONE);
|
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRNONE);
|
||||||
break;
|
break;
|
||||||
@ -3276,7 +3276,7 @@ void RtfAttributeOutput::FormatBox(const SvxBoxItem& rBox)
|
|||||||
// We in fact need RGB to BGR, but the transformation is symmetric.
|
// We in fact need RGB to BGR, but the transformation is symmetric.
|
||||||
m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineColor", OString::number(msfilter::util::BGRToRGB(rColor.GetColor()))));
|
m_aFlyProperties.push_back(std::make_pair<OString, OString>("lineColor", OString::number(msfilter::util::BGRToRGB(rColor.GetColor()))));
|
||||||
|
|
||||||
if (pTop->GetBorderLineStyle() != table::BorderLineStyle::NONE)
|
if (pTop->GetBorderLineStyle() != SvxBorderLineStyle::NONE)
|
||||||
{
|
{
|
||||||
double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
|
double const fConverted(editeng::ConvertBorderWidthToWord(pTop->GetBorderLineStyle(), pTop->GetWidth()));
|
||||||
sal_Int32 nWidth = fConverted * 635; // Twips -> EMUs
|
sal_Int32 nWidth = fConverted * 635; // Twips -> EMUs
|
||||||
|
@ -2028,13 +2028,13 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
|
|||||||
MSO_LineDashing eDashing = mso_lineSolid;
|
MSO_LineDashing eDashing = mso_lineSolid;
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
eDashing = mso_lineDashGEL;
|
eDashing = mso_lineDashGEL;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
eDashing = mso_lineDotGEL;
|
eDashing = mso_lineDotGEL;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3886,7 +3886,7 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
|
|||||||
// http://msdn.microsoft.com/en-us/library/dd908142%28v=office.12%29.aspx
|
// http://msdn.microsoft.com/en-us/library/dd908142%28v=office.12%29.aspx
|
||||||
switch (rLine.GetBorderLineStyle())
|
switch (rLine.GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
{
|
{
|
||||||
if ( rLine.GetWidth( ) == DEF_LINE_WIDTH_0 )
|
if ( rLine.GetWidth( ) == DEF_LINE_WIDTH_0 )
|
||||||
brcType = 5;
|
brcType = 5;
|
||||||
@ -3894,52 +3894,52 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
|
|||||||
brcType = 1;
|
brcType = 1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
brcType = 6;
|
brcType = 6;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
brcType = 7;
|
brcType = 7;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
brcType = 3;
|
brcType = 3;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
brcType = 11;
|
brcType = 11;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
brcType = 14;
|
brcType = 14;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
brcType = 17;
|
brcType = 17;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
brcType = 12;
|
brcType = 12;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
brcType = 15;
|
brcType = 15;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
brcType = 18;
|
brcType = 18;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
brcType = 24;
|
brcType = 24;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
brcType = 25;
|
brcType = 25;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
brcType = 26;
|
brcType = 26;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
brcType = 27;
|
brcType = 27;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
brcType = 22;
|
brcType = 22;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
brcType = 8;
|
brcType = 8;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
brcType = 9;
|
brcType = 9;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -3986,7 +3986,7 @@ void WW8Export::Out_BorderLine(ww::bytes& rO, const SvxBorderLine* pLine,
|
|||||||
WW8_BRCVer9 aBrcVer9;
|
WW8_BRCVer9 aBrcVer9;
|
||||||
WW8_BRC aBrcVer8;
|
WW8_BRC aBrcVer8;
|
||||||
|
|
||||||
if( pLine && pLine->GetBorderLineStyle() != table::BorderLineStyle::NONE )
|
if( pLine && pLine->GetBorderLineStyle() != SvxBorderLineStyle::NONE )
|
||||||
{
|
{
|
||||||
aBrcVer9 = TranslateBorderLine( *pLine, nDist, bShadow );
|
aBrcVer9 = TranslateBorderLine( *pLine, nDist, bShadow );
|
||||||
sal_uInt8 ico = msfilter::util::TransColToIco( msfilter::util::BGRToRGB(aBrcVer9.cv()) );
|
sal_uInt8 ico = msfilter::util::TransColToIco( msfilter::util::BGRToRGB(aBrcVer9.cv()) );
|
||||||
|
@ -1531,7 +1531,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
|
|||||||
if( !rLineThick )
|
if( !rLineThick )
|
||||||
return nOutsideThick;
|
return nOutsideThick;
|
||||||
|
|
||||||
::editeng::SvxBorderStyle nIdx = table::BorderLineStyle::NONE;
|
SvxBorderLineStyle nIdx = SvxBorderLineStyle::NONE;
|
||||||
|
|
||||||
sal_Int32 nLineThick=rLineThick;
|
sal_Int32 nLineThick=rLineThick;
|
||||||
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
|
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
|
||||||
@ -1552,21 +1552,21 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
|
|||||||
{
|
{
|
||||||
// zuerst die Einzel-Linien
|
// zuerst die Einzel-Linien
|
||||||
case mso_lineSimple:
|
case mso_lineSimple:
|
||||||
nIdx = table::BorderLineStyle::SOLID;
|
nIdx = SvxBorderLineStyle::SOLID;
|
||||||
break;
|
break;
|
||||||
// dann die Doppel-Linien, fuer die wir feine Entsprechungen haben :-)))
|
// dann die Doppel-Linien, fuer die wir feine Entsprechungen haben :-)))
|
||||||
case mso_lineDouble:
|
case mso_lineDouble:
|
||||||
nIdx = table::BorderLineStyle::DOUBLE;
|
nIdx = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
case mso_lineThickThin:
|
case mso_lineThickThin:
|
||||||
nIdx = table::BorderLineStyle::THICKTHIN_SMALLGAP;
|
nIdx = SvxBorderLineStyle::THICKTHIN_SMALLGAP;
|
||||||
break;
|
break;
|
||||||
case mso_lineThinThick:
|
case mso_lineThinThick:
|
||||||
nIdx = table::BorderLineStyle::THINTHICK_SMALLGAP;
|
nIdx = SvxBorderLineStyle::THINTHICK_SMALLGAP;
|
||||||
break;
|
break;
|
||||||
// We have no triple border, use double instead.
|
// We have no triple border, use double instead.
|
||||||
case mso_lineTriple:
|
case mso_lineTriple:
|
||||||
nIdx = table::BorderLineStyle::DOUBLE;
|
nIdx = SvxBorderLineStyle::DOUBLE;
|
||||||
break;
|
break;
|
||||||
// no line style is set
|
// no line style is set
|
||||||
case (MSO_LineStyle)USHRT_MAX:
|
case (MSO_LineStyle)USHRT_MAX:
|
||||||
@ -1580,16 +1580,16 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
|
|||||||
switch( eDashing )
|
switch( eDashing )
|
||||||
{
|
{
|
||||||
case mso_lineDashGEL:
|
case mso_lineDashGEL:
|
||||||
nIdx = table::BorderLineStyle::DASHED;
|
nIdx = SvxBorderLineStyle::DASHED;
|
||||||
break;
|
break;
|
||||||
case mso_lineDotGEL:
|
case mso_lineDotGEL:
|
||||||
nIdx = table::BorderLineStyle::DOTTED;
|
nIdx = SvxBorderLineStyle::DOTTED;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (table::BorderLineStyle::NONE != nIdx)
|
if (SvxBorderLineStyle::NONE != nIdx)
|
||||||
{
|
{
|
||||||
SvxBorderLine aLine;
|
SvxBorderLine aLine;
|
||||||
aLine.SetColor( rLineColor );
|
aLine.SetColor( rLineColor );
|
||||||
|
@ -1335,12 +1335,12 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace,
|
|||||||
cv = 0xc0c0c0;
|
cv = 0xc0c0c0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::editeng::SvxBorderStyle const eStyle(
|
SvxBorderLineStyle const eStyle(
|
||||||
::editeng::ConvertBorderStyleFromWord(nIdx));
|
::editeng::ConvertBorderStyleFromWord(nIdx));
|
||||||
|
|
||||||
::editeng::SvxBorderLine aLine;
|
::editeng::SvxBorderLine aLine;
|
||||||
aLine.SetBorderLineStyle( eStyle );
|
aLine.SetBorderLineStyle( eStyle );
|
||||||
double const fConverted( (table::BorderLineStyle::NONE == eStyle) ? 0.0 :
|
double const fConverted( (SvxBorderLineStyle::NONE == eStyle) ? 0.0 :
|
||||||
::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness, nIdx));
|
::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness, nIdx));
|
||||||
aLine.SetWidth(fConverted);
|
aLine.SetWidth(fConverted);
|
||||||
|
|
||||||
@ -4890,7 +4890,7 @@ void SwWW8ImplReader::Read_CharBorder(sal_uInt16 nId, const sal_uInt8* pData, sh
|
|||||||
SetWW8_BRC(nBrcVer, aBrc, pData);
|
SetWW8_BRC(nBrcVer, aBrc, pData);
|
||||||
|
|
||||||
// Border style is none -> no border, no shadow
|
// Border style is none -> no border, no shadow
|
||||||
if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != table::BorderLineStyle::NONE )
|
if( editeng::ConvertBorderStyleFromWord(aBrc.brcType()) != SvxBorderLineStyle::NONE )
|
||||||
{
|
{
|
||||||
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::TOP, 0, nullptr, true);
|
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::TOP, 0, nullptr, true);
|
||||||
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::BOTTOM, 0, nullptr, true);
|
Set1Border(aBoxItem, aBrc, SvxBoxItemLine::BOTTOM, 0, nullptr, true);
|
||||||
|
@ -355,13 +355,13 @@ static bool lcl_isOdfDoubleLine( const SvxBorderLine* pLine )
|
|||||||
bool bIsOdfDouble = false;
|
bool bIsOdfDouble = false;
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
bIsOdfDouble = true;
|
bIsOdfDouble = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -733,46 +733,46 @@ bool SvXMLExportItemMapper::QueryXMLValue(
|
|||||||
bool bNoBorder = false;
|
bool bNoBorder = false;
|
||||||
switch (pLine->GetBorderLineStyle())
|
switch (pLine->GetBorderLineStyle())
|
||||||
{
|
{
|
||||||
case table::BorderLineStyle::SOLID:
|
case SvxBorderLineStyle::SOLID:
|
||||||
eStyle = XML_SOLID;
|
eStyle = XML_SOLID;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOTTED:
|
case SvxBorderLineStyle::DOTTED:
|
||||||
eStyle = XML_DOTTED;
|
eStyle = XML_DOTTED;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASHED:
|
case SvxBorderLineStyle::DASHED:
|
||||||
eStyle = XML_DASHED;
|
eStyle = XML_DASHED;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::FINE_DASHED:
|
case SvxBorderLineStyle::FINE_DASHED:
|
||||||
eStyle = XML_FINE_DASHED;
|
eStyle = XML_FINE_DASHED;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT:
|
case SvxBorderLineStyle::DASH_DOT:
|
||||||
eStyle = XML_DASH_DOT;
|
eStyle = XML_DASH_DOT;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DASH_DOT_DOT:
|
case SvxBorderLineStyle::DASH_DOT_DOT:
|
||||||
eStyle = XML_DASH_DOT_DOT;
|
eStyle = XML_DASH_DOT_DOT;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE_THIN:
|
case SvxBorderLineStyle::DOUBLE_THIN:
|
||||||
eStyle = XML_DOUBLE_THIN;
|
eStyle = XML_DOUBLE_THIN;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::DOUBLE:
|
case SvxBorderLineStyle::DOUBLE:
|
||||||
case table::BorderLineStyle::THINTHICK_SMALLGAP:
|
case SvxBorderLineStyle::THINTHICK_SMALLGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_MEDIUMGAP:
|
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THINTHICK_LARGEGAP:
|
case SvxBorderLineStyle::THINTHICK_LARGEGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_SMALLGAP:
|
case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_MEDIUMGAP:
|
case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
|
||||||
case table::BorderLineStyle::THICKTHIN_LARGEGAP:
|
case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
|
||||||
eStyle = XML_DOUBLE;
|
eStyle = XML_DOUBLE;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::EMBOSSED:
|
case SvxBorderLineStyle::EMBOSSED:
|
||||||
eStyle = XML_RIDGE;
|
eStyle = XML_RIDGE;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::ENGRAVED:
|
case SvxBorderLineStyle::ENGRAVED:
|
||||||
eStyle = XML_GROOVE;
|
eStyle = XML_GROOVE;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::INSET:
|
case SvxBorderLineStyle::INSET:
|
||||||
eStyle = XML_INSET;
|
eStyle = XML_INSET;
|
||||||
break;
|
break;
|
||||||
case table::BorderLineStyle::OUTSET:
|
case SvxBorderLineStyle::OUTSET:
|
||||||
eStyle = XML_OUTSET;
|
eStyle = XML_OUTSET;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -149,9 +149,9 @@ bool sw_frmitems_parseXMLBorder( const OUString& rValue,
|
|||||||
|
|
||||||
void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
|
void sw_frmitems_setXMLBorderStyle( SvxBorderLine& rLine, sal_uInt16 nStyle )
|
||||||
{
|
{
|
||||||
::editeng::SvxBorderStyle eStyle = table::BorderLineStyle::NONE;
|
SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
|
||||||
if ( nStyle != API_LINE_NONE )
|
if ( nStyle != API_LINE_NONE )
|
||||||
eStyle = ::editeng::SvxBorderStyle( nStyle );
|
eStyle = SvxBorderLineStyle( nStyle );
|
||||||
rLine.SetBorderLineStyle(eStyle);
|
rLine.SetBorderLineStyle(eStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
|
|||||||
{
|
{
|
||||||
if (bDouble)
|
if (bDouble)
|
||||||
{
|
{
|
||||||
rpLine->SetBorderLineStyle( table::BorderLineStyle::DOUBLE );
|
rpLine->SetBorderLineStyle( SvxBorderLineStyle::DOUBLE );
|
||||||
}
|
}
|
||||||
rpLine->SetWidth( aBorderWidths[nNamedWidth] );
|
rpLine->SetWidth( aBorderWidths[nNamedWidth] );
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ void sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
|
|||||||
if( nWidth > 0 )
|
if( nWidth > 0 )
|
||||||
rpLine->SetWidth( nWidth );
|
rpLine->SetWidth( nWidth );
|
||||||
else
|
else
|
||||||
rpLine->GuessLinesWidths(table::BorderLineStyle::DOUBLE,
|
rpLine->GuessLinesWidths(SvxBorderLineStyle::DOUBLE,
|
||||||
nOutWidth, nInWidth, nDistance);
|
nOutWidth, nInWidth, nDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,14 +499,14 @@ SwColumnPage::SwColumnPage(vcl::Window *pParent, const SfxItemSet &rSet)
|
|||||||
// Fill the line styles listbox
|
// Fill the line styles listbox
|
||||||
m_pLineTypeDLB->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) );
|
m_pLineTypeDLB->SetNone( SVX_RESSTR( RID_SVXSTR_NONE ) );
|
||||||
m_pLineTypeDLB->InsertEntry(
|
m_pLineTypeDLB->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID),
|
||||||
table::BorderLineStyle::SOLID );
|
SvxBorderLineStyle::SOLID );
|
||||||
m_pLineTypeDLB->InsertEntry(
|
m_pLineTypeDLB->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DOTTED),
|
||||||
table::BorderLineStyle::DOTTED );
|
SvxBorderLineStyle::DOTTED );
|
||||||
m_pLineTypeDLB->InsertEntry(
|
m_pLineTypeDLB->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DASHED),
|
||||||
table::BorderLineStyle::DASHED );
|
SvxBorderLineStyle::DASHED );
|
||||||
|
|
||||||
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
|
long nLineWidth = static_cast<long>(MetricField::ConvertDoubleValue(
|
||||||
m_pLineWidthEdit->GetValue( ),
|
m_pLineWidthEdit->GetValue( ),
|
||||||
@ -733,7 +733,7 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr, Edit&, void )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_pColMgr->SetLineWidthAndColor(
|
m_pColMgr->SetLineWidthAndColor(
|
||||||
::editeng::SvxBorderStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
|
SvxBorderLineStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
|
||||||
nLineWidth,
|
nLineWidth,
|
||||||
m_pLineColorDLB->GetSelectEntryColor() );
|
m_pLineColorDLB->GetSelectEntryColor() );
|
||||||
m_pColMgr->SetAdjust( SwColLineAdj(
|
m_pColMgr->SetAdjust( SwColLineAdj(
|
||||||
|
@ -200,14 +200,14 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
|
|||||||
|
|
||||||
m_pLineTypeBox->SetNone(SW_RESSTR(SW_STR_NONE));
|
m_pLineTypeBox->SetNone(SW_RESSTR(SW_STR_NONE));
|
||||||
m_pLineTypeBox->InsertEntry(
|
m_pLineTypeBox->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::SOLID),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::SOLID),
|
||||||
table::BorderLineStyle::SOLID );
|
SvxBorderLineStyle::SOLID );
|
||||||
m_pLineTypeBox->InsertEntry(
|
m_pLineTypeBox->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DOTTED),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DOTTED),
|
||||||
table::BorderLineStyle::DOTTED );
|
SvxBorderLineStyle::DOTTED );
|
||||||
m_pLineTypeBox->InsertEntry(
|
m_pLineTypeBox->InsertEntry(
|
||||||
::editeng::SvxBorderLine::getWidthImpl(table::BorderLineStyle::DASHED),
|
::editeng::SvxBorderLine::getWidthImpl(SvxBorderLineStyle::DASHED),
|
||||||
table::BorderLineStyle::DASHED );
|
SvxBorderLineStyle::DASHED );
|
||||||
m_pLineTypeBox->SetWidth( pFootnoteInfo->GetLineWidth( ) );
|
m_pLineTypeBox->SetWidth( pFootnoteInfo->GetLineWidth( ) );
|
||||||
m_pLineTypeBox->SelectEntry( pFootnoteInfo->GetLineStyle() );
|
m_pLineTypeBox->SelectEntry( pFootnoteInfo->GetLineStyle() );
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
|
|||||||
m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP))));
|
m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP))));
|
||||||
|
|
||||||
// Separator style
|
// Separator style
|
||||||
rFootnoteInfo.SetLineStyle( ::editeng::SvxBorderStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
|
rFootnoteInfo.SetLineStyle( SvxBorderLineStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
|
||||||
|
|
||||||
// Separator width
|
// Separator width
|
||||||
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
|
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
|
||||||
|
@ -125,7 +125,7 @@ SwColMgr::~SwColMgr()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwColMgr::SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nLWidth, const Color& rCol)
|
void SwColMgr::SetLineWidthAndColor(SvxBorderLineStyle eStyle, sal_uLong nLWidth, const Color& rCol)
|
||||||
{
|
{
|
||||||
aFormatCol.SetLineStyle(eStyle);
|
aFormatCol.SetLineStyle(eStyle);
|
||||||
aFormatCol.SetLineWidth(nLWidth);
|
aFormatCol.SetLineWidth(nLWidth);
|
||||||
|
@ -45,8 +45,8 @@ public:
|
|||||||
inline bool HasLine() const;
|
inline bool HasLine() const;
|
||||||
inline void SetNoLine();
|
inline void SetNoLine();
|
||||||
|
|
||||||
void SetLineWidthAndColor(::editeng::SvxBorderStyle eStyle, sal_uLong nWidth, const Color& rCol);
|
void SetLineWidthAndColor(SvxBorderLineStyle eStyle, sal_uLong nWidth, const Color& rCol);
|
||||||
inline ::editeng::SvxBorderStyle GetLineStyle() const;
|
inline SvxBorderLineStyle GetLineStyle() const;
|
||||||
inline sal_uLong GetLineWidth() const;
|
inline sal_uLong GetLineWidth() const;
|
||||||
inline const Color& GetLineColor() const;
|
inline const Color& GetLineColor() const;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ inline sal_uInt16 SwColMgr::GetCount() const
|
|||||||
return aFormatCol.GetNumCols();
|
return aFormatCol.GetNumCols();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::editeng::SvxBorderStyle SwColMgr::GetLineStyle() const
|
inline SvxBorderLineStyle SwColMgr::GetLineStyle() const
|
||||||
{
|
{
|
||||||
return aFormatCol.GetLineStyle();
|
return aFormatCol.GetLineStyle();
|
||||||
}
|
}
|
||||||
|
@ -1024,7 +1024,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
|
|||||||
if(aBorderLine.GetOutWidth() == 0)
|
if(aBorderLine.GetOutWidth() == 0)
|
||||||
{
|
{
|
||||||
aBorderLine.SetBorderLineStyle(
|
aBorderLine.SetBorderLineStyle(
|
||||||
table::BorderLineStyle::SOLID);
|
SvxBorderLineStyle::SOLID);
|
||||||
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
//Set distance only if the request is received from the controller.
|
//Set distance only if the request is received from the controller.
|
||||||
|
@ -530,7 +530,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
|
|||||||
|
|
||||||
if(aBorderLine.GetOutWidth() == 0)
|
if(aBorderLine.GetOutWidth() == 0)
|
||||||
{
|
{
|
||||||
aBorderLine.SetBorderLineStyle(table::BorderLineStyle::SOLID);
|
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
|
||||||
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,10 +101,10 @@ bool SwPageFootnoteInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const
|
|||||||
switch ( aFootnoteInfo.GetLineStyle( ) )
|
switch ( aFootnoteInfo.GetLineStyle( ) )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case table::BorderLineStyle::NONE : rVal <<= sal_Int8(0); break;
|
case SvxBorderLineStyle::NONE : rVal <<= sal_Int8(0); break;
|
||||||
case table::BorderLineStyle::SOLID: rVal <<= sal_Int8(1); break;
|
case SvxBorderLineStyle::SOLID: rVal <<= sal_Int8(1); break;
|
||||||
case table::BorderLineStyle::DOTTED: rVal <<= sal_Int8(2); break;
|
case SvxBorderLineStyle::DOTTED: rVal <<= sal_Int8(2); break;
|
||||||
case table::BorderLineStyle::DASHED: rVal <<= sal_Int8(3); break;
|
case SvxBorderLineStyle::DASHED: rVal <<= sal_Int8(3); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -173,14 +173,14 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
|
|||||||
break;
|
break;
|
||||||
case MID_FTN_LINE_STYLE:
|
case MID_FTN_LINE_STYLE:
|
||||||
{
|
{
|
||||||
::editeng::SvxBorderStyle eStyle = table::BorderLineStyle::NONE;
|
SvxBorderLineStyle eStyle = SvxBorderLineStyle::NONE;
|
||||||
sal_Int8 nSet = 0;
|
sal_Int8 nSet = 0;
|
||||||
rVal >>= nSet;
|
rVal >>= nSet;
|
||||||
switch ( nSet )
|
switch ( nSet )
|
||||||
{
|
{
|
||||||
case 1: eStyle = table::BorderLineStyle::SOLID; break;
|
case 1: eStyle = SvxBorderLineStyle::SOLID; break;
|
||||||
case 2: eStyle = table::BorderLineStyle::DOTTED; break;
|
case 2: eStyle = SvxBorderLineStyle::DOTTED; break;
|
||||||
case 3: eStyle = table::BorderLineStyle::DASHED; break;
|
case 3: eStyle = SvxBorderLineStyle::DASHED; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
aFootnoteInfo.SetLineStyle( eStyle );
|
aFootnoteInfo.SetLineStyle( eStyle );
|
||||||
|
@ -263,10 +263,10 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineToken,
|
|||||||
// thickness, or one of smaller thickness. If too small we
|
// thickness, or one of smaller thickness. If too small we
|
||||||
// can make the deficit up in additional white space or
|
// can make the deficit up in additional white space or
|
||||||
// object size
|
// object size
|
||||||
::editeng::SvxBorderStyle const nLineStyle(
|
SvxBorderLineStyle const nLineStyle(
|
||||||
::editeng::ConvertBorderStyleFromWord(nLineType));
|
::editeng::ConvertBorderStyleFromWord(nLineType));
|
||||||
rToFill.LineStyle = nLineStyle;
|
rToFill.LineStyle = (sal_Int16)nLineStyle;
|
||||||
double const fConverted( (table::BorderLineStyle::NONE == nLineStyle) ? 0.0 :
|
double const fConverted( (SvxBorderLineStyle::NONE == nLineStyle) ? 0.0 :
|
||||||
::editeng::ConvertBorderWidthFromWord(nLineStyle, nLineThickness,
|
::editeng::ConvertBorderWidthFromWord(nLineStyle, nLineThickness,
|
||||||
nLineType));
|
nLineType));
|
||||||
rToFill.LineWidth = convertTwipToMM100(fConverted);
|
rToFill.LineWidth = convertTwipToMM100(fConverted);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user