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
d9eec8f0
Kaydet (Commit)
d9eec8f0
authored
Agu 22, 2012
tarafından
Bence Babati
Kaydeden (comit)
Andras Timar
Agu 22, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
embed extension's help tree into main help tree
Change-Id: Iddb3c542f50078b13c7d420b528aa704a5cb0767
üst
e47fe5cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
7 deletions
+80
-7
tvread.cxx
xmlhelp/source/treeview/tvread.cxx
+76
-7
tvread.hxx
xmlhelp/source/treeview/tvread.hxx
+4
-0
No files found.
xmlhelp/source/treeview/tvread.cxx
Dosyayı görüntüle @
d9eec8f0
...
@@ -75,6 +75,13 @@ namespace treeview {
...
@@ -75,6 +75,13 @@ namespace treeview {
return
children
.
back
();
return
children
.
back
();
}
}
TVDom
*
newChild
(
TVDom
*
p
)
{
children
.
push_back
(
p
);
p
->
parent
=
this
;
return
children
.
back
();
}
TVDom
*
getParent
()
const
TVDom
*
getParent
()
const
{
{
...
@@ -485,8 +492,6 @@ extern "C" void data_handler( void *userData,
...
@@ -485,8 +492,6 @@ extern "C" void data_handler( void *userData,
(
*
tvDom
)
->
setTitle
(
s
,
len
);
(
*
tvDom
)
->
setTitle
(
s
,
len
);
}
}
TVChildTarget
::
TVChildTarget
(
const
ConfigData
&
configData
,
TVDom
*
tvDom
)
TVChildTarget
::
TVChildTarget
(
const
ConfigData
&
configData
,
TVDom
*
tvDom
)
{
{
Elements
.
resize
(
tvDom
->
children
.
size
()
);
Elements
.
resize
(
tvDom
->
children
.
size
()
);
...
@@ -494,10 +499,6 @@ TVChildTarget::TVChildTarget( const ConfigData& configData,TVDom* tvDom )
...
@@ -494,10 +499,6 @@ TVChildTarget::TVChildTarget( const ConfigData& configData,TVDom* tvDom )
Elements
[
i
]
=
new
TVRead
(
configData
,
tvDom
->
children
[
i
]
);
Elements
[
i
]
=
new
TVRead
(
configData
,
tvDom
->
children
[
i
]
);
}
}
TVChildTarget
::
TVChildTarget
(
const
Reference
<
XMultiServiceFactory
>&
xMSF
)
TVChildTarget
::
TVChildTarget
(
const
Reference
<
XMultiServiceFactory
>&
xMSF
)
{
{
ConfigData
configData
=
init
(
xMSF
);
ConfigData
configData
=
init
(
xMSF
);
...
@@ -534,8 +535,9 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
...
@@ -534,8 +535,9 @@ TVChildTarget::TVChildTarget( const Reference< XMultiServiceFactory >& xMSF )
XML_ParserFree
(
parser
);
XML_ParserFree
(
parser
);
delete
[]
s
;
delete
[]
s
;
}
Check
(
pTVDom
);
}
// now TVDom holds the relevant information
// now TVDom holds the relevant information
Elements
.
resize
(
tvDom
.
children
.
size
()
);
Elements
.
resize
(
tvDom
.
children
.
size
()
);
...
@@ -548,7 +550,74 @@ TVChildTarget::~TVChildTarget()
...
@@ -548,7 +550,74 @@ TVChildTarget::~TVChildTarget()
{
{
}
}
void
TVChildTarget
::
Check
(
TVDom
*
tvDom
)
{
unsigned
i
=
0
;
bool
h
=
false
;
while
((
i
<
tvDom
->
children
.
size
()
-
1
)
&&
(
!
h
))
{
if
(((
tvDom
->
children
[
i
])
->
application
==
(
tvDom
->
children
[
tvDom
->
children
.
size
()
-
1
])
->
application
)
&&
((
tvDom
->
children
[
i
])
->
id
==
(
tvDom
->
children
[
tvDom
->
children
.
size
()
-
1
])
->
id
))
{
TVDom
*
p
=
tvDom
->
children
[
tvDom
->
children
.
size
()
-
1
];
for
(
unsigned
k
=
0
;
k
<
p
->
children
.
size
();
++
k
)
if
(
!
SearchAndInsert
(
p
->
children
[
k
],
tvDom
->
children
[
i
]))
tvDom
->
children
[
i
]
->
newChild
(
p
->
children
[
k
]);
tvDom
->
children
.
pop_back
();
h
=
true
;
}
++
i
;
}
}
bool
TVChildTarget
::
SearchAndInsert
(
TVDom
*
p
,
TVDom
*
tvDom
)
{
if
(
p
->
isLeaf
())
return
false
;
bool
h
=
false
;
sal_Int32
max
=
0
;
std
::
vector
<
TVDom
*
>::
iterator
max_It
,
i
;
max_It
=
tvDom
->
children
.
begin
();
sal_Int32
c_int
;
sal_Int32
p_int
=
p
->
id
.
toInt32
();
////////////////////////////////check this level in the tree
for
(
i
=
tvDom
->
children
.
begin
();
i
!=
tvDom
->
children
.
end
();
++
i
)
if
(
!
((
*
i
)
->
isLeaf
())
&&
((
*
i
)
->
id
.
getLength
()
==
p
->
id
.
getLength
())
&&
(
p
->
id
.
replaceAt
((
*
i
)
->
parent
->
id
.
getLength
(),
p
->
id
.
getLength
()
-
(
*
i
)
->
parent
->
id
.
getLength
(),
OUString
(
""
))
==
(
*
i
)
->
parent
->
id
))
//prefix check
{
h
=
true
;
c_int
=
(
*
i
)
->
id
.
toInt32
();
if
(
p_int
==
c_int
)
{
(
*
(
tvDom
->
children
.
insert
(
i
+
1
,
p
)))
->
parent
=
tvDom
;
return
true
;
}
else
if
(
c_int
>
max
&&
c_int
<
p_int
)
{
max
=
c_int
;
max_It
=
i
+
1
;
}
}
////////////////////////////////recursive call if necessary
if
(
h
)
(
*
(
tvDom
->
children
.
insert
(
max_It
,
p
)))
->
parent
=
tvDom
;
else
{
i
=
tvDom
->
children
.
begin
();
while
((
i
!=
tvDom
->
children
.
end
())
&&
(
!
h
))
{
h
=
SearchAndInsert
(
p
,
*
i
);
++
i
;
}
}
return
h
;
}
Any
SAL_CALL
Any
SAL_CALL
TVChildTarget
::
getByName
(
const
rtl
::
OUString
&
aName
)
TVChildTarget
::
getByName
(
const
rtl
::
OUString
&
aName
)
...
...
xmlhelp/source/treeview/tvread.hxx
Dosyayı görüntüle @
d9eec8f0
...
@@ -319,6 +319,10 @@ namespace treeview {
...
@@ -319,6 +319,10 @@ namespace treeview {
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xMSgr
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xMSgr
,
rtl
::
OUString
&
instpath
)
const
;
rtl
::
OUString
&
instpath
)
const
;
bool
SearchAndInsert
(
TVDom
*
p
,
TVDom
*
tvDom
);
void
Check
(
TVDom
*
tvDom
);
};
// end class TVChildTarget
};
// end class TVChildTarget
...
...
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