Commit Graph

283 Commits

Author SHA1 Message Date
a6287e21f1 framework: sal_Bool->bool
Change-Id: Ia6e87e2b382bd4005637e14088bde9e809996a25
2014-04-07 13:53:49 +02:00
ee3945bd98 Kill superfluous spacing before semicolons
Change-Id: I53689e78221f3fe074e47d6b47f1a2c3fef96222
2014-04-06 19:37:48 +03:00
951ed199f1 Kill superfluous vertical whitespace
Change-Id: Ia1bb2b40c74efb17e655dd6f00d7ba48c16c65ae
2014-04-06 19:37:48 +03:00
5babf1b903 remove unnecessary scope qualifier from sal_Bool uses
i.e. convert "::sal_Bool" to "sal_Bool"

Change-Id: Ie5943aee4fee617bf2670655558927ed25b7e067
2014-04-03 13:54:02 +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
5d54e99312 Use SolarMutexGuard directly
Change-Id: I6e558d312e1c0b4243d9ce7a44cc3be346863bab
2014-03-18 17:37:54 +01:00
690b76aa27 Use SolarMutexGuard directly
Change-Id: I3818b2972771dc934f524b2bf1ee1bddd8e7868b
2014-03-18 17:37:54 +01:00
07b32bc2bf Consolidate framework::{Resetable,}Guard
Change-Id: I97290c2504992f4a92e6aeb71e02a2542dd35faa
2014-03-17 18:00:10 +01:00
ab3acb7ef7 Consolidate framework::{Read,Write}Guard
...now that it is obvious that they both do the same

Change-Id: I6878acca4750ef4204fe32a695b6d9e1c5140115
2014-03-17 16:52:34 +01:00
51a954809a coverity#707879 Uninitialized scalar field
Change-Id: I618fa64876dc27a3d3ced9281f1b02b97a983166
2014-03-08 14:25:06 +00:00
fcbefea017 Remove visual noise from framework
Conflicts:
	framework/inc/dispatch/oxt_handler.hxx
	framework/inc/services/layoutmanager.hxx
	framework/inc/tabwin/tabwindow.hxx
	framework/source/dispatch/menudispatcher.cxx
	framework/source/helper/dockingareadefaultacceptor.cxx
	framework/source/helper/ocomponentaccess.cxx
	framework/source/helper/ocomponentenumeration.cxx
	framework/source/helper/oframes.cxx
	framework/source/layoutmanager/toolbarlayoutmanager.hxx
	framework/source/recording/dispatchrecorder.cxx
	framework/source/services/desktop.cxx
	framework/source/services/frame.cxx
	framework/source/services/urltransformer.cxx

Change-Id: Ibb04e3f6f0796e7f2be16dcce38542f8b90708d4
Reviewed-on: https://gerrit.libreoffice.org/8265
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 14:41:41 -06:00
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
44f5f2bd34 coverity#704648 Dereference after null check
Change-Id: I0b6c5dc5b1225fb15c99401501b2c5cc2bb94b58
2014-02-23 14:22:44 +00:00
cc39a4b7d1 coverity#704647 Dereference after null check
Change-Id: Ifc74e903f13e6065c507d9a90825e588c5e88a42
2014-02-23 14:22:44 +00: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
e8f8f24c84 vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
2014-02-21 12:53:51 +01:00
a18a1a4545 Remove vcl/settings.hxx from vcl/svapp.hxx and vcl/outdev.hxx
Added vcl/settings.hxx to all cxx files which require it.
This helps to speed up compilation after changes to the settings.

Conflicts:
	sc/source/ui/dbgui/pvlaydlg.cxx

Change-Id: I211a0735c47f72d6879f6f15339355abfe0e3cf4
Reviewed-on: https://gerrit.libreoffice.org/7933
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-20 16:22:17 +00:00
ce96f8b02e Resolves: #i122576# Reset the docking area acceptor in the destructor
(cherry picked from commit 0e90517f3dd568cfe2be4bf8c256b94c9401d046)

Conflicts:
	framework/source/layoutmanager/layoutmanager.cxx

Change-Id: Ib053a1b474434f81608a04ca0d30dd32fe410e5a
2014-02-19 10:26:40 +00:00
6ba4d125f6 Related: #i124096# correct LayoutManager::m_xDockingAreaAcceptor clear...
on disposing

(cherry picked from commit 50b10da7434d774ac463c148bbaeb051d2b3a22d)

Conflicts:
	framework/source/layoutmanager/layoutmanager.cxx

Change-Id: I51fe74698f00fadba9afaeb0f8e9f66b85f208cb
2014-02-18 16:11:05 +00:00
3c1cc16bb7 coverity#704234 Logically dead code
Change-Id: I9a1010e6a7d830853a79cafa71a867f16fcceabc
2014-02-11 20:21:49 +00:00
cc5ec80521 misc cleanup and unnecessary OUStrings
Change-Id: Idef960995d7b13af049de5a5045b99df642dc3df
2014-02-10 16:43:54 +01:00
53052e5bfa fwk: Constructor feature for single-instance WindowStateConfiguration.
Change-Id: I0537d7a30b6c6807bf746a52dbd2c7fc66607ae2
2014-02-06 12:03:30 +01:00
4ff873bda2 Introduce com.sun.star.ui.theWindowStateConfiguration singleton.
Change-Id: I50861ac8952d54cb1a45846ea72a2ecac4f83409
2014-02-06 12:03:28 +01:00
19e16083c6 Introduce com.sun.star.ui.theModuleUIConfigurationManagerSupplier singleton.
Change-Id: I7b503e5d49865c9ff287bf72eaff1995ce871790
2014-01-30 10:48:25 +01:00
e9a23fd78c Introduce com.sun.star.ui.theUIElementFactoryManager singleton.
To replace single-instance com.sun.star.ui.UIElementFactoryManager
service.

Change-Id: I4262909c4396e3907d271a56696a06903168a58d
2014-01-29 11:46:10 +01:00
2462159d7b bool improvements
Change-Id: I754b47013d8f1aa3ecf6204fbe926a438887639d
2014-01-28 20:26:27 +01:00
c2c530da69 Introduce static inline cppu::acquire(), and make use of that.
This is much better approach compared to the callback function, as it allows
passing arguments to the c++ constructor directly, while still allowing some
additional initialization after having acquired the instance.

Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624
2014-01-22 15:09:28 +01:00
f278397787 Change _get_implementation()'s not to do initialization directly.
Many of the initalizations (in eg. framework) have to be done on an
acquire()'d object, so instead of doing the initialization directly, return
the initialization member function back to the createInstance() /
createInstanceWithContext() / ... and perform the initialization there.

As a sideeffect, I belive the calling initialize() from servicemanager is not
that much a hack any more - whoever converts the implementation to be
constructor-base has the choice to provide the callback, or still initialize
through XInitialization, where the callback is preferred by servicemanager
when it exists.

Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081
2014-01-21 21:25:22 +01:00
1115adbb5d bool improvements
Change-Id: I1588e6dcbc095d8c5fcde3601eea9111fbae15fb
2014-01-21 18:24:07 +01:00
5b034290cf fwk: Use constructor feature for LayoutManager.
Change-Id: I8f5167f7e522585ce8b80ebd8a9a0031aea50d74
2014-01-17 12:25:03 +01:00
1730df0127 remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append
Convert code like:
   aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") );
to:
   aOStringBuf.append( " is missing )" );
which compiles down to the same code.

Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
2013-11-20 10:07:32 +02: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
986644335c fdo#66864: Return from full-screen should restore toolbars.
The fix for fdo#37758 was not correct, we shouldn't fiddle with the m_bVisible
itself, but instead react on the m_bMasterHide flag; or at least that is my
understanding of the related framework code (why is it so confusing?!)

Change-Id: I791fcea9e5e5313b6a5b776cb3187cbd1a028386
2013-11-15 11:11:47 +01:00
24cad6a649 Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.

Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
2013-11-14 11:13:24 +01:00
15b5412fad fixincludeguards.sh: framework
Change-Id: Ia6f3cb21977095df45a176db2bf68f508c70191c
2013-11-05 09:28:53 +01:00
e2451bd729 Convert indexOf->startsWith and lastIndexOf->endsWith
This is both an optimisation and a cleanup.

This converts code like
   aStr.indexOf("XX") == 0
to
  aStr.startsWith("XX")
and converts code like
  aStr.lastIndexOf("XXX") == aStr.getLength() - 3
to
  aStr.endsWith("XXX")

Note that in general
  aStr.lastIndexOf("X") == aStr.getLength() - 1
converts to
  aStr.isEmpty() || aStr.endsWith("X")
so I used the surrounding context to determine if aStr could be empty
when modifying the code.

Change-Id: I22cb8ca7c2a4d0288b001f72adb27fd63af87669
2013-10-31 08:34:21 +02:00
2ad1494c6b -Werror,-Wunused-const-variable
Change-Id: I52bd479bd40031acc2742b93ab77420f26070b59
2013-10-02 16:49:31 +02:00
7f436c1fd3 typo fixes in comments
Change-Id: Iaadec33715f8e0e0c6595c5e684606905274fdab
2013-09-26 11:47:45 +02:00
6a3cf741d1 Otherwhise -> Otherwise
Change-Id: Iaec23e1d240f675a04b52cd251c4cb2a1242bb44
2013-09-26 10:21:12 +02:00
e8ecf30ea6 convert FRAMEWORK module from String to OUString
Change-Id: Iafa6b5f213d37093e7e46065c9264c7bb7fae377
2013-09-17 09:05:49 +02:00
2f750d86cf Try to keep older(?) gcc versions happy
Change-Id: Id563e644356a9265ded66cf08a711078c804ac84
2013-09-09 01:42:07 +03:00
2b3e225853 Bin some uses of the stupid DECLARE_ASCII macro
Change-Id: I076eef8069e848ec3cf9c69f1b489ad44586324e
2013-09-09 00:58:15 +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
5efc15f000 reduce use of UniString from ResID ctor
Change-Id: I8d7619e7807ff2d400ec5c7fd181375130245728
2013-07-28 16:45:48 +01:00
189bb791d2 fdo#66691: Revert fix for i#121577 Allow setting toolbar name in Addons.xcu
...which incompatibly changed Addons.xcs and breaks extensions (and LibreLogo,
which adds to Addons.xcu even though it is not an extension).  See the mail
thread starting at
<http://lists.freedesktop.org/archives/libreoffice/2013-July/054612.html>
"[Libreoffice-commits] core.git: #i121577# Allow setting toolbar name in
Addons.xcu" for details.

This reverts commit 85f072ef33ef47b5e3e0bcd51acb5c4179cde2c2
"Resolves: #i121577# Allow setting toolbar name in Addons.xcu" plus follow-up
af572d9fbb744c9691abe465815d7927a9d11510 "Related: #i121577# Allow setting
toolbar name in Addons.xcu," f13f9b5cc5267a7a5606b1a89db91b6d7aef5f9c "various
.xcus are gone now," and 37d9921797a3ad3be8257fbfee11326549fcd987
"odk/examples/python/toolpanel/CalcWindowState.xcu is still in use," plus those
parts of f97ca6f65182efc6542c53ac5e973b3ff398a5d1 "Resolves: #i116455# Make
toolbar style settings persistent" that apparently belong to the fix for
i#121577 rather than i#116455.

Change-Id: Ib744566f3d8da7d9008d7dad8bec60f1bf32e743
2013-07-24 16:36:55 +02:00
ab5eaec098 remove Application::GetWorkAreaPosSizePixel
This internal API has always been problematic because we cannot
support it under the Linux toolkits, where it has in fact always
just returned the size of the screen.

Change-Id: I406bcbca8a4161b4261ef46940823bb07c6ad18b
Reviewed-on: https://gerrit.libreoffice.org/4976
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
2013-07-19 11:18:21 +00:00
67feb57133 fdo#66524 - defer population of AddOns toolbar icons until they are shown.
Some addons eg. LibreLogo are almost never shown, so avoid their startup cost.

Change-Id: Ibbc072dd740eca6a97aeff918ae0a5c105278acf
2013-07-05 17:11:46 +01: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
5cb2e3104b remove toolkit/unohlp.hxx hack
Change-Id: Idb9971d848870f4d00dbf77e80e48bf7dfde8913
Reviewed-on: https://gerrit.libreoffice.org/4601
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-06-28 11:49:28 +00:00
85f072ef33 Resolves: #i121577# Allow setting toolbar name in Addons.xcu
(cherry picked from commit 37894067213a63c51c7a73083d7b0ace5f5c40da)

Conflicts:
	framework/inc/framework/addonsoptions.hxx
	framework/source/fwe/classes/addonsoptions.cxx
	framework/source/layoutmanager/toolbarlayoutmanager.cxx
	officecfg/registry/schema/org/openoffice/Office/Addons.xcs

Change-Id: Icc8ed1bb5ac2cfecd6c03c53c137c503dc78bc66
2013-06-24 11:49:53 +01:00