office-gobmx/sw
Thorsten Behrens 493ae7a6bb replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that
made more sense.

Background and motivation:
  https://tools.ietf.org/html/draft-knodel-terminology-02

[API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist
[API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice
[API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList

Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-10 01:34:54 +02:00
..
inc Typo: pargraph->paragraph 2020-07-07 17:10:03 +02:00
qa replace usage of blacklist with denylist 2020-07-10 01:34:54 +02:00
sdi tdf#133026: Tight integration of extensions - Additions Dialog first iteration 2020-06-25 22:16:55 +02:00
source cid#1448540 Dereference null return value 2020-07-09 14:49:49 +02:00
uiconfig tdf#87783 Unify image wrap option labels wording 2020-07-07 11:23:05 +02:00
util rework PageOrientationPopup to be a PopupWindowController 2020-01-14 21:26:49 +01:00
AllLangMoTarget_sw.mk
CppunitTest_sw_accessible_relation_set.mk fix CppunitTest_sw_accessible_relation_set dependency 2020-03-20 16:43:57 +01:00
CppunitTest_sw_apiterminate.mk Extract testDisposedByDesktopTerminate from CppunitTest_sw_apitests 2020-03-20 12:07:16 +01:00
CppunitTest_sw_apitests.mk Missing test dependency 2020-03-19 22:01:32 +01:00
CppunitTest_sw_core_accessibilitycheck.mk acc. check: introduce AccessibilityCheckTest + document test 2019-12-28 12:35:36 +01:00
CppunitTest_sw_core_doc.mk tdf#133271 sw textbox: handle TextRotateAngle shape property 2020-06-02 14:13:59 +02:00
CppunitTest_sw_core_frmedt.mk tdf#91219 sw: don't allow anchoring a shape+textbox into itself 2020-02-25 09:01:51 +01:00
CppunitTest_sw_core_layout.mk sw: fix handling of table vs fly overlaps in the AddVerticalFlyOffsets case 2020-02-14 18:37:34 +01:00
CppunitTest_sw_core_objectpositioning.mk tdf#131729 sw: handle no drawing objects when calculating overlap of objects 2020-04-28 09:03:18 +02:00
CppunitTest_sw_core_text.mk sw: add rendering for semi-transparent text 2020-01-07 09:26:47 +01:00
CppunitTest_sw_core_txtnode.mk tdf#131490 sw btlr: fix handling of vertical text 2020-04-07 09:04:09 +02:00
CppunitTest_sw_core_unocore.mk tdf#119081 sw: fix RTF paste into outer table cell 2020-06-23 09:02:21 +02:00
CppunitTest_sw_dialogs_test.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_dialogs_test_2.mk fix Makefile typo 2019-11-08 21:06:05 +01:00
CppunitTest_sw_docbookexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_filters_test.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_filters_test2.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_fodfexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_globalfilter.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_htmlexport.mk sw XHTML export: properly write <li>...</li> around multiple paragraphs 2020-05-21 13:08:11 +02:00
CppunitTest_sw_htmlimport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_layoutwriter.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_macros_test.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_mailmerge.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_odfexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_odfimport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +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
CppunitTest_sw_ooxmlexport3.mk
CppunitTest_sw_ooxmlexport4.mk tdf#134043 DOCX import: new unit tests: ComboBox to DropDown 2020-06-30 23:54:20 +02:00
CppunitTest_sw_ooxmlexport5.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport6.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport7.mk
CppunitTest_sw_ooxmlexport8.mk do not reuse common PCH if switching to Objective C++ 2020-01-18 14:57:05 +01:00
CppunitTest_sw_ooxmlexport9.mk Workaround strange sw test makefiles 2016-12-30 07:16:03 +00:00
CppunitTest_sw_ooxmlexport10.mk tdf#42346: DOCX export of cross-references to objects 2017-11-04 19:11:00 +01:00
CppunitTest_sw_ooxmlexport11.mk
CppunitTest_sw_ooxmlexport12.mk Split ooxmlexport10 into two unit test modules. 2018-03-31 11:05:52 +02:00
CppunitTest_sw_ooxmlexport13.mk
CppunitTest_sw_ooxmlexport14.mk tdf#108350 writerfilter: restore TimesNewRoman as default font 2019-10-17 06:23:00 +02: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_ooxmlexport_template.mk
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 do not reuse common PCH if switching to Objective C++ 2020-01-18 14:57:05 +01:00
CppunitTest_sw_ooxmlimport2.mk do not reuse common PCH if switching to Objective C++ 2020-01-18 14:57:05 +01:00
CppunitTest_sw_ooxmllinks.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ooxmlw14export.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_rtfexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_rtfexport2.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_rtfexport3.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_rtfexport4.mk sw: RTF export: fix invalid RTF for shapes and text frames again 2019-11-19 11:16:52 +01:00
CppunitTest_sw_rtfexport5.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_rtfimport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_tiledrendering.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_txtexport.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_uibase_dochdl.mk sw: prefer ODF over RTF when pasting from Writer 2020-04-22 20:08:20 +02:00
CppunitTest_sw_uibase_shells.mk tdf#130482 sw: fix text alignment in shape text 2020-02-08 09:04:40 +01:00
CppunitTest_sw_uibase_unit.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_uiwriter.mk tdf#129382: Add unittest 2020-02-27 13:01:43 +01:00
CppunitTest_sw_unowriter.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_uwriter.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
CppunitTest_sw_ww8export.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ww8export2.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ww8export3.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
CppunitTest_sw_ww8import.mk tdf#130812 DOC import: fix unexpected transparency of text 2020-02-24 13:20:17 +01:00
CppunitTest_sw_xhtmlexport.mk Missing test dependencies 2020-03-20 12:00:22 +01:00
CustomTarget_generated.mk Fix call of Python 2020-03-03 10:42:09 +01:00
IwyuFilter_sw.yaml Remove some unused includes 2020-05-27 09:06:33 +02:00
JunitTest_sw_complex.mk Fix many Java subsequentcheck test by using JUH 2018-11-09 07:37:50 +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
JunitTest_sw_unoapi_3.mk
JunitTest_sw_unoapi_4.mk
Library_msword.mk
Library_sw.mk Changed the source code location for Inspector 2020-06-13 01:09:59 +02:00
Library_swd.mk use the common system PCH header in sw/ 2019-10-04 09:00:05 +02:00
Library_swui.mk do not require $(SRCDIR) in every gb_Library_set_precompiled_header 2019-09-23 10:47:25 +02:00
Library_vbaswobj.mk do not require $(SRCDIR) in every gb_Library_set_precompiled_header 2019-09-23 10:47:25 +02:00
Makefile
Module_sw.mk tdf#119081 sw: fix RTF paste into outer table cell 2020-06-23 09:02:21 +02:00
ooxmlexport_setup.mk sw: no reason why SwModelTestBase can be used only by "extras" tests 2019-11-08 09:04:45 +01:00
PythonTest_sw_python.mk XStyleLoader::loadStylesFromURL Allow loading from stream 2019-12-23 08:21:14 +01:00
README sw: document the "leaf" layout concept 2017-09-04 12:11:30 +02:00
UIConfig_sglobal.mk tdf#112411 Merge "Form controls" and "More controls" into one toolbar 2019-03-13 12:07:35 +01:00
UIConfig_sweb.mk Move anchor submenu to separate popupmenu file 2016-03-08 13:53:46 +02:00
UIConfig_swform.mk
UIConfig_swreport.mk
UIConfig_swriter.mk weld date selection widget 2020-06-21 21:14:55 +02:00
UIConfig_swxform.mk
UITest_chapterNumbering.mk uitest for chapter numbering dialog 2018-10-20 07:06:25 +02:00
UITest_classification.mk
UITest_librelogo.mk LibreLogo: add unit tests 2018-10-25 08:22:42 +02:00
UITest_options.mk
UITest_sw_findReplace.mk
UITest_sw_findSimilarity.mk sw: extract UITest_sw_findSimilarity from UITest_sw_findReplace 2019-04-05 14:25:42 +02:00
UITest_sw_ui_fmtui.mk tdf#130456 sw: enable semi-transparent text for char style dialog 2020-05-26 10:20:19 +02:00
UITest_table.mk
UITest_writer_dialogs.mk UI tests opening all dialogs in writer and see if it crashes 2019-07-26 08:18:22 +02:00
UITest_writer_macro_tests.mk Make UITest name match .mk file name 2020-04-02 13:05:16 +02:00
UITest_writer_tests.mk
UITest_writer_tests2.mk
UITest_writer_tests3.mk
UITest_writer_tests4.mk UITest_writer_tests: split this into 4 parts 2018-07-03 19:34:40 +02:00
UITest_writer_tests5.mk uitest Zoom dialog 2018-11-02 11:31:47 +01:00
UITest_writer_tests6.mk uitest for bug tdf#107847 2019-05-09 22:02:23 +02:00
UITest_writer_tests7.mk UI test for tdf#127652 2019-12-06 22:27:50 +01: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:

http://wiki.openoffice.org/wiki/Writer/Core_And_Layout
http://wiki.openoffice.org/wiki/Writer/Text_Formatting

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.