diff --git a/src/doc.cpp b/src/doc.cpp index 19a52cf8215..8d1710d09e3 100644 --- a/src/doc.cpp +++ b/src/doc.cpp @@ -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; @@ -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; } @@ -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; } diff --git a/src/iomei.cpp b/src/iomei.cpp index 665ffd7bc85..97556fbbde0 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -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); } @@ -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); } @@ -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"); } @@ -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); @@ -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; @@ -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; } @@ -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; }