/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_SVX_OBJFAC3D_HXX #define INCLUDED_SVX_OBJFAC3D_HXX #include #include #include /************************************************************************* |* |* Factory for chart-specific objects |* \************************************************************************/ class SdrObject; struct SdrObjCreatorParams; class SVXCORE_DLLPUBLIC E3dObjFactory { public: E3dObjFactory(); DECL_DLLPRIVATE_STATIC_LINK(E3dObjFactory, MakeObject, SdrObjCreatorParams, rtl::Reference); }; #endif // INCLUDED_SVX_OBJFAC3D_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/unoxml
AgeCommit message (Collapse)Author
2024-01-05std::size/SAL_N_ELEMENTS also counts the null terminatorCaolán McNamara
which libxml2 2.12 will fail on with error: 'Extra content at the end of the document' Change-Id: I9d5da9fdd826cce8462ede8c510eaea7281b760f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161627 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-27tdf#158302 fix build against system-libxml-2.12Miklos Vajna
Seen in a fedora:40 container, using --with-system-libcmis, --with-system-liblangtag and --with-system-xmlsec. Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-19tdf#42982: Improve UNO API error reportingkhushishikhu
Change-Id: I16bd4bb935d02ff03422cb48d21a63e3d994d0b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157993 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-10-14Use exception ctors, instead of setting members laterMike Kaganski
Avoids overwriting source location in message Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-27Use getXWeak in unoxmlMike Kaganski
Change-Id: I141bad0d1b244bd801f613f159b79c4518fdf252 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150883 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-12OUString::intern is a relicNoel Grandin
and a pessimisation. Remove usage thereof. Change-Id: I98f6197aa375349b909a7ef1403ec06ca37890d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-30loplugin:stringadd in ucbhelper..uuiNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I49549347c1c041cc9ce103aed1fe1cc3bc1a780f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-14elide some temporary OStringsNoel Grandin
where we can pass a string_view into OStringToOUString Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-06no need to allocate these separatelyNoel Grandin
they are all one or two words in size Change-Id: I9bbe80a1be4d138f00d864352896d61d0df6366d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-19tdf#153039 unoxml: replace root element of CDocument throwsMichael Stahl
XForms replace doesn't work because: CDocument::IsChildTypeAllowed() tests that the document node does not already have an element child, because only one is allowed - but when called from CNode::replaceChild(), the existing child will be removed, so that needs to be allowed to proceed (check that removed child is also element). (regression from commit c5db3b93ee1058bd20ebcde2e757b52b9a67b74a) Change-Id: I167de3462f4d1934dbf8404ad395349897cfd981 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-17tdf#153009 Use recursive mutex in CDocumentBuilderMichael Weghorn
This was changed from `osl::Mutex` to `std::mutex` in commit e66fdb597b30fc701bb068824d0ae4d89fecd55f Date: Sat Jul 31 20:12:30 2021 +0200 osl::Mutex->std::mutex in CDocumentBuilder , but `DOM::CDocumentBuilder::parseURI` locks the mutex and then calls `DOM::CDocumentBuilder::parse` for the // if we failed to parse the URI as a simple file, lets try via a ucb stream. // For Android file:///assets/ URLs which must go via the osl/ file API. case, which would result in a deadlock because `DOM::CDocumentBuilder::parse` wants to lock the mutex again. This happens once that code path is executed on Android Viewer when creating a new Impress presentation with Change-Id Iba1ac68c0b983d3e465515f07b3fc67162a0ee3f ("tdf#153009 android: Include more doc layout related XML files") in place. Fix the deadlock by using a "std::recursive_mutex` instead. Part of the backtrace: DOM::CDocumentBuilder::parse(const com::sun::star::uno::Reference<…> &) documentbuilder.cxx:331 DOM::CDocumentBuilder::parseURI(const rtl::OUString &) documentbuilder.cxx:387 non-virtual thunk to DOM::CDocumentBuilder::parseURI(rtl::OUString const&) documentbuilder.cxx:0 SdDrawDocument::InitLayoutVector() drawdoc.cxx:1130 SdDrawDocument::SdDrawDocument(DocumentType, SfxObjectShell *) drawdoc.cxx:147 sd::DrawDocShell::Construct(bool) docshell.cxx:94 sd::DrawDocShell::DrawDocShell(SfxModelFlags, bool, DocumentType) docshell.cxx:140 sd_PresentationDocument_get_implementation::$_1::operator()(SfxModelFlags) const unodoc.cxx:65 std::__ndk1::__invoke<…>(sd_PresentationDocument_get_implementation::$_1 &, SfxModelFlags &&) type_traits:4353 std::__ndk1::__invoke_void_return_wrapper::__call<…>(sd_PresentationDocument_get_implementation::$_1 &, SfxModelFlags &&) __functional_base:318 std::__ndk1::__function::__alloc_func::operator()(SfxModelFlags &&) functional:1527 std::__ndk1::__function::__func::operator()(SfxModelFlags &&) functional:1651 std::__ndk1::__function::__value_func::operator()(SfxModelFlags &&) const functional:1799 std::__ndk1::function::operator()(SfxModelFlags) const functional:2347 sfx2::createSfxModelInstance(const com::sun::star::uno::Sequence<…> &, std::__ndk1::function<…>) sfxmodelfactory.cxx:82 sd_PresentationDocument_get_implementation(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<…> &) unodoc.cxx:61 std::__ndk1::__invoke<…>(com::sun::star::uno::XInterface *(*&)(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<…> &), com::sun::star::uno::XComponentContext *&&, const com::sun::star::uno::Sequence<…> &) type_traits:4353 std::__ndk1::__invoke_void_return_wrapper::__call<…>(com::sun::star::uno::XInterface *(*&)(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<…> &), com::sun::star::uno::XComponentContext *&&, const com::sun::star::uno::Sequence<…> &) __functional_base:318 std::__ndk1::__function::__alloc_func::operator()(com::sun::star::uno::XComponentContext *&&, const com::sun::star::uno::Sequence<…> &) functional:1527 std::__ndk1::__function::__func::operator()(com::sun::star::uno::XComponentContext *&&, const com::sun::star::uno::Sequence<…> &) functional:1651 std::__ndk1::__function::__value_func::operator()(com::sun::star::uno::XComponentContext *&&, const com::sun::star::uno::Sequence<…> &) const functional:1799 std::__ndk1::function::operator()(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<…> &) const functional:2347 cppuhelper::ServiceManager::Data::Implementation::doCreateInstance(const com::sun::star::uno::Reference<…> &) servicemanager.cxx:706 cppuhelper::ServiceManager::Data::Implementation::createInstance(const com::sun::star::uno::Reference<…> &, bool) servicemanager.cxx:675 cppuhelper::ServiceManager::createInstanceWithContext(const rtl::OUString &, const com::sun::star::uno::Reference<…> &) servicemanager.cxx:1006 non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) servicemanager.cxx:0 SfxFrameLoader_Impl::load(const com::sun::star::uno::Sequence<…> &, const com::sun::star::uno::Reference<…> &) frmload.cxx:707 non-virtual thunk to (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) frmload.cxx:0 framework::LoadEnv::impl_loadContent() loadenv.cxx:1167 framework::LoadEnv::start() loadenv.cxx:403 framework::LoadEnv::startLoading(const rtl::OUString &, const com::sun::star::uno::Sequence<…> &, const com::sun::star::uno::Reference<…> &, const rtl::OUString &, long, LoadEnvFeatures) loadenv.cxx:308 framework::LoadEnv::loadComponentFromURL(const com::sun::star::uno::Reference<…> &, const com::sun::star::uno::Reference<…> &, const rtl::OUString &, const rtl::OUString &, long, const com::sun::star::uno::Sequence<…> &) loadenv.cxx:168 framework::Desktop::loadComponentFromURL(const rtl::OUString &, const rtl::OUString &, long, const com::sun::star::uno::Sequence<…> &) desktop.cxx:594 non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, long, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) desktop.cxx:0 lo_documentLoadWithOptions(_LibreOfficeKit *, const char *, const char *) init.cxx:2666 lo_documentLoad(_LibreOfficeKit *, const char *) init.cxx:2532 Java_org_libreoffice_kit_Office_documentLoadNative(JNIEnv *, jobject, jstring) lokandroid.cxx:134 [...] Change-Id: I63bc7b6f682dab2e94f4e932429c513c5129428e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145620 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-01-15XUnoTunnel->dynamic_cast in CNodeNoel Grandin
Change-Id: Ifcedcb6fc4e20da6351e4ccf035a3fe06d607961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145507 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-15Merge SvXMLAttributeList to comphelper::AttributeListMike Kaganski
And simplify the latter, to always use "CDATA" type (as the former did). "CDATA" was used in all cases but one, where an empty string was used. Change-Id: I1b3bfae40e29628e4094d9a6e58a69a66865874c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145526 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-06tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macrojsala
Also change some range based for. Change-Id: I32c5cbe0033c40cde3f1fc86ec8af90e558f2652 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141666 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-09-14libxml2: upgrade to release 2.10.2Michael Stahl
Fixes CVE-2022-2309 Change-Id: I180218be275d3b6d38f8f74aa51c57e50d2734ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139911 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-27clang-tidy modernize-pass-by-value in unoxmlNoel Grandin
Change-Id: Id0df30bed0de7db0564816180497406c55cf9fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136476 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-20Simplify checks with functions.Hannah Meeks
Change-Id: I55fbab5d8184a743ace3cfec884b0364536ee6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136088 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-10new loplugin:moveitNoel Grandin
look for local variables that can be std::move'd to parameters off by default, since it doesn't do proper data flow analysis Change-Id: I3403a0fcffd165bdea6a772528bc53995c5fdb40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-18Extend loplugin:redundantcast to trivial reinterpret_cast from T to itselfStephan Bergmann
Change-Id: I7c0be7b435d6b5f97bdd40484023584146638d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134506 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-05-07osl::Mutex->std::mutex in librdf_NamedGraphNoel Grandin
Change-Id: If28bef2bd44dc469e6534b166d4c25c0a7c3b2eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133968 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>