From 6e69d9b8661073131274fc2d6a4499a696dd7b3b Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 1 Mar 2015 16:42:15 +0100 Subject: make this a bit less cryptic Change-Id: I800735cf4dd10af8e6cd2e2581b18bcb71eb2872 --- xmloff/source/forms/elementexport.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 61f7ae2f2a90..2f0f375e3167 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -172,8 +172,14 @@ namespace xmloff else if (sServiceName == SERVICE_PERSISTENT_COMPONENT_##name) \ sToWriteServiceName = SERVICE_##name - if (false) - ; + if (sServiceName == SERVICE_PERSISTENT_COMPONENT_EDIT) + { + // special handling for the edit field: we have two controls using this as persistence service name + sToWriteServiceName = SERVICE_EDIT; + Reference< XServiceInfo > xSI(m_xProps, UNO_QUERY); + if (xSI.is() && xSI->supportsService(SERVICE_FORMATTEDFIELD)) + sToWriteServiceName = SERVICE_FORMATTEDFIELD; + } CHECK_N_TRANSLATE( FORM ); CHECK_N_TRANSLATE( LISTBOX ); CHECK_N_TRANSLATE( COMBOBOX ); @@ -193,14 +199,6 @@ namespace xmloff CHECK_N_TRANSLATE( HIDDENCONTROL ); CHECK_N_TRANSLATE( IMAGECONTROL ); CHECK_N_TRANSLATE( FORMATTEDFIELD ); - else if (sServiceName == SERVICE_PERSISTENT_COMPONENT_EDIT) - { - // special handling for the edit field: we have two controls using this as persistence service name - sToWriteServiceName = SERVICE_EDIT; - Reference< XServiceInfo > xSI(m_xProps, UNO_QUERY); - if (xSI.is() && xSI->supportsService(SERVICE_FORMATTEDFIELD)) - sToWriteServiceName = SERVICE_FORMATTEDFIELD; - } #if OSL_DEBUG_LEVEL > 0 Reference< XServiceInfo > xSI(m_xProps, UNO_QUERY); OSL_ENSURE(xSI.is() && xSI->supportsService(sToWriteServiceName), -- cgit v1.2.3