From c0e3574ce0434d295f7e6f4c66c9656847b22e30 Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Thu, 26 Sep 2013 20:35:48 +0300 Subject: oox: added methods to lock Smart-Art edition Added the possibility of rendering the basic shapes generated for a Smart-Art into a bitmap and replacing them with it in order to not letting to edit the Smart-Art. This possibility is controlled using a configuration parameter located at Options -> Load/Save -> MS Office -> SmartArt to LibreOffice shapes or reverse. Made the "oox" library to depend on the "drawinglayer" and "svx" libraries. Made the "ooxmlexport" C++ unit tests in the "sw" module to depend on the "drawinglayer" and "svx" components. Fixed to set to diagram type a new "oox::drawingml::Shape" representing a Smart-Art in the "getShape" method of the "oox::shape::ShapeContextHandler" class. Added the "keepDiagramCompatibilityInfo" and "renderDiagramToGraphic" protected methods to the "oox::drawingml::Shape" class. "keepDiagramCompatibilityInfo" is now called after an instance of type "FRAMETYPE_DIAGRAM" has added all its children in the "addShape" method and the proper setting is in place. "keepDiagramCompatibilityInfo" substitutes previous similar code in the "createAndInsert" method and also calls "renderDiagramToGraphic". The "renderDiagramToGraphic" renders the basic shapes in a Smart-Art into a PNG image and replaces these basic shapes with a new "GraphicObjectShape" filled with the new PNG image. It also sets the "MoveProtect" and "SizeProtect" properties of the "GraphicObjectShape". Change-Id: Ie4002238ff5fae758a5881b03735bf1f0721ed5b Reviewed-on: https://gerrit.libreoffice.org/6059 Reviewed-by: Miklos Vajna Tested-by: Miklos Vajna --- sw/CppunitTest_sw_ooxmlexport.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sw') diff --git a/sw/CppunitTest_sw_ooxmlexport.mk b/sw/CppunitTest_sw_ooxmlexport.mk index 0158be6cd5cf..4927c0dd8613 100644 --- a/sw/CppunitTest_sw_ooxmlexport.mk +++ b/sw/CppunitTest_sw_ooxmlexport.mk @@ -53,6 +53,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport,\ canvas/source/factory/canvasfactory \ comphelper/util/comphelp \ configmgr/source/configmgr \ + drawinglayer/drawinglayer \ embeddedobj/util/embobj \ fileaccess/source/fileacc \ filter/source/config/cache/filterconfig1 \ @@ -71,6 +72,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport,\ starmath/util/sm \ svl/source/fsstor/fsstorage \ svtools/util/svt \ + svx/util/svx \ toolkit/util/tk \ ucb/source/core/ucb1 \ ucb/source/ucp/file/ucpfile1 \ -- cgit