Skip to content

Commit

Permalink
Enable Compat114 tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Jul 11, 2018
1 parent c4307e1 commit afafe70
Show file tree
Hide file tree
Showing 23 changed files with 187 additions and 3,101 deletions.
36 changes: 19 additions & 17 deletions libmscore/read114.cpp
Expand Up @@ -2467,19 +2467,18 @@ static void readStyle(MStyle* style, XmlReader& e)
e.skipCurrentElement();
else if (tag == "systemDistance") // obsolete
style->set(Sid::minSystemDistance, QVariant(e.readDouble()));
else {
if (tag == "stemDir") {
int voice = e.attribute("voice", "1").toInt() - 1;
switch(voice) {
case 0: tag = "StemDir1"; break;
case 1: tag = "StemDir2"; break;
case 2: tag = "StemDir3"; break;
case 3: tag = "StemDir4"; break;
}
}
// for compatibility:
if (tag == "oddHeader" || tag == "evenHeader" || tag == "oddFooter" || tag == "evenFooter")
tag += "C";
else if (tag == "stemDir") {
int voice = e.attribute("voice", "1").toInt() - 1;
switch(voice) {
case 0: tag = "StemDir1"; break;
case 1: tag = "StemDir2"; break;
case 2: tag = "StemDir3"; break;
case 3: tag = "StemDir4"; break;
}
}
// for compatibility:
else if (tag == "oddHeader" || tag == "evenHeader" || tag == "oddFooter" || tag == "evenFooter")
tag += "C";
#if 0 // TODO-ws
int idx2;
for (idx2 = 0; idx2 < int(ArticulationType::ARTICULATIONS); ++idx2) {
Expand All @@ -2506,9 +2505,12 @@ static void readStyle(MStyle* style, XmlReader& e)
if (idx2 < int(ArticulationType::ARTICULATIONS))
continue;
#endif
QString val(e.readElementText());
//TODO style->convertToUnit(tag, val);
else {
if (!style->readProperties(e)) {
e.skipCurrentElement();
}
}
//TODO style->convertToUnit(tag, val);
}

// if we just specified a new chord description file
Expand Down Expand Up @@ -2564,10 +2566,10 @@ static void readStyle(MStyle* style, XmlReader& e)
Score::FileError MasterScore::read114(XmlReader& e)
{
qDebug("==");
#if 0

for (unsigned int i = 0; i < sizeof(style114)/sizeof(*style114); ++i)
style().set(style114[i].idx, style114[i].val);

#if 0
// old text style defaults
TextStyle ts = style().textStyle("Chord Symbol");
ts.setYoff(-4.0);
Expand Down
2 changes: 1 addition & 1 deletion mtest/CMakeLists.txt
Expand Up @@ -148,7 +148,7 @@ add_custom_target(reporthtml
)

subdirs (
# libmscore/compat114
libmscore/compat114
libmscore/compat206
# libmscore/album # obsolete
libmscore/barline
Expand Down
57 changes: 3 additions & 54 deletions mtest/libmscore/compat114/accidentals-ref.mscx
Expand Up @@ -12,7 +12,9 @@
<bracketDistance>0.25</bracketDistance>
<clefLeftMargin>0.5</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<clefBarlineDistance>0.18</clefBarlineDistance>
<minNoteDistance>0.4</minNoteDistance>
<barNoteDistance>1.2</barNoteDistance>
<measureSpacing>1.14</measureSpacing>
<ledgerLineWidth>0.12</ledgerLineWidth>
<beamWidth>0.48</beamWidth>
Expand All @@ -26,59 +28,6 @@
<voltaY>0</voltaY>
<keySigNaturals>1</keySigNaturals>
<tupletOufOfStaff>0</tupletOufOfStaff>
<TextStyle>
<halign>center</halign>
<valign>baseline</valign>
<offsetType>spatium</offsetType>
<name>Dynamics</name>
<family>FreeSerif</family>
<size>12</size>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
</TextStyle>
<TextStyle>
<halign>left</halign>
<valign>baseline</valign>
<xoffset>0</xoffset>
<yoffset>-4</yoffset>
<offsetType>spatium</offsetType>
<name>Chord Symbol</name>
<family>FreeSerif</family>
<size>12</size>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
</TextStyle>
<TextStyle>
<halign>center</halign>
<valign>baseline</valign>
<xoffset>0</xoffset>
<yoffset>-3</yoffset>
<offsetType>spatium</offsetType>
<name>Rehearsal Mark</name>
<family>FreeSerif</family>
<size>14</size>
<bold>1</bold>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
<frameWidthS>0.2</frameWidthS>
<paddingWidthS>0.5</paddingWidthS>
<frameRound>20</frameRound>
<frameColor r="0" g="0" b="0" a="255"/>
<systemFlag>1</systemFlag>
</TextStyle>
<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.764</Spatium>
</Style>
<showInvisible>1</showInvisible>
Expand All @@ -100,6 +49,7 @@
<Staff id="1">
<StaffType group="pitched">
</StaffType>
<bracket type="-1" span="1" col="0"/>
</Staff>
<trackName>Flute</trackName>
<Instrument>
Expand Down Expand Up @@ -140,7 +90,6 @@
<TimeSig>
<sigN>4</sigN>
<sigD>4</sigD>
<showCourtesySig>1</showCourtesySig>
</TimeSig>
<Chord>
<durationType>quarter</durationType>
Expand Down
118 changes: 32 additions & 86 deletions mtest/libmscore/compat114/articulations-ref.mscx
Expand Up @@ -13,7 +13,9 @@
<bracketDistance>0.2</bracketDistance>
<clefLeftMargin>0.5</clefLeftMargin>
<clefKeyRightMargin>1.75</clefKeyRightMargin>
<clefBarlineDistance>0.18</clefBarlineDistance>
<minNoteDistance>0.4</minNoteDistance>
<barNoteDistance>1.2</barNoteDistance>
<measureSpacing>1.14</measureSpacing>
<ledgerLineWidth>0.12</ledgerLineWidth>
<beamWidth>0.48</beamWidth>
Expand All @@ -28,59 +30,6 @@
<voltaY>0</voltaY>
<keySigNaturals>1</keySigNaturals>
<tupletOufOfStaff>0</tupletOufOfStaff>
<TextStyle>
<halign>center</halign>
<valign>baseline</valign>
<offsetType>spatium</offsetType>
<name>Dynamics</name>
<family>FreeSerif</family>
<size>12</size>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
</TextStyle>
<TextStyle>
<halign>left</halign>
<valign>baseline</valign>
<xoffset>0</xoffset>
<yoffset>-4</yoffset>
<offsetType>spatium</offsetType>
<name>Chord Symbol</name>
<family>FreeSerif</family>
<size>12</size>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
</TextStyle>
<TextStyle>
<halign>center</halign>
<valign>baseline</valign>
<xoffset>0</xoffset>
<yoffset>-3</yoffset>
<offsetType>spatium</offsetType>
<name>Rehearsal Mark</name>
<family>FreeSerif</family>
<size>14</size>
<bold>1</bold>
<sizeIsSpatiumDependent>1</sizeIsSpatiumDependent>
<frameWidthS>0.2</frameWidthS>
<paddingWidthS>0.5</paddingWidthS>
<frameRound>20</frameRound>
<frameColor r="0" g="0" b="0" a="255"/>
<systemFlag>1</systemFlag>
</TextStyle>
<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.764</Spatium>
</Style>
<showInvisible>1</showInvisible>
Expand All @@ -102,6 +51,7 @@
<Staff id="1">
<StaffType group="pitched">
</StaffType>
<bracket type="-1" span="1" col="0"/>
</Staff>
<trackName>Flute</trackName>
<Instrument>
Expand Down Expand Up @@ -142,92 +92,88 @@
<TimeSig>
<sigN>4</sigN>
<sigD>4</sigD>
<showCourtesySig>1</showCourtesySig>
</TimeSig>
<Fermata>
<subtype>fermataAbove</subtype>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<subtype>fermataAbove</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataBelow</subtype>
<placement>below</placement>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>down</direction>
<subtype>fermataBelow</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataShortAbove</subtype>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>up</direction>
<subtype>fermataShortAbove</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataShortBelow</subtype>
<placement>below</placement>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>down</direction>
<subtype>fermataShortBelow</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
</Measure>
<Measure number="2">
<Fermata>
<subtype>fermataLongAbove</subtype>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>up</direction>
<subtype>fermataLongAbove</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataLongBelow</subtype>
<placement>below</placement>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>down</direction>
<subtype>fermataLongBelow</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataVeryLongAbove</subtype>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>up</direction>
<subtype>fermataVeryLongAbove</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
</Note>
</Chord>
<Fermata>
<subtype>fermataVeryLongBelow</subtype>
<placement>below</placement>
</Fermata>
<Chord>
<durationType>quarter</durationType>
<Articulation>
<direction>down</direction>
<subtype>fermataVeryLongBelow</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
<tpc>14</tpc>
Expand Down Expand Up @@ -490,7 +436,7 @@
<Chord>
<durationType>quarter</durationType>
<Articulation>
<subtype>ornamentDownPrall</subtype>
<subtype>ornamentPrecompMordentUpperPrefix</subtype>
</Articulation>
<Note>
<pitch>72</pitch>
Expand Down

0 comments on commit afafe70

Please sign in to comment.