office-gobmx/sw
Justin Luth a366cd34a8 tdf#125969 cui: add in-use area image to bitmap list
This fixes a five year old (non-)easyhack with 3 duplicates.
Note the nice-to-have dependencies in the bug report(s).

When the document has a unique background (area) image,
it is now added to the list of available images
IF/WHEN the user looks in the area tab.
This allows the user to switch back after changing,
or re-use it in other places in the document.

Most of this patch ended up being plumbing to ensure that
this added image is ONLY available to the current document,
because it MUST NOT be saved to the user profile.

This change affects all apps and all types of areas: NICE
  -tested Writer pages, paragraphs, headers, textbox, sidebar(page)
  -tested Calc page style
  -tested Draw page, sidebar(page), textbox

Caveats:
-the bitmap list is NOT updated at the time of document import,
 only when area property inspected.
 (The bug requesting inclusion at the time of import is tdf#100832).

make -srj1 UITest_writer_tests8 \
    UITEST_TEST_NAME=tdf125969.tdf125969.test_tdf125969 \
    SAL_USE_VCLPLUGIN=gen

Change-Id: Ic9fea9b199602c4df1376e781d5df019526473d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176253
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-12-10 00:07:59 +01:00
..
documentation/writerfilter move writerfilter inside sw 2024-04-18 09:16:12 +02:00
inc tdf#159549 sw: fix style name in SwXStyle::getParentStyle() 2024-12-09 14:44:37 +01:00
qa tdf#125969 cui: add in-use area image to bitmap list 2024-12-10 00:07:59 +01:00
sdi Resolves tdf#163856 - Disentangle boundaries options 2024-11-20 16:56:07 +01:00
source tdf#164201 docx import: compat14+ cannot be ECMA_376_1ST_EDITION 2024-12-10 00:07:27 +01:00
uiconfig Resolves tdf#164034 - Rename Non-breaking Spaces 2024-12-05 10:22:17 +01:00
util move writerfilter inside sw 2024-04-18 09:16:12 +02:00
AllLangMoTarget_sw.mk migrate to boost::gettext 2017-07-21 08:20:50 +01:00
CppunitTest_sw_a11y.mk Create an UNO service to do the cui symbol lookup in vcl 2024-02-25 14:45:55 +01:00
CppunitTest_sw_accessible_relation_set.mk fix makefile 2023-11-13 11:48:08 +01:00
CppunitTest_sw_apiterminate.mk Extract testDisposedByDesktopTerminate from CppunitTest_sw_apitests 2020-03-20 12:07:16 +01:00
CppunitTest_sw_apitests.mk Fix CppunitTest_sw_apitests 2023-08-28 16:48:24 +02:00
CppunitTest_sw_autocorrect.mk tdf#92029: sw_autocorrect: Add unittest 2024-06-28 21:24:13 +02:00
CppunitTest_sw_core_accessibilitycheck.mk sw: test online a11y check - splitting and joining nodes 2022-11-22 14:56:06 +01:00
CppunitTest_sw_core_attr.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_crsr.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_doc.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_docnode.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_draw.mk introduce docmodel comp., model::ThemeColor, use it in SvxColorItem 2023-01-12 23:15:58 +00:00
CppunitTest_sw_core_edit.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_fields.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_frmedt.mk make more symbols private in writer 2024-03-05 18:33:33 +01:00
CppunitTest_sw_core_header_footer.mk sw: move header/footer tests to own class in core tests 2023-11-28 04:02:22 +01:00
CppunitTest_sw_core_layout.mk tdf#138711 sw textbox: capture fly when its draw object is captured 2024-10-16 09:53:34 +02:00
CppunitTest_sw_core_objectpositioning.mk tdf#156318 sw floattable: fix follow text flow handling on interactive edit 2023-09-04 11:51:53 +02:00
CppunitTest_sw_core_text.mk tdf#161318 sw clearing break: ignore wrap-through anchored objects 2024-05-30 13:30:40 +02:00
CppunitTest_sw_core_theme.mk tdf#162715: do not import theme when pasting from clipboard 2024-08-31 12:05:10 +02:00
CppunitTest_sw_core_tox.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_txtnode.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_undo.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_core_unocore.mk merge textconv_dict into i18npool 2024-02-19 20:33:57 +01:00
CppunitTest_sw_core_view.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_dialogs_test.mk Missing test dependencies 2023-04-20 16:48:04 +02:00
CppunitTest_sw_dialogs_test_2.mk fix Makefile typo 2019-11-08 21:06:05 +01:00
CppunitTest_sw_docbookexport.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_filter_ascii.mk tdf#144576 Copy a table from Writer to plain text editor as a Matrix 2024-05-14 18:56:44 +02:00
CppunitTest_sw_filter_html.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_filter_ww8.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_filter_xml.mk tdf#155510 ODT import: ignore props of covered table cells, unless in comp mode 2023-08-23 08:03:59 +02:00
CppunitTest_sw_filters_test.mk Use less libxml2 external headers dependency 2023-09-29 00:20:57 +02:00
CppunitTest_sw_fodfexport.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_globalfilter.mk CppunitTest_sw_globalfilter also needs the ASan hack 2022-12-14 07:06:26 +00:00
CppunitTest_sw_htmlexport.mk HTML/ReqIF export: introduce RelativeOwnObjectURL filter option 2024-07-27 02:03:15 +02:00
CppunitTest_sw_htmlexport2.mk CppunitTest_sw_htmlexport: split in two 2024-11-20 17:00:44 +01:00
CppunitTest_sw_htmlimport.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_indexingexport.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_layoutwriter.mk sw: split CppunitTest_sw_layoutwriter into 2 2021-05-15 13:05:13 +02:00
CppunitTest_sw_layoutwriter2.mk sw: split CppunitTest_sw_layoutwriter into 2 2021-05-15 13:05:13 +02:00
CppunitTest_sw_layoutwriter3.mk CppunitTest_sw_layoutwriter: split in two 2023-03-09 19:09:45 +00:00
CppunitTest_sw_layoutwriter4.mk CppunitTest_sw_layoutwriter3: split in two 2024-10-17 14:41:34 +02:00
CppunitTest_sw_layoutwriter5.mk CppunitTest_sw_layoutwriter2: split in two 2024-11-18 13:59:06 +01:00
CppunitTest_sw_macros_test.mk sw doc model xml dump: restore lost spzFrameFormatTable section 2023-05-05 17:47:52 +02:00
CppunitTest_sw_mailmerge.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_mailmerge2.mk sw:qa: add mailmerge export directly pdf unit test 2022-12-06 18:13:40 +00:00
CppunitTest_sw_odfexport.mk move BGradient to awt::Gradient2 UNO conversion into docmodel 2023-08-21 09:27:12 +02:00
CppunitTest_sw_odfexport2.mk sw: fix hyphenation dependencies of CppunitTests 2024-10-01 14:15:17 +02:00
CppunitTest_sw_odffeatures.mk Use less libxml2 external headers dependency 2023-09-29 00:20:57 +02:00
CppunitTest_sw_odfimport.mk CppunitTest_sw_odfimport: turn on set_non_application_font_use 2024-03-14 09:13:23 +01:00
CppunitTest_sw_ooxml_theme_export.mk CppunitTest_sw_ooxml_theme_export: turn on set_non_application_font_use 2024-02-08 13:11:51 +01:00
CppunitTest_sw_ooxmlencryption.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ooxmlexport.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport2.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport3.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport4.mk Add missing dependency 2020-07-11 00:40:22 +02:00
CppunitTest_sw_ooxmlexport5.mk CppunitTest_sw_ooxmlexport5: turn on set_non_application_font_use 2024-03-07 21:03:23 +01:00
CppunitTest_sw_ooxmlexport6.mk CppunitTest_sw_ooxmlexport6: turn on set_non_application_font_use 2024-03-07 21:03:06 +01:00
CppunitTest_sw_ooxmlexport7.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport8.mk SwModelTestBase: inherit from UnoApiXmlTest 2022-11-09 11:34:05 +01:00
CppunitTest_sw_ooxmlexport9.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport10.mk fix build 2024-01-06 19:12:02 +01:00
CppunitTest_sw_ooxmlexport11.mk tdf#92524 ooxmlexport: recognize COL_AUTO for RES_BACKGROUND 2017-10-30 06:16:24 +01:00
CppunitTest_sw_ooxmlexport12.mk Split ooxmlexport10 into two unit test modules. 2018-03-31 11:05:52 +02:00
CppunitTest_sw_ooxmlexport13.mk tdf121374 ooxmlexport: export H/F to default section 2018-12-18 09:13:34 +01:00
CppunitTest_sw_ooxmlexport14.mk Drop SvtFilterOptions and use officecfg instead 2024-01-07 18:23:09 +01:00
CppunitTest_sw_ooxmlexport15.mk Revert "tdf#104017 DOC export: be less aggressive with merging page styles" 2020-05-25 14:59:45 +02:00
CppunitTest_sw_ooxmlexport16.mk Drop SvtFilterOptions and use officecfg instead 2024-01-07 18:23:09 +01:00
CppunitTest_sw_ooxmlexport17.mk sw: add a DisableBuiltinStyles API setting 2021-09-15 16:45:57 +02:00
CppunitTest_sw_ooxmlexport18.mk tdf#150197 sw: convert pre-defined num styles to ListFormat 2022-08-01 16:41:32 +02:00
CppunitTest_sw_ooxmlexport19.mk CppunitTest_sw_ooxmlexport10: split in two 2023-04-11 22:38:49 +02:00
CppunitTest_sw_ooxmlexport20.mk CppunitTest_sw_ooxmlexport20: remove copy&paste leftover 2023-12-20 21:35:02 +01:00
CppunitTest_sw_ooxmlexport21.mk CppunitTest_sw_ooxmlexport21: turn on set_non_application_font_use 2024-03-07 16:55:13 +01:00
CppunitTest_sw_ooxmlexport_template.mk sw: support for saving into .dotx file 2018-12-14 11:42:44 +01:00
CppunitTest_sw_ooxmlfieldexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ooxmlimport.mk fix build 2024-01-06 19:12:02 +01:00
CppunitTest_sw_ooxmlimport2.mk introduce docmodel comp., model::ThemeColor, use it in SvxColorItem 2023-01-12 23:15:58 +00:00
CppunitTest_sw_ooxmllinks.mk CppunitTest_sw_ooxmllinks: turn on set_non_application_font_use 2024-02-22 09:19:33 +01:00
CppunitTest_sw_ooxmlw14export.mk CppunitTest_sw_ooxmlw14export: turn on set_non_application_font_use 2024-03-07 12:28:41 +01:00
CppunitTest_sw_pdf_test.mk CppunitTest_sw_pdf_test: Add dependency on xpdfimport 2024-02-23 17:02:25 +01:00
CppunitTest_sw_rtfexport.mk sw_rtfexport: use a template for makefiles 2021-06-03 16:26:30 +02:00
CppunitTest_sw_rtfexport2.mk sw_rtfexport: use a template for makefiles 2021-06-03 16:26:30 +02:00
CppunitTest_sw_rtfexport3.mk Missing test dependency 2023-07-06 13:55:52 +02:00
CppunitTest_sw_rtfexport4.mk sw_rtfexport: use a template for makefiles 2021-06-03 16:26:30 +02:00
CppunitTest_sw_rtfexport5.mk sw_rtfexport: use a template for makefiles 2021-06-03 16:26:30 +02:00
CppunitTest_sw_rtfexport6.mk CppunitTest_sw_rtfexport5: split in two 2023-03-01 20:52:59 +00:00
CppunitTest_sw_rtfexport7.mk CppunitTest_sw_rtfexport: split in two 2023-03-24 17:09:48 +00:00
CppunitTest_sw_rtfexport8.mk rtf: Don't export notes author/date when in privacy mode 2024-06-20 09:22:11 +02:00
CppunitTest_sw_rtfimport.mk tdf#131386 writerfilter: RTF import paragraph mark formatting 2023-01-13 19:31:53 +00:00
CppunitTest_sw_tiledrendering.mk introduce docmodel comp., model::ThemeColor, use it in SvxColorItem 2023-01-12 23:15:58 +00:00
CppunitTest_sw_tiledrendering2.mk CppunitTest_sw_tiledrendering2: move to tiledrendering folder 2024-11-20 20:35:09 +01:00
CppunitTest_sw_txtencexport.mk CppunitTest_sw_pdf_test: turn on gb_CppunitTest_set_non_application_font_use 2024-01-04 09:00:30 +01:00
CppunitTest_sw_txtexport.mk sw: fix --without-fonts build 2023-11-24 19:01:18 +01:00
CppunitTest_sw_txtimport.mk Related: tdf#161533 Test fixes for CJK systems 2024-06-12 23:51:46 +02:00
CppunitTest_sw_uibase_dialog.mk CppunitTest_sw_uibase_dialog: turn on set_non_application_font_use 2024-01-18 09:34:13 +01:00
CppunitTest_sw_uibase_dochdl.mk CppunitTest_sw_uibase_dochdl: turn on set_non_application_font_use 2024-03-07 10:16:51 +01:00
CppunitTest_sw_uibase_docvw.mk CppunitTest_sw_uibase_docvw: turn on set_non_application_font_use 2024-04-18 21:51:08 +02:00
CppunitTest_sw_uibase_fldui.mk CppunitTest_sw_uibase_fldui: turn on set_non_application_font_use 2024-02-01 09:59:14 +01:00
CppunitTest_sw_uibase_frmdlg.mk CppunitTest_sw_uibase_frmdlg: turn on set_non_application_font_use 2024-01-25 09:58:25 +01:00
CppunitTest_sw_uibase_shells.mk CppunitTest_sw_uibase_shells: turn on set_non_application_font_use 2024-04-11 09:48:23 +02:00
CppunitTest_sw_uibase_uiview.mk CppunitTest_sw_uibase_uiview: turn on set_non_application_font_use 2024-03-21 21:12:05 +01:00
CppunitTest_sw_uibase_unit.mk CppunitTest_sw_pdf_test: turn on gb_CppunitTest_set_non_application_font_use 2024-01-04 09:00:30 +01:00
CppunitTest_sw_uibase_uno.mk CppunitTest_sw_pdf_test: turn on gb_CppunitTest_set_non_application_font_use 2024-01-04 09:00:30 +01:00
CppunitTest_sw_uibase_wrtsh.mk CppunitTest_sw_unowriter: turn on gb_CppunitTest_set_non_application_font_use 2024-01-11 17:41:48 +01:00
CppunitTest_sw_uiwriter.mk sw_uiwriter: Use a template in makefiles to reduce duplicated code 2021-05-13 10:40:41 +02:00
CppunitTest_sw_uiwriter2.mk sw_uiwriter: Use a template in makefiles to reduce duplicated code 2021-05-13 10:40:41 +02:00
CppunitTest_sw_uiwriter3.mk sw_uiwriter: Use a template in makefiles to reduce duplicated code 2021-05-13 10:40:41 +02:00
CppunitTest_sw_uiwriter4.mk Missing test dependency 2021-11-05 12:13:34 +01:00
CppunitTest_sw_uiwriter5.mk sw: split CppunitTest_sw_uiwriter2 into uiwriter2 and uiwriter5 2022-03-02 15:22:05 +01:00
CppunitTest_sw_uiwriter6.mk possible fix for testRedlineAutoCorrect2 "Lorem,... Lorem,…" failure 2022-09-21 18:08:27 +02:00
CppunitTest_sw_uiwriter7.mk sw: split CppunitTest_sw_uiwriter into uiwriter and uiwriter7 2022-03-15 23:23:53 +01:00
CppunitTest_sw_uiwriter8.mk Split CppunitTest_sw_uiwriter3 into a uiwriter3 and a uiwriter8 2022-08-30 12:59:16 +02:00
CppunitTest_sw_uiwriter9.mk CppunitTest_sw_uiwriter9: avoid external fonts 2023-12-21 15:25:45 +01:00
CppunitTest_sw_unowriter.mk merge textconv_dict into i18npool 2024-02-19 20:33:57 +01:00
CppunitTest_sw_uwriter.mk sw: fix --without-fonts build 2023-11-24 19:01:18 +01:00
CppunitTest_sw_writerfilter_dmapper.mk tdf#162002 DOCX import: ignore subsetted embedded fonts for editing 2024-07-12 11:38:46 +02:00
CppunitTest_sw_writerfilter_filter.mk sw qa: rename writerfilter/cppunittests to just writerfilter 2024-05-24 17:34:09 +02:00
CppunitTest_sw_writerfilter_filters_test.mk sw qa: rename writerfilter/cppunittests to just writerfilter 2024-05-24 17:34:09 +02:00
CppunitTest_sw_writerfilter_misc.mk sw qa: rename writerfilter/cppunittests to just writerfilter 2024-05-24 17:34:09 +02:00
CppunitTest_sw_writerfilter_ooxml.mk CppunitTest_sw_writerfilter_ooxml: turn on set_non_application_font_use 2024-06-20 19:40:47 +02:00
CppunitTest_sw_writerfilter_rtftok.mk sw qa: rename writerfilter/cppunittests to just writerfilter 2024-05-24 17:34:09 +02:00
CppunitTest_sw_ww8export.mk CppunitTest_sw_ww8export: avoid external fonts 2023-12-14 08:20:25 +01:00
CppunitTest_sw_ww8export2.mk sw_ww8export: use a template for makefiles 2021-06-03 12:56:59 +02:00
CppunitTest_sw_ww8export3.mk sw_ww8export: use a template for makefiles 2021-06-03 12:56:59 +02:00
CppunitTest_sw_ww8export4.mk CppunitTest_sw_ww8export4: turn on set_non_application_font_use 2024-02-15 17:36:15 +01:00
CppunitTest_sw_ww8import.mk CppunitTest_sw_ww8import: avoid external fonts 2023-11-30 08:26:39 +01:00
CppunitTest_sw_xhtmlexport.mk sw: fix --without-fonts build 2023-11-24 19:01:18 +01:00
CustomTarget_generated.mk makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo) 2024-05-03 16:06:14 +02:00
CustomTarget_source.mk makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo) 2024-05-03 16:06:14 +02:00
IwyuFilter_sw.yaml move writerfilter inside sw 2024-04-18 09:16:12 +02:00
JunitTest_sw_complex.mk sw a11y: Disable unreliable CheckIndeterminateState test for now 2024-03-15 16:29:34 +01:00
JunitTest_sw_unoapi_1.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
JunitTest_sw_unoapi_2.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
JunitTest_sw_unoapi_3.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
JunitTest_sw_unoapi_4.mk Simplify and fix Java UNO API test makefiles 2018-11-09 07:37:00 +01:00
layoutwriter_setup.mk sw: fix hyphenation dependencies of CppunitTests 2024-10-01 14:15:17 +02:00
Library_msword.mk simplify IMark hierarchy (10) 2024-08-07 12:05:42 +02:00
Library_sw.mk sw: use frozen in SwXText::convertToTable() 2024-10-19 20:39:11 +02:00
Library_sw_writerfilter.mk reduce OUString ref-counting in writerfilter 2024-11-04 15:18:55 +01:00
Library_swd.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_swqahelper.mk sw floattable: unconditionally map <w:tblpPr> to SwFormatFlySplit 2023-03-17 14:10:34 +00:00
Library_swui.mk Create an UNO service to do the symbol lookup in sw 2024-03-06 12:34:10 +01:00
Library_vbaswobj.mk tdf#151548 vba ContentControls: Add word::XContentControlListEntry 2022-11-25 18:09:32 +01:00
Makefile switch to include-based build rather than sourced-based build 2012-02-05 19:34:05 -06:00
Module_sw.mk CppunitTest_sw_htmlexport: split in two 2024-11-20 17:00:44 +01:00
ooxmlexport_setup.mk sw: fix hyphenation dependencies of CppunitTests 2024-10-01 14:15:17 +02:00
PythonTest_sw_python.mk tdf#136423 make SwXDrawPage::group work with a single shape 2020-09-03 10:45:25 +02:00
README.md Updated README.md files 2021-04-19 11:13:41 +02:00
README.writerfilter.md move writerfilter inside sw 2024-04-18 09:16:12 +02:00
rtfexport_setup.mk make more symbols private in writer 2024-03-05 18:33:33 +01:00
UIConfig_sglobal.mk tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin" 2021-01-20 19:08:05 +01:00
UIConfig_sweb.mk tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin" 2021-01-20 19:08:05 +01:00
UIConfig_swform.mk tdf#112411 Merge "Form controls" and "More controls" into one toolbar 2019-03-13 12:07:35 +01:00
UIConfig_swreport.mk tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin" 2021-01-20 19:08:05 +01:00
UIConfig_swriter.mk add context menu for comments & some other changes 2024-09-19 13:55:56 +02:00
UIConfig_swxform.mk tdf#116757 sw ChangesInMargin: add "Show Insertions in Margin" 2021-01-20 19:08:05 +01:00
UITest_chapterNumbering.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_classification.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_librelogo.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_chart.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_fieldDialog.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_findBar.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_findReplace.mk uitest oneprocess mode: explicitly avoid this in the remaining tests 2023-10-19 08:21:51 +02:00
UITest_sw_navigator.mk UITest_sw_navigator: avoid oneprocess 2023-10-19 18:31:27 +02:00
UITest_sw_options.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_sidebar.mk uitest oneprocess mode: default to this and clean up one test 2023-10-26 08:12:20 +02:00
UITest_sw_styleInspector.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_table.mk uitest oneprocess mode: explicitly avoid this in the remaining tests 2023-10-19 08:21:51 +02:00
UITest_sw_ui_fmtui.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_ui_frmdlg.mk sw floattable, insert UI: fix default frame width when inserting a new one 2023-11-07 09:52:50 +01:00
UITest_sw_ui_index.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_ui_misc.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_uibase_docvw.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_sw_uibase_shells.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_dialogs.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_macro_tests.mk uitest oneprocess mode: explicitly avoid this in the remaining tests 2023-10-19 08:21:51 +02:00
UITest_writer_tests.mk uitest oneprocess mode: explicitly avoid this in the remaining tests 2023-10-19 08:21:51 +02:00
UITest_writer_tests2.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_tests3.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_tests4.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_tests5.mk uitest oneprocess mode: explicitly avoid this in the remaining tests 2023-10-19 08:21:51 +02:00
UITest_writer_tests6.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_tests7.mk uitest: Clean up redundant usage of gb_UITest_use_oneprocess 2023-11-06 09:26:43 +01:00
UITest_writer_tests8.mk UITest_writer_tests8: do not use custom configuration 2023-12-04 15:03:03 +01:00
uiwriter_setup.mk sw: fix hyphenation dependencies of CppunitTests 2024-10-01 14:15:17 +02:00
ww8export_setup.mk introduce docmodel comp., model::ThemeColor, use it in SvxColorItem 2023-01-12 23:15:58 +00:00

