LibreOffice Module sw (master) 1
xmltexti.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
25#include <com/sun/star/embed/EmbeddedObjectCreator.hpp>
26#include <com/sun/star/embed/OOoEmbeddedObjectFactory.hpp>
27#include <com/sun/star/embed/XEmbeddedObject.hpp>
28#include <com/sun/star/embed/Aspects.hpp>
29#include <com/sun/star/frame/XModel.hpp>
30#include <com/sun/star/task/XInteractionHandler.hpp>
31#include <o3tl/any.hxx>
32#include <osl/diagnose.h>
33#include <rtl/ustrbuf.hxx>
34#include <sal/log.hxx>
36#include <com/sun/star/lang/XUnoTunnel.hpp>
37#include <xmloff/prstylei.hxx>
38#include <xmloff/maptype.hxx>
39#include <xmloff/xmlprmap.hxx>
40#include <xmloff/txtprmap.hxx>
41#include <xmloff/i18nmap.hxx>
42#include <xmloff/xmlimppr.hxx>
43#include <TextCursorHelper.hxx>
44#include <unoframe.hxx>
45#include <doc.hxx>
48#include <fmtfsize.hxx>
49#include <fmtanchr.hxx>
50#include <fmtcntnt.hxx>
51#include "xmlimp.hxx"
52#include "xmltbli.hxx"
53#include "xmltexti.hxx"
56#include <SwAppletImpl.hxx>
57#include <ndole.hxx>
58#include <docsh.hxx>
59#include <sfx2/docfile.hxx>
60#include <vcl/svapp.hxx>
62#include <svtools/embedhlp.hxx>
63#include <svl/urihelper.hxx>
64#include <sfx2/frmdescr.hxx>
65#include <tools/globname.hxx>
66
67#include <algorithm>
68#include <utility>
69
70using namespace ::com::sun::star;
71using namespace ::com::sun::star::uno;
72using namespace ::com::sun::star::lang;
73using namespace ::com::sun::star::text;
74using namespace ::com::sun::star::frame;
75using namespace ::com::sun::star::beans;
76using namespace xml::sax;
77
78const std::pair<OUString, SvGUID> aServiceMap[] = {
85};
86static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
87 sal_Int32 nHeight, sal_Int32 nWidth,
88 Size *pTwipSize = nullptr )
89{
90 if( nWidth > 0 && nHeight > 0 )
91 {
92 nWidth = o3tl::toTwips(nWidth, o3tl::Length::mm100);
93 if( nWidth < MINFLY )
94 nWidth = MINFLY;
95 nHeight = o3tl::toTwips(nHeight, o3tl::Length::mm100);
96 if( nHeight < MINFLY )
97 nHeight = MINFLY;
98 rItemSet.Put( SwFormatFrameSize( SwFrameSize::Fixed, nWidth, nHeight ) );
99 }
100
101 SwFormatAnchor aAnchor( RndStdIds::FLY_AT_CHAR );
102 rItemSet.Put( aAnchor );
103
104 if( pTwipSize )
105 {
106 pTwipSize->setWidth( nWidth );
107 pTwipSize->setHeight( nHeight);
108 }
109}
110
111static void lcl_setObjectVisualArea( const uno::Reference< embed::XEmbeddedObject >& xObj,
112 sal_Int64 nAspect,
113 const Size& aVisSize,
114 const MapUnit& aUnit )
115{
116 if( !(xObj.is() && nAspect != embed::Aspects::MSOLE_ICON) )
117 return;
118
119 // convert the visual area to the objects units
120 MapUnit aObjUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
121 Size aObjVisSize = OutputDevice::LogicToLogic(aVisSize, MapMode(aUnit), MapMode(aObjUnit));
122 awt::Size aSz;
123 aSz.Width = aObjVisSize.Width();
124 aSz.Height = aObjVisSize.Height();
125
126 try
127 {
128 xObj->setVisualAreaSize( nAspect, aSz );
129 }
130 catch( uno::Exception& )
131 {
132 OSL_FAIL( "Couldn't set visual area of the object!" );
133 }
134}
135
137 const uno::Reference < XModel>& rModel,
138 SvXMLImport& rImport,
139 const uno::Reference<XPropertySet> & rInfoSet,
140 bool bInsertM, bool bStylesOnlyM,
141 bool bBlockM, bool bOrganizerM ) :
142 XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, true/*bProgress*/,
143 bBlockM, bOrganizerM ),
144 m_pRedlineHelper( nullptr )
145{
146 uno::Reference<XPropertySet> xDocPropSet( rModel, UNO_QUERY );
148 bInsertM || bBlockM, xDocPropSet, rInfoSet );
149}
150
152{
153 // the redline helper destructor sets properties on the document
154 // and may throw an exception while doing so... catch this
155 try
156 {
157 delete m_pRedlineHelper;
158 }
159 catch ( const RuntimeException& )
160 {
161 // ignore
162 }
163}
164
166 SvXMLImport& rImport,
167 sal_Int32 /*nElement*/,
168 const uno::Reference< XFastAttributeList > & xAttrList )
169{
170 return new SwXMLTableContext( static_cast<SwXMLImport&>(rImport), xAttrList );
171}
172
174{
175 uno::Reference<XUnoTunnel> xCursorTunnel(
176 const_cast<SwXMLTextImportHelper *>(this)->GetCursor(), UNO_QUERY );
177 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
178 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
179 SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing");
180 SwDoc *pDoc = pTextCursor ? pTextCursor->GetDoc() : nullptr;
181
182 return pDoc && pDoc->IsInHeaderFooter( pTextCursor->GetPaM()->GetPoint()->GetNode() );
183}
184
185static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat )
186{
187 SwOLENode *pOLENd = nullptr;
188 if( pFrameFormat )
189 {
190 const SwFormatContent& rContent = pFrameFormat->GetContent();
191 const SwNodeIndex *pNdIdx = rContent.GetContentIdx();
192 pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode();
193 }
194 OSL_ENSURE( pOLENd, "Where is the OLE node" );
195 return pOLENd;
196}
197
199 SvXMLImport& rImport,
200 const OUString& rHRef,
201 const OUString& rStyleName,
202 const OUString& rTableName,
203 sal_Int32 nWidth, sal_Int32 nHeight )
204{
205 // this method will modify the document directly -> lock SolarMutex
206 SolarMutexGuard aGuard;
207
208 uno::Reference < XPropertySet > xPropSet;
209
210 sal_Int32 nPos = rHRef.indexOf( ':' );
211 if( -1 == nPos )
212 return xPropSet;
213
214 OUString aObjName( rHRef.copy( nPos+1) );
215
216 if( aObjName.isEmpty() )
217 return xPropSet;
218
219 uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY );
220 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
221 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
222 SAL_WARN_IF(!pTextCursor, "sw.uno", "SwXTextCursor missing");
223 SwDoc *pDoc = static_cast<SwXMLImport&>(rImport).getDoc();
224
226 Size aTwipSize( 0, 0 );
227 tools::Rectangle aVisArea( 0, 0, nWidth, nHeight );
228 lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
229 &aTwipSize );
230
231 SwFrameFormat *pFrameFormat = nullptr;
232 SwOLENode *pOLENd = nullptr;
233 if( rHRef.startsWith("vnd.sun.star.ServiceName:") )
234 {
235 bool bInsert = false;
236 SvGlobalName aClassName;
237 for (const auto& [sFilterService, rCLASSID] : aServiceMap)
238 {
239 if (aObjName == sFilterService)
240 {
241 aClassName = SvGlobalName(rCLASSID);
242 bInsert = true;
243 break;
244 }
245 }
246
247 if( bInsert )
248 {
249 uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
250 try
251 {
252 // create object with desired ClassId
253 uno::Sequence < sal_Int8 > aClass( aClassName.GetByteSequence() );
254 uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
255 uno::Sequence<beans::PropertyValue> aObjArgs( comphelper::InitPropertySequence({
256 { "DefaultParentBaseURL", Any(GetXMLImport().GetBaseURL()) }
257 }));
258 uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew(
259 aClass, OUString(), xStorage, "DummyName", aObjArgs), uno::UNO_QUERY );
260 if ( xObj.is() )
261 {
262 //TODO/LATER: is it enough to only set the VisAreaSize?
263 lcl_setObjectVisualArea( xObj, embed::Aspects::MSOLE_CONTENT, aTwipSize, MapUnit::MapTwip );
264 }
265
266 if( pTextCursor )
267 {
268 pFrameFormat = pDoc->getIDocumentContentOperations().InsertEmbObject(
269 *pTextCursor->GetPaM(),
270 ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
271 &aItemSet);
272 pOLENd = lcl_GetOLENode( pFrameFormat );
273 }
274
275 if( pOLENd )
276 aObjName = pOLENd->GetOLEObj().GetCurrentPersistName();
277 }
278 catch ( uno::Exception& )
279 {
280 }
281 }
282 }
283 else
284 {
285 // check whether an object with this name already exists in the document
286 OUString aName;
288 for( SwContentNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
289 {
290 SwOLENode* pExistingOLENd = pNd->GetOLENode();
291 if( pExistingOLENd )
292 {
293 OUString aExistingName = pExistingOLENd->GetOLEObj().GetCurrentPersistName();
294 if ( aExistingName == aObjName )
295 {
296 OSL_FAIL( "The document contains duplicate object references, means it is partially broken, please let developers know how this document was generated!" );
297
298 OUString aTmpName = pDoc->GetPersist()->GetEmbeddedObjectContainer().CreateUniqueObjectName();
299 try
300 {
301 pDoc->GetPersist()->GetStorage()->copyElementTo( aObjName,
302 pDoc->GetPersist()->GetStorage(),
303 aTmpName );
304 aName = aTmpName;
305 }
306 catch ( uno::Exception& )
307 {
308 OSL_FAIL( "Couldn't create a copy of the object!" );
309 }
310
311 break;
312 }
313 }
314 }
315
316 if ( aName.isEmpty() )
317 aName = aObjName;
318
319 // the correct aspect will be set later
320 // TODO/LATER: Actually it should be set here
321 if( pTextCursor )
322 {
323 pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCursor->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr );
324 pOLENd = lcl_GetOLENode( pFrameFormat );
325 }
326 aObjName = aName;
327 }
328
329 if( !pFrameFormat )
330 return xPropSet;
331
332 if( IsInsertMode() )
333 {
334 if( !pOLENd )
335 pOLENd = lcl_GetOLENode( pFrameFormat );
336 if( pOLENd )
337 pOLENd->SetOLESizeInvalid( true );
338 }
339
341 *pDoc, pFrameFormat);
343 {
344 // req for z-order
345 SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrameFormat*>(pFrameFormat));
346 }
347 if( !rTableName.isEmpty() )
348 {
349 const SwFormatContent& rContent = pFrameFormat->GetContent();
350 const SwNodeIndex *pNdIdx = rContent.GetContentIdx();
351 SwOLENode *pOLENode = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetOLENode();
352 OSL_ENSURE( pOLENode, "Where is the OLE node" );
353
354 OUStringBuffer aBuffer( rTableName.getLength() );
355 bool bQuoted = false;
356 bool bEscape = false;
357 bool bError = false;
358 for( sal_Int32 i=0; i < rTableName.getLength(); i++ )
359 {
360 bool bEndOfNameFound = false;
361 sal_Unicode c = rTableName[i];
362 switch( c )
363 {
364 case '\'':
365 if( bEscape )
366 {
367 aBuffer.append( c );
368 bEscape = false;
369 }
370 else if( bQuoted )
371 {
372 bEndOfNameFound = true;
373 }
374 else if( 0 == i )
375 {
376 bQuoted = true;
377 }
378 else
379 {
380 bError = true;
381 }
382 break;
383 case '\\':
384 if( bEscape )
385 {
386 aBuffer.append( c );
387 bEscape = false;
388 }
389 else
390 {
391 bEscape = true;
392 }
393 break;
394 case ' ':
395 case '.':
396 if( !bQuoted )
397 {
398 bEndOfNameFound = true;
399 }
400 else
401 {
402 aBuffer.append( c );
403 bEscape = false;
404 }
405 break;
406 default:
407 {
408 aBuffer.append( c );
409 bEscape = false;
410 }
411 break;
412 }
413 if( bError || bEndOfNameFound )
414 break;
415 }
416 if( !bError )
417 {
418 OUString sTableName( aBuffer.makeStringAndClear() );
419 pOLENode->SetChartTableName( GetRenameMap().Get( XML_TEXT_RENAME_TYPE_TABLE, sTableName ) );
420 }
421 }
422
423 sal_Int64 nDrawAspect = 0;
424 const XMLPropStyleContext *pStyle = nullptr;
425 bool bHasSizeProps = false;
426 if( !rStyleName.isEmpty() )
427 {
428 pStyle = FindAutoFrameStyle( rStyleName );
429 if( pStyle )
430 {
432 pStyle->GetStyles()
434 OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" );
435 if( xImpPrMap.is() )
436 {
438 xImpPrMap->getPropertySetMapper();
439
440 sal_Int32 nCount = pStyle->GetProperties().size();
441 for( sal_Int32 i=0; i < nCount; i++ )
442 {
443 const XMLPropertyState& rProp = pStyle->GetProperties()[i];
444 sal_Int32 nIdx = rProp.mnIndex;
445 if( -1 == nIdx )
446 continue;
447
448 switch( rPropMapper->GetEntryContextId(nIdx) )
449 {
451 {
452 sal_Int32 nVal = 0;
453 rProp.maValue >>= nVal;
454 aVisArea.SetPosX( nVal );
455 }
456 break;
458 {
459 sal_Int32 nVal = 0;
460 rProp.maValue >>= nVal;
461 aVisArea.SetPosY( nVal );
462 }
463 break;
465 {
466 sal_Int32 nVal = 0;
467 rProp.maValue >>= nVal;
468 aVisArea.setWidth( nVal );
469 bHasSizeProps = true;
470 }
471 break;
473 {
474 sal_Int32 nVal = 0;
475 rProp.maValue >>= nVal;
476 aVisArea.setHeight( nVal );
477 bHasSizeProps = true;
478 }
479 break;
481 {
482 rProp.maValue >>= nDrawAspect;
483
484 if ( !nDrawAspect )
485 nDrawAspect = embed::Aspects::MSOLE_CONTENT;
486
487 if ( pOLENd )
488 pOLENd->GetOLEObj().GetObject().SetViewAspect( nDrawAspect );
489 }
490 break;
491 }
492 }
493 }
494 }
495 }
496
497 if ( bHasSizeProps )
498 {
499 uno::Reference < embed::XEmbeddedObject > xObj =
501 if( xObj.is() )
502 lcl_setObjectVisualArea( xObj, ( nDrawAspect ? nDrawAspect : embed::Aspects::MSOLE_CONTENT ),
503 aVisArea.GetSize(), MapUnit::Map100thMM );
504 }
505
506 return xPropSet;
507}
508
510 SvXMLImport& rImport,
511 const OUString& rHRef,
512 const OUString& /*rStyleName*/,
513 const OUString& /*rTableName*/,
514 sal_Int32 nWidth, sal_Int32 nHeight )
515{
516 // this method will modify the document directly -> lock SolarMutex
517 SolarMutexGuard aGuard;
518
519 uno::Reference < XPropertySet > xPropSet;
520
521 uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY );
522 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
523 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
524 OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
525 SwDoc *pDoc = static_cast<SwXMLImport&>(rImport).getDoc();
526
528 Size aTwipSize( 0, 0 );
529 lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
530 &aTwipSize );
531
532 // We'll need a (valid) URL. If we don't have do not insert the link and return early.
533 // Copy URL into URL object on the way.
534 INetURLObject aURLObj;
535 bool bValidURL = !rHRef.isEmpty() &&
537 INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) );
538 if( !bValidURL )
539 return xPropSet;
540
541 uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
542 try
543 {
544 // create object with desired ClassId
545 uno::Reference < embed::XEmbeddedObjectCreator > xFactory =
546 embed::OOoEmbeddedObjectFactory::create(::comphelper::getProcessComponentContext());
547
548 uno::Sequence< beans::PropertyValue > aMediaDescriptor{ comphelper::makePropertyValue(
550
551 if (SfxMedium* pMedium = pDoc->GetDocShell() ? pDoc->GetDocShell()->GetMedium() : nullptr)
552 {
553 uno::Reference< task::XInteractionHandler > xInteraction = pMedium->GetInteractionHandler();
554 if ( xInteraction.is() )
555 {
556 aMediaDescriptor.realloc( 2 );
557 auto pMediaDescriptor = aMediaDescriptor.getArray();
558 pMediaDescriptor[1].Name = "InteractionHandler";
559 pMediaDescriptor[1].Value <<= xInteraction;
560 }
561
562 const auto nLen = aMediaDescriptor.getLength() + 1;
563 aMediaDescriptor.realloc(nLen);
564 auto pMediaDescriptor = aMediaDescriptor.getArray();
565 pMediaDescriptor[nLen - 1].Name = "Referer";
566 pMediaDescriptor[nLen - 1].Value <<= pMedium->GetName();
567 }
568
569 uno::Reference < embed::XEmbeddedObject > xObj(
570 xFactory->createInstanceLink(
571 xStorage, "DummyName", aMediaDescriptor, uno::Sequence< beans::PropertyValue >() ),
572 uno::UNO_QUERY_THROW );
573
574 {
575 SwFrameFormat *const pFrameFormat =
577 *pTextCursor->GetPaM(),
578 ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
579 &aItemSet );
580
581 // TODO/LATER: in future may need a way to set replacement image url to the link ( may be even to the object ), needs oasis cws???
582
584 *pDoc, pFrameFormat);
586 {
588 static_cast<SwFlyFrameFormat*>(pFrameFormat)); // req for z-order
589 }
590 }
591 }
592 catch ( uno::Exception& )
593 {
594 }
595
596 // TODO/LATER: should the rStyleName and rTableName be handled as for usual embedded object?
597
598 return xPropSet;
599}
600
601uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
602 const OUString &rName,
603 const OUString &rCode,
604 bool bMayScript,
605 const OUString& rHRef,
606 sal_Int32 nWidth, sal_Int32 nHeight )
607{
608 // this method will modify the document directly -> lock SolarMutex
609 SolarMutexGuard aGuard;
610
611 uno::Reference < XPropertySet > xPropSet;
612 uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY );
613 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
614 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
615 OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
616 SwDoc *pDoc = pTextCursor->GetDoc();
617
619 lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
620
621 SwApplet_Impl aAppletImpl ( std::move(aItemSet) );
622
623 OUString sCodeBase;
624 if( !rHRef.isEmpty() )
625 sCodeBase = GetXMLImport().GetAbsoluteReference( rHRef );
626
627 aAppletImpl.CreateApplet ( rCode, rName, bMayScript, sCodeBase, GetXMLImport().GetDocumentBase() );
628
629 // set the size of the applet
630 lcl_setObjectVisualArea( aAppletImpl.GetApplet(),
631 embed::Aspects::MSOLE_CONTENT,
632 Size( nWidth, nHeight ),
633 MapUnit::Map100thMM );
634
635 SwFrameFormat *const pFrameFormat =
637 ::svt::EmbeddedObjectRef(aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT),
638 &aAppletImpl.GetItemSet());
640 *pDoc, pFrameFormat);
642 {
643 // req for z-order
644 SwXFrame::GetOrCreateSdrObject(*static_cast<SwFlyFrameFormat*>(pFrameFormat));
645 }
646
647 return xPropSet;
648}
649
650uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
651 const OUString &rMimeType,
652 const OUString& rHRef,
653 sal_Int32 nWidth, sal_Int32 nHeight )
654{
655 uno::Reference < XPropertySet > xPropSet;
656 uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY );
657 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
658 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
659 OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
660 SwDoc *pDoc = pTextCursor->GetDoc();
661
663 lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
664
665 // We'll need a (valid) URL, or we need a MIME type. If we don't have
666 // either, do not insert plugin and return early. Copy URL into URL object
667 // on the way.
668 INetURLObject aURLObj;
669
670 bool bValidURL = !rHRef.isEmpty() &&
671 aURLObj.SetURL( URIHelper::SmartRel2Abs( INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) );
672 bool bValidMimeType = !rMimeType.isEmpty();
673 if( !bValidURL && !bValidMimeType )
674 return xPropSet;
675
676 uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
677 try
678 {
679 // create object with desired ClassId
680 uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() );
681 uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
682 uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew(
683 aClass, OUString(), xStorage, "DummyName",
684 uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY );
685
686 // set size to the object
688 embed::Aspects::MSOLE_CONTENT,
689 Size( nWidth, nHeight ),
690 MapUnit::Map100thMM );
691
693 {
694 uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
695 if ( xSet.is() )
696 {
697 if( bValidURL )
698 xSet->setPropertyValue("PluginURL",
700 if( bValidMimeType )
701 xSet->setPropertyValue("PluginMimeType",
702 Any( rMimeType ) );
703 }
704
705 SwFrameFormat *const pFrameFormat =
707 *pTextCursor->GetPaM(),
708 ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
709 &aItemSet);
711 *pDoc, pFrameFormat);
713 {
715 static_cast<SwFlyFrameFormat*>(pFrameFormat)); // req for z-order
716 }
717 }
718 }
719 catch ( uno::Exception& )
720 {
721 }
722
723 return xPropSet;
724}
726 const OUString& rName,
727 const OUString& rHRef,
728 const OUString& rStyleName,
729 sal_Int32 nWidth, sal_Int32 nHeight )
730{
731 // this method will modify the document directly -> lock SolarMutex
732 SolarMutexGuard aGuard;
733
734 uno::Reference < XPropertySet > xPropSet;
735 uno::Reference<XUnoTunnel> xCursorTunnel( GetCursor(), UNO_QUERY );
736 assert(xCursorTunnel.is() && "missing XUnoTunnel for Cursor");
737 OTextCursorHelper* pTextCursor = comphelper::getFromUnoTunnel<OTextCursorHelper>(xCursorTunnel);
738 OSL_ENSURE( pTextCursor, "SwXTextCursor missing" );
739 SwDoc *pDoc = pTextCursor->GetDoc();
740
742 lcl_putHeightAndWidth( aItemSet, nHeight, nWidth);
743
744 ScrollingMode eScrollMode = ScrollingMode::Auto;
745 bool bHasBorder = false;
746 bool bIsBorderSet = false;
747 Size aMargin( SIZE_NOT_SET, SIZE_NOT_SET );
748 const XMLPropStyleContext *pStyle = nullptr;
749 if( !rStyleName.isEmpty() )
750 {
751 pStyle = FindAutoFrameStyle( rStyleName );
752 if( pStyle )
753 {
755 pStyle->GetStyles()
757 OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" );
758 if( xImpPrMap.is() )
759 {
761 xImpPrMap->getPropertySetMapper();
762
763 sal_Int32 nCount = pStyle->GetProperties().size();
764 for( sal_Int32 i=0; i < nCount; i++ )
765 {
766 const XMLPropertyState& rProp = pStyle->GetProperties()[i];
767 sal_Int32 nIdx = rProp.mnIndex;
768 if( -1 == nIdx )
769 continue;
770
771 switch( rPropMapper->GetEntryContextId(nIdx) )
772 {
774 {
775 bool bYes = *o3tl::doAccess<bool>(rProp.maValue);
776 eScrollMode = bYes ? ScrollingMode::Yes : ScrollingMode::No;
777 }
778 break;
780 {
781 bHasBorder = *o3tl::doAccess<bool>(rProp.maValue);
782 bIsBorderSet = true;
783 }
784 break;
786 {
787 sal_Int32 nVal = SIZE_NOT_SET;
788 rProp.maValue >>= nVal;
789 aMargin.setWidth( nVal );
790 }
791 break;
793 {
794 sal_Int32 nVal = SIZE_NOT_SET;
795 rProp.maValue >>= nVal;
796 aMargin.setHeight( nVal );
797 }
798 break;
799 }
800 }
801 }
802 }
803 }
804
805 uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
806 try
807 {
808 // create object with desired ClassId
809 uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() );
810 uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() );
811 uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew(
812 aClass, OUString(), xStorage, "DummyName",
813 uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY );
814
815 // set size to the object
817 embed::Aspects::MSOLE_CONTENT,
818 Size( nWidth, nHeight ),
819 MapUnit::Map100thMM );
820
822 {
823 uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
824 if ( xSet.is() )
825 {
826 OUString sHRef = URIHelper::SmartRel2Abs(
827 INetURLObject( GetXMLImport().GetBaseURL() ), rHRef );
828
829 if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
830 GetXMLImport().NotifyMacroEventRead();
831
832 xSet->setPropertyValue("FrameURL",
833 Any( sHRef ) );
834
835 xSet->setPropertyValue("FrameName",
836 Any( rName ) );
837
838 if ( eScrollMode == ScrollingMode::Auto )
839 xSet->setPropertyValue("FrameIsAutoScroll",
840 Any( true ) );
841 else
842 xSet->setPropertyValue("FrameIsScrollingMode",
843 Any( eScrollMode == ScrollingMode::Yes ) );
844
845 if ( bIsBorderSet )
846 xSet->setPropertyValue("FrameIsBorder",
847 Any( bHasBorder ) );
848 else
849 xSet->setPropertyValue("FrameIsAutoBorder",
850 Any( true ) );
851
852 xSet->setPropertyValue("FrameMarginWidth",
853 Any( sal_Int32( aMargin.Width() ) ) );
854
855 xSet->setPropertyValue("FrameMarginHeight",
856 Any( sal_Int32( aMargin.Height() ) ) );
857 }
858
859 SwFrameFormat *const pFrameFormat =
861 *pTextCursor->GetPaM(),
862 ::svt::EmbeddedObjectRef(xObj, embed::Aspects::MSOLE_CONTENT),
863 &aItemSet);
865 *pDoc, pFrameFormat);
867 {
868 // req for z-order
870 static_cast<SwFlyFrameFormat*>(pFrameFormat));
871 }
872 }
873 }
874 catch ( uno::Exception& )
875 {
876 }
877
878 return xPropSet;
879}
880
882 const uno::Reference < XPropertySet > &rPropSet,
883 std::map < const OUString, OUString > &rParamMap)
884{
885 // this method will modify the document directly -> lock SolarMutex
886 SolarMutexGuard aGuard;
887
888 uno::Reference<XUnoTunnel> xCursorTunnel( rPropSet, UNO_QUERY );
889 assert(xCursorTunnel.is() && "missing XUnoTunnel for embedded");
890 SwXFrame* pFrame = comphelper::getFromUnoTunnel<SwXFrame>(xCursorTunnel);
891 OSL_ENSURE( pFrame, "SwXFrame missing" );
892 SwFrameFormat *pFrameFormat = pFrame->GetFrameFormat();
893 const SwFormatContent& rContent = pFrameFormat->GetContent();
894 const SwNodeIndex *pNdIdx = rContent.GetContentIdx();
895 SwOLENode *pOLENd = pNdIdx->GetNodes()[pNdIdx->GetIndex() + 1]->GetNoTextNode()->GetOLENode();
896 SwOLEObj& rOLEObj = pOLENd->GetOLEObj();
897
898 uno::Reference < embed::XEmbeddedObject > xEmbObj( rOLEObj.GetOleRef() );
900 return;
901
902 uno::Reference < beans::XPropertySet > xSet( xEmbObj->getComponent(), uno::UNO_QUERY );
903 if ( !xSet.is() )
904 return;
905
906 const sal_Int32 nCount = rParamMap.size();
907 uno::Sequence< beans::PropertyValue > aCommandSequence( nCount );
908
909 std::transform(rParamMap.begin(), rParamMap.end(), aCommandSequence.getArray(),
910 [](const auto& rParam)
911 {
912 return beans::PropertyValue(/* Name */ rParam.first,
913 /* Handle */ -1,
914 /* Value */ uno::Any(rParam.second),
915 /* State */ beans::PropertyState_DIRECT_VALUE);
916 });
917
918 // unfortunately the names of the properties are depending on the object
919 OUString aParaName("AppletCommands");
920 try
921 {
922 xSet->setPropertyValue( aParaName, Any( aCommandSequence ) );
923 }
924 catch ( uno::Exception& )
925 {
926 aParaName = "PluginCommands";
927 try
928 {
929 xSet->setPropertyValue( aParaName, Any( aCommandSequence ) );
930 }
931 catch ( uno::Exception& )
932 {
933 }
934 }
935}
936
937// redlining helper methods
938// (override to provide the real implementation)
940 const OUString& rType,
941 const OUString& rId,
942 const OUString& rAuthor,
943 const OUString& rComment,
944 const util::DateTime& rDateTime,
945 bool bMergeLastPara)
946{
947 // create redline helper on demand
948 OSL_ENSURE(nullptr != m_pRedlineHelper, "helper should have been created in constructor");
949 if (nullptr != m_pRedlineHelper)
950 m_pRedlineHelper->Add(rType, rId, rAuthor, rComment, rDateTime,
951 bMergeLastPara);
952}
953
955 uno::Reference<XTextCursor> & rOldCursor,
956 const OUString& rId)
957{
958 uno::Reference<XTextCursor> xRet;
959
960 if (nullptr != m_pRedlineHelper)
961 {
962 xRet = m_pRedlineHelper->CreateRedlineTextSection(rOldCursor, rId);
963 }
964
965 return xRet;
966}
967
969 const OUString& rId,
970 bool bStart,
971 bool bIsOutsideOfParagraph)
972{
973 if (nullptr != m_pRedlineHelper) {
974 uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
975 m_pRedlineHelper->SetCursor(rId, bStart, xTextRange,
976 bIsOutsideOfParagraph);
977 }
978 // else: ignore redline (wasn't added before, else we'd have a helper)
979}
980
982{
983 OUString rId = GetOpenRedlineId();
984 if ((nullptr != m_pRedlineHelper) && !rId.isEmpty())
985 {
988 }
989 // else: ignore redline (wasn't added before, or no open redline ID
990}
991
993{
994 if ( nullptr != m_pRedlineHelper )
995 m_pRedlineHelper->SetShowChanges( bShowChanges );
996}
997
999{
1000 if ( nullptr != m_pRedlineHelper )
1001 m_pRedlineHelper->SetRecordChanges( bRecordChanges );
1002}
1003
1005 const Sequence<sal_Int8> & rKey )
1006{
1007 if ( nullptr != m_pRedlineHelper )
1009}
1010
1011/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr OUStringLiteral XML_IMPORT_FILTER_CALC
constexpr OUStringLiteral XML_IMPORT_FILTER_DRAW
constexpr OUStringLiteral XML_IMPORT_FILTER_WRITER
constexpr OUStringLiteral XML_IMPORT_FILTER_CHART
constexpr OUStringLiteral XML_IMPORT_FILTER_IMPRESS
constexpr OUStringLiteral XML_IMPORT_FILTER_MATH
virtual SwFlyFrameFormat * InsertOLE(const SwPaM &rRg, const OUString &rObjName, sal_Int64 nAspect, const SfxItemSet *pFlyAttrSet, const SfxItemSet *pGrfAttrSet)=0
virtual SwFlyFrameFormat * InsertEmbObject(const SwPaM &rRg, const svt::EmbeddedObjectRef &xObj, SfxItemSet *pFlyAttrSet)=0
Insert OLE-objects.
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool SetURL(std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
virtual const SwDoc * GetDoc() const =0
virtual const SwPaM * GetPaM() const =0
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
comphelper::EmbeddedObjectContainer & GetEmbeddedObjectContainer() const
SfxMedium * GetMedium() const
css::uno::Reference< css::embed::XStorage > const & GetStorage()
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
css::uno::Sequence< sal_Int8 > GetByteSequence() const
XmlStyleFamily GetFamily() const
virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(XmlStyleFamily nFamily) const
void CreateApplet(const OUString &rCode, const OUString &rName, bool bMayScript, const OUString &rCodeBase, std::u16string_view rBaseURL)
SfxItemSet & GetItemSet()
const css::uno::Reference< css::embed::XEmbeddedObject > & GetApplet() const
Definition: doc.hxx:194
const SwGrfFormatColl * GetDfltGrfFormatColl() const
Definition: doc.hxx:812
IDocumentContentOperations const & getIDocumentContentOperations() const
Definition: doc.cxx:321
SfxObjectShell * GetPersist() const
Definition: docnew.cxx:649
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1326
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
Definition: doc.cxx:161
SwDocShell * GetDocShell()
Definition: doc.hxx:1359
bool IsInHeaderFooter(const SwNode &) const
Definition: doclay.cxx:1566
FlyAnchors.
Definition: fmtanchr.hxx:37
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:32
const SwNodeIndex * GetContentIdx() const
Definition: fmtcntnt.hxx:46
const SwFormatContent & GetContent(bool=true) const
Definition: fmtcntnt.hxx:55
Style of a layout element.
Definition: frmfmt.hxx:62
TElementType * Next()
Definition: calbck.hxx:373
TElementType * First()
Definition: calbck.hxx:365
Marks a node in the document model.
Definition: ndindex.hxx:31
const SwNodes & GetNodes() const
Definition: ndindex.hxx:175
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:171
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
Definition: ndole.hxx:165
const SwOLEObj & GetOLEObj() const
Definition: ndole.hxx:116
void SetChartTableName(const OUString &rNm)
Definition: ndole.hxx:157
void SetOLESizeInvalid(bool b)
Definition: ndole.hxx:138
svt::EmbeddedObjectRef & GetObject()
Definition: ndole.cxx:993
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
Definition: ndole.cxx:942
const OUString & GetCurrentPersistName() const
Definition: ndole.hxx:72
const SwPosition * GetPoint() const
Definition: pam.hxx:261
const SwFrameFormat * GetFrameFormat() const
Definition: unoframe.hxx:153
static SdrObject * GetOrCreateSdrObject(SwFlyFrameFormat &rFormat)
Definition: unoframe.cxx:1346
virtual css::uno::Reference< css::beans::XPropertySet > createAndInsertFloatingFrame(const OUString &rName, const OUString &rHRef, const OUString &rStyleName, sal_Int32 nWidth, sal_Int32 nHeight) override
Definition: xmltexti.cxx:725
virtual void RedlineSetCursor(const OUString &rId, bool bStart, bool bIsOutsideOfParagraph) override
ID used to RedlineAdd() call.
Definition: xmltexti.cxx:968
virtual void endAppletOrPlugin(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, std::map< const OUString, OUString > &rParamMap) override
Definition: xmltexti.cxx:881
virtual void SetChangesProtectionKey(const css::uno::Sequence< sal_Int8 > &rKey) override
Definition: xmltexti.cxx:1004
virtual void SetShowChanges(bool bShowChanges) override
Definition: xmltexti.cxx:992
XMLRedlineImportHelper * m_pRedlineHelper
Definition: xmltexti.hxx:29
virtual css::uno::Reference< css::beans::XPropertySet > createAndInsertOLEObject(SvXMLImport &rImport, const OUString &rHRef, const OUString &rStyleName, const OUString &rTableName, sal_Int32 nWidth, sal_Int32 nHeight) override
Definition: xmltexti.cxx:198
virtual bool IsInHeaderFooter() const override
Definition: xmltexti.cxx:173
virtual css::uno::Reference< css::beans::XPropertySet > createAndInsertApplet(const OUString &rName, const OUString &rCode, bool bMayScript, const OUString &rHRef, sal_Int32 nWidth, sal_Int32 nHeight) override
Definition: xmltexti.cxx:601
SwXMLTextImportHelper(const css::uno::Reference< css::frame::XModel > &rModel, SvXMLImport &rImport, const css::uno::Reference< css::beans::XPropertySet > &rInfoSet, bool bInsertM, bool bStylesOnlyM, bool bBlockM, bool bOrganizerM)
Definition: xmltexti.cxx:136
virtual SvXMLImportContext * CreateTableChildContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmltexti.cxx:165
virtual void RedlineAdd(const OUString &rType, const OUString &rId, const OUString &rAuthor, const OUString &rComment, const css::util::DateTime &rDateTime, bool bMergeLastPara) override
Definition: xmltexti.cxx:939
virtual css::uno::Reference< css::beans::XPropertySet > createAndInsertPlugin(const OUString &rMimeType, const OUString &rHRef, sal_Int32 nWidth, sal_Int32 nHeight) override
Definition: xmltexti.cxx:650
virtual void RedlineAdjustStartNodeCursor() override
Definition: xmltexti.cxx:981
virtual ~SwXMLTextImportHelper() override
Definition: xmltexti.cxx:151
virtual css::uno::Reference< css::beans::XPropertySet > createAndInsertOOoLink(SvXMLImport &rImport, const OUString &rHRef, const OUString &rStyleName, const OUString &rTableName, sal_Int32 nWidth, sal_Int32 nHeight) override
Definition: xmltexti.cxx:509
virtual void SetRecordChanges(bool bRecordChanges) override
Definition: xmltexti.cxx:998
virtual css::uno::Reference< css::text::XTextCursor > RedlineCreateText(css::uno::Reference< css::text::XTextCursor > &rOldCursor, const OUString &rId) override
merge last paragraph
Definition: xmltexti.cxx:954
static rtl::Reference< SwXTextEmbeddedObject > CreateXTextEmbeddedObject(SwDoc &rDoc, SwFrameFormat *pFrameFormat)
Definition: unoframe.cxx:3508
static MapUnit UnoEmbed2VCLMapUnit(sal_Int32 nUnoEmbedMapUnit)
const SvXMLStylesContext * GetStyles() const
const ::std::vector< XMLPropertyState > & GetProperties() const
void SetProtectionKey(const css::uno::Sequence< sal_Int8 > &rKey)
css::uno::Reference< css::text::XTextCursor > CreateRedlineTextSection(css::uno::Reference< css::text::XTextCursor > const &xOldCursor, const OUString &rId)
void SetCursor(const OUString &rId, bool bStart, css::uno::Reference< css::text::XTextRange > const &rRange, bool bIsOutsideOfParagraph)
void Add(std::u16string_view rType, const OUString &rId, const OUString &rAuthor, const OUString &rComment, const css::util::DateTime &rDateTime, bool bMergeLastParagraph)
void AdjustStartNodeCursor(const OUString &rId)
Adjust the start (end) position for a redline that begins in a start node.
void SetShowChanges(bool bShowChanges)
void SetRecordChanges(bool bRecordChanges)
css::uno::Reference< css::text::XTextCursor > & GetCursor()
SvI18NMap & GetRenameMap()
XMLPropStyleContext * FindAutoFrameStyle(const OUString &rName) const
SvXMLImport & GetXMLImport()
bool IsInsertMode() const
OUString const & GetOpenRedlineId() const
css::uno::Reference< css::embed::XEmbeddedObject > GetEmbeddedObject(const OUString &, OUString const *pBaseURL=nullptr)
static css::uno::Reference< css::embed::XStorage > GetTemporaryStorage(const css::uno::Reference< css::uno::XComponentContext > &rxContext=css::uno::Reference< css::uno::XComponentContext >())
#define SO3_SDRAW_CLASSID
#define SO3_PLUGIN_CLASSID
#define SO3_SIMPRESS_CLASSID
#define SO3_SCH_CLASSID
#define SO3_IFRAME_CLASSID
#define SO3_SC_CLASSID
#define SO3_SW_CLASSID
#define SO3_SM_CLASSID
void SetViewAspect(sal_Int64 nAspect)
static bool TryRunningState(const css::uno::Reference< css::embed::XEmbeddedObject > &)
void SetPosY(tools::Long y)
void setWidth(tools::Long n)
constexpr Size GetSize() const
void setHeight(tools::Long n)
void SetPosX(tools::Long x)
int nCount
Reference< XSingleServiceFactory > xFactory
@ Fixed
Frame cannot be moved in Var-direction.
ScrollingMode
#define SIZE_NOT_SET
OUString aName
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
MapUnit
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const &rTheBaseURIRef, OUString const &rTheRelURIRef, Link< OUString *, bool > const &rMaybeFileHdl=Link< OUString *, bool >(), bool bCheckFileExists=true, bool bIgnoreFragment=false, INetURLObject::EncodeMechanism eEncodeMechanism=INetURLObject::EncodeMechanism::WasEncoded, INetURLObject::DecodeMechanism eDecodeMechanism=INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
int i
constexpr auto toTwips(N number, Length from)
SwNode & GetNode() const
Definition: pam.hxx:80
css::uno::Any maValue
sal_Int32 mnIndex
#define MINFLY
Definition: swtypes.hxx:61
#define XML_TEXT_RENAME_TYPE_TABLE
#define CTF_FRAME_MARGIN_VERT
#define CTF_OLE_VIS_AREA_TOP
#define CTF_FRAME_DISPLAY_BORDER
#define CTF_OLE_DRAW_ASPECT
#define CTF_OLE_VIS_AREA_HEIGHT
#define CTF_OLE_VIS_AREA_WIDTH
#define CTF_FRAME_MARGIN_HORI
#define CTF_OLE_VIS_AREA_LEFT
#define CTF_FRAME_DISPLAY_SCROLLBAR
sal_uInt16 sal_Unicode
std::unique_ptr< char[]> aBuffer
static SwOLENode * lcl_GetOLENode(const SwFrameFormat *pFrameFormat)
Definition: xmltexti.cxx:185
const std::pair< OUString, SvGUID > aServiceMap[]
Definition: xmltexti.cxx:78
static void lcl_setObjectVisualArea(const uno::Reference< embed::XEmbeddedObject > &xObj, sal_Int64 nAspect, const Size &aVisSize, const MapUnit &aUnit)
Definition: xmltexti.cxx:111
static void lcl_putHeightAndWidth(SfxItemSet &rItemSet, sal_Int32 nHeight, sal_Int32 nWidth, Size *pTwipSize=nullptr)
Definition: xmltexti.cxx:86