diff options
Diffstat (limited to 'toolkit/source/helper/formpdfexport.cxx')
-rw-r--r-- | toolkit/source/helper/formpdfexport.cxx | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx index 9061d3ec7bce..7e762a9ff152 100644 --- a/toolkit/source/helper/formpdfexport.cxx +++ b/toolkit/source/helper/formpdfexport.cxx @@ -314,10 +314,18 @@ namespace toolkitform Any aText; static constexpr OUStringLiteral FM_PROP_TEXT = u"Text"; static constexpr OUStringLiteral FM_PROP_LABEL = u"Label"; + static constexpr OUStringLiteral FM_PROP_VALUE = u"Value"; if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) ) aText = xModelProps->getPropertyValue( FM_PROP_TEXT ); else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) aText = xModelProps->getPropertyValue( FM_PROP_LABEL ); + else if ( xPSI->hasPropertyByName( FM_PROP_VALUE ) ) + { + double aValue; + if (xModelProps->getPropertyValue( FM_PROP_VALUE ) >>= aValue) + aText <<= OUString::number(aValue); + } + if ( aText.hasValue() ) { if( ! (aText >>= Descriptor->Text) ) { SAL_WARN("toolkit.helper", "describePDFControl: unable to assign aText to Descriptor->Text"); @@ -564,6 +572,22 @@ namespace toolkitform if( ! (xModelProps->getPropertyValue( FM_PROP_STATE ) >>= nState) ) SAL_WARN("toolkit.helper", "describePDFControl: unable to get property " << FM_PROP_STATE); pCheckBoxWidget->Checked = ( nState != 0 ); + + try + { + xModelProps->getPropertyValue( "RefValue" ) >>= pCheckBoxWidget->OnValue; + } + catch(...) + { + } + + try + { + xModelProps->getPropertyValue( "SecondaryRefValue" ) >>= pCheckBoxWidget->OffValue; + } + catch(...) + { + } } @@ -582,7 +606,14 @@ namespace toolkitform } catch(...) { - pRadioWidget->OnValue = "On"; + } + + try + { + xModelProps->getPropertyValue( "SecondaryRefValue" ) >>= pRadioWidget->OffValue; + } + catch(...) + { } } |