[Libreoffice-commits] core.git: Branch 'feature/fastparser' - 7772 commits - accessibility/inc accessibility/source android/Bootstrap android/CustomTarget_android_desktop.mk android/CustomTarget_lo_android.mk android/experimental android/.gitignore android/Makefile android/mobile-config.py android/README android/source animations/Library_animcore.mk animations/source autogen.sh avmedia/inc avmedia/Library_avmediagst_0_10.mk avmedia/Library_avmediagst.mk avmedia/Library_avmediavlc.mk avmedia/source avmedia/util basctl/inc basctl/source basebmp/source basebmp/test basegfx/inc basegfx/Library_basegfx.mk basegfx/qa basegfx/source basegfx/test basic/inc basic/qa basic/source bean/com bean/native bean/qa bean/test binaryurp/source bin/benchmark-document-loading bin/convwatch.py bin/find-german-comments bin/findunusedcode bin/gbuild-to-ide bin/get-bugzilla-attachments-by-mimetype bin/includebloat.awk bin/lint-ui.py bin/lo-commit-stat bin/lo-generate-source-tarball bin/lo-pack-sources bin/lo-xlate-lang b in/module-deps.pl bin/rename-sw-abbreviations.sh bin/run bin/update_pch.sh bridges/inc bridges/Library_cpp_uno.mk bridges/source bridges/test canvas/Library_cairocanvas.mk canvas/source chart2/CppunitTest_chart2_trendcalculators.mk chart2/inc chart2/Library_chartcontroller.mk chart2/Module_chart2.mk chart2/qa chart2/README chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk chart2/workbench cli_ure/source codemaker/source comphelper/inc comphelper/Library_comphelper.mk comphelper/qa comphelper/source compilerplugins/clang config_host/config_cairo_canvas.h.in config_host/config_cups.h.in config_host/config_dconf.h.in config_host/config_extension_update.h.in config_host/config_features.h.in config_host/config_global.h.in config_host/config_java.h.in config_host/config_liblangtag.h.in config_host/config_opengl.h.in config_host/config_poppler.h.in config_host_lang.mk.in config_host.mk.in configmgr/CppunitTest_configmgr_unit.mk configmgr/inc configmgr/Library_configmgr.mk configmgr/q a configmgr/source configure.ac connectivity/CppunitTest_connectivity_ado.mk connectivity/CppunitTest_connectivity_commontools.mk connectivity/inc connectivity/Jar_ConnectivityTools.mk connectivity/Library_ado.mk connectivity/Library_dbase.mk connectivity/Library_dbtools.mk connectivity/Library_tdeab1.mk connectivity/Library_tdeabdrv1.mk connectivity/qa connectivity/source connectivity/workben cppcanvas/inc cppcanvas/qa cppcanvas/source cppuhelper/inc cppuhelper/qa cppuhelper/source cppuhelper/test cppu/qa cppu/source cpputools/source cui/inc cui/source cui/uiconfig dbaccess/CppunitTest_dbaccess_RowSetClones.mk dbaccess/inc dbaccess/JunitTest_dbaccess_complex.mk dbaccess/Library_dbaxml.mk dbaccess/qa dbaccess/source desktop/CppunitTest_desktop_version.mk desktop/inc desktop/Library_deploymentgui.mk desktop/Library_sofficeapp.mk desktop/Module_desktop.mk desktop/Pagein_common.mk desktop/scripts desktop/source desktop/test desktop/unx dictionaries distro-configs/LibreOfficeLinux.conf download.lst drawinglayer/Library_drawinglayer.mk drawinglayer/source dtrans/source dtrans/test editeng/CustomTarget_generated.mk editeng/inc editeng/Library_editeng.mk editeng/Module_editeng.mk editeng/source embeddedobj/Library_emboleobj.mk embeddedobj/source embeddedobj/test embedserv/Library_emser.mk embedserv/source eventattacher/source extensions/Library_oleautobridge.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/qa extensions/source extensions/test extensions/uiconfig extensions/workben external/boost external/coinmp external/ct2n external/curl external/expat external/firebird external/glew external/graphite external/harfbuzz external/hunspell external/icu external/jfreereport external/lcms2 external/libcmis external/libetonyek external/libexttextcat external/libfreehand external/libmwaw external/libodfgen external/liborcus external/librevenge external/libwpd external/libwpg external/libwps external/libxml2 external/libxslt external/mdds external/Module_external.mk external/neon external/np_sdk external/nss external/openssl external/owncloud-android-lib external/poppler external/python3 external/redland extras/Module_extras.mk extras/Package_palettes.mk extras/Package_tpl_styles.mk extras/source filter/Configuration_filter.mk filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source forms/JunitTest_forms_unoapi_1.mk forms/JunitTest_forms_unoapi_2.mk forms/JunitTest_forms_unoapi_3.mk forms/JunitTest_forms_unoapi_4.mk forms/JunitTest_forms_unoapi.mk forms/Library_frm.mk forms/Module_forms.mk forms/qa forms/source formula/Library_for.mk formula/source fpicker/source fpicker/test framework/inc framework/Library_fwk.mk framework/qa framework/source framework/util g .git-hooks/pre-commit .gitignore helpcompiler/Executable_helpindexer.mk helpcompiler/Executable_HelpIndexer.mk helpcompiler/Executable_helplinker.mk helpcompiler/Executable_HelpLinker.mk helpcompiler/inc helpcompiler/Module_helpcompile r.mk helpcompiler/source helpcontent2 hwpfilter/qa hwpfilter/source i18nlangtag/qa i18nlangtag/source i18npool/CustomTarget_collator.mk i18npool/CustomTarget_localedata.mk i18npool/inc i18npool/Library_i18npool.mk i18npool/Library_localedata_en.mk i18npool/Library_localedata_euro.mk i18npool/Library_localedata_others.mk i18npool/qa i18npool/source i18nutil/source icon-themes/breeze icon-themes/classic icon-themes/crystal icon-themes/galaxy icon-themes/hicontrast icon-themes/human icon-themes/industrial icon-themes/oxygen icon-themes/sifr icon-themes/tango icon-themes/tango_testing idlc/inc idlc/source idlc/test idl/inc idl/source include/avmedia include/basebmp include/basegfx include/basic include/canvas include/com include/comphelper include/connectivity include/cppcanvas include/cppu include/cppuhelper include/dbaccess include/drawinglayer include/editeng include/filter include/formula include/framework include/helpcompiler include/i18nlangtag include/jvmfwk include/LibreOfficeKi t include/linguistic include/o3tl include/oox include/osl include/package include/postwin.h include/registry include/rtl include/sal include/sax include/sfx2 include/sot include/store include/svl include/svtools include/svx include/test include/toolkit include/tools include/touch include/typelib include/ucbhelper include/uno include/unotest include/unotools include/vbahelper include/vcl include/writerperfect include/xmloff include/xmlscript instsetoo_native/CustomTarget_install.mk instsetoo_native/CustomTarget_setup.mk instsetoo_native/inc_openoffice instsetoo_native/util ios/CustomTarget_LibreOffice_app.mk ios/CustomTarget_MobileLibreOffice_app.mk ios/experimental ios/MobileLibreOffice io/source ios/shared io/test javaunohelper/com javaunohelper/source javaunohelper/test jurt/com jurt/test jvmfwk/distributions jvmfwk/inc jvmfwk/plugins jvmfwk/source l10ntools/inc l10ntools/source Library_merged.mk Library_urelibs.mk librelogo/source libreofficekit/CppunitTest_libreofficekit_tiledre ndering.mk libreofficekit/Executable_gtktiledviewer.mk libreofficekit/Library_libreofficekitgtk.mk libreofficekit/Module_libreofficekit.mk libreofficekit/qa libreofficekit/README libreofficekit/source lingucomponent/source linguistic/source logerrit lotuswordpro/inc lotuswordpro/qa lotuswordpro/source Makefile.fetch Makefile.in mysqlc/Library_mysqlc.mk mysqlc/source nlpsolver/ThirdParty o3tl/qa odk/config odk/CustomTarget_doxygen.mk odk/docs odk/examples odk/index.html odk/index_online.html odk/README odk/source offapi/com offapi/org offapi/type_reference offapi/UnoApi_offapi.mk officecfg/Configuration_officecfg.mk officecfg/registry onlineupdate/Executable_mar.mk onlineupdate/Executable_updater.mk onlineupdate/Makefile onlineupdate/Module_onlineupdate.mk onlineupdate/README onlineupdate/source oox/inc oox/README oox/source opencl/inc opencl/source package/inc package/qa package/source postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk postprocess/CustomTarget_s igning.mk postprocess/qa postprocess/Rdb_services.mk pyuno/inc pyuno/Library_pyuno.mk pyuno/Module_pyuno.mk pyuno/PythonTest_pytests.mk pyuno/PythonTest_pyuno_pytests_testcollections.mk pyuno/qa pyuno/source pyuno/zipcore qadevOOo/qa qadevOOo/runner qadevOOo/testdocs qadevOOo/tests readlicense_oo/license readlicense_oo/Package_files.mk README.Android README.Code README.cross README.md README.Solaris registry/Executable_regview.mk registry/inc registry/Library_reg.mk registry/source registry/test registry/tools registry/workben remotebridges/source reportbuilder/java reportdesign/inc reportdesign/Library_rptxml.mk reportdesign/qa reportdesign/source reportdesign/uiconfig RepositoryExternal.mk Repository.mk RepositoryModule_host.mk ridljar/com rsc/inc rsc/Module_rsc.mk rsc/source sal/android sal/cpprt sal/cppunittester salhelper/test sal/inc sal/Library_sal.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/textenc sal/util sal/workben sax/inc sax/qa sax/source sax/test scaddins/Library_ analysis.mk scaddins/source sc/AllLangResTarget_sc.mk sccomp/source sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_condformats.mk sc/CppunitTest_sc_copypaste.mk sc/CppunitTest_sc_new_cond_format_api.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/inc sc/JunitTest_sc_complex.mk sc/JunitTest_sc_unoapi_1.mk sc/JunitTest_sc_unoapi_2.mk sc/JunitTest_sc_unoapi_3.mk sc/JunitTest_sc_unoapi_4.mk sc/JunitTest_sc_unoapi_5.mk sc/JunitTest_sc_unoapi_6.mk sc/JunitTest_sc_unoapi_7.mk sc/JunitTest_sc_unoapi.mk sc/Library_scd.mk sc/Library_scfilt.mk sc/Library_sc.mk sc/Module_sc.mk scp2/AutoInstall.mk scp2/inc scp2/source sc/qa sc/README scripting/examples scripting/java scripting/Library_vbaevents.mk scripting/source sc/sdi sc/source sc/uiconfig sc/util sc/workben sd/CppunitTest_sd_export_tests.mk sd/CppunitTest_sd_import_tests.mk sd/CppunitTest_sd_tiledrendering.mk sdext/README sdext/source sd/inc sd/Library_sdd.mk sd/Library_sd.mk sd/Module_sd.mk sd/qa sd/sdi sd/source sd/uiconfig s d/util setup_native/Library_sellangmsi.mk setup_native/Library_shlxtmsi.mk setup_native/scripts setup_native/source sfx2/CppunitTest_sfx2_controlleritem.mk sfx2/inc sfx2/JunitTest_sfx2_complex.mk sfx2/Library_sfx.mk sfx2/Module_sfx2.mk sfx2/PythonTest_sfx2_python.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig shell/inc shell/Library_ooofilt.mk shell/Library_ooofilt_x64.mk shell/Library_propertyhdl.mk shell/Library_propertyhdl_x64.mk shell/Library_shlxthdl.mk shell/Library_shlxthdl_x64.mk shell/Library_tdebe.mk shell/source shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk slideshow/qa slideshow/source slideshow/test smoketest/com smoketest/data smoketest/Module_smoketest.mk smoketest/org solenv/bin solenv/gbuild solenv/gcc-wrappers solenv/gdb solenv/README soltools/cpp soltools/mkdepend sot/inc sot/qa sot/source sot/workben starmath/inc starmath/Library_sm.mk starmath/qa starmath/sdi starmath/source starmath/uiconfig starmath/UIConfig_smath.mk starmath/util stoc/source stoc/test store/source svgio/inc svgio/qa svgio/source svl/inc svl/Library_svl.mk svl/qa svl/README svl/source svl/unx svl/util svtools/inc svtools/langsupport svtools/qa svtools/source svtools/uiconfig svx/Executable_pixelctl.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/README svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/workben sw/CppunitTest_sw_docbookexport.mk sw/CppunitTest_sw_ooxmlexport6.mk sw/CppunitTest_sw_ooxmlexport7.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_ooxmlsdrexport.mk sw/CppunitTest_sw_tiledrendering.mk sw/CppunitTest_sw_uwriter.mk sw/CustomTarget_generated.mk sw/Executable_tiledrendering.mk swext/mediawiki sw/inc sw/JunitTest_sw_unoapi_1.mk sw/JunitTest_sw_unoapi_2.mk sw/JunitTest_sw_unoapi_3.mk sw/JunitTest_sw_unoapi_4.mk sw/JunitTest_sw_unoapi.mk sw/Library_sw.mk sw/Library_swui.mk sw/Module_sw.mk sw/ooxmlexport_setup.mk sw/qa sw/README sw/sdi sw/source sw/uiconfig sw/UIConfig_qa.mk sw/UIConfig_swrite r.mk sw/util sysui/desktop sysui/productlist.mk test/source testtools/com testtools/source toolkit/inc toolkit/JunitTest_toolkit_unoapi_1.mk toolkit/JunitTest_toolkit_unoapi_2.mk toolkit/JunitTest_toolkit_unoapi_3.mk toolkit/JunitTest_toolkit_unoapi_4.mk toolkit/JunitTest_toolkit_unoapi.mk toolkit/Library_tk.mk toolkit/Module_toolkit.mk toolkit/qa toolkit/source toolkit/test tools/CppunitTest_tools_test.mk tools/inc tools/Library_tl.mk tools/qa tools/source translations tubes/source ucbhelper/source ucb/qa ucb/source ucb/test udkapi/com udkapi/type_reference UnoControls/inc UnoControls/source unodevtools/source unoidl/source unotest/source unotools/qa unotools/source unoxml/qa unoxml/source unusedcode.easy uui/source uui/uiconfig vbahelper/source vcl/android vcl/CppunitTest_vcl_bitmap_test.mk vcl/CppunitTest_vcl_lifecycle.mk vcl/Executable_mtfdemo.mk vcl/Executable_outdevgrind.mk vcl/Executable_svdemo.mk vcl/Executable_svpclient.mk vcl/Executable_svptest.mk vcl/Executable_tdefilepic ker.mk vcl/Executable_vcldemo.mk vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3.mk vcl/Library_vclplug_svp.mk vcl/Library_vclplug_tde.mk vcl/Module_vcl.mk vcl/null vcl/opengl vcl/osx vcl/Package_opengl_blacklist.mk vcl/qa vcl/quartz vcl/README vcl/README.GDIMetaFile vcl/README.lifecycle vcl/source vcl/unx vcl/win vcl/WinResTarget_vcl.mk vcl/workben winaccessibility/inc winaccessibility/Library_uacccom.mk winaccessibility/source wizards/com wizards/Jar_commonwizards.mk wizards/source writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/documentation writerfilter/inc writerfilter/qa writerfilter/source writerperfect/CppunitTest_writerperfect_stream.mk writerperfect/inc writerperfect/Library_wpftcalc.mk writerperfect/Library_wpftdraw.mk writerperfect/Library_wpftimpress.mk writerperfect/Library_wpftwriter.mk writerperfect/Library_writerperfect.mk writerperfect/Module_writerperfect.mk writerperfect/qa writerperfect /source writerperfect/uiconfig writerperfect/UIConfig_writerperfect.mk xmerge/source xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/CppunitTest_xmloff_tokenmap.mk xmloff/CustomTarget_generated.mk xmloff/dtd xmloff/inc xmloff/Library_xo.mk xmloff/Module_xmloff.mk xmloff/qa xmloff/source xmlscript/source xmlsecurity/inc xmlsecurity/source xmlsecurity/workben

