fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [10126] API: add PHPExcel


From: Sigurd Nes
Subject: [Fmsystem-commits] [10126] API: add PHPExcel
Date: Sun, 07 Oct 2012 17:05:17 +0000

Revision: 10126
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10126
Author:   sigurdne
Date:     2012-10-07 17:05:16 +0000 (Sun, 07 Oct 2012)
Log Message:
-----------
API: add PHPExcel

Added Paths:
-----------
    trunk/phpgwapi/inc/class.phpexcel.inc.php
    trunk/phpgwapi/inc/phpexcel/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Autoloader.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/APC.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/ICache.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Igbinary.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memory.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemoryGZip.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemorySerialized.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite3.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Wincache.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorageFactory.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Database.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/DateTime.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Engineering.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Exception.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/ExceptionHandler.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Financial.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/FormulaParser.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/FormulaToken.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Function.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Functions.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Logical.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/LookupRef.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/MathTrig.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Statistical.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/TextData.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/functionlist.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/AdvancedValueBinder.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/DataType.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/DataValidation.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/DefaultValueBinder.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/Hyperlink.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell/IValueBinder.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Cell.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/DataSeries.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/DataSeriesValues.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Layout.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Legend.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/PlotArea.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Renderer/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Renderer/PHP Charting 
Libraries.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Renderer/jpgraph.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart/Title.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Chart.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Comment.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/DocumentProperties.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/DocumentSecurity.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/HashTable.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/IComparable.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/IOFactory.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/NamedRange.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/CSV.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/DefaultReadFilter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel2003XML.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel2007/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel2007/Chart.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel2007/Theme.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel2007.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel5/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel5/Escher.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Excel5.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/Gnumeric.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/IReadFilter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/IReader.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/OOCalc.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Reader/SYLK.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/ReferenceHelper.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/RichText/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/RichText/ITextElement.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/RichText/Run.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/RichText/TextElement.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/RichText.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Settings.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/CodePage.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Date.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Drawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DgContainer/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DgContainer.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher/DggContainer.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Escher.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Excel5.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/File.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/Font.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/CHANGELOG.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/CholeskyDecomposition.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/LUDecomposition.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/Matrix.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/QRDecomposition.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/SingularValueDecomposition.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/docs.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/download.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/example.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/includes/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/includes/credits.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/includes/footer.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/includes/header.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/includes/navbar.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/index.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/package.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/docs/test.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/LMQuadTest.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/LagrangeInterpolation.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/LagrangeInterpolation2.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/LevenbergMarquardt.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/MagicSquareExample.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/Stats.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/benchmark.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/polyfit.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/examples/tile.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/tests/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/tests/TestMatrix.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/utils/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/utils/Error.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/JAMA/utils/Maths.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/ChainedBlockStream.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/PPS/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/PPS/File.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/PPS/Root.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE/PPS.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLE.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/OLERead.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PCLZip/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PCLZip/gnu-lgpl.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PCLZip/pclzip.lib.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PCLZip/readme.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/2dbarcodes.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/CHANGELOG.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/LICENSE.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/README.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/barcodes.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/cache/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/cache/chapter_demo_1.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/cache/chapter_demo_2.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/cache/table_data_demo.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/cache/utf8test.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/lang/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/lang/bra.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/lang/eng.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/lang/ger.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/lang/ita.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/tcpdf_config.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/config/tcpdf_config_alt.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/.noencode
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/README.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/ZarBold.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/ZarBold.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/almohanad.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/almohanad.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/almohanad.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/arialunicid0-chinese-simplified.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/arialunicid0-chinese-traditional.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/arialunicid0-japanese.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/arialunicid0-korean.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/arialunicid0.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/chinese.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/courier.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/AUTHORS
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/BUGS
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/LICENSE
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/NEWS
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/README
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/langcover.txt
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/status.txt
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavu-fonts-ttf-2.30/unicover.txt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusans.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusans.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusans.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansb.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansb.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansbi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansbi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansbi.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensed.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensed.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensed.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedb.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedb.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedbi.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedbi.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedbi.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedi.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusanscondensedi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmono.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmono.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmono.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonob.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonob.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonob.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonobi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonobi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonobi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonoi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonoi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavusansmonoi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserif.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserif.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserif.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifb.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifb.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifbi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifbi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifbi.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensed.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensed.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensed.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedb.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedb.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedb.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedbi.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedbi.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedbi.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedi.ctg.z
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedi.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifcondensedi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/dejavuserifi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/AUTHORS
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/COPYING
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/CREDITS
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/ChangeLog
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/INSTALL
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freefont-20090104/README
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemono.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemono.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemono.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonob.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonob.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonob.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonobi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonobi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonobi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonoi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonoi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freemonoi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesans.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesans.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesans.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansb.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansb.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansbi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansbi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansbi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freesansi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserif.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserif.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserif.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifb.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifb.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifbi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifbi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifbi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifi.ctg.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/freeserifi.z
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/helvetica.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/helveticab.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/helveticabi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/helveticai.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/hysmyeongjostdmedium.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/kozgopromedium.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/kozminproregular.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/msungstdlight.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/stsongstdlight.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/symbol.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/times.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/timesb.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/timesbi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/timesi.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/uni2cid_ac15.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/uni2cid_ag15.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/uni2cid_aj16.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/uni2cid_ak12.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/README.TXT
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1250.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1251.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1252.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1253.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1254.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1255.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1257.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp1258.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/cp874.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-1.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-11.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-15.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-16.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-2.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-4.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-5.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-7.map
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/iso-8859-9.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/koi8-r.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/enc/koi8-u.map
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/freetype6.dll
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/makeallttffonts.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/makefont.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/pfm2afm
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/pfm2afm.exe
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/src/
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/src/pfm2afm-src.tar.gz
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/src/readme.txt
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/src/ttf2ufm-src.tar.gz
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/ttf2ufm
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/ttf2ufm.exe
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/utils/zlib1.dll
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/zapfdingbats.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/fonts/zarbold.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/htmlcolors.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/_blank.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/alpha.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/bug.eps
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/image_demo.jpg
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/image_with_alpha.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/img.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/logo_example.gif
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/logo_example.jpg
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/logo_example.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/pelican.ai
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/tcpdf_cell.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/tcpdf_logo.jpg
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/tcpdf_signature.png
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/testsvg.svg
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/tiger.ai
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/images/tux.svg
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/pdf417.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/qrcode.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/tcpdf.crt
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/tcpdf.fdf
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/tcpdf.p12
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/tcpdf.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PDF/unicode_data.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/PasswordHasher.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/String.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/XMLWriter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/ZipArchive.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/ZipStreamWrapper.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/bestFitClass.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/exponentialBestFitClass.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/linearBestFitClass.php
    
trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/logarithmicBestFitClass.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/polynomialBestFitClass.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/powerBestFitClass.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Shared/trend/trendClass.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Alignment.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Border.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Borders.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Color.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Conditional.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Fill.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Font.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/NumberFormat.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style/Protection.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Style.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/BaseDrawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/CellIterator.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/ColumnDimension.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/Drawing/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/Drawing/Shadow.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/Drawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/HeaderFooter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/HeaderFooterDrawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/MemoryDrawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/PageMargins.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/PageSetup.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/Protection.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/Row.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/RowDimension.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/RowIterator.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet/SheetView.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Worksheet.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/WorksheetIterator.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/CSV.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Chart.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Comments.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/ContentTypes.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/DocProps.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Drawing.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Rels.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/StringTable.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Style.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Theme.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Workbook.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/Worksheet.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007/WriterPart.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel2007.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/BIFFwriter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Escher.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Font.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Parser.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Workbook.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Worksheet.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5/Xf.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/Excel5.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/HTML.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/IWriter.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/Writer/PDF.php
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/cs/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/cs/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/cs/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/da/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/da/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/da/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/de/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/de/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/de/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/en/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/en/uk/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/en/uk/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/es/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/es/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/es/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fi/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fi/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fi/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fr/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fr/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/fr/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/hu/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/hu/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/hu/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/it/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/it/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/it/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/nl/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/nl/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/nl/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/no/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/no/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/no/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pl/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pl/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pl/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/br/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/br/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/br/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/pt/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/ru/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/ru/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/ru/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/sv/
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/sv/config
    trunk/phpgwapi/inc/phpexcel/PHPExcel/locale/sv/functions
    trunk/phpgwapi/inc/phpexcel/PHPExcel.php
    trunk/phpgwapi/inc/phpexcel/install.txt
    trunk/phpgwapi/inc/phpexcel/license.txt

Added: trunk/phpgwapi/inc/class.phpexcel.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.phpexcel.inc.php                           (rev 0)
+++ trunk/phpgwapi/inc/class.phpexcel.inc.php   2012-10-07 17:05:16 UTC (rev 
10126)
@@ -0,0 +1,41 @@
+<?php
+       /**
+        * phpGroupWare
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.fsf.org/licenses/gpl.html GNU General Public 
License
+        * @package phpgroupware
+        * @subpackage phpgwapi
+        * @category utilities
+        * @version $Id$
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+       /**
+       * Document me!
+       *
+       * @package phpgwapi
+       * @subpackage utilities
+       */
+
+       /**
+       * Include the PHPExcel class
+       * @see PHPExcel
+       */
+       require_once PHPGW_API_INC . '/phpexcel/PHPExcel.php';
+


