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
ee4f3509
Kaydet (Commit)
ee4f3509
authored
Nis 28, 2016
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use unique_ptr
Change-Id: I55ff9ae568a0d44c8ee8be922adf40e12038e436
üst
a084962e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
undoback.cxx
sd/source/ui/func/undoback.cxx
+4
-9
undoback.hxx
sd/source/ui/inc/undoback.hxx
+2
-2
No files found.
sd/source/ui/func/undoback.cxx
Dosyayı görüntüle @
ee4f3509
...
...
@@ -18,6 +18,7 @@
*/
#include "undoback.hxx"
#include "sdpage.hxx"
#include "sdresid.hxx"
#include "strings.hrc"
...
...
@@ -36,7 +37,7 @@ SdBackgroundObjUndoAction::SdBackgroundObjUndoAction(
const
SfxItemSet
&
rItemSet
)
:
SdUndoAction
(
&
rDoc
),
mrPage
(
rPage
),
mpItemSet
(
new
SfxItemSet
(
rItemSet
)),
mpItemSet
(
o3tl
::
make_unique
<
SfxItemSet
>
(
rItemSet
)),
mbHasFillBitmap
(
false
)
{
OUString
aString
(
SdResId
(
STR_UNDO_CHANGE_PAGEFORMAT
)
);
...
...
@@ -44,22 +45,16 @@ SdBackgroundObjUndoAction::SdBackgroundObjUndoAction(
saveFillBitmap
(
*
mpItemSet
);
}
SdBackgroundObjUndoAction
::~
SdBackgroundObjUndoAction
()
{
delete
mpItemSet
;
}
void
SdBackgroundObjUndoAction
::
ImplRestoreBackgroundObj
()
{
SfxItemSet
*
pNew
=
new
SfxItemSet
(
mrPage
.
getSdrPageProperties
().
GetItemSet
());
std
::
unique_ptr
<
SfxItemSet
>
pNew
=
o3tl
::
make_unique
<
SfxItemSet
>
(
mrPage
.
getSdrPageProperties
().
GetItemSet
());
mrPage
.
getSdrPageProperties
().
ClearItem
();
if
(
bool
(
mpFillBitmapItem
))
restoreFillBitmap
(
*
mpItemSet
);
mpFillBitmapItem
.
reset
();
mbHasFillBitmap
=
false
;
mrPage
.
getSdrPageProperties
().
PutItemSet
(
*
mpItemSet
);
delete
mpItemSet
;
mpItemSet
=
pNew
;
mpItemSet
=
std
::
move
(
pNew
);
saveFillBitmap
(
*
mpItemSet
);
// tell the page that it's visualization has changed
...
...
sd/source/ui/inc/undoback.hxx
Dosyayı görüntüle @
ee4f3509
...
...
@@ -21,6 +21,7 @@
#define INCLUDED_SD_SOURCE_UI_INC_UNDOBACK_HXX
#include <memory>
#include "sdundo.hxx"
class
SdDrawDocument
;
...
...
@@ -34,7 +35,7 @@ class SdBackgroundObjUndoAction : public SdUndoAction
private
:
SdPage
&
mrPage
;
SfxItemSet
*
mpItemSet
;
std
::
unique_ptr
<
SfxItemSet
>
mpItemSet
;
std
::
unique_ptr
<
SfxPoolItem
>
mpFillBitmapItem
;
bool
mbHasFillBitmap
;
...
...
@@ -49,7 +50,6 @@ public:
SdDrawDocument
&
rDoc
,
SdPage
&
rPage
,
const
SfxItemSet
&
rItemSet
);
virtual
~
SdBackgroundObjUndoAction
();
virtual
void
Undo
()
override
;
virtual
void
Redo
()
override
;
...
...
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