Daniel Sikeler d.sikeler94 at gmail.com
Sun Nov 1 04:57:32 PST 2015


Rebased ref, commits from common ancestor:
commit 6d33827940ea2959fdd67d7ced1d152b2c6605c8
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Sat Oct 3 15:57:31 2015 +0200

    fastparser impl. for ...
    
    ... XMLTextFieldImportContext::CreateTextFieldImportContext
    
    Change-Id: I8a71dc2c712b8c12fc02b0211cd98319877bc61b

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 171cd33..bd0d713 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -166,6 +166,11 @@ public:
         sal_uInt16 nPrefix,
         const OUString& rName,
         sal_uInt16 nToken);
+    static XMLTextFieldImportContext* CreateTextFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element,
+        sal_uInt16 nToken);
 
 protected:
     /// get helper
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 88cdc5e..f08490f 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -670,6 +670,252 @@ XMLTextFieldImportContext::CreateTextFieldImportContext(
     return pContext;
 }
 
+/// create the appropriate field context from
+XMLTextFieldImportContext*
+XMLTextFieldImportContext::CreateTextFieldImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element,
+    sal_uInt16 nToken)
+{
+    XMLTextFieldImportContext* pContext = NULL;
+
+    switch (nToken)
+    {
+        case XML_TOK_TEXT_SENDER_FIRSTNAME:
+        case XML_TOK_TEXT_SENDER_LASTNAME:
+        case XML_TOK_TEXT_SENDER_INITIALS:
+        case XML_TOK_TEXT_SENDER_TITLE:
+        case XML_TOK_TEXT_SENDER_POSITION:
+        case XML_TOK_TEXT_SENDER_EMAIL:
+        case XML_TOK_TEXT_SENDER_PHONE_PRIVATE:
+        case XML_TOK_TEXT_SENDER_FAX:
+        case XML_TOK_TEXT_SENDER_COMPANY:
+        case XML_TOK_TEXT_SENDER_PHONE_WORK:
+        case XML_TOK_TEXT_SENDER_STREET:
+        case XML_TOK_TEXT_SENDER_CITY:
+        case XML_TOK_TEXT_SENDER_POSTAL_CODE:
+        case XML_TOK_TEXT_SENDER_COUNTRY:
+        case XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE:
+            pContext =
+                new XMLSenderFieldImportContext( rImport, rHlp, Element, nToken );
+            break;
+
+        case XML_TOK_TEXT_AUTHOR_NAME:
+        case XML_TOK_TEXT_AUTHOR_INITIALS:
+            pContext =
+                new XMLAuthorFieldImportContext( rImport, rHlp, Element, nToken );
+            break;
+
+        case XML_TOK_TEXT_PLACEHOLDER:
+            pContext =
+                new XMLPlaceholderFieldImportContext( rImport, rHlp, Element);
+            break;
+        case XML_TOK_TEXT_SEQUENCE:
+            pContext =
+                new XMLSequenceFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_TEXT_INPUT:
+            pContext =
+                new XMLTextInputFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_EXPRESSION:
+            pContext =
+                new XMLExpressionFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_VARIABLE_SET:
+            pContext =
+                new XMLVariableSetFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_VARIABLE_INPUT:
+            pContext =
+                new XMLVariableInputFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_VARIABLE_GET:
+            pContext =
+                new XMLVariableGetFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_USER_FIELD_GET:
+            pContext = new XMLUserFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_USER_FIELD_INPUT:
+            pContext = new XMLUserFieldInputImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_TIME:
+            pContext = new XMLTimeFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_PAGE_CONTINUATION_STRING:
+        case XML_TOK_TEXT_PAGE_CONTINUATION:
+            pContext = new XMLPageContinuationImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_PAGE_NUMBER:
+            pContext = new XMLPageNumberImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_DATE:
+            pContext = new XMLDateFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_DATABASE_NAME:
+            pContext = new XMLDatabaseNameImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DATABASE_NEXT:
+            pContext = new XMLDatabaseNextImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DATABASE_SELECT:
+            pContext = new XMLDatabaseSelectImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DATABASE_ROW_NUMBER:
+            pContext = new XMLDatabaseNumberImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DATABASE_DISPLAY:
+            pContext = new XMLDatabaseDisplayImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_CONDITIONAL_TEXT:
+            pContext = new XMLConditionalTextImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_HIDDEN_TEXT:
+            pContext = new XMLHiddenTextImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_HIDDEN_PARAGRAPH:
+            pContext = new XMLHiddenParagraphImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DOCUMENT_DESCRIPTION:
+        case XML_TOK_TEXT_DOCUMENT_TITLE:
+        case XML_TOK_TEXT_DOCUMENT_SUBJECT:
+        case XML_TOK_TEXT_DOCUMENT_KEYWORDS:
+            pContext = new XMLSimpleDocInfoImportContext( rImport, rHlp,
+                                                          Element, nToken,
+                                                          true, false );
+            break;
+        case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR:
+        case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR:
+        case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR:
+            pContext = new XMLSimpleDocInfoImportContext( rImport, rHlp,
+                                                          Element, nToken,
+                                                          false, true );
+            break;
+
+        case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
+        case XML_TOK_TEXT_DOCUMENT_CREATION_TIME:
+        case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
+        case XML_TOK_TEXT_DOCUMENT_PRINT_TIME:
+        case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
+        case XML_TOK_TEXT_DOCUMENT_SAVE_TIME:
+        case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
+            pContext = new XMLDateTimeDocInfoImportContext( rImport, rHlp,
+                                                            Element, nToken );
+            break;
+
+        case XML_TOK_TEXT_DOCUMENT_REVISION:
+            pContext = new XMLRevisionDocInfoImportContext( rImport, rHlp,
+                                                            Element, nToken );
+            break;
+
+        case XML_TOK_TEXT_DOCUMENT_USER_DEFINED:
+            pContext = new XMLUserDocInfoImportContext( rImport, rHlp,
+                                                        Element, nToken );
+            break;
+
+        case XML_TOK_TEXT_FILENAME:
+            pContext = new XMLFileNameImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_CHAPTER:
+            pContext = new XMLChapterImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_TEMPLATENAME:
+            pContext = new XMLTemplateNameImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_WORD_COUNT:
+        case XML_TOK_TEXT_PARAGRAPH_COUNT:
+        case XML_TOK_TEXT_TABLE_COUNT:
+        case XML_TOK_TEXT_CHARACTER_COUNT:
+        case XML_TOK_TEXT_IMAGE_COUNT:
+        case XML_TOK_TEXT_OBJECT_COUNT:
+        case XML_TOK_TEXT_PAGE_COUNT:
+            pContext = new XMLCountFieldImportContext( rImport, rHlp,
+                                                       Element, nToken);
+            break;
+
+        case XML_TOK_TEXT_GET_PAGE_VAR:
+            pContext = new XMLPageVarGetFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_SET_PAGE_VAR:
+            pContext = new XMLPageVarSetFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_MACRO:
+            pContext = new XMLMacroFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_DDE:
+            pContext = new XMLDdeFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_REFERENCE_REF:
+        case XML_TOK_TEXT_BOOKMARK_REF:
+        case XML_TOK_TEXT_NOTE_REF:
+        case XML_TOK_TEXT_SEQUENCE_REF:
+            pContext = new XMLReferenceFieldImportContext( rImport, rHlp,
+                                                           nToken, Element );
+            break;
+
+        case XML_TOK_TEXT_SHEET_NAME:
+            pContext = new XMLSheetNameImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_PAGE_NAME:
+            pContext = new XMLPageNameFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_BIBLIOGRAPHY_MARK:
+            pContext = new XMLBibliographyFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_ANNOTATION:
+        case XML_TOK_TEXT_ANNOTATION_END:
+            pContext = new XMLAnnotationImportContext( rImport, rHlp,
+                                                       nToken, Element );
+            break;
+
+        case XML_TOK_TEXT_SCRIPT:
+            pContext = new XMLScriptImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_MEASURE:
+            pContext = new XMLMeasureFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        case XML_TOK_TEXT_TABLE_FORMULA:
+            pContext = new XMLTableFormulaImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_TEXT_DROP_DOWN:
+            pContext = new XMLDropDownFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_DRAW_HEADER:
+            pContext = new XMLHeaderFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_DRAW_FOOTER:
+            pContext = new XMLFooterFieldImportContext( rImport, rHlp, Element );
+            break;
+        case XML_TOK_DRAW_DATE_TIME:
+            pContext = new XMLDateTimeFieldImportContext( rImport, rHlp, Element );
+            break;
+
+        default:
+            // ignore! May not even be a textfield.
+            // (Reminder: This method is called inside default:-branch)
+            pContext = NULL;
+            break;
+    }
+
+    return pContext;
+}
 
 void XMLTextFieldImportContext::ForceUpdate(
     const Reference<XPropertySet> & rPropertySet)
commit 657cbc1993ed39d6fd96009dd89c95286385cbc9
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Sat Oct 3 11:24:06 2015 +0200

    fastparser impl. for XMLPageNameFieldImportContext
    
    Change-Id: I33c1f51728a2bfec47c32233ec7a0c1d1f01b2db

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 08705b8..171cd33 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1298,6 +1298,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLPageNameFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 6d16d70..88cdc5e 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -4118,6 +4118,14 @@ XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(
     bValid = true;
 }
 
+XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_pagename, Element)
+{
+    bValid = true;
+}
+
 /// process attribute values
 void XMLPageNameFieldImportContext::ProcessAttribute( sal_uInt16,
                                    const OUString& )
commit 871922d46b3e695a0c8a5098633367a35cb7ee5a
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Sat Oct 3 11:05:44 2015 +0200

    fastparser impl. for XMLCustomPropertyFieldImportContext
    
    but there is only a declaration no implementation.
    
    Change-Id: I2aa38bed7ce3ce2c3aa3028c7275558dc937fbd8

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 62be88b..08705b8 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1641,6 +1641,9 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLCustomPropertyFieldImportContext(SvXMLImport& rImport,
+                                        XMLTextImportHelper& rHlp,
+                                        sal_Int32 Element);
 
 protected:
     /// process attribute values
commit 93cc62eb3c094f0458aeb7531cdd74c8ad6e563a
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Sat Oct 3 10:59:18 2015 +0200

    fastparser impl. for XMLSenderFieldImportContext
    
    and subclass
    
    Change-Id: Ibaaa91147a63b22c60e260e18ee9d48f17460111

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index fd83b88..62be88b 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -220,12 +220,20 @@ public:
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName,      /// element name w/o prefix
         sal_uInt16 nToken);                     /// element token
+    XMLSenderFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element,
+        sal_uInt16 nToken);
 
 protected:
     /// start element
     virtual void StartElement(
         const ::com::sun::star::uno::Reference<
         ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
+    virtual void startFastElement( sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
@@ -255,12 +263,20 @@ public:
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName,      /// element name w/o prefix
         sal_uInt16 nToken);                     /// element token
+    XMLAuthorFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element,
+        sal_uInt16 nToken);
 
 protected:
     /// start element
     virtual void StartElement(
         const ::com::sun::star::uno::Reference<
         ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
+    virtual void startFastElement( sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// prepare XTextField for insertion into document
     virtual void PrepareField(
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 3e27e3a..6d16d70 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -708,6 +708,19 @@ XMLSenderFieldImportContext::XMLSenderFieldImportContext(
 {
 }
 
+XMLSenderFieldImportContext::XMLSenderFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_extended_user, Element),
+    nSubType(0),
+    sPropertyFixed(sAPI_is_fixed),
+    sPropertyFieldSubType(sAPI_user_data_type),
+    sPropertyContent(sAPI_content),
+    bFixed(true),
+    nElementToken(nToken)
+{
+}
+
 void XMLSenderFieldImportContext::StartElement(
     const Reference<XAttributeList> & xAttrList)
 {
@@ -767,6 +780,66 @@ void XMLSenderFieldImportContext::StartElement(
     XMLTextFieldImportContext::StartElement(xAttrList);
 }
 
+void XMLSenderFieldImportContext::startFastElement( sal_Int32 Element,
+    const Reference< XFastAttributeList >& xAttrList )
+    throw(RuntimeException, SAXException, std::exception)
+{
+    bValid = true;
+    switch( nElementToken ) {
+    case XML_TOK_TEXT_SENDER_FIRSTNAME:
+        nSubType = UserDataPart::FIRSTNAME;
+        break;
+    case XML_TOK_TEXT_SENDER_LASTNAME:
+        nSubType = UserDataPart::NAME;
+        break;
+    case XML_TOK_TEXT_SENDER_INITIALS:
+        nSubType = UserDataPart::SHORTCUT;
+        break;
+    case XML_TOK_TEXT_SENDER_TITLE:
+        nSubType = UserDataPart::TITLE;
+        break;
+    case XML_TOK_TEXT_SENDER_POSITION:
+        nSubType = UserDataPart::POSITION;
+        break;
+    case XML_TOK_TEXT_SENDER_EMAIL:
+        nSubType = UserDataPart::EMAIL;
+        break;
+    case XML_TOK_TEXT_SENDER_PHONE_PRIVATE:
+        nSubType = UserDataPart::PHONE_PRIVATE;
+        break;
+    case XML_TOK_TEXT_SENDER_FAX:
+        nSubType = UserDataPart::FAX;
+        break;
+    case XML_TOK_TEXT_SENDER_COMPANY:
+        nSubType = UserDataPart::COMPANY;
+        break;
+    case XML_TOK_TEXT_SENDER_PHONE_WORK:
+        nSubType = UserDataPart::PHONE_COMPANY;
+        break;
+    case XML_TOK_TEXT_SENDER_STREET:
+        nSubType = UserDataPart::STREET;
+        break;
+    case XML_TOK_TEXT_SENDER_CITY:
+        nSubType = UserDataPart::CITY;
+        break;
+    case XML_TOK_TEXT_SENDER_POSTAL_CODE:
+        nSubType = UserDataPart::ZIP;
+        break;
+    case XML_TOK_TEXT_SENDER_COUNTRY:
+        nSubType = UserDataPart::COUNTRY;
+        break;
+    case XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE:
+        nSubType = UserDataPart::STATE;
+        break;
+    default:
+        bValid = false;
+        break;
+    }
+
+    // process Attributes
+    XMLTextFieldImportContext::startFastElement(Element, xAttrList);
+}
+
 void XMLSenderFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue)
@@ -836,6 +909,20 @@ XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
     SetServiceName(sServiceAuthor);
 }
 
+XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken)
+:   XMLSenderFieldImportContext(rImport, rHlp, Element, nToken),
+    bAuthorFullName(true),
+    sServiceAuthor(sAPI_author),
+    sPropertyAuthorFullName(sAPI_full_name),
+    sPropertyFixed(sAPI_is_fixed),
+    sPropertyContent(sAPI_content)
+{
+    // overwrite service name from XMLSenderFieldImportContext
+    SetServiceName(sServiceAuthor);
+}
+
 void XMLAuthorFieldImportContext::StartElement(
     const Reference<XAttributeList> & xAttrList) {
 
@@ -846,6 +933,17 @@ void XMLAuthorFieldImportContext::StartElement(
     XMLTextFieldImportContext::StartElement(xAttrList);
 }
 
+void XMLAuthorFieldImportContext::startFastElement( sal_Int32 Element,
+    const Reference< XFastAttributeList >& xAttrList)
+    throw(RuntimeException, SAXException, std::exception)
+{
+    bAuthorFullName = (XML_TOK_TEXT_AUTHOR_INITIALS != nElementToken);
+    bValid = true;
+
+    // process Attributes
+    XMLTextFieldImportContext::startFastElement(Element, xAttrList);
+}
+
 void XMLAuthorFieldImportContext::PrepareField(
     const Reference<XPropertySet> & rPropSet)
 {
commit 5fc2695bf7259221337245289dfc128c95294b2c
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Sat Oct 3 10:39:00 2015 +0200

    fastparser impl. for XMLTemplateNameImportContext
    
    Change-Id: I6f58b7220f8ab737bee93a64480f1b4aee459bc0

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 22695cf..fd83b88 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -918,6 +918,9 @@ public:
                                  XMLTextImportHelper& rHlp,
                                  sal_uInt16 nPrfx,
                                  const OUString& sLocalName);
+    XMLTemplateNameImportContext(SvXMLImport& rImport,
+                                 XMLTextImportHelper& rHlp,
+                                 sal_Int32 Element);
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index a5d61a2..3e27e3a 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2728,6 +2728,16 @@ XMLTemplateNameImportContext::XMLTemplateNameImportContext(
     bValid = true;
 }
 
+XMLTemplateNameImportContext::XMLTemplateNameImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_template_name, Element),
+    sPropertyFileFormat(sAPI_file_format),
+    nFormat(TemplateDisplayFormat::FULL)
+{
+    bValid = true;
+}
+
 void XMLTemplateNameImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 45cc7a9bb79bac6635e1fe3f4150bca1ffaf9659
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 13:10:55 2015 +0200

    fastparser impl. for XMLBibliographyFieldImportContext
    
    // TODO set aValue.Name in startFastElement
    
    Change-Id: Iac6238e13622a436b6ec0e2bff3bcce888d13cff

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 51c4f70..22695cf 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1337,12 +1337,18 @@ public:
                                       XMLTextImportHelper& rHlp,
                                       sal_uInt16 nPrfx,
                                       const OUString& sLocalName);
+    XMLBibliographyFieldImportContext(SvXMLImport& rImport,
+                                      XMLTextImportHelper& rHlp,
+                                      sal_Int32 Element);
 
 protected:
     /// process attributes (fill aValues)
     virtual void StartElement(
         const ::com::sun::star::uno::Reference<
         ::com::sun::star::xml::sax::XAttributeList> & xAttrList) SAL_OVERRIDE;
