Skip to content

Commit

Permalink
fix #52616: [Capella import] MuseScore stops reading Capella files at…
Browse files Browse the repository at this point in the history
… <barline>...<\barline>
  • Loading branch information
lasconic committed Apr 8, 2015
1 parent 2fb4099 commit 7d68766
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mscore/capxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ void CapExplicitBarline::readCapx(XmlReader& e)
else if (type == "dashed") _type = BarLineType::BROKEN;
else _type = BarLineType::NORMAL; // default
_barMode = 0;
while (e.readNextStartElement()) {
const QStringRef& tag(e.name());
if (tag == "drawObjects") {
e.skipCurrentElement();
}
else
e.unknown();
}
e.readNext();
}

Expand Down
Binary file added mtest/capella/io/testBarline.capx
Binary file not shown.
118 changes: 118 additions & 0 deletions mtest/capella/io/testBarline.capx-ref.mscx
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<museScore version="2.00">
<Score>
<LayerTag id="0" tag="default"></LayerTag>
<currentLayer>0</currentLayer>
<Division>480</Division>
<Style>
<minSystemDistance>8</minSystemDistance>
<maxSystemDistance>12</maxSystemDistance>
<measureSpacing>1</measureSpacing>
<smallStaffMag>0.62766</smallStaffMag>
<page-layout>
<page-height>1683.78</page-height>
<page-width>1190.55</page-width>
<page-margins type="even">
<left-margin>56.6929</left-margin>
<right-margin>56.6929</right-margin>
<top-margin>56.6929</top-margin>
<bottom-margin>113.386</bottom-margin>
</page-margins>
<page-margins type="odd">
<left-margin>56.6929</left-margin>
<right-margin>56.6929</right-margin>
<top-margin>56.6929</top-margin>
<bottom-margin>113.386</bottom-margin>
</page-margins>
</page-layout>
<Spatium>1.88</Spatium>
</Style>
<showInvisible>1</showInvisible>
<showUnprintable>1</showUnprintable>
<showFrames>1</showFrames>
<showMargins>0</showMargins>
<metaTag name="arranger"></metaTag>
<metaTag name="composer"></metaTag>
<metaTag name="copyright"></metaTag>
<metaTag name="lyricist"></metaTag>
<metaTag name="movementNumber"></metaTag>
<metaTag name="movementTitle"></metaTag>
<metaTag name="poet"></metaTag>
<metaTag name="source"></metaTag>
<metaTag name="translator"></metaTag>
<metaTag name="workNumber"></metaTag>
<metaTag name="workTitle"></metaTag>
<PageList>
<Page>
<System>
</System>
<System>
</System>
</Page>
</PageList>
<Part>
<Staff id="1">
<StaffType group="pitched">
</StaffType>
<bracket type="0" span="2"/>
</Staff>
<trackName>unbenannt</trackName>
<Instrument>
<trackName></trackName>
<Channel>
<program value="61"/>
</Channel>
</Instrument>
</Part>
<Staff id="1">
<VBox>
<height>5</height>
</VBox>
<Measure number="1" len="4/4">
<Clef>
<concertClefType>G</concertClefType>
<transposingClefType>G</transposingClefType>
</Clef>
<TimeSig>
<sigN>4</sigN>
<sigD>4</sigD>
<showCourtesySig>1</showCourtesySig>
</TimeSig>
<Chord>
<durationType>half</durationType>
<Note>
<pitch>60</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Chord>
<durationType>half</durationType>
<Note>
<pitch>62</pitch>
<tpc>16</tpc>
</Note>
</Chord>
</Measure>
<Measure number="2">
<LayoutBreak>
<subtype>line</subtype>
<pause>3</pause>
</LayoutBreak>
<Chord>
<durationType>half</durationType>
<Note>
<pitch>64</pitch>
<tpc>18</tpc>
</Note>
</Chord>
<Chord>
<durationType>half</durationType>
<Note>
<pitch>65</pitch>
<tpc>13</tpc>
</Note>
</Chord>
</Measure>
</Staff>
</Score>
</museScore>
1 change: 1 addition & 0 deletions mtest/capella/io/tst_capella_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ private slots:
void capxTestTuplet1() { capxReadTest("testTuplet1"); } // generates different (incorrect ?) l1 and l2 values in beams
void capxTestTuplet2() { capxReadTest("testTuplet2"); } // generates different beaming with respect to the original
void capxTestVolta1() { capxReadTest("testVolta1"); }
void capxTestBarline() { capxReadTest("testBarline"); }
};

//---------------------------------------------------------
Expand Down

0 comments on commit 7d68766

Please sign in to comment.