Commit Graph

224 Commits

Author SHA1 Message Date
fb22eb4257 Fix XMLFile::SearchL10NElements signature
Change-Id: I34134f75ac5571a635256d349bf5a2f67ef8ef06
2014-06-11 23:47:41 +02:00
184a00b962 loplugin: inlinesimplememberfunctions
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
7610a80ad1 fdo#68849: Add header guards to all include files
Added header guards to files in directories l10ntools/, lotuswordpro/, and rsc/

Change-Id: I9c034d4bb5c92d78378bda4658d43a8b603d5281
Reviewed-on: https://gerrit.libreoffice.org/9581
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-01 16:05:20 +00:00
407db84412 Fix memory leak in xrmex tool
Change-Id: I102566a95b5b34daf60730ffef290913caf28eb2
2014-05-22 18:51:57 +02:00
ace815b451 Fix memory leak in cfgex tool
Change-Id: Ic8c410a805fa06777c1a85de646df2dcd5b6506a
2014-05-22 14:17:32 +02:00
2bd7767d01 Resolves fdo#70681: fixincludeguards.pl: all that's left
Change-Id: I3e51a62710bb46c8255fd228d41d9300c90a1fb5
Reviewed-on: https://gerrit.libreoffice.org/9360
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-05-15 12:50:46 +00:00
83d84adeb5 typo: befor -> before 2014-04-14 12:32:04 +02:00
52e359d82d Clean up function declarations
Change-Id: Ie1360857dc4ed3102c709c1ef5b5929e5d5d5d7b
2014-04-08 10:17:38 +02:00
c8c6c8319f Clean up unreferenced functions
Change-Id: Id2c90088298d389bd1cd8efad9aa26100965d6a2
2014-04-04 10:05:58 +02:00
362d4f0cd4 Explicitly mark overriding destructors as "virtual"
It appears that the C++ standard allows overriding destructors to be marked
"override," but at least some MSVC versions complain about it, so at least make
sure such destructors are explicitly marked "virtual."

Change-Id: I0e1cafa7584fd16ebdce61f569eae2373a71b0a1
2014-04-01 19:22:54 +02:00
70cc2b191b First batch of adding SAL_OVERRRIDE to overriding function declarations
...mostly done with a rewriting Clang plugin, with just some manual tweaking
necessary to fix poor macro usage.

Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26 16:39:26 +01:00
1a8ba67708 Remove visual noise from l10ntools
Change-Id: Ia10056ae9e1b9adfe74f299afac5c3c84fa8cea7
Reviewed-on: https://gerrit.libreoffice.org/8278
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 10:05:02 -06:00
f5d4d2bf56 cid#707946 Uninitialized pointer field
this field was actually only used to swap values between other values,
so convert it to local variables

Change-Id: I274e8978651f905c0bd2391ac4baaf5c23388425
2014-02-21 11:59:09 +02:00
94af3bc2a4 ulfex: remove unneeded bULF, it is always true
Change-Id: I1401fddfdd42eba96253f4dd19cf60bba8de6802
2014-02-18 17:30:23 +01:00
d548b250db Drop unnecessary #include
Change-Id: Ib9ab63cdf21f54b1611de37c5538a300a1b39ba6
2014-02-18 13:24:11 +09:00
5dd4a06901 l10ntools: sal_Bool -> bool
Change-Id: Ifffdc0942b83b5761cbbbfc5db7d241be60815cb
2014-02-17 17:55:18 +01:00
f121dd3925 sal_Bool -> bool
Change-Id: Iacfeab2cc6fb8bb85b964a995c5df16d03ed2e53
2014-01-10 17:11:48 +01:00
46d0619b54 Transex3: modify src list localization/merge part
Avoid using numbers to identify the list items because
using numbers can lead to mixed translations. Use the
corresponding string instead.

Remove a hacky solution for mixed translations.
See: 95ea6cb21a7d7f4f163e642ba4b1e165a427a0d1

Change-Id: I6f1d48bf71fe2146f04f53c6b474dd7c0ce98678
2014-01-06 10:57:51 +01:00
a5867ea097 Transex3: Simplify members for lists
No need for hashmaps (ExportListEntry) because only one
list is stored (en-US). One list member is enough instead of
one for all types.

Change-Id: I952d6616e436c5aa7656854f83d442434ffcbd54
2013-12-27 07:14:58 +01:00
d1c74734c8 Transex3: NO_LOCALIZE_EXPORT
In the past, NO_LOCALIZE_EXPORT macro must be used to
skip uneeded parsing of src files which has no localizable content.
It is unsued by now and it is more effective to handle
this files on gmake level:
gb_SrsTarget_add_nonlocalizable_files
gb_SrsTarget_add_nonlocalizable_templates

Plus remove some empty src file.

