summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-10-05 13:05:05 +0200
committerJulien Nabet <serval2412@yahoo.fr>2023-10-05 20:35:59 +0200
commit74410e57bda7ec355e92ced5c21c956f83a0f6b7 (patch)
treeef18da59d1877c0f6394d43d56b2a523d187ad64
parent27d0c8cbba2a9c2b6aa43e97d56f62d15b3b5bca (diff)
Replace useless lcl_throwIllegalArgumentException function (forms)
Change-Id: Icad8c36ef91edd12da8cc533e3ce24c0000a8a28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157590 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--forms/source/misc/InterfaceContainer.cxx19
1 files changed, 5 insertions, 14 deletions
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index f7278117899c..90a918f5edcd 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -71,15 +71,6 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::util;
-namespace
-{
-
- void lcl_throwIllegalArgumentException()
- {
- throw IllegalArgumentException();
- }
-}
-
static bool
lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents )
{
@@ -739,17 +730,17 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r
// it has to support our element type interface
Any aCorrectType = _rxObject->queryInterface( m_aElementType );
if ( !aCorrectType.hasValue() )
- lcl_throwIllegalArgumentException();
+ throw IllegalArgumentException();
// it has to have a "Name" property
if ( !hasProperty( PROPERTY_NAME, _rxObject ) )
- lcl_throwIllegalArgumentException();
+ throw IllegalArgumentException();
// it has to be a child, and it must not have a parent already
Reference< XChild > xChild( _rxObject, UNO_QUERY );
if ( !xChild.is() || xChild->getParent().is() )
{
- lcl_throwIllegalArgumentException();
+ throw IllegalArgumentException();
}
// passed all tests. cache the information we have so far
@@ -1107,14 +1098,14 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any
throw NoSuchElementException();
if (Element.getValueType().getTypeClass() != TypeClass_INTERFACE)
- lcl_throwIllegalArgumentException();
+ throw IllegalArgumentException();
Reference<XPropertySet> xSet;
Element >>= xSet;
if (xSet.is())
{
if (!hasProperty(PROPERTY_NAME, xSet))
- lcl_throwIllegalArgumentException();
+ throw IllegalArgumentException();
xSet->setPropertyValue(PROPERTY_NAME, Any(Name));
}
9297b3b4548 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117005 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2021-02-08Remove unneeded breaksAndrea Gelmini Extending this: https://gerrit.libreoffice.org/c/core/+/110512 Change-Id: I1c5bfcddeb0f5619dc848bbf02408cf166bebc8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110521 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2020-03-16tdf#42949 Fix IWYU warnings in oox/source/[cd]*/*cxxGabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie3c59da7b9e0ad06fcd7f247e47bcc17ea35b17a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90503 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2020-01-24loplugin:makeshared in ooxNoel Grandin Change-Id: I6502e7be4881834b143ec7207c432881b2ae263c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87322 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-01-15clang-tidy modernize-concat-nested-namespace in ooxNoel Grandin Change-Id: I9877be75e1f7dcefdf7172d05dfbb0a63d06ced1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86803 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-01-10use more std::make_sharedNoel Grandin found using 'git grep', I tried using clang-tidy, but it only successfully found a tiny fraction of these Change-Id: I61c7d85105ff7a911722750e759d6641d578da33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-11-22Extend loplugin:external to warn about classesStephan Bergmann ...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-09-06clang-tidy performance-unnecessary-value-paramNoel Grandin Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-08-02tdf#116350 Import preset text geometry (text effects)Szymon Kłos "Font effect" implementation, instead of normal text, content is converted to "fontwork". Change-Id: I5d02c7faedb66a4b919e64ae1b830bffb69984c1 Reviewed-on: https://gerrit.libreoffice.org/58358 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> 2018-07-30Add missing sal/log.hxx headersGabor Kelemen rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from l10ntools to reportdesign Change-Id: Ia2dc93dd848c2dc0b6a8cb6e19849c614ec55198 Reviewed-on: https://gerrit.libreoffice.org/58205 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2017-10-23loplugin:includeform: ooxStephan Bergmann Change-Id: I9f1cc9940f5b31370394f789ebfaddfd6d30ca61 2017-07-31loplugin:constparams in ooxNoel Grandin Change-Id: I43984b4ece82da39ca61a91fa14e4660298509dd Reviewed-on: https://gerrit.libreoffice.org/40581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-08-19Some clang-tidy misc-move-constructor-initStephan Bergmann ...by turning the relevant ctor parameters into "const &". Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc 2016-04-25tdf#42949: clean up includes in include/oox/core using iwyuJorenz Paragas This allows the headers in that folder to stand on their own and not depend on any transitively included headers. All changes to other files are needed to fix compiler errors related to missing includes that occurred afterwards. Change-Id: I2083b30763f0b2c1aacdff00226e5f567ae52db4 Reviewed-on: https://gerrit.libreoffice.org/24355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> 2016-01-21oox: import Math objects from PPTX filesMichael Stahl This is quite hacky and limited: in OOXML these are not OLE objects but occur inside text boxes, and PPT 2010 allows inserting multiple Math objects into one text box but Impress does not have as-character anchored objects, so we can't import that properly; for now only import Math if there is nothing else in the text box. Also for now only import them as children of TextParagraphContext (a:p); it's not clear what the possible parent elements could be since the OOXML standard only lists WordProcessingML parent elements :( Change-Id: I847f810084c9ddae4b60f93896fb73a742683cc2 2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann Change-Id: I62a20b440064aca6f102e61cb3984bb95e739a4f 2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274 2015-08-04sal,rsc,oox: inline some use-once typedefsNoel Grandin Change-Id: I91bebe06c5c5f3ebe5fbeec83dcf3f5bdf563201 2015-02-17fix indentationMarkus Mohrhard Change-Id: Ifab81cb6e54e177aaf31aceeddc1b6cd3c0cc888 Reviewed-on: https://gerrit.libreoffice.org/14513 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> 2014-11-01oox: introduce W_TOKEN() macroMiklos Vajna It was inconsistent that when parsing <a:foo> elements, A_TOKEN(foo) was available, but for <w:foo> elements there was no W_TOKEN() macro. Also, there were two manual variants (NMSP_doc|XML_foo or via OOX_TOKEN(doc, foo)), replace both of them with W_TOKEN() for easier searching. Change-Id: Ic5cd027f07518535b92671ffe3c486016a3f9f0a 2014-09-14Move oox/drawingml/*hxx internal headers to oox/inc.Matúš Kukan Do not export LinePropertiesContext class as visible. And move GraphicProperties to its own header. Change-Id: I047c181e9f2adc7e59885f59663ea56c7eb898ed 2014-06-25remove whitespacesMarkus Mohrhard Change-Id: Ie14ba3dcb97f20479a04538748ef2c1c9e6c5dac 2014-05-23DOCX import: recurse into w:ins in groupshape textMiklos Vajna Groupshape text is provided by editeng, redlining is available in Writer text only. But still, instead of ignoring both deletions and insertions in group shape text, we could at least show the latest version correctly, i.e. ignore deletions but import insertions. Change-Id: I12df2ca1a8d27f9496a8036e521f8820d7075053 2014-05-23DOCX import: detect inline shape inside shape textMiklos Vajna Change-Id: Ia1614759558e73686fce137eb52fb623eae4a4e5 2014-05-23DOCX import: detect table in groupshapeMiklos Vajna Change-Id: Iba7bb88139a97e919739363cd85f3e822062b694 2014-02-23Remove unneccessary commentsAlexander Wilms 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-05drawingML import: paragraph adjustment inside group shapeZolnai Tamás Change-Id: I875cb1f12c9f81d329d7fe9cd3aa32a4cd818573 2014-01-25drawingML import: parse shape text run inside w:sdt and s:sdtContentZolnai Tamás Change-Id: I6dc5939ae66967785cdc5dab318024b8cb17d1cd 2013-12-10n#828390: New line is dropped while importing text.Muthu Subramanian 2013-12-09drawingml import: read w:rPrMiklos Vajna Change-Id: I4405f9bc073b6e0b8c0426561ae9d01d91efdd59 2013-12-09drawingml import: read w:sdtContentMiklos Vajna Change-Id: I691b0ee28304659fedbe9cf8eff6ba1d757d0803 2013-12-04DOCX import: parse drawingML group shapes in oox onlyMiklos Vajna This is similar to commit d5c934d150cb6cea5f96cbbee4fb5e8312bf027e (n#792778 DOCX import: parse group shapes in oox only, 2012-12-14), except that was for the VML importer. The only difference is that in case of drawingML, OOXMLFastContextHandlerShape::lcl_createFastChildContext() is only called for the children of the group shape, not for the element itself, so compare against the start token, not the current element. Change-Id: Iddeabb20bbd5f0153e2fc4e6df463830126fdd37 2013-10-29cppcheck: duplicate break or break which follows a returnJulien Nabet Change-Id: I0985d28289e31969cb9b048b221abfae1572025d 2013-06-28Convert all ContextHandler-derived clases over to ContextHandler2Tor Lillqvist Change-Id: I81f54e3b7d29a0807ec4c2f082ae00fd6e1d6138 Reviewed-on: https://gerrit.libreoffice.org/4580 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> 2012-12-07::rtl:: prefixes removal in ooxJosé Guilherme Vanz This commit removes some ::rtl:: prefixes and some macros in OOX Change-Id: I0c5ad9805ec2e8ed1092c56fe32e6901fdbd2b67 Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/1261 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2012-06-21re-base on ALv2 code.Michael Meeks Change-Id: I6c145e984c885c7e06caa1c27bfb354ea49ad9ce