From a265913d48351e9142991538125df7e8d5005e3d Mon Sep 17 00:00:00 2001 From: rettinghaus Date: Sat, 14 Dec 2024 13:36:50 +0100 Subject: [PATCH] adjust reading/writing of color attribute --- src/iomei.cpp | 43 ++----------------------------------------- 1 file changed, 2 insertions(+), 41 deletions(-) diff --git a/src/iomei.cpp b/src/iomei.cpp index e71c091392..a6a4fe2b25 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -1951,6 +1951,7 @@ void MEIOutput::WriteControlElement(pugi::xml_node currentNode, ControlElement * this->WriteXmlId(currentNode, controlElement); this->WriteAltSymInterface(currentNode, controlElement); this->WriteLinkingInterface(currentNode, controlElement); + controlElement->WriteColor(currentNode); controlElement->WriteLabelled(currentNode); controlElement->WriteTyped(currentNode); } @@ -1972,7 +1973,6 @@ void MEIOutput::WriteArpeg(pugi::xml_node currentNode, Arpeg *arpeg) this->WriteTimePointInterface(currentNode, arpeg); arpeg->WriteArpegLog(currentNode); arpeg->WriteArpegVis(currentNode); - arpeg->WriteColor(currentNode); arpeg->WriteEnclosingChars(currentNode); } @@ -1985,7 +1985,6 @@ void MEIOutput::WriteBeamSpan(pugi::xml_node currentNode, BeamSpan *beamSpan) WriteTimeSpanningInterface(currentNode, beamSpan); beamSpan->WriteBeamedWith(currentNode); beamSpan->WriteBeamRend(currentNode); - beamSpan->WriteColor(currentNode); } void MEIOutput::WriteBracketSpan(pugi::xml_node currentNode, BracketSpan *bracketSpan) @@ -1995,7 +1994,6 @@ void MEIOutput::WriteBracketSpan(pugi::xml_node currentNode, BracketSpan *bracke this->WriteControlElement(currentNode, bracketSpan); this->WriteTimeSpanningInterface(currentNode, bracketSpan); bracketSpan->WriteBracketSpanLog(currentNode); - bracketSpan->WriteColor(currentNode); bracketSpan->WriteLineRend(currentNode); bracketSpan->WriteLineRendBase(currentNode); } @@ -2006,7 +2004,6 @@ void MEIOutput::WriteBreath(pugi::xml_node currentNode, Breath *breath) this->WriteControlElement(currentNode, breath); this->WriteTimePointInterface(currentNode, breath); - breath->WriteColor(currentNode); breath->WritePlacementRelStaff(currentNode); } @@ -2016,7 +2013,6 @@ void MEIOutput::WriteCaesura(pugi::xml_node currentNode, Caesura *caesura) this->WriteControlElement(currentNode, caesura); this->WriteTimePointInterface(currentNode, caesura); - caesura->WriteColor(currentNode); caesura->WriteExtSymAuth(currentNode); caesura->WriteExtSymNames(currentNode); caesura->WritePlacementRelStaff(currentNode); @@ -2056,7 +2052,6 @@ void MEIOutput::WriteFermata(pugi::xml_node currentNode, Fermata *fermata) this->WriteControlElement(currentNode, fermata); this->WriteTimePointInterface(currentNode, fermata); - fermata->WriteColor(currentNode); fermata->WriteEnclosingChars(currentNode); fermata->WriteExtSymAuth(currentNode); fermata->WriteExtSymNames(currentNode); @@ -2080,7 +2075,6 @@ void MEIOutput::WriteGliss(pugi::xml_node currentNode, Gliss *gliss) this->WriteControlElement(currentNode, gliss); this->WriteTimeSpanningInterface(currentNode, gliss); - gliss->WriteColor(currentNode); gliss->WriteLineRend(currentNode); gliss->WriteLineRendBase(currentNode); gliss->WriteNNumberLike(currentNode); @@ -2092,7 +2086,6 @@ void MEIOutput::WriteHairpin(pugi::xml_node currentNode, Hairpin *hairpin) this->WriteControlElement(currentNode, hairpin); this->WriteTimeSpanningInterface(currentNode, hairpin); - hairpin->WriteColor(currentNode); hairpin->WriteHairpinLog(currentNode); hairpin->WriteHairpinVis(currentNode); hairpin->WriteLineRendBase(currentNode); @@ -2117,7 +2110,6 @@ void MEIOutput::WriteLv(pugi::xml_node currentNode, Lv *lv) this->WriteControlElement(currentNode, lv); this->WriteTimeSpanningInterface(currentNode, lv); - lv->WriteColor(currentNode); lv->WriteCurvature(currentNode); lv->WriteLineRendBase(currentNode); } @@ -2129,7 +2121,6 @@ void MEIOutput::WriteMNum(pugi::xml_node currentNode, MNum *mNum) this->WriteControlElement(currentNode, mNum); this->WriteTextDirInterface(currentNode, mNum); this->WriteTimePointInterface(currentNode, mNum); - mNum->WriteColor(currentNode); mNum->WriteLang(currentNode); mNum->WriteTypography(currentNode); } @@ -2140,7 +2131,6 @@ void MEIOutput::WriteMordent(pugi::xml_node currentNode, Mordent *mordent) this->WriteControlElement(currentNode, mordent); this->WriteTimePointInterface(currentNode, mordent); - mordent->WriteColor(currentNode); mordent->WriteExtSymAuth(currentNode); mordent->WriteExtSymNames(currentNode); mordent->WriteOrnamentAccid(currentNode); @@ -2154,7 +2144,6 @@ void MEIOutput::WriteOctave(pugi::xml_node currentNode, Octave *octave) this->WriteControlElement(currentNode, octave); this->WriteTimeSpanningInterface(currentNode, octave); - octave->WriteColor(currentNode); octave->WriteExtender(currentNode); octave->WriteLineRend(currentNode); octave->WriteLineRendBase(currentNode); @@ -2169,7 +2158,6 @@ void MEIOutput::WriteOrnam(pugi::xml_node currentNode, Ornam *ornam) this->WriteControlElement(currentNode, ornam); this->WriteTextDirInterface(currentNode, ornam); this->WriteTimePointInterface(currentNode, ornam); - ornam->WriteColor(currentNode); ornam->WriteOrnamentAccid(currentNode); } @@ -2179,7 +2167,6 @@ void MEIOutput::WritePedal(pugi::xml_node currentNode, Pedal *pedal) this->WriteControlElement(currentNode, pedal); this->WriteTimeSpanningInterface(currentNode, pedal); - pedal->WriteColor(currentNode); pedal->WriteExtSymAuth(currentNode); pedal->WriteExtSymNames(currentNode); pedal->WritePedalLog(currentNode); @@ -2210,7 +2197,6 @@ void MEIOutput::WriteReh(pugi::xml_node currentNode, Reh *reh) this->WriteControlElement(currentNode, reh); this->WriteTextDirInterface(currentNode, reh); this->WriteTimePointInterface(currentNode, reh); - reh->WriteColor(currentNode); reh->WriteLang(currentNode); reh->WriteVerticalGroup(currentNode); } @@ -2222,7 +2208,6 @@ void MEIOutput::WriteRepeatMark(pugi::xml_node currentNode, RepeatMark *repeatMa this->WriteControlElement(currentNode, repeatMark); this->WriteTextDirInterface(currentNode, repeatMark); this->WriteTimePointInterface(currentNode, repeatMark); - repeatMark->WriteColor(currentNode); repeatMark->WriteExtSymAuth(currentNode); repeatMark->WriteExtSymNames(currentNode); repeatMark->WriteRepeatMarkLog(currentNode); @@ -2234,7 +2219,6 @@ void MEIOutput::WriteSlur(pugi::xml_node currentNode, Slur *slur) this->WriteControlElement(currentNode, slur); this->WriteTimeSpanningInterface(currentNode, slur); - slur->WriteColor(currentNode); slur->WriteCurvature(currentNode); slur->WriteLayerIdent(currentNode); slur->WriteLineRendBase(currentNode); @@ -2276,7 +2260,6 @@ void MEIOutput::WriteTie(pugi::xml_node currentNode, Tie *tie) this->WriteControlElement(currentNode, tie); this->WriteTimeSpanningInterface(currentNode, tie); - tie->WriteColor(currentNode); tie->WriteCurvature(currentNode); tie->WriteLineRendBase(currentNode); } @@ -2287,7 +2270,6 @@ void MEIOutput::WriteTrill(pugi::xml_node currentNode, Trill *trill) this->WriteControlElement(currentNode, trill); this->WriteTimeSpanningInterface(currentNode, trill); - trill->WriteColor(currentNode); trill->WriteExtender(currentNode); trill->WriteExtSymAuth(currentNode); trill->WriteExtSymNames(currentNode); @@ -2303,7 +2285,6 @@ void MEIOutput::WriteTurn(pugi::xml_node currentNode, Turn *turn) this->WriteControlElement(currentNode, turn); this->WriteTimePointInterface(currentNode, turn); - turn->WriteColor(currentNode); turn->WriteExtSymAuth(currentNode); turn->WriteExtSymNames(currentNode); turn->WriteOrnamentAccid(currentNode); @@ -5638,6 +5619,7 @@ bool MEIInput::ReadControlElement(pugi::xml_node element, ControlElement *object this->SetMeiID(element, object); this->ReadAltSymInterface(element, object); this->ReadLinkingInterface(element, object); + object->ReadColor(element); object->ReadLabelled(element); object->ReadTyped(element); @@ -5665,7 +5647,6 @@ bool MEIInput::ReadArpeg(Object *parent, pugi::xml_node arpeg) this->ReadTimePointInterface(arpeg, vrvArpeg); vrvArpeg->ReadArpegLog(arpeg); vrvArpeg->ReadArpegVis(arpeg); - vrvArpeg->ReadColor(arpeg); vrvArpeg->ReadEnclosingChars(arpeg); parent->AddChild(vrvArpeg); @@ -5682,7 +5663,6 @@ bool MEIInput::ReadBeamSpan(Object *parent, pugi::xml_node beamSpan) this->ReadTimeSpanningInterface(beamSpan, vrvBeamSpan); vrvBeamSpan->ReadBeamedWith(beamSpan); vrvBeamSpan->ReadBeamRend(beamSpan); - vrvBeamSpan->ReadColor(beamSpan); parent->AddChild(vrvBeamSpan); this->ReadUnsupportedAttr(beamSpan, vrvBeamSpan); @@ -5696,7 +5676,6 @@ bool MEIInput::ReadBracketSpan(Object *parent, pugi::xml_node bracketSpan) this->ReadTimeSpanningInterface(bracketSpan, vrvBracketSpan); vrvBracketSpan->ReadBracketSpanLog(bracketSpan); - vrvBracketSpan->ReadColor(bracketSpan); vrvBracketSpan->ReadLineRend(bracketSpan); vrvBracketSpan->ReadLineRendBase(bracketSpan); @@ -5711,7 +5690,6 @@ bool MEIInput::ReadBreath(Object *parent, pugi::xml_node breath) this->ReadControlElement(breath, vrvBreath); this->ReadTimePointInterface(breath, vrvBreath); - vrvBreath->ReadColor(breath); vrvBreath->ReadPlacementRelStaff(breath); parent->AddChild(vrvBreath); @@ -5725,7 +5703,6 @@ bool MEIInput::ReadCaesura(Object *parent, pugi::xml_node caesura) this->ReadControlElement(caesura, vrvCaesura); this->ReadTimePointInterface(caesura, vrvCaesura); - vrvCaesura->ReadColor(caesura); vrvCaesura->ReadExtSymAuth(caesura); vrvCaesura->ReadExtSymNames(caesura); vrvCaesura->ReadPlacementRelStaff(caesura); @@ -5777,7 +5754,6 @@ bool MEIInput::ReadFermata(Object *parent, pugi::xml_node fermata) this->ReadControlElement(fermata, vrvFermata); this->ReadTimePointInterface(fermata, vrvFermata); - vrvFermata->ReadColor(fermata); vrvFermata->ReadEnclosingChars(fermata); vrvFermata->ReadExtSymAuth(fermata); vrvFermata->ReadExtSymNames(fermata); @@ -5809,7 +5785,6 @@ bool MEIInput::ReadGliss(Object *parent, pugi::xml_node gliss) this->ReadControlElement(gliss, vrvGliss); this->ReadTimeSpanningInterface(gliss, vrvGliss); - vrvGliss->ReadColor(gliss); vrvGliss->ReadLineRend(gliss); vrvGliss->ReadLineRendBase(gliss); vrvGliss->ReadNNumberLike(gliss); @@ -5825,7 +5800,6 @@ bool MEIInput::ReadHairpin(Object *parent, pugi::xml_node hairpin) this->ReadControlElement(hairpin, vrvHairpin); this->ReadTimeSpanningInterface(hairpin, vrvHairpin); - vrvHairpin->ReadColor(hairpin); vrvHairpin->ReadHairpinLog(hairpin); vrvHairpin->ReadHairpinVis(hairpin); vrvHairpin->ReadLineRendBase(hairpin); @@ -5858,7 +5832,6 @@ bool MEIInput::ReadLv(Object *parent, pugi::xml_node lv) this->ReadControlElement(lv, vrvLv); this->ReadTimeSpanningInterface(lv, vrvLv); - vrvLv->ReadColor(lv); vrvLv->ReadCurvature(lv); vrvLv->ReadLineRendBase(lv); @@ -5874,7 +5847,6 @@ bool MEIInput::ReadMNum(Object *parent, pugi::xml_node mNum) this->ReadTextDirInterface(mNum, vrvMNum); this->ReadTimePointInterface(mNum, vrvMNum); - vrvMNum->ReadColor(mNum); vrvMNum->ReadLang(mNum); vrvMNum->ReadTypography(mNum); @@ -5892,7 +5864,6 @@ bool MEIInput::ReadMordent(Object *parent, pugi::xml_node mordent) } this->ReadTimePointInterface(mordent, vrvMordent); - vrvMordent->ReadColor(mordent); vrvMordent->ReadExtSymAuth(mordent); vrvMordent->ReadExtSymNames(mordent); vrvMordent->ReadOrnamentAccid(mordent); @@ -5910,7 +5881,6 @@ bool MEIInput::ReadOctave(Object *parent, pugi::xml_node octave) this->ReadControlElement(octave, vrvOctave); this->ReadTimeSpanningInterface(octave, vrvOctave); - vrvOctave->ReadColor(octave); vrvOctave->ReadExtender(octave); vrvOctave->ReadLineRend(octave); vrvOctave->ReadLineRendBase(octave); @@ -5929,7 +5899,6 @@ bool MEIInput::ReadOrnam(Object *parent, pugi::xml_node ornam) this->ReadTextDirInterface(ornam, vrvOrnam); this->ReadTimePointInterface(ornam, vrvOrnam); - vrvOrnam->ReadColor(ornam); vrvOrnam->ReadOrnamentAccid(ornam); parent->AddChild(vrvOrnam); @@ -5943,7 +5912,6 @@ bool MEIInput::ReadPedal(Object *parent, pugi::xml_node pedal) this->ReadControlElement(pedal, vrvPedal); this->ReadTimeSpanningInterface(pedal, vrvPedal); - vrvPedal->ReadColor(pedal); vrvPedal->ReadExtSymAuth(pedal); vrvPedal->ReadExtSymNames(pedal); vrvPedal->ReadPedalLog(pedal); @@ -5962,7 +5930,6 @@ bool MEIInput::ReadPhrase(Object *parent, pugi::xml_node phrase) this->ReadControlElement(phrase, vrvPhrase); this->ReadTimeSpanningInterface(phrase, vrvPhrase); - vrvPhrase->ReadColor(phrase); vrvPhrase->ReadCurvature(phrase); vrvPhrase->ReadLayerIdent(phrase); vrvPhrase->ReadLineRendBase(phrase); @@ -5991,7 +5958,6 @@ bool MEIInput::ReadReh(Object *parent, pugi::xml_node reh) this->ReadTextDirInterface(reh, vrvReh); this->ReadTimePointInterface(reh, vrvReh); - vrvReh->ReadColor(reh); vrvReh->ReadLang(reh); vrvReh->ReadVerticalGroup(reh); @@ -6007,7 +5973,6 @@ bool MEIInput::ReadRepeatMark(Object *parent, pugi::xml_node repeatMark) this->ReadTextDirInterface(repeatMark, vrvRepeatMark); this->ReadTimePointInterface(repeatMark, vrvRepeatMark); - vrvRepeatMark->ReadColor(repeatMark); vrvRepeatMark->ReadExtSymAuth(repeatMark); vrvRepeatMark->ReadExtSymNames(repeatMark); vrvRepeatMark->ReadRepeatMarkLog(repeatMark); @@ -6023,7 +5988,6 @@ bool MEIInput::ReadSlur(Object *parent, pugi::xml_node slur) this->ReadControlElement(slur, vrvSlur); this->ReadTimeSpanningInterface(slur, vrvSlur); - vrvSlur->ReadColor(slur); vrvSlur->ReadCurvature(slur); vrvSlur->ReadLayerIdent(slur); vrvSlur->ReadLineRendBase(slur); @@ -6056,7 +6020,6 @@ bool MEIInput::ReadTie(Object *parent, pugi::xml_node tie) this->ReadControlElement(tie, vrvTie); this->ReadTimeSpanningInterface(tie, vrvTie); - vrvTie->ReadColor(tie); vrvTie->ReadCurvature(tie); vrvTie->ReadLineRendBase(tie); @@ -6071,7 +6034,6 @@ bool MEIInput::ReadTrill(Object *parent, pugi::xml_node trill) this->ReadControlElement(trill, vrvTrill); this->ReadTimeSpanningInterface(trill, vrvTrill); - vrvTrill->ReadColor(trill); vrvTrill->ReadExtender(trill); vrvTrill->ReadExtSymAuth(trill); vrvTrill->ReadExtSymNames(trill); @@ -6095,7 +6057,6 @@ bool MEIInput::ReadTurn(Object *parent, pugi::xml_node turn) } this->ReadTimePointInterface(turn, vrvTurn); - vrvTurn->ReadColor(turn); vrvTurn->ReadExtSymAuth(turn); vrvTurn->ReadExtSymNames(turn); vrvTurn->ReadOrnamentAccid(turn);