Property changes on: trunk/phpgwapi/inc/class.phpexcel.inc.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/Autoloader.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/Autoloader.php                         
(rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/Autoloader.php 2012-10-07 17:05:16 UTC 
(rev 10126)
@@ -0,0 +1,83 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+PHPExcel_Autoloader::Register();
+PHPExcel_Shared_ZipStreamWrapper::register();
+// check mbstring.func_overload
+if (ini_get('mbstring.func_overload') & 2) {
+    throw new Exception('Multibyte function overloading in PHP must be 
disabled for string functions (2).');
+}
+PHPExcel_Shared_String::buildCharacterSets();
+
+
+/**
+ * PHPExcel_Autoloader
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_Autoloader
+{
+       /**
+        * Register the Autoloader with SPL
+        *
+        */
+       public static function Register() {
+               if (function_exists('__autoload')) {
+                       //      Register any existing autoloader function with 
SPL, so we don't get any clashes
+                       spl_autoload_register('__autoload');
+               }
+               //      Register ourselves with SPL
+               return spl_autoload_register(array('PHPExcel_Autoloader', 
'Load'));
+       }       //      function Register()
+
+
+       /**
+        * Autoload a class identified by name
+        *
+        * @param       string  $pClassName             Name of the object to 
load
+        */
+       public static function Load($pClassName){
+               if ((class_exists($pClassName)) || (strpos($pClassName, 
'PHPExcel') !== 0)) {
+                       //      Either already loaded, or not a PHPExcel class 
request
+                       return FALSE;
+               }
+
+               $pObjectFilePath = PHPEXCEL_ROOT .
+                                                  
str_replace('_',DIRECTORY_SEPARATOR,$pClassName) .
+                                                  '.php';
+
+               if ((file_exists($pObjectFilePath) === false) || 
(is_readable($pObjectFilePath) === false)) {
+                       //      Can't load
+                       return FALSE;
+               }
+
+               require($pObjectFilePath);
+       }       //      function Load()
+
+}
\ No newline at end of file


Property changes on: trunk/phpgwapi/inc/phpexcel/PHPExcel/Autoloader.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/APC.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/APC.php            
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/APC.php    
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,285 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_APC
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_APC extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Prefix used to uniquely identify cache data for this worksheet
+        *
+        * @access      private
+        * @var string
+        */
+       private $_cachePrefix = null;
+
+       /**
+        * Cache timeout
+        *
+        * @access      private
+        * @var integer
+        */
+       private $_cacheTime = 600;
+
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @access      private
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       if 
(!apc_store($this->_cachePrefix.$this->_currentObjectID.'.cache',serialize($this->_currentObject),$this->_cacheTime))
 {
+                               $this->__destruct();
+                               throw new Exception('Failed to store cell 
'.$this->_currentObjectID.' in APC');
+                       }
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+        * @access      public
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+               $this->_cellCache[$pCoord] = true;
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+       /**
+        * Is a value set in the current PHPExcel_CachedObjectStorage_ICache 
for an indexed cell?
+        *
+        * @access      public
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      void
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               //      Check if the requested entry is the current object, or 
exists in the cache
+               if (parent::isDataSet($pCoord)) {
+                       if ($this->_currentObjectID == $pCoord) {
+                               return true;
+                       }
+                       //      Check if the requested entry still exists in apc
+                       $success = 
apc_fetch($this->_cachePrefix.$pCoord.'.cache');
+                       if ($success === false) {
+                               //      Entry no longer exists in APC, so clear 
it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in APC');
+                       }
+                       return true;
+               }
+               return false;
+       }       //      function isDataSet()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+        * @access      public
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (parent::isDataSet($pCoord)) {
+                       $obj = apc_fetch($this->_cachePrefix.$pCoord.'.cache');
+                       if ($obj === false) {
+                               //      Entry no longer exists in APC, so clear 
it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in APC');
+                       }
+               } else {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = unserialize($obj);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+        * @access      public
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord) {
+               //      Delete the entry from APC
+               apc_delete($this->_cachePrefix.$pCoord.'.cache');
+
+               //      Delete the entry from our cell address array
+               parent::deleteCacheData($pCoord);
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @access      public
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+               //      Get a new id for the new file name
+               $baseUnique = $this->_getUniqueID();
+               $newCachePrefix = substr(md5($baseUnique),0,8).'.';
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       if ($cellID != $this->_currentObjectID) {
+                               $obj = 
apc_fetch($this->_cachePrefix.$cellID.'.cache');
+                               if ($obj === false) {
+                                       //      Entry no longer exists in APC, 
so clear it from the cache array
+                                       parent::deleteCacheData($cellID);
+                                       throw new Exception('Cell entry 
'.$cellID.' no longer exists in APC');
+                               }
+                               if 
(!apc_store($newCachePrefix.$cellID.'.cache',$obj,$this->_cacheTime)) {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$cellID.' in APC');
+                               }
+                       }
+               }
+               $this->_cachePrefix = $newCachePrefix;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @access      public
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if ($this->_currentObject !== NULL) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+
+               //      Flush the APC cache
+               $this->__destruct();
+
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @access      public
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        * @param       array of mixed          $arguments      Additional 
initialisation arguments
+        */
+       public function __construct(PHPExcel_Worksheet $parent, $arguments) {
+               $cacheTime      = (isset($arguments['cacheTime']))      ? 
$arguments['cacheTime']       : 600;
+
+               if ($this->_cachePrefix === NULL) {
+                       $baseUnique = $this->_getUniqueID();
+                       $this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
+                       $this->_cacheTime = $cacheTime;
+
+                       parent::__construct($parent);
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        *
+        * @access      public
+        */
+       public function __destruct() {
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       apc_delete($this->_cachePrefix.$cellID.'.cache');
+               }
+       }       //      function __destruct()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @access      public
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!function_exists('apc_store')) {
+                       return false;
+               }
+               if (apc_sma_info() === false) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/APC.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php      
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php      
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,251 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_CacheBase
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_CacheBase {
+
+       /**
+        * Parent worksheet
+        *
+        * @var PHPExcel_Worksheet
+        */
+       protected $_parent;
+
+       /**
+        * The currently active Cell
+        *
+        * @var PHPExcel_Cell
+        */
+       protected $_currentObject = null;
+
+       /**
+        * Coordinate address of the currently active Cell
+        *
+        * @var string
+        */
+       protected $_currentObjectID = null;
+
+
+       /**
+        * Flag indicating whether the currently active Cell requires saving
+        *
+        * @var boolean
+        */
+       protected $_currentCellIsDirty = true;
+
+       /**
+        * An array of cells or cell pointers for the worksheet cells held in 
this cache,
+        *              and indexed by their coordinate address within the 
worksheet
+        *
+        * @var array of mixed
+        */
+       protected $_cellCache = array();
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        */
+       public function __construct(PHPExcel_Worksheet $parent) {
+               //      Set our parent worksheet.
+               //      This is maintained within the cache controller to 
facilitate re-attaching it to PHPExcel_Cell objects when
+               //              they are woken from a serialized state
+               $this->_parent = $parent;
+       }       //      function __construct()
+
+
+       /**
+        * Is a value set in the current PHPExcel_CachedObjectStorage_ICache 
for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return true;
+               }
+               //      Check if the requested entry exists in the cache
+               return isset($this->_cellCache[$pCoord]);
+       }       //      function isDataSet()
+
+
+    /**
+     * Add or Update a cell in cache
+     *
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function updateCacheData(PHPExcel_Cell $cell) {
+               return $this->addCacheData($cell->getCoordinate(),$cell);
+       }       //      function updateCacheData()
+
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       $this->_currentObject->detach();
+                       $this->_currentObjectID = $this->_currentObject = null;
+               }
+
+               if (is_object($this->_cellCache[$pCoord])) {
+                       $this->_cellCache[$pCoord]->detach();
+                       unset($this->_cellCache[$pCoord]);
+               }
+               $this->_currentCellIsDirty = false;
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Get a list of all cell addresses currently held in cache
+        *
+        * @return      array of string
+        */
+       public function getCellList() {
+               return array_keys($this->_cellCache);
+       }       //      function getCellList()
+
+
+       /**
+        * Sort the list of all cell addresses currently held in cache by row 
and column
+        *
+        * @return      void
+        */
+       public function getSortedCellList() {
+               $sortKeys = array();
+               foreach ($this->getCellList() as $coord) {
+                       list($column,$row) = sscanf($coord,'%[A-Z]%d');
+                       $sortKeys[sprintf('%09d%3s',$row,$column)] = $coord;
+               }
+               ksort($sortKeys);
+
+               return array_values($sortKeys);
+       }       //      function sortCellList()
+
+
+
+       /**
+        * Get highest worksheet column and highest row that have cell records
+        *
+        * @return array Highest column name and highest row number
+        */
+       public function getHighestRowAndColumn()
+       {
+               // Lookup highest column and highest row
+               $col = array('A' => '1A');
+               $row = array(1);
+               foreach ($this->getCellList() as $coord) {
+                       list($c,$r) = sscanf($coord,'%[A-Z]%d');
+                       $row[$r] = $r;
+                       $col[$c] = strlen($c).$c;
+               }
+               if (!empty($row)) {
+                       // Determine highest column and row
+                       $highestRow = max($row);
+                       $highestColumn = substr(max($col),1);
+               }
+               return array( 'row'        => $highestRow,
+                                         'column' => $highestColumn
+                                       );
+       }
+
+
+       /**
+        * Get highest worksheet column
+        *
+        * @return string Highest column name
+        */
+       public function getHighestColumn()
+       {
+               $colRow = $this->getHighestRowAndColumn();
+               return $colRow['column'];
+       }
+
+       /**
+        * Get highest worksheet row
+        *
+        * @return int Highest row number
+        */
+       public function getHighestRow()
+       {
+               $colRow = $this->getHighestRowAndColumn();
+               return $colRow['row'];
+       }
+
+
+       /**
+        * Generate a unique ID for cache referencing
+        *
+        * @return string Unique Reference
+        */
+       protected function _getUniqueID() {
+               if (function_exists('posix_getpid')) {
+                       $baseUnique = posix_getpid();
+               } else {
+                       $baseUnique = mt_rand();
+               }
+               return uniqid($baseUnique,true);
+       }
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               $this->_parent = $parent;
+               if (($this->_currentObject !== NULL) && 
(is_object($this->_currentObject))) {
+                       $this->_currentObject->attach($parent);
+               }
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/CacheBase.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php       
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,205 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_DiscISAM
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_DiscISAM extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Name of the file for this cache
+        *
+        * @var string
+        */
+       private $_fileName = null;
+
+       /**
+        * File handle for this cache file
+        *
+        * @var resource
+        */
+       private $_fileHandle = null;
+
+       /**
+        * Directory/Folder where the cache file is located
+        *
+        * @var string
+        */
+       private $_cacheDirectory = NULL;
+
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       fseek($this->_fileHandle,0,SEEK_END);
+                       $offset = ftell($this->_fileHandle);
+                       fwrite($this->_fileHandle, 
serialize($this->_currentObject));
+                       $this->_cellCache[$this->_currentObjectID]      = 
array('ptr' => $offset,
+                                                                               
                                                'sz'  => 
ftell($this->_fileHandle) - $offset
+                                                                               
                                           );
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']);
+               $this->_currentObject = 
unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz']));
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+               //      Get a new id for the new file name
+               $baseUnique = $this->_getUniqueID();
+               $newFileName = 
$this->_cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache';
+               //      Copy the existing cell cache file
+               copy ($this->_fileName,$newFileName);
+               $this->_fileName = $newFileName;
+               //      Open the copied cell cache file
+               $this->_fileHandle = fopen($this->_fileName,'a+');
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+
+               //      Close down the temporary cache file
+               $this->__destruct();
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        * @param       array of mixed          $arguments      Additional 
initialisation arguments
+        */
+       public function __construct(PHPExcel_Worksheet $parent, $arguments) {
+               $this->_cacheDirectory  = ((isset($arguments['dir'])) && 
($arguments['dir'] !== NULL))
+                                                                       ? 
$arguments['dir']
+                                                                       : 
PHPExcel_Shared_File::sys_get_temp_dir();
+
+               parent::__construct($parent);
+               if (is_null($this->_fileHandle)) {
+                       $baseUnique = $this->_getUniqueID();
+                       $this->_fileName = 
$this->_cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache';
+                       $this->_fileHandle = fopen($this->_fileName,'a+');
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               if (!is_null($this->_fileHandle)) {
+                       fclose($this->_fileHandle);
+                       unlink($this->_fileName);
+               }
+               $this->_fileHandle = null;
+       }       //      function __destruct()
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/DiscISAM.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/ICache.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/ICache.php         
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/ICache.php 
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,112 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_ICache
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+interface PHPExcel_CachedObjectStorage_ICache
+{
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell);
+
+    /**
+     * Add or Update a cell in cache
+     *
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function updateCacheData(PHPExcel_Cell $cell);
+
+    /**
+     * Fetch a cell from cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to retrieve
+     * @return PHPExcel_Cell   Cell that was found, or null if not found
+     * @throws Exception
+     */
+       public function getCacheData($pCoord);
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord);
+
+       /**
+        * Is a value set in the current PHPExcel_CachedObjectStorage_ICache 
for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      boolean
+        */
+       public function isDataSet($pCoord);
+
+       /**
+        * Get a list of all cell addresses currently held in cache
+        *
+        * @return      array of string
+        */
+       public function getCellList();
+
+       /**
+        * Get the list of all cell addresses currently held in cache sorted by 
column and row
+        *
+        * @return      void
+        */
+       public function getSortedCellList();
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent);
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable();
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/ICache.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Igbinary.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Igbinary.php       
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Igbinary.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,138 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_Igbinary
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_Igbinary extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $this->_cellCache[$this->_currentObjectID] = 
igbinary_serialize($this->_currentObject);
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = 
igbinary_unserialize($this->_cellCache[$pCoord]);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!function_exists('igbinary_serialize')) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Igbinary.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php       
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,298 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_Memcache
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_Memcache extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Prefix used to uniquely identify cache data for this worksheet
+        *
+        * @var string
+        */
+       private $_cachePrefix = null;
+
+       /**
+        * Cache timeout
+        *
+        * @var integer
+        */
+       private $_cacheTime = 600;
+
+       /**
+        * Memcache interface
+        *
+        * @var resource
+        */
+       private $_memcache = null;
+
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $obj = serialize($this->_currentObject);
+                       if 
(!$this->_memcache->replace($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime))
 {
+                               if 
(!$this->_memcache->add($this->_cachePrefix.$this->_currentObjectID.'.cache',$obj,NULL,$this->_cacheTime))
 {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$this->_currentObjectID.' in MemCache');
+                               }
+                       }
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+               $this->_cellCache[$pCoord] = true;
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+       /**
+        * Is a value set in the current PHPExcel_CachedObjectStorage_ICache 
for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      void
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               //      Check if the requested entry is the current object, or 
exists in the cache
+               if (parent::isDataSet($pCoord)) {
+                       if ($this->_currentObjectID == $pCoord) {
+                               return true;
+                       }
+                       //      Check if the requested entry still exists in 
Memcache
+                       $success = 
$this->_memcache->get($this->_cachePrefix.$pCoord.'.cache');
+                       if ($success === false) {
+                               //      Entry no longer exists in Memcache, so 
clear it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in MemCache');
+                       }
+                       return true;
+               }
+               return false;
+       }       //      function isDataSet()
+
+
+       /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (parent::isDataSet($pCoord)) {
+                       $obj = 
$this->_memcache->get($this->_cachePrefix.$pCoord.'.cache');
+                       if ($obj === false) {
+                               //      Entry no longer exists in Memcache, so 
clear it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in MemCache');
+                       }
+               } else {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = unserialize($obj);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord) {
+               //      Delete the entry from Memcache
+               $this->_memcache->delete($this->_cachePrefix.$pCoord.'.cache');
+
+               //      Delete the entry from our cell address array
+               parent::deleteCacheData($pCoord);
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+               //      Get a new id for the new file name
+               $baseUnique = $this->_getUniqueID();
+               $newCachePrefix = substr(md5($baseUnique),0,8).'.';
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       if ($cellID != $this->_currentObjectID) {
+                               $obj = 
$this->_memcache->get($this->_cachePrefix.$cellID.'.cache');
+                               if ($obj === false) {
+                                       //      Entry no longer exists in 
Memcache, so clear it from the cache array
+                                       parent::deleteCacheData($cellID);
+                                       throw new Exception('Cell entry 
'.$cellID.' no longer exists in MemCache');
+                               }
+                               if 
(!$this->_memcache->add($newCachePrefix.$cellID.'.cache',$obj,NULL,$this->_cacheTime))
 {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$cellID.' in MemCache');
+                               }
+                       }
+               }
+               $this->_cachePrefix = $newCachePrefix;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+
+               //      Flush the Memcache cache
+               $this->__destruct();
+
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        * @param       array of mixed          $arguments      Additional 
initialisation arguments
+        */
+       public function __construct(PHPExcel_Worksheet $parent, $arguments) {
+               $memcacheServer = (isset($arguments['memcacheServer'])) ? 
$arguments['memcacheServer']  : 'localhost';
+               $memcachePort   = (isset($arguments['memcachePort']))   ? 
$arguments['memcachePort']    : 11211;
+               $cacheTime              = (isset($arguments['cacheTime']))      
        ? $arguments['cacheTime']               : 600;
+
+               if (is_null($this->_cachePrefix)) {
+                       $baseUnique = $this->_getUniqueID();
+                       $this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
+
+                       //      Set a new Memcache object and connect to the 
Memcache server
+                       $this->_memcache = new Memcache();
+                       if (!$this->_memcache->addServer($memcacheServer, 
$memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback'))) {
+                               throw new Exception('Could not connect to 
MemCache server at '.$memcacheServer.':'.$memcachePort);
+                       }
+                       $this->_cacheTime = $cacheTime;
+
+                       parent::__construct($parent);
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Memcache error handler
+        *
+        * @param       string  $host           Memcache server
+        * @param       integer $port           Memcache port
+     * @throws Exception
+        */
+       public function failureCallback($host, $port) {
+               throw new Exception('memcache '.$host.':'.$port.' failed');
+       }
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       
$this->_memcache->delete($this->_cachePrefix.$cellID.'.cache');
+               }
+       }       //      function __destruct()
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!function_exists('memcache_add')) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memcache.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memory.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memory.php         
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memory.php 
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,109 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_Memory
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_Memory extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               $this->_cellCache[$pCoord] = $cell;
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Return requested entry
+               return $this->_cellCache[$pCoord];
+       }       //      function getCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+
+               $newCollection = array();
+               foreach($this->_cellCache as $k => &$cell) {
+                       $newCollection[$k] = clone $cell;
+                       $newCollection[$k]->attach($parent);
+               }
+
+               $this->_cellCache = $newCollection;
+       }
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               //      Because cells are all stored as intact objects in 
memory, we need to detach each one from the parent
+               foreach($this->_cellCache as $k => &$cell) {
+                       $cell->detach();
+                       $this->_cellCache[$k] = null;
+               }
+               unset($cell);
+
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Memory.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemoryGZip.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemoryGZip.php     
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemoryGZip.php     
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,123 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_MemoryGZip
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_MemoryGZip extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $this->_cellCache[$this->_currentObjectID] = 
gzdeflate(serialize($this->_currentObject));
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = 
unserialize(gzinflate($this->_cellCache[$pCoord]));
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemoryGZip.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemorySerialized.php
===================================================================
--- 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemorySerialized.php   
                            (rev 0)
