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
221dae68
Kaydet (Commit)
221dae68
authored
Tem 27, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Related: tdf#106872 factor out getting selected shapes
Change-Id: I765c482a41e9681a1eb145c1833cc94f35a27db3
üst
998e3d5c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
+30
-24
viewuno.cxx
sc/source/ui/unoobj/viewuno.cxx
+30
-24
No files found.
sc/source/ui/unoobj/viewuno.cxx
Dosyayı görüntüle @
221dae68
...
...
@@ -848,6 +848,34 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
return
bRet
;
}
namespace
{
uno
::
Reference
<
drawing
::
XShapes
>
getSelectedShapes
(
SdrView
&
rDrawView
)
{
uno
::
Reference
<
drawing
::
XShapes
>
xShapes
;
const
SdrMarkList
&
rMarkList
=
rDrawView
.
GetMarkedObjectList
();
const
size_t
nMarkCount
=
rMarkList
.
GetMarkCount
();
if
(
nMarkCount
)
{
// generate ShapeCollection (like in SdXImpressView::getSelection in Draw)
// XInterfaceRef will be returned and it has to be UsrObject-XInterface
xShapes
=
drawing
::
ShapeCollection
::
create
(
comphelper
::
getProcessComponentContext
());
for
(
size_t
i
=
0
;
i
<
nMarkCount
;
++
i
)
{
SdrObject
*
pDrawObj
=
rMarkList
.
GetMark
(
i
)
->
GetMarkedSdrObj
();
if
(
pDrawObj
)
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
pDrawObj
->
getUnoShape
(),
uno
::
UNO_QUERY
);
if
(
xShape
.
is
())
xShapes
->
add
(
xShape
);
}
}
}
return
xShapes
;
}
}
uno
::
Any
SAL_CALL
ScTabViewObj
::
getSelection
()
{
SolarMutexGuard
aGuard
;
...
...
@@ -856,34 +884,12 @@ uno::Any SAL_CALL ScTabViewObj::getSelection()
if
(
pViewSh
)
{
// is something selected in drawing layer?
SdrView
*
pDrawView
=
pViewSh
->
GetSdrView
();
if
(
pDrawView
)
{
const
SdrMarkList
&
rMarkList
=
pDrawView
->
GetMarkedObjectList
();
const
size_t
nMarkCount
=
rMarkList
.
GetMarkCount
();
if
(
nMarkCount
)
{
// generate ShapeCollection (like in SdXImpressView::getSelection in Draw)
// XInterfaceRef will be returned and it has to be UsrObject-XInterface
uno
::
Reference
<
drawing
::
XShapes
>
xShapes
=
drawing
::
ShapeCollection
::
create
(
comphelper
::
getProcessComponentContext
());
uno
::
Reference
<
uno
::
XInterface
>
xRet
(
xShapes
);
for
(
size_t
i
=
0
;
i
<
nMarkCount
;
++
i
)
{
SdrObject
*
pDrawObj
=
rMarkList
.
GetMark
(
i
)
->
GetMarkedSdrObj
();
if
(
pDrawObj
)
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
pDrawObj
->
getUnoShape
(),
uno
::
UNO_QUERY
);
if
(
xShape
.
is
())
xShapes
->
add
(
xShape
);
}
}
uno
::
Reference
<
uno
::
XInterface
>
xRet
(
getSelectedShapes
(
*
pDrawView
));
if
(
xRet
.
is
())
return
uno
::
makeAny
(
xRet
);
}
}
// otherwise sheet (cell) selection
...
...
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