28#include <oox/token/namespaces.hxx>
29#include <oox/token/tokens.hxx>
43OUString lclGetRelationsPath(
const OUString& rFragmentPath )
45 sal_Int32 nPathLen = ::std::max< sal_Int32 >( rFragmentPath.lastIndexOf(
'/' ) + 1, 0 );
46 return OUString::Concat(std::u16string_view(rFragmentPath.getStr(), nPathLen )) +
48 std::u16string_view(rFragmentPath.getStr() + nPathLen) +
55 FragmentHandler( rFilter, lclGetRelationsPath( xRelations->getFragmentPath() ), xRelations ),
56 mxRelations( xRelations )
61 sal_Int32 nElement,
const Reference< XFastAttributeList >& rxAttribs )
63 Reference< XFastContextHandler > xRet;
73 if( !aRelation.
maId.isEmpty() && !aRelation.
maType.isEmpty() && !aRelation.
maTarget.isEmpty() )
75 sal_Int32 nTargetMode = aAttribs.
getToken( XML_TargetMode, XML_Internal );
76 SAL_WARN_IF( (nTargetMode != XML_Internal) && (nTargetMode != XML_External),
"oox",
77 "RelationsFragment::createFastChildContext - unexpected target mode, assuming external" );
78 aRelation.
mbExternal = nTargetMode != XML_Internal;
81 "RelationsFragment::createFastChildContext - relation identifier exists already" );
86 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