Commit Graph

790 Commits

Author SHA1 Message Date
710f41b7ae Clean String and sal_Bool in tools
Change-Id: I6a92196f33d7a5278c7dcc426112e9c56d582655
Reviewed-on: https://gerrit.libreoffice.org/4627
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-30 04:58:49 +00:00
ba0a57702c remove OUString wrap for string literals
For some functions and all kinds of Exceptions.

CannotConvertException
CloseVetoException
DisposedException
EmptyUndoStackException
ErrorCodeIOException
Exception
GridInvalidDataException
GridInvalidModelException
IOException
IllegalAccessException
IllegalArgumentException
IllegalTypeException
IndexOutOfBoundsException
NoMasterException
NoSuchElementException
NoSupportException
PropertyVetoException
RuntimeException
SAXException
ScannerException
StorageWrappedTargetException
UnsupportedFlavorException
VetoException
WrappedTargetException
ZipIOException
throwGenericSQLException
throwIllegallArgumentException

createInstance
createInstanceWithContext
forName
getByName
getPackageManager
getPropertyValue
getUnpackedValueOrDefault
getValueByName
hasPropertyByName
openKey
setName
setPropertyValue
supportsService

bash command:

for i in `cat list`; do git grep "$i\s*(\s*OUString(\s*\"" -- '*.[hc]xx'
	| cut -d ':' -f1 | sort -u
	| xargs sed -i
		-e "s/\(\<$i\s*(\)\s*OUString(\s*\(\"[^\")\\]*\"\)\s*)\s*/\1\2/g"
		-e "s/\($i.*\)\"+ /\1\" + /g";
done

Change-Id: Iaf8e641b0abf28c082906014f87a183517630535
Reviewed-on: https://gerrit.libreoffice.org/4624
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2013-06-29 21:52:54 +00:00
25d84e2826 Resolves: #i121751# restore cursor/selection on Undo/Redo language...
change for all text

- group intrinsic actions of language change for all text into one Undo action
- secure <SwRootFrm::CalcRects(..)> - catch NULL pointer
- correct <CursorGuard> - really restore the cursor

(cherry picked from commit 4207db473430e02a65a5f4d57db6e46a8db29a19)

Conflicts:
	svl/inc/svl/undo.hxx
	svl/source/undo/undo.cxx
	sw/inc/IDocumentUndoRedo.hxx
	sw/source/core/edit/edundo.cxx
	sw/source/core/inc/UndoManager.hxx
	sw/source/core/layout/trvlfrm.cxx
	sw/source/core/undo/docundo.cxx

Change-Id: I972988bbc21a519e0956ff196aa93a46287b9a2e
2013-06-26 16:22:38 +01:00
91b8728108 Resolves: #i120020# corrected paragraph merge...
corresponding undo and ownership of linked undo actions

(cherry picked from commit e58fe7afee5163833479b76a474416a77d95f075)

Conflicts:
	editeng/source/editeng/impedit2.cxx
	sc/source/ui/undo/undobase.cxx
	sc/source/ui/undo/undodraw.cxx
	svl/inc/svl/undo.hxx

