[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 23822 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source android/abs-lib android/Bootstrap android/CustomTarget_android_desktop.mk android/CustomTarget_lo4android.mk android/CustomTarget_lo_android.mk android/default-document android/experimental android/.gitignore android/Makefile android/mobile-config.py android/Module_android.mk android/README android/source animations/Library_animcore.mk animations/source apple_remote/source autogen.sh avmedia/inc avmedia/Library_avmediagst_0_10.mk avmedia/Library_avmediagst.mk avmedia/Library_avmedia.mk avmedia/Library_avmediaogl.mk avmedia/Library_avmediavlc.mk avmedia/Module_avmedia.mk avmedia/source avmedia/util basctl/AllLangResTarget_basctl.mk basctl/inc basctl/Module_basctl.mk basctl/source basctl/uiconfig basctl/UIConfig_basicide.mk basebmp/CppunitTest_basebmp.mk basebmp/Library_basebmp.mk basebmp/Module_basebmp.mk basebmp/source basebmp/test b asegfx/CppunitTest_basegfx.mk basegfx/inc basegfx/Library_basegfx.mk basegfx/source basegfx/test basic/CppunitTest_basic_coverage.mk basic/CppunitTest_basic_enable.mk basic/CppunitTest_basic_nested_struct.mk basic/CppunitTest_basic_scanner.mk basic/CppunitTest_basic_vba.mk basic/inc basic/Library_sb.mk basic/Module_basic.mk basic/qa basic/source basic/util bean/com bean/Jar_officebean.mk bean/Library_officebean.mk bean/native bean/qa bean/README bean/test binaryurp/qa binaryurp/source bin/benchmark-document-loading bin/convwatch.py bin/count-todo-dialogs bin/distro-install-desktop-integration bin/distro-install-file-lists bin/distro-install-sdk bin/extract-tooltip.py bin/find-german-comments bin/findunusedcode bin/find-unused-defines.awk bin/find-unused-defines.sh bin/fixincludeguards.sh bin/gbuild-to-ide bin/generate-bash-completion bin/gen-iwyu-dummy-lib bin/gen-iwyu-dummy-lib.awk bin/get-bugzilla-attachments-by-mimetype bin/lint-ui.py bin/lo-all-static-libs bin/lo-commit-stat bin /lo-generate-source-tarball bin/lolcat bin/lo-pack-sources bin/lo-xlate-lang bin/module-deps.pl bin/parse-perfcheck.py bin/refcount_leak.py bin/rename-sw-abbreviations.sh bin/run bin/test-hid-vs-ui.py bin/unpack-sources bin/update_pch.sh bridges/inc bridges/Jar_java_uno.mk bridges/Library_cpp_uno.mk bridges/source bridges/test canvas/Library_cairocanvas.mk canvas/Library_directx9canvas.mk canvas/Library_gdipluscanvas.mk canvas/Library_oglcanvas.mk canvas/Module_canvas.mk canvas/opengl canvas/Package_opengl.mk canvas/source canvas/StaticLibrary_directxcanvas.mk canvas/workben chart2/AllLangResTarget_chartcontroller.mk chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import.mk chart2/CppunitTest_chart2_trendcalculators.mk chart2/CppunitTest_chart2_xshape.mk chart2/inc chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/Library_chartopengl.mk chart2/Module_chart2.mk chart2/opengl chart2/Package_opengl.mk chart2/qa chart2/README chart2/source chart2/uiconfi g chart2/UIConfig_chart2.mk clew/Library_clew.mk clew/Makefile clew/Module_clew.mk clew/source cli_ure/CustomTarget_cli_ure_assemblies.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/qa cli_ure/readme.txt cli_ure/source codemaker/source codemaker/test comphelper/inc comphelper/Library_comphelper.mk comphelper/qa comphelper/source compilerplugins/clang compilerplugins/Makefile-clang.mk config.guess config_host/config_cairo_canvas.h.in config_host/config_cups.h.in config_host/config_extension_update.h.in config_host/config_features.h.in config_host/config_folders.h.in config_host/config_global.h.in config_host/config_java.h.in config_host/config_liblangtag.h.in config_host/config_oauth2.h.in config_host/config_opengl.h.in config_host/config_poppler.h.in config_host/config_vcl.h.in config_host_lang.mk.in config_host.mk.in configmgr/CppunitTest_configmgr_unit.mk configmgr/inc configmgr/Library_configmgr.mk configmgr/Module_configmgr.mk configmgr/qa configmgr/source config.sub config ure.ac connectivity/com connectivity/CppunitTest_connectivity_ado.mk connectivity/CppunitTest_connectivity_commontools.mk connectivity/CppunitTest_connectivity_mork.mk connectivity/inc connectivity/Jar_ConnectivityTools.mk connectivity/Jar_sdbc_hsqldb.mk connectivity/JunitTest_complex.mk connectivity/Library_ado.mk connectivity/Library_calc.mk connectivity/Library_dbase.mk connectivity/Library_dbpool2.mk connectivity/Library_dbtools.mk connectivity/Library_firebird_sdbc.mk connectivity/Library_mysql.mk connectivity/Library_odbc.mk connectivity/Library_postgresql-sdbc-impl.mk connectivity/Module_connectivity.mk connectivity/org connectivity/Package_postgresql-sdbc.mk connectivity/qa connectivity/registry connectivity/source connectivity/workben cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/CppunitTest_cppcanvas_test.mk cppcanvas/inc cppcanvas/Library_cppcanvas.mk cppcanvas/qa cppcanvas/source cppuhelper/inc cppuhelper/Library_cppuhelper.mk cppuhelper/qa cppuhelper/source cppuh elper/test cppu/qa cppu/source cpputools/source cppu/util crashrep/CustomTarget_crashrep_res.mk crashrep/Executable_crashrep.mk crashrep/Makefile crashrep/Module_crashrep.mk crashrep/README crashrep/source crashrep/WinResTarget_crashrep.mk cui/AllLangResTarget_cui.mk cui/inc cui/Library_cui.mk cui/README cui/source cui/uiconfig cui/UIConfig_cui.mk dbaccess/AllLangResTarget_dbu.mk dbaccess/CppunitTest_dbaccess_dialog_save.mk dbaccess/CppunitTest_dbaccess_embeddeddb_performancetest.mk dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk dbaccess/CppunitTest_dbaccess_firebird_test.mk dbaccess/CppunitTest_dbaccess_hsqldb_test.mk dbaccess/CppunitTest_dbaccess_macros_test.mk dbaccess/CppunitTest_dbaccess_nolib_save.mk dbaccess/CppunitTest_dbaccess_RowSetClones.mk dbaccess/inc dbaccess/JunitTest_dbaccess_complex.mk dbaccess/Library_dbaxml.mk dbaccess/Library_dbmm.mk dbaccess/Library_dbu.mk dbaccess/Library_sdbt.mk dbaccess/Module_dbaccess.mk dbaccess/PythonTest_dbaccess_python.mk dbaccess/qa dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk dbaccess/util desktop/AllLangResTarget_deploymentgui.mk desktop/CppunitTest_desktop_version.mk desktop/Executable_crashrep_com.mk desktop/Executable_soffice_bin.mk desktop/Executable_soffice.mk desktop/Executable_unopkg.mk desktop/inc desktop/Library_active_native.mk desktop/Library_deploymentgui.mk desktop/Library_deploymentmisc.mk desktop/Library_deployment.mk desktop/Library_libreoffice.mk desktop/Library_passive_native.mk desktop/Library_sofficeapp.mk desktop/Module_desktop.mk desktop/Package_sbase_sh.mk desktop/Package_scalc_sh.mk desktop/Package_scripts.mk desktop/Package_sdraw_sh.mk desktop/Package_simpress_sh.mk desktop/Package_smath_sh.mk desktop/Package_swriter_sh.mk desktop/Pagein_common.mk desktop/qa desktop/scripts desktop/source desktop/StaticLibrary_winextendloaderenv.mk desktop/StaticLibrary_winloader.mk desktop/test desktop/uiconfig desktop/UIConfig_deployment.mk desktop/unx desktop/win32 dictionaries distro-configs/LibreOfficeAndroidAarch64.conf distro-configs/LibreOfficeAndroid.conf distro-configs/LibreOfficeAndroidX86.conf distro-configs/LibreOfficeCoverity.conf distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeMacOSX64.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeOpenBSD.conf distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.conf distro-configs/OxygenOfficeLinux.conf download.lst drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/README drawinglayer/source dtrans/source dtrans/test editeng/CppunitTest_editeng_core.mk editeng/CustomTarget_generated.mk editeng/inc editeng/Library_editeng.mk editeng/Module_editeng.mk editeng/qa editeng/source embeddedobj/Library_embobj.mk embeddedobj/Library_emboleobj.mk embeddedobj/source embeddedobj/test embedserv/Library_emser.mk embedserv/source eventattacher/source extensions/AllLangResTarget_bib.mk extensions/AllLangResTarget_pcr.mk extensions/AllLangResTarget_scn.mk e xtensions/CppunitTest_extensions_test_update.mk extensions/Executable_nsplugin.mk extensions/Executable_pluginapp.bin.mk extensions/inc extensions/Library_npsoplugin.mk extensions/Library_oleautobridge.mk extensions/Library_scn.mk extensions/Library_so_activex.mk extensions/Library_so_activex_x64.mk extensions/Library_updchk.mk extensions/Module_extensions.mk extensions/Package_mdibundle.mk extensions/qa extensions/source extensions/StaticLibrary_npsoenv.mk extensions/test extensions/uiconfig extensions/UIConfig_sabpilot.mk extensions/UIConfig_sbibliography.mk extensions/UIConfig_scanner.mk extensions/UIConfig_spropctrlr.mk extensions/WinResTarget_activex.mk extensions/WinResTarget_npsoplugin.mk extensions/workben external/apache-commons external/beanshell external/boost external/clucene external/coinmp external/collada2gltf external/cppunit external/ct2n external/curl external/expat external/firebird external/freetype external/glew external/glm external/graphite external/harfbuzz e xternal/hunspell external/hyphen external/icu external/jfreereport external/jpeg-turbo external/languagetool external/lcms2 external/libabw external/libatomic_ops external/libcdr external/libcmis external/libebook external/libeot external/libetonyek external/libexttextcat external/libfreehand external/libgltf external/liblangtag external/libmariadb external/libmspub external/libmwaw external/libodfgen external/liborcus external/libpagemaker external/librevenge external/libvisio external/libwpd external/libwpg external/libwps external/libxml2 external/libxmlsec external/libxslt external/lpsolve external/mdds external/Module_external.mk external/more_fonts external/mysqlcppconn external/mythes external/neon external/np_sdk external/nss external/opencollada external/openldap external/openssl external/owncloud-android-lib external/poppler external/python3 external/redland external/rhino external/unixODBC external/vigra extras/AllLangPackage_autotextshare.mk extras/CustomTarget_autocorr. mk extras/CustomTarget_autotextshare.mk extras/CustomTarget_autotextuser.mk extras/Module_extras.mk extras/Package_autocorr.mk extras/Package_autotextuser.mk extras/Package_palettes.mk extras/Package_tplofficorr.mk extras/Package_tploffimisc.mk extras/Package_tplpersonal.mk extras/Package_tplpresnt.mk extras/Package_tpl_styles.mk extras/README extras/source filter/Configuration_filter.mk filter/CppunitTest_filter_dxf_test.mk filter/CppunitTest_filter_eps_test.mk filter/CppunitTest_filter_met_test.mk filter/CppunitTest_filter_pcd_test.mk filter/CppunitTest_filter_pcx_test.mk filter/CppunitTest_filter_pict_test.mk filter/CppunitTest_filter_ppm_test.mk filter/CppunitTest_filter_priority.mk filter/CppunitTest_filter_psd_test.mk filter/CppunitTest_filter_ras_test.mk filter/CppunitTest_filter_tga_test.mk filter/CppunitTest_filter_tiff_test.mk filter/CppunitTest_filter_xslt.mk filter/Library_filterconfig.mk filter/Library_pdffilter.mk filter/Library_svgfilter.mk filter/Library_textfd.mk fi lter/Module_filter.mk filter/qa filter/source filter/uiconfig forms/inc 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 forms/util formula/inc formula/Library_for.mk formula/Module_formula.mk formula/README formula/source formula/uiconfig formula/UIConfig_formula.mk fpicker/Library_fps_office.mk fpicker/source fpicker/test fpicker/uiconfig fpicker/UIConfig_fps.mk framework/AllLangResTarget_fwe.mk framework/inc framework/JunitTest_framework_complex.mk framework/Library_fwe.mk framework/Library_fwi.mk framework/Library_fwk.mk framework/Library_fwl.mk framework/qa framework/source g .git-hooks/commit-msg .git-hooks/post-merge .git-hooks/pre-commit .gitignore helpcompiler/Executable_helpindexer.mk helpcompiler/Executable_HelpIndexer.mk helpcompiler/Executable_helplinker.mk helpcompiler/Executable_HelpLink er.mk helpcompiler/inc helpcompiler/Module_helpcompiler.mk helpcompiler/source helpcontent2 hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk hwpfilter/inc hwpfilter/Library_hwp.mk 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 i18npool/util 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/clew include/codemaker include/com include/comphelper include/connectivity include/cppcanvas include/cppu include/cpp uhelper include/cppunittester include/dbaccess include/drawinglayer include/editeng include/filter include/formula include/framework include/helpcompiler include/i18nlangtag include/i18nutil include/jvmaccess include/jvmfwk include/LibreOfficeKit include/linguistic include/o3tl include/oox include/opencl include/osl include/package include/postmac.h include/postwin.h include/postx.h include/premac.h include/prewin.h include/prex.h include/registry include/rsc include/rtl include/sal include/salhelper include/sax include/sfx2 include/shell include/sot include/store include/svl include/svtools include/svx include/systools include/test include/toolkit include/tools include/touch include/tubes include/typelib include/ucbhelper include/uno include/unoidl include/unotest include/unotools include/vbahelper include/vcl include/writerperfect include/xmloff include/xmlreader include/xmlscript instsetoo_native/CustomTarget_install.mk instsetoo_native/CustomTarget_setup.mk instsetoo_native/inc_ ooohelppack instsetoo_native/inc_openoffice instsetoo_native/inc_sdkoo instsetoo_native/Module_instsetoo_native.mk instsetoo_native/ooenv instsetoo_native/Package_instsetoo_native_ooenv.mk instsetoo_native/Package_setup.mk instsetoo_native/Package_setup_ure.mk instsetoo_native/util io/CppunitTest_io_textinputstream.mk io/Module_io.mk io/qa ios/CustomTarget_LibreOffice_app.mk ios/CustomTarget_MobileLibreOffice_app.mk ios/CustomTarget_TiledLibreOffice_app.mk ios/Executable_LibreOffice.mk ios/experimental ios/lo.xcconfig.in ios/MobileLibreOffice io/source ios/shared io/test javaunohelper/com javaunohelper/Jar_juh.mk javaunohelper/JunitTest_juh.mk javaunohelper/Module_javaunohelper.mk javaunohelper/source javaunohelper/test jurt/com jurt/Jar_jurt.mk jurt/JunitTest_java_remote.mk jurt/JunitTest_uno.mk jurt/Library_jpipe.mk jurt/source jurt/test jurt/workbench jvmaccess/source jvmfwk/CustomTarget_jvmfwk_jvmfwk3_ini.mk jvmfwk/distributions jvmfwk/inc jvmfwk/Library_jvmfwk.mk jvmfwk/Library _sunjavaplugin.mk jvmfwk/Module_jvmfwk.mk jvmfwk/Package_jreproperties.mk jvmfwk/Package_jvmfwk_jvmfwk3_ini.mk jvmfwk/Package_rcfiles.mk jvmfwk/plugins jvmfwk/README jvmfwk/source l10ntools/inc l10ntools/source leak-suppress.txt Library_merged.mk Library_urelibs.mk librelogo/CustomTarget_librelogo.mk librelogo/Module_librelogo.mk librelogo/source libreofficekit/CppunitTest_libreofficekit_tiledrendering.mk libreofficekit/Executable_gtktiledviewer.mk libreofficekit/Executable_tilebench.mk libreofficekit/Library_libreofficekitgtk.mk libreofficekit/Makefile libreofficekit/Module_libreofficekit.mk libreofficekit/qa libreofficekit/README libreofficekit/source lingucomponent/source linguistic/inc linguistic/qa linguistic/source linguistic/workben logerrit lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/qa lotuswordpro/source m4/ax_boost_base.m4 Makefile.fetch Makefile.in mysqlc/Library_mysqlc.mk mysqlc/README mysqlc/sou rce nlpsolver/Jar_EvolutionarySolver.mk nlpsolver/Jar_nlpsolver.mk nlpsolver/src nlpsolver/ThirdParty o3tl/CppunitTest_o3tl_tests.mk o3tl/qa o3tl/README odk/config odk/CppunitTest_checkapi.mk odk/CppunitTest_odk_checkapi.mk odk/CustomTarget_allheaders.mk odk/CustomTarget_check.mk odk/CustomTarget_doxygen.mk odk/CustomTarget_javadoc.mk odk/docs odk/examples odk/index.html odk/index_online.html odk/Module_odk.mk odk/Package_config.mk odk/Package_examples.mk odk/Package_odk_headers.mk odk/qa odk/README odk/settings odk/source odk/util offapi/com offapi/org offapi/type_reference offapi/UnoApi_offapi.mk officecfg/Configuration_officecfg.mk officecfg/CustomTarget_registry.mk officecfg/registry officecfg/util onlineupdate/Executable_mar.mk onlineupdate/Executable_updater.mk onlineupdate/Makefile onlineupdate/Module_onlineupdate.mk onlineupdate/README onlineupdate/source oovbaapi/ooo oox/CppunitTest_oox_tokenmap.mk oox/CustomTarget_generated.mk oox/inc oox/Library_oox.mk oox/Module_oox.mk o ox/qa oox/README oox/source opencl/inc opencl/Library_opencl.mk opencl/Makefile opencl/Module_opencl.mk opencl/README opencl/source package/inc package/Library_package2.mk package/Library_xstor.mk package/qa package/source postprocess/CppunitTest_services.mk postprocess/CustomTarget_images.mk postprocess/CustomTarget_registry.mk postprocess/CustomTarget_signing.mk postprocess/Package_images.mk postprocess/qa postprocess/Rdb_services.mk pyuno/CustomTarget_python_shell.mk pyuno/CustomTarget_pyuno_pythonloader_ini.mk pyuno/demo pyuno/inc pyuno/Library_pyuno.mk pyuno/Module_pyuno.mk pyuno/Package_python_scripts.mk pyuno/Package_pyuno_pythonloader_ini.mk pyuno/PythonTest_pytests.mk pyuno/PythonTest_pyuno_pytests_testcollections.mk pyuno/qa pyuno/source pyuno/zipcore qadevOOo/Jar_OOoRunnerLight.mk qadevOOo/Jar_OOoRunner.mk qadevOOo/Module_qadevOOo.mk qadevOOo/qa qadevOOo/runner qadevOOo/testdocs qadevOOo/tests readlicense_oo/docs readlicense_oo/license readlicense_oo/Package_files.mk READ ME.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/examples remotebridges/source reportbuilder/Jar_reportbuilder.mk reportbuilder/java reportdesign/inc reportdesign/qa reportdesign/source reportdesign/uiconfig reportdesign/UIConfig_dbreport.mk RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_build.mk RepositoryModule_host.mk ridljar/com ridljar/JunitTest_util.mk ridljar/test rsc/inc rsc/Module_rsc.mk rsc/source sal/android sal/cpprt sal/cppunittester sal/CppunitTest_sal_osl_process.mk sal/CppunitTest_sal_rtl_oustringbuffer.mk salhelper/qa salhelper/source salhelper/test sal/inc sal/Library_lo-bootstrap.mk sal/Library_sal.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/test sal/textenc sal/util sal/workben sax/CppunitTest_sax.mk sax/CppunitTest_sax_parser.mk sax/inc sax/Library_expwrap.mk sax/Library_sax.mk sa x/qa sax/source sax/test scaddins/idl scaddins/Library_analysis.mk scaddins/source sc/AllLangResTarget_sc.mk sccomp/CppunitTest_sccomp_lpsolver.mk sccomp/source sc/CppunitTest_sc_annotationobj.mk sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_annotationsobj.mk sc/CppunitTest_sc_bugfix_test.mk sc/CppunitTest_sc_cellrangeobj.mk sc/CppunitTest_sc_chart_regression_test.mk sc/CppunitTest_sc_condformats.mk sc/CppunitTest_sc_copypaste.mk sc/CppunitTest_sc_databaserangeobj.mk sc/CppunitTest_sc_datapilotfieldobj.mk sc/CppunitTest_sc_datapilottableobj.mk sc/CppunitTest_sc_editfieldobj_cell.mk sc/CppunitTest_sc_editfieldobj_header.mk sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_html_export_test.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_modelobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_new_cond_format_api.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_outlineobj.mk sc/CppunitTest_sc_perfobj.mk sc/CppunitTest _sc_rangelst_test.mk sc/CppunitTest_sc_recordchanges.mk sc/CppunitTest_sc_styleloaderobj.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_tableautoformatfield.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/CppunitTest_sc_ucalc.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/Library_scopencl.mk sc/Library_scqahelper.mk sc/Library_scui.mk sc/Library_vbaobj.mk sc/Module_sc.mk scp2/AutoInstall.mk scp2/inc scp2/InstallModule_accessories.mk scp2/InstallModule_activex.mk scp2/InstallModule_base.mk scp2/InstallModule_calc.mk scp2/InstallModule_crashrep.mk scp2/InstallModule_draw.mk scp2/InstallModule_extensions.mk scp2/InstallModule_gra phicfilter.mk scp2/InstallModule_impress.mk scp2/InstallModule_math.mk scp2/InstallModule_ooo.mk scp2/InstallModule_python.mk scp2/InstallModule_quickstart.mk scp2/InstallModule_ure.mk scp2/InstallModule_winexplorerext.mk scp2/InstallModule_writer.mk scp2/InstallModule_xsltfilter.mk scp2/InstallScript_setup_osl.mk scp2/Module_scp2.mk scp2/source sc/qa sc/README scripting/astyle.options scripting/examples scripting/Format_java_code.sh scripting/java scripting/Library_vbaevents.mk scripting/Module_scripting.mk scripting/Pyuno_mailmerge.mk scripting/README scripting/source scripting/workben sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sc/util sc/workben sd/AllLangResTarget_sd.mk sd/CppunitTest_sd_export_tests.mk sd/CppunitTest_sd_filters_test.mk sd/CppunitTest_sd_html_export_tests.mk sd/CppunitTest_sd_import_tests.mk sd/CppunitTest_sd_tiledrendering.mk sd/CppunitTest_sd_uimpress.mk sdext/CppunitTest_sdext_pdfimport.mk sdext/inc sdext/Library_pdfimport.mk sdext/Library_Presentation Minimizer.mk sdext/Library_PresenterScreen.mk sdext/source sd/inc sd/Library_sdd.mk sd/Library_sd.mk sd/Module_sd.mk sd/qa sd/README_REMOTE sd/sdi sd/source sd/uiconfig sd/UIConfig_simpress.mk sd/util sd/workben setup_native/Library_getuid.mk setup_native/Library_regpatchactivex.mk setup_native/Library_sellangmsi.mk setup_native/Library_shlxtmsi.mk setup_native/Module_setup_native.mk setup_native/Package_scripts.mk setup_native/scripts setup_native/source sfx2/AllLangResTarget_sfx2.mk 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 sfx2/UIConfig_sfx.mk sfx2/util shell/Executable_gnome_open_url.mk 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/Module_shell.mk shell/Package_scripts_kde.mk shell/qa shell /source shell/StaticLibrary_shlxthandler_common.mk shell/StaticLibrary_shlxthandler_common_x64.mk slideshow/inc slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk slideshow/Module_slideshow.mk slideshow/opengl slideshow/Package_opengl.mk slideshow/source slideshow/test smoketest/com smoketest/data smoketest/Executable_libtest.mk smoketest/libtest.cxx smoketest/Module_smoketest.mk smoketest/org solenv/bin solenv/doc solenv/gbuild solenv/gcc-wrappers solenv/gdb solenv/inc solenv/README soltools/cpp soltools/mkdepend sot/inc sot/Library_sot.mk sot/qa sot/source sot/workben starmath/CppunitTest_starmath_import.mk starmath/CppunitTest_starmath_qa_cppunit.mk starmath/inc starmath/Library_sm.mk starmath/Module_starmath.mk starmath/qa starmath/sdi starmath/source starmath/uiconfig starmath/UIConfig_smath.mk starmath/util stoc/inc stoc/Library_bootstrap.mk stoc/Library_javaloader.mk stoc/Library_stocservices.mk stoc/source stoc/test stoc/util store/Library_store.mk store/source sto re/workben svgio/CppunitTest_svgio.mk svgio/inc svgio/Library_svgio.mk svgio/qa svgio/source svl/CppunitTest_svl_itempool.mk svl/CppunitTest_svl_items.mk svl/CppunitTest_svl_notify.mk svl/CppunitTest_svl_qa_cppunit.mk svl/inc svl/Library_svl.mk svl/Module_svl.mk svl/qa svl/README svl/source svl/unx svl/util svtools/CppunitTest_svtools_graphic.mk svtools/inc svtools/langsupport svtools/Library_svt.mk svtools/Module_svtools.mk svtools/qa svtools/README svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/AllLangResTarget_ofa.mk svx/AllLangResTarget_svx.mk svx/CppunitTest_svx_unit.mk svx/Executable_gengal.mk svx/Executable_pixelctl.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/README svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util svx/workben sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_docbookexport.mk sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_globalfilter.mk sw/CppunitTest_sw_htmlexport.mk sw/CppunitTest_sw_htmlimport.m k sw/CppunitTest_sw_layout_test.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_mailmerge.mk sw/CppunitTest_sw_odfexport.mk sw/CppunitTest_sw_odfimport.mk sw/CppunitTest_sw_ooxmlexport2.mk sw/CppunitTest_sw_ooxmlexport3.mk sw/CppunitTest_sw_ooxmlexport4.mk sw/CppunitTest_sw_ooxmlexport5.mk sw/CppunitTest_sw_ooxmlexport6.mk sw/CppunitTest_sw_ooxmlexport7.mk sw/CppunitTest_sw_ooxmlexport.mk sw/CppunitTest_sw_ooxmlfieldexport.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_ooxmlsdrexport.mk sw/CppunitTest_sw_ooxmlw14export.mk sw/CppunitTest_sw_rtfexport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_tiledrendering.mk sw/CppunitTest_sw_uiwriter.mk sw/CppunitTest_sw_uwriter.mk sw/CppunitTest_sw_ww8export.mk sw/CppunitTest_sw_ww8import.mk sw/CustomTarget_generated.mk sw/Executable_tiledrendering.mk swext/Extension_wiki-publisher.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/Juni tTest_sw_unoapi.mk sw/Library_msword.mk sw/Library_swd.mk sw/Library_sw.mk sw/Library_swui.mk sw/Library_vbaswobj.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_swriter.mk sw/util sysui/CustomTarget_deb.mk sysui/CustomTarget_share.mk sysui/CustomTarget_solaris.mk sysui/desktop sysui/Package_osxicons.mk sysui/productlist.mk test/Library_subsequenttest.mk test/Library_test.mk test/Library_vclbootstrapprotector.mk test/Module_test.mk test/Package_unittest.mk test/source testtools/com testtools/CustomTarget_uno_test.mk testtools/qa testtools/source test/user-template 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/CustomTarget_reversemap.mk tool s/inc tools/Library_tl.mk tools/qa tools/source tools/test touch/CustomTarget_touch_javamaker.mk touch/idl touch/InternalUnoApi_touch.mk touch/Library_libotouch.mk touch/Makefile touch/Module_touch.mk touch/README touch/source translations tubes/source ucbhelper/Library_ucbhelper.mk ucbhelper/source ucb/Library_cached1.mk ucb/Library_srtrs1.mk ucb/Library_ucpcmis1.mk ucb/Library_ucpdav1.mk ucb/Library_ucpftp1.mk ucb/qa ucb/source ucb/test ucb/workben udkapi/com udkapi/type_reference UnoControls/inc UnoControls/Makefile UnoControls/source unodevtools/source unoidl/README unoidl/source unotest/Library_unobootstrapprotector.mk unotest/Library_unotest.mk unotest/source unotools/CppunitTest_unotools_fontdefs.mk unotools/inc unotools/JunitTest_unotools_complex.mk unotools/Module_unotools.mk unotools/qa unotools/source unoxml/CppunitTest_unoxml_domtest.mk unoxml/inc unoxml/Library_unoxml.mk unoxml/Module_unoxml.mk unoxml/qa unoxml/source unoxml/test unusedcode.easy ure/Package_install.mk u re/Rdb_ure.mk ure/source uui/AllLangResTarget_uui.mk uui/inc uui/Library_uui.mk uui/source uui/uiconfig uui/UIConfig_uui.mk vbahelper/inc vbahelper/Library_msforms.mk vbahelper/Library_vbahelper.mk vbahelper/Module_vbahelper.mk vbahelper/source vcl/android vcl/CppunitTest_vcl_bitmap_test.mk vcl/CppunitTest_vcl_complextext.mk vcl/CppunitTest_vcl_filters_test.mk vcl/CppunitTest_vcl_fontcharmap.mk vcl/CppunitTest_vcl_lifecycle.mk vcl/CppunitTest_vcl_outdev.mk vcl/CppunitTest_vcl_timer.mk vcl/CppunitTest_vcl_wmf_test.mk vcl/CustomTarget_afm_hash.mk vcl/Executable_icontest.mk vcl/Executable_mtfdemo.mk vcl/Executable_outdevgrind.mk vcl/Executable_svdemo.mk vcl/Executable_svpclient.mk vcl/Executable_svptest.mk vcl/Executable_tdefilepicker.mk vcl/Executable_ui-previewer.mk vcl/Executable_vcldemo.mk vcl/Executable_xid_fullscreen_on_all_monitors.mk vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/Library_vclopengl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3.mk vcl/Li brary_vclplug_gtk.mk vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk vcl/Library_vclplug_svp.mk vcl/Library_vclplug_tde.mk vcl/Module_vcl.mk vcl/null vcl/opengl vcl/osx vcl/Package_fontunxppds.mk vcl/Package_opengl_blacklist.mk vcl/Package_opengl.mk vcl/qa vcl/quartz vcl/README vcl/README.GDIMetaFile vcl/README.lifecycle vcl/source vcl/StaticLibrary_glxtest.mk vcl/StaticLibrary_headless.mk vcl/uiconfig 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/Package_access2base.mk wizards/source writerfilter/CppunitTest_writerfilter_misc.mk writerfilter/CppunitTest_writerfilter_rtftok.mk writerfilter/CustomTarget_source.mk writerfilter/documentation writerfilter/inc writerfilter/Library_writerfilter.mk writerfilter/qa writerfilter/README writerfilter/source writerfilter/util writerperfect/astyle.options writerperfect/CppunitTest_writerperfect_calc.mk wr iterperfect/CppunitTest_writerperfect_draw.mk writerperfect/CppunitTest_writerperfect_impress.mk writerperfect/CppunitTest_writerperfect_stream.mk writerperfect/CppunitTest_writerperfect_writer.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/README writerperfect/source writerperfect/uiconfig writerperfect/UIConfig_writerperfect.mk xmerge/source xmlhelp/Library_ucpchelp1.mk xmlhelp/source xmloff/CppunitTest_xmloff_uxmloff.mk xmloff/dtd xmloff/inc xmloff/Library_xof.mk xmloff/Library_xo.mk xmloff/Module_xmloff.mk xmloff/qa xmloff/source xmlreader/source xmlscript/dtd xmlscript/inc xmlscript/Library_xmlscript.mk xmlscript/source xmlscript/test xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_fw.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecuri ty/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/test_docs xmlsecurity/uiconfig xmlsecurity/UIConfig_xmlsec.mk xmlsecurity/workben

matteocam matteo.campanelli at gmail.com
Mon Jul 6 09:12:48 PDT 2015


Rebased ref, commits from common ancestor:
commit 591eb2f97dbcb8738d0c70667d974123cb1ff2fd
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat Jul 4 17:01:50 2015 -0400

    Added implementation of EditEng::GetStatusEvenHdl
    
    Change-Id: I176e0ca3645cb5cc95b33f6aa6b7e1b8776d3abd

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6b4b206..419cd1f 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1523,6 +1523,11 @@ void EditEngine::SetStatusEventHdl( const Link<>& rLink )
     pImpEditEngine->SetStatusEventHdl( rLink );
 }
 
