Skip to content

Commit

Permalink
Merge branch 'develop-facsimile' into develop-ddmal-merge-23-12
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Dec 23, 2023
2 parents 16ab863 + a2667ae commit 6215ccd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ void Doc::ConvertToCastOffMensuralDoc(bool castOff)
if (!m_isMensuralMusicOnly) return;

// Do not convert transcription files
if (this->GetType() == Transcription) return;
if (this->IsTranscription()) return;

// Do not convert facs files
if (this->IsFacs()) return;
Expand Down Expand Up @@ -2088,7 +2088,7 @@ int Doc::GetAdjustedDrawingPageHeight() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || this->IsFacs()) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageHeight / DEFINITION_FACTOR;
}

Expand All @@ -2100,7 +2100,7 @@ int Doc::GetAdjustedDrawingPageWidth() const
{
assert(m_drawingPage);

if ((this->GetType() == Transcription) || this->IsFacs()) {
if (this->IsTranscription() || this->IsFacs()) {
return m_drawingPage->m_pageWidth / DEFINITION_FACTOR;
}

Expand Down
22 changes: 11 additions & 11 deletions src/iomei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4141,7 +4141,7 @@ bool MEIInput::ReadPage(Object *parent, pugi::xml_node page)
Page *vrvPage = new Page();
this->SetMeiID(page, vrvPage);

if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradePageTo_3_0_0(vrvPage, m_doc);
}

Expand Down Expand Up @@ -4180,12 +4180,12 @@ bool MEIInput::ReadPage(Object *parent, pugi::xml_node page)
parent->AddChild(vrvPage);
bool success = this->ReadPageChildren(vrvPage, page);

if (success && (m_doc->GetType() == Transcription) && (vrvPage->GetPPUFactor() != 1.0)) {
if (success && m_doc->IsTranscription() && (vrvPage->GetPPUFactor() != 1.0)) {
ApplyPPUFactorFunctor applyPPUFactor;
vrvPage->Process(applyPPUFactor);
}

if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradePageTo_5_0(vrvPage);
}

Expand Down Expand Up @@ -4570,7 +4570,7 @@ bool MEIInput::ReadSystem(Object *parent, pugi::xml_node system)
vrvSystem->m_systemRightMar = system.attribute("system.rightmar").as_int();
system.remove_attribute("system.rightmar");
}
if (system.attribute("uly") && (m_doc->GetType() == Transcription)) {
if (system.attribute("uly") && m_doc->IsTranscription()) {
vrvSystem->m_yAbs = system.attribute("uly").as_int() * DEFINITION_FACTOR;
system.remove_attribute("uly");
}
Expand Down Expand Up @@ -4619,7 +4619,7 @@ bool MEIInput::ReadSystemChildren(Object *parent, pugi::xml_node parentNode)
assert(system);
unmeasured = new Measure(false);
m_doc->SetMensuralMusicOnly(true);
if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradeMeasureTo_3_0_0(unmeasured, system);
}
system->AddChild(unmeasured);
Expand Down Expand Up @@ -5355,11 +5355,11 @@ bool MEIInput::ReadMeasure(Object *parent, pugi::xml_node measure)
vrvMeasure->ReadPointing(measure);
vrvMeasure->ReadTyped(measure);

if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradeMeasureTo_5_0(measure);
}

if (measure.attribute("coord.x1") && measure.attribute("coord.x2") && (m_doc->GetType() == Transcription)) {
if (measure.attribute("coord.x1") && measure.attribute("coord.x2") && m_doc->IsTranscription()) {
vrvMeasure->ReadCoordX1(measure);
vrvMeasure->ReadCoordX2(measure);
vrvMeasure->m_xAbs = vrvMeasure->GetCoordX1() * DEFINITION_FACTOR;
Expand Down Expand Up @@ -6049,11 +6049,11 @@ bool MEIInput::ReadStaff(Object *parent, pugi::xml_node staff)
vrvStaff->ReadTyped(staff);
vrvStaff->ReadVisibility(staff);

if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradeStaffTo_5_0(staff);
}

if (staff.attribute("coord.y1") && (m_doc->GetType() == Transcription)) {
if (staff.attribute("coord.y1") && m_doc->IsTranscription()) {
vrvStaff->ReadCoordY1(staff);
vrvStaff->m_yAbs = vrvStaff->GetCoordY1() * DEFINITION_FACTOR;
}
Expand Down Expand Up @@ -6288,11 +6288,11 @@ bool MEIInput::ReadLayerElement(pugi::xml_node element, LayerElement *object)
object->ReadLabelled(element);
object->ReadTyped(element);

if ((m_doc->GetType() == Transcription) && (m_meiversion == meiVersion_MEIVERSION_2013)) {
if (m_doc->IsTranscription() && (m_meiversion == meiVersion_MEIVERSION_2013)) {
UpgradeLayerElementTo_5_0(element);
}

if (element.attribute("coord.x1") && (m_doc->GetType() == Transcription)) {
if (element.attribute("coord.x1") && m_doc->IsTranscription()) {
object->ReadCoordX1(element);
object->m_xAbs = object->GetCoordX1() * DEFINITION_FACTOR;
}
Expand Down

0 comments on commit 6215ccd

Please sign in to comment.