LibreOffice Module sc (master) 1
xeescher.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <utility>
21#include <xeescher.hxx>
22
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>
33
34#include <set>
36#include <svx/svdoole2.hxx>
37#include <svx/svdocapt.hxx>
38#include <editeng/outlobj.hxx>
39#include <unotools/tempfile.hxx>
41#include <svtools/embedhlp.hxx>
42
43#include <unonames.hxx>
44#include <convuno.hxx>
45#include <postit.hxx>
46
47#include <fapihelper.hxx>
48#include <xcl97esc.hxx>
49#include <xechart.hxx>
50#include <xeformula.hxx>
51#include <xehelper.hxx>
52#include <xelink.hxx>
53#include <xename.hxx>
54#include <xestyle.hxx>
55#include <xllink.hxx>
56#include <xltools.hxx>
57#include <userdat.hxx>
58#include <drwlayer.hxx>
59#include <svl/itemset.hxx>
60#include <svx/sdtaitm.hxx>
61#include <document.hxx>
62#include <svx/xfillit0.hxx>
63#include <svx/xflclit.hxx>
64
66#include <oox/token/tokens.hxx>
70#include <oox/export/utils.hxx>
71#include <oox/token/namespaces.hxx>
73#include <memory>
74
75using namespace com::sun::star;
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::frame::XModel;
84using ::com::sun::star::awt::XControlModel;
85using ::com::sun::star::form::binding::XBindableValue;
86using ::com::sun::star::form::binding::XListEntrySink;
87using ::com::sun::star::script::ScriptEventDescriptor;
88using ::com::sun::star::table::CellAddress;
89using ::com::sun::star::table::CellRangeAddress;
90using ::oox::drawingml::DrawingML;
91using ::oox::drawingml::ChartExport;
92using namespace oox;
93
94namespace
95{
96
97const char *ToHorizAlign( SdrTextHorzAdjust eAdjust )
98{
99 switch( eAdjust )
100 {
102 return "center";
104 return "right";
106 return "justify";
108 default:
109 return "left";
110 }
111}
112
113const char *ToVertAlign( SdrTextVertAdjust eAdjust )
114{
115 switch( eAdjust )
116 {
118 return "center";
120 return "bottom";
122 return "justify";
124 default:
125 return "top";
126 }
127}
128
129void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, const tools::Rectangle &aRect )
130{
131 rComments->startElement(FSNS(XML_xdr, XML_col));
132 rComments->writeEscaped( OUString::number( aRect.Left() ) );
133 rComments->endElement( FSNS( XML_xdr, XML_col ) );
134 rComments->startElement(FSNS(XML_xdr, XML_colOff));
135 rComments->writeEscaped( OUString::number( aRect.Top() ) );
136 rComments->endElement( FSNS( XML_xdr, XML_colOff ) );
137 rComments->startElement(FSNS(XML_xdr, XML_row));
138 rComments->writeEscaped( OUString::number( aRect.Right() ) );
139 rComments->endElement( FSNS( XML_xdr, XML_row ) );
140 rComments->startElement(FSNS(XML_xdr, XML_rowOff));
141 rComments->writeEscaped( OUString::number( aRect.Bottom() ) );
142 rComments->endElement( FSNS( XML_xdr, XML_rowOff ) );
143}
144
145tools::Long lcl_hmm2output(tools::Long value, bool bInEMU)
146{
148}
149
150void lcl_GetFromTo( const XclExpRoot& rRoot, const tools::Rectangle &aRect, sal_Int32 nTab, tools::Rectangle &aFrom, tools::Rectangle &aTo, bool bInEMU = false )
151{
152 sal_Int32 nCol = 0, nRow = 0;
153 sal_Int32 nColOff = 0, nRowOff= 0;
154
155 const bool bRTL = rRoot.GetDoc().IsNegativePage( nTab );
156 if (!bRTL)
157 {
158 while(true)
159 {
160 tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
161 if( r.Left() <= aRect.Left() )
162 {
163 nCol++;
164 nColOff = aRect.Left() - r.Left();
165 }
166 if( r.Top() <= aRect.Top() )
167 {
168 nRow++;
169 nRowOff = aRect.Top() - r.Top();
170 }
171 if( r.Left() > aRect.Left() && r.Top() > aRect.Top() )
172 {
173 aFrom = tools::Rectangle( nCol-1, lcl_hmm2output( nColOff, bInEMU ),
174 nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
175 break;
176 }
177 }
178 }
179 else
180 {
181 while(true)
182 {
183 tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
184 if( r.Left() >= aRect.Left() )
185 {
186 nCol++;
187 nColOff = r.Left() - aRect.Left();
188 }
189 if( r.Top() <= aRect.Top() )
190 {
191 nRow++;
192 nRowOff = aRect.Top() - r.Top();
193 }
194 if( r.Left() < aRect.Left() && r.Top() > aRect.Top() )
195 {
196 aFrom = tools::Rectangle( nCol-1, lcl_hmm2output( nColOff, bInEMU ),
197 nRow-1, lcl_hmm2output( nRowOff, bInEMU ) );
198 break;
199 }
200 }
201 }
202 if (!bRTL)
203 {
204 while(true)
205 {
206 tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
207 if( r.Right() < aRect.Right() )
208 nCol++;
209 if( r.Bottom() < aRect.Bottom() )
210 nRow++;
211 if( r.Right() >= aRect.Right() && r.Bottom() >= aRect.Bottom() )
212 {
213 aTo = tools::Rectangle( nCol, lcl_hmm2output( aRect.Right() - r.Left(), bInEMU ),
214 nRow, lcl_hmm2output( aRect.Bottom() - r.Top(), bInEMU ));
215 break;
216 }
217 }
218 }
219 else
220 {
221 while(true)
222 {
223 tools::Rectangle r = rRoot.GetDoc().GetMMRect( nCol,nRow,nCol,nRow,nTab );
224 if( r.Right() >= aRect.Right() )
225 nCol++;
226 if( r.Bottom() < aRect.Bottom() )
227 nRow++;
228 if( r.Right() < aRect.Right() && r.Bottom() >= aRect.Bottom() )
229 {
230 aTo = tools::Rectangle( nCol, lcl_hmm2output( r.Left() - aRect.Right(), bInEMU ),
231 nRow, lcl_hmm2output( aRect.Bottom() - r.Top(), bInEMU ));
232 break;
233 }
234 }
235 }
236}
237
238} // namespace
239
240// Escher client anchor =======================================================
241
242XclExpDffAnchorBase::XclExpDffAnchorBase( const XclExpRoot& rRoot, sal_uInt16 nFlags ) :
243 XclExpRoot( rRoot ),
244 mnFlags( nFlags )
245{
246}
247
249{
250 ImplSetFlags( rSdrObj );
251}
252
254{
255 ImplSetFlags( rSdrObj );
256 ImplCalcAnchorRect( rSdrObj.GetCurrentBoundRect(), MapUnit::Map100thMM );
257}
258
260{
261 rEscherEx.AddAtom( 18, ESCHER_ClientAnchor );
262 rEscherEx.GetStream().WriteUInt16( mnFlags );
263 WriteXclObjAnchor( rEscherEx.GetStream(), maAnchor );
264}
265
267{
268 // the passed rectangle is in twips
269 ImplCalcAnchorRect( rRect, MapUnit::MapTwip );
270 WriteDffData( rEscherEx );
271}
272
274{
275 OSL_FAIL( "XclExpDffAnchorBase::ImplSetFlags - not implemented" );
276}
277
279{
280 OSL_FAIL( "XclExpDffAnchorBase::ImplCalcAnchorRect - not implemented" );
281}
282
284 XclExpDffAnchorBase( rRoot ),
285 mnScTab( rRoot.GetCurrScTab() )
286{
287}
288
290{
291 // set flags for cell/page anchoring
292 if ( ScDrawLayer::GetAnchorType( rSdrObj ) == SCA_CELL )
293 mnFlags = 0;
294 else
296}
297
299{
300 maAnchor.SetRect( GetRoot(), mnScTab, rRect, eMapUnit );
301}
302
304 const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY ) :
305 XclExpDffAnchorBase( rRoot ),
306 maPageSize( rPageSize ),
307 mnScaleX( nScaleX ),
308 mnScaleY( nScaleY )
309{
310}
311
313{
314 // TODO (unsupported feature): fixed size
315}
316
318{
319 maAnchor.SetRect( maPageSize, mnScaleX, mnScaleY, rRect, eMapUnit );
320}
321
324{
325 maAnchor.SetRect( rRoot, rRoot.GetCurrScTab(), rRect, MapUnit::Map100thMM );
326}
327
330{
335}
336
337// MSODRAWING* records ========================================================
338
340 XclExpRecord( nRecId ),
341 mrEscherEx( rEscherEx ),
342 mnFragmentKey( rEscherEx.InitNextDffFragment() )
343{
344}
345
347{
349 "XclExpMsoDrawingBase::WriteBody - DFF stream position mismatch" );
351}
352
355{
356 SvStream& rDffStrm = mrEscherEx.GetStream();
357
358 // write the DGGCONTAINER with some default settings
360
361 // TODO: stuff the OPT atom with our own document defaults?
362 static const sal_uInt8 spnDffOpt[] = {
363 0xBF, 0x00, 0x08, 0x00, 0x08, 0x00, 0x81, 0x01,
364 0x09, 0x00, 0x00, 0x08, 0xC0, 0x01, 0x40, 0x00,
365 0x00, 0x08
366 };
367 mrEscherEx.AddAtom( sizeof( spnDffOpt ), ESCHER_OPT, 3, 3 );
368 rDffStrm.WriteBytes(spnDffOpt, sizeof(spnDffOpt));
369
370 // SPLITMENUCOLORS contains colors in toolbar
371 static const sal_uInt8 spnDffSplitMenuColors[] = {
372 0x0D, 0x00, 0x00, 0x08, 0x0C, 0x00, 0x00, 0x08,
373 0x17, 0x00, 0x00, 0x08, 0xF7, 0x00, 0x00, 0x10
374 };
375 mrEscherEx.AddAtom( sizeof( spnDffSplitMenuColors ), ESCHER_SplitMenuColors, 0, 4 );
376 rDffStrm.WriteBytes(spnDffSplitMenuColors, sizeof(spnDffSplitMenuColors));
377
378 // close the DGGCONTAINER
381}
382
385{
386}
387
388XclExpImgData::XclExpImgData( Graphic aGraphic, sal_uInt16 nRecId ) :
389 maGraphic(std::move( aGraphic )),
390 mnRecId( nRecId )
391{
392}
393
395{
398 aBmp.Convert( BmpConversion::N24Bit );
399
400 Bitmap::ScopedReadAccess pAccess(aBmp);
401 if( !pAccess )
402 return;
403
404 sal_Int32 nWidth = ::std::min< sal_Int32 >( pAccess->Width(), 0xFFFF );
405 sal_Int32 nHeight = ::std::min< sal_Int32 >( pAccess->Height(), 0xFFFF );
406 if( (nWidth <= 0) || (nHeight <= 0) )
407 return;
408
409 sal_uInt8 nPadding = static_cast< sal_uInt8 >( nWidth & 0x03 );
410 sal_uInt32 nTmpSize = static_cast< sal_uInt32 >( (nWidth * 3 + nPadding) * nHeight + 12 );
411
412 rStrm.StartRecord( mnRecId, nTmpSize + 4 );
413
414 rStrm << EXC_IMGDATA_BMP // BMP format
415 << EXC_IMGDATA_WIN // Windows
416 << nTmpSize // size after _this_ field
417 << sal_uInt32( 12 ) // BITMAPCOREHEADER size
418 << static_cast< sal_uInt16 >( nWidth ) // width
419 << static_cast< sal_uInt16 >( nHeight ) // height
420 << sal_uInt16( 1 ) // planes
421 << sal_uInt16( 24 ); // bits per pixel
422
423 for( sal_Int32 nY = nHeight - 1; nY >= 0; --nY )
424 {
425 Scanline pScanline = pAccess->GetScanline( nY );
426 for( sal_Int32 nX = 0; nX < nWidth; ++nX )
427 {
428 const BitmapColor& rBmpColor = pAccess->GetPixelFromData( pScanline, nX );
429 rStrm << rBmpColor.GetBlue() << rBmpColor.GetGreen() << rBmpColor.GetRed();
430 }
431 rStrm.WriteZeroBytes( nPadding );
432 }
433
434 rStrm.EndRecord();
435}
436
438{
439 sax_fastparser::FSHelperPtr pWorksheet = rStrm.GetCurrentStream();
440
441 DrawingML aDML(pWorksheet, &rStrm, drawingml::DOCUMENT_XLSX);
442 OUString rId = aDML.WriteImage( maGraphic );
443 pWorksheet->singleElement(XML_picture, FSNS(XML_r, XML_id), rId);
444}
445
447 XclExpRoot( rRoot ),
448 mnEntryCount( 0 )
449{
450}
451
453{
454}
455
456void XclExpControlHelper::ConvertSheetLinks( Reference< XShape > const & xShape )
457{
458 mxCellLink.reset();
460 mxSrcRange.reset();
461 mnEntryCount = 0;
462
463 // get control model
464 Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( xShape );
465 if( !xCtrlModel.is() )
466 return;
467
468 // *** cell link *** ------------------------------------------------------
469
470 Reference< XBindableValue > xBindable( xCtrlModel, UNO_QUERY );
471 if( xBindable.is() )
472 {
473 Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY );
474 if( xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_VALBIND ) )
475 {
476 ScfPropertySet aBindProp( xServInfo );
477 CellAddress aApiAddress;
478 if( aBindProp.GetProperty( aApiAddress, SC_UNONAME_BOUNDCELL ) )
479 {
481 if( GetTabInfo().IsExportTab( mxCellLinkAddress.Tab() ) )
483 }
484 }
485 }
486
487 // *** source range *** ---------------------------------------------------
488
489 Reference< XListEntrySink > xEntrySink( xCtrlModel, UNO_QUERY );
490 if( !xEntrySink.is() )
491 return;
492
493 Reference< XServiceInfo > xServInfo( xEntrySink->getListEntrySource(), UNO_QUERY );
494 if( !(xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_LISTSOURCE )) )
495 return;
496
497 ScfPropertySet aSinkProp( xServInfo );
498 CellRangeAddress aApiRange;
499 if( aSinkProp.GetProperty( aApiRange, SC_UNONAME_CELLRANGE ) )
500 {
501 ScRange aSrcRange;
502 ScUnoConversion::FillScRange( aSrcRange, aApiRange );
503 if( (aSrcRange.aStart.Tab() == aSrcRange.aEnd.Tab()) && GetTabInfo().IsExportTab( aSrcRange.aStart.Tab() ) )
505 mnEntryCount = static_cast< sal_uInt16 >( aSrcRange.aEnd.Col() - aSrcRange.aStart.Col() + 1 );
506 }
507}
508
510{
511 sal_uInt16 nFmlaSize = rTokArr.GetSize();
512 rStrm << nFmlaSize << sal_uInt32( 0 );
513 rTokArr.WriteArray( rStrm );
514 if( nFmlaSize & 1 ) // pad to 16-bit
515 rStrm << sal_uInt8( 0 );
516}
517
518void XclExpControlHelper::WriteFormulaSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId, const XclTokenArray& rTokArr )
519{
520 rStrm.StartRecord( nSubRecId, (rTokArr.GetSize() + 5) & ~1 );
521 WriteFormula( rStrm, rTokArr );
522 rStrm.EndRecord();
523}
524
525//delete for exporting OCX
526//#if EXC_EXP_OCX_CTRL
527
528XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape,
529 const tools::Rectangle* pChildAnchor, OUString aClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize ) :
530 XclObj( rObjMgr, EXC_OBJTYPE_PICTURE, true ),
531 XclExpControlHelper( rObjMgr.GetRoot() ),
532 maClassName(std::move( aClassName )),
533 mnStrmStart( nStrmStart ),
534 mnStrmSize( nStrmSize )
535{
537
538 // OBJ record flags
539 SetLocked( true );
540 SetPrintable( aCtrlProp.GetBoolProperty( "Printable" ) );
541 SetAutoFill( false );
542 SetAutoLine( false );
543
544 // fill DFF property set
547 ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor | ShapeFlag::OLEShape );
548 tools::Rectangle aDummyRect;
550 aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 ); // bool field
551 aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x08000040 );
552 aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x00080000 ); // bool field
553
554 // #i51348# name of the control, may overwrite shape name
555 OUString aCtrlName;
556 if( aCtrlProp.GetProperty( aCtrlName, "Name" ) && !aCtrlName.isEmpty() )
557 aPropOpt.AddOpt( ESCHER_Prop_wzName, aCtrlName );
558
559 // meta file
560 //TODO - needs check
561 Reference< XPropertySet > xShapePS( xShape, UNO_QUERY );
562 if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, "MetaFile", false ) )
563 {
564 sal_uInt32 nBlipId;
565 if( aPropOpt.GetOpt( ESCHER_Prop_pib, nBlipId ) )
566 aPropOpt.AddOpt( ESCHER_Prop_pictureId, nBlipId );
567 }
568
569 // write DFF property set to stream
570 aPropOpt.Commit( mrEscherEx.GetStream() );
571
572 // anchor
573 ImplWriteAnchor( SdrObject::getSdrObjectFromXShape( xShape ), pChildAnchor );
574
575 mrEscherEx.AddAtom( 0, ESCHER_ClientData ); // OBJ record
576 mrEscherEx.CloseContainer(); // ESCHER_SpContainer
578
579 // spreadsheet links
580 ConvertSheetLinks( xShape );
581}
582
584{
585 // OBJCF - clipboard format
586 rStrm.StartRecord( EXC_ID_OBJCF, 2 );
587 rStrm << sal_uInt16( 2 );
588 rStrm.EndRecord();
589
590 // OBJFLAGS
591 rStrm.StartRecord( EXC_ID_OBJFLAGS, 2 );
592 rStrm << sal_uInt16( 0x0031 );
593 rStrm.EndRecord();
594
595 // OBJPICTFMLA
596 XclExpString aClass( maClassName );
597 sal_uInt16 nClassNameSize = static_cast< sal_uInt16 >( aClass.GetSize() );
598 sal_uInt16 nClassNamePad = nClassNameSize & 1;
599 sal_uInt16 nFirstPartSize = 12 + nClassNameSize + nClassNamePad;
600
601 const XclTokenArray* pCellLink = GetCellLinkTokArr();
602 sal_uInt16 nCellLinkSize = pCellLink ? ((pCellLink->GetSize() + 7) & 0xFFFE) : 0;
603
604 const XclTokenArray* pSrcRange = GetSourceRangeTokArr();
605 sal_uInt16 nSrcRangeSize = pSrcRange ? ((pSrcRange->GetSize() + 7) & 0xFFFE) : 0;
606
607 sal_uInt16 nPictFmlaSize = nFirstPartSize + nCellLinkSize + nSrcRangeSize + 18;
608 rStrm.StartRecord( EXC_ID_OBJPICTFMLA, nPictFmlaSize );
609
610 rStrm << nFirstPartSize // size of first part
611 << sal_uInt16( 5 ) // formula size
612 << sal_uInt32( 0 ) // unknown ID
613 << sal_uInt8( 0x02 ) << sal_uInt32( 0 ) // tTbl token with unknown ID
614 << sal_uInt8( 3 ) // pad to word
615 << aClass; // "Forms.***.1"
616 rStrm.WriteZeroBytes( nClassNamePad ); // pad to word
617 rStrm << mnStrmStart // start in 'Ctls' stream
618 << mnStrmSize // size in 'Ctls' stream
619 << sal_uInt32( 0 ); // class ID size
620 // cell link
621 rStrm << nCellLinkSize;
622 if( pCellLink )
623 WriteFormula( rStrm, *pCellLink );
624 // list source range
625 rStrm << nSrcRangeSize;
626 if( pSrcRange )
627 WriteFormula( rStrm, *pSrcRange );
628
629 rStrm.EndRecord();
630}
631
632//#else
633
634XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< XShape > const & xShape , const tools::Rectangle* pChildAnchor ) :
635 XclObj( rRoot, EXC_OBJTYPE_UNKNOWN, true ),
636 XclMacroHelper( rRoot ),
637 mxShape( xShape ),
638 meEventType( EXC_TBX_EVENT_ACTION ),
639 mnHeight( 0 ),
640 mnState( 0 ),
641 mnLineCount( 0 ),
642 mnSelEntry( 0 ),
643 mnScrollValue( 0 ),
644 mnScrollMin( 0 ),
645 mnScrollMax( 100 ),
646 mnScrollStep( 1 ),
647 mnScrollPage( 10 ),
648 mbFlatButton( false ),
649 mbFlatBorder( false ),
650 mbMultiSel( false ),
651 mbScrollHor( false ),
652 mbPrint( false ),
653 mbVisible( false ),
654 mnShapeId( 0 ),
655 mrRoot(rRoot)
656{
657 namespace FormCompType = css::form::FormComponentType;
658 namespace AwtVisualEffect = css::awt::VisualEffect;
659 namespace AwtScrollOrient = css::awt::ScrollBarOrientation;
660
662 if( !xShape.is() || !aCtrlProp.Is() )
663 return;
664
665 mnHeight = xShape->getSize().Height;
666 if( mnHeight <= 0 )
667 return;
668
669 // control type
670 sal_Int16 nClassId = 0;
671 if( aCtrlProp.GetProperty( nClassId, "ClassId" ) )
672 {
673 switch( nClassId )
674 {
675 case FormCompType::COMMANDBUTTON: mnObjType = EXC_OBJTYPE_BUTTON; meEventType = EXC_TBX_EVENT_ACTION; break;
676 case FormCompType::RADIOBUTTON: mnObjType = EXC_OBJTYPE_OPTIONBUTTON; meEventType = EXC_TBX_EVENT_ACTION; break;
677 case FormCompType::CHECKBOX: mnObjType = EXC_OBJTYPE_CHECKBOX; meEventType = EXC_TBX_EVENT_ACTION; break;
678 case FormCompType::LISTBOX: mnObjType = EXC_OBJTYPE_LISTBOX; meEventType = EXC_TBX_EVENT_CHANGE; break;
679 case FormCompType::COMBOBOX: mnObjType = EXC_OBJTYPE_DROPDOWN; meEventType = EXC_TBX_EVENT_CHANGE; break;
680 case FormCompType::GROUPBOX: mnObjType = EXC_OBJTYPE_GROUPBOX; meEventType = EXC_TBX_EVENT_MOUSE; break;
681 case FormCompType::FIXEDTEXT: mnObjType = EXC_OBJTYPE_LABEL; meEventType = EXC_TBX_EVENT_MOUSE; break;
682 case FormCompType::SCROLLBAR: mnObjType = EXC_OBJTYPE_SCROLLBAR; meEventType = EXC_TBX_EVENT_VALUE; break;
683 case FormCompType::SPINBUTTON: mnObjType = EXC_OBJTYPE_SPIN; meEventType = EXC_TBX_EVENT_VALUE; break;
684 }
685 }
687 return;
688
689 // OBJ record flags
690 SetLocked( true );
691 mbPrint = aCtrlProp.GetBoolProperty( "Printable" );
693 SetAutoFill( false );
694 SetAutoLine( false );
695
696 // fill DFF property set
698 mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty );
700 mbVisible = aCtrlProp.GetBoolProperty( "EnableVisible" );
701 aPropOpt.AddOpt( ESCHER_Prop_fPrint, mbVisible ? 0x00080000 : 0x00080002 ); // visible flag
702
703 aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x01000100 ); // bool field
704 aPropOpt.AddOpt( ESCHER_Prop_lTxid, 0 ); // Text ID
705 aPropOpt.AddOpt( ESCHER_Prop_WrapText, 0x00000001 );
706 aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x001A0008 ); // bool field
707 aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x00100000 ); // bool field
708 aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x00080000 ); // bool field
709
710 // #i51348# name of the control, may overwrite shape name
711 if( aCtrlProp.GetProperty( msCtrlName, "Name" ) && !msCtrlName.isEmpty() )
713
714 //Export description as alt text
715 if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) )
716 {
717 OUString aAltTxt;
718 OUString aDescrText = pSdrObj->GetDescription();
719 if(!aDescrText.isEmpty())
720 aAltTxt = aDescrText.copy( 0, std::min<sal_Int32>(MSPROP_DESCRIPTION_MAX_LEN, aDescrText.getLength()) );
721 aPropOpt.AddOpt( ESCHER_Prop_wzDescription, aAltTxt );
722 }
723
724 // write DFF property set to stream
725 aPropOpt.Commit( mrEscherEx.GetStream() );
726
727 // anchor
728 ImplWriteAnchor( SdrObject::getSdrObjectFromXShape( xShape ), pChildAnchor );
729
730 mrEscherEx.AddAtom( 0, ESCHER_ClientData ); // OBJ record
732
733 // control label
734 if( aCtrlProp.GetProperty( msLabel, "Label" ) )
735 {
736 /* Be sure to construct the MSODRAWING record containing the
737 ClientTextbox atom after the base OBJ's MSODRAWING record data is
738 completed. */
740 mrEscherEx.AddAtom( 0, ESCHER_ClientTextbox ); // TXO record
742
743 sal_uInt16 nXclFont = EXC_FONT_APP;
744 if( !msLabel.isEmpty() )
745 {
746 XclFontData aFontData;
748 if( (!aFontData.maName.isEmpty() ) && (aFontData.mnHeight > 0) )
749 nXclFont = GetFontBuffer().Insert( aFontData, EXC_COLOR_CTRLTEXT );
750 }
751
752 pTxo.reset( new XclTxo( msLabel, nXclFont ) );
754 pTxo->SetVerAlign( EXC_OBJ_VER_CENTER );
755 }
756
757 mrEscherEx.CloseContainer(); // ESCHER_SpContainer
758
759 // other properties
760 aCtrlProp.GetProperty( mnLineCount, "LineCount" );
761
762 // border style
763 sal_Int16 nApiButton = AwtVisualEffect::LOOK3D;
764 sal_Int16 nApiBorder = AwtVisualEffect::LOOK3D;
765 switch( nClassId )
766 {
767 case FormCompType::LISTBOX:
768 case FormCompType::COMBOBOX:
769 aCtrlProp.GetProperty( nApiBorder, "Border" );
770 break;
771 case FormCompType::CHECKBOX:
772 case FormCompType::RADIOBUTTON:
773 aCtrlProp.GetProperty( nApiButton, "VisualEffect" );
774 nApiBorder = AwtVisualEffect::NONE;
775 break;
776 // Push button cannot be set to flat in Excel
777 case FormCompType::COMMANDBUTTON:
778 nApiBorder = AwtVisualEffect::LOOK3D;
779 break;
780 // Label does not support a border in Excel
781 case FormCompType::FIXEDTEXT:
782 nApiBorder = AwtVisualEffect::NONE;
783 break;
784 /* Scroll bar and spin button have a "Border" property, but it is
785 really used for a border, and not for own 3D/flat look (#i34712#). */
786 case FormCompType::SCROLLBAR:
787 case FormCompType::SPINBUTTON:
788 nApiButton = AwtVisualEffect::LOOK3D;
789 nApiBorder = AwtVisualEffect::NONE;
790 break;
791 // Group box does not support flat style (#i34712#)
792 case FormCompType::GROUPBOX:
793 nApiBorder = AwtVisualEffect::LOOK3D;
794 break;
795 }
796 mbFlatButton = nApiButton != AwtVisualEffect::LOOK3D;
797 mbFlatBorder = nApiBorder != AwtVisualEffect::LOOK3D;
798
799 // control state
800 sal_Int16 nApiState = 0;
801 if( aCtrlProp.GetProperty( nApiState, "State" ) )
802 {
803 switch( nApiState )
804 {
805 case 0: mnState = EXC_OBJ_CHECKBOX_UNCHECKED; break;
806 case 1: mnState = EXC_OBJ_CHECKBOX_CHECKED; break;
807 case 2: mnState = EXC_OBJ_CHECKBOX_TRISTATE; break;
808 }
809 }
810
811 // special control contents
812 switch( nClassId )
813 {
814 case FormCompType::LISTBOX:
815 {
816 mbMultiSel = aCtrlProp.GetBoolProperty( "MultiSelection" );
817 Sequence< sal_Int16 > aSelection;
818 if( aCtrlProp.GetProperty( aSelection, "SelectedItems" ) )
819 {
820 if( aSelection.hasElements() )
821 {
822 mnSelEntry = aSelection[ 0 ] + 1;
824 }
825 }
826
827 // convert listbox with dropdown button to Excel dropdown
828 if( aCtrlProp.GetBoolProperty( "Dropdown" ) )
830 }
831 break;
832
833 case FormCompType::COMBOBOX:
834 {
835 Sequence< OUString > aStringList;
836 OUString aDefText;
837 if( aCtrlProp.GetProperty( aStringList, "StringItemList" ) &&
838 aCtrlProp.GetProperty( aDefText, "Text" ) &&
839 aStringList.hasElements() && !aDefText.isEmpty() )
840 {
841 auto nIndex = comphelper::findValue(aStringList, aDefText);
842 if( nIndex != -1 )
843 mnSelEntry = static_cast< sal_Int16 >( nIndex + 1 ); // 1-based
844 if( mnSelEntry > 0 )
845 maMultiSel.resize( 1, mnSelEntry - 1 );
846 }
847
848 // convert combobox without dropdown button to Excel listbox
849 if( !aCtrlProp.GetBoolProperty( "Dropdown" ) )
851 }
852 break;
853
854 case FormCompType::SCROLLBAR:
855 {
856 sal_Int32 nApiValue = 0;
857 if( aCtrlProp.GetProperty( nApiValue, "ScrollValueMin" ) )
858 mnScrollMin = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
859 if( aCtrlProp.GetProperty( nApiValue, "ScrollValueMax" ) )
860 mnScrollMax = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, EXC_OBJ_SCROLLBAR_MAX );
861 if( aCtrlProp.GetProperty( nApiValue, "ScrollValue" ) )
862 mnScrollValue = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, mnScrollMax );
863 if( aCtrlProp.GetProperty( nApiValue, "LineIncrement" ) )
864 mnScrollStep = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
865 if( aCtrlProp.GetProperty( nApiValue, "BlockIncrement" ) )
866 mnScrollPage = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
867 if( aCtrlProp.GetProperty( nApiValue, "Orientation" ) )
868 mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL;
869 }
870 break;
871
872 case FormCompType::SPINBUTTON:
873 {
874 sal_Int32 nApiValue = 0;
875 if( aCtrlProp.GetProperty( nApiValue, "SpinValueMin" ) )
876 mnScrollMin = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
877 if( aCtrlProp.GetProperty( nApiValue, "SpinValueMax" ) )
878 mnScrollMax = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, EXC_OBJ_SCROLLBAR_MAX );
879 if( aCtrlProp.GetProperty( nApiValue, "SpinValue" ) )
880 mnScrollValue = limit_cast< sal_uInt16 >( nApiValue, mnScrollMin, mnScrollMax );
881 if( aCtrlProp.GetProperty( nApiValue, "SpinIncrement" ) )
882 mnScrollStep = limit_cast< sal_uInt16 >( nApiValue, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
883 if( aCtrlProp.GetProperty( nApiValue, "Orientation" ) )
884 mbScrollHor = nApiValue == AwtScrollOrient::HORIZONTAL;
885 }
886 break;
887 }
888
889 {
890 Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( xShape );
891 if( xCtrlModel.is() )
892 {
893 Reference< XBindableValue > xBindable( xCtrlModel, UNO_QUERY );
894 if( xBindable.is() )
895 {
896 Reference< XServiceInfo > xServInfo( xBindable->getValueBinding(), UNO_QUERY );
897 if( xServInfo.is() && xServInfo->supportsService( SC_SERVICENAME_VALBIND ) )
898 {
899 ScfPropertySet aBindProp( xServInfo );
900 CellAddress aApiAddress;
901 if( aBindProp.GetProperty( aApiAddress, SC_UNONAME_BOUNDCELL ) )
902 {
904 if( SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape ) )
905 lcl_GetFromTo( rRoot, pSdrObj->GetLogicRect(), mxCellLinkAddress.Tab(), maAreaFrom, maAreaTo, true );
906 }
907 }
908 }
909 }
910 }
911
912 // spreadsheet links
913 ConvertSheetLinks( xShape );
914}
915
916bool XclExpTbxControlObj::SetMacroLink( const ScriptEventDescriptor& rEvent )
917{
919}
920
922{
923 switch( mnObjType )
924 {
925 // *** Push buttons, labels ***
926
929 // ftMacro - macro link
931 break;
932
933 // *** Check boxes, option buttons ***
934
937 {
938 // ftCbls - box properties
939 sal_uInt16 nStyle = 0;
941
942 rStrm.StartRecord( EXC_ID_OBJCBLS, 12 );
943 rStrm << mnState;
944 rStrm.WriteZeroBytes( 8 );
945 rStrm << nStyle;
946 rStrm.EndRecord();
947
948 // ftMacro - macro link
950 // ftCblsFmla subrecord - cell link
952
953 // ftCblsData subrecord - box properties, again
954 rStrm.StartRecord( EXC_ID_OBJCBLS, 8 );
955 rStrm << mnState;
956 rStrm.WriteZeroBytes( 4 );
957 rStrm << nStyle;
958 rStrm.EndRecord();
959 }
960 break;
961
962 // *** List boxes, combo boxes ***
963
966 {
967 sal_uInt16 nEntryCount = GetSourceEntryCount();
968
969 // ftSbs subrecord - Scroll bars
970 sal_Int32 nLineHeight = XclTools::GetHmmFromTwips( 200 ); // always 10pt
972 mnLineCount = static_cast< sal_uInt16 >( mnHeight / nLineHeight );
973 mnScrollValue = 0;
974 mnScrollMin = 0;
975 sal_uInt16 nInvisLines = (nEntryCount >= mnLineCount) ? (nEntryCount - mnLineCount) : 0;
976 mnScrollMax = limit_cast< sal_uInt16 >( nInvisLines, EXC_OBJ_SCROLLBAR_MIN, EXC_OBJ_SCROLLBAR_MAX );
977 mnScrollStep = 1;
979 mbScrollHor = false;
980 WriteSbs( rStrm );
981
982 // ftMacro - macro link
984 // ftSbsFmla subrecord - cell link
986
987 // ftLbsData - source data range and box properties
988 sal_uInt16 nStyle = 0;
991
992 rStrm.StartRecord( EXC_ID_OBJLBSDATA, 0 );
993
994 if( const XclTokenArray* pSrcRange = GetSourceRangeTokArr() )
995 {
996 rStrm << static_cast< sal_uInt16 >( (pSrcRange->GetSize() + 7) & 0xFFFE );
997 WriteFormula( rStrm, *pSrcRange );
998 }
999 else
1000 rStrm << sal_uInt16( 0 );
1001
1002 rStrm << nEntryCount << mnSelEntry << nStyle << sal_uInt16( 0 );
1004 {
1005 if( nEntryCount )
1006 {
1007 ScfUInt8Vec aSelEx( nEntryCount, 0 );
1008 for( const auto& rItem : maMultiSel )
1009 if( rItem < nEntryCount )
1010 aSelEx[ rItem ] = 1;
1011 rStrm.Write( aSelEx.data(), aSelEx.size() );
1012 }
1013 }
1014 else if( mnObjType == EXC_OBJTYPE_DROPDOWN )
1015 {
1016 rStrm << sal_uInt16( 0 ) << mnLineCount << sal_uInt16( 0 ) << sal_uInt16( 0 );
1017 }
1018
1019 rStrm.EndRecord();
1020 }
1021 break;
1022
1023 // *** Spin buttons, scrollbars ***
1024
1025 case EXC_OBJTYPE_SPIN:
1027 {
1028 // ftSbs subrecord - scroll bars
1029 WriteSbs( rStrm );
1030 // ftMacro - macro link
1032 // ftSbsFmla subrecord - cell link
1034 }
1035 break;
1036
1037 // *** Group boxes ***
1038
1040 {
1041 // ftMacro - macro link
1043
1044 // ftGboData subrecord - group box properties
1045 sal_uInt16 nStyle = 0;
1047
1048 rStrm.StartRecord( EXC_ID_OBJGBODATA, 6 );
1049 rStrm << sal_uInt32( 0 )
1050 << nStyle;
1051 rStrm.EndRecord();
1052 }
1053 break;
1054 }
1055}
1056
1057void XclExpTbxControlObj::WriteCellLinkSubRec( XclExpStream& rStrm, sal_uInt16 nSubRecId )
1058{
1059 if( const XclTokenArray* pCellLink = GetCellLinkTokArr() )
1060 WriteFormulaSubRec( rStrm, nSubRecId, *pCellLink );
1061}
1062
1064{
1065 sal_uInt16 nOrient = 0;
1067 sal_uInt16 nStyle = EXC_OBJ_SCROLLBAR_DEFFLAGS;
1069
1070 rStrm.StartRecord( EXC_ID_OBJSBS, 20 );
1071 rStrm << sal_uInt32( 0 ) // reserved
1072 << mnScrollValue // thumb position
1073 << mnScrollMin // thumb min pos
1074 << mnScrollMax // thumb max pos
1075 << mnScrollStep // line increment
1076 << mnScrollPage // page increment
1077 << nOrient // 0 = vertical, 1 = horizontal
1078 << sal_uInt16( 15 ) // thumb width
1079 << nStyle; // flags/style
1080 rStrm.EndRecord();
1081}
1082
1083void XclExpTbxControlObj::setShapeId(sal_Int32 aShapeId)
1084{
1085 mnShapeId = aShapeId;
1086}
1087
1088namespace
1089{
1091class VmlFormControlExporter : public oox::vml::VMLExport
1092{
1093 sal_uInt16 m_nObjType;
1094 tools::Rectangle m_aAreaFrom;
1095 tools::Rectangle m_aAreaTo;
1096 OUString m_aLabel;
1097 OUString m_aMacroName;
1098
1099public:
1100 VmlFormControlExporter(const sax_fastparser::FSHelperPtr& p, sal_uInt16 nObjType,
1101 const tools::Rectangle& rAreaFrom, const tools::Rectangle& rAreaTo,
1102 OUString aLabel, OUString aMacroName);
1103
1104protected:
1106 sal_Int32 StartShape() override;
1107 using VMLExport::EndShape;
1108 void EndShape(sal_Int32 nShapeElement) override;
1109};
1110
1111VmlFormControlExporter::VmlFormControlExporter(const sax_fastparser::FSHelperPtr& p,
1112 sal_uInt16 nObjType,
1113 const tools::Rectangle& rAreaFrom,
1114 const tools::Rectangle& rAreaTo,
1115 OUString aLabel, OUString aMacroName)
1116 : VMLExport(p)
1117 , m_nObjType(nObjType)
1118 , m_aAreaFrom(rAreaFrom)
1119 , m_aAreaTo(rAreaTo)
1120 , m_aLabel(std::move(aLabel))
1121 , m_aMacroName(std::move(aMacroName))
1122{
1123}
1124
1125sal_Int32 VmlFormControlExporter::StartShape()
1126{
1127 // Host control.
1128 AddShapeAttribute(XML_type, "#_x0000_t201");
1129 return VMLExport::StartShape();
1130}
1131
1132void VmlFormControlExporter::EndShape(sal_Int32 nShapeElement)
1133{
1134 sax_fastparser::FSHelperPtr pVmlDrawing = GetFS();
1135
1136 pVmlDrawing->startElement(FSNS(XML_v, XML_textbox));
1137 pVmlDrawing->startElement(XML_div);
1138 pVmlDrawing->write(m_aLabel);
1139 pVmlDrawing->endElement(XML_div);
1140 pVmlDrawing->endElement(FSNS(XML_v, XML_textbox));
1141
1142 OString aObjectType;
1143 switch (m_nObjType)
1144 {
1146 aObjectType = "Checkbox";
1147 break;
1148 case EXC_OBJTYPE_BUTTON:
1149 aObjectType = "Button";
1150 break;
1151 }
1152 pVmlDrawing->startElement(FSNS(XML_x, XML_ClientData), XML_ObjectType, aObjectType);
1153 OString aAnchor
1154 = OString::number(m_aAreaFrom.Left()) + ", " + OString::number(m_aAreaFrom.Top()) + ", "
1155 + OString::number(m_aAreaFrom.Right()) + ", " + OString::number(m_aAreaFrom.Bottom()) + ", "
1156 + OString::number(m_aAreaTo.Left()) + ", " + OString::number(m_aAreaTo.Top()) + ", "
1157 + OString::number(m_aAreaTo.Right()) + ", " + OString::number(m_aAreaTo.Bottom());
1158 XclXmlUtils::WriteElement(pVmlDrawing, FSNS(XML_x, XML_Anchor), aAnchor);
1159
1160 if (!m_aMacroName.isEmpty())
1161 {
1162 XclXmlUtils::WriteElement(pVmlDrawing, FSNS(XML_x, XML_FmlaMacro), m_aMacroName);
1163 }
1164
1165 // XclExpOcxControlObj::WriteSubRecs() has the same fixed values.
1166 if (m_nObjType == EXC_OBJTYPE_BUTTON)
1167 {
1168 XclXmlUtils::WriteElement(pVmlDrawing, FSNS(XML_x, XML_TextHAlign), "Center");
1169 }
1170 XclXmlUtils::WriteElement(pVmlDrawing, FSNS(XML_x, XML_TextVAlign), "Center");
1171
1172 pVmlDrawing->endElement(FSNS(XML_x, XML_ClientData));
1173 VMLExport::EndShape(nShapeElement);
1174}
1175
1176}
1177
1180{
1182 tools::Rectangle aAreaFrom;
1183 tools::Rectangle aAreaTo;
1184 // Unlike XclExpTbxControlObj::SaveXml(), this is not calculated in EMUs.
1185 lcl_GetFromTo(mrRoot, pObj->GetLogicRect(), GetTab(), aAreaFrom, aAreaTo);
1186 VmlFormControlExporter aFormControlExporter(rStrm.GetCurrentStream(), GetObjType(), aAreaFrom,
1187 aAreaTo, msLabel, GetMacroName());
1188 aFormControlExporter.AddSdrObject(*pObj, /*bIsFollowingTextFlow=*/false, /*eHOri=*/-1,
1189 /*eVOri=*/-1, /*eHRel=*/-1, /*eVRel=*/-1,
1190 /*pWrapAttrList=*/nullptr, /*bOOxmlExport=*/true);
1191}
1192
1193// save into xl\drawings\drawing1.xml
1195{
1196 sax_fastparser::FSHelperPtr& pDrawing = rStrm.GetCurrentStream();
1197
1198 pDrawing->startElement(FSNS(XML_mc, XML_AlternateContent),
1199 FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)));
1200 pDrawing->startElement(FSNS(XML_mc, XML_Choice),
1201 FSNS(XML_xmlns, XML_a14), rStrm.getNamespaceURL(OOX_NS(a14)),
1202 XML_Requires, "a14");
1203
1204 pDrawing->startElement(FSNS(XML_xdr, XML_twoCellAnchor), XML_editAs, "oneCell");
1205 {
1206 pDrawing->startElement(FSNS(XML_xdr, XML_from));
1207 lcl_WriteAnchorVertex(pDrawing, maAreaFrom);
1208 pDrawing->endElement(FSNS(XML_xdr, XML_from));
1209 pDrawing->startElement(FSNS(XML_xdr, XML_to));
1210 lcl_WriteAnchorVertex(pDrawing, maAreaTo);
1211 pDrawing->endElement(FSNS(XML_xdr, XML_to));
1212
1213 pDrawing->startElement(FSNS(XML_xdr, XML_sp));
1214 {
1215 // xdr:nvSpPr
1216 pDrawing->startElement(FSNS(XML_xdr, XML_nvSpPr));
1217 {
1218 pDrawing->singleElement(FSNS(XML_xdr, XML_cNvPr),
1219 XML_id, OString::number(mnShapeId).getStr(),
1220 XML_name, msCtrlName, // control name
1221 XML_descr, msLabel, // description as alt text
1222 XML_hidden, mbVisible ? "0" : "1");
1223 pDrawing->singleElement(FSNS(XML_xdr, XML_cNvSpPr));
1224 }
1225 pDrawing->endElement(FSNS(XML_xdr, XML_nvSpPr));
1226
1227 // xdr:spPr
1228 pDrawing->startElement(FSNS(XML_xdr, XML_spPr));
1229 {
1230 // a:xfrm
1231 pDrawing->startElement(FSNS(XML_a, XML_xfrm));
1232 {
1233 pDrawing->singleElement(FSNS(XML_a, XML_off),
1234 XML_x, "0",
1235 XML_y, "0");
1236 pDrawing->singleElement(FSNS(XML_a, XML_ext),
1237 XML_cx, "0",
1238 XML_cy, "0");
1239 }
1240 pDrawing->endElement(FSNS(XML_a, XML_xfrm));
1241
1242 // a:prstGeom
1243 pDrawing->startElement(FSNS(XML_a, XML_prstGeom), XML_prst, "rect");
1244 {
1245 pDrawing->singleElement(FSNS(XML_a, XML_avLst));
1246 }
1247 pDrawing->endElement(FSNS(XML_a, XML_prstGeom));
1248 }
1249 pDrawing->endElement(FSNS(XML_xdr, XML_spPr));
1250
1251 // xdr:txBody
1252 {
1253 pDrawing->startElement(FSNS(XML_xdr, XML_txBody));
1254
1255#define DEFLRINS 254
1256#define DEFTBINS 127
1257 sal_Int32 nLeft, nRight, nTop, nBottom;
1258 nLeft = nRight = DEFLRINS;
1259 nTop = nBottom = DEFTBINS;
1260
1261 // top inset looks a bit different compared to ppt export
1262 // check if something related doesn't work as expected
1263 Reference< XPropertySet > rXPropSet(mxShape, UNO_QUERY);
1264
1265 try
1266 {
1267 css::uno::Any mAny;
1268
1269 mAny = rXPropSet->getPropertyValue("TextLeftDistance");
1270 if (mAny.hasValue())
1271 mAny >>= nLeft;
1272
1273 mAny = rXPropSet->getPropertyValue("TextRightDistance");
1274 if (mAny.hasValue())
1275 mAny >>= nRight;
1276
1277 mAny = rXPropSet->getPropertyValue("TextUpperDistance");
1278 if (mAny.hasValue())
1279 mAny >>= nTop;
1280
1281 mAny = rXPropSet->getPropertyValue("TextLowerDistance");
1282 if (mAny.hasValue())
1283 mAny >>= nBottom;
1284 }
1285 catch (...)
1286 {
1287 }
1288
1289 // Specifies the inset of the bounding rectangle.
1290 // Insets are used just as internal margins for text boxes within shapes.
1291 // If this attribute is omitted, then a value of 45720 or 0.05 inches is implied.
1292 pDrawing->startElementNS(XML_a, XML_bodyPr,
1293 XML_lIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nLeft)), nLeft != DEFLRINS),
1294 XML_rIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nRight)), nRight != DEFLRINS),
1295 XML_tIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nTop)), nTop != DEFTBINS),
1296 XML_bIns, sax_fastparser::UseIf(OString::number(oox::drawingml::convertHmmToEmu(nBottom)), nBottom != DEFTBINS),
1297 XML_anchor, "ctr");
1298
1299 {
1300 bool bTextAutoGrowHeight = false;
1301
1302 try
1303 {
1304 css::uno::Any mAny;
1305
1306 mAny = rXPropSet->getPropertyValue("TextAutoGrowHeight");
1307 if (mAny.hasValue())
1308 mAny >>= bTextAutoGrowHeight;
1309 }
1310 catch (...)
1311 {
1312 }
1313
1314 pDrawing->singleElementNS(XML_a, (bTextAutoGrowHeight ? XML_spAutoFit : XML_noAutofit));
1315 }
1316
1317 pDrawing->endElementNS(XML_a, XML_bodyPr);
1318
1319 {
1320 pDrawing->startElementNS(XML_a, XML_p);
1321 pDrawing->startElementNS(XML_a, XML_r);
1322 pDrawing->startElementNS(XML_a, XML_t);
1323 pDrawing->write(msLabel);
1324 pDrawing->endElementNS(XML_a, XML_t);
1325 pDrawing->endElementNS(XML_a, XML_r);
1326 pDrawing->endElementNS(XML_a, XML_p);
1327 }
1328
1329 pDrawing->endElement(FSNS(XML_xdr, XML_txBody));
1330 }
1331 }
1332 pDrawing->endElement(FSNS(XML_xdr, XML_sp));
1333 pDrawing->singleElement(FSNS(XML_xdr, XML_clientData));
1334 }
1335 pDrawing->endElement(FSNS(XML_xdr, XML_twoCellAnchor));
1336 pDrawing->endElement( FSNS( XML_mc, XML_Choice ) );
1337 pDrawing->endElement( FSNS( XML_mc, XML_AlternateContent ) );
1338}
1339
1340// output into ctrlProp1.xml
1342{
1343 OUString sIdFormControlPr;
1344
1345 switch (mnObjType)
1346 {
1348 {
1349 const sal_Int32 nDrawing = DrawingML::getNewDrawingUniqueId();
1350 sax_fastparser::FSHelperPtr pFormControl = rStrm.CreateOutputStream(
1351 XclXmlUtils::GetStreamName( "xl/", "ctrlProps/ctrlProps", nDrawing ),
1352 XclXmlUtils::GetStreamName( "../", "ctrlProps/ctrlProps", nDrawing ),
1353 rStrm.GetCurrentStream()->getOutputStream(),
1354 "application/vnd.ms-excel.controlproperties+xml",
1355 oox::getRelationship(Relationship::CTRLPROP),
1356 &sIdFormControlPr );
1357
1358 rStrm.PushStream( pFormControl );
1359 // checkbox
1360 // <formControlPr
1361 // xmlns="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
1362 // objectType="CheckBox" checked="Checked" lockText="1" noThreeD="1"/>
1363 //
1364 pFormControl->write("<formControlPr xmlns=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\" objectType=\"CheckBox\"");
1366 pFormControl->write(" checked=\"Checked\"");
1367
1368 pFormControl->write(" autoLine=\"false\"");
1369
1370 if (mbPrint)
1371 pFormControl->write(" print=\"true\"");
1372 else
1373 pFormControl->write(" print=\"false\"");
1374
1376 {
1377 OUString aCellLink = mxCellLinkAddress.Format(ScRefFlags::ADDR_ABS,
1378 &GetDoc(),
1380
1381 // "Sheet1!$C$5"
1382 pFormControl->write(" fmlaLink=\"");
1383 if (aCellLink.indexOf('!') < 0)
1384 {
1385 pFormControl->write(GetTabInfo().GetScTabName(mxCellLinkAddress.Tab()));
1386 pFormControl->write("!");
1387 }
1388 pFormControl->write(aCellLink);
1389 pFormControl->write("\"");
1390 }
1391
1392 pFormControl->write(" lockText=\"1\" noThreeD=\"1\"/>");
1393 rStrm.PopStream();
1394
1395 break;
1396 }
1397 case EXC_OBJTYPE_BUTTON:
1398 {
1399 sal_Int32 nDrawing = DrawingML::getNewDrawingUniqueId();
1400 sax_fastparser::FSHelperPtr pFormControl = rStrm.CreateOutputStream(
1401 XclXmlUtils::GetStreamName("xl/", "ctrlProps/ctrlProps", nDrawing),
1402 XclXmlUtils::GetStreamName("../", "ctrlProps/ctrlProps", nDrawing),
1403 rStrm.GetCurrentStream()->getOutputStream(),
1404 "application/vnd.ms-excel.controlproperties+xml",
1405 oox::getRelationship(Relationship::CTRLPROP), &sIdFormControlPr);
1406
1407 pFormControl->singleElement(XML_formControlPr, XML_xmlns,
1408 rStrm.getNamespaceURL(OOX_NS(xls14Lst)), XML_objectType,
1409 "Button", XML_lockText, "1");
1410 break;
1411 }
1412 }
1413
1414 return sIdFormControlPr;
1415}
1416
1417// output into sheet1.xml
1418void XclExpTbxControlObj::SaveSheetXml(XclExpXmlStream& rStrm, const OUString& aIdFormControlPr) const
1419{
1420 switch (mnObjType)
1421 {
1423 {
1424 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
1425
1426 rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent),
1427 FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)));
1428 rWorksheet->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "x14");
1429
1430 rWorksheet->startElement(
1431 XML_control,
1432 XML_shapeId, OString::number(mnShapeId).getStr(),
1433 FSNS(XML_r, XML_id), aIdFormControlPr,
1434 XML_name, msLabel); // text to display with checkbox button
1435
1436 rWorksheet->write("<controlPr defaultSize=\"0\" locked=\"1\" autoFill=\"0\" autoLine=\"0\" autoPict=\"0\"");
1437
1438 if (mbPrint)
1439 rWorksheet->write(" print=\"true\"");
1440 else
1441 rWorksheet->write(" print=\"false\"");
1442
1443 if (!msCtrlName.isEmpty())
1444 {
1445 rWorksheet->write(" altText=\"");
1446 rWorksheet->write(msCtrlName); // alt text
1447 rWorksheet->write("\"");
1448 }
1449
1450 rWorksheet->write(">");
1451
1452 rWorksheet->startElement(XML_anchor, XML_moveWithCells, "true", XML_sizeWithCells, "false");
1453 rWorksheet->startElement(XML_from);
1454 lcl_WriteAnchorVertex(rWorksheet, maAreaFrom);
1455 rWorksheet->endElement(XML_from);
1456 rWorksheet->startElement(XML_to);
1457 lcl_WriteAnchorVertex(rWorksheet, maAreaTo);
1458 rWorksheet->endElement(XML_to);
1459 rWorksheet->endElement( XML_anchor );
1460
1461 rWorksheet->write("</controlPr>");
1462
1463 rWorksheet->endElement(XML_control);
1464 rWorksheet->endElement( FSNS( XML_mc, XML_Choice ) );
1465 rWorksheet->endElement( FSNS( XML_mc, XML_AlternateContent ) );
1466
1467 break;
1468 }
1469 case EXC_OBJTYPE_BUTTON:
1470 {
1471 sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream();
1472
1473 rWorksheet->startElement(FSNS(XML_mc, XML_AlternateContent), FSNS(XML_xmlns, XML_mc),
1474 rStrm.getNamespaceURL(OOX_NS(mce)));
1475 rWorksheet->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "x14");
1476
1477 rWorksheet->startElement(XML_control, XML_shapeId, OString::number(mnShapeId).getStr(),
1478 FSNS(XML_r, XML_id), aIdFormControlPr, XML_name, msCtrlName);
1479
1480 OString aMacroName = GetMacroName().toUtf8();
1481 // Omit the macro attribute if it would be empty.
1482 const char* pMacroName = aMacroName.isEmpty() ? nullptr : aMacroName.getStr();
1483 rWorksheet->startElement(XML_controlPr, XML_defaultSize, "0", XML_print,
1484 mbPrint ? "true" : "false", XML_autoFill, "0", XML_autoPict,
1485 "0", XML_macro, pMacroName);
1486
1487 rWorksheet->startElement(XML_anchor, XML_moveWithCells, "true", XML_sizeWithCells,
1488 "false");
1489
1491 tools::Rectangle aAreaFrom;
1492 tools::Rectangle aAreaTo;
1493 lcl_GetFromTo(mrRoot, pObj->GetLogicRect(), GetTab(), aAreaFrom, aAreaTo,
1494 /*bInEMU=*/true);
1495
1496 rWorksheet->startElement(XML_from);
1497 lcl_WriteAnchorVertex(rWorksheet, aAreaFrom);
1498 rWorksheet->endElement(XML_from);
1499 rWorksheet->startElement(XML_to);
1500 lcl_WriteAnchorVertex(rWorksheet, aAreaTo);
1501 rWorksheet->endElement(XML_to);
1502 rWorksheet->endElement(XML_anchor);
1503
1504 rWorksheet->endElement(XML_controlPr);
1505
1506 rWorksheet->endElement(XML_control);
1507 rWorksheet->endElement(FSNS(XML_mc, XML_Choice));
1508 rWorksheet->endElement(FSNS(XML_mc, XML_AlternateContent));
1509 break;
1510 }
1511 }
1512}
1513
1514//#endif
1515
1516XclExpChartObj::XclExpChartObj( XclExpObjectManager& rObjMgr, Reference< XShape > const & xShape, const tools::Rectangle* pChildAnchor, ScDocument* pDoc ) :
1517 XclObj( rObjMgr, EXC_OBJTYPE_CHART ),
1518 XclExpRoot( rObjMgr.GetRoot() ), mxShape( xShape ),
1519 mpDoc(pDoc)
1520{
1521 // create the MSODRAWING record contents for the chart object
1523 mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty );
1524 EscherPropertyContainer aPropOpt;
1525 aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x01040104 );
1526 aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x00080008 );
1527 aPropOpt.AddOpt( ESCHER_Prop_fillColor, 0x0800004E );
1528 aPropOpt.AddOpt( ESCHER_Prop_fillBackColor, 0x0800004D );
1529 aPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x00110010 );
1530 aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x0800004D );
1531 aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x00080008 );
1532 aPropOpt.AddOpt( ESCHER_Prop_fshadowObscured, 0x00020000 );
1533 aPropOpt.AddOpt( ESCHER_Prop_fPrint, 0x00080000 );
1534 aPropOpt.Commit( mrEscherEx.GetStream() );
1535
1536 // anchor
1537 SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape( xShape );
1538 ImplWriteAnchor( pSdrObj, pChildAnchor );
1539
1540 // client data (the following OBJ record)
1542 mrEscherEx.CloseContainer(); // ESCHER_SpContainer
1544
1545 // load the chart OLE object
1546 if( SdrOle2Obj* pSdrOleObj = dynamic_cast< SdrOle2Obj* >( pSdrObj ) )
1547 svt::EmbeddedObjectRef::TryRunningState( pSdrOleObj->GetObjRef() );
1548
1549 // create the chart substream object
1550 ScfPropertySet aShapeProp( xShape );
1551 css::awt::Rectangle aBoundRect;
1552 aShapeProp.GetProperty( aBoundRect, "BoundRect" );
1553 tools::Rectangle aChartRect( Point( aBoundRect.X, aBoundRect.Y ), Size( aBoundRect.Width, aBoundRect.Height ) );
1554 mxChart = std::make_shared<XclExpChart>(GetRoot(), GetChartDoc(), aChartRect);
1555}
1556
1558{
1559}
1560
1562{
1563 // content of OBJ record
1565 // chart substream
1566 mxChart->Save( rStrm );
1567}
1568
1570{
1571 sax_fastparser::FSHelperPtr pDrawing = rStrm.GetCurrentStream();
1572
1573 // FIXME: two cell? it seems the two cell anchor is incorrect.
1574 pDrawing->startElement( FSNS( XML_xdr, XML_twoCellAnchor ), // OOXTODO: oneCellAnchor, absoluteAnchor
1575 XML_editAs, "oneCell" );
1576 Reference< XPropertySet > xPropSet( mxShape, UNO_QUERY );
1577 if (xPropSet.is())
1578 {
1580 ChartExport aChartExport(XML_xdr, pDrawing, GetChartDoc(), &rStrm, drawingml::DOCUMENT_XLSX);
1581 auto pURLTransformer = std::make_shared<ScURLTransformer>(*mpDoc);
1582 aChartExport.SetURLTranslator(pURLTransformer);
1583 static sal_Int32 nChartCount = 0;
1584 nChartCount++;
1585 sal_Int32 nID = rStrm.GetUniqueId();
1586 aChartExport.WriteChartObj( mxShape, nID, nChartCount );
1587 // TODO: get the correcto chart number
1588 }
1589
1590 pDrawing->singleElement( FSNS( XML_xdr, XML_clientData)
1591 // OOXTODO: XML_fLocksWithSheet
1592 // OOXTODO: XML_fPrintsWithSheet
1593 );
1594 pDrawing->endElement( FSNS( XML_xdr, XML_twoCellAnchor ) );
1595}
1596
1597css::uno::Reference<css::chart::XChartDocument> XclExpChartObj::GetChartDoc() const
1598{
1600 if (!pObj || pObj->GetObjIdentifier() != SdrObjKind::OLE2)
1601 return {};
1602 // May load here - makes sure that we are working with actually loaded OLE object
1603 return css::uno::Reference<css::chart::XChartDocument>(
1604 static_cast<SdrOle2Obj*>(pObj)->getXModel(), css::uno::UNO_QUERY);
1605}
1606
1607XclExpNote::XclExpNote(const XclExpRoot& rRoot, const ScAddress& rScPos,
1608 const ScPostIt* pScNote, std::u16string_view rAddText)
1610 , mrRoot(rRoot)
1611 , maScPos(rScPos)
1612 , mnObjId(EXC_OBJ_INVALID_ID)
1613 , mbVisible(pScNote && pScNote->IsCaptionShown())
1614 , meTHA(SDRTEXTHORZADJUST_LEFT)
1615 , meTVA(SDRTEXTVERTADJUST_TOP)
1616 , mbAutoScale(false)
1617 , mbLocked(false)
1618 , mbAutoFill(false)
1619 , mbColHidden(false)
1620 , mbRowHidden(false)
1621{
1622 // get the main note text
1623 OUString aNoteText;
1624 if( pScNote )
1625 {
1626 aNoteText = pScNote->GetText();
1627 const EditTextObject *pEditObj = pScNote->GetEditTextObject();
1628 if( pEditObj )
1630 }
1631 // append additional text
1632 aNoteText = ScGlobal::addToken( aNoteText, rAddText, '\n', 2 );
1633
1634 // initialize record dependent on BIFF type
1635 switch( rRoot.GetBiff() )
1636 {
1637 case EXC_BIFF5:
1638 maNoteText = OUStringToOString(aNoteText, rRoot.GetTextEncoding());
1639 break;
1640
1641 case EXC_BIFF8:
1642 {
1643 // TODO: additional text
1644 if( pScNote )
1645 {
1646 if( SdrCaptionObj* pCaption = pScNote->GetOrCreateCaption( maScPos ) )
1647 {
1648 lcl_GetFromTo( rRoot, pCaption->GetLogicRect(), maScPos.Tab(), maCommentFrom, maCommentTo );
1649 if( const OutlinerParaObject* pOPO = pCaption->GetOutlinerParaObject() )
1650 mnObjId = rRoot.GetObjectManager().AddObj( std::make_unique<XclObjComment>( rRoot.GetObjectManager(), pCaption->GetLogicRect(), pOPO->GetTextObject(), pCaption, mbVisible, maScPos, maCommentFrom, maCommentTo ) );
1651
1652 SfxItemSet aItemSet = pCaption->GetMergedItemSet();
1653 meTVA = pCaption->GetTextVerticalAdjust();
1654 meTHA = pCaption->GetTextHorizontalAdjust();
1655 mbAutoScale = pCaption->GetFitToSize() != drawing::TextFitToSizeType_NONE;
1656 mbLocked = pCaption->IsMoveProtect() || pCaption->IsResizeProtect();
1657
1658 // AutoFill style would change if Postit.cxx object creation values are changed
1659 OUString aCol(aItemSet.Get(XATTR_FILLCOLOR).GetValue());
1660 mbAutoFill = aCol.isEmpty() && (aItemSet.Get(XATTR_FILLSTYLE).GetValue() == drawing::FillStyle_SOLID);
1663 }
1664 // stAuthor (variable): An XLUnicodeString that specifies the name of the comment
1665 // author. String length MUST be greater than or equal to 1 and less than or equal
1666 // to 54.
1667 if( pScNote->GetAuthor().isEmpty() )
1668 maAuthor = XclExpString( " " );
1669 else
1670 maAuthor = XclExpString( pScNote->GetAuthor(), XclStrFlags::NONE, 54 );
1671 }
1672
1673 SetRecSize( 9 + maAuthor.GetSize() );
1674 }
1675 break;
1676
1677 default: DBG_ERROR_BIFF();
1678 }
1679}
1680
1682{
1683 switch( rStrm.GetRoot().GetBiff() )
1684 {
1685 case EXC_BIFF5:
1686 {
1687 // write the NOTE record directly, there may be the need to create more than one
1688 const char* pcBuffer = maNoteText.getStr();
1689 sal_uInt16 nCharsLeft = static_cast< sal_uInt16 >( maNoteText.getLength() );
1690
1691 while( nCharsLeft )
1692 {
1693 sal_uInt16 nWriteChars = ::std::min( nCharsLeft, EXC_NOTE5_MAXLEN );
1694
1695 rStrm.StartRecord( EXC_ID_NOTE, 6 + nWriteChars );
1696 if( pcBuffer == maNoteText.getStr() )
1697 {
1698 // first record: row, col, length of complete text
1699 rStrm << static_cast< sal_uInt16 >( maScPos.Row() )
1700 << static_cast< sal_uInt16 >( maScPos.Col() )
1701 << nCharsLeft; // still contains full length
1702 }
1703 else
1704 {
1705 // next records: -1, 0, length of current text segment
1706 rStrm << sal_uInt16( 0xFFFF )
1707 << sal_uInt16( 0 )
1708 << nWriteChars;
1709 }
1710 rStrm.Write( pcBuffer, nWriteChars );
1711 rStrm.EndRecord();
1712
1713 pcBuffer += nWriteChars;
1714 nCharsLeft = nCharsLeft - nWriteChars;
1715 }
1716 }
1717 break;
1718
1719 case EXC_BIFF8:
1722 break;
1723
1724 default: DBG_ERROR_BIFF();
1725 }
1726}
1727
1729{
1730 // BIFF5/BIFF7 is written separately
1731 OSL_ENSURE_BIFF( rStrm.GetRoot().GetBiff() == EXC_BIFF8 );
1732
1733 sal_uInt16 nFlags = 0;
1735
1736 rStrm << static_cast< sal_uInt16 >( maScPos.Row() )
1737 << static_cast< sal_uInt16 >( maScPos.Col() )
1738 << nFlags
1739 << mnObjId
1740 << maAuthor
1741 << sal_uInt8( 0 );
1742}
1743
1744void XclExpNote::WriteXml( sal_Int32 nAuthorId, XclExpXmlStream& rStrm )
1745{
1746 sax_fastparser::FSHelperPtr rComments = rStrm.GetCurrentStream();
1747
1748 rComments->startElement( XML_comment,
1750 XML_authorId, OString::number(nAuthorId)
1751 // OOXTODO: XML_guid
1752 );
1753 rComments->startElement(XML_text);
1754 // OOXTODO: phoneticPr, rPh, r
1755 if( mpNoteContents )
1756 mpNoteContents->WriteXml( rStrm );
1757 rComments->endElement( XML_text );
1758
1759/*
1760 Export of commentPr is disabled, since the current (Oct 2010)
1761 version of MSO 2010 doesn't yet support commentPr
1762 */
1763#if 1//def XLSX_OOXML_FUTURE
1764 if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
1765 {
1766 rComments->startElement(FSNS(XML_mc, XML_AlternateContent));
1767 rComments->startElement(FSNS(XML_mc, XML_Choice), XML_Requires, "v2");
1768 rComments->startElement( XML_commentPr,
1769 XML_autoFill, ToPsz( mbAutoFill ),
1770 XML_autoScale, ToPsz( mbAutoScale ),
1771 XML_colHidden, ToPsz( mbColHidden ),
1772 XML_locked, ToPsz( mbLocked ),
1773 XML_rowHidden, ToPsz( mbRowHidden ),
1774 XML_textHAlign, ToHorizAlign( meTHA ),
1775 XML_textVAlign, ToVertAlign( meTVA ) );
1776 rComments->startElement(XML_anchor, XML_moveWithCells, "false", XML_sizeWithCells, "false");
1777 rComments->startElement(FSNS(XML_xdr, XML_from));
1778 lcl_WriteAnchorVertex( rComments, maCommentFrom );
1779 rComments->endElement( FSNS( XML_xdr, XML_from ) );
1780 rComments->startElement(FSNS(XML_xdr, XML_to));
1781 lcl_WriteAnchorVertex( rComments, maCommentTo );
1782 rComments->endElement( FSNS( XML_xdr, XML_to ) );
1783 rComments->endElement( XML_anchor );
1784 rComments->endElement( XML_commentPr );
1785
1786 rComments->endElement( FSNS( XML_mc, XML_Choice ) );
1787 rComments->startElement(FSNS(XML_mc, XML_Fallback));
1788 // Any fallback code ?
1789 rComments->endElement( FSNS( XML_mc, XML_Fallback ) );
1790 rComments->endElement( FSNS( XML_mc, XML_AlternateContent ) );
1791 }
1792#endif
1793 rComments->endElement( XML_comment );
1794}
1795
1797 XclExpControlHelper( rRoot )
1798{
1799}
1800
1802{
1803}
1804
1806{
1807 if( mxMacroLink )
1809}
1810
1811const OUString& XclMacroHelper::GetMacroName() const { return maMacroName; }
1812
1813bool
1814XclMacroHelper::SetMacroLink( const ScriptEventDescriptor& rEvent, const XclTbxEventType& nEventType )
1815{
1817 if (!maMacroName.isEmpty())
1818 {
1819 return SetMacroLink(maMacroName);
1820 }
1821 return false;
1822}
1823
1824bool
1825XclMacroHelper::SetMacroLink( const OUString& rMacroName )
1826{
1827 // OOXML documents do not store any defined name for VBA macros (while BIFF documents do).
1828 bool bOOXML = GetOutput() == EXC_OUTPUT_XML_2007;
1829 if (!rMacroName.isEmpty() && !bOOXML)
1830 {
1831 sal_uInt16 nExtSheet = GetLocalLinkManager().FindExtSheet( EXC_EXTSH_OWNDOC );
1832 sal_uInt16 nNameIdx
1833 = GetNameManager().InsertMacroCall(rMacroName, /*bVBasic=*/true, /*bFunc=*/false);
1834 mxMacroLink = GetFormulaCompiler().CreateNameXFormula( nExtSheet, nNameIdx );
1835 return true;
1836 }
1837 return false;
1838}
1839
1840XclExpShapeObj::XclExpShapeObj( XclExpObjectManager& rRoot, css::uno::Reference< css::drawing::XShape > const & xShape, ScDocument* pDoc ) :
1841 XclObjAny( rRoot, xShape, pDoc ),
1842 XclMacroHelper( rRoot )
1843{
1844 if (SdrObject* pSdrObj = SdrObject::getSdrObjectFromXShape(xShape))
1845 {
1846 ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pSdrObj );
1847 if ( pInfo && !pInfo->GetMacro().isEmpty() )
1848// FIXME ooo330-m2: XclControlHelper::GetXclMacroName was removed in upstream sources; they started to call XclTools::GetXclMacroName instead; is this enough? it has only one parameter
1849// SetMacroLink( XclControlHelper::GetXclMacroName( pInfo->GetMacro(), rRoot.GetDocShell() ) );
1851 }
1852}
1853
1855{
1856}
1857
1859{
1862}
1863
1865 : mnTab( nTab ), mrNotes( rNotes )
1866{
1867}
1868
1870{
1871 if( mrNotes.IsEmpty() )
1872 return;
1873
1874 sax_fastparser::FSHelperPtr rComments = rStrm.CreateOutputStream(
1875 XclXmlUtils::GetStreamName( "xl/", "comments", mnTab + 1 ),
1876 XclXmlUtils::GetStreamName( "../", "comments", mnTab + 1 ),
1877 rStrm.GetCurrentStream()->getOutputStream(),
1878 "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",
1879 oox::getRelationship(Relationship::COMMENTS));
1880 rStrm.PushStream( rComments );
1881
1882 if( rStrm.getVersion() == oox::core::ISOIEC_29500_2008 )
1883 rComments->startElement( XML_comments,
1884 XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)),
1885 FSNS(XML_xmlns, XML_mc), rStrm.getNamespaceURL(OOX_NS(mce)),
1886 FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)),
1887 FSNS(XML_xmlns, XML_v2), rStrm.getNamespaceURL(OOX_NS(mceTest)),
1888 FSNS( XML_mc, XML_Ignorable ), "v2" );
1889 else
1890 rComments->startElement( XML_comments,
1891 XML_xmlns, rStrm.getNamespaceURL(OOX_NS(xls)),
1892 FSNS(XML_xmlns, XML_xdr), rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr)) );
1893
1894 rComments->startElement(XML_authors);
1895
1896 typedef std::set<OUString> Authors;
1897 Authors aAuthors;
1898
1899 size_t nNotes = mrNotes.GetSize();
1900 for( size_t i = 0; i < nNotes; ++i )
1901 {
1902 aAuthors.insert( XclXmlUtils::ToOUString( mrNotes.GetRecord( i )->GetAuthor() ) );
1903 }
1904
1905 for( const auto& rAuthor : aAuthors )
1906 {
1907 rComments->startElement(XML_author);
1908 rComments->writeEscaped( rAuthor );
1909 rComments->endElement( XML_author );
1910 }
1911
1912 rComments->endElement( XML_authors );
1913 rComments->startElement(XML_commentList);
1914
1915 Authors::const_iterator aAuthorsBegin = aAuthors.begin();
1916 for( size_t i = 0; i < nNotes; ++i )
1917 {
1919 Authors::const_iterator aAuthor = aAuthors.find(
1920 XclXmlUtils::ToOUString( xNote->GetAuthor() ) );
1921 sal_Int32 nAuthorId = distance( aAuthorsBegin, aAuthor );
1922 xNote->WriteXml( nAuthorId, rStrm );
1923 }
1924
1925 rComments->endElement( XML_commentList );
1926 rComments->endElement( XML_comments );
1927
1928 rStrm.PopStream();
1929}
1930
1931// object manager =============================================================
1932
1934 XclExpRoot( rRoot )
1935{
1936 InitStream( true );
1937 mxEscherEx = std::make_shared<XclEscherEx>( GetRoot(), *this, *mpDffStrm );
1938}
1939
1941 XclExpRoot( rParent.GetRoot() )
1942{
1943 InitStream( false );
1944 mxEscherEx = std::make_shared<XclEscherEx>( GetRoot(), *this, *mpDffStrm, rParent.mxEscherEx.get() );
1945}
1946
1948{
1949}
1950
1952{
1953 return new XclExpDffSheetAnchor( GetRoot() );
1954}
1955
1957{
1958 return new XclExpMsoDrawingGroup( *mxEscherEx );
1959}
1960
1962{
1964}
1965
1967{
1968 if( pSdrPage )
1969 mxEscherEx->AddSdrPage( *pSdrPage, GetOutput() != EXC_OUTPUT_BINARY );
1970 // the first dummy object may still be open
1971 OSL_ENSURE( mxEscherEx->GetGroupLevel() <= 1, "XclExpObjectManager::ProcessDrawing - still groups open?" );
1972 while( mxEscherEx->GetGroupLevel() )
1973 mxEscherEx->LeaveGroup();
1974 mxObjList->EndSheet();
1975 return mxObjList;
1976}
1977
1978rtl::Reference< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const Reference< XShapes >& rxShapes )
1979{
1980 if( rxShapes.is() )
1981 mxEscherEx->AddUnoShapes( rxShapes, GetOutput() != EXC_OUTPUT_BINARY );
1982 // the first dummy object may still be open
1983 OSL_ENSURE( mxEscherEx->GetGroupLevel() <= 1, "XclExpObjectManager::ProcessDrawing - still groups open?" );
1984 while( mxEscherEx->GetGroupLevel() )
1985 mxEscherEx->LeaveGroup();
1986 mxObjList->EndSheet();
1987 return mxObjList;
1988}
1989
1991{
1992 mxEscherEx->EndDocument();
1993}
1994
1996{
1997 return mxObjList->GetMsodrawingPerSheet();
1998}
1999
2001{
2002 return !mxObjList->empty();
2003}
2004
2005sal_uInt16 XclExpObjectManager::AddObj( std::unique_ptr<XclObj> pObjRec )
2006{
2007 return mxObjList->Add( std::move(pObjRec) );
2008}
2009
2010std::unique_ptr<XclObj> XclExpObjectManager::RemoveLastObj()
2011{
2012 return mxObjList->pop_back();
2013}
2014
2016{
2017 if( bTempFile )
2018 {
2019 moTempFile.emplace();
2020 mpDffStrm = moTempFile->GetStream( StreamMode::STD_READWRITE );
2021 }
2022
2023 if( !mpDffStrm )
2024 {
2025 mpBackupStrm = std::make_unique<SvMemoryStream>();
2026 mpDffStrm = mpBackupStrm.get();
2027 }
2028
2029 mpDffStrm->SetEndian( SvStreamEndian::LITTLE );
2030}
2031
2033 const XclExpObjectManager& rParent, const Size& rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY ) :
2034 XclExpObjectManager( rParent ),
2035 maPageSize( rPageSize ),
2036 mnScaleX( nScaleX ),
2037 mnScaleY( nScaleY )
2038{
2039}
2040
2042{
2044}
2045
2046/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt8 * Scanline
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
SCTAB Tab() const
Definition: address.hxx:283
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
Definition: address.cxx:2074
bool IsValid() const
Definition: address.hxx:305
SCROW Row() const
Definition: address.hxx:274
void SetInvalid()
Definition: address.hxx:299
SCCOL Col() const
Definition: address.hxx:279
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1005
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4492
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4508
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:2002
static ScMacroInfo * GetMacroInfo(SdrObject *pObj, bool bCreate=false)
Definition: drwlayer.cxx:2644
static ScAnchorType GetAnchorType(const SdrObject &)
Definition: drwlayer.cxx:2449
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.
Definition: global.cxx:703
const OUString & GetMacro() const
Definition: userdat.hxx:82
Additional class containing cell annotation data.
Definition: postit.hxx:58
const OUString & GetAuthor() const
Returns the author date of this note.
Definition: postit.hxx:111
const EditTextObject * GetEditTextObject() const
Returns the pointer to the current edit text object, or null.
Definition: postit.cxx:545
SdrCaptionObj * GetOrCreateCaption(const ScAddress &rPos) const
Returns the caption object of this note.
Definition: postit.cxx:588
OUString GetText() const
Returns the caption text of this note.
Definition: postit.cxx:551
ScAddress aEnd
Definition: address.hxx:498
ScAddress aStart
Definition: address.hxx:497
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
Definition: convuno.hxx:63
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
Definition: convuno.hxx:79
A wrapper for a UNO property set.
Definition: fapihelper.hxx:104
bool GetBoolProperty(const OUString &rPropName) const
Gets the specified Boolean property from the property set.
Definition: fapihelper.cxx:188
bool GetProperty(Type &rValue, const OUString &rPropName) const
Gets the specified property from the property set.
Definition: fapihelper.hxx:148
bool Is() const
Returns true, if the contained XPropertySet interface is valid.
Definition: fapihelper.hxx:128
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.
Definition: xlescher.cxx:324
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.
Definition: xlescher.cxx:282
sal_uInt32 GetDffFragmentPos(sal_uInt32 nFragmentKey)
Returns the position of the specified DFF stream fragment.
Definition: xcl97esc.cxx:130
sal_uInt32 GetDffFragmentSize(sal_uInt32 nFragmentKey)
Returns the size of the specified DFF stream fragment.
Definition: xcl97esc.cxx:137
void UpdateDffFragmentEnd()
Called after some data has been written to the DFF stream, to update the end position of the DFF frag...
Definition: xcl97esc.cxx:124
bool ConvertAddress(XclAddress &rXclPos, const ScAddress &rScPos, bool bWarn)
Converts the passed Calc cell address to an Excel cell address.
Definition: xehelper.cxx:192
ScDocument * mpDoc
Definition: xeescher.hxx:331
css::uno::Reference< css::drawing::XShape > mxShape
The chart itself (BOF/EOF substream data).
Definition: xeescher.hxx:330
css::uno::Reference< css::chart::XChartDocument > GetChartDoc() const
Definition: xeescher.cxx:1597
virtual ~XclExpChartObj() override
Definition: xeescher.cxx:1557
virtual void Save(XclExpStream &rStrm) override
Writes the OBJ record and the entire chart substream.
Definition: xeescher.cxx:1561
XclExpChartObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor, ScDocument *pDoc)
Definition: xeescher.cxx:1516
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeescher.cxx:1569
XclExpChartRef mxChart
Definition: xeescher.hxx:329
XclExpComments(SCTAB nTab, XclExpRecordList< XclExpNote > &rNotes)
Definition: xeescher.cxx:1864
XclExpRecordList< XclExpNote > & mrNotes
Definition: xeescher.hxx:396
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeescher.cxx:1869
Helper class for form controls to manage spreadsheet links .
Definition: xeescher.hxx:165
sal_uInt16 mnEntryCount
Formula for source data range.
Definition: xeescher.hxx:190
static void WriteFormulaSubRec(XclExpStream &rStrm, sal_uInt16 nSubRecId, const XclTokenArray &rTokArr)
Writes a formula subrecord with special style only valid in OBJ records.
Definition: xeescher.cxx:518
XclExpControlHelper(const XclExpRoot &rRoot)
Definition: xeescher.cxx:446
sal_uInt16 GetSourceEntryCount() const
Returns the number of entries in the source range, or 0, if no source set.
Definition: xeescher.hxx:180
XclTokenArrayRef mxCellLink
Definition: xeescher.hxx:188
virtual ~XclExpControlHelper() override
Definition: xeescher.cxx:452
const XclTokenArray * GetCellLinkTokArr() const
Returns the Excel token array of the cell link, or 0, if no link present.
Definition: xeescher.hxx:176
XclTokenArrayRef mxSrcRange
Formula for linked cell.
Definition: xeescher.hxx:189
const XclTokenArray * GetSourceRangeTokArr() const
Returns the Excel token array of the source range, or 0, if no link present.
Definition: xeescher.hxx:178
ScAddress mxCellLinkAddress
Number of entries in source range.
Definition: xeescher.hxx:192
static void WriteFormula(XclExpStream &rStrm, const XclTokenArray &rTokArr)
Writes a formula with special style only valid in OBJ records.
Definition: xeescher.cxx:509
void ConvertSheetLinks(css::uno::Reference< css::drawing::XShape > const &xShape)
Tries to get spreadsheet cell link and source range link from the passed shape.
Definition: xeescher.cxx:456
Base class for DFF client anchor atoms used in spreadsheets.
Definition: xeescher.hxx:43
virtual void WriteData(EscherEx &rEscherEx, const tools::Rectangle &rRect) override
Called from SVX DFF converter.
Definition: xeescher.cxx:266
XclExpDffAnchorBase(const XclExpRoot &rRoot, sal_uInt16 nFlags=0)
Constructs a dummy client anchor.
Definition: xeescher.cxx:242
void SetFlags(const SdrObject &rSdrObj)
Sets the flags according to the passed SdrObject.
Definition: xeescher.cxx:248
void SetSdrObject(const SdrObject &rSdrObj)
Sets the anchor position and flags according to the passed SdrObject.
Definition: xeescher.cxx:253
virtual void ImplSetFlags(const SdrObject &rSdrObj)
Definition: xeescher.cxx:273
void WriteDffData(EscherEx &rEscherEx) const
Writes the DFF client anchor structure with the current anchor position.
Definition: xeescher.cxx:259
XclObjAnchor maAnchor
Definition: xeescher.hxx:65
sal_uInt16 mnFlags
The client anchor data.
Definition: xeescher.hxx:66
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit)
Definition: xeescher.cxx:278
XclExpDffDropDownAnchor(const XclExpRoot &rRoot, const ScAddress &rScPos)
Definition: xeescher.cxx:328
Represents the position (anchor) of a shape in an embedded draw page.
Definition: xeescher.hxx:85
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit) override
Definition: xeescher.cxx:317
XclExpDffEmbeddedAnchor(const XclExpRoot &rRoot, const Size &rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY)
Definition: xeescher.cxx:303
virtual void ImplSetFlags(const SdrObject &rSdrObj) override
Definition: xeescher.cxx:312
XclExpDffNoteAnchor(const XclExpRoot &rRoot, const tools::Rectangle &rRect)
Definition: xeescher.cxx:322
Represents the position (anchor) of an object in a Calc sheet.
Definition: xeescher.hxx:71
virtual void ImplSetFlags(const SdrObject &rSdrObj) override
Definition: xeescher.cxx:289
virtual void ImplCalcAnchorRect(const tools::Rectangle &rRect, MapUnit eMapUnit) override
Definition: xeescher.cxx:298
XclExpDffSheetAnchor(const XclExpRoot &rRoot)
Definition: xeescher.cxx:283
virtual XclExpDffAnchorBase * CreateDffAnchor() const override
Creates a new DFF client anchor object for embedded objects according to the scaling data passed to t...
Definition: xeescher.cxx:2041
XclExpEmbeddedObjectManager(const XclExpObjectManager &rParent, const Size &rPageSize, sal_Int32 nScaleX, sal_Int32 nScaleY)
Definition: xeescher.cxx:2032
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.
Definition: xestyle.cxx:1193
XclTokenArrayRef CreateNameXFormula(sal_uInt16 nExtSheet, sal_uInt16 nExtName)
Creates a single tNameXR token for a reference to an external name.
Definition: xeformula.cxx:2694
XclTokenArrayRef CreateFormula(XclFormulaType eType, const ScTokenArray &rScTokArr, const ScAddress *pScBasePos=nullptr, XclExpRefLog *pRefLog=nullptr)
Creates and returns the token array of a formula.
Definition: xeformula.cxx:2644
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeescher.cxx:437
XclExpImgData(Graphic aGraphic, sal_uInt16 nRecId)
Definition: xeescher.cxx:388
virtual void Save(XclExpStream &rStrm) override
Writes the BITMAP record.
Definition: xeescher.cxx:394
sal_uInt16 mnRecId
The VCL graphic.
Definition: xeescher.hxx:160
Graphic maGraphic
Definition: xeescher.hxx:159
void FindExtSheet(sal_uInt16 &rnExtSheet, sal_uInt16 &rnXclTab, SCTAB nScTab, XclExpRefLogEntry *pRefLogEntry=nullptr)
Searches for an EXTERNSHEET index for the given Calc sheet.
Definition: xelink.cxx:2579
Base class for records holding DFF stream fragments.
Definition: xeescher.hxx:118
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the record (without record header).
Definition: xeescher.cxx:346
XclEscherEx & mrEscherEx
Definition: xeescher.hxx:126
sal_uInt32 mnFragmentKey
Reference to the DFF converter containing the DFF stream.
Definition: xeescher.hxx:127
XclExpMsoDrawingBase(XclEscherEx &rEscherEx, sal_uInt16 nRecId)
Definition: xeescher.cxx:339
The MSODRAWINGGROUP record contains the DGGCONTAINER with global DFF data such as the picture contain...
Definition: xeescher.hxx:134
XclExpMsoDrawingGroup(XclEscherEx &rEscherEx)
Definition: xeescher.cxx:353
One or more MSODRAWING records contain the DFF stream data for a drawing shape.
Definition: xeescher.hxx:143
XclExpMsoDrawing(XclEscherEx &rEscherEx)
Definition: xeescher.cxx:383
sal_uInt16 InsertMacroCall(const OUString &rMacroName, bool bVBasic, bool bFunc, bool bHidden=false)
Searches or inserts a defined name describing a macro name.
Definition: xename.cxx:837
bool mbLocked
Auto scale text.
Definition: xeescher.hxx:379
SdrTextHorzAdjust meTHA
true = permanently visible.
Definition: xeescher.hxx:376
bool mbColHidden
Auto Fill Style.
Definition: xeescher.hxx:381
tools::Rectangle maCommentTo
From and From Offset.
Definition: xeescher.hxx:384
ScAddress maScPos
Text and formatting data (OOXML)
Definition: xeescher.hxx:373
XclExpString maAuthor
Definition: xeescher.hxx:370
XclExpStringRef mpNoteContents
Main text of the note (<=BIFF7).
Definition: xeescher.hxx:372
void WriteXml(sal_Int32 nAuthorId, XclExpXmlStream &rStrm)
Definition: xeescher.cxx:1744
const XclExpRoot & mrRoot
Definition: xeescher.hxx:369
bool mbAutoScale
text vertical adjust
Definition: xeescher.hxx:378
bool mbAutoFill
Position & Size locked.
Definition: xeescher.hxx:380
const XclExpString & GetAuthor() const
Definition: xeescher.hxx:363
OString maNoteText
Name of the author.
Definition: xeescher.hxx:371
virtual void WriteBody(XclExpStream &rStrm) override
Writes the body of the NOTE record.
Definition: xeescher.cxx:1728
sal_uInt16 mnObjId
Calc cell address of the note.
Definition: xeescher.hxx:374
SdrTextVertAdjust meTVA
text horizontal adjust
Definition: xeescher.hxx:377
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.
Definition: xeescher.cxx:1607
bool mbVisible
Escher object ID (BIFF8).
Definition: xeescher.hxx:375
bool mbRowHidden
Column containing the comment is hidden.
Definition: xeescher.hxx:382
tools::Rectangle maCommentFrom
Row containing the comment is hidden.
Definition: xeescher.hxx:383
virtual void Save(XclExpStream &rStrm) override
Writes the NOTE record, if the respective Escher object is present.
Definition: xeescher.cxx:1681
std::unique_ptr< SvMemoryStream > mpBackupStrm
Definition: xeescher.hxx:443
XclExpObjectManager(const XclExpRoot &rRoot)
Definition: xeescher.cxx:1933
rtl::Reference< XclExpRecordBase > CreateDrawingGroup()
Creates and returns the MSODRAWINGGROUP record containing global DFF data in the DGGCONTAINER.
Definition: xeescher.cxx:1956
bool HasObj() const
Definition: xeescher.cxx:2000
virtual XclExpDffAnchorBase * CreateDffAnchor() const
Creates a new DFF client anchor object.
Definition: xeescher.cxx:1951
void StartSheet()
Initializes the object manager for a new sheet.
Definition: xeescher.cxx:1961
rtl::Reference< XclExpRecordBase > ProcessDrawing(const SdrPage *pSdrPage)
Processes a drawing page and returns the record block containing all related records (MSODRAWING,...
Definition: xeescher.cxx:1966
void EndDocument()
Finalizes the object manager after conversion of all sheets.
Definition: xeescher.cxx:1990
std::optional< ::utl::TempFileFast > moTempFile
Definition: xeescher.hxx:441
XclExpMsoDrawing * GetMsodrawingPerSheet()
Definition: xeescher.cxx:1995
sal_uInt16 AddObj(std::unique_ptr< XclObj > pObjRec)
Definition: xeescher.cxx:2005
virtual ~XclExpObjectManager() override
Definition: xeescher.cxx:1947
void InitStream(bool bTempFile)
Definition: xeescher.cxx:2015
SvStream * mpDffStrm
Definition: xeescher.hxx:442
rtl::Reference< XclExpObjList > mxObjList
Definition: xeescher.hxx:445
std::unique_ptr< XclObj > RemoveLastObj()
Definition: xeescher.cxx:2010
std::shared_ptr< XclEscherEx > mxEscherEx
Definition: xeescher.hxx:444
XclExpOcxControlObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor, OUString aClassName, sal_uInt32 nStrmStart, sal_uInt32 nStrmSize)
Definition: xeescher.cxx:528
OUString maClassName
Definition: xeescher.hxx:242
sal_uInt32 mnStrmStart
Class name of the control.
Definition: xeescher.hxx:243
sal_uInt32 mnStrmSize
Start position in 'Ctls' stream.
Definition: xeescher.hxx:244
virtual void WriteSubRecs(XclExpStream &rStrm) override
Definition: xeescher.cxx:583
size_t GetSize() const
Definition: xerecord.hxx:327
bool IsEmpty() const
Definition: xerecord.hxx:326
RecType * GetRecord(size_t nPos) const
Returns reference to an existing record or empty reference on error.
Definition: xerecord.hxx:333
Base class for single records with any content.
Definition: xerecord.hxx:143
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
Definition: xerecord.cxx:150
void SetRecSize(std::size_t nRecSize)
Sets a new record size prediction.
Definition: xerecord.hxx:163
Access to global data from other classes.
Definition: xeroot.hxx:113
XclExpFontBuffer & GetFontBuffer() const
Returns the font buffer.
Definition: xeroot.cxx:112
XclExpNameManager & GetNameManager() const
Returns the buffer that contains internal defined names.
Definition: xeroot.cxx:142
XclExpFormulaCompiler & GetFormulaCompiler() const
Returns the formula compiler to produce formula token arrays.
Definition: xeroot.cxx:88
XclExpObjectManager & GetObjectManager() const
Returns the drawing object manager.
Definition: xeroot.cxx:148
XclExpAddressConverter & GetAddressConverter() const
Returns the address converter.
Definition: xeroot.cxx:82
XclExpLinkManager & GetLocalLinkManager() const
Returns the local link manager for the current sheet.
Definition: xeroot.cxx:136
XclExpTabInfo & GetTabInfo() const
Returns the buffer for Calc->Excel sheet index conversion.
Definition: xeroot.cxx:76
const XclExpRoot & GetRoot() const
Returns this root instance - for code readability in derived classes.
Definition: xeroot.hxx:118
virtual ~XclExpShapeObj() override
Definition: xeescher.cxx:1854
XclExpShapeObj(XclExpObjectManager &rRoot, css::uno::Reference< css::drawing::XShape > const &xShape, ScDocument *pDoc)
Definition: xeescher.cxx:1840
virtual void WriteSubRecs(XclExpStream &rStrm) override
Definition: xeescher.cxx:1858
This class is used to export Excel record streams.
Definition: xestream.hxx:73
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.
Definition: xehelper.cxx:531
This class stores an unformatted or formatted string for Excel export.
Definition: xestring.hxx:48
std::size_t GetSize() const
Returns the byte count the whole string will take on export.
Definition: xestring.cxx:248
const css::uno::Reference< css::drawing::XShape > mxShape
Definition: xeescher.hxx:280
sal_Int16 mnSelEntry
Combobox dropdown line count.
Definition: xeescher.hxx:286
XclExpTbxControlObj(XclExpObjectManager &rObjMgr, css::uno::Reference< css::drawing::XShape > const &xShape, const tools::Rectangle *pChildAnchor)
Definition: xeescher.cxx:634
sal_Int32 mnShapeId
Definition: xeescher.hxx:300
tools::Rectangle maAreaTo
Definition: xeescher.hxx:302
bool mbFlatButton
Scrollbar: Page step.
Definition: xeescher.hxx:292
sal_uInt16 mnScrollStep
Scrollbar: Maximum value.
Definition: xeescher.hxx:290
sal_uInt16 mnScrollValue
Selected entry in combobox (1-based).
Definition: xeescher.hxx:287
void SaveVml(XclExpXmlStream &rStrm)
Save into xl/drawings/vmlDrawing1.vml.
Definition: xeescher.cxx:1179
bool mbScrollHor
true = Multi selection in listbox.
Definition: xeescher.hxx:295
OUString SaveControlPropertiesXml(XclExpXmlStream &rStrm) const
Definition: xeescher.cxx:1341
void setShapeId(sal_Int32 aShapeId)
Definition: xeescher.cxx:1083
bool mbPrint
Scrollbar: true = horizontal.
Definition: xeescher.hxx:296
bool mbMultiSel
False = 3D border style; True = Flat border style.
Definition: xeescher.hxx:294
sal_uInt16 mnScrollMax
Scrollbar: Minimum value.
Definition: xeescher.hxx:289
XclTbxEventType meEventType
Indexes of all selected entries in a multi selection.
Definition: xeescher.hxx:282
void WriteSbs(XclExpStream &rStrm)
Writes the ftSbs sub structure containing scrollbar data.
Definition: xeescher.cxx:1063
sal_uInt16 mnState
Height of the control.
Definition: xeescher.hxx:284
virtual void SaveXml(XclExpXmlStream &rStrm) override
Definition: xeescher.cxx:1194
sal_Int16 mnLineCount
Checked/unchecked state.
Definition: xeescher.hxx:285
sal_Int32 mnHeight
Type of supported macro event.
Definition: xeescher.hxx:283
sal_uInt16 mnScrollPage
Scrollbar: Single step.
Definition: xeescher.hxx:291
tools::Rectangle maAreaFrom
Definition: xeescher.hxx:301
bool SetMacroLink(const css::script::ScriptEventDescriptor &rEvent)
Sets the name of a macro attached to this control.
Definition: xeescher.cxx:916
sal_uInt16 mnScrollMin
Scrollbar: Current value.
Definition: xeescher.hxx:288
XclExpObjectManager & mrRoot
Definition: xeescher.hxx:303
virtual void WriteSubRecs(XclExpStream &rStrm) override
Definition: xeescher.cxx:921
void SaveSheetXml(XclExpXmlStream &rStrm, const OUString &aIdFormControlPr) const
Definition: xeescher.cxx:1418
void WriteCellLinkSubRec(XclExpStream &rStrm, sal_uInt16 nSubRecId)
Writes a subrecord containing a cell link, or nothing, if no link present.
Definition: xeescher.cxx:1057
ScfInt16Vec maMultiSel
Definition: xeescher.hxx:281
bool mbFlatBorder
False = 3D button style; True = Flat button style.
Definition: xeescher.hxx:293
void ReadFontProperties(XclFontData &rFontData, const ScfPropertySet &rPropSet, XclFontPropSetType eType, sal_Int16 nScript=-1)
Reads all font properties from the passed property set.
Definition: xlstyle.cxx:625
XclMacroHelper(const XclExpRoot &rRoot)
Definition: xeescher.cxx:1796
virtual ~XclMacroHelper() override
Definition: xeescher.cxx:1801
const OUString & GetMacroName() const
Definition: xeescher.cxx:1811
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.
Definition: xeescher.cxx:1805
XclTokenArrayRef mxMacroLink
Definition: xeescher.hxx:197
OUString maMacroName
Token array containing a link to an attached macro.
Definition: xeescher.hxx:198
static void WriteFromTo(XclExpXmlStream &rStrm, const XclObjAny &rObj)
Definition: xcl97rec.cxx:1162
virtual void WriteSubRecs(XclExpStream &rStrm) override
Definition: xcl97rec.cxx:1072
XclEscherEx & mrEscherEx
Definition: xcl97rec.hxx:99
sal_uInt16 GetObjType() const
Definition: xcl97rec.hxx:125
SCTAB GetTab() const
Definition: xcl97rec.hxx:130
sal_uInt16 mnObjType
Definition: xcl97rec.hxx:103
void ImplWriteAnchor(const SdrObject *pSdrObj, const tools::Rectangle *pChildAnchor)
Definition: xcl97rec.cxx:408
void SetPrintable(bool b)
Definition: xcl97rec.hxx:133
virtual void Save(XclExpStream &rStrm) override
Writes the record header and calls WriteBody().
Definition: xcl97rec.cxx:490
void SetAutoLine(bool b)
Definition: xcl97rec.hxx:135
std::unique_ptr< XclExpMsoDrawing > pClientTextbox
Definition: xcl97rec.hxx:101
std::unique_ptr< XclTxo > pTxo
Definition: xcl97rec.hxx:102
void SetLocked(bool b)
Definition: xcl97rec.hxx:132
void SetAutoFill(bool b)
Definition: xcl97rec.hxx:134
XclOutput GetOutput() const
Returns the current output format of the importer/exporter.
Definition: xlroot.hxx:143
rtl_TextEncoding GetTextEncoding() const
Returns the text encoding to import/export byte strings.
Definition: xlroot.hxx:147
SCTAB GetCurrScTab() const
Returns the current Calc sheet index.
Definition: xlroot.hxx:162
XclBiff GetBiff() const
Returns the current BIFF version of the importer/exporter.
Definition: xlroot.hxx:141
ScDocument & GetDoc() const
Returns reference to the destination document (import) or source document (export).
Definition: xlroot.cxx:286
XclFontPropSetHelper & GetFontPropSetHelper() const
Returns the property set helper for fonts.
Definition: xlroot.cxx:419
Binary representation of an Excel token array.
Definition: xlformula.hxx:377
sal_uInt16 GetSize() const
Returns the size of the token array in bytes.
Definition: xlformula.cxx:735
void WriteArray(XclExpStream &rStrm) const
Writes the tokens of the token array (without size field).
Definition: xlformula.cxx:781
static sal_Int32 GetHmmFromTwips(sal_Int32 nTwips)
Returns the length in 1/100 mm calculated from a length in twips.
Definition: xltools.cxx:302
static OUString GetXclMacroName(const OUString &rSbMacroUrl)
Returns the Excel macro name from a full StarBasic macro URL.
Definition: xltools.cxx:714
static OString ToOString(const Color &rColor)
Definition: xestream.cxx:709
static sax_fastparser::FSHelperPtr WriteElement(sax_fastparser::FSHelperPtr pStream, sal_Int32 nElement, const T &value)
Definition: xestream.hxx:273
static OUString ToOUString(const char *s)
Definition: xestream.cxx:785
static OUString GetStreamName(const char *sStreamDir, const char *sStream, sal_Int32 nId)
Definition: xestream.cxx:694
virtual void EndShape(sal_Int32 nShapeElement)
virtual sal_Int32 StartShape()
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
constexpr tools::Long Top() const
constexpr tools::Long Right() const
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
#define ESCHER_Prop_lineColor
#define ESCHER_Prop_pib
#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_OPT
#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
FuncFlags mnFlags
Information about all parameters.
constexpr sal_Int32 FSNS(sal_Int32 namespc, sal_Int32 element)
::std::vector< sal_uInt8 > ScfUInt8Vec
Definition: ftools.hxx:253
void insert_value(Type &rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal_uInt8 nBitCount)
Inserts a value into a bitfield.
Definition: ftools.hxx:102
void set_flag(Type &rnBitField, Type nMask, bool bSet=true)
Sets or clears (according to bSet) all set bits of nMask in rnBitField.
Definition: ftools.hxx:95
@ SCA_CELL
Definition: global.hxx:374
const Graphic maGraphic
double distance
sal_Int32 nIndex
void * p
Environment aTo
Environment aFrom
MapUnit
#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)
int i
void SvStream & rStrm
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
long Long
SdrTextVertAdjust
SDRTEXTVERTADJUST_BOTTOM
SDRTEXTVERTADJUST_BLOCK
SDRTEXTVERTADJUST_CENTER
SDRTEXTVERTADJUST_TOP
SdrTextHorzAdjust
SDRTEXTHORZADJUST_LEFT
SDRTEXTHORZADJUST_BLOCK
SDRTEXTHORZADJUST_CENTER
SDRTEXTHORZADJUST_RIGHT
uno::Reference< drawing::XShape > const mxShape
double mnHeight
sal_uInt16 mnCol
Definition: xladdress.hxx:31
sal_uInt32 mnRow
Definition: xladdress.hxx:32
This struct helps reading and writing Excel fonts.
Definition: xlstyle.hxx:286
sal_uInt16 mnHeight
Font color.
Definition: xlstyle.hxx:290
OUString maName
Definition: xlstyle.hxx:287
sal_uInt32 mnTY
X offset in left column (1/1024 of column width).
Definition: xlescher.hxx:286
sal_uInt32 mnBY
X offset in right column (1/1024 of column width).
Definition: xlescher.hxx:288
sal_uInt16 mnRX
Y offset in top row (1/256 of row height).
Definition: xlescher.hxx:287
void SetRect(const XclRoot &rRoot, SCTAB nScTab, const tools::Rectangle &rRect, MapUnit eMapUnit)
Initializes the anchor coordinates for a sheet.
Definition: xlescher.cxx:154
sal_uInt16 mnLX
Definition: xlescher.hxx:285
XclAddress maFirst
Definition: xladdress.hxx:60
XclAddress maLast
Definition: xladdress.hxx:61
bool mbVisible
unsigned char sal_uInt8
sal_Int16 SCTAB
Definition: types.hxx:22
OUString aLabel
#define SC_UNONAME_BOUNDCELL
Definition: unonames.hxx:659
#define SC_UNONAME_CELLRANGE
Definition: unonames.hxx:661
constexpr OUStringLiteral SC_SERVICENAME_VALBIND
Definition: unonames.hxx:25
constexpr OUStringLiteral SC_SERVICENAME_LISTSOURCE
Definition: unonames.hxx:27
const std::u16string_view aStringList[]
Definition: vbadialog.cxx:31
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
#define DEFLRINS
#define DEFTBINS
@ EXC_COLOR_CTRLTEXT
Area in a chart.
Definition: xestyle.hxx:54
@ EXC_BIFF5
MS Excel 4.0.
Definition: xlconst.hxx:34
@ EXC_BIFF8
MS Excel 5.0, MS Excel 7.0 (95)
Definition: xlconst.hxx:35
@ EXC_OUTPUT_BINARY
Definition: xlconst.hxx:42
@ EXC_OUTPUT_XML_2007
MS Excel binary .xls.
Definition: xlconst.hxx:43
const sal_uInt16 EXC_ID_OBJPICTFMLA
Option flags.
Definition: xlescher.hxx:212
SvStream & WriteXclObjAnchor(SvStream &rStrm, const XclObjAnchor &rAnchor)
Definition: xlescher.hxx:341
const sal_uInt8 EXC_OBJ_VER_CENTER
Definition: xlescher.hxx:128
const sal_uInt16 EXC_OBJ_CHECKBOX_FLAT
Definition: xlescher.hxx:169
const sal_uInt16 EXC_ESC_ANCHOR_LOCKED
Definition: xlescher.hxx:268
const sal_uInt16 EXC_OBJTYPE_CHART
Definition: xlescher.hxx:54
const sal_uInt16 EXC_OBJ_CHECKBOX_CHECKED
Definition: xlescher.hxx:167
const sal_uInt16 EXC_OBJ_CHECKBOX_TRISTATE
Definition: xlescher.hxx:168
const sal_uInt16 EXC_IMGDATA_BMP
Definition: xlescher.hxx:245
const sal_uInt16 EXC_OBJ_CHECKBOX_UNCHECKED
Definition: xlescher.hxx:166
const sal_uInt16 EXC_OBJTYPE_UNKNOWN
Definition: xlescher.hxx:71
const sal_uInt16 EXC_ID_OBJCBLSFMLA
List box/combo box data.
Definition: xlescher.hxx:223
const sal_uInt16 EXC_OBJ_GROUPBOX_FLAT
Dropdown style: filtered.
Definition: xlescher.hxx:203
const sal_uInt16 EXC_ID_OBJGBODATA
Scroll bar/list box/combo box cell link.
Definition: xlescher.hxx:218
const sal_uInt16 EXC_OBJTYPE_GROUPBOX
Definition: xlescher.hxx:67
const sal_uInt16 EXC_IMGDATA_WIN
Definition: xlescher.hxx:247
const sal_uInt16 EXC_OBJ_SCROLLBAR_DEFFLAGS
Definition: xlescher.hxx:184
const sal_uInt16 EXC_OBJTYPE_DROPDOWN
Definition: xlescher.hxx:68
const sal_uInt16 EXC_ID_OBJSBS
Radio button group data.
Definition: xlescher.hxx:215
const sal_uInt16 EXC_OBJTYPE_OPTIONBUTTON
Definition: xlescher.hxx:60
const sal_uInt16 EXC_OBJTYPE_BUTTON
Definition: xlescher.hxx:56
const sal_uInt16 EXC_ID_OBJCBLS
OLE link formula.
Definition: xlescher.hxx:213
const sal_uInt8 EXC_OBJ_HOR_CENTER
Definition: xlescher.hxx:123
const sal_uInt16 EXC_ID_OBJFLAGS
Clipboard format.
Definition: xlescher.hxx:211
const sal_uInt8 EXC_OBJ_HOR_LEFT
Definition: xlescher.hxx:122
const sal_uInt16 EXC_OBJ_SCROLLBAR_FLAT
Definition: xlescher.hxx:185
XclTbxEventType
Definition: xlescher.hxx:406
@ EXC_TBX_EVENT_VALUE
XTextListener.textChanged.
Definition: xlescher.hxx:410
@ EXC_TBX_EVENT_MOUSE
XActionListener.actionPerformed.
Definition: xlescher.hxx:408
@ EXC_TBX_EVENT_CHANGE
XAdjustmentListener.adjustmentValueChanged.
Definition: xlescher.hxx:411
@ EXC_TBX_EVENT_ACTION
Definition: xlescher.hxx:407
const sal_uInt16 EXC_ID_OBJSBSFMLA
Note data.
Definition: xlescher.hxx:217
const sal_uInt8 EXC_OBJ_LISTBOX_SINGLE
Definition: xlescher.hxx:188
const sal_uInt16 EXC_OBJ_SCROLLBAR_MIN
Definition: xlescher.hxx:179
const sal_uInt16 EXC_NOTE5_MAXLEN
Definition: xlescher.hxx:40
const sal_uInt8 EXC_OBJ_LISTBOX_MULTI
Single selection.
Definition: xlescher.hxx:189
const sal_uInt16 EXC_OBJ_SCROLLBAR_MAX
Definition: xlescher.hxx:180
const sal_uInt16 EXC_ID_MSODRAWING
Definition: xlescher.hxx:263
const sal_uInt16 EXC_OBJTYPE_LABEL
Definition: xlescher.hxx:62
const sal_uInt16 EXC_ID_OBJLBSDATA
Check box/radio button data.
Definition: xlescher.hxx:222
const sal_uInt16 EXC_ID_OBJMACRO
End of OBJ.
Definition: xlescher.hxx:207
const sal_uInt16 EXC_OBJTYPE_SCROLLBAR
Definition: xlescher.hxx:65
const sal_uInt16 EXC_ID_OBJCF
Group marker.
Definition: xlescher.hxx:210
const sal_uInt16 EXC_OBJ_SCROLLBAR_HOR
Definition: xlescher.hxx:182
const sal_uInt16 EXC_OBJTYPE_CHECKBOX
Definition: xlescher.hxx:59
const sal_uInt16 EXC_ID_NOTE
Definition: xlescher.hxx:38
const sal_uInt16 EXC_ESC_ANCHOR_SIZELOCKED
Definition: xlescher.hxx:267
const sal_uInt16 EXC_ID_MSODRAWINGGROUP
Definition: xlescher.hxx:259
const sal_uInt16 EXC_ESC_ANCHOR_POSLOCKED
Definition: xlescher.hxx:266
const sal_uInt16 EXC_OBJTYPE_SPIN
Definition: xlescher.hxx:64
const sal_uInt16 EXC_OBJ_INVALID_ID
Definition: xlescher.hxx:46
const sal_uInt16 EXC_OBJ_LISTBOX_FLAT
Definition: xlescher.hxx:193
const sal_uInt16 EXC_NOTE_VISIBLE
Definition: xlescher.hxx:39
const sal_uInt16 EXC_OBJTYPE_PICTURE
Definition: xlescher.hxx:57
const sal_uInt16 EXC_OBJTYPE_LISTBOX
Definition: xlescher.hxx:66
@ EXC_FMLATYPE_CONTROL
Chart source ranges.
Definition: xlformula.hxx:168
const sal_uInt16 EXC_FONT_APP
Definition: xlstyle.hxx:76
@ EXC_FONTPROPSET_CONTROL
All text objects in charts.
Definition: xlstyle.hxx:398
#define OSL_ENSURE_BIFF(c)
Definition: xltools.hxx:34
#define DBG_ERROR_BIFF()
Definition: xltools.hxx:33