매크로와 관련하여 Impress (매크로 기록 없음, Python 스크립팅 없음, Basic 기본 사항 제외) 및 샘플 수가 거의 없습니다.선택 항목에 페이드 인 효과를 만드는 방법은 무엇입니까?
"수동으로"텍스트 애니메이션을 만드는 방법에 대한 샘플은 없습니다. 나는 하나를 발견했습니다 here (6 세) 그리고 많은 정보가 있습니다.
지금까지 (1) 텍스트 애니메이션 "fadein"을 이미 스캔했습니다 (2) 다른 텍스트 애니메이션을 모두 스캔 한 다음이를 제거하여 "fadein "애니메이션 : 나는 효과를 복제하는 경우
sub MyFunction
' --------------------------------------------------------------------
' (1) scan for a text animation "fadein" that is already there
effectNodeFadeIn = Null
doc = ThisComponent
numSlides = doc.getDrawPages().getCount()
slide = doc.drawPages(numSlides-1)
mainSequence = getMainSequence(slide)
clickNodes = mainSequence.createEnumeration()
while clickNodes.hasMoreElements() and IsNull(effectNodeFadeIn)
clickNode = clickNodes.nextElement()
groupNodes = clickNode.createEnumeration()
while groupNodes.hasMoreElements() and IsNull(effectNodeFadeIn)
groupNode = groupNodes.nextElement()
effectNodes = groupNode.createEnumeration()
while effectNodes.hasMoreElements() and IsNull(effectNodeFadeIn)
effectNode = effectNodes.nextElement()
' ICIC
if effectNode.ImplementationName = "animcore::ParallelTimeContainer" then
if hasUserDataKey(effectNode, "preset-id") then
v = getUserDataValue(effectNode, "preset-id")
if v = "ooo-entrance-fade-in" then ' ooo-entrance-appear
effectNodeFadeIn = effectNode
end if
end if
end if
' useless loop just in case I need it:
animNodes = effectNode.createEnumeration()
while animNodes.hasMoreElements()
animNode = animNodes.nextElement()
wend
wend
wend
wend
' --------------------------------------------------------------------
' (2) scan for all other text animations,
' and then remove them an replace them by a clone of the "fadein" animation
if not IsNull(effectNodeFadeIn) then
clickNodes = mainSequence.createEnumeration()
while clickNodes.hasMoreElements()
clickNode = clickNodes.nextElement()
groupNodes = clickNode.createEnumeration()
while groupNodes.hasMoreElements()
groupNode = groupNodes.nextElement()
effectNodes = groupNode.createEnumeration()
while effectNodes.hasMoreElements()
effectNode = effectNodes.nextElement()
' ICIC
if effectNode.ImplementationName = "animcore::ParallelTimeContainer" then
if hasUserDataKey(effectNode, "preset-id") then
v = getUserDataValue(effectNode, "preset-id")
if v <> "ooo-entrance-fade-in" then ' ooo-entrance-appear
groupNode.removeChild(effectNode)
n = effectNodeFadeIn.createClone()
groupNode.appendChild(n)
' useless loop just in case I need it:
animNodes = effectNode.createEnumeration()
while animNodes.hasMoreElements()
animNode = animNodes.nextElement()
wend
end if
end if
end if
wend
wend
wend
end if
end sub
function hasUserDataKey(node as Object, key as String) as Boolean
for each data in node.UserData
if data.Name = "node-type" then
hasUserDataKey = True
exit function
end if
next data
hasUserDataKey = False
end function
function getUserDataValue(node as Object, key as String) as Variant
for each data in node.UserData
if data.Name = key then
getUserDataValue = data.Value
exit function
end if
next data
end function
이, 그것은 여전히"연결 "원본 텍스트에 다음 부모가 제거되고 대체된다"fadein "텍스트입니다. 어떤 생각이 어떻게 해결할 수 있습니까?
여기서'hasUserDataKey()'와'getUserDataValue()'의 정의는 무엇입니까? –
누락 된 기능 2 개가 업데이트되었습니다. –