Writer Application Code

Exact history was lost before Sept. 18th, 2000, but old source code comments show that Writer core dates back until at least November 1990.

Module Contents

  • inc: headers available to all source files inside the module
  • qa: unit, slow and subsequent tests
  • sdi
  • source: see below
  • uiconfig: user interface configuration
  • util: UNO passive registration config

Source Contents

  • core: Writer core (document model, layout, UNO API implementation)
  • filter: Writer internal filters
    • ascii: plain text filter
    • basflt
    • docx: wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes
    • html: HTML filter
    • inc: include files for filters
    • rtf: thin copy&paste helper around the UNO RTF import filter (in writerfilter)
    • writer
    • ww8: DOC import, DOC/DOCX/RTF export
    • xml: ODF import/export, subclassed from xmloff (where most of the work is done)
  • uibase: user interface (those parts that are linked into sw & always loaded)
  • ui: user interface (optional parts that are loaded on demand (swui))

Core

There is a good overview documentation of basic architecture of Writer core in the OOo wiki:

Writer specific WhichIds are defined in sw/inc/hintids.hxx.

The details below are mainly about details missing from the wiki pages.

SwDoc

The central class for a document is SwDoc, which represents a document.

A lot of the functionality is split out into separate Manager classes, each of which implements some IDocument* interface; there are SwDoc::getIDocument*() methods to retrieve the managers.