+Link<> EditEngine::GetStatusEventHdl() const
+{
+    return pImpEditEngine->GetStatusEventHdl();
+}
+
 void EditEngine::SetChainingEventHdl( const Link<>& rLink )
 {
     pImpEditEngine->SetChainingEventHdl( rLink );
commit f11002bd63b66b71cd3f9fac86819cf9acf5656a
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat Jul 4 11:34:35 2015 -0400

    Fixed small svx issues with EditStat's refactoring
    
    Change-Id: I8c9e078a9180a5210db425cac30e86df69ace2c3

diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 055fd4c..823ef0d 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -265,7 +265,7 @@ namespace drawinglayer
             bool bInEditMode,
             bool bFixedCellHeight,
             bool bWrongSpell,
-	    bool bIsToBeChained,
+        bool bIsToBeChained,
             bool bChainable)
         :   mpSdrTextAttribute(
                 ImpSdrTextAttribute(
@@ -273,7 +273,7 @@ namespace drawinglayer
                     aTextUpperDistance, aTextRightDistance, aTextLowerDistance,
                     aSdrTextHorzAdjust, aSdrTextVertAdjust, bContour, bFitToSize, bAutoFit,
                     bHideContour, bBlink, bScroll, bInEditMode, bFixedCellHeight, bWrongSpell,
-		    bIsToBeChained, bChainable))
+            bIsToBeChained, bChainable))
         {
         }
 
