summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-04-10 21:35:20 +0000
committerRüdiger Timm <rt@openoffice.org>2008-04-10 21:35:20 +0000
commit4334f8bfe59d011ab3110a9d9029072839c15b90 (patch)
treee66a28fce72f190a65888c07fafe83d79e23a836 /sd/source/ui/toolpanel
parent0342a07bf0714fcf2db9482a45045ebde513c9ab (diff)
INTEGRATION: CWS changefileheader (1.2.452); FILE MERGED
2008/03/31 13:59:02 rt 1.2.452.1: #i87441# Change license header to LPGL v3.
Diffstat (limited to 'sd/source/ui/toolpanel')
-rw-r--r--sd/source/ui/toolpanel/controls/DocumentHelper.hxx41
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx41
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx41
3 files changed, 54 insertions, 69 deletions
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
index 07e97321a9ec..b998529e241a 100644
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
@@ -1,35 +1,30 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile: DocumentHelper.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision: 1.3 $
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author: kz $ $Date: 2008-04-03 14:49:11 $
+ * $RCSfile: DocumentHelper.hxx,v $
+ * $Revision: 1.4 $
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
*
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
*
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
*
************************************************************************/
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
index 9820bf5dd8a6..f4681c02b5a5 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
@@ -1,35 +1,30 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile: MasterPageContainerFiller.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision: 1.2 $
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author: kz $ $Date: 2006-04-26 20:49:19 $
+ * $RCSfile: MasterPageContainerFiller.hxx,v $
+ * $Revision: 1.3 $
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
*
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
*
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
*
************************************************************************/
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
index 1234e13dbcdf..8134fe6aa6a4 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
@@ -1,35 +1,30 @@
/*************************************************************************
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * $RCSfile: MasterPageDescriptor.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
*
- * $Revision: 1.2 $
+ * OpenOffice.org - a multi-platform office productivity suite
*
- * last change: $Author: kz $ $Date: 2006-04-26 20:50:23 $
+ * $RCSfile: MasterPageDescriptor.hxx,v $
+ * $Revision: 1.3 $
*
- * The Contents of this file are made available subject to
- * the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
*
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
*
- * GNU Lesser General Public License Version 2.1
- * =============================================
- * Copyright 2005 by Sun Microsystems, Inc.
- * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
*
************************************************************************/
k::CloseDispatcher::LinkStubimpl_asyncCallback(void * instance, LinkParamNone * data) Line 245 C++ > vcllo.dll!Link<LinkParamNone *,void>::Call(LinkParamNone * data) Line 111 C++ > vcllo.dll!vcl::EventPoster::DoEvent_Impl(void * __formal) Line 53 C++ > vcllo.dll!vcl::EventPoster::LinkStubDoEvent_Impl(void * instance, void * data) Line 48 C++ > vcllo.dll!Link<void *,void>::Call(void * data) Line 111 C++ > vcllo.dll!ImplHandleUserEvent(ImplSVEvent * pSVEvent) Line 2232 C++ > vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2800 C++ > vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 308 C++ > vclplug_winlo.dll!ImplHandleUserEvent(HWND__ * hWnd, __int64 lParam) Line 4214 C++ > vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5865 C++ > vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 5972 C++ > user32.dll!UserCallWinProcCheckWow() Unknown > user32.dll!DispatchMessageWorker() Unknown > vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 475 C++ > vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 506 C++ > vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581 C++ > vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 474 C++ > vcllo.dll!Application::Yield() Line 559 C++ > vcllo.dll!Application::Execute() Line 452 C++ > sofficeapp.dll!desktop::Desktop::Main() Line 1600 C++ > vcllo.dll!ImplSVMain() Line 202 C++ > vcllo.dll!SVMain() Line 235 C++ > sofficeapp.dll!soffice_main() Line 94 C++ > soffice.bin!sal_main() Line 51 C > soffice.bin!main(int argc, char * * argv) Line 49 C Firing the event when we already set the id to mean "revoked" seems wrong. Also use the correct type for the id. Change-Id: Ie2e180c0c8c112023f789968ffa785f046de9d76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135058 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2022-05-03Just use Any ctor instead of makeAny in svxStephan Bergmann Change-Id: I59b1b3f817a9028f132456ea5094f38f88674d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2022-03-18a11y: Drop vcl::unohelper::NotifyAccessibleStateEventGloballyMichael Weghorn As mentioned in Change-Id I4681c28c9d18cf1953be5127765f4aa94563662d ("chart a11y: Drop bSendGlobally param from AccessibleBase::BroadcastAccEvent"), calling it has no effect, the `fireFocusGained` and `fireFocusLost` methods of the `XExtendedToolkit` interface in its only implementation in `VCLXToolkit` do nothing, so just drop it. Change-Id: Ie9352a4e4021d7bf0b35de71f55afc660795b906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131736 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2021-10-10loplugin:moveparam in editengNoel Grandin Change-Id: I08aed09b0acd283d700bdf75f650e93dba7c7b85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-10-04loplugin:constmethodNoel Grandin Change-Id: I56af10be5f1155db4c7f2190495fe036a9b4236a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-09-20clean up ambiguous confusing rectangle APIs like IsInside()Luboš Luňák Reading 'rectA.IsInside( rectB )' kind of suggests that the code checks whether 'rectA is inside rectB', but it's actually the other way around. Rename IsInside() -> Contains(), IsOver() -> Overlaps(), which should make it clear which way the logic goes. Change-Id: I9347450fe7dc34c96df6d636a4e3e660de1801ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122271 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins 2021-09-08svx: try to avoid crash in AccessibleEditableTextParaMichael Stahl There is an out-of-bounds access to a non-existant editengine paragraph: warn:legacy.tools:40400:40400:editeng/source/editeng/editdoc.cxx:1136: Index out of range in Adjust(2) warn:legacy.tools:40400:40400:editeng/source/editeng/editeng.cxx:1984: Paragraph not found: GetWindowPosTopLeft /usr/include/c++/11/debug/vector:438: Error: attempt to subscript container with out-of-bounds index 1, but container only holds 1 elements. 4 ParaPortionList::operator[](int) (this=0x6270d38, nPos=1) at editeng/source/editeng/editdoc.cxx:722 5 ImpEditEngine::CalcParaWidth(int, bool) (this=0x6270ca0, nPara=1, bIgnoreExtraSpace=true) at editeng/source/editeng/impedit2.cxx:3307 6 EditEngine::GetParaBounds(int) (this=0x6264a00, nPara=1) at editeng/source/editeng/editeng.cxx:646 7 Outliner::GetParaBounds(int) const (this=0x30fb510, nParagraph=1) at editeng/source/outliner/outlin2.cxx:414 8 SvxOutlinerForwarder::GetParaBounds(int) const (this=0x3424710, nPara=1) at editeng/source/uno/unoforou.cxx:326 9 SvxAccessibleTextAdapter::GetParaBounds(int) const (this=0x73d7d30, nPara=1) at editeng/source/uno/unoedprx.cxx:757 10 accessibility::AccessibleEditableTextPara::getBounds() (this=0x27c45c0) at editeng/source/accessibility/AccessibleEditableTextPara.cxx:1050 11 accessibility::AccessibleTextHelper_Impl::UpdateBoundRect() (this=0x73d7c90) at svx/source/accessibility/AccessibleTextHelper.cxx:799 12 accessibility::AccessibleTextHelper::UpdateChildren() (this=0x2ae5eb0) at svx/source/accessibility/AccessibleTextHelper.cxx:1658 13 accessibility::AccessibleShape::notifyShapeEvent(com::sun::star::document::EventObject const&) (this=0x73d7690, rEventObject=...) at svx/source/accessibility/AccessibleShape.cxx:926 14 SfxBaseModel::notifyEvent(com::sun::star::document::EventObject const&) const (this=0x2eb1b80, aEvent=...) at sfx2/source/doc/sfxbasemodel.cxx:3341 15 SdXImpressDocument::Notify(SfxBroadcaster&, SfxHint const&) (this=0x2eb1b80, rBC=..., rHint=...) at sd/source/ui/unoidl/unomodel.cxx:408 16 SfxBroadcaster::Broadcast(SfxHint const&) (this=0x2e6f120, rHint=...) at svl/source/notify/SfxBroadcaster.cxx:39 17 SdrObject::BroadcastObjectChange() const (this=0x30fb190) at svx/source/svdraw/svdobj.cxx:1028 18 SdrUndoObjSetText::Undo() (this=0x732acb0) at svx/source/svdraw/svdundo.cxx:1050 19 sd::UndoObjectSetText::Undo() (this=0x732acb0) at sd/source/core/undo/undoobjects.cxx:204 This was replaced when GetTextForwarder() apparently replaced the editengine object or something along those lines: 5 ParaPortionList::Insert(int, ParaPortion&&) (this=0x6270d38, nPos=0, p=...) at editeng/source/editeng/editdoc.cxx:740 6 ImpEditEngine::InitDoc(bool) (this=0x6270ca0, bKeepParaAttribs=true) at editeng/source/editeng/impedit2.cxx:241 7 ImpEditEngine::RemoveText() (this=0x6270ca0) at editeng/source/editeng/impedit2.cxx:678 8 ImpEditEngine::SetText(rtl::OUString const&) (this=0x6270ca0, rText="") at editeng/source/editeng/impedit2.cxx:694 9 ImpEditEngine::SetText(EditTextObject const&) (this=0x6270ca0, rTextObject=...) at editeng/source/editeng/impedit4.cxx:1139 10 EditEngine::SetText(EditTextObject const&) (this=0x6264a00, rTextObject=...) at editeng/source/editeng/editeng.cxx:1535 11 Outliner::SetText(OutlinerParaObject const&) (this=0x30fb510, rPObj=...) at editeng/source/outliner/outliner.cxx:568 12 SvxTextEditSourceImpl::GetBackgroundTextForwarder() (this=0x73d7990) at svx/source/unodraw/unoshtxt.cxx:553 13 SvxTextEditSourceImpl::GetTextForwarder() (this=0x73d7990) at svx/source/unodraw/unoshtxt.cxx:658 14 SvxTextEditSource::GetTextForwarder() (this=0x73c9580) at svx/source/unodraw/unoshtxt.cxx:936 15 SvxEditSourceAdapter::GetTextForwarderAdapter() (this=0x73d7d20) at editeng/source/uno/unoedprx.cxx:324 16 SvxEditSourceAdapter::GetTextForwarder() (this=0x73d7d20) at editeng/source/uno/unoedprx.cxx:339 17 accessibility::AccessibleTextHelper_Impl::GetTextForwarder() const (this=0x73d7c90) at svx/source/accessibility/AccessibleTextHelper.cxx:265 18 accessibility::AccessibleTextHelper_Impl::UpdateVisibleChildren(bool) (this=0x73d7c90, bBroadcastEvents=true) at svx/source/accessibility/AccessibleTextHelper.cxx:750 19 accessibility::AccessibleTextHelper::UpdateChildren() (this=0x2ae5eb0) at svx/source/accessibility/AccessibleTextHelper.cxx:1657 20 accessibility::AccessibleShape::notifyShapeEvent(com::sun::star::document::EventObject const&) (this=0x73d7690, rEventObject=...) at svx/source/accessibility/AccessibleShape.cxx:926 21 SfxBaseModel::notifyEvent(com::sun::star::document::EventObject const&) const (this=0x2eb1b80, aEvent=...) at sfx2/source/doc/sfxbasemodel.cxx:3341 22 SdXImpressDocument::Notify(SfxBroadcaster&, SfxHint const&) (this=0x2eb1b80, rBC=..., rHint=...) at sd/source/ui/unoidl/unomodel.cxx:408 23 SfxBroadcaster::Broadcast(SfxHint const&) (this=0x2e6f120, rHint=...) at svl/source/notify/SfxBroadcaster.cxx:39 24 SdrObject::BroadcastObjectChange() const (this=0x30fb190) at svx/source/svdraw/svdobj.cxx:1028 25 SdrUndoObjSetText::Undo() (this=0x732acb0) at svx/source/svdraw/svdundo.cxx:1050 So try to update the number of paragraphs when GetTextForwarder() was called. Change-Id: I5c0712cdf0c01d2aa0e8cd929ba51aaf1c710123 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121789 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> 2021-08-03Consolidate on C++17 std::scoped_lock instead of std::lock_guardNoel Grandin as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-07-20osl::Mutex->std::mutex in AccessibleTextHelper_ImplNoel Grandin Change-Id: I263295c817a188d1d499a8c92eb7f6f7be64ea79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119284 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-07-07tdf#132740 avoid some WeakReference cost in accessibilityNoel Grandin reduces time by 20% for me Change-Id: Ife78248fd36099298eb2401b362f16a1ae3c0434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118534 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2021-02-15loplugin:referencecasting in svxNoel Change-Id: I072ba9da976cefd61f4a916e70b0601439e8a123 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110818 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-11-16Instead of labs, use overloaded absStephan Bergmann ...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2020-08-06loplugin:flatten in svx/accessibilityNoel Grandin Change-Id: Id2c82625fc5cf0d139ea77489578bfce7abc3fa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100206 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-01-17tdf#42949 Fix IWYU warnings in svx/source/[a-e]*/*cxx and svx/qa/Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I68110cdc5cff99a3bc15184c04ae309412511f9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 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> 2019-09-03loplugin:constmethod in svxNoel Grandin Change-Id: I6ae7c04479e3ea8ecd7535c33224a5e7095b64bb Reviewed-on: https://gerrit.libreoffice.org/78396 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-08-23tdf#119388 only enqueue events we actually processNoel Grandin shaves 10% of the time off, deleting columns Change-Id: Id992572419a3c9a5693d37d7c5e5fe2da955bb23 Reviewed-on: https://gerrit.libreoffice.org/78029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2019-05-10tdf#62699 Drop pass-through header file include/svx/svdattr.hxxGabor Kelemen Change-Id: I04289589196ac69b31f75989d9252c79d03c890f Reviewed-on: https://gerrit.libreoffice.org/71633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2019-04-27tdf#42949 Fix IWYU warnings in include/svx/[a-D]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I9770343f31f882427c9ae13e363b59cd1fb47e98 Reviewed-on: https://gerrit.libreoffice.org/71295 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> 2019-04-25Convert remaining SdrHint to static_castXisco Fauli follow-up of 10c934147d469965dba6abc78efd02759a010b8e Change-Id: I2085173dffd71dbbc68a0574400bebe132626dd9 Reviewed-on: https://gerrit.libreoffice.org/71284 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> 2019-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> 2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-09-17New loplugin:externalStephan Bergmann ...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> 2018-09-11loplugin:simplifyconstruct in svtools..svxNoel Grandin Change-Id: Ia20fac7cec01ac658a903f8b001807b2e72dbf3e Reviewed-on: https://gerrit.libreoffice.org/60316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-09-04tdf#118967 Batch all a11y notificationsPaul Trojahn Currently all a11y notifications get send out immediately, which often ends up formatting the document before it is ready. With the current EnterBlockNotifications()/LeaveBlockNotifications() system it is difficult to find all places that need blocking and any change in the a11y code might require additional blocking in unpredictable places. By queueing all notifications by default and only sending them out when the document is ready, we can make sure that it can't be corrupted. Change-Id: I9599c7b57eb5b8f8f0575de57fcc8bab171f78ff Reviewed-on: https://gerrit.libreoffice.org/58703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-08-02Add 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 stoc to svx Change-Id: If562b1aa1d676d2c1cf513e953238abbb846c65c Reviewed-on: https://gerrit.libreoffice.org/58224 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> 2018-05-25improve some loggingNoel Grandin if we're going to write "unhandled" messages, at least what is being unhandled Change-Id: I570183c92876d553f4344b979def653cbd5bb55d Reviewed-on: https://gerrit.libreoffice.org/54793 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-05-02tdf#117205 impress crash when moving an item in a listNoel Grandin regression from commit 891e41fac81fbd8d5cdb277b26639abfd25a7143 (patch) dead code in AccessibleTextHelper_Impl::UpdateVisibleChildren Change-Id: I0db104fcde91597dc71b6cae6c547a0cedac4af2 Reviewed-on: https://gerrit.libreoffice.org/53721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-04-04dead code in AccessibleTextHelper_Impl::UpdateVisibleChildrenNoel Grandin ever since commit 60f11adb950e4f9645cc9ecb0f5af8235cc97366 Date: Wed Nov 27 13:03:45 2013 +0000 Integrate branch of IAccessible2 Change-Id: Ie175277badc07cf79eadbeef5a75857b914876d9 Reviewed-on: https://gerrit.libreoffice.org/52370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2018-01-28Remove redundant checksStephan Bergmann ...that date back to a909acb7009acadffa53e74ea05ddb88803490f1 "#98735# Refactored unoedit/unoedacc.cxx", before SvxTextForwarder::GetParaBounds was changed from sal_uInt16 to sal_Int32 with 2af1f5691e8d64afd5246d245d7876b5a2cd5cd8 "resolved fdo#35756 import more than 64k HTML table cells" Change-Id: Ia92dcf1fb6742779e5fd51ed3ba8f0db565f8965 Reviewed-on: https://gerrit.libreoffice.org/48715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>