Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerPoint2007 Reader : Support for BarChart #856

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/changes/1.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- ODPresentation Writer : Support for rotation for RichText by [@Progi1984](https://github.com/Progi1984) fixing [#279](https://github.com/PHPOffice/PHPPresentation/pull/279) in [#409](https://github.com/PHPOffice/PHPPresentation/pull/409)
- HTML Writer by [@Progi1984](https://github.com/Progi1984) fixing [#221](https://github.com/PHPOffice/PHPPresentation/pull/221), [#567](https://github.com/PHPOffice/PHPPresentation/pull/567), [#644](https://github.com/PHPOffice/PHPPresentation/pull/644) in [#850](https://github.com/PHPOffice/PHPPresentation/pull/855)
- PDF Writer by [@Progi1984](https://github.com/Progi1984) fixing [#181](https://github.com/PHPOffice/PHPPresentation/pull/181), [#381](https://github.com/PHPOffice/PHPPresentation/pull/381), [#472](https://github.com/PHPOffice/PHPPresentation/pull/472), [#693](https://github.com/PHPOffice/PHPPresentation/pull/693), [#725](https://github.com/PHPOffice/PHPPresentation/pull/725) in [#850](https://github.com/PHPOffice/PHPPresentation/pull/855)
- PowerPoint2007 Reader : Support for BarChart by [@Progi1984](https://github.com/Progi1984) fixing [#824](https://github.com/PHPOffice/PHPPresentation/pull/824) in [#856](https://github.com/PHPOffice/PHPPresentation/pull/856)

## Bug fixes

Expand All @@ -30,3 +31,4 @@
- CI: Added ODFValidator by [@Progi1984](https://github.com/Progi1984) fixing [#678](https://github.com/PHPOffice/PHPWord/issues/678) in [#653](https://github.com/PHPOffice/PHPWord/pull/653)

## BC Breaks
- \PhpOffice\PhpPresentation\Style\Border::lineWidth use pixels as reference (and not anymore points)
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ Below are the supported features for each file formats.
| | Image | :material-check: | :material-check: | :material-check: |
| | Hyperlink | :material-check: | :material-check: | :material-check: |
| | RichText | :material-check: | :material-check: | :material-check: |
| | Table | | | |
| | Table | | | :material-check: |
| | Text | :material-check: | :material-check: | :material-check: |
| **Charts** | Area | | | |
| | Bar | | | |
| | Bar | | | :material-check: |
| | Bar3D | | | |
| | Doughnut | | | |
| | Line | | | |
Expand Down
2 changes: 1 addition & 1 deletion phpmd.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<!-- PptSlides needs more coupling (default: 13) -->
<!-- Writer/Office2007/AbstractSlide needs more coupling (default: 13) -->
<properties>
<property name="maximum" value="35" />
<property name="maximum" value="38" />
</properties>
</rule>
<rule ref="rulesets/design.xml/NumberOfChildren">
Expand Down
2 changes: 1 addition & 1 deletion samples/Sample_01_Complex.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
->setTooltip('PHPPresentation');

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_01_Simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
->setName('B Nazanin');

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_02_Serialized.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
$objPHPPresentationLoaded = IOFactory::load(__DIR__ . '/results/' . basename(__FILE__, '.php') . '.phppt');

// Save file
echo write($objPHPPresentationLoaded, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentationLoaded, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_03_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
$currentSlide->addShape($shape);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_03_Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$currentSlide->addShape($shape);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_04_Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
$textRunC3->getHyperlink()->setUrl('https://google.com')->setTooltip('Google');

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_05_Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ function fnSlide_Scatter(PhpPresentation $objPHPPresentation): void
fnSlide_Scatter($objPHPPresentation);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_05_Chart_Line.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
$currentSlide->addShape($shape6);

// Save file
echo EOL . write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo EOL . write($objPHPPresentation, basename(__FILE__, '.php'));

if (!CLI) {
include_once 'Sample_Footer.php';
Expand Down
2 changes: 1 addition & 1 deletion samples/Sample_05_Chart_with_PhpSpreadsheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
$shape->getLegend()->getFont()->setItalic(true);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));

if (!CLI) {
include_once 'Sample_Footer.php';
Expand Down
2 changes: 1 addition & 1 deletion samples/Sample_06_Fill.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
}

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_07_Border.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_08_Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
->setColor(new Color('FFE06B20'));

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_09_SlideNote.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$oRichText->createParagraph()->createTextRun('Supports writing to different file formats');

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_10_Transition.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
$slide1->addShape(clone $shapeRichText);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_11_Shape.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function fnSlideRichTextList(PhpPresentation $objPHPPresentation): void
fnSlideRichTextList($objPHPPresentation);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
6 changes: 4 additions & 2 deletions samples/Sample_12_Reader_ODPresentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

set_time_limit(10);

include_once __DIR__ . '/Sample_PhpPptTree.php';
include_once __DIR__ . '/Sample_Header.php';

use PhpOffice\PhpPresentation\IOFactory;

$pptReader = IOFactory::createReader('ODPresentation');
$oPHPPresentation = $pptReader->load(__DIR__ . '/resources/Sample_12.odp');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();
if (!CLI) {
$oTree = new Sample_PhpPptTree($oPHPPresentation);
echo $oTree->display();

include_once 'Sample_Footer.php';
}
10 changes: 6 additions & 4 deletions samples/Sample_12_Reader_PowerPoint2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

set_time_limit(10);

include_once 'Sample_Header.php';
include_once __DIR__ . '/Sample_PhpPptTree.php';
include_once __DIR__ . '/Sample_Header.php';

use PhpOffice\PhpPresentation\IOFactory;

$pptReader = IOFactory::createReader('PowerPoint2007');
$oPHPPresentation = $pptReader->load('resources/Sample_12.pptx');
$oPHPPresentation = $pptReader->load(__DIR__ . '/resources/Sample_12.pptx');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();
if (!CLI) {
$oTree = new Sample_PhpPptTree($oPHPPresentation);
echo $oTree->display();

include_once 'Sample_Footer.php';
}
10 changes: 6 additions & 4 deletions samples/Sample_12_Reader_PowerPoint97.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

set_time_limit(10);

include_once 'Sample_Header.php';
include_once __DIR__ . '/Sample_PhpPptTree.php';
include_once __DIR__ . '/Sample_Header.php';

use PhpOffice\PhpPresentation\IOFactory;

$pptReader = IOFactory::createReader('PowerPoint97');
$oPHPPresentation = $pptReader->load('resources/Sample_12.ppt');
$oPHPPresentation = $pptReader->load(__DIR__ . '/resources/Sample_12.ppt');

$oTree = new PhpPptTree($oPHPPresentation);
echo $oTree->display();
if (!CLI) {
$oTree = new Sample_PhpPptTree($oPHPPresentation);
echo $oTree->display();

include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_13_MarkAsFinal.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$currentSlide->addShape(clone $oShapeRichText);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_14_Zoom.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$currentSlide->addShape(clone $oShapeRichText);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_15_Background.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
$oSlide2->setBackground($oBkgImage);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_16_Thumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$oSlide1->addShape(clone $oShapeRichText);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_17_Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
$oSlide1->addShape($oComment2);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_18_Animation.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$oSlide3->addAnimation($oAnimation5);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_19_SlideMaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
$currentSlide->setSlideLayout($oSlideLayout);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_20_SlideLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
$currentSlide->setSlideLayout($slideLayout);

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_21_AutoShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
2 changes: 1 addition & 1 deletion samples/Sample_22_ExternalSlide.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}

// Save file
echo write($objPHPPresentation, basename(__FILE__, '.php'), $writers);
echo write($objPHPPresentation, basename(__FILE__, '.php'));
if (!CLI) {
include_once 'Sample_Footer.php';
}
Loading