However there are still too many members and methods in this class, many of which could be moved to some Manager or other...

SwNodes

Basically a (fancy) array of SwNode pointers. There are special subclasses of SwNode (SwStartNode and SwEndNode) which are used to encode a nested tree structure into the flat array; the range of nodes from SwStartNode to its corresponding SwEndNode is sometimes called a "section" (but is not necessarily what the high-level document model calls a "Section"; that is just one of the possibilities).

The SwNodes contains the following top-level sections:

  1. Empty
  2. Footnote content
  3. Frame / Header / Footer content
  4. Deleted Change Tracking content
  5. Body content

Undo

The Undo/Redo information is stored in a sw::UndoManager member of SwDoc, which implements the IDocumentUndoRedo interface. Its members include a SwNodes array containing the document content that is currently not in the actual document but required for Undo/Redo, and a stack of SwUndo actions, each of which represents one user-visible Undo/Redo step.

There are also ListActions which internally contain several individual SwUndo actions; these are created by the StartUndo/EndUndo wrapper methods.

Text Attributes

The sub-structure of paragraphs is stored in the SwpHintsArray member SwTextNode::m_pSwpHints. There is a base class SwTextAttr with numerous subclasses; the SwTextAttr has a start and end index and a SfxPoolItem to store the actual formatting attribute.

