33 Commits
Author SHA1 Message Date
Armin Le Grand (Collabora) 782131d3a3 StripPortions: Move tooling closer to EditEngine/Outliner
EditEngine/Outliner::StripPortions is used with some lambda
callbacks to convert Text to Primitives. The tooling for this
is currently located in svx due to historical reasons (when I
initially did that).

An EditEngine/Outliner gets configured, this is dependent
of the object type to handle (see TextBreakupHandler in svx
and other places).

Then the OutlinerParaObject gets set - the model data.
EditEngine::StripPortions then initially uses
ImpEditEngine::Paint which layouts all that and formats it.
For all Text (or Graphics e.g. Bullets) those callbacks are
used - if given. If not given it *still* does a direct paint
to a given OutputDevice to stay compatible with legacy
usages.

Thus ImpEditEngine::Paint is currently kind of an hybrid: It
needs to be capable of both: For Primitive creation it
extracts data to DrawPortionInfo or DrawBulletInfo and calls
the lambda callback where (e.g. in svx) the Primitives are
created as needed based on that data.
For Paint that data is used to Paint using the given
OutputDevice.

This means up to now for doing changes both had to be
supported in that method which of course hosts the danger
of getting unequal outputs when not being very careful.

The DirectPaint is now rarely used (AFAIK only in some UI
elements, e.g. WeldEditView stuff).

The goal is to go in a direction where it would be possible
to do those remaining Paint calls direcly inside ImpEditEngine
using primitives, or - alternatively - change all remaining
places to use a unified StripPortions method and send the
result to a PrimitiveRenderer or buffer/resue it.

This change is a 1st step to get the preconditions but does
not change functionality yet. It moves that tooling to where
it is used.

Change-Id: I7225eab9a0dfd3d50cd3d1d8fe386dfb99ec42ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186045
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2025-06-06 11:37:06 +02:00
Michael Stahl 8f8034177b LOCRDT editeng,sfx2,sw: experimental yrs collab
This can be enabled in configure via --with-yrs=...; see also README.yrs

Currently this is hardcoded to run over a local named pipe.

Everything related to editengine is implemented in EditDoc and made
accessible via its wrapper classes; everything related to communication
and accessing sw's comment is implemented in sw::DocumentStateManager.

The acceptor starts in SwView::SwView(), once SwPostItMgr exists.

There is a hack in SfxFrameLoader_Impl::load() to fetch the document
that the accepting soffice has loaded, and load it in the connecting
soffice as well.

Change-Id: I89476b5864b70f479bcf15989374c1c65b5da9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175652
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-05-07 13:36:01 +02:00
Tomaž Vajngerl dcff97abcd editeng: add EditLineList test
Change-Id: Iaec97999ae9ea0a01251e4449d3c7b74aa3539d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162072
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-16 13:02:27 +01:00
Tomaž Vajngerl 67abfa11b6 editeng: add simple test for CreateLines method
Change-Id: I4fd13727a1edc20220a95dd4899b91bdef088111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162011
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-14 04:51:36 +01:00
Tomaž Vajngerl 5b4dfce893 editeng: cleanup operators and constructors for EditSelection + test
Move the constructors into class body, cleanup operators so they
use more standard class based operators and use default for !=
as it will just be a neagtion of ==.

Change-Id: I1b99db6c9a82468ab76091eb93a5f3641024c65b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161365
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31 10:32:00 +01:00
Tomaž Vajngerl ac481d5df4 editeng: cleanup operators and constructors for EditPaM + test
Move the constructors into class body, cleanup operators so they
use more standard class based operators and use default for !=
as it will just be a neagtion of ==.

