28#include <oox/token/namespaces.hxx>
29#include <oox/token/tokens.hxx>
43OUString lclGetRelationsPath( std::u16string_view rFragmentPath )
45 size_t nPathLen = rFragmentPath.rfind(
'/' );
46 if (nPathLen == std::u16string_view::npos)
50 return OUString::Concat(rFragmentPath.substr(0, nPathLen)) +
52 rFragmentPath.substr(nPathLen) +
59 FragmentHandler( rFilter, lclGetRelationsPath( xRelations->getFragmentPath() ), xRelations ),
60 mxRelations( xRelations )
65 sal_Int32 nElement,
const Reference< XFastAttributeList >& rxAttribs )
67 Reference< XFastContextHandler > xRet;
77 if( !aRelation.
maId.isEmpty() && !aRelation.
maType.isEmpty() && !aRelation.
maTarget.isEmpty() )
79 sal_Int32 nTargetMode = aAttribs.
getToken( XML_TargetMode, XML_Internal );
80 SAL_WARN_IF( (nTargetMode != XML_Internal) && (nTargetMode != XML_External),
"oox",
81 "RelationsFragment::createFastChildContext - unexpected target mode, assuming external" );
82 aRelation.
mbExternal = nTargetMode != XML_Internal;
85 "RelationsFragment::createFastChildContext - relation identifier exists already" );
90 case PR_TOKEN( Relationships ):
Provides access to attribute values of an element.
OUString getStringDefaulted(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute, returns an empty string if attribute not present...
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.
css::uno::Reference< css::xml::sax::XFastContextHandler > getFastContextHandler()
Returns the com.sun.star.xml.sax.XFastContextHandler interface of this context.
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rxAttribs) override
RelationsFragment(XmlFilterBase &rFilter, const RelationsRef &xRelations)
#define SAL_WARN_IF(condition, area, stream)
std::shared_ptr< Relations > RelationsRef