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
a23a51af
Kaydet (Commit)
a23a51af
authored
Eyl 17, 2014
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert wpftcalc to use ImportFilter base class
Change-Id: I6692aee51753cddf57aaca1b7b7a94afafe60a9d
üst
56340154
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
309 deletions
+55
-309
Library_wpftcalc.mk
writerperfect/Library_wpftcalc.mk
+5
-1
Library_wpftdraw.mk
writerperfect/Library_wpftdraw.mk
+5
-0
DocumentHandlerForOds.hxx
writerperfect/source/calc/DocumentHandlerForOds.hxx
+31
-0
ImportFilterBase.cxx
writerperfect/source/calc/ImportFilterBase.cxx
+0
-183
ImportFilterBase.hxx
writerperfect/source/calc/ImportFilterBase.hxx
+0
-115
MSWorksCalcImportFilter.cxx
writerperfect/source/calc/MSWorksCalcImportFilter.cxx
+1
-1
MSWorksCalcImportFilter.hxx
writerperfect/source/calc/MSWorksCalcImportFilter.hxx
+6
-4
MWAWCalcImportFilter.cxx
writerperfect/source/calc/MWAWCalcImportFilter.cxx
+1
-1
MWAWCalcImportFilter.hxx
writerperfect/source/calc/MWAWCalcImportFilter.hxx
+6
-4
No files found.
writerperfect/Library_wpftcalc.mk
Dosyayı görüntüle @
a23a51af
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
$(eval $(call gb_Library_Library,wpftcalc))
$(eval $(call gb_Library_Library,wpftcalc))
$(eval $(call gb_Library_set_include,wpftcalc,\
-I$(SRCDIR)/writerperfect/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_set_componentfile,wpftcalc,writerperfect/source/calc/wpftcalc))
$(eval $(call gb_Library_set_componentfile,wpftcalc,writerperfect/source/calc/wpftcalc))
$(eval $(call gb_Library_use_sdk_api,wpftcalc))
$(eval $(call gb_Library_use_sdk_api,wpftcalc))
...
@@ -49,7 +54,6 @@ $(eval $(call gb_Library_use_externals,wpftcalc,\
...
@@ -49,7 +54,6 @@ $(eval $(call gb_Library_use_externals,wpftcalc,\
))
))
$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
writerperfect/source/calc/ImportFilterBase \
writerperfect/source/calc/MSWorksCalcImportFilter \
writerperfect/source/calc/MSWorksCalcImportFilter \
writerperfect/source/calc/MWAWCalcImportFilter \
writerperfect/source/calc/MWAWCalcImportFilter \
writerperfect/source/calc/wpftcalc_genericfilter \
writerperfect/source/calc/wpftcalc_genericfilter \
...
...
writerperfect/Library_wpftdraw.mk
Dosyayı görüntüle @
a23a51af
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
$(eval $(call gb_Library_Library,wpftdraw))
$(eval $(call gb_Library_Library,wpftdraw))
$(eval $(call gb_Library_set_include,wpftdraw,\
-I$(SRCDIR)/writerperfect/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_set_componentfile,wpftdraw,writerperfect/source/draw/wpftdraw))
$(eval $(call gb_Library_set_componentfile,wpftdraw,writerperfect/source/draw/wpftdraw))
$(eval $(call gb_Library_use_sdk_api,wpftdraw))
$(eval $(call gb_Library_use_sdk_api,wpftdraw))
...
...
writerperfect/source/calc/DocumentHandlerForOds.hxx
0 → 100644
Dosyayı görüntüle @
a23a51af
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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_WRITERPERFECT_SOURCE_CALC_DOCUMENTHANDLERFORODS_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_CALC_DOCUMENTHANDLERFORODS_HXX
#include <libodfgen/libodfgen.hxx>
#include "writerperfect/DocumentHandlerFor.hxx"
namespace
writerperfect
{
template
<>
struct
DocumentHandlerFor
<
OdsGenerator
>
{
static
const
rtl
::
OUString
name
()
{
return
rtl
::
OUString
(
"com.sun.star.comp.Calc.XMLOasisImporter"
);
}
};
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerperfect/source/calc/ImportFilterBase.cxx
deleted
100644 → 0
Dosyayı görüntüle @
56340154
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/uno/Reference.h>
#include <writerperfect/DocumentHandler.hxx>
#include <writerperfect/WPXSvInputStream.hxx>
#include <xmloff/attrlist.hxx>
#include <libodfgen/libodfgen.hxx>
#include "ImportFilterBase.hxx"
namespace
writerperfect
{
namespace
calc
{
using
com
::
sun
::
star
::
uno
::
Reference
;
using
com
::
sun
::
star
::
io
::
XInputStream
;
using
com
::
sun
::
star
::
io
::
XSeekable
;
using
com
::
sun
::
star
::
uno
::
Sequence
;
using
com
::
sun
::
star
::
uno
::
Any
;
using
com
::
sun
::
star
::
uno
::
UNO_QUERY
;
using
com
::
sun
::
star
::
uno
::
XInterface
;
using
com
::
sun
::
star
::
uno
::
Exception
;
using
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
com
::
sun
::
star
::
beans
::
PropertyValue
;
using
com
::
sun
::
star
::
document
::
XFilter
;
using
com
::
sun
::
star
::
document
::
XExtendedFilterDetection
;
using
com
::
sun
::
star
::
document
::
XImporter
;
using
com
::
sun
::
star
::
xml
::
sax
::
InputSource
;
using
com
::
sun
::
star
::
xml
::
sax
::
XAttributeList
;
using
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
;
using
com
::
sun
::
star
::
xml
::
sax
::
XParser
;
using
writerperfect
::
DocumentHandler
;
using
writerperfect
::
WPXSvInputStream
;
ImportFilterImpl
::
ImportFilterImpl
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
)
:
mxContext
(
rxContext
)
{
}
ImportFilterImpl
::~
ImportFilterImpl
()
{
}
sal_Bool
SAL_CALL
ImportFilterImpl
::
filter
(
const
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
&
aDescriptor
)
throw
(
RuntimeException
,
std
::
exception
)
{
sal_Int32
nLength
=
aDescriptor
.
getLength
();
const
PropertyValue
*
pValue
=
aDescriptor
.
getConstArray
();
Reference
<
XInputStream
>
xInputStream
;
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
if
(
pValue
[
i
].
Name
==
"InputStream"
)
pValue
[
i
].
Value
>>=
xInputStream
;
}
if
(
!
xInputStream
.
is
())
{
OSL_ASSERT
(
false
);
return
sal_False
;
}
// An XML import service: what we push sax messages to..
Reference
<
XDocumentHandler
>
xInternalHandler
(
mxContext
->
getServiceManager
()
->
createInstanceWithContext
(
"com.sun.star.comp.Calc.XMLOasisImporter"
,
mxContext
),
css
::
uno
::
UNO_QUERY_THROW
);
// The XImporter sets up an empty target document for XDocumentHandler to write to..
Reference
<
XImporter
>
xImporter
(
xInternalHandler
,
UNO_QUERY
);
xImporter
->
setTargetDocument
(
mxDoc
);
// OO Graphics Handler: abstract class to handle document SAX messages, concrete implementation here
// writes to in-memory target doc
DocumentHandler
xHandler
(
xInternalHandler
);
WPXSvInputStream
input
(
xInputStream
);
OdsGenerator
exporter
;
exporter
.
addDocumentHandler
(
&
xHandler
,
ODF_FLAT_XML
);
doRegisterHandlers
(
exporter
);
utl
::
MediaDescriptor
aMediaDescriptor
(
aDescriptor
);
return
doImportDocument
(
input
,
exporter
,
aMediaDescriptor
);
}
void
SAL_CALL
ImportFilterImpl
::
cancel
()
throw
(
RuntimeException
,
std
::
exception
)
{
}
// XImporter
void
SAL_CALL
ImportFilterImpl
::
setTargetDocument
(
const
Reference
<
::
com
::
sun
::
star
::
lang
::
XComponent
>
&
xDoc
)
throw
(
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
RuntimeException
,
std
::
exception
)
{
mxDoc
=
xDoc
;
}
// XExtendedFilterDetection
OUString
SAL_CALL
ImportFilterImpl
::
detect
(
com
::
sun
::
star
::
uno
::
Sequence
<
PropertyValue
>
&
Descriptor
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
{
OUString
sTypeName
;
sal_Int32
nLength
=
Descriptor
.
getLength
();
sal_Int32
location
=
nLength
;
const
PropertyValue
*
pValue
=
Descriptor
.
getConstArray
();
Reference
<
XInputStream
>
xInputStream
;
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
if
(
pValue
[
i
].
Name
==
"TypeName"
)
location
=
i
;
else
if
(
pValue
[
i
].
Name
==
"InputStream"
)
pValue
[
i
].
Value
>>=
xInputStream
;
}
if
(
!
xInputStream
.
is
())
return
OUString
();
WPXSvInputStream
input
(
xInputStream
);
if
(
doDetectFormat
(
input
,
sTypeName
))
{
assert
(
!
sTypeName
.
isEmpty
());
if
(
location
==
nLength
)
{
Descriptor
.
realloc
(
nLength
+
1
);
Descriptor
[
location
].
Name
=
"TypeName"
;
}
Descriptor
[
location
].
Value
<<=
sTypeName
;
}
return
sTypeName
;
}
// XInitialization
void
SAL_CALL
ImportFilterImpl
::
initialize
(
const
Sequence
<
Any
>
&
aArguments
)
throw
(
Exception
,
RuntimeException
,
std
::
exception
)
{
Sequence
<
PropertyValue
>
aAnySeq
;
sal_Int32
nLength
=
aArguments
.
getLength
();
if
(
nLength
&&
(
aArguments
[
0
]
>>=
aAnySeq
))
{
const
PropertyValue
*
pValue
=
aAnySeq
.
getConstArray
();
nLength
=
aAnySeq
.
getLength
();
for
(
sal_Int32
i
=
0
;
i
<
nLength
;
i
++
)
{
if
(
pValue
[
i
].
Name
==
"Type"
)
{
pValue
[
i
].
Value
>>=
msFilterName
;
break
;
}
}
}
}
void
ImportFilterImpl
::
doRegisterHandlers
(
OdsGenerator
&
)
{
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerperfect/source/calc/ImportFilterBase.hxx
deleted
100644 → 0
Dosyayı görüntüle @
56340154
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
#define INCLUDED_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
#include <librevenge/librevenge.h>
#include <librevenge-stream/librevenge-stream.h>
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase4.hxx>
#include <unotools/mediadescriptor.hxx>
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
beans
{
struct
PropertyValue
;
}
namespace
lang
{
class
XComponent
;
}
namespace
uno
{
class
XComponentContext
;
}
namespace
xml
{
namespace
sax
{
class
XDocumentHandler
;
}
}
}
}
}
class
OdsGenerator
;
namespace
writerperfect
{
namespace
calc
{
/* This component will be instantiated for both import or export. Whether it calls
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
class
ImportFilterImpl
:
public
cppu
::
WeakImplHelper4
<
com
::
sun
::
star
::
document
::
XFilter
,
com
::
sun
::
star
::
document
::
XImporter
,
com
::
sun
::
star
::
document
::
XExtendedFilterDetection
,
com
::
sun
::
star
::
lang
::
XInitialization
>
{
public
:
ImportFilterImpl
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
);
virtual
~
ImportFilterImpl
();
// XFilter
virtual
sal_Bool
SAL_CALL
filter
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
beans
::
PropertyValue
>
&
aDescriptor
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
virtual
void
SAL_CALL
cancel
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XImporter
virtual
void
SAL_CALL
setTargetDocument
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XComponent
>
&
xDoc
)
throw
(
::
com
::
sun
::
star
::
lang
::
IllegalArgumentException
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
//XExtendedFilterDetection
virtual
OUString
SAL_CALL
detect
(
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
&
Descriptor
)
throw
(
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
// XInitialization
virtual
void
SAL_CALL
initialize
(
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
uno
::
Any
>
&
aArguments
)
throw
(
::
com
::
sun
::
star
::
uno
::
Exception
,
::
com
::
sun
::
star
::
uno
::
RuntimeException
,
std
::
exception
)
SAL_OVERRIDE
;
private
:
virtual
bool
doDetectFormat
(
librevenge
::
RVNGInputStream
&
rInput
,
OUString
&
rTypeName
)
=
0
;
virtual
bool
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
librevenge
::
RVNGSpreadsheetInterface
&
rGenerator
,
utl
::
MediaDescriptor
&
)
=
0
;
virtual
void
doRegisterHandlers
(
OdsGenerator
&
rGenerator
);
private
:
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
mxContext
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XComponent
>
mxDoc
;
OUString
msFilterName
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
xml
::
sax
::
XDocumentHandler
>
mxHandler
;
};
/** A base class for import filters.
*/
typedef
cppu
::
ImplInheritanceHelper1
<
ImportFilterImpl
,
com
::
sun
::
star
::
lang
::
XServiceInfo
>
ImportFilterBase
;
}
}
#endif // INCLUDED_WRITERPERFECT_SOURCE_CALC_IMPORTFILTERBASE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
writerperfect/source/calc/MSWorksCalcImportFilter.cxx
Dosyayı görüntüle @
a23a51af
...
@@ -24,7 +24,7 @@ using com::sun::star::uno::Exception;
...
@@ -24,7 +24,7 @@ using com::sun::star::uno::Exception;
using
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
com
::
sun
::
star
::
uno
::
RuntimeException
;
using
com
::
sun
::
star
::
uno
::
XComponentContext
;
using
com
::
sun
::
star
::
uno
::
XComponentContext
;
bool
MSWorksCalcImportFilter
::
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
librevenge
::
RVNGSpreadsheetInterface
&
rGenerator
,
utl
::
MediaDescriptor
&
)
bool
MSWorksCalcImportFilter
::
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
OdsGenerator
&
rGenerator
,
utl
::
MediaDescriptor
&
)
{
{
return
libwps
::
WPS_OK
==
libwps
::
WPSDocument
::
parse
(
&
rInput
,
&
rGenerator
);
return
libwps
::
WPS_OK
==
libwps
::
WPSDocument
::
parse
(
&
rInput
,
&
rGenerator
);
}
}
...
...
writerperfect/source/calc/MSWorksCalcImportFilter.hxx
Dosyayı görüntüle @
a23a51af
...
@@ -13,16 +13,18 @@
...
@@ -13,16 +13,18 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include "ImportFilterBase.hxx"
#include "writerperfect/ImportFilter.hxx"
#include "DocumentHandlerForOds.hxx"
/* This component will be instantiated for both import or export. Whether it calls
/* This component will be instantiated for both import or export. Whether it calls
* setSourceDocument or setTargetDocument determines which Impl function the filter
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
* member calls */
class
MSWorksCalcImportFilter
:
public
writerperfect
::
calc
::
ImportFilterBase
class
MSWorksCalcImportFilter
:
public
writerperfect
::
ImportFilter
<
OdsGenerator
>
{
{
public
:
public
:
MSWorksCalcImportFilter
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
)
MSWorksCalcImportFilter
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
)
:
writerperfect
::
calc
::
ImportFilterBase
(
rxContext
)
{}
:
writerperfect
::
ImportFilter
<
OdsGenerator
>
(
rxContext
)
{}
// XServiceInfo
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
virtual
OUString
SAL_CALL
getImplementationName
()
...
@@ -34,7 +36,7 @@ public:
...
@@ -34,7 +36,7 @@ public:
private
:
private
:
virtual
bool
doDetectFormat
(
librevenge
::
RVNGInputStream
&
rInput
,
OUString
&
rTypeName
)
SAL_OVERRIDE
;
virtual
bool
doDetectFormat
(
librevenge
::
RVNGInputStream
&
rInput
,
OUString
&
rTypeName
)
SAL_OVERRIDE
;
virtual
bool
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
librevenge
::
RVNGSpreadsheetInterface
&
rGenerator
,
utl
::
MediaDescriptor
&
)
SAL_OVERRIDE
;
virtual
bool
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
OdsGenerator
&
rGenerator
,
utl
::
MediaDescriptor
&
)
SAL_OVERRIDE
;
virtual
void
doRegisterHandlers
(
OdsGenerator
&
rGenerator
)
SAL_OVERRIDE
;
virtual
void
doRegisterHandlers
(
OdsGenerator
&
rGenerator
)
SAL_OVERRIDE
;
};
};
...
...
writerperfect/source/calc/MWAWCalcImportFilter.cxx
Dosyayı görüntüle @
a23a51af
...
@@ -39,7 +39,7 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData
...
@@ -39,7 +39,7 @@ static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData
return
MWAWDocument
::
decodeSpreadsheet
(
data
,
&
exporter
);
return
MWAWDocument
::
decodeSpreadsheet
(
data
,
&
exporter
);
}
}
bool
MWAWCalcImportFilter
::
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
librevenge
::
RVNGSpreadsheetInterface
&
rGenerator
,
utl
::
MediaDescriptor
&
)
bool
MWAWCalcImportFilter
::
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
OdsGenerator
&
rGenerator
,
utl
::
MediaDescriptor
&
)
{
{
return
MWAWDocument
::
MWAW_R_OK
==
MWAWDocument
::
parse
(
&
rInput
,
&
rGenerator
);
return
MWAWDocument
::
MWAW_R_OK
==
MWAWDocument
::
parse
(
&
rInput
,
&
rGenerator
);
}
}
...
...
writerperfect/source/calc/MWAWCalcImportFilter.hxx
Dosyayı görüntüle @
a23a51af
...
@@ -13,16 +13,18 @@
...
@@ -13,16 +13,18 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include "ImportFilterBase.hxx"
#include "writerperfect/ImportFilter.hxx"
#include "DocumentHandlerForOds.hxx"
/* This component will be instantiated for both import or export. Whether it calls
/* This component will be instantiated for both import or export. Whether it calls
* setSourceDocument or setTargetDocument determines which Impl function the filter
* setSourceDocument or setTargetDocument determines which Impl function the filter
* member calls */
* member calls */
class
MWAWCalcImportFilter
:
public
writerperfect
::
calc
::
ImportFilterBase
class
MWAWCalcImportFilter
:
public
writerperfect
::
ImportFilter
<
OdsGenerator
>
{
{
public
:
public
:
MWAWCalcImportFilter
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
)
MWAWCalcImportFilter
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XComponentContext
>
&
rxContext
)
:
writerperfect
::
calc
::
ImportFilterBase
(
rxContext
)
{}
:
writerperfect
::
ImportFilter
<
OdsGenerator
>
(
rxContext
)
{}
// XServiceInfo
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
virtual
OUString
SAL_CALL
getImplementationName
()
...
@@ -34,7 +36,7 @@ public:
...
@@ -34,7 +36,7 @@ public:
private
:
private
:
virtual
bool
doDetectFormat
(
librevenge
::
RVNGInputStream
&
rInput
,
OUString
&
rTypeName
)
SAL_OVERRIDE
;
virtual
bool
doDetectFormat
(
librevenge
::
RVNGInputStream
&
rInput
,
OUString
&
rTypeName
)
SAL_OVERRIDE
;
virtual
bool
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
librevenge
::
RVNGSpreadsheetInterface
&
rGenerator
,
utl
::
MediaDescriptor
&
)
SAL_OVERRIDE
;
virtual
bool
doImportDocument
(
librevenge
::
RVNGInputStream
&
rInput
,
OdsGenerator
&
rGenerator
,
utl
::
MediaDescriptor
&
)
SAL_OVERRIDE
;
virtual
void
doRegisterHandlers
(
OdsGenerator
&
rGenerator
)
SAL_OVERRIDE
;
virtual
void
doRegisterHandlers
(
OdsGenerator
&
rGenerator
)
SAL_OVERRIDE
;
};
};
...
...
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