mirror of
https://gitee.com/openharmony/print_print_fwk
synced 2024-11-26 18:40:40 +00:00
:修复无边距问题; Signed-off-by:liuhaosu@huawei.com
Signed-off-by: 刘昊苏 <liuhaosu@huawei.com>
This commit is contained in:
parent
a657fb9842
commit
73ca8cc292
@ -1542,13 +1542,9 @@ void PrintCupsClient::UpdateBorderlessJobParameter(json& optionJson, JobParamete
|
||||
if (params == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (optionJson.contains("borderless") && optionJson["borderless"].is_string()) {
|
||||
std::string isBorderless = optionJson["borderless"].get<std::string>();
|
||||
if (isBorderless == "true") {
|
||||
params->borderless = TRUE;
|
||||
} else {
|
||||
params->borderless = FALSE;
|
||||
}
|
||||
if (optionJson.contains("isBorderless") && optionJson["isBorderless"].is_boolean()) {
|
||||
bool isBorderless = optionJson["isBorderless"].get<bool>();
|
||||
params->borderless = isBorderless ? TRUE : FALSE;
|
||||
} else {
|
||||
params->borderless = TRUE;
|
||||
}
|
||||
|
@ -186,6 +186,7 @@ ScanServiceAbility::~ScanServiceAbility()
|
||||
FREE_AND_NULLPTR(saneReadBuf);
|
||||
FREE_AND_NULLPTR(jpegbuf)
|
||||
DELETE_AND_NULLIFY(cinfoPtr);
|
||||
DELETE_AND_NULLIFY(ofp);
|
||||
SCAN_HILOGD("~ScanServiceAbility state_ is %{public}d.", static_cast<int>(state_));
|
||||
}
|
||||
|
||||
|
@ -514,11 +514,11 @@ HWTEST_F(PrintCupsWrapperTest, PrintCupsWrapperTest_0086, TestSize.Level1)
|
||||
printCupsClient.UpdateBorderlessJobParameter(optionJson, jobParams);
|
||||
jobParams = new JobParameters();
|
||||
printCupsClient.UpdateBorderlessJobParameter(optionJson, jobParams);
|
||||
optionJson["borderless"] = "false";
|
||||
optionJson["isBorderless"] = false;
|
||||
printCupsClient.UpdateBorderlessJobParameter(optionJson, jobParams);
|
||||
EXPECT_EQ(jobParams->borderless, 0);
|
||||
|
||||
optionJson["borderless"] = "true";
|
||||
optionJson["isBorderless"] = true;
|
||||
printCupsClient.UpdateBorderlessJobParameter(optionJson, jobParams);
|
||||
EXPECT_EQ(jobParams->borderless, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user