Change-Id: I6534db60dcb23cb3daefb91d5f27579a690a9637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161364
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-31 07:49:39 +01:00
Tomaž Vajngerl 72fde57386 editeng: EditLine test and refactor constructors, operators
Change-Id: Ia60ce07073725bf66bf299edaf7b3cd24cfe59c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161358
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-30 14:16:43 +01:00
Tomaž Vajngerl ff0a9cb65a editeng: add EPaM unit tests
Change-Id: Icc15746bf2712bae446f16fd378f94f8be5ec61e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161342
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28 08:05:43 +01:00
Tomaž Vajngerl 23bef8567e editeng: add ESelection unit tests
Change-Id: I79cff7b08944fe81c785c224587e4e6f6c8ff9c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161339
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-28 04:21:17 +01:00
Tomaž Vajngerl bd0f526f2d introduce docmodel comp., model::ThemeColor, use it in SvxColorItem
Added a new component docmodel, that has the document model types,
which only depend on other basic components. This is needed so the
types can be used in every relevant component - xmloff, oox, svx,
editeng,...

Introduces model::ThemeColor, which is a class used to store the
theme color data, including transformations (svx::Transformation).
For UNO use XThemeColor is added, and the implementation UnoThemeColor
which wraps svx::ThemeColor, so it can be tranported around.

Reactor all the code and tests to accomodate for this change.

Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-12 23:15:58 +00:00
Jan-Marek Glogowski 5521184be8 Make editeng_core test depend on more_fonts
CppunitTest_editeng_core explicitly request the
"Liberation Sans" font.

Change-Id: I810bddda26498252985f1869df58610e79ebc5ef
Reviewed-on: https://gerrit.libreoffice.org/61658
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-10-11 16:02:33 +02:00
Stephan Bergmann 141873715b Move editeng/source/editeng include files to common include directory
...that are included from various source directories.  Change done in
preparation of loplugin:includeform.

Change-Id: I4c2160d1c682b37e93e1161796c67097866bf659
2017-10-16 17:22:21 +02:00
Varun Dhall 35ba68fd47 EditEngine: Added expwarp for unit tests
Change-Id: Ice1c8c0ceb7d8fe93f369fb4a05226ba738f7e97
Reviewed-on: https://gerrit.libreoffice.org/39789
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-11 14:19:05 +02:00
David Ostrovsky de030cd7a2 gbuild: Remove MSVC 2013 legacy code
Uwinapi is discontinued.

Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01
Reviewed-on: https://gerrit.libreoffice.org/23198
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21 18:18:44 +02:00
Bjoern Michaelsen 1a044b25c2 tdf#99352: dispose EditEngines when SfxApp dies
In an ideal world, by the time we reach DeInitVCL() there should be
neither non-null VclPtr nor EditEngine instances around. This fixes the
former for those VclPtrs owned by EditEngines, by disposing them when
SfxApplication is dying. The goal is -- for now -- to not have any
non-null VclPtrs around by DeInitVCL(), so we can e.g. assert() on that
to pick up regressions.

Should we one day have all EditEngines accounted for with proper smart
pointers that get torn down before DeInitVCL(), the Dispose() introduced
here might be removed again.

Change-Id: I47b17f7fd31fce2ac5fd6f6b146d356d7d07e677
Reviewed-on: https://gerrit.libreoffice.org/34985
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2017-03-10 12:59:26 +00:00
Noel Grandin 6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Gleb Mishchenko a97b392879 tdf#94698 cleanup Makefiles. Get rid of udkapi and offapi
This patch changes occurences in makefiles
from
$(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \
	udkapi \
	offapi \
))

to
$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config))

(corrected instead of abandon, jani)

Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e
Reviewed-on: https://gerrit.libreoffice.org/23426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 09:47:11 +00:00
Miklos Vajna 3b3cfa0e01 Factor out EditTextObject::dumpAsXml() from SwDoc::dumpAsXml()
Change-Id: I1dae910e9d14db56d6388a71d76b1a479d5786b0
2014-11-24 09:02:59 +01:00
Daniel Sikeler 2b442c1df4 fdo#80403: TokenHandler impl. FastTokenHandlerBase
getTokenFromUTF8: calls getTokenDirect
getTokenDirect: uses perfect hash

New makefile creates perfect hash table with perl-script gentoken.pl.
I found the script on https://wiki.openoffice.org/wiki/XFastTokenHandler and made some changes.
XMLTokens are defined in tokens.txt

