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