@@ -282,13 +282,6 @@ namespace drawinglayer
         {
         }
 
-        SdrTextAttribute::SdrTextAttribute(bool bIsToBeChained)
-        :   mpSdrTextAttribute(ImpSdrTextAttribute::get_global_default())
-        {
-            mpSdrTextAttribute->mbToBeChained = bIsToBeChained;
-            mpSdrTextAttribute->mnRefCount++;
-        }
-
         SdrTextAttribute::SdrTextAttribute(const SdrTextAttribute& rCandidate)
         :   mpSdrTextAttribute(rCandidate.mpSdrTextAttribute)
         {
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 5602e1e..2260188 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -222,7 +222,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
     /* Start Text Chaining related code */
 
     // Initialize Chaining Outliner
-    pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
+    pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, *this );
     ImpSetOutlinerDefaults(pChainingOutliner, true);
 
     // Make a TextChain //XXX: There should not be only one - XXX: Prototype code
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 1c1954c..954f261 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1443,13 +1443,13 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 
     SdrTextVertAdjust eVAdj = GetTextVerticalAdjust(rTextItemSet);
     SdrTextHorzAdjust eHAdj = GetTextHorizontalAdjust(rTextItemSet);
-    const sal_uInt32 nOriginalControlWord(rOutliner.GetControlWord());
+    const EEControlBits nOriginalControlWord(rOutliner.GetControlWord());
     const Size aNullSize;
 
     // set visualizing page at Outliner; needed e.g. for PageNumberField decomposition
     rOutliner.setVisualizedPage(GetSdrPageFromXDrawPage(aViewInformation.getVisualizedPage()));
 
-    rOutliner.SetControlWord(nOriginalControlWord|EE_CNTRL_AUTOPAGESIZE|EE_CNTRL_STRETCHING);
+    rOutliner.SetControlWord(nOriginalControlWord|EEControlBits::AUTOPAGESIZE|EEControlBits::STRETCHING);
     rOutliner.SetMinAutoPaperSize(aNullSize);
     rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000));
 
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 56261f1..72dc010 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -67,8 +67,8 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
 
     // disable AUTOPAGESIZE
     if ( IsChainable() ) {
-        sal_uIntPtr nStat1=rOutl.GetControlWord();
-        nStat1 &=~EE_CNTRL_AUTOPAGESIZE;
+        EEControlBits nStat1=rOutl.GetControlWord();
+        nStat1 &=~EEControlBits::AUTOPAGESIZE;
         rOutl.SetControlWord(nStat1);
     }
 
commit 7050ad257815c27bcc3044964ac8c441b6cfd6f4
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat Jul 4 03:49:39 2015 -0400

    Removed SetStatusEventHdl1
    
    Change-Id: Iad37f469b1a022b05b633d49787f4c12cbdcbe8a

diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 1d6c978..bc2bc08 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -123,7 +123,6 @@ void Outliner::SetChainingEventHdl( const Link<>& rLink )
     pEditEngine->SetChainingEventHdl( rLink );
 }
 
-
 void Outliner::SetNotifyHdl( const Link<>& rLink )
 {
     pEditEngine->aOutlinerNotifyHdl = rLink;
@@ -145,11 +144,6 @@ Link<> Outliner::GetStatusEventHdl() const
     return pEditEngine->GetStatusEventHdl();
 }
 
-void Outliner::SetStatusEventHdl1( const Link& rLink )
-{
-    pEditEngine->SetStatusEventHdl1( rLink );
-}
-
 void Outliner::SetDefTab( sal_uInt16 nTab )
 {
     pEditEngine->SetDefTab( nTab );
commit e937fefa7a9b17eb7470b6f4d1bbc969fa45b6e2
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Sat Jul 4 03:43:01 2015 -0400

    ImpEditEngine's rebasing issues solved
    
    Change-Id: I5d8811d8702aefdea30f7a1afaf1b9ccb30c45f6

diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 14e49fd..82fd6cd 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -576,7 +576,7 @@ void ImpEditEngine::CheckPageOverflow()
 
     sal_uInt32 nBoxHeight = GetMaxAutoPaperSize().Height();
     fprintf(stderr, "[OVERFLOW-CHECK] Current MaxAutoPaperSize is %d\n", nBoxHeight);
-    fprintf(stderr, "[CONTROL_STATUS] AutoPageSize is %s",  ( aStatus.GetControlWord() & EE_CNTRL_AUTOPAGESIZE ) ? "ON\n" : "OFF\n" );
+    fprintf(stderr, "[CONTROL_STATUS] AutoPageSize is %s",  ( aStatus.GetControlWord() & EEControlBits::AUTOPAGESIZE ) ? "ON\n" : "OFF\n" );
 
     sal_uInt32 nTxtHeight = CalcTextHeight(NULL);
 
@@ -590,12 +590,12 @@ void ImpEditEngine::CheckPageOverflow()
     {
         // which paragraph is the first to cause higher size of the box?
         ImplUpdateOverflowingParaNum( nBoxHeight); // XXX: currently only for horizontal text
-        aStatus.SetPageOverflow(true);
+        //aStatus.SetPageOverflow(true);
         mbNeedsChainingHandling = true;
     } else
     {
         // No overflow if withing box boundaries
-        aStatus.SetPageOverflow(false);
+        //aStatus.SetPageOverflow(false);
         mbNeedsChainingHandling = false;
     }
 
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c3e177b..fadcb81 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1008,12 +1008,6 @@ EditTextObject* ImpEditEngine::GetEmptyTextObject()
     return CreateTextObject( aEmptySel );
 }
 
-sal_uInt32 ImpEditEngine::WriteHTML( SvStream&, EditSelection )
-{
-    return 0;
-}
-
-
 EditTextObject* ImpEditEngine::CreateTextObject()
 {
     EditSelection aCompleteSelection;
commit dfbd7fe25aec7330e2f599bfa1c9fb1f55cb1426
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 15:24:04 2015 -0400

    Moved setting outliner mode
    
    Change-Id: I442a08d76fe201a0f26eb4d64a59ae00c9df1fed

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 3e40b92..49284f6 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -57,11 +57,13 @@ OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, Ou
 
     // Simply Juxtaposing; no within-para merging
     OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj);
+    // the OutlinerParaObject constr. at the prev line gives no valid outliner mode, so we set it
+    pOverflowingPObj->SetOutlinerMode(pOutl->GetOutlinerMode());
     pOutl->SetText(*pOverflowingPObj);
     pOutl->AddText(*pNextPObj);
 
     OutlinerParaObject *pPObj = pOutl->CreateParaObject();
-    pPObj->SetOutlinerMode(pOutl->GetOutlinerMode());
+    //pPObj->SetOutlinerMode(pOutl->GetOutlinerMode());
     return pPObj;
 }
 
commit f1a81b99e8c53f4565beea6617d71fc04891bb9f
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 15:16:21 2015 -0400

    All chaining code converted to EditTextObject approach
    
    Change-Id: I4a80b9424eafb7e14f9912e965caf03b42b42e65

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 5750992..301ee0c 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2108,7 +2108,6 @@ NonOverflowingText *Outliner::GetNonOverflowingText() const
     // last non-overflowing paragraph is before the first overflowing one
     sal_Int32 nCount = pEditEngine->GetOverflowingParaNum();
     sal_Int32 nOverflowLine = pEditEngine->GetOverflowingLineNum();
-    OUString aPreOverflowingTxt("");
 
     // Defensive check: oveflowing para index beyond actual # of paragraphs?
     if ( nCount > GetParagraphCount()-1) {
@@ -2119,20 +2118,23 @@ NonOverflowingText *Outliner::GetNonOverflowingText() const
         return NULL;
     }
 
+     if (nCount < 0)
+     {
+        fprintf(stderr,
+                "[Overflowing] No Overflowing text but GetNonOverflowinText called?!\n");
+        return NULL;
+     }
+
     // Only overflowing text, i.e. 1st line of 1st paragraph overflowing
-    if ( nCount == 0 && nOverflowLine == 0)
+    bool bItAllOverflew = nCount == 0 && nOverflowLine == 0;
+    if ( bItAllOverflew )
     {
-        OutlinerParaObject* pEmptyPObj = GetEmptyParaObject();
-        return new NonOverflowingText(pEmptyPObj, "");
-
-    } else if (nCount < 0) { // No overflowing Text: all para-s included
-        nCount = GetParagraphCount();
-        // aPreOverflowingText == ""
+        ESelection aEmptySel(0,0,0,0);
+        EditTextObject *pTObj = pEditEngine->CreateTextObject(aEmptySel);
+        return new NonOverflowingText(pTObj);
     } else { // Get the lines that of the overflowing para fit in the box
 
-        // XXX: Is there a proper method to join lines in a single string?
         sal_Int32 nOverflowingPara = nCount;
-        OUString aWholeTxtHeadPara = GetText(GetParagraph(nOverflowingPara));
         sal_uInt32 nLen = 0;
 
         for ( sal_Int32 nLine = 0;
@@ -2148,7 +2150,7 @@ NonOverflowingText *Outliner::GetNonOverflowingText() const
         ESelection aNonOverflowingTextSelection;
         if (nLen == 0) {
             // XXX: What happens inside this case might be dependent on the joining paragraps or not-thingy
-            // Overflowing paragraph is empty: it's not "Non-Overflowing" text then
+            // Overflowing paragraph is empty or first line overflowing: it's not "Non-Overflowing" text then
             sal_Int32 nParaLen = GetText(GetParagraph(nOverflowingPara-1)).getLength();
             aNonOverflowingTextSelection =
                 ESelection(nStartPara, nStartPos, nOverflowingPara-1, nParaLen);
@@ -2159,21 +2161,7 @@ NonOverflowingText *Outliner::GetNonOverflowingText() const
         }
         EditTextObject *pTObj = pEditEngine->CreateTextObject(aNonOverflowingTextSelection);
         return new NonOverflowingText(pTObj);
-
-
-        /*  END  Experiment with ESelection and EditTextobject */
-
-        // XXX: Any separator to be included?
-        aPreOverflowingTxt = aWholeTxtHeadPara.copy(0, nLen);
     }
-
-    OutlinerParaObject *pHeadParas;
-    if (nCount == 0) // No text to save expect for the one in the overflowing para (i.e. aPreOverflowingTxt)
-        pHeadParas = NULL;
-    else
-        pHeadParas = CreateParaObject(0, nCount);
-
-    return new NonOverflowingText(pHeadParas, aPreOverflowingTxt);
 }
 
 OutlinerParaObject *Outliner::GetEmptyParaObject() const
@@ -2201,19 +2189,10 @@ OverflowingText *Outliner::GetOverflowingText() const
         return NULL;
     }
 
-    OUString aHeadTxt, aTailTxt("");
-    OutlinerParaObject *pMidParas = NULL;
 
 
     sal_Int32 nHeadPara = pEditEngine->GetOverflowingParaNum();
     sal_uInt32 nParaCount = GetParagraphCount();
-    sal_Int32 nTailPara = nParaCount-1;
-    sal_Int32 nMidParas = nTailPara-nHeadPara-1;
-
-    // Set the head text
-    // XXX: Is there a proper method to join lines in a single string?
-    OUString aWholeTxtHeadPara = GetText(GetParagraph(nHeadPara));
-
 
     sal_uInt32 nLen = 0;
     for ( sal_Int32 nLine = 0;
@@ -2235,23 +2214,6 @@ OverflowingText *Outliner::GetOverflowingText() const
 
     /* END experiment ESel */
 
-    // XXX: Any separator to be included?
-    aHeadTxt = aWholeTxtHeadPara.copy(nLen);
-
-
-    // If there is at least one more paragraph overflowing
-    if (nTailPara > nHeadPara) {
-        // Get text of last paragraph
-        aTailTxt = GetText(GetParagraph(nTailPara));
-    }
-
-    if (nMidParas > 0) {
-        // Get everything between first and last overflowing para
-        pMidParas = CreateParaObject(nHeadPara+1, nMidParas);
-    }
-
-    // XXX: Who deletes this?
-    return new OverflowingText(aHeadTxt, pMidParas, aTailTxt);
 }
 
 void Outliner::ClearOverflowingParaNum()
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 666f53b..3e40b92 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -26,57 +26,12 @@
 
 OutlinerParaObject *NonOverflowingText::ToParaObject(Outliner *pOutliner) const
 {
-
-    if (mpContentTextObj)
-    {
-        OutlinerParaObject *pPObj = new OutlinerParaObject(*mpContentTextObj);
-        pPObj->SetOutlinerMode(pOutliner->GetOutlinerMode());
-        return pPObj;
-    }
-
-    // XXX: Possibility: let the NonUnderflowingParaObject just be a TextEditObject created by the Outliner (by means of a selection).
-
-    /* The overflow in SdrTextObj can occur:
-     * (a) exactly at the end of a paragraph, or
-     * (b) in the middle of a paragraph.
-     *
-     * In case (a), a NonUnderflowingText object contains only the
-     * paragraphs occurred before the overflow.
-     * In case (b), a NonUnderflowingText contains also the text of the
-     * paragraph that was cut by overflow.
-    */
-
-    bool bOverflowOccurredAtEndOfPara =
-        (mPreOverflowingTxt == "") &&
-        (mpHeadParas != NULL);
-
-    if (bOverflowOccurredAtEndOfPara) {
-        // Case (a) above:
-        // Only (possibly empty) paragraphs before overflowing one.
-        pOutliner->SetText(*mpHeadParas);
-    } else {
-        // Case (b): some text is non included in any OutlinerParaObject.
-        // We have to include the non-overflowing lines from the overfl. para
-
-        // first make a ParaObject for the strings
-        pOutliner->SetToEmptyText();
-        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
-        pOutliner->SetText(mPreOverflowingTxt, pTmpPara0);
-        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
-
-        if (mpHeadParas != NULL) {
-            pOutliner->SetText(*mpHeadParas);
-            pOutliner->AddText(*pPObj);
-         } else  if (mPreOverflowingTxt != "") { // only preoverflowing txt
-            pOutliner->SetText(*pPObj);
-        } else { // no text // This case is redundant but it doesn't hurt for now
-            pOutliner->SetToEmptyText();
-        }
-    }
-
-     return pOutliner->CreateParaObject();
+    OutlinerParaObject *pPObj = new OutlinerParaObject(*mpContentTextObj);
+    pPObj->SetOutlinerMode(pOutliner->GetOutlinerMode());
+    return pPObj;
 }
 
