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
06ebc79a
Kaydet (Commit)
06ebc79a
authored
Ock 19, 2011
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlfix3: unoxml: replace CNode XUnoTunnel implementation with something sane
üst
dde336f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
11 deletions
+54
-11
node.cxx
unoxml/source/dom/node.cxx
+50
-9
node.hxx
unoxml/source/dom/node.hxx
+4
-2
No files found.
unoxml/source/dom/node.cxx
Dosyayı görüntüle @
06ebc79a
...
...
@@ -25,9 +25,21 @@
*
************************************************************************/
#include <node.hxx>
#include <stdio.h>
#include <string.h>
#include "node.hxx"
#include <algorithm>
#include <boost/bind.hpp>
#include <rtl/uuid.h>
#include <rtl/instance.hxx>
#include <osl/mutex.hxx>
#include <com/sun/star/xml/sax/FastToken.hpp>
#include "element.hxx"
#include "text.hxx"
#include "cdatasection.hxx"
...
...
@@ -42,18 +54,28 @@
#include "childlist.hxx"
#include "attr.hxx"
#include <com/sun/star/xml/sax/FastToken.hpp>
#include "rtl/instance.hxx"
#include "osl/mutex.hxx"
#include "../events/eventdispatcher.hxx"
#include "../events/mutationevent.hxx"
#include <boost/bind.hpp>
#include <algorithm>
using
namespace
::
com
::
sun
::
star
;
namespace
{
//see CNode::remove
struct
NodeMutex
:
public
::
rtl
::
Static
<
osl
::
Mutex
,
NodeMutex
>
{};
struct
UnoTunnelId
:
public
::
rtl
::
StaticWithInit
<
Sequence
<
sal_Int8
>
,
UnoTunnelId
>
{
Sequence
<
sal_Int8
>
operator
()
()
{
Sequence
<
sal_Int8
>
ret
(
16
);
rtl_createUuid
(
reinterpret_cast
<
sal_uInt8
*>
(
ret
.
getArray
()),
0
,
sal_True
);
return
ret
;
}
};
}
namespace
DOM
...
...
@@ -269,7 +291,7 @@ namespace DOM
xmlNodePtr
CNode
::
getNodePtr
(
const
Reference
<
XNode
>&
aNode
)
{
try
{
CNode
*
pNode
=
dynamic_cast
<
CNode
*>
(
aNode
.
get
()
);
CNode
*
const
pNode
=
GetImplementation
(
aNode
);
if
(
pNode
)
return
pNode
->
m_aNodePtr
;
}
...
...
@@ -308,6 +330,17 @@ namespace DOM
invalidate
();
}
CNode
*
CNode
::
GetImplementation
(
uno
::
Reference
<
uno
::
XInterface
>
const
&
xNode
)
{
uno
::
Reference
<
lang
::
XUnoTunnel
>
const
xUnoTunnel
(
xNode
,
UNO_QUERY
);
if
(
!
xUnoTunnel
.
is
())
{
return
0
;
}
CNode
*
const
pCNode
(
reinterpret_cast
<
CNode
*
>
(
::
sal
::
static_int_cast
<
sal_IntPtr
>
(
xUnoTunnel
->
getSomething
(
UnoTunnelId
::
get
()))));
return
pCNode
;
}
::
rtl
::
Reference
<
CDocument
>
CNode
::
GetOwnerDocument_Impl
()
{
if
(
0
==
m_aNodePtr
)
{
...
...
@@ -1044,10 +1077,18 @@ namespace DOM
return
sal_True
;
}
::
sal_Int64
SAL_CALL
CNode
::
getSomething
(
const
Sequence
<
::
sal_Int8
>&
/*aIdentifier*/
)
::
sal_Int64
SAL_CALL
CNode
::
getSomething
(
Sequence
<
::
sal_Int8
>
const
&
rId
)
throw
(
RuntimeException
)
{
return
sal
::
static_int_cast
<
sal_Int64
>
(
reinterpret_cast
<
sal_IntPtr
>
(
m_aNodePtr
));
if
((
rId
.
getLength
()
==
16
)
&&
(
0
==
rtl_compareMemory
(
UnoTunnelId
::
get
().
getConstArray
(),
rId
.
getConstArray
(),
16
)))
{
return
::
sal
::
static_int_cast
<
sal_Int64
>
(
reinterpret_cast
<
sal_IntPtr
>
(
this
)
);
}
return
0
;
}
}
unoxml/source/dom/node.hxx
Dosyayı görüntüle @
06ebc79a
...
...
@@ -156,7 +156,8 @@ namespace DOM
// get the libxml node implementation
static
xmlNodePtr
getNodePtr
(
const
Reference
<
XNode
>&
aNode
);
//static Sequence< sal_Int8 >
static
CNode
*
GetImplementation
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
const
&
xNode
);
// recursively create SAX events
virtual
void
SAL_CALL
saxify
(
...
...
@@ -346,7 +347,8 @@ namespace DOM
throw
(
RuntimeException
,
EventException
);
// --- XUnoTunnel
virtual
::
sal_Int64
SAL_CALL
getSomething
(
const
Sequence
<
::
sal_Int8
>&
aIdentifier
)
virtual
::
sal_Int64
SAL_CALL
getSomething
(
Sequence
<
::
sal_Int8
>
const
&
rId
)
throw
(
RuntimeException
);
};
...
...
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