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
71eb2737
Kaydet (Commit)
71eb2737
authored
Ara 19, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
css.xml.sax service ctor clean-up
Change-Id: I556904861e93a145cfe65f61218926851e4e8eb0
üst
3b9b2e2d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
61 deletions
+53
-61
UnoApi_offapi.mk
offapi/UnoApi_offapi.mk
+1
-0
FastParser.idl
offapi/com/sun/star/xml/sax/FastParser.idl
+23
-0
FastShapeContextHandler.idl
offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl
+1
-3
fastparser.cxx
oox/source/core/fastparser.cxx
+4
-2
DocumentDecryption.cxx
oox/source/crypto/DocumentDecryption.cxx
+3
-6
parser.cxx
sax/qa/cppunit/parser.cxx
+2
-5
OOXMLFastContextHandler.cxx
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+16
-37
factoryimpl.xsl
writerfilter/source/ooxml/factoryimpl.xsl
+3
-8
No files found.
offapi/UnoApi_offapi.mk
Dosyayı görüntüle @
71eb2737
...
...
@@ -457,6 +457,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/xml/dom,\
SAXDocumentBuilder \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/xml/sax,\
FastParser \
FastShapeContextHandler \
FastTokenHandler \
Parser \
...
...
offapi/com/sun/star/xml/sax/FastParser.idl
0 → 100644
Dosyayı görüntüle @
71eb2737
/*
-*-
Mode
:
C
++
; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
*
This
file
is
part
of
the
LibreOffice
project
.
*
*
This
Source
Code
Form
is
subject
to
the
terms
of
the
Mozilla
Public
*
License
,
v
.
2.0
.
If
a
copy
of
the
MPL
was
not
distributed
with
this
*
file
,
You
can
obtain
one
at
http
:
//
mozilla
.
org/MPL/2.0/.
*/
#
ifndef
INCLUDED_COM_SUN_STAR_XML_SAX_FASTPARSER_IDL
#
define
INCLUDED_COM_SUN_STAR_XML_SAX_FASTPARSER_IDL
#
include
<
com
/
sun
/
star
/
xml
/
sax
/
XFastParser
.
idl>
module
com
{
module
sun
{
module
star
{
module
xml
{
module
sax
{
service
FastParser
:
XFastParser
;
}
; }; }; }; };
#
endif
/*
vim
:
set
shiftwidth
=
4
softtabstop
=
4
expandtab
:
*/
offapi/com/sun/star/xml/sax/FastShapeContextHandler.idl
Dosyayı görüntüle @
71eb2737
...
...
@@ -24,9 +24,7 @@
module
com
{
module
sun
{
module
star
{
module
xml
{
module
sax
{
service
FastShapeContextHandler
:
XFastShapeContextHandler
{
}
;
service
FastShapeContextHandler
:
XFastShapeContextHandler
;
}
; }; }; }; };
...
...
oox/source/core/fastparser.cxx
Dosyayı görüntüle @
71eb2737
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sal/config.h>
#include <com/sun/star/xml/sax/FastParser.hpp>
#include "oox/core/fastparser.hxx"
#include "oox/core/fasttokenhandler.hxx"
...
...
@@ -72,8 +75,7 @@ FastParser::FastParser( const Reference< XComponentContext >& rxContext ) throw(
mpParser
(
NULL
)
{
// create a fast parser instance
Reference
<
XMultiComponentFactory
>
xFactory
(
rxContext
->
getServiceManager
(),
UNO_SET_THROW
);
mxParser
.
set
(
xFactory
->
createInstanceWithContext
(
"com.sun.star.xml.sax.FastParser"
,
rxContext
),
UNO_QUERY_THROW
);
mxParser
=
css
::
xml
::
sax
::
FastParser
::
create
(
rxContext
);
mpParser
=
dynamic_cast
<
sax_fastparser
::
FastSaxParser
*>
(
mxParser
.
get
());
// create the fast tokenhandler
...
...
oox/source/crypto/DocumentDecryption.cxx
Dosyayı görüntüle @
71eb2737
...
...
@@ -18,6 +18,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <com/sun/star/xml/sax/FastParser.hpp>
#include <com/sun/star/xml/sax/FastToken.hpp>
namespace
oox
{
...
...
@@ -221,15 +222,11 @@ bool DocumentDecryption::readAgileEncryptionInfo(Reference< XInputStream >& xInp
mEngine
.
reset
(
engine
);
AgileEncryptionInfo
&
info
=
engine
->
getInfo
();
Reference
<
XMultiComponentFactory
>
xFactory
(
mxContext
->
getServiceManager
(),
UNO_SET_THROW
);
Reference
<
XFastDocumentHandler
>
xFastDocumentHandler
(
new
AgileDocumentHandler
(
info
)
);
Reference
<
XFastTokenHandler
>
xFastTokenHandler
(
new
AgileTokenHandler
);
Reference
<
XFastParser
>
xParser
;
xParser
.
set
(
xFactory
->
createInstanceWithContext
(
"com.sun.star.xml.sax.FastParser"
,
mxContext
),
UNO_QUERY_THROW
);
if
(
!
xParser
.
is
())
return
false
;
Reference
<
XFastParser
>
xParser
(
css
::
xml
::
sax
::
FastParser
::
create
(
mxContext
));
xParser
->
setFastDocumentHandler
(
xFastDocumentHandler
);
xParser
->
setTokenHandler
(
xFastTokenHandler
);
...
...
sax/qa/cppunit/parser.cxx
Dosyayı görüntüle @
71eb2737
...
...
@@ -10,6 +10,7 @@
#include <sal/config.h>
#include <com/sun/star/io/Pipe.hpp>
#include <com/sun/star/xml/sax/FastParser.hpp>
#include <com/sun/star/xml/sax/FastTokenHandler.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp>
...
...
@@ -44,11 +45,7 @@ private:
void
ParserTest
::
setUp
()
{
test
::
BootstrapFixture
::
setUp
();
mxParser
.
set
(
m_xContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.xml.sax.FastParser"
,
m_xContext
),
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_MESSAGE
(
"No FastParser!"
,
mxParser
.
is
());
mxParser
=
css
::
xml
::
sax
::
FastParser
::
create
(
m_xContext
);
mxParser
->
setTokenHandler
(
css
::
xml
::
sax
::
FastTokenHandler
::
create
(
m_xContext
));
}
...
...
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
Dosyayı görüntüle @
71eb2737
...
...
@@ -22,6 +22,7 @@
#include <set>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/xml/sax/FastShapeContextHandler.hpp>
#include <resourcemodel/QNameToString.hxx>
#include <resourcemodel/XPathLogger.hxx>
#include <resourcemodel/util.hxx>
...
...
@@ -56,7 +57,6 @@ static const sal_uInt8 cFieldEnd = 0x15;
namespace
writerfilter
{
namespace
ooxml
{
using
::
com
::
sun
::
star
::
lang
::
XMultiComponentFactory
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
std
;
...
...
@@ -2033,47 +2033,26 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
:
OOXMLFastContextHandlerProperties
(
pContext
),
m_bShapeSent
(
false
),
m_bShapeStarted
(
false
)
{
uno
::
Reference
<
uno
::
XComponentContext
>
xContext
(
getComponentContext
()
);
if
(
xContext
.
is
()
)
mrShapeContext
.
set
(
getDocument
(
)
->
getShapeContext
(
)
);
if
(
!
mrShapeContext
.
is
(
)
)
{
uno
::
Reference
<
XMultiComponentFactory
>
rServiceManager
(
xContext
->
getServiceManager
());
mrShapeContext
.
set
(
getDocument
(
)
->
getShapeContext
(
)
);
if
(
!
mrShapeContext
.
is
(
)
)
{
// Define the shape context for the whole document
mrShapeContext
.
set
(
rServiceManager
->
createInstanceWithContext
(
"com.sun.star.xml.sax.FastShapeContextHandler"
,
xContext
),
uno
::
UNO_QUERY
);
getDocument
()
->
setShapeContext
(
mrShapeContext
);
}
// Define the shape context for the whole document
mrShapeContext
=
css
::
xml
::
sax
::
FastShapeContextHandler
::
create
(
getComponentContext
());
getDocument
()
->
setShapeContext
(
mrShapeContext
);
}
if
(
mrShapeContext
.
is
())
{
mrShapeContext
->
setModel
(
getDocument
()
->
getModel
());
mrShapeContext
->
setDrawPage
(
getDocument
()
->
getDrawPage
());
mrShapeContext
->
setInputStream
(
getDocument
()
->
getStorageStream
());
mrShapeContext
->
setModel
(
getDocument
()
->
getModel
());
mrShapeContext
->
setDrawPage
(
getDocument
()
->
getDrawPage
());
mrShapeContext
->
setInputStream
(
getDocument
()
->
getStorageStream
());
#ifdef DEBUG_ELEMENT
debug_logger
->
startElement
(
"setRelationFragmentPath"
);
debug_logger
->
attribute
(
"path"
,
mpParserState
->
getTarget
());
debug_logger
->
endElement
();
#endif
mrShapeContext
->
setRelationFragmentPath
(
mpParserState
->
getTarget
());
}
#ifdef DEBUG_CONTEXT_STACK
else
{
debug_logger
->
startElement
(
"error"
);
debug_logger
->
chars
(
std
::
string
(
"failed to get shape handler"
));
debug_logger
->
endElement
();
}
debug_logger
->
startElement
(
"setRelationFragmentPath"
);
debug_logger
->
attribute
(
"path"
,
mpParserState
->
getTarget
());
debug_logger
->
endElement
();
#endif
}
mrShapeContext
->
setRelationFragmentPath
(
mpParserState
->
getTarget
());
}
OOXMLFastContextHandlerShape
::~
OOXMLFastContextHandlerShape
()
...
...
writerfilter/source/ooxml/factoryimpl.xsl
Dosyayı görüntüle @
71eb2737
...
...
@@ -321,13 +321,7 @@ uno::Reference < xml::sax::XFastParser > OOXMLStreamImpl::getFastParser()
{
if (! mxFastParser.is())
{
uno::Reference
<
lang::XMultiComponentFactory
>
xFactory =
uno::Reference
<
lang::XMultiComponentFactory
>
(mxContext->getServiceManager());
mxFastParser.set(xFactory->createInstanceWithContext
( "com.sun.star.xml.sax.FastParser",
mxContext ), uno::UNO_QUERY_THROW);
mxFastParser = css::xml::sax::FastParser::create(mxContext);
</xsl:text>
<xsl:for-each
select=
"//namespace-alias"
>
<xsl:text>
...
...
@@ -346,7 +340,8 @@ uno::Reference < xml::sax::XFastParser > OOXMLStreamImpl::getFastParser()
</xsl:template>
<xsl:template
match=
"/"
>
<xsl:text>
<xsl:text>
#include
<
com/sun/star/xml/sax/FastParser.hpp
>
#include "ooxml/OOXMLFactory.hxx"
#include "ooxml/OOXMLFastHelper.hxx"
#include "ooxml/OOXMLStreamImpl.hxx"
...
...
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