+/*
 OUString OverflowingText::GetEndingLines() const
 {
     // If the only overflowing part is some lines in a paragraph,
@@ -91,6 +46,7 @@ OUString OverflowingText::GetHeadingLines() const
 {
     return mHeadTxt;
 }
+* */
 
 OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, OutlinerParaObject *pNextPObj)
 {
@@ -99,7 +55,7 @@ OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, Ou
         return NULL;
     }
 
-    // Simply Juxtaposing; no within para-merging
+    // Simply Juxtaposing; no within-para merging
     OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj);
     pOutl->SetText(*pOverflowingPObj);
     pOutl->AddText(*pNextPObj);
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 3e9ce3a..797264b 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -35,20 +35,7 @@ class OverflowingText
 {
 
 public:
-        OUString mHeadTxt;
-        const OutlinerParaObject *mpMidParas;
-        OUString mTailTxt;
-        // NOTE: mpMidParas and mTailTxt might be empty
-
         // Constructor
-        OverflowingText(
-            const OUString &headTxt,
-            const OutlinerParaObject *pMidParas,
-            const OUString &tailTxt)
-                : mHeadTxt(headTxt),
-                  mpMidParas(pMidParas),
-                  mTailTxt(tailTxt)
-                { }
 
         OverflowingText(EditTextObject *pTObj) : mpContentTextObj(pTObj)
         {
@@ -56,9 +43,9 @@ public:
 
         OutlinerParaObject *GetJuxtaposedParaObject(Outliner *, OutlinerParaObject *);
 
-        OUString GetHeadingLines() const;
-        OUString GetEndingLines() const;
-        bool HasOtherParas() const { return !(mTailTxt == "" && mpMidParas == NULL); }
+        //OUString GetHeadingLines() const;
+        //OUString GetEndingLines() const;
+        //bool HasOtherParas() const { return !(mTailTxt == "" && mpMidParas == NULL); }
 
 private:
     const EditTextObject *mpContentTextObj;
@@ -70,15 +57,6 @@ class NonOverflowingText {
         // NOTE: mPreOverflowingTxt might be empty
 
         // Constructor
-        NonOverflowingText(const OutlinerParaObject *pHeadParas,
-                           const OUString &preOverflowingTxt)
-        : mpHeadParas(pHeadParas),
-          mPreOverflowingTxt(preOverflowingTxt), mpContentTextObj(NULL)
-        {
-            if (pHeadParas == NULL) // Redundant line for debugging
-                DBG_ASSERT( pHeadParas != NULL, "pHeadParas is null?! All text is overflowing then" );
-        }
-
         NonOverflowingText(const EditTextObject *pTObj)
         : mpContentTextObj(pTObj)
         { }
@@ -86,9 +64,6 @@ class NonOverflowingText {
         OutlinerParaObject *ToParaObject(Outliner *) const;
 
     private:
-        const OutlinerParaObject *mpHeadParas;
-        OUString mPreOverflowingTxt;
-
         const EditTextObject *mpContentTextObj;
 };
 
commit d199624d335dfe43fa19c9a5d06ca741511d6028
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 14:49:11 2015 -0400

    No more rough setting of outliner attribs in EditingTextChainFlow
    
    Change-Id: I4c84699f383bb44981fa3ef23e334ed434900834

diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 036327c..1e63cc7 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -259,7 +259,7 @@ void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrO
     pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
 
     // Set right text attributes // XXX: Not enough: it does not handle complex attributes
-    pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool());
+    //pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool());
 }
 
 /*
commit 705d643f690497e1fbccf15c0929b77fb5b0f3ea
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 14:32:11 2015 -0400

    Fixed other wrong para index
    
    Change-Id: Ia15a01fa61870753339d6edbf75faa31e85bb602

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f873ed8..5750992 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2226,7 +2226,7 @@ OverflowingText *Outliner::GetOverflowingText() const
     sal_uInt32 nOverflowingPara = pEditEngine->GetOverflowingParaNum();
     ESelection aOverflowingTextSel;
     sal_Int32 nLastPara = nParaCount-1;
-    sal_Int32 nLastParaLen = GetText(GetParagraph(nLastPara-1)).getLength();
+    sal_Int32 nLastParaLen = GetText(GetParagraph(nLastPara)).getLength();
     aOverflowingTextSel = ESelection(nOverflowingPara, nLen,
                                      nLastPara, nLastParaLen);
 
commit 52bc11ca4a02aced88caac6a631c29ee6a0cf062
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 14:15:40 2015 -0400

    Fixed Outliner mode issue; Fixed wrong para index
    
    Change-Id: I88024bcc8280d017db10570f636f101a25d270b9

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 00b686e..f873ed8 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2226,7 +2226,7 @@ OverflowingText *Outliner::GetOverflowingText() const
     sal_uInt32 nOverflowingPara = pEditEngine->GetOverflowingParaNum();
     ESelection aOverflowingTextSel;
     sal_Int32 nLastPara = nParaCount-1;
-    sal_Int32 nLastParaLen = GetText(GetParagraph(nOverflowingPara-1)).getLength();
+    sal_Int32 nLastParaLen = GetText(GetParagraph(nLastPara-1)).getLength();
     aOverflowingTextSel = ESelection(nOverflowingPara, nLen,
                                      nLastPara, nLastParaLen);
 
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 5a7b15c..666f53b 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -28,7 +28,11 @@ OutlinerParaObject *NonOverflowingText::ToParaObject(Outliner *pOutliner) const
 {
 
     if (mpContentTextObj)
-        return new OutlinerParaObject(*mpContentTextObj);
+    {
+        OutlinerParaObject *pPObj = new OutlinerParaObject(*mpContentTextObj);
+        pPObj->SetOutlinerMode(pOutliner->GetOutlinerMode());
+        return pPObj;
+    }
 
     // XXX: Possibility: let the NonUnderflowingParaObject just be a TextEditObject created by the Outliner (by means of a selection).
 
@@ -99,7 +103,10 @@ OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, Ou
     OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj);
     pOutl->SetText(*pOverflowingPObj);
     pOutl->AddText(*pNextPObj);
-    return pOutl->CreateParaObject();
+
+    OutlinerParaObject *pPObj = pOutl->CreateParaObject();
+    pPObj->SetOutlinerMode(pOutl->GetOutlinerMode());
+    return pPObj;
 }
 
 
commit bd3f140914ddeeba6de8effeb77a49e643266c6d
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Wed Jul 1 13:29:32 2015 -0400

    EditTetxObj approach for OverflowingText; only para juxtaposition
    
    Change-Id: I98c2fe3d3d4583a8d8a5880a0df39ded30f2bed2

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index a1589de..00b686e 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2205,20 +2205,36 @@ OverflowingText *Outliner::GetOverflowingText() const
     OutlinerParaObject *pMidParas = NULL;
 
 
-    sal_uInt32 nHeadPara = pEditEngine->GetOverflowingParaNum();
+    sal_Int32 nHeadPara = pEditEngine->GetOverflowingParaNum();
     sal_uInt32 nParaCount = GetParagraphCount();
-    sal_uInt32 nTailPara = nParaCount-1;
+    sal_Int32 nTailPara = nParaCount-1;
     sal_Int32 nMidParas = nTailPara-nHeadPara-1;
 
     // Set the head text
     // XXX: Is there a proper method to join lines in a single string?
     OUString aWholeTxtHeadPara = GetText(GetParagraph(nHeadPara));
+
+
     sal_uInt32 nLen = 0;
     for ( sal_Int32 nLine = 0;
           nLine < pEditEngine->GetOverflowingLineNum();
           nLine++) {
         nLen += GetLineLen(nHeadPara, nLine);
     }
+
+    /* BEGIN experiment ESEL */
+    sal_uInt32 nOverflowingPara = pEditEngine->GetOverflowingParaNum();
+    ESelection aOverflowingTextSel;
+    sal_Int32 nLastPara = nParaCount-1;
+    sal_Int32 nLastParaLen = GetText(GetParagraph(nOverflowingPara-1)).getLength();
+    aOverflowingTextSel = ESelection(nOverflowingPara, nLen,
+                                     nLastPara, nLastParaLen);
+
+    EditTextObject *pTObj = pEditEngine->CreateTextObject(aOverflowingTextSel);
+    return new OverflowingText(pTObj);
+
+    /* END experiment ESel */
+
     // XXX: Any separator to be included?
     aHeadTxt = aWholeTxtHeadPara.copy(nLen);
 
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 23246fb..5a7b15c 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -88,6 +88,20 @@ OUString OverflowingText::GetHeadingLines() const
     return mHeadTxt;
 }
 
+OutlinerParaObject *OverflowingText::GetJuxtaposedParaObject(Outliner *pOutl, OutlinerParaObject *pNextPObj)
+{
+    if (mpContentTextObj == NULL) {
+        fprintf(stderr, "[Chaining] OverflowingText's mpContentTextObj is NULL!\n");
+        return NULL;
+    }
+
+    // Simply Juxtaposing; no within para-merging
+    OutlinerParaObject *pOverflowingPObj = new OutlinerParaObject(*mpContentTextObj);
+    pOutl->SetText(*pOverflowingPObj);
+    pOutl->AddText(*pNextPObj);
+    return pOutl->CreateParaObject();
+}
+
 
 OFlowChainedText::OFlowChainedText(Outliner *pOutl)
 {
@@ -97,6 +111,13 @@ OFlowChainedText::OFlowChainedText(Outliner *pOutl)
 
 OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner, OutlinerParaObject *pTextToBeMerged)
 {
+    // Just return the roughly merged paras fpr now
+    if (mpOverflowingTxt == NULL || pTextToBeMerged == NULL)
+        return NULL;
+
+    return mpOverflowingTxt->GetJuxtaposedParaObject(pOutliner, pTextToBeMerged );
+
+    /*
     if (mpOverflowingTxt == NULL || pTextToBeMerged == NULL)
         return NULL;
 
@@ -162,6 +183,7 @@ OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOut
     // Draw everything
     OutlinerParaObject *pNewText = pOutliner->CreateParaObject();
     return pNewText;
+    * */
 }
 
 OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *pOutliner)
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 12e1e7c..3e9ce3a 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -50,9 +50,18 @@ public:
                   mTailTxt(tailTxt)
                 { }
 
+        OverflowingText(EditTextObject *pTObj) : mpContentTextObj(pTObj)
+        {
+        }
+
+        OutlinerParaObject *GetJuxtaposedParaObject(Outliner *, OutlinerParaObject *);
+
         OUString GetHeadingLines() const;
         OUString GetEndingLines() const;
         bool HasOtherParas() const { return !(mTailTxt == "" && mpMidParas == NULL); }
+
+private:
+    const EditTextObject *mpContentTextObj;
 };
 
 class NonOverflowingText {
commit f7298a19bc5d97cdab64204a16bb30d8606c9f8e
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 17:59:43 2015 -0400

    Using EditTextObject for NonOverflowingText
    
    Change-Id: I148835df1e6f856913e9b6146ccc5431ff4fca97

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index e62d558..a1589de 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2142,6 +2142,27 @@ NonOverflowingText *Outliner::GetNonOverflowingText() const
             nLen += GetLineLen(nOverflowingPara, nLine);
         }
 
+        /* BEGIN Experiment with ESelection and EditTextobject */
+        sal_Int32 nStartPara = 0;
+        sal_Int32 nStartPos = 0;
+        ESelection aNonOverflowingTextSelection;
+        if (nLen == 0) {
+            // XXX: What happens inside this case might be dependent on the joining paragraps or not-thingy
+            // Overflowing paragraph is empty: it's not "Non-Overflowing" text then
+            sal_Int32 nParaLen = GetText(GetParagraph(nOverflowingPara-1)).getLength();
+            aNonOverflowingTextSelection =
+                ESelection(nStartPara, nStartPos, nOverflowingPara-1, nParaLen);
+        } else {
+            // We take until we have to from the overflowing paragraph
+            aNonOverflowingTextSelection =
+                ESelection(nStartPara, nStartPos, nOverflowingPara, nLen);
+        }
+        EditTextObject *pTObj = pEditEngine->CreateTextObject(aNonOverflowingTextSelection);
+        return new NonOverflowingText(pTObj);
+
+
+        /*  END  Experiment with ESelection and EditTextobject */
+
         // XXX: Any separator to be included?
         aPreOverflowingTxt = aWholeTxtHeadPara.copy(0, nLen);
     }
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 6565a44..23246fb 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -22,10 +22,14 @@
 
 #include <editeng/overflowingtxt.hxx>
 #include <editeng/outliner.hxx>
