在SANE组件中处理第三方SANE-APP定义的与华高参数不一致的属性

This commit is contained in:
gb 2022-05-23 11:53:41 +08:00
parent fae66649fb
commit e7f445e179
6 changed files with 16 additions and 25 deletions

View File

@ -194,7 +194,7 @@
},
"18": {
"category": "base",
"name": "source",
"name": "cfg-18",
"title": "纸张尺寸",
"desc": "设置纸张大小",
"type": "string",
@ -276,7 +276,7 @@
},
"24": {
"category": "base",
"name": "duplex",
"name": "cfg-24",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",

View File

@ -194,7 +194,7 @@
},
"18": {
"category": "base",
"name": "source",
"name": "cfg-18",
"title": "纸张尺寸",
"desc": "设置纸张大小",
"type": "string",
@ -287,7 +287,7 @@
},
"25": {
"category": "base",
"name": "duplex",
"name": "cfg-25",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",

View File

@ -194,7 +194,7 @@
},
"18": {
"category": "base",
"name": "source",
"name": "cfg-18",
"title": "纸张尺寸",
"desc": "设置纸张大小",
"type": "string",
@ -287,7 +287,7 @@
},
"25": {
"category": "base",
"name": "duplex",
"name": "cfg-25",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",

View File

@ -194,7 +194,7 @@
},
"18": {
"category": "base",
"name": "source",
"name": "cfg-18",
"title": "纸张尺寸",
"desc": "设置纸张大小",
"type": "string",
@ -287,7 +287,7 @@
},
"25": {
"category": "base",
"name": "duplex",
"name": "cfg-25",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",

View File

@ -6253,29 +6253,20 @@ void* ChgjsonDlg::create_json(int item, std::vector<DEFH>* def_h)
int prefer_size = 0;
jsn->set_value(L"category", hg_items_[item].advanced ? L"advanced" : L"base");
if (hg_items_[item].title == L"\u81EA\u5B9A\u4E49\u4F3D\u739B")
{
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CUSTOM_GAMMA).c_str());
prefer_size = 3 * 256 * sizeof(SANE_Int);
}
else if (hg_items_[item].title == L"\u7EB8\u5F20\u5C3A\u5BF8")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_PAPER).c_str());
else if (hg_items_[item].title == L"\u626B\u63CF\u9875\u9762")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_PAGE).c_str());
else if (hg_items_[item].title == L"\u5206\u8FA8\u7387")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_RESOLUTION).c_str());
if (hg_items_[item].title == L"\u5206\u8FA8\u7387")
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_RESOLUTION).c_str());
else if (hg_items_[item].title == L"\u4EAE\u5EA6\u503C")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_BRIGHTNESS).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_BRIGHTNESS).c_str());
else if (hg_items_[item].title == L"\u5BF9\u6BD4\u5EA6")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CONTRAST).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_CONTRAST).c_str());
else if (hg_items_[item].title == L"\u626B\u63CF\u533A\u57DF\u5DE6\u4FA7\uFF08mm\uFF09")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CUSTOM_AREA_LEFT).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_CUSTOM_AREA_LEFT).c_str());
else if (hg_items_[item].title == L"\u626B\u63CF\u533A\u57DF\u4E0A\u4FA7\uFF08mm\uFF09")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CUSTOM_AREA_TOP).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_CUSTOM_AREA_TOP).c_str());
else if (hg_items_[item].title == L"\u626B\u63CF\u533A\u57DF\u53F3\u4FA7\uFF08mm\uFF09")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CUSTOM_AREA_RIGHT).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_CUSTOM_AREA_RIGHT).c_str());
else if (hg_items_[item].title == L"\u626B\u63CF\u533A\u57DF\u4E0B\u4FA7\uFF08mm\uFF09")
jsn->set_value(L"name", coding::a2u(KNOWN_OPT_NAME_CUSTOM_AREA_BOTTOM).c_str());
jsn->set_value(L"name", coding::a2u(SANE_STD_OPT_NAME_CUSTOM_AREA_BOTTOM).c_str());
else
{
swprintf_s(buf, _countof(buf) - 1, L"cfg-%d", hg_items_[item].index);

Binary file not shown.