Change-Id: I6672990558a496dfc692554437897d013e258f40
2013-06-24 16:08:17 +01:00
97f71c5f8b fdo#43460 svl: use isEmpty()
Change-Id: I441842c7514a27baea8ce5c0e7381dcf81892d6a
Reviewed-on: https://gerrit.libreoffice.org/4441
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-06-24 13:16:15 +00:00
448fa131b2 Fix fdo#52204 add new feature ignore diacritics in search for CTL
Change-Id: Ie9044a35003217545bacea214ef59047bff3b8b1
2013-06-21 11:14:17 +02:00
e7b87d69be -Werror,-Wdeprecated-register
Change-Id: I8edac5a93f9471c6f245bd484e845985c11027dd
2013-06-20 17:32:51 +02:00
904aff1932 Translate German comments, fix some WS
Change-Id: Ic52fc416aea9d1ca7235613aed7cf494f17ae21a
Reviewed-on: https://gerrit.libreoffice.org/4361
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-19 16:34:44 +00:00
0d5a2d2284 Translate German comments, correct some WS
Added accidentally removed {

Change-Id: Ied6c233cba113673f928c1a6b41a5217b9fff077
Reviewed-on: https://gerrit.libreoffice.org/4331
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-19 10:01:23 +00:00
ab28fdeba0 Remove commented out code
Change-Id: Iace3628d9c48f07e03c1dda8ca3ff02a2e32ad1f
Reviewed-on: https://gerrit.libreoffice.org/4332
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2013-06-18 12:10:50 +00:00
8956854d8e String to OUString (SfxStringItem and related)
Change-Id: I390413e9ff3efee720a6423fb8695b4c655d7efa
Reviewed-on: https://gerrit.libreoffice.org/4280
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-18 08:11:58 +00:00
ace2106744 Return accidentally removed field
The eNewLnge field (eek what an awful name...) was accidentally
dropped in 55343abdef77793ea1559408fb565a6241f1dadd.

Change-Id: If2d4b2ca785170c4806e64ffd62a8c436499ae30
2013-06-17 23:09:29 +03:00
894fdca701 Remove micro optimisation
Change-Id: I489b9948c2b3a888fcfcf8cc89bf408760a11d06
Reviewed-on: https://gerrit.libreoffice.org/4322
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:47:54 +00:00
55343abdef Translate German comments, correct some WS
Change-Id: Ia0ecca3dbaa1d44a7175ef6c454cd13c98bab030
Reviewed-on: https://gerrit.libreoffice.org/4320
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:42:49 +00:00
2ffd31223f Translate German comments, delete some WS and correct formatting
Change-Id: I6426b37e7963ab3ad48221f1695abd6036339ad5
Reviewed-on: https://gerrit.libreoffice.org/4319
Reviewed-by: Noel Power <noel.power@suse.com>
Tested-by: Noel Power <noel.power@suse.com>
2013-06-17 19:41:13 +00:00
c6e8f302e6 initialize number scanner.
Change-Id: I259754957a5ff7d07d5d6e4a252c3460f236f034
2013-06-16 12:03:24 +01:00
e210299bcb fix mistake
Change-Id: I190f1849064844d6e200b857af971e731f9b8d96
2013-06-16 12:30:43 +02:00
2552bd3fa5 cppcheck: fix some uninitMemberVar (svl)
Change-Id: I0874300f5a4941ee0b8dbd1dac0c6495aa9edc25
2013-06-16 11:44:51 +02:00
76dea8b2db cppcheck: fix uninitMemberVar from ctloptions.cxx (svl)
Change-Id: I4a0bf380d2f7786332ddb7f10f432636a0eda928
2013-06-16 11:30:48 +02:00
e7d73b42bd use proper offset for additional locale data formats, fdo#64947 related
Old number formats had predefined formats from 0..49, locale data could
define additional formats from index 50 on. Internal (fractional)
formats were added to the number formatter, shifting the number of
predefined entries NF_INDEX_TABLE_ENTRIES by two that was also used as
an offset to determine whether a format needed to be added additionally.

As a consequece, formats defined with index values 50 and 51 in locale
data were ignored and not available in the dialog.

Introduced a new enum constant NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS to
use as the old offset value for not having to change all locale data
definitions everytime an internally generated format is added.

Change-Id: I94bdaabf360f7b9c253b1e3f5b73087f0c45fb44
2013-06-15 16:40:00 +02:00
3af0114a29 Introduce O[U]String::toUInt32
...which has become necessary since bd60d41176da540b01d7583cfe00637431967f39
"Handle oveflow in O(U)String::toInt() functions" reduces values in the range
(SAL_MAX_INT32 .. SAL_MAX_UINT32] to zero, but some calls of toInt32(16) relied
on getting a correct (unsigned) value for the whole input range ["0" ..
"FFFFFFFF"] (see libreoffice-4-1 commit 9bf6c83367cedb7be81bf67f30d2147d26c7a8c3
"Revert overflow checks in O[U]String::toInt{32,64} again").

Audited all uses of toInt32/64 with non-decimal radix.  (There is still a TODO
comment in oox/source/helper/attributelist.cxx, and
stoc/source/typeconv/convert.cxx will still need some love and test code.)

Change-Id: Iadaca1c0e41dab553687d0ce41c20c10cd657a95
2013-06-13 17:08:36 +02:00
4e41227dd6 mingw64: change Link class to use sal_IntPtr instead of long
Change-Id: I2b78c7b714ff064f2f1b8a8eb161e5e2ae121eee
2013-06-10 14:03:40 +02:00
546fa9f365 fdo#46808, Convert XMultiServiceFactory in svl module
Change-Id: Ia51d748af3b29a6021e6f5307a60d87f17917f24
2013-06-05 08:13:23 +02:00
a96f593b41 Some more sal_IntPtr dance, but enough for today
Change-Id: Ic772181321e74713244223cc3d4542bd4cd2dc88
2013-06-04 16:11:44 +02:00
a69f31a322 unused svl/source/items/cstitem.src + hrc cleanup
Change-Id: I3db54045dc5be13dd7c72076c96a7e3f3b7b30ea
2013-05-14 18:49:37 +02:00
03535b9160 Remove obsolete RestrictedPath env var support
Change-Id: Ia4ea7d60d7b69c863c1e891887060265e73e1cb6
2013-05-14 19:14:34 +02:00
e347af862c typo fix: s/inavlid/invalid/
Change-Id: If75cad038f35033be6dcad6f051673bd795accf3
2013-05-14 15:52:24 +02:00
86b73eeef4 fdo#63154: Remove _CL and _LF from solar.h
And use RTL_CHAR_{CR,LF} from rtl/string.h

Conflicts:

	vcl/source/app/dbggui.cxx

Change-Id: I05b0325006845e48eb5483485a9042aa7b0cd22a
Reviewed-on: https://gerrit.libreoffice.org/3740
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2013-05-09 09:49:15 +00:00
c38d9f4e63 drop commented-out code
Change-Id: I7384a4fd82c8807dfaf9049306b65fe3ef5cab42
2013-05-07 11:02:11 +09:00
4c8ffa0113 i#120015# Let SdrUndoAttrObj remember a reference to the used style to survive
removal of the style by UI (which creates no undo actions). Re-add the
style when undoing if needed.

Change-Id: I6069a1cb42dfaeb0dd35fdc15687fd307f2b641e
2013-04-30 15:39:57 +01:00
ec8617568f Bin ugly (ab)use of preprocessor in headers
The time when it made sense to use "clever" #ifdefs to, for performance or
compiler reasons, conditionally bypass private parts of a class declaration
passed a decade or longer ago.

Still more of this in sw and sc. People working on those modules might want to
do it too, or not.

Change-Id: I1053139ca5e5e2631f7b22d99d3bada54fc337be
Reviewed-on: https://gerrit.libreoffice.org/3627
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-27 09:28:37 +00:00
9d97a2af7c sal_Bool to bool
Change-Id: I7dcb2dcef78c67d90ff2dea58c1374bd17ac58af
2013-04-26 09:28:38 +09:00
7a78461075 eliminated another unnecessary rString.toString()
Change-Id: Ic2fad1120876160f741056937825ab564e6d5f4e
2013-04-23 14:23:36 +02:00
5cd4300f7f fixed a mess of out of bounds string accesses
Change-Id: I800840e1b3c0d97a049b3ceba0ec244365dc8e6b
2013-04-22 23:09:21 +02:00
0f200cc30e fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO.

Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-04-20 11:09:54 +00:00
fa72fc3edd OUString::startsWith() is not equivalent to String::Match()
String::Match() wasn't quite right at that place either, but..

Change-Id: I1aed325340f5f36973ef2da8fd48af3283c0b79b
2013-04-19 00:50:11 +02:00
9830fd36db date/time IDL datatypes incompatible change
- nanosecond precision
 - signed (allowed negative) year

Also: assorted improvements / bugfixes in date/time handling code.
Some factorisation of copy/pasted code.

Change-Id: I761a1b0b8731c82f19a0c37acbcf43d3c06d6cd6
2013-04-18 21:34:46 +02:00
85c5f6c1a7 spurious warning C4701: potentially uninitialized local variable
Change-Id: I2e99cbe9db6d5911f0c2ec61229cd47e07e99cdf
2013-04-12 19:12:31 +02:00
858c6610f3 Resolves: #i120077# Memory leak fixed in ScXMLFontAutoStylePool_Impl
also checked and fixed memory leaks caused by not deleting
SfxStyleSheetIterator instances.

Found by: Chao Huang
Patch by: Chao Huang
Review by: alg

(cherry picked from commit aee8221b3fbe64d8e88aa3a1b630214807cd86f0)

Conflicts:
	sc/source/core/data/stlsheet.cxx
	sc/source/filter/xml/xmlfonte.cxx
	sfx2/source/doc/objcont.cxx
	svl/source/items/style.cxx
	sw/source/core/unocore/unostyle.cxx

Resolves: #120077# ALG: Reverted r1354011,

adapted all usages of SfxStyleSheetIterator and CreateIterator to use
boost::shared_ptr

(cherry picked from commit ec1819f218b94bed1556653e1b2b816a65da61ef)

Conflicts:
	sc/source/core/data/stlsheet.cxx
	sc/source/filter/xml/xmlfonte.cxx
	sfx2/source/doc/objcont.cxx
	svl/inc/svl/style.hxx
	svl/source/items/style.cxx
	sw/source/core/unocore/unoframe.cxx
	sw/source/core/unocore/unostyle.cxx

26937d4d65562b14de0aea59a7b01cc4334f73c1

Change-Id: If99bf3ee399292ec269d68b36ee78ed63f033215
2013-04-10 20:17:30 +01:00
8398d5d9ac fdo#62096: Replaced some OUString 'compareTo' with '=='
Change-Id: I1d095cf5640595789f4ae99f1b0679be88b0baa9
2013-04-10 10:09:56 +02:00
5349463070 Fix Array index "i" is used before limits check
Change-Id: Ie7a4b836db7391f4e625bfeaeab55c2ed4304604
2013-04-07 22:49:09 +02:00
ba044b1e96 remove needless forward rtl::OUString declarations
Change-Id: I97d91a758dd82d64768d75c1d2ddd279de5f6034
2013-04-07 14:23:12 +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
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
d526e48912 resolved fdo#63161 out of bounds string access
Introduced with c7709b460394283fd5b1d2779b6af3585f80a991
String to OUString where previous String::GetChar() handled this.

Change-Id: I9253df1af7498e2d7a8ea8077ec6b369697ad44e
2013-04-05 14:52:45 +02:00
8644d10098 Asserting rtl::O[U]StringBuffer::operator [] preconditions
...and fixing two call-sites.

Change-Id: I8ed8cb189bd5034130b49b2f57156568e6b24716
2013-04-03 11:27:05 +02:00
1416669670 Revert "Revert "reduce some uglyness""
The header guard seems to solve the problem.

This reverts commit df8c41cceeca27ae49e9fa6b5cd64c65c8feb218.

Change-Id: I27869be9c70e79a366a547ce061e71a3743f87da
Reviewed-on: https://gerrit.libreoffice.org/3171
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-04-02 15:32:20 +00:00
563a9b7ab3 Remove RTL_CONSTASCII_USTRINGPARAM in smoketest/sot/svl/toolkit/vbahelper
Change-Id: I0816631a1d0c68dcef9c640c91d00ac9942ded28
2013-04-01 22:12:22 +02:00
5be14df244 ResMgr with LanguageTag
Change-Id: Ie5ce9157a7ea59db7b0509fbaec61d07f8f9edf0
2013-03-29 14:09:01 +01:00
d7f1add4e8 -Werror=unused-macros
Change-Id: I377711500e6308e8aa273f016f8a2a9dcbaab760
2013-03-27 15:07:48 +01:00