Commit Graph

281 Commits

Author SHA1 Message Date
7249ba6877 remove external header guards
that's the problem with those: none of them was actually defined...

Change-Id: I496140e43cf8ff8a5712394023d98516aaf21adc
2014-05-14 18:12:57 +02:00
b81ec527f0 use our css prefix to make this readable
Change-Id: I360832edafcfcff7e63fd3b185c2575165c2d728
2014-05-14 18:03:20 +02:00
b2096deaff various loplugin:passsequencebyref
Change-Id: Id1045a7f66b4fa10b6491587ba07246a31ceba72
2014-05-14 16:54:27 +02:00
ffa2229a8e remove dead code
Change-Id: Ic4fb478921714429af138ca212bd7f67f408d434
2014-05-13 12:00:27 +02:00
8306e6cfb4 sdext, fix sal_Bool->bool conversion
in commit 1e2c8cf578fe84c95fdd884846545d9faa47fa31

Change-Id: Id488736b183ddd02e07179fa0186a9ff342cafdf
2014-04-30 09:02:00 +02:00
1e2c8cf578 sdext: sal_Bool->bool
Change-Id: Ib505866047da2cbe0b00d99aa5d7050199b45e1c
2014-04-30 08:43:40 +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
86a32589e9 Find places where OUString and OString are passed by value.
It's not very efficient, because we generally end up copying it twice -
once into the parameter and again into the destination OUString.

So I create a clang plugin that finds such places and generates a
warning so that we can convert them to pass-by-reference.

Change-Id: I5341a6ea9e3190f4b4c05c42c85595e3dcd83361
2014-03-18 08:32:26 +02:00
54b4add666 Remove unused HelpCloseListener
Change-Id: I9040a1262b31f8d0f19594b6efcf12b2c38be7be
2014-03-12 16:24:43 +01:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
e6bd9d718d Remove visual noise from sdext
Change-Id: I792249b9e92db9af4daee0bd835e04044d29bca5
Reviewed-on: https://gerrit.libreoffice.org/8308
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 08:19:03 -06:00
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
32b8c5c4a9 fdo#54938 Convert basctl, mysqlc, sdext, svgio, writerp. to cppu::supportsSer.
Change-Id: I60128dbb5bf83f25eea847fe655d7126c9077414
Reviewed-on: https://gerrit.libreoffice.org/7756
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Marcos Souza <marcos.souza.org@gmail.com>
Tested-by: Marcos Souza <marcos.souza.org@gmail.com>
2014-02-02 18:53:03 +00:00
9ed364774c Adapt all (non-extension, SharedLibrary) .components to environment="..."
Change-Id: I56f38bd786f3a026cb2908f28540dc9c4003af83
2013-12-17 11:06:00 +01:00
2ac31b06ae Unnecessary use of OUString constructor inside OUStringBuffer constructor
Convert code like:
    OUStringBuffer sVal(OUString("0x"));
to:
    OUStringBuffer sVal("0x");

Change-Id: Idc5a3f6a8bf1dc33f93c2b488f866c8ea58d582a
2013-12-17 11:49:05 +02:00
8548abbac5 Remove unnecessary use of OUString constructor in OUStringBuffer::append calls
Convert code like
  aStrBuffer.append(OUString(" AS "));
to
  aStrBuffer.append(" AS ");

Change-Id: I8c1884b5a875f40f0b5e511b6ef38c6c8eeee656
2013-12-17 11:49:04 +02:00
3b2f956ba6 Drop duplicate #include
Change-Id: Ife8ebbb5e46704c5d2ff46cc345b4ed926e7dc12
2013-12-02 01:02:06 +09:00
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
fcd1637d51 convert OUString compareToAscii == 0 to equalsAscii
Convert code like
   aStr.compareToAscii("XXX") == 0
to
  aStr.equalsAscii("XXX")
which is both easier to read and faster.

Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
2013-11-11 12:58:13 +02:00
cefed9792d fixincludeguards.sh: sdext
Change-Id: I5cb8f7fb35121f41aedeff46f50d51d2ee039206
2013-11-05 09:28:52 +01:00
943a03a4ee Drop unnecessary #include
Change-Id: I20448aebfae86c097413660e9ec836a786507a85
2013-10-29 09:27:39 +09:00
a83b3b5d45 Minimizer: *.mini was saved w/o .odp etc. extension (and clean up)
Change-Id: I4626794f7816ae455a392cdc0acbac42c866fff4
2013-10-15 18:24:14 +02:00
cc2a405915 fdo#61950 De-extensionize presentation minimizer: post clean
Change-Id: I7d21f1d67b13fcd83792503e8c72ccf16fbda1ec
Reviewed-on: https://gerrit.libreoffice.org/6247
Reviewed-by: David Ostrovsky <David.Ostrovsky@gmx.de>
Tested-by: David Ostrovsky <David.Ostrovsky@gmx.de>
2013-10-15 15:50:12 +00:00
8ab1c6103d could not convert from ‘const char*’ to ‘rtl::OUString’
Since 3eb84bcb4580af50c2ded9f48749384b8455258e which apparently Clang
has no problem with.

Change-Id: I21af4e20dd116705e53d73a968fde478bff142bb
2013-10-15 16:59:36 +02:00
71b2bf62d6 Remove unnecessary TK_Last
Change-Id: Ia5095646f01a76258d69df866e3c803f8691915b
2013-10-15 09:27:57 +02:00
2f7492ad67 Small simplification (and exit loop early)
Change-Id: I076307174fdd63b58a8cb9c9690f50dae746c289
2013-10-15 09:27:57 +02:00
124f5981d8 Simplify PPPOptimizerTokenEnum -> OUString
Change-Id: I8be2a1d603afd26de11e737586590ebb7adcbc42
2013-10-15 09:27:57 +02:00
cd10abe0ba Simplify PPPOptimizerTokenEnum -> OUString
Change-Id: I88176f00c5fb356d63ecfdd291c006e88606a604
2013-10-15 09:27:56 +02:00
3eb84bcb45 Simplify TKGet(TK_FOO) -> "FOO"
Change-Id: I06e3134aeef27f13969f6d9d7d81b916bc93e8e2
2013-10-15 09:27:56 +02:00
be1ce88b8e Remove unused file
...was referenced from removed sdext/source/minimizer/description.xml

Change-Id: I501860640eb899742f7850f626008b930bf8eab4
2013-10-14 12:21:39 +02:00
9acc06843a Remove file apparently unused since inception
Change-Id: Ib2522c943df37c0b299120fcbdb262a74ee5f5f7
2013-10-14 12:21:39 +02:00
cc0d5df45d No need to have com.sun.star.comp.PPPOptimizer as a service
After de-extension-alization of Presentation Minimizer, it is important that its
UNO implementation names are different from the ones used by the extension (in
case the extension ever is installed as shared or per-user).  For
com.sun.star.comp.PPPOptimizer it appears to be easiest to not advertise this as
a service at all, but rather instantiate the object directly where used.  (For
com.sun.star.comp.PresentationMinimizerImp the necessary renaming had been done
in the previous commit already.)

Change-Id: I954b715f2d434cecf9abd2776b39c4ed3152c5ec
2013-10-14 12:21:39 +02:00
2aa5d13ed0 fdo#61950 De-extensionize presentation minimizer
Change-Id: I87805ceacf184d5aa5faae68e8bb932391ace7fb
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-14 12:21:39 +02:00
d37b6fad16 WaE: unused variable
Change-Id: I0e344a64da4166b99be6887df384224042172454
2013-10-02 20:04:10 +03:00
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
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
bc5a0560f2 Typo
Change-Id: I73700479207c0ee594dd23709640cdff82224469
2013-06-20 16:17:53 +02:00
4bd502a583 fix field name, was mxMSF, but should have been named mxContext
Change-Id: I4661cd84346791ddd6167ccc63335ad63255472f
2013-06-05 14:48:19 +02:00
1d1825db86 fdo#46808, Convert awt::UnoControlDialog to new style
Change-Id: I9a5256c8dbacda60167403b4e26900588943a9b2
2013-05-28 08:10:22 +02:00
e36f83d81c Revert "fdo#46808, Convert awt::UnoControlDialogModel to new style"
This reverts commit 6c61b20a8d4a6dcac28801cde82a211fb7e30654.  As discussed at
<http://lists.freedesktop.org/archives/libreoffice/2013-May/052449.html> "Re:
fdo#46808, Convert awt::UnoControlDialogModel to new style problem" why the odd
change in 2e2a4827ce6708f0e8677dba9cc92e1479a44086 "scripting: get
CreateUnoDialog() work again" appears to fix things again:

  The problem is that the implementation of the css.awt.UnoControlDialogModel
  involves UNO aggregation
  (IMPL_CREATE_INSTANCE_WITH_GEOMETRY(UnoControlDialogModel) in
  toolkit/soruce/helper/registerservices.cxx creating a
  OGeometryControlModel<UnoControlDialogModel> instance that aggregates a
  UnoControlDialogModel instance).  That means that queryInterface can return a
  reference to something that is technically a different object, and that's
  what's happening here, and explains why calling setPropertyValue in two
  different ways on what logically appears to be a single object can end up
  calling two different implementations (of two different physical objects).
  (UNO aggregation is known to be broken and should not be used.  Nevertheless,
  there's still code that does---code that is a horrible mess and hard to clean
  up.)

  That all this worked as intended in the past is just sheer luck, but any
  way of substantially touching it is asking for trouble.  I'm going to
  revert 6c61b20a8d4a6dcac28801cde82a211fb7e30654 again.

I wasn't able to revert without also reverting
be50ad28f5bbdaeff527f646481ce263843c2401 "fdo#46808, Convert
awt::XUnoControlDialog to new style," as the two were tightly dependant.  Also
reverts all the follow-up fixes cb4b6dde8fda2a5848e11063028bf44d72f85431
"-Werror,-Wuninitialized" (sans the const-ness fix in
UpdateHandler::insertControlModel), 697a007c61b9cabceb9767fad87cd5822b300452
"Fix exception specifications," 2ce6828bbbf6ba181bb2276adeec279e74151ef6 "fix
awt::UnoControlModelDialog crash," and 2e2a4827ce6708f0e8677dba9cc92e1479a44086
"scripting: get CreateUnoDialog() work again."

Conflicts:
	basctl/source/dlged/dlged.cxx
	filter/source/t602/t602filter.cxx
	xmlscript/test/imexp.cxx

Change-Id: I5d133468062f3ca36300db52fbd699be1ac72998
2013-05-25 11:45:47 +02:00
a0dcc8f780 Resolves: #i121857# Presentation Minimizer: fix filter naming
(cherry picked from commit 75833fdb6ede664fdcef38a16ecf1f8d3f3adc7d)

Conflicts:
	sdext/source/minimizer/fileopendialog.cxx

Change-Id: I164cc6d9916ddf9dba9da273b5181e5728127292
2013-05-23 20:26:50 +01:00
6a043e9c0a Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.

Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2013-05-22 10:44:29 +00:00
be50ad28f5 fdo#46808, Convert awt::XUnoControlDialog to new style
Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355
2013-05-21 08:23:59 +02:00
6c61b20a8d fdo#46808, Convert awt::UnoControlDialogModel to new style
Change-Id: I4b912034ef3f4855b87d6d6f18ff13bd1ecc8f72
2013-05-21 08:23:58 +02:00
9ddf14e46b Resolves: #i82852# Presentation Minimizer: missing icon in info dialog
(cherry picked from commit 8fd66eeb883676c095c8360ef609e56b9bc055a3)

Conflicts:
	sdext/source/minimizer/informationdialog.cxx
	sdext/source/minimizer/informationdialog.hxx

Change-Id: I8f6ea8edf7c1b95fefa6c280a92030d628339e56
2013-05-14 16:34:42 +01:00
1857688e1f Resolves: #i122208# introduce rtl::CStringHash and rtl::CStringEqual
unify the various c-string compares and hashes.

(cherry picked from commit b7e3470a154538a92f0a21b14e726d75723f4a92)

Conflicts:
	oox/inc/oox/export/shapes.hxx
	oox/source/export/shapes.cxx
	sal/inc/rtl/string.hxx
	sdext/source/minimizer/pppoptimizertoken.cxx
	svx/source/customshapes/EnhancedCustomShapeTypeNames.cxx
	vcl/source/glyphs/gcach_ftyp.cxx
	writerfilter/source/resourcemodel/TagLogger.cxx
	xmloff/source/draw/EnhancedCustomShapeToken.cxx

Change-Id: Ib742744077bfb4d38a462d88b44bdef45601b4ae
2013-05-10 12:36:33 +01:00
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
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
bd5e62e199 Prefer prefix ++/-- operators for non-primitive types
+ convert while loop into for loop

To check:
could we use std::find (find_if)?
Is it always ok to do begin()+1?
What about if we return aEnd?

Change-Id: I59107de5693ad7b37e5eef80134c34a03982151e
2013-03-30 16:50:47 +01:00
1679aa60d0 Prefer prefix ++/-- operators for non-primitive types
+ use const_iterator for end iterator

Change-Id: I8ad8db97e35ec4fad7c02c669be981f73c9165ca
2013-03-29 06:48:30 +01:00