22#include <com/sun/star/xml/sax/XFastContextHandler.hpp>
28#include <oox/token/namespaces.hxx>
29#include <oox/token/properties.hxx>
30#include <oox/token/tokens.hxx>
48 if ( !aRelId.isEmpty() )
51 if( !sHref.isEmpty() )
62 if ( !sTooltip.isEmpty() )
68 if ( !aAction.isEmpty() )
84 static constexpr OUStringLiteral sPPAction(
u"ppaction://" );
85 if ( aAction.matchIgnoreAsciiCase( sPPAction ) )
87 OUString aPPAct( aAction.copy( sPPAction.getLength() ) );
88 sal_Int32
nIndex = aPPAct.indexOf(
'?' );
89 OUString aPPAction(
nIndex > 0 ? aPPAct.copy( 0,
nIndex ) : aPPAct );
91 if ( aPPAction.match(
"hlinkshowjump" ) )
93 static constexpr OUStringLiteral sJump(
u"jump=" );
94 if ( aPPAct.match( sJump,
nIndex + 1 ) )
96 std::u16string_view aDestination( aPPAct.subView(
nIndex + 1 + sJump.getLength() ) );
97 sURL += OUString::Concat(
"#action?jump=") + aDestination;
100 else if ( aPPAction.match(
"hlinksldjump" ) )
104 sal_Int32 nIndex2 = 0;
105 while ( nIndex2 < sHref.getLength() )
108 if ( ( nChar >=
'0' ) && ( nChar <=
'9' ) )
112 if ( nIndex2 && ( nIndex2 != sHref.getLength() ) )
115 while( ( nIndex2 +
nLength ) < sHref.getLength() )
118 if ( ( nChar <
'0' ) || ( nChar >
'9' ) )
125 const OUString aSlideType( sHref.copy( 0, nIndex2 ) );
126 if ( aSlideType.match(
"slide" ) )
127 sURL =
"#" +
URLResId(STR_SLIDE_NAME) +
" " + OUString::number( nPageNumber );
128 else if ( aSlideType.match(
"notesSlide" ) )
129 sURL =
"#Notes " + OUString::number( nPageNumber );
136 if ( !sURL.isEmpty() )
155 case A_TOKEN( extLst ):
PropertiesInfo aProperties
constexpr OUStringLiteral sFrame
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...
A helper that maps property identifiers to property values.
bool setProperty(sal_Int32 nPropId, Type &&rValue)
Sets the specified property to the passed value.
XmlFilterBase & getFilter() const
Returns the filter instance.
const Relations & getRelations() const
Returns the relations of the current fragment.
OUString getAbsoluteUrl(const OUString &rUrl) const
Returns an absolute URL for the passed relative or absolute URL.
OUString getInternalTargetFromRelId(const OUString &rRelId) const
Returns the internal target of the relation with the passed relation identifier.
OUString getExternalTargetFromRelId(const OUString &rRelId) const
Returns the external target of the relation with the passed relation identifier.
virtual ~HyperLinkContext() override
PropertyMap & maProperties
HyperLinkContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, PropertyMap &aProperties)
virtual ::oox::core::ContextHandlerRef onCreateContext(::sal_Int32 Element, const ::oox::AttributeList &rAttribs) override
SvGenericNameContainerMapImpl maProperties
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
OUString URLResId(TranslateId aId)
constexpr OUStringLiteral PROP_CharColor