Commit Graph

36 Commits

Author SHA1 Message Date
af3916f8ee fdo#55315 Added simple Trie lookup tree for autocomplete words storage
Added simple Trie lookup tree which is more tailored to what is needed
in autocomplete implementation, but still has the speed of the
LatinLookupTree that has been used till now. As the implementation
is much simpler it should be more managable and easier fixable.

For now two actions: insert (word) and findSuggestions are supported.
Acttion findSuggestion returns all words in a list for a searched
sub-word, it also fixes fdo#62945.

Change-Id: I63b69c30d28b4e1c465c2122ebc537f7f75a033a
2013-06-11 23:14:30 +02:00
41e5c4b0de Work around -Werror=strict-aliasing
Change-Id: I0184488344bd11c50bddd1bb1726e0d1225aff7e
2013-06-11 15:01:43 +02:00
e2b9946022 sw: fix AutoCorrect bold/underline regression
The horrible SvxAutoCorrect::AutoCorrect() inserts the character into
the document half-way through, and then _expects_ this inserted
character to show up in its rTxt parameter.  This broke in Writer when
SwTxtNode::m_Text was converted to OUString, because now a
temporary String copy is created.  Work around this disaster area for
now.

(regression from 0295c8a34e39326414c1b98cf4da905802f061b0)

Change-Id: I1cb11a20cb0c2577036176e605426105631f3311
2013-06-07 00:09:34 +02:00
72e5d0c8fb Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-30 13:34:06 +01:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
1946794ae0 mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).

Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2013-04-07 14:23:11 +02:00
a526370737 Related: fdo#55693 add regression tests for autocorrection
Change-Id: Ie9bbeb38ec9cc2fa0377709e75abb0338b20bab5
2013-03-01 12:20:24 +00:00
3752a5fab4 Invalidate current position in LookupTree at remove action.
Change-Id: I7a32e8d7c21c1e87e1acab9020f9ecbb7e441f2c
2012-07-31 19:03:01 +02:00
fa351042bc LookupTree for fast autocompletion lookups (by Nico Weyand).
LookupTree is a tree structure for fast autocompletion lookups.
Additionally the tree structure stores word probabilities, so each
autocompletion request returns a result with highest probability.
LatinLookupTree is an implementation which was designed to be even
faster and more efficient latin text, however it works with any kind
of unicode strings.

The tree structure was coded by Nico Weyand, Unicode strings support
and conversion to Libreoffice code structure was done by me.

Change-Id: I6549ee45d0952407b8a070f30ed0598fcb420aa7
2012-07-30 23:43:47 +02:00
2d045cdb69 refactor handling of double border widths:
Word uses a completely different definition of "width" of a double border
than OOo and ODF: for Word the width is apparently the largest of the 3
component widths, while OOo and ODF define the width as the total with of
all 3 components.  The new border implementation in LO 3.4 was apparently
inspired by Word's double border definition, which resulted in
various import filter regressions, see the previous fixes:

36e43b52992735c622833e923faa63774b9e2f76
e2ffb71305c5f085eec6d396651c76d6daee3406
70a6a4d425558340bb49507975343a3e0a1bdde8

These fixes set the ScaleMetrics, which actually seems sub-optimal as
there is a ScaleItemSet function somewhere that apparently re-scales
all items in an itemset, which could undo the fixes.

Also, one of the fixes actually managed to break RTF/DOCX import
of double borders, as that ended up in the same code via the API.

This commit now reverses the change, so that the width of a border is
now always the total with of all components, which is (imho) much more
intutitive, and also leads to a consistent UI where selecting say 3pt
width has predictable results, no matter what the border style.

The border widths are now converted in the Word format import/export
filters (writerfilter and sw/source/filter/ww8), and various tests
were adapted to the new handling.

