Commit Graph

223 Commits

Author SHA1 Message Date
fe444d1f74 fdo#62536: sw: fix AutoCorrect bold/underline on existing AUTOFMT
With the native AUTOFMT in Writer the SETATTR_DONTEXPAND does no longer
work reliably: if there is an existing AUTOFMT at the position then it
will be modified and no new hint with DontExpand will be inserted.

Work around this deficiency by inserting a no-length hint with the
preivous formatting at the end of the range.

(similar fix to the i#75891 problem in SwTextShell::InsertSymbol)

(commit 062eaeffe7cb986255063bb9b0a5f3fb3fc8e34c did not
 introduce the problem but made it far more annoying)

Change-Id: I58ece7f5bd5a786b22a066e5902f1784dafa5dce
2013-06-20 00:34:39 +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
516ed22b3f Remove remnants of help agent
it was removed with 66714f1888eaccef4eb5341971278ae7dfafa16b
but gobs of code (and UI) still existed to collect the help id
and give it to the missing help agent with various UI visible
options and buttons to control the help agent which isn't
there

Change-Id: I625da27b3046d481e43f4d35d32cc7063a1c6291
2013-06-06 14:52:49 +01:00
35a65baefe Slowly, but surely going on compiling for mingw64
Change-Id: I590aa6a854a040281bf73d5be768c05d4906a984
2013-06-06 15:52:05 +02:00
dcbaf7c253 remove unused componentcontext.hxx includes
Change-Id: I598926b72c5540b472f9607e2f3df134a8c50048
2013-06-05 08:13:21 +02:00
c9c2fbe485 Drop String.AppendAscii in editeng
Change-Id: I25df0e20e2da50e91139cefba74af2741e5fffb5
Reviewed-on: https://gerrit.libreoffice.org/3923
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-05-20 03:34:26 +00:00
cb6d67c21f Spelling "separate" (etc) correctly is hard 2013-05-15 11:14:28 +03:00
ef0af5032a fdo#46808, Convert linguistic2::LingProperties to new style
API-CHANGE:
Removed the following interfaces from the IDL because no-one was
using them:
    interface com::sun:🫘:XFastPropertySet;
    interface com::sun::lang::XComponent;
But the service still implements them, so old code should keep on
working.

Change-Id: Iab058fb42bd1a54e0b9632e99e564fdc0869fe6e
2013-05-14 08:08:25 +02:00
485b1ac04c This method is not implemented
Change-Id: I6ef1ce6cbfb121b18f4d79709d141cdf2f01a16f
2013-05-03 07:36:04 +02:00
3a390f36e8 Resolves: fdo#42893 improve Capitalize first letter of Sentence
don't autocapitalize a word if the previous word is clearly an
anagram with intermediate periods.

 Committer: anuragkanungo@gmail.com
	modified:   editeng/source/misc/svxacorr.cxx

 On branch localbranch_anurag

Change-Id: Ic559f4b6d5e15768870aabab29350bee51b24b08
Reviewed-on: https://gerrit.libreoffice.org/3495
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2013-04-26 15:58:54 +00:00
684aff90b0 Slightly simplify loop
Change-Id: If44e86ceecd4a407d3b4e294a03a84ad010f95e1
Reviewed-on: https://gerrit.libreoffice.org/3539
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-22 07:20:26 +00:00
d1f99bdf2a bDocumentDone is always false
Change-Id: Ifde4d9235d3eacf0317b19885f5ea57e1c695cb3
Reviewed-on: https://gerrit.libreoffice.org/3538
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-22 07:19:21 +00:00
e0067f8451 sal_Bool to bool
Change-Id: I5831dfb7270ce3983a454c6c40558a74931d5200
Reviewed-on: https://gerrit.libreoffice.org/3537
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-04-22 07:16:25 +00: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
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
aa753f01ba -Wunused-macros
Change-Id: Ifaa1637122d6f9cae1e29b77ac36ca5d1f220aed
2013-03-27 09:36:53 +01:00
39d45390f4 removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings declarations
s/(OUString\s+[a-zA-Z_][A-Za-z0-9_]*\s*)\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/$1\($2\)/gms

Change-Id: Iad20f242c80c4bdc69df17e2d7a69d58ea53654b
Reviewed-on: https://gerrit.libreoffice.org/2835
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 10:48:30 +00:00
8b27d78b4a automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms

Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec
Reviewed-on: https://gerrit.libreoffice.org/2832
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-03-19 09:00:26 +00:00
65a10fffc7 Resolves: #i120667#, pBound member obj in TextRanger is not freed
Found by: zhangjf
Patch by: zhangjf

Change-Id: Ifa4c49cd3f7f576c9c86e0269fe9e7ae69a9b325
2013-03-09 19:10:35 +00:00
a0296296fb fdo#60691 add modelines to *.src and *.hrc files
use solenv/bin/add-modulelines script for the task
and remove all UTF bom from *.src and *.hrc files

svx/source/dialog/hdft.src

Change-Id: I745d4f0fe9b05436a142a03f8512970f91c41bd4
2013-03-08 21:02:26 +00:00
a6b9173005 fdo#60148 Clean up warnings from the Clang compiler plugin
Change-Id: I08d755677c46c476710ecbd067ed9f7e2f54a671
loplugin: clean warnings: unused variables, incorrect indentation and log area.
Reviewed-on: https://gerrit.libreoffice.org/2544
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-03-06 12:59:26 +00:00
ce33f85ffd sal_Bool to bool
Change-Id: I8c554fb3faead41c974af9c2a89728bd0bdf5eb6
2013-03-04 23:14:41 +09:00
5b04c9063c remove unused and commented out code
This code gets never called.

Change-Id: I59228cba1444b7b09f74eb5cf8da9b755c7c32f7
2013-03-04 11:34:07 +00:00
a526370737 Related: fdo#55693 add regression tests for autocorrection
Change-Id: Ie9bbeb38ec9cc2fa0377709e75abb0338b20bab5
2013-03-01 12:20:24 +00:00
b458e734fd vector::at on guaranteed in-bounds values
Change-Id: I6ca8ec182e4c68f4cc29c7669168b513cdf148bd
2013-03-01 12:20:23 +00:00
ea7d6d0702 fdo#55693 Two initial capitalized letters corrected in compound words
What changes I made:

1. In svxacorr.cxx SvxAutoCorrect::IsAutoCorrectChar, I added '-' as a character.
2. In svxacorr.cxx SvxAutoCorrect::FnCptlSttWrd, I added code to iterate through each AutoCorrectChar in a compound word to determine if capitalization needs fixing.

Change-Id: I4e7de33fceccdea5edd84e83bacc7ae690135d76
Reviewed-on: https://gerrit.libreoffice.org/2351
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-02-28 23:08:36 +00:00
e39c551c61 remove duplicate line
This looks wrong. Compared to ThesDummy_Impl::getLocales() it seems
sane to remove the duplicate.

Change-Id: I494b22039846da4d4e84d7f289e501d1315075bd
2013-02-25 17:59:39 +01:00
89003e9bd8 loplugin: unused variables
Change-Id: I63553a09eec81e5ae28aa79ee1d3281053b23d06
2013-02-25 03:14:01 +01:00
616c6924f1 s/the the/the/
Change-Id: Iadacffaad832c6ff06757e8567e24f929f24a4c3
2013-02-22 09:58:19 +02:00
5c31e17e46 sync two translations of the same fundamental comment
Change-Id: I4da6683489c87fe06d45474dfc20351cb31ed000
2013-02-15 13:57:25 +00:00
1aaf9a9b36 Renamed hard-to-remember 8-char headers in editeng.
Change-Id: If255802082890e1b1b4c5197a791fa79a011773e
2013-02-12 15:15:06 -05:00
53ec703c14 fdo#46808, Adapt linguistic2::DictionaryList UNO service to new style
Change-Id: Iaf81a38063411b8a003b78f7eb7d6aab6c9df292
2013-02-12 10:14:43 +02:00
a6a8a8707b fdo#46808, convert xmloff module code to use XComponentContext
with lots of repurcussions in other modules

Change-Id: I6982671eecc701b06cf85d93533e1fe618044fea
2013-02-12 10:14:43 +02:00
790b0c4d53 fdo#46808, convert i18n::OrdinalSuffix to new-style
Change-Id: I62d0d3455d81bf9a2ea485b74faa5f1ecd417d87
2013-02-12 10:14:42 +02:00
324709b6e3 only wanted completion as tip by default
Change-Id: I5885f277051c2b8780e4813ce4713b0c9e8bd8ea
2013-02-11 12:22:07 +00:00
992f3ce067 Better default values for Word completion feature
http://nabble.documentfoundation.org/Libreoffice-ux-advise-Word-completion-default-value-td4031168.html

Change-Id: Ifef07653c2155b3c26d65d41cae1164b44fbd04f
Reviewed-on: https://gerrit.libreoffice.org/1937
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-02-11 11:13:16 +00:00
e5fdaec54a fdo#46808, Adapt document::XML*BasicExporter UNO services to new style
The services are
   document::XMLBasicExporter
   document::XMLOasisBasicExporter

Change-Id: Ifd93e5735cae94d34904d79769cdb3edf587fe43
2013-02-11 08:02:11 +02:00
97eb8a6e0e Removed several useless macros: A2OU, A2S, C2U, C2S, OUSTR, OUSTRING
Change-Id: Ie859cb2dfdc7103c379fce56be88eef8fe390afd
Reviewed-on: https://gerrit.libreoffice.org/1924
Tested-by: Luboš Luňák <l.lunak@suse.cz>
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
2013-01-30 12:54:40 +00:00
a4c7ded1fd Cleanup: #include <tools/gen.hxx>
Change-Id: Ic547b4a59102afc8bdbc85ec95ac312e32ef2530
Reviewed-on: https://gerrit.libreoffice.org/1484
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2013-01-07 13:14:57 +00:00
37abf7e629 Simplify this
Change-Id: If1a8a2441398ea9f20d6ec45e649967673c7a6af
2012-12-28 20:28:31 +01:00
bb121c864c fdo#46808, Convert frame::Desktop to new style service.
I had to drop XEventBroadcaster from the merged interface
because it introduced method name conflicts (addEventListener).

Shouldn't be an issue since it was scheduled to be dropped anyhow,
and the service implementation still implements it, so existing clients
will be fine.

I dropped the interface XPropertySet from the combined IDL because nobody
seems to be using it, and it's primary purpose appears to be to set weird
flags.

I dropped the optional interfaces
   XStatusIndicatorFactory
   XDispatchInformationProvider
from the combined IDL because the service does not implement them, and
nobody seems to be using them. I suspect they were mistakenly copied
from XFrame.

I also did not convert the Title, UserDefinedAttributes and LayoutManager
properties to attributes, again because no-one is using them.

Change-Id: I678a00006ed2cca2d6c37c4e39465811442c33af
2012-12-21 10:57:09 +02:00
623410669f fdo#58060 use acor_und.dat and LANGUAGE_UNDETERMINED
Previous versions used an empty language tag for LANGUAGE_DONTKNOW with the
"[All]" autocorrection entry and read/wrote from/to arco_.dat file. An empty
language tag otherwise is used for system locale and doesn't convert flawlessly
with the new LanguageTag system. Instead use LANGUAGE_UNDETERMINED with the ISO
639 code 'und' so the file name is "acor_und.dat".

During user profile migration an existing 3/user/autocorr/acor_.dat is copied
to the new 4/user/autocorr/acor_und.dat

Change-Id: I593f24829c6efd58f36e93ebd3385a3c925f7217
2012-12-13 20:18:56 +01:00
a61928d2f7 fdo#58060 - use empty-string for LANGUAGE_DONTKNOW ie. acorr_.dat
Change-Id: I399dcc41484c8b86f13c80bc1e92af919c9aeaff
2012-12-12 22:26:30 +00:00
6f6056b62e Related: fdo#55570 presumably we can attempt the insert...
and rely that it won't replace the original on pre-existing key and use the
usual .second == true flag rather than lookup and then insert on
non-pre-existing key

Change-Id: Idba65bfb2efaa5812b965a8811ff425f0b0939d8
2012-12-12 13:27:11 +00:00
0efcfcdf40 cppcheck: size() == 0 -> empty()
Change-Id: I23b6b8fdbb9c4f367a590a21e40e7bbaa76f7fce
2012-12-11 09:12:03 +00:00
e7e4d67786 fdo#55570 - use a hash instead of set initially until sorting needed
This rather substantially accelerates the first use of autocorrection.
Interestingly, it also appears to accelerate the sorting of the items;
potentially inserting sorted items into a set is a pathological balancing
case, that is avoided by the hash algorithm's randomness.
2012-12-10 20:43:50 +00:00
cccb0bb123 fdo#55570 - re-factor SvxAutocorrWordList to hide it's innards 2012-12-10 20:43:45 +00:00
f96db7d0dd fdo#46808, use service constructor for i18n::Collator
Change-Id: I15a360723e335345aad09e73fcb0f6815ed9e0d4
2012-11-30 13:59:46 +01:00
150e32777c Resolves: fdo#57640 we really want to *titlecase* the initial character
http://srfi.schemers.org/srfi-13/mail-archive/msg00046.html summarizes well..
"
- Titlecase <> uppercase
  Unicode defines three kinds of case mapping: lowercase, uppercase, and
  titlecase. The difference between uppercasing and titlecasing a character
  or character sequence can be seen in compound characters (that is,
  a single character that represents a compount of two characters).

  For example, in Unicode, character U+01F3 is LATIN SMALL LETTER DZ.  (Let us
  write this compound character using ASCII as "dz".) This character
  uppercases to character U+01F1, LATIN CAPITAL LETTER DZ.  (Which is
  basically "DZ".) But it titlecases to to character U+01F2, LATIN CAPITAL
  LETTER D WITH SMALL LETTER Z. (Which we can write "Dz".)

      character	uppercase titlecase
      --------- --------- ---------
      dz	DZ	  Dz
"

See TestCharacterClassification::testTitleCase for titlecase regression
tests.

Change-Id: I198379832d1910632bb6358149a5276b68d7c6eb
2012-11-28 15:12:35 +00:00
ad6f9f2f00 String=>OUString of svl's urihelper
Change-Id: Ib4d9175ce4661140a147962b8f45be40f800d85a
2012-11-27 23:00:04 -06:00