+    virtual void startFastElement( sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// empty method; all attributes are handled in StartElement
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 6311bd8..a5d61a2 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -4111,6 +4111,16 @@ XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(
     bValid = true;
 }
 
+XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_bibliography, Element),
+    sPropertyFields("Fields"),
+    aValues()
+{
+    bValid = true;
+}
+
 // TODO: this is the same map as is used in the text field export
 static SvXMLEnumMapEntry const aBibliographyDataTypeMap[] =
 {
@@ -4189,6 +4199,51 @@ void XMLBibliographyFieldImportContext::StartElement(
     }
 }
 
+void XMLBibliographyFieldImportContext::startFastElement( sal_Int32 /*Element*/,
+    const Reference< XFastAttributeList >& xAttrList )
+    throw( RuntimeException, SAXException, std::exception )
+{
+    // iterate over attributes
+    Sequence< xml::FastAttribute > attributesSeq = xAttrList->getFastAttributes();
+    sal_Int16 nLength = attributesSeq.getLength();
+    xml::FastAttribute* attributes = attributesSeq.getArray();
+    for( sal_Int16 i=0; i < nLength; i++ )
+    {
+        xml::FastAttribute attr = attributes[i];
+
+        if( (attr.Token & (NAMESPACE | XML_NAMESPACE_TEXT)) == (NAMESPACE | XML_NAMESPACE_TEXT) )
+        {
+            PropertyValue aValue;
+            // TODO set aValue.Name
+            Any aAny;
+
+            // special treatment for bibliography type
+            // biblio vx bibilio: #96658#; also read old documents
+            if( attr.Token == (NAMESPACE | XML_NAMESPACE_TEXT | XML_bibiliographic_type) ||
+                attr.Token == (NAMESPACE | XML_NAMESPACE_TEXT | XML_bibliography_type) )
+            {
+                sal_uInt16 nTmp;
+                if( SvXMLUnitConverter::convertEnum(
+                    nTmp, attr.Value, aBibliographyDataTypeMap) )
+                {
+                    aAny <<= (sal_Int16)nTmp;
+                    aValue.Value = aAny;
+
+                    aValues.push_back(aValue);
+                }
+            }
+            else
+            {
+                aAny <<= attr.Value;
+                aValue.Value = aAny;
+
+                aValues.push_back(aValue);
+            }
+        }
+        // else: unknown namespace -> ignore
+    }
+}
+
 void XMLBibliographyFieldImportContext::ProcessAttribute(
     sal_uInt16,
     const OUString& )
commit f18cdf04c8c0803cdfba7df380ce96ef21e3f86d
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 12:36:12 2015 +0200

    fastparser impl. for XMLHiddenParagraphImportContext
    
    Change-Id: I5b6b1dc751e32224512bf4d5ddd579892f7fa90d

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 1d4df6c..51c4f70 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -781,6 +781,9 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLHiddenParagraphImportContext(SvXMLImport& rImport,
+                                    XMLTextImportHelper& rHlp,
+                                    sal_Int32 Element);
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 93b1226..6311bd8 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2354,6 +2354,17 @@ XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
 {
 }
 
+XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_paragraph, Element),
+    sPropertyCondition(sAPI_condition),
+    sPropertyIsHidden(sAPI_is_hidden),
+    sCondition(),
+    bIsHidden(false)
+{
+}
+
 void XMLHiddenParagraphImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit b63348263542d4b7d2ae75e71e30e0ce785fa1b4
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 12:32:14 2015 +0200

    fastparser impl. for XMLTimeFieldImportContext
    
    and subclass
    
    Change-Id: Iefaeb2fd6487440ceb47d58c5830717920dff88e

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index ac7228c..1d4df6c 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -330,6 +330,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLTimeFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
@@ -353,6 +357,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLDateFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Elemtn);
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index e73451d..93b1226 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1209,6 +1209,28 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
     bValid = true;  // always valid!
 }
 
+XMLTimeFieldImportContext::XMLTimeFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_date_time, Element),
+    sPropertyNumberFormat(sAPI_number_format),
+    sPropertyFixed(sAPI_is_fixed),
+    sPropertyDateTimeValue(sAPI_date_time_value),
+    sPropertyDateTime(sAPI_date_time),
+    sPropertyAdjust(sAPI_adjust),
+    sPropertyIsDate(sAPI_is_date),
+    sPropertyIsFixedLanguage(sAPI_is_fixed_language),
+    nAdjust(0),
+    nFormatKey(0),
+    bTimeOK(false),
+    bFormatOK(false),
+    bFixed(false),
+    bIsDate(false),
+    bIsDefaultLanguage( true )
+{
+    bValid = true; // always valid!
+}
+
 void XMLTimeFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken, const OUString& sAttrValue )
 {
@@ -1340,6 +1362,14 @@ XMLDateFieldImportContext::XMLDateFieldImportContext(
     bIsDate = true; // always a date!
 }
 
+XMLDateFieldImportContext::XMLDateFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLTimeFieldImportContext(rImport, rHlp, Element)
+{
+    bIsDate = true; // always a date!
+}
+
 void XMLDateFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 23d1b32338af4c05df12a2e59ee5719ecad7b228
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 12:16:52 2015 +0200

    fastparser impl. for XMLVarFieldImportContext
    
    and subclasses and subsubclasses
    
    Change-Id: I0dda419511c742c7b6cd7eda0d03b5bff41eaa8a

diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index 41bede4..3a7b487 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -190,6 +190,24 @@ public:
         bool bStyle,                /// set data style (NumberFormat-Prop.)
         bool bValue,                /// set value with Content/Value-Prop.
         bool bPresentation);        /// set presentation from elem. content
+    XMLVarFieldImportContext(
+        // for XMLTextFieldImportContext:
+        SvXMLImport& rImport,           /// XML Import
+        XMLTextImportHelper& rHlp,      /// text import helper
+        const sal_Char* pServiceName,   /// name of SO API service
+        sal_Int32 Element,              /// element token (namespace and name)
+        // config variables for PrepareField behavior:
+        bool bFormula,              /// set Formula property
+        bool bFormulaDefault,       /// use content as default for formula
+        bool bDescription,          /// set sDescription with Hint-property
+        bool bHelp,
+        bool bHint,
+        bool bVisible,              /// set IsVisible (display attr)
+        bool bDisplayFormula,       /// set ??? (display attr.)
+        bool bType,                 /// set value type with ???-property
+        bool bStyle,                /// set data style (NumberFormat-Prop.)
+        bool bValue,                /// set value with Content/Value-Prop.
+        bool bPresentation);        /// set presentation from elem. content
 
 protected:
     /// process attribute values
@@ -224,7 +242,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
-
+    XMLVariableGetFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
     /// prepare XTextField for insertion into document