+#include <editeng/outlobj.hxx>
 
 OutlinerParaObject *NonOverflowingText::ToParaObject(Outliner *pOutliner) const
 {
 
+    if (mpContentTextObj)
+        return new OutlinerParaObject(*mpContentTextObj);
+
     // XXX: Possibility: let the NonUnderflowingParaObject just be a TextEditObject created by the Outliner (by means of a selection).
 
     /* The overflow in SdrTextObj can occur:
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index b559921..12e1e7c 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -30,9 +30,6 @@ class OutlinerParaObject;
 class EditTextObject;
 class Outliner;
 
-typedef EditTextObject FormattedTextPortion;
-
-
 
 class OverflowingText
 {
@@ -64,21 +61,26 @@ class NonOverflowingText {
         // NOTE: mPreOverflowingTxt might be empty
 
         // Constructor
-        NonOverflowingText(
-            const OutlinerParaObject *pHeadParas,
-            const OUString &preOverflowingTxt)
-                : mpHeadParas(pHeadParas),
-                  mPreOverflowingTxt(preOverflowingTxt)
-                {
-                    if (pHeadParas == NULL) // Redundant line for debugging
-                        DBG_ASSERT( pHeadParas != NULL, "pHeadParas is null?! All text is overflowing then" );
-                }
+        NonOverflowingText(const OutlinerParaObject *pHeadParas,
+                           const OUString &preOverflowingTxt)
+        : mpHeadParas(pHeadParas),
+          mPreOverflowingTxt(preOverflowingTxt), mpContentTextObj(NULL)
+        {
+            if (pHeadParas == NULL) // Redundant line for debugging
+                DBG_ASSERT( pHeadParas != NULL, "pHeadParas is null?! All text is overflowing then" );
+        }
+
+        NonOverflowingText(const EditTextObject *pTObj)
+        : mpContentTextObj(pTObj)
+        { }
 
         OutlinerParaObject *ToParaObject(Outliner *) const;
 
     private:
         const OutlinerParaObject *mpHeadParas;
         OUString mPreOverflowingTxt;
+
+        const EditTextObject *mpContentTextObj;
 };
 
 
@@ -90,35 +92,31 @@ class NonOverflowingText {
 
 class EDITENG_DLLPUBLIC OFlowChainedText {
     public:
-    OFlowChainedText(Outliner *);
+        OFlowChainedText(Outliner *);
 
-    OutlinerParaObject *CreateOverflowingParaObject(Outliner *, OutlinerParaObject *);
-    OutlinerParaObject *CreateNonOverflowingParaObject(Outliner *);
+        OutlinerParaObject *CreateOverflowingParaObject(Outliner *, OutlinerParaObject *);
+        OutlinerParaObject *CreateNonOverflowingParaObject(Outliner *);
 
     protected:
-    void impSetOutlinerToEmptyTxt(Outliner *);
+        void impSetOutlinerToEmptyTxt(Outliner *);
 
     private:
 
-
-    NonOverflowingText *mpNonOverflowingTxt;
-    OverflowingText *mpOverflowingTxt;
-
+        NonOverflowingText *mpNonOverflowingTxt;
+        OverflowingText *mpOverflowingTxt;
 
 };
 
 // UFlowChainedText is a simpler class than OFlowChainedText: it almost only joins para-objects
 class EDITENG_DLLPUBLIC UFlowChainedText {
     public:
-    UFlowChainedText(Outliner *);
-
-    OutlinerParaObject *CreateMergedUnderflowParaObject(Outliner *, OutlinerParaObject *);
+        UFlowChainedText(Outliner *);
 
+        OutlinerParaObject *CreateMergedUnderflowParaObject(Outliner *, OutlinerParaObject *);
     protected:
 
-
     private:
-    OutlinerParaObject *mpUnderflowPObj;
+        OutlinerParaObject *mpUnderflowPObj;
 };
 
 #endif
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 2d23aa5..036327c 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -266,7 +266,6 @@ void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrO
  *
  * Some notes on how to set style sheets:
  * - save whole edittexts instead of strings only for (Non)OverflowingText; this can be done by the EditEngine::CreateTextObject method and using a selection - probably from ImpEditEngine)
- * - first, refactor the impGet*ParaObject stuff moving it in some (static?) class in overflowingtxt.hxx. Probably each of these methods should be split in smaller routines.
  * - for the refactoring of the previous point we may also add an option for whether we are joining paragraphs or not
  * - When making new OutlinerParaObjs and joining paragraphs we need to first add the string (as we already do) and then, with the appropriate selection, use Outliner::QuickSetAttribs(SfxItemSet(txtObj->GetPool()), aSelectionOfTheNewText)
  * - having all this in a whole class that contains Overflowing and NonOverflowingText would not be bad. This same class could be used to handle a cursor later on.
commit a146c56fbdcfbaa2caad97f89c8cc7bf13976084
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 16:41:34 2015 -0400

    Change access properties of Overflow classes
    
    Change-Id: I1ec816f7fe4d0aa0b25b6cacba6f84eb6b3c595b

diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 8f67004..b559921 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -34,7 +34,7 @@ typedef EditTextObject FormattedTextPortion;
 
 
 
-class EDITENG_DLLPUBLIC OverflowingText
+class OverflowingText
 {
 
 public:
@@ -58,10 +58,9 @@ public:
         bool HasOtherParas() const { return !(mTailTxt == "" && mpMidParas == NULL); }
 };
 
-class EDITENG_DLLPUBLIC NonOverflowingText {
+class NonOverflowingText {
     public:
-        const OutlinerParaObject *mpHeadParas;
-        OUString mPreOverflowingTxt;
+
         // NOTE: mPreOverflowingTxt might be empty
 
         // Constructor
@@ -76,6 +75,10 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
                 }
 
         OutlinerParaObject *ToParaObject(Outliner *) const;
+
+    private:
+        const OutlinerParaObject *mpHeadParas;
+        OUString mPreOverflowingTxt;
 };
 
 
commit 80642fb142d8bdadfe2e5ae2705eeac827cc440c
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 16:36:45 2015 -0400

    Moved and commented code to get ParaObject in NonOverflowingText
    
    Change-Id: I8a011c3c0143d2f074281b9327398082a8053dc8

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 533be0d..6565a44 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -23,6 +23,51 @@
 #include <editeng/overflowingtxt.hxx>
 #include <editeng/outliner.hxx>
 
+OutlinerParaObject *NonOverflowingText::ToParaObject(Outliner *pOutliner) const
+{
+
+    // XXX: Possibility: let the NonUnderflowingParaObject just be a TextEditObject created by the Outliner (by means of a selection).
+
+    /* The overflow in SdrTextObj can occur:
+     * (a) exactly at the end of a paragraph, or
+     * (b) in the middle of a paragraph.
+     *
+     * In case (a), a NonUnderflowingText object contains only the
+     * paragraphs occurred before the overflow.
+     * In case (b), a NonUnderflowingText contains also the text of the
+     * paragraph that was cut by overflow.
+    */
+
+    bool bOverflowOccurredAtEndOfPara =
+        (mPreOverflowingTxt == "") &&
+        (mpHeadParas != NULL);
+
+    if (bOverflowOccurredAtEndOfPara) {
+        // Case (a) above:
+        // Only (possibly empty) paragraphs before overflowing one.
+        pOutliner->SetText(*mpHeadParas);
+    } else {
+        // Case (b): some text is non included in any OutlinerParaObject.
+        // We have to include the non-overflowing lines from the overfl. para
+
+        // first make a ParaObject for the strings
+        pOutliner->SetToEmptyText();
+        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(mPreOverflowingTxt, pTmpPara0);
+        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
+
+        if (mpHeadParas != NULL) {
+            pOutliner->SetText(*mpHeadParas);
+            pOutliner->AddText(*pPObj);
+         } else  if (mPreOverflowingTxt != "") { // only preoverflowing txt
+            pOutliner->SetText(*pPObj);
+        } else { // no text // This case is redundant but it doesn't hurt for now
+            pOutliner->SetToEmptyText();
+        }
+    }
+
+     return pOutliner->CreateParaObject();
+}
 
 OUString OverflowingText::GetEndingLines() const
 {
@@ -120,33 +165,7 @@ OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *p
     if (mpNonOverflowingTxt == NULL)
         return NULL;
 
-    if (mpNonOverflowingTxt->mPreOverflowingTxt == "" &&
-        mpNonOverflowingTxt->mpHeadParas != NULL) {
-        // Only (possibly empty) paragraphs before overflowing one
-        pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
-    } else { // We have to include the non-overflowing lines from the overfl. para
-
-        // first make a ParaObject for the strings
-        pOutliner->SetToEmptyText();
-        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
-        pOutliner->SetText(mpNonOverflowingTxt->mPreOverflowingTxt, pTmpPara0);
-        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
-        //pOutliner->Clear();
-        //pOutliner->SetStyleSheet( 0, pEdtOutl->GetStyleSheet(0));
-
-        if (mpNonOverflowingTxt->mpHeadParas != NULL) {
-            pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
-            pOutliner->AddText(*pPObj);
-         } else  if (mpNonOverflowingTxt->mPreOverflowingTxt != "") { // only preoverflowing txt
-            //OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
-            //pOutliner->SetText(*pEmptyPObj);
-            pOutliner->SetText(*pPObj);
-        } else { // no text // This case is redundant but it doesn't hurt for now
-            pOutliner->Clear();
-        }
-    }
-
-     return pOutliner->CreateParaObject();
+    return mpNonOverflowingTxt->ToParaObject(pOutliner);
 }
 
 
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 58ff247..8f67004 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -74,13 +74,14 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
                     if (pHeadParas == NULL) // Redundant line for debugging
                         DBG_ASSERT( pHeadParas != NULL, "pHeadParas is null?! All text is overflowing then" );
                 }
+
+        OutlinerParaObject *ToParaObject(Outliner *) const;
 };
 
-// XXX: Do we also need a class for Underflow here?
 
 /*
- * classes ?FlowChainedText:
- * contains and handles the state of a text broken _after_ a flow event.
+ * classes OFlowChainedText and UFlowChainedText:
+ * contain and handle the state of a broken up text _after_ a flow event.
  *
 */
 
commit 91e6fdb116f825f9e9ed9c0e76c77138fa83820b
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 13:04:25 2015 -0400

    Added UFlowChainedText constructor
    
    Change-Id: Iad9542c624148a4d717724a9f6bc7a453c650c90

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 8ccbf6f..533be0d 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -149,6 +149,12 @@ OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *p
      return pOutliner->CreateParaObject();
 }
 
+
+UFlowChainedText::UFlowChainedText(Outliner *pOutl)
+{
+    mpUnderflowPObj = pOutl->CreateParaObject();
+}
+
 OutlinerParaObject *UFlowChainedText::CreateMergedUnderflowParaObject(Outliner *pOutl, OutlinerParaObject *pNextLinkWholeText)
 {
     OutlinerParaObject *pCurText = mpUnderflowPObj;
commit ef42ca62fb83a8b66de849d38711bf5c2a1dac82
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 13:02:34 2015 -0400

    UFlowChainedText used to deal with underflow
    
    Change-Id: I6942b09f016756a81f411ba27ba3f7fcc2fa1aa1

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 6a7a6be..e62d558 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -414,6 +414,12 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32
     return pPObj;
 }
 
+void Outliner::SetToEmptyText()
+{
+    OutlinerParaObject *pEmptyTxt =  GetEmptyParaObject();
+    SetText(*pEmptyTxt);
+}
+
 void Outliner::SetText( const OUString& rText, Paragraph* pPara )
 {
     DBG_ASSERT(pPara,"SetText:No Para");
diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 9e1ee3d..8ccbf6f 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -71,7 +71,7 @@ OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOut
 
     if (pOldPara0) {
         //pOutliner->Clear(); // you need a clear outliner here
-        impSetOutlinerToEmptyTxt(pOutliner);
+        pOutliner->SetToEmptyText();
 
         pTmpPara0 = pOutliner->GetParagraph(0);
         pOutliner->SetText(mpOverflowingTxt->GetEndingLines() + aOldPara0Txt, pTmpPara0);
@@ -84,7 +84,7 @@ OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOut
 
     // start actual composition
     //pOutliner->Clear();
-    impSetOutlinerToEmptyTxt(pOutliner);
+    pOutliner->SetToEmptyText();
 
     // Set headText at the beginning of box
     OUString aHeadTxt = mpOverflowingTxt->GetHeadingLines();
@@ -127,7 +127,7 @@ OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *p
     } else { // We have to include the non-overflowing lines from the overfl. para
 
         // first make a ParaObject for the strings
-        impSetOutlinerToEmptyTxt(pOutliner);
+        pOutliner->SetToEmptyText();
         Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
         pOutliner->SetText(mpNonOverflowingTxt->mPreOverflowingTxt, pTmpPara0);
         OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
@@ -149,11 +149,16 @@ OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *p
      return pOutliner->CreateParaObject();
 }
 
-void OFlowChainedText::impSetOutlinerToEmptyTxt(Outliner *pOutliner)
+OutlinerParaObject *UFlowChainedText::CreateMergedUnderflowParaObject(Outliner *pOutl, OutlinerParaObject *pNextLinkWholeText)
 {
-    OutlinerParaObject *pEmptyTxt = pOutliner->GetEmptyParaObject();
-    pOutliner->SetText(*pEmptyTxt);
-}
+    OutlinerParaObject *pCurText = mpUnderflowPObj;
+
+    // NewTextForCurBox = Txt(CurBox) ++ Txt(NextBox)
+    pOutl->SetText(*pCurText);
+    pOutl->AddText(*pNextLinkWholeText);
+    OutlinerParaObject *pNewText = pOutl->CreateParaObject();
 
+    return pNewText;
 
+}
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index 5bb067f..dcdc3db 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -714,6 +714,8 @@ public:
     void            SetText( const OUString& rText, Paragraph* pParagraph );
     OUString        GetText( Paragraph* pPara, sal_Int32 nParaCount=1 ) const;
 
+    void            SetToEmptyText();
+
     OutlinerParaObject* CreateParaObject( sal_Int32 nStartPara = 0, sal_Int32 nParaCount = EE_PARA_ALL ) const;
 
     const SfxItemSet& GetEmptyItemSet() const;
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index a2602ad..58ff247 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -79,10 +79,11 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
 // XXX: Do we also need a class for Underflow here?
 
 /*
- * class ChainedText:
+ * classes ?FlowChainedText:
  * contains and handles the state of a text broken _after_ a flow event.
  *
 */