Change-Id: I8fc9b2db0b5fd7a3379d3c5be970c4fc691f4c53
2013-12-27 07:14:57 +01:00
62b688f961 Transex3: remove unused sLastTextType member
Change-Id: I82196decf0419adabc849bd82141e8702f510c1c
2013-12-27 07:14:56 +01:00
eeee7f00c7 Transex3: remove obsolete textrefid
Change-Id: Ic34efbd2090a11aa6fa88d67eda7ab31b1bddfcb
2013-12-27 07:14:56 +01:00
6ded5aecce Transex3: sHelpId is assigned but never used
Change-Id: I01bc171f5ad399644185e5e6d0398e89d9305ee7
2013-12-27 07:14:55 +01:00
da989b523e Transex3: remove unused text types
Change-Id: Iad98aae685153589ff72a4be2ec704c0d311e1fd
2013-12-27 07:14:54 +01:00
edf7d340eb Transex3: remove obsolete HelpText
Used alternative: Text[ x-comment ]

Change-Id: I762bf89c5ed316ec63183e3bedc22cbaac2e8aba
2013-12-27 07:14:54 +01:00
0dbd93b92a Transex3: UIEntries list type is unused
This list type doesn't appear in the resource files
and there are lots of alternatives (ItemList, StringList ...)
for future need.

Change-Id: Ia4454a329ba93f54e5b3ca45443a1a84be3b4bf7
2013-12-27 07:14:53 +01:00
94da69d489 Transex3: bDontWriteOutput is assigend but never used
Change-Id: I9ca8c83a225ea4860ac40c7584ec9c56acae0d6c
2013-12-27 07:14:53 +01:00
72ace3fa98 Transex3: remove not parsed tokens
Change-Id: I7e610c767e28e2af683f95aa573cbe34b35b6966
2013-12-27 07:14:52 +01:00
4c530d3d18 good-bye stringex, you served well
It will be better to handle Android Impress Remote localization
independent of the big LibreOffice source tree. Instead of
stringex, we will use android2po, a 3rd party utility for conversion
strings.xml <-> pot/po.

Change-Id: I4eae53e4f8d94c55e5564d54c5e5c214bc9569d7
2013-11-17 11:03:36 +01:00
41e0dbb555 fixincludeguards.sh: l10ntools
Change-Id: I0fce5b2c59e468e936e3a0fa99ebd50c9d15d0cd
2013-11-05 09:28:52 +01:00
a7724966ab Bin comments that claim to say why some header is included
They are practically always useless, often misleading or obsolete.

Change-Id: I2d32182a31349c9fb3b982498fd22d93e84c0c0c
2013-10-22 16:56:28 +03:00
e808cae99e Clean up l10ntools xml parser.
-Remove namespaces from header.
-Remove unused members (dbgcnt)
-Remove helpless methods (SetValue, copy ctr and operator,
inherited but not overriden virtual functions)
-Use prefixes for variables
-Use const where it possible
-Remove visual noise
-Correct indentation

Change-Id: I295be484dde157847cd16f260ec70d5cdb5b6fb4
2013-09-18 21:52:47 +02:00
ede828789a Use OString in xmlparse.cxx to avoid numerous srting conversion
Plus:
- Use macros instead of members.
- Use const where it is usefull.

Change-Id: I960f5dec29b5c17655055e1884bc4e7983359318
2013-09-18 21:52:47 +02:00
fff70bf98c fdo#68790: fix build error on Win when system locale=="Japanese(Japan)"
This patch modifies transex3.
Modified transex3 outputs a file with BOM(if MergeMode is true).
*.[hs]rc files with BOM avoid this problem.
This problem is that MSVC interprets UTF-8 source code without BOM as
 local codepage when system locale is "Japanese(Japan)".

Change-Id: I3e12499a91a954236f48e6d7e360d26c93d19ed6
Reviewed-on: https://gerrit.libreoffice.org/5851
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2013-09-14 16:37:42 +00:00
e39e9e4cd8 Source files shouldn't have executable bit set.
Change-Id: Iafad6249a7998d7c749c1ca2979a606078cfcb5e
Reviewed-on: https://gerrit.libreoffice.org/4070
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-05-28 12:09:27 +00:00
09373d4583 soltools: remove Package_inc and empty unistd.h nonsense
Change-Id: Ic05de69951b28b9cc8d62f0a534b507c424e6b25
2013-05-10 17:56:24 +02:00
29400c568a Some code scrubing
Add doxygen documentation for classes and methods
Delete useless comments.
Add include guards where missing.
Delete some useless typedef.

Change-Id: I9bba16560790239d7775fcd40981465e70e5d437
2013-05-02 15:48:30 +02:00
c7ef252227 Make localization a bit more effective
1. get rid of some unefficiency
The "old" executables used to parse items which has
other language than en-US. To this items executables
search MergeEntrys(read from po) and change the content if
possible. This mixed localization method not need any longer.
-cfgex: cfgmerge:WorkOnText()
-xrmex: xrmmerge:WorkOnText()
-transex3: export:PrepareTextToMerge()

