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
6465857e
Kaydet (Commit)
6465857e
authored
Agu 28, 2014
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove pointless WriterFilter::initialize()
Change-Id: I2341f9665835b4591d0e7c26f32a0fa120b6e7b9
üst
4942c6a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
44 deletions
+9
-44
OLEHandler.cxx
writerfilter/source/dmapper/OLEHandler.cxx
+1
-13
ImportFilter.cxx
writerfilter/source/filter/ImportFilter.cxx
+8
-30
WriterFilter.hxx
writerfilter/source/filter/WriterFilter.hxx
+0
-1
No files found.
writerfilter/source/dmapper/OLEHandler.cxx
Dosyayı görüntüle @
6465857e
...
...
@@ -220,12 +220,9 @@ void OLEHandler::saveInteropProperties(uno::Reference<text::XTextDocument> const
void
OLEHandler
::
importStream
(
uno
::
Reference
<
uno
::
XComponentContext
>
xComponentContext
,
uno
::
Reference
<
text
::
XTextDocument
>
xTextDocument
,
uno
::
Reference
<
text
::
XTextContent
>
xOLE
)
{
OUString
aFilterService
,
aFilterName
;
OUString
aFilterService
;
if
(
m_sProgId
==
"Word.Document.12"
)
{
aFilterService
=
"com.sun.star.comp.Writer.WriterFilter"
;
aFilterName
=
"writer_MS_Word_2007"
;
}
if
(
!
m_xInputStream
.
is
()
||
aFilterService
.
isEmpty
())
return
;
...
...
@@ -233,15 +230,6 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC
// Create the filter service.
uno
::
Reference
<
uno
::
XInterface
>
xInterface
=
xComponentContext
->
getServiceManager
()
->
createInstanceWithContext
(
aFilterService
,
xComponentContext
);
// Initialize it.
uno
::
Sequence
<
beans
::
PropertyValue
>
aArgs
(
1
);
aArgs
[
0
].
Name
=
"Type"
;
aArgs
[
0
].
Value
<<=
OUString
(
aFilterName
);
uno
::
Sequence
<
uno
::
Any
>
aAnySeq
(
1
);
aAnySeq
[
0
]
<<=
aArgs
;
uno
::
Reference
<
lang
::
XInitialization
>
xInitialization
(
xInterface
,
uno
::
UNO_QUERY
);
xInitialization
->
initialize
(
aAnySeq
);
// Set target document.
uno
::
Reference
<
document
::
XImporter
>
xImporter
(
xInterface
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
document
::
XEmbeddedObjectSupplier
>
xSupplier
(
xOLE
,
uno
::
UNO_QUERY
);
...
...
writerfilter/source/filter/ImportFilter.cxx
Dosyayı görüntüle @
6465857e
...
...
@@ -87,16 +87,10 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
dmapper_logger
->
startDocument
();
#endif
writerfilter
::
dmapper
::
SourceDocumentType
eType
=
(
m_sFilterName
==
"writer_MS_Word_2007"
||
m_sFilterName
==
"writer_MS_Word_2007_Template"
||
m_sFilterName
==
"writer_OOXML"
||
m_sFilterName
==
"writer_OOXML_Text_Template"
)
?
writerfilter
::
dmapper
::
DOCUMENT_OOXML
:
writerfilter
::
dmapper
::
DOCUMENT_DOC
;
writerfilter
::
dmapper
::
DomainMapper
*
aDomainMapper
=
new
writerfilter
::
dmapper
::
DomainMapper
(
m_xContext
,
xInputStream
,
m_xDstDoc
,
bRepairStorage
,
eType
,
uno
::
Reference
<
text
::
XTextRange
>
());
writerfilter
::
Stream
::
Pointer_t
pStream
(
aDomainMapper
);
//create the tokenizer and domain mapper
if
(
eType
==
writerfilter
::
dmapper
::
DOCUMENT_OOXML
)
{
writerfilter
::
dmapper
::
SourceDocumentType
eType
=
writerfilter
::
dmapper
::
DOCUMENT_OOXML
;
writerfilter
::
dmapper
::
DomainMapper
*
aDomainMapper
=
new
writerfilter
::
dmapper
::
DomainMapper
(
m_xContext
,
xInputStream
,
m_xDstDoc
,
bRepairStorage
,
eType
,
uno
::
Reference
<
text
::
XTextRange
>
());
writerfilter
::
Stream
::
Pointer_t
pStream
(
aDomainMapper
);
//create the tokenizer and domain mapper
writerfilter
::
ooxml
::
OOXMLStream
::
Pointer_t
pDocStream
=
writerfilter
::
ooxml
::
OOXMLDocumentFactory
::
createStream
(
m_xContext
,
xInputStream
,
bRepairStorage
);
uno
::
Reference
<
task
::
XStatusIndicator
>
xStatusIndicator
=
aMediaDesc
.
getUnpackedValueOrDefault
(
utl
::
MediaDescriptor
::
PROP_STATUSINDICATOR
(),
uno
::
Reference
<
task
::
XStatusIndicator
>
());
writerfilter
::
ooxml
::
OOXMLDocument
::
Pointer_t
pDocument
(
writerfilter
::
ooxml
::
OOXMLDocumentFactory
::
createDocument
(
pDocStream
,
xStatusIndicator
));
...
...
@@ -166,15 +160,14 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
{
// TODO found, handle it.
}
}
pStream
.
reset
();
pStream
.
reset
();
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger
->
endDocument
();
dmapper_logger
->
endDocument
();
#endif
return
sal_True
;
return
sal_True
;
}
return
sal_False
;
}
...
...
@@ -225,23 +218,8 @@ void WriterFilter::setSourceDocument( const uno::Reference< lang::XComponent >&
void
WriterFilter
::
initialize
(
const
uno
::
Sequence
<
uno
::
Any
>&
aArguments
)
throw
(
uno
::
Exception
,
uno
::
RuntimeException
,
std
::
exception
)
void
WriterFilter
::
initialize
(
const
uno
::
Sequence
<
uno
::
Any
>&
/*aArguments*/
)
throw
(
uno
::
Exception
,
uno
::
RuntimeException
,
std
::
exception
)
{
uno
::
Sequence
<
beans
::
PropertyValue
>
aAnySeq
;
sal_Int32
nLength
=
aArguments
.
getLength
();
if
(
nLength
&&
(
aArguments
[
0
]
>>=
aAnySeq
)
)
{
const
beans
::
PropertyValue
*
pValue
=
aAnySeq
.
getConstArray
();
nLength
=
aAnySeq
.
getLength
();
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
if
(
pValue
[
i
].
Name
==
"Type"
)
{
pValue
[
i
].
Value
>>=
m_sFilterName
;
break
;
}
}
}
}
...
...
writerfilter/source/filter/WriterFilter.hxx
Dosyayı görüntüle @
6465857e
...
...
@@ -42,7 +42,6 @@ class WriterFilter : public cppu::WeakImplHelper5
protected
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XComponent
>
m_xSrcDoc
,
m_xDstDoc
;
OUString
m_sFilterName
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
m_xHandler
;
...
...
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