summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oovbaapi/ooo/vba/word/XDocument.idl3
-rw-r--r--sw/source/ui/vba/vbadocument.cxx16
-rw-r--r--sw/source/ui/vba/vbadocument.hxx1
3 files changed, 19 insertions, 1 deletions
diff --git a/oovbaapi/ooo/vba/word/XDocument.idl b/oovbaapi/ooo/vba/word/XDocument.idl
index 888287b34e1b..63e4535e9075 100644
--- a/oovbaapi/ooo/vba/word/XDocument.idl
+++ b/oovbaapi/ooo/vba/word/XDocument.idl
@@ -63,7 +63,8 @@ interface XDocument
any Frames( [in] any index );
void SaveAs2000( [in] any FileName, [in] any FileFormat, [in] any LockComments, [in] any Password, [in] any AddToRecentFiles, [in] any WritePassword, [in] any ReadOnlyRecommended, [in] any EmbedTrueTypeFonts, [in] any SaveNativePictureFormat, [in] any SaveFormsData, [in] any SaveAsAOCELetter );
void SaveAs( [in] any FileName, [in] any FileFormat, [in] any LockComments, [in] any Password, [in] any AddToRecentFiles, [in] any WritePassword, [in] any ReadOnlyRecommended, [in] any EmbedTrueTypeFonts, [in] any SaveNativePictureFormat, [in] any SaveFormsData, [in] any SaveAsAOCELetter, [in] any Encoding, [in] any InsertLineBreaks, [in] any AllowSubstitutions, [in] any LineEnding, [in] any AddBiDiMarks );
-
+ // This is a COLEAT-specific addition
+ void SavePreviewPngAs( [in] any FileName );
};
}; }; };
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index ba0bfc27189b..ff5d3b4ffdc7 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -518,6 +518,22 @@ SwVbaDocument::SaveAs( const uno::Any& FileName, const uno::Any& FileFormat, con
return SaveAs2000( FileName, FileFormat, LockComments, Password, AddToRecentFiles, WritePassword, ReadOnlyRecommended, EmbedTrueTypeFonts, SaveNativePictureFormat, SaveFormsData, SaveAsAOCELetter );
}
+void SAL_CALL
+SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName )
+{
+ OUString sFileName;
+ FileName >>= sFileName;
+ OUString sURL;
+ osl::FileBase::getFileURLFromSystemPath( sFileName, sURL );
+
+ uno::Sequence< beans::PropertyValue > storeProps(1);
+ storeProps[0].Name = "FilterName" ;
+ storeProps[0].Value <<= OUString("writer_png_Export");
+
+ uno::Reference< frame::XStorable > xStor( getModel(), uno::UNO_QUERY_THROW );
+ xStor->storeToURL( sURL, storeProps );
+}
+
uno::Any
SwVbaDocument::getControlShape( const OUString& sName )
{
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
index 1acb42e9232f..af4c93f32f95 100644
--- a/sw/source/ui/vba/vbadocument.hxx
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -90,6 +90,7 @@ public:
virtual css::uno::Any SAL_CALL Frames( const css::uno::Any& aIndex ) override;
virtual void SAL_CALL SaveAs2000( const css::uno::Any& FileName, const css::uno::Any& FileFormat, const css::uno::Any& LockComments, const css::uno::Any& Password, const css::uno::Any& AddToRecentFiles, const css::uno::Any& WritePassword, const css::uno::Any& ReadOnlyRecommended, const css::uno::Any& EmbedTrueTypeFonts, const css::uno::Any& SaveNativePictureFormat, const css::uno::Any& SaveFormsData, const css::uno::Any& SaveAsAOCELetter ) override;
virtual void SAL_CALL SaveAs( const css::uno::Any& FileName, const css::uno::Any& FileFormat, const css::uno::Any& LockComments, const css::uno::Any& Password, const css::uno::Any& AddToRecentFiles, const css::uno::Any& WritePassword, const css::uno::Any& ReadOnlyRecommended, const css::uno::Any& EmbedTrueTypeFonts, const css::uno::Any& SaveNativePictureFormat, const css::uno::Any& SaveFormsData, const css::uno::Any& SaveAsAOCELetter, const css::uno::Any& Encoding, const css::uno::Any& InsertLineBreaks, const css::uno::Any& AllowSubstitutions, const css::uno::Any& LineEnding, const css::uno::Any& AddBiDiMarks ) override;
+ virtual void SAL_CALL SavePreviewPngAs( const css::uno::Any& FileName ) override;
// XInvocation
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) override;