summaryrefslogtreecommitdiff
path: root/officecfg
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@collabora.com>2019-02-20 14:36:12 +0300
committerAndras Timar <andras.timar@collabora.com>2019-03-27 21:43:59 +0100
commitddcc4c817380f013ed312367c17c8603e96c2237 (patch)
tree60da37c1e5ec42a07327e27c29b35fb9ea981219 /officecfg
parent6f5466e19e7a645ad0a8215c29a2a3a0213e6dd6 (diff)
Add style options to redaction export
* Add 2 new uno command aliases to handle 2 different styles of redaction export/sanitization: * .uno:RedactedExportBlack & .uno:RedactedExportWhite * Replace the single export button with the 2 new buttons * Add a new toolbox names .uno:RedactedExportToolbox which consists of the new 2 commands. It will be added to the Redaction toolbar after we solve the icon issue. * Now new redaction shapes are named as RectangleRedactionShape or FreeformRedactionShape based on their type. * While exporting to PDF, a seamless step of "Sanitization" takes place, in which, all shapes in the Draw doc are traversed and turned into opaq black or white (with black border) shapes, then the whole doc is converted into bitmap (page by page). * After the export operation is completed. All shapes are converted back to the usual redaction style (gray and transparent). * Icon issue: * We need 2 new icons for our new commands, one for black redaction shapes without border, and one for white redaction shapes with black border. * I tried adding links to a current icon, but it didn't work, so they are iconless for now. * Next to do: Handle icon issue, and take the redaction implementation into a separate helper class because it is growing fast. Change-Id: I9b2b7716289b800cdbe7bf3ffa4a442fe5afc474 Reviewed-on: https://gerrit.libreoffice.org/68072 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/69836 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'officecfg')
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu14
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu30
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu14
3 files changed, 58 insertions, 0 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 12d7ccd3de91..8c6daa310c36 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -600,6 +600,20 @@
<value>ellipsesbar;.uno:Ellipse</value>
</prop>
</node>
+ <node oor:name="RedactedExportToolbox" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:RedactedExportToolbox</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>redactedexportbar;.uno:ExportDirectToPDF?IsRedactMode:bool=true</value>
+ </prop>
+ </node>
<node oor:name="LineToolBox" oor:op="replace">
<prop oor:name="Command">
<value>.uno:LineToolbox</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 761d2d465449..26bf9cbaa103 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1246,6 +1246,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:RedactedExportToolbox" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Redacted Export</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
<node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Straight Connector ends with Arrow</value>
@@ -2344,6 +2352,28 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:RedactedExportBlack" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Redacted Export (Black)</value>
+ </prop>
+ <prop oor:name="TargetURL" oor:type="xs:string">
+ <value>.uno:ExportDirectToPDF?IsRedactMode:bool=true&amp;RedactionStyle:string=Black</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
+ <node oor:name=".uno:RedactedExportWhite" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Redacted Export (White)</value>
+ </prop>
+ <prop oor:name="TargetURL" oor:type="xs:string">
+ <value>.uno:ExportDirectToPDF?IsRedactMode:bool=true&amp;RedactionStyle:string=White</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
</node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
index 53f3d1adb244..9f33993748a6 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
@@ -371,6 +371,20 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="private:resource/toolbar/redactedexportbar" oor:op="replace">
+ <prop oor:name="Docked" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Redacted Export</value>
+ </prop>
+ <prop oor:name="Visible" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
<node oor:name="private:resource/toolbar/ellipsesbar" oor:op="replace">
<prop oor:name="Docked" oor:type="xs:boolean">
<value>false</value>