diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-02-20 14:36:12 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-02-23 15:59:34 +0100 |
commit | 10edac7eccc74aca057a086fed6a58f4387920b6 (patch) | |
tree | bed86e5db929af1fc2597f9754da2aab9fb59b15 /officecfg | |
parent | e99a7a8dfa6f85a8b8bc53298f9300cf2fc77ec2 (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>
Diffstat (limited to 'officecfg')
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 d135a4571c62..590b28f0b869 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu @@ -614,6 +614,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 ab466b3d66ca..e69ba2b362b7 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -1310,6 +1310,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> @@ -2414,6 +2422,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&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&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> |