diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-11 11:37:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-11 18:13:13 +0200 |
commit | 6945d031e759823ab52bdf077e43196b67f594a4 (patch) | |
tree | c1fa0095aa216498fe1a441488aeb7488e598cde /sc/source/filter/oox | |
parent | c88855c45a675cf28e2cfe4fa261c2b0339f5898 (diff) |
move setting properties into note comments from oox to sc
no change in behavior intended, the SdrCaption doesn't support
the skipped conditions
Change-Id: Id909ae4ed115c1ad3398d2a62c6432ff1dfde453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155585
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r-- | sc/source/filter/oox/commentsbuffer.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx index 555ddad3a924..55bcb7e2cc73 100644 --- a/sc/source/filter/oox/commentsbuffer.cxx +++ b/sc/source/filter/oox/commentsbuffer.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/text/XText.hpp> #include <osl/diagnose.h> +#include <oox/drawingml/shapepropertymap.hxx> #include <oox/helper/attributelist.hxx> #include <oox/vml/vmlshape.hxx> #include <addressconverter.hxx> @@ -183,11 +184,15 @@ void Comment::finalizeImport() if( const ::oox::vml::ShapeBase* pVmlNoteShape = getVmlDrawing().getNoteShape( maModel.maRange.aStart ) ) { // position and formatting - css::awt::Rectangle aShapeRect = pVmlNoteShape->convertFormatting(xAnnoShape); + css::awt::Rectangle aShapeRect = pVmlNoteShape->getShapeRectangle(); if (aShapeRect.Width > 0 || aShapeRect.Height > 0) { xAnnoShape->setPosition(css::awt::Point(aShapeRect.X, aShapeRect.Y)); xAnnoShape->setSize(css::awt::Size(aShapeRect.Width, aShapeRect.Height)); + + ::oox::drawingml::ShapePropertyMap aPropMap(pVmlNoteShape->makeShapePropertyMap()); + css::uno::Reference<css::drawing::XShape> xShape(xAnnoShape); + PropertySet(xShape).setProperties(aPropMap); } // visibility bVisible = pVmlNoteShape->getTypeModel().mbVisible; |