+
 class EDITENG_DLLPUBLIC OFlowChainedText {
     public:
     OFlowChainedText(Outliner *);
@@ -102,6 +103,20 @@ class EDITENG_DLLPUBLIC OFlowChainedText {
 
 };
 
+// UFlowChainedText is a simpler class than OFlowChainedText: it almost only joins para-objects
+class EDITENG_DLLPUBLIC UFlowChainedText {
+    public:
+    UFlowChainedText(Outliner *);
+
+    OutlinerParaObject *CreateMergedUnderflowParaObject(Outliner *, OutlinerParaObject *);
+
+    protected:
+
+
+    private:
+    OutlinerParaObject *mpUnderflowPObj;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index ce6d728..5489bb1 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -27,6 +27,7 @@ class OverflowingText;
 class TextChain;
 class OutlinerParaObject;
 class OFlowChainedText;
+class UFlowChainedText;
 
 // XXX: const qualifiers?
 
@@ -40,7 +41,7 @@ class TextChainFlow {
     // Check for flow events in Outliner
     virtual void CheckForFlowEvents(SdrOutliner *);
 
-    void ExecuteUnderflow(SdrOutliner *);
+    virtual void ExecuteUnderflow(SdrOutliner *);
 
     // Uses two outliners: one for the non-overfl text and one for overflowing (might be the same)
     virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
@@ -54,6 +55,7 @@ class TextChainFlow {
     SdrTextObj *GetNextLink() const;
 
     OFlowChainedText *GetOverflowChainedText() const;
+    UFlowChainedText *GetUnderflowChainedText() const;
 
     //  -- Protected Members --
     protected:
@@ -70,7 +72,7 @@ class TextChainFlow {
     OutlinerParaObject *impGetNonOverflowingParaObject(SdrOutliner *pOutliner);
     OutlinerParaObject *impGetOverflowingParaObject(SdrOutliner *pOutliner);
     // impGetMergedUnderflowingParaObject merges underflowing text with the one in the next box
-    OutlinerParaObject *impGetMergedUnderflowingParaObject(SdrOutliner *pOutliner);
+    OutlinerParaObject *impGetMergedUnderflowParaObject(SdrOutliner *pOutliner);
 
     //  -- Private Members --
     private:
@@ -85,11 +87,8 @@ class TextChainFlow {
     bool bOverflow;
 
     OFlowChainedText *mpOverflChText;
+    UFlowChainedText *mpUnderflChText;
 
-    //OverflowingText *mpOverflowingTxt;
-    //NonOverflowingText *mpNonOverflowingTxt;
-
-    OutlinerParaObject *mpUnderflowingPObj;
 
 };
 
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 93bb2f1..2d23aa5 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -35,12 +35,7 @@ TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
     bUnderflow = bOverflow = false;
 
     mpOverflChText = NULL;
-    //mpOverflowingTxt = NULL;
-    //mpNonOverflowingTxt = NULL;
-
-    mpUnderflowingPObj = NULL;
-
-    // XXX: Set the next link here?
+    mpUnderflChText = NULL;
 
 
 }
@@ -69,10 +64,11 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
     // NOTE: Nah you probably don't need this
     if (pParamOutl != NULL)
     {
-        // XXX: Set parameters
-        // XXX: does this work if you do it before setting the text? Seems so.
+        // We need this since it's required to check overflow
         pFlowOutl->SetUpdateMode(true);
-       impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
+
+        // XXX: does this work if you do it before setting the text? Seems so.
+        impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
     }
 
     bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
@@ -86,14 +82,11 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
     bOverflow = bIsPageOverflow && mpNextLink;
     bUnderflow = !bIsPageOverflow &&  mpNextLink && mpNextLink->HasText();
 
-    // Set (Non)OverflowingTxt here
+    // Set (Non)OverflowingTxt here (if any)
     mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl) : NULL;
 
-    //mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL;
-    //mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL;
-
     // Set current underflowing text (if any)
-    mpUnderflowingPObj = bUnderflow ? pFlowOutl->CreateParaObject() : NULL;
+    mpUnderflChText = bUnderflow ? new UFlowChainedText(pFlowOutl) : NULL;
 
 }
 
@@ -119,26 +112,17 @@ bool TextChainFlow::IsUnderflow() const
 // XXX:Would it be possible to unify undeflow and its possibly following overrflow?
 void TextChainFlow::ExecuteUnderflow(SdrOutliner *pOutl)
 {
-    OutlinerParaObject *pNextLinkWholeText = mpNextLink->GetOutlinerParaObject();
-
     // making whole text
-    OutlinerParaObject *pCurText;
-    // We saved this text already
-    pCurText = mpUnderflowingPObj;
+    OutlinerParaObject *pNewText = impGetMergedUnderflowParaObject(pOutl);
 
-    // NewTextForCurBox = Txt(CurBox) ++ Txt(NextBox)
-    pOutl->SetText(*pCurText);
-    pOutl->AddText(*pNextLinkWholeText);
-    OutlinerParaObject *pNewText = pOutl->CreateParaObject();
-
-    // Set the other box empty so if overflow does not occur we are fine
+    // Set the other box empty; it will be replaced by the rest of the text if overflow occurs
     if (!mpTargetLink->GetPreventChainable())
         mpNextLink->NbcSetOutlinerParaObject(pOutl->GetEmptyParaObject());
 
     mpTargetLink->NbcSetOutlinerParaObject(pNewText);
 
     // Check for new overflow
-    CheckForFlowEvents(pOutl); // XXX: How do you know you don't need to set parameters here?
+    CheckForFlowEvents(pOutl);
 }
 
 void TextChainFlow::ExecuteOverflow(SdrOutliner *pNonOverflOutl, SdrOutliner *pOverflOutl)
@@ -196,6 +180,12 @@ OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOut
     return mpOverflChText->CreateOverflowingParaObject(pOutliner, mpNextLink->GetOutlinerParaObject());
 }
 
+OutlinerParaObject *TextChainFlow::impGetMergedUnderflowParaObject(SdrOutliner *pOutliner)
+{
+    // Should check whether to merge paragraphs or not
+    return mpUnderflChText->CreateMergedUnderflowParaObject(pOutliner, mpNextLink->GetOutlinerParaObject());
+}
+
 TextChain *TextChainFlow::GetTextChain()
 {
     return mpTextChain;
@@ -206,6 +196,11 @@ OFlowChainedText *TextChainFlow::GetOverflowChainedText() const
     return mpOverflChText;
 }
 
+UFlowChainedText *TextChainFlow::GetUnderflowChainedText() const
+{
+    return mpUnderflChText;
+}
+
 
 // EditingTextChainFlow
 
commit e2591f99288767d4c3b74781bde382e349b056ae
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 12:04:48 2015 -0400

    Prevent recursive underflow/overflow calls (for the same object)
    
    Change-Id: I76705d41da739e327be0c9a67bbbb245da055b77

diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 3215194..ce6d728 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -94,6 +94,7 @@ class TextChainFlow {
 };
 
 
+// NOTE: EditingTextChainFlow might be strongly coupled with behavior in SdrTextObj::onChainingEvent
 class EditingTextChainFlow : public TextChainFlow
 {
     public:
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 432c465..3455c97 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1994,7 +1994,7 @@ void SdrTextObj::onChainingEvent()
 
     // This is true during an underflow-caused overflow (with pEdtOutl->SetText())
     if (GetTextChain()->GetNilChainingEvent(this)) {
-        GetTextChain()->SetNilChainingEvent(this, false);
+
         return;
     }
 
@@ -2004,6 +2004,8 @@ void SdrTextObj::onChainingEvent()
     EditingTextChainFlow aTxtChainFlow(this);
     aTxtChainFlow.CheckForFlowEvents(pEdtOutl);
 
+    // We prevent to trigger further handling of overflow/underflow for this SdrTextObj
+    GetTextChain()->SetNilChainingEvent(this, true);
 
     if (aTxtChainFlow.IsOverflow()) {
         fprintf(stderr, "[CHAINING] Overflow going on\n");
@@ -2019,11 +2021,13 @@ void SdrTextObj::onChainingEvent()
         if (bIsOverflowFromUnderflow) {
             fprintf(stderr, "[CHAINING] Overflow going on (underflow induced)\n");
             // prevents infinite loops when setting text for editing outliner
-            GetTextChain()->SetNilChainingEvent(const_cast<SdrTextObj*>(this), true);
+
 
             aTxtChainFlow.ExecuteOverflow(&aDrawOutliner, &aDrawOutliner);
+
         }
     }
+    GetTextChain()->SetNilChainingEvent(this, false);
 }
 
 
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index b3dcd80..93bb2f1 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -122,9 +122,7 @@ void TextChainFlow::ExecuteUnderflow(SdrOutliner *pOutl)
     OutlinerParaObject *pNextLinkWholeText = mpNextLink->GetOutlinerParaObject();
 
     // making whole text
-    OutlinerParaObject *pCurText;   // XXX: at next line we have editing outliner in editing version
-    //pCurText = pOutl->CreateParaObject();
-
+    OutlinerParaObject *pCurText;
     // We saved this text already
     pCurText = mpUnderflowingPObj;
 
@@ -183,8 +181,6 @@ OutlinerParaObject *TextChainFlow::impGetNonOverflowingParaObject(SdrOutliner *p
     return mpOverflChText->CreateNonOverflowingParaObject(pOutliner);
 }
 
-
-
 SdrTextObj *TextChainFlow::GetLinkTarget() const
 {
     return mpTargetLink;
commit de562e8077de284610459dc5131d7c33e5b06597
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 11:44:38 2015 -0400

    For OF: Passing text to be merged last minute; otherwise might be old
    
    Change-Id: I12553f4aa5145c8ebad77977506700cc6c530e1f

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 85aa0b2..9e1ee3d 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -40,19 +40,18 @@ OUString OverflowingText::GetHeadingLines() const
 }
 
 
-OFlowChainedText::OFlowChainedText(Outliner *pOutl, OutlinerParaObject* pTextToBeMerged)
-  : mpTextToBeMerged(pTextToBeMerged)
+OFlowChainedText::OFlowChainedText(Outliner *pOutl)
 {
     mpOverflowingTxt = pOutl->GetOverflowingText();
     mpNonOverflowingTxt = pOutl->GetNonOverflowingText();
 }
 
-OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner)
+OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner, OutlinerParaObject *pTextToBeMerged)
 {
-    if (mpOverflowingTxt == NULL)
+    if (mpOverflowingTxt == NULL || pTextToBeMerged == NULL)
         return NULL;
 
-    pOutliner->SetText(*mpTextToBeMerged);
+    pOutliner->SetText(*pTextToBeMerged);
 
     // Get text of first paragraph of destination box
     Paragraph *pOldPara0 = pOutliner->GetParagraph(0);
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 3920af3..a2602ad 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -85,13 +85,11 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
 */
 class EDITENG_DLLPUBLIC OFlowChainedText {
     public:
-    OFlowChainedText(Outliner *, OutlinerParaObject *);
+    OFlowChainedText(Outliner *);
 
-    OutlinerParaObject *CreateOverflowingParaObject(Outliner *);
+    OutlinerParaObject *CreateOverflowingParaObject(Outliner *, OutlinerParaObject *);
     OutlinerParaObject *CreateNonOverflowingParaObject(Outliner *);
 
-    OutlinerParaObject *GetTextToBeMerged() const { return mpTextToBeMerged; }
-
     protected:
     void impSetOutlinerToEmptyTxt(Outliner *);
 
@@ -101,7 +99,6 @@ class EDITENG_DLLPUBLIC OFlowChainedText {
     NonOverflowingText *mpNonOverflowingTxt;
     OverflowingText *mpOverflowingTxt;
 
-    OutlinerParaObject *mpTextToBeMerged;
 
 };
 
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 0e4be0b..b3dcd80 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -87,7 +87,7 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
     bUnderflow = !bIsPageOverflow &&  mpNextLink && mpNextLink->HasText();
 
     // Set (Non)OverflowingTxt here
-    mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl, mpNextLink->GetOutlinerParaObject()) : NULL;
+    mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl) : NULL;
 
     //mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL;
     //mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL;
@@ -197,7 +197,7 @@ SdrTextObj *TextChainFlow::GetNextLink() const
 
 OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOutliner)
 {
-    return mpOverflChText->CreateOverflowingParaObject(pOutliner);
+    return mpOverflChText->CreateOverflowingParaObject(pOutliner, mpNextLink->GetOutlinerParaObject());
 }
 
 TextChain *TextChainFlow::GetTextChain()
commit 93541ebc1277ab5455e952e359ac76bb9223b327
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 11:13:09 2015 -0400

    Use OFlowChainedText in TextChainFlow
    
    Change-Id: I2aaa472590ba90880c545ca767069860623b8089

diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 776dc22..3215194 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -26,12 +26,13 @@ class NonOverflowingText;
 class OverflowingText;
 class TextChain;
 class OutlinerParaObject;
+class OFlowChainedText;
 
-// XXX: Specialize class for Editing mode and non editing mode?
 // XXX: const qualifiers?
 
 class TextChainFlow {
 
+    //  -- Public Members --
     public:
     TextChainFlow(SdrTextObj *pChainTarget);
     virtual ~TextChainFlow();
@@ -39,16 +40,22 @@ class TextChainFlow {
     // Check for flow events in Outliner
     virtual void CheckForFlowEvents(SdrOutliner *);
 
-    bool IsOverflow();
-    bool IsUnderflow();
-
     void ExecuteUnderflow(SdrOutliner *);
 
     // Uses two outliners: one for the non-overfl text and one for overflowing (might be the same)
     virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
 
-    SdrTextObj *GetLinkTarget();
+    // Getters
+
+    bool IsOverflow() const;
+    bool IsUnderflow() const;
+
+    SdrTextObj *GetLinkTarget() const;
+    SdrTextObj *GetNextLink() const;
+
+    OFlowChainedText *GetOverflowChainedText() const;
 
+    //  -- Protected Members --
     protected:
 
     void impCheckForFlowEvents(SdrOutliner *, SdrOutliner *);
@@ -62,11 +69,11 @@ class TextChainFlow {
 
     OutlinerParaObject *impGetNonOverflowingParaObject(SdrOutliner *pOutliner);
     OutlinerParaObject *impGetOverflowingParaObject(SdrOutliner *pOutliner);
+    // impGetMergedUnderflowingParaObject merges underflowing text with the one in the next box
+    OutlinerParaObject *impGetMergedUnderflowingParaObject(SdrOutliner *pOutliner);
 
+    //  -- Private Members --
     private:
-
-    void impSetOutlinerToEmptyTxt(SdrOutliner *pOutliner);
-
     SdrTextObj *mpTargetLink;
     SdrTextObj *mpNextLink;
 
@@ -77,8 +84,10 @@ class TextChainFlow {
     bool bUnderflow;
     bool bOverflow;
 
-    OverflowingText *mpOverflowingTxt;
-    NonOverflowingText *mpNonOverflowingTxt;
+    OFlowChainedText *mpOverflChText;
+
+    //OverflowingText *mpOverflowingTxt;
+    //NonOverflowingText *mpNonOverflowingTxt;
 
     OutlinerParaObject *mpUnderflowingPObj;
 
@@ -93,7 +102,6 @@ class EditingTextChainFlow : public TextChainFlow
 
     //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) SAL_OVERRIDE;
 
-
     protected:
     virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) SAL_OVERRIDE;
 
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index fc7d31f..432c465 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -50,7 +50,6 @@
 #include <svx/textchainflow.hxx>
 #include <svl/style.hxx>
 #include <editeng/editeng.hxx>
-#include <editeng/overflowingtxt.hxx>
 #include <svl/itemiter.hxx>
 #include <sdr/properties/textproperties.hxx>
 #include <vcl/metaact.hxx>
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 1261175..0e4be0b 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -34,8 +34,9 @@ TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
 
     bUnderflow = bOverflow = false;
 
-    mpOverflowingTxt = NULL;
-    mpNonOverflowingTxt = NULL;
+    mpOverflChText = NULL;
+    //mpOverflowingTxt = NULL;
+    //mpNonOverflowingTxt = NULL;
 
     mpUnderflowingPObj = NULL;
 
@@ -86,9 +87,10 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
     bUnderflow = !bIsPageOverflow &&  mpNextLink && mpNextLink->HasText();
 
     // Set (Non)OverflowingTxt here
+    mpOverflChText = bOverflow ? new OFlowChainedText(pFlowOutl, mpNextLink->GetOutlinerParaObject()) : NULL;
 
-    mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL;
-    mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL;
+    //mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL;
+    //mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL;
 
     // Set current underflowing text (if any)
     mpUnderflowingPObj = bUnderflow ? pFlowOutl->CreateParaObject() : NULL;
@@ -101,12 +103,12 @@ void TextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
 }
 
 
-bool TextChainFlow::IsOverflow()
+bool TextChainFlow::IsOverflow() const
 {
     return bOverflow;
 }
 
-bool TextChainFlow::IsUnderflow()
+bool TextChainFlow::IsUnderflow() const
 {
     return bUnderflow;
 }
@@ -178,118 +180,24 @@ void TextChainFlow::impMoveChainedTextToNextLink(SdrOutliner *pOverflOutl)
 
 OutlinerParaObject *TextChainFlow::impGetNonOverflowingParaObject(SdrOutliner *pOutliner)
 {
-    if (mpNonOverflowingTxt == NULL)
-        return NULL;
-
-    if (mpNonOverflowingTxt->mPreOverflowingTxt == "" &&
-        mpNonOverflowingTxt->mpHeadParas != NULL) {
-        // Only (possibly empty) paragraphs before overflowing one
-        pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
-    } else { // We have to include the non-overflowing lines from the overfl. para
-
-        // first make a ParaObject for the strings
-        impSetOutlinerToEmptyTxt(pOutliner);
-        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
-        pOutliner->SetText(mpNonOverflowingTxt->mPreOverflowingTxt, pTmpPara0);
-        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
-        //pOutliner->Clear();
-        //pOutliner->SetStyleSheet( 0, pEdtOutl->GetStyleSheet(0));
-
-        if (mpNonOverflowingTxt->mpHeadParas != NULL) {
-            pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
-            pOutliner->AddText(*pPObj);
-         } else  if (mpNonOverflowingTxt->mPreOverflowingTxt != "") { // only preoverflowing txt
-            //OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
-            //pOutliner->SetText(*pEmptyPObj);
-            pOutliner->SetText(*pPObj);
-        } else { // no text // This case is redundant but it doesn't hurt for now
-            pOutliner->Clear();
-        }
-    }
-
-     return pOutliner->CreateParaObject();
+    return mpOverflChText->CreateNonOverflowingParaObject(pOutliner);
 }
 
-void TextChainFlow::impSetOutlinerToEmptyTxt(SdrOutliner *pOutliner)
+
+
+SdrTextObj *TextChainFlow::GetLinkTarget() const
 {
-    OutlinerParaObject *pEmptyTxt = pOutliner->GetEmptyParaObject();
-    pOutliner->SetText(*pEmptyTxt);
+    return mpTargetLink;
 }
 
-SdrTextObj *TextChainFlow::GetLinkTarget()
+SdrTextObj *TextChainFlow::GetNextLink() const
 {
-    return mpTargetLink;
+    return mpNextLink;
 }
 
 OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOutliner)
 {
-
-    if (mpOverflowingTxt == NULL)
-        return NULL;
-
-    OutlinerParaObject *pCurTxt = mpNextLink->GetOutlinerParaObject();
-    pOutliner->SetText(*pCurTxt);
-
-    // Get text of first paragraph of destination box
-    Paragraph *pOldPara0 = pOutliner->GetParagraph(0);
-    OUString aOldPara0Txt;
-    if (pOldPara0)
-        aOldPara0Txt = pOutliner->GetText(pOldPara0);
-
-    // Get other paras of destination box (from second on)
-    OutlinerParaObject *pOldParasTail = NULL;
-    if (pOutliner->GetParagraphCount() > 1)
-        pOldParasTail = pOutliner->CreateParaObject(1);
-
-    // Create ParaObject appending old first para in the dest. box
-    //   to last part of overflowing text
-    Paragraph *pTmpPara0 = NULL;
-    OutlinerParaObject *pJoiningPara = NULL;
-
-    if (pOldPara0) {
-        //pOutliner->Clear(); // you need a clear outliner here
-        impSetOutlinerToEmptyTxt(pOutliner);
-
-        pTmpPara0 = pOutliner->GetParagraph(0);
-        pOutliner->SetText(mpOverflowingTxt->GetEndingLines() + aOldPara0Txt, pTmpPara0);
-        pJoiningPara = pOutliner->CreateParaObject();
-    }
-
-    // Create a Para Object out of mpMidParas
-    // (in order to use the SfxItemPool of the current outliner
-    //  instead of the ones currently in mpMidParas)
-
-    // start actual composition
-    //pOutliner->Clear();
-    impSetOutlinerToEmptyTxt(pOutliner);
-
-    // Set headText at the beginning of box
-    OUString aHeadTxt = mpOverflowingTxt->GetHeadingLines();
-    // If we haven't used heading text yet
-    if (mpOverflowingTxt->HasOtherParas()) {
-        Paragraph *pNewPara0 = pOutliner->GetParagraph(0);
-        pOutliner->SetText(aHeadTxt, pNewPara0);
-    }
-
-    // Set all the intermediate Paras
-    if (mpOverflowingTxt->mpMidParas)
-        pOutliner->AddText(*mpOverflowingTxt->mpMidParas);
-
-    // Append old first para in the destination box to
-    //   last part of overflowing text
-    if (pJoiningPara && mpOverflowingTxt->HasOtherParas())
-        pOutliner->AddText(*pJoiningPara);
-    // this second case is if there is to avoid getting an empty line before pJoiningPara
-    else if (pJoiningPara && !mpOverflowingTxt->HasOtherParas())
-        pOutliner->SetText(*pJoiningPara);
-
-    // Append all other old paras
-    if (pOldParasTail)
-        pOutliner->AddText(*pOldParasTail);
-
-    // Draw everything
-    OutlinerParaObject *pNewText = pOutliner->CreateParaObject();
-    return pNewText;
+    return mpOverflChText->CreateOverflowingParaObject(pOutliner);
 }
 
 TextChain *TextChainFlow::GetTextChain()
@@ -297,6 +205,14 @@ TextChain *TextChainFlow::GetTextChain()
     return mpTextChain;
 }
 
