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
cf74b7fb
Kaydet (Commit)
cf74b7fb
authored
Eki 15, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make it possible to avoid XShape/XShapes in the backend
Change-Id: I9aa4b71d12bb6720e2197dc1de6f06c61f27d6ee
üst
d821f5aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
DummyXShape.hxx
chart2/source/view/inc/DummyXShape.hxx
+4
-1
DummyXShape.cxx
chart2/source/view/main/DummyXShape.cxx
+22
-7
No files found.
chart2/source/view/inc/DummyXShape.hxx
Dosyayı görüntüle @
cf74b7fb
...
@@ -46,6 +46,7 @@ class DummyXShape : public cppu::WeakImplHelper6<
...
@@ -46,6 +46,7 @@ class DummyXShape : public cppu::WeakImplHelper6<
com
::
sun
::
star
::
lang
::
XServiceInfo
>
com
::
sun
::
star
::
lang
::
XServiceInfo
>
{
{
public
:
public
:
DummyXShape
();
// XNamed
// XNamed
virtual
OUString
SAL_CALL
getName
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
OUString
SAL_CALL
getName
(
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
...
@@ -105,6 +106,7 @@ private:
...
@@ -105,6 +106,7 @@ private:
com
::
sun
::
star
::
awt
::
Size
maSize
;
com
::
sun
::
star
::
awt
::
Size
maSize
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
mxParent
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XInterface
>
mxParent
;
DummyXShape
*
mpParent
;
};
};
...
@@ -141,7 +143,8 @@ public:
...
@@ -141,7 +143,8 @@ public:
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
getByIndex
(
sal_Int32
Index
)
throw
(
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Any
SAL_CALL
getByIndex
(
sal_Int32
Index
)
throw
(
::
com
::
sun
::
star
::
lang
::
IndexOutOfBoundsException
,
::
com
::
sun
::
star
::
lang
::
WrappedTargetException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
private
:
private
:
std
::
vector
<
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShape
>
>
maShapes
;
std
::
vector
<
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
drawing
::
XShape
>
>
maUNOShapes
;
std
::
vector
<
DummyXShape
*>
maShapes
;
};
};
}
}
...
...
chart2/source/view/main/DummyXShape.cxx
Dosyayı görüntüle @
cf74b7fb
...
@@ -18,6 +18,11 @@ namespace chart {
...
@@ -18,6 +18,11 @@ namespace chart {
namespace
dummy
{
namespace
dummy
{
DummyXShape
::
DummyXShape
()
:
mpParent
(
NULL
)
{
}
OUString
DummyXShape
::
getName
()
OUString
DummyXShape
::
getName
()
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
...
@@ -217,15 +222,25 @@ void DummyXShapes::release()
...
@@ -217,15 +222,25 @@ void DummyXShapes::release()
void
DummyXShapes
::
add
(
const
uno
::
Reference
<
drawing
::
XShape
>&
xShape
)
void
DummyXShapes
::
add
(
const
uno
::
Reference
<
drawing
::
XShape
>&
xShape
)
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
maShapes
.
push_back
(
xShape
);
DummyXShape
*
pChild
=
dynamic_cast
<
DummyXShape
*>
(
xShape
.
get
());
assert
(
pChild
);
maUNOShapes
.
push_back
(
xShape
);
pChild
->
setParent
(
static_cast
<
::
cppu
::
OWeakObject
*
>
(
this
));
maShapes
.
push_back
(
pChild
);
}
}
void
DummyXShapes
::
remove
(
const
uno
::
Reference
<
drawing
::
XShape
>&
xShape
)
void
DummyXShapes
::
remove
(
const
uno
::
Reference
<
drawing
::
XShape
>&
xShape
)
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
std
::
vector
<
uno
::
Reference
<
drawing
::
XShape
>
>::
iterator
itr
=
std
::
find
(
maShapes
.
begin
(),
maShapes
.
end
(),
xShape
);
std
::
vector
<
uno
::
Reference
<
drawing
::
XShape
>
>::
iterator
itr
=
std
::
find
(
maUNOShapes
.
begin
(),
maUNOShapes
.
end
(),
xShape
);
if
(
itr
!=
maShapes
.
end
())
maShapes
.
erase
(
itr
);
DummyXShape
*
pChild
=
dynamic_cast
<
DummyXShape
*>
((
*
itr
).
get
());
std
::
vector
<
DummyXShape
*
>::
iterator
itrShape
=
std
::
find
(
maShapes
.
begin
(),
maShapes
.
end
(),
pChild
);
if
(
itrShape
!=
maShapes
.
end
())
maShapes
.
erase
(
itrShape
);
if
(
itr
!=
maUNOShapes
.
end
())
maUNOShapes
.
erase
(
itr
);
}
}
uno
::
Type
DummyXShapes
::
getElementType
()
uno
::
Type
DummyXShapes
::
getElementType
()
...
@@ -237,13 +252,13 @@ uno::Type DummyXShapes::getElementType()
...
@@ -237,13 +252,13 @@ uno::Type DummyXShapes::getElementType()
sal_Bool
DummyXShapes
::
hasElements
()
sal_Bool
DummyXShapes
::
hasElements
()
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
return
!
maShapes
.
empty
();
return
!
ma
UNO
Shapes
.
empty
();
}
}
sal_Int32
DummyXShapes
::
getCount
()
sal_Int32
DummyXShapes
::
getCount
()
throw
(
uno
::
RuntimeException
)
throw
(
uno
::
RuntimeException
)
{
{
return
maShapes
.
size
();
return
ma
UNO
Shapes
.
size
();
}
}
uno
::
Any
DummyXShapes
::
getByIndex
(
sal_Int32
nIndex
)
uno
::
Any
DummyXShapes
::
getByIndex
(
sal_Int32
nIndex
)
...
@@ -251,7 +266,7 @@ uno::Any DummyXShapes::getByIndex(sal_Int32 nIndex)
...
@@ -251,7 +266,7 @@ uno::Any DummyXShapes::getByIndex(sal_Int32 nIndex)
uno
::
RuntimeException
)
uno
::
RuntimeException
)
{
{
uno
::
Any
aShape
;
uno
::
Any
aShape
;
aShape
<<=
maShapes
[
nIndex
];
aShape
<<=
ma
UNO
Shapes
[
nIndex
];
return
aShape
;
return
aShape
;
}
}
...
...
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