Update ooo320-m1
[ooovba.git] / xmloff / source / draw / ximppage.cxx
blob10086916821be8b4e6e48fe56d94e04ed27763d0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ximppage.cxx,v $
10 * $Revision: 1.21 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include <tools/debug.hxx>
35 #include <com/sun/star/geometry/RealPoint2D.hpp>
36 #include <com/sun/star/text/XTextCursor.hpp>
37 #include <com/sun/star/util/DateTime.hpp>
38 #include <cppuhelper/implbase1.hxx>
39 #include "XMLNumberStylesImport.hxx"
40 #include <xmloff/xmlstyle.hxx>
41 #include <xmloff/xmltoken.hxx>
42 #include <xmloff/xmlstyle.hxx>
43 #include "xmlnmspe.hxx"
44 #include "ximppage.hxx"
45 #include "ximpshap.hxx"
46 #include "animimp.hxx"
47 #include "XMLStringBufferImportContext.hxx"
48 #include <xmloff/formsimp.hxx>
49 #include <xmloff/xmlictxt.hxx>
50 #include "ximpstyl.hxx"
51 #include <xmloff/prstylei.hxx>
52 #include "PropertySetMerger.hxx"
54 #include "unointerfacetouniqueidentifiermapper.hxx"
55 #include <xmloff/xmluconv.hxx>
57 using ::rtl::OUString;
58 using ::rtl::OUStringBuffer;
60 using namespace ::com::sun::star;
61 using namespace ::xmloff::token;
62 using namespace ::com::sun::star::uno;
63 using namespace ::com::sun::star::lang;
64 using namespace ::com::sun::star::text;
65 using namespace ::com::sun::star::util;
66 using namespace ::com::sun::star::beans;
67 using namespace ::com::sun::star::drawing;
68 using namespace ::com::sun::star::container;
69 using namespace ::com::sun::star::office;
70 using namespace ::com::sun::star::xml::sax;
71 using namespace ::com::sun::star::geometry;
74 //////////////////////////////////////////////////////////////////////////////
76 class DrawAnnotationContext : public SvXMLImportContext
79 public:
80 DrawAnnotationContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLocalName,const Reference< xml::sax::XAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess );
82 virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
83 virtual void EndElement();
85 private:
86 Reference< XAnnotation > mxAnnotation;
87 Reference< XTextCursor > mxCursor;
89 OUStringBuffer maAuthorBuffer;
90 OUStringBuffer maDateBuffer;
93 DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLocalName,const Reference< xml::sax::XAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess )
94 : SvXMLImportContext( rImport, nPrfx, rLocalName )
95 , mxAnnotation( xAnnotationAccess->createAndInsertAnnotation() )
97 if( mxAnnotation.is() )
99 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
101 RealPoint2D aPosition;
102 RealSize2D aSize;
104 for(sal_Int16 i=0; i < nAttrCount; i++)
106 OUString sValue( xAttrList->getValueByIndex( i ) );
107 OUString sAttrName( xAttrList->getNameByIndex( i ) );
108 OUString aLocalName;
109 switch( GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ) )
111 case XML_NAMESPACE_SVG:
112 if( IsXMLToken( aLocalName, XML_X ) )
114 sal_Int32 x;
115 GetImport().GetMM100UnitConverter().convertMeasure(x, sValue);
116 aPosition.X = static_cast<double>(x) / 100.0;
118 else if( IsXMLToken( aLocalName, XML_Y ) )
120 sal_Int32 y;
121 GetImport().GetMM100UnitConverter().convertMeasure(y, sValue);
122 aPosition.Y = static_cast<double>(y) / 100.0;
124 else if( IsXMLToken( aLocalName, XML_WIDTH ) )
126 sal_Int32 w;
127 GetImport().GetMM100UnitConverter().convertMeasure(w, sValue);
128 aSize.Width = static_cast<double>(w) / 100.0;
130 else if( IsXMLToken( aLocalName, XML_HEIGHT ) )
132 sal_Int32 h;
133 GetImport().GetMM100UnitConverter().convertMeasure(h, sValue);
134 aSize.Height = static_cast<double>(h) / 100.0;
136 break;
137 default:
138 break;
142 mxAnnotation->setPosition( aPosition );
143 mxAnnotation->setSize( aSize );
147 SvXMLImportContext * DrawAnnotationContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList )
149 SvXMLImportContext * pContext = NULL;
151 if( mxAnnotation.is() )
153 if( XML_NAMESPACE_DC == nPrefix )
155 if( IsXMLToken( rLocalName, XML_CREATOR ) )
156 pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maAuthorBuffer);
157 else if( IsXMLToken( rLocalName, XML_DATE ) )
158 pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maDateBuffer);
160 else
162 // create text cursor on demand
163 if( !mxCursor.is() )
165 uno::Reference< text::XText > xText( mxAnnotation->getTextRange() );
166 if( xText.is() )
168 UniReference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport();
169 mxCursor = xText->createTextCursor();
170 if( mxCursor.is() )
171 xTxtImport->SetCursor( mxCursor );
175 // if we have a text cursor, lets try to import some text
176 if( mxCursor.is() )
178 pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList );
183 // call parent for content
184 if(!pContext)
185 pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList );
187 return pContext;
190 void DrawAnnotationContext::EndElement()
192 if(mxCursor.is())
194 // delete addition newline
195 const OUString aEmpty;
196 mxCursor->gotoEnd( sal_False );
197 mxCursor->goLeft( 1, sal_True );
198 mxCursor->setString( aEmpty );
200 // reset cursor
201 GetImport().GetTextImport()->ResetCursor();
204 if( mxAnnotation.is() )
206 mxAnnotation->setAuthor( maAuthorBuffer.makeStringAndClear() );
208 DateTime aDateTime;
209 if(SvXMLUnitConverter::convertDateTime(aDateTime, maDateBuffer.makeStringAndClear()))
210 mxAnnotation->setDateTime(aDateTime);
214 //////////////////////////////////////////////////////////////////////////////
216 TYPEINIT1( SdXMLGenericPageContext, SvXMLImportContext );
218 SdXMLGenericPageContext::SdXMLGenericPageContext(
219 SvXMLImport& rImport,
220 USHORT nPrfx, const OUString& rLocalName,
221 const Reference< xml::sax::XAttributeList>& xAttrList,
222 Reference< drawing::XShapes >& rShapes)
223 : SvXMLImportContext( rImport, nPrfx, rLocalName )
224 , mxShapes( rShapes )
225 , mxAnnotationAccess( rShapes, UNO_QUERY )
227 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
229 for(sal_Int16 i=0; i < nAttrCount; i++)
231 OUString sAttrName = xAttrList->getNameByIndex( i );
232 OUString aLocalName;
233 USHORT nPrefix = GetSdImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName );
234 if( (nPrefix == XML_NAMESPACE_DRAW) && IsXMLToken( aLocalName, XML_NAV_ORDER ) )
236 msNavOrder = xAttrList->getValueByIndex( i );
237 break;
242 //////////////////////////////////////////////////////////////////////////////
244 SdXMLGenericPageContext::~SdXMLGenericPageContext()
248 //////////////////////////////////////////////////////////////////////////////
250 void SdXMLGenericPageContext::StartElement( const Reference< ::com::sun::star::xml::sax::XAttributeList >& )
252 GetImport().GetShapeImport()->pushGroupForSorting( mxShapes );
254 if( GetImport().IsFormsSupported() )
255 GetImport().GetFormImport()->startPage( Reference< drawing::XDrawPage >::query( mxShapes ) );
258 //////////////////////////////////////////////////////////////////////////////
260 SvXMLImportContext* SdXMLGenericPageContext::CreateChildContext( USHORT nPrefix,
261 const OUString& rLocalName,
262 const Reference< xml::sax::XAttributeList>& xAttrList )
264 SvXMLImportContext* pContext = 0L;
266 if( nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_ANIMATIONS ) )
268 pContext = new XMLAnimationsContext( GetImport(), nPrefix, rLocalName, xAttrList );
270 else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_FORMS ) )
272 if( GetImport().IsFormsSupported() )
273 pContext = GetImport().GetFormImport()->createOfficeFormsContext( GetImport(), nPrefix, rLocalName );
275 else if( ((nPrefix == XML_NAMESPACE_OFFICE) || (nPrefix == XML_NAMESPACE_OFFICE_EXT)) && IsXMLToken( rLocalName, XML_ANNOTATION ) )
277 if( mxAnnotationAccess.is() )
278 pContext = new DrawAnnotationContext( GetImport(), nPrefix, rLocalName, xAttrList, mxAnnotationAccess );
280 else
282 // call GroupChildContext function at common ShapeImport
283 pContext = GetImport().GetShapeImport()->CreateGroupChildContext(
284 GetImport(), nPrefix, rLocalName, xAttrList, mxShapes);
287 // call parent when no own context was created
288 if(!pContext)
289 pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList);
291 return pContext;
294 //////////////////////////////////////////////////////////////////////////////
296 void SdXMLGenericPageContext::EndElement()
298 GetImport().GetShapeImport()->popGroupAndSort();
300 if( GetImport().IsFormsSupported() )
301 GetImport().GetFormImport()->endPage();
303 if( maUseHeaderDeclName.getLength() || maUseFooterDeclName.getLength() || maUseDateTimeDeclName.getLength() )
307 Reference <beans::XPropertySet> xSet(mxShapes, uno::UNO_QUERY_THROW );
308 Reference< beans::XPropertySetInfo > xInfo( xSet->getPropertySetInfo() );
310 if( maUseHeaderDeclName.getLength() )
312 const OUString aStrHeaderTextProp( RTL_CONSTASCII_USTRINGPARAM( "HeaderText" ) );
313 if( xInfo->hasPropertyByName( aStrHeaderTextProp ) )
314 xSet->setPropertyValue( aStrHeaderTextProp,
315 makeAny( GetSdImport().GetHeaderDecl( maUseHeaderDeclName ) ) );
318 if( maUseFooterDeclName.getLength() )
320 const OUString aStrFooterTextProp( RTL_CONSTASCII_USTRINGPARAM( "FooterText" ) );
321 if( xInfo->hasPropertyByName( aStrFooterTextProp ) )
322 xSet->setPropertyValue( aStrFooterTextProp,
323 makeAny( GetSdImport().GetFooterDecl( maUseFooterDeclName ) ) );
326 if( maUseDateTimeDeclName.getLength() )
328 const OUString aStrDateTimeTextProp( RTL_CONSTASCII_USTRINGPARAM( "DateTimeText" ) );
329 if( xInfo->hasPropertyByName( aStrDateTimeTextProp ) )
331 sal_Bool bFixed;
332 OUString aDateTimeFormat;
333 const OUString aText( GetSdImport().GetDateTimeDecl( maUseDateTimeDeclName, bFixed, aDateTimeFormat ) );
335 xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("IsDateTimeFixed") ),
336 makeAny( bFixed ) );
338 if( bFixed )
340 xSet->setPropertyValue( aStrDateTimeTextProp, makeAny( aText ) );
342 else if( aDateTimeFormat.getLength() )
344 const SdXMLStylesContext* pStyles = dynamic_cast< const SdXMLStylesContext* >( GetSdImport().GetShapeImport()->GetStylesContext() );
345 if( pStyles )
347 const SdXMLNumberFormatImportContext* pSdNumStyle =
348 dynamic_cast< const SdXMLNumberFormatImportContext* >( pStyles->FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, aDateTimeFormat, sal_True ) );
350 if( pSdNumStyle )
352 xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("DateTimeFormat") ),
353 makeAny( pSdNumStyle->GetDrawKey() ) );
360 catch( uno::Exception& e )
362 (void)e;
363 DBG_ERROR("xmloff::SdXMLGenericPageContext::EndElement(), unexpected exception cought!");
367 SetNavigationOrder();
370 void SdXMLGenericPageContext::SetStyle( rtl::OUString& rStyleName )
372 // set PageProperties?
373 if(rStyleName.getLength())
377 const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetAutoStylesContext();
379 if( pContext && pContext->ISA( SvXMLStyleContext ) )
381 const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
382 if(pStyles)
384 const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
385 XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID, rStyleName);
387 if(pStyle && pStyle->ISA(XMLPropStyleContext))
389 XMLPropStyleContext* pPropStyle = (XMLPropStyleContext*)pStyle;
391 Reference <beans::XPropertySet> xPropSet1(mxShapes, uno::UNO_QUERY);
392 if(xPropSet1.is())
394 Reference< beans::XPropertySet > xPropSet( xPropSet1 );
395 Reference< beans::XPropertySet > xBackgroundSet;
397 const OUString aBackground(RTL_CONSTASCII_USTRINGPARAM("Background"));
398 if( xPropSet1->getPropertySetInfo()->hasPropertyByName( aBackground ) )
400 Reference< beans::XPropertySetInfo > xInfo( xPropSet1->getPropertySetInfo() );
401 if( xInfo.is() && xInfo->hasPropertyByName( aBackground ) )
403 Reference< lang::XMultiServiceFactory > xServiceFact(GetSdImport().GetModel(), uno::UNO_QUERY);
404 if(xServiceFact.is())
406 xBackgroundSet = Reference< beans::XPropertySet >::query(
407 xServiceFact->createInstance(
408 OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Background"))));
412 if( xBackgroundSet.is() )
413 xPropSet = PropertySetMerger_CreateInstance( xPropSet1, xBackgroundSet );
416 if(xPropSet.is())
418 pPropStyle->FillPropertySet(xPropSet);
420 if( xBackgroundSet.is() )
421 xPropSet1->setPropertyValue( aBackground, uno::makeAny( xBackgroundSet ) );
428 catch( uno::Exception )
430 DBG_ERROR( "SdXMLGenericPageContext::SetStyle(): uno::Exception catched!" );
435 void SdXMLGenericPageContext::SetLayout()
437 // set PresentationPageLayout?
438 if(GetSdImport().IsImpress() && maPageLayoutName.getLength())
440 sal_Int32 nType = -1;
442 const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
444 if( pContext && pContext->ISA( SvXMLStyleContext ) )
446 const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
447 if(pStyles)
449 const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext( XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID, maPageLayoutName);
451 if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
453 SdXMLPresentationPageLayoutContext* pLayout = (SdXMLPresentationPageLayoutContext*)pStyle;
454 nType = pLayout->GetTypeId();
459 if( -1 == nType )
461 Reference< container::XNameAccess > xPageLayouts( GetSdImport().getPageLayouts() );
462 if( xPageLayouts.is() )
464 if( xPageLayouts->hasByName( maPageLayoutName ) )
465 xPageLayouts->getByName( maPageLayoutName ) >>= nType;
470 if( -1 != nType )
472 Reference <beans::XPropertySet> xPropSet(mxShapes, uno::UNO_QUERY);
473 if(xPropSet.is())
475 OUString aPropName(RTL_CONSTASCII_USTRINGPARAM("Layout"));
476 Reference< beans::XPropertySetInfo > xInfo( xPropSet->getPropertySetInfo() );
477 if( xInfo.is() && xInfo->hasPropertyByName( aPropName ) )
478 xPropSet->setPropertyValue(aPropName, uno::makeAny( (sal_Int16)nType ) );
484 void SdXMLGenericPageContext::DeleteAllShapes()
486 // now delete all up-to-now contained shapes; they have been created
487 // when setting the presentation page layout.
488 while(mxShapes->getCount())
490 Reference< drawing::XShape > xShape;
491 uno::Any aAny(mxShapes->getByIndex(0L));
493 aAny >>= xShape;
495 if(xShape.is())
497 mxShapes->remove(xShape);
502 void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
504 if( GetSdImport().GetShapeImport()->GetStylesContext() )
506 // look for PageMaster with this name
508 // #80012# GetStylesContext() replaced with GetAutoStylesContext()
509 const SvXMLStylesContext* pAutoStyles = GetSdImport().GetShapeImport()->GetAutoStylesContext();
511 const SvXMLStyleContext* pStyle = pAutoStyles ? pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID, rsPageMasterName) : NULL;
513 if(pStyle && pStyle->ISA(SdXMLPageMasterContext))
515 const SdXMLPageMasterContext* pPageMaster = (SdXMLPageMasterContext*)pStyle;
516 const SdXMLPageMasterStyleContext* pPageMasterContext = pPageMaster->GetPageMasterStyle();
518 if(pPageMasterContext)
520 Reference< drawing::XDrawPage > xMasterPage(GetLocalShapesContext(), uno::UNO_QUERY);
521 if(xMasterPage.is())
523 // set sizes for this masterpage
524 Reference <beans::XPropertySet> xPropSet(xMasterPage, uno::UNO_QUERY);
525 if(xPropSet.is())
527 uno::Any aAny;
529 aAny <<= pPageMasterContext->GetBorderBottom();
530 xPropSet->setPropertyValue(
531 OUString(RTL_CONSTASCII_USTRINGPARAM("BorderBottom")), aAny);
533 aAny <<= pPageMasterContext->GetBorderLeft();
534 xPropSet->setPropertyValue(
535 OUString(RTL_CONSTASCII_USTRINGPARAM("BorderLeft")), aAny);
537 aAny <<= pPageMasterContext->GetBorderRight();
538 xPropSet->setPropertyValue(
539 OUString(RTL_CONSTASCII_USTRINGPARAM("BorderRight")), aAny);
541 aAny <<= pPageMasterContext->GetBorderTop();
542 xPropSet->setPropertyValue(
543 OUString(RTL_CONSTASCII_USTRINGPARAM("BorderTop")), aAny);
545 aAny <<= pPageMasterContext->GetWidth();
546 xPropSet->setPropertyValue(
547 OUString(RTL_CONSTASCII_USTRINGPARAM("Width")), aAny);
549 aAny <<= pPageMasterContext->GetHeight();
550 xPropSet->setPropertyValue(
551 OUString(RTL_CONSTASCII_USTRINGPARAM("Height")), aAny);
553 aAny <<= pPageMasterContext->GetOrientation();
554 xPropSet->setPropertyValue(
555 OUString(RTL_CONSTASCII_USTRINGPARAM("Orientation")), aAny);
564 class NavigationOrderAccess : public ::cppu::WeakImplHelper1< XIndexAccess >
566 public:
567 NavigationOrderAccess( std::vector< Reference< XShape > >& rShapes );
569 // XIndexAccess
570 virtual sal_Int32 SAL_CALL getCount( ) throw (RuntimeException);
571 virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException);
573 // XElementAccess
574 virtual Type SAL_CALL getElementType( ) throw (RuntimeException);
575 virtual sal_Bool SAL_CALL hasElements( ) throw (RuntimeException);
577 private:
578 std::vector< Reference< XShape > > maShapes;
581 NavigationOrderAccess::NavigationOrderAccess( std::vector< Reference< XShape > >& rShapes )
583 maShapes.swap( rShapes );
586 // XIndexAccess
587 sal_Int32 SAL_CALL NavigationOrderAccess::getCount( ) throw (RuntimeException)
589 return static_cast< sal_Int32 >( maShapes.size() );
592 Any SAL_CALL NavigationOrderAccess::getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
594 if( (Index < 0) || (Index > getCount()) )
595 throw IndexOutOfBoundsException();
597 return Any( maShapes[Index] );
600 // XElementAccess
601 Type SAL_CALL NavigationOrderAccess::getElementType( ) throw (RuntimeException)
603 return XShape::static_type();
606 sal_Bool SAL_CALL NavigationOrderAccess::hasElements( ) throw (RuntimeException)
608 return maShapes.empty() ? sal_False : sal_True;
611 void SdXMLGenericPageContext::SetNavigationOrder()
613 if( msNavOrder.getLength() != 0 ) try
615 sal_uInt32 nIndex;
616 const sal_uInt32 nCount = static_cast< sal_uInt32 >( mxShapes->getCount() );
617 std::vector< Reference< XShape > > aShapes( nCount );
619 ::comphelper::UnoInterfaceToUniqueIdentifierMapper& rIdMapper = GetSdImport().getInterfaceToIdentifierMapper();
620 SvXMLTokenEnumerator aEnumerator( msNavOrder );
621 OUString sId;
622 for( nIndex = 0; nIndex < nCount; ++nIndex )
624 if( !aEnumerator.getNextToken(sId) )
625 break;
627 aShapes[nIndex] = Reference< XShape >( rIdMapper.getReference( sId ), UNO_QUERY );
630 for( nIndex = 0; nIndex < nCount; ++nIndex )
632 if( !aShapes[nIndex].is() )
634 DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), draw:nav-order attribute incomplete!");
635 // todo: warning?
636 return;
640 Reference< XPropertySet > xSet( mxShapes, UNO_QUERY_THROW );
641 xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "NavigationOrder" ) ), Any( Reference< XIndexAccess >( new NavigationOrderAccess( aShapes ) ) ) );
643 catch( uno::Exception& )
645 DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!");