LibreOffice Module sw (master)  1
xmltexte.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 <sal/config.h>
21 
22 #include <comphelper/classids.hxx>
23 #include <com/sun/star/embed/XEmbeddedObject.hpp>
24 #include <com/sun/star/embed/XLinkageSupport.hpp>
25 #include <com/sun/star/document/XEmbeddedObjectSupplier.hpp>
26 #include <xmloff/families.hxx>
27 #include <xmloff/xmlnamespace.hxx>
28 #include <xmloff/xmltoken.hxx>
29 #include <xmloff/txtprmap.hxx>
30 #include <xmloff/maptype.hxx>
31 #include <xmloff/xmlexppr.hxx>
32 
33 #include <ndole.hxx>
34 #include <fmtcntnt.hxx>
35 #include <unoframe.hxx>
36 #include "xmlexp.hxx"
37 #include "xmltexte.hxx"
38 #include <SwAppletImpl.hxx>
39 #include <ndindex.hxx>
40 
41 #include <osl/diagnose.h>
42 #include <sot/exchange.hxx>
43 #include <svl/urihelper.hxx>
44 #include <sfx2/frmdescr.hxx>
45 
46 using namespace ::com::sun::star;
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::style;
49 using namespace ::com::sun::star::beans;
50 using namespace ::com::sun::star::lang;
51 using namespace ::com::sun::star::document;
52 using namespace ::com::sun::star::io;
53 using namespace ::xmloff::token;
54 
55 namespace {
56 
58 {
59  SV_EMBEDDED_OWN,
60  SV_EMBEDDED_OUTPLACE,
61  SV_EMBEDDED_APPLET,
62  SV_EMBEDDED_PLUGIN,
63  SV_EMBEDDED_FRAME
64 };
65 
66 }
67 
69  const Reference < XPropertySet >& rPropSet )
70 {
71  Reference<XUnoTunnel> xCursorTunnel( rPropSet, UNO_QUERY );
72  assert(xCursorTunnel.is() && "missing XUnoTunnel for embedded");
73  SwXFrame* pFrame = comphelper::getFromUnoTunnel<SwXFrame>(xCursorTunnel);
74  assert(pFrame && "SwXFrame missing");
75  SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat();
76  const SwFormatContent& rContent = pFrameFormat->GetContent();
77  const SwNodeIndex *pNdIdx = rContent.GetContentIdx();
78  return pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode();
79 }
80 
81 constexpr OUStringLiteral gsEmbeddedObjectProtocol( u"vnd.sun.star.EmbeddedObject:" );
82 
84  SwXMLExport& rExp,
85  SvXMLAutoStylePoolP& _rAutoStylePool ) :
86  XMLTextParagraphExport( rExp, _rAutoStylePool ),
87  m_aAppletClassId( SO3_APPLET_CLASSID ),
88  m_aPluginClassId( SO3_PLUGIN_CLASSID ),
89  m_aIFrameClassId( SO3_IFRAME_CLASSID )
90 {
91 }
92 
94 {
95 }
96 
97 static void lcl_addURL ( SvXMLExport &rExport, const OUString &rURL,
98  bool bToRel = true )
99 {
100  const OUString sRelURL = ( bToRel && !rURL.isEmpty() )
102  : rURL;
103 
104  if (!sRelURL.isEmpty())
105  {
106  rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_HREF, sRelURL );
110  }
111 }
112 
113 static void lcl_addAspect(
114  const svt::EmbeddedObjectRef& rObj,
115  std::vector<XMLPropertyState>& rStates,
117 {
118  sal_Int64 nAspect = rObj.GetViewAspect();
119  if ( nAspect )
120  rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), uno::Any( nAspect ) );
121 }
122 
124  const svt::EmbeddedObjectRef& rObj,
125  std::vector<XMLPropertyState>& rStates,
127 {
128  MapMode aMode( MapUnit::Map100thMM ); // the API expects this map mode for the embedded objects
129  Size aSize = rObj.GetSize( &aMode ); // get the size in the requested map mode
130 
131  if( !(aSize.Width() && aSize.Height()) )
132  return;
133 
134  rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), Any(sal_Int32(0)) );
135  rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), Any(sal_Int32(0)) );
136  rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), Any(static_cast<sal_Int32>(aSize.Width())) );
137  rStates.emplace_back( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), Any(static_cast<sal_Int32>(aSize.Height())) );
138 }
139 
141  const uno::Reference < embed::XEmbeddedObject >& xObj,
142  std::vector<XMLPropertyState>& rStates,
144 {
146  return;
147 
148  uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
149  if ( !xSet.is() )
150  return;
151 
152  bool bIsAutoScroll = false, bIsScrollingMode = false;
153  Any aAny = xSet->getPropertyValue("FrameIsAutoScroll");
154  aAny >>= bIsAutoScroll;
155  if ( !bIsAutoScroll )
156  {
157  aAny = xSet->getPropertyValue("FrameIsScrollingMode");
158  aAny >>= bIsScrollingMode;
159  }
160 
161  bool bIsBorderSet = false, bIsAutoBorder = false;
162  aAny = xSet->getPropertyValue("FrameIsAutoBorder");
163  aAny >>= bIsAutoBorder;
164  if ( !bIsAutoBorder )
165  {
166  aAny = xSet->getPropertyValue("FrameIsBorder");
167  aAny >>= bIsBorderSet;
168  }
169 
170  sal_Int32 nWidth, nHeight;
171  aAny = xSet->getPropertyValue("FrameMarginWidth");
172  aAny >>= nWidth;
173  aAny = xSet->getPropertyValue("FrameMarginHeight");
174  aAny >>= nHeight;
175 
176  if( !bIsAutoScroll )
177  rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_SCROLLBAR ), Any(bIsScrollingMode) );
178  if( !bIsAutoBorder )
179  rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_BORDER ), Any(bIsBorderSet) );
180  if( SIZE_NOT_SET != nWidth )
181  rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_HORI ), Any(nWidth) );
182  if( SIZE_NOT_SET != nHeight )
183  rStates.emplace_back( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_VERT ), Any(nHeight) );
184 }
185 
187  const Reference < XPropertySet > & rPropSet )
188 {
189  SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode();
190  svt::EmbeddedObjectRef& rObjRef = pOLENd->GetOLEObj().GetObject();
191  if( !rObjRef.is() )
192  return;
193 
194  std::vector<XMLPropertyState> aStates;
195  aStates.reserve(8);
196  SvGlobalName aClassId( rObjRef->getClassID() );
197 
198  if( m_aIFrameClassId == aClassId )
199  {
200  lcl_addFrameProperties( rObjRef.GetObject(), aStates,
201  GetAutoFramePropMapper()->getPropertySetMapper() );
202  }
203  else if ( !SotExchange::IsInternal( aClassId ) )
204  {
205  lcl_addOutplaceProperties( rObjRef, aStates,
206  GetAutoFramePropMapper()->getPropertySetMapper() );
207  }
208 
209  lcl_addAspect( rObjRef, aStates,
210  GetAutoFramePropMapper()->getPropertySetMapper() );
211 
212  Add( XmlStyleFamily::TEXT_FRAME, rPropSet, aStates );
213 }
214 
216  const Reference < XPropertySet > & rPropSet,
217  const Reference < XPropertySetInfo > & rPropSetInfo )
218 {
219  SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode();
220  SwOLEObj& rOLEObj = pOLENd->GetOLEObj();
221  svt::EmbeddedObjectRef& rObjRef = rOLEObj.GetObject();
222  if( !rObjRef.is() )
223  return;
224 
225  SvGlobalName aClassId( rObjRef->getClassID() );
226 
227  SvEmbeddedObjectTypes nType = SV_EMBEDDED_OWN;
228  if( m_aPluginClassId == aClassId )
229  {
230  nType = SV_EMBEDDED_PLUGIN;
231  }
232  else if( m_aAppletClassId == aClassId )
233  {
234  nType = SV_EMBEDDED_APPLET;
235  }
236  else if( m_aIFrameClassId == aClassId )
237  {
238  nType = SV_EMBEDDED_FRAME;
239  }
240  else if ( !SotExchange::IsInternal( aClassId ) )
241  {
242  nType = SV_EMBEDDED_OUTPLACE;
243  }
244 
245  enum XMLTokenEnum eElementName = XML__UNKNOWN_;
246  SvXMLExport &rXMLExport = GetExport();
247 
248  // First the stuff common to each of Applet/Plugin/Floating Frame
249  OUString sStyle;
250  Any aAny;
251  if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
252  {
253  aAny = rPropSet->getPropertyValue( gsFrameStyleName );
254  aAny >>= sStyle;
255  }
256 
257  std::vector<XMLPropertyState> aStates;
258  aStates.reserve(8);
259  switch( nType )
260  {
261  case SV_EMBEDDED_FRAME:
262  lcl_addFrameProperties( rObjRef.GetObject(), aStates,
263  GetAutoFramePropMapper()->getPropertySetMapper() );
264  break;
265  case SV_EMBEDDED_OUTPLACE:
266  lcl_addOutplaceProperties( rObjRef, aStates,
267  GetAutoFramePropMapper()->getPropertySetMapper() );
268  break;
269  default:
270  ;
271  }
272 
273  lcl_addAspect( rObjRef, aStates,
274  GetAutoFramePropMapper()->getPropertySetMapper() );
275 
276  const OUString sAutoStyle = Find( XmlStyleFamily::TEXT_FRAME,
277  rPropSet, sStyle, aStates );
278  aStates.clear();
279 
280  if( !sAutoStyle.isEmpty() )
281  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME, sAutoStyle );
282  addTextFrameAttributes( rPropSet, false );
283 
285  XML_FRAME, false, true );
286 
287  switch (nType)
288  {
289  case SV_EMBEDDED_OUTPLACE:
290  case SV_EMBEDDED_OWN:
291  if( !(rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED) )
292  {
293  OUString sURL;
294 
295  bool bIsOwnLink = false;
296  if( SV_EMBEDDED_OWN == nType )
297  {
298  try
299  {
300  uno::Reference< embed::XLinkageSupport > xLinkage( rObjRef.GetObject(), uno::UNO_QUERY );
301  bIsOwnLink = xLinkage.is() && xLinkage->isLink();
302  if ( bIsOwnLink )
303  sURL = xLinkage->getLinkURL();
304  }
305  catch(const uno::Exception&)
306  {
307  // TODO/LATER: error handling
308  OSL_FAIL( "Link detection or retrieving of the URL of OOo link is failed!" );
309  }
310  }
311 
312  if ( !bIsOwnLink )
313  {
315  }
316 
317  sURL = GetExport().AddEmbeddedObject( sURL );
318  lcl_addURL( rXMLExport, sURL, false );
319  }
320  if( SV_EMBEDDED_OWN == nType && !pOLENd->GetChartTableName().isEmpty() )
321  {
322  OUString sRange( pOLENd->GetChartTableName() );
323  OUStringBuffer aBuffer( sRange.getLength() + 2 );
324  for( sal_Int32 i=0; i < sRange.getLength(); i++ )
325  {
326  sal_Unicode c = sRange[i];
327  switch( c )
328  {
329  case ' ':
330  case '.':
331  case '\'':
332  case '\\':
333  if( aBuffer.isEmpty() )
334  {
335  aBuffer.append( '\'' );
336  aBuffer.append( sRange.subView(0, i) );
337  }
338  if( '\'' == c || '\\' == c )
339  aBuffer.append( '\\' );
340  [[fallthrough]];
341  default:
342  if( !aBuffer.isEmpty() )
343  aBuffer.append( c );
344  }
345  }
346  if( !aBuffer.isEmpty() )
347  {
348  aBuffer.append( '\'' );
349  sRange = aBuffer.makeStringAndClear();
350  }
351 
353  sRange );
354  }
355  eElementName = SV_EMBEDDED_OUTPLACE==nType ? XML_OBJECT_OLE
356  : XML_OBJECT;
357  break;
358  case SV_EMBEDDED_APPLET:
359  {
360  // It's an applet!
362  {
363  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
364  OUString aStr;
365  Any aAny2 = xSet->getPropertyValue("AppletCodeBase");
366  aAny2 >>= aStr;
367  if (!aStr.isEmpty() )
368  lcl_addURL(rXMLExport, aStr);
369 
370  aAny2 = xSet->getPropertyValue("AppletName");
371  aAny2 >>= aStr;
372  if (!aStr.isEmpty())
373  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
374 
375  aAny2 = xSet->getPropertyValue("AppletCode");
376  aAny2 >>= aStr;
377  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr );
378 
379  bool bScript = false;
380  aAny2 = xSet->getPropertyValue("AppletIsScript");
381  aAny2 >>= bScript;
383 
384  uno::Sequence < beans::PropertyValue > aProps;
385  aAny2 = xSet->getPropertyValue("AppletCommands");
386  aAny2 >>= aProps;
387 
388  sal_Int32 i = aProps.getLength();
389  while ( i > 0 )
390  {
391  const beans::PropertyValue& aProp = aProps[--i];
392  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, true );
393  if ( nType2 == SwHtmlOptType::TAG)
394  {
395  OUString aStr2;
396  aProp.Value >>= aStr2;
397  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, aProp.Name, aStr2);
398  }
399  }
400 
401  eElementName = XML_APPLET;
402  }
403  }
404  break;
405  case SV_EMBEDDED_PLUGIN:
406  {
407  // It's a plugin!
409  {
410  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
411  OUString aStr;
412  Any aAny2 = xSet->getPropertyValue("PluginURL");
413  aAny2 >>= aStr;
414  lcl_addURL( rXMLExport, aStr );
415 
416  aAny2 = xSet->getPropertyValue("PluginMimeType");
417  aAny2 >>= aStr;
418  if (!aStr.isEmpty())
419  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
420  eElementName = XML_PLUGIN;
421  }
422  }
423  break;
424  case SV_EMBEDDED_FRAME:
425  {
426  // It's a floating frame!
428  {
429  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
430  OUString aStr;
431  Any aAny2 = xSet->getPropertyValue("FrameURL");
432  aAny2 >>= aStr;
433 
434  lcl_addURL( rXMLExport, aStr );
435 
436  aAny2 = xSet->getPropertyValue("FrameName");
437  aAny2 >>= aStr;
438 
439  if (!aStr.isEmpty())
440  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
441  eElementName = XML_FLOATING_FRAME;
442  }
443  }
444  break;
445  default:
446  OSL_ENSURE( false, "unknown object type! Base class should have been called!" );
447  }
448 
449  {
450  SvXMLElementExport aElementExport( rXMLExport, XML_NAMESPACE_DRAW, eElementName,
451  false, true );
452  switch( nType )
453  {
454  case SV_EMBEDDED_OWN:
455  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
456  {
457  Reference < XEmbeddedObjectSupplier > xEOS( rPropSet, UNO_QUERY );
458  OSL_ENSURE( xEOS.is(), "no embedded object supplier for own object" );
459  Reference < XComponent > xComp = xEOS->getEmbeddedObject();
460  rXMLExport.ExportEmbeddedOwnObject( xComp );
461  }
462  break;
463  case SV_EMBEDDED_OUTPLACE:
464  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
465  {
466  OUString sURL( gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
467 
468  if ( !( rXMLExport.getExportFlags() & SvXMLExportFlags::OASIS ) )
469  sURL += "?oasis=false";
470 
471  rXMLExport.AddEmbeddedObjectAsBase64( sURL );
472  }
473  break;
474  case SV_EMBEDDED_APPLET:
475  {
477  {
478  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
479  uno::Sequence < beans::PropertyValue > aProps;
480  aAny = xSet->getPropertyValue("AppletCommands");
481  aAny >>= aProps;
482 
483  sal_Int32 i = aProps.getLength();
484  while ( i > 0 )
485  {
486  const beans::PropertyValue& aProp = aProps[--i];
487  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, true );
488  if (SwHtmlOptType::PARAM == nType2 || SwHtmlOptType::SIZE == nType2 )
489  {
490  OUString aStr;
491  aProp.Value >>= aStr;
492  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aProp.Name );
493  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
494  SvXMLElementExport aElementExport2( rXMLExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
495  }
496  }
497  }
498  }
499  break;
500  case SV_EMBEDDED_PLUGIN:
501  {
503  {
504  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
505  uno::Sequence < beans::PropertyValue > aProps;
506  aAny = xSet->getPropertyValue("PluginCommands");
507  aAny >>= aProps;
508 
509  sal_Int32 i = aProps.getLength();
510  while ( i > 0 )
511  {
512  const beans::PropertyValue& aProp = aProps[--i];
513  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, false );
514  if ( nType2 == SwHtmlOptType::TAG)
515  {
516  OUString aStr;
517  aProp.Value >>= aStr;
518  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aProp.Name );
519  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
520  SvXMLElementExport aElementExport2( rXMLExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
521  }
522  }
523  }
524  }
525  break;
526  default:
527  break;
528  }
529  }
530  if( SV_EMBEDDED_OUTPLACE==nType || SV_EMBEDDED_OWN==nType )
531  {
532  OUString sURL = XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE + rOLEObj.GetCurrentPersistName();
533  if( !(rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED) )
534  {
535  sURL = GetExport().AddEmbeddedObject( sURL );
536  lcl_addURL( rXMLExport, sURL, false );
537  }
538 
540  XML_IMAGE, false, true );
541 
542  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
544  }
545 
546  // Lastly the stuff common to each of Applet/Plugin/Floating Frame
547  exportEvents( rPropSet );
548  exportTitleAndDescription( rPropSet, rPropSetInfo ); // #i73249#
549  exportContour( rPropSet, rPropSetInfo );
550 }
551 
552 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static SwHtmlOptType GetOptionType(const OUString &rName, bool bApplet)
static void lcl_addFrameProperties(const uno::Reference< embed::XEmbeddedObject > &xObj, std::vector< XMLPropertyState > &rStates, const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmltexte.cxx:140
const css::uno::Reference< css::embed::XEmbeddedObject > & GetObject() const
void exportContour(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
XML_FLOATING_FRAME
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
Definition: ndole.hxx:164
const SwOLEObj & GetOLEObj() const
Definition: ndole.hxx:115
#define SO3_IFRAME_CLASSID
#define CTF_FRAME_MARGIN_HORI
const OUString & GetChartTableName() const
Definition: ndole.hxx:155
#define CTF_OLE_VIS_AREA_TOP
constexpr sal_uInt16 XML_NAMESPACE_XLINK
#define CTF_OLE_VIS_AREA_WIDTH
static sal_uInt16 nType2
Definition: srtdlg.cxx:48
#define CTF_OLE_VIS_AREA_LEFT
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:31
#define CTF_FRAME_DISPLAY_SCROLLBAR
static SwNoTextNode * GetNoTextNode(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
Definition: xmltexte.cxx:68
XML_VALUE
bool AddEmbeddedObjectAsBase64(const OUString &rEmbeddedObjectURL)
#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE
Definition: xmltexte.hxx:26
SVL_DLLPUBLIC OUString simpleNormalizedMakeRelative(OUString const &baseUriReference, OUString const &uriReference)
SvXMLExport & GetExport()
constexpr tools::Long Width() const
XML_FRAME_NAME
XML_EMBED
sal_uInt16 sal_Unicode
const SvGlobalName m_aIFrameClassId
Definition: xmltexte.hxx:38
svt::EmbeddedObjectRef & GetObject()
Definition: ndole.cxx:990
void exportEvents(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
XMLShapeExportFlags addTextFrameAttributes(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bShape, basegfx::B2DPoint *pCenter=nullptr, OUString *pMinHeightValue=nullptr, OUString *pMinWidthValue=nullptr)
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:161
static void lcl_addURL(SvXMLExport &rExport, const OUString &rURL, bool bToRel=true)
Definition: xmltexte.cxx:97
XML_APPLET
virtual void _exportTextEmbedded(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo) override
Definition: xmltexte.cxx:215
XML_HREF
constexpr sal_uInt16 XML_NAMESPACE_DRAW
const OUString & GetCurrentPersistName() const
Definition: ndole.hxx:71
const SvGlobalName m_aPluginClassId
Definition: xmltexte.hxx:37
XML_OBJECT_OLE
static constexpr OUStringLiteral gsFrameStyleName
static bool IsInternal(const SvGlobalName &)
Style of a layout element.
Definition: frmfmt.hxx:59
XML_PARAM
int i
const SvGlobalName m_aAppletClassId
Definition: xmltexte.hxx:36
XML_MAY_SCRIPT
virtual ~SwXMLTextParagraphExport() override
Definition: xmltexte.cxx:93
XML_APPLET_NAME
SwHtmlOptType
XML_SIMPLE
OUString AddEmbeddedObject(const OUString &rEmbeddedObjectURL)
XML_PLUGIN
XML_ONLOAD
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Definition: ndnotxt.hxx:29
Marks a node in the document model.
Definition: ndindex.hxx:30
#define CTF_FRAME_DISPLAY_BORDER
#define SO3_APPLET_CLASSID
void Add(XmlStyleFamily nFamily, MultiPropertySetHelper &rPropSetHelper, const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
static void lcl_addAspect(const svt::EmbeddedObjectRef &rObj, std::vector< XMLPropertyState > &rStates, const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmltexte.cxx:113
#define CTF_FRAME_MARGIN_VERT
#define CTF_OLE_DRAW_ASPECT
const rtl::Reference< SvXMLExportPropertyMapper > & GetAutoFramePropMapper() const
const SwNodeIndex * GetContentIdx() const
Definition: fmtcntnt.hxx:46
XML_TRUE
const OUString & GetOrigFileName() const
SvEmbeddedObjectTypes
Definition: xmltexte.cxx:57
XML_SHOW
std::unique_ptr< char[]> aBuffer
XML_OBJECT
XML_FALSE
XML_NOTIFY_ON_UPDATE_OF_RANGES
#define CTF_OLE_VIS_AREA_HEIGHT
XML_FRAME
void exportTitleAndDescription(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
constexpr tools::Long Height() const
const SwNodes & GetNodes() const
Definition: ndindex.hxx:165
virtual void _collectTextEmbeddedAutoStyles(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
Definition: xmltexte.cxx:186
XML_TYPE
OUString Find(XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const OUString &rParent, const o3tl::span< const XMLPropertyState > aAddStates={}) const
Size GetSize(MapMode const *pTargetMapMode) const
constexpr OUStringLiteral gsEmbeddedObjectProtocol(u"vnd.sun.star.EmbeddedObject:")
QPRO_FUNC_TYPE nType
XMLTokenEnum
XML_STYLE_NAME
XML_IMAGE
XML__UNKNOWN_
const SwFormatContent & GetContent(bool=true) const
Definition: fmtcntnt.hxx:55
XML_MIME_TYPE
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
static void lcl_addOutplaceProperties(const svt::EmbeddedObjectRef &rObj, std::vector< XMLPropertyState > &rStates, const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmltexte.cxx:123
sal_Int64 GetViewAspect() const
XML_ACTUATE
#define SO3_PLUGIN_CLASSID
SvXMLExportFlags getExportFlags() const
aStr
#define SIZE_NOT_SET
void ExportEmbeddedOwnObject(css::uno::Reference< css::lang::XComponent > const &rComp)
XML_CODE
XML_NAME
SwXMLTextParagraphExport(SwXMLExport &rExp, SvXMLAutoStylePoolP &rAutoStylePool)
Definition: xmltexte.cxx:83