2. Change the container of MergeData to get a bit efficiency.
The new MergeDataHashMap is exploit that in most case the
insertion and search happen in the same order.(similar to fifo)
So add an iterator-chain to define an insertion order in the
original hashmap.
Every call of find it is a hint that the next element, to
the last found one, is the searched one. If not than search
such like in a HasMap.

3. Set up some order in helpex
Helpex is the only one, which was not used to merge strings
in the same order as export, so change it to work effective
with the new HashMap.
Helpex works with all file of a specific directory and po
files contain the strings of these files in lexical order
 so use the same order for merge.(HelpTarget.mk)

4. Make export use MergeDataHashMap a bit more effective
-The same MergeData contains strings to all language,
so it need to get only once.
-Just text entrys have MergeData, others not need to
search for it. (e.g. bitmap)

Plus delete some unused code.

Change-Id: I6ec80cd2323ffea8f783d0b59dc89ca7eac3c205
2013-05-02 12:15:22 +02:00
f167f03735 L10ntools: remove some lang vectors from parsing
Change-Id: I3b9ef50d8e0c1e99d5b535d95a5add90a1cbaf03
2013-04-23 23:52:54 +02:00
2d8e4f91fe Delete more unused member from export
Change-Id: Icebd32c7ac2144f99827ca48cca7bbcaf10814c4
2013-04-21 19:10:09 +02:00
36b3bcefcf Some changes in qtz handling
Executalbes, which work one language, generat qtz by own.
(stringex,helpex,treex,propex)
So these executables can generate qtz without po file
when use them with qtz, call them with "-m" flag without parameter.

Change-Id: I56c34db7151dc3ef0ce1c85ed607719e4cbb5e92
2013-04-21 18:57:17 +02:00
9e2d282206 Delete some unneeded member of ResData
nChildIndex and bRestMerges are simple unused.
nWidth is an obsolote attribute

Change-Id: I669a17cefb3dc8628ce2c8d9db8abac630fc3cde
2013-04-20 09:48:29 +02:00
10e3c7c428 Delete remaind code of an obsolote parameter
Past: Use "-l en-US, af, hu..." parameter for transex
and to work with this string use InitLanguages() function.
Now: Use "-l all" parameter and get langauges from po files.
So InitLanguages is unneeded.

Change-Id: Ide6b3d24fb8b483c0c31034b1ffd6aba31c5e4c9
2013-04-15 18:02:02 +02:00
4146406205 l10ntools: export use only en-US
So no need to ad it in a commandline parameter.
No need to use a vector to store languages.

Change-Id: I1f7d3bd131b5a9ff23d403cee4ac6804ae8e0a0b
2013-04-13 07:22:22 +02:00
be30e0e139 Delete obsolote platform from l10ntools merge
Change-Id: I5e5b87355d3d6e369c8fccd7078581758abb3b10
2013-04-13 06:02:21 +02:00
d885a85a48 Make l10ntools executables escape clear
Steps of escaping process:
1. Executables unescape the string for export(if necessary)
2. Po class work with unescaped string
3. Escape strings to PO format and write out
4. Read from PO and unescape strings
5. Executables make own transformation on string and merge

Use general functions for escaping (helper)
Delete unneeded escaping methods(xrmmerge, merge)
Delete some unused method from PoEntry class

Change-Id: I7f9414581aae9e6de7d1573862a32cdbd68c9545
2013-04-13 05:44:02 +02: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
ce51bf1a6e Make a bit cleaner transformation of help strings
*Not escape tags and double quots in tags,
 but find tags(icu regexp) when merge and
 use this infromation to make strings valid.
*Define a new Quot function for helpex,
 which works with icu UnicodeCharacter.
*Move tag search to xmlparse.cxx and use icu
 just in helpex.
*QuotHTML not unescape just replace xml charcters.
 (unescaping is also useless in uimerge.cxx)
*Move UnQuotHTML() to helper.
 (was used it in xmlparse.cxx and cfgmerge.cxx)
*Use UnQuotHTML() in uimerge.cxx too.

Change-Id: Ice8940ef69279709a1c5d84c6ae1b0d62a71ca76
2013-03-31 20:25:13 +02:00
e0cf3babee -Werror,-Wunused-private-field
Change-Id: I42235ca7cd25c07af7daaf51f56a6deb60e4108e
2013-03-27 21:16:27 +01:00
8e26b4783f Refactor l10ntools
Delete unused functions.
Make Export class more encapsulated.
Move to local that functions which are used only in one file.
Common contans method which are used by all executables.
Helper contains methods belong to xml parsing.

Change-Id: I28773a2c7eea90da7df7f32720fd38de2cb661ac
2013-03-27 20:09:31 +01:00