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 
62 {
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 static const OUStringLiteral gsEmbeddedObjectProtocol( "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 );
110  rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
111  rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
112  rExport.AddAttribute ( XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD );
113  }
114 }
115 
116 static void lcl_addAspect(
117  const svt::EmbeddedObjectRef& rObj,
118  const XMLPropertyState **pStates,
120 {
121  sal_Int64 nAspect = rObj.GetViewAspect();
122  if ( nAspect )
123  {
124  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_DRAW_ASPECT ), uno::makeAny( nAspect ) );
125  }
126 }
127 
129  const svt::EmbeddedObjectRef& rObj,
130  const XMLPropertyState **pStates,
132 {
133  MapMode aMode( MapUnit::Map100thMM ); // the API expects this map mode for the embedded objects
134  Size aSize = rObj.GetSize( &aMode ); // get the size in the requested map mode
135 
136  if( aSize.Width() && aSize.Height() )
137  {
138  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_LEFT ), Any(sal_Int32(0)) );
139  pStates++;
140 
141  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_TOP ), Any(sal_Int32(0)) );
142  pStates++;
143 
144  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_WIDTH ), Any(static_cast<sal_Int32>(aSize.Width())) );
145  pStates++;
146 
147  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_OLE_VIS_AREA_HEIGHT ), Any(static_cast<sal_Int32>(aSize.Height())) );
148  }
149 }
150 
152  const uno::Reference < embed::XEmbeddedObject >& xObj,
153  const XMLPropertyState **pStates,
155 {
157  return;
158 
159  uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
160  if ( !xSet.is() )
161  return;
162 
163  bool bIsAutoScroll = false, bIsScrollingMode = false;
164  Any aAny = xSet->getPropertyValue("FrameIsAutoScroll");
165  aAny >>= bIsAutoScroll;
166  if ( !bIsAutoScroll )
167  {
168  aAny = xSet->getPropertyValue("FrameIsScrollingMode");
169  aAny >>= bIsScrollingMode;
170  }
171 
172  bool bIsBorderSet = false, bIsAutoBorder = false;
173  aAny = xSet->getPropertyValue("FrameIsAutoBorder");
174  aAny >>= bIsAutoBorder;
175  if ( !bIsAutoBorder )
176  {
177  aAny = xSet->getPropertyValue("FrameIsBorder");
178  aAny >>= bIsBorderSet;
179  }
180 
181  sal_Int32 nWidth, nHeight;
182  aAny = xSet->getPropertyValue("FrameMarginWidth");
183  aAny >>= nWidth;
184  aAny = xSet->getPropertyValue("FrameMarginHeight");
185  aAny >>= nHeight;
186 
187  if( !bIsAutoScroll )
188  {
189  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_SCROLLBAR ), makeAny(bIsScrollingMode) );
190  pStates++;
191  }
192  if( !bIsAutoBorder )
193  {
194  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_DISPLAY_BORDER ), makeAny(bIsBorderSet) );
195  pStates++;
196  }
197  if( SIZE_NOT_SET != nWidth )
198  {
199  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_HORI ), Any(nWidth) );
200  pStates++;
201  }
202  if( SIZE_NOT_SET != nHeight )
203  {
204  *pStates = new XMLPropertyState( rMapper->FindEntryIndex( CTF_FRAME_MARGIN_VERT ), Any(nHeight) );
205  }
206 }
207 
209  const Reference < XPropertySet > & rPropSet )
210 {
211  SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode();
212  svt::EmbeddedObjectRef& rObjRef = pOLENd->GetOLEObj().GetObject();
213  if( !rObjRef.is() )
214  return;
215 
216  const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
217  SvGlobalName aClassId( rObjRef->getClassID() );
218 
219  if( aIFrameClassId == aClassId )
220  {
221  lcl_addFrameProperties( rObjRef.GetObject(), aStates,
222  GetAutoFramePropMapper()->getPropertySetMapper() );
223  }
224  else if ( !SotExchange::IsInternal( aClassId ) )
225  {
226  lcl_addOutplaceProperties( rObjRef, aStates,
227  GetAutoFramePropMapper()->getPropertySetMapper() );
228  }
229 
230  lcl_addAspect( rObjRef, aStates,
231  GetAutoFramePropMapper()->getPropertySetMapper() );
232 
233  Add( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, aStates );
234 
235  const XMLPropertyState **pStates = aStates;
236  while( *pStates )
237  {
238  delete *pStates;
239  pStates++;
240  }
241 }
242 
244  const Reference < XPropertySet > & rPropSet,
245  const Reference < XPropertySetInfo > & rPropSetInfo )
246 {
247  SwOLENode *pOLENd = GetNoTextNode( rPropSet )->GetOLENode();
248  SwOLEObj& rOLEObj = pOLENd->GetOLEObj();
249  svt::EmbeddedObjectRef& rObjRef = rOLEObj.GetObject();
250  if( !rObjRef.is() )
251  return;
252 
253  SvGlobalName aClassId( rObjRef->getClassID() );
254 
256  if( aPluginClassId == aClassId )
257  {
258  nType = SV_EMBEDDED_PLUGIN;
259  }
260  else if( aAppletClassId == aClassId )
261  {
262  nType = SV_EMBEDDED_APPLET;
263  }
264  else if( aIFrameClassId == aClassId )
265  {
266  nType = SV_EMBEDDED_FRAME;
267  }
268  else if ( !SotExchange::IsInternal( aClassId ) )
269  {
270  nType = SV_EMBEDDED_OUTPLACE;
271  }
272 
273  enum XMLTokenEnum eElementName = XML__UNKNOWN_;
274  SvXMLExport &rXMLExport = GetExport();
275 
276  // First the stuff common to each of Applet/Plugin/Floating Frame
277  OUString sStyle;
278  Any aAny;
279  if( rPropSetInfo->hasPropertyByName( gsFrameStyleName ) )
280  {
281  aAny = rPropSet->getPropertyValue( gsFrameStyleName );
282  aAny >>= sStyle;
283  }
284 
285  const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
286  switch( nType )
287  {
288  case SV_EMBEDDED_FRAME:
289  lcl_addFrameProperties( rObjRef.GetObject(), aStates,
290  GetAutoFramePropMapper()->getPropertySetMapper() );
291  break;
293  lcl_addOutplaceProperties( rObjRef, aStates,
294  GetAutoFramePropMapper()->getPropertySetMapper() );
295  break;
296  default:
297  ;
298  }
299 
300  lcl_addAspect( rObjRef, aStates,
301  GetAutoFramePropMapper()->getPropertySetMapper() );
302 
303  const OUString sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME,
304  rPropSet, sStyle, aStates );
305  const XMLPropertyState **pStates = aStates;
306  while( *pStates )
307  {
308  delete *pStates;
309  pStates++;
310  }
311 
312  if( !sAutoStyle.isEmpty() )
313  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME, sAutoStyle );
314  addTextFrameAttributes( rPropSet, false );
315 
316  SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW,
317  XML_FRAME, false, true );
318 
319  switch (nType)
320  {
322  case SV_EMBEDDED_OWN:
323  if( !(rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED) )
324  {
325  OUString sURL;
326 
327  bool bIsOwnLink = false;
328  if( SV_EMBEDDED_OWN == nType )
329  {
330  try
331  {
332  uno::Reference< embed::XLinkageSupport > xLinkage( rObjRef.GetObject(), uno::UNO_QUERY );
333  bIsOwnLink = xLinkage.is() && xLinkage->isLink();
334  if ( bIsOwnLink )
335  sURL = xLinkage->getLinkURL();
336  }
337  catch(const uno::Exception&)
338  {
339  // TODO/LATER: error handling
340  OSL_FAIL( "Link detection or retrieving of the URL of OOo link is failed!" );
341  }
342  }
343 
344  if ( !bIsOwnLink )
345  {
347  }
348 
349  sURL = GetExport().AddEmbeddedObject( sURL );
350  lcl_addURL( rXMLExport, sURL, false );
351  }
352  if( SV_EMBEDDED_OWN == nType && !pOLENd->GetChartTableName().isEmpty() )
353  {
354  OUString sRange( pOLENd->GetChartTableName() );
355  OUStringBuffer aBuffer( sRange.getLength() + 2 );
356  for( sal_Int32 i=0; i < sRange.getLength(); i++ )
357  {
358  sal_Unicode c = sRange[i];
359  switch( c )
360  {
361  case ' ':
362  case '.':
363  case '\'':
364  case '\\':
365  if( aBuffer.isEmpty() )
366  {
367  aBuffer.append( '\'' );
368  aBuffer.append( std::u16string_view(sRange).substr(0, i) );
369  }
370  if( '\'' == c || '\\' == c )
371  aBuffer.append( '\\' );
372  [[fallthrough]];
373  default:
374  if( !aBuffer.isEmpty() )
375  aBuffer.append( c );
376  }
377  }
378  if( !aBuffer.isEmpty() )
379  {
380  aBuffer.append( '\'' );
381  sRange = aBuffer.makeStringAndClear();
382  }
383 
384  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NOTIFY_ON_UPDATE_OF_RANGES,
385  sRange );
386  }
387  eElementName = SV_EMBEDDED_OUTPLACE==nType ? XML_OBJECT_OLE
388  : XML_OBJECT;
389  break;
390  case SV_EMBEDDED_APPLET:
391  {
392  // It's an applet!
394  {
395  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
396  OUString aStr;
397  Any aAny2 = xSet->getPropertyValue("AppletCodeBase");
398  aAny2 >>= aStr;
399  if (!aStr.isEmpty() )
400  lcl_addURL(rXMLExport, aStr);
401 
402  aAny2 = xSet->getPropertyValue("AppletName");
403  aAny2 >>= aStr;
404  if (!aStr.isEmpty())
405  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_APPLET_NAME, aStr );
406 
407  aAny2 = xSet->getPropertyValue("AppletCode");
408  aAny2 >>= aStr;
409  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CODE, aStr );
410 
411  bool bScript = false;
412  aAny2 = xSet->getPropertyValue("AppletIsScript");
413  aAny2 >>= bScript;
414  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MAY_SCRIPT, bScript ? XML_TRUE : XML_FALSE );
415 
416  uno::Sequence < beans::PropertyValue > aProps;
417  aAny2 = xSet->getPropertyValue("AppletCommands");
418  aAny2 >>= aProps;
419 
420  sal_Int32 i = aProps.getLength();
421  while ( i > 0 )
422  {
423  beans::PropertyValue& aProp = aProps[--i];
424  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, true );
425  if ( nType2 == SwHtmlOptType::TAG)
426  {
427  OUString aStr2;
428  aProp.Value >>= aStr2;
429  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, aProp.Name, aStr2);
430  }
431  }
432 
433  eElementName = XML_APPLET;
434  }
435  }
436  break;
437  case SV_EMBEDDED_PLUGIN:
438  {
439  // It's a plugin!
441  {
442  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
443  OUString aStr;
444  Any aAny2 = xSet->getPropertyValue("PluginURL");
445  aAny2 >>= aStr;
446  lcl_addURL( rXMLExport, aStr );
447 
448  aAny2 = xSet->getPropertyValue("PluginMimeType");
449  aAny2 >>= aStr;
450  if (!aStr.isEmpty())
451  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, aStr );
452  eElementName = XML_PLUGIN;
453  }
454  }
455  break;
456  case SV_EMBEDDED_FRAME:
457  {
458  // It's a floating frame!
460  {
461  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
462  OUString aStr;
463  Any aAny2 = xSet->getPropertyValue("FrameURL");
464  aAny2 >>= aStr;
465 
466  lcl_addURL( rXMLExport, aStr );
467 
468  aAny2 = xSet->getPropertyValue("FrameName");
469  aAny2 >>= aStr;
470 
471  if (!aStr.isEmpty())
472  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_FRAME_NAME, aStr );
473  eElementName = XML_FLOATING_FRAME;
474  }
475  }
476  break;
477  default:
478  OSL_ENSURE( false, "unknown object type! Base class should have been called!" );
479  }
480 
481  {
482  SvXMLElementExport aElementExport( rXMLExport, XML_NAMESPACE_DRAW, eElementName,
483  false, true );
484  switch( nType )
485  {
486  case SV_EMBEDDED_OWN:
487  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
488  {
489  Reference < XEmbeddedObjectSupplier > xEOS( rPropSet, UNO_QUERY );
490  OSL_ENSURE( xEOS.is(), "no embedded object supplier for own object" );
491  Reference < XComponent > xComp = xEOS->getEmbeddedObject();
492  rXMLExport.ExportEmbeddedOwnObject( xComp );
493  }
494  break;
496  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
497  {
498  OUString sURL( gsEmbeddedObjectProtocol + rOLEObj.GetCurrentPersistName() );
499 
500  if ( !( rXMLExport.getExportFlags() & SvXMLExportFlags::OASIS ) )
501  sURL += "?oasis=false";
502 
503  rXMLExport.AddEmbeddedObjectAsBase64( sURL );
504  }
505  break;
506  case SV_EMBEDDED_APPLET:
507  {
509  {
510  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
511  uno::Sequence < beans::PropertyValue > aProps;
512  aAny = xSet->getPropertyValue("AppletCommands");
513  aAny >>= aProps;
514 
515  sal_Int32 i = aProps.getLength();
516  while ( i > 0 )
517  {
518  beans::PropertyValue& aProp = aProps[--i];
519  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, true );
520  if (SwHtmlOptType::PARAM == nType2 || SwHtmlOptType::SIZE == nType2 )
521  {
522  OUString aStr;
523  aProp.Value >>= aStr;
524  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aProp.Name );
525  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
526  SvXMLElementExport aElementExport2( rXMLExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
527  }
528  }
529  }
530  }
531  break;
532  case SV_EMBEDDED_PLUGIN:
533  {
535  {
536  uno::Reference < beans::XPropertySet > xSet( rObjRef->getComponent(), uno::UNO_QUERY );
537  uno::Sequence < beans::PropertyValue > aProps;
538  aAny = xSet->getPropertyValue("PluginCommands");
539  aAny >>= aProps;
540 
541  sal_Int32 i = aProps.getLength();
542  while ( i > 0 )
543  {
544  beans::PropertyValue& aProp = aProps[--i];
545  const SwHtmlOptType nType2 = SwApplet_Impl::GetOptionType( aProp.Name, false );
546  if ( nType2 == SwHtmlOptType::TAG)
547  {
548  OUString aStr;
549  aProp.Value >>= aStr;
550  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_NAME, aProp.Name );
551  rXMLExport.AddAttribute( XML_NAMESPACE_DRAW, XML_VALUE, aStr );
552  SvXMLElementExport aElementExport2( rXMLExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true );
553  }
554  }
555  }
556  }
557  break;
558  default:
559  break;
560  }
561  }
562  if( SV_EMBEDDED_OUTPLACE==nType || SV_EMBEDDED_OWN==nType )
563  {
564  OUString sURL(XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE);
565  sURL += rOLEObj.GetCurrentPersistName();
566  if( !(rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED) )
567  {
568  sURL = GetExport().AddEmbeddedObject( sURL );
569  lcl_addURL( rXMLExport, sURL, false );
570  }
571 
572  SvXMLElementExport aElementExport( GetExport(), XML_NAMESPACE_DRAW,
573  XML_IMAGE, false, true );
574 
575  if( rXMLExport.getExportFlags() & SvXMLExportFlags::EMBEDDED )
577  }
578 
579  // Lastly the stuff common to each of Applet/Plugin/Floating Frame
580  exportEvents( rPropSet );
581  exportTitleAndDescription( rPropSet, rPropSetInfo ); // #i73249#
582  exportContour( rPropSet, rPropSetInfo );
583 }
584 
585 /* 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:157
const SwOLEObj & GetOLEObj() const
Definition: ndole.hxx:110
long Height() const
XML_NAME
#define SO3_IFRAME_CLASSID
XML__UNKNOWN_
#define CTF_FRAME_MARGIN_HORI
const OUString & GetChartTableName() const
Definition: ndole.hxx:148
static void lcl_addFrameProperties(const uno::Reference< embed::XEmbeddedObject > &xObj, const XMLPropertyState **pStates, const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmltexte.cxx:151
XML_VALUE
#define CTF_OLE_VIS_AREA_TOP
#define CTF_OLE_VIS_AREA_WIDTH
static sal_uInt16 nType2
Definition: srtdlg.cxx:55
#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
static void lcl_addOutplaceProperties(const svt::EmbeddedObjectRef &rObj, const XMLPropertyState **pStates, const rtl::Reference< XMLPropertySetMapper > &rMapper)
Definition: xmltexte.cxx:128
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
FUNC_TYPE const nType
XML_OBJECT
svt::EmbeddedObjectRef & GetObject()
Definition: ndole.cxx:952
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:151
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:243
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
XML_APPLET_NAME
static const OUStringLiteral gsEmbeddedObjectProtocol("vnd.sun.star.EmbeddedObject:")
virtual ~SwXMLTextParagraphExport() override
Definition: xmltexte.cxx:96
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:116
#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:61
#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:155
virtual void _collectTextEmbeddedAutoStyles(const css::uno::Reference< css::beans::XPropertySet > &rPropSet) override
Definition: xmltexte.cxx:208
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:86
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)