reports: Remove BaseODS.style_dividerline.
Obsoleted by the new border_style() method.
This commit is contained in:
parent
15becebf5c
commit
5978c2f0c2
2 changed files with 5 additions and 12 deletions
|
@ -989,14 +989,6 @@ class BaseODS(BaseSpreadsheet[RT, ST], metaclass=abc.ABCMeta):
|
|||
self.ensure_child(
|
||||
self.style_bold, odf.style.TextProperties, fontweight='bold',
|
||||
)
|
||||
self.style_dividerline = self.ensure_child(
|
||||
styles, odf.style.Style, name='DividerLine', family='table-cell',
|
||||
)
|
||||
self.ensure_child(
|
||||
self.style_dividerline,
|
||||
odf.style.TableCellProperties,
|
||||
borderbottom='1pt solid #0000ff',
|
||||
)
|
||||
|
||||
date_style = self.replace_child(styles, odf.number.DateStyle, name='ISODate')
|
||||
date_style.addElement(odf.number.Year(style='long'))
|
||||
|
|
|
@ -301,7 +301,6 @@ def test_ods_currency_style_cache_considers_properties(ods_writer):
|
|||
@pytest.mark.parametrize('attr_name,child_type,checked_attr', [
|
||||
('style_bold', odf.style.TextProperties, 'fontweight'),
|
||||
('style_centertext', odf.style.ParagraphProperties, 'textalign'),
|
||||
('style_dividerline', odf.style.TableCellProperties, 'borderbottom'),
|
||||
('style_endtext', odf.style.ParagraphProperties, 'textalign'),
|
||||
('style_starttext', odf.style.ParagraphProperties, 'textalign'),
|
||||
])
|
||||
|
@ -354,7 +353,8 @@ def test_ods_writer_border_no_caching(ods_writer, argname, val1, val2):
|
|||
assert style1 is not style2
|
||||
|
||||
def test_ods_writer_merge_styles(ods_writer):
|
||||
style = ods_writer.merge_styles(ods_writer.style_bold, ods_writer.style_dividerline)
|
||||
border_style = ods_writer.border_style(core.Border.BOTTOM)
|
||||
style = ods_writer.merge_styles(ods_writer.style_bold, border_style)
|
||||
actual = get_child(
|
||||
ods_writer.document.styles,
|
||||
odf.style.Style,
|
||||
|
@ -382,7 +382,7 @@ def test_ods_writer_merge_styles_with_children_and_attributes(ods_writer):
|
|||
assert text_props.getAttribute('fontweight') == 'bold'
|
||||
|
||||
def test_ods_writer_merge_styles_caches(ods_writer):
|
||||
sources = [ods_writer.style_bold, ods_writer.style_dividerline]
|
||||
sources = [ods_writer.style_bold, ods_writer.style_centertext]
|
||||
style1 = ods_writer.merge_styles(*sources)
|
||||
style2 = ods_writer.merge_styles(*reversed(sources))
|
||||
assert style1 is style2
|
||||
|
@ -394,7 +394,8 @@ def test_ods_writer_merge_styles_caches(ods_writer):
|
|||
|
||||
def test_ods_writer_layer_merge_styles(ods_writer):
|
||||
usd_style = ods_writer.currency_style('USD')
|
||||
layer1 = ods_writer.merge_styles(ods_writer.style_bold, ods_writer.style_dividerline)
|
||||
border_style = ods_writer.border_style(core.Border.BOTTOM)
|
||||
layer1 = ods_writer.merge_styles(ods_writer.style_bold, border_style)
|
||||
layer2 = ods_writer.merge_styles(layer1, usd_style)
|
||||
style_name = layer2.getAttribute('name')
|
||||
assert style_name.count('Merge_') == 1
|
||||
|
|
Loading…
Reference in a new issue