25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/container/XIndexContainer.hpp>
27#include <com/sun/star/container/XNameReplace.hpp>
28#include <com/sun/star/document/XEventsSupplier.hpp>
29#include <com/sun/star/drawing/XControlShape.hpp>
30#include <com/sun/star/drawing/XDrawPage.hpp>
31#include <com/sun/star/drawing/XShapes.hpp>
32#include <com/sun/star/script/ScriptEventDescriptor.hpp>
33#include <com/sun/star/script/XEventAttacherManager.hpp>
34#include <rtl/strbuf.hxx>
43#include <oox/token/namespaces.hxx>
44#include <oox/token/properties.hxx>
45#include <oox/token/tokens.hxx>
48#include <osl/diagnose.h>
67using ::com::sun::star::awt::Size;
68using ::com::sun::star::awt::Point;
69using ::com::sun::star::awt::Rectangle;
70using ::com::sun::star::awt::XControlModel;
74 VbaMacroAttacherBase( rMacroName ),
83 Reference< XEventsSupplier > xSupplier(
mxShape, UNO_QUERY_THROW );
84 Reference< XNameReplace > xEvents( xSupplier->getEvents(), UNO_SET_THROW );
87 xEvents->replaceByName(
"OnClick",
Any( aEventProps ) );
95 ::
oox::drawingml::
Shape( pcServiceName ),
98 OUString aMacro = rAttribs.
getXString( XML_macro, OUString() );
99 if( !aMacro.isEmpty() )
114 if ( !sURL.isEmpty() )
123 const WorksheetHelper& rHelper,
const ShapePtr& rxParentShape,
const ShapePtr& rxShape ) :
124 ShapeGroupContext( rParent, rxParentShape, rxShape ),
125 WorksheetHelper( rHelper )
135 case XDR_TOKEN( sp ):
137 ShapePtr xShape = std::make_shared<Shape>( rHelper, rAttribs,
"com.sun.star.drawing.CustomShape" );
138 if( pxShape ) *pxShape = xShape;
139 return new ShapeContext( rParent, rxParentShape, xShape );
141 case XDR_TOKEN( cxnSp ):
143 ShapePtr xShape = std::make_shared<Shape>( rHelper, rAttribs,
"com.sun.star.drawing.ConnectorShape" );
144 if( pxShape ) *pxShape = xShape;
145 return new ConnectorShapeContext(rParent, rxParentShape, xShape,
146 xShape->getConnectorShapeProperties());
148 case XDR_TOKEN( pic ):
150 ShapePtr xShape = std::make_shared<Shape>( rHelper, rAttribs,
"com.sun.star.drawing.GraphicObjectShape" );
151 if( pxShape ) *pxShape = xShape;
152 return new GraphicShapeContext( rParent, rxParentShape, xShape );
154 case XDR_TOKEN( graphicFrame ):
156 ShapePtr xShape = std::make_shared<Shape>( rHelper, rAttribs,
"com.sun.star.drawing.GraphicObjectShape" );
157 if( pxShape ) *pxShape = xShape;
160 case XDR_TOKEN( grpSp ):
162 ShapePtr xShape = std::make_shared<Shape>( rHelper, rAttribs,
"com.sun.star.drawing.GroupShape" );
163 if( pxShape ) *pxShape = xShape;
174 return xContext ? xContext : ShapeGroupContext::onCreateContext( nElement, rAttribs );
181 OSL_ENSURE(
mxDrawPage.is(),
"DrawingFragment::DrawingFragment - missing drawing page" );
186 switch( getCurrentElement() )
189 if( nElement == XDR_TOKEN( wsDr ) )
return this;
192 case XDR_TOKEN( wsDr ):
195 case XDR_TOKEN( absoluteAnchor ):
196 case XDR_TOKEN( oneCellAnchor ):
197 case XDR_TOKEN( twoCellAnchor ):
199 mxAnchor->importAnchor( nElement, rAttribs );
204 case XDR_TOKEN( absoluteAnchor ):
205 case XDR_TOKEN( oneCellAnchor ):
206 case XDR_TOKEN( twoCellAnchor ):
210 case XDR_TOKEN(
from ):
211 case XDR_TOKEN(
to ):
return this;
214 case XDR_TOKEN( ext ):
if(
mxAnchor )
mxAnchor->importExt( rAttribs );
break;
215 case XDR_TOKEN( clientData ):
if(
mxAnchor )
mxAnchor->importClientData( rAttribs );
break;
222 case XDR_TOKEN(
from ):
223 case XDR_TOKEN(
to ):
226 case XDR_TOKEN(
col ):
227 case XDR_TOKEN( row ):
228 case XDR_TOKEN( colOff ):
229 case XDR_TOKEN( rowOff ):
return this;
238 switch( getCurrentElement() )
240 case XDR_TOKEN(
col ):
241 case XDR_TOKEN( row ):
242 case XDR_TOKEN( colOff ):
243 case XDR_TOKEN( rowOff ):
244 if(
mxAnchor )
mxAnchor->setCellPos( getCurrentElement(), getParentElement(), rChars );
251 switch( getCurrentElement() )
253 case XDR_TOKEN( absoluteAnchor ):
254 case XDR_TOKEN( oneCellAnchor ):
255 case XDR_TOKEN( twoCellAnchor ):
259 const bool bIsShapeVisible =
mxAnchor->isAnchorValid();
260 if( (aShapeRectEmu.X >= 0) && (aShapeRectEmu.Y >= 0) && (aShapeRectEmu.Width >= 0) && (aShapeRectEmu.Height >= 0) )
262 const sal_Int32 aRotation =
mxShape->getRotation();
288 sal_Int64 nHalfWidth = aShapeRectEmu.Width / 2;
289 sal_Int64 nHalfHeight = aShapeRectEmu.Height / 2;
290 aShapeRectEmu.X = aShapeRectEmu.X + nHalfWidth - nHalfHeight;
291 aShapeRectEmu.Y = aShapeRectEmu.Y + nHalfHeight - nHalfWidth;
292 std::swap(aShapeRectEmu.Width, aShapeRectEmu.Height);
301 getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Width, 0,
SAL_MAX_INT32 ),
302 getLimitedValue< sal_Int32, sal_Int64 >( aShapeRectEmu.Height, 0,
SAL_MAX_INT32 ) );
305 mxShape->setPosition(
Point(aShapeRectEmu32.X, aShapeRectEmu32.Y));
306 mxShape->setSize(
Size(aShapeRectEmu32.Width, aShapeRectEmu32.Height));
312 if (
mxShape->getDiagramDoms().getLength() > 0
313 &&
mxShape->getChildren().size() == 1
314 &&
mxShape->getExtDrawings().size() == 1)
317 OUString sFragmentPath(
318 getFragmentPathFromRelId(
mxShape->getExtDrawings()[0]));
320 OUString sBackupName(
mxShape->getName());
321 OUString sBackupId(
mxShape->getId());
328 if (
mxShape->getFontRefColorForNodes().isUsed())
332 if ( !bIsShapeVisible)
364 pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
365 std::vector<oox::drawingml::ShapePtr>& vChildren = pShape->getChildren();
366 for (
auto const& child : vChildren)
379 explicit VmlFindNoteFunc(
const ScAddress& rPos );
380 bool operator()( const ::oox::vml::ShapeBase& rShape )
const;
387VmlFindNoteFunc::VmlFindNoteFunc(
const ScAddress& rPos ) :
393bool VmlFindNoteFunc::operator()( const ::oox::vml::ShapeBase& rShape )
const
395 const ::oox::vml::ClientData* pClientData = rShape.getClientData();
396 return pClientData && (pClientData->mnCol ==
mnCol) && (pClientData->mnRow ==
mnRow);
401VmlControlMacroAttacher::VmlControlMacroAttacher(
const OUString& rMacroName,
402 const Reference< XIndexContainer >& rxCtrlFormIC, sal_Int32 nCtrlIndex, sal_Int32 nCtrlType, sal_Int32 nDropStyle ) :
403 VbaMacroAttacherBase( rMacroName ),
404 mxCtrlFormIC( rxCtrlFormIC ),
405 mnCtrlIndex( nCtrlIndex ),
406 mnCtrlType( nCtrlType ),
407 mnDropStyle( nDropStyle )
413 ScriptEventDescriptor aEventDesc;
414 aEventDesc.ScriptType =
"Script";
415 aEventDesc.ScriptCode = rMacroUrl;
419 sal_Int32 nCtrlType = bEditDropDown ? XML_Edit :
mnCtrlType;
426 aEventDesc.ListenerType =
"XActionListener";
427 aEventDesc.EventMethod =
"actionPerformed";
432 aEventDesc.ListenerType =
"XMouseListener";
433 aEventDesc.EventMethod =
"mouseReleased";
436 aEventDesc.ListenerType =
"XTextListener";
437 aEventDesc.EventMethod =
"textChanged";
441 aEventDesc.ListenerType =
"XAdjustmentListener";
442 aEventDesc.EventMethod =
"adjustmentValueChanged";
446 aEventDesc.ListenerType =
"XChangeListener";
447 aEventDesc.EventMethod =
"changed";
450 OSL_ENSURE(
false,
"VmlControlMacroAttacher::attachMacro - unexpected object type" );
456 Reference< XEventAttacherManager > xEventMgr(
mxCtrlFormIC, UNO_QUERY_THROW );
457 xEventMgr->registerScriptEvent(
mnCtrlIndex, aEventDesc );
467 maControlConv( rHelper.getBaseFilter().getModel(), rHelper.getBaseFilter().getGraphicHelper() )
482 const ::oox::vml::ClientData* pClientData = rShape.getClientData();
483 return !pClientData || (pClientData->mnObjType != XML_Note);
488 if( const ::oox::vml::ClientData* pClientData = rShape.getClientData() )
490 switch( pClientData->mnObjType )
492 case XML_Button:
return "Button";
493 case XML_Checkbox:
return "Check Box";
494 case XML_Dialog:
return "Dialog Frame";
495 case XML_Drop:
return "Drop Down";
496 case XML_Edit:
return "Edit Box";
497 case XML_GBox:
return "Group Box";
498 case XML_Label:
return "Label";
499 case XML_List:
return "List Box";
500 case XML_Note:
return "Comment";
501 case XML_Pict:
return (pClientData->mbDde ||
getOleObjectInfo( rShape.getShapeId() )) ? OUString(
"Object" ) : OUString(
"Picture" );
502 case XML_Radio:
return "Option Button";
503 case XML_Scroll:
return "Scroll Bar";
504 case XML_Spin:
return "Spinner";
507 return ::oox::vml::Drawing::getShapeBaseName( rShape );
512 if( rShapeAnchor.isEmpty() )
517 return (orShapeRect.Width >= 0) && (orShapeRect.Height >= 0);
521 const Reference< XShapes >& rxShapes,
const Rectangle& rShapeRect )
const
524 OUString aShapeName = rShape.getShapeName();
525 const ::oox::vml::ClientData* pClientData = rShape.getClientData();
526 if( !aShapeName.isEmpty() && pClientData )
529 const ::oox::vml::TextBox* pTextBox = rShape.getTextBox();
530 EmbeddedControl aControl( aShapeName );
531 switch( pClientData->mnObjType )
535 AxCommandButtonModel& rAxModel = aControl.createModel< AxCommandButtonModel >();
536 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, pClientData->mnTextHAlign );
538 rAxModel.mnVerticalAlign = pClientData->mnTextVAlign;
544 AxLabelModel& rAxModel = aControl.createModel< AxLabelModel >();
545 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, pClientData->mnTextHAlign );
549 rAxModel.mnVerticalAlign = pClientData->mnTextVAlign;
555 bool bNumeric = (pClientData->mnVTEdit == ::oox::vml::VML_CLIENTDATA_INTEGER) || (pClientData->mnVTEdit == ::oox::vml::VML_CLIENTDATA_NUMBER);
556 AxMorphDataModelBase& rAxModel = bNumeric ?
557 static_cast< AxMorphDataModelBase&
>( aControl.createModel< AxNumericFieldModel >() ) :
558 static_cast< AxMorphDataModelBase&
>( aControl.createModel< AxTextBoxModel >() );
559 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maValue, pTextBox, pClientData->mnTextHAlign );
562 if( pClientData->mbSecretEdit )
563 rAxModel.mnPasswordChar =
'*';
569 AxFrameModel& rAxModel = aControl.createModel< AxFrameModel >();
570 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, pClientData->mnTextHAlign );
577 if( const ::oox::vml::TextFontModel* pFontModel = pTextBox ? pTextBox->getFirstFont() :
nullptr )
580 sal_Int32 nYDiff = ::std::min< sal_Int32 >( nFontHeightHmm / 2, aShapeRect.Y );
581 aShapeRect.Y -= nYDiff;
582 aShapeRect.Height += nYDiff;
589 AxCheckBoxModel& rAxModel = aControl.createModel< AxCheckBoxModel >();
590 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, pClientData->mnTextHAlign );
592 rAxModel.maValue = OUString::number( pClientData->mnChecked );
594 rAxModel.mnVerticalAlign = pClientData->mnTextVAlign;
595 bool bTriState = (pClientData->mnChecked != ::oox::vml::VML_CLIENTDATA_UNCHECKED) && (pClientData->mnChecked != ::oox::vml::VML_CLIENTDATA_CHECKED);
602 AxOptionButtonModel& rAxModel = aControl.createModel< AxOptionButtonModel >();
605 rAxModel.maGroupName =
"autoGroup_formControl";
606 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, pClientData->mnTextHAlign );
608 rAxModel.maValue = OUString::number( pClientData->mnChecked );
610 rAxModel.mnVerticalAlign = pClientData->mnTextVAlign;
616 AxListBoxModel& rAxModel = aControl.createModel< AxListBoxModel >();
620 switch( pClientData->mnSelType )
631 AxComboBoxModel& rAxModel = aControl.createModel< AxComboBoxModel >();
637 rAxModel.mnListRows = pClientData->mnDropLines;
643 AxSpinButtonModel& rAxModel = aControl.createModel< AxSpinButtonModel >();
644 rAxModel.mnMin = pClientData->mnMin;
645 rAxModel.mnMax = pClientData->mnMax;
646 rAxModel.mnPosition = pClientData->mnVal;
647 rAxModel.mnSmallChange = pClientData->mnInc;
653 AxScrollBarModel& rAxModel = aControl.createModel< AxScrollBarModel >();
654 rAxModel.mnMin = pClientData->mnMin;
655 rAxModel.mnMax = pClientData->mnMax;
656 rAxModel.mnPosition = pClientData->mnVal;
657 rAxModel.mnSmallChange = pClientData->mnInc;
658 rAxModel.mnLargeChange = pClientData->mnPage;
665 AxFrameModel& rAxModel = aControl.createModel< AxFrameModel >();
666 convertControlText( rAxModel.maFontData, rAxModel.mnTextColor, rAxModel.maCaption, pTextBox, XML_Left );
673 if( ControlModelBase* pAxModel = aControl.getModel() )
676 pAxModel->maSize.first = aShapeRect.Width;
677 pAxModel->maSize.second = aShapeRect.Height;
678 sal_Int32 nCtrlIndex = -1;
682 if( xShape.is() && (nCtrlIndex >= 0) && !pClientData->maFmlaMacro.isEmpty() )
685 if( !aMacroName.isEmpty() )
688 VbaMacroAttacherRef xAttacher = std::make_shared<VmlControlMacroAttacher>( aMacroName, xFormIC, nCtrlIndex, pClientData->mnObjType, pClientData->mnDropStyle );
697 return Reference< XShape >();
701 const Rectangle& rShapeRect, const ::oox::vml::ShapeBase& rShape,
bool bGroupChild )
708 const ::oox::vml::ClientData* pClientData = rShape.getClientData();
715 Reference< XControlShape > xCtrlShape( rxShape, UNO_QUERY_THROW );
716 Reference< XControlModel > xCtrlModel( xCtrlShape->getControl(), UNO_SET_THROW );
720 aPropSet.
setProperty( PROP_Printable, pClientData->mbPrintObject );
723 if( !pClientData->maFmlaLink.isEmpty() || !pClientData->maFmlaRange.isEmpty() )
739 if( aTextColor[ 0 ] ==
'#' )
742 if( aTextColor.size() == 7 )
743 return OleHelper::encodeOleColor(
o3tl::toUInt32(aTextColor.substr( 1 ), 16) );
746 if( aTextColor.size() == 4 )
748 sal_Int32 nR =
o3tl::toUInt32(aTextColor.substr( 1, 1 ), 16) * 0x11;
749 sal_Int32 nG =
o3tl::toUInt32(aTextColor.substr( 2, 1 ), 16) * 0x11;
750 sal_Int32 nB =
o3tl::toUInt32(aTextColor.substr( 3, 1 ), 16) * 0x11;
751 return OleHelper::encodeOleColor( (nR << 16) | (nG << 8) | nB );
754 OSL_ENSURE(
false, OStringBuffer(
"VmlDrawing::convertControlTextColor - invalid color name '"
755 +
OUStringToOString( aTextColor, RTL_TEXTENCODING_ASCII_US ) +
"\'" ).getStr() );
768 return OleHelper::encodeOleColor( nRgbValue );
776 if( rFontModel.moName.has_value() )
777 rAxFontData.maFontName = rFontModel.moName.value();
780 rAxFontData.setHeightPoints(
static_cast< sal_Int16
>( (rFontModel.monSize.value_or( 200 ) + 10) / 20 ) );
783 rAxFontData.mnFontEffects = AxFontFlags::NONE;
784 setFlag( rAxFontData.mnFontEffects, AxFontFlags::Bold, rFontModel.mobBold.value_or(
false ) );
785 setFlag( rAxFontData.mnFontEffects, AxFontFlags::Italic, rFontModel.mobItalic.value_or(
false ) );
786 setFlag( rAxFontData.mnFontEffects, AxFontFlags::Strikeout, rFontModel.mobStrikeout.value_or(
false ) );
787 sal_Int32 nUnderline = rFontModel.monUnderline.value_or(
XML_none );
788 setFlag( rAxFontData.mnFontEffects, AxFontFlags::Underline, nUnderline !=
XML_none );
789 rAxFontData.mbDblUnderline = nUnderline == XML_double;
796 OUString& rCaption, const ::oox::vml::TextBox* pTextBox, sal_Int32 nTextHAlign )
const
800 rCaption = pTextBox->getText();
801 if( const ::oox::vml::TextFontModel* pFontModel = pTextBox->getFirstFont() )
805 switch( nTextHAlign )
807 case XML_Left: rAxFontData.mnHorAlign = AxHorizontalAlign::Left;
break;
808 case XML_Center: rAxFontData.mnHorAlign = AxHorizontalAlign::Center;
break;
809 case XML_Right: rAxFontData.mnHorAlign = AxHorizontalAlign::Right;
break;
810 default: rAxFontData.mnHorAlign = AxHorizontalAlign::Left;
816 const ::oox::vml::FillModel& rFillModel = rShape.getTypeModel().maFillModel;
817 bool bHasFill = rFillModel.moFilled.value_or(
true );
823 ::oox::drawingml::Color aColor = ::oox::vml::ConversionHelper::decodeColor( rGraphicHelper, rFillModel.moColor, rFillModel.moOpacity, nSysWindowColor );
825 rAxModel.mnBackColor = OleHelper::encodeOleColor( nRgbValue );
830 ::
oox::vml::
DrawingFragment( rHelper.getOoxFilter(), rFragmentPath, rHelper.getVmlDrawing() ),
static void SetCellAnchoredFromPosition(SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab, bool bResizeWithCell)
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
void setHyperlink(const OUString &sHyperlink)
static sal_Int32 decodeToken(std::u16string_view rValue)
std::optional< OUString > getXString(sal_Int32 nAttrToken) const
virtual ::Color getPaletteColor(sal_Int32 nPaletteIdx) const
::Color getSystemColor(sal_Int32 nToken, ::Color nDefaultRgb=API_RGB_TRANSPARENT) const
css::uno::Any getProperty(sal_Int32 nPropId)
bool setProperty(sal_Int32 nPropId, const Type &rValue)
::oox::ole::VbaProject & getVbaProject() const
GraphicHelper & getGraphicHelper() const
bool importFragment(const rtl::Reference< FragmentHandler > &rxHandler)
::Color getColor(const GraphicHelper &rGraphicHelper, ::Color nPhClr=API_RGB_TRANSPARENT) const
::Color getVmlPresetColor(sal_Int32 nToken, ::Color nDefaultRgb)
PropertyMap & getShapeProperties()
virtual void finalizeXShape(::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::drawing::XShapes > &rxShapes)
css::uno::Reference< css::drawing::XShape > mxShape
void bindToSources(const css::uno::Reference< css::awt::XControlModel > &rxCtrlModel, const OUString &rCtrlSource, const OUString &rRowSource, sal_Int32 nRefSheet=0) const
void registerMacroAttacher(const VbaMacroAttacherRef &rxAttacher)
virtual void finalizeImport() override
ShapeContainer & getShapes()
::oox::ole::EmbeddedForm & getControlForm() const
void convertAndInsert() const
css::uno::Reference< css::drawing::XShape > createAndInsertXControlShape(const ::oox::ole::EmbeddedControl &rControl, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect, sal_Int32 &rnCtrlIndex) const
const OleObjectInfo * getOleObjectInfo(const OUString &rShapeId) const
const ShapeBase * findShape(const Functor &rFunctor) const
Fragment handler for a complete sheet drawing.
ShapeAnchorRef mxAnchor
Current top-level shape.
::oox::drawingml::ShapePtr mxShape
Drawing page of this sheet.
void applyFontRefColor(const oox::drawingml::ShapePtr &pShape, const oox::drawingml::Color &rFontRefColor)
Current anchor of top-level shape.
virtual void onEndElement() override
virtual void onCharacters(const OUString &rChars) override
css::uno::Reference< css::drawing::XShapes > mxDrawPage
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
DrawingFragment(const WorksheetHelper &rHelper, const OUString &rFragmentPath)
GroupShapeContext(const ::oox::core::FragmentHandler2 &rParent, const WorksheetHelper &rHelper, const ::oox::drawingml::ShapePtr &rxParentShape, const ::oox::drawingml::ShapePtr &rxShape)
::oox::core::ContextHandlerRef createShapeContext(::oox::core::FragmentHandler2 &rParent, const WorksheetHelper &rHelper, sal_Int32 nElement, const AttributeList &rAttribs, const ::oox::drawingml::ShapePtr &rxParentShape, ::oox::drawingml::ShapePtr *pxShape=nullptr)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Contains the position of a shape in the spreadsheet.
@ ANCHOR_TWOCELL
One-cell anchor (top-left corner at cell, size in absolute units).
@ ANCHOR_ABSOLUTE
Anchor type is unknown.
void importVmlAnchor(std::u16string_view rAnchor)
Imports the client anchor settings from a VML element.
css::awt::Rectangle calcAnchorRectHmm(const css::awt::Size &rPageSizeHmm) const
Calculates the resulting shape anchor in 1/100 mm.
css::uno::Reference< css::drawing::XShape > mxShape
virtual void attachMacro(const OUString &rMacroUrl) override
ShapeMacroAttacher(const OUString &rMacroName, const css::uno::Reference< css::drawing::XShape > &rxShape)
virtual void finalizeXShape(::oox::core::XmlFilterBase &rFilter, const css::uno::Reference< css::drawing::XShapes > &rxShapes) override
Shape(const WorksheetHelper &rHelper, const AttributeList &rAttribs, const char *pcServiceName)
virtual void attachMacro(const OUString &rMacroUrl) override
css::uno::Reference< css::container::XIndexContainer > mxCtrlFormIC
virtual void finalizeImport() override
VmlDrawingFragment(const WorksheetHelper &rHelper, const OUString &rFragmentPath)
virtual bool isShapeSupported(const ::oox::vml::ShapeBase &rShape) const override
Filters cell note shapes.
VmlDrawing(const WorksheetHelper &rHelper)
void convertControlText(::oox::ole::AxFontData &rAxFontData, sal_uInt32 &rnOleTextColor, OUString &rCaption, const ::oox::vml::TextBox *pTextBox, sal_Int32 nTextHAlign) const
Converts the caption, the font settings, and the horizontal alignment from the passed VML textbox to ...
virtual bool convertClientAnchor(css::awt::Rectangle &orShapeRect, const OUString &rShapeAnchor) const override
Calculates the shape rectangle from a cell anchor string.
void convertControlBackground(::oox::ole::AxMorphDataModelBase &rAxModel, const ::oox::vml::ShapeBase &rShape) const
Converts the passed VML shape background formatting to ActiveX control formatting.
virtual OUString getShapeBaseName(const ::oox::vml::ShapeBase &rShape) const override
Returns additional base names for automatic shape name creation.
const ::oox::vml::ShapeBase * getNoteShape(const ScAddress &rPos) const
Returns the drawing shape for a cell note at the specified position.
void convertControlFontData(::oox::ole::AxFontData &rAxFontData, sal_uInt32 &rnOleTextColor, const ::oox::vml::TextFontModel &rFontModel) const
Converts the passed VML textbox font to an ActiveX form control font.
::oox::vml::TextFontModel maListBoxFont
virtual void notifyXShapeInserted(const css::uno::Reference< css::drawing::XShape > &rxShape, const css::awt::Rectangle &rShapeRect, const ::oox::vml::ShapeBase &rShape, bool bGroupChild) override
Updates the bounding box covering all shapes of this drawing.
virtual css::uno::Reference< css::drawing::XShape > createAndInsertClientXShape(const ::oox::vml::ShapeBase &rShape, const css::uno::Reference< css::drawing::XShapes > &rxShapes, const css::awt::Rectangle &rShapeRect) const override
Creates a UNO control shape for legacy drawing controls.
::oox::ole::ControlConverter maControlConv
sal_uInt32 convertControlTextColor(std::u16string_view aTextColor) const
Converts the passed VML textbox text color to an OLE color.
::oox::core::XmlFilterBase & getOoxFilter() const
Returns the base OOXML/BIFF12 filter object.
WorksheetBuffer & getWorksheets() const
Returns the worksheet buffer containing sheet names and properties.
ThemeBuffer & getTheme() const
Returns the office theme object read from the theme substorage.
::oox::core::FilterBase & getBaseFilter() const
Returns the base filter object (base class of all filters).
FormulaParser & getFormulaParser() const
Returns a shared import formula parser (import filter only!).
void convertSheetNameRef(OUString &sSheetNameRef) const
Converts sSheetNameRef (e.g.
Fragment handler derived from the WorksheetHelper helper class.
void extendShapeBoundingBox(const css::awt::Rectangle &rShapeRect)
Extends the shape bounding box by the position and size of the passed rectangle (in 1/100 mm).
VmlDrawing & getVmlDrawing() const
Returns the VML drawing page for this sheet (OOXML/BIFF12 only).
const css::awt::Size & getDrawPageSize() const
Returns the size of the entire drawing page in 1/100 mm.
WorksheetType getSheetType() const
Returns the type of this sheet.
ScDocument & getScDocument()
SCTAB getSheetIndex() const
Returns the index of the current sheet.
Reference< XEventAttacher2 > xAttacher
RttiCompleteObjectLocator col
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
sal_uInt32 toUInt32(std::u16string_view str, sal_Int16 radix=10)
const sal_Int32 XML_ROOT_CONTEXT
std::shared_ptr< Shape > ShapePtr
sal_Int32 convertEmuToHmm(sal_Int64 nValue)
const sal_Int32 PER_DEGREE
const sal_Int32 AX_BORDERSTYLE_SINGLE
const sal_uInt32 AX_SYSCOLOR_WINDOWTEXT
std::shared_ptr< VbaMacroAttacherBase > VbaMacroAttacherRef
const sal_Int32 AX_SELECTION_SINGLE
const sal_Int32 AX_DISPLAYSTYLE_DROPDOWN
const sal_Int32 AX_SPECIALEFFECT_BUMPED
const sal_Int32 AX_SPECIALEFFECT_SUNKEN
const sal_uInt32 AX_FLAGS_ENABLED
const sal_uInt32 AX_FLAGS_OPAQUE
const sal_Int32 AX_BORDERSTYLE_NONE
const sal_uInt32 AX_FLAGS_MULTILINE
const sal_Int32 AX_SCROLLBAR_VERTICAL
const sal_Int32 AX_SELECTION_MULTI
const sal_Int32 AX_SHOWDROPBUTTON_ALWAYS
const sal_Int32 AX_SPECIALEFFECT_FLAT
const sal_Int32 AX_SELECTION_EXTENDED
const sal_uInt32 AX_FLAGS_WORDWRAP
const ::Color API_RGB_TRANSPARENT(ColorTransparency, 0xffffffff)
void setFlag(Type &ornBitField, Type nMask, bool bSet=true)
const ::Color API_RGB_WHITE(0xFFFFFF)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
uno::Reference< drawing::XShape > const mxShape
uno::Reference< drawing::XDrawPage > mxDrawPage
std::optional< sal_Int32 > monSize
std::optional< OUString > moName
std::optional< OUString > moColor