]> _ Git - fluidbook_tools.git/commitdiff
wip #7180 @2.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 13 Nov 2024 14:57:08 +0000 (15:57 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 13 Nov 2024 14:57:08 +0000 (15:57 +0100)
src/Compiler/CompilerInterface.php
src/Compiler/DummyCompiler.php
src/Links/Link.php
src/Links/SlideshowLink.php

index ae1d84788df3becee2ab3528856a95d46eec1cfb..46eca635b0d1d2ede000e08542d3b99fc7c1b1c3 100644 (file)
@@ -72,4 +72,6 @@ interface CompilerInterface
     public function getQuality(): int;
 
     public function addIssue($type, $data = []);
+
+    public function addPageBackgroundColor($page, $to);
 }
index 712ccaf4a861dfa30d6295e25b60b2db9158e565..7261581108ba34685e14dfde8dce1ab1e4c49e7b 100644 (file)
@@ -28,7 +28,7 @@ class DummyCompiler implements CompilerInterface {
         // TODO: Implement addBookmarkGroup() method.
     }
 
-    public function getConfigZIP($d) {
+    public function getConfigZIP($d, $file = null, $uid = null, $page = null) {
         // TODO: Implement getConfigZIP() method.
     }
 
@@ -64,11 +64,11 @@ class DummyCompiler implements CompilerInterface {
         // TODO: Implement page_path() method.
     }
 
-    public function getWidth() {
+    public function getWidth($page = 1) {
         // TODO: Implement getWidth() method.
     }
 
-    public function getHeight() {
+    public function getHeight($page = 1) {
         // TODO: Implement getHeight() method.
     }
 
@@ -149,4 +149,9 @@ class DummyCompiler implements CompilerInterface {
     {
         // TODO: Implement addIssue() method.
     }
+
+    public function addPageBackgroundColor($page, $to)
+    {
+        // TODO: Implement addPageBackgroundColor() method.
+    }
 }
index 5504939f020c7c4f68b1c8a38857b4a8290953a2..5e867a7123c8ed326008857827e34d2e25e1edf0 100644 (file)
@@ -73,6 +73,7 @@ class Link
     const LOTTIE = 44;
     const COPY_TO_CLIPBOARD = 45;
     const SLIDESHOW_INLINE = 46;
+    const PAGE_BACKGROUND_COLOR = 47;
 
 
     protected static string|false|null $_linksKey = null;
@@ -319,6 +320,9 @@ class Link
                 return new PDFInlineLink($id, $init, $compiler);
             case static::COPY_TO_CLIPBOARD:
                 return new CopyToClipboardLink($id, $init, $compiler);
+            case static::PAGE_BACKGROUND_COLOR:
+                $compiler->addPageBackgroundColor($init['page'], $init['to']);
+                break;
             default:
                 return null;
         }
index f9c3de5ffdaea2cb7da63720d6804d2f76de8d68..c15ffa2089faf36763d71a89b83484a7526d7095 100644 (file)
@@ -149,6 +149,10 @@ class SlideshowLink extends NormalLink
             $thumbnails = (count($slides) > 1);
         }
 
+        if ($context === 'inline') {
+            $thumbnails = false;
+        }
+
         $options = ['openIndex' => $this->extra,
             'thumbnails' => $thumbnails,
             'thumbnail_height' => $this->thumbnail_height,