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

Modified for adding compatible objects #511

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
space corrections
  • Loading branch information
adiabvs committed Mar 26, 2015
commit 81e10e450a195951282d6ea8f19f6fd065a80455
37 changes: 18 additions & 19 deletions src/PhpWord/Writer/Word2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,26 +307,25 @@ private function registerContentTypes($media)
$this->contentTypes['default'][$extension] = $medium['imageType'];
}
} elseif ($mediumType == 'object') {
switch($mediumExtension)
{
case "docx":
if (!isset($this->contentTypes['default']['docx'])) {
$this->contentTypes['default']['docx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
}
break;
switch ($mediumExtension) {
case "docx":
if (!isset($this->contentTypes['default']['docx'])) {
$this->contentTypes['default']['docx'] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
}
break;

case "pptx":
if (!isset($this->contentTypes['default']['pptx'])) {
$this->contentTypes['default']['pptx'] = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
}
break;
case "xlsx":
if (!isset($this->contentTypes['default']['xlsx'])) {
$this->contentTypes['default']['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
}
break;
}
case "pptx":
if (!isset($this->contentTypes['default']['pptx'])) {
$this->contentTypes['default']['pptx'] = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
}
break;

case "xlsx":
if (!isset($this->contentTypes['default']['xlsx'])) {
$this->contentTypes['default']['xlsx'] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
}
break;
}
}
}
}
Expand Down