HGGitLab

Commit ce5bb50f authored by luoliangyi's avatar luoliangyi

解决文稿方向参数错误问题

parent 4bcadf11
...@@ -443,11 +443,11 @@ bool Manager::GetDevParam(const std::string& devId, DevParam& devParam) ...@@ -443,11 +443,11 @@ bool Manager::GetDevParam(const std::string& devId, DevParam& devParam)
else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("0°", stdValue.c_str())) else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("0°", stdValue.c_str()))
m_devParam.orentation = 0; m_devParam.orentation = 0;
else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("90°", stdValue.c_str())) else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("90°", stdValue.c_str()))
m_devParam.orentation = 1; m_devParam.orentation = 90;
else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("180°", stdValue.c_str())) else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("180°", stdValue.c_str()))
m_devParam.orentation = 2; m_devParam.orentation = 180;
else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("-90°", stdValue.c_str())) else if (0 == strcmp("文稿方向", title.c_str()) && 0 == strcmp("-90°", stdValue.c_str()))
m_devParam.orentation = 3; m_devParam.orentation = 270;
else if (0 == strcmp("纸张尺寸", title.c_str()) && 0 == strcmp("匹配原始尺寸", stdValue.c_str())) else if (0 == strcmp("纸张尺寸", title.c_str()) && 0 == strcmp("匹配原始尺寸", stdValue.c_str()))
m_devParam.paperType = "Auto"; m_devParam.paperType = "Auto";
else if (0 == strcmp("纸张尺寸", title.c_str()) && 0 == strcmp("A3", stdValue.c_str())) else if (0 == strcmp("纸张尺寸", title.c_str()) && 0 == strcmp("A3", stdValue.c_str()))
...@@ -559,11 +559,11 @@ bool Manager::SetDevParam(const std::string& devId, const DevParam& devParam) ...@@ -559,11 +559,11 @@ bool Manager::SetDevParam(const std::string& devId, const DevParam& devParam)
{ {
char value[256] = { 0 }; char value[256] = { 0 };
strcpy(value, "0°"); strcpy(value, "0°");
if (1 == m_devParam.orentation) if (90 == m_devParam.orentation)
strcpy(value, "90°"); strcpy(value, "90°");
else if (2 == m_devParam.orentation) else if (180 == m_devParam.orentation)
strcpy(value, "180°"); strcpy(value, "180°");
else if (3 == m_devParam.orentation) else if (270 == m_devParam.orentation)
strcpy(value, "-90°"); strcpy(value, "-90°");
sane_control_option(m_devHandle, i, SANE_ACTION_SET_VALUE, (void*)(StdStringToUtf8(value).c_str()), NULL); sane_control_option(m_devHandle, i, SANE_ACTION_SET_VALUE, (void*)(StdStringToUtf8(value).c_str()), NULL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment