23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/form/FormComponentType.hpp>
25#include <com/sun/star/awt/VisualEffect.hpp>
26#include <com/sun/star/awt/ScrollBarOrientation.hpp>
27#include <com/sun/star/awt/XControlModel.hpp>
28#include <com/sun/star/drawing/XShape.hpp>
29#include <com/sun/star/form/binding/XBindableValue.hpp>
30#include <com/sun/star/form/binding/XListEntrySink.hpp>
31#include <com/sun/star/awt/Size.hpp>
32#include <com/sun/star/chart/XChartDocument.hpp>
43#include <unonames.hxx>
61#include <document.hxx>
66#include <oox/token/tokens.hxx>
71#include <oox/token/namespaces.hxx>
76using ::com::sun::star::uno::UNO_QUERY;
77using ::com::sun::star::uno::Reference;
78using ::com::sun::star::uno::Sequence;
79using ::com::sun::star::lang::XServiceInfo;
80using ::com::sun::star::beans::XPropertySet;
81using ::com::sun::star::drawing::XShape;
82using ::com::sun::star::drawing::XShapes;
83using ::com::sun::star::awt::XControlModel;
84using ::com::sun::star::form::binding::XBindableValue;
85using ::com::sun::star::form::binding::XListEntrySink;
86using ::com::sun::star::script::ScriptEventDescriptor;
87using ::com::sun::star::table::CellAddress;
88using ::com::sun::star::table::CellRangeAddress;
89using ::oox::drawingml::DrawingML;
90using ::oox::drawingml::ChartExport;
130 rComments->startElement(
FSNS(XML_xdr, XML_col));
131 rComments->writeEscaped( OUString::number( aRect.
Left() ) );
132 rComments->endElement(
FSNS( XML_xdr, XML_col ) );
133 rComments->startElement(
FSNS(XML_xdr, XML_colOff));
134 rComments->writeEscaped( OUString::number( aRect.
Top() ) );
135 rComments->endElement(
FSNS( XML_xdr, XML_colOff ) );
136 rComments->startElement(
FSNS(XML_xdr, XML_row));
137 rComments->writeEscaped( OUString::number( aRect.
Right() ) );
138 rComments->endElement(
FSNS( XML_xdr, XML_row ) );
139 rComments->startElement(
FSNS(XML_xdr, XML_rowOff));
140 rComments->writeEscaped( OUString::number( aRect.
Bottom() ) );
141 rComments->endElement(
FSNS( XML_xdr, XML_rowOff ) );
151 sal_Int32 nCol = 0, nRow = 0;
152 sal_Int32 nColOff = 0, nRowOff= 0;
165 if( r.
Top() <= aRect.
Top() )
168 nRowOff = aRect.
Top() - r.
Top();
173 nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
188 if( r.
Top() <= aRect.
Top() )
191 nRowOff = aRect.
Top() - r.
Top();
196 nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
213 nRow, lcl_hmm2output( aRect.
Bottom() - r.
Top(), bInEMU ));
230 nRow, lcl_hmm2output( aRect.
Bottom() - r.
Top(), bInEMU ));
274 OSL_FAIL(
"XclExpDffAnchorBase::ImplSetFlags - not implemented" );
279 OSL_FAIL(
"XclExpDffAnchorBase::ImplCalcAnchorRect - not implemented" );
284 mnScTab( rRoot.GetCurrScTab() )
303 const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY ) :
340 mrEscherEx( rEscherEx ),
341 mnFragmentKey( rEscherEx.InitNextDffFragment() )
348 "XclExpMsoDrawingBase::WriteBody - DFF stream position mismatch" );
362 0xBF, 0x00, 0x08, 0x00, 0x08, 0x00, 0x81, 0x01,
363 0x09, 0x00, 0x00, 0x08, 0xC0, 0x01, 0x40, 0x00,
367 rDffStrm.
WriteBytes(spnDffOpt,
sizeof(spnDffOpt));
370 static const sal_uInt8 spnDffSplitMenuColors[] = {
371 0x0D, 0x00, 0x00, 0x08, 0x0C, 0x00, 0x00, 0x08,
372 0x17, 0x00, 0x00, 0x08, 0xF7, 0x00, 0x00, 0x10
375 rDffStrm.
WriteBytes(spnDffSplitMenuColors,
sizeof(spnDffSplitMenuColors));
397 aBmp.
Convert( BmpConversion::N24Bit );
403 sal_Int32 nWidth = ::std::min< sal_Int32 >( pAccess->Width(), 0xFFFF );
404 sal_Int32 nHeight = ::std::min< sal_Int32 >( pAccess->Height(), 0xFFFF );
405 if( (nWidth <= 0) || (nHeight <= 0) )
409 sal_uInt32 nTmpSize =
static_cast< sal_uInt32
>( (nWidth * 3 + nPadding) * nHeight + 12 );
417 <<
static_cast< sal_uInt16
>( nWidth )
418 <<
static_cast< sal_uInt16
>( nHeight )
422 for( sal_Int32 nY = nHeight - 1; nY >= 0; --nY )
424 Scanline pScanline = pAccess->GetScanline( nY );
425 for( sal_Int32 nX = 0; nX < nWidth; ++nX )
427 const BitmapColor& rBmpColor = pAccess->GetPixelFromData( pScanline, nX );
428 rStrm << rBmpColor.GetBlue() << rBmpColor.GetGreen() << rBmpColor.GetRed();
430 rStrm.WriteZeroBytes( nPadding );
440 DrawingML aDML(pWorksheet, &
rStrm, drawingml::DOCUMENT_XLSX);
441 OUString rId = aDML.WriteImage(
maGraphic );
442 pWorksheet->singleElement(XML_picture,
FSNS(XML_r, XML_id), rId);
464 if( !xCtrlModel.is() )
469 Reference< XBindableValue > xBindable( xCtrlModel, UNO_QUERY );
472 Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY );
476 CellAddress aApiAddress;
488 Reference< XListEntrySink > xEntrySink( xCtrlModel, UNO_QUERY );
489 if( !xEntrySink.is() )
492 Reference< XServiceInfo > xServInfo( xEntrySink->getListEntrySource(), UNO_QUERY );
497 CellRangeAddress aApiRange;
510 sal_uInt16 nFmlaSize = rTokArr.
GetSize();
511 rStrm << nFmlaSize << sal_uInt32( 0 );
519 rStrm.StartRecord( nSubRecId, (rTokArr.
GetSize() + 5) & ~1 );
528 const tools::Rectangle* pChildAnchor, OUString aClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) :
531 maClassName(
std::move( aClassName )),
532 mnStrmStart( nStrmStart ),
533 mnStrmSize( nStrmSize )
546 ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor | ShapeFlag::OLEShape );
555 if( aCtrlProp.
GetProperty( aCtrlName,
"Name" ) && !aCtrlName.isEmpty() )
560 Reference< XPropertySet > xShapePS( xShape, UNO_QUERY );
586 rStrm << sal_uInt16( 2 );
591 rStrm << sal_uInt16( 0x0031 );
596 sal_uInt16 nClassNameSize =
static_cast< sal_uInt16
>( aClass.
GetSize() );
597 sal_uInt16 nClassNamePad = nClassNameSize & 1;
598 sal_uInt16 nFirstPartSize = 12 + nClassNameSize + nClassNamePad;
601 sal_uInt16 nCellLinkSize = pCellLink ? ((pCellLink->
GetSize() + 7) & 0xFFFE) : 0;
604 sal_uInt16 nSrcRangeSize = pSrcRange ? ((pSrcRange->
GetSize() + 7) & 0xFFFE) : 0;
606 sal_uInt16 nPictFmlaSize = nFirstPartSize + nCellLinkSize + nSrcRangeSize + 18;
609 rStrm << nFirstPartSize
615 rStrm.WriteZeroBytes( nClassNamePad );
620 rStrm << nCellLinkSize;
624 rStrm << nSrcRangeSize;
647 mbFlatButton( false ),
648 mbFlatBorder( false ),
650 mbScrollHor( false ),
656 namespace FormCompType = css::form::FormComponentType;
657 namespace AwtVisualEffect = css::awt::VisualEffect;
658 namespace AwtScrollOrient = css::awt::ScrollBarOrientation;
661 if( !xShape.is() || !aCtrlProp.
Is() )
664 mnHeight = xShape->getSize().Height;
669 sal_Int16 nClassId = 0;
717 OUString aDescrText = pSdrObj->GetDescription();
718 if(!aDescrText.isEmpty())
762 sal_Int16 nApiButton = AwtVisualEffect::LOOK3D;
763 sal_Int16 nApiBorder = AwtVisualEffect::LOOK3D;
766 case FormCompType::LISTBOX:
767 case FormCompType::COMBOBOX:
770 case FormCompType::CHECKBOX:
771 case FormCompType::RADIOBUTTON:
772 aCtrlProp.
GetProperty( nApiButton,
"VisualEffect" );
776 case FormCompType::COMMANDBUTTON:
777 nApiBorder = AwtVisualEffect::LOOK3D;
780 case FormCompType::FIXEDTEXT:
785 case FormCompType::SCROLLBAR:
786 case FormCompType::SPINBUTTON:
787 nApiButton = AwtVisualEffect::LOOK3D;
791 case FormCompType::GROUPBOX:
792 nApiBorder = AwtVisualEffect::LOOK3D;
799 sal_Int16 nApiState = 0;
813 case FormCompType::LISTBOX:
816 Sequence< sal_Int16 > aSelection;
817 if( aCtrlProp.
GetProperty( aSelection,
"SelectedItems" ) )
819 if( aSelection.hasElements() )
832 case FormCompType::COMBOBOX:
853 case FormCompType::SCROLLBAR:
855 sal_Int32 nApiValue = 0;
856 if( aCtrlProp.
GetProperty( nApiValue,
"ScrollValueMin" ) )
858 if( aCtrlProp.
GetProperty( nApiValue,
"ScrollValueMax" ) )
860 if( aCtrlProp.
GetProperty( nApiValue,
"ScrollValue" ) )
862 if( aCtrlProp.
GetProperty( nApiValue,
"LineIncrement" ) )
864 if( aCtrlProp.
GetProperty( nApiValue,
"BlockIncrement" ) )
866 if( aCtrlProp.
GetProperty( nApiValue,
"Orientation" ) )
867 mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL;
871 case FormCompType::SPINBUTTON:
873 sal_Int32 nApiValue = 0;
874 if( aCtrlProp.
GetProperty( nApiValue,
"SpinValueMin" ) )
876 if( aCtrlProp.
GetProperty( nApiValue,
"SpinValueMax" ) )
878 if( aCtrlProp.
GetProperty( nApiValue,
"SpinValue" ) )
880 if( aCtrlProp.
GetProperty( nApiValue,
"SpinIncrement" ) )
882 if( aCtrlProp.
GetProperty( nApiValue,
"Orientation" ) )
883 mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL;
890 if( xCtrlModel.is() )
892 Reference< XBindableValue > xBindable( xCtrlModel, UNO_QUERY );
895 Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY );
899 CellAddress aApiAddress;
938 sal_uInt16 nStyle = 0;
943 rStrm.WriteZeroBytes( 8 );
955 rStrm.WriteZeroBytes( 4 );
987 sal_uInt16 nStyle = 0;
995 rStrm << static_cast< sal_uInt16 >( (pSrcRange->GetSize() + 7) & 0xFFFE );
999 rStrm << sal_uInt16( 0 );
1008 if( rItem < nEntryCount )
1009 aSelEx[ rItem ] = 1;
1010 rStrm.Write( aSelEx.data(), aSelEx.size() );
1015 rStrm << sal_uInt16( 0 ) <<
mnLineCount << sal_uInt16( 0 ) << sal_uInt16( 0 );
1044 sal_uInt16 nStyle = 0;
1048 rStrm << sal_uInt32( 0 )
1064 sal_uInt16 nOrient = 0;
1070 rStrm << sal_uInt32( 0 )
1092 sal_uInt16 m_nObjType;
1095 OUString m_sControlName;
1096 OUString m_sFmlaLink;
1098 OUString m_aMacroName;
1103 const OUString& sControlName,
const OUString& sFmlaLink,
1104 OUString aLabel, OUString aMacroName);
1110 void EndShape(sal_Int32 nShapeElement)
override;
1114 sal_uInt16 nObjType,
1117 const OUString& sControlName,
1118 const OUString& sFmlaLink,
1119 OUString aLabel, OUString aMacroName)
1121 , m_nObjType(nObjType)
1122 , m_aAreaFrom(rAreaFrom)
1123 , m_aAreaTo(rAreaTo)
1124 , m_sControlName(sControlName)
1125 , m_sFmlaLink(sFmlaLink)
1127 , m_aMacroName(
std::move(aMacroName))
1131sal_Int32 VmlFormControlExporter::StartShape()
1134 AddShapeAttribute(XML_type,
"#_x0000_t201");
1135 if (!m_sControlName.isEmpty())
1136 AddShapeAttribute(XML_id, m_sControlName.toUtf8());
1138 return VMLExport::StartShape();
1141void VmlFormControlExporter::EndShape(sal_Int32 nShapeElement)
1145 pVmlDrawing->startElement(
FSNS(XML_v, XML_textbox));
1146 pVmlDrawing->startElement(XML_div);
1147 pVmlDrawing->startElement(XML_font);
1148 pVmlDrawing->write(m_aLabel);
1149 pVmlDrawing->endElement(XML_font);
1150 pVmlDrawing->endElement(XML_div);
1151 pVmlDrawing->endElement(
FSNS(XML_v, XML_textbox));
1153 OString aObjectType;
1157 aObjectType =
"Checkbox";
1160 aObjectType =
"Button";
1163 pVmlDrawing->startElement(
FSNS(XML_x, XML_ClientData), XML_ObjectType, aObjectType);
1165 = OString::number(m_aAreaFrom.Left()) +
", " + OString::number(m_aAreaFrom.Top()) +
", "
1166 + OString::number(m_aAreaFrom.Right()) +
", " + OString::number(m_aAreaFrom.Bottom()) +
", "
1167 + OString::number(m_aAreaTo.Left()) +
", " + OString::number(m_aAreaTo.Top()) +
", "
1168 + OString::number(m_aAreaTo.Right()) +
", " + OString::number(m_aAreaTo.Bottom());
1171 if (!m_aMacroName.isEmpty())
1183 if (!m_sFmlaLink.isEmpty())
1186 pVmlDrawing->endElement(
FSNS(XML_x, XML_ClientData));
1187 VMLExport::EndShape(nShapeElement);
1201 const OUString sCellLink
1207 VmlFormControlExporter aFormControlExporter(
rStrm.GetCurrentStream(),
GetObjType(), aAreaFrom,
1209 aFormControlExporter.SetSkipwzName(
true);
1210 aFormControlExporter.OverrideShapeIDGen(
true,
"_x0000_s");
1211 aFormControlExporter.AddSdrObject(*pObj,
false, -1,
1221 pDrawing->startElement(
FSNS(XML_mc, XML_AlternateContent),
1222 FSNS(XML_xmlns, XML_mc),
rStrm.getNamespaceURL(OOX_NS(mce)));
1223 pDrawing->startElement(
FSNS(XML_mc, XML_Choice),
1224 FSNS(XML_xmlns, XML_a14),
rStrm.getNamespaceURL(OOX_NS(a14)),
1225 XML_Requires,
"a14");
1227 pDrawing->startElement(
FSNS(XML_xdr, XML_twoCellAnchor), XML_editAs,
"oneCell");
1229 pDrawing->startElement(
FSNS(XML_xdr, XML_from));
1231 pDrawing->endElement(
FSNS(XML_xdr, XML_from));
1232 pDrawing->startElement(
FSNS(XML_xdr, XML_to));
1233 lcl_WriteAnchorVertex(pDrawing,
maAreaTo);
1234 pDrawing->endElement(
FSNS(XML_xdr, XML_to));
1236 pDrawing->startElement(
FSNS(XML_xdr, XML_sp));
1239 pDrawing->startElement(
FSNS(XML_xdr, XML_nvSpPr));
1241 pDrawing->singleElement(
FSNS(XML_xdr, XML_cNvPr),
1246 pDrawing->singleElement(
FSNS(XML_xdr, XML_cNvSpPr));
1248 pDrawing->endElement(
FSNS(XML_xdr, XML_nvSpPr));
1251 pDrawing->startElement(
FSNS(XML_xdr, XML_spPr));
1254 pDrawing->startElement(
FSNS(XML_a, XML_xfrm));
1256 pDrawing->singleElement(
FSNS(XML_a, XML_off),
1259 pDrawing->singleElement(
FSNS(XML_a, XML_ext),
1263 pDrawing->endElement(
FSNS(XML_a, XML_xfrm));
1266 pDrawing->startElement(
FSNS(XML_a, XML_prstGeom), XML_prst,
"rect");
1268 pDrawing->singleElement(
FSNS(XML_a, XML_avLst));
1270 pDrawing->endElement(
FSNS(XML_a, XML_prstGeom));
1272 pDrawing->endElement(
FSNS(XML_xdr, XML_spPr));
1276 pDrawing->startElement(
FSNS(XML_xdr, XML_txBody));
1280 sal_Int32 nLeft, nRight, nTop, nBottom;
1286 Reference< XPropertySet > rXPropSet(
mxShape, UNO_QUERY);
1292 mAny = rXPropSet->getPropertyValue(
"TextLeftDistance");
1293 if (mAny.hasValue())
1296 mAny = rXPropSet->getPropertyValue(
"TextRightDistance");
1297 if (mAny.hasValue())
1300 mAny = rXPropSet->getPropertyValue(
"TextUpperDistance");
1301 if (mAny.hasValue())
1304 mAny = rXPropSet->getPropertyValue(
"TextLowerDistance");
1305 if (mAny.hasValue())
1315 pDrawing->startElementNS(XML_a, XML_bodyPr,
1323 bool bTextAutoGrowHeight =
false;
1329 mAny = rXPropSet->getPropertyValue(
"TextAutoGrowHeight");
1330 if (mAny.hasValue())
1331 mAny >>= bTextAutoGrowHeight;
1337 pDrawing->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
1340 pDrawing->endElementNS(XML_a, XML_bodyPr);
1343 pDrawing->startElementNS(XML_a, XML_p);
1344 pDrawing->startElementNS(XML_a, XML_r);
1345 pDrawing->startElementNS(XML_a, XML_t);
1347 pDrawing->endElementNS(XML_a, XML_t);
1348 pDrawing->endElementNS(XML_a, XML_r);
1349 pDrawing->endElementNS(XML_a, XML_p);
1352 pDrawing->endElement(
FSNS(XML_xdr, XML_txBody));
1355 pDrawing->endElement(
FSNS(XML_xdr, XML_sp));
1356 pDrawing->singleElement(
FSNS(XML_xdr, XML_clientData));
1358 pDrawing->endElement(
FSNS(XML_xdr, XML_twoCellAnchor));
1359 pDrawing->endElement(
FSNS( XML_mc, XML_Choice ) );
1360 pDrawing->endElement(
FSNS( XML_mc, XML_AlternateContent ) );
1366 OUString sIdFormControlPr;
1372 const sal_Int32 nDrawing = DrawingML::getNewDrawingUniqueId();
1376 rStrm.GetCurrentStream()->getOutputStream(),
1377 "application/vnd.ms-excel.controlproperties+xml",
1379 &sIdFormControlPr );
1381 rStrm.PushStream( pFormControl );
1387 pFormControl->write(
"<formControlPr xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\" objectType=\"CheckBox\"");
1389 pFormControl->write(
" checked=\"Checked\"");
1391 pFormControl->write(
" autoLine=\"false\"");
1394 pFormControl->write(
" print=\"true\"");
1396 pFormControl->write(
" print=\"false\"");
1405 pFormControl->write(
" fmlaLink=\"");
1406 if (aCellLink.indexOf(
'!') < 0)
1409 pFormControl->write(
"!");
1411 pFormControl->write(aCellLink);
1412 pFormControl->write(
"\"");
1415 pFormControl->write(
" lockText=\"1\" noThreeD=\"1\"/>");
1422 sal_Int32 nDrawing = DrawingML::getNewDrawingUniqueId();
1426 rStrm.GetCurrentStream()->getOutputStream(),
1427 "application/vnd.ms-excel.controlproperties+xml",
1430 pFormControl->singleElement(XML_formControlPr, XML_xmlns,
1431 rStrm.getNamespaceURL(OOX_NS(xls14Lst)), XML_objectType,
1432 "Button", XML_lockText,
"1");
1437 return sIdFormControlPr;
1449 rWorksheet->startElement(
FSNS(XML_mc, XML_AlternateContent),
1450 FSNS(XML_xmlns, XML_mc),
rStrm.getNamespaceURL(OOX_NS(mce)));
1451 rWorksheet->startElement(
FSNS(XML_mc, XML_Choice), XML_Requires,
"x14");
1453 rWorksheet->startElement(
1455 XML_shapeId, OString::number(
mnShapeId),
1456 FSNS(XML_r, XML_id), aIdFormControlPr,
1459 rWorksheet->write(
"<controlPr defaultSize=\"0\" locked=\"1\" autoFill=\"0\" autoLine=\"0\" autoPict=\"0\"");
1462 rWorksheet->write(
" print=\"true\"");
1464 rWorksheet->write(
" print=\"false\"");
1468 rWorksheet->write(
" altText=\"");
1470 rWorksheet->write(
"\"");
1473 rWorksheet->write(
">");
1475 rWorksheet->startElement(XML_anchor, XML_moveWithCells,
"true", XML_sizeWithCells,
"false");
1476 rWorksheet->startElement(XML_from);
1477 lcl_WriteAnchorVertex(rWorksheet,
maAreaFrom);
1478 rWorksheet->endElement(XML_from);
1479 rWorksheet->startElement(XML_to);
1480 lcl_WriteAnchorVertex(rWorksheet,
maAreaTo);
1481 rWorksheet->endElement(XML_to);
1482 rWorksheet->endElement( XML_anchor );
1484 rWorksheet->write(
"</controlPr>");
1486 rWorksheet->endElement(XML_control);
1487 rWorksheet->endElement(
FSNS( XML_mc, XML_Choice ) );
1488 rWorksheet->endElement(
FSNS( XML_mc, XML_AlternateContent ) );
1496 rWorksheet->startElement(
FSNS(XML_mc, XML_AlternateContent),
FSNS(XML_xmlns, XML_mc),
1497 rStrm.getNamespaceURL(OOX_NS(mce)));
1498 rWorksheet->startElement(
FSNS(XML_mc, XML_Choice), XML_Requires,
"x14");
1500 rWorksheet->startElement(XML_control, XML_shapeId, OString::number(
mnShapeId),
1505 rWorksheet->startElement(XML_controlPr, XML_defaultSize,
"0", XML_print,
1506 mbPrint ?
"true" :
"false", XML_autoFill,
"0", XML_autoPict,
1509 rWorksheet->startElement(XML_anchor, XML_moveWithCells,
"true", XML_sizeWithCells,
1518 rWorksheet->startElement(XML_from);
1519 lcl_WriteAnchorVertex(rWorksheet, aAreaFrom);
1520 rWorksheet->endElement(XML_from);
1521 rWorksheet->startElement(XML_to);
1522 lcl_WriteAnchorVertex(rWorksheet, aAreaTo);
1523 rWorksheet->endElement(XML_to);
1524 rWorksheet->endElement(XML_anchor);
1526 rWorksheet->endElement(XML_controlPr);
1528 rWorksheet->endElement(XML_control);
1529 rWorksheet->endElement(
FSNS(XML_mc, XML_Choice));
1530 rWorksheet->endElement(
FSNS(XML_mc, XML_AlternateContent));
1573 css::awt::Rectangle aBoundRect;
1574 aShapeProp.
GetProperty( aBoundRect,
"BoundRect" );
1596 pDrawing->startElement(
FSNS( XML_xdr, XML_twoCellAnchor ),
1597 XML_editAs,
"oneCell" );
1598 Reference< XPropertySet > xPropSet(
mxShape, UNO_QUERY );
1602 ChartExport aChartExport(XML_xdr, pDrawing,
GetChartDoc(), &
rStrm, drawingml::DOCUMENT_XLSX);
1603 auto pURLTransformer = std::make_shared<ScURLTransformer>(*
mpDoc);
1604 aChartExport.SetURLTranslator(pURLTransformer);
1606 sal_Int32 nID =
rStrm.GetUniqueId();
1607 aChartExport.WriteChartObj(
mxShape, nID, nChartCount );
1611 pDrawing->singleElement(
FSNS( XML_xdr, XML_clientData)
1615 pDrawing->endElement(
FSNS( XML_xdr, XML_twoCellAnchor ) );
1624 return css::uno::Reference<css::chart::XChartDocument>(
1629 const ScPostIt* pScNote, std::u16string_view rAddText)
1634 ,
mbVisible(pScNote && pScNote->IsCaptionShown())
1637 , mbAutoScale(false)
1640 , mbColHidden(false)
1641 , mbRowHidden(false)
1647 aNoteText = pScNote->
GetText();
1673 SfxItemSet aItemSet = pCaption->GetMergedItemSet();
1674 meTVA = pCaption->GetTextVerticalAdjust();
1675 meTHA = pCaption->GetTextHorizontalAdjust();
1676 mbAutoScale = pCaption->GetFitToSize() != drawing::TextFitToSizeType_NONE;
1677 mbLocked = pCaption->IsMoveProtect() || pCaption->IsResizeProtect();
1704 switch(
rStrm.GetRoot().GetBiff() )
1710 sal_uInt16 nCharsLeft =
static_cast< sal_uInt16
>(
maNoteText.getLength() );
1720 rStrm << static_cast< sal_uInt16 >(
maScPos.
Row() )
1721 <<
static_cast< sal_uInt16
>(
maScPos.
Col() )
1727 rStrm << sal_uInt16( 0xFFFF )
1731 rStrm.Write( pcBuffer, nWriteChars );
1734 pcBuffer += nWriteChars;
1735 nCharsLeft = nCharsLeft - nWriteChars;
1754 sal_uInt16 nFlags = 0;
1757 rStrm << static_cast< sal_uInt16 >(
maScPos.
Row() )
1758 <<
static_cast< sal_uInt16
>(
maScPos.
Col() )
1769 rComments->startElement( XML_comment,
1771 XML_authorId, OString::number(nAuthorId)
1774 rComments->startElement(XML_text);
1778 rComments->endElement( XML_text );
1787 rComments->startElement(
FSNS(XML_mc, XML_AlternateContent));
1788 rComments->startElement(
FSNS(XML_mc, XML_Choice), XML_Requires,
"v2");
1789 rComments->startElement( XML_commentPr,
1795 XML_textHAlign, ToHorizAlign(
meTHA ),
1796 XML_textVAlign, ToVertAlign(
meTVA ) );
1797 rComments->startElement(XML_anchor, XML_moveWithCells,
"false", XML_sizeWithCells,
"false");
1798 rComments->startElement(
FSNS(XML_xdr, XML_from));
1800 rComments->endElement(
FSNS( XML_xdr, XML_from ) );
1801 rComments->startElement(
FSNS(XML_xdr, XML_to));
1803 rComments->endElement(
FSNS( XML_xdr, XML_to ) );
1804 rComments->endElement( XML_anchor );
1805 rComments->endElement( XML_commentPr );
1807 rComments->endElement(
FSNS( XML_mc, XML_Choice ) );
1808 rComments->startElement(
FSNS(XML_mc, XML_Fallback));
1810 rComments->endElement(
FSNS( XML_mc, XML_Fallback ) );
1811 rComments->endElement(
FSNS( XML_mc, XML_AlternateContent ) );
1814 rComments->endElement( XML_comment );
1850 if (!rMacroName.isEmpty() && !bOOXML)
1868 if ( pInfo && !pInfo->
GetMacro().isEmpty() )
1886 : mnTab( nTab ), mrNotes( rNotes )
1898 rStrm.GetCurrentStream()->getOutputStream(),
1899 "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
1901 rStrm.PushStream( rComments );
1904 rComments->startElement( XML_comments,
1905 XML_xmlns,
rStrm.getNamespaceURL(OOX_NS(xls)),
1906 FSNS(XML_xmlns, XML_mc),
rStrm.getNamespaceURL(OOX_NS(mce)),
1907 FSNS(XML_xmlns, XML_xdr),
rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)),
1908 FSNS(XML_xmlns, XML_v2),
rStrm.getNamespaceURL(OOX_NS(mceTest)),
1909 FSNS( XML_mc, XML_Ignorable ),
"v2" );
1911 rComments->startElement( XML_comments,
1912 XML_xmlns,
rStrm.getNamespaceURL(OOX_NS(xls)),
1913 FSNS(XML_xmlns, XML_xdr),
rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)) );
1915 rComments->startElement(XML_authors);
1917 typedef std::set<OUString> Authors;
1921 for(
size_t i = 0;
i < nNotes; ++
i )
1926 for(
const auto& rAuthor : aAuthors )
1928 rComments->startElement(XML_author);
1929 rComments->writeEscaped( rAuthor );
1930 rComments->endElement( XML_author );
1933 rComments->endElement( XML_authors );
1934 rComments->startElement(XML_commentList);
1936 Authors::const_iterator aAuthorsBegin = aAuthors.begin();
1937 for(
size_t i = 0;
i < nNotes; ++
i )
1940 Authors::const_iterator aAuthor = aAuthors.find(
1942 sal_Int32 nAuthorId =
distance( aAuthorsBegin, aAuthor );
1943 xNote->WriteXml( nAuthorId,
rStrm );
1946 rComments->endElement( XML_commentList );
1947 rComments->endElement( XML_comments );
1992 OSL_ENSURE(
mxEscherEx->GetGroupLevel() <= 1,
"XclExpObjectManager::ProcessDrawing - still groups open?" );
2004 OSL_ENSURE(
mxEscherEx->GetGroupLevel() <= 1,
"XclExpObjectManager::ProcessDrawing - still groups open?" );
2018 return mxObjList->GetMsodrawingPerSheet();
2028 return mxObjList->Add( std::move(pObjRec) );
2057 mnScaleX( nScaleX ),
const ::basegfx::B2DSize maPageSize
Bitmap GetBitmap(Color aTransparentReplaceColor) const
bool Convert(BmpConversion eConversion)
vcl::PixelFormat getPixelFormat() const
virtual void AddShape(sal_uInt32 nShpInstance, ShapeFlag nFlagIds, sal_uInt32 nShapeID=0)
void AddAtom(sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion=0, int nRecInstance=0)
virtual void OpenContainer(sal_uInt16 nEscherContainer, int nRecInstance=0)
sal_uInt64 GetStreamPos() const
SvStream & GetStream() const
EscherGraphicProvider & GetGraphicProvider()
SvStream * QueryPictureStream()
virtual void CloseContainer()
bool CreateGraphicProperties(const css::uno::Reference< css::drawing::XShape > &rXShape, const GraphicObject &rGraphicObj)
void AddOpt(sal_uInt16 nPropID, bool bBlib, sal_uInt32 nSizeReduction, SvMemoryStream &rStream)
bool GetOpt(sal_uInt16 nPropertyID, sal_uInt32 &rPropValue) const
void Commit(SvStream &rSt, sal_uInt16 nVersion=3, sal_uInt16 nRecType=ESCHER_OPT)
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
static ScAnchorType GetAnchorType(const SdrObject &)
static SC_DLLPUBLIC OUString addToken(std::u16string_view rTokenList, std::u16string_view rToken, sal_Unicode cSep, sal_Int32 nSepCount=1, bool bForceSep=false)
Adds the string rToken to rTokenList, using a list separator character.
const OUString & GetMacro() const
Additional class containing cell annotation data.
const OUString & GetAuthor() const
Returns the author date of this note.
const EditTextObject * GetEditTextObject() const
Returns the pointer to the current edit text object, or null.
SdrCaptionObj * GetOrCreateCaption(const ScAddress &rPos) const
Returns the caption object of this note.
OUString GetText() const
Returns the caption text of this note.
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
A wrapper for a UNO property set.
bool GetBoolProperty(const OUString &rPropName) const
Gets the specified Boolean property from the property set.
bool GetProperty(Type &rValue, const OUString &rPropName) const
Gets the specified property from the property set.
bool Is() const
Returns true, if the contained XPropertySet interface is valid.
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual const tools::Rectangle & GetCurrentBoundRect() const
virtual SdrObjKind GetObjIdentifier() const
virtual const tools::Rectangle & GetLogicRect() const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetEndian(SvStreamEndian SvStreamEndian)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
static OUString ExtractFromMacroDescriptor(const css::script::ScriptEventDescriptor &rDescriptor, XclTbxEventType eEventType)
Tries to extract an Excel macro name from the passed macro descriptor.
static css::uno::Reference< css::awt::XControlModel > GetControlModel(css::uno::Reference< css::drawing::XShape > const &xShape)
Returns the API control model from the passed API shape object.
sal_uInt32 GetDffFragmentPos(sal_uInt32 nFragmentKey)
Returns the position of the specified DFF stream fragment.
sal_uInt32 GetDffFragmentSize(sal_uInt32 nFragmentKey)
Returns the size of the specified DFF stream fragment.
void UpdateDffFragmentEnd()
Called after some data has been written to the DFF stream, to update the end position of the DFF frag...
bool ConvertAddress(XclAddress &rXclPos, const ScAddress &rScPos, bool bWarn)
Converts the passed Calc cell address to an Excel cell address.
css::uno::Reference< css::drawing::XShape > mxShape
The chart itself (BOF/EOF substream data).
css::uno::Reference< css::chart::XChartDocument > GetChartDoc() const
virtual ~XclExpChartObj() override
virtual void Save(XclExpStream &rStrm) override
Writes the OBJ record and the entire chart substream.
XclExpChartObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor, ScDocument *pDoc)
virtual void SaveXml(XclExpXmlStream &rStrm) override
Helper class for form controls to manage spreadsheet links .
sal_uInt16 mnEntryCount
Formula for source data range.
static void WriteFormulaSubRec(XclExpStream &rStrm, sal_uInt16 nSubRecId, const XclTokenArray &rTokArr)
Writes a formula subrecord with special style only valid in OBJ records.
XclExpControlHelper(const XclExpRoot &rRoot)
sal_uInt16 GetSourceEntryCount() const
Returns the number of entries in the source range, or 0, if no source set.
XclTokenArrayRef mxCellLink
virtual ~XclExpControlHelper() override
const XclTokenArray * GetCellLinkTokArr() const
Returns the Excel token array of the cell link, or 0, if no link present.
XclTokenArrayRef mxSrcRange
Formula for linked cell.
const XclTokenArray * GetSourceRangeTokArr() const
Returns the Excel token array of the source range, or 0, if no link present.
ScAddress mxCellLinkAddress
Number of entries in source range.
static void WriteFormula(XclExpStream &rStrm, const XclTokenArray &rTokArr)
Writes a formula with special style only valid in OBJ records.
void ConvertSheetLinks(css::uno::Reference< css::drawing::XShape > const &xShape)
Tries to get spreadsheet cell link and source range link from the passed shape.
Base class for DFF client anchor atoms used in spreadsheets.
virtual void WriteData(EscherEx &rEscherEx, const tools::Rectangle &rRect) override
Called from SVX DFF converter.
XclExpDffAnchorBase(const XclExpRoot &rRoot, sal_uInt16 nFlags=0)
Constructs a dummy client anchor.
void SetFlags(const SdrObject &rSdrObj)
Sets the flags according to the passed SdrObject.
void SetSdrObject(const SdrObject &rSdrObj)
Sets the anchor position and flags according to the passed SdrObject.
virtual void ImplSetFlags(const SdrObject &rSdrObj)
void WriteDffData(EscherEx &rEscherEx) const
Writes the DFF client anchor structure with the current anchor position.
sal_uInt16 mnFlags
The client anchor data.
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit)
XclExpDffDropDownAnchor(const XclExpRoot &rRoot, const ScAddress &rScPos)
Represents the position (anchor) of a shape in an embedded draw page.
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit) override
XclExpDffEmbeddedAnchor(const XclExpRoot &rRoot, const Size &rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY)
virtual void ImplSetFlags(const SdrObject &rSdrObj) override
XclExpDffNoteAnchor(const XclExpRoot &rRoot, const tools::Rectangle &rRect)
Represents the position (anchor) of an object in a Calc sheet.
virtual void ImplSetFlags(const SdrObject &rSdrObj) override
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit) override
XclExpDffSheetAnchor(const XclExpRoot &rRoot)
virtual XclExpDffAnchorBase * CreateDffAnchor() const override
Creates a new DFF client anchor object for embedded objects according to the scaling data passed to t...
XclExpEmbeddedObjectManager(const XclExpObjectManager &rParent, const Size &rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY)
sal_uInt16 Insert(const XclFontData &rFontData, XclExpColorType eColorType, bool bAppFont=false)
Inserts a new font with the passed font data into the buffer if not present.
virtual void SaveXml(XclExpXmlStream &rStrm) override
XclExpImgData(Graphic aGraphic, sal_uInt16 nRecId)
virtual void Save(XclExpStream &rStrm) override
Writes the BITMAP record.
sal_uInt16 mnRecId
The VCL graphic.
void FindExtSheet(sal_uInt16 &rnExtSheet, sal_uInt16 &rnXclTab, SCTAB nScTab, XclExpRefLogEntry *pRefLogEntry=nullptr)
Searches for an EXTERNSHEET index for the given Calc sheet.
Base class for records holding DFF stream fragments.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
sal_uInt32 mnFragmentKey
Reference to the DFF converter containing the DFF stream.
XclExpMsoDrawingBase(XclEscherEx &rEscherEx, sal_uInt16 nRecId)
The MSODRAWINGGROUP record contains the DGGCONTAINER with global DFF data such as the picture contain...
XclExpMsoDrawingGroup(XclEscherEx &rEscherEx)
One or more MSODRAWING records contain the DFF stream data for a drawing shape.
XclExpMsoDrawing(XclEscherEx &rEscherEx)
sal_uInt16 InsertMacroCall(const OUString &rMacroName, bool bVBasic, bool bFunc, bool bHidden=false)
Searches or inserts a defined name describing a macro name.
bool mbLocked
Auto scale text.
SdrTextHorzAdjust meTHA
true = permanently visible.
bool mbColHidden
Auto Fill Style.
tools::Rectangle maCommentTo
From and From Offset.
ScAddress maScPos
Text and formatting data (OOXML)
XclExpStringRef mpNoteContents
Main text of the note (<=BIFF7).
void WriteXml(sal_Int32 nAuthorId, XclExpXmlStream &rStrm)
const XclExpRoot & mrRoot
bool mbAutoScale
text vertical adjust
bool mbAutoFill
Position & Size locked.
const XclExpString & GetAuthor() const
OString maNoteText
Name of the author.
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the NOTE record.
sal_uInt16 mnObjId
Calc cell address of the note.
SdrTextVertAdjust meTVA
text horizontal adjust
XclExpNote(const XclExpRoot &rRoot, const ScAddress &rScPos, const ScPostIt *pScNote, std::u16string_view rAddText)
Constructs a NOTE record from the passed note object and/or the text.
bool mbVisible
Escher object ID (BIFF8).
bool mbRowHidden
Column containing the comment is hidden.
tools::Rectangle maCommentFrom
Row containing the comment is hidden.
virtual void Save(XclExpStream &rStrm) override
Writes the NOTE record, if the respective Escher object is present.
std::unique_ptr< SvMemoryStream > mpBackupStrm
XclExpObjectManager(const XclExpRoot &rRoot)
rtl::Reference< XclExpRecordBase > CreateDrawingGroup()
Creates and returns the MSODRAWINGGROUP record containing global DFF data in the DGGCONTAINER.
virtual XclExpDffAnchorBase * CreateDffAnchor() const
Creates a new DFF client anchor object.
void StartSheet()
Initializes the object manager for a new sheet.
rtl::Reference< XclExpRecordBase > ProcessDrawing(const SdrPage *pSdrPage)
Processes a drawing page and returns the record block containing all related records (MSODRAWING,...
void EndDocument()
Finalizes the object manager after conversion of all sheets.
std::optional< ::utl::TempFileFast > moTempFile
XclExpMsoDrawing * GetMsodrawingPerSheet()
sal_uInt16 AddObj(std::unique_ptr< XclObj > pObjRec)
virtual ~XclExpObjectManager() override
void InitStream(bool bTempFile)
rtl::Reference< XclExpObjList > mxObjList
std::unique_ptr< XclObj > RemoveLastObj()
std::shared_ptr< XclEscherEx > mxEscherEx
XclExpOcxControlObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor, OUString aClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize)
sal_uInt32 mnStrmStart
Class name of the control.
sal_uInt32 mnStrmSize
Start position in 'Ctls' stream.
virtual void WriteSubRecs(XclExpStream &rStrm) override
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Base class for single records with any content.
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
void SetRecSize(std::size_t nRecSize)
Sets a new record size prediction.
Access to global data from other classes.
XclExpFontBuffer & GetFontBuffer() const
Returns the font buffer.
XclExpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
XclExpFormulaCompiler & GetFormulaCompiler() const
Returns the formula compiler to produce formula token arrays.
XclExpObjectManager & GetObjectManager() const
Returns the drawing object manager.
XclExpAddressConverter & GetAddressConverter() const
Returns the address converter.
XclExpLinkManager & GetLocalLinkManager() const
Returns the local link manager for the current sheet.
XclExpTabInfo & GetTabInfo() const
Returns the buffer for Calc->Excel sheet index conversion.
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
virtual ~XclExpShapeObj() override
XclExpShapeObj(XclExpObjectManager &rRoot, css::uno::Reference< css::drawing::XShape > const &xShape, ScDocument *pDoc)
virtual void WriteSubRecs(XclExpStream &rStrm) override
This class is used to export Excel record streams.
static XclExpStringRef CreateString(const XclExpRoot &rRoot, const OUString &rString, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
Creates a new unformatted string from the passed string.
This class stores an unformatted or formatted string for Excel export.
std::size_t GetSize() const
Returns the byte count the whole string will take on export.
const css::uno::Reference< css::drawing::XShape > mxShape
sal_Int16 mnSelEntry
Combobox dropdown line count.
XclExpTbxControlObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor)
tools::Rectangle maAreaTo
bool mbFlatButton
Scrollbar: Page step.
sal_uInt16 mnScrollStep
Scrollbar: Maximum value.
sal_uInt16 mnScrollValue
Selected entry in combobox (1-based).
void SaveVml(XclExpXmlStream &rStrm)
Save into xl/drawings/vmlDrawing1.vml.
bool mbScrollHor
true = Multi selection in listbox.
OUString SaveControlPropertiesXml(XclExpXmlStream &rStrm) const
void setShapeId(sal_Int32 aShapeId)
bool mbPrint
Scrollbar: true = horizontal.
bool mbMultiSel
False = 3D border style; True = Flat border style.
sal_uInt16 mnScrollMax
Scrollbar: Minimum value.
XclTbxEventType meEventType
Indexes of all selected entries in a multi selection.
void WriteSbs(XclExpStream &rStrm)
Writes the ftSbs sub structure containing scrollbar data.
sal_uInt16 mnState
Height of the control.
virtual void SaveXml(XclExpXmlStream &rStrm) override
sal_Int16 mnLineCount
Checked/unchecked state.
sal_Int32 mnHeight
Type of supported macro event.
sal_uInt16 mnScrollPage
Scrollbar: Single step.
tools::Rectangle maAreaFrom
bool SetMacroLink(const css::script::ScriptEventDescriptor &rEvent)
Sets the name of a macro attached to this control.
sal_uInt16 mnScrollMin
Scrollbar: Current value.
XclExpObjectManager & mrRoot
virtual void WriteSubRecs(XclExpStream &rStrm) override
void SaveSheetXml(XclExpXmlStream &rStrm, const OUString &aIdFormControlPr) const
void WriteCellLinkSubRec(XclExpStream &rStrm, sal_uInt16 nSubRecId)
Writes a subrecord containing a cell link, or nothing, if no link present.
bool mbFlatBorder
False = 3D button style; True = Flat button style.
void ReadFontProperties(XclFontData &rFontData, const ScfPropertySet &rPropSet, XclFontPropSetType eType, sal_Int16 nScript=-1)
Reads all font properties from the passed property set.
XclMacroHelper(const XclExpRoot &rRoot)
virtual ~XclMacroHelper() override
const OUString & GetMacroName() const
bool SetMacroLink(const css::script::ScriptEventDescriptor &rEvent, const XclTbxEventType &nEventType)
Sets the name of a macro for object of passed type.
void WriteMacroSubRec(XclExpStream &rStrm)
Writes an ftMacro subrecord containing a macro link, or nothing, if no macro present.
XclTokenArrayRef mxMacroLink
OUString maMacroName
Token array containing a link to an attached macro.
static void WriteFromTo(XclExpXmlStream &rStrm, const XclObjAny &rObj)
virtual void WriteSubRecs(XclExpStream &rStrm) override
sal_uInt16 GetObjType() const
void ImplWriteAnchor(const SdrObject *pSdrObj, const tools::Rectangle *pChildAnchor)
void SetPrintable(bool b)
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
std::unique_ptr< XclExpMsoDrawing > pClientTextbox
std::unique_ptr< XclTxo > pTxo
XclOutput GetOutput() const
Returns the current output format of the importer/exporter.
rtl_TextEncoding GetTextEncoding() const
Returns the text encoding to import/export byte strings.
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
XclFontPropSetHelper & GetFontPropSetHelper() const
Returns the property set helper for fonts.
Binary representation of an Excel token array.
sal_uInt16 GetSize() const
Returns the size of the token array in bytes.
void WriteArray(XclExpStream &rStrm) const
Writes the tokens of the token array (without size field).
static OString ToOString(const Color &rColor)
static sax_fastparser::FSHelperPtr WriteElement(sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const T &value)
static OUString ToOUString(const char *s)
static OUString GetStreamName(const char *sStreamDir, const char *sStream, sal_Int32 nId)
static sal_Int32 getNewChartUniqueId()
virtual void EndShape(sal_Int32 nShapeElement)
virtual sal_Int32 StartShape()
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
#define ESCHER_Prop_lineColor
#define ESCHER_SplitMenuColors
#define ESCHER_Prop_LockAgainstGrouping
#define ESCHER_Prop_fNoFillHitTest
#define ESCHER_ClientData
#define ESCHER_ShpInst_HostControl
#define ESCHER_Prop_fshadowObscured
#define ESCHER_Prop_FitTextToShape
#define ESCHER_Prop_fNoLineDrawDash
#define ESCHER_Prop_wzName
#define ESCHER_Prop_WrapText
#define ESCHER_ClientAnchor
#define ESCHER_Prop_fillBackColor
#define ESCHER_Prop_pictureId
#define ESCHER_Prop_fPrint
#define ESCHER_Prop_lTxid
#define ESCHER_SpContainer
#define ESCHER_ClientTextbox
#define ESCHER_DggContainer
#define ESCHER_Prop_fillColor
#define ESCHER_Prop_wzDescription
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
#define MSPROP_DESCRIPTION_MAX_LEN
sal_Int32 findValue(const css::uno::Sequence< T1 > &_rList, const T2 &_rValue)
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
css::uno::Reference< css::frame::XModel > getXModel(const css::uno::Reference< css::uno::XInterface > &_rxComponent)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
sal_Int64 convertHmmToEmu(sal_Int32 nValue)
OUString getRelationship(Relationship eRelationship)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
const char * UseIf(const char *s, bool bUse)
std::shared_ptr< FastSerializerHelper > FSHelperPtr
uno::Reference< drawing::XShape > const mxShape
This struct helps reading and writing Excel fonts.
sal_uInt16 mnHeight
String with styles (bold, italic).
sal_uInt32 mnTY
X offset in left column (1/1024 of column width).
sal_uInt32 mnBY
X offset in right column (1/1024 of column width).
sal_uInt16 mnRX
Y offset in top row (1/256 of row height).
void SetRect(const XclRoot &rRoot, SCTAB nScTab, const tools::Rectangle &rRect, MapUnit eMapUnit)
Initializes the anchor coordinates for a sheet.
constexpr OUStringLiteral SC_UNONAME_BOUNDCELL
constexpr OUStringLiteral SC_SERVICENAME_VALBIND
constexpr OUStringLiteral SC_SERVICENAME_LISTSOURCE
constexpr OUStringLiteral SC_UNONAME_CELLRANGE
const std::u16string_view aStringList[]
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
@ EXC_COLOR_CTRLTEXT
Area in a chart.
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
@ EXC_OUTPUT_XML_2007
MS Excel binary .xls.
const sal_uInt16 EXC_ID_OBJPICTFMLA
Option flags.
SvStream & WriteXclObjAnchor(SvStream &rStrm, const XclObjAnchor &rAnchor)
const sal_uInt8 EXC_OBJ_VER_CENTER
const sal_uInt16 EXC_OBJ_CHECKBOX_FLAT
const sal_uInt16 EXC_ESC_ANCHOR_LOCKED
const sal_uInt16 EXC_OBJTYPE_CHART
const sal_uInt16 EXC_OBJ_CHECKBOX_CHECKED
const sal_uInt16 EXC_OBJ_CHECKBOX_TRISTATE
const sal_uInt16 EXC_IMGDATA_BMP
const sal_uInt16 EXC_OBJ_CHECKBOX_UNCHECKED
const sal_uInt16 EXC_OBJTYPE_UNKNOWN
const sal_uInt16 EXC_ID_OBJCBLSFMLA
List box/combo box data.
const sal_uInt16 EXC_OBJ_GROUPBOX_FLAT
Dropdown style: filtered.
const sal_uInt16 EXC_ID_OBJGBODATA
Scroll bar/list box/combo box cell link.
const sal_uInt16 EXC_OBJTYPE_GROUPBOX
const sal_uInt16 EXC_IMGDATA_WIN
const sal_uInt16 EXC_OBJ_SCROLLBAR_DEFFLAGS
const sal_uInt16 EXC_OBJTYPE_DROPDOWN
const sal_uInt16 EXC_ID_OBJSBS
Radio button group data.
const sal_uInt16 EXC_OBJTYPE_OPTIONBUTTON
const sal_uInt16 EXC_OBJTYPE_BUTTON
const sal_uInt16 EXC_ID_OBJCBLS
OLE link formula.
const sal_uInt8 EXC_OBJ_HOR_CENTER
const sal_uInt16 EXC_ID_OBJFLAGS
Clipboard format.
const sal_uInt8 EXC_OBJ_HOR_LEFT
const sal_uInt16 EXC_OBJ_SCROLLBAR_FLAT
@ EXC_TBX_EVENT_VALUE
XTextListener.textChanged.
@ EXC_TBX_EVENT_MOUSE
XActionListener.actionPerformed.
@ EXC_TBX_EVENT_CHANGE
XAdjustmentListener.adjustmentValueChanged.
const sal_uInt16 EXC_ID_OBJSBSFMLA
Note data.
const sal_uInt8 EXC_OBJ_LISTBOX_SINGLE
const sal_uInt16 EXC_OBJ_SCROLLBAR_MIN
const sal_uInt16 EXC_NOTE5_MAXLEN
const sal_uInt8 EXC_OBJ_LISTBOX_MULTI
Single selection.
const sal_uInt16 EXC_OBJ_SCROLLBAR_MAX
const sal_uInt16 EXC_ID_MSODRAWING
const sal_uInt16 EXC_OBJTYPE_LABEL
const sal_uInt16 EXC_ID_OBJLBSDATA
Check box/radio button data.
const sal_uInt16 EXC_ID_OBJMACRO
End of OBJ.
const sal_uInt16 EXC_OBJTYPE_SCROLLBAR
const sal_uInt16 EXC_ID_OBJCF
Group marker.
const sal_uInt16 EXC_OBJ_SCROLLBAR_HOR
const sal_uInt16 EXC_OBJTYPE_CHECKBOX
const sal_uInt16 EXC_ID_NOTE
const sal_uInt16 EXC_ESC_ANCHOR_SIZELOCKED
const sal_uInt16 EXC_ID_MSODRAWINGGROUP
const sal_uInt16 EXC_ESC_ANCHOR_POSLOCKED
const sal_uInt16 EXC_OBJTYPE_SPIN
const sal_uInt16 EXC_OBJ_INVALID_ID
const sal_uInt16 EXC_OBJ_LISTBOX_FLAT
const sal_uInt16 EXC_NOTE_VISIBLE
const sal_uInt16 EXC_OBJTYPE_PICTURE
const sal_uInt16 EXC_OBJTYPE_LISTBOX
const sal_Unicode EXC_EXTSH_OWNDOC
const sal_uInt16 EXC_FONT_APP
@ EXC_FONTPROPSET_CONTROL
All text objects in charts.