@@ -249,6 +270,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLExpressionFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
     virtual void PrepareField(
@@ -270,6 +295,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLTextInputFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
     virtual void PrepareField(
@@ -315,12 +344,34 @@ public:
         bool bStyle,                /// see XMLTextFieldImportContext
         bool bValue,                /// see XMLTextFieldImportContext
         bool bPresentation);        /// see XMLTextFieldImportContext
+    XMLSetVarFieldImportContext(
+        // for XMLTextFieldImportContext:
+        SvXMLImport& rImport,           /// see XMLTextFieldImportContext
+        XMLTextImportHelper& rHlp,      /// see XMLTextFieldImportContext
+        const sal_Char* pServiceName,   /// see XMLTextFieldImportContext
+        sal_Int32 Element,              /// element token (namespace and name)
+        // for finding appropriate field master (see EndElement())
+        VarType eVarType,               /// variable type
+        // config variables:
+        bool bFormula,              /// see XMLTextFieldImportContext
+        bool bFormulaDefault,       /// see XMLTextFieldImportContext
+        bool bDescription,          /// see XMLTextFieldImportContext
+        bool bHelp,                 /// see XMLTextFieldImportContext
+        bool bHint,                 /// see XMLTextFieldImportContext
+        bool bVisible,              /// see XMLTextFieldImportContext
+        bool bDisplayFormula,       /// see XMLTextFieldImportContext
+        bool bType,                 /// see XMLTextFieldImportContext
+        bool bStyle,                /// see XMLTextFieldImportContext
+        bool bValue,                /// see XMLTextFieldImportContext
+        bool bPresentation);        /// see XMLTextFieldImportContext
 
 protected:
 
     /// create XTextField, attach master and insert into document;
     /// also calls PrepareTextField
     virtual void EndElement() SAL_OVERRIDE;
+    virtual void endFastElement( sal_Int32 Element )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// find appropriate field master
     bool FindFieldMaster(
@@ -344,6 +395,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLVariableSetFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
     /// prepare XTextField for insertion into document
@@ -369,6 +424,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLVariableInputFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
 
@@ -393,6 +452,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLUserFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 };
 
 /** user input fields (<text:user-field-input>) */
@@ -408,6 +471,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLUserFieldInputImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
     virtual void PrepareField(
         const ::com::sun::star::uno::Reference<
@@ -436,6 +503,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLSequenceFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element);
 
 protected:
 
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 3a7006b..f98eb29 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -140,6 +140,43 @@ XMLVarFieldImportContext::XMLVarFieldImportContext(
 {
 }
 
+XMLVarFieldImportContext::XMLVarFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    const sal_Char* pServiceName,
+    sal_Int32 Element,
+    bool bFormula, bool bFormulaDefault,
+    bool bDescription, bool bHelp, bool bHint, bool bVisible,
+    bool bIsDisplayFormula,
+    bool bType, bool bStyle, bool bValue,
+    bool bPresentation) :
+        XMLTextFieldImportContext(rImport, rHlp, pServiceName, Element),
+        sPropertyContent(sAPI_content),
+        sPropertyHint(sAPI_hint),
+        sPropertyHelp(sAPI_help),
+        sPropertyTooltip(sAPI_tooltip),
+        sPropertyIsVisible(sAPI_is_visible),
+        sPropertyIsDisplayFormula(sAPI_is_show_formula),
+        sPropertyCurrentPresentation(sAPI_current_presentation),
+        aValueHelper(rImport, rHlp, bType, bStyle, bValue, false),
+        bDisplayFormula(false),
+        bDisplayNone(false),
+        bNameOK(false),
+        bFormulaOK(false),
+        bDescriptionOK(false),
+        bHelpOK(false),
+        bHintOK(false),
+        bDisplayOK(false),
+        bSetFormula(bFormula),
+        bSetFormulaDefault(bFormulaDefault),
+        bSetDescription(bDescription),
+        bSetHelp(bHelp),
+        bSetHint(bHint),
+        bSetVisible(bVisible),
+        bSetDisplayFormula(bIsDisplayFormula),
+        bSetPresentation(bPresentation)
+{
+}
+
 void XMLVarFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
@@ -313,6 +350,22 @@ XMLSetVarFieldImportContext::XMLSetVarFieldImportContext(
 {
 }
 
+XMLSetVarFieldImportContext::XMLSetVarFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    const sal_Char* pServiceName, sal_Int32 Element,
+    VarType eVarType,
+    bool bFormula, bool bFormulaDefault,
+    bool bDescription, bool bHelp, bool bHint, bool bVisible, bool bIsDisplayFormula,
+    bool bType, bool bStyle, bool bValue, bool bPresentation) :
+        XMLVarFieldImportContext(rImport, rHlp, pServiceName,
+                                 Element,
+                                 bFormula, bFormulaDefault,
+                                 bDescription, bHelp, bHint, bVisible, bIsDisplayFormula,
+                                 bType, bStyle, bValue, bPresentation),
+        eFieldType(eVarType)
+{
+}
+
 void XMLSetVarFieldImportContext::EndElement()
 {
     // should we call PrepareField on the field, or rather on it's master?
@@ -365,6 +418,59 @@ void XMLSetVarFieldImportContext::EndElement()
     GetImportHelper().InsertString(GetContent());
 }
 
+void XMLSetVarFieldImportContext::endFastElement( sal_Int32 /*Element*/ )
+    throw(RuntimeException, xml::sax::SAXException, std::exception)
+{
+    // should we call PrepareField on the field, or rather on it's master?
+    // currently: call on field (just like superclass)
+    // possible alternatives: call on master
+    //                        call field or master depending on variable
+    //                        PrepareMaster() in addition to PrepareField()
+
+    DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
+
+    if( bValid )
+    {
+        DBG_ASSERT(!GetName().isEmpty(), "variable name needed!");
+
+        // find field master
+        Reference<XPropertySet> xMaster;
+        if( FindFieldMaster(xMaster) )
+        {
+            // create field/Service
+            Reference<XPropertySet> xPropSet;
+            if( CreateField(xPropSet, sAPI_textfield_prefix + GetServiceName()) )
+            {
+                Reference<XDependentTextField> xDepTextField(xPropSet, UNO_QUERY);
+                if( xDepTextField.is() )
+                {
+                    // attach field to field master
+                    xDepTextField->attachTextFieldMaster(xMaster);
+
+                    // attach field to document
+                    Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
+                    if( xTextContent.is() )
+                    {
+                        try {
+                        // insert, set field properties and exit!
+                        GetImportHelper().InsertTextContent(xTextContent);
+                        PrepareField(xPropSet);
+                        } catch (lang::IllegalArgumentException& /*e*/)
+                        {
+                            // ignore e: #i54023#
+                        };
+                        return;
+                    }
+                }
+            }
+        }
+    }
+
+    // above: exit on success; so for all error cases we end up here!
+    // write element content
+    GetImportHelper().InsertString(GetContent());
+}
+
 bool XMLSetVarFieldImportContext::FindFieldMaster(
     Reference<XPropertySet> & xMaster)
 {
@@ -404,6 +510,24 @@ XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
 {
 }
 
+XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+                                Element, VarTypeSequence,
+                                // formula
+                                true, true,
+                                false, false, false, false,
+                                false,
+                                false, false, false, false),
+    sPropertyNumberFormat(sAPI_number_format),
+    sPropertySequenceValue(sAPI_sequence_value),
+    sNumFormat(OUString('1')),
+    sNumFormatSync(GetXMLToken(XML_FALSE)),
+    bRefNameOK(false)
+{
+}
+
 void XMLSequenceFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken, const OUString& sAttrValue )
 {
@@ -474,6 +598,22 @@ XMLVariableSetFieldImportContext::XMLVariableSetFieldImportContext(
 {
 }
 
+XMLVariableSetFieldImportContext::XMLVariableSetFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+                                Element, VarTypeSimple,
+                                // formula, Value&type, style,
+                                // display name
+                                true, true,
+                                false, false, false,
+                                true, false,
+                                true, true, true,
+                                true),
+    sPropertySubType(sAPI_sub_type)
+{
+}
+
 void XMLVariableSetFieldImportContext::PrepareField(
         const Reference<XPropertySet> & xPropertySet)
 {
@@ -511,6 +651,23 @@ XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext(
 {
 }
 
+XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression,
+                                Element, VarTypeSimple,
+                                // description, display none/formula,
+                                // value&type, style, formula
+                                true, true,
+                                true, true, true,
+                                true, false,
+                                true, true, true,
+                                true),
+    sPropertySubType(sAPI_sub_type),
+    sPropertyIsInput(sAPI_is_input)
+{
+}
+
 void XMLVariableInputFieldImportContext::PrepareField(
         const Reference<XPropertySet> & xPropertySet)
 {
@@ -550,7 +707,19 @@ XMLUserFieldImportContext::XMLUserFieldImportContext(
 {
 }
 
-
+XMLUserFieldImportContext::XMLUserFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLSetVarFieldImportContext(rImport, rHlp, sAPI_user,
+                                Element, VarTypeUserField,
+                                // display none/formula, style
+                                false, false,
+                                false, false, false, true,
+                                true,
+                                false, true, false,
+                                false)
+{
+}
 
 
 // user input field
@@ -573,6 +742,20 @@ XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
 {
 }
 
+XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLVarFieldImportContext(rImport, rHlp, sAPI_input_user,
+                             Element,
+                             // description, style
+                             false, false,
+                             true, false, false,
+                             false, false,
+                             false /*???*/, true, false,
+                             false)
+{
+}
+
 void XMLUserFieldInputImportContext::PrepareField(
     const Reference<XPropertySet> & xPropertySet)
 {
@@ -605,6 +788,20 @@ XMLVariableGetFieldImportContext::XMLVariableGetFieldImportContext(
 {
 }
 
+XMLVariableGetFieldImportContext::XMLVariableGetFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression,
+                             Element,
+                             // style, display formula
+                             false, false,
+                             false, false, false,
+                             false, true,
+                             true, true, false,
+                             true)
+{
+}
+
 void XMLVariableGetFieldImportContext::PrepareField(
         const Reference<XPropertySet> & xPropertySet)
 {
@@ -641,6 +838,21 @@ XMLExpressionFieldImportContext::XMLExpressionFieldImportContext(
     bValid = true;  // always valid
 }
 
+XMLExpressionFieldImportContext::XMLExpressionFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression,
+                             Element,
+                             // formula, type, style, display formula
+                             true, true,
+                             false, false, false,
+                             false, true,
+                             true, true, false,
+                             true),
+    sPropertySubType(sAPI_sub_type)
+{
+    bValid = true; // always valid
+}
 
 void XMLExpressionFieldImportContext::PrepareField(
     const Reference<XPropertySet> & xPropertySet)
@@ -678,6 +890,22 @@ XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
     bValid = true;  // always valid
 }
 
+XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element)
+:   XMLVarFieldImportContext(rImport, rHlp, sAPI_input,
+                             Element,
+                             // description
+                             false, false,
+                             true, true, true,
+                             false, false,
+                             false, false, false,
+                             false),
+    sPropertyContent(sAPI_content)
+{
+    bValid = true; // always valid
+}
+
 void XMLTextInputFieldImportContext::PrepareField(
     const Reference<XPropertySet> & xPropertySet)
 {
commit f89bf7b0443da7f014739005a08ab5e4c08ca42d
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 11:20:37 2015 +0200

    fastparser impl. for XMLDropDownFieldImportContext
    
    Change-Id: I0fa9be201dac567f9a68fca4bb76b5de6eae9fda

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 40d7117..ac7228c 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1490,11 +1490,18 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLDropDownFieldImportContext(SvXMLImport& rImport,
+                                  XMLTextImportHelper& rHlp,
+                                  sal_Int32 Element);
 
     virtual SvXMLImportContext* CreateChildContext(
         sal_uInt16 nPrefix,
         const OUString& rLocalName,
         const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext(
+        sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 4d3b8ac..e73451d 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -4875,6 +4875,25 @@ XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
     bValid = true;
 }
 
+XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_drop_down, Element ),
+    aLabels(),
+    sName(),
+    nSelected( -1 ),
+    bNameOK( false ),
+    bHelpOK(false),
+    bHintOK(false),
+    sPropertyItems( "Items" ),
+    sPropertySelectedItem( "SelectedItem" ),
+    sPropertyName( "Name" ),
+    sPropertyHelp( "Help" ),
+    sPropertyToolTip( "Tooltip" )
+{
+    bValid = true;
+}
+
 static bool lcl_ProcessLabel( const SvXMLImport& rImport,
                        const Reference<XAttributeList>& xAttrList,
                        OUString& rLabel,
@@ -4907,6 +4926,29 @@ static bool lcl_ProcessLabel( const SvXMLImport& rImport,
     return bValid;
 }
 
+static bool lcl_ProcessLabel(
+    const Reference< XFastAttributeList >& xAttrList,
+    OUString& rLabel,
+    bool& rIsSelected )
+{
+    bool bValid = false;
+    if( !xAttrList.is() )
+        return bValid;
+    if( xAttrList->hasAttribute( NAMESPACE | XML_NAMESPACE_TEXT | XML_value ) )
+    {
+        rLabel = xAttrList->getValue( NAMESPACE | XML_NAMESPACE_TEXT | XML_value );
+        bValid = true;
+    }
+    if( xAttrList->hasAttribute( NAMESPACE | XML_NAMESPACE_TEXT | XML_current_selected ) )
+    {
+        bool bTmp(false);
+        if( ::sax::Converter::convertBool( bTmp,
+                    xAttrList->getValue( NAMESPACE | XML_NAMESPACE_TEXT | XML_current_selected ) ) )
+            rIsSelected = bTmp;
+    }
+    return bValid;
+}
+
 SvXMLImportContext* XMLDropDownFieldImportContext::CreateChildContext(
     sal_uInt16 nPrefix,
     const OUString& rLocalName,
@@ -4927,6 +4969,24 @@ SvXMLImportContext* XMLDropDownFieldImportContext::CreateChildContext(
     return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
 }
 
+Reference< XFastContextHandler > XMLDropDownFieldImportContext::createFastChildContext(
+    sal_Int32 Element, const Reference< XFastAttributeList >& xAttrList )
+    throw(RuntimeException, SAXException, std::exception)
+{
+    if( Element == (NAMESPACE | XML_NAMESPACE_TEXT | XML_label) )
+    {
+        OUString sLabel;
+        bool bIsSelected = false;
+        if( lcl_ProcessLabel( xAttrList, sLabel, bIsSelected ) )
+        {
+            if( bIsSelected )
+                nSelected = static_cast<sal_Int32>( aLabels.size() );
+            aLabels.push_back( sLabel );
+        }
+    }
+    return new SvXMLImportContext( GetImport() );
+}
+
 void XMLDropDownFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit fadeef1d0e8697f52ba282c6e201f84aea418f28
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 11:01:56 2015 +0200

    fastparser impl. for XMLFooterFieldImportContext
    
    Change-Id: I55a4c955dd5a7d8b956f8ba593af516fed007584

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index fed0d8e..40d7117 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1544,6 +1544,9 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLFooterFieldImportContext(SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_Int32 Element);
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 163fdd9..4d3b8ac 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -5039,6 +5039,15 @@ XMLFooterFieldImportContext::XMLFooterFieldImportContext(
     bValid = true;
 }
 
+XMLFooterFieldImportContext::XMLFooterFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_footer, Element )
+{
+    sServicePrefix = sAPI_presentation_prefix;
+    bValid = true;
+}
+
 /// process attribute values
 void XMLFooterFieldImportContext::ProcessAttribute( sal_uInt16, const OUString& )
 {
commit e6e98dc30a43589a1e62c3ceceacdbfe7c0f8a5d
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 10:58:37 2015 +0200

    fastparser impl. for XMLConditionalTextImportContext
    
    Change-Id: Ifef0cbafbc318d835944fee5d95b14755bfd2dff

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index a8c1919..fed0d8e 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -810,6 +810,9 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLConditionalTextImportContext(SvXMLImport& rImport,
+                                    XMLTextImportHelper& rHlp,
+                                    sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 2085f914..163fdd9 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2387,6 +2387,22 @@ XMLConditionalTextImportContext::XMLConditionalTextImportContext(
 {
 }
 
+XMLConditionalTextImportContext::XMLConditionalTextImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_conditional_text, Element),
+    sPropertyCondition(sAPI_condition),
+    sPropertyTrueContent(sAPI_true_content),
+    sPropertyFalseContent(sAPI_false_content),
+    sPropertyIsConditionTrue(sAPI_is_condition_true),
+    sPropertyCurrentPresentation(sAPI_current_presentation),
+    bConditionOK(false),
+    bTrueOK(false),
+    bFalseOK(false),
+    bCurrentValue(false)
+{
+}
+
 void XMLConditionalTextImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit f5c279566323bb0e96d9bef1b43649b9fbcd125e
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Oct 2 10:51:36 2015 +0200

    fastparser impl. for XMLSimpleDocInfoImportContext
    
    and subclasses
    
    Change-Id: I2e22d63b38bfc9db19fbb5f02c269f8aa580672b

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 9172695..a8c1919 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -642,6 +642,12 @@ public:
                                   sal_uInt16 nToken,
                                   bool bContent,
                                   bool bAuthor);
+    XMLSimpleDocInfoImportContext( SvXMLImport& rImport,
+                                   XMLTextImportHelper& rHlp,
+                                   sal_Int32 Element,
+                                   sal_uInt16 nToken,
+                                   bool bContent,
+                                   bool bAuthor );
 
 protected:
     /// process attribute values
@@ -677,6 +683,10 @@ public:
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName,
                                     sal_uInt16 nToken);
+    XMLDateTimeDocInfoImportContext(SvXMLImport& rImport,
+                                    XMLTextImportHelper& rHlp,
+                                    sal_Int32 Element,
+                                    sal_uInt16 nToken);
 
 protected:
     /// process attribute values
@@ -702,6 +712,10 @@ public:
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName,
                                     sal_uInt16 nToken);
+    XMLRevisionDocInfoImportContext(SvXMLImport& rImport,
+                                    XMLTextImportHelper& rHlp,
+                                    sal_Int32 Element,
+                                    sal_uInt16 nToken);
 
 protected:
     /// prepare XTextField for insertion into document
@@ -729,6 +743,10 @@ public:
                                 sal_uInt16 nPrfx,
                                 const OUString& sLocalName,
                                 sal_uInt16 nToken);
+    XMLUserDocInfoImportContext(SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_Int32 Element,
+                                sal_uInt16 nToken);
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 3c8339d..2085f914 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1859,6 +1859,22 @@ XMLSimpleDocInfoImportContext::XMLSimpleDocInfoImportContext(
     bValid = true;
 }
 
+XMLSimpleDocInfoImportContext::XMLSimpleDocInfoImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken,
+    bool bContent, bool bAuthor )
+: XMLTextFieldImportContext(rImport, rHlp, MapTokenToServiceName(nToken), Element),
+    sPropertyFixed(sAPI_is_fixed),
+    sPropertyContent(sAPI_content),
+    sPropertyAuthor(sAPI_author),
+    sPropertyCurrentPresentation(sAPI_current_presentation),
+    bFixed(false),
+    bHasAuthor(bAuthor),
+    bHasContent(bContent)
+{
+    bValid = true;
+}
+
 void XMLSimpleDocInfoImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
@@ -1997,6 +2013,15 @@ XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
     bValid = true;
 }
 
+XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken )
+:   XMLSimpleDocInfoImportContext(rImport, rHlp, Element, nToken, false, false),
+    sPropertyRevision(sAPI_revision)
+{
+    bValid = true;
+}
+
 void XMLRevisionDocInfoImportContext::PrepareField(
     const Reference<XPropertySet> & rPropertySet)
 {
@@ -2076,6 +2101,50 @@ XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext(
     }
 }
 