Change-Id: I50456c49b1a298569607e6c88f19f18441348ac3
2012-07-04 17:55:45 +02:00
8b45939485 replace enum SvxBorderStyle with css::table::BorderLineSyle
Change-Id: I1dadb53f46b23f92d34061ef78dda872bdbcda67
2012-07-04 17:55:45 +02:00
328e2263fb targetted re-work of cppunit pieces. 2012-06-27 19:13:11 +01:00
463e59d680 rename SvxBorderLine::SetStyle to something unambiguous
Change-Id: Iec70985319a64cdc3630e15499ac304a7f1aabae
2012-06-25 12:46:17 +02:00
204555c107 Renamed FILE to DOCINFO_TITLE, which is more appropriate for this field.
Change-Id: I1267629da8b66fc21c4ae2e78634c2093274aa61
2012-05-14 12:09:57 -04:00
8ed129b22d Unit test for UNO field item implementation.
Make sure the type IDs are associated with correct service names.

Change-Id: I5ff8ec7fb56f2790f9a3eca8e019c784cb27de43
2012-05-11 23:12:28 -04:00
8d7e8a0a3b setup/teardown default component context once before/after all tests
avoids the problems of dangling uno singletons invalidated after the first
dispose and the chain of other singletons that don't expect to need to
re-initialize, etc.

reenable editeng cppunit test

inherit i18npool cppunit test from unotest base

drop LibreOfficeProtector, do "throwable" work in setUp/tearDown not
in ctors/dtors
2012-04-13 13:15:25 +01:00
43aabb908e partially revert the editeng singleton stuff to get build to complete 2012-04-12 13:28:06 +01:00
5b14929dd4 Handle the correct deletion order of EditDLL in the base class.
Turns out that this change affected all cppunit runs.
2012-04-12 00:53:55 -04:00
c0de63a858 Remove the TODO comment that's no longer relevant. 2012-04-11 23:42:19 -04:00
b5800fac1d We need to delete EditDLL before de-initialize vcl to avoid crash.
Without manually releasing the EditDLL singleton instance, it gets
deleted *after* the cppunit does its cleanup, which de-initializes VCL.
The problem is, when the EditDLL instance is destroyed, its member
GlobalEditData instance deletes the OutputDevice instance that it owns,
which in turn accesses font caches in VCL.  But by the time we reach
that point, VCL is already de-initialized, hence the problem.
2012-04-11 23:41:51 -04:00
a9448bd1b7 Avoid duplicate symbols & use setUp() and tearDown() for the item pool. 2012-04-11 21:53:33 -04:00
1bcd2c9493 Just use the internal item pool already written for the edit engine. 2012-04-11 21:27:34 -04:00
e487d2fbf6 You *are* fixed. 2012-04-11 20:47:58 -04:00
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
6089be1a7a needs ure and base-class setUp does necessary stuff 2012-04-11 21:22:55 +01:00
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
e549f52f16 fdo#38542: SvxBorderLine::GuessLinesWidths:
Importing style:border-line-width="0.002cm 0.088cm 0.141cm" (which older
OOo/LO apparently could write) fails, because GuessLinesWidths can't find
a matching style (result: standard "double" border, 3 equal width parts).
Try to create a custom BorderWidthImpl of type DOUBLE instead, that
preserves the individual widths.
2012-01-27 09:37:55 +01:00
e8bbb76827 ensure correct export size type in stream operation 2011-10-10 08:51:15 +01:00
d996328cd5 sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed out a6913c9677c2
For LibO, that just means replacing sal/cppunit.h with sal/precppunit.hxx.
2011-09-12 22:47:50 +02:00
fe551ada2d Moved SvxBorder* into editeng namespace to avoid duplicate DOUBLE on windows 2011-03-28 11:20:08 +02:00
41aed87d07 editeng: Adapted borderline unit test to new build system 2011-03-21 12:29:05 +01:00
2001821bc9 editeng: more reliable test library build 2011-03-19 17:57:18 +01:00
d13469c38b Fixed lines width guessing: gap are no smaller than 1pt 2011-03-19 17:57:18 +01:00
d674abd352 Switching the order of the SetLinesWidth arguments 2011-03-19 17:57:17 +01:00
9bd7865519 Fixed units mess in SvxBorderLine and BorderLineImpl 2011-03-19 17:57:16 +01:00
99b5f5aec1 Documented and Unit-tested the SvxBorderLine::SetLinesWidth 2011-03-19 17:57:16 +01:00