Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
115054fe
Kaydet (Commit)
115054fe
authored
Şub 13, 2013
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#34548 don't crash on undoing text frame removal
Change-Id: I48b95c6c0cbfb2f4c4b09cc90b254b96de40b3e9
üst
31649661
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletion
+70
-1
svdundo.hxx
svx/inc/svx/svdundo.hxx
+9
-0
svdundo.cxx
svx/source/svdraw/svdundo.cxx
+61
-1
No files found.
svx/inc/svx/svdundo.hxx
Dosyayı görüntüle @
115054fe
...
@@ -253,6 +253,10 @@ public:
...
@@ -253,6 +253,10 @@ public:
//************************************************************
//************************************************************
class
SVX_DLLPUBLIC
SdrUndoObjList
:
public
SdrUndoObj
{
class
SVX_DLLPUBLIC
SdrUndoObjList
:
public
SdrUndoObj
{
class
ObjListListener
;
friend
class
ObjListListener
;
private
:
bool
bOwner
;
bool
bOwner
;
protected
:
protected
:
...
@@ -262,6 +266,7 @@ protected:
...
@@ -262,6 +266,7 @@ protected:
sal_uInt32
nOrdNum
;
sal_uInt32
nOrdNum
;
// Bei einem Undo/Redo findet moeglicherweise Uebereignung des Objektes
// Bei einem Undo/Redo findet moeglicherweise Uebereignung des Objektes
// statt. Im Dtor wird das Obj deleted, wenn bOwner==TRUE
// statt. Im Dtor wird das Obj deleted, wenn bOwner==TRUE
ObjListListener
*
m_pListener
;
protected
:
protected
:
SdrUndoObjList
(
SdrObject
&
rNewObj
,
bool
bOrdNumDirect
=
false
);
SdrUndoObjList
(
SdrObject
&
rNewObj
,
bool
bOrdNumDirect
=
false
);
...
@@ -270,6 +275,10 @@ protected:
...
@@ -270,6 +275,10 @@ protected:
void
SetView
(
SdrView
*
pView1
,
SdrPageView
*
pPageView1
)
{
pView
=
pView1
;
pPageView
=
pPageView1
;
}
void
SetView
(
SdrView
*
pView1
,
SdrPageView
*
pPageView1
)
{
pView
=
pView1
;
pPageView
=
pPageView1
;
}
bool
IsOwner
()
{
return
bOwner
;
}
bool
IsOwner
()
{
return
bOwner
;
}
void
SetOwner
(
bool
bNew
);
void
SetOwner
(
bool
bNew
);
private
:
sal_uInt32
GetOrdNum
()
const
;
void
SetOrdNum
(
sal_uInt32
nOrdNum_
);
};
};
//************************************************************
//************************************************************
...
...
svx/source/svdraw/svdundo.cxx
Dosyayı görüntüle @
115054fe
...
@@ -18,6 +18,8 @@
...
@@ -18,6 +18,8 @@
*/
*/
#include <svl/lstner.hxx>
#include <svx/svdundo.hxx>
#include <svx/svdundo.hxx>
#include "svx/svditext.hxx"
#include "svx/svditext.hxx"
#include <svx/svdotext.hxx>
#include <svx/svdotext.hxx>
...
@@ -655,11 +657,55 @@ OUString SdrUndoGeoObj::GetComment() const
...
@@ -655,11 +657,55 @@ OUString SdrUndoGeoObj::GetComment() const
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
class
SdrUndoObjList
::
ObjListListener
:
public
SfxListener
{
public
:
ObjListListener
(
SdrUndoObjList
&
rThat
,
SdrObject
&
rObject
,
SfxBroadcaster
&
rBroadcaster
);
~
ObjListListener
();
private
:
virtual
void
Notify
(
SfxBroadcaster
&
rBroadcaster
,
const
SfxHint
&
rHint
);
private
:
SdrUndoObjList
&
m_rThat
;
SdrObject
&
m_rObject
;
SfxBroadcaster
*
m_pBroadcaster
;
};
SdrUndoObjList
::
ObjListListener
::
ObjListListener
(
SdrUndoObjList
&
rThat
,
SdrObject
&
rObject
,
SfxBroadcaster
&
rBroadcaster
)
:
m_rThat
(
rThat
)
,
m_rObject
(
rObject
)
,
m_pBroadcaster
(
&
rBroadcaster
)
{
StartListening
(
*
m_pBroadcaster
);
}
SdrUndoObjList
::
ObjListListener
::~
ObjListListener
()
{
if
(
m_pBroadcaster
)
EndListening
(
*
m_pBroadcaster
);
}
void
SdrUndoObjList
::
ObjListListener
::
Notify
(
SfxBroadcaster
&
,
const
SfxHint
&
rHint
)
{
const
SdrHint
*
const
pSdrHint
(
dynamic_cast
<
const
SdrHint
*>
(
&
rHint
));
if
(
pSdrHint
)
{
if
((
pSdrHint
->
GetObject
()
==
&
m_rObject
)
&&
(
pSdrHint
->
GetKind
()
==
HINT_OBJCHG
))
{
const
sal_uInt32
nNewOrdNum
(
m_rObject
.
GetOrdNum
());
if
(
nNewOrdNum
!=
m_rThat
.
GetOrdNum
())
m_rThat
.
SetOrdNum
(
nNewOrdNum
);
}
}
}
SdrUndoObjList
::
SdrUndoObjList
(
SdrObject
&
rNewObj
,
bool
bOrdNumDirect
)
SdrUndoObjList
::
SdrUndoObjList
(
SdrObject
&
rNewObj
,
bool
bOrdNumDirect
)
:
SdrUndoObj
(
rNewObj
),
:
SdrUndoObj
(
rNewObj
),
bOwner
(
sal_False
),
bOwner
(
sal_False
),
pView
(
NULL
),
pView
(
NULL
),
pPageView
(
NULL
)
pPageView
(
NULL
),
m_pListener
(
NULL
)
{
{
pObjList
=
pObj
->
GetObjList
();
pObjList
=
pObj
->
GetObjList
();
if
(
bOrdNumDirect
)
{
if
(
bOrdNumDirect
)
{
...
@@ -667,10 +713,14 @@ SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect)
...
@@ -667,10 +713,14 @@ SdrUndoObjList::SdrUndoObjList(SdrObject& rNewObj, bool bOrdNumDirect)
}
else
{
}
else
{
nOrdNum
=
pObj
->
GetOrdNum
();
nOrdNum
=
pObj
->
GetOrdNum
();
}
}
m_pListener
=
new
ObjListListener
(
*
this
,
*
pObj
,
*
pObjList
->
GetModel
());
}
}
SdrUndoObjList
::~
SdrUndoObjList
()
SdrUndoObjList
::~
SdrUndoObjList
()
{
{
delete
m_pListener
;
if
(
pObj
!=
NULL
&&
IsOwner
())
if
(
pObj
!=
NULL
&&
IsOwner
())
{
{
// Attribute have to go back to the regular Pool
// Attribute have to go back to the regular Pool
...
@@ -686,6 +736,16 @@ void SdrUndoObjList::SetOwner(bool bNew)
...
@@ -686,6 +736,16 @@ void SdrUndoObjList::SetOwner(bool bNew)
bOwner
=
bNew
;
bOwner
=
bNew
;
}
}
sal_uInt32
SdrUndoObjList
::
GetOrdNum
()
const
{
return
nOrdNum
;
}
void
SdrUndoObjList
::
SetOrdNum
(
sal_uInt32
nOrdNum_
)
{
nOrdNum
=
nOrdNum_
;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
void
SdrUndoRemoveObj
::
Undo
()
void
SdrUndoRemoveObj
::
Undo
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment