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
75b70f14
Kaydet (Commit)
75b70f14
authored
Ock 19, 2011
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xmlfix3: unoxml: XPath cleanup
üst
34da472b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
14 deletions
+13
-14
nodelist.hxx
unoxml/source/xpath/nodelist.hxx
+1
-0
xpathapi.cxx
unoxml/source/xpath/xpathapi.cxx
+8
-10
xpathobject.cxx
unoxml/source/xpath/xpathobject.cxx
+3
-3
xpathobject.hxx
unoxml/source/xpath/xpathobject.hxx
+1
-1
No files found.
unoxml/source/xpath/nodelist.hxx
Dosyayı görüntüle @
75b70f14
...
...
@@ -62,6 +62,7 @@ namespace XPath
/// #i115995# keep document alive
::
rtl
::
Reference
<
DOM
::
CDocument
>
const
m_pDocument
;
::
osl
::
Mutex
&
m_rMutex
;
/// retain the result set in case the CXPathObject is released
boost
::
shared_ptr
<
xmlXPathObject
>
m_pXPathObj
;
xmlNodeSetPtr
m_pNodeSet
;
...
...
unoxml/source/xpath/xpathapi.cxx
Dosyayı görüntüle @
75b70f14
...
...
@@ -353,9 +353,6 @@ namespace XPath
extensions
=
m_extensions
;
}
xmlXPathContextPtr
xpathCtx
;
xmlXPathObjectPtr
xpathObj
;
// get the node and document
::
rtl
::
Reference
<
DOM
::
CDocument
>
const
pCDoc
(
dynamic_cast
<
DOM
::
CDocument
*>
(
DOM
::
CNode
::
GetImplementation
(
...
...
@@ -383,8 +380,9 @@ namespace XPath
}
/* Create xpath evaluation context */
xpathCtx
=
xmlXPathNewContext
(
pDoc
);
if
(
xpathCtx
==
NULL
)
throw
XPathException
();
::
boost
::
shared_ptr
<
xmlXPathContext
>
const
xpathCtx
(
xmlXPathNewContext
(
pDoc
),
xmlXPathFreeContext
);
if
(
xpathCtx
==
NULL
)
{
throw
XPathException
();
}
// set context node
xpathCtx
->
node
=
pNode
;
...
...
@@ -393,18 +391,18 @@ namespace XPath
xmlSetGenericErrorFunc
(
NULL
,
generic_error_func
);
// register namespaces and extension
lcl_registerNamespaces
(
xpathCtx
,
nsmap
);
lcl_registerExtensions
(
xpathCtx
,
extensions
);
lcl_registerNamespaces
(
xpathCtx
.
get
()
,
nsmap
);
lcl_registerExtensions
(
xpathCtx
.
get
()
,
extensions
);
/* run the query */
OString
o1
=
OUStringToOString
(
expr
,
RTL_TEXTENCODING_UTF8
);
xmlChar
*
xStr
=
(
xmlChar
*
)
o1
.
getStr
();
if
((
xpathObj
=
xmlXPathEval
(
xStr
,
xpathCtx
))
==
NULL
)
{
::
boost
::
shared_ptr
<
xmlXPathObject
>
const
xpathObj
(
xmlXPathEval
(
xStr
,
xpathCtx
.
get
()),
xmlXPathFreeObject
);
if
(
0
==
xpathObj
)
{
// OSL_ENSURE(xpathCtx->lastError == NULL, xpathCtx->lastError->message);
xmlXPathFreeContext
(
xpathCtx
);
throw
XPathException
();
}
xmlXPathFreeContext
(
xpathCtx
);
Reference
<
XXPathObject
>
const
xObj
(
new
CXPathObject
(
pCDoc
,
pCDoc
->
GetMutex
(),
xpathObj
));
return
xObj
;
...
...
unoxml/source/xpath/xpathobject.cxx
Dosyayı görüntüle @
75b70f14
...
...
@@ -67,11 +67,11 @@ namespace XPath
CXPathObject
::
CXPathObject
(
::
rtl
::
Reference
<
DOM
::
CDocument
>
const
&
pDocument
,
::
osl
::
Mutex
&
rMutex
,
xmlXPathObjectPtr
const
xp
athObj
)
::
boost
::
shared_ptr
<
xmlXPathObject
>
const
&
pXP
athObj
)
:
m_pDocument
(
pDocument
)
,
m_rMutex
(
rMutex
)
,
m_pXPathObj
(
xpathObj
,
xmlXPathFreeObject
)
,
m_XPathObjectType
(
lcl_GetType
(
xpathObj
))
,
m_pXPathObj
(
pXPathObj
)
,
m_XPathObjectType
(
lcl_GetType
(
pXPathObj
.
get
()
))
{
}
...
...
unoxml/source/xpath/xpathobject.hxx
Dosyayı görüntüle @
75b70f14
...
...
@@ -66,7 +66,7 @@ namespace XPath
public
:
CXPathObject
(
::
rtl
::
Reference
<
DOM
::
CDocument
>
const
&
pDocument
,
::
osl
::
Mutex
&
rMutex
,
xmlXPathObjectPtr
const
xp
athObj
);
::
boost
::
shared_ptr
<
xmlXPathObject
>
const
&
pXP
athObj
);
/**
get object type
...
...
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