[Libreoffice-commits] .: 3 commits - bin/setup.in configure.in download.in download_tests_dependencies.sh patches/dev300 test/ooxml

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Tue Nov 16 07:34:38 PST 2010


 bin/setup.in                     |    1 
 configure.in                     |   11 -
 download.in                      |    5 
 download_tests_dependencies.sh   |   20 --
 patches/dev300/apply             |    1 
 patches/dev300/iso-ooxml-sw.diff |  345 ---------------------------------------
 test/ooxml/download.sh           |   22 --
 test/ooxml/run.sh                |   34 +++
 8 files changed, 32 insertions(+), 407 deletions(-)

New commits:
commit 520b82434bf1ae5814d0230356014bde52024ae1
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Nov 15 09:55:31 2010 +0100

    Misc OOXML automated tests fixes

diff --git a/test/ooxml/run.sh b/test/ooxml/run.sh
index c7cf53d..fa84b92 100755
--- a/test/ooxml/run.sh
+++ b/test/ooxml/run.sh
@@ -6,6 +6,7 @@ TOOLSDIR=$2
 . $TOOLSDIR/bin/setup >/dev/null 2>&1
 
 LOGS=`dirname $0`/log
+OUTDIR=`dirname $0`/out
 
 function get_deps()
 {
@@ -44,7 +45,7 @@ function validate()
     # Need to save a log for each file and a summary log
     STATUS="FAILED"
     RESULT=0
-    LINES_COUNT='cat $FILE_LOG | wc -l'
+    LINES_COUNT=`cat $FILE_LOG | wc -l`
     if test "$LINES_COUNT" == "0"; then
         STATUS="PASSED"
         RESULT=1
@@ -63,6 +64,11 @@ TEST_FILES_DIR=$CLONEDIR/test-files
 cd $TEST_FILES_DIR && make
 cd $OLDPWD
 
+# Load and save the test files
+soffice.bin -convert-to docx:"Office Open XML Text" -outdir $OUTDIR $TEST_FILES_DIR/ooxml-strict/tmp/*.docx
+soffice.bin -convert-to xlsx:"Calc Office Open XML" -outdir $OUTDIR $TEST_FILES_DIR/ooxml-strict/tmp/*.xslx
+soffice.bin -convert-to pptx:"Impress Office Open XML" -outdir $OUTDIR $TEST_FILES_DIR/ooxml-strict/tmp/*.pptx
+
 # Validate the test files
 RESULT=0
 for f in `ls $TEST_FILES_DIR/ooxml-strict/tmp`; do
commit 72654e8045670a7778e3fca99fd97484cd7c089e
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Nov 15 09:55:13 2010 +0100

    iso-ooxml-sw.diff: Moved to git repos

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 105a76a..0b0d96d 100755
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2136,7 +2136,6 @@ system-lpsolve-link-with-colamd.diff, rengelha
 
 [ OOXMLExport ]
 oox-pptx-export-update-to-ooo320.diff, rodo
-iso-ooxml-sw.diff, cbosdo
 
 [ OOXMLExportDevel ]
 # this s shared binary/ooxml filter
diff --git a/patches/dev300/iso-ooxml-sw.diff b/patches/dev300/iso-ooxml-sw.diff
deleted file mode 100644
index 3561904..0000000
--- a/patches/dev300/iso-ooxml-sw.diff
+++ /dev/null
@@ -1,345 +0,0 @@
-Changes to make Docx export fit ISO specs
-
-From: Cédric Bosdonnat <cedricbosdo at openoffice.org>
-
-
----
-
- sw/source/filter/ww8/docxattributeoutput.cxx |  109 ++++++++++++++++++--------
- sw/source/filter/ww8/docxexport.hxx          |    3 +
- 2 files changed, 80 insertions(+), 32 deletions(-)
-
-
-diff --git sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.cxx
-index 13e735f..55612c1 100644
---- sw/source/filter/ww8/docxattributeoutput.cxx
-+++ sw/source/filter/ww8/docxattributeoutput.cxx
-@@ -27,6 +27,7 @@
- 
- #include "docxattributeoutput.hxx"
- #include "docxexport.hxx"
-+#include "docxexportfilter.hxx"
- #include "docxfootnotes.hxx"
- #include "writerwordglue.hxx"
- #include "wrtww8.hxx"
-@@ -1173,16 +1174,19 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
-     pSerializer->singleElementNS( XML_w, elementToken, xAttrs );
- }
- 
--static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox )
-+static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, bool bUseStartEnd = false )
- {
-     static const USHORT aBorders[] =
-     {
-         BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
-     };
- 
--    static const USHORT aXmlElements[] = 
-+    const USHORT aXmlElements[] = 
-     {
--        XML_top, XML_left, XML_bottom, XML_right
-+        XML_top,
-+        bUseStartEnd ? XML_start : XML_left,
-+        XML_bottom,
-+        bUseStartEnd ? XML_end : XML_right
-     };
-     const USHORT* pBrd = aBorders;
-     for( int i = 0; i < 4; ++i, ++pBrd )
-@@ -1198,11 +1202,14 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
-     m_pSerializer->startElementNS( XML_w, XML_tcPr, FSEND );
- 
-     const SwTableBox *pTblBox = pTableTextNodeInfoInner->getTableBox( );
-+    
-+    DocxExport& rExport = dynamic_cast< DocxExport& >( GetExport() );
-+    bool bEcma = rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
- 
-     // The cell borders
-     m_pSerializer->startElementNS( XML_w, XML_tcBorders, FSEND );
-     SwFrmFmt *pFmt = pTblBox->GetFrmFmt( );
--    impl_pageBorders( m_pSerializer, pFmt->GetBox( ) );
-+    impl_pageBorders( m_pSerializer, pFmt->GetBox( ), !bEcma );
-     m_pSerializer->endElementNS( XML_w, XML_tcBorders );
- 
-     // Vertical merges
-@@ -1248,9 +1255,12 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
-         BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
-     };
- 
--    static const USHORT aXmlElements[] = 
-+    const USHORT aXmlElements[] = 
-     {
--        XML_top, XML_left, XML_bottom, XML_right
-+        XML_top, 
-+        bEcma ? XML_left : XML_start, 
-+        XML_bottom, 
-+        bEcma ? XML_right : XML_end
-     };
-     const USHORT* pBrd = aBorders;
-     for( int i = 0; i < 4; ++i, ++pBrd )
-@@ -1368,6 +1378,9 @@ void DocxAttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t /*
- 
- void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
- {
-+    DocxExport& rExport = dynamic_cast< DocxExport& >( GetExport() );
-+    bool bEcma = rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
-+
-     // Write the table properties
-     m_pSerializer->startElementNS( XML_w, XML_tblPr, FSEND );
- 
-@@ -1399,13 +1412,19 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
-             pJcVal = "center";
-             break;
-         case text::HoriOrientation::RIGHT:
--            pJcVal = "right";
-+            if ( bEcma )
-+                pJcVal = "right";
-+            else
-+                pJcVal = "end";
-             break;
-         default:
-         case text::HoriOrientation::NONE:
-         case text::HoriOrientation::LEFT_AND_WIDTH:
-         {
--            pJcVal = "left";
-+            if ( bEcma )
-+                pJcVal = "left";
-+            else
-+                pJcVal = "start";
-             nIndent = sal_Int32( pTblFmt->GetLRSpace( ).GetLeft( ) );
-             break;
-         }
-@@ -1441,9 +1460,12 @@ void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Point
-     const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox();
-     const SwFrmFmt * pFrmFmt = pTabBox->GetFrmFmt();
- 
-+    DocxExport& rExport = dynamic_cast< DocxExport& >( GetExport() );
-+    bool bEcma = rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
-+
-     // the defaults of the table are taken from the top-left cell
-     m_pSerializer->startElementNS( XML_w, XML_tblBorders, FSEND );
--    impl_pageBorders( m_pSerializer, pFrmFmt->GetBox( ) );
-+    impl_pageBorders( m_pSerializer, pFrmFmt->GetBox( ), !bEcma );
-     m_pSerializer->endElementNS( XML_w, XML_tblBorders );
- }
- 
-@@ -1499,7 +1521,7 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p
-     const SwFrmFmt * pLineFmt = pTabLine->GetFrmFmt();
- 
-     const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( );
--    const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "on" : "off";
-+    const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "true" : "false";
- 
-     m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
-            FSNS( XML_w, XML_val ), pCantSplit,
-@@ -1514,7 +1536,7 @@ void DocxAttributeOutput::TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTabl
-     if ( m_rExport.TrueFrameDirection( *pFrmFmt ) == FRMDIR_HORI_RIGHT_TOP )
-     {
-         m_pSerializer->singleElementNS( XML_w, XML_bidiVisual,
--                FSNS( XML_w, XML_val ), "on",
-+                FSNS( XML_w, XML_val ), "true",
-                 FSEND );
-     }
- }
-@@ -1899,7 +1921,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
-         m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore, FSEND );
-     else
-         m_pSerializer->singleElementNS( XML_w, XML_pageBreakBefore,
--                FSNS( XML_w, XML_val ), "off",
-+                FSNS( XML_w, XML_val ), "false",
-                 FSEND );
- }
- 
-@@ -1975,7 +1997,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
-         m_pSerializer->singleElementNS( XML_w, XML_formProt, FSEND );
-     else
-         m_pSerializer->singleElementNS( XML_w, XML_formProt,
--                FSNS( XML_w, XML_val ), "off", FSEND );
-+                FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
-@@ -2323,8 +2345,8 @@ void DocxAttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
-             m_pSerializer->singleElementNS( XML_w, XML_caps, FSEND );
-             break;
-         default: // Something that ooxml does not support
--            m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSNS( XML_w, XML_val ), "off", FSEND );
--            m_pSerializer->singleElementNS( XML_w, XML_caps, FSNS( XML_w, XML_val ), "off", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_smallCaps, FSNS( XML_w, XML_val ), "false", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_caps, FSNS( XML_w, XML_val ), "false", FSEND );
-             break;
-     }
- }
-@@ -2345,7 +2367,7 @@ void DocxAttributeOutput::CharContour( const SvxContourItem& rContour )
-     if ( rContour.GetValue() )
-         m_pSerializer->singleElementNS( XML_w, XML_outline, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_outline, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_outline, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
-@@ -2356,8 +2378,8 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
-             m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSEND );
-             break;
-         case STRIKEOUT_NONE:
--            m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSNS( XML_w, XML_val ), "off", FSEND );
--            m_pSerializer->singleElementNS( XML_w, XML_strike, FSNS( XML_w, XML_val ), "off", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_dstrike, FSNS( XML_w, XML_val ), "false", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_strike, FSNS( XML_w, XML_val ), "false", FSEND );
-             break;
-         default:
-             m_pSerializer->singleElementNS( XML_w, XML_strike, FSEND );
-@@ -2466,7 +2488,7 @@ void DocxAttributeOutput::CharPosture( const SvxPostureItem& rPosture )
-     if ( rPosture.GetPosture() != ITALIC_NONE )
-         m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharShadow( const SvxShadowedItem& rShadow )
-@@ -2474,7 +2496,7 @@ void DocxAttributeOutput::CharShadow( const SvxShadowedItem& rShadow )
-     if ( rShadow.GetValue() )
-         m_pSerializer->singleElementNS( XML_w, XML_shadow, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_shadow, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_shadow, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
-@@ -2511,7 +2533,7 @@ void DocxAttributeOutput::CharWeight( const SvxWeightItem& rWeight )
-     if ( rWeight.GetWeight() == WEIGHT_BOLD )
-         m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharAutoKern( const SvxAutoKernItem& )
-@@ -2549,7 +2571,7 @@ void DocxAttributeOutput::CharPostureCJK( const SvxPostureItem& rPosture )
-     if ( rPosture.GetPosture() != ITALIC_NONE )
-         m_pSerializer->singleElementNS( XML_w, XML_i, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_i, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight )
-@@ -2557,7 +2579,7 @@ void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight )
-     if ( rWeight.GetWeight() == WEIGHT_BOLD )
-         m_pSerializer->singleElementNS( XML_w, XML_b, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_b, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharFontCTL( const SvxFontItem& rFont )
-@@ -2575,7 +2597,7 @@ void DocxAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture)
-     if ( rPosture.GetPosture() != ITALIC_NONE )
-         m_pSerializer->singleElementNS( XML_w, XML_iCs, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_iCs, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_iCs, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
-@@ -2583,7 +2605,7 @@ void DocxAttributeOutput::CharWeightCTL( const SvxWeightItem& rWeight )
-     if ( rWeight.GetWeight() == WEIGHT_BOLD )
-         m_pSerializer->singleElementNS( XML_w, XML_bCs, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_bCs, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_bCs, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::CharRotate( const SvxCharRotateItem& rRotate)
-@@ -2661,8 +2683,8 @@ void DocxAttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
-             m_pSerializer->singleElementNS( XML_w, XML_imprint, FSEND );
-             break;
-         default:
--            m_pSerializer->singleElementNS( XML_w, XML_emboss, FSNS( XML_w, XML_val ), "off", FSEND );
--            m_pSerializer->singleElementNS( XML_w, XML_imprint, FSNS( XML_w, XML_val ), "off", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_emboss, FSNS( XML_w, XML_val ), "false", FSEND );
-+            m_pSerializer->singleElementNS( XML_w, XML_imprint, FSNS( XML_w, XML_val ), "false", FSEND );
-             break;
-     }
- }
-@@ -2672,7 +2694,7 @@ void DocxAttributeOutput::CharHidden( const SvxCharHiddenItem& rHidden )
-     if ( rHidden.GetValue() )
-         m_pSerializer->singleElementNS( XML_w, XML_vanish, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_vanish, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_vanish, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- void DocxAttributeOutput::TextINetFormat( const SwFmtINetFmt& rLink )
-@@ -2932,13 +2954,36 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
- {
-     const char *pAdjustString;
- 
-+    DocxExport& rExport = dynamic_cast< DocxExport& >( GetExport() );
-+    bool bEcma = rExport.GetFilter().getVersion( ) == oox::core::ECMA_DIALECT;
-+
-+    const SfxItemSet* pItems = rExport.GetCurItemSet();
-+    const SvxFrameDirectionItem* rFrameDir = static_cast< const SvxFrameDirectionItem* >( pItems->GetItem( RES_FRAMEDIR ) );
-+
-+    bool bRtl = false;
-+    short nDir = rFrameDir->GetValue();
-+    bRtl = ( nDir == FRMDIR_HORI_RIGHT_TOP );
-+    
-+    if ( nDir == FRMDIR_ENVIRONMENT )
-+        nDir = GetExport( ).GetDefaultFrameDirection( );
-+
-     switch ( rAdjust.GetAdjust() )
-     {
-         case SVX_ADJUST_LEFT:
--            pAdjustString = "left";
-+            if ( bEcma )
-+                pAdjustString = "left";
-+            else if ( bRtl )
-+                pAdjustString = "end";
-+            else
-+                pAdjustString = "start";
-             break;
-         case SVX_ADJUST_RIGHT:
--            pAdjustString = "right";
-+            if ( bEcma )
-+                pAdjustString = "right";
-+            else if ( bRtl )
-+                pAdjustString = "start";
-+            else
-+                pAdjustString = "end";
-             break;
-         case SVX_ADJUST_BLOCKLINE:
-         case SVX_ADJUST_BLOCK:
-@@ -2956,7 +3001,7 @@ void DocxAttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
- void DocxAttributeOutput::ParaSplit( const SvxFmtSplitItem& rSplit )
- {
-     if (rSplit.GetValue())
--        m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSNS( XML_w, XML_val ), "false", FSEND );
-     else
-         m_pSerializer->singleElementNS( XML_w, XML_keepLines, FSEND );
- }
-@@ -2966,7 +3011,7 @@ void DocxAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
-     if (rWidows.GetValue())
-         m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSEND );
-     else
--        m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "off", FSEND );
-+        m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "false", FSEND );
- }
- 
- static void impl_WriteTabElement( FSHelperPtr pSerializer,
-diff --git sw/source/filter/ww8/docxexport.hxx sw/source/filter/ww8/docxexport.hxx
-index 5873f95..8c6d3c6 100644
---- sw/source/filter/ww8/docxexport.hxx
-+++ sw/source/filter/ww8/docxexport.hxx
-@@ -85,6 +85,9 @@ class DocxExport : public MSWordExportBase
-     oox::vml::VMLExport *m_pVMLExport;
- 
- public:
-+
-+    DocxExportFilter& GetFilter() { return *m_pFilter; };
-+
-     /// Access to the attribute output class.
-     virtual AttributeOutputBase& AttrOutput() const;
- 
commit 09077677546bc66720a59359c1eb7ae869576c99
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Tue Nov 9 14:45:46 2010 +0100

    Scripts running tests on the files updated
    
     * No need for --enable-tests in the configure to run them
     * Don't download anything for the tests in download.sh
     * Updated the script to run

diff --git a/bin/setup.in b/bin/setup.in
index a802598..de9917f 100755
--- a/bin/setup.in
+++ b/bin/setup.in
@@ -59,7 +59,6 @@ SPLIT_APP_MODULES='@SPLIT_APP_MODULES@'
 SPLIT_OPT_FEATURES='@SPLIT_OPT_FEATURES@'
 RUN_POST_INSTALL_SCRIPTS='@RUN_POST_INSTALL_SCRIPTS@'
 DEFUZZ_PATCHES='@DEFUZZ_PATCHES@'
-TESTS='@TESTS@'
 TOOLSDIR='@TOOLSDIR@'
 ENABLE_ODK='@ENABLE_ODK@'
 USE_PREBUILD_UNOWINREG_DLL='@USE_PREBUILD_UNOWINREG_DLL@'
diff --git a/configure.in b/configure.in
index c2a2a01..eb318ce 100755
--- a/configure.in
+++ b/configure.in
@@ -197,11 +197,6 @@ AC_ARG_ENABLE(strip,
                           debugging symbols are not removed.],
 ,)
 
-AC_ARG_ENABLE(tests,
-[
-  --enable-tests          Enables the execution of the tests.],
-,)
-
 dnl ===================================================================
 dnl Optional Packages (--with/without-)
 dnl ===================================================================
@@ -1078,12 +1073,6 @@ if test "z$enable_post_install_scripts" = "zno"; then
 fi
 AC_SUBST(RUN_POST_INSTALL_SCRIPTS)
 
-TESTS="NO"
-if test "z$enable_tests" = "zyes"; then
-    TESTS="YES"
-fi
-AC_SUBST(TESTS)
-
 DEFUZZ_PATCHES="NO"
 if test "z$enable_defuzz_patches" = "zyes"; then
     DEFUZZ_PATCHES="YES"
diff --git a/download.in b/download.in
index 8e78c10..fbe7f3d 100755
--- a/download.in
+++ b/download.in
@@ -641,11 +641,6 @@ if ($download_all ||
     source_file_ooo( "sdk" );
 }
 
-# Test Dependencies
-if ('@TESTS@' eq 'YES') {
-    download_tests_dependencies();
-}
-
 download_files (\@files, \%SRC_URLS, '@SRCDIR@');
 
 download_external_sources();
diff --git a/download_tests_dependencies.sh b/download_tests_dependencies.sh
deleted file mode 100755
index 0e2adbf..0000000
--- a/download_tests_dependencies.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Loop over the test folders and run the download.sh script if any
-
-echo "Downloading test dependencies"
-
-TESTDIR=./test/
-
-for t in `ls -1 $TESTDIR`
-do
-    # Is there a run.sh executable script inside?
-    if test -x $TESTDIR/$t/download.sh ; then
-        echo "Downloading dependencies for test $t"
-        sh $TESTDIR/$t/download.sh "$1"
-        if test $? != 0 ; then
-            echo "Failed to download dependencies for test $t!"
-            exit $?
-        fi
-    fi
-done
diff --git a/test/ooxml/download.sh b/test/ooxml/download.sh
deleted file mode 100755
index 02f3037..0000000
--- a/test/ooxml/download.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-SRCDIR=$1
-
-# The test data
-cd $SRCDIR/clone
-if test -d test-files ;then 
-    cd test-files
-    git fetch -t origin
-else
-    git clone git://anongit.freedesktop.org/ooo-build/contrib/test-files
-fi
-
-# OfficeOTron
-# TODO Replace by the SVN copy once the patch is integrated upstream
-#      http://code.google.com/p/officeotron/issues/detail?id=6
-OFFICEOTRON=officeotron-0.5.5-Beta.jar
-OFFICEOTRONMD5=7b70b7955b7289a8d1502e9c0abf8302
-if test ! -a $SRCDIR/$OFFICEOTRON ; then
-    cd $SRCDIR
-    wget "http://download.go-oo.org/$OFFICEOTRONMD5-$OFFICEOTRON" -O $OFFICEOTRON
-fi
diff --git a/test/ooxml/run.sh b/test/ooxml/run.sh
index 3690a80..c7cf53d 100755
--- a/test/ooxml/run.sh
+++ b/test/ooxml/run.sh
@@ -7,6 +7,27 @@ TOOLSDIR=$2
 
 LOGS=`dirname $0`/log
 
+function get_deps()
+{
+    # The test data
+    cd $CLONEDIR
+    if test -d test-files ;then
+        cd test-files
+        git pull -r
+    else
+        git clone $OOO_GIT/contrib/test-files
+    fi
+
+    # OfficeOTron
+    # TODO Replace by the SVN copy once the patch is integrated upstream
+    #      http://code.google.com/p/officeotron/issues/detail?id=6
+    OFFICEOTRON=officeotron-0.5.5-Beta.jar
+    OFFICEOTRONMD5=7b70b7955b7289a8d1502e9c0abf8302
+    if test ! -a $SRCDIR/$OFFICEOTRON ; then
+        cd $SRCDIR
+        wget "http://download.go-oo.org/$OFFICEOTRONMD5-$OFFICEOTRON" -O $OFFICEOTRON
+    fi
+}
 
 function validate()
 {
@@ -34,8 +55,11 @@ function validate()
     return $RESULT
 }
 
+# Make sure we have the dependencies
+get_deps
+
 # Generate the test files
-TEST_FILES_DIR=$SRCDIR/clone/test-files
+TEST_FILES_DIR=$CLONEDIR/test-files
 cd $TEST_FILES_DIR && make
 cd $OLDPWD
 


More information about the Libreoffice-commits mailing list