22 #include <osl/diagnose.h>
37 #include <officecfg/Office/Calc.hxx>
39 #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
40 #include <com/sun/star/frame/XModel.hpp>
73 OSL_ENSURE( pDocShell,
"ExportBiff5::Write - no document shell" );
76 OSL_ENSURE( xRootStrg.
is(),
"ExportBiff5::Write - no root storage" );
81 if (officecfg::Office::Calc::Filter::Import::VBA::UseExport::get())
82 eVbaExportMode = VBAExportMode::FULL_EXPORT;
87 eVbaExportMode = VBAExportMode::REEXPORT_STREAM;
91 if ( pDocShell && xRootStrg.
is() && eVbaExportMode == VBAExportMode::FULL_EXPORT)
94 if (aExport.containsVBAProject())
97 aExport.exportVBA( xVBARoot.
get() );
100 else if( pDocShell && xRootStrg.
is() && eVbaExportMode == VBAExportMode::REEXPORT_STREAM )
111 if( pDocShell && xRootStrg.
is() )
114 uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
115 pDocShell->
GetModel(), uno::UNO_QUERY_THROW);
116 uno::Reference<document::XDocumentProperties> xDocProps
117 = xDPS->getDocumentProperties();
120 std::shared_ptr<GDIMetaFile> xMetaFile =
122 uno::Sequence<sal_Int8> metaFile(
#define SCWARN_EXPORT_MAXCOL
Stores global buffers and data needed for Excel export filter.
constexpr OUStringLiteral EXC_STORAGE_VBA_PROJECT
ExportBiff8(XclExpRootData &rExpData, SvStream &rStrm)
css::uno::Reference< css::frame::XModel3 > GetModel() const
ExportBiff5(XclExpRootData &rExpData, SvStream &rStrm)
RootData & GetOldRoot() const
Returns old RootData struct.
ErrCode SaveOrDelMSVBAStorage(bool bSaveInto, const OUString &rStorageName)
Access to global data from other classes.
SotStorage * OpenSotStorage(const OUString &rEleName, StreamMode=StreamMode::STD_READWRITE, bool transacted=true)
bool IsTabTruncated() const
Returns whether the "some sheets have been cut" warning box should be shown.
virtual ~ExportBiff5() override
const tools::SvRef< SotStorage > & GetRootStorage() const
Returns the OLE2 root storage of the imported/exported file.
std::unique_ptr< ExcDocument > pExcDoc
#define SCWARN_EXPORT_MAXROW
MS Excel 5.0, MS Excel 7.0 (95)
bool IsColTruncated() const
Returns whether the "some columns have been cut" warning box should be shown.
static SvtFilterOptions & Get()
XclExpAddressConverter & GetAddressConverter() const
Returns the address converter.
bool IsRowTruncated() const
Returns whether the "some rows have been cut" warning box should be shown.
uno::Sequence< sal_Int8 > convertMetaFile(GDIMetaFile const *i_pThumb)
virtual ~ExportBiff8() override
Provides functions to convert Calc cell addresses to Excel cell addresses.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
SfxObjectShell * GetDocShell() const
Returns the object shell of the Calc document.
std::shared_ptr< GDIMetaFile > GetPreviewMetaFile(bool bFullContent=false) const
bool SaveOlePropertySet(const uno::Reference< document::XDocumentProperties > &i_xDocProps, SotStorage *i_pStorage, const uno::Sequence< sal_Int8 > *i_pThumb, const uno::Sequence< sal_Int8 > *i_pGuid, const uno::Sequence< sal_Int8 > *i_pHyperlinks)
void SetError(ErrCode rErr)
#define SCWARN_EXPORT_MAXTAB
bool IsLoadExcelBasicStorage() const