diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-02-20 14:36:12 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-27 21:43:59 +0100 |
commit | ddcc4c817380f013ed312367c17c8603e96c2237 (patch) | |
tree | 60da37c1e5ec42a07327e27c29b35fb9ea981219 /sd | |
parent | 6f5466e19e7a645ad0a8215c29a2a3a0213e6dd6 (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 'sd')
-rw-r--r-- | sd/UIConfig_sdraw.mk | 1 | ||||
-rw-r--r-- | sd/sdi/_drvwsh.sdi | 5 | ||||
-rw-r--r-- | sd/sdi/sdraw.sdi | 18 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/redactedexportbar.xml | 23 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/toolbar/redactionbar.xml | 3 |
5 files changed, 49 insertions, 1 deletions
diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 93056ddec9b6..5a982f7b1aa2 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -86,6 +86,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ sd/uiconfig/sdraw/toolbar/optionsbar \ sd/uiconfig/sdraw/toolbar/positionbar \ sd/uiconfig/sdraw/toolbar/rectanglesbar \ + sd/uiconfig/sdraw/toolbar/redactedexportbar \ sd/uiconfig/sdraw/toolbar/redactionbar \ sd/uiconfig/sdraw/toolbar/standardbar \ sd/uiconfig/sdraw/toolbar/starshapes \ diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index a18924f36a13..4e1b9d2abfab 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -1265,6 +1265,11 @@ interface DrawView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] + SID_DRAWTBX_REDACTED_EXPORT // ole : no, status : ? + [ + ExecMethod = FuSupport ; + StateMethod = GetMenuState ; + ] SID_DRAWTBX_LINES // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index f5d86d97aaa3..cdccfd94df91 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -1372,6 +1372,24 @@ SfxVoidItem EllipseToolbox SID_DRAWTBX_ELLIPSES GroupId = SfxGroupId::Drawing; ] +SfxVoidItem RedactedExportToolbox SID_DRAWTBX_REDACTED_EXPORT + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = TRUE, + MenuConfig = TRUE, + ToolBoxConfig = TRUE, + GroupId = SfxGroupId::Drawing; +] + SfxVoidItem ExpandPage SID_EXPAND_PAGE () [ diff --git a/sd/uiconfig/sdraw/toolbar/redactedexportbar.xml b/sd/uiconfig/sdraw/toolbar/redactedexportbar.xml new file mode 100644 index 000000000000..06468d459409 --- /dev/null +++ b/sd/uiconfig/sdraw/toolbar/redactedexportbar.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . +--> +<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink"> + <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF?IsRedactMode:bool=true"/> + <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF"/> +</toolbar:toolbar> diff --git a/sd/uiconfig/sdraw/toolbar/redactionbar.xml b/sd/uiconfig/sdraw/toolbar/redactionbar.xml index 43ce5e856f7a..bb27cd01acb4 100644 --- a/sd/uiconfig/sdraw/toolbar/redactionbar.xml +++ b/sd/uiconfig/sdraw/toolbar/redactionbar.xml @@ -21,5 +21,6 @@ <toolbar:toolbaritem xlink:href=".uno:Rect?FillTransparence:short=50&FillColor:string=COL_GRAY7&LineStyle:short=0&IsSticky:bool=true&ShapeName:string=RectangleRedactionShape"/> <toolbar:toolbaritem xlink:href=".uno:Freeline_Unfilled?Transparence:short=50&Color:string=COL_GRAY7&Width:short=500&IsSticky:bool=true&ShapeName:string=FreeformRedactionShape"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:ExportDirectToPDF?IsRedactMode:bool=true"/> + <toolbar:toolbaritem xlink:href=".uno:RedactedExportBlack"/> + <toolbar:toolbaritem xlink:href=".uno:RedactedExportWhite"/> </toolbar:toolbar> |