There are several sub-categories of SwTextAttr:

  • formatting attributes: Character Styles (SwTextCharFormat, RES_TXTATR_CHARFMT) and Automatic Styles (no special class, RES_TXTATR_AUTOFMT): these are handled by SwpHintsArray::BuildPortions and MergePortions, which create non-overlapping portions of formatting attributes.

  • nesting attributes: Hyperlinks (SwTextINetFormat, RES_TXTATR_INETFMT), Ruby (SwTextRuby, RES_TXTATR_CJK_RUBY) and Meta/MetaField (SwTextMeta, RES_TXTATR_META/RES_TXTATR_METAFIELD): these maintain a properly nested tree structure. The Meta/Metafield are "special" because they have both start/end and a dummy character at the start.

  • misc. attributes: Reference Marks, ToX Marks

  • attributes without end: Fields, Footnotes, Flys (AS_CHAR) These all have a corresponding dummy character in the paragraph text, which is a placeholder for the "expansion" of the attribute, e.g. field content.

Fields

There are multiple model classes involved for fields:

  • enum SwFieldIds enumerates the different types of fields.
  • SwFieldType contains some shared stuff for all fields of a type. There are many subclasses of SwFieldType, one for each different type of field. For most types of fields there is one shared instance of this per type, which is created in DocumentFieldsManager::InitFieldTypes() but for some there are more than one, and they are dynamically created, see DocumentFieldsManager::InsertFieldType(). An example for the latter are variable fields (SwFieldIds::GetExp/SwFieldIds::SetExp), with one SwFieldType per variable.
  • SwXFieldMaster is the UNO wrapper of a field type. It is a SwClient registered at the SwFieldType. Its life-cycle is determined by UNO clients outside of sw; it will get disposed when the SwFieldType dies.
  • SwFormatField is the SfxPoolItem of a field. The SwFormatField is a SwClient registered at its SwFieldType. The SwFormatField owns the SwField of the field.
  • SwField contains the core logic of a field. The SwField is owned by the SwFormatField of the field. There are many subclasses of SwField, one for each different type of field. Note that there are not many places that can Expand the field to its correct value, since for example page number fields require a View with an up to date layout; therefore the correct expansion is cached.
  • SwTextField is the text attribute of a field. It owns the SwFormatField of the field (like all text attributes).
  • SwXTextField is the UNO wrapper object of a field. It is a SwClient registered at the SwFormatField. Its life-cycle is determined by UNO clients outside of sw; it will get disposed when the SwFormatField dies.