+OFlowChainedText *TextChainFlow::GetOverflowChainedText() const
+{
+    return mpOverflChText;
+}
+
+
+// EditingTextChainFlow
+
 EditingTextChainFlow::EditingTextChainFlow(SdrTextObj *pLinkTarget) :
     TextChainFlow(pLinkTarget)
 {
@@ -366,5 +282,6 @@ void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrO
  *
  *
  *
+ */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7b56b0096a8dee587dc6acb09a812429b3740afb
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 10:58:21 2015 -0400

    OFlowChainedText now creates OutlinerParaObject-s for chainging
    
    Change-Id: I1f3f37fa92472471f77362c029e9525523ea6d09

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index ca0af38..85aa0b2 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -21,6 +21,7 @@
 #include <tools/debug.hxx>
 
 #include <editeng/overflowingtxt.hxx>
+#include <editeng/outliner.hxx>
 
 
 OUString OverflowingText::GetEndingLines() const
@@ -42,7 +43,117 @@ OUString OverflowingText::GetHeadingLines() const
 OFlowChainedText::OFlowChainedText(Outliner *pOutl, OutlinerParaObject* pTextToBeMerged)
   : mpTextToBeMerged(pTextToBeMerged)
 {
-    // Initialize stuff here
+    mpOverflowingTxt = pOutl->GetOverflowingText();
+    mpNonOverflowingTxt = pOutl->GetNonOverflowingText();
+}
+
+OutlinerParaObject *OFlowChainedText::CreateOverflowingParaObject(Outliner *pOutliner)
+{
+    if (mpOverflowingTxt == NULL)
+        return NULL;
+
+    pOutliner->SetText(*mpTextToBeMerged);
+
+    // Get text of first paragraph of destination box
+    Paragraph *pOldPara0 = pOutliner->GetParagraph(0);
+    OUString aOldPara0Txt;
+    if (pOldPara0)
+        aOldPara0Txt = pOutliner->GetText(pOldPara0);
+
+    // Get other paras of destination box (from second on)
+    OutlinerParaObject *pOldParasTail = NULL;
+    if (pOutliner->GetParagraphCount() > 1)
+        pOldParasTail = pOutliner->CreateParaObject(1);
+
+    // Create ParaObject appending old first para in the dest. box
+    //   to last part of overflowing text
+    Paragraph *pTmpPara0 = NULL;
+    OutlinerParaObject *pJoiningPara = NULL;
+
+    if (pOldPara0) {
+        //pOutliner->Clear(); // you need a clear outliner here
+        impSetOutlinerToEmptyTxt(pOutliner);
+
+        pTmpPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(mpOverflowingTxt->GetEndingLines() + aOldPara0Txt, pTmpPara0);
+        pJoiningPara = pOutliner->CreateParaObject();
+    }
+
+    // Create a Para Object out of mpMidParas
+    // (in order to use the SfxItemPool of the current outliner
+    //  instead of the ones currently in mpMidParas)
+
+    // start actual composition
+    //pOutliner->Clear();
+    impSetOutlinerToEmptyTxt(pOutliner);
+
+    // Set headText at the beginning of box
+    OUString aHeadTxt = mpOverflowingTxt->GetHeadingLines();
+    // If we haven't used heading text yet
+    if (mpOverflowingTxt->HasOtherParas()) {
+        Paragraph *pNewPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(aHeadTxt, pNewPara0);
+    }
+
+    // Set all the intermediate Paras
+    if (mpOverflowingTxt->mpMidParas)
+        pOutliner->AddText(*mpOverflowingTxt->mpMidParas);
+
+    // Append old first para in the destination box to
+    //   last part of overflowing text
+    if (pJoiningPara && mpOverflowingTxt->HasOtherParas())
+        pOutliner->AddText(*pJoiningPara);
+    // this second case is if there is to avoid getting an empty line before pJoiningPara
+    else if (pJoiningPara && !mpOverflowingTxt->HasOtherParas())
+        pOutliner->SetText(*pJoiningPara);
+
+    // Append all other old paras
+    if (pOldParasTail)
+        pOutliner->AddText(*pOldParasTail);
+
+    // Draw everything
+    OutlinerParaObject *pNewText = pOutliner->CreateParaObject();
+    return pNewText;
+}
+
+OutlinerParaObject *OFlowChainedText::CreateNonOverflowingParaObject(Outliner *pOutliner)
+{
+    if (mpNonOverflowingTxt == NULL)
+        return NULL;
+
+    if (mpNonOverflowingTxt->mPreOverflowingTxt == "" &&
+        mpNonOverflowingTxt->mpHeadParas != NULL) {
+        // Only (possibly empty) paragraphs before overflowing one
+        pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
+    } else { // We have to include the non-overflowing lines from the overfl. para
+
+        // first make a ParaObject for the strings
+        impSetOutlinerToEmptyTxt(pOutliner);
+        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(mpNonOverflowingTxt->mPreOverflowingTxt, pTmpPara0);
+        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
+        //pOutliner->Clear();
+        //pOutliner->SetStyleSheet( 0, pEdtOutl->GetStyleSheet(0));
+
+        if (mpNonOverflowingTxt->mpHeadParas != NULL) {
+            pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
+            pOutliner->AddText(*pPObj);
+         } else  if (mpNonOverflowingTxt->mPreOverflowingTxt != "") { // only preoverflowing txt
+            //OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
+            //pOutliner->SetText(*pEmptyPObj);
+            pOutliner->SetText(*pPObj);
+        } else { // no text // This case is redundant but it doesn't hurt for now
+            pOutliner->Clear();
+        }
+    }
+
+     return pOutliner->CreateParaObject();
+}
+
+void OFlowChainedText::impSetOutlinerToEmptyTxt(Outliner *pOutliner)
+{
+    OutlinerParaObject *pEmptyTxt = pOutliner->GetEmptyParaObject();
+    pOutliner->SetText(*pEmptyTxt);
 }
 
 
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 0c42d53..3920af3 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -92,7 +92,12 @@ class EDITENG_DLLPUBLIC OFlowChainedText {
 
     OutlinerParaObject *GetTextToBeMerged() const { return mpTextToBeMerged; }
 
+    protected:
+    void impSetOutlinerToEmptyTxt(Outliner *);
+
     private:
+
+
     NonOverflowingText *mpNonOverflowingTxt;
     OverflowingText *mpOverflowingTxt;
 
commit 6a7bf191f4fa3c6c9427fc06328343c9955338d6
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 10:21:56 2015 -0400

    Changed to specialized OFlowChainedText class
    
    Change-Id: Iad2b98f5793bc4b8a49012811718a65ab2fbade0

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 8ecd05c..ca0af38 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -39,7 +39,8 @@ OUString OverflowingText::GetHeadingLines() const
 }
 
 
-ChainedText::ChainedText(Outliner *pOutl)
+OFlowChainedText::OFlowChainedText(Outliner *pOutl, OutlinerParaObject* pTextToBeMerged)
+  : mpTextToBeMerged(pTextToBeMerged)
 {
     // Initialize stuff here
 }
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index 5399f4b..0c42d53 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -83,13 +83,21 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
  * contains and handles the state of a text broken _after_ a flow event.
  *
 */
-class EDITENG_DLLPUBLIC ChainedText {
+class EDITENG_DLLPUBLIC OFlowChainedText {
     public:
-    ChainedText(Outliner *);
+    OFlowChainedText(Outliner *, OutlinerParaObject *);
+
+    OutlinerParaObject *CreateOverflowingParaObject(Outliner *);
+    OutlinerParaObject *CreateNonOverflowingParaObject(Outliner *);
+
+    OutlinerParaObject *GetTextToBeMerged() const { return mpTextToBeMerged; }
 
     private:
     NonOverflowingText *mpNonOverflowingTxt;
     OverflowingText *mpOverflowingTxt;
+
+    OutlinerParaObject *mpTextToBeMerged;
+
 };
 
 #endif
commit 89a1407600b11cefa9d5385ab783a9eb64b7f34a
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Tue Jun 30 10:04:11 2015 -0400

    Added ChainedText as a further abstraction on top of (Non)OverflowingText
    
    Change-Id: I7607aacc856fd9af7ae2087e81a362f071163bd5

diff --git a/editeng/source/outliner/overflowingtxt.cxx b/editeng/source/outliner/overflowingtxt.cxx
index 196d1f8..8ecd05c 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -39,4 +39,10 @@ OUString OverflowingText::GetHeadingLines() const
 }
 
 
+ChainedText::ChainedText(Outliner *pOutl)
+{
+    // Initialize stuff here
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/overflowingtxt.hxx b/include/editeng/overflowingtxt.hxx
index e4f9a2d..5399f4b 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -27,6 +27,11 @@ class OUString;
 
 
 class OutlinerParaObject;
+class EditTextObject;
+class Outliner;
+
+typedef EditTextObject FormattedTextPortion;
+
 
 
 class EDITENG_DLLPUBLIC OverflowingText
@@ -71,6 +76,22 @@ class EDITENG_DLLPUBLIC NonOverflowingText {
                 }
 };
 
+// XXX: Do we also need a class for Underflow here?
+
+/*
+ * class ChainedText:
+ * contains and handles the state of a text broken _after_ a flow event.
+ *
+*/
+class EDITENG_DLLPUBLIC ChainedText {
+    public:
+    ChainedText(Outliner *);
+
+    private:
+    NonOverflowingText *mpNonOverflowingTxt;
+    OverflowingText *mpOverflowingTxt;
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index c8314f1..5602e1e 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -225,7 +225,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
     pChainingOutliner = SdrMakeOutliner( OUTLINERMODE_TEXTOBJECT, this );
     ImpSetOutlinerDefaults(pChainingOutliner, true);
 
-    // Make a TextChain
+    // Make a TextChain //XXX: There should not be only one - XXX: Prototype code
     pTextChain = new TextChain;
 
     /* End Text Chaining related code */
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 723c7f7..1261175 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -255,6 +255,10 @@ OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOut
         pJoiningPara = pOutliner->CreateParaObject();
     }
 
+    // Create a Para Object out of mpMidParas
+    // (in order to use the SfxItemPool of the current outliner
+    //  instead of the ones currently in mpMidParas)
+
     // start actual composition
     //pOutliner->Clear();
     impSetOutlinerToEmptyTxt(pOutliner);
@@ -347,8 +351,20 @@ void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrO
     pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
     pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
 
-    // Set right text attributes
+    // Set right text attributes // XXX: Not enough: it does not handle complex attributes
     pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool());
 }
 
+/*
+ *
+ * Some notes on how to set style sheets:
+ * - save whole edittexts instead of strings only for (Non)OverflowingText; this can be done by the EditEngine::CreateTextObject method and using a selection - probably from ImpEditEngine)
+ * - first, refactor the impGet*ParaObject stuff moving it in some (static?) class in overflowingtxt.hxx. Probably each of these methods should be split in smaller routines.
+ * - for the refactoring of the previous point we may also add an option for whether we are joining paragraphs or not
+ * - When making new OutlinerParaObjs and joining paragraphs we need to first add the string (as we already do) and then, with the appropriate selection, use Outliner::QuickSetAttribs(SfxItemSet(txtObj->GetPool()), aSelectionOfTheNewText)
+ * - having all this in a whole class that contains Overflowing and NonOverflowingText would not be bad. This same class could be used to handle a cursor later on.
+ *
+ *
+ *
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit eba4cabb194ae5a8a2aa3a8026088913283bec10
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 29 18:28:14 2015 -0400

    Drawing outliner's item pool set to that of editing outl
    
    Change-Id: I5ba711fda7df498e0405f351eca953db615e232b

diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 10ba90a..776dc22 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -58,6 +58,8 @@ class TextChainFlow {
     virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
     virtual void impMoveChainedTextToNextLink(SdrOutliner *);
 
+    virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *);
+
     OutlinerParaObject *impGetNonOverflowingParaObject(SdrOutliner *pOutliner);
     OutlinerParaObject *impGetOverflowingParaObject(SdrOutliner *pOutliner);
 
@@ -97,6 +99,8 @@ class EditingTextChainFlow : public TextChainFlow
 
     virtual void impSetTextForEditingOutliner(OutlinerParaObject *);
 
+    virtual void impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *) SAL_OVERRIDE;
+
 };
 
 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 652e803..723c7f7 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -50,6 +50,11 @@ TextChainFlow::~TextChainFlow()
 
 }
 
+void TextChainFlow::impSetFlowOutlinerParams(SdrOutliner *, SdrOutliner *)
+{
+    // Nothing to do if not in editing mode
+}
+
 /*
  * Check for overflow in the state of pFlowOutl.
  * If pParamOutl is not NULL sets some parameters from there.
@@ -59,22 +64,21 @@ TextChainFlow::~TextChainFlow()
 */
 void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *pParamOutl)
 {
+    bool bOldUpdateMode = pFlowOutl->GetUpdateMode();
     // NOTE: Nah you probably don't need this
     if (pParamOutl != NULL)
     {
         // XXX: Set parameters
         // XXX: does this work if you do it before setting the text? Seems so.
         pFlowOutl->SetUpdateMode(true);
-        pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
-        pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
-        pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
+       impSetFlowOutlinerParams(pFlowOutl, pParamOutl);
     }
 
     bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
 
     if (pParamOutl != NULL)
     {
-        pFlowOutl->SetUpdateMode(false); // XXX: Plausibly should be the prev. state
+        pFlowOutl->SetUpdateMode(bOldUpdateMode); // XXX: Plausibly should be the prev. state
     }
 
     // NOTE: overflow and underflow cannot be both true
@@ -336,4 +340,15 @@ void EditingTextChainFlow::impSetTextForEditingOutliner(OutlinerParaObject *pNew
     }
 }
 
+void EditingTextChainFlow::impSetFlowOutlinerParams(SdrOutliner *pFlowOutl, SdrOutliner *pParamOutl)
+{
+    // Set right size for overflow
+    pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
+    pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
+    pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
+
+    // Set right text attributes
+    pFlowOutl->SetEditTextObjectPool(pParamOutl->GetEditTextObjectPool());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0702f5c63ceb9c3101d253e70bd6ae98877ad108
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 29 18:05:07 2015 -0400

    Disable AutoPageSize only if object is chainable in BegTextEdit
    
    Change-Id: I75d4497e2876f35dfc42847787f513cf2bff6a89

diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index f2449eb..56261f1 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -64,10 +64,9 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
     }
 
     // FIXME(matteocam)
-    bool bIsChained = true; // XXX: get it from a method
-    // What is this??
+
     // disable AUTOPAGESIZE
