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