diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-09 00:29:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-25 19:59:43 +0100 |
| commit | e602f01f8a5bfca0acd730a301ffbc8a675fe5d7 (patch) | |
| tree | 9a73953fd7d788c11cb959f5df39a57d67cdf5de /src/subtitle_asset_internal.cc | |
| parent | b395d79069cf64fd3a552fb843a31affa57662de (diff) | |
Replace xmlpp::Node::add_child with cxml::add_child.no-add-child
Diffstat (limited to 'src/subtitle_asset_internal.cc')
| -rw-r--r-- | src/subtitle_asset_internal.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/subtitle_asset_internal.cc b/src/subtitle_asset_internal.cc index 99d8411b..39f68624 100644 --- a/src/subtitle_asset_internal.cc +++ b/src/subtitle_asset_internal.cc @@ -77,7 +77,7 @@ order::Font::Font (shared_ptr<SubtitleString> s, Standard standard) xmlpp::Element* order::Font::as_xml (xmlpp::Element* parent, Context&) const { - auto e = parent->add_child("Font"); + auto e = cxml::add_child(parent, "Font"); for (const auto& i: _values) { e->set_attribute (i.first, i.second); } @@ -137,7 +137,7 @@ xmlpp::Element* order::String::as_xml (xmlpp::Element* parent, Context& context) const { if (fabs(_space_before) > SPACE_BEFORE_EPSILON) { - auto space = parent->add_child("Space"); + auto space = cxml::add_child(parent, "Space"); auto size = raw_convert<string>(_space_before, 2); if (context.standard == Standard::INTEROP) { size += "em"; @@ -212,7 +212,7 @@ position_align (xmlpp::Element* e, order::Context& context, HAlign h_align, floa xmlpp::Element* order::Text::as_xml (xmlpp::Element* parent, Context& context) const { - auto e = parent->add_child ("Text"); + auto e = cxml::add_child(parent, "Text"); position_align(e, context, _h_align, _h_position, _v_align, _v_position, _z_position); @@ -224,9 +224,9 @@ order::Text::as_xml (xmlpp::Element* parent, Context& context) const } for (auto const& ruby: _rubies) { - auto xml = e->add_child("Ruby"); - xml->add_child("Rb")->add_child_text(ruby.base); - auto rt = xml->add_child("Rt"); + auto xml = cxml::add_child(e, "Ruby"); + cxml::add_child(xml, "Rb")->add_child_text(ruby.base); + auto rt = cxml::add_child(xml, "Rt"); rt->add_child_text(ruby.annotation); rt->set_attribute("Size", dcp::raw_convert<string>(ruby.size, 6)); rt->set_attribute("Position", ruby.position == RubyPosition::BEFORE ? "before" : "after"); @@ -242,7 +242,7 @@ order::Text::as_xml (xmlpp::Element* parent, Context& context) const xmlpp::Element* order::Subtitle::as_xml (xmlpp::Element* parent, Context& context) const { - auto e = parent->add_child ("Subtitle"); + auto e = cxml::add_child(parent, "Subtitle"); e->set_attribute ("SpotNumber", raw_convert<string> (context.spot_number++)); e->set_attribute ("TimeIn", _in.rebase(context.time_code_rate).as_string(context.standard)); e->set_attribute ("TimeOut", _out.rebase(context.time_code_rate).as_string(context.standard)); @@ -274,7 +274,7 @@ order::Font::clear () xmlpp::Element * order::Image::as_xml (xmlpp::Element* parent, Context& context) const { - auto e = parent->add_child ("Image"); + auto e = cxml::add_child(parent, "Image"); position_align(e, context, _h_align, _h_position, _v_align, _v_position, _z_position); if (context.standard == Standard::SMPTE) { |
