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