392 Commits

Author SHA1 Message Date
Noel Grandin
0e507ae031 various: remove SAL_THROW macro
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
2014-06-05 08:17:52 +02:00
Jens Carl
8e115c6008 fdo#68849: Add header guards to all include files
added header guards for directories basebmp/, chart2/, cppuhelper/,
include/test/, io/test/, sax/test, shell/, writerfilter/, and xmlhelp/

Change-Id: I0e29a9b75c26d71f58aa98986b52f6d3b46015a6
Reviewed-on: https://gerrit.libreoffice.org/9615
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
2014-06-02 08:46:30 +00:00
Noel Grandin
5d13b6e821 fix . in #define
as a consequence of
commit 9e3cc6b47444f988a68ca3ddcad779ed0480b00c
"fdo#68849: Add header guards to all include files"

Change-Id: Ibabf0d88ff4d928311ad5079ac3aa1fd6a2c1e6d
2014-05-30 09:01:35 +02:00
Jens Carl
9e3cc6b474 fdo#68849: Add header guards to all include files
Added header guard to files in directories i18npool/, include/, and io/

Change-Id: I7ba5b5f0ffdf5dedb8fd40e8efa06936e7c23591
Reviewed-on: https://gerrit.libreoffice.org/9558
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-05-30 01:45:21 -05:00
Noel Grandin
ebc0a15515 remove more unnecesary OUString constructor use
when throwing exceptions

Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
2014-05-29 09:01:40 +02:00
Noel Grandin
9af0abebfd remove unnecessary use of Reference constructor in throw
Convert code like this:
  throw IOException("xx",
     Reference< XInterface >(static_cast<OWeakObject*>(this)) );
to this:
  throw IOException("xx",
     static_cast<OWeakObject*>(this) );

Change-Id: Ife9f645f0f1810a8e80219126193015502c43dbb
2014-05-27 08:20:11 +02:00
Julien Nabet
ac76cc7e60 Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
2014-05-23 22:11:52 +02:00
Noel Grandin
e7bc3cab01 remove boilerplate in UNO Exception constructor calls
Now that we have default values for Exception constructor params,
remove lots of boilerplate code.

Change-Id: I620bd641eecfed38e6123873b3b94aaf47922e74
2014-05-23 15:06:00 +02:00
Noel Grandin
1f2a47a6d3 io: sal_Bool->bool
Change-Id: I136c98cbe15d1c6629028392a9573066320b3a04
2014-04-23 11:11:49 +02:00
Stephan Bergmann
f73af1733e second test should be DataOutputStream
...as <https://gerrit.libreoffice.org/#/c/9007/> "cppcheck: multiCondition,
second test should be DataOutputStream" found out for an effective duplicate of
this code that got removed with the previous commit "Remove dead test code."

Change-Id: Ib7b088f065def2d5e954837d22178521f85c49fe
2014-04-22 09:11:29 +02:00
Tor Lillqvist
9a7fc5ee26 Typo: s/shure/sure
Change-Id: I1c55d3ee8be06deb6d48a6ad5cd30d170c8b9dbb
2014-04-18 00:30:35 +03:00
Stephan Bergmann
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
Stephan Bergmann
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
Caolán McNamara
5d71f82959 coverity#707937 Uninitialized pointer field
Change-Id: I25b92686b08137a5292de620d4e348019c21a739
2014-03-12 11:02:18 +00:00
Caolán McNamara
51f85041ef coverity#707936 Uninitialized pointer field
Change-Id: I0ae177349408fd49832056fbc4c300e8e77b2417
2014-03-12 11:02:18 +00:00
Caolán McNamara
00715826fe coverity#707939 Uninitialized scalar field
Change-Id: I5cbb4e2fef4361085840c914e26bb494566a4600
2014-03-08 20:28:02 +00:00
Caolán McNamara
3debbdf80c coverity#707938 Uninitialized scalar field
Change-Id: Ic76e70a33ed33a94e06faf0168e9a740c736a19e
2014-03-08 20:28:02 +00:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
043e378521 Remove visual noise from io
Change-Id: I46f8c4f793596b0e6feb2db7b9302b9b6eb9644b
Reviewed-on: https://gerrit.libreoffice.org/8273
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 09:25:43 -06:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Stephan Bergmann
0ec840b1d9 bool improvements
Change-Id: Ia6f86e38cb46a5f7ac634ad0afb66701811e6758
2014-01-21 18:24:05 +01:00
Stephan Bergmann
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
Marcos Paulo de Souza
66b602e231 fdo#54938: Convert io to use cppu::supportsService
Change-Id: Id53289a68352558b039e0993b687d0447cea8036
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-12-09 17:30:03 +01:00
Noel Grandin
610b2b94b3 remove unnecessary use of OUString constructor when assigning
change code like
   aStr = OUString("xxxx");
to
   aStr = "xxxx";

Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-11-19 10:29:31 +02:00
Noel Grandin
2c35fff7ec remove most use of RTL_CONSTASCII_USTRINGPARAM macro
This is largely unnecessary when working with OUString

Change-Id: I3cf4d68357a43665d01162ef4a2d5346a45da9be
2013-11-19 10:29:30 +02:00
Noel Grandin
0a9ef5a18e convert OUString 0==compareToAscii to equalsAscii
Convert code like:
   0 == aStr.compareToAscii("XXX")
to
   aStr.equalsAscii("XXX")
which is both clearer and faster.

Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
2013-11-11 12:58:12 +02:00
Noel Grandin
e52779d2f8 remove unnecessary use of OUString constructor
Change-Id: Ifb220af71857ddacd64e8204fb6d3e4aad8eef71
2013-11-11 11:21:26 +02:00
Marcos Paulo de Souza
3a009c427f fdo#60698: Merge all libs of io...
creating the libio. All these libraries are always used together, so we can put them
together in one single library.

This save almost 500 kb of the size of the final library.

Change-Id: Ib32fec36cc4eb80ca646ce472c1f1bcdd98ac62b
Reviewed-on: https://gerrit.libreoffice.org/6567
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-11-05 01:02:13 -06:00
Noel Grandin
5285beeaa4 remove redundant calls to OUString constructor in if expression
Convert code like:
  if( aStr == OUString("xxxx") )
to this:
  if( aStr == "xxxx" )

Change-Id: I8d201f048477731eff590fb988259ef0935c080c
2013-11-04 10:11:08 +02:00
Tor Lillqvist
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
Jürgen Schmidt
ed445d95ed Resolves: #i75731# check output stream and...
throw IOExceptioin if it is not intialized

(cherry picked from commit cf17f922f01bd75643749a7fd01a03f8167bccee)

Change-Id: I07f6def513ef54b736689bf22565645f0c313982
2013-10-22 13:17:11 +01:00
Marcos Paulo de Souza
ee5661ecd3 fdo#54938: Adapt supportsService implementations..
to cppu::supportsService

Change-Id: I0b03d3910f094f2183bf9859db9d5bcaf35d1f14
Reviewed-on: https://gerrit.libreoffice.org/6370
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-22 10:28:10 +00:00
Thomas Arnhold
f762dad2e7 fdo#46374 replace stardiv in comments where applicable
Change-Id: Icd07fba84735325408741ad10864c63ea32a6481
2013-10-04 15:06:23 +02:00
Luboš Luňák
64b993e046 finish deprecation of O(U)String::valueOf()
Compiler plugin to replace with matching number(), boolean() or OUString ctor,
ran it, few manual tweaks, mark as really deprecated.

Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-21 15:10:35 +02:00
Takeshi Abe
12b1d1cda3 Mark as const
Change-Id: I9277052ee9c6197cef7a46bd8f3ab9c5515c2502
2013-08-12 09:23:52 +09:00
Mark Wielaard
2fc0fa62b2 Fix memory leak in OTextInputStream.
Delete mpBuffer when done in destructor or replaced in implResizeBuffer.

Change-Id: Ide1b44f10a482ce9bb6135fb879e62e0a8ccea29
Reviewed-on: https://gerrit.libreoffice.org/4637
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-01 12:26:09 +00:00
Thomas Arnhold
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
Luboš Luňák
e2e2cc6114 remove usage of RTL_CONSTASCII_USTRINGPARAM
Mechanical removal of usage together with OUString ctor, done
by compiler plugin.

Change-Id: I554227f76df0dac620b1b46fca32516f78b462c5
2013-05-06 16:51:45 +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
Stephan Bergmann
e8ff469da5 Remove any remaining remnants of unused component_canUnload feature
Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a
2013-04-19 16:52:03 +02:00
Matúš Kukan
eeaa2ecd1e remove unused component_canUnload functions
Change-Id: Id3f41e2a620c47bb848718d0fc994739be2d64fc
2013-04-19 16:52:03 +02:00
Peter Foley
8ffb20747c fix loplugin unused warnings
Change-Id: I23fc6bf62e74f192f77c74ed48d5276737375f3c
2013-03-30 16:55:25 -04:00
Thomas Arnhold
5bb4a2ba1d further OUString cleanup
Change-Id: I19954ee5976cb881a5fe73a889c8e04a19b14eb6
2013-03-19 14:18:10 +01:00
Thomas Arnhold
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
Michael Meeks
79b0046ba0 remove legacy build.pl prj/build.lst files. 2013-03-14 17:05:51 +00:00
Takeshi Abe
ce33f85ffd sal_Bool to bool
Change-Id: I8c554fb3faead41c974af9c2a89728bd0bdf5eb6
2013-03-04 23:14:41 +09:00
Michael Stahl
b768611724 remove all d.lst
Change-Id: Icba4218c5f9fe89d183d25ea82a8eae52881f885
2013-02-28 18:40:06 +01:00
Noel Grandin
fbd4588afd fdo#46808, convert io::TextOutputStream service to new-style
Change-Id: I12af47afc21c2b646197893a77698f4e0818f94f
2013-02-11 08:02:15 +02:00
Noel Grandin
ff85e8319a fdo#46808, convert io::TextInputStream service to new style
Change-Id: Ida4abdd6587399aa8ade88af672bcb23ab7ea0f1
2013-02-11 08:02:15 +02:00
Michael Stahl
5a61e28378 gbuild: fix silly "expandtabs" in makefile VIM modelines
Change-Id: I54d8923ad315e8041fd3904da3a29f1a7a8c8b16
2013-01-26 22:20:07 +01:00