summaryrefslogtreecommitdiff
path: root/xmloff/source/text/txtvfldi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtvfldi.cxx')
-rw-r--r--xmloff/source/text/txtvfldi.cxx40
1 files changed, 24 insertions, 16 deletions
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 5a1f2255035e..7bc398e146c6 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -45,6 +45,7 @@
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <tools/debug.hxx>
@@ -1017,27 +1018,34 @@ void XMLDatabaseDisplayImportContext::EndElement()
if (xTextContent.is())
{
// insert, set field properties and exit!
- GetImportHelper().InsertTextContent(xTextContent);
+ try
+ {
+ GetImportHelper().InsertTextContent(xTextContent);
- // prepare field: format from database?
- bool bTmp = !aValueHelper.IsFormatOK();
- xField->setPropertyValue("DataBaseFormat", Any(bTmp));
+ // prepare field: format from database?
+ bool bTmp = !aValueHelper.IsFormatOK();
+ xField->setPropertyValue("DataBaseFormat", Any(bTmp));
- // value, value-type and format done by value helper
- aValueHelper.PrepareField(xField);
+ // value, value-type and format done by value helper
+ aValueHelper.PrepareField(xField);
- // visibility
- if( bDisplayOK )
- {
- xField->setPropertyValue(sAPI_is_visible, Any(bDisplay));
- }
+ // visibility
+ if( bDisplayOK )
+ {
+ xField->setPropertyValue(sAPI_is_visible, Any(bDisplay));
+ }
- // set presentation
- aAny <<= GetContent();
- xField->setPropertyValue(sAPI_current_presentation, aAny);
+ // set presentation
+ aAny <<= GetContent();
+ xField->setPropertyValue(sAPI_current_presentation, aAny);
- // success!
- return;
+ // success!
+ return;
+ }
+ catch (const lang::IllegalArgumentException& rException)
+ {
+ SAL_WARN("xmloff.text", "Failed to insert text content: " << rException.Message);
+ }
}
}
}