FCLT#63646 Graphics verbeteringen property 'UnmatchedLabels' tijdje geleden al toegevoegd.

svn path=/Slnkdwf/trunk/; revision=54145
This commit is contained in:
Jos Groot Lipman
2021-12-14 11:14:00 +00:00
parent a332b6d817
commit e731af7547
3 changed files with 21 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ interface IWhipFile : IDispatch{
[propget, id(30), helpstring("property minMergeDistance")] HRESULT minMergeDistance([out, retval] DOUBLE* pVal);
[propput, id(30), helpstring("property minMergeDistance")] HRESULT minMergeDistance([in] DOUBLE newVal);
[id(31), helpstring("method SetSymbolFont")] HRESULT SetSymbolFont([in] BSTR FontName, [in, defaultvalue(1000)] DOUBLE FontHeight);
[propget, id(32), helpstring("property UnmatchedLabels")] HRESULT UnmatchedLabels([out, retval] BSTR* pUnmatched);
};
[
object,

View File

@@ -407,7 +407,10 @@ void CWhipFile::processLabels()
}
}
if (!found)
{
m_UnmatchedLabels.Add(text);
myTRACE("\nLabel %s has no matching contour", text.string().ascii());
}
}
return;
@@ -536,7 +539,7 @@ WT_Result CWhipFile::my_process_outlineEllipse(WT_Outline_Ellipse & outlineEllip
if (MAX_BUILDER < deze->m_builder_len + 5) // overflow
{
deze->m_builder_len = 0; // reset builder
return WT_Result::Success;
return WT_Result::Success;
}
WT_Units units = fixUnits(file.rendition().viewport().viewport_units());
@@ -1702,3 +1705,17 @@ STDMETHODIMP CWhipFile::get_DwgLimits(IBoundingBox** pVal)
{
return m_dwgLimits->QueryInterface(IID_IBoundingBox, (void**)pVal);
}
STDMETHODIMP CWhipFile::get_UnmatchedLabels(BSTR* pUnmatched)
{
CString result = "";
for (size_t lbl = 0; lbl < m_UnmatchedLabels.GetCount(); lbl++)
{
WT_Text text = m_UnmatchedLabels[lbl];
if (result != "")
result += "\n";
result += text.string().ascii();
}
(*pUnmatched) = result.AllocSysString();
return S_OK;
}

View File

@@ -80,6 +80,7 @@ public:
STDMETHOD(SetFilterLayers)(BSTR reLayers);
STDMETHOD(get_FindInContour)(DOUBLE dwgX, DOUBLE dwgY, BSTR* pVal);
STDMETHOD(get_AddContour)(ISLNKContour** pVal);
STDMETHOD(get_UnmatchedLabels)(BSTR* pUnmatched);
private:
@@ -173,6 +174,7 @@ public:
CAtlArray<CSLNKSymbolImpl *> m_SLNKSymbols;
CAtlMap<CString, CSLNKSymbolDefinition *> m_SLNKSymbolDefinitions;
CAtlArray<WT_Text> m_SLNKLabels;
CAtlArray<WT_Text> m_UnmatchedLabels;
WT_Units m_contunits;
CString m_activeLayerName;