summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-09-27 11:59:54 +0200
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-11-04 09:07:54 +0100
commit41b99644e8913dd4797775f4931382e93fa12a00 (patch)
tree38efbda4c2c76871fa5bdae1d95954bdb72a1305 /sw/source/filter/html
parentb9e43ab25fe2d93c2487fd33ed3c0f583009b968 (diff)
tdf#48622 Add new border line width defaults
* Hairline (0.05pt) * Very thin (0.5pt) * Thin (0.75pt) * Medium (1.5pt) * Thick (2.25pt) * Extra thick (4.5pt) This unifies the default border line widths throughout the program. Users can still set any line width they want by chosing "Custom" in the "Border" tabpage. Also, existing documents won't be changed. The new defaults are just for newly added borders. Change-Id: I7af85dc189a688a749812824508c33c7814b50f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122683 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmltab.cxx8
-rw-r--r--sw/source/filter/html/htmltabw.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.cxx7
-rw-r--r--sw/source/filter/html/swhtml.cxx4
4 files changed, 8 insertions, 15 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 473db0ea1548..1276d2a69654 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -975,14 +975,8 @@ void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
m_aRightBorderLine = m_aLeftBorderLine;
if( rOptions.nCellSpacing != 0 )
- {
m_aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
- }
- else
- {
- m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
- }
+ m_aBorderLine.SetWidth(SvxBorderLineWidth::Hairline);
m_aBorderLine.SetColor( rBorderColor );
if( m_nCellPadding )
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index de0501203a92..b35fcc91bf79 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -822,9 +822,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
OutTableCells( rWrt, pRow2->GetCells(), pRow2->GetBackground() );
if( !m_nCellSpacing && nRow < m_aRows.size()-1 && pRow2->m_bBottomBorder &&
- pRow2->m_nBottomBorder > DEF_LINE_WIDTH_1 )
+ pRow2->m_nBottomBorder > SvxBorderLineWidth::Hairline )
{
- for( auto nCnt = (pRow2->m_nBottomBorder / DEF_LINE_WIDTH_1) - 1; nCnt; --nCnt )
+ for( auto nCnt = (pRow2->m_nBottomBorder / SvxBorderLineWidth::Hairline) - 1; nCnt; --nCnt )
{
rWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OStringConcatenation(rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_tablerow ));
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 3ed3a1505135..11f0d8425567 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -245,12 +245,11 @@ CSS1PropertyEnum const aBulletStyleTable[] =
{ nullptr, 0 }
};
-
sal_uInt16 const aBorderWidths[] =
{
- DEF_LINE_WIDTH_0,
- DEF_LINE_WIDTH_5,
- DEF_LINE_WIDTH_1
+ SvxBorderLineWidth::Hairline,
+ SvxBorderLineWidth::VeryThin,
+ SvxBorderLineWidth::Thin
};
#undef SBORDER_ENTRY
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 7250fb8e841d..5212159ae012 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5354,12 +5354,12 @@ void SwHTMLParser::InsertHorzRule()
}
else if( bNoShade )
{
- aBorderLine.SetWidth( DEF_LINE_WIDTH_2 );
+ aBorderLine.SetWidth( SvxBorderLineWidth::Medium );
}
else
{
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
+ aBorderLine.SetWidth(SvxBorderLineWidth::Hairline);
}
SvxBoxItem aBoxItem(RES_BOX);