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