Lists

  • SwNumFormat (subclass of SvxNumFormat) determines the formatting of a single numbering level.

  • SwNumRule (NOT a subclass of SvxNumRule) is a list style, containing one SwNumFormat per list level. SwNumRule::maTextNodeList is the list of SwTextNode that have this list style applied.

  • SwNumberTreeNode is a base class that represents an abstract node in a hierarchical tree of numbered nodes.

  • SwNodeNum is the subclass of SwNumberTreeNode that connects it with an actual SwTextNode and also with a SwNumRule; SwTextNode::mpNodeNum points back in the other direction

  • SwList represents a list, which is (mostly) a vector of SwNodeNum trees, one per SwNodes top-level section (why that?).

  • IDocumentListsAccess, sw::DocumentListsManager owns all SwList instances, and maintains mappings:

    • from list-id to SwList
    • from list style name to SwList (the "default" SwList for that list style)
  • IDocumentListItems, sw::DocumentListItemsManager contains a set of all SwNodeNum instances, ordered by SwNode index

  • the special Outline numbering rule: SwDoc::mpOutlineRule

  • IDocumentOutlineNodes, sw::DocumentOutlineNodesManager maintain a list (which is actually stored in SwNodes::m_pOutlineNodes) of SwTextNodes that either have the Outline numrule applied, or have the RES_PARATR_OUTLINELEVEL item set (note that in the latter case, the SwTextNode does not have a SwNodeNum and is not associated with the SwDoc::mpOutlineRule).

  • SwTextNodes and paragraph styles have items/properties:

    • RES_PARATR_OUTLINELEVEL/"OutlineLevel" to specify an outline level without necessarily having the outline SwNumRule assigned
    • RES_PARATR_NUMRULE/"NumberingStyleName" the list style to apply; may be empty "" which means no list style (to override inherited value) Only SwTextNode has these items:
    • RES_PARATR_LIST_ID/"ListId" determines the SwList to which the node is added
    • RES_PARATR_LIST_LEVEL/"NumberingLevel" the level at which the SwTextNode will appear in the list
    • RES_PARATR_LIST_ISRESTART/"ParaIsNumberingRestart" restart numbering sequence at this SwTextNode
    • RES_PARATR_LIST_RESTARTVALUE/"NumberingStartValue" restart numbering sequence at this SwTextNode with this value
    • RES_PARATR_LIST_ISCOUNTED/"NumberingIsNumber" determines if the node is actually counted in the numbering sequence; these are different from "phantoms" because there's still a SwTextNode.

Note that there is no UNO service to represent a list.

Layout

The layout is a tree of SwFrame subclasses, the following relationships are possible between frames:

  • You can visit the tree by following the upper, lower, next and previous pointers.
  • The functionality of flowing of a frame across multiple parents (e.g. pages) is implemented in SwFlowFrame, which is not an SwFrame subclass. The logical chain of such frames can be visited using the follow and precede pointers. ("Leaf" is a term that refers to such a relationship.)
  • In case a frame is split into multiple parts, then the first one is called master, while the others are called follows.