Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
fdf51525
Kaydet (Commit)
fdf51525
authored
Haz 28, 2013
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
more README
Change-Id: I569e7fd3cf9e418af03285f4f499f5ea3a0c0dc0
üst
a08f579e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
0 deletions
+117
-0
README
svl/README
+38
-0
README
sw/README
+79
-0
No files found.
svl/README
Dosyayı görüntüle @
fdf51525
...
...
@@ -10,3 +10,41 @@ formats, to Chart regression line properties.
There are lots of other useful helpers in here for various office
tasks; much of this code was originally moved from svx/sfx2.
== Items, Pools and Sets ==
=== SfxPoolItem ===
A small reference counted piece of data. Many subclasses, each with a
unique integer to identify its type (WhichId). Can be compared for equality
(operator==), Clone()d, and converted to/from uno::Any (QueryValue/PutValue).
A pool item may have value semantics (SFX_ITEM_POOLABLE), meaning that
there will generally be only one instance that compares equal per item pool,
or not, in which case the item will be Clone()d quite a bit.
=== SfxItemPool ===
Usually there is one item pool per document, with a range of valid WhichIds
that is specific to the type of document.
The item pool owns all instances of SfxPoolItem or its subclasses that have
ever been added to an item set. It also contains a default item for
every WhichId, which will be (depending on parameters) returned from item
sets if the set does not contain an item at this WhichId.
=== SfxItemSet ===
The item set can be created with a user-supplied range of WhichIds; it
will accept SfxPoolItems with matching WhichIds and ignore attempts to
insert items with non-matching WhichIds.
Items that are succesfully inserted into the set will be stored in the
set's SfxItemPool, and for poolable items only a single instance that
compares equal under the predicate operator== will be stored in the pool,
regardless of how many sets contain it, thus conserving memory.
There are members _pWhichRanges for the valid ranges (as pairs of WhichIds),
_nCount for the number of items contained, and _aItems for the pointers to
the actual items.
sw/README
Dosyayı görüntüle @
fdf51525
...
...
@@ -25,3 +25,82 @@ comments show that Writer core dates back until at least November
* ww8: DOC import, DOC/DOCX/RTF export
* xml: ODF import/export, subclassed from xmloff (where most of the work is done)
* ui: user interface
== 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.
This is a huge class with hundreds of methods; there are some efforts
to split up the class into many smaller classes that implement more
specific interfaces but this is not fully implemented yet; see the various
IDocument* classes.
=== 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
SwTxtNode::m_pSwpHints. There is a base class SwTxtAttr with numerous
subclasses; the SwTxtAttr has a start and end index and a SfxPoolItem
to store the actual formatting attribute.
There are several sub-categories of SwTxtAttr:
- formatting attributes: Character Styles (SwTxtCharFmt, 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 (SwTxtINetFmt, RES_TXTATR_INETFMT),
Ruby (SwTxtRuby, RES_TXTATR_CJK_RUBY) and Meta/MetaField (SwTxtMeta,
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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment