diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-25 11:50:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 08:10:52 +0100 |
commit | 398bbde8231e77bd4106c09c34839f0f16f2f7ee (patch) | |
tree | 195bbc38e3d96eef620a6a50e33d0ea15a47d0a3 /sd | |
parent | c7e2b4ff70c751541167fea7adacaf2556b43312 (diff) |
expand out SdrObjectWeakRef and SdrPageWeakRef typedefs
Change-Id: Icacc7354df4a927533e6fec072cdd527e4c57b96
Reviewed-on: https://gerrit.libreoffice.org/48566
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/Outliner.hxx | 2 | ||||
-rw-r--r-- | sd/inc/OutlinerIterator.hxx | 4 | ||||
-rw-r--r-- | sd/inc/undo/undoobjects.hxx | 24 | ||||
-rw-r--r-- | sd/source/core/stlfamily.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlinerIteratorImpl.hxx | 4 | ||||
-rw-r--r-- | sd/source/ui/inc/futext.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/OutlinerIterator.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 2 |
9 files changed, 25 insertions, 24 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 917639125d0f..3ce1454a07f9 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -260,7 +260,7 @@ private: selection. This copy is necessary because during the search process the mark list is modified. */ - ::std::vector<SdrObjectWeakRef> maMarkListCopy; + ::std::vector<tools::WeakReference<SdrObject>> maMarkListCopy; /** Current object that may be a text object. The object pointer to corresponds to <member>mnObjIndex</member>. While iterating over the diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx index 8271916d8b0a..38899e763709 100644 --- a/sd/inc/OutlinerIterator.hxx +++ b/sd/inc/OutlinerIterator.hxx @@ -224,7 +224,7 @@ private: This specifies at which object the iterator points initially. */ static Iterator CreateSelectionIterator ( - const ::std::vector<SdrObjectWeakRef>& rObjectList, + const ::std::vector<::tools::WeakReference<SdrObject>>& rObjectList, SdDrawDocument* pDocument, const std::shared_ptr<ViewShell>& rpViewShell, bool bDirectionIsForward, @@ -297,7 +297,7 @@ public: bool operator== (const IteratorPosition& aPosition) const; /// Pointer to the actual <type>SdrObject</type> object. - SdrObjectWeakRef mxObject; + ::tools::WeakReference<SdrObject> mxObject; /// Number of the actual SdrText from the current <type>SdrObject</type> sal_Int32 mnText; diff --git a/sd/inc/undo/undoobjects.hxx b/sd/inc/undo/undoobjects.hxx index 964b0776caaa..bd3f05d99b1a 100644 --- a/sd/inc/undo/undoobjects.hxx +++ b/sd/inc/undo/undoobjects.hxx @@ -56,7 +56,7 @@ public: virtual void Redo() override; private: - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrObject> mxSdrObject; }; class UndoDeleteObject : public SdrUndoDelObj, public UndoRemovePresObjectImpl @@ -68,7 +68,7 @@ public: virtual void Redo() override; private: - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrObject> mxSdrObject; }; class UndoReplaceObject : public SdrUndoReplaceObj, public UndoRemovePresObjectImpl @@ -80,7 +80,7 @@ public: virtual void Redo() override; private: - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrObject> mxSdrObject; }; class UndoObjectSetText : public SdrUndoObjSetText @@ -95,7 +95,7 @@ public: private: std::unique_ptr<SfxUndoAction> mpUndoAnimation; bool mbNewEmptyPresObj; - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrObject> mxSdrObject; }; // Undo for SdrObject::SetUserCall() @@ -111,7 +111,7 @@ public: private: SdrObjUserCall* mpOldUserCall; SdrObjUserCall* mpNewUserCall; - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrObject> mxSdrObject; }; // Undo for SdPage::InsertPresObj() and SdPage::RemovePresObj() @@ -127,8 +127,8 @@ public: private: PresObjKind meOldKind; PresObjKind meNewKind; - SdrPageWeakRef mxPage; - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrPage> mxPage; + ::tools::WeakReference<SdrObject> mxSdrObject; }; // Restores correct position and size for presentation shapes with user call @@ -143,7 +143,7 @@ public: virtual void Redo() override; private: - SdrPageWeakRef mxPage; + ::tools::WeakReference<SdrPage> mxPage; }; class UndoGeoObject final : public SdrUndoGeoObj @@ -155,8 +155,8 @@ public: virtual void Redo() override; private: - SdrPageWeakRef mxPage; - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrPage> mxPage; + ::tools::WeakReference<SdrObject> mxSdrObject; }; class UndoAttrObject final : public SdrUndoAttrObj @@ -168,8 +168,8 @@ public: virtual void Redo() override; private: - SdrPageWeakRef mxPage; - SdrObjectWeakRef mxSdrObject; + ::tools::WeakReference<SdrPage> mxPage; + ::tools::WeakReference<SdrObject> mxSdrObject; }; } // namespace sd diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index b08444ac27d4..0903816ae6ef 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -49,7 +49,7 @@ typedef std::map< OUString, rtl::Reference< SdStyleSheet > > PresStyleMap; struct SdStyleFamilyImpl { - SdrPageWeakRef mxMasterPage; + tools::WeakReference<SdrPage> mxMasterPage; OUString maLayoutName; PresStyleMap& getStyleSheets(); diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx index 82d9432e79db..c0f1d757657d 100644 --- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx +++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx @@ -130,7 +130,7 @@ class SelectionIteratorImpl { public: SelectionIteratorImpl ( - const ::std::vector< SdrObjectWeakRef >& rObjectList, + const ::std::vector< tools::WeakReference<SdrObject> >& rObjectList, sal_Int32 nObjectIndex, SdDrawDocument* pDocument, const std::weak_ptr<ViewShell>& rpViewShellWeak, @@ -144,7 +144,7 @@ public: virtual bool operator== (const IteratorImplBase& rIterator) const override; private: - const ::std::vector<SdrObjectWeakRef>& mrObjectList; + const ::std::vector<tools::WeakReference<SdrObject>>& mrObjectList; sal_Int32 mnObjectIndex; /** Compare the given iterator with this object. This method handles diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx index b19c6a18644b..42c02b22d153 100644 --- a/sd/source/ui/inc/futext.hxx +++ b/sd/source/ui/inc/futext.hxx @@ -81,7 +81,8 @@ protected: private: virtual void disposing() override; - SdrObjectWeakRef mxTextObj; + ::tools::WeakReference<SdrObject> + mxTextObj; bool bFirstObjCreated; bool bJustEndedEdit; diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index aee6712c4446..c9cc081b7e3a 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -172,7 +172,7 @@ Iterator OutlinerContainer::CreateIterator (IteratorLocation aLocation) } Iterator OutlinerContainer::CreateSelectionIterator ( - const ::std::vector<SdrObjectWeakRef>& rObjectList, + const ::std::vector<::tools::WeakReference<SdrObject>>& rObjectList, SdDrawDocument* pDocument, const std::shared_ptr<ViewShell>& rpViewShell, bool bDirectionIsForward, @@ -416,7 +416,7 @@ void IteratorImplBase::Reverse() //===== SelectionIteratorImpl =========================================== SelectionIteratorImpl::SelectionIteratorImpl ( - const ::std::vector<SdrObjectWeakRef>& rObjectList, + const ::std::vector<::tools::WeakReference<SdrObject>>& rObjectList, sal_Int32 nObjectIndex, SdDrawDocument* pDocument, const std::weak_ptr<ViewShell>& rpViewShellWeak, @@ -682,7 +682,7 @@ void ViewIteratorImpl::Reverse() mpObjectIterator = nullptr; // Move iterator to the current object. - SdrObjectWeakRef xObject = maPosition.mxObject; + ::tools::WeakReference<SdrObject> xObject = maPosition.mxObject; maPosition.mxObject.reset(nullptr); if (!mpObjectIterator) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index f8412e84496b..92d7358b088d 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -761,7 +761,7 @@ SdrEndTextEditKind View::SdrEndTextEdit(bool bDontDeleteReally) { maMasterViewFilter.End(); - SdrObjectWeakRef xObj( GetTextEditObject() ); + ::tools::WeakReference<SdrObject> xObj( GetTextEditObject() ); bool bDefaultTextRestored = RestoreDefaultText( dynamic_cast< SdrTextObj* >( GetTextEditObject() ) ); diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index c1cec7013f47..77467193d60c 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -130,7 +130,7 @@ protected: virtual void addCustomHandles( SdrHdlList& rHandlerList ) override; private: - SdrObjectWeakRef mxPlaceholderObj; + ::tools::WeakReference<SdrObject> mxPlaceholderObj; }; class ImageButtonHdl : public SmartHdl |