+++ 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemorySerialized.php   
    2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,123 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_MemorySerialized
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_MemorySerialized extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $this->_cellCache[$this->_currentObjectID] = 
serialize($this->_currentObject);
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = unserialize($this->_cellCache[$pCoord]);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/MemorySerialized.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php        
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php        
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,192 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_PHPTemp
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_PHPTemp extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Name of the file for this cache
+        *
+        * @var string
+        */
+       private $_fileHandle = null;
+
+       /**
+        * Memory limit to use before reverting to file cache
+        *
+        * @var integer
+        */
+       private $_memoryCacheSize = null;
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       fseek($this->_fileHandle,0,SEEK_END);
+                       $offset = ftell($this->_fileHandle);
+                       fwrite($this->_fileHandle, 
serialize($this->_currentObject));
+                       $this->_cellCache[$this->_currentObjectID]      = 
array('ptr' => $offset,
+                                                                               
                                                'sz'  => 
ftell($this->_fileHandle) - $offset
+                                                                               
                                           );
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               if (!isset($this->_cellCache[$pCoord])) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               fseek($this->_fileHandle,$this->_cellCache[$pCoord]['ptr']);
+               $this->_currentObject = 
unserialize(fread($this->_fileHandle,$this->_cellCache[$pCoord]['sz']));
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+               //      Open a new stream for the cell cache data
+               $newFileHandle = 
fopen('php://temp/maxmemory:'.$this->_memoryCacheSize,'a+');
+               //      Copy the existing cell cache data to the new stream
+               fseek($this->_fileHandle,0);
+               while (!feof($this->_fileHandle)) {
+                       fwrite($newFileHandle,fread($this->_fileHandle, 1024));
+               }
+               $this->_fileHandle = $newFileHandle;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+
+               //      Close down the php://temp file
+               $this->__destruct();
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        * @param       array of mixed          $arguments      Additional 
initialisation arguments
+        */
+       public function __construct(PHPExcel_Worksheet $parent, $arguments) {
+               $this->_memoryCacheSize = 
(isset($arguments['memoryCacheSize']))        ? $arguments['memoryCacheSize'] : 
'1MB';
+
+               parent::__construct($parent);
+               if (is_null($this->_fileHandle)) {
+                       $this->_fileHandle = 
fopen('php://temp/maxmemory:'.$this->_memoryCacheSize,'a+');
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               if (!is_null($this->_fileHandle)) {
+                       fclose($this->_fileHandle);
+               }
+               $this->_fileHandle = null;
+       }       //      function __destruct()
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/PHPTemp.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite.php         
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite.php 
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,270 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_SQLite
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_SQLite extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Database table name
+        *
+        * @var string
+        */
+       private $_TableName = null;
+
+       /**
+        * Database handle
+        *
+        * @var resource
+        */
+       private $_DBHandle = null;
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       if (!$this->_DBHandle->queryExec("INSERT OR REPLACE 
INTO kvp_".$this->_TableName." 
VALUES('".$this->_currentObjectID."','".sqlite_escape_string(serialize($this->_currentObject))."')"))
+                               throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               $query = "SELECT value FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               $cellResultSet = $this->_DBHandle->query($query,SQLITE_ASSOC);
+               if ($cellResultSet === false) {
+                       throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+               } elseif ($cellResultSet->numRows() == 0) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+
+               $cellResult = $cellResultSet->fetchSingle();
+               $this->_currentObject = unserialize($cellResult);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Is a value set for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return true;
+               }
+
+               //      Check if the requested entry exists in the cache
+               $query = "SELECT id FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               $cellResultSet = $this->_DBHandle->query($query,SQLITE_ASSOC);
+               if ($cellResultSet === false) {
+                       throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+               } elseif ($cellResultSet->numRows() == 0) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return false;
+               }
+               return true;
+       }       //      function isDataSet()
+
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       $this->_currentObject->detach();
+                       $this->_currentObjectID = $this->_currentObject = null;
+               }
+
+               //      Check if the requested entry exists in the cache
+               $query = "DELETE FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               if (!$this->_DBHandle->queryExec($query))
+                       throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+
+               $this->_currentCellIsDirty = false;
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Get a list of all cell addresses currently held in cache
+        *
+        * @return      array of string
+        */
+       public function getCellList() {
+               $query = "SELECT id FROM kvp_".$this->_TableName;
+               $cellIdsResult = 
$this->_DBHandle->unbufferedQuery($query,SQLITE_ASSOC);
+               if ($cellIdsResult === false)
+                       throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+
+               $cellKeys = array();
+               foreach($cellIdsResult as $row) {
+                       $cellKeys[] = $row['id'];
+               }
+
+               return $cellKeys;
+       }       //      function getCellList()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               //      Get a new id for the new table name
+               $tableName = str_replace('.','_',$this->_getUniqueID());
+               if (!$this->_DBHandle->queryExec('CREATE TABLE 
kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
+                                                                               
                        AS SELECT * FROM kvp_'.$this->_TableName))
+                       throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+
+               //      Copy the existing cell cache file
+               $this->_TableName = $tableName;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+
+               //      Close down the temporary cache file
+               $this->__destruct();
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        */
+       public function __construct(PHPExcel_Worksheet $parent) {
+               parent::__construct($parent);
+               if (is_null($this->_DBHandle)) {
+                       $this->_TableName = 
str_replace('.','_',$this->_getUniqueID());
+                       $_DBName = ':memory:';
+
+                       $this->_DBHandle = new SQLiteDatabase($_DBName);
+                       if ($this->_DBHandle === false)
+                               throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+                       if (!$this->_DBHandle->queryExec('CREATE TABLE 
kvp_'.$this->_TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)'))
+                               throw new 
Exception(sqlite_error_string($this->_DBHandle->lastError()));
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               $this->_DBHandle = null;
+       }       //      function __destruct()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!function_exists('sqlite_open')) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite3.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite3.php        
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite3.php        
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,277 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_SQLite3
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_SQLite3 extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Database table name
+        *
+        * @var string
+        */
+       private $_TableName = null;
+
+       /**
+        * Database handle
+        *
+        * @var resource
+        */
+       private $_DBHandle = null;
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $query = $this->_DBHandle->prepare("INSERT OR REPLACE 
INTO kvp_".$this->_TableName." VALUES(:id,:data)");
+                       
$query->bindValue('id',$this->_currentObjectID,SQLITE3_TEXT);
+                       
$query->bindValue('data',serialize($this->_currentObject),SQLITE3_BLOB);
+                       $result = $query->execute();
+                       if ($result === false)
+                               throw new 
Exception($this->_DBHandle->lastErrorMsg());
+                       $this->_currentCellIsDirty = false;
+               }
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+    /**
+     * Add or Update a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to update
+     * @param  PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+     * @throws Exception
+     */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+    /**
+     * Get cell at a specific coordinate
+     *
+     * @param  string                  $pCoord         Coordinate of the cell
+     * @throws         Exception
+     * @return         PHPExcel_Cell   Cell that was found, or null if not 
found
+     */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               $query = "SELECT value FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               $cellResult = $this->_DBHandle->querySingle($query);
+               if ($cellResult === false) {
+                       throw new Exception($this->_DBHandle->lastErrorMsg());
+               } elseif (is_null($cellResult)) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+
+               $this->_currentObject = unserialize($cellResult);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        *      Is a value set for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return true;
+               }
+
+               //      Check if the requested entry exists in the cache
+               $query = "SELECT id FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               $cellResult = $this->_DBHandle->querySingle($query);
+               if ($cellResult === false) {
+                       throw new Exception($this->_DBHandle->lastErrorMsg());
+               } elseif (is_null($cellResult)) {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return false;
+               }
+               return true;
+       }       //      function isDataSet()
+
+
+    /**
+     * Delete a cell in cache identified by coordinate address
+     *
+     * @param  string                  $pCoord         Coordinate address of 
the cell to delete
+     * @throws Exception
+     */
+       public function deleteCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       $this->_currentObject->detach();
+                       $this->_currentObjectID = $this->_currentObject = null;
+               }
+
+               //      Check if the requested entry exists in the cache
+               $query = "DELETE FROM kvp_".$this->_TableName." WHERE 
id='".$pCoord."'";
+               $result = $this->_DBHandle->exec($query);
+               if ($result === false)
+                       throw new Exception($this->_DBHandle->lastErrorMsg());
+
+               $this->_currentCellIsDirty = false;
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Get a list of all cell addresses currently held in cache
+        *
+        * @return      array of string
+        */
+       public function getCellList() {
+               $query = "SELECT id FROM kvp_".$this->_TableName;
+               $cellIdsResult = $this->_DBHandle->query($query);
+               if ($cellIdsResult === false)
+                       throw new Exception($this->_DBHandle->lastErrorMsg());
+
+               $cellKeys = array();
+               while ($row = $cellIdsResult->fetchArray(SQLITE3_ASSOC)) {
+                       $cellKeys[] = $row['id'];
+               }
+
+               return $cellKeys;
+       }       //      function getCellList()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               //      Get a new id for the new table name
+               $tableName = str_replace('.','_',$this->_getUniqueID());
+               if (!$this->_DBHandle->exec('CREATE TABLE kvp_'.$tableName.' 
(id VARCHAR(12) PRIMARY KEY, value BLOB)
+                                                      AS SELECT * FROM 
kvp_'.$this->_TableName))
+                       throw new Exception($this->_DBHandle->lastErrorMsg());
+
+               //      Copy the existing cell cache file
+               $this->_TableName = $tableName;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+
+               //      Close down the temporary cache file
+               $this->__destruct();
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        */
+       public function __construct(PHPExcel_Worksheet $parent) {
+               parent::__construct($parent);
+               if (is_null($this->_DBHandle)) {
+                       $this->_TableName = 
str_replace('.','_',$this->_getUniqueID());
+                       $_DBName = ':memory:';
+
+                       $this->_DBHandle = new SQLite3($_DBName);
+                       if ($this->_DBHandle === false)
+                               throw new 
Exception($this->_DBHandle->lastErrorMsg());
+                       if (!$this->_DBHandle->exec('CREATE TABLE 
kvp_'.$this->_TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)'))
+                               throw new 
Exception($this->_DBHandle->lastErrorMsg());
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               if (!is_null($this->_DBHandle)) {
+                       $this->_DBHandle->close();
+               }
+               $this->_DBHandle = null;
+       }       //      function __destruct()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!class_exists('SQLite3')) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/SQLite3.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Wincache.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Wincache.php       
                        (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Wincache.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,280 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorage_Wincache
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorage_Wincache extends 
PHPExcel_CachedObjectStorage_CacheBase implements 
PHPExcel_CachedObjectStorage_ICache {
+
+       /**
+        * Prefix used to uniquely identify cache data for this worksheet
+        *
+        * @var string
+        */
+       private $_cachePrefix = null;
+
+       /**
+        * Cache timeout
+        *
+        * @var integer
+        */
+       private $_cacheTime = 600;
+
+
+    /**
+     * Store cell data in cache for the current cell object if it's "dirty",
+     *     and the 'nullify' the current cell object
+     *
+        * @return      void
+     * @throws Exception
+     */
+       private function _storeData() {
+               if ($this->_currentCellIsDirty) {
+                       $this->_currentObject->detach();
+
+                       $obj = serialize($this->_currentObject);
+                       if 
(wincache_ucache_exists($this->_cachePrefix.$this->_currentObjectID.'.cache')) {
+                               if 
(!wincache_ucache_set($this->_cachePrefix.$this->_currentObjectID.'.cache', 
$obj, $this->_cacheTime)) {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$this->_currentObjectID.' in WinCache');
+                               }
+                       } else {
+                               if 
(!wincache_ucache_add($this->_cachePrefix.$this->_currentObjectID.'.cache', 
$obj, $this->_cacheTime)) {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$this->_currentObjectID.' in WinCache');
+                               }
+                       }
+                       $this->_currentCellIsDirty = false;
+               }
+
+               $this->_currentObjectID = $this->_currentObject = null;
+       }       //      function _storeData()
+
+
+       /**
+        * Add or Update a cell in cache identified by coordinate address
+        *
+        * @param       string                  $pCoord         Coordinate 
address of the cell to update
+        * @param       PHPExcel_Cell   $cell           Cell to update
+        * @return      void
+        * @throws      Exception
+        */
+       public function addCacheData($pCoord, PHPExcel_Cell $cell) {
+               if (($pCoord !== $this->_currentObjectID) && 
($this->_currentObjectID !== null)) {
+                       $this->_storeData();
+               }
+               $this->_cellCache[$pCoord] = true;
+
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = $cell;
+               $this->_currentCellIsDirty = true;
+
+               return $cell;
+       }       //      function addCacheData()
+
+
+       /**
+        * Is a value set in the current PHPExcel_CachedObjectStorage_ICache 
for an indexed cell?
+        *
+        * @param       string          $pCoord         Coordinate address of 
the cell to check
+        * @return      boolean
+        */
+       public function isDataSet($pCoord) {
+               //      Check if the requested entry is the current object, or 
exists in the cache
+               if (parent::isDataSet($pCoord)) {
+                       if ($this->_currentObjectID == $pCoord) {
+                               return true;
+                       }
+                       //      Check if the requested entry still exists in 
cache
+                       $success = 
wincache_ucache_exists($this->_cachePrefix.$pCoord.'.cache');
+                       if ($success === false) {
+                               //      Entry no longer exists in Wincache, so 
clear it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in WinCache');
+                       }
+                       return true;
+               }
+               return false;
+       }       //      function isDataSet()
+
+
+       /**
+        * Get cell at a specific coordinate
+        *
+        * @param       string                  $pCoord         Coordinate of 
the cell
+        * @throws      Exception
+        * @return      PHPExcel_Cell   Cell that was found, or null if not 
found
+        */
+       public function getCacheData($pCoord) {
+               if ($pCoord === $this->_currentObjectID) {
+                       return $this->_currentObject;
+               }
+               $this->_storeData();
+
+               //      Check if the entry that has been requested actually 
exists
+               $obj = null;
+               if (parent::isDataSet($pCoord)) {
+                       $success = false;
+                       $obj = 
wincache_ucache_get($this->_cachePrefix.$pCoord.'.cache', $success);
+                       if ($success === false) {
+                               //      Entry no longer exists in WinCache, so 
clear it from the cache array
+                               parent::deleteCacheData($pCoord);
+                               throw new Exception('Cell entry '.$pCoord.' no 
longer exists in WinCache');
+                       }
+               } else {
+                       //      Return null if requested entry doesn't exist in 
cache
+                       return null;
+               }
+
+               //      Set current entry to the requested entry
+               $this->_currentObjectID = $pCoord;
+               $this->_currentObject = unserialize($obj);
+               //      Re-attach the parent worksheet
+               $this->_currentObject->attach($this->_parent);
+
+               //      Return requested entry
+               return $this->_currentObject;
+       }       //      function getCacheData()
+
+
+       /**
+        * Delete a cell in cache identified by coordinate address
+        *
+        * @param       string                  $pCoord         Coordinate 
address of the cell to delete
+        * @throws      Exception
+        */
+       public function deleteCacheData($pCoord) {
+               //      Delete the entry from Wincache
+               wincache_ucache_delete($this->_cachePrefix.$pCoord.'.cache');
+
+               //      Delete the entry from our cell address array
+               parent::deleteCacheData($pCoord);
+       }       //      function deleteCacheData()
+
+
+       /**
+        * Clone the cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The new 
worksheet
+        * @return      void
+        */
+       public function copyCellCollection(PHPExcel_Worksheet $parent) {
+               parent::copyCellCollection($parent);
+               //      Get a new id for the new file name
+               $baseUnique = $this->_getUniqueID();
+               $newCachePrefix = substr(md5($baseUnique),0,8).'.';
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       if ($cellID != $this->_currentObjectID) {
+                               $success = false;
+                               $obj = 
wincache_ucache_get($this->_cachePrefix.$cellID.'.cache', $success);
+                               if ($success === false) {
+                                       //      Entry no longer exists in 
WinCache, so clear it from the cache array
+                                       parent::deleteCacheData($cellID);
+                                       throw new Exception('Cell entry 
'.$cellID.' no longer exists in Wincache');
+                               }
+                               if 
(!wincache_ucache_add($newCachePrefix.$cellID.'.cache', $obj, 
$this->_cacheTime)) {
+                                       $this->__destruct();
+                                       throw new Exception('Failed to store 
cell '.$cellID.' in Wincache');
+                               }
+                       }
+               }
+               $this->_cachePrefix = $newCachePrefix;
+       }       //      function copyCellCollection()
+
+
+       /**
+        * Clear the cell collection and disconnect from our parent
+        *
+        * @return      void
+        */
+       public function unsetWorksheetCells() {
+               if(!is_null($this->_currentObject)) {
+                       $this->_currentObject->detach();
+                       $this->_currentObject = $this->_currentObjectID = null;
+               }
+
+               //      Flush the WinCache cache
+               $this->__destruct();
+
+               $this->_cellCache = array();
+
+               //      detach ourself from the worksheet, so that it can then 
delete this object successfully
+               $this->_parent = null;
+       }       //      function unsetWorksheetCells()
+
+
+       /**
+        * Initialise this new cell collection
+        *
+        * @param       PHPExcel_Worksheet      $parent         The worksheet 
for this cell collection
+        * @param       array of mixed          $arguments      Additional 
initialisation arguments
+        */
+       public function __construct(PHPExcel_Worksheet $parent, $arguments) {
+               $cacheTime      = (isset($arguments['cacheTime']))      ? 
$arguments['cacheTime']       : 600;
+
+               if (is_null($this->_cachePrefix)) {
+                       $baseUnique = $this->_getUniqueID();
+                       $this->_cachePrefix = substr(md5($baseUnique),0,8).'.';
+                       $this->_cacheTime = $cacheTime;
+
+                       parent::__construct($parent);
+               }
+       }       //      function __construct()
+
+
+       /**
+        * Destroy this cell collection
+        */
+       public function __destruct() {
+               $cacheList = $this->getCellList();
+               foreach($cacheList as $cellID) {
+                       
wincache_ucache_delete($this->_cachePrefix.$cellID.'.cache');
+               }
+       }       //      function __destruct()
+
+
+       /**
+        * Identify whether the caching method is currently available
+        * Some methods are dependent on the availability of certain extensions 
being enabled in the PHP build
+        *
+        * @return      boolean
+        */
+       public static function cacheMethodIsAvailable() {
+               if (!function_exists('wincache_ucache_add')) {
+                       return false;
+               }
+
+               return true;
+       }
+
+}


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorage/Wincache.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorageFactory.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorageFactory.php         
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorageFactory.php 
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,245 @@
+<?php
+
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+ *
+ * @category   PHPExcel
+ * @package    PHPExcel
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   LGPL
+ * @version    1.7.7, 2012-05-19
+ */
+
+
+/**
+ * PHPExcel_CachedObjectStorageFactory
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel_CachedObjectStorage
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_CachedObjectStorageFactory
+{
+       const cache_in_memory                           = 'Memory';
+       const cache_in_memory_gzip                      = 'MemoryGZip';
+       const cache_in_memory_serialized        = 'MemorySerialized';
+       const cache_igbinary                            = 'Igbinary';
+       const cache_to_discISAM                         = 'DiscISAM';
+       const cache_to_apc                                      = 'APC';
+       const cache_to_memcache                         = 'Memcache';
+       const cache_to_phpTemp                          = 'PHPTemp';
+       const cache_to_wincache                         = 'Wincache';
+       const cache_to_sqlite                           = 'SQLite';
+       const cache_to_sqlite3                          = 'SQLite3';
+
+
+       /**
+        * Name of the method used for cell cacheing
+        *
+        * @var string
+        */
+       private static $_cacheStorageMethod = NULL;
+
+       /**
+        * Name of the class used for cell cacheing
+        *
+        * @var string
+        */
+       private static $_cacheStorageClass = NULL;
+
+
+       /**
+        * List of all possible cache storage methods
+        *
+        * @var string[]
+        */
+       private static $_storageMethods = array(
+               self::cache_in_memory,
+               self::cache_in_memory_gzip,
+               self::cache_in_memory_serialized,
+               self::cache_igbinary,
+               self::cache_to_phpTemp,
+               self::cache_to_discISAM,
+               self::cache_to_apc,
+               self::cache_to_memcache,
+               self::cache_to_wincache,
+               self::cache_to_sqlite,
+               self::cache_to_sqlite3,
+       );
+
+
+       /**
+        * Default arguments for each cache storage method
+        *
+        * @var array of mixed array
+        */
+       private static $_storageMethodDefaultParameters = array(
+               self::cache_in_memory                           => array(
+                                                                               
                        ),
+               self::cache_in_memory_gzip                      => array(
+                                                                               
                        ),
+               self::cache_in_memory_serialized        => array(
+                                                                               
                        ),
+               self::cache_igbinary                            => array(
+                                                                               
                        ),
+               self::cache_to_phpTemp                          => array( 
'memoryCacheSize'     => '1MB'
+                                                                               
                        ),
+               self::cache_to_discISAM                         => array( 'dir' 
                        => NULL
+                                                                               
                        ),
+               self::cache_to_apc                                      => 
array( 'cacheTime'           => 600
+                                                                               
                        ),
+               self::cache_to_memcache                         => array( 
'memcacheServer'      => 'localhost',
+                                                                               
                          'memcachePort'        => 11211,
+                                                                               
                          'cacheTime'           => 600
+                                                                               
                        ),
+               self::cache_to_wincache                         => array( 
'cacheTime'           => 600
+                                                                               
                        ),
+               self::cache_to_sqlite                           => array(
+                                                                               
                        ),
+               self::cache_to_sqlite3                          => array(
+                                                                               
                        ),
+       );
+
+
+       /**
+        * Arguments for the active cache storage method
+        *
+        * @var array of mixed array
+        */
+       private static $_storageMethodParameters = array();
+
+
+       /**
+        * Return the current cache storage method
+        *
+        * @return string|NULL
+        **/
+       public static function getCacheStorageMethod()
+       {
+               if (self::$_cacheStorageMethod !== NULL) {
+                       return self::$_cacheStorageMethod;
+               }
+               return NULL;
+       }       //      function getCacheStorageMethod()
+
+
+       /**
+        * Return the current cache storage class
+        *
+        * @return PHPExcel_CachedObjectStorage_ICache|NULL
+        **/
+       public static function getCacheStorageClass()
+       {
+               if (self::$_cacheStorageClass !== NULL) {
+                       return self::$_cacheStorageClass;
+               }
+               return NULL;
+       }       //      function getCacheStorageClass()
+
+
+       /**
+        * Return the list of all possible cache storage methods
+        *
+        * @return string[]
+        **/
+       public static function getAllCacheStorageMethods()
+       {
+               return self::$_storageMethods;
+       }       //      function getCacheStorageMethods()
+
+
+       /**
+        * Return the list of all available cache storage methods
+        *
+        * @return string[]
+        **/
+       public static function getCacheStorageMethods()
+       {
+               $activeMethods = array();
+               foreach(self::$_storageMethods as $storageMethod) {
+                       $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . 
$storageMethod;
+                       if (call_user_func(array($cacheStorageClass, 
'cacheMethodIsAvailable'))) {
+                               $activeMethods[] = $storageMethod;
+                       }
+               }
+               return $activeMethods;
+       }       //      function getCacheStorageMethods()
+
+
+       /**
+        * Identify the cache storage method to use
+        *
+        * @param       string                  $method         Name of the 
method to use for cell cacheing
+        * @param       array of mixed  $arguments      Additional arguments to 
pass to the cell caching class
+        *                                                                      
        when instantiating
+        * @return boolean
+        **/
+       public static function initialize($method = self::cache_in_memory, 
$arguments = array())
+       {
+               if (!in_array($method,self::$_storageMethods)) {
+                       return FALSE;
+               }
+
+               $cacheStorageClass = 'PHPExcel_CachedObjectStorage_'.$method;
+               if (!call_user_func(array( $cacheStorageClass,
+                                                                  
'cacheMethodIsAvailable'))) {
+                       return FALSE;
+               }
+
+               self::$_storageMethodParameters[$method] = 
self::$_storageMethodDefaultParameters[$method];
+               foreach($arguments as $k => $v) {
+                       if 
(isset(self::$_storageMethodParameters[$method][$k])) {
+                               self::$_storageMethodParameters[$method][$k] = 
$v;
+                       }
+               }
+
+               if (self::$_cacheStorageMethod === NULL) {
+                       self::$_cacheStorageClass = 
'PHPExcel_CachedObjectStorage_' . $method;
+                       self::$_cacheStorageMethod = $method;
+               }
+               return TRUE;
+       }       //      function initialize()
+
+
+       /**
+        * Initialise the cache storage
+        *
+        * @param       PHPExcel_Worksheet      $parent         Enable cell 
caching for this worksheet
+        * @return      PHPExcel_CachedObjectStorage_ICache
+        **/
+       public static function getInstance(PHPExcel_Worksheet $parent)
+       {
+               $cacheMethodIsAvailable = TRUE;
+               if (self::$_cacheStorageMethod === NULL) {
+                       $cacheMethodIsAvailable = self::initialize();
+               }
+
+               if ($cacheMethodIsAvailable) {
+                       $instance = new self::$_cacheStorageClass( $parent,
+                                                                               
                           
self::$_storageMethodParameters[self::$_cacheStorageMethod]
+                                                                               
                         );
+                       if ($instance !== NULL) {
+                               return $instance;
+                       }
+               }
+
+               return FALSE;
+       }       //      function getInstance()
+
+}
\ No newline at end of file


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/CachedObjectStorageFactory.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Database.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Database.php               
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Database.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,725 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel_Calculation
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license            http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   
LGPL
+ * @version            1.7.7, 2012-05-19
+ */
+
+
+/** PHPExcel root directory */
+if (!defined('PHPEXCEL_ROOT')) {
+       /**
+        * @ignore
+        */
+       define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
+       require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
+}
+
+
+/**
+ * PHPExcel_Calculation_Database
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel_Calculation
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_Calculation_Database {
+
+
+       /**
+        * __fieldExtract
+        *
+        * Extracts the column ID to use for the data field.
+        *
+        * @access      private
+        * @param       mixed[]         $database               The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       mixed           $field                  Indicates which 
column is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @return      string|NULL
+        *
+        */
+       private static function __fieldExtract($database,$field) {
+               $field = 
strtoupper(PHPExcel_Calculation_Functions::flattenSingleValue($field));
+               $fieldNames = array_map('strtoupper',array_shift($database));
+
+               if (is_numeric($field)) {
+                       $keys = array_keys($fieldNames);
+                       return $keys[$field-1];
+               }
+               $key = array_search($field,$fieldNames);
+               return ($key) ? $key : NULL;
+       }
+
+       /**
+        * __filter
+        *
+        * Parses the selection criteria, extracts the database rows that match 
those criteria, and
+        * returns that subset of rows.
+        *
+        * @access      private
+        * @param       mixed[]         $database               The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       mixed[]         $criteria               The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      array of mixed
+        *
+        */
+       private static function __filter($database,$criteria) {
+               $fieldNames = array_shift($database);
+               $criteriaNames = array_shift($criteria);
+
+               //      Convert the criteria into a set of AND/OR conditions 
with [:placeholders]
+               $testConditions = $testValues = array();
+               $testConditionsCount = 0;
+               foreach($criteriaNames as $key => $criteriaName) {
+                       $testCondition = array();
+                       $testConditionCount = 0;
+                       foreach($criteria as $row => $criterion) {
+                               if ($criterion[$key] > '') {
+                                       $testCondition[] = 
'[:'.$criteriaName.']'.PHPExcel_Calculation_Functions::_ifCondition($criterion[$key]);
+                                       $testConditionCount++;
+                               }
+                       }
+                       if ($testConditionCount > 1) {
+                               $testConditions[] = 
'OR('.implode(',',$testCondition).')';
+                               $testConditionsCount++;
+                       } elseif($testConditionCount == 1) {
+                               $testConditions[] = $testCondition[0];
+                               $testConditionsCount++;
+                       }
+               }
+
+               if ($testConditionsCount > 1) {
+                       $testConditionSet = 
'AND('.implode(',',$testConditions).')';
+               } elseif($testConditionsCount == 1) {
+                       $testConditionSet = $testConditions[0];
+               }
+
+               //      Loop through each row of the database
+               foreach($database as $dataRow => $dataValues) {
+                       //      Substitute actual values from the database row 
for our [:placeholders]
+                       $testConditionList = $testConditionSet;
+                       foreach($criteriaNames as $key => $criteriaName) {
+                               $k = array_search($criteriaName,$fieldNames);
+                               if (isset($dataValues[$k])) {
+                                       $dataValue = $dataValues[$k];
+                                       $dataValue = (is_string($dataValue)) ? 
PHPExcel_Calculation::_wrapResult(strtoupper($dataValue)) : $dataValue;
+                                       $testConditionList = 
str_replace('[:'.$criteriaName.']',$dataValue,$testConditionList);
+                               }
+                       }
+                       //      evaluate the criteria against the row data
+                       $result = 
PHPExcel_Calculation::getInstance()->_calculateFormulaValue('='.$testConditionList);
+                       //      If the row failed to meet the criteria, remove 
it from the database
+                       if (!$result) {
+                               unset($database[$dataRow]);
+                       }
+               }
+
+               return $database;
+       }
+
+
+       /**
+        * DAVERAGE
+        *
+        * Averages the values in a column of a list or database that match 
conditions you specify.
+        *
+        * Excel Function:
+        *              DAVERAGE(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DAVERAGE($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::AVERAGE($colData);
+       }       //      function DAVERAGE()
+
+
+       /**
+        * DCOUNT
+        *
+        * Counts the cells that contain numbers in a column of a list or 
database that match conditions
+        * that you specify.
+        *
+        * Excel Function:
+        *              DCOUNT(database,[field],criteria)
+        *
+        * Excel Function:
+        *              DAVERAGE(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      integer
+        *
+        * @TODO        The field argument is optional. If field is omitted, 
DCOUNT counts all records in the
+        *                      database that match the criteria.
+        *
+        */
+       public static function DCOUNT($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::COUNT($colData);
+       }       //      function DCOUNT()
+
+
+       /**
+        * DCOUNTA
+        *
+        * Counts the nonblank cells in a column of a list or database that 
match conditions that you specify.
+        *
+        * Excel Function:
+        *              DCOUNTA(database,[field],criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      integer
+        *
+        * @TODO        The field argument is optional. If field is omitted, 
DCOUNTA counts all records in the
+        *                      database that match the criteria.
+        *
+        */
+       public static function DCOUNTA($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::COUNTA($colData);
+       }       //      function DCOUNTA()
+
+
+       /**
+        * DGET
+        *
+        * Extracts a single value from a column of a list or database that 
matches conditions that you
+        * specify.
+        *
+        * Excel Function:
+        *              DGET(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      mixed
+        *
+        */
+       public static function DGET($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               if (count($colData) > 1) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+
+               return $colData[0];
+       }       //      function DGET()
+
+
+       /**
+        * DMAX
+        *
+        * Returns the largest number in a column of a list or database that 
matches conditions you that
+        * specify.
+        *
+        * Excel Function:
+        *              DMAX(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DMAX($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::MAX($colData);
+       }       //      function DMAX()
+
+
+       /**
+        * DMIN
+        *
+        * Returns the smallest number in a column of a list or database that 
matches conditions you that
+        * specify.
+        *
+        * Excel Function:
+        *              DMIN(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DMIN($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::MIN($colData);
+       }       //      function DMIN()
+
+
+       /**
+        * DPRODUCT
+        *
+        * Multiplies the values in a column of a list or database that match 
conditions that you specify.
+        *
+        * Excel Function:
+        *              DPRODUCT(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DPRODUCT($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_MathTrig::PRODUCT($colData);
+       }       //      function DPRODUCT()
+
+
+       /**
+        * DSTDEV
+        *
+        * Estimates the standard deviation of a population based on a sample 
by using the numbers in a
+        * column of a list or database that match conditions that you specify.
+        *
+        * Excel Function:
+        *              DSTDEV(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DSTDEV($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::STDEV($colData);
+       }       //      function DSTDEV()
+
+
+       /**
+        * DSTDEVP
+        *
+        * Calculates the standard deviation of a population based on the 
entire population by using the
+        * numbers in a column of a list or database that match conditions that 
you specify.
+        *
+        * Excel Function:
+        *              DSTDEVP(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DSTDEVP($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::STDEVP($colData);
+       }       //      function DSTDEVP()
+
+
+       /**
+        * DSUM
+        *
+        * Adds the numbers in a column of a list or database that match 
conditions that you specify.
+        *
+        * Excel Function:
+        *              DSUM(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DSUM($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_MathTrig::SUM($colData);
+       }       //      function DSUM()
+
+
+       /**
+        * DVAR
+        *
+        * Estimates the variance of a population based on a sample by using 
the numbers in a column
+        * of a list or database that match conditions that you specify.
+        *
+        * Excel Function:
+        *              DVAR(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DVAR($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::VARFunc($colData);
+       }       //      function DVAR()
+
+
+       /**
+        * DVARP
+        *
+        * Calculates the variance of a population based on the entire 
population by using the numbers
+        * in a column of a list or database that match conditions that you 
specify.
+        *
+        * Excel Function:
+        *              DVARP(database,field,criteria)
+        *
+        * @access      public
+        * @category Database Functions
+        * @param       mixed[]                 $database       The range of 
cells that makes up the list or database.
+        *                                                                      
        A database is a list of related data in which rows of related
+        *                                                                      
        information are records, and columns of data are fields. The
+        *                                                                      
        first row of the list contains labels for each column.
+        * @param       string|integer  $field          Indicates which column 
is used in the function. Enter the
+        *                                                                      
        column label enclosed between double quotation marks, such as
+        *                                                                      
        "Age" or "Yield," or a number (without quotation marks) that
+        *                                                                      
        represents the position of the column within the list: 1 for
+        *                                                                      
        the first column, 2 for the second column, and so on.
+        * @param       mixed[]                 $criteria       The range of 
cells that contains the conditions you specify.
+        *                                                                      
        You can use any range for the criteria argument, as long as it
+        *                                                                      
        includes at least one column label and at least one cell below
+        *                                                                      
        the column label in which you specify a condition for the
+        *                                                                      
        column.
+        * @return      float
+        *
+        */
+       public static function DVARP($database,$field,$criteria) {
+               $field = self::__fieldExtract($database,$field);
+               if (is_null($field)) {
+                       return NULL;
+               }
+
+               //      reduce the database to a set of rows that match all the 
criteria
+               $database = self::__filter($database,$criteria);
+               //      extract an array of values for the requested column
+               $colData = array();
+               foreach($database as $row) {
+                       $colData[] = $row[$field];
+               }
+
+               // Return
+               return PHPExcel_Calculation_Statistical::VARP($colData);
+       }       //      function DVARP()
+
+
+}      //      class PHPExcel_Calculation_Database


Property changes on: 
trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/Database.php
___________________________________________________________________
Added: svn:keywords
   + Revision Author Id

Added: trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/DateTime.php
===================================================================
--- trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/DateTime.php               
                (rev 0)
+++ trunk/phpgwapi/inc/phpexcel/PHPExcel/Calculation/DateTime.php       
2012-10-07 17:05:16 UTC (rev 10126)
@@ -0,0 +1,1447 @@
+<?php
+/**
+ * PHPExcel
+ *
+ * Copyright (c) 2006 - 2012 PHPExcel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel_Calculation
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ * @license            http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt   
LGPL
+ * @version            1.7.7, 2012-05-19
+ */
+
+
+/** PHPExcel root directory */
+if (!defined('PHPEXCEL_ROOT')) {
+       /**
+        * @ignore
+        */
+       define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
+       require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
+}
+
+
+/**
+ * PHPExcel_Calculation_DateTime
+ *
+ * @category   PHPExcel
+ * @package            PHPExcel_Calculation
+ * @copyright  Copyright (c) 2006 - 2012 PHPExcel 
(http://www.codeplex.com/PHPExcel)
+ */
+class PHPExcel_Calculation_DateTime {
+
+       /**
+        * Identify if a year is a leap year or not
+        *
+        * @param       integer $year   The year to test
+        * @return      boolean                 TRUE if the year is a leap 
year, otherwise FALSE
+        */
+       public static function _isLeapYear($year) {
+               return ((($year % 4) == 0) && (($year % 100) != 0) || (($year % 
400) == 0));
+       }       //      function _isLeapYear()
+
+
+       private static function _dateDiff360($startDay, $startMonth, 
$startYear, $endDay, $endMonth, $endYear, $methodUS) {
+               if ($startDay == 31) {
+                       --$startDay;
+               } elseif ($methodUS && ($startMonth == 2 && ($startDay == 29 || 
($startDay == 28 && !self::_isLeapYear($startYear))))) {
+                       $startDay = 30;
+               }
+               if ($endDay == 31) {
+                       if ($methodUS && $startDay != 30) {
+                               $endDay = 1;
+                               if ($endMonth == 12) {
+                                       ++$endYear;
+                                       $endMonth = 1;
+                               } else {
+                                       ++$endMonth;
+                               }
+                       } else {
+                               $endDay = 30;
+                       }
+               }
+
+               return $endDay + $endMonth * 30 + $endYear * 360 - $startDay - 
$startMonth * 30 - $startYear * 360;
+       }       //      function _dateDiff360()
+
+
+       /**
+        * _getDateValue
+        *
+        * @param       string  $dateValue
+        * @return      mixed   Excel date/time serial value, or string if error
+        */
+       public static function _getDateValue($dateValue) {
+               if (!is_numeric($dateValue)) {
+                       if ((is_string($dateValue)) &&
+                               
(PHPExcel_Calculation_Functions::getCompatibilityMode() == 
PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC)) {
+                               return PHPExcel_Calculation_Functions::VALUE();
+                       }
+                       if ((is_object($dateValue)) && ($dateValue instanceof 
PHPExcel_Shared_Date::$dateTimeObjectType)) {
+                               $dateValue = 
PHPExcel_Shared_Date::PHPToExcel($dateValue);
+                       } else {
+                               $saveReturnDateType = 
PHPExcel_Calculation_Functions::getReturnDateType();
+                               
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
+                               $dateValue = self::DATEVALUE($dateValue);
+                               
PHPExcel_Calculation_Functions::setReturnDateType($saveReturnDateType);
+                       }
+               }
+               return $dateValue;
+       }       //      function _getDateValue()
+
+
+       /**
+        * _getTimeValue
+        *
+        * @param       string  $timeValue
+        * @return      mixed   Excel date/time serial value, or string if error
+        */
+       private static function _getTimeValue($timeValue) {
+               $saveReturnDateType = 
PHPExcel_Calculation_Functions::getReturnDateType();
+               
PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL);
+               $timeValue = self::TIMEVALUE($timeValue);
+               
PHPExcel_Calculation_Functions::setReturnDateType($saveReturnDateType);
+               return $timeValue;
+       }       //      function _getTimeValue()
+
+
+       private static function _adjustDateByMonths($dateValue = 0, 
$adjustmentMonths = 0) {
+               // Execute function
+               $PHPDateObject = 
PHPExcel_Shared_Date::ExcelToPHPObject($dateValue);
+               $oMonth = (int) $PHPDateObject->format('m');
+               $oYear = (int) $PHPDateObject->format('Y');
+
+               $adjustmentMonthsString = (string) $adjustmentMonths;
+               if ($adjustmentMonths > 0) {
+                       $adjustmentMonthsString = '+'.$adjustmentMonths;
+               }
+               if ($adjustmentMonths != 0) {
+                       $PHPDateObject->modify($adjustmentMonthsString.' 
months');
+               }
+               $nMonth = (int) $PHPDateObject->format('m');
+               $nYear = (int) $PHPDateObject->format('Y');
+
+               $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
+               if ($monthDiff != $adjustmentMonths) {
+                       $adjustDays = (int) $PHPDateObject->format('d');
+                       $adjustDaysString = '-'.$adjustDays.' days';
+                       $PHPDateObject->modify($adjustDaysString);
+               }
+               return $PHPDateObject;
+       }       //      function _adjustDateByMonths()
+
+
+       /**
+        * DATETIMENOW
+        *
+        * Returns the current date and time.
+        * The NOW function is useful when you need to display the current date 
and time on a worksheet or
+        * calculate a value based on the current date and time, and have that 
value updated each time you
+        * open the worksheet.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the date
+        * and time format of your regional settings. PHPExcel does not change 
cell formatting in this way.
+        *
+        * Excel Function:
+        *              NOW()
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function DATETIMENOW() {
+               $saveTimeZone = date_default_timezone_get();
+               date_default_timezone_set('UTC');
+               $retValue = False;
+               switch (PHPExcel_Calculation_Functions::getReturnDateType()) {
+                       case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                       $retValue = (float) 
PHPExcel_Shared_Date::PHPToExcel(time());
+                                       break;
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                       $retValue = (integer) time();
+                                       break;
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                       $retValue = new DateTime();
+                                       break;
+               }
+               date_default_timezone_set($saveTimeZone);
+
+               return $retValue;
+       }       //      function DATETIMENOW()
+
+
+       /**
+        * DATENOW
+        *
+        * Returns the current date.
+        * The NOW function is useful when you need to display the current date 
and time on a worksheet or
+        * calculate a value based on the current date and time, and have that 
value updated each time you
+        * open the worksheet.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the date
+        * and time format of your regional settings. PHPExcel does not change 
cell formatting in this way.
+        *
+        * Excel Function:
+        *              TODAY()
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function DATENOW() {
+               $saveTimeZone = date_default_timezone_get();
+               date_default_timezone_set('UTC');
+               $retValue = False;
+               $excelDateTime = 
floor(PHPExcel_Shared_Date::PHPToExcel(time()));
+               switch (PHPExcel_Calculation_Functions::getReturnDateType()) {
+                       case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                       $retValue = (float) $excelDateTime;
+                                       break;
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                       $retValue = (integer) 
PHPExcel_Shared_Date::ExcelToPHP($excelDateTime);
+                                       break;
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                       $retValue = 
PHPExcel_Shared_Date::ExcelToPHPObject($excelDateTime);
+                                       break;
+               }
+               date_default_timezone_set($saveTimeZone);
+
+               return $retValue;
+       }       //      function DATENOW()
+
+
+       /**
+        * DATE
+        *
+        * The DATE function returns a value that represents a particular date.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the date
+        * format of your regional settings. PHPExcel does not change cell 
formatting in this way.
+        *
+        * Excel Function:
+        *              DATE(year,month,day)
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @param       integer         $year   The value of the year argument 
can include one to four digits.
+        *                                                              Excel 
interprets the year argument according to the configured
+        *                                                              date 
system: 1900 or 1904.
+        *                                                              If year 
is between 0 (zero) and 1899 (inclusive), Excel adds that
+        *                                                              value 
to 1900 to calculate the year. For example, DATE(108,1,2)
+        *                                                              returns 
January 2, 2008 (1900+108).
+        *                                                              If year 
is between 1900 and 9999 (inclusive), Excel uses that
+        *                                                              value 
as the year. For example, DATE(2008,1,2) returns January 2,
+        *                                                              2008.
+        *                                                              If year 
is less than 0 or is 10000 or greater, Excel returns the
+        *                                                              #NUM! 
error value.
+        * @param       integer         $month  A positive or negative integer 
representing the month of the year
+        *                                                              from 1 
to 12 (January to December).
+        *                                                              If 
month is greater than 12, month adds that number of months to
+        *                                                              the 
first month in the year specified. For example, DATE(2008,14,2)
+        *                                                              returns 
the serial number representing February 2, 2009.
+        *                                                              If 
month is less than 1, month subtracts the magnitude of that
+        *                                                              number 
of months, plus 1, from the first month in the year
+        *                                                              
specified. For example, DATE(2008,-3,2) returns the serial number
+        *                                                              
representing September 2, 2007.
+        * @param       integer         $day    A positive or negative integer 
representing the day of the month
+        *                                                              from 1 
to 31.
+        *                                                              If day 
is greater than the number of days in the month specified,
+        *                                                              day 
adds that number of days to the first day in the month. For
+        *                                                              
example, DATE(2008,1,35) returns the serial number representing
+        *                                                              
February 4, 2008.
+        *                                                              If day 
is less than 1, day subtracts the magnitude that number of
+        *                                                              days, 
plus one, from the first day of the month specified. For
+        *                                                              
example, DATE(2008,1,-15) returns the serial number representing
+        *                                                              
December 16, 2007.
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function DATE($year = 0, $month = 1, $day = 1) {
+               $year   = 
PHPExcel_Calculation_Functions::flattenSingleValue($year);
+               $month  = 
PHPExcel_Calculation_Functions::flattenSingleValue($month);
+               $day    = 
PHPExcel_Calculation_Functions::flattenSingleValue($day);
+
+               $year   = ($year !== NULL)      ? 
PHPExcel_Shared_String::testStringAsNumeric($year) : 0;
+               $month  = ($month !== NULL)     ? 
PHPExcel_Shared_String::testStringAsNumeric($month) : 0;
+               $day    = ($day !== NULL)       ? 
PHPExcel_Shared_String::testStringAsNumeric($day) : 0;
+               if ((!is_numeric($year)) ||
+                       (!is_numeric($month)) ||
+                       (!is_numeric($day))) {
+                       return PHPExcel_Calculation_Functions::VALUE();
+               }
+               $year   = (integer) $year;
+               $month  = (integer) $month;
+               $day    = (integer) $day;
+
+               $baseYear = PHPExcel_Shared_Date::getExcelCalendar();
+               // Validate parameters
+               if ($year < ($baseYear-1900)) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+               if ((($baseYear-1900) != 0) && ($year < $baseYear) && ($year >= 
1900)) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+
+               if (($year < $baseYear) && ($year >= ($baseYear-1900))) {
+                       $year += 1900;
+               }
+
+               if ($month < 1) {
+                       //      Handle year/month adjustment if month < 1
+                       --$month;
+                       $year += ceil($month / 12) - 1;
+                       $month = 13 - abs($month % 12);
+               } elseif ($month > 12) {
+                       //      Handle year/month adjustment if month > 12
+                       $year += floor($month / 12);
+                       $month = ($month % 12);
+               }
+
+               // Re-validate the year parameter after adjustments
+               if (($year < $baseYear) || ($year >= 10000)) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+
+               // Execute function
+               $excelDateValue = 
PHPExcel_Shared_Date::FormattedPHPToExcel($year, $month, $day);
+               switch (PHPExcel_Calculation_Functions::getReturnDateType()) {
+                       case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                       return (float) $excelDateValue;
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                       return (integer) 
PHPExcel_Shared_Date::ExcelToPHP($excelDateValue);
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                       return 
PHPExcel_Shared_Date::ExcelToPHPObject($excelDateValue);
+               }
+       }       //      function DATE()
+
+
+       /**
+        * TIME
+        *
+        * The TIME function returns a value that represents a particular time.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the time
+        * format of your regional settings. PHPExcel does not change cell 
formatting in this way.
+        *
+        * Excel Function:
+        *              TIME(hour,minute,second)
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @param       integer         $hour           A number from 0 (zero) 
to 32767 representing the hour.
+        *                                                                      
Any value greater than 23 will be divided by 24 and the remainder
+        *                                                                      
will be treated as the hour value. For example, TIME(27,0,0) =
+        *                                                                      
TIME(3,0,0) = .125 or 3:00 AM.
+        * @param       integer         $minute         A number from 0 to 
32767 representing the minute.
+        *                                                                      
Any value greater than 59 will be converted to hours and minutes.
+        *                                                                      
For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM.
+        * @param       integer         $second         A number from 0 to 
32767 representing the second.
+        *                                                                      
Any value greater than 59 will be converted to hours, minutes,
+        *                                                                      
and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148
+        *                                                                      
or 12:33:20 AM
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function TIME($hour = 0, $minute = 0, $second = 0) {
+               $hour   = 
PHPExcel_Calculation_Functions::flattenSingleValue($hour);
+               $minute = 
PHPExcel_Calculation_Functions::flattenSingleValue($minute);
+               $second = 
PHPExcel_Calculation_Functions::flattenSingleValue($second);
+
+               if ($hour == '') { $hour = 0; }
+               if ($minute == '') { $minute = 0; }
+               if ($second == '') { $second = 0; }
+
+               if ((!is_numeric($hour)) || (!is_numeric($minute)) || 
(!is_numeric($second))) {
+                       return PHPExcel_Calculation_Functions::VALUE();
+               }
+               $hour   = (integer) $hour;
+               $minute = (integer) $minute;
+               $second = (integer) $second;
+
+               if ($second < 0) {
+                       $minute += floor($second / 60);
+                       $second = 60 - abs($second % 60);
+                       if ($second == 60) { $second = 0; }
+               } elseif ($second >= 60) {
+                       $minute += floor($second / 60);
+                       $second = $second % 60;
+               }
+               if ($minute < 0) {
+                       $hour += floor($minute / 60);
+                       $minute = 60 - abs($minute % 60);
+                       if ($minute == 60) { $minute = 0; }
+               } elseif ($minute >= 60) {
+                       $hour += floor($minute / 60);
+                       $minute = $minute % 60;
+               }
+
+               if ($hour > 23) {
+                       $hour = $hour % 24;
+               } elseif ($hour < 0) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+
+               // Execute function
+               switch (PHPExcel_Calculation_Functions::getReturnDateType()) {
+                       case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                       $date = 0;
+                                       $calendar = 
PHPExcel_Shared_Date::getExcelCalendar();
+                                       if ($calendar != 
PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900) {
+                                               $date = 1;
+                                       }
+                                       return (float) 
PHPExcel_Shared_Date::FormattedPHPToExcel($calendar, 1, $date, $hour, $minute, 
$second);
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                       return (integer) 
PHPExcel_Shared_Date::ExcelToPHP(PHPExcel_Shared_Date::FormattedPHPToExcel(1970,
 1, 1, $hour, $minute, $second));      // -2147468400; //      -2147472000 + 
3600
+                       case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                       $dayAdjust = 0;
+                                       if ($hour < 0) {
+                                               $dayAdjust = floor($hour / 24);
+                                               $hour = 24 - abs($hour % 24);
+                                               if ($hour == 24) { $hour = 0; }
+                                       } elseif ($hour >= 24) {
+                                               $dayAdjust = floor($hour / 24);
+                                               $hour = $hour % 24;
+                                       }
+                                       $phpDateObject = new 
DateTime('1900-01-01 '.$hour.':'.$minute.':'.$second);
+                                       if ($dayAdjust != 0) {
+                                               
$phpDateObject->modify($dayAdjust.' days');
+                                       }
+                                       return $phpDateObject;
+               }
+       }       //      function TIME()
+
+
+       /**
+        * DATEVALUE
+        *
+        * Returns a value that represents a particular date.
+        * Use DATEVALUE to convert a date represented by a text string to an 
Excel or PHP date/time stamp
+        * value.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the date
+        * format of your regional settings. PHPExcel does not change cell 
formatting in this way.
+        *
+        * Excel Function:
+        *              DATEVALUE(dateValue)
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @param       string  $dateValue              Text that represents a 
date in a Microsoft Excel date format.
+        *                                                                      
For example, "1/30/2008" or "30-Jan-2008" are text strings within
+        *                                                                      
quotation marks that represent dates. Using the default date
+        *                                                                      
system in Excel for Windows, date_text must represent a date from
+        *                                                                      
January 1, 1900, to December 31, 9999. Using the default date
+        *                                                                      
system in Excel for the Macintosh, date_text must represent a date
+        *                                                                      
from January 1, 1904, to December 31, 9999. DATEVALUE returns the
+        *                                                                      
#VALUE! error value if date_text is out of this range.
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function DATEVALUE($dateValue = 1) {
+               $dateValue = 
trim(PHPExcel_Calculation_Functions::flattenSingleValue($dateValue),'"');
+               //      Strip any ordinals because they're allowed in Excel 
(English only)
+               $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ 
-\/])/Ui','$1$3',$dateValue);
+               //      Convert separators (/ . or space) to hyphens (should 
also handle dot used for ordinals in some countries, e.g. Denmark, Germany)
+               $dateValue      = str_replace(array('/','.','-','  '),array(' 
',' ',' ',' '),$dateValue);
+
+               $yearFound = false;
+               $t1 = explode(' ',$dateValue);
+               foreach($t1 as &$t) {
+                       if ((is_numeric($t)) && ($t > 31)) {
+                               if ($yearFound) {
+                                       return 
PHPExcel_Calculation_Functions::VALUE();
+                               } else {
+                                       if ($t < 100) { $t += 1900; }
+                                       $yearFound = true;
+                               }
+                       }
+               }
+               if ((count($t1) == 1) && (strpos($t,':') != false)) {
+                       //      We've been fed a time value without any date
+                       return 0.0;
+               } elseif (count($t1) == 2) {
+                       //      We only have two parts of the date: either 
day/month or month/year
+                       if ($yearFound) {
+                               array_unshift($t1,1);
+                       } else {
+                               array_push($t1,date('Y'));
+                       }
+               }
+               unset($t);
+               $dateValue = implode(' ',$t1);
+
+               $PHPDateArray = date_parse($dateValue);
+               if (($PHPDateArray === False) || ($PHPDateArray['error_count'] 
> 0)) {
+                       $testVal1 = strtok($dateValue,'- ');
+                       if ($testVal1 !== False) {
+                               $testVal2 = strtok('- ');
+                               if ($testVal2 !== False) {
+                                       $testVal3 = strtok('- ');
+                                       if ($testVal3 === False) {
+                                               $testVal3 = strftime('%Y');
+                                       }
+                               } else {
+                                       return 
PHPExcel_Calculation_Functions::VALUE();
+                               }
+                       } else {
+                               return PHPExcel_Calculation_Functions::VALUE();
+                       }
+                       $PHPDateArray = 
date_parse($testVal1.'-'.$testVal2.'-'.$testVal3);
+                       if (($PHPDateArray === False) || 
($PHPDateArray['error_count'] > 0)) {
+                               $PHPDateArray = 
date_parse($testVal2.'-'.$testVal1.'-'.$testVal3);
+                               if (($PHPDateArray === False) || 
($PHPDateArray['error_count'] > 0)) {
+                                       return 
PHPExcel_Calculation_Functions::VALUE();
+                               }
+                       }
+               }
+
+               if (($PHPDateArray !== False) && ($PHPDateArray['error_count'] 
== 0)) {
+                       // Execute function
+                       if ($PHPDateArray['year'] == '')        { 
$PHPDateArray['year'] = strftime('%Y'); }
+                       if ($PHPDateArray['year'] < 1900)
+                               return PHPExcel_Calculation_Functions::VALUE();
+                       if ($PHPDateArray['month'] == '')       { 
$PHPDateArray['month'] = strftime('%m'); }
+                       if ($PHPDateArray['day'] == '')         { 
$PHPDateArray['day'] = strftime('%d'); }
+                       $excelDateValue = 
floor(PHPExcel_Shared_Date::FormattedPHPToExcel($PHPDateArray['year'],$PHPDateArray['month'],$PHPDateArray['day'],$PHPDateArray['hour'],$PHPDateArray['minute'],$PHPDateArray['second']));
+
+                       switch 
(PHPExcel_Calculation_Functions::getReturnDateType()) {
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                               return (float) $excelDateValue;
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                               return (integer) 
PHPExcel_Shared_Date::ExcelToPHP($excelDateValue);
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                               return new 
DateTime($PHPDateArray['year'].'-'.$PHPDateArray['month'].'-'.$PHPDateArray['day'].'
 00:00:00');
+                       }
+               }
+               return PHPExcel_Calculation_Functions::VALUE();
+       }       //      function DATEVALUE()
+
+
+       /**
+        * TIMEVALUE
+        *
+        * Returns a value that represents a particular time.
+        * Use TIMEVALUE to convert a time represented by a text string to an 
Excel or PHP date/time stamp
+        * value.
+        *
+        * NOTE: When used in a Cell Formula, MS Excel changes the cell format 
so that it matches the time
+        * format of your regional settings. PHPExcel does not change cell 
formatting in this way.
+        *
+        * Excel Function:
+        *              TIMEVALUE(timeValue)
+        *
+        * @access      public
+        * @category Date/Time Functions
+        * @param       string  $timeValue              A text string that 
represents a time in any one of the Microsoft
+        *                                                                      
Excel time formats; for example, "6:45 PM" and "18:45" text strings
+        *                                                                      
within quotation marks that represent time.
+        *                                                                      
Date information in time_text is ignored.
+        * @return      mixed   Excel date/time serial value, PHP date/time 
serial value or PHP date/time object,
+        *                                              depending on the value 
of the ReturnDateType flag
+        */
+       public static function TIMEVALUE($timeValue) {
+               $timeValue = 
trim(PHPExcel_Calculation_Functions::flattenSingleValue($timeValue),'"');
+               $timeValue      = 
str_replace(array('/','.'),array('-','-'),$timeValue);
+
+               $PHPDateArray = date_parse($timeValue);
+               if (($PHPDateArray !== False) && ($PHPDateArray['error_count'] 
== 0)) {
+                       if 
(PHPExcel_Calculation_Functions::getCompatibilityMode() == 
PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) {
+                               $excelDateValue = 
PHPExcel_Shared_Date::FormattedPHPToExcel($PHPDateArray['year'],$PHPDateArray['month'],$PHPDateArray['day'],$PHPDateArray['hour'],$PHPDateArray['minute'],$PHPDateArray['second']);
+                       } else {
+                               $excelDateValue = 
PHPExcel_Shared_Date::FormattedPHPToExcel(1900,1,1,$PHPDateArray['hour'],$PHPDateArray['minute'],$PHPDateArray['second'])
 - 1;
+                       }
+
+                       switch 
(PHPExcel_Calculation_Functions::getReturnDateType()) {
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_EXCEL :
+                                               return (float) $excelDateValue;
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC :
+                                               return (integer) $phpDateValue 
= PHPExcel_Shared_Date::ExcelToPHP($excelDateValue+25569) - 3600;;
+                               case 
PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT :
+                                               return new DateTime('1900-01-01 
'.$PHPDateArray['hour'].':'.$PHPDateArray['minute'].':'.$PHPDateArray['second']);
+                       }
+               }
+               return PHPExcel_Calculation_Functions::VALUE();
+       }       //      function TIMEVALUE()
+
+
+       /**
+        * DATEDIF
+        *
+        * @param       mixed   $startDate              Excel date serial 
value, PHP date/time stamp, PHP DateTime object
+        *                                                                      
or a standard date string
+        * @param       mixed   $endDate                Excel date serial 
value, PHP date/time stamp, PHP DateTime object
+        *                                                                      
or a standard date string
+        * @param       string  $unit
+        * @return      integer Interval between the dates
+        */
+       public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 
'D') {
+               $startDate      = 
PHPExcel_Calculation_Functions::flattenSingleValue($startDate);
+               $endDate        = 
PHPExcel_Calculation_Functions::flattenSingleValue($endDate);
+               $unit           = 
strtoupper(PHPExcel_Calculation_Functions::flattenSingleValue($unit));
+
+               if (is_string($startDate = self::_getDateValue($startDate))) {
+                       return PHPExcel_Calculation_Functions::VALUE();
+               }
+               if (is_string($endDate = self::_getDateValue($endDate))) {
+                       return PHPExcel_Calculation_Functions::VALUE();
+               }
+
+               // Validate parameters
+               if ($startDate >= $endDate) {
+                       return PHPExcel_Calculation_Functions::NaN();
+               }
+
+               // Execute function
+               $difference = $endDate - $startDate;
+
+               $PHPStartDateObject = 
PHPExcel_Shared_Date::ExcelToPHPObject($startDate);
+               $startDays = $PHPStartDateObject->format('j');
+               $startMonths = $PHPStartDateObject->format('n');
+               $startYears = $PHPStartDateObject->format('Y');
+
+               $PHPEndDateObject = 
PHPExcel_Shared_Date::ExcelToPHPObject($endDate);
+               $endDays = $PHPEndDateObject->format('j');
+               $endMonths = $PHPEndDateObject->format('n');
+               $endYears = $PHPEndDateObject->format('Y');
+
+               $retVal = PHPExcel_Calculation_Functions::NaN();
+               switch ($unit) {
+                       case 'D':
+                               $retVal = intval($difference);
+                               break;
+                       case 'M':
+                               $retVal = intval($endMonths - $startMonths) + 
(intval($endYears - $startYears) * 12);
+                               //      We're only interested in full months
+                               if ($endDays < $startDays) {
+                                       --$retVal;
+                               }
+                               break;
+                       case 'Y':
+                               $retVal = intval($endYears - $startYears);
+                               //      We're only interested in full months
+                               if ($endMonths < $startMonths) {
+                                       --$retVal;
+                               } elseif (($endMonths == $startMonths) && 
($endDays < $startDays)) {
+                                       --$retVal;
+                               }
+                               break;
+                       case 'MD':
+                               if ($endDays < $startDays) {
+                                       $retVal = $endDays;
+                                       
$PHPEndDateObject->modify('-'.$endDays.' days');
+                                       $adjustDays = 
$PHPEndDateObject->format('j');
+                                       if ($adjustDays > $startDays) {
+                                               $retVal += ($adjustDays - 
$startDays);
+                                       }
+                               } else {
+                                       $retVal = $endDays - $startDays;
+                               }
+                               break;
+                       case 'YM':
+                               $retVal = intval($endMonths - $startMonths);
+                               if ($retVal < 0) $retVal = 12 + $retVal;
+                               //      We're only interested in full months
+                               if ($endDays < $startDays) {
+                                       --$retVal;
+                               }
+                               break;
+                       case 'YD':
+                               $retVal = intval($difference);

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]