[ooo-build-commit] .: patches/dev300
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon May 31 07:08:41 PDT 2010
patches/dev300/ooxml-filters.diff | 375 ++++++++++++++++++++++++++++++++++++++
1 file changed, 375 insertions(+)
New commits:
commit 53ea675341b0632d7b99686c647666b84db64942
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Mon May 31 16:07:32 2010 +0200
Oops, forgot the --cached when creating the diff.
* patches/dev300/ooxml-filters.diff:
Really updated patch
diff --git a/patches/dev300/ooxml-filters.diff b/patches/dev300/ooxml-filters.diff
index e69de29..1ee3562 100644
--- a/patches/dev300/ooxml-filters.diff
+++ b/patches/dev300/ooxml-filters.diff
@@ -0,0 +1,375 @@
+diff --git filter/source/config/fragments/fcfg_impress.mk filter/source/config/fragments/fcfg_impress.mk
+index 2e354c8..43447cb 100644
+--- filter/source/config/fragments/fcfg_impress.mk
++++ filter/source/config/fragments/fcfg_impress.mk
+@@ -16,7 +16,9 @@ T4_IMPRESS = \
+ draw8\
+ MS_PowerPoint_2007_XML\
+ MS_PowerPoint_2007_XML_AutoPlay\
+- MS_PowerPoint_2007_XML_Template
++ MS_PowerPoint_2007_XML_Template\
++ impress_OOXML_Presentation\
++ impress_OOXML_Presentation_Template
+
+ # -----------------------------------------------
+ # count = 20
+@@ -34,7 +36,9 @@ F4_IMPRESS = \
+ impress8_draw\
+ impress_MS_PowerPoint_2007_XML\
+ impress_MS_PowerPoint_2007_XML_AutoPlay\
+- impress_MS_PowerPoint_2007_XML_Template
++ impress_MS_PowerPoint_2007_XML_Template\
++ impress_OOXML\
++ impress_OOXML_Template
+
+ # -----------------------------------------------
+ # count = 12
+@@ -47,7 +51,8 @@ F4_UI_IMPRESS = \
+ impress8_template_ui \
+ impress8_draw_ui \
+ impress_MS_PowerPoint_2007_XML_ui \
+- impress_MS_PowerPoint_2007_XML_Template_ui
++ impress_OOXML_ui\
++ impress_OOXML_Template_ui
+
+ # -----------------------------------------------
+ # count = 0
+diff --git filter/source/config/fragments/fcfg_writer.mk filter/source/config/fragments/fcfg_writer.mk
+index 34d785f..930e2bd 100644
+--- filter/source/config/fragments/fcfg_writer.mk
++++ filter/source/config/fragments/fcfg_writer.mk
+@@ -30,7 +30,9 @@ T4_WRITER = \
+ writer8 \
+ writer_MS_Word_2003_XML \
+ writer_MS_Word_2007_XML \
+- writer_MS_Word_2007_XML_Template
++ writer_MS_Word_2007_XML_Template \
++ writer_OOXML \
++ writer_OOXML_Template
+
+ # -----------------------------------------------
+ # count = 39
+@@ -62,7 +64,9 @@ F4_WRITER = \
+ writer8_template \
+ MS_Word_2003_XML \
+ MS_Word_2007_XML \
+- MS_Word_2007_XML_Template
++ MS_Word_2007_XML_Template \
++ OOXML_Text \
++ OOXML_Text_Template
+
+ # -----------------------------------------------
+ # count = 14
+@@ -78,7 +82,9 @@ F4_UI_WRITER = \
+ writer8_template_ui \
+ MS_Word_2003_XML_ui \
+ MS_Word_2007_XML_ui \
+- MS_Word_2007_XML_Template_ui
++ MS_Word_2007_XML_Template_ui \
++ OOXML_Text_ui \
++ OOXML_Text_Template_ui
+
+ # -----------------------------------------------
+ # count = 0
+diff --git filter/source/config/fragments/filters/OOXML_Text.xcu filter/source/config/fragments/filters/OOXML_Text.xcu
+new file mode 100644
+index 0000000..9943af5
+--- /dev/null
++++ filter/source/config/fragments/filters/OOXML_Text.xcu
+@@ -0,0 +1,14 @@
++ <node oor:name="Office Open XML Text" oor:op="replace">
++ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
++ <prop oor:name="UIComponent"/>
++ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
++ <prop oor:name="UserData"><value></value></prop>
++ <prop oor:name="UIName">
++ <value xml:lang="x-default">Office Open XML Text</value>
++ </prop>
++ <!-- ISO/IEC 29500:2008 -->
++ <prop oor:name="FileFormatVersion"><value>1</value></prop>
++ <prop oor:name="Type"><value>writer_OOXML</value></prop>
++ <prop oor:name="TemplateName"/>
++ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
++ </node>
+diff --git filter/source/config/fragments/filters/OOXML_Text_Template.xcu filter/source/config/fragments/filters/OOXML_Text_Template.xcu
+new file mode 100644
+index 0000000..ffc9dfd
+--- /dev/null
++++ filter/source/config/fragments/filters/OOXML_Text_Template.xcu
+@@ -0,0 +1,14 @@
++ <node oor:name="Office Open XML Text Template" oor:op="replace">
++ <prop oor:name="Flags"><value>IMPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH</value></prop>
++ <prop oor:name="UIComponent"/>
++ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
++ <prop oor:name="UserData"><value></value></prop>
++ <prop oor:name="UIName">
++ <value xml:lang="x-default">Office Open XML Text Template</value>
++ </prop>
++ <!-- ISO/IEC 29500:2008 -->
++ <prop oor:name="FileFormatVersion"><value>1</value></prop>
++ <prop oor:name="Type"><value>writer_OOXML_Text_Template</value></prop>
++ <prop oor:name="TemplateName"/>
++ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
++ </node>
+diff --git filter/source/config/fragments/filters/OOXML_Text_Template_ui.xcu filter/source/config/fragments/filters/OOXML_Text_Template_ui.xcu
+new file mode 100644
+index 0000000..e790fb7
+--- /dev/null
++++ filter/source/config/fragments/filters/OOXML_Text_Template_ui.xcu
+@@ -0,0 +1,6 @@
++ <node oor:name="Office Open XML Text Template">
++ <prop oor:name="UIName">
++ <value xml:lang="en-US">Office Open XML Text Template</value>
++ <value xml:lang="de">Office Open XML Text Vorlage</value>
++ </prop>
++ </node>
+diff --git filter/source/config/fragments/filters/OOXML_Text_ui.xcu filter/source/config/fragments/filters/OOXML_Text_ui.xcu
+new file mode 100644
+index 0000000..483f23d
+--- /dev/null
++++ filter/source/config/fragments/filters/OOXML_Text_ui.xcu
+@@ -0,0 +1,6 @@
++ <node oor:name="Office Open XML Text">
++ <prop oor:name="UIName">
++ <value xml:lang="en-US">Office Open XML Text</value>
++ <value xml:lang="de">Office Open XML Text</value>
++ </prop>
++ </node>
+diff --git filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
+index c8cf6d1..eb9fea6 100644
+--- filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
++++ filter/source/config/fragments/filters/impress_MS_PowerPoint_2007_XML_Template.xcu
+@@ -3,6 +3,7 @@
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
+ <prop oor:name="UserData"/>
++ <prop oor:name="UIName"><value xml:lang="x-default">Microsoft PowerPoint 2007 XML Template</value></prop>
+ <prop oor:name="FileFormatVersion"/>
+ <prop oor:name="Type"><value>MS PowerPoint 2007 XML Template</value></prop>
+ <prop oor:name="TemplateName"/>
+diff --git filter/source/config/fragments/filters/impress_OOXML.xcu filter/source/config/fragments/filters/impress_OOXML.xcu
+new file mode 100644
+index 0000000..d1a5adb
+--- /dev/null
++++ filter/source/config/fragments/filters/impress_OOXML.xcu
+@@ -0,0 +1,12 @@
++<node oor:name="Impress Office Open XML" oor:op="replace">
++ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER PREFERRED</value></prop>
++ <prop oor:name="UIComponent"/>
++ <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
++ <prop oor:name="UserData"><value>OOXML</value></prop>
++ <prop oor:name="UIName"><value xml:lang="x-default">Office Open XML Presentation</value></prop>
++ <!-- ISO/IEC 29500:2008 -->
++ <prop oor:name="FileFormatVersion"><value>1</value></prop>
++ <prop oor:name="Type"><value>Office Open XML Presentation</value></prop>
++ <prop oor:name="TemplateName"/>
++ <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
++</node>
+diff --git filter/source/config/fragments/filters/impress_OOXML_Template.xcu filter/source/config/fragments/filters/impress_OOXML_Template.xcu
+new file mode 100644
+index 0000000..e9febe1
+--- /dev/null
++++ filter/source/config/fragments/filters/impress_OOXML_Template.xcu
+@@ -0,0 +1,12 @@
++<node oor:name="Impress Office Open XML Template" oor:op="replace">
++ <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER TEMPLATE TEMPLATEPATH PREFERRED</value></prop>
++ <prop oor:name="UIComponent"/>
++ <prop oor:name="FilterService"><value>com.sun.star.comp.Impress.oox.PowerPointImport</value></prop>
++ <prop oor:name="UserData"><value>OOXML</value></prop>
++ <prop oor:name="UIName"><value xml:lang="x-default">Office Open XML Presentation Template</value></prop>
++ <!-- ISO/IEC 29500:2008 -->
++ <prop oor:name="FileFormatVersion"><value>1</value></prop>
++ <prop oor:name="Type"><value>Office Open XML Presentation Template</value></prop>
++ <prop oor:name="TemplateName"/>
++ <prop oor:name="DocumentService"><value>com.sun.star.presentation.PresentationDocument</value></prop>
++</node>
+diff --git filter/source/config/fragments/filters/impress_OOXML_Template_ui.xcu filter/source/config/fragments/filters/impress_OOXML_Template_ui.xcu
+new file mode 100644
+index 0000000..f33346d
+--- /dev/null
++++ filter/source/config/fragments/filters/impress_OOXML_Template_ui.xcu
+@@ -0,0 +1,5 @@
++<node oor:name="Office Open XML Presentation Template">
++ <prop oor:name="UIName">
++ <value xml:lang="en-US">Office Open XML Presentation Template</value>
++ </prop>
++</node>
+diff --git filter/source/config/fragments/filters/impress_OOXML_ui.xcu filter/source/config/fragments/filters/impress_OOXML_ui.xcu
+new file mode 100644
+index 0000000..cadc369
+--- /dev/null
++++ filter/source/config/fragments/filters/impress_OOXML_ui.xcu
+@@ -0,0 +1,5 @@
++<node oor:name="Office Open XML Presentation">
++ <prop oor:name="UIName">
++ <value xml:lang="en-US">Office Open XML Presentation</value>
++ </prop>
++</node>
+diff --git filter/source/config/fragments/types/impress_OOXML_Presentation.xcu filter/source/config/fragments/types/impress_OOXML_Presentation.xcu
+new file mode 100644
+index 0000000..501f2e4
+--- /dev/null
++++ filter/source/config/fragments/types/impress_OOXML_Presentation.xcu
+@@ -0,0 +1,10 @@
++<node oor:name="Office Open XML Presentation" oor:op="replace">
++ <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
++ <prop oor:name="URLPattern"/>
++ <prop oor:name="Extensions"><value>pptx pptm</value></prop>
++ <prop oor:name="MediaType"/>
++ <prop oor:name="Preferred"><value>true</value></prop>
++ <prop oor:name="PreferredFilter"><value>Impress Office Open XML</value></prop>
++ <prop oor:name="UIName"><value>Office Open XML Presentation</value></prop>
++ <prop oor:name="ClipboardFormat"/>
++</node>
+diff --git filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu
+new file mode 100644
+index 0000000..c2ea660
+--- /dev/null
++++ filter/source/config/fragments/types/impress_OOXML_Presentation_Template.xcu
+@@ -0,0 +1,10 @@
++<node oor:name="Office Open XML Presentation Template" oor:op="replace">
++ <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
++ <prop oor:name="URLPattern"/>
++ <prop oor:name="Extensions"><value>potm potx</value></prop>
++ <prop oor:name="MediaType"/>
++ <prop oor:name="Preferred"><value>true</value></prop>
++ <prop oor:name="PreferredFilter"><value>Impress Office Open XML Template</value></prop>
++ <prop oor:name="UIName"><value>Office Open XML Presentation Template</value></prop>
++ <prop oor:name="ClipboardFormat"/>
++</node>
+diff --git filter/source/config/fragments/types/writer_OOXML.xcu filter/source/config/fragments/types/writer_OOXML.xcu
+new file mode 100644
+index 0000000..346b00e
+--- /dev/null
++++ filter/source/config/fragments/types/writer_OOXML.xcu
+@@ -0,0 +1,12 @@
++ <node oor:name="writer_OOXML" oor:op="replace" >
++ <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
++ <prop oor:name="URLPattern"/>
++ <prop oor:name="Extensions"><value>docx docm</value></prop>
++ <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.wordprocessingml.document</value></prop>
++ <prop oor:name="Preferred"><value>true</value></prop>
++ <prop oor:name="PreferredFilter"><value>Office Open XML Text</value></prop>
++ <prop oor:name="UIName">
++ <value>Office Open XML Text Document</value>
++ </prop>
++ <prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
++ </node>
+diff --git filter/source/config/fragments/types/writer_OOXML_Template.xcu filter/source/config/fragments/types/writer_OOXML_Template.xcu
+new file mode 100644
+index 0000000..566e08d
+--- /dev/null
++++ filter/source/config/fragments/types/writer_OOXML_Template.xcu
+@@ -0,0 +1,12 @@
++ <node oor:name="writer_OOXML_Text_Template" oor:op="replace" >
++ <prop oor:name="DetectService"><value>com.sun.star.comp.oox.FormatDetector</value></prop>
++ <prop oor:name="URLPattern"/>
++ <prop oor:name="Extensions"><value>dotx dotm</value></prop>
++ <prop oor:name="MediaType"><value>application/vnd.openxmlformats-officedocument.wordprocessingml.template</value></prop>
++ <prop oor:name="Preferred"><value>true</value></prop>
++ <prop oor:name="PreferredFilter"><value>Office Open XML Text Template</value></prop>
++ <prop oor:name="UIName">
++ <value>Office Open XML Text Template</value>
++ </prop>
++ <prop oor:name="ClipboardFormat"><value>MSWordDoc</value></prop>
++ </node>
+diff --git oox/inc/oox/core/filterbase.hxx oox/inc/oox/core/filterbase.hxx
+index 3f3eb3c..d54e1b2 100644
+--- oox/inc/oox/core/filterbase.hxx
++++ oox/inc/oox/core/filterbase.hxx
+@@ -74,6 +74,12 @@ namespace core {
+
+ // ============================================================================
+
++enum OoxmlVersion
++{
++ ECMA_DIALECT,
++ ISOIEC_29500_2008
++};
++
+ struct FilterBaseImpl;
+
+ typedef ::cppu::WeakImplHelper5<
+@@ -97,6 +103,8 @@ public:
+ /** Returns true, if filter is an export filter. */
+ bool isExportFilter() const;
+
++ OoxmlVersion getVersion( );
++
+ /** Derived classes implement import of the entire document. */
+ virtual bool importDocument() = 0;
+
+diff --git oox/source/core/filterbase.cxx oox/source/core/filterbase.cxx
+index a5c1222..b84cfdd 100755
+--- oox/source/core/filterbase.cxx
++++ oox/source/core/filterbase.cxx
+@@ -28,6 +28,7 @@
+ #include "oox/core/filterbase.hxx"
+ #include <set>
+ #include <com/sun/star/awt/XDevice.hpp>
++#include <com/sun/star/container/XNameAccess.hpp>
+ #include <com/sun/star/frame/XFramesSupplier.hpp>
+ #include <com/sun/star/frame/XModel.hpp>
+ #include <com/sun/star/task/XStatusIndicator.hpp>
+@@ -68,6 +69,7 @@ using ::com::sun::star::io::XStream;
+ using ::com::sun::star::task::XStatusIndicator;
+ using ::com::sun::star::task::XInteractionHandler;
+ using ::com::sun::star::graphic::XGraphic;
++using ::com::sun::star::container::XNameAccess;
+ using ::comphelper::MediaDescriptor;
+ using ::comphelper::SequenceAsHashMap;
+ using ::oox::ole::OleObjectHelper;
+@@ -147,6 +149,7 @@ struct FilterBaseImpl
+ DeviceInfo maDeviceInfo;
+ OUString maFileUrl;
+ StorageRef mxStorage;
++ OoxmlVersion meVersion;
+
+ GraphicHelperRef mxGraphicHelper; /// Graphic and graphic object handling.
+ ModelObjHelperRef mxModelObjHelper; /// Tables to create new named drawing objects.
+@@ -175,6 +178,7 @@ struct FilterBaseImpl
+
+ FilterBaseImpl::FilterBaseImpl( const Reference< XMultiServiceFactory >& rxGlobalFactory ) :
+ meDirection( FILTERDIRECTION_UNKNOWN ),
++ meVersion( ECMA_DIALECT ),
+ mxGlobalFactory( rxGlobalFactory )
+ {
+ OSL_ENSURE( mxGlobalFactory.is(), "FilterBaseImpl::FilterBaseImpl - missing service factory" );
+@@ -289,6 +293,11 @@ bool FilterBase::isExportFilter() const
+ return mxImpl->meDirection == FILTERDIRECTION_EXPORT;
+ }
+
++OoxmlVersion FilterBase::getVersion( )
++{
++ return mxImpl->meVersion;
++}
++
+ // ----------------------------------------------------------------------------
+
+ Any FilterBase::getArgument( const OUString& rArgName ) const
+@@ -666,6 +675,25 @@ void FilterBase::setMediaDescriptor( const Sequence< PropertyValue >& rMediaDesc
+ mxImpl->maFileUrl = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() );
+ mxImpl->mxStatusIndicator = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >() );
+ mxImpl->mxInteractionHandler = mxImpl->maMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_INTERACTIONHANDLER(), Reference< XInteractionHandler >() );
++
++ // Check for ISO OOXML
++ OUString sFilterName = mxImpl->maMediaDesc.getUnpackedValueOrDefault( CREATE_OUSTRING( "FilterName" ), OUString() );
++ try
++ {
++ Reference< XNameAccess > xFilters( getGlobalFactory()->createInstance(
++ CREATE_OUSTRING( "com.sun.star.document.FilterFactory" ) ), UNO_QUERY_THROW );
++ Any aValues = xFilters->getByName( sFilterName );
++ Sequence<PropertyValue > aPropSeq;
++ aValues >>= aPropSeq;
++ SequenceAsHashMap aProps( aPropSeq );
++
++ sal_Int32 nVersion = aProps.getUnpackedValueOrDefault( CREATE_OUSTRING( "FileFormatVersion" ), sal_Int32( 0 ) );
++ mxImpl->meVersion = OoxmlVersion( nVersion );
++ }
++ catch ( Exception& )
++ {
++ // Not ISO OOXML
++ }
+ }
+
+
More information about the ooo-build-commit
mailing list