-    if ( bIsChained ) {
+    if ( IsChainable() ) {
         sal_uIntPtr nStat1=rOutl.GetControlWord();
         nStat1 &=~EE_CNTRL_AUTOPAGESIZE;
         rOutl.SetControlWord(nStat1);
commit bbec5cbb82a395319ffdf3637561512b23d82a3d
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 29 13:59:33 2015 -0400

    Moved editing-specific code
    
    Change-Id: I9fa410a60fb6341c5f031cc152141c03975b409e

diff --git a/include/svx/textchainflow.hxx b/include/svx/textchainflow.hxx
index 8528a9f..10ba90a 100644
--- a/include/svx/textchainflow.hxx
+++ b/include/svx/textchainflow.hxx
@@ -45,7 +45,7 @@ class TextChainFlow {
     void ExecuteUnderflow(SdrOutliner *);
 
     // Uses two outliners: one for the non-overfl text and one for overflowing (might be the same)
-    void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
+    virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *);
 
     SdrTextObj *GetLinkTarget();
 
@@ -55,8 +55,8 @@ class TextChainFlow {
 
     TextChain *GetTextChain();
 
-    void impLeaveOnlyNonOverflowingText(SdrOutliner *);
-    void impMoveChainedTextToNextLink(SdrOutliner *);
+    virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *);
+    virtual void impMoveChainedTextToNextLink(SdrOutliner *);
 
     OutlinerParaObject *impGetNonOverflowingParaObject(SdrOutliner *pOutliner);
     OutlinerParaObject *impGetOverflowingParaObject(SdrOutliner *pOutliner);
@@ -88,6 +88,15 @@ class EditingTextChainFlow : public TextChainFlow
     public:
     EditingTextChainFlow(SdrTextObj *);
     virtual void CheckForFlowEvents(SdrOutliner *) SAL_OVERRIDE;
+
+    //virtual void ExecuteOverflow(SdrOutliner *, SdrOutliner *) SAL_OVERRIDE;
+
+
+    protected:
+    virtual void impLeaveOnlyNonOverflowingText(SdrOutliner *) SAL_OVERRIDE;
+
+    virtual void impSetTextForEditingOutliner(OutlinerParaObject *);
+
 };
 
 #endif // INCLUDED_SVX_TEXTCHAINFLOW_HXX
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index ec5dc9a..652e803 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -63,7 +63,7 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
     if (pParamOutl != NULL)
     {
         // XXX: Set parameters
-        // XXX: does this work if you do it before setting the text?
+        // XXX: does this work if you do it before setting the text? Seems so.
         pFlowOutl->SetUpdateMode(true);
         pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
         pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
@@ -152,15 +152,11 @@ void TextChainFlow::ExecuteOverflow(SdrOutliner *pNonOverflOutl, SdrOutliner *pO
 void TextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *pNonOverflOutl)
 {
     OutlinerParaObject *pNewText = impGetNonOverflowingParaObject(pNonOverflOutl);
-
-    // XXX
-    if (mpTargetLink->pEdtOutl != NULL) {
-        mpTargetLink->pEdtOutl->SetText(*pNewText);
-    }
     // adds it to current outliner anyway (useful in static decomposition)
     pNonOverflOutl->SetText(*pNewText);
 
     mpTargetLink->NbcSetOutlinerParaObject(pNewText);
+
 }
 
 void TextChainFlow::impMoveChainedTextToNextLink(SdrOutliner *pOverflOutl)
@@ -308,4 +304,36 @@ void EditingTextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
 
 }
 
+/*
+void EditingTextChainFlow::ExecuteOverflow(SdrOutliner *pOutl1, SdrOutliner *pOutl2)
+{
+
+
+    impSetTextForEditingOutliner
+
+    // Set cursor
+    pEditView->pImpEditView->SetEditSelection( aCurSel );
+    pEditView->pImpEditView->DrawSelection();
+    pEditView->ShowCursor( true, false );
+
+
+}
+*
+* */
+
+void EditingTextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *pNonOverflOutl)
+{
+    OutlinerParaObject *pNewText = impGetNonOverflowingParaObject(pNonOverflOutl);
+    impSetTextForEditingOutliner(pNewText);
+
+    GetLinkTarget()->NbcSetOutlinerParaObject(pNewText);
+}
+
+void EditingTextChainFlow::impSetTextForEditingOutliner(OutlinerParaObject *pNewText)
+{
+    if (GetLinkTarget()->pEdtOutl != NULL) {
+        GetLinkTarget()->pEdtOutl->SetText(*pNewText);
+    }
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 04885096e160f0c2b4a06ec67047537b040425c9
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 29 07:40:40 2015 -0400

    Setting update=false in chaining
    
    Change-Id: I1be2c97d74870bc2934e8cdd50a8d4cc985d02ec

diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index e759387..ec5dc9a 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -72,6 +72,11 @@ void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *p
 
     bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
 
+    if (pParamOutl != NULL)
+    {
+        pFlowOutl->SetUpdateMode(false); // XXX: Plausibly should be the prev. state
+    }
+
     // NOTE: overflow and underflow cannot be both true
     bOverflow = bIsPageOverflow && mpNextLink;
     bUnderflow = !bIsPageOverflow &&  mpNextLink && mpNextLink->HasText();
commit c4bbae8a0af71827ddc4f37d8d52b672bc8c5301
Author: matteocam <matteo.campanelli at gmail.com>
Date:   Mon Jun 29 06:24:22 2015 -0400

    Introduced a check before setting (non)overflowing text
    
    Change-Id: I23db9ed9c558486df1ddcd6c5680e6b6f90b447a

diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
new file mode 100644
index 0000000..e759387
--- /dev/null
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -0,0 +1,306 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+#include <svx/textchain.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdoutl.hxx>
+#include <editeng/outlobj.hxx>
+#include <editeng/overflowingtxt.hxx>
+#include <svx/textchainflow.hxx>
+
+TextChainFlow::TextChainFlow(SdrTextObj *pChainTarget)
+    : mpTargetLink(pChainTarget)
+{
+    mpTextChain = mpTargetLink->GetTextChain();
+    mpNextLink = mpTargetLink->GetNextLinkInChain();
+    bCheckedFlowEvents = false;
+
+    bUnderflow = bOverflow = false;
+
+    mpOverflowingTxt = NULL;
+    mpNonOverflowingTxt = NULL;
+
+    mpUnderflowingPObj = NULL;
+
+    // XXX: Set the next link here?
+
+
+}
+
+
+TextChainFlow::~TextChainFlow()
+{
+
+}
+
+/*
+ * Check for overflow in the state of pFlowOutl.
+ * If pParamOutl is not NULL sets some parameters from there.
+ * This is useful in case the outliner is not set for overflow
+ * (e.g. in editing mode we check for overflow in drawing outl but
+ *  parameters come from editing outliner)
+*/
+void TextChainFlow::impCheckForFlowEvents(SdrOutliner *pFlowOutl, SdrOutliner *pParamOutl)
+{
+    // NOTE: Nah you probably don't need this
+    if (pParamOutl != NULL)
+    {
+        // XXX: Set parameters
+        // XXX: does this work if you do it before setting the text?
+        pFlowOutl->SetUpdateMode(true);
+        pFlowOutl->SetMaxAutoPaperSize(pParamOutl->GetMaxAutoPaperSize());
+        pFlowOutl->SetMinAutoPaperSize(pParamOutl->GetMinAutoPaperSize());
+        pFlowOutl->SetPaperSize(pParamOutl->GetPaperSize());
+    }
+
+    bool bIsPageOverflow = pFlowOutl->IsPageOverflow();
+
+    // NOTE: overflow and underflow cannot be both true
+    bOverflow = bIsPageOverflow && mpNextLink;
+    bUnderflow = !bIsPageOverflow &&  mpNextLink && mpNextLink->HasText();
+
+    // Set (Non)OverflowingTxt here
+
+    mpOverflowingTxt = bOverflow ? pFlowOutl->GetOverflowingText() : NULL;
+    mpNonOverflowingTxt = bOverflow ? pFlowOutl->GetNonOverflowingText() : NULL;
+
+    // Set current underflowing text (if any)
+    mpUnderflowingPObj = bUnderflow ? pFlowOutl->CreateParaObject() : NULL;
+
+}
+
+void TextChainFlow::CheckForFlowEvents(SdrOutliner *pFlowOutl)
+{
+    impCheckForFlowEvents(pFlowOutl, NULL);
+}
+
+
+bool TextChainFlow::IsOverflow()
+{
+    return bOverflow;
+}
+
+bool TextChainFlow::IsUnderflow()
+{
+    return bUnderflow;
+}
+
+
+// XXX: In editing mode you need to get "underflowing" text from editing outliner, so it's kinda separate from the drawing one!
+
+// XXX:Would it be possible to unify undeflow and its possibly following overrflow?
+void TextChainFlow::ExecuteUnderflow(SdrOutliner *pOutl)
+{
+    OutlinerParaObject *pNextLinkWholeText = mpNextLink->GetOutlinerParaObject();
+
+    // making whole text
+    OutlinerParaObject *pCurText;   // XXX: at next line we have editing outliner in editing version
+    //pCurText = pOutl->CreateParaObject();
+
+    // We saved this text already
+    pCurText = mpUnderflowingPObj;
+
+    // NewTextForCurBox = Txt(CurBox) ++ Txt(NextBox)
+    pOutl->SetText(*pCurText);
+    pOutl->AddText(*pNextLinkWholeText);
+    OutlinerParaObject *pNewText = pOutl->CreateParaObject();
+
+    // Set the other box empty so if overflow does not occur we are fine
+    if (!mpTargetLink->GetPreventChainable())
+        mpNextLink->NbcSetOutlinerParaObject(pOutl->GetEmptyParaObject());
+
+    mpTargetLink->NbcSetOutlinerParaObject(pNewText);
+
+    // Check for new overflow
+    CheckForFlowEvents(pOutl); // XXX: How do you know you don't need to set parameters here?
+}
+
+void TextChainFlow::ExecuteOverflow(SdrOutliner *pNonOverflOutl, SdrOutliner *pOverflOutl)
+{
+    // Leave only non overflowing text
+    impLeaveOnlyNonOverflowingText(pNonOverflOutl);
+
+    // Transfer of text to next link
+    if (!mpTargetLink->GetPreventChainable() ) // we don't transfer text while dragging because of resizing
+    {
+        impMoveChainedTextToNextLink(pOverflOutl);
+    }
+}
+
+void TextChainFlow::impLeaveOnlyNonOverflowingText(SdrOutliner *pNonOverflOutl)
+{
+    OutlinerParaObject *pNewText = impGetNonOverflowingParaObject(pNonOverflOutl);
+
+    // XXX
+    if (mpTargetLink->pEdtOutl != NULL) {
+        mpTargetLink->pEdtOutl->SetText(*pNewText);
+    }
+    // adds it to current outliner anyway (useful in static decomposition)
+    pNonOverflOutl->SetText(*pNewText);
+
+    mpTargetLink->NbcSetOutlinerParaObject(pNewText);
+}
+
+void TextChainFlow::impMoveChainedTextToNextLink(SdrOutliner *pOverflOutl)
+{
+    // prevent copying text in same box
+    if ( mpNextLink ==  mpTargetLink ) {
+        fprintf(stderr, "[CHAINING] Trying to copy text for next link in same object\n");
+        return;
+    }
+
+    OutlinerParaObject *pNewText = impGetOverflowingParaObject(pOverflOutl);
+    if (pNewText)
+        mpNextLink->NbcSetOutlinerParaObject(pNewText);
+}
+
+OutlinerParaObject *TextChainFlow::impGetNonOverflowingParaObject(SdrOutliner *pOutliner)
+{
+    if (mpNonOverflowingTxt == NULL)
+        return NULL;
+
+    if (mpNonOverflowingTxt->mPreOverflowingTxt == "" &&
+        mpNonOverflowingTxt->mpHeadParas != NULL) {
+        // Only (possibly empty) paragraphs before overflowing one
+        pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
+    } else { // We have to include the non-overflowing lines from the overfl. para
+
+        // first make a ParaObject for the strings
+        impSetOutlinerToEmptyTxt(pOutliner);
+        Paragraph *pTmpPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(mpNonOverflowingTxt->mPreOverflowingTxt, pTmpPara0);
+        OutlinerParaObject *pPObj = pOutliner->CreateParaObject();
+        //pOutliner->Clear();
+        //pOutliner->SetStyleSheet( 0, pEdtOutl->GetStyleSheet(0));
+
+        if (mpNonOverflowingTxt->mpHeadParas != NULL) {
+            pOutliner->SetText(*mpNonOverflowingTxt->mpHeadParas);
+            pOutliner->AddText(*pPObj);
+         } else  if (mpNonOverflowingTxt->mPreOverflowingTxt != "") { // only preoverflowing txt
+            //OutlinerParaObject *pEmptyPObj = pOutliner->GetEmptyParaObject();
+            //pOutliner->SetText(*pEmptyPObj);
+            pOutliner->SetText(*pPObj);
+        } else { // no text // This case is redundant but it doesn't hurt for now
+            pOutliner->Clear();
+        }
+    }
+
+     return pOutliner->CreateParaObject();
+}
+
+void TextChainFlow::impSetOutlinerToEmptyTxt(SdrOutliner *pOutliner)
+{
+    OutlinerParaObject *pEmptyTxt = pOutliner->GetEmptyParaObject();
+    pOutliner->SetText(*pEmptyTxt);
+}
+
+SdrTextObj *TextChainFlow::GetLinkTarget()
+{
+    return mpTargetLink;
+}
+
+OutlinerParaObject *TextChainFlow::impGetOverflowingParaObject(SdrOutliner *pOutliner)
+{
+
+    if (mpOverflowingTxt == NULL)
+        return NULL;
+
+    OutlinerParaObject *pCurTxt = mpNextLink->GetOutlinerParaObject();
+    pOutliner->SetText(*pCurTxt);
+
+    // Get text of first paragraph of destination box
+    Paragraph *pOldPara0 = pOutliner->GetParagraph(0);
+    OUString aOldPara0Txt;
+    if (pOldPara0)
+        aOldPara0Txt = pOutliner->GetText(pOldPara0);
+
+    // Get other paras of destination box (from second on)
+    OutlinerParaObject *pOldParasTail = NULL;
+    if (pOutliner->GetParagraphCount() > 1)
+        pOldParasTail = pOutliner->CreateParaObject(1);
+
+    // Create ParaObject appending old first para in the dest. box
+    //   to last part of overflowing text
+    Paragraph *pTmpPara0 = NULL;
+    OutlinerParaObject *pJoiningPara = NULL;
+
+    if (pOldPara0) {
+        //pOutliner->Clear(); // you need a clear outliner here
+        impSetOutlinerToEmptyTxt(pOutliner);
+
+        pTmpPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(mpOverflowingTxt->GetEndingLines() + aOldPara0Txt, pTmpPara0);
+        pJoiningPara = pOutliner->CreateParaObject();
+    }
+
+    // start actual composition
+    //pOutliner->Clear();
+    impSetOutlinerToEmptyTxt(pOutliner);
+
+    // Set headText at the beginning of box
+    OUString aHeadTxt = mpOverflowingTxt->GetHeadingLines();
+    // If we haven't used heading text yet
+    if (mpOverflowingTxt->HasOtherParas()) {
+        Paragraph *pNewPara0 = pOutliner->GetParagraph(0);
+        pOutliner->SetText(aHeadTxt, pNewPara0);
+    }
+
+    // Set all the intermediate Paras
+    if (mpOverflowingTxt->mpMidParas)
+        pOutliner->AddText(*mpOverflowingTxt->mpMidParas);
+
+    // Append old first para in the destination box to
+    //   last part of overflowing text
+    if (pJoiningPara && mpOverflowingTxt->HasOtherParas())
+        pOutliner->AddText(*pJoiningPara);
+    // this second case is if there is to avoid getting an empty line before pJoiningPara
+    else if (pJoiningPara && !mpOverflowingTxt->HasOtherParas())
+        pOutliner->SetText(*pJoiningPara);
+
+    // Append all other old paras
+    if (pOldParasTail)
+        pOutliner->AddText(*pOldParasTail);
+
+    // Draw everything
+    OutlinerParaObject *pNewText = pOutliner->CreateParaObject();
+    return pNewText;
+}
+
+TextChain *TextChainFlow::GetTextChain()
+{

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list