summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-25 11:50:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-26 08:10:52 +0100
commit398bbde8231e77bd4106c09c34839f0f16f2f7ee (patch)
tree195bbc38e3d96eef620a6a50e33d0ea15a47d0a3
parentloplugin:datamembershadow in SmartHdl (diff)
downloadcore-398bbde8231e77bd4106c09c34839f0f16f2f7ee.tar.gz
core-398bbde8231e77bd4106c09c34839f0f16f2f7ee.zip
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>
-rw-r--r--include/svx/sdr/contact/objectcontactofobjlistpainter.hxx2
-rw-r--r--include/svx/sdr/table/tablecontroller.hxx2
-rw-r--r--include/svx/svdedxv.hxx3
-rw-r--r--include/svx/svdobj.hxx2
-rw-r--r--include/svx/svdoutl.hxx2
-rw-r--r--include/svx/svdpage.hxx2
-rw-r--r--sd/inc/Outliner.hxx2
-rw-r--r--sd/inc/OutlinerIterator.hxx4
-rw-r--r--sd/inc/undo/undoobjects.hxx24
-rw-r--r--sd/source/core/stlfamily.cxx2
-rw-r--r--sd/source/ui/inc/OutlinerIteratorImpl.hxx4
-rw-r--r--sd/source/ui/inc/futext.hxx3
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx6
-rw-r--r--sd/source/ui/view/sdview.cxx2
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx2
-rw-r--r--svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx2
-rw-r--r--svx/source/sdr/contact/objectcontactofobjlistpainter.cxx2
-rw-r--r--svx/source/svdraw/svdpage.cxx10
-rw-r--r--svx/source/table/tableundo.cxx2
-rw-r--r--svx/source/table/tableundo.hxx6
-rw-r--r--svx/source/unodraw/gluepts.cxx2
21 files changed, 42 insertions, 44 deletions
diff --git a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
index 380e927ca568..7390f30b08a7 100644
--- a/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
+++ b/include/svx/sdr/contact/objectcontactofobjlistpainter.hxx
@@ -90,7 +90,7 @@ protected:
ObjectContact& mrOriginalObjectContact;
// Set StartPoint for next run, also given in constructor
- SdrPageWeakRef mxStartPage;
+ tools::WeakReference<SdrPage> mxStartPage;
// Hierarchy access methods
virtual sal_uInt32 GetPaintObjectCount() const override;
diff --git a/include/svx/sdr/table/tablecontroller.hxx b/include/svx/sdr/table/tablecontroller.hxx
index 79730758b419..d621d87d2fd0 100644
--- a/include/svx/sdr/table/tablecontroller.hxx
+++ b/include/svx/sdr/table/tablecontroller.hxx
@@ -176,7 +176,7 @@ private:
sdr::overlay::OverlayObjectList* mpSelectionOverlay;
SdrView* mpView;
- SdrObjectWeakRef mxTableObj;
+ tools::WeakReference<SdrObject> mxTableObj;
SdrModel* mpModel;
css::uno::Reference< css::util::XModifyListener > mxModifyListener;
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index b55385e77d17..20f61dff15af 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -74,7 +74,8 @@ class SVX_DLLPUBLIC SdrObjEditView: public SdrGlueEditView, public EditViewCallb
protected:
// TextEdit
- SdrObjectWeakRef mxTextEditObj; // current object in TextEdit
+ tools::WeakReference<SdrObject>
+ mxTextEditObj; // current object in TextEdit
SdrPageView* pTextEditPV;
SdrOutliner* pTextEditOutliner; // outliner for the TextEdit
OutlinerView* pTextEditOutlinerView; // current view of the outliners
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 265ec9b96c72..25ab2c824e14 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -1003,8 +1003,6 @@ private:
SdrObjFactory() = delete;
};
-typedef tools::WeakReference< SdrObject > SdrObjectWeakRef;
-
template< typename T > T* SdrObject::CloneHelper() const
{
OSL_ASSERT( typeid( T ) == typeid( *this ));
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 5d1f9e842593..b13cd4b0ab6f 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -30,7 +30,7 @@ class SdrPage;
class SVX_DLLPUBLIC SdrOutliner : public Outliner
{
protected:
- SdrObjectWeakRef mpTextObj;
+ tools::WeakReference<SdrObject> mpTextObj;
const SdrPage* mpVisualizedPage;
public:
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 0952a9335ac3..7f9917bacb29 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -512,8 +512,6 @@ private:
void impl_setModelForLayerAdmin(SdrModel* pNewModel);
};
-typedef tools::WeakReference< SdrPage > SdrPageWeakRef;
-
#endif // INCLUDED_SVX_SVDPAGE_HXX
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
diff --git a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
index 393c235af00c..4658aca12515 100644
--- a/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
+++ b/svx/inc/sdr/primitive2d/sdrolecontentprimitive2d.hxx
@@ -37,7 +37,7 @@ namespace drawinglayer
class SdrOleContentPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- SdrObjectWeakRef mpSdrOle2Obj;
+ tools::WeakReference<SdrObject> mpSdrOle2Obj;
basegfx::B2DHomMatrix maObjectTransform;
// #i104867# The GraphicVersion number to identify in operator== if
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
index ee202580b252..71ab1bb83a10 100644
--- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -179,7 +179,7 @@ void ObjectContactOfPagePainter::SetStartPage(const SdrPage* pPage)
{
if(pPage != GetStartPage())
{
- mxStartPage.reset(const_cast< SdrPage* >(pPage)); // no SdrPageWeakRef available to hold a const SdrPage*
+ mxStartPage.reset(const_cast< SdrPage* >(pPage)); // no tools::WeakReference<SdrPage> available to hold a const SdrPage*
}
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 527c17f7b609..2251699472eb 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -59,11 +59,11 @@
using namespace ::com::sun::star;
class SdrObjList::WeakSdrObjectContainerType
- : public ::std::vector<SdrObjectWeakRef>
+ : public ::std::vector<tools::WeakReference<SdrObject>>
{
public:
explicit WeakSdrObjectContainerType (const sal_Int32 nInitialSize)
- : ::std::vector<SdrObjectWeakRef>(nInitialSize) {};
+ : ::std::vector<tools::WeakReference<SdrObject>>(nInitialSize) {};
};
@@ -758,7 +758,7 @@ void SdrObjList::SetObjectNavigationPosition (
OSL_ASSERT(mxNavigationOrder.get()!=nullptr);
OSL_ASSERT( mxNavigationOrder->size() == maList.size());
- SdrObjectWeakRef aReference (&rObject);
+ tools::WeakReference<SdrObject> aReference (&rObject);
// Look up the object whose navigation position is to be changed.
WeakSdrObjectContainerType::iterator iObject (::std::find(
@@ -919,7 +919,7 @@ void SdrObjList::ReplaceObjectInContainer (
// not transferred to the new object so erase the former and append
// the later object from/to the navigation order.
OSL_ASSERT(nObjectPosition < maList.size());
- SdrObjectWeakRef aReference (maList[nObjectPosition]);
+ tools::WeakReference<SdrObject> aReference (maList[nObjectPosition]);
WeakSdrObjectContainerType::iterator iObject (::std::find(
mxNavigationOrder->begin(),
mxNavigationOrder->end(),
@@ -949,7 +949,7 @@ void SdrObjList::RemoveObjectFromContainer (
// Update the navigation positions.
if (HasObjectNavigationOrder())
{
- SdrObjectWeakRef aReference (maList[nObjectPosition]);
+ tools::WeakReference<SdrObject> aReference (maList[nObjectPosition]);
WeakSdrObjectContainerType::iterator iObject (::std::find(
mxNavigationOrder->begin(),
mxNavigationOrder->end(),
diff --git a/svx/source/table/tableundo.cxx b/svx/source/table/tableundo.cxx
index 6a8573d81556..27c93bd4b158 100644
--- a/svx/source/table/tableundo.cxx
+++ b/svx/source/table/tableundo.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star::table;
namespace sdr { namespace table {
-CellUndo::CellUndo( const SdrObjectWeakRef& xObjRef, const CellRef& xCell )
+CellUndo::CellUndo( const tools::WeakReference<SdrObject>& xObjRef, const CellRef& xCell )
: SdrUndoAction( *xCell->GetModel() )
, mxObjRef( xObjRef )
, mxCell( xCell )
diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx
index e8077a0bceaf..dda6c8b57e91 100644
--- a/svx/source/table/tableundo.hxx
+++ b/svx/source/table/tableundo.hxx
@@ -42,7 +42,7 @@ namespace sdr { namespace table {
class CellUndo : public SdrUndoAction, public sdr::ObjectUser
{
public:
- CellUndo( const SdrObjectWeakRef& xObjRef, const CellRef& xCell );
+ CellUndo( const tools::WeakReference<SdrObject>& xObjRef, const CellRef& xCell );
virtual ~CellUndo() override;
virtual void Undo() override;
@@ -80,7 +80,7 @@ private:
void setDataToCell( const Data& rData );
void getDataFromCell( Data& rData );
- SdrObjectWeakRef mxObjRef;
+ tools::WeakReference<SdrObject> mxObjRef;
CellRef mxCell;
Data maUndoData;
Data maRedoData;
@@ -237,7 +237,7 @@ public:
virtual void Redo() override;
private:
- SdrObjectWeakRef mxObjRef;
+ tools::WeakReference<SdrObject> mxObjRef;
struct Data
{
diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx
index e934b3e8bf89..42882aa0f1e1 100644
--- a/svx/source/unodraw/gluepts.cxx
+++ b/svx/source/unodraw/gluepts.cxx
@@ -39,7 +39,7 @@ const sal_uInt16 NON_USER_DEFINED_GLUE_POINTS = 4;
class SvxUnoGluePointAccess : public WeakImplHelper< container::XIndexContainer, container::XIdentifierContainer >
{
private:
- SdrObjectWeakRef mpObject;
+ tools::WeakReference<SdrObject> mpObject;
public:
explicit SvxUnoGluePointAccess( SdrObject* pObject ) throw();