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
3908064e
Kaydet (Commit)
3908064e
authored
Nis 24, 2017
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify sdr::properties::ItemChangeBroadcaster
Change-Id: Ie731294b6490165cf208335e7ec404a35f8a6a95
üst
3be7c158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
41 deletions
+11
-41
itemsettools.hxx
svx/inc/sdr/properties/itemsettools.hxx
+8
-10
itemsettools.cxx
svx/source/sdr/properties/itemsettools.cxx
+3
-31
No files found.
svx/inc/sdr/properties/itemsettools.hxx
Dosyayı görüntüle @
3908064e
...
...
@@ -21,11 +21,11 @@
#define INCLUDED_SVX_INC_SDR_PROPERTIES_ITEMSETTOOLS_HXX
#include <sal/types.h>
#include <vcl/region.hxx>
#include <tools/gen.hxx>
#include <vector>
class
SdrObject
;
class
SfxItemSet
;
namespace
tools
{
class
Rectangle
;
}
class
Fraction
;
// class to remember broadcast start positions
...
...
@@ -35,21 +35,19 @@ namespace sdr
{
class
ItemChangeBroadcaster
{
bool
mbSingleRect
;
union
{
RectangleVector
*
mpRectangleVector
;
tools
::
Rectangle
*
mpRectangle
;
};
std
::
vector
<
tools
::
Rectangle
>
maRectangles
;
public
:
explicit
ItemChangeBroadcaster
(
const
SdrObject
&
rObj
);
~
ItemChangeBroadcaster
();
sal_uInt32
GetRectangleCount
()
const
{
return
mbSingleRect
?
1
:
mpRectangleVector
->
size
();
return
maRectangles
.
size
();
}
const
tools
::
Rectangle
&
GetRectangle
(
sal_uInt32
nIndex
)
const
{
return
maRectangles
[
nIndex
];
}
const
tools
::
Rectangle
&
GetRectangle
(
sal_uInt32
nIndex
)
const
;
};
}
// end of namespace properties
}
// end of namespace sdr
...
...
svx/source/sdr/properties/itemsettools.cxx
Dosyayı görüntüle @
3908064e
...
...
@@ -38,8 +38,7 @@ namespace sdr
if
(
const
SdrObjGroup
*
pGroupObj
=
dynamic_cast
<
const
SdrObjGroup
*>
(
&
rObj
))
{
SdrObjListIter
aIter
(
*
pGroupObj
,
SdrIterMode
::
DeepNoGroups
);
mpRectangleVector
=
new
RectangleVector
;
mpRectangleVector
->
reserve
(
aIter
.
Count
());
maRectangles
.
reserve
(
aIter
.
Count
());
while
(
aIter
.
IsMore
())
{
...
...
@@ -47,40 +46,13 @@ namespace sdr
if
(
pObj
)
{
m
pRectangleVector
->
push_back
(
pObj
->
GetLastBoundRect
());
m
aRectangles
.
push_back
(
pObj
->
GetLastBoundRect
());
}
}
mbSingleRect
=
false
;
}
else
{
mpRectangle
=
new
tools
::
Rectangle
(
rObj
.
GetLastBoundRect
());
mbSingleRect
=
true
;
}
}
ItemChangeBroadcaster
::~
ItemChangeBroadcaster
()
{
if
(
!
mbSingleRect
)
{
delete
mpRectangleVector
;
}
else
{
delete
mpRectangle
;
}
}
const
tools
::
Rectangle
&
ItemChangeBroadcaster
::
GetRectangle
(
sal_uInt32
nIndex
)
const
{
if
(
!
mbSingleRect
)
{
return
(
*
mpRectangleVector
)[
nIndex
];
}
else
{
return
*
mpRectangle
;
maRectangles
.
push_back
(
rObj
.
GetLastBoundRect
())
;
}
}
}
// end of namespace properties
...
...
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