Skip to content

Commit

Permalink
Some adjustments for specific fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelPau committed Apr 15, 2024
1 parent 010e83f commit 93d0d05
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions ogr/ogrsf_frmts/miramon/ogrmiramonlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,41 @@ OGRErr OGRMiraMonLayer::TranslateFieldsToMM()
phMiraMonLayer->pLayerDB->pFields[iField]
.nFieldSize = 3;
}

// Some exceptions for some fields:
if (EQUAL(
m_poFeatureDefn->GetFieldDefn(iField)->GetNameRef(),
"fontsize"))
{
phMiraMonLayer->pLayerDB->pFields[iField].nFieldSize =
11;
phMiraMonLayer->pLayerDB->pFields[iField]
.nNumberOfDecimals = 3;
}
else if (EQUAL(m_poFeatureDefn->GetFieldDefn(iField)
->GetNameRef(),
"leading") ||
EQUAL(m_poFeatureDefn->GetFieldDefn(iField)
->GetNameRef(),
"chrwidth") ||
EQUAL(m_poFeatureDefn->GetFieldDefn(iField)
->GetNameRef(),
"chrspacing"))
{
phMiraMonLayer->pLayerDB->pFields[iField].nFieldSize =
8;
phMiraMonLayer->pLayerDB->pFields[iField]
.nNumberOfDecimals = 3;
}
else if (EQUAL(m_poFeatureDefn->GetFieldDefn(iField)
->GetNameRef(),
"orientacio"))
{
phMiraMonLayer->pLayerDB->pFields[iField].nFieldSize =
7;
phMiraMonLayer->pLayerDB->pFields[iField]
.nNumberOfDecimals = 2;
}
}
else
{
Expand Down

0 comments on commit 93d0d05

Please sign in to comment.