Change-Id: Id04134a896ee082e2d0ba55a715fede19ff04928
Reviewed-on: https://gerrit.libreoffice.org/12335
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-11-11 09:36:52 +00:00
Michael Meeks 274b628a2b bnc#467459 - fix editeng text search with expanded fields.
Change-Id: If59d0e2f886e94148b81cb6cfcad067733fcb918
2014-07-27 17:06:06 -04:00
Stephan Bergmann 369d95931f DeInitVCL at end of tests
This required some changes to the framework:

* Init-/DeInitVCL is no longer done per individual test in BootstrapFixture, but
  once per CppunitTest invocation in a new vclbootstrapprotector (similarly to
  the exisiting unobootstrapprotector).  CppunitTests that need VCL now need to
  declare gb_CppunitTest_use_vcl.

* For things to work properly, the UNO component context needs to be disposed
  from within DeInitVCL (cf. Desktop's Application::DeInit called from
  DeInitVCL).  The easiest solution was to introduce an
  Application::setDeInitHook (where the hook is called from DeInitVCL)
  specifically for vclbootstrapprotector to call.

* PythonTests don't (yet) call DeInitVCL; they still hook into
  BootstrapFixture's original test_init functionality (to call InitVCL), and do
  not make use of the vclbootstrapprotector.

Change-Id: I4f3a3c75db30b58c1cd49d81c51db14902ed68b2
2014-06-04 08:55:12 +02:00
Michael Meeks 62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
Eike Rathke 876c619b94 new module i18nlangtag
Moved portions from module i18npool, all of former i18nisolang1 library
that now is i18nlangtag. Included are languagetag, isolang and mslangid.

This i18nlangtag code is now even used by module comphelper, so
disentangling i18npool and making this an own module was needed to not
create circular module dependencies.

Change-Id: Ib887c3d6dde667403fd22d382310ba5f1a9b0015
2013-04-05 19:10:48 +02:00
Caolán McNamara a526370737 Related: fdo#55693 add regression tests for autocorrection
Change-Id: Ie9bbeb38ec9cc2fa0377709e75abb0338b20bab5
2013-03-01 12:20:24 +00:00
Michael Stahl a53586f4ef gbuild: do not copy boost headers around
- do not use gb_UnpackedTarball_copy_header_files for boost
- adapt the optimization in concat-deps.c for new path
- use boost_headers in all LinkTargets that require it
- add explicit include paths to mysqlc, mysqlcppconn, libvisio, liborcus

Change-Id: I0c43e73ed43cc9d2e6bce8faf55e992d655a0bb9
2013-01-26 22:20:06 +01:00
Michael Stahl 5032dc0fc3 gbuild: invert handling of standard system libraries:
Always link in gb_STDLIBS, except when the library explicitly opts out
with gb_LinkTarget_disable_standard_system_libs.

Change-Id: I489a99114fbfa46d0421a27cf6c7b899dc268a4a
2012-09-28 16:49:08 +02:00
Michael Stahl b85c349783 gbuild: replace direct gb_STDLIBS use with ...
... new gb_LinkTarget_add_standard_system_libs

Change-Id: Ib2bc843098db3d8c6822b45a3d21724e67f57d69
2012-09-28 16:49:06 +02:00
Michael Stahl 2e677c3981 gbuild: split uwinapi out of gb_STDLIBS
Change-Id: I53316e0b9369d806197bccb42cf22d3497af43e7
2012-09-28 16:49:05 +02:00
Kohei Yoshida a9448bd1b7 Avoid duplicate symbols & use setUp() and tearDown() for the item pool. 2012-04-11 21:53:33 -04:00
Kohei Yoshida 8b216a7aa3 Set default items to the item pool, do this and that, and now the test passes. 2012-04-11 20:46:45 -04:00
Caolán McNamara 6089be1a7a needs ure and base-class setUp does necessary stuff 2012-04-11 21:22:55 +01:00
Kohei Yoshida e981a10233 Add the right license header here... 2012-04-11 14:55:58 -04:00
Kohei Yoshida d241251638 Attempt to add general-purpose unit test for editeng.
But instantiating EditEngine causes segfault.  The line is commented
out for now.
2012-04-11 14:30:58 -04:00