diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2023-06-15 11:16:18 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2023-06-16 00:48:44 +0200 |
commit | d934aeace6e7049db3959421538ae382cb97b1d1 (patch) | |
tree | b60b5ff3a1bbec87e2505d6f5ca2892ca489b6d8 /svl | |
parent | cc483a88a03f9ee847f3cb5fac83fb5dd49d0ba1 (diff) |
tdf#103064 sw,editeng: make para styles work inside comments
- Style objects for comments are stored in a dedicated stylesheet pool,
and constantly updated from the "real" styles using modification
broadcasts. In theory, it should be possible to use same objects for
both Writer core and EditEngine, as they use separate item ranges. But
unfortunately SwDocStyleSheetPool isn't really a styles container, but
just a wrapper around Writer's core styles, with a single mxStyleSheet
member that is filled each time with data from different styles (while
EditEngine expects different styles to be represented by different
objects).
- EditEngine switched to allow duplicate listeners for styles - one per
paragraph. The use case is 2 paragraphs of the same style, and then one
of them is switched to another style. In that case we still need to keep
listening to the former style for the other paragraph. There is probably
some opportunity for optimization, but it should be good enough for now.
- Copying formatted text from document's body doesn't preserve style
assignment for now. The editeng RTF import should be tweaked to not
insert styles into our "special" stylesheet pool (or somehow forward
them to Writer's core style handling) before we can enable this part.
Change-Id: Ib67c5388f9cd078c73ec0d453017f815843161ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153156
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/style.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index ff21cd91c804..e766dcb09f65 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -690,7 +690,7 @@ SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator+=( const SfxStyleSheetBas SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const OUString& rName, SfxStyleFamily eFamily, - SfxStyleSearchBits eMask) const + SfxStyleSearchBits eMask) { SfxStyleSheetIterator aIter(this, eFamily, eMask); return aIter.Find(rName); |