Fix SetDV for radiobutton

This commit is contained in:
Svetlana Kulikova
2025-12-10 15:23:40 +03:00
parent d7a1642a62
commit f75df05824
2 changed files with 10 additions and 1 deletions

View File

@ -2046,6 +2046,14 @@ namespace PdfWriter
else
pOwner->Add("V", new CStringObject(sV.c_str(), true));
}
void CCheckBoxWidget::SetDV(const std::wstring& wsDV)
{
std::string sValue = U_TO_UTF8(wsDV);
CDictObject* pOwner = GetObjOwnValue("DV");
if (!pOwner)
pOwner = this;
pOwner->Add("DV", sValue.c_str());
}
void CCheckBoxWidget::SetStyle(BYTE nStyle)
{
m_nStyle = ECheckBoxStyle(nStyle);

View File

@ -476,7 +476,7 @@ namespace PdfWriter
void SetMEOptions(const int& nMEOptions);
void SetTU(const std::wstring& wsTU);
void SetDS(const std::wstring& wsDS);
void SetDV(const std::wstring& wsDV);
virtual void SetDV(const std::wstring& wsDV);
void SetT (const std::wstring& wsT);
void SetBC(const std::vector<double>& arrBC);
void SetBG(const std::vector<double>& arrBG);
@ -555,6 +555,7 @@ namespace PdfWriter
CCheckBoxWidget(CXref* pXref, EWidgetType nSubtype = WidgetCheckbox);
void SetV(const std::wstring& wsV);
virtual void SetDV(const std::wstring& wsDV) override;
void SetOpt(const std::vector< std::pair<std::wstring, std::wstring> >& arrOpt);
void SetStyle(BYTE nStyle);
ECheckBoxStyle GetStyle() { return m_nStyle; }