diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-21 16:00:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-22 12:27:55 +0100 |
commit | 27352b81638f2f1e792ab48ec532eaacf6f61718 (patch) | |
tree | eb744c30643272b219d59f2782ffc96f62bf379c /sw | |
parent | 6ccdd0d164b16da9a13ab5d8290a1a0f041caaf7 (diff) |
Add XWeak constructor and operator= to uno::WeakReference
which is faster since we can skip the UNO_QUERY.
Change-Id: Id95ad9f3568213e974bd13659d92d4ea94dbfbd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130282
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/fldbas.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtfld.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtftn.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtrfmrk.hxx | 5 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 2 | ||||
-rw-r--r-- | sw/inc/section.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tox.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/bookmark.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/txtnode/atrfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/undobj1.cxx | 1 |
10 files changed, 10 insertions, 17 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 880fcf1186c0..42beefb1b5e8 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -24,6 +24,7 @@ #include "calbck.hxx" #include "nodeoffset.hxx" +#include <com/sun/star/beans/XPropertySet.hpp> #include <cppuhelper/weakref.hxx> #include <editeng/svxenum.hxx> #include <tools/solar.h> @@ -38,7 +39,6 @@ class SwRootFrame; class SvNumberFormatter; class IDocumentRedlineAccess; class SwGetRefField; -namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::uno { class Any; } typedef struct _xmlTextWriter* xmlTextWriterPtr; diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx index 32a81303c3eb..5687eaa2ec4d 100644 --- a/sw/inc/fmtfld.hxx +++ b/sw/inc/fmtfld.hxx @@ -23,6 +23,7 @@ #include <cppuhelper/weakref.hxx> #include <svl/poolitem.hxx> #include <svl/SfxBroadcaster.hxx> +#include <com/sun/star/text/XTextField.hpp> #include "swdllapi.h" #include "calbck.hxx" @@ -36,7 +37,6 @@ class SwFieldType; class SwDDETable; class SwFormatField; class IDocumentRedlineAccess; -namespace com::sun::star::text { class XTextField; } namespace sw { struct FindFormatForFieldHint final : SfxHint { diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index d6f80da2ee66..4b2635f6bc90 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -22,12 +22,12 @@ #include <rtl/ustring.hxx> #include <cppuhelper/weakref.hxx> #include <svl/poolitem.hxx> +#include <com/sun/star/text/XFootnote.hpp> #include "swdllapi.h" #include "calbck.hxx" namespace com::sun::star::text { - class XFootnote; class XTextRange; } diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx index 698e084ab939..8b28494f9e20 100644 --- a/sw/inc/fmtrfmrk.hxx +++ b/sw/inc/fmtrfmrk.hxx @@ -22,13 +22,10 @@ #include <rtl/ustring.hxx> #include <cppuhelper/weakref.hxx> #include <svl/poolitem.hxx> +#include <com/sun/star/text/XTextContent.hpp> #include "calbck.hxx" -namespace com::sun::star { - namespace text { class XTextContent; } -} - class SwTextRefMark; // ATT_REFMARK diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index c77e062d80cd..1320cb23b9bc 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -19,6 +19,7 @@ #pragma once #include <cppuhelper/weakref.hxx> +#include <com/sun/star/text/XTextContent.hpp> #include "swdllapi.h" #include "IDocumentContentOperations.hxx" @@ -70,7 +71,6 @@ namespace com::sun::star { namespace uno { template < class > class Sequence; } - namespace text { class XTextContent; } } typedef o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList; diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 4350048f9700..2ead8c7c6e7d 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -21,6 +21,7 @@ #define INCLUDED_SW_INC_SECTION_HXX #include <com/sun/star/uno/Sequence.h> +#include <com/sun/star/text/XTextSection.hpp> #include <tools/ref.hxx> #include <svl/hint.hxx> @@ -31,9 +32,6 @@ #include "frmfmt.hxx" #include <vector> -namespace com::sun::star { - namespace text { class XTextSection; } -} class SwSectionFormat; class SwDoc; class SwSection; diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx index 1c2f12a899f6..2e0c94b61e40 100644 --- a/sw/inc/tox.hxx +++ b/sw/inc/tox.hxx @@ -29,15 +29,13 @@ #include <sal/log.hxx> #include <svl/listener.hxx> #include <svl/poolitem.hxx> +#include <com/sun/star/text/XDocumentIndexMark.hpp> #include "calbck.hxx" #include "hints.hxx" #include "swtypes.hxx" #include "toxe.hxx" -namespace com::sun::star { - namespace text { class XDocumentIndexMark; } -} class SwTOXType; class SwTOXMark; class SwTextTOXMark; diff --git a/sw/source/core/inc/bookmark.hxx b/sw/source/core/inc/bookmark.hxx index 2c5cfacfcd28..a9c807063f4f 100644 --- a/sw/source/core/inc/bookmark.hxx +++ b/sw/source/core/inc/bookmark.hxx @@ -24,6 +24,7 @@ #include <vcl/keycod.hxx> #include <memory> #include <string_view> +#include <com/sun/star/text/XTextContent.hpp> #include <rtl/ustring.hxx> #include <osl/diagnose.h> @@ -32,8 +33,6 @@ #include <swrect.hxx> #include "FormFieldButton.hxx" -namespace com::sun::star::text { class XTextContent; } - class SwDoc; class SwEditWin; class SwServerObject; diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 079c8a4b1226..d6fab571bbe9 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -293,7 +293,7 @@ void SwFormatField::UpdateTextNode(const SfxPoolItem* pOld, const SfxPoolItem* p { if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which())) { // invalidate cached UNO object - m_wXTextField = nullptr; + m_wXTextField.clear(); // ??? why does this Modify method not already do this? CallSwClientNotify(sw::LegacyModifyHint(pOld, pNew)); return; diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index fa88f6179442..8265ac6e6617 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -40,6 +40,7 @@ #include <ndole.hxx> #include <frameformats.hxx> #include <svx/svdobj.hxx> +#include <svx/unoshape.hxx> SwUndoFlyBase::SwUndoFlyBase( SwFrameFormat* pFormat, SwUndoId nUndoId ) : SwUndo(nUndoId, pFormat->GetDoc()) |