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
f53517a5
Kaydet (Commit)
f53517a5
authored
Ock 30, 2013
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46808, convert xml::xpath::XPathAPI to new-style service
Change-Id: I54bb0eb08d687e7d54c42601c826c580a7a17ebb
üst
fa3c9a90
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
23 additions
and
64 deletions
+23
-64
dp_descriptioninfoset.cxx
desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+2
-8
dp_backenddb.cxx
desktop/source/deployment/registry/dp_backenddb.cxx
+3
-11
oo3extensionmigration.cxx
desktop/source/migration/services/oo3extensionmigration.cxx
+2
-5
updateprotocol.cxx
extensions/source/update/check/updateprotocol.cxx
+2
-4
updatefeed.cxx
extensions/source/update/feed/updatefeed.cxx
+2
-10
computedexpression.cxx
forms/source/xforms/computedexpression.cxx
+3
-5
UnoApi_offapi.mk
offapi/UnoApi_offapi.mk
+3
-1
XPathAPI.idl
offapi/com/sun/star/xml/xpath/XPathAPI.idl
+1
-4
SfxDocumentMetaData.cxx
sfx2/source/doc/SfxDocumentMetaData.cxx
+2
-10
xmlmetai.cxx
xmloff/source/meta/xmlmetai.cxx
+3
-6
No files found.
desktop/source/deployment/misc/dp_descriptioninfoset.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -43,7 +43,7 @@
#include "com/sun/star/xml/dom/XNode.hpp"
#include "com/sun/star/xml/dom/XNodeList.hpp"
#include "com/sun/star/xml/dom/DocumentBuilder.hpp"
#include "com/sun/star/xml/xpath/X
X
PathAPI.hpp"
#include "com/sun/star/xml/xpath/XPathAPI.hpp"
#include "com/sun/star/ucb/InteractiveIOException.hpp"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/implbase2.hxx"
...
...
@@ -349,14 +349,8 @@ DescriptionInfoset::DescriptionInfoset(
m_context
(
context
),
m_element
(
element
)
{
css
::
uno
::
Reference
<
css
::
lang
::
XMultiComponentFactory
>
manager
(
context
->
getServiceManager
(),
css
::
uno
::
UNO_QUERY_THROW
);
if
(
m_element
.
is
())
{
m_xpath
=
css
::
uno
::
Reference
<
css
::
xml
::
xpath
::
XXPathAPI
>
(
manager
->
createInstanceWithContext
(
"com.sun.star.xml.xpath.XPathAPI"
,
context
),
css
::
uno
::
UNO_QUERY_THROW
);
m_xpath
=
css
::
xml
::
xpath
::
XPathAPI
::
create
(
context
);
m_xpath
->
registerNS
(
"desc"
,
element
->
getNamespaceURI
());
m_xpath
->
registerNS
(
"xlink"
,
"http://www.w3.org/1999/xlink"
);
}
...
...
desktop/source/deployment/registry/dp_backenddb.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -25,7 +25,7 @@
#include "osl/file.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/xml/dom/DocumentBuilder.hpp"
#include "com/sun/star/xml/xpath/X
X
PathAPI.hpp"
#include "com/sun/star/xml/xpath/XPathAPI.hpp"
#include "com/sun/star/io/XActiveDataSource.hpp"
#include "com/sun/star/io/XActiveDataControl.hpp"
#include "dp_ucb.h"
...
...
@@ -111,17 +111,9 @@ Reference<css::xml::xpath::XXPathAPI> BackendDb::getXPathAPI()
{
if
(
!
m_xpathApi
.
is
())
{
m_xpathApi
=
Reference
<
css
::
xml
::
xpath
::
XXPathAPI
>
(
m_xContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.xml.xpath.XPathAPI"
,
m_xContext
),
css
::
uno
::
UNO_QUERY
);
m_xpathApi
=
css
::
xml
::
xpath
::
XPathAPI
::
create
(
m_xContext
);
if
(
!
m_xpathApi
.
is
())
throw
css
::
uno
::
RuntimeException
(
" Could not create service com.sun.star.xml.xpath.XPathAPI"
,
0
);
m_xpathApi
->
registerNS
(
getNSPrefix
(),
getDbNSName
());
m_xpathApi
->
registerNS
(
getNSPrefix
(),
getDbNSName
()
);
}
return
m_xpathApi
;
...
...
desktop/source/migration/services/oo3extensionmigration.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -36,7 +36,7 @@
#include <com/sun/star/ucb/TransferInfo.hpp>
#include <com/sun/star/ucb/NameClash.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/xml/xpath/X
X
PathAPI.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
...
...
@@ -228,10 +228,7 @@ bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescript
uno
::
Reference
<
xml
::
dom
::
XElement
>
xRoot
=
xDoc
->
getDocumentElement
();
if
(
xRoot
.
is
()
&&
xRoot
->
getTagName
()
==
"description"
)
{
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xPath
(
m_ctx
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.xml.xpath.XPathAPI"
,
m_ctx
),
uno
::
UNO_QUERY
);
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xPath
=
xml
::
xpath
::
XPathAPI
::
create
(
m_ctx
);
xPath
->
registerNS
(
"desc"
,
xRoot
->
getNamespaceURI
());
xPath
->
registerNS
(
"xlink"
,
"http://www.w3.org/1999/xlink"
);
...
...
extensions/source/update/check/updateprotocol.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <com/sun/star/xml/xpath/X
X
PathAPI.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include "updateprotocol.hxx"
#include "updatecheckconfig.hxx"
...
...
@@ -123,9 +123,7 @@ checkForUpdates(
OSL_ASSERT
(
rxContext
->
getServiceManager
().
is
()
);
// XPath implementation
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xXPath
(
rxContext
->
getServiceManager
()
->
createInstanceWithContext
(
UNISTRING
(
"com.sun.star.xml.xpath.XPathAPI"
),
rxContext
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xXPath
=
xml
::
xpath
::
XPathAPI
::
create
(
rxContext
);
xXPath
->
registerNS
(
UNISTRING
(
"inst"
),
UNISTRING
(
"http://update.libreoffice.org/description"
)
);
...
...
extensions/source/update/feed/updatefeed.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -45,7 +45,7 @@
#include <com/sun/star/sdbc/XRow.hpp>
#include <com/sun/star/task/PasswordContainerInteractionHandler.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <com/sun/star/xml/xpath/X
X
PathAPI.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <rtl/ref.hxx>
#include <rtl/bootstrap.hxx>
...
...
@@ -391,21 +391,13 @@ UpdateInformationProvider::UpdateInformationProvider(
uno
::
Reference
<
uno
::
XInterface
>
UpdateInformationProvider
::
createInstance
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xContext
)
{
uno
::
Reference
<
lang
::
XMultiComponentFactory
>
xServiceManager
(
xContext
->
getServiceManager
());
if
(
!
xServiceManager
.
is
()
)
throw
uno
::
RuntimeException
(
UNISTRING
(
"unable to obtain service manager from component context"
),
uno
::
Reference
<
uno
::
XInterface
>
());
uno
::
Reference
<
ucb
::
XUniversalContentBroker
>
xUniversalContentBroker
=
ucb
::
UniversalContentBroker
::
create
(
xContext
);
uno
::
Reference
<
xml
::
dom
::
XDocumentBuilder
>
xDocumentBuilder
(
xml
::
dom
::
DocumentBuilder
::
create
(
xContext
));
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xXPath
(
xServiceManager
->
createInstanceWithContext
(
UNISTRING
(
"com.sun.star.xml.xpath.XPathAPI"
),
xContext
),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
xXPath
=
xml
::
xpath
::
XPathAPI
::
create
(
xContext
);
xXPath
->
registerNS
(
UNISTRING
(
"atom"
),
UNISTRING
(
"http://www.w3.org/2005/Atom"
)
);
...
...
forms/source/xforms/computedexpression.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -27,7 +27,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/xml/dom/NodeType.hpp>
#include <com/sun/star/xml/dom/XNode.hpp>
#include <com/sun/star/xml/xpath/X
X
PathAPI.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <com/sun/star/xml/xpath/XXPathObject.hpp>
#include <com/sun/star/xml/xpath/XXPathExtension.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
...
...
@@ -45,6 +45,7 @@ using com::sun::star::lang::XInitialization;
using
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
;
using
com
::
sun
::
star
::
xml
::
dom
::
XNode
;
using
com
::
sun
::
star
::
container
::
XNameContainer
;
using
com
::
sun
::
star
::
xml
::
xpath
::
XPathAPI
;
using
com
::
sun
::
star
::
xml
::
xpath
::
XXPathAPI
;
using
com
::
sun
::
star
::
xml
::
xpath
::
XXPathExtension
;
using
com
::
sun
::
star
::
xml
::
xpath
::
XXPathObject
;
...
...
@@ -189,10 +190,7 @@ bool ComputedExpression::getBool( bool bDefault ) const
Reference
<
XXPathAPI
>
ComputedExpression
::
_getXPathAPI
(
const
xforms
::
EvaluationContext
&
aContext
)
{
// create XPath API, then register namespaces
Reference
<
XXPathAPI
>
xXPath
(
createInstance
(
"com.sun.star.xml.xpath.XPathAPI"
),
UNO_QUERY_THROW
);
OSL_ENSURE
(
xXPath
.
is
(),
"cannot get XPath API"
);
Reference
<
XXPathAPI
>
xXPath
(
XPathAPI
::
create
(
comphelper
::
getProcessComponentContext
()
)
);
// register xforms extension#
Sequence
<
Any
>
aSequence
(
2
);
...
...
offapi/UnoApi_offapi.mk
Dosyayı görüntüle @
f53517a5
...
...
@@ -368,6 +368,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/sax,\
Parser \
Writer \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/xpath,\
XPathAPI \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/xml/xslt,\
XSLTTransformer \
XSLT2Transformer \
...
...
@@ -1539,7 +1542,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/wra
XMLElementWrapper \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xml/xpath,\
XPathAPI \
XPathExtension \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/xsd,\
...
...
offapi/com/sun/star/xml/xpath/XPathAPI.idl
Dosyayı görüntüle @
f53517a5
...
...
@@ -24,10 +24,7 @@
module
com
{
module
sun
{
module
star
{
module
xml
{
module
xpath
{
service
XPathAPI
{
interface
XXPathAPI
;
}
;
service
XPathAPI
:
XXPathAPI
;
}
;};};};};
#
endif
...
...
sfx2/source/doc/SfxDocumentMetaData.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -51,7 +51,7 @@
#include "com/sun/star/xml/dom/DocumentBuilder.hpp"
#include "com/sun/star/xml/dom/XSAXDocumentBuilder.hpp"
#include "com/sun/star/xml/dom/NodeType.hpp"
#include "com/sun/star/xml/xpath/X
X
PathAPI.hpp"
#include "com/sun/star/xml/xpath/XPathAPI.hpp"
#include "com/sun/star/util/Date.hpp"
#include "com/sun/star/util/Time.hpp"
#include "com/sun/star/util/Duration.hpp"
...
...
@@ -1144,15 +1144,7 @@ void SAL_CALL SfxDocumentMetaData::init(
::
rtl
::
OUString
(
"SfxDocumentMetaData::init: no DOM tree given"
),
*
this
);
css
::
uno
::
Reference
<
css
::
lang
::
XMultiComponentFactory
>
xMsf
(
m_xContext
->
getServiceManager
());
css
::
uno
::
Reference
<
css
::
xml
::
xpath
::
XXPathAPI
>
xPath
(
xMsf
->
createInstanceWithContext
(
::
rtl
::
OUString
(
"com.sun.star.xml.xpath.XPathAPI"
),
m_xContext
),
css
::
uno
::
UNO_QUERY_THROW
);
if
(
!
xPath
.
is
())
throw
css
::
uno
::
RuntimeException
(
::
rtl
::
OUString
(
"SfxDocumentMetaData::init:"
" cannot create XPathAPI service"
),
*
this
);
css
::
uno
::
Reference
<
css
::
xml
::
xpath
::
XXPathAPI
>
xPath
=
css
::
xml
::
xpath
::
XPathAPI
::
create
(
m_xContext
);
m_isInitialized
=
false
;
m_xDoc
=
i_xDoc
;
...
...
xmloff/source/meta/xmlmetai.cxx
Dosyayı görüntüle @
f53517a5
...
...
@@ -21,7 +21,7 @@
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/xml/dom/SAXDocumentBuilder.hpp>
#include <com/sun/star/xml/dom/XSAXDocumentBuilder2.hpp>
#include <com/sun/star/xml/xpath/X
X
PathAPI.hpp>
#include <com/sun/star/xml/xpath/XPathAPI.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <comphelper/processfactory.hxx>
...
...
@@ -151,11 +151,8 @@ lcl_initGenerator(SvXMLImport & rImport,
uno
::
Reference
<
xml
::
dom
::
XDocument
>
const
xDoc
(
xDocBuilder
->
getDocument
(),
uno
::
UNO_SET_THROW
);
try
{
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
const
xPath
(
rImport
.
getServiceFactory
()
->
createInstance
(
::
rtl
::
OUString
(
"com.sun.star.xml.xpath.XPathAPI"
)),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
xml
::
xpath
::
XXPathAPI
>
const
xPath
=
xml
::
xpath
::
XPathAPI
::
create
(
comphelper
::
getComponentContext
(
rImport
.
getServiceFactory
())
);
xPath
->
registerNS
(
GetXMLToken
(
XML_NP_OFFICE
),
GetXMLToken
(
XML_N_OFFICE
));
xPath
->
registerNS
(
GetXMLToken
(
XML_NP_META
),
GetXMLToken
(
XML_N_META
));
...
...
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