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
764878de
Kaydet (Commit)
764878de
authored
Kas 29, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Highlight all its child entries when a recurring element is selected.
Change-Id: I5d91d702fa0b55d9a9a63ef66a5ce243943e77a3
üst
ec83990d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
xmlsourcedlg.hxx
sc/source/ui/inc/xmlsourcedlg.hxx
+3
-0
xmlsourcedlg.cxx
sc/source/ui/xmlsource/xmlsourcedlg.cxx
+49
-0
No files found.
sc/source/ui/inc/xmlsourcedlg.hxx
Dosyayı görüntüle @
764878de
...
...
@@ -19,6 +19,7 @@
#include "orcusxml.hxx"
#include <set>
#include <vector>
#include <boost/scoped_ptr.hpp>
class
ScDocument
;
...
...
@@ -55,6 +56,7 @@ class ScXMLSourceDlg : public ScAnyRefDlg
ScOrcusXMLTreeParam
maXMLParam
;
std
::
set
<
const
SvTreeListEntry
*>
maCellLinks
;
std
::
set
<
const
SvTreeListEntry
*>
maRangeLinks
;
std
::
vector
<
SvTreeListEntry
*>
maSelectedEntries
;
boost
::
scoped_ptr
<
ScOrcusXMLContext
>
mpXMLContext
;
...
...
@@ -88,6 +90,7 @@ private:
void
SetNonLinkable
();
void
SetSingleLinkable
();
void
SetRangeLinkable
();
void
SelectAllChildEntries
(
SvTreeListEntry
&
rEntry
);
/**
* Check if any of its parents is linked or repeated. The passed entry is
...
...
sc/source/ui/xmlsource/xmlsourcedlg.cxx
Dosyayı görüntüle @
764878de
...
...
@@ -21,6 +21,7 @@
#include "tools/urlobj.hxx"
#include "svtools/svlbitm.hxx"
#include "svtools/treelistentry.hxx"
#include "svtools/viewdataentry.hxx"
#include "sfx2/objsh.hxx"
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
...
...
@@ -236,12 +237,44 @@ void ScXMLSourceDlg::HandleLoseFocus(Control* /*pCtrl*/)
{
}
namespace
{
class
UnselectEntry
:
std
::
unary_function
<
SvTreeListEntry
*
,
void
>
{
SvTreeListBox
&
mrTree
;
const
SvTreeListEntry
*
mpCurrent
;
public
:
UnselectEntry
(
SvTreeListBox
&
rTree
,
const
SvTreeListEntry
*
pCur
)
:
mrTree
(
rTree
),
mpCurrent
(
pCur
)
{}
void
operator
()
(
SvTreeListEntry
*
p
)
{
if
(
p
==
mpCurrent
)
return
;
SvViewDataEntry
*
pView
=
mrTree
.
GetViewDataEntry
(
p
);
if
(
!
pView
)
return
;
pView
->
SetSelected
(
false
);
mrTree
.
PaintEntry
(
p
);
}
};
}
void
ScXMLSourceDlg
::
TreeItemSelected
()
{
SvTreeListEntry
*
pEntry
=
maLbTree
.
GetCurEntry
();
if
(
!
pEntry
)
return
;
if
(
!
maSelectedEntries
.
empty
())
{
// Unselect highlighted entries that are not currently selected.
std
::
for_each
(
maSelectedEntries
.
begin
(),
maSelectedEntries
.
end
(),
UnselectEntry
(
maLbTree
,
pEntry
));
maSelectedEntries
.
clear
();
}
ScOrcusXMLTreeParam
::
EntryData
*
pUserData
=
ScOrcusXMLTreeParam
::
getUserData
(
*
pEntry
);
OSL_ASSERT
(
pUserData
);
...
...
@@ -330,6 +363,7 @@ void ScXMLSourceDlg::RepeatElementSelected(SvTreeListEntry& rEntry)
return
;
}
SelectAllChildEntries
(
rEntry
);
SetRangeLinkable
();
}
...
...
@@ -381,6 +415,21 @@ void ScXMLSourceDlg::SetRangeLinkable()
maRefBtn
.
Enable
();
}
void
ScXMLSourceDlg
::
SelectAllChildEntries
(
SvTreeListEntry
&
rEntry
)
{
SvTreeListEntries
&
rChildren
=
rEntry
.
GetChildEntries
();
SvTreeListEntries
::
iterator
it
=
rChildren
.
begin
(),
itEnd
=
rChildren
.
end
();
for
(;
it
!=
itEnd
;
++
it
)
{
SvTreeListEntry
&
r
=
*
it
;
SelectAllChildEntries
(
r
);
// select recursively.
SvViewDataEntry
*
p
=
maLbTree
.
GetViewDataEntry
(
&
r
);
p
->
SetSelected
(
true
);
maLbTree
.
PaintEntry
(
&
r
);
maSelectedEntries
.
push_back
(
&
r
);
}
}
bool
ScXMLSourceDlg
::
IsParentDirty
(
SvTreeListEntry
*
pEntry
)
const
{
ScOrcusXMLTreeParam
::
EntryData
*
pUserData
=
NULL
;
...
...
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