+XMLDateTimeDocInfoImportContext::XMLDateTimeDocInfoImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken )
+:   XMLSimpleDocInfoImportContext(rImport, rHlp, Element, nToken, false, false),
+    sPropertyNumberFormat(sAPI_number_format),
+    sPropertyIsDate(sAPI_is_date),
+    sPropertyIsFixedLanguage(sAPI_is_fixed_language),
+    nFormat(0),
+    bFormatOK(false),
+    bIsDate(false),
+    bHasDateTime(false),
+    bIsDefaultLanguage(true)
+{
+    // we allow processing of EDIT_DURATION here, because import of actual
+    // is not supported anyway. If it was, we'd need an extra import class
+    // because times and time durations are presented differently!
+
+    bValid = true;
+    switch (nToken)
+    {
+        case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
+        case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
+        case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
+            bIsDate = true;
+            bHasDateTime = true;
+            break;
+        case XML_TOK_TEXT_DOCUMENT_CREATION_TIME:
+        case XML_TOK_TEXT_DOCUMENT_PRINT_TIME:
+        case XML_TOK_TEXT_DOCUMENT_SAVE_TIME:
+            bIsDate = false;
+            bHasDateTime = true;
+            break;
+        case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
+            bIsDate = false;
+            bHasDateTime = false;
+            break;
+        default:
+            OSL_FAIL(
+                "XMLDateTimeDocInfoImportContext needs date/time doc. fields");
+            bValid = false;
+            break;
+    }
+}
+
 void XMLDateTimeDocInfoImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
@@ -2157,6 +2226,20 @@ XMLUserDocInfoImportContext::XMLUserDocInfoImportContext(
     bValid = false;
 }
 
+XMLUserDocInfoImportContext::XMLUserDocInfoImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken )
+:   XMLSimpleDocInfoImportContext(rImport, rHlp, Element, nToken, false, false),
+    sPropertyName(sAPI_name),
+    sPropertyNumberFormat(sAPI_number_format),
+    sPropertyIsFixedLanguage(sAPI_is_fixed_language),
+    nFormat(0),
+    bFormatOK(false),
+    bIsDefaultLanguage( true )
+{
+    bValid = false;
+}
+
 void XMLUserDocInfoImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 9e1937ddf56c9725c65851760d4260009cfff9ef
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:30:23 2015 +0200

    fastparser impl. for XMLPlaceholderFieldImportContext
    
    Change-Id: Ic58f090582027f208c77270cc7e11bff3eb3fb75

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 4fd9843..9172695 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -286,6 +286,9 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLPlaceholderFieldImportContext( SvXMLImport& rImport,
+                                      XMLTextImportHelper& rHlp,
+                                      sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 9c7db96..3c8339d 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -1100,6 +1100,17 @@ XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
 {
 }
 
+XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_jump_edit, Element ),
+    sPropertyPlaceholderType(sAPI_place_holder_type),
+    sPropertyPlaceholder(sAPI_place_holder),
+    sPropertyHint(sAPI_hint),
+    nPlaceholderType(PlaceholderType::TEXT)
+{
+}
+
 /// process attribute values
 void XMLPlaceholderFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken, const OUString& sAttrValue )
commit e0ae1447eb985ff665d8cf8617d784ecf98282a3
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:25:36 2015 +0200

    fastparser impl. for XMLTableFormulaImportContext
    
    Change-Id: I16cd706da095f585d4c1b742e7775d0b833d33a2

diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
index de49969..41bede4 100644
--- a/xmloff/inc/txtvfldi.hxx
+++ b/xmloff/inc/txtvfldi.hxx
@@ -556,6 +556,9 @@ public:
         XMLTextImportHelper& rHlp,              /// text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& rLocalName);     /// element name w/o prefix
+    XMLTableFormulaImportContext( SvXMLImport& rImport,
+                                  XMLTextImportHelper& rHlp,
+                                  sal_Int32 Element );
     virtual ~XMLTableFormulaImportContext();
 
 protected:
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 88710ab..3a7006b 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -710,6 +710,17 @@ XMLTableFormulaImportContext::XMLTableFormulaImportContext(
 {
 }
 
+XMLTableFormulaImportContext::XMLTableFormulaImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_table_formula, Element ),
+    sPropertyIsShowFormula("IsShowFormula"),
+    sPropertyCurrentPresentation("CurrentPresentation"),
+    aValueHelper(rImport, rHlp, false, true, false, true),
+    bIsShowFormula(false)
+{
+}
+
 XMLTableFormulaImportContext::~XMLTableFormulaImportContext()
 {
 }
commit 9f20498542753233932e284b825b65d2797fd4f3
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:20:26 2015 +0200

    fastparser impl. for XMLSheetNameImportContext
    
    Change-Id: If1179cf0c6f2b391d5a118be4ade6a2c7fedc5ce

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index a207143..4fd9843 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1218,6 +1218,9 @@ public:
                               XMLTextImportHelper& rHlp,
                               sal_uInt16 nPrfx,
                               const OUString& sLocalName);
+    XMLSheetNameImportContext( SvXMLImport& rImport,
+                               XMLTextImportHelper& rHlp,
+                               sal_Int32 Element );
 
 protected:
     /// no attributes -> empty method
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index e3800a0..9c7db96 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3825,6 +3825,14 @@ XMLSheetNameImportContext::XMLSheetNameImportContext(
     bValid = true;  // always valid!
 }
 
+XMLSheetNameImportContext::XMLSheetNameImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_sheet_name, Element )
+{
+    bValid = true;  // always valid!
+}
+
 void XMLSheetNameImportContext::ProcessAttribute(
     sal_uInt16,
     const OUString& )
commit ef214ac0b1d87d6143b46dde5225b74b1f827c6c
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:16:29 2015 +0200

    fastparser impl. for XMLFileNameImportContext
    
    Change-Id: I35b3554f61886c00804b63291b05dbc0c2653f98

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index b596049..a207143 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -854,6 +854,9 @@ public:
                              XMLTextImportHelper& rHlp,
                              sal_uInt16 nPrfx,
                              const OUString& sLocalName);
+    XMLFileNameImportContext( SvXMLImport& rImport,
+                              XMLTextImportHelper& rHlp,
+                              sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index e250d3e..e3800a0 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2476,6 +2476,19 @@ XMLFileNameImportContext::XMLFileNameImportContext(
     bValid = true;
 }
 
+XMLFileNameImportContext::XMLFileNameImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_file_name, Element ),
+    sPropertyFixed(sAPI_is_fixed),
+    sPropertyFileFormat(sAPI_file_format),
+    sPropertyCurrentPresentation(sAPI_current_presentation),
+    nFormat(FilenameDisplayFormat::FULL),
+    bFixed(false)
+{
+    bValid = true;
+}
+
 void XMLFileNameImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 9c0240837f9ee4ab589c7f1d173bb4c8af50af91
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:08:43 2015 +0200

    fastparser impl. for XMLPageVarSetFieldImportContext
    
    Change-Id: I7e9644c111e84a59eb82bd7ccba333a960e07a97

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 1915c51..b596049 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1007,6 +1007,9 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLPageVarSetFieldImportContext( SvXMLImport& rImport,
+                                     XMLTextImportHelper& rHlp,
+                                     sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 9cf9dfb..e250d3e 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2895,6 +2895,17 @@ XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
     bValid = true;
 }
 
+XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_reference_page_set, Element ),
+    sPropertyOn(sAPI_on),
+    sPropertyOffset(sAPI_offset),
+    nAdjust(0),
+    bActive(true)
+{
+    bValid = true;
+}
+
 void XMLPageVarSetFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit d767569a142705528835082f73b3de6a1d5b46c8
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:05:26 2015 +0200

    fastparser impl. for XMLHiddenTextImportContext
    
    Change-Id: I4f65cf13f35bf832988f7b6cd7f28d2afabdf8ef

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index e7b86fa..1915c51 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -822,6 +822,9 @@ public:
                                XMLTextImportHelper& rHlp,
                                sal_uInt16 nPrfx,
                                const OUString& sLocalName);
+    XMLHiddenTextImportContext( SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index da10d1d..9cf9dfb 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2378,6 +2378,19 @@ XMLHiddenTextImportContext::XMLHiddenTextImportContext(
 {
 }
 
+XMLHiddenTextImportContext::XMLHiddenTextImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_hidden_text, Element ),
+    sPropertyCondition(sAPI_condition),
+    sPropertyContent(sAPI_content),
+    sPropertyIsHidden(sAPI_is_hidden),
+    bConditionOK(false),
+    bStringOK(false),
+    bIsHidden(false)
+{
+}
+
 void XMLHiddenTextImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit ef12b8a27a283e6eacb87f4784e53a92fbfc91b0
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 17:02:04 2015 +0200

    fastparser impl. for XMLPageVarGetFieldImportContext
    
    Change-Id: Ic644f77435f13de87c6b0772b6f4365667f1c858

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index ff4f82d5..e7b86fa 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -973,6 +973,9 @@ public:
                                     XMLTextImportHelper& rHlp,
                                     sal_uInt16 nPrfx,
                                     const OUString& sLocalName);
+    XMLPageVarGetFieldImportContext( SvXMLImport& rImport,
+                                     XMLTextImportHelper& rHlp,
+                                     sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 1d7b617..da10d1d 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2808,6 +2808,18 @@ XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
     bValid = true;
 }
 
+XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_reference_page_get, Element ),
+    sPropertyNumberingType(sAPI_numbering_type),
+    sNumberFormat(),
+    sLetterSync(),
+    bNumberFormatOK(false)
+{
+    bValid = true;
+}
+
 void XMLPageVarGetFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 1ba46c783ecf57c03ea1f1c27fd03ab926131a94
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Thu Sep 10 16:58:31 2015 +0200

    fastparser impl. for XMLCountFieldImportContext
    
    Change-Id: Ie8e0c53823b47eedb959d503777a036b58c65dcb

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 5a44107..ff4f82d5 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -938,6 +938,10 @@ public:
                                sal_uInt16 nPrfx,
                                const OUString& sLocalName,
                                sal_uInt16 nToken);
+    XMLCountFieldImportContext( SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_Int32 Element,
+                                sal_uInt16 nToken );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 1961ab0..1d7b617 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2695,6 +2695,18 @@ XMLCountFieldImportContext::XMLCountFieldImportContext(
     bValid = true;
 }
 
+XMLCountFieldImportContext::XMLCountFieldImportContext(
+    SvXMLImport& rImport, XMLTextImportHelper& rHlp,
+    sal_Int32 Element, sal_uInt16 nToken )
+:   XMLTextFieldImportContext( rImport, rHlp, MapTokenToServiceName(nToken), Element ),
+    sPropertyNumberingType(sAPI_numbering_type),
+    sNumberFormat(),
+    sLetterSync(),
+    bNumberFormatOK(false)
+{
+    bValid = true;
+}
+
 void XMLCountFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 32cae728a432d97fa2754ea5b624e8560d8925ec
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 18:26:47 2015 +0200

    fastparser impl. for XMLChapterImportContext
    
    Change-Id: I4662a5c77265fb2f008955fb02ef29b1f4183037

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index deadae1..5a44107 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -905,6 +905,9 @@ public:
                             XMLTextImportHelper& rHlp,
                             sal_uInt16 nPrfx,
                             const OUString& sLocalName);
+    XMLChapterImportContext( SvXMLImport& rImport,
+                             XMLTextImportHelper& rHlp,
+                            sal_Int32 Element );
 
 protected:
     /// process attribute values
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 59ed85b..1961ab0 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2613,6 +2613,19 @@ XMLChapterImportContext::XMLChapterImportContext(
     bValid = true;
 }
 
+XMLChapterImportContext::XMLChapterImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_chapter, Element ),
+    sPropertyChapterFormat(sAPI_chapter_format),
+    sPropertyLevel(sAPI_level),
+    nFormat(ChapterFormat::NAME_NUMBER),
+    nLevel(0)
+{
+    bValid = true;
+}
+
 void XMLChapterImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 3598c06a791fce8d54d8764b5cd5606a7e21b741
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 18:19:51 2015 +0200

    fastparser impl. for XMLHeaderFieldImportContext
    
    Change-Id: I78ffec25058a103b64d7511ff7315ea03e983cab

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 31100a6..deadae1 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1472,6 +1472,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLHeaderFieldImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element );
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index af7fb4a..59ed85b 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -4813,6 +4813,16 @@ XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(
     bValid = true;
 }
 
+XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_header, Element )
+{
+    sServicePrefix = sAPI_presentation_prefix;
+    bValid = true;
+}
+
 /// process attribute values
 void XMLHeaderFieldImportContext::ProcessAttribute( sal_uInt16, const OUString& )
 {
commit 987a9fe145f537bd3f745eccd95de26b74b27234
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 18:16:46 2015 +0200

    fastparser impl. for XMLAnnotationImportContext
    
    Change-Id: Ia804fc835a6d3e93dcd342721086d218b62eb228

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 75633a1..31100a6 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1329,6 +1329,10 @@ public:
                                sal_uInt16 nToken,
                                sal_uInt16 nPrfx,
                                const OUString& sLocalName);
+    XMLAnnotationImportContext( SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_uInt16 nToken,
+                                sal_Int32 Element );
 
 protected:
     /// process attributes
@@ -1344,7 +1348,13 @@ protected:
         const OUString& rLocalName,
         const ::com::sun::star::uno::Reference<
                 ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler >
+        createFastChildContext( sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
     virtual void EndElement() SAL_OVERRIDE;
+    virtual void endFastElement( sal_Int32 Element )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 };
 
 /** Import a script field (<text:script>) */
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index f0b44fc..af7fb4a 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -4154,6 +4154,29 @@ XMLAnnotationImportContext::XMLAnnotationImportContext(
     GetImport().GetTextImport()->PushListContext();
 }
 
+XMLAnnotationImportContext::XMLAnnotationImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_uInt16 nToken,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext(rImport, rHlp, sAPI_annotation, Element),
+    sPropertyAuthor(sAPI_author),
+    sPropertyInitials(sAPI_initials),
+    sPropertyContent(sAPI_content),
+    // why is there no UNO_NAME_DATE_TIME, but only UNO_NAME_DATE_TIME_VALUE?
+    sPropertyDate(sAPI_date_time_value),
+    sPropertyTextRange(sAPI_TextRange),
+    sPropertyName(sAPI_name),
+    m_nToken(nToken)
+{
+    bValid = true;
+
+    // remember old list item and block (#91964#) and reset them
+    // for the text frame
+    // do this in the constructor, not in createFastChildContext (#i93392#)
+    GetImport().GetTextImport()->PushListContext();
+}
+
 void XMLAnnotationImportContext::ProcessAttribute(
     sal_uInt16 nToken,
     const OUString& rValue )
@@ -4224,6 +4247,60 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext(
     return pContext;
 }
 
+Reference< XFastContextHandler > XMLAnnotationImportContext::createFastChildContext(
+    sal_Int32 Element,
+    const Reference< XFastAttributeList >& xAttrList )
+    throw( RuntimeException, SAXException, std::exception )
+{
+    Reference< XFastContextHandler > pContext = 0;
+    if( Element == (NAMESPACE | XML_NAMESPACE_DC | XML_creator) )
+        pContext = new XMLStringBufferImportContext( GetImport(), Element, aAuthorBuffer );
+    else if( Element == (NAMESPACE | XML_NAMESPACE_DC | XML_date) )
+        pContext = new XMLStringBufferImportContext( GetImport(), Element, aDateBuffer );
+    else if( Element == (NAMESPACE | XML_NAMESPACE_TEXT | XML_sender_initials) ||
+             Element == (NAMESPACE | XML_NAMESPACE_LO_EXT | XML_sender_initials) )
+        pContext = new XMLStringBufferImportContext( GetImport(), Element, aInitialsBuffer );
+
+    if( !pContext.is() )
+    {
+        try
+        {
+            bool bOK = true;
+            if( !mxField.is() )
+                bOK = CreateField( mxField, sServicePrefix + GetServiceName() );
+            if( bOK )
+            {
+                Any aAny = mxField->getPropertyValue( sPropertyTextRange );
+                Reference< XText > xText;
+                aAny >>= xText;
+                if( xText.is() )
+                {
+                    rtl::Reference< XMLTextImportHelper > xTxtImport = GetImport().GetTextImport();
+                    if( !mxCursor.is() )
+                    {
+                        mxOldCursor = xTxtImport->GetCursor();
+                        mxCursor = xText->createTextCursor();
+                    }
+
+                    if( mxCursor.is() )
+                    {
+                        xTxtImport->SetCursor( mxCursor );
+                        pContext = xTxtImport->CreateTextChildContext( GetImport(), Element, xAttrList );
+                    }
+                }
+            }
+        }
+        catch( const Exception& )
+        {
+        }
+
+        if( !pContext.is() )
+            pContext = new XMLStringBufferImportContext( GetImport(), Element, aTextBuffer );
+    }
+
+    return pContext;
+}
+
 void XMLAnnotationImportContext::EndElement()
 {
     DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
@@ -4311,6 +4388,94 @@ void XMLAnnotationImportContext::EndElement()
         GetImportHelper().InsertString(GetContent());
 }
 
+void XMLAnnotationImportContext::endFastElement( sal_Int32 /*Element*/ )
+    throw( RuntimeException, SAXException, std::exception )
+{
+    DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
+    if( mxCursor.is() )
+    {
+        // delete addition newline
+        const OUString aEmpty;
+        mxCursor->gotoEnd( sal_False );
+        mxCursor->goLeft( 1, sal_True );
+        mxCursor->setString( aEmpty );
+
+        // reset cursor
+        GetImport().GetTextImport()->ResetCursor();
+    }
+
+    if( mxOldCursor.is() )
+        GetImport().GetTextImport()->SetCursor( mxOldCursor );
+
+    // reinstall old list item #91964#
+    GetImport().GetTextImport()->PopListContext();
+
+    if ( bValid )
+    {
+        if ( m_nToken == XML_TOK_TEXT_ANNOTATION_END )
+        {
+            // Search for a previous annotation with the same name.
+            uno::Reference< text::XTextContent > xPrevField;
+            {
+                Reference<XTextFieldsSupplier> xTextFieldsSupplier(GetImport().GetModel(), UNO_QUERY);
+                uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+                uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+                while (xFields->hasMoreElements())
+                {
+                    uno::Reference<beans::XPropertySet> xCurrField(xFields->nextElement(), uno::UNO_QUERY);
+                    uno::Reference<beans::XPropertySetInfo> const xInfo(
+                            xCurrField->getPropertySetInfo());
+                    if (xInfo->hasPropertyByName(sPropertyName))
+                    {
+                        OUString aFieldName;
+                        xCurrField->getPropertyValue(sPropertyName) >>= aFieldName;
+                        if (aFieldName == aName)
+                        {
+                            xPrevField.set( xCurrField, uno::UNO_QUERY );
+                            break;
+                        }
+                    }
+                }
+            }
+            if ( xPrevField.is() )
+            {
+                // So we are ending a previous annotation,
+                // let's create a text range covering the old and the current position.
+                uno::Reference<text::XText> xText = GetImportHelper().GetText();
+                uno::Reference<text::XTextCursor> xCursor =
+                    xText->createTextCursorByRange(GetImportHelper().GetCursorAsRange());
+                xCursor->gotoRange(xPrevField->getAnchor(), true);
+                uno::Reference<text::XTextRange> xTextRange(xCursor, uno::UNO_QUERY);
+
+                xText->insertTextContent(xTextRange, xPrevField, !xCursor->isCollapsed());
+            }
+        }
+        else
+        {
+            if ( mxField.is() || CreateField( mxField, sServicePrefix + GetServiceName() ) )
+            {
+                // set field properties
+                PrepareField( mxField );
+
+                // attach field to document
+                Reference < XTextContent > xTextContent( mxField, UNO_QUERY );
+
+                // workaround for #80606#
+                try
+                {
+                    GetImportHelper().InsertTextContent( xTextContent );
+                }
+                catch (const lang::IllegalArgumentException&)
+                {
+                    // ignore
+                }
+            }
+        }
+    }
+    else
+        GetImportHelper().InsertString(GetContent());
+}
+
 void XMLAnnotationImportContext::PrepareField(
     const Reference<XPropertySet> & xPropertySet )
 {
commit 554a8cad7063b434b14c34b7e5c0e3811d1a2a1b
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 17:56:51 2015 +0200

    fastparser impl. for XMLPageNumberImportContext
    
    Change-Id: I79ea2ef8a3f0d5889e9882934b9456a466d516c0

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index a12058a..75633a1 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -413,7 +413,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
-
+    XMLPageNumberImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element );
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index cbfbd33..f0b44fc 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -977,6 +977,22 @@ XMLPageNumberImportContext::XMLPageNumberImportContext(
     bValid = true;
 }
 
+XMLPageNumberImportContext::XMLPageNumberImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_page_number, Element ),
+    sPropertySubType(sAPI_sub_type),
+    sPropertyNumberingType(sAPI_numbering_type),
+    sPropertyOffset(sAPI_offset),
+    sNumberSync(GetXMLToken(XML_FALSE)),
+    nPageAdjust(0),
+    eSelectPage(PageNumberType_CURRENT),
+    sNumberFormatOK(false)
+{
+    bValid = true;
+}
+
 void XMLPageNumberImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
commit 065aff2d21a6cc9953afb2b877c747d3805bca15
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 17:50:15 2015 +0200

    fastparser impl. for XMLPageContinuationImportContext
    
    Change-Id: Ib826287157302c4cf42a0632ee4ff510d47bed24

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index b7aa042..a12058a 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -376,6 +376,10 @@ public:
         XMLTextImportHelper& rHlp,              /// Text import helper
         sal_uInt16 nPrfx,                       /// namespace prefix
         const OUString& sLocalName);     /// element name w/o prefix
+    XMLPageContinuationImportContext(
+        SvXMLImport& rImport,
+        XMLTextImportHelper& rHlp,
+        sal_Int32 Element );
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index e603766..cbfbd33 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -902,6 +902,20 @@ XMLPageContinuationImportContext::XMLPageContinuationImportContext(
     bValid = true;
 }
 
+XMLPageContinuationImportContext::XMLPageContinuationImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_page_number, Element ),
+    sPropertySubType(sAPI_sub_type),
+    sPropertyUserText(sAPI_user_text),
+    sPropertyNumberingType(sAPI_numbering_type),
+    eSelectPage(PageNumberType_CURRENT),
+    sStringOK(false)
+{
+    bValid = true;
+}
+
 void XMLPageContinuationImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken, const OUString& sAttrValue )
 {
commit 89e562ff508f594dc19b88eb59a5c553462dd703
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 17:45:55 2015 +0200

    fastparser impl. for XMLDdeFieldImportContext
    
    Change-Id: Icbe7c849db862ec7c80fc5570124ba6b6db4a22a

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 6bdc5ad..b7aa042 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1161,6 +1161,9 @@ public:
                              XMLTextImportHelper& rHlp,
                              sal_uInt16 nPrfx,
                              const OUString& sLocalName);
+    XMLDdeFieldImportContext( SvXMLImport& rImport,
+                              XMLTextImportHelper& rHlp,
+                              sal_Int32 Element );
 
 protected:
     /// process attribute values
@@ -1169,6 +1172,8 @@ protected:
 
     /// create textfield, attach master, and insert into document
     virtual void EndElement() SAL_OVERRIDE;
+    virtual void endFastElement( sal_Int32 Element )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// empty method
     virtual void PrepareField(
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 2f11dfa..e603766 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3575,6 +3575,16 @@ XMLDdeFieldImportContext::XMLDdeFieldImportContext(
 {
 }
 
+XMLDdeFieldImportContext::XMLDdeFieldImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_dde, Element ),
+    sName(),
+    sPropertyContent(sAPI_content)
+{
+}
+
 void XMLDdeFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
     const OUString& sAttrValue )
@@ -3636,6 +3646,57 @@ void XMLDdeFieldImportContext::EndElement()
     // not valid: ignore
 }
 
+void XMLDdeFieldImportContext::endFastElement( sal_Int32 /*Element*/ )
+    throw( RuntimeException, SAXException, std::exception )
+{
+    if (bValid)
+    {
+        // find master
+        OUStringBuffer sBuf;
+        sBuf.appendAscii(sAPI_fieldmaster_prefix);
+        sBuf.appendAscii(sAPI_dde);
+        sBuf.append('.');
+        sBuf.append(sName);
+        OUString sMasterName = sBuf.makeStringAndClear();
+
+        Reference<XTextFieldsSupplier> xTextFieldsSupp(GetImport().GetModel(),
+                                                       UNO_QUERY);
+        Reference<container::XNameAccess> xFieldMasterNameAccess(
+            xTextFieldsSupp->getTextFieldMasters(), UNO_QUERY);
+
+        if (xFieldMasterNameAccess->hasByName(sMasterName))
+        {
+            Reference<XPropertySet> xMaster;
+            Any aAny = xFieldMasterNameAccess->getByName(sMasterName);
+            aAny >>= xMaster;
+            //apply the content to the master
+            xMaster->setPropertyValue( sPropertyContent, uno::makeAny( GetContent()));
+            // master exists: create text field and attach
+            Reference<XPropertySet> xField;
+            sBuf.appendAscii(sAPI_textfield_prefix);
+            sBuf.appendAscii(sAPI_dde);
+            if (CreateField(xField, sBuf.makeStringAndClear()))
+            {
+                Reference<XDependentTextField> xDepTextField(xField,UNO_QUERY);
+                xDepTextField->attachTextFieldMaster(xMaster);
+
+                // attach field to document
+                Reference<XTextContent> xTextContent(xField, UNO_QUERY);
+                if (xTextContent.is())
+                {
+                    GetImportHelper().InsertTextContent(xTextContent);
+
+                    // we're lucky. nothing else to prepare.
+                }
+                // else: fail, because text content could not be created
+            }
+            // else: fail, because field could not be created
+        }
+        // else: fail, because no master was found (faulty document?!)
+    }
+    // not valid: ignore
+}
+
 void XMLDdeFieldImportContext::PrepareField(
     const Reference<XPropertySet> &)
 {
commit 421af826aff0ab31cbe6d286a50b25289d17daa0
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 17:39:34 2015 +0200

    fastparser impl. for XMLMacroFieldImportContext
    
    Change-Id: I59254c61b76d5253a3dc0f45906314bfeb0b0b48

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index 4138b9b..6bdc5ad 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1020,6 +1020,9 @@ public:
                                XMLTextImportHelper& rHlp,
                                sal_uInt16 nPrfx,
                                const OUString& sLocalName);
+    XMLMacroFieldImportContext( SvXMLImport& rImport,
+                                XMLTextImportHelper& rHlp,
+                                sal_Int32 Element );
 
 protected:
     /// for <office:events> children
@@ -1028,6 +1031,10 @@ protected:
         const OUString& rLocalName,
         const ::com::sun::star::uno::Reference<
         ::com::sun::star::xml::sax::XAttributeList> & xAttrList ) SAL_OVERRIDE;
+    virtual css::uno::Reference< css::xml::sax::XFastContextHandler >
+        createFastChildContext( sal_Int32 Element,
+        const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
+        throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
     /// process attribute values
     virtual void ProcessAttribute( sal_uInt16 nAttrToken,
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 0b9ffba5..2f11dfa 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2876,6 +2876,18 @@ XMLMacroFieldImportContext::XMLMacroFieldImportContext(
 {
 }
 
+XMLMacroFieldImportContext::XMLMacroFieldImportContext(
+    SvXMLImport& rImport,
+    XMLTextImportHelper& rHlp,
+    sal_Int32 Element )
+:   XMLTextFieldImportContext( rImport, rHlp, sAPI_macro, Element ),
+    sPropertyHint(sAPI_hint),
+    sPropertyMacroName("MacroName"),
+    sPropertyScriptURL("ScriptURL"),
+    bDescriptionOK(false)
+{
+}
+
 SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext(
     sal_uInt16 nPrefix,
     const OUString& rLocalName,
@@ -2899,6 +2911,25 @@ SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext(
     return pContext;
 }
 
+Reference< XFastContextHandler > XMLMacroFieldImportContext::createFastChildContext(
+    sal_Int32 Element,
+    const Reference< XFastAttributeList >& xAttrList )
+    throw( RuntimeException, SAXException, std::exception )
+{
+    Reference< XFastContextHandler > pContext = NULL;
+
+    if( Element == (NAMESPACE | XML_NAMESPACE_OFFICE | XML_event_listeners) )
+    {
+        // create events context and remember it!
+        pContext = new XMLEventsImportContext( GetImport(), Element );
+        xEventContext = static_cast< SvXMLImportContext *>( pContext.get() );
+        bValid = true;
+    }
+    else
+        pContext = SvXMLImportContext::createFastChildContext( Element, xAttrList );
+
+    return pContext;
+}
 
 void XMLMacroFieldImportContext::ProcessAttribute(
     sal_uInt16 nAttrToken,
commit 3fdf16115ed1c567c0f49932a4646a865b1e914b
Author: Daniel Sikeler <d.sikeler94 at gmail.com>
Date:   Fri Aug 21 17:29:19 2015 +0200

    fastparser impl. for XMLReferenceFieldImportContext
    
    Change-Id: I3f6f65896b1d81c6812dca962dd65a983053f803

diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
index afa6d0e..4138b9b 100644
--- a/xmloff/inc/txtfldi.hxx
+++ b/xmloff/inc/txtfldi.hxx
@@ -1063,12 +1063,19 @@ public:
                                    sal_uInt16 nToken,
                                    sal_uInt16 nPrfx,
                                    const OUString& sLocalName);
+    XMLReferenceFieldImportContext( SvXMLImport& rImport,
+                                    XMLTextImportHelper& rHlp,
+                                    sal_uInt16 nToken,
+                                    sal_Int32 Element );
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list