add missing file

apply formatting to CGL
This commit is contained in:
jogo 2014-07-04 14:10:20 +02:00
parent 4d060b3f07
commit 87c3df5536
4 changed files with 32 additions and 6 deletions

View File

@ -0,0 +1,27 @@
<?php
/**
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/
namespace PhpOffice\PhpWord\Collection;
/**
* Bookmarks collection
*
* @since 0.12.0
*/
class Bookmarks extends AbstractCollection
{
}

View File

@ -60,5 +60,4 @@ class Bookmark extends AbstractElement
{
return $this->name;
}
}

View File

@ -82,7 +82,7 @@ class Link extends AbstractElement
$this->text = is_null($text) ? $this->source : String::toUTF8($text);
$this->fontStyle = $this->setNewStyle(new Font('text'), $fontStyle);
$this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle);
$this->internal = $internal;
$this->internal = $internal;
return $this;
}

View File

@ -42,10 +42,10 @@ class Link extends Text
$this->startElementP();
$xmlWriter->startElement('w:hyperlink');
if($element->isInternal()) {
$xmlWriter->writeAttribute('w:anchor', $element->getSource());
}else {
$xmlWriter->writeAttribute('r:id', 'rId' . $rId);
if ($element->isInternal()) {
$xmlWriter->writeAttribute('w:anchor', $element->getSource());
} else {
$xmlWriter->writeAttribute('r:id', 'rId' . $rId);
}
$xmlWriter->writeAttribute('w:history', '1');
$xmlWriter->startElement('w:r');