summaryrefslogtreecommitdiff
path: root/sw/source/core/text/itrform2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/itrform2.cxx')
-rw-r--r--sw/source/core/text/itrform2.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index fad85e12337e..fdbd8ef28050 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -951,8 +951,13 @@ bool SwContentControlPortion::DescribePDFControl(const SwTextPaintInfo& rInf) co
pDescriptor = std::make_unique<vcl::PDFWriter::CheckBoxWidget>();
auto pCheckBoxWidget = static_cast<vcl::PDFWriter::CheckBoxWidget*>(pDescriptor.get());
pCheckBoxWidget->Checked = pContentControl->GetChecked();
- pCheckBoxWidget->OnValue = pContentControl->GetCheckedState();
- pCheckBoxWidget->OffValue = pContentControl->GetUncheckedState();
+ // If it is checked already, then leave the default "Yes" OnValue unchanged, so the
+ // appropriate appearance is found by PDF readers.
+ if (!pCheckBoxWidget->Checked)
+ {
+ pCheckBoxWidget->OnValue = pContentControl->GetCheckedState();
+ pCheckBoxWidget->OffValue = pContentControl->GetUncheckedState();
+ }
break;
}
case SwContentControlType::DROP_DOWN_LIST: