Commit Graph

271 Commits

Author SHA1 Message Date
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
f97ca6f651 Resolves: #i116455# Make toolbar style settings persistent
(cherry picked from commit fff79c8807c5b174507888a8e393f2605b28ea29)

Conflicts:
	framework/source/layoutmanager/toolbarlayoutmanager.cxx

Change-Id: I25bfff7116c04aa6e40a062ce465960e50f68f7c
2013-06-24 11:30:47 +01:00
14ed0d1629 cppcheck: fix redundant assignments
Change-Id: I3fb495c6e18b3cb5e9d4beca4212d4aa8097401e
2013-06-13 20:36:56 +02:00
660b67a413 fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO
- replace OSL_* with SAL_*

Change-Id: Id4e90b83a7275bfd30914f7514a609cebbfbf4ac
Reviewed-on: https://gerrit.libreoffice.org/4044
Reviewed-by: Luboš Luňák <l.lunak@suse.cz>
Tested-by: Luboš Luňák <l.lunak@suse.cz>
2013-05-31 18:08:02 +00:00
e0fc16f769 fdo#46808, Convert some XMultiServiceFactory to XComponentContext
Change-Id: I8272ecab34711654ed27625a571cf2553ffd7468
2013-05-28 08:10:25 +02:00
95ec16b513 fdo#46808, Convert frame::LayoutManager service to new sty;e
Change-Id: I46c3950aee336548d6e0acc6a7d1da655c158175
2013-05-28 08:10:23 +02: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
8b050d1e91 UI Controller Factory fixes
- "ModuleName" --> "ModuleIdentifier": the IDL definition for
css::frame::PopupMenuControllerFactory and
css::frame::StatusbarControllerFactory tells to use a property named
"ModuleIdentifier", but in the code it is named "ModuleName"

- Undocumented css::frame::ToolbarControllerFactory

- Fix service name of ToolbarControllerFactory (ToolbarControllerFactory
instead of ToolBarControllerFactory)

- Convert the three service factories to new style, and use these
new-style services in the source code

- Implement multiple inheritance: added new css::frame::XUIControllerFactory

- Added a (true) base class and implemented the three factories in a
single file

(cherry picked from commit acc7fed28f54f836b0923180431a0c180f91e98c)

Conflicts:
	framework/inc/pch/precompiled_framework.hxx
	framework/inc/uielement/toolbarmanager.hxx
	framework/inc/uifactory/popupmenucontrollerfactory.hxx
	framework/inc/uifactory/statusbarcontrollerfactory.hxx
	framework/inc/uifactory/uicontrollerfactory.hxx
	framework/source/uielement/addonstoolbarmanager.cxx
	framework/source/uielement/menubarmanager.cxx
	framework/source/uielement/popupmenucontroller.cxx
	framework/source/uielement/statusbarmanager.cxx
	framework/source/uielement/toolbarmanager.cxx
	framework/source/uifactory/popupmenucontrollerfactory.cxx
	framework/source/uifactory/statusbarcontrollerfactory.cxx
	framework/source/uifactory/uicontrollerfactory.cxx
	framework/source/unotypes/fwk.xml
	offapi/com/sun/star/frame/PopupMenuControllerFactory.idl
	offapi/com/sun/star/frame/StatusbarControllerFactory.idl
	offapi/com/sun/star/frame/makefile.mk
	svtools/source/uno/toolboxcontroller.cxx

Change-Id: Ia8580539badf650a84bc6e57a6b832071e011f0a
2013-05-21 16:29:33 +01:00
884217479d fdo#46808, Convert more XMultiServiceFactory to XComponentContext
Change-Id: Ia9fe1a95aab5f466ce212e442eba791f265488b5
2013-05-21 14:45:48 +02: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
99d851b3e2 Kill copy'n'paste.
Change-Id: I5e5b80f8d8efe91df806bb7ae9750fd84009c6be
2013-04-10 10:39:54 +02:00
2dc7318d84 Kill not necessasy OUString member variables.
Change-Id: I1bbfd19bc70fc12ac5dc5fdb18c556f4dc5300cb
2013-04-09 17:48:52 +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