diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-01-31 11:59:30 +0100 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2023-02-14 10:41:17 +0000 |
commit | 85d1ead3f9f23f78db0eee161eb0fc199d4b766c (patch) | |
tree | d24c18a14934316684df0b7c0f85ceaf88961256 /sc/source/ui/vba/vbaworksheet.cxx | |
parent | 75a863ee7fea133ae6bcd010d1aac46815fa49e2 (diff) |
tdf#149786 sc: add VBA function: ExportAsFixedFormat
Add ExportAsFixedFormat VBA function for calc.
Works fine with Workbook/Worksheet/Range objects
Optional parameters:
- Type: works but only with xlTypePDF. (xlTypeXPS not supperted by LO)
- FileName: works but not clear the xlQualityStandard or xlQualityMinimum real value,
so just used the lossless export in case of xlQualityStandard and 70% JPEG compression quality
for xlQualityMinimum.
- IncludeDocProperties: works
- IgnorePrintAreas: TODO
- From: works
- To: works
- OpenAfterPublish: works
- FixedFormatExtClassPtr: TODO?
Change-Id: I128fd880a82a5dd315897496c6f21bb9a7c2270b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146512
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'sc/source/ui/vba/vbaworksheet.cxx')
-rw-r--r-- | sc/source/ui/vba/vbaworksheet.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index cfc84537da62..1160cd275032 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -1037,6 +1037,18 @@ ScVbaWorksheet::PrintOut( const uno::Any& From, const uno::Any& To, const uno::A PrintOutHelper( excel::getBestViewShell( xModel ), From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, bSelection ); } +void SAL_CALL +ScVbaWorksheet::ExportAsFixedFormat(const css::uno::Any& Type, const css::uno::Any& FileName, const css::uno::Any& Quality, + const css::uno::Any& IncludeDocProperties, const css::uno::Any& /*IgnorePrintAreas*/, const css::uno::Any& From, + const css::uno::Any& To, const css::uno::Any& OpenAfterPublish, const css::uno::Any& /*FixedFormatExtClassPtr*/) +{ + uno::Reference< frame::XModel > xModel(getModel(), uno::UNO_SET_THROW); + uno::Reference< excel::XApplication > xApplication(Application(), uno::UNO_QUERY_THROW); + + excel::ExportAsFixedFormatHelper(xModel, xApplication, Type, FileName, Quality, + IncludeDocProperties, From, To, OpenAfterPublish); +} + sal_Int64 SAL_CALL ScVbaWorksheet::getSomething(const uno::Sequence<sal_Int8 > & rId) { |